@fluentui/react-progress 0.0.0-nightly-20230926-0416.1 → 0.0.0-nightly-20230928-0417.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +107 -17
- package/CHANGELOG.md +39 -11
- 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 +8 -8
package/CHANGELOG.json
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
"name": "@fluentui/react-progress",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-progress_v0.0.0-nightly-
|
7
|
-
"version": "0.0.0-nightly-
|
5
|
+
"date": "Thu, 28 Sep 2023 04:24:04 GMT",
|
6
|
+
"tag": "@fluentui/react-progress_v0.0.0-nightly-20230928-0417.1",
|
7
|
+
"version": "0.0.0-nightly-20230928-0417.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
@@ -16,44 +16,134 @@
|
|
16
16
|
{
|
17
17
|
"author": "beachball",
|
18
18
|
"package": "@fluentui/react-progress",
|
19
|
-
"comment": "Bump @fluentui/react-field to v0.0.0-nightly-
|
20
|
-
"commit": "
|
19
|
+
"comment": "Bump @fluentui/react-field to v0.0.0-nightly-20230928-0417.1",
|
20
|
+
"commit": "54e49a37cd40d3a7ae9213ae690c1a3c7d9dc842"
|
21
21
|
},
|
22
22
|
{
|
23
23
|
"author": "beachball",
|
24
24
|
"package": "@fluentui/react-progress",
|
25
|
-
"comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-
|
26
|
-
"commit": "
|
25
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230928-0417.1",
|
26
|
+
"commit": "54e49a37cd40d3a7ae9213ae690c1a3c7d9dc842"
|
27
27
|
},
|
28
28
|
{
|
29
29
|
"author": "beachball",
|
30
30
|
"package": "@fluentui/react-progress",
|
31
|
-
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
32
|
-
"commit": "
|
31
|
+
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230928-0417.1",
|
32
|
+
"commit": "54e49a37cd40d3a7ae9213ae690c1a3c7d9dc842"
|
33
33
|
},
|
34
34
|
{
|
35
35
|
"author": "beachball",
|
36
36
|
"package": "@fluentui/react-progress",
|
37
|
-
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-
|
38
|
-
"commit": "
|
37
|
+
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230928-0417.1",
|
38
|
+
"commit": "54e49a37cd40d3a7ae9213ae690c1a3c7d9dc842"
|
39
39
|
},
|
40
40
|
{
|
41
41
|
"author": "beachball",
|
42
42
|
"package": "@fluentui/react-progress",
|
43
|
-
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-
|
44
|
-
"commit": "
|
43
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230928-0417.1",
|
44
|
+
"commit": "54e49a37cd40d3a7ae9213ae690c1a3c7d9dc842"
|
45
45
|
},
|
46
46
|
{
|
47
47
|
"author": "beachball",
|
48
48
|
"package": "@fluentui/react-progress",
|
49
|
-
"comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-
|
50
|
-
"commit": "
|
49
|
+
"comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-20230928-0417.1",
|
50
|
+
"commit": "54e49a37cd40d3a7ae9213ae690c1a3c7d9dc842"
|
51
51
|
},
|
52
52
|
{
|
53
53
|
"author": "beachball",
|
54
54
|
"package": "@fluentui/react-progress",
|
55
|
-
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
56
|
-
"commit": "
|
55
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230928-0417.1",
|
56
|
+
"commit": "54e49a37cd40d3a7ae9213ae690c1a3c7d9dc842"
|
57
|
+
}
|
58
|
+
]
|
59
|
+
}
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"date": "Tue, 26 Sep 2023 17:49:09 GMT",
|
63
|
+
"tag": "@fluentui/react-progress_v9.1.41",
|
64
|
+
"version": "9.1.41",
|
65
|
+
"comments": {
|
66
|
+
"patch": [
|
67
|
+
{
|
68
|
+
"author": "yuanboxue@microsoft.com",
|
69
|
+
"package": "@fluentui/react-progress",
|
70
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d",
|
71
|
+
"comment": "chore: trigger manual version bump after broken release"
|
72
|
+
},
|
73
|
+
{
|
74
|
+
"author": "beachball",
|
75
|
+
"package": "@fluentui/react-progress",
|
76
|
+
"comment": "Bump @fluentui/react-field to v9.1.31",
|
77
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
78
|
+
},
|
79
|
+
{
|
80
|
+
"author": "beachball",
|
81
|
+
"package": "@fluentui/react-progress",
|
82
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.12",
|
83
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
84
|
+
},
|
85
|
+
{
|
86
|
+
"author": "beachball",
|
87
|
+
"package": "@fluentui/react-progress",
|
88
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.9.1",
|
89
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
90
|
+
},
|
91
|
+
{
|
92
|
+
"author": "beachball",
|
93
|
+
"package": "@fluentui/react-progress",
|
94
|
+
"comment": "Bump @fluentui/react-theme to v9.1.14",
|
95
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"author": "beachball",
|
99
|
+
"package": "@fluentui/react-progress",
|
100
|
+
"comment": "Bump @fluentui/react-utilities to v9.13.5",
|
101
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
102
|
+
}
|
103
|
+
]
|
104
|
+
}
|
105
|
+
},
|
106
|
+
{
|
107
|
+
"date": "Tue, 26 Sep 2023 15:31:53 GMT",
|
108
|
+
"tag": "@fluentui/react-progress_v9.1.40",
|
109
|
+
"version": "9.1.40",
|
110
|
+
"comments": {
|
111
|
+
"patch": [
|
112
|
+
{
|
113
|
+
"author": "martinhochel@microsoft.com",
|
114
|
+
"package": "@fluentui/react-progress",
|
115
|
+
"commit": "e61473fa10195f6ebf2308205c1e72e91b711831",
|
116
|
+
"comment": "fix: bump swc core to mitigate transpilation memory leaks"
|
117
|
+
},
|
118
|
+
{
|
119
|
+
"author": "beachball",
|
120
|
+
"package": "@fluentui/react-progress",
|
121
|
+
"comment": "Bump @fluentui/react-field to v9.1.30",
|
122
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
123
|
+
},
|
124
|
+
{
|
125
|
+
"author": "beachball",
|
126
|
+
"package": "@fluentui/react-progress",
|
127
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.11",
|
128
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
129
|
+
},
|
130
|
+
{
|
131
|
+
"author": "beachball",
|
132
|
+
"package": "@fluentui/react-progress",
|
133
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.9.0",
|
134
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
135
|
+
},
|
136
|
+
{
|
137
|
+
"author": "beachball",
|
138
|
+
"package": "@fluentui/react-progress",
|
139
|
+
"comment": "Bump @fluentui/react-theme to v9.1.13",
|
140
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
141
|
+
},
|
142
|
+
{
|
143
|
+
"author": "beachball",
|
144
|
+
"package": "@fluentui/react-progress",
|
145
|
+
"comment": "Bump @fluentui/react-utilities to v9.13.4",
|
146
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
57
147
|
}
|
58
148
|
]
|
59
149
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,24 +1,52 @@
|
|
1
1
|
# Change Log - @fluentui/react-progress
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Thu, 28 Sep 2023 04:24:04 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-nightly-
|
7
|
+
## [0.0.0-nightly-20230928-0417.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v0.0.0-nightly-20230928-0417.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.
|
9
|
+
Thu, 28 Sep 2023 04:24:04 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.41..@fluentui/react-progress_v0.0.0-nightly-20230928-0417.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
14
|
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
15
|
-
- Bump @fluentui/react-field to v0.0.0-nightly-
|
16
|
-
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-
|
17
|
-
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
18
|
-
- Bump @fluentui/react-theme to v0.0.0-nightly-
|
19
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-
|
20
|
-
- Bump @fluentui/react-conformance to v0.0.0-nightly-
|
21
|
-
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
15
|
+
- Bump @fluentui/react-field to v0.0.0-nightly-20230928-0417.1 ([commit](https://github.com/microsoft/fluentui/commit/54e49a37cd40d3a7ae9213ae690c1a3c7d9dc842) by beachball)
|
16
|
+
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230928-0417.1 ([commit](https://github.com/microsoft/fluentui/commit/54e49a37cd40d3a7ae9213ae690c1a3c7d9dc842) by beachball)
|
17
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230928-0417.1 ([commit](https://github.com/microsoft/fluentui/commit/54e49a37cd40d3a7ae9213ae690c1a3c7d9dc842) by beachball)
|
18
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20230928-0417.1 ([commit](https://github.com/microsoft/fluentui/commit/54e49a37cd40d3a7ae9213ae690c1a3c7d9dc842) by beachball)
|
19
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20230928-0417.1 ([commit](https://github.com/microsoft/fluentui/commit/54e49a37cd40d3a7ae9213ae690c1a3c7d9dc842) by beachball)
|
20
|
+
- Bump @fluentui/react-conformance to v0.0.0-nightly-20230928-0417.1 ([commit](https://github.com/microsoft/fluentui/commit/54e49a37cd40d3a7ae9213ae690c1a3c7d9dc842) by beachball)
|
21
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230928-0417.1 ([commit](https://github.com/microsoft/fluentui/commit/54e49a37cd40d3a7ae9213ae690c1a3c7d9dc842) by beachball)
|
22
|
+
|
23
|
+
## [9.1.41](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.41)
|
24
|
+
|
25
|
+
Tue, 26 Sep 2023 17:49:09 GMT
|
26
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.40..@fluentui/react-progress_v9.1.41)
|
27
|
+
|
28
|
+
### Patches
|
29
|
+
|
30
|
+
- chore: trigger manual version bump after broken release ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by yuanboxue@microsoft.com)
|
31
|
+
- Bump @fluentui/react-field to v9.1.31 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
32
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.12 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
33
|
+
- Bump @fluentui/react-shared-contexts to v9.9.1 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
34
|
+
- Bump @fluentui/react-theme to v9.1.14 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
35
|
+
- Bump @fluentui/react-utilities to v9.13.5 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
36
|
+
|
37
|
+
## [9.1.40](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.40)
|
38
|
+
|
39
|
+
Tue, 26 Sep 2023 15:31:53 GMT
|
40
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.39..@fluentui/react-progress_v9.1.40)
|
41
|
+
|
42
|
+
### Patches
|
43
|
+
|
44
|
+
- fix: bump swc core to mitigate transpilation memory leaks ([PR #29253](https://github.com/microsoft/fluentui/pull/29253) by martinhochel@microsoft.com)
|
45
|
+
- Bump @fluentui/react-field to v9.1.30 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
46
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.11 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
47
|
+
- Bump @fluentui/react-shared-contexts to v9.9.0 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
48
|
+
- Bump @fluentui/react-theme to v9.1.13 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
49
|
+
- Bump @fluentui/react-utilities to v9.13.4 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
22
50
|
|
23
51
|
## [9.1.39](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.39)
|
24
52
|
|
@@ -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": "0.0.0-nightly-
|
3
|
+
"version": "0.0.0-nightly-20230928-0417.1",
|
4
4
|
"description": "Progress component for FluentUI v9",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -27,17 +27,17 @@
|
|
27
27
|
},
|
28
28
|
"devDependencies": {
|
29
29
|
"@fluentui/eslint-plugin": "*",
|
30
|
-
"@fluentui/react-conformance": "0.0.0-nightly-
|
31
|
-
"@fluentui/react-conformance-griffel": "0.0.0-nightly-
|
30
|
+
"@fluentui/react-conformance": "0.0.0-nightly-20230928-0417.1",
|
31
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20230928-0417.1",
|
32
32
|
"@fluentui/scripts-api-extractor": "*",
|
33
33
|
"@fluentui/scripts-tasks": "*"
|
34
34
|
},
|
35
35
|
"dependencies": {
|
36
|
-
"@fluentui/react-field": "0.0.0-nightly-
|
37
|
-
"@fluentui/react-jsx-runtime": "0.0.0-nightly-
|
38
|
-
"@fluentui/react-shared-contexts": "0.0.0-nightly-
|
39
|
-
"@fluentui/react-theme": "0.0.0-nightly-
|
40
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
36
|
+
"@fluentui/react-field": "0.0.0-nightly-20230928-0417.1",
|
37
|
+
"@fluentui/react-jsx-runtime": "0.0.0-nightly-20230928-0417.1",
|
38
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightly-20230928-0417.1",
|
39
|
+
"@fluentui/react-theme": "0.0.0-nightly-20230928-0417.1",
|
40
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20230928-0417.1",
|
41
41
|
"@griffel/react": "^1.5.14",
|
42
42
|
"@swc/helpers": "^0.5.1"
|
43
43
|
},
|