@fluentui/react-progress 9.1.4 → 9.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +73 -1
  3. package/CHANGELOG.md +27 -2
  4. package/lib/ProgressBar.js.map +1 -1
  5. package/lib/ProgressField.js.map +1 -1
  6. package/lib/components/ProgressBar/ProgressBar.js.map +1 -1
  7. package/lib/components/ProgressBar/ProgressBar.types.js.map +1 -1
  8. package/lib/components/ProgressBar/index.js.map +1 -1
  9. package/lib/components/ProgressBar/renderProgressBar.js +1 -5
  10. package/lib/components/ProgressBar/renderProgressBar.js.map +1 -1
  11. package/lib/components/ProgressBar/useProgressBar.js +3 -2
  12. package/lib/components/ProgressBar/useProgressBar.js.map +1 -1
  13. package/lib/components/ProgressBar/useProgressBarStyles.js +1 -2
  14. package/lib/components/ProgressBar/useProgressBarStyles.js.map +1 -1
  15. package/lib/components/ProgressField/ProgressField.js +1 -2
  16. package/lib/components/ProgressField/ProgressField.js.map +1 -1
  17. package/lib/components/ProgressField/index.js.map +1 -1
  18. package/lib/index.js.map +1 -1
  19. package/lib/utils/clampMax.js.map +1 -1
  20. package/lib/utils/clampValue.js.map +1 -1
  21. package/lib/utils/index.js.map +1 -1
  22. package/lib-commonjs/ProgressBar.js +5 -4
  23. package/lib-commonjs/ProgressBar.js.map +1 -1
  24. package/lib-commonjs/ProgressField.js +5 -4
  25. package/lib-commonjs/ProgressField.js.map +1 -1
  26. package/lib-commonjs/components/ProgressBar/ProgressBar.js +19 -20
  27. package/lib-commonjs/components/ProgressBar/ProgressBar.js.map +1 -1
  28. package/lib-commonjs/components/ProgressBar/ProgressBar.types.js +3 -2
  29. package/lib-commonjs/components/ProgressBar/ProgressBar.types.js.map +1 -1
  30. package/lib-commonjs/components/ProgressBar/index.js +9 -8
  31. package/lib-commonjs/components/ProgressBar/index.js.map +1 -1
  32. package/lib-commonjs/components/ProgressBar/renderProgressBar.js +13 -20
  33. package/lib-commonjs/components/ProgressBar/renderProgressBar.js.map +1 -1
  34. package/lib-commonjs/components/ProgressBar/useProgressBar.js +42 -51
  35. package/lib-commonjs/components/ProgressBar/useProgressBar.js.map +1 -1
  36. package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js +220 -122
  37. package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js.map +1 -1
  38. package/lib-commonjs/components/ProgressField/ProgressField.js +25 -19
  39. package/lib-commonjs/components/ProgressField/ProgressField.js.map +1 -1
  40. package/lib-commonjs/components/ProgressField/index.js +5 -4
  41. package/lib-commonjs/components/ProgressField/index.js.map +1 -1
  42. package/lib-commonjs/index.js +21 -49
  43. package/lib-commonjs/index.js.map +1 -1
  44. package/lib-commonjs/utils/clampMax.js +15 -13
  45. package/lib-commonjs/utils/clampMax.js.map +1 -1
  46. package/lib-commonjs/utils/clampValue.js +21 -19
  47. package/lib-commonjs/utils/clampValue.js.map +1 -1
  48. package/lib-commonjs/utils/index.js +6 -5
  49. package/lib-commonjs/utils/index.js.map +1 -1
  50. package/package.json +9 -8
  51. package/lib-amd/ProgressBar.js +0 -6
  52. package/lib-amd/ProgressBar.js.map +0 -1
  53. package/lib-amd/ProgressField.js +0 -6
  54. package/lib-amd/ProgressField.js.map +0 -1
  55. package/lib-amd/components/ProgressBar/ProgressBar.js +0 -17
  56. package/lib-amd/components/ProgressBar/ProgressBar.js.map +0 -1
  57. package/lib-amd/components/ProgressBar/ProgressBar.types.js +0 -5
  58. package/lib-amd/components/ProgressBar/ProgressBar.types.js.map +0 -1
  59. package/lib-amd/components/ProgressBar/index.js +0 -10
  60. package/lib-amd/components/ProgressBar/index.js.map +0 -1
  61. package/lib-amd/components/ProgressBar/renderProgressBar.js +0 -14
  62. package/lib-amd/components/ProgressBar/renderProgressBar.js.map +0 -1
  63. package/lib-amd/components/ProgressBar/useProgressBar.js +0 -41
  64. package/lib-amd/components/ProgressBar/useProgressBar.js.map +0 -1
  65. package/lib-amd/components/ProgressBar/useProgressBarStyles.js +0 -96
  66. package/lib-amd/components/ProgressBar/useProgressBarStyles.js.map +0 -1
  67. package/lib-amd/components/ProgressField/ProgressField.js +0 -13
  68. package/lib-amd/components/ProgressField/ProgressField.js.map +0 -1
  69. package/lib-amd/components/ProgressField/index.js +0 -6
  70. package/lib-amd/components/ProgressField/index.js.map +0 -1
  71. package/lib-amd/index.js +0 -13
  72. package/lib-amd/index.js.map +0 -1
  73. package/lib-amd/utils/clampMax.js +0 -17
  74. package/lib-amd/utils/clampMax.js.map +0 -1
  75. package/lib-amd/utils/clampValue.js +0 -24
  76. package/lib-amd/utils/clampValue.js.map +0 -1
  77. package/lib-amd/utils/index.js +0 -7
  78. package/lib-amd/utils/index.js.map +0 -1
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./ProgressField"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./ProgressField"), exports);
7
+ //# sourceMappingURL=index.js.map
8
+
8
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-progress/src/components/ProgressField/index.ts"],"sourcesContent":["export * from './ProgressField';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,qBAAAC,OAAA"}
1
+ {"version":3,"sources":["../../../lib/components/ProgressField/index.js"],"sourcesContent":["export * from './ProgressField';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,iCAAiC"}
@@ -1,52 +1,24 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.progressFieldClassNames = exports.ProgressField_unstable = exports.useProgressBarStyles_unstable = exports.useProgressBar_unstable = exports.renderProgressBar_unstable = exports.progressBarClassNames = exports.ProgressBar = void 0;
7
- var ProgressBar_1 = /*#__PURE__*/require("./ProgressBar");
8
- Object.defineProperty(exports, "ProgressBar", {
9
- enumerable: true,
10
- get: function () {
11
- return ProgressBar_1.ProgressBar;
12
- }
13
- });
14
- Object.defineProperty(exports, "progressBarClassNames", {
15
- enumerable: true,
16
- get: function () {
17
- return ProgressBar_1.progressBarClassNames;
18
- }
19
- });
20
- Object.defineProperty(exports, "renderProgressBar_unstable", {
21
- enumerable: true,
22
- get: function () {
23
- return ProgressBar_1.renderProgressBar_unstable;
24
- }
25
- });
26
- Object.defineProperty(exports, "useProgressBar_unstable", {
27
- enumerable: true,
28
- get: function () {
29
- return ProgressBar_1.useProgressBar_unstable;
30
- }
31
- });
32
- Object.defineProperty(exports, "useProgressBarStyles_unstable", {
33
- enumerable: true,
34
- get: function () {
35
- return ProgressBar_1.useProgressBarStyles_unstable;
36
- }
37
- });
38
- // eslint-disable-next-line deprecation/deprecation
39
- var ProgressField_1 = /*#__PURE__*/require("./ProgressField");
40
- Object.defineProperty(exports, "ProgressField_unstable", {
41
- enumerable: true,
42
- get: function () {
43
- return ProgressField_1.ProgressField;
44
- }
45
- });
46
- Object.defineProperty(exports, "progressFieldClassNames", {
47
- enumerable: true,
48
- get: function () {
49
- return ProgressField_1.progressFieldClassNames;
50
- }
51
- });
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ ProgressBar: ()=>_progressBar.ProgressBar,
13
+ progressBarClassNames: ()=>_progressBar.progressBarClassNames,
14
+ renderProgressBar_unstable: ()=>_progressBar.renderProgressBar_unstable,
15
+ useProgressBar_unstable: ()=>_progressBar.useProgressBar_unstable,
16
+ useProgressBarStyles_unstable: ()=>_progressBar.useProgressBarStyles_unstable,
17
+ ProgressField_unstable: ()=>_progressField.ProgressField,
18
+ progressFieldClassNames: ()=>_progressField.progressFieldClassNames
19
+ });
20
+ const _progressBar = require("./ProgressBar");
21
+ const _progressField = require("./ProgressField");
22
+ //# sourceMappingURL=index.js.map
23
+
52
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["ProgressBar_1","require","Object","defineProperty","exports","enumerable","get","ProgressBar","progressBarClassNames","renderProgressBar_unstable","useProgressBar_unstable","useProgressBarStyles_unstable","ProgressField_1","ProgressField","progressFieldClassNames"],"sources":["../src/packages/react-components/react-progress/src/index.ts"],"sourcesContent":["export {\n ProgressBar,\n progressBarClassNames,\n renderProgressBar_unstable,\n useProgressBar_unstable,\n useProgressBarStyles_unstable,\n} from './ProgressBar';\nexport type { ProgressBarProps, ProgressBarSlots, ProgressBarState } from './ProgressBar';\n\n// eslint-disable-next-line deprecation/deprecation\nexport { ProgressField as ProgressField_unstable, progressFieldClassNames } from './ProgressField';\n// eslint-disable-next-line deprecation/deprecation\nexport type { ProgressFieldProps as ProgressFieldProps_unstable } from './ProgressField';\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,gBAAAC,OAAA;AACEC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,aAAA,CAAAO,WAAW;EAAA;AAAA;AACXL,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,aAAA,CAAAQ,qBAAqB;EAAA;AAAA;AACrBN,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,aAAA,CAAAS,0BAA0B;EAAA;AAAA;AAC1BP,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,aAAA,CAAAU,uBAAuB;EAAA;AAAA;AACvBR,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,aAAA,CAAAW,6BAA6B;EAAA;AAAA;AAI/B;AACA,IAAAC,eAAA,gBAAAX,OAAA;AAASC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAM,eAAA,CAAAC,aAAa;EAAA;AAAA;AAA4BX,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAM,eAAA,CAAAE,uBAAuB;EAAA;AAAA"}
1
+ {"version":3,"sources":["../lib/index.js"],"sourcesContent":["export { ProgressBar, progressBarClassNames, renderProgressBar_unstable, useProgressBar_unstable, useProgressBarStyles_unstable } from './ProgressBar';\n// eslint-disable-next-line deprecation/deprecation\nexport { ProgressField as ProgressField_unstable, progressFieldClassNames } from './ProgressField';\n//# sourceMappingURL=index.js.map"],"names":["ProgressBar","progressBarClassNames","renderProgressBar_unstable","useProgressBar_unstable","useProgressBarStyles_unstable","ProgressField_unstable","ProgressField","progressFieldClassNames"],"mappings":";;;;;;;;;;;IAASA,WAAW,MAAXA,wBAAW;IAAEC,qBAAqB,MAArBA,kCAAqB;IAAEC,0BAA0B,MAA1BA,uCAA0B;IAAEC,uBAAuB,MAAvBA,oCAAuB;IAAEC,6BAA6B,MAA7BA,0CAA6B;IAErGC,sBAAsB,MAAvCC,4BAAa;IAA4BC,uBAAuB,MAAvBA,sCAAuB;;6BAF8D;+BAEtD;CACjF,iCAAiC"}
@@ -1,18 +1,20 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "clampMax", {
6
+ enumerable: true,
7
+ get: ()=>clampMax
5
8
  });
