@fluentui/react-progress 9.1.4 → 9.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +73 -1
  3. package/CHANGELOG.md +27 -2
  4. package/lib/ProgressBar.js.map +1 -1
  5. package/lib/ProgressField.js.map +1 -1
  6. package/lib/components/ProgressBar/ProgressBar.js.map +1 -1
  7. package/lib/components/ProgressBar/ProgressBar.types.js.map +1 -1
  8. package/lib/components/ProgressBar/index.js.map +1 -1
  9. package/lib/components/ProgressBar/renderProgressBar.js +1 -5
  10. package/lib/components/ProgressBar/renderProgressBar.js.map +1 -1
  11. package/lib/components/ProgressBar/useProgressBar.js +3 -2
  12. package/lib/components/ProgressBar/useProgressBar.js.map +1 -1
  13. package/lib/components/ProgressBar/useProgressBarStyles.js +1 -2
  14. package/lib/components/ProgressBar/useProgressBarStyles.js.map +1 -1
  15. package/lib/components/ProgressField/ProgressField.js +1 -2
  16. package/lib/components/ProgressField/ProgressField.js.map +1 -1
  17. package/lib/components/ProgressField/index.js.map +1 -1
  18. package/lib/index.js.map +1 -1
  19. package/lib/utils/clampMax.js.map +1 -1
  20. package/lib/utils/clampValue.js.map +1 -1
  21. package/lib/utils/index.js.map +1 -1
  22. package/lib-commonjs/ProgressBar.js +5 -4
  23. package/lib-commonjs/ProgressBar.js.map +1 -1
  24. package/lib-commonjs/ProgressField.js +5 -4
  25. package/lib-commonjs/ProgressField.js.map +1 -1
  26. package/lib-commonjs/components/ProgressBar/ProgressBar.js +19 -20
  27. package/lib-commonjs/components/ProgressBar/ProgressBar.js.map +1 -1
  28. package/lib-commonjs/components/ProgressBar/ProgressBar.types.js +3 -2
  29. package/lib-commonjs/components/ProgressBar/ProgressBar.types.js.map +1 -1
  30. package/lib-commonjs/components/ProgressBar/index.js +9 -8
  31. package/lib-commonjs/components/ProgressBar/index.js.map +1 -1
  32. package/lib-commonjs/components/ProgressBar/renderProgressBar.js +13 -20
  33. package/lib-commonjs/components/ProgressBar/renderProgressBar.js.map +1 -1
  34. package/lib-commonjs/components/ProgressBar/useProgressBar.js +42 -51
  35. package/lib-commonjs/components/ProgressBar/useProgressBar.js.map +1 -1
  36. package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js +220 -122
  37. package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js.map +1 -1
  38. package/lib-commonjs/components/ProgressField/ProgressField.js +25 -19
  39. package/lib-commonjs/components/ProgressField/ProgressField.js.map +1 -1
  40. package/lib-commonjs/components/ProgressField/index.js +5 -4
  41. package/lib-commonjs/components/ProgressField/index.js.map +1 -1
  42. package/lib-commonjs/index.js +21 -49
  43. package/lib-commonjs/index.js.map +1 -1
  44. package/lib-commonjs/utils/clampMax.js +15 -13
  45. package/lib-commonjs/utils/clampMax.js.map +1 -1
  46. package/lib-commonjs/utils/clampValue.js +21 -19
  47. package/lib-commonjs/utils/clampValue.js.map +1 -1
  48. package/lib-commonjs/utils/index.js +6 -5
  49. package/lib-commonjs/utils/index.js.map +1 -1
  50. package/package.json +9 -8
  51. package/lib-amd/ProgressBar.js +0 -6
  52. package/lib-amd/ProgressBar.js.map +0 -1
  53. package/lib-amd/ProgressField.js +0 -6
  54. package/lib-amd/ProgressField.js.map +0 -1
  55. package/lib-amd/components/ProgressBar/ProgressBar.js +0 -17
  56. package/lib-amd/components/ProgressBar/ProgressBar.js.map +0 -1
  57. package/lib-amd/components/ProgressBar/ProgressBar.types.js +0 -5
  58. package/lib-amd/components/ProgressBar/ProgressBar.types.js.map +0 -1
  59. package/lib-amd/components/ProgressBar/index.js +0 -10
  60. package/lib-amd/components/ProgressBar/index.js.map +0 -1
  61. package/lib-amd/components/ProgressBar/renderProgressBar.js +0 -14
  62. package/lib-amd/components/ProgressBar/renderProgressBar.js.map +0 -1
  63. package/lib-amd/components/ProgressBar/useProgressBar.js +0 -41
  64. package/lib-amd/components/ProgressBar/useProgressBar.js.map +0 -1
  65. package/lib-amd/components/ProgressBar/useProgressBarStyles.js +0 -96
  66. package/lib-amd/components/ProgressBar/useProgressBarStyles.js.map +0 -1
  67. package/lib-amd/components/ProgressField/ProgressField.js +0 -13
  68. package/lib-amd/components/ProgressField/ProgressField.js.map +0 -1
  69. package/lib-amd/components/ProgressField/index.js +0 -6
  70. package/lib-amd/components/ProgressField/index.js.map +0 -1
  71. package/lib-amd/index.js +0 -13
  72. package/lib-amd/index.js.map +0 -1
  73. package/lib-amd/utils/clampMax.js +0 -17
  74. package/lib-amd/utils/clampMax.js.map +0 -1
  75. package/lib-amd/utils/clampValue.js +0 -24
  76. package/lib-amd/utils/clampValue.js.map +0 -1
  77. package/lib-amd/utils/index.js +0 -7
  78. package/lib-amd/utils/index.js.map +0 -1
