@fluentui/react-progress 0.0.0-nightly-20230321-0440.1 → 0.0.0-nightly-20230324-0422.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 (50) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +64 -13
  3. package/CHANGELOG.md +24 -9
  4. package/lib/ProgressBar.js.map +1 -1
  5. package/lib/ProgressField.js.map +1 -1
  6. package/lib/components/ProgressBar/ProgressBar.js.map +1 -1
  7. package/lib/components/ProgressBar/ProgressBar.types.js.map +1 -1
  8. package/lib/components/ProgressBar/index.js.map +1 -1
  9. package/lib/components/ProgressBar/renderProgressBar.js +1 -5
  10. package/lib/components/ProgressBar/renderProgressBar.js.map +1 -1
  11. package/lib/components/ProgressBar/useProgressBar.js +3 -2
  12. package/lib/components/ProgressBar/useProgressBar.js.map +1 -1
  13. package/lib/components/ProgressBar/useProgressBarStyles.js +1 -2
  14. package/lib/components/ProgressBar/useProgressBarStyles.js.map +1 -1
  15. package/lib/components/ProgressField/ProgressField.js +1 -2
  16. package/lib/components/ProgressField/ProgressField.js.map +1 -1
  17. package/lib/components/ProgressField/index.js.map +1 -1
  18. package/lib/index.js.map +1 -1
  19. package/lib/utils/clampMax.js.map +1 -1
  20. package/lib/utils/clampValue.js.map +1 -1
  21. package/lib/utils/index.js.map +1 -1
  22. package/lib-commonjs/ProgressBar.js +5 -4
  23. package/lib-commonjs/ProgressBar.js.map +1 -1
  24. package/lib-commonjs/ProgressField.js +5 -4
  25. package/lib-commonjs/ProgressField.js.map +1 -1
  26. package/lib-commonjs/components/ProgressBar/ProgressBar.js +19 -20
  27. package/lib-commonjs/components/ProgressBar/ProgressBar.js.map +1 -1
  28. package/lib-commonjs/components/ProgressBar/ProgressBar.types.js +3 -2
  29. package/lib-commonjs/components/ProgressBar/ProgressBar.types.js.map +1 -1
  30. package/lib-commonjs/components/ProgressBar/index.js +9 -8
  31. package/lib-commonjs/components/ProgressBar/index.js.map +1 -1
  32. package/lib-commonjs/components/ProgressBar/renderProgressBar.js +13 -20
  33. package/lib-commonjs/components/ProgressBar/renderProgressBar.js.map +1 -1
  34. package/lib-commonjs/components/ProgressBar/useProgressBar.js +42 -51
  35. package/lib-commonjs/components/ProgressBar/useProgressBar.js.map +1 -1
  36. package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js +220 -122
  37. package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js.map +1 -1
  38. package/lib-commonjs/components/ProgressField/ProgressField.js +25 -19
  39. package/lib-commonjs/components/ProgressField/ProgressField.js.map +1 -1
  40. package/lib-commonjs/components/ProgressField/index.js +5 -4
  41. package/lib-commonjs/components/ProgressField/index.js.map +1 -1
  42. package/lib-commonjs/index.js +21 -49
  43. package/lib-commonjs/index.js.map +1 -1
  44. package/lib-commonjs/utils/clampMax.js +15 -13
  45. package/lib-commonjs/utils/clampMax.js.map +1 -1
  46. package/lib-commonjs/utils/clampValue.js +21 -19
  47. package/lib-commonjs/utils/clampValue.js.map +1 -1
  48. package/lib-commonjs/utils/index.js +6 -5
  49. package/lib-commonjs/utils/index.js.map +1 -1
  50. package/package.json +8 -8
@@ -1,24 +1,17 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "renderProgressBar_unstable", {
6
+ enumerable: true,
7
+ get: ()=>renderProgressBar_unstable
5
8
  });