6
- exports.clampMax = void 0;
7
- const clampMax = max => {
8
- const internalMax = max <= 0 ? 1 : max;
9
- if (process.env.NODE_ENV !== 'production') {
10
- if (max <= 0) {
11
- // eslint-disable-next-line no-console
12
- console.error(`The prop 'max' must be greater than 0. Received max: ${max}`);
9
+ const clampMax = (max)=>{
10
+ const internalMax = max <= 0 ? 1 : max;
11
+ if (process.env.NODE_ENV !== 'production') {
12
+ if (max <= 0) {
13
+ // eslint-disable-next-line no-console
14
+ console.error(`The prop 'max' must be greater than 0. Received max: ${max}`);
15
+ }
13
16
  }
14
- }
15
- return internalMax;
16
- };
17
- exports.clampMax = clampMax;
17
+ return internalMax;
18
+ }; //# sourceMappingURL=clampMax.js.map
19
+
18
20
  //# sourceMappingURL=clampMax.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["clampMax","max","internalMax","process","env","NODE_ENV","console","error","exports"],"sources":["../src/packages/react-components/react-progress/src/utils/clampMax.ts"],"sourcesContent":["export const clampMax = (max: number): number => {\n const internalMax = max <= 0 ? 1 : max;\n\n if (process.env.NODE_ENV !== 'production') {\n if (max <= 0) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'max' must be greater than 0. Received max: ${max}`);\n }\n }\n return internalMax;\n};\n"],"mappings":";;;;;;AAAO,MAAMA,QAAQ,GAAIC,GAAW,IAAY;EAC9C,MAAMC,WAAW,GAAGD,GAAG,IAAI,CAAC,GAAG,CAAC,GAAGA,GAAG;EAEtC,IAAIE,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;IACzC,IAAIJ,GAAG,IAAI,CAAC,EAAE;MACZ;MACAK,OAAO,CAACC,KAAK,CAAC,wDAAwDN,GAAG,EAAE,CAAC;;;EAGhF,OAAOC,WAAW;AACpB,CAAC;AAVYM,OAAA,CAAAR,QAAQ,GAAAA,QAAA"}
1
+ {"version":3,"sources":["../../lib/utils/clampMax.js"],"sourcesContent":["export const clampMax = max => {\n const internalMax = max <= 0 ? 1 : max;\n if (process.env.NODE_ENV !== 'production') {\n if (max <= 0) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'max' must be greater than 0. Received max: ${max}`);\n }\n }\n return internalMax;\n};\n//# sourceMappingURL=clampMax.js.map"],"names":["clampMax","max","internalMax","process","env","NODE_ENV","console","error"],"mappings":";;;;+BAAaA;;aAAAA;;AAAN,MAAMA,WAAWC,CAAAA,MAAO;IAC7B,MAAMC,cAAcD,OAAO,IAAI,IAAIA,GAAG;IACtC,IAAIE,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,IAAIJ,OAAO,GAAG;YACZ,sCAAsC;YACtCK,QAAQC,KAAK,CAAC,CAAC,qDAAqD,EAAEN,IAAI,CAAC;QAC7E,CAAC;IACH,CAAC;IACD,OAAOC;AACT,GACA,oCAAoC"}
@@ -1,25 +1,27 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "clampValue", {
6
+ enumerable: true,
7
+ get: ()=>clampValue
5
8
  });
