@fluentui/react-progress 0.0.0-nightly-20230426-0420.1 → 0.0.0-nightly-20230428-0419.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 (33) hide show
  1. package/CHANGELOG.json +15 -15
  2. package/CHANGELOG.md +10 -10
  3. package/lib-commonjs/components/ProgressBar/ProgressBar.js +2 -2
  4. package/lib-commonjs/components/ProgressBar/ProgressBar.js.map +1 -1
  5. package/lib-commonjs/components/ProgressBar/index.js +1 -1
  6. package/lib-commonjs/components/ProgressBar/index.js.map +1 -1
  7. package/lib-commonjs/components/ProgressBar/{useProgressBarStyles.js → useProgressBarStyles.styles.js} +2 -2
  8. package/lib-commonjs/components/ProgressBar/useProgressBarStyles.styles.js.map +1 -0
  9. package/package.json +7 -7
  10. package/dist/index.d.ts +0 -88
  11. package/lib/ProgressBar.js +0 -2
  12. package/lib/ProgressBar.js.map +0 -1
  13. package/lib/components/ProgressBar/ProgressBar.js +0 -16
  14. package/lib/components/ProgressBar/ProgressBar.js.map +0 -1
  15. package/lib/components/ProgressBar/ProgressBar.types.js +0 -2
  16. package/lib/components/ProgressBar/ProgressBar.types.js.map +0 -1
  17. package/lib/components/ProgressBar/index.js +0 -6
  18. package/lib/components/ProgressBar/index.js.map +0 -1
  19. package/lib/components/ProgressBar/renderProgressBar.js +0 -13
  20. package/lib/components/ProgressBar/renderProgressBar.js.map +0 -1
  21. package/lib/components/ProgressBar/useProgressBar.js +0 -56
  22. package/lib/components/ProgressBar/useProgressBar.js.map +0 -1
  23. package/lib/components/ProgressBar/useProgressBarStyles.js +0 -134
  24. package/lib/components/ProgressBar/useProgressBarStyles.js.map +0 -1
  25. package/lib/index.js +0 -2
  26. package/lib/index.js.map +0 -1
  27. package/lib/utils/clampMax.js +0 -11
  28. package/lib/utils/clampMax.js.map +0 -1
  29. package/lib/utils/clampValue.js +0 -18
  30. package/lib/utils/clampValue.js.map +0 -1
  31. package/lib/utils/index.js +0 -3
  32. package/lib/utils/index.js.map +0 -1
  33. package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js.map +0 -1
package/CHANGELOG.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "name": "@fluentui/react-progress",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 26 Apr 2023 04:27:04 GMT",
6
- "tag": "@fluentui/react-progress_v0.0.0-nightly-20230426-0420.1",
7
- "version": "0.0.0-nightly-20230426-0420.1",
5
+ "date": "Fri, 28 Apr 2023 04:25:22 GMT",
6
+ "tag": "@fluentui/react-progress_v0.0.0-nightly-20230428-0419.1",
7
+ "version": "0.0.0-nightly-20230428-0419.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
@@ -16,38 +16,38 @@
16
16
  {
17
17
  "author": "beachball",
18
18
  "package": "@fluentui/react-progress",
19
- "comment": "Bump @fluentui/react-field to v0.0.0-nightly-20230426-0420.1",
20
- "commit": "0bf57d44764cd2220ffb39eaa3256f208e17fc9c"
19
+ "comment": "Bump @fluentui/react-field to v0.0.0-nightly-20230428-0419.1",
20
+ "commit": "6d0e3c2fb45fde4cf5056d3d18d4c5bc5899a839"
21
21
  },
22
22
  {
23
23
  "author": "beachball",
24
24
  "package": "@fluentui/react-progress",
25
- "comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230426-0420.1",
26
- "commit": "0bf57d44764cd2220ffb39eaa3256f208e17fc9c"
25
+ "comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230428-0419.1",
26
+ "commit": "6d0e3c2fb45fde4cf5056d3d18d4c5bc5899a839"
27
27
  },
28
28
  {
29
29
  "author": "beachball",
30
30
  "package": "@fluentui/react-progress",
31
- "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230426-0420.1",
32
- "commit": "0bf57d44764cd2220ffb39eaa3256f208e17fc9c"
31
+ "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230428-0419.1",
32
+ "commit": "6d0e3c2fb45fde4cf5056d3d18d4c5bc5899a839"
33
33
  },
34
34
  {
35
35
  "author": "beachball",
36
36
  "package": "@fluentui/react-progress",
37
- "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230426-0420.1",
38
- "commit": "0bf57d44764cd2220ffb39eaa3256f208e17fc9c"
37
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230428-0419.1",
38
+ "commit": "6d0e3c2fb45fde4cf5056d3d18d4c5bc5899a839"
39
39
  },
40
40
  {
41
41
  "author": "beachball",
42
42
  "package": "@fluentui/react-progress",
43
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230426-0420.1",
44
- "commit": "0bf57d44764cd2220ffb39eaa3256f208e17fc9c"
43
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230428-0419.1",
44
+ "commit": "6d0e3c2fb45fde4cf5056d3d18d4c5bc5899a839"
45
45
  },
46
46
  {
47
47
  "author": "beachball",
48
48
  "package": "@fluentui/react-progress",
49
- "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230426-0420.1",
50
- "commit": "0bf57d44764cd2220ffb39eaa3256f208e17fc9c"
49
+ "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230428-0419.1",
50
+ "commit": "6d0e3c2fb45fde4cf5056d3d18d4c5bc5899a839"
51
51
  }
52
52
  ]
53
53
  }
package/CHANGELOG.md CHANGED
@@ -1,23 +1,23 @@
1
1
  # Change Log - @fluentui/react-progress
2
2
 
3
- This log was last generated on Wed, 26 Apr 2023 04:27:04 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 28 Apr 2023 04:25:22 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20230426-0420.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v0.0.0-nightly-20230426-0420.1)
7
+ ## [0.0.0-nightly-20230428-0419.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v0.0.0-nightly-20230428-0419.1)
8
8
 
9
- Wed, 26 Apr 2023 04:27:04 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.11..@fluentui/react-progress_v0.0.0-nightly-20230426-0420.1)
9
+ Fri, 28 Apr 2023 04:25:22 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.11..@fluentui/react-progress_v0.0.0-nightly-20230428-0419.1)
11
11
 
12
12
  ### Changes
13
13
 
14
14
  - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
15
- - Bump @fluentui/react-field to v0.0.0-nightly-20230426-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/0bf57d44764cd2220ffb39eaa3256f208e17fc9c) by beachball)
16
- - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230426-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/0bf57d44764cd2220ffb39eaa3256f208e17fc9c) by beachball)
17
- - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230426-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/0bf57d44764cd2220ffb39eaa3256f208e17fc9c) by beachball)
18
- - Bump @fluentui/react-theme to v0.0.0-nightly-20230426-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/0bf57d44764cd2220ffb39eaa3256f208e17fc9c) by beachball)
19
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20230426-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/0bf57d44764cd2220ffb39eaa3256f208e17fc9c) by beachball)
20
- - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230426-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/0bf57d44764cd2220ffb39eaa3256f208e17fc9c) by beachball)
15
+ - Bump @fluentui/react-field to v0.0.0-nightly-20230428-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/6d0e3c2fb45fde4cf5056d3d18d4c5bc5899a839) by beachball)
16
+ - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230428-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/6d0e3c2fb45fde4cf5056d3d18d4c5bc5899a839) by beachball)
17
+ - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230428-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/6d0e3c2fb45fde4cf5056d3d18d4c5bc5899a839) by beachball)
18
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20230428-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/6d0e3c2fb45fde4cf5056d3d18d4c5bc5899a839) by beachball)
19
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20230428-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/6d0e3c2fb45fde4cf5056d3d18d4c5bc5899a839) by beachball)
20
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230428-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/6d0e3c2fb45fde4cf5056d3d18d4c5bc5899a839) by beachball)
21
21
 