6
- exports.renderProgressBar_unstable = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
- /**
10
- * Render the final JSX of ProgressBar
11
- */
12
- const renderProgressBar_unstable = state => {
13
- const {
14
- slots,
15
- slotProps
16
- } = react_utilities_1.getSlots(state);
17
- return React.createElement(slots.root, {
18
- ...slotProps.root
19
- }, slots.bar && React.createElement(slots.bar, {
20
- ...slotProps.bar
21
- }));
22
- };
23
- exports.renderProgressBar_unstable = renderProgressBar_unstable;
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _reactUtilities = require("@fluentui/react-utilities");
12
+ const renderProgressBar_unstable = (state)=>{
13
+ const { slots , slotProps } = (0, _reactUtilities.getSlots)(state);
14
+ return /*#__PURE__*/ _react.createElement(slots.root, slotProps.root, slots.bar && /*#__PURE__*/ _react.createElement(slots.bar, slotProps.bar));
15
+ }; //# sourceMappingURL=renderProgressBar.js.map
16
+
24
17
  //# sourceMappingURL=renderProgressBar.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","react_utilities_1","renderProgressBar_unstable","state","slots","slotProps","getSlots","createElement","root","bar","exports"],"sources":["../../../../../../../../../packages/react-components/react-progress/src/components/ProgressBar/renderProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { ProgressBarState, ProgressBarSlots } from './ProgressBar.types';\n\n/**\n * Render the final JSX of ProgressBar\n */\nexport const renderProgressBar_unstable = (state: ProgressBarState) => {\n const { slots, slotProps } = getSlots<ProgressBarSlots>(state);\n return <slots.root {...slotProps.root}>{slots.bar && <slots.bar {...slotProps.bar} />}</slots.root>;\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AAGA;;;AAGO,MAAME,0BAA0B,GAAIC,KAAuB,IAAI;EACpE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,iBAAA,CAAAK,QAAQ,CAAmBH,KAAK,CAAC;EAC9D,OAAOJ,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,GAAGJ,KAAK,CAACK,GAAG,IAAIV,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACK,GAAG;IAAA,GAAKJ,SAAS,CAACI;EAAG,EAAI,CAAc;AACrG,CAAC;AAHYC,OAAA,CAAAR,0BAA0B,GAAAA,0BAAA"}
1
+ {"version":3,"sources":["../../../lib/components/ProgressBar/renderProgressBar.js"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of ProgressBar\n */\nexport const renderProgressBar_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlots(state);\n return /*#__PURE__*/React.createElement(slots.root, slotProps.root, slots.bar && /*#__PURE__*/React.createElement(slots.bar, slotProps.bar));\n};\n//# sourceMappingURL=renderProgressBar.js.map"],"names":["renderProgressBar_unstable","state","slots","slotProps","getSlots","React","createElement","root","bar"],"mappings":";;;;+BAKaA;;aAAAA;;;6DALU;gCACE;AAIlB,MAAMA,6BAA6BC,CAAAA,QAAS;IACjD,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,wBAAQ,EAACH;IACb,OAAO,WAAW,GAAEI,OAAMC,aAAa,CAACJ,MAAMK,IAAI,EAAEJ,UAAUI,IAAI,EAAEL,MAAMM,GAAG,IAAI,WAAW,GAAEH,OAAMC,aAAa,CAACJ,MAAMM,GAAG,EAAEL,UAAUK,GAAG;AAC5I,GACA,6CAA6C"}
@@ -1,55 +1,46 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useProgressBar_unstable", {
6
+ enumerable: true,
7
+ get: ()=>useProgressBar_unstable
5
8
  });