package/.swcrc ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/swcrc",
3
+ "exclude": [
4
+ "/testing",
5
+ "/**/*.cy.ts",
6
+ "/**/*.cy.tsx",
7
+ "/**/*.spec.ts",
8
+ "/**/*.spec.tsx",
9
+ "/**/*.test.ts",
10
+ "/**/*.test.tsx"
11
+ ],
12
+ "jsc": {
13
+ "parser": {
14
+ "syntax": "typescript",
15
+ "tsx": true,
16
+ "decorators": false,
17
+ "dynamicImport": false
18
+ },
19
+ "externalHelpers": true,
20
+ "transform": {
21
+ "react": {
22
+ "runtime": "classic",
23
+ "useSpread": true
24
+ }
25
+ },
26
+ "target": "es2019"
27
+ },
28
+ "minify": false,
29
+ "sourceMaps": true
30
+ }
package/CHANGELOG.json CHANGED
@@ -2,7 +2,79 @@
2
2
  "name": "@fluentui/react-progress",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 16 Mar 2023 14:33:33 GMT",
5
+ "date": "Thu, 23 Mar 2023 12:28:45 GMT",
6
+ "tag": "@fluentui/react-progress_v9.1.6",
7
+ "version": "9.1.6",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@fluentui/react-progress",
13
+ "comment": "Bump @fluentui/react-field to v9.0.0-alpha.28",
14
+ "commit": "be0ca69899300abe3c8478c435e0f6837138479b"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-progress",
19
+ "comment": "Bump @fluentui/react-shared-contexts to v9.3.3",
20
+ "commit": "be0ca69899300abe3c8478c435e0f6837138479b"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "date": "Tue, 21 Mar 2023 21:23:46 GMT",
27
+ "tag": "@fluentui/react-progress_v9.1.5",
28
+ "version": "9.1.5",
29
+ "comments": {
30
+ "patch": [
31
+ {
32
+ "author": "tristan.watanabe@gmail.com",
33
+ "package": "@fluentui/react-progress",
34
+ "commit": "2fac1a139149bd13b76b1306207bc988dca9c72c",
35
+ "comment": "chore: migrate to swc transpilation approach."
36
+ },
37
+ {
38
+ "author": "tristan.watanabe@gmail.com",
39
+ "package": "@fluentui/react-progress",
40
+ "commit": "ead1c6d4c2ac3f3596b62b8cbc07b0a03041f11f",
41
+ "comment": "fix: add node field to package.json exports map."
42
+ },
43
+ {
44
+ "author": "beachball",
45
+ "package": "@fluentui/react-progress",
46
+ "comment": "Bump @fluentui/react-field to v9.0.0-alpha.27",
47
+ "commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
48
+ },
49
+ {
50
+ "author": "beachball",
51
+ "package": "@fluentui/react-progress",
52
+ "comment": "Bump @fluentui/react-shared-contexts to v9.3.2",
53
+ "commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
54
+ },
55
+ {
56
+ "author": "beachball",
57
+ "package": "@fluentui/react-progress",
58
+ "comment": "Bump @fluentui/react-theme to v9.1.7",
59
+ "commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
60
+ },
61
+ {
62
+ "author": "beachball",
63
+ "package": "@fluentui/react-progress",
64
+ "comment": "Bump @fluentui/react-utilities to v9.7.2",
65
+ "commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
66
+ },
67
+ {
68
+ "author": "beachball",
69
+ "package": "@fluentui/react-progress",
70
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.20",
71
+ "commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
72
+ }
73
+ ]
74
+ }
75
+ },
76
+ {
77
+ "date": "Thu, 16 Mar 2023 14:36:59 GMT",
6
78
  "tag": "@fluentui/react-progress_v9.1.4",
7
79
  "version": "9.1.4",
8
80
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,37 @@
1
1
  # Change Log - @fluentui/react-progress
2
2
 
3
- This log was last generated on Thu, 16 Mar 2023 14:33:33 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 23 Mar 2023 12:28:45 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.1.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.6)
8
+
9
+ Thu, 23 Mar 2023 12:28:45 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.5..@fluentui/react-progress_v9.1.6)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-field to v9.0.0-alpha.28 ([PR #27286](https://github.com/microsoft/fluentui/pull/27286) by beachball)
15
+ - Bump @fluentui/react-shared-contexts to v9.3.3 ([PR #27286](https://github.com/microsoft/fluentui/pull/27286) by beachball)
16
+
17
+ ## [9.1.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.5)
18
+
19
+ Tue, 21 Mar 2023 21:23:46 GMT
20
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.4..@fluentui/react-progress_v9.1.5)
21
+
22
+ ### Patches
23
+
24
+ - chore: migrate to swc transpilation approach. ([PR #27250](https://github.com/microsoft/fluentui/pull/27250) by tristan.watanabe@gmail.com)
25
+ - fix: add node field to package.json exports map. ([PR #27154](https://github.com/microsoft/fluentui/pull/27154) by tristan.watanabe@gmail.com)
26
+ - Bump @fluentui/react-field to v9.0.0-alpha.27 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
27
+ - Bump @fluentui/react-shared-contexts to v9.3.2 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
28
+ - Bump @fluentui/react-theme to v9.1.7 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
29
+ - Bump @fluentui/react-utilities to v9.7.2 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
30
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.20 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
31
+
7
32
  ## [9.1.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.4)
8
33
 
9
- Thu, 16 Mar 2023 14:33:33 GMT
34
+ Thu, 16 Mar 2023 14:36:59 GMT
10
35
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.3..@fluentui/react-progress_v9.1.4)
11
36
 
12
37
  ### Patches
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressBar.js","sourceRoot":"../src/","sources":["packages/react-components/react-progress/src/ProgressBar.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC","sourcesContent":["export * from './components/ProgressBar/index';\n"]}
1
+ {"version":3,"names":[],"sources":["../src/ProgressBar.ts"],"sourcesContent":["export * from './components/ProgressBar/index';\n"],"mappings":"AAAA,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressField.js","sourceRoot":"../src/","sources":["packages/react-components/react-progress/src/ProgressField.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './components/ProgressField/index';\n"]}
1
+ {"version":3,"names":[],"sources":["../src/ProgressField.ts"],"sourcesContent":["export * from './components/ProgressField/index';\n"],"mappings":"AAAA,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","useProgressBar_unstable","renderProgressBar_unstable","useProgressBarStyles_unstable","useCustomStyleHooks_unstable","ProgressBar","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../src/packages/react-components/react-progress/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 { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * A ProgressBar bar shows the progression of a task.\n */\nexport const ProgressBar: ForwardRefComponent<ProgressBarProps> = React.forwardRef((props, ref) => {\n const state = useProgressBar_unstable(props, ref);\n\n useProgressBarStyles_unstable(state);\n\n const { useProgressBarStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderProgressBar_unstable(state);\n});\n\nProgressBar.displayName = 'ProgressBar';\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,uBAAuB,QAAQ,kBAAkB;AAC1D,SAASC,0BAA0B,QAAQ,qBAAqB;AAChE,SAASC,6BAA6B,QAAQ,wBAAwB;AAGtE,SAASC,4BAA4B,QAAQ,iCAAiC;AAE9E;;;AAGA,OAAO,MAAMC,WAAW,gBAA0CL,KAAK,CAACM,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAChG,MAAMC,KAAK,GAAGR,uBAAuB,CAACM,KAAK,EAAEC,GAAG,CAAC;EAEjDL,6BAA6B,CAACM,KAAK,CAAC;EAEpC,MAAM;IAAEN,6BAA6B,EAAEO;EAAe,CAAE,GAAGN,4BAA4B,EAAE;EACzFM,eAAe,CAACD,KAAK,CAAC;EAEtB,OAAOP,0BAA0B,CAACO,KAAK,CAAC;AAC1C,CAAC,CAAC;AAEFJ,WAAW,CAACM,WAAW,GAAG,aAAa"}
1
+ {"version":3,"names":["React","useProgressBar_unstable","renderProgressBar_unstable","useProgressBarStyles_unstable","useCustomStyleHooks_unstable","ProgressBar","forwardRef","props","ref","state","useCustomStyles","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 { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * A ProgressBar bar shows the progression of a task.\n */\nexport const ProgressBar: ForwardRefComponent<ProgressBarProps> = React.forwardRef((props, ref) => {\n const state = useProgressBar_unstable(props, ref);\n\n useProgressBarStyles_unstable(state);\n\n const { useProgressBarStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderProgressBar_unstable(state);\n});\n\nProgressBar.displayName = 'ProgressBar';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,uBAAuB,QAAQ;AACxC,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,6BAA6B,QAAQ;AAG9C,SAASC,4BAA4B,QAAQ;AAE7C;;;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;EAE9B,MAAM;IAAEN,6BAAA,EAA+BO;EAAe,CAAE,GAAGN,4BAAA;EAC3DM,eAAA,CAAgBD,KAAA;EAEhB,OAAOP,0BAAA,CAA2BO,KAAA;AACpC;AAEAJ,WAAA,CAAYM,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressBar.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-progress/src/components/ProgressBar/ProgressBar.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type ProgressBarSlots = {\n /**\n * The track behind the ProgressBar bar\n */\n root: NonNullable<Slot<'div'>>;\n /**\n * The filled portion of the ProgressBar bar. Animated in the indeterminate state, when no value is provided.\n */\n bar?: NonNullable<Slot<'div'>>;\n};\n\n/**\n * ProgressBar Props\n */\nexport type ProgressBarProps = Omit<ComponentProps<ProgressBarSlots>, 'size'> & {\n /**\n * The shape of the bar and track.\n * @default rounded\n */\n shape?: 'rounded' | 'square';\n /**\n * A decimal number between `0` and `1` (or between `0` and `max` if given),\n * which specifies how much of the task has been completed.\n *\n * If `undefined` (default), the ProgressBar will display an **indeterminate** state.\n */\n value?: number;\n /**\n * The maximum value, which indicates the task is complete.\n * The ProgressBar bar will be full when `value` equals `max`.\n * @default 1\n */\n max?: number;\n /**\n * The thickness of the ProgressBar bar\n * @default medium\n */\n thickness?: 'medium' | 'large';\n\n /**\n * The status of the ProgressBar bar. Changes the color of the bar.\n * @default brand\n */\n color?: 'brand' | 'success' | 'warning' | 'error';\n};\n\n/**\n * State used in rendering ProgressBar\n */\nexport type ProgressBarState = ComponentState<ProgressBarSlots> &\n Required<Pick<ProgressBarProps, 'max' | 'shape' | 'thickness'>> &\n Pick<ProgressBarProps, 'value' | 'color'>;\n"]}
1
+ {"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 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-progress/src/components/ProgressBar/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC","sourcesContent":["export * from './ProgressBar';\nexport * from './ProgressBar.types';\nexport * from './renderProgressBar';\nexport * from './useProgressBar';\nexport * from './useProgressBarStyles';\n"]}
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"}
@@ -8,10 +8,6 @@ export const renderProgressBar_unstable = state => {
8
8
  slots,
9
9
  slotProps
10
10
  } = getSlots(state);
11
- return /*#__PURE__*/React.createElement(slots.root, {
12
- ...slotProps.root
13
- }, slots.bar && /*#__PURE__*/React.createElement(slots.bar, {
14
- ...slotProps.bar
15
- }));
11
+ return /*#__PURE__*/React.createElement(slots.root, slotProps.root, slots.bar && /*#__PURE__*/React.createElement(slots.bar, slotProps.bar));
16
12
  };
17
13
  //# sourceMappingURL=renderProgressBar.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","getSlots","renderProgressBar_unstable","state","slots","slotProps","createElement","root","bar"],"sources":["../src/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,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,0BAA0B,GAAIC,KAAuB,IAAI;EACpE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAmBE,KAAK,CAAC;EAC9D,oBAAOH,KAAA,CAAAM,aAAA,CAACF,KAAK,CAACG,IAAI;IAAA,GAAKF,SAAS,CAACE;EAAI,GAAGH,KAAK,CAACI,GAAG,iBAAIR,KAAA,CAAAM,aAAA,CAACF,KAAK,CAACI,GAAG;IAAA,GAAKH,SAAS,CAACG;EAAG,EAAI,CAAc;AACrG,CAAC"}
1
+ {"version":3,"names":["React","getSlots","renderProgressBar_unstable","state","slots","slotProps","createElement","root","bar"],"sources":["../../../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,YAAYA,KAAA,MAAW;AACvB,SAASC,QAAQ,QAAQ;AAGzB;;;AAGA,OAAO,MAAMC,0BAAA,GAA8BC,KAAA,IAA4B;EACrE,MAAM;IAAEC,KAAA;IAAOC;EAAS,CAAE,GAAGJ,QAAA,CAA2BE,KAAA;EACxD,oBAAOH,KAAA,CAAAM,aAAA,CAACF,KAAA,CAAMG,IAAI,EAAKF,SAAA,CAAUE,IAAI,EAAGH,KAAA,CAAMI,GAAG,iBAAIR,KAAA,CAAAM,aAAA,CAACF,KAAA,CAAMI,GAAG,EAAKH,SAAA,CAAUG,GAAG;AACnF"}
@@ -1,3 +1,4 @@
1
+ import * as React from 'react';
1
2
  import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';
2
3
  import { clampValue, clampMax } from '../../utils/index';
3
4
  /**
@@ -10,14 +11,14 @@ import { clampValue, clampMax } from '../../utils/index';
10
11
  * @param ref - reference to root HTMLElement of ProgressBar
11
12
  */
12
13
  export const useProgressBar_unstable = (props, ref) => {
13
- var _a;
14
14
  // Props
15
15
  const {
16
16
  color = 'brand',
17
17
  shape = 'rounded',
18
18
  thickness = 'medium'
19
19
  } = props;
20
- const max = clampMax((_a = props.max) !== null && _a !== void 0 ? _a : 1);
20
+ var _props_max;
21
+ const max = clampMax((_props_max = props.max) !== null && _props_max !== void 0 ? _props_max : 1);
21
22
  const value = clampValue(props.value, max);
22
23
  const root = getNativeElementProps('div', {
23
24
  ref,
@@ -1 +1 @@
1
- {"version":3,"names":["getNativeElementProps","resolveShorthand","clampValue","clampMax","useProgressBar_unstable","props","ref","color","shape","thickness","max","_a","value","root","role","undefined","bar","required","state","components"],"sources":["../src/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,SAASA,qBAAqB,EAAEC,gBAAgB,QAAQ,2BAA2B;AACnF,SAASC,UAAU,EAAEC,QAAQ,QAAQ,mBAAmB;AAGxD;;;;;;;;;AASA,OAAO,MAAMC,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,QAAQ,CAAC,CAAAQ,EAAA,GAAAN,KAAK,CAACK,GAAG,cAAAC,EAAA,cAAAA,EAAA,GAAI,CAAC,CAAC;EACpC,MAAMC,KAAK,GAAGV,UAAU,CAACG,KAAK,CAACO,KAAK,EAAEF,GAAG,CAAC;EAE1C,MAAMG,IAAI,GAAGb,qBAAqB,CAAC,KAAK,EAAE;IACxCM,GAAG;IACHQ,IAAI,EAAE,aAAa;IACnB,eAAe,EAAEF,KAAK,KAAKG,SAAS,GAAG,CAAC,GAAGA,SAAS;IACpD,eAAe,EAAEH,KAAK,KAAKG,SAAS,GAAGL,GAAG,GAAGK,SAAS;IACtD,eAAe,EAAEH,KAAK;IACtB,GAAGP;GACJ,CAAC;EAEF,MAAMW,GAAG,GAAGf,gBAAgB,CAACI,KAAK,CAACW,GAAG,EAAE;IACtCC,QAAQ,EAAE;GACX,CAAC;EAEF,MAAMC,KAAK,GAAqB;IAC9BX,KAAK;IACLG,GAAG;IACHF,KAAK;IACLC,SAAS;IACTG,KAAK;IACLO,UAAU,EAAE;MACVN,IAAI,EAAE,KAAK;MACXG,GAAG,EAAE;KACN;IACDH,IAAI;IACJG;GACD;EAED,OAAOE,KAAK;AACd,CAAC"}
1
+ {"version":3,"names":["React","getNativeElementProps","resolveShorthand","clampValue","clampMax","useProgressBar_unstable","props","ref","color","shape","thickness","_props_max","max","value","root","role","undefined","bar","required","state","components"],"sources":["../../../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":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,qBAAqB,EAAEC,gBAAgB,QAAQ;AACxD,SAASC,UAAU,EAAEC,QAAQ,QAAQ;AAGrC;;;;;;;;;AASA,OAAO,MAAMC,uBAAA,GAA0BA,CAACC,KAAA,EAAyBC,GAAA,KAAkD;EACjH;EACA,MAAM;IAAEC,KAAA,GAAQ;IAASC,KAAA,GAAQ;IAAWC,SAAA,GAAY;EAAQ,CAAE,GAAGJ,KAAA;MAChDK,UAAA;EAArB,MAAMC,GAAA,GAAMR,QAAA,CAAS,CAAAO,UAAA,GAAAL,KAAA,CAAMM,GAAG,cAATD,UAAA,cAAAA,UAAA,GAAa,CAAC;EACnC,MAAME,KAAA,GAAQV,UAAA,CAAWG,KAAA,CAAMO,KAAK,EAAED,GAAA;EAEtC,MAAME,IAAA,GAAOb,qBAAA,CAAsB,OAAO;IACxCM,GAAA;IACAQ,IAAA,EAAM;IACN,iBAAiBF,KAAA,KAAUG,SAAA,GAAY,IAAIA,SAAS;IACpD,iBAAiBH,KAAA,KAAUG,SAAA,GAAYJ,GAAA,GAAMI,SAAS;IACtD,iBAAiBH,KAAA;IACjB,GAAGP;EACL;EAEA,MAAMW,GAAA,GAAMf,gBAAA,CAAiBI,KAAA,CAAMW,GAAG,EAAE;IACtCC,QAAA,EAAU;EACZ;EAEA,MAAMC,KAAA,GAA0B;IAC9BX,KAAA;IACAI,GAAA;IACAH,KAAA;IACAC,SAAA;IACAG,KAAA;IACAO,UAAA,EAAY;MACVN,IAAA,EAAM;MACNG,GAAA,EAAK;IACP;IACAH,IAAA;IACAG;EACF;EAEA,OAAOE,KAAA;AACT"}
@@ -13,9 +13,8 @@ const barThicknessValues = {
13
13
  };
14
14
  const indeterminateProgressBar = {
15
15
  '0%': {
16
- left: '-33%' // matches indeterminate bar width
16
+ left: '-33%'
17
17
  },
18
-
19
18
  '100%': {
20
19
  left: '100%'
21
20
  }
@@ -1 +1 @@
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/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,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,QAAQ,uBAAuB;AAI9C,OAAO,MAAMC,qBAAqB,GAAqC;EACrEC,IAAI,EAAE,iBAAiB;EACvBC,GAAG,EAAE;CACN;AAED;AACA;AACA,MAAMC,cAAc,GAAG,IAAI;AAE3B,MAAMC,kBAAkB,GAAG;EACzBC,MAAM,EAAE,KAAK;EACbC,KAAK,EAAE;CACR;AAED,MAAMC,wBAAwB,GAAG;EAC/B,IAAI,EAAE;IACJC,IAAI,EAAE,MAAM,CAAE;GACf;;EACD,MAAM,EAAE;IACNA,IAAI,EAAE;;CAET;AAED;;;AAGA,MAAMC,aAAa,gBAAGb,QAAA;EAAAK,IAAA;IAAAS,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAC,MAAA;IAAAJ,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAf,MAAA;IAAAiB,OAAA;EAAA;EAAAhB,KAAA;IAAAgB,OAAA;EAAA;AAAA;EAAAC,CAAA;EAAAC,CAAA;IAAAA,CAAA;EAAA;AAAA,EAuBpB;AAEF;;;AAGA,MAAMC,YAAY,gBAAG7B,QAAA;EAAA8B,IAAA;IAAAX,OAAA;IAAAE,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAE,OAAA;EAAA;EAAAK,kBAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAC,aAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAC,KAAA;IAAA9B,MAAA;EAAA;EAAA+B,KAAA;IAAA/B,MAAA;EAAA;EAAAgC,OAAA;IAAAhC,MAAA;EAAA;EAAAiC,OAAA;IAAAjC,MAAA;EAAA;AAAA;EAAAa,CAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;EAAAD,CAAA;EAAAsB,CAAA;AAAA,EA6CnB;AAEF;;;AAGA,OAAO,MAAMC,6BAA6B,GAAIC,KAAuB,IAAsB;EACzF,MAAM;IAAEC,KAAK;IAAEC,GAAG;IAAEC,KAAK;IAAEC,SAAS;IAAEC;EAAK,CAAE,GAAGL,KAAK;EACrD,MAAMM,UAAU,GAAG5C,aAAa,EAAE;EAClC,MAAM6C,SAAS,GAAG7B,YAAY,EAAE;EAEhCsB,KAAK,CAAC9C,IAAI,CAACsD,SAAS,GAAG1D,YAAY,CACjCG,qBAAqB,CAACC,IAAI,EAC1BoD,UAAU,CAACpD,IAAI,EACfoD,UAAU,CAACH,KAAK,CAAC,EACjBG,UAAU,CAACF,SAAS,CAAC,EACrBJ,KAAK,CAAC9C,IAAI,CAACsD,SAAS,CACrB;EAED,IAAIR,KAAK,CAAC7C,GAAG,EAAE;IACb6C,KAAK,CAAC7C,GAAG,CAACqD,SAAS,GAAG1D,YAAY,CAChCG,qBAAqB,CAACE,GAAG,EACzBoD,SAAS,CAAC5B,IAAI,EACd4B,SAAS,CAACb,KAAK,EACfW,KAAK,KAAKI,SAAS,IAAIF,SAAS,CAACvB,aAAa,EAC9CqB,KAAK,KAAKI,SAAS,IAAIJ,KAAK,GAAGjD,cAAc,IAAImD,SAAS,CAAC3B,kBAAkB,EAC7EqB,KAAK,IAAII,KAAK,KAAKI,SAAS,IAAIF,SAAS,CAACN,KAAK,CAAC,EAChDD,KAAK,CAAC7C,GAAG,CAACqD,SAAS,CACpB;;EAGH,IAAIR,KAAK,CAAC7C,GAAG,IAAIkD,KAAK,KAAKI,SAAS,EAAE;IACpCT,KAAK,CAAC7C,GAAG,CAACuD,KAAK,GAAG;MAChBC,KAAK,EAAEC,IAAI,CAACC,GAAG,CAAC,GAAG,EAAED,IAAI,CAACV,GAAG,CAAC,CAAC,EAAGG,KAAK,GAAGH,GAAG,GAAI,GAAG,CAAC,CAAC,GAAG,GAAG;MAC5D,GAAGF,KAAK,CAAC7C,GAAG,CAACuD;KACd;;EAGH,OAAOV,KAAK;AACd,CAAC"}
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":"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"}
@@ -1,5 +1,4 @@
1
- /* eslint-disable deprecation/deprecation */
2
- import { getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';
1
+ /* eslint-disable deprecation/deprecation */import { getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';
3
2
  import { ProgressBar, progressBarClassNames } from '../../ProgressBar';
4
3
  /** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */
5
4
  export const progressFieldClassNames = /*#__PURE__*/getDeprecatedFieldClassNames(progressBarClassNames.root);
@@ -1 +1 @@
1
- {"version":3,"names":["getDeprecatedFieldClassNames","makeDeprecatedField","ProgressBar","progressBarClassNames","progressFieldClassNames","root","ProgressField","displayName","mapProps","props","control","validationState"],"sources":["../src/packages/react-components/react-progress/src/components/ProgressField/ProgressField.tsx"],"sourcesContent":["/* eslint-disable deprecation/deprecation */\nimport { DeprecatedFieldProps, getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { ProgressBar, progressBarClassNames, ProgressBarProps } from '../../ProgressBar';\n\n/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */\nexport type ProgressFieldProps = DeprecatedFieldProps<ProgressBarProps>;\n/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */\nexport const progressFieldClassNames = getDeprecatedFieldClassNames(progressBarClassNames.root);\n/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */\nexport const ProgressField: ForwardRefComponent<ProgressFieldProps> = makeDeprecatedField(ProgressBar, {\n displayName: 'ProgressField',\n mapProps: (props: ProgressFieldProps) => ({\n ...props,\n control: { ...props.control, validationState: props.validationState },\n }),\n});\n"],"mappings":"AAAA;AACA,SAA+BA,4BAA4B,EAAEC,mBAAmB,QAAQ,uBAAuB;AAE/G,SAASC,WAAW,EAAEC,qBAAqB,QAA0B,mBAAmB;AAIxF;AACA,OAAO,MAAMC,uBAAuB,gBAAGJ,4BAA4B,CAACG,qBAAqB,CAACE,IAAI,CAAC;AAC/F;AACA,OAAO,MAAMC,aAAa,gBAA4CL,mBAAmB,CAACC,WAAW,EAAE;EACrGK,WAAW,EAAE,eAAe;EAC5BC,QAAQ,EAAGC,KAAyB,KAAM;IACxC,GAAGA,KAAK;IACRC,OAAO,EAAE;MAAE,GAAGD,KAAK,CAACC,OAAO;MAAEC,eAAe,EAAEF,KAAK,CAACE;IAAe;GACpE;CACF,CAAC"}
1
+ {"version":3,"names":["getDeprecatedFieldClassNames","makeDeprecatedField","ProgressBar","progressBarClassNames","progressFieldClassNames","root","ProgressField","displayName","mapProps","props","control","validationState"],"sources":["../../../src/components/ProgressField/ProgressField.tsx"],"sourcesContent":["/* eslint-disable deprecation/deprecation */\nimport { DeprecatedFieldProps, getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { ProgressBar, progressBarClassNames, ProgressBarProps } from '../../ProgressBar';\n\n/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */\nexport type ProgressFieldProps = DeprecatedFieldProps<ProgressBarProps>;\n/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */\nexport const progressFieldClassNames = getDeprecatedFieldClassNames(progressBarClassNames.root);\n/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */\nexport const ProgressField: ForwardRefComponent<ProgressFieldProps> = makeDeprecatedField(ProgressBar, {\n displayName: 'ProgressField',\n mapProps: (props: ProgressFieldProps) => ({\n ...props,\n control: { ...props.control, validationState: props.validationState },\n }),\n});\n"],"mappings":"AAAA,4CACA,SAA+BA,4BAA4B,EAAEC,mBAAmB,QAAQ;AAExF,SAASC,WAAW,EAAEC,qBAAqB,QAA0B;AAIrE;AACA,OAAO,MAAMC,uBAAA,gBAA0BJ,4BAAA,CAA6BG,qBAAA,CAAsBE,IAAI;AAC9F;AACA,OAAO,MAAMC,aAAA,gBAAyDL,mBAAA,CAAoBC,WAAA,EAAa;EACrGK,WAAA,EAAa;EACbC,QAAA,EAAWC,KAAA,KAA+B;IACxC,GAAGA,KAAK;IACRC,OAAA,EAAS;MAAE,GAAGD,KAAA,CAAMC,OAAO;MAAEC,eAAA,EAAiBF,KAAA,CAAME;IAAgB;EACtE;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-progress/src/components/ProgressField/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC","sourcesContent":["export * from './ProgressField';\n"]}
1
+ {"version":3,"names":[],"sources":["../../../src/components/ProgressField/index.ts"],"sourcesContent":["export * from './ProgressField';\n"],"mappings":"AAAA,cAAc"}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["ProgressBar","progressBarClassNames","renderProgressBar_unstable","useProgressBar_unstable","useProgressBarStyles_unstable","ProgressField","ProgressField_unstable","progressFieldClassNames"],"sources":["../src/packages/react-components/react-progress/src/index.ts"],"sourcesContent":["export {\n ProgressBar,\n progressBarClassNames,\n renderProgressBar_unstable,\n useProgressBar_unstable,\n useProgressBarStyles_unstable,\n} from './ProgressBar';\nexport type { ProgressBarProps, ProgressBarSlots, ProgressBarState } from './ProgressBar';\n\n// eslint-disable-next-line deprecation/deprecation\nexport { ProgressField as ProgressField_unstable, progressFieldClassNames } from './ProgressField';\n// eslint-disable-next-line deprecation/deprecation\nexport type { ProgressFieldProps as ProgressFieldProps_unstable } from './ProgressField';\n"],"mappings":"AAAA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,uBAAuB,EACvBC,6BAA6B,QACxB,eAAe;AAGtB;AACA,SAASC,aAAa,IAAIC,sBAAsB,EAAEC,uBAAuB,QAAQ,iBAAiB"}
1
+ {"version":3,"names":["ProgressBar","progressBarClassNames","renderProgressBar_unstable","useProgressBar_unstable","useProgressBarStyles_unstable","ProgressField","ProgressField_unstable","progressFieldClassNames"],"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\n// eslint-disable-next-line deprecation/deprecation\nexport { ProgressField as ProgressField_unstable, progressFieldClassNames } from './ProgressField';\n// eslint-disable-next-line deprecation/deprecation\nexport type { ProgressFieldProps as ProgressFieldProps_unstable } from './ProgressField';\n"],"mappings":"AAAA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,uBAAuB,EACvBC,6BAA6B,QACxB;AAGP;AACA,SAASC,aAAA,IAAiBC,sBAAsB,EAAEC,uBAAuB,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"names":["clampMax","max","internalMax","process","env","NODE_ENV","console","error"],"sources":["../src/packages/react-components/react-progress/src/utils/clampMax.ts"],"sourcesContent":["export const clampMax = (max: number): number => {\n const internalMax = max <= 0 ? 1 : max;\n\n if (process.env.NODE_ENV !== 'production') {\n if (max <= 0) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'max' must be greater than 0. Received max: ${max}`);\n }\n }\n return internalMax;\n};\n"],"mappings":"AAAA,OAAO,MAAMA,QAAQ,GAAIC,GAAW,IAAY;EAC9C,MAAMC,WAAW,GAAGD,GAAG,IAAI,CAAC,GAAG,CAAC,GAAGA,GAAG;EAEtC,IAAIE,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;IACzC,IAAIJ,GAAG,IAAI,CAAC,EAAE;MACZ;MACAK,OAAO,CAACC,KAAK,CAAC,wDAAwDN,GAAG,EAAE,CAAC;;;EAGhF,OAAOC,WAAW;AACpB,CAAC"}
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 +1 @@
1
- {"version":3,"names":["clampValue","value","max","undefined","internalValue","process","env","NODE_ENV","console","error"],"sources":["../src/packages/react-components/react-progress/src/utils/clampValue.ts"],"sourcesContent":["export const clampValue = (value: number | undefined, max: number): number | undefined => {\n if (value === undefined) {\n return value;\n }\n const internalValue = value < 0 ? 0 : value > max ? max : value;\n\n if (process.env.NODE_ENV !== 'production') {\n if (value < 0) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'value' must be greater than or equal to zero. Received value: ${value}`);\n }\n if (value > max) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'value' must be less than or equal to 'max'. Received value: ${value}, max: ${max}`);\n }\n }\n return internalValue;\n};\n"],"mappings":"AAAA,OAAO,MAAMA,UAAU,GAAGA,CAACC,KAAyB,EAAEC,GAAW,KAAwB;EACvF,IAAID,KAAK,KAAKE,SAAS,EAAE;IACvB,OAAOF,KAAK;;EAEd,MAAMG,aAAa,GAAGH,KAAK,GAAG,CAAC,GAAG,CAAC,GAAGA,KAAK,GAAGC,GAAG,GAAGA,GAAG,GAAGD,KAAK;EAE/D,IAAII,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;IACzC,IAAIN,KAAK,GAAG,CAAC,EAAE;MACb;MACAO,OAAO,CAACC,KAAK,CAAC,2EAA2ER,KAAK,EAAE,CAAC;;IAEnG,IAAIA,KAAK,GAAGC,GAAG,EAAE;MACf;MACAM,OAAO,CAACC,KAAK,CAAC,yEAAyER,KAAK,UAAUC,GAAG,EAAE,CAAC;;;EAGhH,OAAOE,aAAa;AACtB,CAAC"}
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 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-progress/src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC","sourcesContent":["export * from './clampMax';\nexport * from './clampValue';\n"]}
1
+ {"version":3,"names":[],"sources":["../../src/utils/index.ts"],"sourcesContent":["export * from './clampMax';\nexport * from './clampValue';\n"],"mappings":"AAAA,cAAc;AACd,cAAc"}
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./components/ProgressBar/index"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./components/ProgressBar/index"), exports);
7
+ //# sourceMappingURL=ProgressBar.js.map
8
+
8
9
  //# sourceMappingURL=ProgressBar.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-progress/src/ProgressBar.ts"],"sourcesContent":["export * from './components/ProgressBar/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,oCAAAC,OAAA"}
1
+ {"version":3,"sources":["../lib/ProgressBar.js"],"sourcesContent":["export * from './components/ProgressBar/index';\n//# sourceMappingURL=ProgressBar.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,uCAAuC"}
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./components/ProgressField/index"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./components/ProgressField/index"), exports);
7
+ //# sourceMappingURL=ProgressField.js.map
8
+
8
9
  //# sourceMappingURL=ProgressField.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-progress/src/ProgressField.ts"],"sourcesContent":["export * from './components/ProgressField/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,sCAAAC,OAAA"}
1
+ {"version":3,"sources":["../lib/ProgressField.js"],"sourcesContent":["export * from './components/ProgressField/index';\n//# sourceMappingURL=ProgressField.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,yCAAyC"}
@@ -1,25 +1,24 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "ProgressBar", {
6
+ enumerable: true,
7
+ get: ()=>ProgressBar
5
8
  });
6
- exports.ProgressBar = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const useProgressBar_1 = /*#__PURE__*/require("./useProgressBar");
9
- const renderProgressBar_1 = /*#__PURE__*/require("./renderProgressBar");
10
- const useProgressBarStyles_1 = /*#__PURE__*/require("./useProgressBarStyles");
11
- const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
12
- /**
13
- * A ProgressBar bar shows the progression of a task.
14
- */
15
- exports.ProgressBar = /*#__PURE__*/React.forwardRef((props, ref) => {
16
- const state = useProgressBar_1.useProgressBar_unstable(props, ref);
17
- useProgressBarStyles_1.useProgressBarStyles_unstable(state);
18
- const {
19
- useProgressBarStyles_unstable: useCustomStyles
20
- } = react_shared_contexts_1.useCustomStyleHooks_unstable();
21
- useCustomStyles(state);
22
- return renderProgressBar_1.renderProgressBar_unstable(state);
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _useProgressBar = require("./useProgressBar");
12
+ const _renderProgressBar = require("./renderProgressBar");
13
+ const _useProgressBarStyles = require("./useProgressBarStyles");
14
+ const _reactSharedContexts = require("@fluentui/react-shared-contexts");
15
+ const ProgressBar = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
16
+ const state = (0, _useProgressBar.useProgressBar_unstable)(props, ref);
17
+ (0, _useProgressBarStyles.useProgressBarStyles_unstable)(state);
18
+ const { useProgressBarStyles_unstable: useCustomStyles } = (0, _reactSharedContexts.useCustomStyleHooks_unstable)();
19
+ useCustomStyles(state);
20
+ return (0, _renderProgressBar.renderProgressBar_unstable)(state);
23
21
  });
24
- exports.ProgressBar.displayName = 'ProgressBar';
22
+ ProgressBar.displayName = 'ProgressBar'; //# sourceMappingURL=ProgressBar.js.map
23
+
25
24
  //# sourceMappingURL=ProgressBar.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","useProgressBar_1","renderProgressBar_1","useProgressBarStyles_1","react_shared_contexts_1","exports","ProgressBar","forwardRef","props","ref","state","useProgressBar_unstable","useProgressBarStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderProgressBar_unstable","displayName"],"sources":["../src/packages/react-components/react-progress/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 { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * A ProgressBar bar shows the progression of a task.\n */\nexport const ProgressBar: ForwardRefComponent<ProgressBarProps> = React.forwardRef((props, ref) => {\n const state = useProgressBar_unstable(props, ref);\n\n useProgressBarStyles_unstable(state);\n\n const { useProgressBarStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderProgressBar_unstable(state);\n});\n\nProgressBar.displayName = 'ProgressBar';\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,gBAAA,gBAAAD,OAAA;AACA,MAAAE,mBAAA,gBAAAF,OAAA;AACA,MAAAG,sBAAA,gBAAAH,OAAA;AAGA,MAAAI,uBAAA,gBAAAJ,OAAA;AAEA;;;AAGaK,OAAA,CAAAC,WAAW,gBAA0CP,KAAK,CAACQ,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAChG,MAAMC,KAAK,GAAGT,gBAAA,CAAAU,uBAAuB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAEjDN,sBAAA,CAAAS,6BAA6B,CAACF,KAAK,CAAC;EAEpC,MAAM;IAAEE,6BAA6B,EAAEC;EAAe,CAAE,GAAGT,uBAAA,CAAAU,4BAA4B,EAAE;EACzFD,eAAe,CAACH,KAAK,CAAC;EAEtB,OAAOR,mBAAA,CAAAa,0BAA0B,CAACL,KAAK,CAAC;AAC1C,CAAC,CAAC;AAEFL,OAAA,CAAAC,WAAW,CAACU,WAAW,GAAG,aAAa"}
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 { useCustomStyleHooks_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 const {\n useProgressBarStyles_unstable: useCustomStyles\n } = useCustomStyleHooks_unstable();\n useCustomStyles(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","useCustomStyles","useCustomStyleHooks_unstable","renderProgressBar_unstable","displayName"],"mappings":";;;;+BAQaA;;aAAAA;;;6DARU;gCACiB;mCACG;sCACG;qCACD;AAItC,MAAMA,cAAc,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACvE,MAAMC,QAAQC,IAAAA,uCAAuB,EAACH,OAAOC;IAC7CG,IAAAA,mDAA6B,EAACF;IAC9B,MAAM,EACJE,+BAA+BC,gBAAe,EAC/C,GAAGC,IAAAA,iDAA4B;IAChCD,gBAAgBH;IAChB,OAAOK,IAAAA,6CAA0B,EAACL;AACpC;AACAL,YAAYW,WAAW,GAAG,eAC1B,uCAAuC"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
5
+ //# sourceMappingURL=ProgressBar.types.js.map
6
+
6
7
  //# sourceMappingURL=ProgressBar.types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../src/packages/react-components/react-progress/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":""}
1
+ {"version":3,"sources":["../../../lib/components/ProgressBar/ProgressBar.types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=ProgressBar.types.js.map"],"names":[],"mappings":";;;;CACA,6CAA6C"}
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./ProgressBar"), exports);
8
- tslib_1.__exportStar(require("./ProgressBar.types"), exports);
9
- tslib_1.__exportStar(require("./renderProgressBar"), exports);
10
- tslib_1.__exportStar(require("./useProgressBar"), exports);
11
- tslib_1.__exportStar(require("./useProgressBarStyles"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./ProgressBar"), exports);
7
+ _exportStar(require("./ProgressBar.types"), exports);
8
+ _exportStar(require("./renderProgressBar"), exports);
9
+ _exportStar(require("./useProgressBar"), exports);
10
+ _exportStar(require("./useProgressBarStyles"), exports);
11
+ //# sourceMappingURL=index.js.map
12
+
12
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-progress/src/components/ProgressBar/index.ts"],"sourcesContent":["export * from './ProgressBar';\nexport * from './ProgressBar.types';\nexport * from './renderProgressBar';\nexport * from './useProgressBar';\nexport * from './useProgressBarStyles';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,mBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,yBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,yBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,sBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,4BAAAC,OAAA"}
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,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":["../src/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"}