22
22
  ## [9.1.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.11)
23
23
 
@@ -10,11 +10,11 @@ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildc
10
10
  const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
11
  const _useProgressBar = require("./useProgressBar");
12
12
  const _renderProgressBar = require("./renderProgressBar");
13
- const _useProgressBarStyles = require("./useProgressBarStyles");
13
+ const _useProgressBarStylesStyles = require("./useProgressBarStyles.styles");
14
14
  const _reactSharedContexts = require("@fluentui/react-shared-contexts");
15
15
  const ProgressBar = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
16
16
  const state = (0, _useProgressBar.useProgressBar_unstable)(props, ref);
17
- (0, _useProgressBarStyles.useProgressBarStyles_unstable)(state);
17
+ (0, _useProgressBarStylesStyles.useProgressBarStyles_unstable)(state);
18
18
  (0, _reactSharedContexts.useCustomStyleHook_unstable)('useProgressBarStyles_unstable')(state);
19
19
  return (0, _renderProgressBar.renderProgressBar_unstable)(state);
20
20
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/ProgressBar/ProgressBar.js"],"sourcesContent":["import * as React from 'react';\nimport { useProgressBar_unstable } from './useProgressBar';\nimport { renderProgressBar_unstable } from './renderProgressBar';\nimport { useProgressBarStyles_unstable } from './useProgressBarStyles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * A ProgressBar bar shows the progression of a task.\n */\nexport const ProgressBar = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useProgressBar_unstable(props, ref);\n useProgressBarStyles_unstable(state);\n useCustomStyleHook_unstable('useProgressBarStyles_unstable')(state);\n return renderProgressBar_unstable(state);\n});\nProgressBar.displayName = 'ProgressBar';\n//# sourceMappingURL=ProgressBar.js.map"],"names":["ProgressBar","React","forwardRef","props","ref","state","useProgressBar_unstable","useProgressBarStyles_unstable","useCustomStyleHook_unstable","renderProgressBar_unstable","displayName"],"mappings":";;;;+BAQaA;;aAAAA;;;6DARU;gCACiB;mCACG;sCACG;qCACF;AAIrC,MAAMA,cAAc,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACvE,MAAMC,QAAQC,IAAAA,uCAAuB,EAACH,OAAOC;IAC7CG,IAAAA,mDAA6B,EAACF;IAC9BG,IAAAA,gDAA2B,EAAC,iCAAiCH;IAC7D,OAAOI,IAAAA,6CAA0B,EAACJ;AACpC;AACAL,YAAYU,WAAW,GAAG,eAC1B,uCAAuC"}
1
+ {"version":3,"sources":["../../../lib/components/ProgressBar/ProgressBar.js"],"sourcesContent":["import * as React from 'react';\nimport { useProgressBar_unstable } from './useProgressBar';\nimport { renderProgressBar_unstable } from './renderProgressBar';\nimport { useProgressBarStyles_unstable } from './useProgressBarStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * A ProgressBar bar shows the progression of a task.\n */\nexport const ProgressBar = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useProgressBar_unstable(props, ref);\n useProgressBarStyles_unstable(state);\n useCustomStyleHook_unstable('useProgressBarStyles_unstable')(state);\n return renderProgressBar_unstable(state);\n});\nProgressBar.displayName = 'ProgressBar';\n//# sourceMappingURL=ProgressBar.js.map"],"names":["ProgressBar","React","forwardRef","props","ref","state","useProgressBar_unstable","useProgressBarStyles_unstable","useCustomStyleHook_unstable","renderProgressBar_unstable","displayName"],"mappings":";;;;+BAQaA;;aAAAA;;;6DARU;gCACiB;mCACG;4CACG;qCACF;AAIrC,MAAMA,cAAc,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACvE,MAAMC,QAAQC,IAAAA,uCAAuB,EAACH,OAAOC;IAC7CG,IAAAA,yDAA6B,EAACF;IAC9BG,IAAAA,gDAA2B,EAAC,iCAAiCH;IAC7D,OAAOI,IAAAA,6CAA0B,EAACJ;AACpC;AACAL,YAAYU,WAAW,GAAG,eAC1B,uCAAuC"}
@@ -7,7 +7,7 @@ _exportStar(require("./ProgressBar"), exports);
7
7
  _exportStar(require("./ProgressBar.types"), exports);
8
8
  _exportStar(require("./renderProgressBar"), exports);
9
9
  _exportStar(require("./useProgressBar"), exports);
10
- _exportStar(require("./useProgressBarStyles"), exports);
10
+ _exportStar(require("./useProgressBarStyles.styles"), exports);
11
11
  //# sourceMappingURL=index.js.map
12
12
 
13
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/ProgressBar/index.js"],"sourcesContent":["export * from './ProgressBar';\nexport * from './ProgressBar.types';\nexport * from './renderProgressBar';\nexport * from './useProgressBar';\nexport * from './useProgressBarStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
1
+ {"version":3,"sources":["../../../lib/components/ProgressBar/index.js"],"sourcesContent":["export * from './ProgressBar';\nexport * from './ProgressBar.types';\nexport * from './renderProgressBar';\nexport * from './useProgressBar';\nexport * from './useProgressBarStyles.styles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
@@ -235,6 +235,6 @@ const useProgressBarStyles_unstable = (state)=>{
235
235
  };
236
236
  }
237
237
  return state;
238
- }; //# sourceMappingURL=useProgressBarStyles.js.map
238
+ }; //# sourceMappingURL=useProgressBarStyles.styles.js.map
239
239
 