6
- exports.useProgressBar_unstable = void 0;
7
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
8
- const index_1 = /*#__PURE__*/require("../../utils/index");
9
- /**
10
- * Create the state required to render ProgressBar.
11
- *
12
- * The returned state can be modified with hooks such as useProgressBarStyles_unstable,
13
- * before being passed to renderProgressBar_unstable.
14
- *
15
- * @param props - props from this instance of ProgressBar
16
- * @param ref - reference to root HTMLElement of ProgressBar
17
- */
18
- const useProgressBar_unstable = (props, ref) => {
19
- var _a;
20
- // Props
21
- const {
22
- color = 'brand',
23
- shape = 'rounded',
24
- thickness = 'medium'
25
- } = props;
26
- const max = index_1.clampMax((_a = props.max) !== null && _a !== void 0 ? _a : 1);
27
- const value = index_1.clampValue(props.value, max);
28
- const root = react_utilities_1.getNativeElementProps('div', {
29
- ref,
30
- role: 'progressbar',
31
- 'aria-valuemin': value !== undefined ? 0 : undefined,
32
- 'aria-valuemax': value !== undefined ? max : undefined,
33
- 'aria-valuenow': value,
34
- ...props
35
- });
36
- const bar = react_utilities_1.resolveShorthand(props.bar, {
37
- required: true
38
- });
39
- const state = {
40
- color,
41
- max,
42
- shape,
43
- thickness,
44
- value,
45
- components: {
46
- root: 'div',
47
- bar: 'div'
48
- },
49
- root,
50
- bar
51
- };
52
- return state;
53
- };
54
- exports.useProgressBar_unstable = useProgressBar_unstable;
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _reactUtilities = require("@fluentui/react-utilities");
12
+ const _index = require("../../utils/index");
13
+ const useProgressBar_unstable = (props, ref)=>{
14
+ // Props
15
+ const { color ='brand' , shape ='rounded' , thickness ='medium' } = props;
16
+ var _props_max;
17
+ const max = (0, _index.clampMax)((_props_max = props.max) !== null && _props_max !== void 0 ? _props_max : 1);
18
+ const value = (0, _index.clampValue)(props.value, max);
19
+ const root = (0, _reactUtilities.getNativeElementProps)('div', {
20
+ ref,
21
+ role: 'progressbar',
22
+ 'aria-valuemin': value !== undefined ? 0 : undefined,
23
+ 'aria-valuemax': value !== undefined ? max : undefined,
24
+ 'aria-valuenow': value,
25
+ ...props
26
+ });
27
+ const bar = (0, _reactUtilities.resolveShorthand)(props.bar, {
28
+ required: true
29
+ });
30
+ const state = {
31
+ color,
32
+ max,
33
+ shape,
34
+ thickness,
35
+ value,
36
+ components: {
37
+ root: 'div',
38
+ bar: 'div'
39
+ },
40
+ root,
41
+ bar
42
+ };
43
+ return state;
44
+ }; //# sourceMappingURL=useProgressBar.js.map
45
+
55
46
  //# sourceMappingURL=useProgressBar.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["react_utilities_1","require","index_1","useProgressBar_unstable","props","ref","color","shape","thickness","max","clampMax","_a","value","clampValue","root","getNativeElementProps","role","undefined","bar","resolveShorthand","required","state","components","exports"],"sources":["../../../../../../../../../packages/react-components/react-progress/src/components/ProgressBar/useProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport { clampValue, clampMax } from '../../utils/index';\nimport type { ProgressBarProps, ProgressBarState } from './ProgressBar.types';\n\n/**\n * Create the state required to render ProgressBar.\n *\n * The returned state can be modified with hooks such as useProgressBarStyles_unstable,\n * before being passed to renderProgressBar_unstable.\n *\n * @param props - props from this instance of ProgressBar\n * @param ref - reference to root HTMLElement of ProgressBar\n */\nexport const useProgressBar_unstable = (props: ProgressBarProps, ref: React.Ref<HTMLElement>): ProgressBarState => {\n // Props\n const { color = 'brand', shape = 'rounded', thickness = 'medium' } = props;\n const max = clampMax(props.max ?? 1);\n const value = clampValue(props.value, max);\n\n const root = getNativeElementProps('div', {\n ref,\n role: 'progressbar',\n 'aria-valuemin': value !== undefined ? 0 : undefined,\n 'aria-valuemax': value !== undefined ? max : undefined,\n 'aria-valuenow': value,\n ...props,\n });\n\n const bar = resolveShorthand(props.bar, {\n required: true,\n });\n\n const state: ProgressBarState = {\n color,\n max,\n shape,\n thickness,\n value,\n components: {\n root: 'div',\n bar: 'div',\n },\n root,\n bar,\n };\n\n return state;\n};\n"],"mappings":";;;;;;AACA,MAAAA,iBAAA,gBAAAC,OAAA;AACA,MAAAC,OAAA,gBAAAD,OAAA;AAGA;;;;;;;;;AASO,MAAME,uBAAuB,GAAGA,CAACC,KAAuB,EAAEC,GAA2B,KAAsB;;EAChH;EACA,MAAM;IAAEC,KAAK,GAAG,OAAO;IAAEC,KAAK,GAAG,SAAS;IAAEC,SAAS,GAAG;EAAQ,CAAE,GAAGJ,KAAK;EAC1E,MAAMK,GAAG,GAAGP,OAAA,CAAAQ,QAAQ,CAAC,CAAAC,EAAA,GAAAP,KAAK,CAACK,GAAG,cAAAE,EAAA,cAAAA,EAAA,GAAI,CAAC,CAAC;EACpC,MAAMC,KAAK,GAAGV,OAAA,CAAAW,UAAU,CAACT,KAAK,CAACQ,KAAK,EAAEH,GAAG,CAAC;EAE1C,MAAMK,IAAI,GAAGd,iBAAA,CAAAe,qBAAqB,CAAC,KAAK,EAAE;IACxCV,GAAG;IACHW,IAAI,EAAE,aAAa;IACnB,eAAe,EAAEJ,KAAK,KAAKK,SAAS,GAAG,CAAC,GAAGA,SAAS;IACpD,eAAe,EAAEL,KAAK,KAAKK,SAAS,GAAGR,GAAG,GAAGQ,SAAS;IACtD,eAAe,EAAEL,KAAK;IACtB,GAAGR;GACJ,CAAC;EAEF,MAAMc,GAAG,GAAGlB,iBAAA,CAAAmB,gBAAgB,CAACf,KAAK,CAACc,GAAG,EAAE;IACtCE,QAAQ,EAAE;GACX,CAAC;EAEF,MAAMC,KAAK,GAAqB;IAC9Bf,KAAK;IACLG,GAAG;IACHF,KAAK;IACLC,SAAS;IACTI,KAAK;IACLU,UAAU,EAAE;MACVR,IAAI,EAAE,KAAK;MACXI,GAAG,EAAE;KACN;IACDJ,IAAI;IACJI;GACD;EAED,OAAOG,KAAK;AACd,CAAC;AAlCYE,OAAA,CAAApB,uBAAuB,GAAAA,uBAAA"}
