@fluentui/react-progress 9.0.0-alpha.9 → 9.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. package/CHANGELOG.json +319 -1
  2. package/CHANGELOG.md +132 -2
  3. package/README.md +9 -17
  4. package/dist/index.d.ts +20 -11
  5. package/lib/components/ProgressBar/ProgressBar.js +5 -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/renderProgressBar.js +4 -3
  9. package/lib/components/ProgressBar/renderProgressBar.js.map +1 -1
  10. package/lib/components/ProgressBar/useProgressBar.js +7 -6
  11. package/lib/components/ProgressBar/useProgressBar.js.map +1 -1
  12. package/lib/components/ProgressBar/useProgressBarStyles.js +65 -82
  13. package/lib/components/ProgressBar/useProgressBarStyles.js.map +1 -1
  14. package/lib/components/ProgressField/ProgressField.js +15 -15
  15. package/lib/components/ProgressField/ProgressField.js.map +1 -1
  16. package/lib/index.js +1 -0
  17. package/lib/index.js.map +1 -1
  18. package/lib/utils/clampMax.js +11 -0
  19. package/lib/utils/clampMax.js.map +1 -0
  20. package/lib/utils/clampValue.js +18 -0
  21. package/lib/utils/clampValue.js.map +1 -0
  22. package/lib/utils/index.js +3 -0
  23. package/lib/utils/index.js.map +1 -0
  24. package/lib-amd/ProgressBar.js +6 -0
  25. package/lib-amd/ProgressBar.js.map +1 -0
  26. package/lib-amd/ProgressField.js +6 -0
  27. package/lib-amd/ProgressField.js.map +1 -0
  28. package/lib-amd/components/ProgressBar/ProgressBar.js +17 -0
  29. package/lib-amd/components/ProgressBar/ProgressBar.js.map +1 -0
  30. package/lib-amd/components/ProgressBar/ProgressBar.types.js +5 -0
  31. package/lib-amd/components/ProgressBar/ProgressBar.types.js.map +1 -0
  32. package/lib-amd/components/ProgressBar/index.js +10 -0
  33. package/lib-amd/components/ProgressBar/index.js.map +1 -0
  34. package/lib-amd/components/ProgressBar/renderProgressBar.js +14 -0
  35. package/lib-amd/components/ProgressBar/renderProgressBar.js.map +1 -0
  36. package/lib-amd/components/ProgressBar/useProgressBar.js +41 -0
  37. package/lib-amd/components/ProgressBar/useProgressBar.js.map +1 -0
  38. package/lib-amd/components/ProgressBar/useProgressBarStyles.js +107 -0
  39. package/lib-amd/components/ProgressBar/useProgressBarStyles.js.map +1 -0
  40. package/lib-amd/components/ProgressField/ProgressField.js +13 -0
  41. package/lib-amd/components/ProgressField/ProgressField.js.map +1 -0
  42. package/lib-amd/components/ProgressField/index.js +6 -0
  43. package/lib-amd/components/ProgressField/index.js.map +1 -0
  44. package/lib-amd/index.js +13 -0
  45. package/lib-amd/index.js.map +1 -0
  46. package/lib-amd/utils/clampMax.js +17 -0
  47. package/lib-amd/utils/clampMax.js.map +1 -0
  48. package/lib-amd/utils/clampValue.js +24 -0
  49. package/lib-amd/utils/clampValue.js.map +1 -0
  50. package/lib-amd/utils/index.js +7 -0
  51. package/lib-amd/utils/index.js.map +1 -0
  52. package/lib-commonjs/ProgressBar.js +0 -2
  53. package/lib-commonjs/ProgressBar.js.map +1 -1
  54. package/lib-commonjs/ProgressField.js +0 -2
  55. package/lib-commonjs/ProgressField.js.map +1 -1
  56. package/lib-commonjs/components/ProgressBar/ProgressBar.js +5 -6
  57. package/lib-commonjs/components/ProgressBar/ProgressBar.js.map +1 -1
  58. package/lib-commonjs/components/ProgressBar/ProgressBar.types.js.map +1 -1
  59. package/lib-commonjs/components/ProgressBar/index.js +0 -6
  60. package/lib-commonjs/components/ProgressBar/index.js.map +1 -1
  61. package/lib-commonjs/components/ProgressBar/renderProgressBar.js +4 -7
  62. package/lib-commonjs/components/ProgressBar/renderProgressBar.js.map +1 -1
  63. package/lib-commonjs/components/ProgressBar/useProgressBar.js +7 -9
  64. package/lib-commonjs/components/ProgressBar/useProgressBar.js.map +1 -1
  65. package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js +65 -87
  66. package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js.map +1 -1
  67. package/lib-commonjs/components/ProgressField/ProgressField.js +13 -17
  68. package/lib-commonjs/components/ProgressField/ProgressField.js.map +1 -1
  69. package/lib-commonjs/components/ProgressField/index.js +0 -2
  70. package/lib-commonjs/components/ProgressField/index.js.map +1 -1
  71. package/lib-commonjs/index.js +1 -4
  72. package/lib-commonjs/index.js.map +1 -1
  73. package/lib-commonjs/utils/clampMax.js +18 -0
  74. package/lib-commonjs/utils/clampMax.js.map +1 -0
  75. package/lib-commonjs/utils/clampValue.js +25 -0
  76. package/lib-commonjs/utils/clampValue.js.map +1 -0
  77. package/lib-commonjs/utils/index.js +9 -0
  78. package/lib-commonjs/utils/index.js.map +1 -0
  79. package/package.json +9 -9
