@fluentui/react-progress 9.0.0-alpha.6 → 9.0.0-alpha.8

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 (62) hide show
  1. package/CHANGELOG.json +85 -1
  2. package/CHANGELOG.md +29 -2
  3. package/README.md +7 -7
  4. package/dist/index.d.ts +30 -30
  5. package/lib/ProgressBar.js +2 -0
  6. package/lib/ProgressBar.js.map +1 -0
  7. package/lib/components/ProgressBar/ProgressBar.js +15 -0
  8. package/lib/components/ProgressBar/ProgressBar.js.map +1 -0
  9. package/lib/components/ProgressBar/ProgressBar.types.js +2 -0
  10. package/lib/components/ProgressBar/ProgressBar.types.js.map +1 -0
  11. package/lib/components/ProgressBar/index.js +6 -0
  12. package/lib/components/ProgressBar/index.js.map +1 -0
  13. package/lib/components/{Progress/renderProgress.js → ProgressBar/renderProgressBar.js} +3 -3
  14. package/lib/components/ProgressBar/renderProgressBar.js.map +1 -0
  15. package/lib/components/{Progress/useProgress.js → ProgressBar/useProgressBar.js} +7 -7
  16. package/lib/components/ProgressBar/useProgressBar.js.map +1 -0
  17. package/lib/components/{Progress/useProgressStyles.js → ProgressBar/useProgressBarStyles.js} +19 -19
  18. package/lib/components/ProgressBar/useProgressBarStyles.js.map +1 -0
  19. package/lib/components/ProgressField/ProgressField.js +2 -2
  20. package/lib/components/ProgressField/ProgressField.js.map +1 -1
  21. package/lib/index.js +1 -1
  22. package/lib/index.js.map +1 -1
  23. package/lib-commonjs/{Progress.js → ProgressBar.js} +2 -2
  24. package/lib-commonjs/ProgressBar.js.map +1 -0
  25. package/lib-commonjs/components/ProgressBar/ProgressBar.js +26 -0
  26. package/lib-commonjs/components/ProgressBar/ProgressBar.js.map +1 -0
  27. package/lib-commonjs/components/{Progress/Progress.types.js → ProgressBar/ProgressBar.types.js} +1 -1
  28. package/lib-commonjs/components/{Progress/Progress.types.js.map → ProgressBar/ProgressBar.types.js.map} +0 -0
  29. package/lib-commonjs/components/ProgressBar/index.js +18 -0
  30. package/lib-commonjs/components/ProgressBar/index.js.map +1 -0
  31. package/lib-commonjs/components/{Progress/renderProgress.js → ProgressBar/renderProgressBar.js} +5 -5
  32. package/lib-commonjs/components/ProgressBar/renderProgressBar.js.map +1 -0
  33. package/lib-commonjs/components/{Progress/useProgress.js → ProgressBar/useProgressBar.js} +9 -9
  34. package/lib-commonjs/components/ProgressBar/useProgressBar.js.map +1 -0
  35. package/lib-commonjs/components/{Progress/useProgressStyles.js → ProgressBar/useProgressBarStyles.js} +21 -21
  36. package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js.map +1 -0
  37. package/lib-commonjs/components/ProgressField/ProgressField.js +2 -2
  38. package/lib-commonjs/components/ProgressField/ProgressField.js.map +1 -1
  39. package/lib-commonjs/index.js +12 -12
  40. package/lib-commonjs/index.js.map +1 -1
  41. package/package.json +5 -5
  42. package/MIGRATION.md +0 -26
  43. package/Spec.md +0 -124
  44. package/lib/Progress.js +0 -2
  45. package/lib/Progress.js.map +0 -1
  46. package/lib/components/Progress/Progress.js +0 -15
  47. package/lib/components/Progress/Progress.js.map +0 -1
  48. package/lib/components/Progress/Progress.types.js +0 -2
  49. package/lib/components/Progress/Progress.types.js.map +0 -1
  50. package/lib/components/Progress/index.js +0 -6
  51. package/lib/components/Progress/index.js.map +0 -1
  52. package/lib/components/Progress/renderProgress.js.map +0 -1
  53. package/lib/components/Progress/useProgress.js.map +0 -1
  54. package/lib/components/Progress/useProgressStyles.js.map +0 -1
  55. package/lib-commonjs/Progress.js.map +0 -1
  56. package/lib-commonjs/components/Progress/Progress.js +0 -26
  57. package/lib-commonjs/components/Progress/Progress.js.map +0 -1
  58. package/lib-commonjs/components/Progress/index.js +0 -18
  59. package/lib-commonjs/components/Progress/index.js.map +0 -1
  60. package/lib-commonjs/components/Progress/renderProgress.js.map +0 -1
  61. package/lib-commonjs/components/Progress/useProgress.js.map +0 -1
  62. package/lib-commonjs/components/Progress/useProgressStyles.js.map +0 -1
package/CHANGELOG.json CHANGED
@@ -2,7 +2,91 @@
2
2
  "name": "@fluentui/react-progress",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 17 Nov 2022 23:02:41 GMT",