1
+ {"version":3,"sources":["../../../lib/components/ProgressBar/useProgressBar.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport { clampValue, clampMax } from '../../utils/index';\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, ref) => {\n // Props\n const {\n color = 'brand',\n shape = 'rounded',\n thickness = 'medium'\n } = props;\n var _props_max;\n const max = clampMax((_props_max = props.max) !== null && _props_max !== void 0 ? _props_max : 1);\n const value = clampValue(props.value, max);\n const root = getNativeElementProps('div', {\n ref,\n role: 'progressbar',\n 'aria-valuemin': value !== undefined ? 0 : undefined,\n 'aria-valuemax': value !== undefined ? max : undefined,\n 'aria-valuenow': value,\n ...props\n });\n const bar = resolveShorthand(props.bar, {\n required: true\n });\n const state = {\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 return state;\n};\n//# sourceMappingURL=useProgressBar.js.map"],"names":["useProgressBar_unstable","props","ref","color","shape","thickness","_props_max","max","clampMax","value","clampValue","root","getNativeElementProps","role","undefined","bar","resolveShorthand","required","state","components"],"mappings":";;;;+BAYaA;;aAAAA;;;6DAZU;gCACiC;uBACnB;AAU9B,MAAMA,0BAA0B,CAACC,OAAOC,MAAQ;IACrD,QAAQ;IACR,MAAM,EACJC,OAAQ,QAAO,EACfC,OAAQ,UAAS,EACjBC,WAAY,SAAQ,EACrB,GAAGJ;IACJ,IAAIK;IACJ,MAAMC,MAAMC,IAAAA,eAAQ,EAAC,AAACF,CAAAA,aAAaL,MAAMM,GAAG,AAAD,MAAO,IAAI,IAAID,eAAe,KAAK,IAAIA,aAAa,CAAC;IAChG,MAAMG,QAAQC,IAAAA,iBAAU,EAACT,MAAMQ,KAAK,EAAEF;IACtC,MAAMI,OAAOC,IAAAA,qCAAqB,EAAC,OAAO;QACxCV;QACAW,MAAM;QACN,iBAAiBJ,UAAUK,YAAY,IAAIA,SAAS;QACpD,iBAAiBL,UAAUK,YAAYP,MAAMO,SAAS;QACtD,iBAAiBL;QACjB,GAAGR,KAAK;IACV;IACA,MAAMc,MAAMC,IAAAA,gCAAgB,EAACf,MAAMc,GAAG,EAAE;QACtCE,UAAU,IAAI;IAChB;IACA,MAAMC,QAAQ;QACZf;QACAI;QACAH;QACAC;QACAI;QACAU,YAAY;YACVR,MAAM;YACNI,KAAK;QACP;QACAJ;QACAI;IACF;IACA,OAAOG;AACT,GACA,0CAA0C"}
@@ -1,142 +1,240 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ progressBarClassNames: ()=>progressBarClassNames,
13
+ useProgressBarStyles_unstable: ()=>useProgressBarStyles_unstable
5
14
  });