@@ -4,19 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useProgressBarStyles_unstable = exports.progressBarClassNames = void 0;
7
-
8
7
  const react_1 = /*#__PURE__*/require("@griffel/react");
9
-
10
8
  const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
11
-
12
9
  const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
13
-
14
10
  exports.progressBarClassNames = {
15
11
  root: 'fui-ProgressBar',
16
12
  bar: 'fui-ProgressBar__bar'
17
- }; // If the percentComplete is near 0, don't animate it.
13
+ };
14
+ // If the percentComplete is near 0, don't animate it.
18
15
  // This prevents animations on reset to 0 scenarios.
19
-
20
16
  const ZERO_THRESHOLD = 0.01;
21
17
  const barThicknessValues = {
22
18
  medium: '2px',
@@ -24,7 +20,7 @@ const barThicknessValues = {
24
20
  };
25
21
  const indeterminateProgressBar = {
26
22
  '0%': {
27
- left: '0% /* @noflip */'
23
+ left: '-100% /* @noflip */'
28
24
  },
29
25
  '100%': {
30
26
  left: '100% /* @noflip */'
@@ -41,115 +37,101 @@ const indeterminateProgressBarRTL = {
41
37
  /**
42
38
  * Styles for the root slot
43
39
  */
44
-
45
40
  const useRootStyles = /*#__PURE__*/react_1.__styles({
46
- "root": {
47
- "mc9l5x": "ftgm304",
48
- "De3pzq": "f18f03hv",
49
- "Bdqf98w": "fhb5wj7",
50
- "B68tc82": "f1p9o1ba",
51
- "Bmxbyg5": "f1sil6mw",
52
- "I5kgcl": "fs8b23g",
53
- "tu2nte": "f1mcb20s",
54
- "y0r1ed": "fek7wd8"
41
+ root: {
42
+ mc9l5x: "ftgm304",
43
+ De3pzq: "f18f03hv",
44
+ a9b677: "fly5x3f",
45
+ B68tc82: "f1p9o1ba",
46
+ Bmxbyg5: "f1sil6mw",
47
+ Bpep1pd: "fu42dvn"
55
48
  },
56
- "rounded": {
57
- "Bbmb7ep": ["f1aa9q02", "f16jpd5f"],
58
- "Beyfa6y": ["f16jpd5f", "f1aa9q02"],
59
- "B7oj6ja": ["f1jar5jt", "fyu767a"],
60
- "Btl43ni": ["fyu767a", "f1jar5jt"]
49
+ rounded: {
50
+ Bbmb7ep: ["f1aa9q02", "f16jpd5f"],
51
+ Beyfa6y: ["f16jpd5f", "f1aa9q02"],
52
+ B7oj6ja: ["f1jar5jt", "fyu767a"],
53
+ Btl43ni: ["fyu767a", "f1jar5jt"]
61
54
  },
62
- "rectangular": {
63
- "Bbmb7ep": ["fzi6hpg", "fyowgf4"],
64
- "Beyfa6y": ["fyowgf4", "fzi6hpg"],
65
- "B7oj6ja": ["f3fg2lr", "f13av6d4"],
66
- "Btl43ni": ["f13av6d4", "f3fg2lr"]
55
+ square: {
56
+ Bbmb7ep: ["fzi6hpg", "fyowgf4"],
57
+ Beyfa6y: ["fyowgf4", "fzi6hpg"],
58
+ B7oj6ja: ["f3fg2lr", "f13av6d4"],
59
+ Btl43ni: ["f13av6d4", "f3fg2lr"]
67
60
  },
68
- "medium": {
69
- "Bqenvij": "f4t8t6x"
61
+ medium: {
62
+ Bqenvij: "f4t8t6x"
70
63
  },
71
- "large": {
72
- "Bqenvij": "f6ywr7j"
64
+ large: {
65
+ Bqenvij: "f6ywr7j"
73
66
  }
74
67
  }, {
75
- "d": [".ftgm304{display:block;}", ".f18f03hv{background-color:var(--colorNeutralBackground6);}", ".fhb5wj7{justify-self:stretch;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".fzi6hpg{border-bottom-right-radius:var(--borderRadiusNone);}", ".fyowgf4{border-bottom-left-radius:var(--borderRadiusNone);}", ".f3fg2lr{border-top-right-radius:var(--borderRadiusNone);}", ".f13av6d4{border-top-left-radius:var(--borderRadiusNone);}", ".f4t8t6x{height:2px;}", ".f6ywr7j{height:4px;}"],
76
- "m": [["@media screen and (forced-colors: active){.fs8b23g{border-bottom-width:1px;}}", {
77
- "m": "screen and (forced-colors: active)"
78
- }], ["@media screen and (forced-colors: active){.f1mcb20s{border-bottom-style:solid;}}", {
79
- "m": "screen and (forced-colors: active)"
80
- }], ["@media screen and (forced-colors: active){.fek7wd8{border-bottom-color:CanvasText;}}", {
81
- "m": "screen and (forced-colors: active)"
68
+ d: [".ftgm304{display:block;}", ".f18f03hv{background-color:var(--colorNeutralBackground6);}", ".fly5x3f{width:100%;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".fzi6hpg{border-bottom-right-radius:var(--borderRadiusNone);}", ".fyowgf4{border-bottom-left-radius:var(--borderRadiusNone);}", ".f3fg2lr{border-top-right-radius:var(--borderRadiusNone);}", ".f13av6d4{border-top-left-radius:var(--borderRadiusNone);}", ".f4t8t6x{height:2px;}", ".f6ywr7j{height:4px;}"],
69
+ m: [["@media screen and (forced-colors: active){.fu42dvn{background-color:CanvasText;}}", {
70
+ m: "screen and (forced-colors: active)"
82
71
  }]]
83
72
  });
84
73
  /**
85
74
  * Styles for the ProgressBar bar
86
75
  */
87
-
88
-
89
76
  const useBarStyles = /*#__PURE__*/react_1.__styles({
90
- "base": {
91
- "De3pzq": "ftywsgz",
92
- "Bpep1pd": "f1neahkh",
93
- "Bbmb7ep": ["f1d9uwra", "fzibvwi"],
94
- "Beyfa6y": ["fzibvwi", "f1d9uwra"],
95
- "B7oj6ja": ["fuoumxm", "f1vtqnvc"],
96
- "Btl43ni": ["f1vtqnvc", "fuoumxm"]
97
- },
98
- "medium": {
99
- "Bqenvij": "f4t8t6x"
77
+ base: {
78
+ Bpep1pd: "f1neahkh",
79
+ Bbmb7ep: ["f1d9uwra", "fzibvwi"],
80
+ Beyfa6y: ["fzibvwi", "f1d9uwra"],
81
+ B7oj6ja: ["fuoumxm", "f1vtqnvc"],
82
+ Btl43ni: ["f1vtqnvc", "fuoumxm"],
83
+ Bqenvij: "f1l02sjl"
100
84
  },
101
- "large": {
102
- "Bqenvij": "f6ywr7j"
85
+ nonZeroDeterminate: {
86
+ Bmy1vo4: "fjt6zfz",
87
+ B3o57yi: "f1wofebd",
88
+ Bkqvd7p: "fv71qf3"
103
89
  },
104
- "nonZeroDeterminate": {
105
- "Bmy1vo4": "fjt6zfz",
106
- "B3o57yi": "f1wofebd",
107
- "Bkqvd7p": "fv71qf3"
90
+ indeterminate: {
91
+ B2u0y6b: "fa0wk36",
92
+ qhf8xq: "f10pi13n",
93
+ Bcmaq0h: ["fpo0yib", "f1u5hf6c"],
94
+ Bv12yb3: "f1jk3tlg",
95
+ vin17d: "f1a27w2r",
96
+ w3vfg9: "f1cpbl36",
97
+ Gqtpxc: "f4akx1t",
98
+ B3vm3ge: "f18p5put"
108
99
  },
109
- "indeterminate": {
110
- "B2u0y6b": "fa0wk36",
111
- "qhf8xq": "f10pi13n",
112
- "Bcmaq0h": ["fpo0yib", "f1u5hf6c"],
113
- "Bv12yb3": "f1h4fm7e",
114
- "vin17d": "f1a27w2r",
115
- "w3vfg9": "f1cpbl36",
116
- "Gqtpxc": "f4akx1t",
117
- "B3vm3ge": "f18p5put"
100
+ rtl: {
101
+ Bv12yb3: "fjhwsai"
118
102
  },
119
- "rtl": {
120
- "Bv12yb3": "fjhwsai"
103
+ brand: {
104
+ De3pzq: "ftywsgz"
121
105
  },
122
- "error": {
123
- "De3pzq": "fdl5y0r"
106
+ error: {
107
+ De3pzq: "fdl5y0r"
124
108
  },
125
- "warning": {
126
- "De3pzq": "f1s438gw"
109
+ warning: {
110
+ De3pzq: "f1s438gw"
127
111
  },
128
- "success": {
129
- "De3pzq": "flxk52p"
112
+ success: {
113
+ De3pzq: "flxk52p"
130
114
  }
131
115
  }, {
132
- "d": [".ftywsgz{background-color:var(--colorCompoundBrandBackground);}", ".f1d9uwra{border-bottom-right-radius:inherit;}", ".fzibvwi{border-bottom-left-radius:inherit;}", ".fuoumxm{border-top-right-radius:inherit;}", ".f1vtqnvc{border-top-left-radius:inherit;}", ".f4t8t6x{height:2px;}", ".f6ywr7j{height:4px;}", ".fjt6zfz{transition-property:width;}", ".f1wofebd{transition-duration:0.3s;}", ".fv71qf3{transition-timing-function:ease;}", ".fa0wk36{max-width:33%;}", ".f10pi13n{position:relative;}", ".fpo0yib{background-image:linear-gradient(\n to right,\n var(--colorNeutralBackground6) 0%,\n var(--colorTransparentBackground) 50%,\n var(--colorNeutralBackground6) 100%\n );}", ".f1u5hf6c{background-image:linear-gradient(\n to left,\n var(--colorNeutralBackground6) 0%,\n var(--colorTransparentBackground) 50%,\n var(--colorNeutralBackground6) 100%\n );}", ".f1h4fm7e{-webkit-animation-name:fd3k50f;animation-name:fd3k50f;}", ".f1a27w2r{-webkit-animation-duration:3s;animation-duration:3s;}", ".f1cpbl36{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;}", ".fjhwsai{-webkit-animation-name:f1kx06uz;animation-name:f1kx06uz;}", ".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}", ".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}", ".flxk52p{background-color:var(--colorPaletteGreenBackground3);}"],
133
- "m": [["@media screen and (forced-colors: active){.f1neahkh{background-color:Highlight;}}", {
134
- "m": "screen and (forced-colors: active)"
116
+ m: [["@media screen and (forced-colors: active){.f1neahkh{background-color:Highlight;}}", {
117
+ m: "screen and (forced-colors: active)"
135
118
  }], ["@media screen and (prefers-reduced-motion: reduce){.f4akx1t{-webkit-animation-duration:0.01ms;animation-duration:0.01ms;}}", {
136
- "m": "screen and (prefers-reduced-motion: reduce)"
119
+ m: "screen and (prefers-reduced-motion: reduce)"
137
120
  }], ["@media screen and (prefers-reduced-motion: reduce){.f18p5put{-webkit-animation-iteration-count:1;animation-iteration-count:1;}}", {
138
- "m": "screen and (prefers-reduced-motion: reduce)"
121
+ m: "screen and (prefers-reduced-motion: reduce)"
139
122
  }]],
140
- "k": ["@-webkit-keyframes fd3k50f{0%{left:0%;}100%{left:100%;}}", "@keyframes fd3k50f{0%{left:0%;}100%{left:100%;}}", "@-webkit-keyframes f1kx06uz{100%{right:-100%;}0%{right:100%;}}", "@keyframes f1kx06uz{100%{right:-100%;}0%{right:100%;}}"]
123
+ d: [".f1d9uwra{border-bottom-right-radius:inherit;}", ".fzibvwi{border-bottom-left-radius:inherit;}", ".fuoumxm{border-top-right-radius:inherit;}", ".f1vtqnvc{border-top-left-radius:inherit;}", ".f1l02sjl{height:100%;}", ".fjt6zfz{transition-property:width;}", ".f1wofebd{transition-duration:0.3s;}", ".fv71qf3{transition-timing-function:ease;}", ".fa0wk36{max-width:33%;}", ".f10pi13n{position:relative;}", ".fpo0yib{background-image:linear-gradient(\n to right,\n var(--colorNeutralBackground6) 0%,\n var(--colorTransparentBackground) 50%,\n var(--colorNeutralBackground6) 100%\n );}", ".f1u5hf6c{background-image:linear-gradient(\n to left,\n var(--colorNeutralBackground6) 0%,\n var(--colorTransparentBackground) 50%,\n var(--colorNeutralBackground6) 100%\n );}", ".f1jk3tlg{-webkit-animation-name:fzkbrka;animation-name:fzkbrka;}", ".f1a27w2r{-webkit-animation-duration:3s;animation-duration:3s;}", ".f1cpbl36{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;}", ".fjhwsai{-webkit-animation-name:f1kx06uz;animation-name:f1kx06uz;}", ".ftywsgz{background-color:var(--colorCompoundBrandBackground);}", ".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}", ".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}", ".flxk52p{background-color:var(--colorPaletteGreenBackground3);}"],
124
+ k: ["@-webkit-keyframes fzkbrka{0%{left:-100%;}100%{left:100%;}}", "@keyframes fzkbrka{0%{left:-100%;}100%{left:100%;}}", "@-webkit-keyframes f1kx06uz{100%{right:-100%;}0%{right:100%;}}", "@keyframes f1kx06uz{100%{right:-100%;}0%{right:100%;}}"]
141
125
  });
142
126
  /**
143
127
  * Apply styling to the ProgressBar slots based on the state
144
128
  */
145
-
146
-
147
129
  const useProgressBarStyles_unstable = state => {
148
130
  const {
131
+ color,
149
132
  max,
150
133
  shape,
151
134
  thickness,
152
- validationState,
153
135
  value
154
136
  } = state;
155
137
  const rootStyles = useRootStyles();
@@ -158,20 +140,16 @@ const useProgressBarStyles_unstable = state => {
158
140
  dir
159
141
  } = react_shared_contexts_1.useFluent_unstable();
160
142
  state.root.className = react_1.mergeClasses(exports.progressBarClassNames.root, rootStyles.root, rootStyles[shape], rootStyles[thickness], state.root.className);
161
-
162
143
  if (state.bar) {
163
- state.bar.className = react_1.mergeClasses(exports.progressBarClassNames.bar, barStyles.base, value === undefined && barStyles.indeterminate, value === undefined && dir === 'rtl' && barStyles.rtl, barStyles[thickness], value !== undefined && value > ZERO_THRESHOLD && barStyles.nonZeroDeterminate, validationState && barStyles[validationState], state.bar.className);
144
+ state.bar.className = react_1.mergeClasses(exports.progressBarClassNames.bar, barStyles.base, barStyles.brand, value === undefined && barStyles.indeterminate, value === undefined && dir === 'rtl' && barStyles.rtl, value !== undefined && value > ZERO_THRESHOLD && barStyles.nonZeroDeterminate, color && value !== undefined && barStyles[color], state.bar.className);
164
145
  }
165
-
166
146
  if (state.bar && value !== undefined) {
167
147
  state.bar.style = {
168
148
  width: Math.min(100, Math.max(0, value / max * 100)) + '%',
169
149
  ...state.bar.style
170
150
  };
171
151
  }
172
-
173
152
  return state;
174
153
  };
175
-
176
154
  exports.useProgressBarStyles_unstable = useProgressBarStyles_unstable;
177
155
  //# sourceMappingURL=useProgressBarStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-progress/src/components/ProgressBar/useProgressBarStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AAIa,OAAA,CAAA,qBAAA,GAA0D;EACrE,IAAI,EAAE,iBAD+D;EAErE,GAAG,EAAE;AAFgE,CAA1D,C,CAKb;AACA;;AACA,MAAM,cAAc,GAAG,IAAvB;AAEA,MAAM,kBAAkB,GAAG;EACzB,MAAM,EAAE,KADiB;EAEzB,KAAK,EAAE;AAFkB,CAA3B;AAKA,MAAM,wBAAwB,GAAG;EAC/B,MAAM;IACJ,IAAI,EAAE;EADF,CADyB;EAI/B,QAAQ;IACN,IAAI,EAAE;EADA;AAJuB,CAAjC;AAQA,MAAM,2BAA2B,GAAG;EAClC,QAAQ;IACN,KAAK,EAAE;EADD,CAD0B;EAIlC,MAAM;IACJ,KAAK,EAAE;EADH;AAJ4B,CAApC;AASA;;AAEG;;AACH,MAAM,aAAa,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAA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AAK,KAA/B,IAAwC,SAAS,CAAC,GAJ9B,EAKpB,SAAS,CAAC,SAAD,CALW,EAMpB,KAAK,KAAK,SAAV,IAAuB,KAAK,GAAG,cAA/B,IAAiD,SAAS,CAAC,kBANvC,EAOpB,eAAe,IAAI,SAAS,CAAC,eAAD,CAPR,EAQpB,KAAK,CAAC,GAAN,CAAU,SARU,CAAtB;EAUD;;EAED,IAAI,KAAK,CAAC,GAAN,IAAa,KAAK,KAAK,SAA3B,EAAsC;IACpC,KAAK,CAAC,GAAN,CAAU,KAAV,GAAkB;MAChB,KAAK,EAAE,IAAI,CAAC,GAAL,CAAS,GAAT,EAAc,IAAI,CAAC,GAAL,CAAS,CAAT,EAAa,KAAK,GAAG,GAAT,GAAgB,GAA5B,CAAd,IAAkD,GADzC;MAEhB,GAAG,KAAK,CAAC,GAAN,CAAU;IAFG,CAAlB;EAID;;EAED,OAAO,KAAP;AACD,CAnCM;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\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: '0% /* @noflip */',\n },\n '100%': {\n left: '100% /* @noflip */',\n },\n};\nconst indeterminateProgressBarRTL = {\n '100%': {\n right: '-100% /* @noflip */',\n },\n '0%': {\n right: '100% /* @noflip */',\n },\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootStyles = makeStyles({\n root: {\n display: 'block',\n backgroundColor: tokens.colorNeutralBackground6,\n justifySelf: 'stretch',\n ...shorthands.overflow('hidden'),\n\n '@media screen and (forced-colors: active)': {\n ...shorthands.borderBottom('1px', 'solid', 'CanvasText'),\n },\n },\n rounded: {\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n },\n rectangular: {\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 backgroundColor: tokens.colorCompoundBrandBackground,\n\n '@media screen and (forced-colors: active)': {\n backgroundColor: 'Highlight',\n },\n ...shorthands.borderRadius('inherit'),\n },\n medium: {\n height: barThicknessValues.medium,\n },\n large: {\n height: barThicknessValues.large,\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 animationIterationCount: 'infinite',\n '@media screen and (prefers-reduced-motion: reduce)': {\n animationDuration: '0.01ms',\n animationIterationCount: '1',\n },\n },\n\n rtl: {\n animationName: indeterminateProgressBarRTL,\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 { max, shape, thickness, validationState, value } = state;\n const rootStyles = useRootStyles();\n const barStyles = useBarStyles();\n const { dir } = useFluent();\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 value === undefined && barStyles.indeterminate,\n value === undefined && dir === 'rtl' && barStyles.rtl,\n barStyles[thickness],\n value !== undefined && value > ZERO_THRESHOLD && barStyles.nonZeroDeterminate,\n validationState && barStyles[validationState],\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"],"sourceRoot":"../src/"}
1
+ {"version":3,"names":["react_1","require","react_theme_1","react_shared_contexts_1","exports","progressBarClassNames","root","bar","ZERO_THRESHOLD","barThicknessValues","medium","large","indeterminateProgressBar","left","indeterminateProgressBarRTL","right","useRootStyles","__styles","mc9l5x","De3pzq","a9b677","B68tc82","Bmxbyg5","Bpep1pd","rounded","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","square","Bqenvij","d","m","useBarStyles","base","nonZeroDeterminate","Bmy1vo4","B3o57yi","Bkqvd7p","indeterminate","B2u0y6b","qhf8xq","Bcmaq0h","Bv12yb3","vin17d","w3vfg9","Gqtpxc","B3vm3ge","rtl","brand","error","warning","success","k","useProgressBarStyles_unstable","state","color","max","shape","thickness","value","rootStyles","barStyles","dir","useFluent_unstable","className","mergeClasses","undefined","style","width","Math","min"],"sources":["../src/packages/react-components/react-progress/src/components/ProgressBar/useProgressBarStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\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: '-100% /* @noflip */',\n },\n '100%': {\n left: '100% /* @noflip */',\n },\n};\nconst indeterminateProgressBarRTL = {\n '100%': {\n right: '-100% /* @noflip */',\n },\n '0%': {\n right: '100% /* @noflip */',\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 animationIterationCount: 'infinite',\n '@media screen and (prefers-reduced-motion: reduce)': {\n animationDuration: '0.01ms',\n animationIterationCount: '1',\n },\n },\n\n rtl: {\n animationName: indeterminateProgressBarRTL,\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 const { dir } = useFluent();\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 && dir === 'rtl' && barStyles.rtl,\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"],"mappings":";;;;;;AAAA,MAAAA,OAAA,gBAAAC,OAAA;AACA,MAAAC,aAAA,gBAAAD,OAAA;AACA,MAAAE,uBAAA,gBAAAF,OAAA;AAIaG,OAAA,CAAAC,qBAAqB,GAAqC;EACrEC,IAAI,EAAE,iBAAiB;EACvBC,GAAG,EAAE;CACN;AAED;AACA;AACA,MAAMC,cAAc,GAAG,IAAI;AAE3B,MAAMC,kBAAkB,GAAG;EACzBC,MAAM,EAAE,KAAK;EACbC,KAAK,EAAE;CACR;AAED,MAAMC,wBAAwB,GAAG;EAC/B,IAAI,EAAE;IACJC,IAAI,EAAE;GACP;EACD,MAAM,EAAE;IACNA,IAAI,EAAE;;CAET;AACD,MAAMC,2BAA2B,GAAG;EAClC,MAAM,EAAE;IACNC,KAAK,EAAE;GACR;EACD,IAAI,EAAE;IACJA,KAAK,EAAE;;CAEV;AA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;KACd;;EAGH,OAAOb,KAAK;AACd,CAAC;AAnCYnD,OAAA,CAAAkD,6BAA6B,GAAAA,6BAAA"}
@@ -4,24 +4,20 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.ProgressField = exports.progressFieldClassNames = void 0;
7
-
8
- const React = /*#__PURE__*/require("react");
9
-
7
+ /* eslint-disable deprecation/deprecation */
10
8
  const react_field_1 = /*#__PURE__*/require("@fluentui/react-field");
11
-
12
9
  const ProgressBar_1 = /*#__PURE__*/require("../../ProgressBar");
13
-
14
- exports.progressFieldClassNames = /*#__PURE__*/react_field_1.getFieldClassNames('ProgressField');
15
- exports.ProgressField = /*#__PURE__*/React.forwardRef((props, ref) => {
16
- const state = react_field_1.useField_unstable(props, ref, {
17
- component: ProgressBar_1.ProgressBar,
18
- classNames: exports.progressFieldClassNames,
19
- labelConnection: 'aria-labelledby',
20
- ariaInvalidOnError: false
21
- });
22
- state.control.validationState = state.validationState;
23
- react_field_1.useFieldStyles_unstable(state);
24
- return react_field_1.renderField_unstable(state);
10
+ /** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */
11
+ exports.progressFieldClassNames = /*#__PURE__*/react_field_1.getDeprecatedFieldClassNames(ProgressBar_1.progressBarClassNames.root);
12
+ /** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */
13
+ exports.ProgressField = /*#__PURE__*/react_field_1.makeDeprecatedField(ProgressBar_1.ProgressBar, {
14
+ displayName: 'ProgressField',
15
+ mapProps: props => ({
16
+ ...props,
17
+ control: {
18
+ ...props.control,
19
+ validationState: props.validationState
20
+ }
21
+ })
25
22
  });
26
- exports.ProgressField.displayName = 'ProgressField';
27
23
  //# sourceMappingURL=ProgressField.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-progress/src/components/ProgressField/ProgressField.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAEA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAOA,MAAA,aAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;;AAIa,OAAA,CAAA,uBAAA,gBAA0B,aAAA,CAAA,kBAAA,CAAmB,eAAnB,CAA1B;AAEA,OAAA,CAAA,aAAA,gBAAyD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACpG,MAAM,KAAK,GAAG,aAAA,CAAA,iBAAA,CAAkB,KAAlB,EAAyB,GAAzB,EAA8B;IAC1C,SAAS,EAAE,aAAA,CAAA,WAD+B;IAE1C,UAAU,EAAE,OAAA,CAAA,uBAF8B;IAG1C,eAAe,EAAE,iBAHyB;IAI1C,kBAAkB,EAAE;EAJsB,CAA9B,CAAd;EAMA,KAAK,CAAC,OAAN,CAAc,eAAd,GAAgC,KAAK,CAAC,eAAtC;EACA,aAAA,CAAA,uBAAA,CAAwB,KAAxB;EACA,OAAO,aAAA,CAAA,oBAAA,CAAqB,KAArB,CAAP;AACD,CAVqE,CAAzD;AAYb,OAAA,CAAA,aAAA,CAAc,WAAd,GAA4B,eAA5B","sourcesContent":["import * as React from 'react';\nimport type { FieldProps } from '@fluentui/react-field';\nimport {\n getFieldClassNames,\n renderField_unstable,\n useFieldStyles_unstable,\n useField_unstable,\n} from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { ProgressBar } from '../../ProgressBar';\n\nexport type ProgressFieldProps = FieldProps<typeof ProgressBar>;\n\nexport const progressFieldClassNames = getFieldClassNames('ProgressField');\n\nexport const ProgressField: ForwardRefComponent<ProgressFieldProps> = React.forwardRef((props, ref) => {\n const state = useField_unstable(props, ref, {\n component: ProgressBar,\n classNames: progressFieldClassNames,\n labelConnection: 'aria-labelledby',\n ariaInvalidOnError: false,\n });\n state.control.validationState = state.validationState;\n useFieldStyles_unstable(state);\n return renderField_unstable(state);\n});\n\nProgressField.displayName = 'ProgressField';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"names":["react_field_1","require","ProgressBar_1","exports","progressFieldClassNames","getDeprecatedFieldClassNames","progressBarClassNames","root","ProgressField","makeDeprecatedField","ProgressBar","displayName","mapProps","props","control","validationState"],"sources":["../src/packages/react-components/react-progress/src/components/ProgressField/ProgressField.tsx"],"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"],"mappings":";;;;;;AAAA;AACA,MAAAA,aAAA,gBAAAC,OAAA;AAEA,MAAAC,aAAA,gBAAAD,OAAA;AAIA;AACaE,OAAA,CAAAC,uBAAuB,gBAAGJ,aAAA,CAAAK,4BAA4B,CAACH,aAAA,CAAAI,qBAAqB,CAACC,IAAI,CAAC;AAC/F;AACaJ,OAAA,CAAAK,aAAa,gBAA4CR,aAAA,CAAAS,mBAAmB,CAACP,aAAA,CAAAQ,WAAW,EAAE;EACrGC,WAAW,EAAE,eAAe;EAC5BC,QAAQ,EAAGC,KAAyB,KAAM;IACxC,GAAGA,KAAK;IACRC,OAAO,EAAE;MAAE,GAAGD,KAAK,CAACC,OAAO;MAAEC,eAAe,EAAEF,KAAK,CAACE;IAAe;GACpE;CACF,CAAC"}
@@ -3,8 +3,6 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  const tslib_1 = /*#__PURE__*/require("tslib");
8
-
9
7
  tslib_1.__exportStar(require("./ProgressField"), exports);
10
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-progress/src/components/ProgressField/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './ProgressField';\n"],"sourceRoot":"../src/"}
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"}
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.progressFieldClassNames = exports.ProgressField_unstable = exports.useProgressBarStyles_unstable = exports.useProgressBar_unstable = exports.renderProgressBar_unstable = exports.progressBarClassNames = exports.ProgressBar = void 0;
7
-
8
7
  var ProgressBar_1 = /*#__PURE__*/require("./ProgressBar");
9
-
10
8
  Object.defineProperty(exports, "ProgressBar", {
11
9
  enumerable: true,
12
10
  get: function () {
@@ -37,9 +35,8 @@ Object.defineProperty(exports, "useProgressBarStyles_unstable", {
37
35
  return ProgressBar_1.useProgressBarStyles_unstable;
38
36
  }
39
37
  });
40
-
38
+ // eslint-disable-next-line deprecation/deprecation
41
39
  var ProgressField_1 = /*#__PURE__*/require("./ProgressField");
42
-
43
40
  Object.defineProperty(exports, "ProgressField_unstable", {
44
41
  enumerable: true,
45
42
  get: function () {
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-progress/src/index.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,aAAA,gBAAA,OAAA,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\n} from './ProgressBar';\nexport type { ProgressBarProps, ProgressBarSlots, ProgressBarState } from './ProgressBar';\n\nexport { ProgressField as ProgressField_unstable, progressFieldClassNames } from './ProgressField';\nexport type { ProgressFieldProps as ProgressFieldProps_unstable } from './ProgressField';\n"],"sourceRoot":"../src/"}
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"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
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}`);
13
+ }
14
+ }
15
+ return internalMax;
16
+ };
17
+ exports.clampMax = clampMax;
18
+ //# sourceMappingURL=clampMax.js.map
@@ -0,0 +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"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
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}`);
16
+ }
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}`);
20
+ }
21
+ }
22
+ return internalValue;
23
+ };
24
+ exports.clampValue = clampValue;
25
+ //# sourceMappingURL=clampValue.js.map
@@ -0,0 +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"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ const tslib_1 = /*#__PURE__*/require("tslib");
7
+ tslib_1.__exportStar(require("./clampMax"), exports);
8
+ tslib_1.__exportStar(require("./clampValue"), exports);
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-progress",
3
- "version": "9.0.0-alpha.9",
3
+ "version": "9.1.0",
4
4
  "description": "Progress component for FluentUI v9",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -27,15 +27,16 @@
27
27
  "devDependencies": {
28
28
  "@fluentui/eslint-plugin": "*",
29
29
  "@fluentui/react-conformance": "*",
30
- "@fluentui/react-conformance-griffel": "9.0.0-beta.18",
31
- "@fluentui/scripts": "^1.0.0"
30
+ "@fluentui/react-conformance-griffel": "9.0.0-beta.19",
31
+ "@fluentui/scripts-api-extractor": "*",
32
+ "@fluentui/scripts-tasks": "*"
32
33
  },
33
34
  "dependencies": {
34
- "@fluentui/react-field": "9.0.0-alpha.12",
35
- "@fluentui/react-shared-contexts": "^9.1.4",
35
+ "@fluentui/react-field": "9.0.0-alpha.22",
36
+ "@fluentui/react-shared-contexts": "^9.3.0",
36
37
  "@fluentui/react-theme": "^9.1.5",
37
- "@fluentui/react-utilities": "^9.3.0",
38
- "@griffel/react": "^1.4.2",
38
+ "@fluentui/react-utilities": "^9.6.1",
39
+ "@griffel/react": "^1.5.2",
39
40
  "tslib": "^2.1.0"
40
41
  },
41
42
  "peerDependencies": {
@@ -47,8 +48,7 @@
47
48
  "beachball": {
48
49
  "disallowedChangeTypes": [
49
50
  "major",
50
- "minor",
51
- "patch"
51
+ "prerelease"
52
52
  ]
53
53
  },
54
54
  "exports": {