6
- exports.clampValue = void 0;
7
- const clampValue = (value, max) => {
8
- if (value === undefined) {
9
- return value;
10
- }
11
- const internalValue = value < 0 ? 0 : value > max ? max : value;
12
- if (process.env.NODE_ENV !== 'production') {
13
- if (value < 0) {
14
- // eslint-disable-next-line no-console
15
- console.error(`The prop 'value' must be greater than or equal to zero. Received value: ${value}`);
9
+ const clampValue = (value, max)=>{
10
+ if (value === undefined) {
11
+ return value;
16
12
  }
17
- if (value > max) {
18
- // eslint-disable-next-line no-console
19
- console.error(`The prop 'value' must be less than or equal to 'max'. Received value: ${value}, max: ${max}`);
13
+ const internalValue = value < 0 ? 0 : value > max ? max : value;
14
+ if (process.env.NODE_ENV !== 'production') {
15
+ if (value < 0) {
16
+ // eslint-disable-next-line no-console
17
+ console.error(`The prop 'value' must be greater than or equal to zero. Received value: ${value}`);
18
+ }
19
+ if (value > max) {
20
+ // eslint-disable-next-line no-console
21
+ console.error(`The prop 'value' must be less than or equal to 'max'. Received value: ${value}, max: ${max}`);
22
+ }
20
23
  }
21
- }
22
- return internalValue;
23
- };
24
- exports.clampValue = clampValue;
24
+ return internalValue;
25
+ }; //# sourceMappingURL=clampValue.js.map
26
+
25
27
  //# sourceMappingURL=clampValue.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["clampValue","value","max","undefined","internalValue","process","env","NODE_ENV","console","error","exports"],"sources":["../src/packages/react-components/react-progress/src/utils/clampValue.ts"],"sourcesContent":["export const clampValue = (value: number | undefined, max: number): number | undefined => {\n if (value === undefined) {\n return value;\n }\n const internalValue = value < 0 ? 0 : value > max ? max : value;\n\n if (process.env.NODE_ENV !== 'production') {\n if (value < 0) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'value' must be greater than or equal to zero. Received value: ${value}`);\n }\n if (value > max) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'value' must be less than or equal to 'max'. Received value: ${value}, max: ${max}`);\n }\n }\n return internalValue;\n};\n"],"mappings":";;;;;;AAAO,MAAMA,UAAU,GAAGA,CAACC,KAAyB,EAAEC,GAAW,KAAwB;EACvF,IAAID,KAAK,KAAKE,SAAS,EAAE;IACvB,OAAOF,KAAK;;EAEd,MAAMG,aAAa,GAAGH,KAAK,GAAG,CAAC,GAAG,CAAC,GAAGA,KAAK,GAAGC,GAAG,GAAGA,GAAG,GAAGD,KAAK;EAE/D,IAAII,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;IACzC,IAAIN,KAAK,GAAG,CAAC,EAAE;MACb;MACAO,OAAO,CAACC,KAAK,CAAC,2EAA2ER,KAAK,EAAE,CAAC;;IAEnG,IAAIA,KAAK,GAAGC,GAAG,EAAE;MACf;MACAM,OAAO,CAACC,KAAK,CAAC,yEAAyER,KAAK,UAAUC,GAAG,EAAE,CAAC;;;EAGhH,OAAOE,aAAa;AACtB,CAAC;AAjBYM,OAAA,CAAAV,UAAU,GAAAA,UAAA"}
1
+ {"version":3,"sources":["../../lib/utils/clampValue.js"],"sourcesContent":["export const clampValue = (value, max) => {\n if (value === undefined) {\n return value;\n }\n const internalValue = value < 0 ? 0 : value > max ? max : value;\n if (process.env.NODE_ENV !== 'production') {\n if (value < 0) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'value' must be greater than or equal to zero. Received value: ${value}`);\n }\n if (value > max) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'value' must be less than or equal to 'max'. Received value: ${value}, max: ${max}`);\n }\n }\n return internalValue;\n};\n//# sourceMappingURL=clampValue.js.map"],"names":["clampValue","value","max","undefined","internalValue","process","env","NODE_ENV","console","error"],"mappings":";;;;+BAAaA;;aAAAA;;AAAN,MAAMA,aAAa,CAACC,OAAOC,MAAQ;IACxC,IAAID,UAAUE,WAAW;QACvB,OAAOF;IACT,CAAC;IACD,MAAMG,gBAAgBH,QAAQ,IAAI,IAAIA,QAAQC,MAAMA,MAAMD,KAAK;IAC/D,IAAII,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,IAAIN,QAAQ,GAAG;YACb,sCAAsC;YACtCO,QAAQC,KAAK,CAAC,CAAC,wEAAwE,EAAER,MAAM,CAAC;QAClG,CAAC;QACD,IAAIA,QAAQC,KAAK;YACf,sCAAsC;YACtCM,QAAQC,KAAK,CAAC,CAAC,sEAAsE,EAAER,MAAM,OAAO,EAAEC,IAAI,CAAC;QAC7G,CAAC;IACH,CAAC;IACD,OAAOE;AACT,GACA,sCAAsC"}
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./clampMax"), exports);
8
- tslib_1.__exportStar(require("./clampValue"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./clampMax"), exports);
7
+ _exportStar(require("./clampValue"), exports);
8
+ //# sourceMappingURL=index.js.map
9
+
9
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-progress/src/utils/index.ts"],"sourcesContent":["export * from './clampMax';\nexport * from './clampValue';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,gBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,kBAAAC,OAAA"}
1
+ {"version":3,"sources":["../../lib/utils/index.js"],"sourcesContent":["export * from './clampMax';\nexport * from './clampValue';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;CACd,iCAAiC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-progress",
3
- "version": "9.1.4",
3
+ "version": "9.1.6",
4
4
  "description": "Progress component for FluentUI v9",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -22,22 +22,22 @@
22
22
  "type-check": "tsc -b tsconfig.json",
23
23
  "storybook": "start-storybook",
24
24
  "start": "yarn storybook",
25
- "generate-api": "tsc -p ./tsconfig.lib.json --emitDeclarationOnly && just-scripts api-extractor"
25
+ "generate-api": "just-scripts generate-api"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@fluentui/eslint-plugin": "*",
29
29
  "@fluentui/react-conformance": "*",
30
- "@fluentui/react-conformance-griffel": "9.0.0-beta.19",
30
+ "@fluentui/react-conformance-griffel": "9.0.0-beta.20",
31
31
  "@fluentui/scripts-api-extractor": "*",
32
32
  "@fluentui/scripts-tasks": "*"
33
33
  },
34
34
  "dependencies": {
35
- "@fluentui/react-field": "9.0.0-alpha.26",
36
- "@fluentui/react-shared-contexts": "^9.3.1",
37
- "@fluentui/react-theme": "^9.1.6",
38
- "@fluentui/react-utilities": "^9.7.1",
35
+ "@fluentui/react-field": "9.0.0-alpha.28",
36
+ "@fluentui/react-shared-contexts": "^9.3.3",
37
+ "@fluentui/react-theme": "^9.1.7",
38
+ "@fluentui/react-utilities": "^9.7.2",
39
39
  "@griffel/react": "^1.5.2",
40
- "tslib": "^2.1.0"
40
+ "@swc/helpers": "^0.4.14"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@types/react": ">=16.8.0 <19.0.0",
@@ -54,6 +54,7 @@
54
54
  "exports": {
55
55
  ".": {
56
56
  "types": "./dist/index.d.ts",
57
+ "node": "./lib-commonjs/index.js",
57
58
  "import": "./lib/index.js",
58
59
  "require": "./lib-commonjs/index.js"
59
60
  },
@@ -1,6 +0,0 @@
1
- define(["require", "exports", "tslib", "./components/ProgressBar/index"], function (require, exports, tslib_1, index_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(index_1, exports);
5
- });
6
- //# sourceMappingURL=ProgressBar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProgressBar.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-progress/src/ProgressBar.ts"],"names":[],"mappings":";;;IAAA,uCAA+C","sourcesContent":["export * from './components/ProgressBar/index';\n"]}
@@ -1,6 +0,0 @@
1
- define(["require", "exports", "tslib", "./components/ProgressField/index"], function (require, exports, tslib_1, index_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(index_1, exports);
5
- });
6
- //# sourceMappingURL=ProgressField.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProgressField.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-progress/src/ProgressField.ts"],"names":[],"mappings":";;;IAAA,uCAAiD","sourcesContent":["export * from './components/ProgressField/index';\n"]}
@@ -1,17 +0,0 @@
1
- define(["require", "exports", "react", "./useProgressBar", "./renderProgressBar", "./useProgressBarStyles", "@fluentui/react-shared-contexts"], function (require, exports, React, useProgressBar_1, renderProgressBar_1, useProgressBarStyles_1, react_shared_contexts_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.ProgressBar = void 0;
5
- /**
6
- * A ProgressBar bar shows the progression of a task.
7
- */
8
- exports.ProgressBar = React.forwardRef(function (props, ref) {
9
- var state = useProgressBar_1.useProgressBar_unstable(props, ref);
10
- useProgressBarStyles_1.useProgressBarStyles_unstable(state);
11
- var useCustomStyles = react_shared_contexts_1.useCustomStyleHooks_unstable().useProgressBarStyles_unstable;
12
- useCustomStyles(state);
13
- return renderProgressBar_1.renderProgressBar_unstable(state);
14
- });
15
- exports.ProgressBar.displayName = 'ProgressBar';
16
- });
17
- //# sourceMappingURL=ProgressBar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProgressBar.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/src/components/ProgressBar/ProgressBar.tsx"],"names":[],"mappings":";;;;IAQA;;OAEG;IACU,QAAA,WAAW,GAA0C,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QAC5F,IAAM,KAAK,GAAG,wCAAuB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAElD,oDAA6B,CAAC,KAAK,CAAC,CAAC;QAE7B,IAA+B,eAAe,GAAK,oDAA4B,EAAE,8BAAnC,CAAoC;QAC1F,eAAe,CAAC,KAAK,CAAC,CAAC;QAEvB,OAAO,8CAA0B,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import * as React from 'react';\nimport { useProgressBar_unstable } from './useProgressBar';\nimport { renderProgressBar_unstable } from './renderProgressBar';\nimport { useProgressBarStyles_unstable } from './useProgressBarStyles';\nimport type { ProgressBarProps } from './ProgressBar.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * A ProgressBar bar shows the progression of a task.\n */\nexport const ProgressBar: ForwardRefComponent<ProgressBarProps> = React.forwardRef((props, ref) => {\n const state = useProgressBar_unstable(props, ref);\n\n useProgressBarStyles_unstable(state);\n\n const { useProgressBarStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderProgressBar_unstable(state);\n});\n\nProgressBar.displayName = 'ProgressBar';\n"]}
@@ -1,5 +0,0 @@
1
- define(["require", "exports"], function (require, exports) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- });
5
- //# sourceMappingURL=ProgressBar.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProgressBar.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/src/components/ProgressBar/ProgressBar.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type ProgressBarSlots = {\n /**\n * The track behind the ProgressBar bar\n */\n root: NonNullable<Slot<'div'>>;\n /**\n * The filled portion of the ProgressBar bar. Animated in the indeterminate state, when no value is provided.\n */\n bar?: NonNullable<Slot<'div'>>;\n};\n\n/**\n * ProgressBar Props\n */\nexport type ProgressBarProps = Omit<ComponentProps<ProgressBarSlots>, 'size'> & {\n /**\n * The shape of the bar and track.\n * @default rounded\n */\n shape?: 'rounded' | 'square';\n /**\n * A decimal number between `0` and `1` (or between `0` and `max` if given),\n * which specifies how much of the task has been completed.\n *\n * If `undefined` (default), the ProgressBar will display an **indeterminate** state.\n */\n value?: number;\n /**\n * The maximum value, which indicates the task is complete.\n * The ProgressBar bar will be full when `value` equals `max`.\n * @default 1\n */\n max?: number;\n /**\n * The thickness of the ProgressBar bar\n * @default medium\n */\n thickness?: 'medium' | 'large';\n\n /**\n * The status of the ProgressBar bar. Changes the color of the bar.\n * @default brand\n */\n color?: 'brand' | 'success' | 'warning' | 'error';\n};\n\n/**\n * State used in rendering ProgressBar\n */\nexport type ProgressBarState = ComponentState<ProgressBarSlots> &\n Required<Pick<ProgressBarProps, 'max' | 'shape' | 'thickness'>> &\n Pick<ProgressBarProps, 'value' | 'color'>;\n"]}
@@ -1,10 +0,0 @@
1
- define(["require", "exports", "tslib", "./ProgressBar", "./ProgressBar.types", "./renderProgressBar", "./useProgressBar", "./useProgressBarStyles"], function (require, exports, tslib_1, ProgressBar_1, ProgressBar_types_1, renderProgressBar_1, useProgressBar_1, useProgressBarStyles_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(ProgressBar_1, exports);
5
- tslib_1.__exportStar(ProgressBar_types_1, exports);
6
- tslib_1.__exportStar(renderProgressBar_1, exports);
7
- tslib_1.__exportStar(useProgressBar_1, exports);
8
- tslib_1.__exportStar(useProgressBarStyles_1, exports);
9
- });
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/src/components/ProgressBar/index.ts"],"names":[],"mappings":";;;IAAA,6CAA8B;IAC9B,mDAAoC;IACpC,mDAAoC;IACpC,gDAAiC;IACjC,sDAAuC","sourcesContent":["export * from './ProgressBar';\nexport * from './ProgressBar.types';\nexport * from './renderProgressBar';\nexport * from './useProgressBar';\nexport * from './useProgressBarStyles';\n"]}
@@ -1,14 +0,0 @@
1
- define(["require", "exports", "tslib", "react", "@fluentui/react-utilities"], function (require, exports, tslib_1, React, react_utilities_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.renderProgressBar_unstable = void 0;
5
- /**
6
- * Render the final JSX of ProgressBar
7
- */
8
- var renderProgressBar_unstable = function (state) {
9
- var _a = react_utilities_1.getSlots(state), slots = _a.slots, slotProps = _a.slotProps;
10
- return React.createElement(slots.root, tslib_1.__assign({}, slotProps.root), slots.bar && React.createElement(slots.bar, tslib_1.__assign({}, slotProps.bar)));
11
- };
12
- exports.renderProgressBar_unstable = renderProgressBar_unstable;
13
- });
14
- //# sourceMappingURL=renderProgressBar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderProgressBar.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/src/components/ProgressBar/renderProgressBar.tsx"],"names":[],"mappings":";;;;IAIA;;OAEG;IACI,IAAM,0BAA0B,GAAG,UAAC,KAAuB;QAC1D,IAAA,KAAuB,0BAAQ,CAAmB,KAAK,CAAC,EAAtD,KAAK,WAAA,EAAE,SAAS,eAAsC,CAAC;QAC/D,OAAO,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,IAAI,oBAAC,KAAK,CAAC,GAAG,uBAAK,SAAS,CAAC,GAAG,EAAI,CAAc,CAAC;IACtG,CAAC,CAAC;IAHW,QAAA,0BAA0B,8BAGrC","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { ProgressBarState, ProgressBarSlots } from './ProgressBar.types';\n\n/**\n * Render the final JSX of ProgressBar\n */\nexport const renderProgressBar_unstable = (state: ProgressBarState) => {\n const { slots, slotProps } = getSlots<ProgressBarSlots>(state);\n return <slots.root {...slotProps.root}>{slots.bar && <slots.bar {...slotProps.bar} />}</slots.root>;\n};\n"]}
@@ -1,41 +0,0 @@
1
- define(["require", "exports", "tslib", "@fluentui/react-utilities", "../../utils/index"], function (require, exports, tslib_1, react_utilities_1, index_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.useProgressBar_unstable = void 0;
5
- /**
6
- * Create the state required to render ProgressBar.
7
- *
8
- * The returned state can be modified with hooks such as useProgressBarStyles_unstable,
9
- * before being passed to renderProgressBar_unstable.
10
- *
11
- * @param props - props from this instance of ProgressBar
12
- * @param ref - reference to root HTMLElement of ProgressBar
13
- */
14
- var useProgressBar_unstable = function (props, ref) {
15
- var _a;
16
- // Props
17
- var _b = props.color, color = _b === void 0 ? 'brand' : _b, _c = props.shape, shape = _c === void 0 ? 'rounded' : _c, _d = props.thickness, thickness = _d === void 0 ? 'medium' : _d;
18
- var max = index_1.clampMax((_a = props.max) !== null && _a !== void 0 ? _a : 1);
19
- var value = index_1.clampValue(props.value, max);
20
- var root = react_utilities_1.getNativeElementProps('div', tslib_1.__assign({ ref: ref, role: 'progressbar', 'aria-valuemin': value !== undefined ? 0 : undefined, 'aria-valuemax': value !== undefined ? max : undefined, 'aria-valuenow': value }, props));
21
- var bar = react_utilities_1.resolveShorthand(props.bar, {
22
- required: true,
23
- });
24
- var state = {
25
- color: color,
26
- max: max,
27
- shape: shape,
28
- thickness: thickness,
29
- value: value,
30
- components: {
31
- root: 'div',
32
- bar: 'div',
33
- },
34
- root: root,
35
- bar: bar,
36
- };
37
- return state;
38
- };
39
- exports.useProgressBar_unstable = useProgressBar_unstable;
40
- });
41
- //# sourceMappingURL=useProgressBar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useProgressBar.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/src/components/ProgressBar/useProgressBar.tsx"],"names":[],"mappings":";;;;IAKA;;;;;;;;OAQG;IACI,IAAM,uBAAuB,GAAG,UAAC,KAAuB,EAAE,GAA2B;;QAC1F,QAAQ;QACA,IAAA,KAA6D,KAAK,MAAnD,EAAf,KAAK,mBAAG,OAAO,KAAA,EAAE,KAA4C,KAAK,MAAhC,EAAjB,KAAK,mBAAG,SAAS,KAAA,EAAE,KAAyB,KAAK,UAAV,EAApB,SAAS,mBAAG,QAAQ,KAAA,CAAW;QAC3E,IAAM,GAAG,GAAG,gBAAQ,CAAC,MAAA,KAAK,CAAC,GAAG,mCAAI,CAAC,CAAC,CAAC;QACrC,IAAM,KAAK,GAAG,kBAAU,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAE3C,IAAM,IAAI,GAAG,uCAAqB,CAAC,KAAK,qBACtC,GAAG,KAAA,EACH,IAAI,EAAE,aAAa,EACnB,eAAe,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EACpD,eAAe,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,EACtD,eAAe,EAAE,KAAK,IACnB,KAAK,EACR,CAAC;QAEH,IAAM,GAAG,GAAG,kCAAgB,CAAC,KAAK,CAAC,GAAG,EAAE;YACtC,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;QAEH,IAAM,KAAK,GAAqB;YAC9B,KAAK,OAAA;YACL,GAAG,KAAA;YACH,KAAK,OAAA;YACL,SAAS,WAAA;YACT,KAAK,OAAA;YACL,UAAU,EAAE;gBACV,IAAI,EAAE,KAAK;gBACX,GAAG,EAAE,KAAK;aACX;YACD,IAAI,MAAA;YACJ,GAAG,KAAA;SACJ,CAAC;QAEF,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAlCW,QAAA,uBAAuB,2BAkClC","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport { clampValue, clampMax } from '../../utils/index';\nimport type { ProgressBarProps, ProgressBarState } from './ProgressBar.types';\n\n/**\n * Create the state required to render ProgressBar.\n *\n * The returned state can be modified with hooks such as useProgressBarStyles_unstable,\n * before being passed to renderProgressBar_unstable.\n *\n * @param props - props from this instance of ProgressBar\n * @param ref - reference to root HTMLElement of ProgressBar\n */\nexport const useProgressBar_unstable = (props: ProgressBarProps, ref: React.Ref<HTMLElement>): ProgressBarState => {\n // Props\n const { color = 'brand', shape = 'rounded', thickness = 'medium' } = props;\n const max = clampMax(props.max ?? 1);\n const value = clampValue(props.value, max);\n\n const root = getNativeElementProps('div', {\n ref,\n role: 'progressbar',\n 'aria-valuemin': value !== undefined ? 0 : undefined,\n 'aria-valuemax': value !== undefined ? max : undefined,\n 'aria-valuenow': value,\n ...props,\n });\n\n const bar = resolveShorthand(props.bar, {\n required: true,\n });\n\n const state: ProgressBarState = {\n color,\n max,\n shape,\n thickness,\n value,\n components: {\n root: 'div',\n bar: 'div',\n },\n root,\n bar,\n };\n\n return state;\n};\n"]}
@@ -1,96 +0,0 @@
1
- define(["require", "exports", "tslib", "@griffel/react", "@fluentui/react-theme"], function (require, exports, tslib_1, react_1, react_theme_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.useProgressBarStyles_unstable = exports.progressBarClassNames = void 0;
5
- exports.progressBarClassNames = {
6
- root: 'fui-ProgressBar',
7
- bar: 'fui-ProgressBar__bar',
8
- };
9
- // If the percentComplete is near 0, don't animate it.
10
- // This prevents animations on reset to 0 scenarios.
11
- var ZERO_THRESHOLD = 0.01;
12
- var barThicknessValues = {
13
- medium: '2px',
14
- large: '4px',
15
- };
16
- var indeterminateProgressBar = {
17
- '0%': {
18
- left: '-33%', // matches indeterminate bar width
19
- },
20
- '100%': {
21
- left: '100%',
22
- },
23
- };
24
- /**
25
- * Styles for the root slot
26
- */
27
- var useRootStyles = react_1.makeStyles({
28
- root: tslib_1.__assign(tslib_1.__assign({ display: 'block', backgroundColor: react_theme_1.tokens.colorNeutralBackground6, width: '100%' }, react_1.shorthands.overflow('hidden')), { '@media screen and (forced-colors: active)': {
29
- backgroundColor: 'CanvasText',
30
- } }),
31
- rounded: tslib_1.__assign({}, react_1.shorthands.borderRadius(react_theme_1.tokens.borderRadiusMedium)),
32
- square: tslib_1.__assign({}, react_1.shorthands.borderRadius(react_theme_1.tokens.borderRadiusNone)),
33
- medium: {
34
- height: barThicknessValues.medium,
35
- },
36
- large: {
37
- height: barThicknessValues.large,
38
- },
39
- });
40
- /**
41
- * Styles for the ProgressBar bar
42
- */
43
- var useBarStyles = react_1.makeStyles({
44
- base: tslib_1.__assign(tslib_1.__assign({ '@media screen and (forced-colors: active)': {
45
- backgroundColor: 'Highlight',
46
- } }, react_1.shorthands.borderRadius('inherit')), { height: '100%' }),
47
- nonZeroDeterminate: {
48
- transitionProperty: 'width',
49
- transitionDuration: '0.3s',
50
- transitionTimingFunction: 'ease',
51
- },
52
- indeterminate: {
53
- maxWidth: '33%',
54
- position: 'relative',
55
- backgroundImage: "linear-gradient(\n to right,\n " + react_theme_1.tokens.colorNeutralBackground6 + " 0%,\n " + react_theme_1.tokens.colorTransparentBackground + " 50%,\n " + react_theme_1.tokens.colorNeutralBackground6 + " 100%\n )",
56
- animationName: indeterminateProgressBar,
57
- animationDuration: '3s',
58
- animationTimingFunction: 'linear',
59
- animationIterationCount: 'infinite',
60
- '@media screen and (prefers-reduced-motion: reduce)': {
61
- animationDuration: '0.01ms',
62
- animationIterationCount: '1',
63
- },
64
- },
65
- brand: {
66
- backgroundColor: react_theme_1.tokens.colorCompoundBrandBackground,
67
- },
68
- error: {
69
- backgroundColor: react_theme_1.tokens.colorPaletteRedBackground3,
70
- },
71
- warning: {
72
- backgroundColor: react_theme_1.tokens.colorPaletteDarkOrangeBackground3,
73
- },
74
- success: {
75
- backgroundColor: react_theme_1.tokens.colorPaletteGreenBackground3,
76
- },
77
- });
78
- /**
79
- * Apply styling to the ProgressBar slots based on the state
80
- */
81
- var useProgressBarStyles_unstable = function (state) {
82
- var color = state.color, max = state.max, shape = state.shape, thickness = state.thickness, value = state.value;
83
- var rootStyles = useRootStyles();
84
- var barStyles = useBarStyles();
85
- state.root.className = react_1.mergeClasses(exports.progressBarClassNames.root, rootStyles.root, rootStyles[shape], rootStyles[thickness], state.root.className);
86
- if (state.bar) {
87
- state.bar.className = react_1.mergeClasses(exports.progressBarClassNames.bar, barStyles.base, barStyles.brand, value === undefined && barStyles.indeterminate, value !== undefined && value > ZERO_THRESHOLD && barStyles.nonZeroDeterminate, color && value !== undefined && barStyles[color], state.bar.className);
88
- }
89
- if (state.bar && value !== undefined) {
90
- state.bar.style = tslib_1.__assign({ width: Math.min(100, Math.max(0, (value / max) * 100)) + '%' }, state.bar.style);
91
- }
92
- return state;
93
- };
94
- exports.useProgressBarStyles_unstable = useProgressBarStyles_unstable;
95
- });
96
- //# sourceMappingURL=useProgressBarStyles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useProgressBarStyles.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/src/components/ProgressBar/useProgressBarStyles.ts"],"names":[],"mappings":"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","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { ProgressBarState, ProgressBarSlots } from './ProgressBar.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const progressBarClassNames: SlotClassNames<ProgressBarSlots> = {\n root: 'fui-ProgressBar',\n bar: 'fui-ProgressBar__bar',\n};\n\n// If the percentComplete is near 0, don't animate it.\n// This prevents animations on reset to 0 scenarios.\nconst ZERO_THRESHOLD = 0.01;\n\nconst barThicknessValues = {\n medium: '2px',\n large: '4px',\n};\n\nconst indeterminateProgressBar = {\n '0%': {\n left: '-33%', // matches indeterminate bar width\n },\n '100%': {\n left: '100%',\n },\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootStyles = makeStyles({\n root: {\n display: 'block',\n backgroundColor: tokens.colorNeutralBackground6,\n width: '100%',\n ...shorthands.overflow('hidden'),\n\n '@media screen and (forced-colors: active)': {\n backgroundColor: 'CanvasText',\n },\n },\n rounded: {\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n },\n square: {\n ...shorthands.borderRadius(tokens.borderRadiusNone),\n },\n medium: {\n height: barThicknessValues.medium,\n },\n large: {\n height: barThicknessValues.large,\n },\n});\n\n/**\n * Styles for the ProgressBar bar\n */\nconst useBarStyles = makeStyles({\n base: {\n '@media screen and (forced-colors: active)': {\n backgroundColor: 'Highlight',\n },\n ...shorthands.borderRadius('inherit'),\n height: '100%',\n },\n nonZeroDeterminate: {\n transitionProperty: 'width',\n transitionDuration: '0.3s',\n transitionTimingFunction: 'ease',\n },\n indeterminate: {\n maxWidth: '33%',\n position: 'relative',\n backgroundImage: `linear-gradient(\n to right,\n ${tokens.colorNeutralBackground6} 0%,\n ${tokens.colorTransparentBackground} 50%,\n ${tokens.colorNeutralBackground6} 100%\n )`,\n animationName: indeterminateProgressBar,\n animationDuration: '3s',\n animationTimingFunction: 'linear',\n animationIterationCount: 'infinite',\n '@media screen and (prefers-reduced-motion: reduce)': {\n animationDuration: '0.01ms',\n animationIterationCount: '1',\n },\n },\n\n brand: {\n backgroundColor: tokens.colorCompoundBrandBackground,\n },\n\n error: {\n backgroundColor: tokens.colorPaletteRedBackground3,\n },\n warning: {\n backgroundColor: tokens.colorPaletteDarkOrangeBackground3,\n },\n success: {\n backgroundColor: tokens.colorPaletteGreenBackground3,\n },\n});\n\n/**\n * Apply styling to the ProgressBar slots based on the state\n */\nexport const useProgressBarStyles_unstable = (state: ProgressBarState): ProgressBarState => {\n const { color, max, shape, thickness, value } = state;\n const rootStyles = useRootStyles();\n const barStyles = useBarStyles();\n\n state.root.className = mergeClasses(\n progressBarClassNames.root,\n rootStyles.root,\n rootStyles[shape],\n rootStyles[thickness],\n state.root.className,\n );\n\n if (state.bar) {\n state.bar.className = mergeClasses(\n progressBarClassNames.bar,\n barStyles.base,\n barStyles.brand,\n value === undefined && barStyles.indeterminate,\n value !== undefined && value > ZERO_THRESHOLD && barStyles.nonZeroDeterminate,\n color && value !== undefined && barStyles[color],\n state.bar.className,\n );\n }\n\n if (state.bar && value !== undefined) {\n state.bar.style = {\n width: Math.min(100, Math.max(0, (value / max) * 100)) + '%',\n ...state.bar.style,\n };\n }\n\n return state;\n};\n"]}
@@ -1,13 +0,0 @@
1
- define(["require", "exports", "tslib", "@fluentui/react-field", "../../ProgressBar"], function (require, exports, tslib_1, react_field_1, ProgressBar_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.ProgressField = exports.progressFieldClassNames = void 0;
5
- /** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */
6
- exports.progressFieldClassNames = react_field_1.getDeprecatedFieldClassNames(ProgressBar_1.progressBarClassNames.root);
7
- /** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */
8
- exports.ProgressField = react_field_1.makeDeprecatedField(ProgressBar_1.ProgressBar, {
9
- displayName: 'ProgressField',
10
- mapProps: function (props) { return (tslib_1.__assign(tslib_1.__assign({}, props), { control: tslib_1.__assign(tslib_1.__assign({}, props.control), { validationState: props.validationState }) })); },
11
- });
12
- });
13
- //# sourceMappingURL=ProgressField.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProgressField.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/src/components/ProgressField/ProgressField.tsx"],"names":[],"mappings":";;;;IAOA,+EAA+E;IAClE,QAAA,uBAAuB,GAAG,0CAA4B,CAAC,mCAAqB,CAAC,IAAI,CAAC,CAAC;IAChG,+EAA+E;IAClE,QAAA,aAAa,GAA4C,iCAAmB,CAAC,yBAAW,EAAE;QACrG,WAAW,EAAE,eAAe;QAC5B,QAAQ,EAAE,UAAC,KAAyB,IAAK,OAAA,uCACpC,KAAK,KACR,OAAO,wCAAO,KAAK,CAAC,OAAO,KAAE,eAAe,EAAE,KAAK,CAAC,eAAe,OACnE,EAHuC,CAGvC;KACH,CAAC,CAAC","sourcesContent":["/* eslint-disable deprecation/deprecation */\nimport { DeprecatedFieldProps, getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { ProgressBar, progressBarClassNames, ProgressBarProps } from '../../ProgressBar';\n\n/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */\nexport type ProgressFieldProps = DeprecatedFieldProps<ProgressBarProps>;\n/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */\nexport const progressFieldClassNames = getDeprecatedFieldClassNames(progressBarClassNames.root);\n/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */\nexport const ProgressField: ForwardRefComponent<ProgressFieldProps> = makeDeprecatedField(ProgressBar, {\n displayName: 'ProgressField',\n mapProps: (props: ProgressFieldProps) => ({\n ...props,\n control: { ...props.control, validationState: props.validationState },\n }),\n});\n"]}
@@ -1,6 +0,0 @@
1
- define(["require", "exports", "tslib", "./ProgressField"], function (require, exports, tslib_1, ProgressField_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(ProgressField_1, exports);
5
- });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/src/components/ProgressField/index.ts"],"names":[],"mappings":";;;IAAA,+CAAgC","sourcesContent":["export * from './ProgressField';\n"]}
package/lib-amd/index.js DELETED
@@ -1,13 +0,0 @@
1
- define(["require", "exports", "./ProgressBar", "./ProgressField"], function (require, exports, ProgressBar_1, ProgressField_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.progressFieldClassNames = exports.ProgressField_unstable = exports.useProgressBarStyles_unstable = exports.useProgressBar_unstable = exports.renderProgressBar_unstable = exports.progressBarClassNames = exports.ProgressBar = void 0;
5
- Object.defineProperty(exports, "ProgressBar", { enumerable: true, get: function () { return ProgressBar_1.ProgressBar; } });
6
- Object.defineProperty(exports, "progressBarClassNames", { enumerable: true, get: function () { return ProgressBar_1.progressBarClassNames; } });
7
- Object.defineProperty(exports, "renderProgressBar_unstable", { enumerable: true, get: function () { return ProgressBar_1.renderProgressBar_unstable; } });
8
- Object.defineProperty(exports, "useProgressBar_unstable", { enumerable: true, get: function () { return ProgressBar_1.useProgressBar_unstable; } });
9
- Object.defineProperty(exports, "useProgressBarStyles_unstable", { enumerable: true, get: function () { return ProgressBar_1.useProgressBarStyles_unstable; } });
10
- Object.defineProperty(exports, "ProgressField_unstable", { enumerable: true, get: function () { return ProgressField_1.ProgressField; } });
11
- Object.defineProperty(exports, "progressFieldClassNames", { enumerable: true, get: function () { return ProgressField_1.progressFieldClassNames; } });
12
- });
13
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-progress/src/index.ts"],"names":[],"mappings":";;;;IACE,0GAAA,WAAW,OAAA;IACX,oHAAA,qBAAqB,OAAA;IACrB,yHAAA,0BAA0B,OAAA;IAC1B,sHAAA,uBAAuB,OAAA;IACvB,4HAAA,6BAA6B,OAAA;IAKtB,uHAAA,aAAa,OAA0B;IAAE,wHAAA,uBAAuB,OAAA","sourcesContent":["export {\n ProgressBar,\n progressBarClassNames,\n renderProgressBar_unstable,\n useProgressBar_unstable,\n useProgressBarStyles_unstable,\n} from './ProgressBar';\nexport type { ProgressBarProps, ProgressBarSlots, ProgressBarState } from './ProgressBar';\n\n// eslint-disable-next-line deprecation/deprecation\nexport { ProgressField as ProgressField_unstable, progressFieldClassNames } from './ProgressField';\n// eslint-disable-next-line deprecation/deprecation\nexport type { ProgressFieldProps as ProgressFieldProps_unstable } from './ProgressField';\n"]}