6
- exports.useProgressBarStyles_unstable = exports.progressBarClassNames = void 0;
7
- const react_1 = /*#__PURE__*/require("@griffel/react");
8
- const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
9
- exports.progressBarClassNames = {
10
- root: 'fui-ProgressBar',
11
- bar: 'fui-ProgressBar__bar'
15
+ const _react = require("@griffel/react");
16
+ const progressBarClassNames = {
17
+ root: 'fui-ProgressBar',
18
+ bar: 'fui-ProgressBar__bar'
12
19
  };
13
20
  // If the percentComplete is near 0, don't animate it.
14
21
  // This prevents animations on reset to 0 scenarios.
15
22
  const ZERO_THRESHOLD = 0.01;
16
23
  const barThicknessValues = {
17
- medium: '2px',
18
- large: '4px'
24
+ medium: '2px',
25
+ large: '4px'
19
26
  };
20
27
  const indeterminateProgressBar = {
21
- '0%': {
22
- left: '-33%' // matches indeterminate bar width
23
- },
24
-
25
- '100%': {
26
- left: '100%'
27
- }
28
+ '0%': {
29
+ left: '-33%'
30
+ },
31
+ '100%': {
32
+ left: '100%'
33
+ }
28
34
  };
29
35
  /**
30
36
  * Styles for the root slot
31
- */
32
- const useRootStyles = /*#__PURE__*/react_1.__styles({
33
- root: {
34
- mc9l5x: "ftgm304",
35
- De3pzq: "f18f03hv",
36
- a9b677: "fly5x3f",
37
- B68tc82: "f1p9o1ba",
38
- Bmxbyg5: "f1sil6mw",
39
- Bpep1pd: "fu42dvn"
40
- },
41
- rounded: {
42
- Bbmb7ep: ["f1aa9q02", "f16jpd5f"],
43
- Beyfa6y: ["f16jpd5f", "f1aa9q02"],
44
- B7oj6ja: ["f1jar5jt", "fyu767a"],
45
- Btl43ni: ["fyu767a", "f1jar5jt"]
46
- },
47
- square: {
48
- Bbmb7ep: ["fzi6hpg", "fyowgf4"],
49
- Beyfa6y: ["fyowgf4", "fzi6hpg"],
50
- B7oj6ja: ["f3fg2lr", "f13av6d4"],
51
- Btl43ni: ["f13av6d4", "f3fg2lr"]
52
- },
53
- medium: {
54
- Bqenvij: "f4t8t6x"
55
- },
56
- large: {
57
- Bqenvij: "f6ywr7j"
58
- }
37
+ */ const useRootStyles = /*#__PURE__*/ (0, _react["__styles"])({
38
+ root: {
39
+ mc9l5x: "ftgm304",
40
+ De3pzq: "f18f03hv",
41
+ a9b677: "fly5x3f",
42
+ B68tc82: "f1p9o1ba",
43
+ Bmxbyg5: "f1sil6mw",
44
+ Bpep1pd: "fu42dvn"
45
+ },
46
+ rounded: {
47
+ Bbmb7ep: [
48
+ "f1aa9q02",
49
+ "f16jpd5f"
50
+ ],
51
+ Beyfa6y: [
52
+ "f16jpd5f",
53
+ "f1aa9q02"
54
+ ],
55
+ B7oj6ja: [
56
+ "f1jar5jt",
57
+ "fyu767a"
58
+ ],
59
+ Btl43ni: [
60
+ "fyu767a",
61
+ "f1jar5jt"
62
+ ]
63
+ },
64
+ square: {
65
+ Bbmb7ep: [
66
+ "fzi6hpg",
67
+ "fyowgf4"
68
+ ],
69
+ Beyfa6y: [
70
+ "fyowgf4",
71
+ "fzi6hpg"
72
+ ],
73
+ B7oj6ja: [
74
+ "f3fg2lr",
75
+ "f13av6d4"
76
+ ],
77
+ Btl43ni: [
78
+ "f13av6d4",
79
+ "f3fg2lr"
80
+ ]
81
+ },
82
+ medium: {
83
+ Bqenvij: "f4t8t6x"
84
+ },
85
+ large: {
86
+ Bqenvij: "f6ywr7j"
87
+ }
59
88
  }, {
60
- 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;}"],
61
- m: [["@media screen and (forced-colors: active){.fu42dvn{background-color:CanvasText;}}", {
62
- m: "screen and (forced-colors: active)"
63
- }]]
89
+ d: [
90
+ ".ftgm304{display:block;}",
91
+ ".f18f03hv{background-color:var(--colorNeutralBackground6);}",
92
+ ".fly5x3f{width:100%;}",
93
+ ".f1p9o1ba{overflow-x:hidden;}",
94
+ ".f1sil6mw{overflow-y:hidden;}",
95
+ ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}",
96
+ ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}",
97
+ ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}",
98
+ ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}",
99
+ ".fzi6hpg{border-bottom-right-radius:var(--borderRadiusNone);}",
100
+ ".fyowgf4{border-bottom-left-radius:var(--borderRadiusNone);}",
101
+ ".f3fg2lr{border-top-right-radius:var(--borderRadiusNone);}",
102
+ ".f13av6d4{border-top-left-radius:var(--borderRadiusNone);}",
103
+ ".f4t8t6x{height:2px;}",
104
+ ".f6ywr7j{height:4px;}"
105
+ ],
106
+ m: [
107
+ [
108
+ "@media screen and (forced-colors: active){.fu42dvn{background-color:CanvasText;}}",
109
+ {
110
+ m: "screen and (forced-colors: active)"
111
+ }
112
+ ]
113
+ ]
64
114
  });