240
- //# sourceMappingURL=useProgressBarStyles.js.map
240
+ //# sourceMappingURL=useProgressBarStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../lib/components/ProgressBar/useProgressBarStyles.styles.js"],"sourcesContent":["import { __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const progressBarClassNames = {\n root: 'fui-ProgressBar',\n bar: 'fui-ProgressBar__bar'\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;\nconst barThicknessValues = {\n medium: '2px',\n large: '4px'\n};\nconst indeterminateProgressBar = {\n '0%': {\n left: '-33%'\n },\n '100%': {\n left: '100%'\n }\n};\n/**\n * Styles for the root slot\n */\nconst useRootStyles = /*#__PURE__*/__styles({\n root: {\n mc9l5x: \"ftgm304\",\n De3pzq: \"f18f03hv\",\n a9b677: \"fly5x3f\",\n B68tc82: \"f1p9o1ba\",\n Bmxbyg5: \"f1sil6mw\",\n Bpep1pd: \"fu42dvn\"\n },\n rounded: {\n Bbmb7ep: [\"f1aa9q02\", \"f16jpd5f\"],\n Beyfa6y: [\"f16jpd5f\", \"f1aa9q02\"],\n B7oj6ja: [\"f1jar5jt\", \"fyu767a\"],\n Btl43ni: [\"fyu767a\", \"f1jar5jt\"]\n },\n square: {\n Bbmb7ep: [\"fzi6hpg\", \"fyowgf4\"],\n Beyfa6y: [\"fyowgf4\", \"fzi6hpg\"],\n B7oj6ja: [\"f3fg2lr\", \"f13av6d4\"],\n Btl43ni: [\"f13av6d4\", \"f3fg2lr\"]\n },\n medium: {\n Bqenvij: \"f4t8t6x\"\n },\n large: {\n Bqenvij: \"f6ywr7j\"\n }\n}, {\n 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;}\"],\n m: [[\"@media screen and (forced-colors: active){.fu42dvn{background-color:CanvasText;}}\", {\n m: \"screen and (forced-colors: active)\"\n }]]\n});\n/**\n * Styles for the ProgressBar bar\n */\nconst useBarStyles = /*#__PURE__*/__styles({\n base: {\n Bpep1pd: \"f1neahkh\",\n Bbmb7ep: [\"f1d9uwra\", \"fzibvwi\"],\n Beyfa6y: [\"fzibvwi\", \"f1d9uwra\"],\n B7oj6ja: [\"fuoumxm\", \"f1vtqnvc\"],\n Btl43ni: [\"f1vtqnvc\", \"fuoumxm\"],\n Bqenvij: \"f1l02sjl\"\n },\n nonZeroDeterminate: {\n Bmy1vo4: \"fjt6zfz\",\n B3o57yi: \"f1wofebd\",\n Bkqvd7p: \"fv71qf3\"\n },\n indeterminate: {\n B2u0y6b: \"fa0wk36\",\n qhf8xq: \"f10pi13n\",\n Bcmaq0h: [\"fpo0yib\", \"f1u5hf6c\"],\n Bv12yb3: [\"fwd2bol\", \"f14gig94\"],\n vin17d: \"f1a27w2r\",\n Ezkn3b: \"f452v7t\",\n w3vfg9: \"f1cpbl36\",\n Gqtpxc: \"f4akx1t\",\n B3vm3ge: \"f18p5put\"\n },\n brand: {\n De3pzq: \"ftywsgz\"\n },\n error: {\n De3pzq: \"fdl5y0r\"\n },\n warning: {\n De3pzq: \"f1s438gw\"\n },\n success: {\n De3pzq: \"flxk52p\"\n }\n}, {\n m: [[\"@media screen and (forced-colors: active){.f1neahkh{background-color:Highlight;}}\", {\n m: \"screen and (forced-colors: active)\"\n }], [\"@media screen and (prefers-reduced-motion: reduce){.f4akx1t{-webkit-animation-duration:0.01ms;animation-duration:0.01ms;}}\", {\n m: \"screen and (prefers-reduced-motion: reduce)\"\n }], [\"@media screen and (prefers-reduced-motion: reduce){.f18p5put{-webkit-animation-iteration-count:1;animation-iteration-count:1;}}\", {\n m: \"screen and (prefers-reduced-motion: reduce)\"\n }]],\n 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 );}\", \".fwd2bol{-webkit-animation-name:f1keuaan;animation-name:f1keuaan;}\", \".f14gig94{-webkit-animation-name:f10x8f8u;animation-name:f10x8f8u;}\", \".f1a27w2r{-webkit-animation-duration:3s;animation-duration:3s;}\", \".f452v7t{-webkit-animation-timing-function:linear;animation-timing-function:linear;}\", \".f1cpbl36{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;}\", \".ftywsgz{background-color:var(--colorCompoundBrandBackground);}\", \".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}\", \".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}\", \".flxk52p{background-color:var(--colorPaletteGreenBackground3);}\"],\n k: [\"@-webkit-keyframes f1keuaan{0%{left:-33%;}100%{left:100%;}}\", \"@-webkit-keyframes f10x8f8u{0%{right:-33%;}100%{right:100%;}}\", \"@keyframes f1keuaan{0%{left:-33%;}100%{left:100%;}}\", \"@keyframes f10x8f8u{0%{right:-33%;}100%{right:100%;}}\"]\n});\n/**\n * Apply styling to the ProgressBar slots based on the state\n */\nexport const useProgressBarStyles_unstable = state => {\n const {\n color,\n max,\n shape,\n thickness,\n value\n } = state;\n const rootStyles = useRootStyles();\n const barStyles = useBarStyles();\n state.root.className = mergeClasses(progressBarClassNames.root, rootStyles.root, rootStyles[shape], rootStyles[thickness], state.root.className);\n if (state.bar) {\n state.bar.className = mergeClasses(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);\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 return state;\n};\n//# sourceMappingURL=useProgressBarStyles.styles.js.map"],"names":["progressBarClassNames","useProgressBarStyles_unstable","root","bar","ZERO_THRESHOLD","barThicknessValues","medium","large","indeterminateProgressBar","left","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","Ezkn3b","w3vfg9","Gqtpxc","B3vm3ge","brand","error","warning","success","k","state","color","max","shape","thickness","value","rootStyles","barStyles","className","mergeClasses","undefined","style","width","Math","min"],"mappings":";;;;;;;;;;;IAEaA,qBAAqB,MAArBA;IA6GAC,6BAA6B,MAA7BA;;uBA/GsC;AAE5C,MAAMD,wBAAwB;IACnCE,MAAM;IACNC,KAAK;AACP;AACA,sDAAsD;AACtD,oDAAoD;AACpD,MAAMC,iBAAiB;AACvB,MAAMC,qBAAqB;IACzBC,QAAQ;IACRC,OAAO;AACT;AACA,MAAMC,2BAA2B;IAC/B,MAAM;QACJC,MAAM;IACR;IACA,QAAQ;QACNA,MAAM;IACR;AACF;AACA;;CAEC,GACD,MAAMC,gBAAgB,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IAC1CT,MAAM;QACJU,QAAQ;QACRC,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,SAAS;IACX;IACAC,SAAS;QACPC,SAAS;YAAC;YAAY;SAAW;QACjCC,SAAS;YAAC;YAAY;SAAW;QACjCC,SAAS;YAAC;YAAY;SAAU;QAChCC,SAAS;YAAC;YAAW;SAAW;IAClC;IACAC,QAAQ;QACNJ,SAAS;YAAC;YAAW;SAAU;QAC/BC,SAAS;YAAC;YAAW;SAAU;QAC/BC,SAAS;YAAC;YAAW;SAAW;QAChCC,SAAS;YAAC;YAAY;SAAU;IAClC;IACAhB,QAAQ;QACNkB,SAAS;IACX;IACAjB,OAAO;QACLiB,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;QAA4B;QAA+D;QAAyB;QAAiC;QAAiC;QAAoE;QAAmE;QAAiE;QAA+D;QAAiE;QAAgE;QAA8D;QAA8D;QAAyB;KAAwB;IAC/uBC,GAAG;QAAC;YAAC;YAAqF;gBACxFA,GAAG;YACL;SAAE;KAAC;AACL;AACA;;CAEC,GACD,MAAMC,eAAe,WAAW,GAAEhB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EAAEG,UAAU,CAACF,UAAU,EAAEJ,MAAM9C,IAAI,CAACsD,SAAS;IAC/I,IAAIR,MAAM7C,GAAG,EAAE;QACb6C,MAAM7C,GAAG,CAACqD,SAAS,GAAGC,IAAAA,mBAAY,EAACzD,sBAAsBG,GAAG,EAAEoD,UAAU3B,IAAI,EAAE2B,UAAUZ,KAAK,EAAEU,UAAUK,aAAaH,UAAUtB,aAAa,EAAEoB,UAAUK,aAAaL,QAAQjD,kBAAkBmD,UAAU1B,kBAAkB,EAAEoB,SAASI,UAAUK,aAAaH,SAAS,CAACN,MAAM,EAAED,MAAM7C,GAAG,CAACqD,SAAS;IACrS,CAAC;IACD,IAAIR,MAAM7C,GAAG,IAAIkD,UAAUK,WAAW;QACpCV,MAAM7C,GAAG,CAACwD,KAAK,GAAG;YAChBC,OAAOC,KAAKC,GAAG,CAAC,KAAKD,KAAKX,GAAG,CAAC,GAAGG,QAAQH,MAAM,QAAQ;YACvD,GAAGF,MAAM7C,GAAG,CAACwD,KAAK;QACpB;IACF,CAAC;IACD,OAAOX;AACT,GACA,uDAAuD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-progress",
3
- "version": "0.0.0-nightly-20230426-0420.1",
3
+ "version": "0.0.0-nightly-20230428-0419.1",
4
4
  "description": "Progress component for FluentUI v9",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -27,16 +27,16 @@
