@fluentui/react-progress 9.1.38 → 9.1.41

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,130 @@
2
2
  "name": "@fluentui/react-progress",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 20 Sep 2023 14:13:59 GMT",
5
+ "date": "Tue, 26 Sep 2023 17:44:15 GMT",
6
+ "tag": "@fluentui/react-progress_v9.1.41",
7
+ "version": "9.1.41",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "yuanboxue@microsoft.com",
12
+ "package": "@fluentui/react-progress",
13
+ "commit": "05a23f6f5f331841c9ac9fb63764440c543f791d",
14
+ "comment": "chore: trigger manual version bump after broken release"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-progress",
19
+ "comment": "Bump @fluentui/react-field to v9.1.31",
20
+ "commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-progress",
25
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.12",
26
+ "commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-progress",
31
+ "comment": "Bump @fluentui/react-shared-contexts to v9.9.1",
32
+ "commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-progress",
37
+ "comment": "Bump @fluentui/react-theme to v9.1.14",
38
+ "commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui/react-progress",
43
+ "comment": "Bump @fluentui/react-utilities to v9.13.5",
44
+ "commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
45
+ }
46
+ ]
47
+ }
48
+ },
49
+ {
50
+ "date": "Tue, 26 Sep 2023 15:31:53 GMT",
51
+ "tag": "@fluentui/react-progress_v9.1.40",
52
+ "version": "9.1.40",
53
+ "comments": {
54
+ "patch": [
55
+ {
56
+ "author": "martinhochel@microsoft.com",
57
+ "package": "@fluentui/react-progress",
58
+ "commit": "e61473fa10195f6ebf2308205c1e72e91b711831",
59
+ "comment": "fix: bump swc core to mitigate transpilation memory leaks"
60
+ },
61
+ {
62
+ "author": "beachball",
63
+ "package": "@fluentui/react-progress",
64
+ "comment": "Bump @fluentui/react-field to v9.1.30",
65
+ "commit": "e16520437e10cd824ac254dd797e32762b5de72d"
66
+ },
67
+ {
68
+ "author": "beachball",
69
+ "package": "@fluentui/react-progress",
70
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.11",
71
+ "commit": "e16520437e10cd824ac254dd797e32762b5de72d"
72
+ },
73
+ {
74
+ "author": "beachball",
75
+ "package": "@fluentui/react-progress",
76
+ "comment": "Bump @fluentui/react-shared-contexts to v9.9.0",
77
+ "commit": "e16520437e10cd824ac254dd797e32762b5de72d"
78
+ },
79
+ {
80
+ "author": "beachball",
81
+ "package": "@fluentui/react-progress",
82
+ "comment": "Bump @fluentui/react-theme to v9.1.13",
83
+ "commit": "e16520437e10cd824ac254dd797e32762b5de72d"
84
+ },
85
+ {
86
+ "author": "beachball",
87
+ "package": "@fluentui/react-progress",
88
+ "comment": "Bump @fluentui/react-utilities to v9.13.4",
89
+ "commit": "e16520437e10cd824ac254dd797e32762b5de72d"
90
+ }
91
+ ]
92
+ }
93
+ },
94
+ {
95
+ "date": "Wed, 20 Sep 2023 17:47:41 GMT",
96
+ "tag": "@fluentui/react-progress_v9.1.39",
97
+ "version": "9.1.39",
98
+ "comments": {
99
+ "patch": [
100
+ {
101
+ "author": "martinhochel@microsoft.com",
102
+ "package": "@fluentui/react-progress",
103
+ "commit": "41d0ed0376ad79f1f5f5c4c7487515a1c6be35f0",
104
+ "comment": "chore: trigger manual version bump after broken release"
105
+ },
106
+ {
107
+ "author": "beachball",
108
+ "package": "@fluentui/react-progress",
109
+ "comment": "Bump @fluentui/react-field to v9.1.29",
110
+ "commit": "41d0ed0376ad79f1f5f5c4c7487515a1c6be35f0"
111
+ },
112
+ {
113
+ "author": "beachball",
114
+ "package": "@fluentui/react-progress",
115
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.10",
116
+ "commit": "41d0ed0376ad79f1f5f5c4c7487515a1c6be35f0"
117
+ },
118
+ {
119
+ "author": "beachball",
120
+ "package": "@fluentui/react-progress",
121
+ "comment": "Bump @fluentui/react-shared-contexts to v9.8.1",
122
+ "commit": "41d0ed0376ad79f1f5f5c4c7487515a1c6be35f0"
123
+ }
124
+ ]
125
+ }
126
+ },
127
+ {
128
+ "date": "Wed, 20 Sep 2023 14:59:53 GMT",
6
129
  "tag": "@fluentui/react-progress_v9.1.38",
7
130
  "version": "9.1.38",
8
131
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,52 @@
1
1
  # Change Log - @fluentui/react-progress
2
2
 
3
- This log was last generated on Wed, 20 Sep 2023 14:13:59 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 26 Sep 2023 17:44:15 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.1.41](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.41)
8
+
9
+ Tue, 26 Sep 2023 17:44:15 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.40..@fluentui/react-progress_v9.1.41)
11
+
12
+ ### Patches
13
+
14
+ - chore: trigger manual version bump after broken release ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by yuanboxue@microsoft.com)
15
+ - Bump @fluentui/react-field to v9.1.31 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
16
+ - Bump @fluentui/react-jsx-runtime to v9.0.12 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
17
+ - Bump @fluentui/react-shared-contexts to v9.9.1 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
18
+ - Bump @fluentui/react-theme to v9.1.14 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
19
+ - Bump @fluentui/react-utilities to v9.13.5 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
20
+
21
+ ## [9.1.40](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.40)
22
+
23
+ Tue, 26 Sep 2023 15:31:53 GMT
24
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.39..@fluentui/react-progress_v9.1.40)
25
+
26
+ ### Patches
27
+
28
+ - fix: bump swc core to mitigate transpilation memory leaks ([PR #29253](https://github.com/microsoft/fluentui/pull/29253) by martinhochel@microsoft.com)
29
+ - Bump @fluentui/react-field to v9.1.30 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
30
+ - Bump @fluentui/react-jsx-runtime to v9.0.11 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
31
+ - Bump @fluentui/react-shared-contexts to v9.9.0 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
32
+ - Bump @fluentui/react-theme to v9.1.13 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
33
+ - Bump @fluentui/react-utilities to v9.13.4 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
34
+
35
+ ## [9.1.39](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.39)
36
+
37
+ Wed, 20 Sep 2023 17:47:41 GMT
38
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.38..@fluentui/react-progress_v9.1.39)
39
+
40
+ ### Patches
41
+
42
+ - chore: trigger manual version bump after broken release ([PR #29197](https://github.com/microsoft/fluentui/pull/29197) by martinhochel@microsoft.com)
43
+ - Bump @fluentui/react-field to v9.1.29 ([PR #29197](https://github.com/microsoft/fluentui/pull/29197) by beachball)
44
+ - Bump @fluentui/react-jsx-runtime to v9.0.10 ([PR #29197](https://github.com/microsoft/fluentui/pull/29197) by beachball)
45
+ - Bump @fluentui/react-shared-contexts to v9.8.1 ([PR #29197](https://github.com/microsoft/fluentui/pull/29197) by beachball)
46
+
7
47
  ## [9.1.38](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.38)
8
48
 
9
- Wed, 20 Sep 2023 14:13:59 GMT
49
+ Wed, 20 Sep 2023 14:59:53 GMT
10
50
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.37..@fluentui/react-progress_v9.1.38)
11
51
 
12
52
  ### Patches
@@ -11,9 +11,8 @@ import { clampValue, clampMax } from '../../utils/index';
11
11
  * @param props - props from this instance of ProgressBar
12
12
  * @param ref - reference to root HTMLElement of ProgressBar
13
13
  */ export const useProgressBar_unstable = (props, ref)=>{
14
- var _field, _field1;
15
14
  const field = useFieldContext_unstable();
16
- const fieldState = (_field = field) === null || _field === void 0 ? void 0 : _field.validationState;
15
+ const fieldState = field === null || field === void 0 ? void 0 : field.validationState;
17
16
  const { color = fieldState === 'error' || fieldState === 'warning' || fieldState === 'success' ? fieldState : 'brand', shape = 'rounded', thickness = 'medium' } = props;
18
17
  var _props_max;
19
18
  const max = clampMax((_props_max = props.max) !== null && _props_max !== void 0 ? _props_max : 1);
@@ -24,17 +23,16 @@ import { clampValue, clampMax } from '../../utils/index';
24
23
  'aria-valuemin': value !== undefined ? 0 : undefined,
25
24
  'aria-valuemax': value !== undefined ? max : undefined,
26
25
  'aria-valuenow': value,
27
- 'aria-labelledby': (_field1 = field) === null || _field1 === void 0 ? void 0 : _field1.labelId,
26
+ 'aria-labelledby': field === null || field === void 0 ? void 0 : field.labelId,
28
27
  ...props
29
28
  }), {
30
29
  elementType: 'div'
31
30
  });
32
31
  if (field && (field.validationMessageId || field.hintId)) {
33
- var _field2, _field3;
34
32
  // Prepend the field's validation message and/or hint to the user's aria-describedby
35
33
  root['aria-describedby'] = [
36
- (_field2 = field) === null || _field2 === void 0 ? void 0 : _field2.validationMessageId,
37
- (_field3 = field) === null || _field3 === void 0 ? void 0 : _field3.hintId,
34
+ field === null || field === void 0 ? void 0 : field.validationMessageId,
35
+ field === null || field === void 0 ? void 0 : field.hintId,
38
36
  root['aria-describedby']
39
37
  ].filter(Boolean).join(' ');
40
38
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["useProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { clampValue, clampMax } from '../../utils/index';\nimport type { ProgressBarProps, ProgressBarState } from './ProgressBar.types';\n\n/**\n * Create the state required to render ProgressBar.\n *\n * The returned state can be modified with hooks such as useProgressBarStyles_unstable,\n * before being passed to renderProgressBar_unstable.\n *\n * @param props - props from this instance of ProgressBar\n * @param ref - reference to root HTMLElement of ProgressBar\n */\nexport const useProgressBar_unstable = (props: ProgressBarProps, ref: React.Ref<HTMLElement>): ProgressBarState => {\n const field = useFieldContext_unstable();\n const fieldState = field?.validationState;\n\n const {\n color = fieldState === 'error' || fieldState === 'warning' || fieldState === 'success' ? fieldState : 'brand',\n shape = 'rounded',\n thickness = 'medium',\n } = props;\n const max = clampMax(props.max ?? 1);\n const value = clampValue(props.value, max);\n\n const root = slot.always(\n getNativeElementProps('div', {\n ref,\n role: 'progressbar',\n 'aria-valuemin': value !== undefined ? 0 : undefined,\n 'aria-valuemax': value !== undefined ? max : undefined,\n 'aria-valuenow': value,\n 'aria-labelledby': field?.labelId,\n ...props,\n }),\n { elementType: 'div' },\n );\n if (field && (field.validationMessageId || field.hintId)) {\n // Prepend the field's validation message and/or hint to the user's aria-describedby\n root['aria-describedby'] = [field?.validationMessageId, field?.hintId, root['aria-describedby']]\n .filter(Boolean)\n .join(' ');\n }\n const bar = slot.always(props.bar, { elementType: 'div' });\n const state: ProgressBarState = {\n color,\n max,\n shape,\n thickness,\n value,\n components: { root: 'div', bar: 'div' },\n root,\n bar,\n };\n\n return state;\n};\n"],"names":["React","useFieldContext_unstable","getNativeElementProps","slot","clampValue","clampMax","useProgressBar_unstable","props","ref","field","fieldState","validationState","color","shape","thickness","max","value","root","always","role","undefined","labelId","elementType","validationMessageId","hintId","filter","Boolean","join","bar","state","components"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,QAAQ,wBAAwB;AACjE,SAASC,qBAAqB,EAAEC,IAAI,QAAQ,4BAA4B;AACxE,SAASC,UAAU,EAAEC,QAAQ,QAAQ,oBAAoB;AAGzD;;;;;;;;CAQC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAyBC;QAE5CC,QAiBIA;IAlBvB,MAAMA,QAAQR;IACd,MAAMS,cAAaD,SAAAA,mBAAAA,6BAAAA,OAAOE,eAAe;IAEzC,MAAM,EACJC,QAAQF,eAAe,WAAWA,eAAe,aAAaA,eAAe,YAAYA,aAAa,OAAO,EAC7GG,QAAQ,SAAS,EACjBC,YAAY,QAAQ,EACrB,GAAGP;QACiBA;IAArB,MAAMQ,MAAMV,SAASE,CAAAA,aAAAA,MAAMQ,GAAG,cAATR,wBAAAA,aAAa;IAClC,MAAMS,QAAQZ,WAAWG,MAAMS,KAAK,EAAED;IAEtC,MAAME,OAAOd,KAAKe,MAAM,CACtBhB,sBAAsB,OAAO;QAC3BM;QACAW,MAAM;QACN,iBAAiBH,UAAUI,YAAY,IAAIA;QAC3C,iBAAiBJ,UAAUI,YAAYL,MAAMK;QAC7C,iBAAiBJ;QACjB,iBAAiB,GAAEP,UAAAA,mBAAAA,8BAAAA,QAAOY,OAAO;QACjC,GAAGd,KAAK;IACV,IACA;QAAEe,aAAa;IAAM;IAEvB,IAAIb,SAAUA,CAAAA,MAAMc,mBAAmB,IAAId,MAAMe,MAAM,AAAD,GAAI;YAE5Bf,SAA4BA;QADxD,oFAAoF;QACpFQ,IAAI,CAAC,mBAAmB,GAAG;aAACR,UAAAA,mBAAAA,8BAAAA,QAAOc,mBAAmB;aAAEd,UAAAA,mBAAAA,8BAAAA,QAAOe,MAAM;YAAEP,IAAI,CAAC,mBAAmB;SAAC,CAC7FQ,MAAM,CAACC,SACPC,IAAI,CAAC;IACV;IACA,MAAMC,MAAMzB,KAAKe,MAAM,CAACX,MAAMqB,GAAG,EAAE;QAAEN,aAAa;IAAM;IACxD,MAAMO,QAA0B;QAC9BjB;QACAG;QACAF;QACAC;QACAE;QACAc,YAAY;YAAEb,MAAM;YAAOW,KAAK;QAAM;QACtCX;QACAW;IACF;IAEA,OAAOC;AACT,EAAE"}
1
+ {"version":3,"sources":["useProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { clampValue, clampMax } from '../../utils/index';\nimport type { ProgressBarProps, ProgressBarState } from './ProgressBar.types';\n\n/**\n * Create the state required to render ProgressBar.\n *\n * The returned state can be modified with hooks such as useProgressBarStyles_unstable,\n * before being passed to renderProgressBar_unstable.\n *\n * @param props - props from this instance of ProgressBar\n * @param ref - reference to root HTMLElement of ProgressBar\n */\nexport const useProgressBar_unstable = (props: ProgressBarProps, ref: React.Ref<HTMLElement>): ProgressBarState => {\n const field = useFieldContext_unstable();\n const fieldState = field?.validationState;\n\n const {\n color = fieldState === 'error' || fieldState === 'warning' || fieldState === 'success' ? fieldState : 'brand',\n shape = 'rounded',\n thickness = 'medium',\n } = props;\n const max = clampMax(props.max ?? 1);\n const value = clampValue(props.value, max);\n\n const root = slot.always(\n getNativeElementProps('div', {\n ref,\n role: 'progressbar',\n 'aria-valuemin': value !== undefined ? 0 : undefined,\n 'aria-valuemax': value !== undefined ? max : undefined,\n 'aria-valuenow': value,\n 'aria-labelledby': field?.labelId,\n ...props,\n }),\n { elementType: 'div' },\n );\n if (field && (field.validationMessageId || field.hintId)) {\n // Prepend the field's validation message and/or hint to the user's aria-describedby\n root['aria-describedby'] = [field?.validationMessageId, field?.hintId, root['aria-describedby']]\n .filter(Boolean)\n .join(' ');\n }\n const bar = slot.always(props.bar, { elementType: 'div' });\n const state: ProgressBarState = {\n color,\n max,\n shape,\n thickness,\n value,\n components: { root: 'div', bar: 'div' },\n root,\n bar,\n };\n\n return state;\n};\n"],"names":["React","useFieldContext_unstable","getNativeElementProps","slot","clampValue","clampMax","useProgressBar_unstable","props","ref","field","fieldState","validationState","color","shape","thickness","max","value","root","always","role","undefined","labelId","elementType","validationMessageId","hintId","filter","Boolean","join","bar","state","components"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,QAAQ,wBAAwB;AACjE,SAASC,qBAAqB,EAAEC,IAAI,QAAQ,4BAA4B;AACxE,SAASC,UAAU,EAAEC,QAAQ,QAAQ,oBAAoB;AAGzD;;;;;;;;CAQC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAyBC;IAC/D,MAAMC,QAAQR;IACd,MAAMS,aAAaD,kBAAAA,4BAAAA,MAAOE,eAAe;IAEzC,MAAM,EACJC,QAAQF,eAAe,WAAWA,eAAe,aAAaA,eAAe,YAAYA,aAAa,OAAO,EAC7GG,QAAQ,SAAS,EACjBC,YAAY,QAAQ,EACrB,GAAGP;QACiBA;IAArB,MAAMQ,MAAMV,SAASE,CAAAA,aAAAA,MAAMQ,GAAG,cAATR,wBAAAA,aAAa;IAClC,MAAMS,QAAQZ,WAAWG,MAAMS,KAAK,EAAED;IAEtC,MAAME,OAAOd,KAAKe,MAAM,CACtBhB,sBAAsB,OAAO;QAC3BM;QACAW,MAAM;QACN,iBAAiBH,UAAUI,YAAY,IAAIA;QAC3C,iBAAiBJ,UAAUI,YAAYL,MAAMK;QAC7C,iBAAiBJ;QACjB,iBAAiB,EAAEP,kBAAAA,4BAAAA,MAAOY,OAAO;QACjC,GAAGd,KAAK;IACV,IACA;QAAEe,aAAa;IAAM;IAEvB,IAAIb,SAAUA,CAAAA,MAAMc,mBAAmB,IAAId,MAAMe,MAAM,AAAD,GAAI;QACxD,oFAAoF;QACpFP,IAAI,CAAC,mBAAmB,GAAG;YAACR,kBAAAA,4BAAAA,MAAOc,mBAAmB;YAAEd,kBAAAA,4BAAAA,MAAOe,MAAM;YAAEP,IAAI,CAAC,mBAAmB;SAAC,CAC7FQ,MAAM,CAACC,SACPC,IAAI,CAAC;IACV;IACA,MAAMC,MAAMzB,KAAKe,MAAM,CAACX,MAAMqB,GAAG,EAAE;QAAEN,aAAa;IAAM;IACxD,MAAMO,QAA0B;QAC9BjB;QACAG;QACAF;QACAC;QACAE;QACAc,YAAY;YAAEb,MAAM;YAAOW,KAAK;QAAM;QACtCX;QACAW;IACF;IAEA,OAAOC;AACT,EAAE"}
@@ -14,9 +14,8 @@ const _reactfield = require("@fluentui/react-field");
14
14
  const _reactutilities = require("@fluentui/react-utilities");
15
15
  const _index = require("../../utils/index");
16
16
  const useProgressBar_unstable = (props, ref)=>{
17
- var _field, _field1;
18
17
  const field = (0, _reactfield.useFieldContext_unstable)();
19
- const fieldState = (_field = field) === null || _field === void 0 ? void 0 : _field.validationState;
18
+ const fieldState = field === null || field === void 0 ? void 0 : field.validationState;
20
19
  const { color = fieldState === 'error' || fieldState === 'warning' || fieldState === 'success' ? fieldState : 'brand', shape = 'rounded', thickness = 'medium' } = props;
21
20
  var _props_max;
22
21
  const max = (0, _index.clampMax)((_props_max = props.max) !== null && _props_max !== void 0 ? _props_max : 1);
@@ -27,17 +26,16 @@ const useProgressBar_unstable = (props, ref)=>{
27
26
  'aria-valuemin': value !== undefined ? 0 : undefined,
28
27
  'aria-valuemax': value !== undefined ? max : undefined,
29
28
  'aria-valuenow': value,
30
- 'aria-labelledby': (_field1 = field) === null || _field1 === void 0 ? void 0 : _field1.labelId,
29
+ 'aria-labelledby': field === null || field === void 0 ? void 0 : field.labelId,
31
30
  ...props
32
31
  }), {
33
32
  elementType: 'div'
34
33
  });
35
34
  if (field && (field.validationMessageId || field.hintId)) {
36
- var _field2, _field3;
37
35
  // Prepend the field's validation message and/or hint to the user's aria-describedby
38
36
  root['aria-describedby'] = [
39
- (_field2 = field) === null || _field2 === void 0 ? void 0 : _field2.validationMessageId,
40
- (_field3 = field) === null || _field3 === void 0 ? void 0 : _field3.hintId,
37
+ field === null || field === void 0 ? void 0 : field.validationMessageId,
38
+ field === null || field === void 0 ? void 0 : field.hintId,
41
39
  root['aria-describedby']
42
40
  ].filter(Boolean).join(' ');
43
41
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["useProgressBar.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { clampValue, clampMax } from '../../utils/index';\n/**\n * Create the state required to render ProgressBar.\n *\n * The returned state can be modified with hooks such as useProgressBarStyles_unstable,\n * before being passed to renderProgressBar_unstable.\n *\n * @param props - props from this instance of ProgressBar\n * @param ref - reference to root HTMLElement of ProgressBar\n */ export const useProgressBar_unstable = (props, ref)=>{\n var _field, _field1;\n const field = useFieldContext_unstable();\n const fieldState = (_field = field) === null || _field === void 0 ? void 0 : _field.validationState;\n const { color = fieldState === 'error' || fieldState === 'warning' || fieldState === 'success' ? fieldState : 'brand', shape = 'rounded', thickness = 'medium' } = props;\n var _props_max;\n const max = clampMax((_props_max = props.max) !== null && _props_max !== void 0 ? _props_max : 1);\n const value = clampValue(props.value, max);\n const root = slot.always(getNativeElementProps('div', {\n ref,\n role: 'progressbar',\n 'aria-valuemin': value !== undefined ? 0 : undefined,\n 'aria-valuemax': value !== undefined ? max : undefined,\n 'aria-valuenow': value,\n 'aria-labelledby': (_field1 = field) === null || _field1 === void 0 ? void 0 : _field1.labelId,\n ...props\n }), {\n elementType: 'div'\n });\n if (field && (field.validationMessageId || field.hintId)) {\n var _field2, _field3;\n // Prepend the field's validation message and/or hint to the user's aria-describedby\n root['aria-describedby'] = [\n (_field2 = field) === null || _field2 === void 0 ? void 0 : _field2.validationMessageId,\n (_field3 = field) === null || _field3 === void 0 ? void 0 : _field3.hintId,\n root['aria-describedby']\n ].filter(Boolean).join(' ');\n }\n const bar = slot.always(props.bar, {\n elementType: 'div'\n });\n const state = {\n color,\n max,\n shape,\n thickness,\n value,\n components: {\n root: 'div',\n bar: 'div'\n },\n root,\n bar\n };\n return state;\n};\n"],"names":["useProgressBar_unstable","props","ref","_field","_field1","field","useFieldContext_unstable","fieldState","validationState","color","shape","thickness","_props_max","max","clampMax","value","clampValue","root","slot","always","getNativeElementProps","role","undefined","labelId","elementType","validationMessageId","hintId","_field2","_field3","filter","Boolean","join","bar","state","components"],"mappings":";;;;+BAYiBA;;;eAAAA;;;;iEAZM;4BACkB;gCACG;uBACP;AAS1B,MAAMA,0BAA0B,CAACC,OAAOC;IAC/C,IAAIC,QAAQC;IACZ,MAAMC,QAAQC,IAAAA,oCAAwB;IACtC,MAAMC,aAAa,AAACJ,CAAAA,SAASE,KAAI,MAAO,QAAQF,WAAW,KAAK,IAAI,KAAK,IAAIA,OAAOK,eAAe;IACnG,MAAM,EAAEC,QAAQF,eAAe,WAAWA,eAAe,aAAaA,eAAe,YAAYA,aAAa,OAAO,EAAEG,QAAQ,SAAS,EAAEC,YAAY,QAAQ,EAAE,GAAGV;IACnK,IAAIW;IACJ,MAAMC,MAAMC,IAAAA,eAAQ,EAAC,AAACF,CAAAA,aAAaX,MAAMY,GAAG,AAAD,MAAO,QAAQD,eAAe,KAAK,IAAIA,aAAa;IAC/F,MAAMG,QAAQC,IAAAA,iBAAU,EAACf,MAAMc,KAAK,EAAEF;IACtC,MAAMI,OAAOC,oBAAI,CAACC,MAAM,CAACC,IAAAA,qCAAqB,EAAC,OAAO;QAClDlB;QACAmB,MAAM;QACN,iBAAiBN,UAAUO,YAAY,IAAIA;QAC3C,iBAAiBP,UAAUO,YAAYT,MAAMS;QAC7C,iBAAiBP;QACjB,mBAAmB,AAACX,CAAAA,UAAUC,KAAI,MAAO,QAAQD,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQmB,OAAO;QAC9F,GAAGtB,KAAK;IACZ,IAAI;QACAuB,aAAa;IACjB;IACA,IAAInB,SAAUA,CAAAA,MAAMoB,mBAAmB,IAAIpB,MAAMqB,MAAM,AAAD,GAAI;QACtD,IAAIC,SAASC;QACb,oFAAoF;QACpFX,IAAI,CAAC,mBAAmB,GAAG;YACtBU,CAAAA,UAAUtB,KAAI,MAAO,QAAQsB,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQF,mBAAmB;YACtFG,CAAAA,UAAUvB,KAAI,MAAO,QAAQuB,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQF,MAAM;YAC1ET,IAAI,CAAC,mBAAmB;SAC3B,CAACY,MAAM,CAACC,SAASC,IAAI,CAAC;IAC3B;IACA,MAAMC,MAAMd,oBAAI,CAACC,MAAM,CAAClB,MAAM+B,GAAG,EAAE;QAC/BR,aAAa;IACjB;IACA,MAAMS,QAAQ;QACVxB;QACAI;QACAH;QACAC;QACAI;QACAmB,YAAY;YACRjB,MAAM;YACNe,KAAK;QACT;QACAf;QACAe;IACJ;IACA,OAAOC;AACX"}
1
+ {"version":3,"sources":["useProgressBar.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { clampValue, clampMax } from '../../utils/index';\n/**\n * Create the state required to render ProgressBar.\n *\n * The returned state can be modified with hooks such as useProgressBarStyles_unstable,\n * before being passed to renderProgressBar_unstable.\n *\n * @param props - props from this instance of ProgressBar\n * @param ref - reference to root HTMLElement of ProgressBar\n */ export const useProgressBar_unstable = (props, ref)=>{\n const field = useFieldContext_unstable();\n const fieldState = field === null || field === void 0 ? void 0 : field.validationState;\n const { color = fieldState === 'error' || fieldState === 'warning' || fieldState === 'success' ? fieldState : 'brand', shape = 'rounded', thickness = 'medium' } = props;\n var _props_max;\n const max = clampMax((_props_max = props.max) !== null && _props_max !== void 0 ? _props_max : 1);\n const value = clampValue(props.value, max);\n const root = slot.always(getNativeElementProps('div', {\n ref,\n role: 'progressbar',\n 'aria-valuemin': value !== undefined ? 0 : undefined,\n 'aria-valuemax': value !== undefined ? max : undefined,\n 'aria-valuenow': value,\n 'aria-labelledby': field === null || field === void 0 ? void 0 : field.labelId,\n ...props\n }), {\n elementType: 'div'\n });\n if (field && (field.validationMessageId || field.hintId)) {\n // Prepend the field's validation message and/or hint to the user's aria-describedby\n root['aria-describedby'] = [\n field === null || field === void 0 ? void 0 : field.validationMessageId,\n field === null || field === void 0 ? void 0 : field.hintId,\n root['aria-describedby']\n ].filter(Boolean).join(' ');\n }\n const bar = slot.always(props.bar, {\n elementType: 'div'\n });\n const state = {\n color,\n max,\n shape,\n thickness,\n value,\n components: {\n root: 'div',\n bar: 'div'\n },\n root,\n bar\n };\n return state;\n};\n"],"names":["useProgressBar_unstable","props","ref","field","useFieldContext_unstable","fieldState","validationState","color","shape","thickness","_props_max","max","clampMax","value","clampValue","root","slot","always","getNativeElementProps","role","undefined","labelId","elementType","validationMessageId","hintId","filter","Boolean","join","bar","state","components"],"mappings":";;;;+BAYiBA;;;eAAAA;;;;iEAZM;4BACkB;gCACG;uBACP;AAS1B,MAAMA,0BAA0B,CAACC,OAAOC;IAC/C,MAAMC,QAAQC,IAAAA,oCAAwB;IACtC,MAAMC,aAAaF,UAAU,QAAQA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMG,eAAe;IACtF,MAAM,EAAEC,QAAQF,eAAe,WAAWA,eAAe,aAAaA,eAAe,YAAYA,aAAa,OAAO,EAAEG,QAAQ,SAAS,EAAEC,YAAY,QAAQ,EAAE,GAAGR;IACnK,IAAIS;IACJ,MAAMC,MAAMC,IAAAA,eAAQ,EAAC,AAACF,CAAAA,aAAaT,MAAMU,GAAG,AAAD,MAAO,QAAQD,eAAe,KAAK,IAAIA,aAAa;IAC/F,MAAMG,QAAQC,IAAAA,iBAAU,EAACb,MAAMY,KAAK,EAAEF;IACtC,MAAMI,OAAOC,oBAAI,CAACC,MAAM,CAACC,IAAAA,qCAAqB,EAAC,OAAO;QAClDhB;QACAiB,MAAM;QACN,iBAAiBN,UAAUO,YAAY,IAAIA;QAC3C,iBAAiBP,UAAUO,YAAYT,MAAMS;QAC7C,iBAAiBP;QACjB,mBAAmBV,UAAU,QAAQA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMkB,OAAO;QAC9E,GAAGpB,KAAK;IACZ,IAAI;QACAqB,aAAa;IACjB;IACA,IAAInB,SAAUA,CAAAA,MAAMoB,mBAAmB,IAAIpB,MAAMqB,MAAM,AAAD,GAAI;QACtD,oFAAoF;QACpFT,IAAI,CAAC,mBAAmB,GAAG;YACvBZ,UAAU,QAAQA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMoB,mBAAmB;YACvEpB,UAAU,QAAQA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMqB,MAAM;YAC1DT,IAAI,CAAC,mBAAmB;SAC3B,CAACU,MAAM,CAACC,SAASC,IAAI,CAAC;IAC3B;IACA,MAAMC,MAAMZ,oBAAI,CAACC,MAAM,CAAChB,MAAM2B,GAAG,EAAE;QAC/BN,aAAa;IACjB;IACA,MAAMO,QAAQ;QACVtB;QACAI;QACAH;QACAC;QACAI;QACAiB,YAAY;YACRf,MAAM;YACNa,KAAK;QACT;QACAb;QACAa;IACJ;IACA,OAAOC;AACX"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-progress",
3
- "version": "9.1.38",
3
+ "version": "9.1.41",
4
4
  "description": "Progress component for FluentUI v9",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -33,11 +33,11 @@
33
33
  "@fluentui/scripts-tasks": "*"
34
34
  },
35
35
  "dependencies": {
36
- "@fluentui/react-field": "^9.1.28",
37
- "@fluentui/react-jsx-runtime": "^9.0.9",
38
- "@fluentui/react-shared-contexts": "^9.8.0",
39
- "@fluentui/react-theme": "^9.1.12",
40
- "@fluentui/react-utilities": "^9.13.3",
36
+ "@fluentui/react-field": "^9.1.31",
37
+ "@fluentui/react-jsx-runtime": "^9.0.12",
38
+ "@fluentui/react-shared-contexts": "^9.9.1",
39
+ "@fluentui/react-theme": "^9.1.14",
40
+ "@fluentui/react-utilities": "^9.13.5",
41
41
  "@griffel/react": "^1.5.14",
42
42
  "@swc/helpers": "^0.5.1"
43
43
  },