5
+ "date": "Tue, 20 Dec 2022 14:55:51 GMT",
6
+ "tag": "@fluentui/react-progress_v9.0.0-alpha.8",
7
+ "version": "9.0.0-alpha.8",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "ololubek@microsoft.com",
12
+ "package": "@fluentui/react-progress",
13
+ "commit": "fdd8d8fb759a143e8f3d6792960ca10b197c3b23",
14
+ "comment": "chore: Change name to ProgressBar"
15
+ },
16
+ {
17
+ "author": "ololubek@microsoft.com",
18
+ "package": "@fluentui/react-progress",
19
+ "commit": "25bc50c2fda3b80ce3f57245ce589db69e11f296",
20
+ "comment": "fix: Add @noflip to animation styles to prevent extra from css being generated"
21
+ },
22
+ {
23
+ "author": "ololubek@microsoft.com",
24
+ "package": "@fluentui/react-progress",
25
+ "commit": "9e3f40f8ca67016590ced1a18aa16d9c02b3b5c6",
26
+ "comment": "(chore): remove deprecated exports from ProgressBar"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-progress",
31
+ "comment": "Bump @fluentui/react-field to v9.0.0-alpha.11",
32
+ "commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-progress",
37
+ "comment": "Bump @fluentui/react-shared-contexts to v9.1.3",
38
+ "commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui/react-progress",
43
+ "comment": "Bump @fluentui/react-theme to v9.1.4",
44
+ "commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@fluentui/react-progress",
49
+ "comment": "Bump @fluentui/react-utilities to v9.3.0",
50
+ "commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
51
+ }
52
+ ]
53
+ }
54
+ },
55
+ {
56
+ "date": "Mon, 05 Dec 2022 18:29:28 GMT",
57
+ "tag": "@fluentui/react-progress_v9.0.0-alpha.7",
58
+ "version": "9.0.0-alpha.7",
59
+ "comments": {
60
+ "prerelease": [
61
+ {
62
+ "author": "tristan.watanabe@gmail.com",
63
+ "package": "@fluentui/react-progress",
64
+ "commit": "77b8194cfeefddf753b473be572233fc5defe186",
65
+ "comment": "chore: Migrate to new package structure."
66
+ },
67
+ {
68
+ "author": "beachball",
69
+ "package": "@fluentui/react-progress",
70
+ "comment": "Bump @fluentui/react-field to v9.0.0-alpha.10",
71
+ "commit": "4c29542a51bf068e171690cc8e59c14489883912"
72
+ },
73
+ {
74
+ "author": "beachball",
75
+ "package": "@fluentui/react-progress",
76
+ "comment": "Bump @fluentui/react-shared-contexts to v9.1.2",
77
+ "commit": "4c29542a51bf068e171690cc8e59c14489883912"
78
+ },
79
+ {
80
+ "author": "beachball",
81
+ "package": "@fluentui/react-progress",
82
+ "comment": "Bump @fluentui/react-theme to v9.1.3",
83
+ "commit": "4c29542a51bf068e171690cc8e59c14489883912"
84
+ }
85
+ ]
86
+ }
87
+ },
88
+ {
89
+ "date": "Thu, 17 Nov 2022 23:05:44 GMT",
6
90
  "tag": "@fluentui/react-progress_v9.0.0-alpha.6",
7
91
  "version": "9.0.0-alpha.6",
8
92
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,39 @@
1
1
  # Change Log - @fluentui/react-progress
2
2
 
3
- This log was last generated on Thu, 17 Nov 2022 23:02:41 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 20 Dec 2022 14:55:51 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.0-alpha.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.0.0-alpha.8)
8
+
9
+ Tue, 20 Dec 2022 14:55:51 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.0.0-alpha.7..@fluentui/react-progress_v9.0.0-alpha.8)
11
+
12
+ ### Changes
13
+
14
+ - chore: Change name to ProgressBar ([PR #25929](https://github.com/microsoft/fluentui/pull/25929) by ololubek@microsoft.com)
15
+ - fix: Add @noflip to animation styles to prevent extra from css being generated ([PR #26029](https://github.com/microsoft/fluentui/pull/26029) by ololubek@microsoft.com)
16
+ - (chore): remove deprecated exports from ProgressBar ([PR #26027](https://github.com/microsoft/fluentui/pull/26027) by ololubek@microsoft.com)
17
+ - Bump @fluentui/react-field to v9.0.0-alpha.11 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
18
+ - Bump @fluentui/react-shared-contexts to v9.1.3 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
19
+ - Bump @fluentui/react-theme to v9.1.4 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
20
+ - Bump @fluentui/react-utilities to v9.3.0 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
21
+
22
+ ## [9.0.0-alpha.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.0.0-alpha.7)
23
+
24
+ Mon, 05 Dec 2022 18:29:28 GMT
25
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.0.0-alpha.6..@fluentui/react-progress_v9.0.0-alpha.7)
26
+
27
+ ### Changes
28
+
29
+ - chore: Migrate to new package structure. ([PR #25744](https://github.com/microsoft/fluentui/pull/25744) by tristan.watanabe@gmail.com)
30
+ - Bump @fluentui/react-field to v9.0.0-alpha.10 ([PR #25798](https://github.com/microsoft/fluentui/pull/25798) by beachball)
31
+ - Bump @fluentui/react-shared-contexts to v9.1.2 ([PR #25798](https://github.com/microsoft/fluentui/pull/25798) by beachball)
32
+ - Bump @fluentui/react-theme to v9.1.3 ([PR #25798](https://github.com/microsoft/fluentui/pull/25798) by beachball)
33
+
7
34
  ## [9.0.0-alpha.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.0.0-alpha.6)
8
35
 
9
- Thu, 17 Nov 2022 23:02:41 GMT
36
+ Thu, 17 Nov 2022 23:05:44 GMT
10
37
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.0.0-alpha.5..@fluentui/react-progress_v9.0.0-alpha.6)
11
38
 
12
39
  ### Changes
package/README.md CHANGED
@@ -8,29 +8,29 @@ These are not production-ready components and **should never be used in product*
8
8
 
9
9
  ## Usage
10
10
 
11
- To import `Progress`:
11
+ To import `ProgressBar`:
12
12
 
13
13
  ```js
14
- import { Progress } from '@fluentui/react-progress';
14
+ import { ProgressBar } from '@fluentui/react-progress';
15
15
  ```
16
16
 
17
17
  Once the Progress component graduates to a production release, the component will be available at:
18
18
 
19
19
  ```js
20
- import { Progress } from '@fluentui/react-components';
20
+ import { ProgressBar } from '@fluentui/react-components';
21
21
  ```
22
22
 
23
23
  ### Examples
24
24
 
25
25
  ```jsx
26
- const ProgressExample = () => {
27
- return <Progress thickness="large" value={0.5} />;
26
+ const ProgressBarExample = () => {
27
+ return <ProgressBar thickness="large" value={0.5} />;
28
28
  };
29
29
  ```
30
30
 
31
31
  #### Using ProgressField
32
32
 
33
- The `ProgressField` component is a wrapper around the `Progress` component that allows the user to add a `label`, `hint`, `validationMessage`, and `validationState` to the `Progress` component. You can pass these props, as well as the regular `Progress` props to a `ProgressField` component.
33
+ The `ProgressField` component is a wrapper around the `ProgressBar` component that allows the user to add a `label`, `hint`, `validationMessage`, and `validationState` to the `ProgressBar` component. You can pass these props, as well as the regular `ProgressBar` props to a `ProgressField` component.
34
34
 
35
35
  To import `ProgressField`:
36
36
 
@@ -42,7 +42,7 @@ import { ProgressField } from '@fluentui/react-field';
42
42
  const ProgressFieldExample = () => {
43
43
  return (
44
44
  <ProgressField
45
- label="Determinate Progress"
45
+ label="Determinate ProgressBar"
46
46
  hint="This is a determinate Progress with description"
47
47
  value={0.5}
48
48
  validationState="warning"
package/dist/index.d.ts CHANGED
@@ -11,22 +11,16 @@ import type { Slot } from '@fluentui/react-utilities';
11
11
  import { SlotClassNames } from '@fluentui/react-utilities';
12
12
 
13
13
  /**
14
- * A progress bar shows the progression of a task.
14
+ * A ProgressBar bar shows the progression of a task.
15
15
  */
16
- export declare const Progress: ForwardRefComponent<ProgressProps>;
16
+ export declare const ProgressBar: ForwardRefComponent<ProgressBarProps>;
17
17
 
18
- export declare const progressClassNames: SlotClassNames<ProgressSlots>;
19
-
20
- export declare const ProgressField_unstable: ForwardRefComponent<ProgressFieldProps_unstable>;
21
-
22
- export declare const progressFieldClassNames: SlotClassNames<FieldSlots<FieldControl>>;
23
-
24
- export declare type ProgressFieldProps_unstable = FieldProps<typeof Progress>;
18
+ export declare const progressBarClassNames: SlotClassNames<ProgressBarSlots>;
25
19
 
26
20
  /**
27
- * Progress Props
21
+ * ProgressBar Props
28
22
  */
29
- export declare type ProgressProps = Omit<ComponentProps<ProgressSlots>, 'size'> & {
23
+ export declare type ProgressBarProps = Omit<ComponentProps<ProgressBarSlots>, 'size'> & {
30
24
  /**
31
25
  * The shape of the bar and track.
32
26
  * @default 'rounded'
@@ -36,61 +30,67 @@ export declare type ProgressProps = Omit<ComponentProps<ProgressSlots>, 'size'>
36
30
  * A decimal number between `0` and `1` (or between `0` and `max` if given),
37
31
  * which specifies how much of the task has been completed.
38
32
  *
39
- * If `undefined` (default), the Progress will display an **indeterminate** state.
33
+ * If `undefined` (default), the ProgressBar will display an **indeterminate** state.
40
34
  */
41
35
  value?: number;
42
36
  /**
43
37
  * The maximum value, which indicates the task is complete.
44
- * The progress bar will be full when `value` equals `max`.
38
+ * The ProgressBar bar will be full when `value` equals `max`.
45
39
  * @default 1
46
40
  */
47
41
  max?: number;
48
42
  /**
49
- * The thickness of the Progress bar
43
+ * The thickness of the ProgressBar bar
50
44
  * @default 'medium'
51
45
  */
52
46
  thickness?: 'medium' | 'large';
53
47
  /**
54
- * The status of the progress bar. Changes the color of the bar.
48
+ * The status of the ProgressBar bar. Changes the color of the bar.
55
49
  */
56
50
  validationState?: 'success' | 'warning' | 'error';
57
51
  };
58
52
 
59
- export declare type ProgressSlots = {
53
+ export declare type ProgressBarSlots = {
60
54
  /**
61
- * The track behind the progress bar
55
+ * The track behind the ProgressBar bar
62
56
  */
63
57
  root: NonNullable<Slot<'div'>>;
64
58
  /**
65
- * The filled portion of the progress bar. Animated in the indeterminate state, when no value is provided.
59
+ * The filled portion of the ProgressBar bar. Animated in the indeterminate state, when no value is provided.
66
60
  */
67
61
  bar?: NonNullable<Slot<'div'>>;
68
62
  };
69
63
 
70
64
  /**
71
- * State used in rendering Progress
65
+ * State used in rendering ProgressBar
72
66
  */
73
- export declare type ProgressState = ComponentState<ProgressSlots> & Required<Pick<ProgressProps, 'max' | 'shape' | 'thickness'>> & Pick<ProgressProps, 'value' | 'validationState'>;
67
+ export declare type ProgressBarState = ComponentState<ProgressBarSlots> & Required<Pick<ProgressBarProps, 'max' | 'shape' | 'thickness'>> & Pick<ProgressBarProps, 'value' | 'validationState'>;
68
+
69
+ export declare const ProgressField_unstable: ForwardRefComponent<ProgressFieldProps_unstable>;
70
+
71
+ export declare const progressFieldClassNames: SlotClassNames<FieldSlots<FieldControl>>;
72
+
73
+ export declare type ProgressFieldProps_unstable = FieldProps<typeof ProgressBar>;
74
74
 
75
75
  /**
76
- * Render the final JSX of Progress
76
+ * Render the final JSX of ProgressBar
77
77
  */
78
- export declare const renderProgress_unstable: (state: ProgressState) => JSX.Element;
78
+ export declare const renderProgressBar_unstable: (state: ProgressBarState) => JSX.Element;
79
79
 
80
80
  /**
81
- * Create the state required to render Progress.
81
+ * Create the state required to render ProgressBar.
82
82
  *
83
- * The returned state can be modified with hooks such as useProgressStyles_unstable,
84
- * before being passed to renderProgress_unstable.
83
+ * The returned state can be modified with hooks such as useProgressBarStyles_unstable,
84
+ * before being passed to renderProgressBar_unstable.
85
85
  *
86
- * @param props - props from this instance of Progress
87
- * @param ref - reference to root HTMLElement of Progress
86
+ * @param props - props from this instance of ProgressBar
87
+ * @param ref - reference to root HTMLElement of ProgressBar
88
88
  */
89
- export declare const useProgress_unstable: (props: ProgressProps, ref: React_2.Ref<HTMLElement>) => ProgressState;
89
+ export declare const useProgressBar_unstable: (props: ProgressBarProps, ref: React_2.Ref<HTMLElement>) => ProgressBarState;
90
90
 
91
91
  /**
92
- * Apply styling to the Progress slots based on the state
92
+ * Apply styling to the ProgressBar slots based on the state
93
93
  */
94
- export declare const useProgressStyles_unstable: (state: ProgressState) => ProgressState;
94
+ export declare const useProgressBarStyles_unstable: (state: ProgressBarState) => ProgressBarState;
95
95
 
96
96
  export { }
@@ -0,0 +1,2 @@
1
+ export * from './components/ProgressBar/index';
2
+ //# sourceMappingURL=ProgressBar.js.map
@@ -0,0 +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"]}
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import { useProgressBar_unstable } from './useProgressBar';
3
+ import { renderProgressBar_unstable } from './renderProgressBar';
4
+ import { useProgressBarStyles_unstable } from './useProgressBarStyles';
5
+ /**
6
+ * A ProgressBar bar shows the progression of a task.
7
+ */
8
+
9
+ export const ProgressBar = /*#__PURE__*/React.forwardRef((props, ref) => {
10
+ const state = useProgressBar_unstable(props, ref);
11
+ useProgressBarStyles_unstable(state);
12
+ return renderProgressBar_unstable(state);
13
+ });
14
+ ProgressBar.displayName = 'ProgressBar';
15
+ //# sourceMappingURL=ProgressBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-progress/src/components/ProgressBar/ProgressBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,uBAAT,QAAwC,kBAAxC;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AACA,SAAS,6BAAT,QAA8C,wBAA9C;AAIA;;AAEG;;AACH,OAAO,MAAM,WAAW,gBAA0C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAChG,MAAM,KAAK,GAAG,uBAAuB,CAAC,KAAD,EAAQ,GAAR,CAArC;EAEA,6BAA6B,CAAC,KAAD,CAA7B;EACA,OAAO,0BAA0B,CAAC,KAAD,CAAjC;AACD,CALiE,CAA3D;AAOP,WAAW,CAAC,WAAZ,GAA0B,aAA1B","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';\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 return renderProgressBar_unstable(state);\n});\n\nProgressBar.displayName = 'ProgressBar';\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ProgressBar.types.js.map
@@ -0,0 +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' | 'rectangular';\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 */\n validationState?: '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' | 'validationState'>;\n"]}
@@ -0,0 +1,6 @@
1
+ export * from './ProgressBar';
2
+ export * from './ProgressBar.types';
3
+ export * from './renderProgressBar';
4
+ export * from './useProgressBar';
5
+ export * from './useProgressBarStyles';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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,10 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { getSlots } from '@fluentui/react-utilities';
3
3
  /**
4
- * Render the final JSX of Progress
4
+ * Render the final JSX of ProgressBar
5
5
  */
6
6
 
7
- export const renderProgress_unstable = state => {
7
+ export const renderProgressBar_unstable = state => {
8
8
  const {
9
9
  slots,
10
10
  slotProps
@@ -13,4 +13,4 @@ export const renderProgress_unstable = state => {
13
13
  }, slots.bar && /*#__PURE__*/React.createElement(slots.bar, { ...slotProps.bar
14
14
  }));
15
15
  };
16
- //# sourceMappingURL=renderProgress.js.map
16
+ //# sourceMappingURL=renderProgressBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-progress/src/components/ProgressBar/renderProgressBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,0BAA0B,GAAI,KAAD,IAA4B;EACpE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAmB,KAAnB,CAArC;EACA,oBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EAAiC,KAAK,CAAC,GAAN,iBAAa,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,GAAP,EAAU,EAAA,GAAK,SAAS,CAAC;EAAf,CAAV,CAA9C,CAAP;AACD,CAHM","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"],"sourceRoot":"../src/"}
@@ -1,15 +1,15 @@
1
1
  import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';
2
2
  /**
3
- * Create the state required to render Progress.
3
+ * Create the state required to render ProgressBar.
4
4
  *
5
- * The returned state can be modified with hooks such as useProgressStyles_unstable,
6
- * before being passed to renderProgress_unstable.
5
+ * The returned state can be modified with hooks such as useProgressBarStyles_unstable,
6
+ * before being passed to renderProgressBar_unstable.
7
7
  *
8
- * @param props - props from this instance of Progress
9
- * @param ref - reference to root HTMLElement of Progress
8
+ * @param props - props from this instance of ProgressBar
9
+ * @param ref - reference to root HTMLElement of ProgressBar
10
10
  */
11
11
 
12
- export const useProgress_unstable = (props, ref) => {
12
+ export const useProgressBar_unstable = (props, ref) => {
13
13
  // Props
14
14
  const {
15
15
  max = 1.0,
@@ -44,4 +44,4 @@ export const useProgress_unstable = (props, ref) => {
44
44
  };
45
45
  return state;
46
46
  };
47
- //# sourceMappingURL=useProgress.js.map
47
+ //# sourceMappingURL=useProgressBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-progress/src/components/ProgressBar/useProgressBar.tsx"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,uBAAuB,GAAG,CAAC,KAAD,EAA0B,GAA1B,KAA2E;EAChH;EACA,MAAM;IAAE,GAAG,GAAG,GAAR;IAAa,KAAK,GAAG,SAArB;IAAgC,SAAS,GAAG,QAA5C;IAAsD,eAAtD;IAAuE;EAAvE,IAAiF,KAAvF;EAEA,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAD,EAAQ;IACxC,GADwC;IAExC,IAAI,EAAE,aAFkC;IAGxC,iBAAiB,KAAK,KAAK,SAAV,GAAsB,CAAtB,GAA0B,SAHH;IAIxC,iBAAiB,KAAK,KAAK,SAAV,GAAsB,GAAtB,GAA4B,SAJL;IAKxC,iBAAiB,KALuB;IAMxC,GAAG;EANqC,CAAR,CAAlC;EASA,MAAM,GAAG,GAAG,gBAAgB,CAAC,KAAK,CAAC,GAAP,EAAY;IACtC,QAAQ,EAAE;EAD4B,CAAZ,CAA5B;EAIA,MAAM,KAAK,GAAqB;IAC9B,GAD8B;IAE9B,KAF8B;IAG9B,SAH8B;IAI9B,KAJ8B;IAK9B,eAL8B;IAM9B,UAAU,EAAE;MACV,IAAI,EAAE,KADI;MAEV,GAAG,EAAE;IAFK,CANkB;IAU9B,IAV8B;IAW9B;EAX8B,CAAhC;EAcA,OAAO,KAAP;AACD,CAhCM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\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 { max = 1.0, shape = 'rounded', thickness = 'medium', validationState, value } = props;\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 max,\n shape,\n thickness,\n value,\n validationState,\n components: {\n root: 'div',\n bar: 'div',\n },\n root,\n bar,\n };\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1,9 +1,9 @@
1
1
  import { __styles, mergeClasses, shorthands } from '@griffel/react';
2
2
  import { tokens } from '@fluentui/react-theme';
3
3
  import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';
4
- export const progressClassNames = {
5
- root: 'fui-Progress',
6
- bar: 'fui-Progress__bar'
4
+ export const progressBarClassNames = {
5
+ root: 'fui-ProgressBar',
6
+ bar: 'fui-ProgressBar__bar'
7
7
  }; // If the percentComplete is near 0, don't animate it.
8
8
  // This prevents animations on reset to 0 scenarios.
9
9
 
@@ -12,20 +12,20 @@ const barThicknessValues = {
12
12
  medium: '2px',
13
13
  large: '4px'
14
14
  };
15
- const indeterminateProgress = {
15
+ const indeterminateProgressBar = {
16
16
  '0%': {
17
- left: '0%'
17
+ left: '0% /* @noflip */'
18
18
  },
19
19
  '100%': {
20
- left: '100%'
20
+ left: '100% /* @noflip */'
21
21
  }
22
22
  };
23
- const indeterminateProgressRTL = {
23
+ const indeterminateProgressBarRTL = {
24
24
  '100%': {
25
- right: '-100%'
25
+ right: '-100% /* @noflip */'
26
26
  },
27
27
  '0%': {
28
- right: '100%'
28
+ right: '100% /* @noflip */'
29
29
  }
30
30
  };
31
31
  /**
@@ -72,7 +72,7 @@ const useRootStyles = /*#__PURE__*/__styles({
72
72
  }]]
73
73
  });
74
74
  /**
75
- * Styles for the progress bar
75
+ * Styles for the ProgressBar bar
76
76
  */
77
77
 
78
78
 
@@ -100,14 +100,14 @@ const useBarStyles = /*#__PURE__*/__styles({
100
100
  "B2u0y6b": "fa0wk36",
101
101
  "qhf8xq": "f10pi13n",
102
102
  "Bcmaq0h": ["fpo0yib", "f1u5hf6c"],
103
- "Bv12yb3": ["f1wk4z0g", "f1f62nrt"],
103
+ "Bv12yb3": "f1h4fm7e",
104
104
  "vin17d": "f1a27w2r",
105
105
  "w3vfg9": "f1cpbl36",
106
106
  "Gqtpxc": "f4akx1t",
107
107
  "B3vm3ge": "f18p5put"
108
108
  },
109
109
  "rtl": {
110
- "Bv12yb3": ["fw97ye2", "fqbve9y"]
110
+ "Bv12yb3": "fjhwsai"
111
111
  },
112
112
  "error": {
113
113
  "De3pzq": "fdl5y0r"
@@ -119,7 +119,7 @@ const useBarStyles = /*#__PURE__*/__styles({
119
119
  "De3pzq": "flxk52p"
120
120
  }
121
121
  }, {
122
- "d": [".ftywsgz{background-color:var(--colorCompoundBrandBackground);}", ".f1d9uwra{border-bottom-right-radius:inherit;}", ".fzibvwi{border-bottom-left-radius:inherit;}", ".fuoumxm{border-top-right-radius:inherit;}", ".f1vtqnvc{border-top-left-radius:inherit;}", ".f4t8t6x{height:2px;}", ".f6ywr7j{height:4px;}", ".fjt6zfz{transition-property:width;}", ".f1wofebd{transition-duration:0.3s;}", ".fv71qf3{transition-timing-function:ease;}", ".fa0wk36{max-width:33%;}", ".f10pi13n{position:relative;}", ".fpo0yib{background-image:linear-gradient(\n to right,\n var(--colorNeutralBackground6) 0%,\n var(--colorTransparentBackground) 50%,\n var(--colorNeutralBackground6) 100%\n );}", ".f1u5hf6c{background-image:linear-gradient(\n to left,\n var(--colorNeutralBackground6) 0%,\n var(--colorTransparentBackground) 50%,\n var(--colorNeutralBackground6) 100%\n );}", ".f1wk4z0g{-webkit-animation-name:fgj6rna;animation-name:fgj6rna;}", ".f1f62nrt{-webkit-animation-name:fknt0w3;animation-name:fknt0w3;}", ".f1a27w2r{-webkit-animation-duration:3s;animation-duration:3s;}", ".f1cpbl36{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;}", ".fw97ye2{-webkit-animation-name:f869nhd;animation-name:f869nhd;}", ".fqbve9y{-webkit-animation-name:f1gy5aix;animation-name:f1gy5aix;}", ".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}", ".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}", ".flxk52p{background-color:var(--colorPaletteGreenBackground3);}"],
122
+ "d": [".ftywsgz{background-color:var(--colorCompoundBrandBackground);}", ".f1d9uwra{border-bottom-right-radius:inherit;}", ".fzibvwi{border-bottom-left-radius:inherit;}", ".fuoumxm{border-top-right-radius:inherit;}", ".f1vtqnvc{border-top-left-radius:inherit;}", ".f4t8t6x{height:2px;}", ".f6ywr7j{height:4px;}", ".fjt6zfz{transition-property:width;}", ".f1wofebd{transition-duration:0.3s;}", ".fv71qf3{transition-timing-function:ease;}", ".fa0wk36{max-width:33%;}", ".f10pi13n{position:relative;}", ".fpo0yib{background-image:linear-gradient(\n to right,\n var(--colorNeutralBackground6) 0%,\n var(--colorTransparentBackground) 50%,\n var(--colorNeutralBackground6) 100%\n );}", ".f1u5hf6c{background-image:linear-gradient(\n to left,\n var(--colorNeutralBackground6) 0%,\n var(--colorTransparentBackground) 50%,\n var(--colorNeutralBackground6) 100%\n );}", ".f1h4fm7e{-webkit-animation-name:fd3k50f;animation-name:fd3k50f;}", ".f1a27w2r{-webkit-animation-duration:3s;animation-duration:3s;}", ".f1cpbl36{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;}", ".fjhwsai{-webkit-animation-name:f1kx06uz;animation-name:f1kx06uz;}", ".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}", ".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}", ".flxk52p{background-color:var(--colorPaletteGreenBackground3);}"],
123
123
  "m": [["@media screen and (forced-colors: active){.f1neahkh{background-color:Highlight;}}", {
124
124
  "m": "screen and (forced-colors: active)"
125
125
  }], ["@media screen and (prefers-reduced-motion: reduce){.f4akx1t{-webkit-animation-duration:0.01ms;animation-duration:0.01ms;}}", {
@@ -127,14 +127,14 @@ const useBarStyles = /*#__PURE__*/__styles({
127
127
  }], ["@media screen and (prefers-reduced-motion: reduce){.f18p5put{-webkit-animation-iteration-count:1;animation-iteration-count:1;}}", {
128
128
  "m": "screen and (prefers-reduced-motion: reduce)"
129
129
  }]],
130
- "k": ["@-webkit-keyframes fgj6rna{0%{left:0%;}100%{left:100%;}}", "@-webkit-keyframes fknt0w3{0%{right:0%;}100%{right:100%;}}", "@keyframes fgj6rna{0%{left:0%;}100%{left:100%;}}", "@keyframes fknt0w3{0%{right:0%;}100%{right:100%;}}", "@-webkit-keyframes f869nhd{100%{right:-100%;}0%{right:100%;}}", "@-webkit-keyframes f1gy5aix{100%{left:-100%;}0%{left:100%;}}", "@keyframes f869nhd{100%{right:-100%;}0%{right:100%;}}", "@keyframes f1gy5aix{100%{left:-100%;}0%{left:100%;}}"]
130
+ "k": ["@-webkit-keyframes fd3k50f{0%{left:0%;}100%{left:100%;}}", "@keyframes fd3k50f{0%{left:0%;}100%{left:100%;}}", "@-webkit-keyframes f1kx06uz{100%{right:-100%;}0%{right:100%;}}", "@keyframes f1kx06uz{100%{right:-100%;}0%{right:100%;}}"]
131
131
  });
132
132
  /**
133
- * Apply styling to the Progress slots based on the state
133
+ * Apply styling to the ProgressBar slots based on the state
134
134
  */
135
135
 
136
136
 
137
- export const useProgressStyles_unstable = state => {
137
+ export const useProgressBarStyles_unstable = state => {
138
138
  const {
139
139
  max,
140
140
  shape,
@@ -147,10 +147,10 @@ export const useProgressStyles_unstable = state => {
147
147
  const {
148
148
  dir
149
149
  } = useFluent();
150
- state.root.className = mergeClasses(progressClassNames.root, rootStyles.root, rootStyles[shape], rootStyles[thickness], state.root.className);
150
+ state.root.className = mergeClasses(progressBarClassNames.root, rootStyles.root, rootStyles[shape], rootStyles[thickness], state.root.className);
151
151
 
152
152
  if (state.bar) {
153
- state.bar.className = mergeClasses(progressClassNames.bar, barStyles.base, value === undefined && barStyles.indeterminate, value === undefined && dir === 'rtl' && barStyles.rtl, barStyles[thickness], value !== undefined && value > ZERO_THRESHOLD && barStyles.nonZeroDeterminate, validationState && barStyles[validationState], state.bar.className);
153
+ state.bar.className = mergeClasses(progressBarClassNames.bar, barStyles.base, value === undefined && barStyles.indeterminate, value === undefined && dir === 'rtl' && barStyles.rtl, barStyles[thickness], value !== undefined && value > ZERO_THRESHOLD && barStyles.nonZeroDeterminate, validationState && barStyles[validationState], state.bar.className);
154
154
  }
155
155
 
156
156
  if (state.bar && value !== undefined) {
@@ -162,4 +162,4 @@ export const useProgressStyles_unstable = state => {
162
162
 
163
163
  return state;
164
164
  };
165
- //# sourceMappingURL=useProgressStyles.js.map
165
+ //# sourceMappingURL=useProgressBarStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-progress/src/components/ProgressBar/useProgressBarStyles.ts"],"names":[],"mappings":"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","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport type { ProgressBarState, ProgressBarSlots } from './ProgressBar.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const progressBarClassNames: SlotClassNames<ProgressBarSlots> = {\n root: 'fui-ProgressBar',\n bar: 'fui-ProgressBar__bar',\n};\n\n// If the percentComplete is near 0, don't animate it.\n// This prevents animations on reset to 0 scenarios.\nconst ZERO_THRESHOLD = 0.01;\n\nconst barThicknessValues = {\n medium: '2px',\n large: '4px',\n};\n\nconst indeterminateProgressBar = {\n '0%': {\n left: '0% /* @noflip */',\n },\n '100%': {\n left: '100% /* @noflip */',\n },\n};\nconst indeterminateProgressBarRTL = {\n '100%': {\n right: '-100% /* @noflip */',\n },\n '0%': {\n right: '100% /* @noflip */',\n },\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootStyles = makeStyles({\n root: {\n display: 'block',\n backgroundColor: tokens.colorNeutralBackground6,\n justifySelf: 'stretch',\n ...shorthands.overflow('hidden'),\n\n '@media screen and (forced-colors: active)': {\n ...shorthands.borderBottom('1px', 'solid', 'CanvasText'),\n },\n },\n rounded: {\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n },\n rectangular: {\n ...shorthands.borderRadius(tokens.borderRadiusNone),\n },\n medium: {\n height: barThicknessValues.medium,\n },\n large: {\n height: barThicknessValues.large,\n },\n});\n\n/**\n * Styles for the ProgressBar bar\n */\nconst useBarStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorCompoundBrandBackground,\n\n '@media screen and (forced-colors: active)': {\n backgroundColor: 'Highlight',\n },\n ...shorthands.borderRadius('inherit'),\n },\n medium: {\n height: barThicknessValues.medium,\n },\n large: {\n height: barThicknessValues.large,\n },\n nonZeroDeterminate: {\n transitionProperty: 'width',\n transitionDuration: '0.3s',\n transitionTimingFunction: 'ease',\n },\n indeterminate: {\n maxWidth: '33%',\n position: 'relative',\n backgroundImage: `linear-gradient(\n to right,\n ${tokens.colorNeutralBackground6} 0%,\n ${tokens.colorTransparentBackground} 50%,\n ${tokens.colorNeutralBackground6} 100%\n )`,\n animationName: indeterminateProgressBar,\n animationDuration: '3s',\n animationIterationCount: 'infinite',\n '@media screen and (prefers-reduced-motion: reduce)': {\n animationDuration: '0.01ms',\n animationIterationCount: '1',\n },\n },\n\n rtl: {\n animationName: indeterminateProgressBarRTL,\n },\n\n error: {\n backgroundColor: tokens.colorPaletteRedBackground3,\n },\n warning: {\n backgroundColor: tokens.colorPaletteDarkOrangeBackground3,\n },\n success: {\n backgroundColor: tokens.colorPaletteGreenBackground3,\n },\n});\n\n/**\n * Apply styling to the ProgressBar slots based on the state\n */\nexport const useProgressBarStyles_unstable = (state: ProgressBarState): ProgressBarState => {\n const { max, shape, thickness, validationState, value } = state;\n const rootStyles = useRootStyles();\n const barStyles = useBarStyles();\n const { dir } = useFluent();\n\n state.root.className = mergeClasses(\n progressBarClassNames.root,\n rootStyles.root,\n rootStyles[shape],\n rootStyles[thickness],\n state.root.className,\n );\n\n if (state.bar) {\n state.bar.className = mergeClasses(\n progressBarClassNames.bar,\n barStyles.base,\n value === undefined && barStyles.indeterminate,\n value === undefined && dir === 'rtl' && barStyles.rtl,\n barStyles[thickness],\n value !== undefined && value > ZERO_THRESHOLD && barStyles.nonZeroDeterminate,\n validationState && barStyles[validationState],\n state.bar.className,\n );\n }\n\n if (state.bar && value !== undefined) {\n state.bar.style = {\n width: Math.min(100, Math.max(0, (value / max) * 100)) + '%',\n ...state.bar.style,\n };\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1,10 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { getFieldClassNames, renderField_unstable, useFieldStyles_unstable, useField_unstable } from '@fluentui/react-field';
3
- import { Progress } from '../../Progress';
3
+ import { ProgressBar } from '../../ProgressBar';
4
4
  export const progressFieldClassNames = /*#__PURE__*/getFieldClassNames('ProgressField');
5
5
  export const ProgressField = /*#__PURE__*/React.forwardRef((props, ref) => {
6
6
  const state = useField_unstable(props, ref, {
7
- component: Progress,
7
+ component: ProgressBar,
8
8
  classNames: progressFieldClassNames,
9
9
  labelConnection: 'aria-labelledby',
10
10
  ariaInvalidOnError: false
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-progress/src/components/ProgressField/ProgressField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAEA,SACE,kBADF,EAEE,oBAFF,EAGE,uBAHF,EAIE,iBAJF,QAKO,uBALP;AAOA,SAAS,QAAT,QAAyB,gBAAzB;AAIA,OAAO,MAAM,uBAAuB,gBAAG,kBAAkB,CAAC,eAAD,CAAlD;AAEP,OAAO,MAAM,aAAa,gBAA4C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACpG,MAAM,KAAK,GAAG,iBAAiB,CAAC,KAAD,EAAQ,GAAR,EAAa;IAC1C,SAAS,EAAE,QAD+B;IAE1C,UAAU,EAAE,uBAF8B;IAG1C,eAAe,EAAE,iBAHyB;IAI1C,kBAAkB,EAAE;EAJsB,CAAb,CAA/B;EAMA,KAAK,CAAC,OAAN,CAAc,eAAd,GAAgC,KAAK,CAAC,eAAtC;EACA,uBAAuB,CAAC,KAAD,CAAvB;EACA,OAAO,oBAAoB,CAAC,KAAD,CAA3B;AACD,CAVqE,CAA/D;AAYP,aAAa,CAAC,WAAd,GAA4B,eAA5B","sourcesContent":["import * as React from 'react';\nimport type { FieldProps } from '@fluentui/react-field';\nimport {\n getFieldClassNames,\n renderField_unstable,\n useFieldStyles_unstable,\n useField_unstable,\n} from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { Progress } from '../../Progress';\n\nexport type ProgressFieldProps = FieldProps<typeof Progress>;\n\nexport const progressFieldClassNames = getFieldClassNames('ProgressField');\n\nexport const ProgressField: ForwardRefComponent<ProgressFieldProps> = React.forwardRef((props, ref) => {\n const state = useField_unstable(props, ref, {\n component: Progress,\n classNames: progressFieldClassNames,\n labelConnection: 'aria-labelledby',\n ariaInvalidOnError: false,\n });\n state.control.validationState = state.validationState;\n useFieldStyles_unstable(state);\n return renderField_unstable(state);\n});\n\nProgressField.displayName = 'ProgressField';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-progress/src/components/ProgressField/ProgressField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAEA,SACE,kBADF,EAEE,oBAFF,EAGE,uBAHF,EAIE,iBAJF,QAKO,uBALP;AAOA,SAAS,WAAT,QAA4B,mBAA5B;AAIA,OAAO,MAAM,uBAAuB,gBAAG,kBAAkB,CAAC,eAAD,CAAlD;AAEP,OAAO,MAAM,aAAa,gBAA4C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACpG,MAAM,KAAK,GAAG,iBAAiB,CAAC,KAAD,EAAQ,GAAR,EAAa;IAC1C,SAAS,EAAE,WAD+B;IAE1C,UAAU,EAAE,uBAF8B;IAG1C,eAAe,EAAE,iBAHyB;IAI1C,kBAAkB,EAAE;EAJsB,CAAb,CAA/B;EAMA,KAAK,CAAC,OAAN,CAAc,eAAd,GAAgC,KAAK,CAAC,eAAtC;EACA,uBAAuB,CAAC,KAAD,CAAvB;EACA,OAAO,oBAAoB,CAAC,KAAD,CAA3B;AACD,CAVqE,CAA/D;AAYP,aAAa,CAAC,WAAd,GAA4B,eAA5B","sourcesContent":["import * as React from 'react';\nimport type { FieldProps } from '@fluentui/react-field';\nimport {\n getFieldClassNames,\n renderField_unstable,\n useFieldStyles_unstable,\n useField_unstable,\n} from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { ProgressBar } from '../../ProgressBar';\n\nexport type ProgressFieldProps = FieldProps<typeof ProgressBar>;\n\nexport const progressFieldClassNames = getFieldClassNames('ProgressField');\n\nexport const ProgressField: ForwardRefComponent<ProgressFieldProps> = React.forwardRef((props, ref) => {\n const state = useField_unstable(props, ref, {\n component: ProgressBar,\n classNames: progressFieldClassNames,\n labelConnection: 'aria-labelledby',\n ariaInvalidOnError: false,\n });\n state.control.validationState = state.validationState;\n useFieldStyles_unstable(state);\n return renderField_unstable(state);\n});\n\nProgressField.displayName = 'ProgressField';\n"],"sourceRoot":"../src/"}
package/lib/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { Progress, progressClassNames, renderProgress_unstable, useProgress_unstable, useProgressStyles_unstable } from './Progress';
1
+ export { ProgressBar, progressBarClassNames, renderProgressBar_unstable, useProgressBar_unstable, useProgressBarStyles_unstable } from './ProgressBar';
2
2
  export { ProgressField as ProgressField_unstable, progressFieldClassNames } from './ProgressField';
3
3
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-progress/src/index.ts"],"names":[],"mappings":"AAAA,SACE,QADF,EAEE,kBAFF,EAGE,uBAHF,EAIE,oBAJF,EAKE,0BALF,QAMO,YANP;AASA,SAAS,aAAa,IAAI,sBAA1B,EAAkD,uBAAlD,QAAiF,iBAAjF","sourcesContent":["export {\n Progress,\n progressClassNames,\n renderProgress_unstable,\n useProgress_unstable,\n useProgressStyles_unstable,\n} from './Progress';\nexport type { ProgressProps, ProgressSlots, ProgressState } from './Progress';\n\nexport { ProgressField as ProgressField_unstable, progressFieldClassNames } from './ProgressField';\nexport type { ProgressFieldProps as ProgressFieldProps_unstable } from './ProgressField';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-progress/src/index.ts"],"names":[],"mappings":"AAAA,SACE,WADF,EAEE,qBAFF,EAGE,0BAHF,EAIE,uBAJF,EAKE,6BALF,QAMO,eANP;AASA,SAAS,aAAa,IAAI,sBAA1B,EAAkD,uBAAlD,QAAiF,iBAAjF","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\nexport { ProgressField as ProgressField_unstable, progressFieldClassNames } from './ProgressField';\nexport type { ProgressFieldProps as ProgressFieldProps_unstable } from './ProgressField';\n"],"sourceRoot":"../src/"}
@@ -6,5 +6,5 @@ Object.defineProperty(exports, "__esModule", {
6
6
 
7
7
  const tslib_1 = /*#__PURE__*/require("tslib");
8
8
 
9
- tslib_1.__exportStar(require("./components/Progress/index"), exports);
10
- //# sourceMappingURL=Progress.js.map
9
+ tslib_1.__exportStar(require("./components/ProgressBar/index"), exports);
10
+ //# sourceMappingURL=ProgressBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-progress/src/ProgressBar.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/ProgressBar/index';\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ProgressBar = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ const useProgressBar_1 = /*#__PURE__*/require("./useProgressBar");
11
+
12
+ const renderProgressBar_1 = /*#__PURE__*/require("./renderProgressBar");
13
+
14
+ const useProgressBarStyles_1 = /*#__PURE__*/require("./useProgressBarStyles");
15
+ /**
16
+ * A ProgressBar bar shows the progression of a task.
17
+ */
18
+
19
+
20
+ exports.ProgressBar = /*#__PURE__*/React.forwardRef((props, ref) => {
21
+ const state = useProgressBar_1.useProgressBar_unstable(props, ref);
22
+ useProgressBarStyles_1.useProgressBarStyles_unstable(state);
23
+ return renderProgressBar_1.renderProgressBar_unstable(state);
24
+ });
25
+ exports.ProgressBar.displayName = 'ProgressBar';
26
+ //# sourceMappingURL=ProgressBar.js.map