65
115
  /**
66
116
  * Styles for the ProgressBar bar
67
- */
68
- const useBarStyles = /*#__PURE__*/react_1.__styles({
69
- base: {
70
- Bpep1pd: "f1neahkh",
71
- Bbmb7ep: ["f1d9uwra", "fzibvwi"],
72
- Beyfa6y: ["fzibvwi", "f1d9uwra"],
73
- B7oj6ja: ["fuoumxm", "f1vtqnvc"],
74
- Btl43ni: ["f1vtqnvc", "fuoumxm"],
75
- Bqenvij: "f1l02sjl"
76
- },
77
- nonZeroDeterminate: {
78
- Bmy1vo4: "fjt6zfz",
79
- B3o57yi: "f1wofebd",
80
- Bkqvd7p: "fv71qf3"
81
- },
82
- indeterminate: {
83
- B2u0y6b: "fa0wk36",
84
- qhf8xq: "f10pi13n",
85
- Bcmaq0h: ["fpo0yib", "f1u5hf6c"],
86
- Bv12yb3: ["fwd2bol", "f14gig94"],
87
- vin17d: "f1a27w2r",
88
- Ezkn3b: "f452v7t",
89
- w3vfg9: "f1cpbl36",
90
- Gqtpxc: "f4akx1t",
91
- B3vm3ge: "f18p5put"
92
- },
93
- brand: {
94
- De3pzq: "ftywsgz"
95
- },
96
- error: {
97
- De3pzq: "fdl5y0r"
98
- },
99
- warning: {
100
- De3pzq: "f1s438gw"
101
- },
102
- success: {
103
- De3pzq: "flxk52p"
104
- }
117
+ */ const useBarStyles = /*#__PURE__*/ (0, _react["__styles"])({
118
+ base: {
119
+ Bpep1pd: "f1neahkh",
120
+ Bbmb7ep: [
121
+ "f1d9uwra",
122
+ "fzibvwi"
123
+ ],
124
+ Beyfa6y: [
125
+ "fzibvwi",
126
+ "f1d9uwra"
127
+ ],
128
+ B7oj6ja: [
129
+ "fuoumxm",
130
+ "f1vtqnvc"
131
+ ],
132
+ Btl43ni: [
133
+ "f1vtqnvc",
134
+ "fuoumxm"
135
+ ],
136
+ Bqenvij: "f1l02sjl"
137
+ },
138
+ nonZeroDeterminate: {
139
+ Bmy1vo4: "fjt6zfz",
140
+ B3o57yi: "f1wofebd",
141
+ Bkqvd7p: "fv71qf3"
142
+ },
143
+ indeterminate: {
144
+ B2u0y6b: "fa0wk36",
145
+ qhf8xq: "f10pi13n",
146
+ Bcmaq0h: [
147
+ "fpo0yib",
148
+ "f1u5hf6c"
149
+ ],
150
+ Bv12yb3: [
151
+ "fwd2bol",
152
+ "f14gig94"
153
+ ],
154
+ vin17d: "f1a27w2r",
155
+ Ezkn3b: "f452v7t",
156
+ w3vfg9: "f1cpbl36",
157
+ Gqtpxc: "f4akx1t",
158
+ B3vm3ge: "f18p5put"
159
+ },
160
+ brand: {
161
+ De3pzq: "ftywsgz"
162
+ },
163
+ error: {
164
+ De3pzq: "fdl5y0r"
165
+ },
166
+ warning: {
167
+ De3pzq: "f1s438gw"
168
+ },
169
+ success: {
170
+ De3pzq: "flxk52p"
171
+ }
105
172
  }, {
106
- m: [["@media screen and (forced-colors: active){.f1neahkh{background-color:Highlight;}}", {
107
- m: "screen and (forced-colors: active)"
108
- }], ["@media screen and (prefers-reduced-motion: reduce){.f4akx1t{-webkit-animation-duration:0.01ms;animation-duration:0.01ms;}}", {
109
- m: "screen and (prefers-reduced-motion: reduce)"
110
- }], ["@media screen and (prefers-reduced-motion: reduce){.f18p5put{-webkit-animation-iteration-count:1;animation-iteration-count:1;}}", {
111
- m: "screen and (prefers-reduced-motion: reduce)"
112
- }]],
113
- 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);}"],
114
- 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%;}}"]
173
+ m: [
174
+ [
175
+ "@media screen and (forced-colors: active){.f1neahkh{background-color:Highlight;}}",
176
+ {
177
+ m: "screen and (forced-colors: active)"
178
+ }
179
+ ],
180
+ [
181
+ "@media screen and (prefers-reduced-motion: reduce){.f4akx1t{-webkit-animation-duration:0.01ms;animation-duration:0.01ms;}}",
182
+ {
183
+ m: "screen and (prefers-reduced-motion: reduce)"
184
+ }
185
+ ],
186
+ [
187
+ "@media screen and (prefers-reduced-motion: reduce){.f18p5put{-webkit-animation-iteration-count:1;animation-iteration-count:1;}}",
188
+ {
189
+ m: "screen and (prefers-reduced-motion: reduce)"
190
+ }
191
+ ]
192
+ ],
193
+ d: [
194
+ ".f1d9uwra{border-bottom-right-radius:inherit;}",
195
+ ".fzibvwi{border-bottom-left-radius:inherit;}",
196
+ ".fuoumxm{border-top-right-radius:inherit;}",
197
+ ".f1vtqnvc{border-top-left-radius:inherit;}",
198
+ ".f1l02sjl{height:100%;}",
199
+ ".fjt6zfz{transition-property:width;}",
200
+ ".f1wofebd{transition-duration:0.3s;}",
201
+ ".fv71qf3{transition-timing-function:ease;}",
202
+ ".fa0wk36{max-width:33%;}",
203
+ ".f10pi13n{position:relative;}",
204
+ ".fpo0yib{background-image:linear-gradient(\n to right,\n var(--colorNeutralBackground6) 0%,\n var(--colorTransparentBackground) 50%,\n var(--colorNeutralBackground6) 100%\n );}",
205
+ ".f1u5hf6c{background-image:linear-gradient(\n to left,\n var(--colorNeutralBackground6) 0%,\n var(--colorTransparentBackground) 50%,\n var(--colorNeutralBackground6) 100%\n );}",
206
+ ".fwd2bol{-webkit-animation-name:f1keuaan;animation-name:f1keuaan;}",
207
+ ".f14gig94{-webkit-animation-name:f10x8f8u;animation-name:f10x8f8u;}",
208
+ ".f1a27w2r{-webkit-animation-duration:3s;animation-duration:3s;}",
209
+ ".f452v7t{-webkit-animation-timing-function:linear;animation-timing-function:linear;}",
210
+ ".f1cpbl36{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;}",
211
+ ".ftywsgz{background-color:var(--colorCompoundBrandBackground);}",
212
+ ".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}",
213
+ ".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}",
214
+ ".flxk52p{background-color:var(--colorPaletteGreenBackground3);}"
215
+ ],
216
+ k: [
217
+ "@-webkit-keyframes f1keuaan{0%{left:-33%;}100%{left:100%;}}",
218
+ "@-webkit-keyframes f10x8f8u{0%{right:-33%;}100%{right:100%;}}",
219
+ "@keyframes f1keuaan{0%{left:-33%;}100%{left:100%;}}",
220
+ "@keyframes f10x8f8u{0%{right:-33%;}100%{right:100%;}}"
221
+ ]
115
222
  });