27
27
  "devDependencies": {
28
28
  "@fluentui/eslint-plugin": "*",
29
29
  "@fluentui/react-conformance": "*",
30
- "@fluentui/react-conformance-griffel": "0.0.0-nightly-20230426-0420.1",
30
+ "@fluentui/react-conformance-griffel": "0.0.0-nightly-20230428-0419.1",
31
31
  "@fluentui/scripts-api-extractor": "*",
32
32
  "@fluentui/scripts-tasks": "*"
33
33
  },
34
34
  "dependencies": {
35
- "@fluentui/react-field": "0.0.0-nightly-20230426-0420.1",
36
- "@fluentui/react-jsx-runtime": "0.0.0-nightly-20230426-0420.1",
37
- "@fluentui/react-shared-contexts": "0.0.0-nightly-20230426-0420.1",
38
- "@fluentui/react-theme": "0.0.0-nightly-20230426-0420.1",
39
- "@fluentui/react-utilities": "0.0.0-nightly-20230426-0420.1",
35
+ "@fluentui/react-field": "0.0.0-nightly-20230428-0419.1",
36
+ "@fluentui/react-jsx-runtime": "0.0.0-nightly-20230428-0419.1",
37
+ "@fluentui/react-shared-contexts": "0.0.0-nightly-20230428-0419.1",
38
+ "@fluentui/react-theme": "0.0.0-nightly-20230428-0419.1",
39
+ "@fluentui/react-utilities": "0.0.0-nightly-20230428-0419.1",
40
40
  "@griffel/react": "^1.5.2",
41
41
  "@swc/helpers": "^0.4.14"
42
42
  },
