@fluentui/react-progress 9.1.47 → 9.1.49
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +57 -3
- package/CHANGELOG.md +26 -4
- package/lib/components/ProgressBar/useProgressBar.js +6 -3
- package/lib/components/ProgressBar/useProgressBar.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/useProgressBar.js +5 -2
- package/lib-commonjs/components/ProgressBar/useProgressBar.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.json
CHANGED
@@ -2,7 +2,61 @@
|
|
2
2
|
"name": "@fluentui/react-progress",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
5
|
+
"date": "Sat, 28 Oct 2023 23:32:06 GMT",
|
6
|
+
"tag": "@fluentui/react-progress_v9.1.49",
|
7
|
+
"version": "9.1.49",
|
8
|
+
"comments": {
|
9
|
+
"patch": [
|
10
|
+
{
|
11
|
+
"author": "beachball",
|
12
|
+
"package": "@fluentui/react-progress",
|
13
|
+
"comment": "Bump @fluentui/react-field to v9.1.39",
|
14
|
+
"commit": "555b0fae3ec7f052e765557ae243c58000514f92"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"author": "beachball",
|
18
|
+
"package": "@fluentui/react-progress",
|
19
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.11.0",
|
20
|
+
"commit": "555b0fae3ec7f052e765557ae243c58000514f92"
|
21
|
+
}
|
22
|
+
]
|
23
|
+
}
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"date": "Wed, 18 Oct 2023 17:54:05 GMT",
|
27
|
+
"tag": "@fluentui/react-progress_v9.1.48",
|
28
|
+
"version": "9.1.48",
|
29
|
+
"comments": {
|
30
|
+
"patch": [
|
31
|
+
{
|
32
|
+
"author": "bernardo.sunderhus@gmail.com",
|
33
|
+
"package": "@fluentui/react-progress",
|
34
|
+
"commit": "967882a55a7333effea42e4c24a64e8547309116",
|
35
|
+
"comment": "chore: migrate from getNativeElementProps to getIntrinsicElementProps"
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"author": "beachball",
|
39
|
+
"package": "@fluentui/react-progress",
|
40
|
+
"comment": "Bump @fluentui/react-field to v9.1.38",
|
41
|
+
"commit": "c0d3065982e1646c54ba00c1d524248b792dbcad"
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"author": "beachball",
|
45
|
+
"package": "@fluentui/react-progress",
|
46
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.18",
|
47
|
+
"commit": "c0d3065982e1646c54ba00c1d524248b792dbcad"
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"author": "beachball",
|
51
|
+
"package": "@fluentui/react-progress",
|
52
|
+
"comment": "Bump @fluentui/react-utilities to v9.15.1",
|
53
|
+
"commit": "c0d3065982e1646c54ba00c1d524248b792dbcad"
|
54
|
+
}
|
55
|
+
]
|
56
|
+
}
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"date": "Thu, 12 Oct 2023 14:55:44 GMT",
|
6
60
|
"tag": "@fluentui/react-progress_v9.1.47",
|
7
61
|
"version": "9.1.47",
|
8
62
|
"comments": {
|
@@ -11,13 +65,13 @@
|
|
11
65
|
"author": "beachball",
|
12
66
|
"package": "@fluentui/react-progress",
|
13
67
|
"comment": "Bump @fluentui/react-field to v9.1.37",
|
14
|
-
"commit": "
|
68
|
+
"commit": "8178c3cae60005bc21137aa1f3e766e18cdb4a30"
|
15
69
|
},
|
16
70
|
{
|
17
71
|
"author": "beachball",
|
18
72
|
"package": "@fluentui/react-progress",
|
19
73
|
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.17",
|
20
|
-
"commit": "
|
74
|
+
"commit": "8178c3cae60005bc21137aa1f3e766e18cdb4a30"
|
21
75
|
}
|
22
76
|
]
|
23
77
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,18 +1,40 @@
|
|
1
1
|
# Change Log - @fluentui/react-progress
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Sat, 28 Oct 2023 23:32:06 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.1.49](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.49)
|
8
|
+
|
9
|
+
Sat, 28 Oct 2023 23:32:06 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.48..@fluentui/react-progress_v9.1.49)
|
11
|
+
|
12
|
+
### Patches
|
13
|
+
|
14
|
+
- Bump @fluentui/react-field to v9.1.39 ([commit](https://github.com/microsoft/fluentui/commit/555b0fae3ec7f052e765557ae243c58000514f92) by beachball)
|
15
|
+
- Bump @fluentui/react-shared-contexts to v9.11.0 ([commit](https://github.com/microsoft/fluentui/commit/555b0fae3ec7f052e765557ae243c58000514f92) by beachball)
|
16
|
+
|
17
|
+
## [9.1.48](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.48)
|
18
|
+
|
19
|
+
Wed, 18 Oct 2023 17:54:05 GMT
|
20
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.47..@fluentui/react-progress_v9.1.48)
|
21
|
+
|
22
|
+
### Patches
|
23
|
+
|
24
|
+
- chore: migrate from getNativeElementProps to getIntrinsicElementProps ([PR #29499](https://github.com/microsoft/fluentui/pull/29499) by bernardo.sunderhus@gmail.com)
|
25
|
+
- Bump @fluentui/react-field to v9.1.38 ([PR #29560](https://github.com/microsoft/fluentui/pull/29560) by beachball)
|
26
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.18 ([PR #29560](https://github.com/microsoft/fluentui/pull/29560) by beachball)
|
27
|
+
- Bump @fluentui/react-utilities to v9.15.1 ([PR #29560](https://github.com/microsoft/fluentui/pull/29560) by beachball)
|
28
|
+
|
7
29
|
## [9.1.47](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.47)
|
8
30
|
|
9
|
-
Thu, 12 Oct 2023 14:
|
31
|
+
Thu, 12 Oct 2023 14:55:44 GMT
|
10
32
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.46..@fluentui/react-progress_v9.1.47)
|
11
33
|
|
12
34
|
### Patches
|
13
35
|
|
14
|
-
- Bump @fluentui/react-field to v9.1.37 ([PR #
|
15
|
-
- Bump @fluentui/react-jsx-runtime to v9.0.17 ([PR #
|
36
|
+
- Bump @fluentui/react-field to v9.1.37 ([PR #29513](https://github.com/microsoft/fluentui/pull/29513) by beachball)
|
37
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.17 ([PR #29513](https://github.com/microsoft/fluentui/pull/29513) by beachball)
|
16
38
|
|
17
39
|
## [9.1.46](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.46)
|
18
40
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { useFieldContext_unstable } from '@fluentui/react-field';
|
3
|
-
import {
|
3
|
+
import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
|
4
4
|
import { clampValue, clampMax } from '../../utils/index';
|
5
5
|
/**
|
6
6
|
* Create the state required to render ProgressBar.
|
@@ -17,8 +17,11 @@ import { clampValue, clampMax } from '../../utils/index';
|
|
17
17
|
var _props_max;
|
18
18
|
const max = clampMax((_props_max = props.max) !== null && _props_max !== void 0 ? _props_max : 1);
|
19
19
|
const value = clampValue(props.value, max);
|
20
|
-
const root = slot.always(
|
21
|
-
|
20
|
+
const root = slot.always(getIntrinsicElementProps('div', {
|
21
|
+
// FIXME:
|
22
|
+
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
23
|
+
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
24
|
+
ref: ref,
|
22
25
|
role: 'progressbar',
|
23
26
|
'aria-valuemin': value !== undefined ? 0 : undefined,
|
24
27
|
'aria-valuemax': value !== undefined ? max : undefined,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport {
|
1
|
+
{"version":3,"sources":["useProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { getIntrinsicElementProps, 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 getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\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","getIntrinsicElementProps","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,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAC3E,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,yBAAyB,OAAO;QAC9B,SAAS;QACT,4EAA4E;QAC5E,4FAA4F;QAC5FM,KAAKA;QACLW,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"}
|
@@ -20,8 +20,11 @@ const useProgressBar_unstable = (props, ref)=>{
|
|
20
20
|
var _props_max;
|
21
21
|
const max = (0, _index.clampMax)((_props_max = props.max) !== null && _props_max !== void 0 ? _props_max : 1);
|
22
22
|
const value = (0, _index.clampValue)(props.value, max);
|
23
|
-
const root = _reactutilities.slot.always((0, _reactutilities.
|
24
|
-
|
23
|
+
const root = _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('div', {
|
24
|
+
// FIXME:
|
25
|
+
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
26
|
+
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
27
|
+
ref: ref,
|
25
28
|
role: 'progressbar',
|
26
29
|
'aria-valuemin': value !== undefined ? 0 : undefined,
|
27
30
|
'aria-valuemax': value !== undefined ? max : undefined,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useProgressBar.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport {
|
1
|
+
{"version":3,"sources":["useProgressBar.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { getIntrinsicElementProps, 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(getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: 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","getIntrinsicElementProps","role","undefined","labelId","elementType","validationMessageId","hintId","filter","Boolean","join","bar","state","components"],"mappings":";;;;+BAYiBA;;;eAAAA;;;;iEAZM;4BACkB;gCACM;uBACV;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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json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-progress",
|
3
|
-
"version": "9.1.
|
3
|
+
"version": "9.1.49",
|
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.
|
36
|
+
"@fluentui/react-field": "^9.1.39",
|
37
|
+
"@fluentui/react-jsx-runtime": "^9.0.18",
|
38
|
+
"@fluentui/react-shared-contexts": "^9.11.0",
|
39
39
|
"@fluentui/react-theme": "^9.1.14",
|
40
|
-
"@fluentui/react-utilities": "^9.15.
|
40
|
+
"@fluentui/react-utilities": "^9.15.1",
|
41
41
|
"@griffel/react": "^1.5.14",
|
42
42
|
"@swc/helpers": "^0.5.1"
|
43
43
|
},
|