116
- /**
117
- * Apply styling to the ProgressBar slots based on the state
118
- */
119
- const useProgressBarStyles_unstable = state => {
120
- const {
121
- color,
122
- max,
123
- shape,
124
- thickness,
125
- value
126
- } = state;
127
- const rootStyles = useRootStyles();
128
- const barStyles = useBarStyles();
129
- state.root.className = react_1.mergeClasses(exports.progressBarClassNames.root, rootStyles.root, rootStyles[shape], rootStyles[thickness], state.root.className);
130
- if (state.bar) {
131
- state.bar.className = react_1.mergeClasses(exports.progressBarClassNames.bar, barStyles.base, barStyles.brand, value === undefined && barStyles.indeterminate, value !== undefined && value > ZERO_THRESHOLD && barStyles.nonZeroDeterminate, color && value !== undefined && barStyles[color], state.bar.className);
132
- }
133
- if (state.bar && value !== undefined) {
134
- state.bar.style = {
135
- width: Math.min(100, Math.max(0, value / max * 100)) + '%',
136
- ...state.bar.style
137
- };
138
- }
139
- return state;
140
- };
141
- exports.useProgressBarStyles_unstable = useProgressBarStyles_unstable;
223
+ const useProgressBarStyles_unstable = (state)=>{
224
+ const { color , max , shape , thickness , value } = state;
225
+ const rootStyles = useRootStyles();
226
+ const barStyles = useBarStyles();
227
+ state.root.className = (0, _react.mergeClasses)(progressBarClassNames.root, rootStyles.root, rootStyles[shape], rootStyles[thickness], state.root.className);
228
+ if (state.bar) {
229
+ state.bar.className = (0, _react.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);
230
+ }
231
+ if (state.bar && value !== undefined) {
232
+ state.bar.style = {
233
+ width: Math.min(100, Math.max(0, value / max * 100)) + '%',
234
+ ...state.bar.style
235
+ };
236
+ }
237
+ return state;
238
+ }; //# sourceMappingURL=useProgressBarStyles.js.map
239
+
142
240
  //# sourceMappingURL=useProgressBarStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["react_1","require","react_theme_1","exports","progressBarClassNames","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","useProgressBarStyles_unstable","state","color","max","shape","thickness","value","rootStyles","barStyles","className","mergeClasses","undefined","style","width","Math","min"],"sources":["../../../../../../../../../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 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,MAAAA,OAAA,gBAAAC,OAAA;AACA,MAAAC,aAAA,gBAAAD,OAAA;AAIaE,OAAA,CAAAC,qBAAqB,GAA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,CAACX,GAAG,CAAC,CAAC,EAAGG,KAAK,GAAGH,GAAG,GAAI,GAAG,CAAC,CAAC,GAAG,GAAG;MAC5D,GAAGF,KAAK,CAAC9C,GAAG,CAACyD;KACd;;EAGH,OAAOX,KAAK;AACd,CAAC;AAjCYjD,OAAA,CAAAgD,6BAA6B,GAAAA,6BAAA"}
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":";;;;;;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