package/dist/index.d.ts DELETED
@@ -1,88 +0,0 @@
1
- /// <reference types="react" />
2
-
3
- import type { ComponentProps } from '@fluentui/react-utilities';
4
- import type { ComponentState } from '@fluentui/react-utilities';
5
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
6
- import * as React_2 from 'react';
7
- import type { Slot } from '@fluentui/react-utilities';
8
- import type { SlotClassNames } from '@fluentui/react-utilities';
9
-
10
- /**
11
- * A ProgressBar bar shows the progression of a task.
12
- */
13
- export declare const ProgressBar: ForwardRefComponent<ProgressBarProps>;
14
-
15
- export declare const progressBarClassNames: SlotClassNames<ProgressBarSlots>;
16
-
17
- /**
18
- * ProgressBar Props
19
- */
20
- export declare type ProgressBarProps = Omit<ComponentProps<ProgressBarSlots>, 'size'> & {
21
- /**
22
- * The shape of the bar and track.
23
- * @default rounded
24
- */
25
- shape?: 'rounded' | 'square';
26
- /**
27
- * A decimal number between `0` and `1` (or between `0` and `max` if given),
28
- * which specifies how much of the task has been completed.
29
- *
30
- * If `undefined` (default), the ProgressBar will display an **indeterminate** state.
31
- */
32
- value?: number;
33
- /**
34
- * The maximum value, which indicates the task is complete.
35
- * The ProgressBar bar will be full when `value` equals `max`.
36
- * @default 1
37
- */
38
- max?: number;
39
- /**
40
- * The thickness of the ProgressBar bar
41
- * @default medium
42
- */
43
- thickness?: 'medium' | 'large';
44
- /**
45
- * The status of the ProgressBar bar. Changes the color of the bar.
46
- * @default brand
47
- */
48
- color?: 'brand' | 'success' | 'warning' | 'error';
49
- };
50
-
51
- export declare type ProgressBarSlots = {
52
- /**
53
- * The track behind the ProgressBar bar
54
- */
55
- root: NonNullable<Slot<'div'>>;
56
- /**
57
- * The filled portion of the ProgressBar bar. Animated in the indeterminate state, when no value is provided.
58
- */
59
- bar?: NonNullable<Slot<'div'>>;
60
- };
61
-
62
- /**
63
- * State used in rendering ProgressBar
64
- */
65
- export declare type ProgressBarState = ComponentState<ProgressBarSlots> & Required<Pick<ProgressBarProps, 'max' | 'shape' | 'thickness'>> & Pick<ProgressBarProps, 'value' | 'color'>;
66
-
67
- /**
68
- * Render the final JSX of ProgressBar
69
- */
70
- export declare const renderProgressBar_unstable: (state: ProgressBarState) => JSX.Element;
71
-
72
- /**
73
- * Create the state required to render ProgressBar.
74
- *
75
- * The returned state can be modified with hooks such as useProgressBarStyles_unstable,
76
- * before being passed to renderProgressBar_unstable.
77
- *
78
- * @param props - props from this instance of ProgressBar
79
- * @param ref - reference to root HTMLElement of ProgressBar
80
- */
81
- export declare const useProgressBar_unstable: (props: ProgressBarProps, ref: React_2.Ref<HTMLElement>) => ProgressBarState;
82
-
83
- /**
84
- * Apply styling to the ProgressBar slots based on the state
85
- */
86
- export declare const useProgressBarStyles_unstable: (state: ProgressBarState) => ProgressBarState;
87
-
88
- export { }
@@ -1,2 +0,0 @@
1
- export * from './components/ProgressBar/index';
2
- //# sourceMappingURL=ProgressBar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["../src/ProgressBar.ts"],"sourcesContent":["export * from './components/ProgressBar/index';\n"],"mappings":"AAAA,cAAc"}
@@ -1,16 +0,0 @@
1
- import * as React from 'react';
2
- import { useProgressBar_unstable } from './useProgressBar';
3
- import { renderProgressBar_unstable } from './renderProgressBar';
4
- import { useProgressBarStyles_unstable } from './useProgressBarStyles';
5
- import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
6
- /**
7
- * A ProgressBar bar shows the progression of a task.
8
- */
9
- export const ProgressBar = /*#__PURE__*/React.forwardRef((props, ref) => {
10
- const state = useProgressBar_unstable(props, ref);
11
- useProgressBarStyles_unstable(state);
12
- useCustomStyleHook_unstable('useProgressBarStyles_unstable')(state);
13
- return renderProgressBar_unstable(state);
14
- });
15
- ProgressBar.displayName = 'ProgressBar';
16
- //# sourceMappingURL=ProgressBar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","useProgressBar_unstable","renderProgressBar_unstable","useProgressBarStyles_unstable","useCustomStyleHook_unstable","ProgressBar","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/ProgressBar/ProgressBar.tsx"],"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 { useCustomStyleHook_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 useCustomStyleHook_unstable('useProgressBarStyles_unstable')(state);\n\n return renderProgressBar_unstable(state);\n});\n\nProgressBar.displayName = 'ProgressBar';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,uBAAuB,QAAQ;AACxC,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,6BAA6B,QAAQ;AAG9C,SAASC,2BAA2B,QAAQ;AAE5C;;;AAGA,OAAO,MAAMC,WAAA,gBAAqDL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACjG,MAAMC,KAAA,GAAQR,uBAAA,CAAwBM,KAAA,EAAOC,GAAA;EAE7CL,6BAAA,CAA8BM,KAAA;EAE9BL,2BAAA,CAA4B,iCAAiCK,KAAA;EAE7D,OAAOP,0BAAA,CAA2BO,KAAA;AACpC;AAEAJ,WAAA,CAAYK,WAAW,GAAG"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ProgressBar.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/ProgressBar/ProgressBar.types.ts"],"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"],"mappings":"AAAA"}
@@ -1,6 +0,0 @@
1
- export * from './ProgressBar';
2
- export * from './ProgressBar.types';
3
- export * from './renderProgressBar';
4
- export * from './useProgressBar';
5
- export * from './useProgressBarStyles';
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/ProgressBar/index.ts"],"sourcesContent":["export * from './ProgressBar';\nexport * from './ProgressBar.types';\nexport * from './renderProgressBar';\nexport * from './useProgressBar';\nexport * from './useProgressBarStyles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
@@ -1,13 +0,0 @@
1
- /** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';
2
- import { getSlotsNext } from '@fluentui/react-utilities';
3
- /**
4
- * Render the final JSX of ProgressBar
5
- */
6
- export const renderProgressBar_unstable = state => {
7
- const {
8
- slots,
9
- slotProps
10
- } = getSlotsNext(state);
11
- return /*#__PURE__*/createElement(slots.root, slotProps.root, slots.bar && /*#__PURE__*/createElement(slots.bar, slotProps.bar));
12
- };
13
- //# sourceMappingURL=renderProgressBar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["createElement","getSlotsNext","renderProgressBar_unstable","state","slots","slotProps","root","bar"],"sources":["../../../src/components/ProgressBar/renderProgressBar.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } 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 } = getSlotsNext<ProgressBarSlots>(state);\n return <slots.root {...slotProps.root}>{slots.bar && <slots.bar {...slotProps.bar} />}</slots.root>;\n};\n"],"mappings":"AAAA,2BACA,yBAEA,SAASA,aAAa,QAAQ;AAE9B,SAASC,YAAY,QAAQ;AAG7B;;;AAGA,OAAO,MAAMC,0BAAA,GAA8BC,KAAA,IAA4B;EACrE,MAAM;IAAEC,KAAA;IAAOC;EAAS,CAAE,GAAGJ,YAAA,CAA+BE,KAAA;EAC5D,oBAAOH,aAZT,CAYUI,KAAA,CAAME,IAAI,EAAKD,SAAA,CAAUC,IAAI,EAAGF,KAAA,CAAMG,GAAG,iBAAIP,aAZvD,CAYwDI,KAAA,CAAMG,GAAG,EAAKF,SAAA,CAAUE,GAAG;AACnF"}
@@ -1,56 +0,0 @@
1
- import * as React from 'react';
2
- import { useFieldContext_unstable } from '@fluentui/react-field';
3
- import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';
4
- import { clampValue, clampMax } from '../../utils/index';
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
- export const useProgressBar_unstable = (props, ref) => {
15
- const field = useFieldContext_unstable();
16
- const fieldState = field === null || field === void 0 ? void 0 : field.validationState;
17
- const {
18
- color = fieldState === 'error' || fieldState === 'warning' || fieldState === 'success' ? fieldState : 'brand',
19
- shape = 'rounded',
20
- thickness = 'medium'
21
- } = props;
22
- var _props_max;
23
- const max = clampMax((_props_max = props.max) !== null && _props_max !== void 0 ? _props_max : 1);
24
- const value = clampValue(props.value, max);
25
- const root = getNativeElementProps('div', {
26
- ref,
27
- role: 'progressbar',
28
- 'aria-valuemin': value !== undefined ? 0 : undefined,
29
- 'aria-valuemax': value !== undefined ? max : undefined,
30
- 'aria-valuenow': value,
31
- 'aria-labelledby': field === null || field === void 0 ? void 0 : field.labelId,
32
- ...props
33
- });
34
- if (field && (field.validationMessageId || field.hintId)) {
35
- // Prepend the field's validation message and/or hint to the user's aria-describedby
36
- root['aria-describedby'] = [field === null || field === void 0 ? void 0 : field.validationMessageId, field === null || field === void 0 ? void 0 : field.hintId, root['aria-describedby']].filter(Boolean).join(' ');
37
- }
38
- const bar = resolveShorthand(props.bar, {
39
- required: true
40
- });
41
- const state = {
42
- color,
43
- max,
44
- shape,
45
- thickness,
46
- value,
47
- components: {
48
- root: 'div',
49
- bar: 'div'
50
- },
51
- root,
52
- bar
53
- };
54
- return state;
55
- };
56
- //# sourceMappingURL=useProgressBar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","useFieldContext_unstable","getNativeElementProps","resolveShorthand","clampValue","clampMax","useProgressBar_unstable","props","ref","field","fieldState","validationState","color","shape","thickness","_props_max","max","value","root","role","undefined","labelId","validationMessageId","hintId","filter","Boolean","join","bar","required","state","components"],"sources":["../../../src/components/ProgressBar/useProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\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 const field = useFieldContext_unstable();\n const fieldState = field?.validationState;\n\n const {\n color = fieldState === 'error' || fieldState === 'warning' || fieldState === 'success' ? fieldState : 'brand',\n shape = 'rounded',\n thickness = 'medium',\n } = 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 'aria-labelledby': field?.labelId,\n ...props,\n });\n\n if (field && (field.validationMessageId || field.hintId)) {\n // Prepend the field's validation message and/or hint to the user's aria-describedby\n root['aria-describedby'] = [field?.validationMessageId, field?.hintId, root['aria-describedby']]\n .filter(Boolean)\n .join(' ');\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"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,wBAAwB,QAAQ;AACzC,SAASC,qBAAqB,EAAEC,gBAAgB,QAAQ;AACxD,SAASC,UAAU,EAAEC,QAAQ,QAAQ;AAGrC;;;;;;;;;AASA,OAAO,MAAMC,uBAAA,GAA0BA,CAACC,KAAA,EAAyBC,GAAA,KAAkD;EACjH,MAAMC,KAAA,GAAQR,wBAAA;EACd,MAAMS,UAAA,GAAaD,KAAA,aAAAA,KAAA,uBAAAA,KAAA,CAAOE,eAAe;EAEzC,MAAM;IACJC,KAAA,GAAQF,UAAA,KAAe,WAAWA,UAAA,KAAe,aAAaA,UAAA,KAAe,YAAYA,UAAA,GAAa,OAAO;IAC7GG,KAAA,GAAQ;IACRC,SAAA,GAAY;EAAQ,CACrB,GAAGP,KAAA;MACiBQ,UAAA;EAArB,MAAMC,GAAA,GAAMX,QAAA,CAAS,CAAAU,UAAA,GAAAR,KAAA,CAAMS,GAAG,cAATD,UAAA,cAAAA,UAAA,GAAa,CAAC;EACnC,MAAME,KAAA,GAAQb,UAAA,CAAWG,KAAA,CAAMU,KAAK,EAAED,GAAA;EAEtC,MAAME,IAAA,GAAOhB,qBAAA,CAAsB,OAAO;IACxCM,GAAA;IACAW,IAAA,EAAM;IACN,iBAAiBF,KAAA,KAAUG,SAAA,GAAY,IAAIA,SAAS;IACpD,iBAAiBH,KAAA,KAAUG,SAAA,GAAYJ,GAAA,GAAMI,SAAS;IACtD,iBAAiBH,KAAA;IACjB,mBAAmBR,KAAA,aAAAA,KAAA,uBAAAA,KAAA,CAAOY,OAAO;IACjC,GAAGd;EACL;EAEA,IAAIE,KAAA,KAAUA,KAAA,CAAMa,mBAAmB,IAAIb,KAAA,CAAMc,MAAM,CAAD,EAAI;IACxD;IACAL,IAAI,CAAC,mBAAmB,GAAG,CAACT,KAAA,aAAAA,KAAA,uBAAAA,KAAA,CAAOa,mBAAmB,EAAEb,KAAA,aAAAA,KAAA,uBAAAA,KAAA,CAAOc,MAAM,EAAEL,IAAI,CAAC,mBAAmB,CAAC,CAC7FM,MAAM,CAACC,OAAA,EACPC,IAAI,CAAC;EACV;EAEA,MAAMC,GAAA,GAAMxB,gBAAA,CAAiBI,KAAA,CAAMoB,GAAG,EAAE;IACtCC,QAAA,EAAU;EACZ;EAEA,MAAMC,KAAA,GAA0B;IAC9BjB,KAAA;IACAI,GAAA;IACAH,KAAA;IACAC,SAAA;IACAG,KAAA;IACAa,UAAA,EAAY;MACVZ,IAAA,EAAM;MACNS,GAAA,EAAK;IACP;IACAT,IAAA;IACAS;EACF;EAEA,OAAOE,KAAA;AACT"}
@@ -1,134 +0,0 @@
1
- import { __styles, mergeClasses, shorthands } from '@griffel/react';
2
- import { tokens } from '@fluentui/react-theme';
3
- export const progressBarClassNames = {
4
- root: 'fui-ProgressBar',
5
- bar: 'fui-ProgressBar__bar'
6
- };
7
- // If the percentComplete is near 0, don't animate it.
8
- // This prevents animations on reset to 0 scenarios.
9
- const ZERO_THRESHOLD = 0.01;
10
- const barThicknessValues = {
11
- medium: '2px',
12
- large: '4px'
13
- };
14
- const indeterminateProgressBar = {
15
- '0%': {
16
- left: '-33%'
17
- },
18
- '100%': {
19
- left: '100%'
20
- }
21
- };
22
- /**
23
- * Styles for the root slot
24
- */
25
- const useRootStyles = /*#__PURE__*/__styles({
26
- root: {
27
- mc9l5x: "ftgm304",
28
- De3pzq: "f18f03hv",
29
- a9b677: "fly5x3f",
30
- B68tc82: "f1p9o1ba",
31
- Bmxbyg5: "f1sil6mw",
32
- Bpep1pd: "fu42dvn"
33
- },
34
- rounded: {
35
- Bbmb7ep: ["f1aa9q02", "f16jpd5f"],
36
- Beyfa6y: ["f16jpd5f", "f1aa9q02"],
37
- B7oj6ja: ["f1jar5jt", "fyu767a"],
38
- Btl43ni: ["fyu767a", "f1jar5jt"]
39
- },
40
- square: {
41
- Bbmb7ep: ["fzi6hpg", "fyowgf4"],
42
- Beyfa6y: ["fyowgf4", "fzi6hpg"],
43
- B7oj6ja: ["f3fg2lr", "f13av6d4"],
44
- Btl43ni: ["f13av6d4", "f3fg2lr"]
45
- },
46
- medium: {
47
- Bqenvij: "f4t8t6x"
48
- },
49
- large: {
50
- Bqenvij: "f6ywr7j"
51
- }
52
- }, {
53
- 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;}"],
54
- m: [["@media screen and (forced-colors: active){.fu42dvn{background-color:CanvasText;}}", {
55
- m: "screen and (forced-colors: active)"
56
- }]]
57
- });
58
- /**
59
- * Styles for the ProgressBar bar
60
- */
61
- const useBarStyles = /*#__PURE__*/__styles({
62
- base: {
63
- Bpep1pd: "f1neahkh",
64
- Bbmb7ep: ["f1d9uwra", "fzibvwi"],
65
- Beyfa6y: ["fzibvwi", "f1d9uwra"],
66
- B7oj6ja: ["fuoumxm", "f1vtqnvc"],
67
- Btl43ni: ["f1vtqnvc", "fuoumxm"],
68
- Bqenvij: "f1l02sjl"
69
- },
70
- nonZeroDeterminate: {
71
- Bmy1vo4: "fjt6zfz",
72
- B3o57yi: "f1wofebd",
73
- Bkqvd7p: "fv71qf3"
74
- },
75
- indeterminate: {
76
- B2u0y6b: "fa0wk36",
77
- qhf8xq: "f10pi13n",
78
- Bcmaq0h: ["fpo0yib", "f1u5hf6c"],
79
- Bv12yb3: ["fwd2bol", "f14gig94"],
80
- vin17d: "f1a27w2r",
81
- Ezkn3b: "f452v7t",
82
- w3vfg9: "f1cpbl36",
83
- Gqtpxc: "f4akx1t",
84
- B3vm3ge: "f18p5put"
85
- },
86
- brand: {
87
- De3pzq: "ftywsgz"
88
- },
89
- error: {
90
- De3pzq: "fdl5y0r"
91
- },
92
- warning: {
93
- De3pzq: "f1s438gw"
94
- },
95
- success: {
96
- De3pzq: "flxk52p"
97
- }
98
- }, {
99
- m: [["@media screen and (forced-colors: active){.f1neahkh{background-color:Highlight;}}", {
100
- m: "screen and (forced-colors: active)"
101
- }], ["@media screen and (prefers-reduced-motion: reduce){.f4akx1t{-webkit-animation-duration:0.01ms;animation-duration:0.01ms;}}", {
102
- m: "screen and (prefers-reduced-motion: reduce)"
103
- }], ["@media screen and (prefers-reduced-motion: reduce){.f18p5put{-webkit-animation-iteration-count:1;animation-iteration-count:1;}}", {
104
- m: "screen and (prefers-reduced-motion: reduce)"
105
- }]],
106
- 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 );}", ".fwd2bol{-webkit-animation-name:f1keuaan;animation-name:f1keuaan;}", ".f14gig94{-webkit-animation-name:f10x8f8u;animation-name:f10x8f8u;}", ".f1a27w2r{-webkit-animation-duration:3s;animation-duration:3s;}", ".f452v7t{-webkit-animation-timing-function:linear;animation-timing-function:linear;}", ".f1cpbl36{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;}", ".ftywsgz{background-color:var(--colorCompoundBrandBackground);}", ".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}", ".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}", ".flxk52p{background-color:var(--colorPaletteGreenBackground3);}"],
107
- k: ["@-webkit-keyframes f1keuaan{0%{left:-33%;}100%{left:100%;}}", "@-webkit-keyframes f10x8f8u{0%{right:-33%;}100%{right:100%;}}", "@keyframes f1keuaan{0%{left:-33%;}100%{left:100%;}}", "@keyframes f10x8f8u{0%{right:-33%;}100%{right:100%;}}"]
108
- });
109
- /**
110
- * Apply styling to the ProgressBar slots based on the state
111
- */
112
- export const useProgressBarStyles_unstable = state => {
113
- const {
114
- color,
115
- max,
116
- shape,
117
- thickness,
118
- value
119
- } = state;
120
- const rootStyles = useRootStyles();
121
- const barStyles = useBarStyles();
122
- state.root.className = mergeClasses(progressBarClassNames.root, rootStyles.root, rootStyles[shape], rootStyles[thickness], state.root.className);
123
- if (state.bar) {
124
- state.bar.className = mergeClasses(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);
125
- }
126
- if (state.bar && value !== undefined) {
127
- state.bar.style = {
128
- width: Math.min(100, Math.max(0, value / max * 100)) + '%',
129
- ...state.bar.style
130
- };
131
- }
132
- return state;
133
- };
134
- //# sourceMappingURL=useProgressBarStyles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["__styles","mergeClasses","shorthands","tokens","progressBarClassNames","root","bar","ZERO_THRESHOLD","barThicknessValues","medium","large","indeterminateProgressBar","left","useRootStyles","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","Ezkn3b","w3vfg9","Gqtpxc","B3vm3ge","brand","error","warning","success","k","useProgressBarStyles_unstable","state","color","max","shape","thickness","value","rootStyles","barStyles","className","undefined","style","width","Math","min"],"sources":["../../../src/components/ProgressBar/useProgressBarStyles.ts"],"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"],"mappings":"AAAA,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GAAGG,KAAC,GAAQH,GAAA,GAAO,QAAQ;MACzD,GAAGF,KAAA,CAAM7C,GAAG,CAACuD;IACf;EACF;EAEA,OAAOV,KAAA;AACT"}
package/lib/index.js DELETED
@@ -1,2 +0,0 @@
1
- export { ProgressBar, progressBarClassNames, renderProgressBar_unstable, useProgressBar_unstable, useProgressBarStyles_unstable } from './ProgressBar';
2
- //# sourceMappingURL=index.js.map
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"names":["ProgressBar","progressBarClassNames","renderProgressBar_unstable","useProgressBar_unstable","useProgressBarStyles_unstable"],"sources":["../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"],"mappings":"AAAA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,uBAAuB,EACvBC,6BAA6B,QACxB"}
@@ -1,11 +0,0 @@
1
- export const clampMax = max => {
2
- const internalMax = max <= 0 ? 1 : max;
3
- if (process.env.NODE_ENV !== 'production') {
4
- if (max <= 0) {
5
- // eslint-disable-next-line no-console
6
- console.error(`The prop 'max' must be greater than 0. Received max: ${max}`);
7
- }
8
- }
9
- return internalMax;
10
- };
11
- //# sourceMappingURL=clampMax.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["clampMax","max","internalMax","process","env","NODE_ENV","console","error"],"sources":["../../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":"AAAA,OAAO,MAAMA,QAAA,GAAYC,GAAA,IAAwB;EAC/C,MAAMC,WAAA,GAAcD,GAAA,IAAO,IAAI,IAAIA,GAAG;EAEtC,IAAIE,OAAA,CAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzC,IAAIJ,GAAA,IAAO,GAAG;MACZ;MACAK,OAAA,CAAQC,KAAK,CAAE,wDAAuDN,GAAI,EAAC;IAC7E;EACF;EACA,OAAOC,WAAA;AACT"}
@@ -1,18 +0,0 @@
1
- export const clampValue = (value, max) => {
2
- if (value === undefined) {
3
- return value;
4
- }
5
- const internalValue = value < 0 ? 0 : value > max ? max : value;
6
- if (process.env.NODE_ENV !== 'production') {
7
- if (value < 0) {
8
- // eslint-disable-next-line no-console
9
- console.error(`The prop 'value' must be greater than or equal to zero. Received value: ${value}`);
10
- }
11
- if (value > max) {
12
- // eslint-disable-next-line no-console
13
- console.error(`The prop 'value' must be less than or equal to 'max'. Received value: ${value}, max: ${max}`);
14
- }
15
- }
16
- return internalValue;
17
- };
18
- //# sourceMappingURL=clampValue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["clampValue","value","max","undefined","internalValue","process","env","NODE_ENV","console","error"],"sources":["../../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":"AAAA,OAAO,MAAMA,UAAA,GAAaA,CAACC,KAAA,EAA2BC,GAAA,KAAoC;EACxF,IAAID,KAAA,KAAUE,SAAA,EAAW;IACvB,OAAOF,KAAA;EACT;EACA,MAAMG,aAAA,GAAgBH,KAAA,GAAQ,IAAI,IAAIA,KAAA,GAAQC,GAAA,GAAMA,GAAA,GAAMD,KAAK;EAE/D,IAAII,OAAA,CAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzC,IAAIN,KAAA,GAAQ,GAAG;MACb;MACAO,OAAA,CAAQC,KAAK,CAAE,2EAA0ER,KAAM,EAAC;IAClG;IACA,IAAIA,KAAA,GAAQC,GAAA,EAAK;MACf;MACAM,OAAA,CAAQC,KAAK,CAAE,yEAAwER,KAAM,UAASC,GAAI,EAAC;IAC7G;EACF;EACA,OAAOE,aAAA;AACT"}
@@ -1,3 +0,0 @@
1
- export * from './clampMax';
2
- export * from './clampValue';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["../../src/utils/index.ts"],"sourcesContent":["export * from './clampMax';\nexport * from './clampValue';\n"],"mappings":"AAAA,cAAc;AACd,cAAc"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../lib/components/ProgressBar/useProgressBarStyles.js"],"sourcesContent":["import { __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const progressBarClassNames = {\n root: 'fui-ProgressBar',\n bar: 'fui-ProgressBar__bar'\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;\nconst barThicknessValues = {\n medium: '2px',\n large: '4px'\n};\nconst indeterminateProgressBar = {\n '0%': {\n left: '-33%'\n },\n '100%': {\n left: '100%'\n }\n};\n/**\n * Styles for the root slot\n */\nconst useRootStyles = /*#__PURE__*/__styles({\n root: {\n mc9l5x: \"ftgm304\",\n De3pzq: \"f18f03hv\",\n a9b677: \"fly5x3f\",\n B68tc82: \"f1p9o1ba\",\n Bmxbyg5: \"f1sil6mw\",\n Bpep1pd: \"fu42dvn\"\n },\n rounded: {\n Bbmb7ep: [\"f1aa9q02\", \"f16jpd5f\"],\n Beyfa6y: [\"f16jpd5f\", \"f1aa9q02\"],\n B7oj6ja: [\"f1jar5jt\", \"fyu767a\"],\n Btl43ni: [\"fyu767a\", \"f1jar5jt\"]\n },\n square: {\n Bbmb7ep: [\"fzi6hpg\", \"fyowgf4\"],\n Beyfa6y: [\"fyowgf4\", \"fzi6hpg\"],\n B7oj6ja: [\"f3fg2lr\", \"f13av6d4\"],\n Btl43ni: [\"f13av6d4\", \"f3fg2lr\"]\n },\n medium: {\n Bqenvij: \"f4t8t6x\"\n },\n large: {\n Bqenvij: \"f6ywr7j\"\n }\n}, {\n 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;}\"],\n m: [[\"@media screen and (forced-colors: active){.fu42dvn{background-color:CanvasText;}}\", {\n m: \"screen and (forced-colors: active)\"\n }]]\n});\n/**\n * Styles for the ProgressBar bar\n */\nconst useBarStyles = /*#__PURE__*/__styles({\n base: {\n Bpep1pd: \"f1neahkh\",\n Bbmb7ep: [\"f1d9uwra\", \"fzibvwi\"],\n Beyfa6y: [\"fzibvwi\", \"f1d9uwra\"],\n B7oj6ja: [\"fuoumxm\", \"f1vtqnvc\"],\n Btl43ni: [\"f1vtqnvc\", \"fuoumxm\"],\n Bqenvij: \"f1l02sjl\"\n },\n nonZeroDeterminate: {\n Bmy1vo4: \"fjt6zfz\",\n B3o57yi: \"f1wofebd\",\n Bkqvd7p: \"fv71qf3\"\n },\n indeterminate: {\n B2u0y6b: \"fa0wk36\",\n qhf8xq: \"f10pi13n\",\n Bcmaq0h: [\"fpo0yib\", \"f1u5hf6c\"],\n Bv12yb3: [\"fwd2bol\", \"f14gig94\"],\n vin17d: \"f1a27w2r\",\n Ezkn3b: \"f452v7t\",\n w3vfg9: \"f1cpbl36\",\n Gqtpxc: \"f4akx1t\",\n B3vm3ge: \"f18p5put\"\n },\n brand: {\n De3pzq: \"ftywsgz\"\n },\n error: {\n De3pzq: \"fdl5y0r\"\n },\n warning: {\n De3pzq: \"f1s438gw\"\n },\n success: {\n De3pzq: \"flxk52p\"\n }\n}, {\n m: [[\"@media screen and (forced-colors: active){.f1neahkh{background-color:Highlight;}}\", {\n m: \"screen and (forced-colors: active)\"\n }], [\"@media screen and (prefers-reduced-motion: reduce){.f4akx1t{-webkit-animation-duration:0.01ms;animation-duration:0.01ms;}}\", {\n m: \"screen and (prefers-reduced-motion: reduce)\"\n }], [\"@media screen and (prefers-reduced-motion: reduce){.f18p5put{-webkit-animation-iteration-count:1;animation-iteration-count:1;}}\", {\n m: \"screen and (prefers-reduced-motion: reduce)\"\n }]],\n 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 );}\", \".fwd2bol{-webkit-animation-name:f1keuaan;animation-name:f1keuaan;}\", \".f14gig94{-webkit-animation-name:f10x8f8u;animation-name:f10x8f8u;}\", \".f1a27w2r{-webkit-animation-duration:3s;animation-duration:3s;}\", \".f452v7t{-webkit-animation-timing-function:linear;animation-timing-function:linear;}\", \".f1cpbl36{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;}\", \".ftywsgz{background-color:var(--colorCompoundBrandBackground);}\", \".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}\", \".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}\", \".flxk52p{background-color:var(--colorPaletteGreenBackground3);}\"],\n k: [\"@-webkit-keyframes f1keuaan{0%{left:-33%;}100%{left:100%;}}\", \"@-webkit-keyframes f10x8f8u{0%{right:-33%;}100%{right:100%;}}\", \"@keyframes f1keuaan{0%{left:-33%;}100%{left:100%;}}\", \"@keyframes f10x8f8u{0%{right:-33%;}100%{right:100%;}}\"]\n});\n/**\n * Apply styling to the ProgressBar slots based on the state\n */\nexport const useProgressBarStyles_unstable = state => {\n const {\n color,\n max,\n shape,\n thickness,\n value\n } = state;\n const rootStyles = useRootStyles();\n const barStyles = useBarStyles();\n state.root.className = mergeClasses(progressBarClassNames.root, rootStyles.root, rootStyles[shape], rootStyles[thickness], state.root.className);\n if (state.bar) {\n state.bar.className = mergeClasses(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);\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 return state;\n};\n//# sourceMappingURL=useProgressBarStyles.js.map"],"names":["progressBarClassNames","useProgressBarStyles_unstable","root","bar","ZERO_THRESHOLD","barThicknessValues","medium","large","indeterminateProgressBar","left","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","Ezkn3b","w3vfg9","Gqtpxc","B3vm3ge","brand","error","warning","success","k","state","color","max","shape","thickness","value","rootStyles","barStyles","className","mergeClasses","undefined","style","width","Math","min"],"mappings":";;;;;;;;;;;IAEaA,qBAAqB,MAArBA;IA6GAC,6BAA6B,MAA7BA;;uBA/GsC;AAE5C,MAAMD,wBAAwB;IACnCE,MAAM;IACNC,KAAK;AACP;AACA,sDAAsD;AACtD,oDAAoD;AACpD,MAAMC,iBAAiB;AACvB,MAAMC,qBAAqB;IACzBC,QAAQ;IACRC,OAAO;AACT;AACA,MAAMC,2BAA2B;IAC/B,MAAM;QACJC,MAAM;IACR;IACA,QAAQ;QACNA,MAAM;IACR;AACF;AACA;;CAEC,GACD,MAAMC,gBAAgB,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IAC1CT,MAAM;QACJU,QAAQ;QACRC,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,SAAS;IACX;IACAC,SAAS;QACPC,SAAS;YAAC;YAAY;SAAW;QACjCC,SAAS;YAAC;YAAY;SAAW;QACjCC,SAAS;YAAC;YAAY;SAAU;QAChCC,SAAS;YAAC;YAAW;SAAW;IAClC;IACAC,QAAQ;QACNJ,SAAS;YAAC;YAAW;SAAU;QAC/BC,SAAS;YAAC;YAAW;SAAU;QAC/BC,SAAS;YAAC;YAAW;SAAW;QAChCC,SAAS;YAAC;YAAY;SAAU;IAClC;IACAhB,QAAQ;QACNkB,SAAS;IACX;IACAjB,OAAO;QACLiB,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;QAA4B;QAA+D;QAAyB;QAAiC;QAAiC;QAAoE;QAAmE;QAAiE;QAA+D;QAAiE;QAAgE;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