@fluentui/react-progress 9.1.39 → 9.1.42
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +112 -1
- package/CHANGELOG.md +40 -2
- package/lib/components/ProgressBar/useProgressBar.js +4 -6
- package/lib/components/ProgressBar/useProgressBar.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/useProgressBar.js +4 -6
- package/lib-commonjs/components/ProgressBar/useProgressBar.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.json
CHANGED
@@ -2,7 +2,118 @@
|
|
2
2
|
"name": "@fluentui/react-progress",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
5
|
+
"date": "Mon, 02 Oct 2023 08:53:05 GMT",
|
6
|
+
"tag": "@fluentui/react-progress_v9.1.42",
|
7
|
+
"version": "9.1.42",
|
8
|
+
"comments": {
|
9
|
+
"patch": [
|
10
|
+
{
|
11
|
+
"author": "beachball",
|
12
|
+
"package": "@fluentui/react-progress",
|
13
|
+
"comment": "Bump @fluentui/react-field to v9.1.32",
|
14
|
+
"commit": "18ddec93bdb85a009bc1392058c52b2ea336340e"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"author": "beachball",
|
18
|
+
"package": "@fluentui/react-progress",
|
19
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.9.2",
|
20
|
+
"commit": "18ddec93bdb85a009bc1392058c52b2ea336340e"
|
21
|
+
}
|
22
|
+
]
|
23
|
+
}
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"date": "Tue, 26 Sep 2023 17:49:09 GMT",
|
27
|
+
"tag": "@fluentui/react-progress_v9.1.41",
|
28
|
+
"version": "9.1.41",
|
29
|
+
"comments": {
|
30
|
+
"patch": [
|
31
|
+
{
|
32
|
+
"author": "yuanboxue@microsoft.com",
|
33
|
+
"package": "@fluentui/react-progress",
|
34
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d",
|
35
|
+
"comment": "chore: trigger manual version bump after broken release"
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"author": "beachball",
|
39
|
+
"package": "@fluentui/react-progress",
|
40
|
+
"comment": "Bump @fluentui/react-field to v9.1.31",
|
41
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"author": "beachball",
|
45
|
+
"package": "@fluentui/react-progress",
|
46
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.12",
|
47
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"author": "beachball",
|
51
|
+
"package": "@fluentui/react-progress",
|
52
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.9.1",
|
53
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"author": "beachball",
|
57
|
+
"package": "@fluentui/react-progress",
|
58
|
+
"comment": "Bump @fluentui/react-theme to v9.1.14",
|
59
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"author": "beachball",
|
63
|
+
"package": "@fluentui/react-progress",
|
64
|
+
"comment": "Bump @fluentui/react-utilities to v9.13.5",
|
65
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
66
|
+
}
|
67
|
+
]
|
68
|
+
}
|
69
|
+
},
|
70
|
+
{
|
71
|
+
"date": "Tue, 26 Sep 2023 15:31:53 GMT",
|
72
|
+
"tag": "@fluentui/react-progress_v9.1.40",
|
73
|
+
"version": "9.1.40",
|
74
|
+
"comments": {
|
75
|
+
"patch": [
|
76
|
+
{
|
77
|
+
"author": "martinhochel@microsoft.com",
|
78
|
+
"package": "@fluentui/react-progress",
|
79
|
+
"commit": "e61473fa10195f6ebf2308205c1e72e91b711831",
|
80
|
+
"comment": "fix: bump swc core to mitigate transpilation memory leaks"
|
81
|
+
},
|
82
|
+
{
|
83
|
+
"author": "beachball",
|
84
|
+
"package": "@fluentui/react-progress",
|
85
|
+
"comment": "Bump @fluentui/react-field to v9.1.30",
|
86
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
87
|
+
},
|
88
|
+
{
|
89
|
+
"author": "beachball",
|
90
|
+
"package": "@fluentui/react-progress",
|
91
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.11",
|
92
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
93
|
+
},
|
94
|
+
{
|
95
|
+
"author": "beachball",
|
96
|
+
"package": "@fluentui/react-progress",
|
97
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.9.0",
|
98
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
99
|
+
},
|
100
|
+
{
|
101
|
+
"author": "beachball",
|
102
|
+
"package": "@fluentui/react-progress",
|
103
|
+
"comment": "Bump @fluentui/react-theme to v9.1.13",
|
104
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
105
|
+
},
|
106
|
+
{
|
107
|
+
"author": "beachball",
|
108
|
+
"package": "@fluentui/react-progress",
|
109
|
+
"comment": "Bump @fluentui/react-utilities to v9.13.4",
|
110
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
111
|
+
}
|
112
|
+
]
|
113
|
+
}
|
114
|
+
},
|
115
|
+
{
|
116
|
+
"date": "Wed, 20 Sep 2023 17:47:41 GMT",
|
6
117
|
"tag": "@fluentui/react-progress_v9.1.39",
|
7
118
|
"version": "9.1.39",
|
8
119
|
"comments": {
|
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,50 @@
|
|
1
1
|
# Change Log - @fluentui/react-progress
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Mon, 02 Oct 2023 08:53:05 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.1.42](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.42)
|
8
|
+
|
9
|
+
Mon, 02 Oct 2023 08:53:05 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.41..@fluentui/react-progress_v9.1.42)
|
11
|
+
|
12
|
+
### Patches
|
13
|
+
|
14
|
+
- Bump @fluentui/react-field to v9.1.32 ([PR #29351](https://github.com/microsoft/fluentui/pull/29351) by beachball)
|
15
|
+
- Bump @fluentui/react-shared-contexts to v9.9.2 ([PR #29351](https://github.com/microsoft/fluentui/pull/29351) by beachball)
|
16
|
+
|
17
|
+
## [9.1.41](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.41)
|
18
|
+
|
19
|
+
Tue, 26 Sep 2023 17:49:09 GMT
|
20
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.40..@fluentui/react-progress_v9.1.41)
|
21
|
+
|
22
|
+
### Patches
|
23
|
+
|
24
|
+
- chore: trigger manual version bump after broken release ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by yuanboxue@microsoft.com)
|
25
|
+
- Bump @fluentui/react-field to v9.1.31 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
26
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.12 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
27
|
+
- Bump @fluentui/react-shared-contexts to v9.9.1 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
28
|
+
- Bump @fluentui/react-theme to v9.1.14 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
29
|
+
- Bump @fluentui/react-utilities to v9.13.5 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
30
|
+
|
31
|
+
## [9.1.40](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.40)
|
32
|
+
|
33
|
+
Tue, 26 Sep 2023 15:31:53 GMT
|
34
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.39..@fluentui/react-progress_v9.1.40)
|
35
|
+
|
36
|
+
### Patches
|
37
|
+
|
38
|
+
- fix: bump swc core to mitigate transpilation memory leaks ([PR #29253](https://github.com/microsoft/fluentui/pull/29253) by martinhochel@microsoft.com)
|
39
|
+
- Bump @fluentui/react-field to v9.1.30 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
40
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.11 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
41
|
+
- Bump @fluentui/react-shared-contexts to v9.9.0 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
42
|
+
- Bump @fluentui/react-theme to v9.1.13 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
43
|
+
- Bump @fluentui/react-utilities to v9.13.4 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
44
|
+
|
7
45
|
## [9.1.39](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.39)
|
8
46
|
|
9
|
-
Wed, 20 Sep 2023 17:
|
47
|
+
Wed, 20 Sep 2023 17:47:41 GMT
|
10
48
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.38..@fluentui/react-progress_v9.1.39)
|
11
49
|
|
12
50
|
### 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 =
|
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':
|
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
|
-
|
37
|
-
|
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;
|
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 =
|
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':
|
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
|
-
|
40
|
-
|
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
|
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.
|
3
|
+
"version": "9.1.42",
|
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.
|
37
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
38
|
-
"@fluentui/react-shared-contexts": "^9.
|
39
|
-
"@fluentui/react-theme": "^9.1.
|
40
|
-
"@fluentui/react-utilities": "^9.13.
|
36
|
+
"@fluentui/react-field": "^9.1.32",
|
37
|
+
"@fluentui/react-jsx-runtime": "^9.0.12",
|
38
|
+
"@fluentui/react-shared-contexts": "^9.9.2",
|
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
|
},
|