@fluentui/react-progress 0.0.0-nightly-20230317-1454.1 → 0.0.0-nightly-20230322-0439.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/.swcrc +2 -11
- package/CHANGELOG.json +64 -13
- package/CHANGELOG.md +24 -9
- package/lib/ProgressBar.js +1 -1
- package/lib/ProgressField.js +1 -1
- package/lib/components/ProgressBar/ProgressBar.js +6 -6
- package/lib/components/ProgressBar/index.js +5 -5
- package/lib/components/ProgressBar/renderProgressBar.js +2 -2
- package/lib/components/ProgressBar/useProgressBar.js +15 -14
- package/lib/components/ProgressBar/useProgressBar.js.map +1 -1
- package/lib/components/ProgressBar/useProgressBarStyles.js +11 -11
- package/lib/components/ProgressField/ProgressField.js +3 -3
- package/lib/components/ProgressField/index.js +1 -1
- package/lib/index.js +2 -2
- package/lib/utils/clampMax.js +1 -1
- package/lib/utils/clampValue.js +1 -1
- package/lib/utils/index.js +2 -2
- package/lib-commonjs/ProgressBar.js.map +1 -1
- package/lib-commonjs/ProgressField.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/ProgressBar.js +1 -1
- package/lib-commonjs/components/ProgressBar/ProgressBar.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/index.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/renderProgressBar.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/useProgressBar.js +10 -9
- package/lib-commonjs/components/ProgressBar/useProgressBar.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js +9 -9
- package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js.map +1 -1
- package/lib-commonjs/components/ProgressField/ProgressField.js +1 -1
- package/lib-commonjs/components/ProgressField/ProgressField.js.map +1 -1
- package/lib-commonjs/components/ProgressField/index.js.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/clampMax.js +1 -1
- package/lib-commonjs/utils/clampMax.js.map +1 -1
- package/lib-commonjs/utils/clampValue.js +1 -1
- package/lib-commonjs/utils/clampValue.js.map +1 -1
- package/lib-commonjs/utils/index.js.map +1 -1
- package/package.json +7 -6
package/.swcrc
CHANGED
@@ -1,15 +1,5 @@
|
|
1
1
|
{
|
2
2
|
"$schema": "https://json.schemastore.org/swcrc",
|
3
|
-
"env": {
|
4
|
-
"targets": {
|
5
|
-
"chrome": "84",
|
6
|
-
"edge": "84",
|
7
|
-
"firefox": "75",
|
8
|
-
"opera": "73",
|
9
|
-
"safari": "14.1"
|
10
|
-
},
|
11
|
-
"bugfixes": true
|
12
|
-
},
|
13
3
|
"exclude": [
|
14
4
|
"/testing",
|
15
5
|
"/**/*.cy.ts",
|
@@ -32,7 +22,8 @@
|
|
32
22
|
"runtime": "classic",
|
33
23
|
"useSpread": true
|
34
24
|
}
|
35
|
-
}
|
25
|
+
},
|
26
|
+
"target": "es2019"
|
36
27
|
},
|
37
28
|
"minify": false,
|
38
29
|
"sourceMaps": true
|
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": "Wed, 22 Mar 2023 04:46:48 GMT",
|
6
|
+
"tag": "@fluentui/react-progress_v0.0.0-nightly-20230322-0439.1",
|
7
|
+
"version": "0.0.0-nightly-20230322-0439.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
@@ -16,32 +16,83 @@
|
|
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-20230322-0439.1",
|
20
|
+
"commit": "49dde84493fc2c3e96abac5ce918169c9668ba66"
|
21
21
|
},
|
22
22
|
{
|
23
23
|
"author": "beachball",
|
24
24
|
"package": "@fluentui/react-progress",
|
25
|
-
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
26
|
-
"commit": "
|
25
|
+
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230322-0439.1",
|
26
|
+
"commit": "49dde84493fc2c3e96abac5ce918169c9668ba66"
|
27
27
|
},
|
28
28
|
{
|
29
29
|
"author": "beachball",
|
30
30
|
"package": "@fluentui/react-progress",
|
31
|
-
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-
|
32
|
-
"commit": "
|
31
|
+
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230322-0439.1",
|
32
|
+
"commit": "49dde84493fc2c3e96abac5ce918169c9668ba66"
|
33
33
|
},
|
34
34
|
{
|
35
35
|
"author": "beachball",
|
36
36
|
"package": "@fluentui/react-progress",
|
37
|
-
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-
|
38
|
-
"commit": "
|
37
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230322-0439.1",
|
38
|
+
"commit": "49dde84493fc2c3e96abac5ce918169c9668ba66"
|
39
39
|
},
|
40
40
|
{
|
41
41
|
"author": "beachball",
|
42
42
|
"package": "@fluentui/react-progress",
|
43
|
-
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
44
|
-
"commit": "
|
43
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230322-0439.1",
|
44
|
+
"commit": "49dde84493fc2c3e96abac5ce918169c9668ba66"
|
45
|
+
}
|
46
|
+
]
|
47
|
+
}
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"date": "Tue, 21 Mar 2023 21:23:46 GMT",
|
51
|
+
"tag": "@fluentui/react-progress_v9.1.5",
|
52
|
+
"version": "9.1.5",
|
53
|
+
"comments": {
|
54
|
+
"patch": [
|
55
|
+
{
|
56
|
+
"author": "tristan.watanabe@gmail.com",
|
57
|
+
"package": "@fluentui/react-progress",
|
58
|
+
"commit": "2fac1a139149bd13b76b1306207bc988dca9c72c",
|
59
|
+
"comment": "chore: migrate to swc transpilation approach."
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"author": "tristan.watanabe@gmail.com",
|
63
|
+
"package": "@fluentui/react-progress",
|
64
|
+
"commit": "ead1c6d4c2ac3f3596b62b8cbc07b0a03041f11f",
|
65
|
+
"comment": "fix: add node field to package.json exports map."
|
66
|
+
},
|
67
|
+
{
|
68
|
+
"author": "beachball",
|
69
|
+
"package": "@fluentui/react-progress",
|
70
|
+
"comment": "Bump @fluentui/react-field to v9.0.0-alpha.27",
|
71
|
+
"commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
|
72
|
+
},
|
73
|
+
{
|
74
|
+
"author": "beachball",
|
75
|
+
"package": "@fluentui/react-progress",
|
76
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.3.2",
|
77
|
+
"commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
|
78
|
+
},
|
79
|
+
{
|
80
|
+
"author": "beachball",
|
81
|
+
"package": "@fluentui/react-progress",
|
82
|
+
"comment": "Bump @fluentui/react-theme to v9.1.7",
|
83
|
+
"commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
|
84
|
+
},
|
85
|
+
{
|
86
|
+
"author": "beachball",
|
87
|
+
"package": "@fluentui/react-progress",
|
88
|
+
"comment": "Bump @fluentui/react-utilities to v9.7.2",
|
89
|
+
"commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
|
90
|
+
},
|
91
|
+
{
|
92
|
+
"author": "beachball",
|
93
|
+
"package": "@fluentui/react-progress",
|
94
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.20",
|
95
|
+
"commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
|
45
96
|
}
|
46
97
|
]
|
47
98
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,22 +1,37 @@
|
|
1
1
|
# Change Log - @fluentui/react-progress
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Wed, 22 Mar 2023 04:46:48 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-20230322-0439.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v0.0.0-nightly-20230322-0439.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.
|
9
|
+
Wed, 22 Mar 2023 04:46:48 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.5..@fluentui/react-progress_v0.0.0-nightly-20230322-0439.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-shared-contexts to v0.0.0-nightly-
|
17
|
-
- Bump @fluentui/react-theme to v0.0.0-nightly-
|
18
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-
|
19
|
-
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
15
|
+
- Bump @fluentui/react-field to v0.0.0-nightly-20230322-0439.1 ([commit](https://github.com/microsoft/fluentui/commit/49dde84493fc2c3e96abac5ce918169c9668ba66) by beachball)
|
16
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230322-0439.1 ([commit](https://github.com/microsoft/fluentui/commit/49dde84493fc2c3e96abac5ce918169c9668ba66) by beachball)
|
17
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20230322-0439.1 ([commit](https://github.com/microsoft/fluentui/commit/49dde84493fc2c3e96abac5ce918169c9668ba66) by beachball)
|
18
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20230322-0439.1 ([commit](https://github.com/microsoft/fluentui/commit/49dde84493fc2c3e96abac5ce918169c9668ba66) by beachball)
|
19
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230322-0439.1 ([commit](https://github.com/microsoft/fluentui/commit/49dde84493fc2c3e96abac5ce918169c9668ba66) by beachball)
|
20
|
+
|
21
|
+
## [9.1.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.5)
|
22
|
+
|
23
|
+
Tue, 21 Mar 2023 21:23:46 GMT
|
24
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.4..@fluentui/react-progress_v9.1.5)
|
25
|
+
|
26
|
+
### Patches
|
27
|
+
|
28
|
+
- chore: migrate to swc transpilation approach. ([PR #27250](https://github.com/microsoft/fluentui/pull/27250) by tristan.watanabe@gmail.com)
|
29
|
+
- fix: add node field to package.json exports map. ([PR #27154](https://github.com/microsoft/fluentui/pull/27154) by tristan.watanabe@gmail.com)
|
30
|
+
- Bump @fluentui/react-field to v9.0.0-alpha.27 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
|
31
|
+
- Bump @fluentui/react-shared-contexts to v9.3.2 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
|
32
|
+
- Bump @fluentui/react-theme to v9.1.7 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
|
33
|
+
- Bump @fluentui/react-utilities to v9.7.2 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
|
34
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.20 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
|
20
35
|
|
21
36
|
## [9.1.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.4)
|
22
37
|
|
package/lib/ProgressBar.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from
|
1
|
+
export * from './components/ProgressBar/index';
|
2
2
|
//# sourceMappingURL=ProgressBar.js.map
|
package/lib/ProgressField.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from
|
1
|
+
export * from './components/ProgressField/index';
|
2
2
|
//# sourceMappingURL=ProgressField.js.map
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import * as React from
|
2
|
-
import { useProgressBar_unstable } from
|
3
|
-
import { renderProgressBar_unstable } from
|
4
|
-
import { useProgressBarStyles_unstable } from
|
5
|
-
import { useCustomStyleHooks_unstable } from
|
1
|
+
import * as React from 'react';
|
2
|
+
import { useProgressBar_unstable } from './useProgressBar';
|
3
|
+
import { renderProgressBar_unstable } from './renderProgressBar';
|
4
|
+
import { useProgressBarStyles_unstable } from './useProgressBarStyles';
|
5
|
+
import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';
|
6
6
|
/**
|
7
7
|
* A ProgressBar bar shows the progression of a task.
|
8
8
|
*/
|
@@ -15,5 +15,5 @@ export const ProgressBar = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
15
15
|
useCustomStyles(state);
|
16
16
|
return renderProgressBar_unstable(state);
|
17
17
|
});
|
18
|
-
ProgressBar.displayName =
|
18
|
+
ProgressBar.displayName = 'ProgressBar';
|
19
19
|
//# sourceMappingURL=ProgressBar.js.map
|
@@ -1,6 +1,6 @@
|
|
1
|
-
export * from
|
2
|
-
export * from
|
3
|
-
export * from
|
4
|
-
export * from
|
5
|
-
export * from
|
1
|
+
export * from './ProgressBar';
|
2
|
+
export * from './ProgressBar.types';
|
3
|
+
export * from './renderProgressBar';
|
4
|
+
export * from './useProgressBar';
|
5
|
+
export * from './useProgressBarStyles';
|
6
6
|
//# sourceMappingURL=index.js.map
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import * as React from
|
2
|
-
import { getNativeElementProps, resolveShorthand } from
|
3
|
-
import { clampValue, clampMax } from
|
1
|
+
import * as React from 'react';
|
2
|
+
import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';
|
3
|
+
import { clampValue, clampMax } from '../../utils/index';
|
4
4
|
/**
|
5
5
|
* Create the state required to render ProgressBar.
|
6
6
|
*
|
@@ -13,18 +13,19 @@ import { clampValue, clampMax } from "../../utils/index";
|
|
13
13
|
export const useProgressBar_unstable = (props, ref) => {
|
14
14
|
// Props
|
15
15
|
const {
|
16
|
-
color =
|
17
|
-
shape =
|
18
|
-
thickness =
|
16
|
+
color = 'brand',
|
17
|
+
shape = 'rounded',
|
18
|
+
thickness = 'medium'
|
19
19
|
} = props;
|
20
|
-
|
20
|
+
var _props_max;
|
21
|
+
const max = clampMax((_props_max = props.max) !== null && _props_max !== void 0 ? _props_max : 1);
|
21
22
|
const value = clampValue(props.value, max);
|
22
|
-
const root = getNativeElementProps(
|
23
|
+
const root = getNativeElementProps('div', {
|
23
24
|
ref,
|
24
|
-
role:
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
role: 'progressbar',
|
26
|
+
'aria-valuemin': value !== undefined ? 0 : undefined,
|
27
|
+
'aria-valuemax': value !== undefined ? max : undefined,
|
28
|
+
'aria-valuenow': value,
|
28
29
|
...props
|
29
30
|
});
|
30
31
|
const bar = resolveShorthand(props.bar, {
|
@@ -37,8 +38,8 @@ export const useProgressBar_unstable = (props, ref) => {
|
|
37
38
|
thickness,
|
38
39
|
value,
|
39
40
|
components: {
|
40
|
-
root:
|
41
|
-
bar:
|
41
|
+
root: 'div',
|
42
|
+
bar: 'div'
|
42
43
|
},
|
43
44
|
root,
|
44
45
|
bar
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","getNativeElementProps","resolveShorthand","clampValue","clampMax","useProgressBar_unstable","props","ref","color","shape","thickness","max","value","root","role","undefined","bar","required","state","components"],"sources":["../../../src/components/ProgressBar/useProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } 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 // Props\n const { color = 'brand', shape = 'rounded', thickness = 'medium' } = props;\n const max = clampMax(props.max ?? 1);\n const value = clampValue(props.value, max);\n\n const root = getNativeElementProps('div', {\n ref,\n role: 'progressbar',\n 'aria-valuemin': value !== undefined ? 0 : undefined,\n 'aria-valuemax': value !== undefined ? max : undefined,\n 'aria-valuenow': value,\n ...props,\n });\n\n const bar = resolveShorthand(props.bar, {\n required: true,\n });\n\n const state: ProgressBarState = {\n color,\n max,\n shape,\n thickness,\n value,\n components: {\n root: 'div',\n bar: 'div',\n },\n root,\n bar,\n };\n\n return state;\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,qBAAqB,EAAEC,gBAAgB,QAAQ;AACxD,SAASC,UAAU,EAAEC,QAAQ,QAAQ;AAGrC;;;;;;;;;AASA,OAAO,MAAMC,uBAAA,GAA0BA,CAACC,KAAA,EAAyBC,GAAA,KAAkD;EACjH;EACA,MAAM;IAAEC,KAAA,GAAQ;IAASC,KAAA,GAAQ;IAAWC,SAAA,GAAY;EAAQ,CAAE,GAAGJ,KAAA;
|
1
|
+
{"version":3,"names":["React","getNativeElementProps","resolveShorthand","clampValue","clampMax","useProgressBar_unstable","props","ref","color","shape","thickness","_props_max","max","value","root","role","undefined","bar","required","state","components"],"sources":["../../../src/components/ProgressBar/useProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } 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 // Props\n const { color = 'brand', shape = 'rounded', thickness = 'medium' } = props;\n const max = clampMax(props.max ?? 1);\n const value = clampValue(props.value, max);\n\n const root = getNativeElementProps('div', {\n ref,\n role: 'progressbar',\n 'aria-valuemin': value !== undefined ? 0 : undefined,\n 'aria-valuemax': value !== undefined ? max : undefined,\n 'aria-valuenow': value,\n ...props,\n });\n\n const bar = resolveShorthand(props.bar, {\n required: true,\n });\n\n const state: ProgressBarState = {\n color,\n max,\n shape,\n thickness,\n value,\n components: {\n root: 'div',\n bar: 'div',\n },\n root,\n bar,\n };\n\n return state;\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,qBAAqB,EAAEC,gBAAgB,QAAQ;AACxD,SAASC,UAAU,EAAEC,QAAQ,QAAQ;AAGrC;;;;;;;;;AASA,OAAO,MAAMC,uBAAA,GAA0BA,CAACC,KAAA,EAAyBC,GAAA,KAAkD;EACjH;EACA,MAAM;IAAEC,KAAA,GAAQ;IAASC,KAAA,GAAQ;IAAWC,SAAA,GAAY;EAAQ,CAAE,GAAGJ,KAAA;MAChDK,UAAA;EAArB,MAAMC,GAAA,GAAMR,QAAA,CAAS,CAAAO,UAAA,GAAAL,KAAA,CAAMM,GAAG,cAATD,UAAA,cAAAA,UAAA,GAAa,CAAC;EACnC,MAAME,KAAA,GAAQV,UAAA,CAAWG,KAAA,CAAMO,KAAK,EAAED,GAAA;EAEtC,MAAME,IAAA,GAAOb,qBAAA,CAAsB,OAAO;IACxCM,GAAA;IACAQ,IAAA,EAAM;IACN,iBAAiBF,KAAA,KAAUG,SAAA,GAAY,IAAIA,SAAS;IACpD,iBAAiBH,KAAA,KAAUG,SAAA,GAAYJ,GAAA,GAAMI,SAAS;IACtD,iBAAiBH,KAAA;IACjB,GAAGP;EACL;EAEA,MAAMW,GAAA,GAAMf,gBAAA,CAAiBI,KAAA,CAAMW,GAAG,EAAE;IACtCC,QAAA,EAAU;EACZ;EAEA,MAAMC,KAAA,GAA0B;IAC9BX,KAAA;IACAI,GAAA;IACAH,KAAA;IACAC,SAAA;IACAG,KAAA;IACAO,UAAA,EAAY;MACVN,IAAA,EAAM;MACNG,GAAA,EAAK;IACP;IACAH,IAAA;IACAG;EACF;EAEA,OAAOE,KAAA;AACT"}
|
@@ -1,22 +1,22 @@
|
|
1
|
-
import { __styles, mergeClasses, shorthands } from
|
2
|
-
import { tokens } from
|
1
|
+
import { __styles, mergeClasses, shorthands } from '@griffel/react';
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
3
3
|
export const progressBarClassNames = {
|
4
|
-
root:
|
5
|
-
bar:
|
4
|
+
root: 'fui-ProgressBar',
|
5
|
+
bar: 'fui-ProgressBar__bar'
|
6
6
|
};
|
7
7
|
// If the percentComplete is near 0, don't animate it.
|
8
8
|
// This prevents animations on reset to 0 scenarios.
|
9
9
|
const ZERO_THRESHOLD = 0.01;
|
10
10
|
const barThicknessValues = {
|
11
|
-
medium:
|
12
|
-
large:
|
11
|
+
medium: '2px',
|
12
|
+
large: '4px'
|
13
13
|
};
|
14
14
|
const indeterminateProgressBar = {
|
15
|
-
|
16
|
-
left:
|
15
|
+
'0%': {
|
16
|
+
left: '-33%'
|
17
17
|
},
|
18
|
-
|
19
|
-
left:
|
18
|
+
'100%': {
|
19
|
+
left: '100%'
|
20
20
|
}
|
21
21
|
};
|
22
22
|
/**
|
@@ -125,7 +125,7 @@ export const useProgressBarStyles_unstable = state => {
|
|
125
125
|
}
|
126
126
|
if (state.bar && value !== undefined) {
|
127
127
|
state.bar.style = {
|
128
|
-
width: Math.min(100, Math.max(0, value / max * 100)) +
|
128
|
+
width: Math.min(100, Math.max(0, value / max * 100)) + '%',
|
129
129
|
...state.bar.style
|
130
130
|
};
|
131
131
|
}
|
@@ -1,10 +1,10 @@
|
|
1
|
-
/* eslint-disable deprecation/deprecation */import { getDeprecatedFieldClassNames, makeDeprecatedField } from
|
2
|
-
import { ProgressBar, progressBarClassNames } from
|
1
|
+
/* eslint-disable deprecation/deprecation */import { getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';
|
2
|
+
import { ProgressBar, progressBarClassNames } from '../../ProgressBar';
|
3
3
|
/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */
|
4
4
|
export const progressFieldClassNames = /*#__PURE__*/getDeprecatedFieldClassNames(progressBarClassNames.root);
|
5
5
|
/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */
|
6
6
|
export const ProgressField = /*#__PURE__*/makeDeprecatedField(ProgressBar, {
|
7
|
-
displayName:
|
7
|
+
displayName: 'ProgressField',
|
8
8
|
mapProps: props => ({
|
9
9
|
...props,
|
10
10
|
control: {
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from
|
1
|
+
export * from './ProgressField';
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export { ProgressBar, progressBarClassNames, renderProgressBar_unstable, useProgressBar_unstable, useProgressBarStyles_unstable } from
|
1
|
+
export { ProgressBar, progressBarClassNames, renderProgressBar_unstable, useProgressBar_unstable, useProgressBarStyles_unstable } from './ProgressBar';
|
2
2
|
// eslint-disable-next-line deprecation/deprecation
|
3
|
-
export { ProgressField as ProgressField_unstable, progressFieldClassNames } from
|
3
|
+
export { ProgressField as ProgressField_unstable, progressFieldClassNames } from './ProgressField';
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/lib/utils/clampMax.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
export const clampMax = max => {
|
2
2
|
const internalMax = max <= 0 ? 1 : max;
|
3
|
-
if (process.env.NODE_ENV !==
|
3
|
+
if (process.env.NODE_ENV !== 'production') {
|
4
4
|
if (max <= 0) {
|
5
5
|
// eslint-disable-next-line no-console
|
6
6
|
console.error(`The prop 'max' must be greater than 0. Received max: ${max}`);
|
package/lib/utils/clampValue.js
CHANGED
@@ -3,7 +3,7 @@ export const clampValue = (value, max) => {
|
|
3
3
|
return value;
|
4
4
|
}
|
5
5
|
const internalValue = value < 0 ? 0 : value > max ? max : value;
|
6
|
-
if (process.env.NODE_ENV !==
|
6
|
+
if (process.env.NODE_ENV !== 'production') {
|
7
7
|
if (value < 0) {
|
8
8
|
// eslint-disable-next-line no-console
|
9
9
|
console.error(`The prop 'value' must be greater than or equal to zero. Received value: ${value}`);
|
package/lib/utils/index.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from
|
2
|
-
export * from
|
1
|
+
export * from './clampMax';
|
2
|
+
export * from './clampValue';
|
3
3
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../lib/ProgressBar.js"],"sourcesContent":["export * from
|
1
|
+
{"version":3,"sources":["../lib/ProgressBar.js"],"sourcesContent":["export * from './components/ProgressBar/index';\n//# sourceMappingURL=ProgressBar.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,uCAAuC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../lib/ProgressField.js"],"sourcesContent":["export * from
|
1
|
+
{"version":3,"sources":["../lib/ProgressField.js"],"sourcesContent":["export * from './components/ProgressField/index';\n//# sourceMappingURL=ProgressField.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,yCAAyC"}
|
@@ -19,6 +19,6 @@ const ProgressBar = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
19
19
|
useCustomStyles(state);
|
20
20
|
return (0, _renderProgressBar.renderProgressBar_unstable)(state);
|
21
21
|
});
|
22
|
-
ProgressBar.displayName =
|
22
|
+
ProgressBar.displayName = 'ProgressBar'; //# sourceMappingURL=ProgressBar.js.map
|
23
23
|
|
24
24
|
//# sourceMappingURL=ProgressBar.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/ProgressBar/ProgressBar.js"],"sourcesContent":["import * as React from
|
1
|
+
{"version":3,"sources":["../../../lib/components/ProgressBar/ProgressBar.js"],"sourcesContent":["import * as React from 'react';\nimport { useProgressBar_unstable } from './useProgressBar';\nimport { renderProgressBar_unstable } from './renderProgressBar';\nimport { useProgressBarStyles_unstable } from './useProgressBarStyles';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n/**\n * A ProgressBar bar shows the progression of a task.\n */\nexport const ProgressBar = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useProgressBar_unstable(props, ref);\n useProgressBarStyles_unstable(state);\n const {\n useProgressBarStyles_unstable: useCustomStyles\n } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n return renderProgressBar_unstable(state);\n});\nProgressBar.displayName = 'ProgressBar';\n//# sourceMappingURL=ProgressBar.js.map"],"names":["ProgressBar","React","forwardRef","props","ref","state","useProgressBar_unstable","useProgressBarStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderProgressBar_unstable","displayName"],"mappings":";;;;+BAQaA;;aAAAA;;;6DARU;gCACiB;mCACG;sCACG;qCACD;AAItC,MAAMA,cAAc,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACvE,MAAMC,QAAQC,IAAAA,uCAAuB,EAACH,OAAOC;IAC7CG,IAAAA,mDAA6B,EAACF;IAC9B,MAAM,EACJE,+BAA+BC,gBAAe,EAC/C,GAAGC,IAAAA,iDAA4B;IAChCD,gBAAgBH;IAChB,OAAOK,IAAAA,6CAA0B,EAACL;AACpC;AACAL,YAAYW,WAAW,GAAG,eAC1B,uCAAuC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/ProgressBar/index.js"],"sourcesContent":["export * from
|
1
|
+
{"version":3,"sources":["../../../lib/components/ProgressBar/index.js"],"sourcesContent":["export * from './ProgressBar';\nexport * from './ProgressBar.types';\nexport * from './renderProgressBar';\nexport * from './useProgressBar';\nexport * from './useProgressBarStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/ProgressBar/renderProgressBar.js"],"sourcesContent":["import * as React from
|
1
|
+
{"version":3,"sources":["../../../lib/components/ProgressBar/renderProgressBar.js"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of ProgressBar\n */\nexport const renderProgressBar_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlots(state);\n return /*#__PURE__*/React.createElement(slots.root, slotProps.root, slots.bar && /*#__PURE__*/React.createElement(slots.bar, slotProps.bar));\n};\n//# sourceMappingURL=renderProgressBar.js.map"],"names":["renderProgressBar_unstable","state","slots","slotProps","getSlots","React","createElement","root","bar"],"mappings":";;;;+BAKaA;;aAAAA;;;6DALU;gCACE;AAIlB,MAAMA,6BAA6BC,CAAAA,QAAS;IACjD,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,wBAAQ,EAACH;IACb,OAAO,WAAW,GAAEI,OAAMC,aAAa,CAACJ,MAAMK,IAAI,EAAEJ,UAAUI,IAAI,EAAEL,MAAMM,GAAG,IAAI,WAAW,GAAEH,OAAMC,aAAa,CAACJ,MAAMM,GAAG,EAAEL,UAAUK,GAAG;AAC5I,GACA,6CAA6C"}
|
@@ -12,15 +12,16 @@ const _reactUtilities = require("@fluentui/react-utilities");
|
|
12
12
|
const _index = require("../../utils/index");
|
13
13
|
const useProgressBar_unstable = (props, ref)=>{
|
14
14
|
// Props
|
15
|
-
const { color =
|
16
|
-
|
15
|
+
const { color ='brand' , shape ='rounded' , thickness ='medium' } = props;
|
16
|
+
var _props_max;
|
17
|
+
const max = (0, _index.clampMax)((_props_max = props.max) !== null && _props_max !== void 0 ? _props_max : 1);
|
17
18
|
const value = (0, _index.clampValue)(props.value, max);
|
18
|
-
const root = (0, _reactUtilities.getNativeElementProps)(
|
19
|
+
const root = (0, _reactUtilities.getNativeElementProps)('div', {
|
19
20
|
ref,
|
20
|
-
role:
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
role: 'progressbar',
|
22
|
+
'aria-valuemin': value !== undefined ? 0 : undefined,
|
23
|
+
'aria-valuemax': value !== undefined ? max : undefined,
|
24
|
+
'aria-valuenow': value,
|
24
25
|
...props
|
25
26
|
});
|
26
27
|
const bar = (0, _reactUtilities.resolveShorthand)(props.bar, {
|
@@ -33,8 +34,8 @@ const useProgressBar_unstable = (props, ref)=>{
|
|
33
34
|
thickness,
|
34
35
|
value,
|
35
36
|
components: {
|
36
|
-
root:
|
37
|
-
bar:
|
37
|
+
root: 'div',
|
38
|
+
bar: 'div'
|
38
39
|
},
|
39
40
|
root,
|
40
41
|
bar
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/ProgressBar/useProgressBar.js"],"sourcesContent":["import * as React from
|
1
|
+
{"version":3,"sources":["../../../lib/components/ProgressBar/useProgressBar.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } 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 */\nexport const useProgressBar_unstable = (props, ref) => {\n // Props\n const {\n color = 'brand',\n shape = 'rounded',\n thickness = 'medium'\n } = 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 = getNativeElementProps('div', {\n ref,\n role: 'progressbar',\n 'aria-valuemin': value !== undefined ? 0 : undefined,\n 'aria-valuemax': value !== undefined ? max : undefined,\n 'aria-valuenow': value,\n ...props\n });\n const bar = resolveShorthand(props.bar, {\n required: true\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//# sourceMappingURL=useProgressBar.js.map"],"names":["useProgressBar_unstable","props","ref","color","shape","thickness","_props_max","max","clampMax","value","clampValue","root","getNativeElementProps","role","undefined","bar","resolveShorthand","required","state","components"],"mappings":";;;;+BAYaA;;aAAAA;;;6DAZU;gCACiC;uBACnB;AAU9B,MAAMA,0BAA0B,CAACC,OAAOC,MAAQ;IACrD,QAAQ;IACR,MAAM,EACJC,OAAQ,QAAO,EACfC,OAAQ,UAAS,EACjBC,WAAY,SAAQ,EACrB,GAAGJ;IACJ,IAAIK;IACJ,MAAMC,MAAMC,IAAAA,eAAQ,EAAC,AAACF,CAAAA,aAAaL,MAAMM,GAAG,AAAD,MAAO,IAAI,IAAID,eAAe,KAAK,IAAIA,aAAa,CAAC;IAChG,MAAMG,QAAQC,IAAAA,iBAAU,EAACT,MAAMQ,KAAK,EAAEF;IACtC,MAAMI,OAAOC,IAAAA,qCAAqB,EAAC,OAAO;QACxCV;QACAW,MAAM;QACN,iBAAiBJ,UAAUK,YAAY,IAAIA,SAAS;QACpD,iBAAiBL,UAAUK,YAAYP,MAAMO,SAAS;QACtD,iBAAiBL;QACjB,GAAGR,KAAK;IACV;IACA,MAAMc,MAAMC,IAAAA,gCAAgB,EAACf,MAAMc,GAAG,EAAE;QACtCE,UAAU,IAAI;IAChB;IACA,MAAMC,QAAQ;QACZf;QACAI;QACAH;QACAC;QACAI;QACAU,YAAY;YACVR,MAAM;YACNI,KAAK;QACP;QACAJ;QACAI;IACF;IACA,OAAOG;AACT,GACA,0CAA0C"}
|
@@ -14,22 +14,22 @@ _export(exports, {
|
|
14
14
|
});
|
15
15
|
const _react = require("@griffel/react");
|
16
16
|
const progressBarClassNames = {
|
17
|
-
root:
|
18
|
-
bar:
|
17
|
+
root: 'fui-ProgressBar',
|
18
|
+
bar: 'fui-ProgressBar__bar'
|
19
19
|
};
|
20
20
|
// If the percentComplete is near 0, don't animate it.
|
21
21
|
// This prevents animations on reset to 0 scenarios.
|
22
22
|
const ZERO_THRESHOLD = 0.01;
|
23
23
|
const barThicknessValues = {
|
24
|
-
medium:
|
25
|
-
large:
|
24
|
+
medium: '2px',
|
25
|
+
large: '4px'
|
26
26
|
};
|
27
27
|
const indeterminateProgressBar = {
|
28
|
-
|
29
|
-
left:
|
28
|
+
'0%': {
|
29
|
+
left: '-33%'
|
30
30
|
},
|
31
|
-
|
32
|
-
left:
|
31
|
+
'100%': {
|
32
|
+
left: '100%'
|
33
33
|
}
|
34
34
|
};
|
35
35
|
/**
|
@@ -230,7 +230,7 @@ const useProgressBarStyles_unstable = (state)=>{
|
|
230
230
|
}
|
231
231
|
if (state.bar && value !== undefined) {
|
232
232
|
state.bar.style = {
|
233
|
-
width: Math.min(100, Math.max(0, value / max * 100)) +
|
233
|
+
width: Math.min(100, Math.max(0, value / max * 100)) + '%',
|
234
234
|
...state.bar.style
|
235
235
|
};
|
236
236
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/ProgressBar/useProgressBarStyles.js"],"sourcesContent":["import { __styles, mergeClasses, shorthands } from
|
1
|
+
{"version":3,"sources":["../../../lib/components/ProgressBar/useProgressBarStyles.js"],"sourcesContent":["import { __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const progressBarClassNames = {\n root: 'fui-ProgressBar',\n bar: 'fui-ProgressBar__bar'\n};\n// If the percentComplete is near 0, don't animate it.\n// This prevents animations on reset to 0 scenarios.\nconst ZERO_THRESHOLD = 0.01;\nconst barThicknessValues = {\n medium: '2px',\n large: '4px'\n};\nconst indeterminateProgressBar = {\n '0%': {\n left: '-33%'\n },\n '100%': {\n left: '100%'\n }\n};\n/**\n * Styles for the root slot\n */\nconst useRootStyles = /*#__PURE__*/__styles({\n root: {\n mc9l5x: \"ftgm304\",\n De3pzq: \"f18f03hv\",\n a9b677: \"fly5x3f\",\n B68tc82: \"f1p9o1ba\",\n Bmxbyg5: \"f1sil6mw\",\n Bpep1pd: \"fu42dvn\"\n },\n rounded: {\n Bbmb7ep: [\"f1aa9q02\", \"f16jpd5f\"],\n Beyfa6y: [\"f16jpd5f\", \"f1aa9q02\"],\n B7oj6ja: [\"f1jar5jt\", \"fyu767a\"],\n Btl43ni: [\"fyu767a\", \"f1jar5jt\"]\n },\n square: {\n Bbmb7ep: [\"fzi6hpg\", \"fyowgf4\"],\n Beyfa6y: [\"fyowgf4\", \"fzi6hpg\"],\n B7oj6ja: [\"f3fg2lr\", \"f13av6d4\"],\n Btl43ni: [\"f13av6d4\", \"f3fg2lr\"]\n },\n medium: {\n Bqenvij: \"f4t8t6x\"\n },\n large: {\n Bqenvij: \"f6ywr7j\"\n }\n}, {\n d: [\".ftgm304{display:block;}\", \".f18f03hv{background-color:var(--colorNeutralBackground6);}\", \".fly5x3f{width:100%;}\", \".f1p9o1ba{overflow-x:hidden;}\", \".f1sil6mw{overflow-y:hidden;}\", \".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}\", \".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}\", \".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}\", \".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}\", \".fzi6hpg{border-bottom-right-radius:var(--borderRadiusNone);}\", \".fyowgf4{border-bottom-left-radius:var(--borderRadiusNone);}\", \".f3fg2lr{border-top-right-radius:var(--borderRadiusNone);}\", \".f13av6d4{border-top-left-radius:var(--borderRadiusNone);}\", \".f4t8t6x{height:2px;}\", \".f6ywr7j{height:4px;}\"],\n m: [[\"@media screen and (forced-colors: active){.fu42dvn{background-color:CanvasText;}}\", {\n m: \"screen and (forced-colors: active)\"\n }]]\n});\n/**\n * Styles for the ProgressBar bar\n */\nconst useBarStyles = /*#__PURE__*/__styles({\n base: {\n Bpep1pd: \"f1neahkh\",\n Bbmb7ep: [\"f1d9uwra\", \"fzibvwi\"],\n Beyfa6y: [\"fzibvwi\", \"f1d9uwra\"],\n B7oj6ja: [\"fuoumxm\", \"f1vtqnvc\"],\n Btl43ni: [\"f1vtqnvc\", \"fuoumxm\"],\n Bqenvij: \"f1l02sjl\"\n },\n nonZeroDeterminate: {\n Bmy1vo4: \"fjt6zfz\",\n B3o57yi: \"f1wofebd\",\n Bkqvd7p: \"fv71qf3\"\n },\n indeterminate: {\n B2u0y6b: \"fa0wk36\",\n qhf8xq: \"f10pi13n\",\n Bcmaq0h: [\"fpo0yib\", \"f1u5hf6c\"],\n Bv12yb3: [\"fwd2bol\", \"f14gig94\"],\n vin17d: \"f1a27w2r\",\n Ezkn3b: \"f452v7t\",\n w3vfg9: \"f1cpbl36\",\n Gqtpxc: \"f4akx1t\",\n B3vm3ge: \"f18p5put\"\n },\n brand: {\n De3pzq: \"ftywsgz\"\n },\n error: {\n De3pzq: \"fdl5y0r\"\n },\n warning: {\n De3pzq: \"f1s438gw\"\n },\n success: {\n De3pzq: \"flxk52p\"\n }\n}, {\n m: [[\"@media screen and (forced-colors: active){.f1neahkh{background-color:Highlight;}}\", {\n m: \"screen and (forced-colors: active)\"\n }], [\"@media screen and (prefers-reduced-motion: reduce){.f4akx1t{-webkit-animation-duration:0.01ms;animation-duration:0.01ms;}}\", {\n m: \"screen and (prefers-reduced-motion: reduce)\"\n }], [\"@media screen and (prefers-reduced-motion: reduce){.f18p5put{-webkit-animation-iteration-count:1;animation-iteration-count:1;}}\", {\n m: \"screen and (prefers-reduced-motion: reduce)\"\n }]],\n d: [\".f1d9uwra{border-bottom-right-radius:inherit;}\", \".fzibvwi{border-bottom-left-radius:inherit;}\", \".fuoumxm{border-top-right-radius:inherit;}\", \".f1vtqnvc{border-top-left-radius:inherit;}\", \".f1l02sjl{height:100%;}\", \".fjt6zfz{transition-property:width;}\", \".f1wofebd{transition-duration:0.3s;}\", \".fv71qf3{transition-timing-function:ease;}\", \".fa0wk36{max-width:33%;}\", \".f10pi13n{position:relative;}\", \".fpo0yib{background-image:linear-gradient(\\n to right,\\n var(--colorNeutralBackground6) 0%,\\n var(--colorTransparentBackground) 50%,\\n var(--colorNeutralBackground6) 100%\\n );}\", \".f1u5hf6c{background-image:linear-gradient(\\n to left,\\n var(--colorNeutralBackground6) 0%,\\n var(--colorTransparentBackground) 50%,\\n var(--colorNeutralBackground6) 100%\\n );}\", \".fwd2bol{-webkit-animation-name:f1keuaan;animation-name:f1keuaan;}\", \".f14gig94{-webkit-animation-name:f10x8f8u;animation-name:f10x8f8u;}\", \".f1a27w2r{-webkit-animation-duration:3s;animation-duration:3s;}\", \".f452v7t{-webkit-animation-timing-function:linear;animation-timing-function:linear;}\", \".f1cpbl36{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;}\", \".ftywsgz{background-color:var(--colorCompoundBrandBackground);}\", \".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}\", \".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}\", \".flxk52p{background-color:var(--colorPaletteGreenBackground3);}\"],\n k: [\"@-webkit-keyframes f1keuaan{0%{left:-33%;}100%{left:100%;}}\", \"@-webkit-keyframes f10x8f8u{0%{right:-33%;}100%{right:100%;}}\", \"@keyframes f1keuaan{0%{left:-33%;}100%{left:100%;}}\", \"@keyframes f10x8f8u{0%{right:-33%;}100%{right:100%;}}\"]\n});\n/**\n * Apply styling to the ProgressBar slots based on the state\n */\nexport const useProgressBarStyles_unstable = state => {\n const {\n color,\n max,\n shape,\n thickness,\n value\n } = state;\n const rootStyles = useRootStyles();\n const barStyles = useBarStyles();\n state.root.className = mergeClasses(progressBarClassNames.root, rootStyles.root, rootStyles[shape], rootStyles[thickness], state.root.className);\n if (state.bar) {\n state.bar.className = mergeClasses(progressBarClassNames.bar, barStyles.base, barStyles.brand, value === undefined && barStyles.indeterminate, value !== undefined && value > ZERO_THRESHOLD && barStyles.nonZeroDeterminate, color && value !== undefined && barStyles[color], state.bar.className);\n }\n if (state.bar && value !== undefined) {\n state.bar.style = {\n width: Math.min(100, Math.max(0, value / max * 100)) + '%',\n ...state.bar.style\n };\n }\n return state;\n};\n//# sourceMappingURL=useProgressBarStyles.js.map"],"names":["progressBarClassNames","useProgressBarStyles_unstable","root","bar","ZERO_THRESHOLD","barThicknessValues","medium","large","indeterminateProgressBar","left","useRootStyles","__styles","mc9l5x","De3pzq","a9b677","B68tc82","Bmxbyg5","Bpep1pd","rounded","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","square","Bqenvij","d","m","useBarStyles","base","nonZeroDeterminate","Bmy1vo4","B3o57yi","Bkqvd7p","indeterminate","B2u0y6b","qhf8xq","Bcmaq0h","Bv12yb3","vin17d","Ezkn3b","w3vfg9","Gqtpxc","B3vm3ge","brand","error","warning","success","k","state","color","max","shape","thickness","value","rootStyles","barStyles","className","mergeClasses","undefined","style","width","Math","min"],"mappings":"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"}
|
@@ -16,7 +16,7 @@ const _reactField = require("@fluentui/react-field");
|
|
16
16
|
const _progressBar = require("../../ProgressBar");
|
17
17
|
const progressFieldClassNames = /*#__PURE__*/ (0, _reactField.getDeprecatedFieldClassNames)(_progressBar.progressBarClassNames.root);
|
18
18
|
const ProgressField = /*#__PURE__*/ (0, _reactField.makeDeprecatedField)(_progressBar.ProgressBar, {
|
19
|
-
displayName:
|
19
|
+
displayName: 'ProgressField',
|
20
20
|
mapProps: (props)=>({
|
21
21
|
...props,
|
22
22
|
control: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/ProgressField/ProgressField.js"],"sourcesContent":["/* eslint-disable deprecation/deprecation */import { getDeprecatedFieldClassNames, makeDeprecatedField } from
|
1
|
+
{"version":3,"sources":["../../../lib/components/ProgressField/ProgressField.js"],"sourcesContent":["/* eslint-disable deprecation/deprecation */import { getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';\nimport { ProgressBar, progressBarClassNames } from '../../ProgressBar';\n/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */\nexport const progressFieldClassNames = /*#__PURE__*/getDeprecatedFieldClassNames(progressBarClassNames.root);\n/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */\nexport const ProgressField = /*#__PURE__*/makeDeprecatedField(ProgressBar, {\n displayName: 'ProgressField',\n mapProps: props => ({\n ...props,\n control: {\n ...props.control,\n validationState: props.validationState\n }\n })\n});\n//# sourceMappingURL=ProgressField.js.map"],"names":["progressFieldClassNames","ProgressField","getDeprecatedFieldClassNames","progressBarClassNames","root","makeDeprecatedField","ProgressBar","displayName","mapProps","props","control","validationState"],"mappings":"AAAA,0CAA0C;;;;;;;;;;;IAG7BA,uBAAuB,MAAvBA;IAEAC,aAAa,MAAbA;;4BALiG;6BAC3D;AAE5C,MAAMD,0BAA0B,WAAW,GAAEE,IAAAA,wCAA4B,EAACC,kCAAqB,CAACC,IAAI;AAEpG,MAAMH,gBAAgB,WAAW,GAAEI,IAAAA,+BAAmB,EAACC,wBAAW,EAAE;IACzEC,aAAa;IACbC,UAAUC,CAAAA,QAAU,CAAA;YAClB,GAAGA,KAAK;YACRC,SAAS;gBACP,GAAGD,MAAMC,OAAO;gBAChBC,iBAAiBF,MAAME,eAAe;YACxC;QACF,CAAA;AACF,IACA,yCAAyC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/ProgressField/index.js"],"sourcesContent":["export * from
|
1
|
+
{"version":3,"sources":["../../../lib/components/ProgressField/index.js"],"sourcesContent":["export * from './ProgressField';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,iCAAiC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../lib/index.js"],"sourcesContent":["export { ProgressBar, progressBarClassNames, renderProgressBar_unstable, useProgressBar_unstable, useProgressBarStyles_unstable } from
|
1
|
+
{"version":3,"sources":["../lib/index.js"],"sourcesContent":["export { ProgressBar, progressBarClassNames, renderProgressBar_unstable, useProgressBar_unstable, useProgressBarStyles_unstable } from './ProgressBar';\n// eslint-disable-next-line deprecation/deprecation\nexport { ProgressField as ProgressField_unstable, progressFieldClassNames } from './ProgressField';\n//# sourceMappingURL=index.js.map"],"names":["ProgressBar","progressBarClassNames","renderProgressBar_unstable","useProgressBar_unstable","useProgressBarStyles_unstable","ProgressField_unstable","ProgressField","progressFieldClassNames"],"mappings":";;;;;;;;;;;IAASA,WAAW,MAAXA,wBAAW;IAAEC,qBAAqB,MAArBA,kCAAqB;IAAEC,0BAA0B,MAA1BA,uCAA0B;IAAEC,uBAAuB,MAAvBA,oCAAuB;IAAEC,6BAA6B,MAA7BA,0CAA6B;IAErGC,sBAAsB,MAAvCC,4BAAa;IAA4BC,uBAAuB,MAAvBA,sCAAuB;;6BAF8D;+BAEtD;CACjF,iCAAiC"}
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "clampMax", {
|
|
8
8
|
});
|
9
9
|
const clampMax = (max)=>{
|
10
10
|
const internalMax = max <= 0 ? 1 : max;
|
11
|
-
if (process.env.NODE_ENV !==
|
11
|
+
if (process.env.NODE_ENV !== 'production') {
|
12
12
|
if (max <= 0) {
|
13
13
|
// eslint-disable-next-line no-console
|
14
14
|
console.error(`The prop 'max' must be greater than 0. Received max: ${max}`);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../lib/utils/clampMax.js"],"sourcesContent":["export const clampMax = max => {\n const internalMax = max <= 0 ? 1 : max;\n if (process.env.NODE_ENV !==
|
1
|
+
{"version":3,"sources":["../../lib/utils/clampMax.js"],"sourcesContent":["export const clampMax = max => {\n const internalMax = max <= 0 ? 1 : max;\n if (process.env.NODE_ENV !== 'production') {\n if (max <= 0) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'max' must be greater than 0. Received max: ${max}`);\n }\n }\n return internalMax;\n};\n//# sourceMappingURL=clampMax.js.map"],"names":["clampMax","max","internalMax","process","env","NODE_ENV","console","error"],"mappings":";;;;+BAAaA;;aAAAA;;AAAN,MAAMA,WAAWC,CAAAA,MAAO;IAC7B,MAAMC,cAAcD,OAAO,IAAI,IAAIA,GAAG;IACtC,IAAIE,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,IAAIJ,OAAO,GAAG;YACZ,sCAAsC;YACtCK,QAAQC,KAAK,CAAC,CAAC,qDAAqD,EAAEN,IAAI,CAAC;QAC7E,CAAC;IACH,CAAC;IACD,OAAOC;AACT,GACA,oCAAoC"}
|
@@ -11,7 +11,7 @@ const clampValue = (value, max)=>{
|
|
11
11
|
return value;
|
12
12
|
}
|
13
13
|
const internalValue = value < 0 ? 0 : value > max ? max : value;
|
14
|
-
if (process.env.NODE_ENV !==
|
14
|
+
if (process.env.NODE_ENV !== 'production') {
|
15
15
|
if (value < 0) {
|
16
16
|
// eslint-disable-next-line no-console
|
17
17
|
console.error(`The prop 'value' must be greater than or equal to zero. Received value: ${value}`);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../lib/utils/clampValue.js"],"sourcesContent":["export const clampValue = (value, max) => {\n if (value === undefined) {\n return value;\n }\n const internalValue = value < 0 ? 0 : value > max ? max : value;\n if (process.env.NODE_ENV !==
|
1
|
+
{"version":3,"sources":["../../lib/utils/clampValue.js"],"sourcesContent":["export const clampValue = (value, max) => {\n if (value === undefined) {\n return value;\n }\n const internalValue = value < 0 ? 0 : value > max ? max : value;\n if (process.env.NODE_ENV !== 'production') {\n if (value < 0) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'value' must be greater than or equal to zero. Received value: ${value}`);\n }\n if (value > max) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'value' must be less than or equal to 'max'. Received value: ${value}, max: ${max}`);\n }\n }\n return internalValue;\n};\n//# sourceMappingURL=clampValue.js.map"],"names":["clampValue","value","max","undefined","internalValue","process","env","NODE_ENV","console","error"],"mappings":";;;;+BAAaA;;aAAAA;;AAAN,MAAMA,aAAa,CAACC,OAAOC,MAAQ;IACxC,IAAID,UAAUE,WAAW;QACvB,OAAOF;IACT,CAAC;IACD,MAAMG,gBAAgBH,QAAQ,IAAI,IAAIA,QAAQC,MAAMA,MAAMD,KAAK;IAC/D,IAAII,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,IAAIN,QAAQ,GAAG;YACb,sCAAsC;YACtCO,QAAQC,KAAK,CAAC,CAAC,wEAAwE,EAAER,MAAM,CAAC;QAClG,CAAC;QACD,IAAIA,QAAQC,KAAK;YACf,sCAAsC;YACtCM,QAAQC,KAAK,CAAC,CAAC,sEAAsE,EAAER,MAAM,OAAO,EAAEC,IAAI,CAAC;QAC7G,CAAC;IACH,CAAC;IACD,OAAOE;AACT,GACA,sCAAsC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../lib/utils/index.js"],"sourcesContent":["export * from
|
1
|
+
{"version":3,"sources":["../../lib/utils/index.js"],"sourcesContent":["export * from './clampMax';\nexport * from './clampValue';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;CACd,iCAAiC"}
|
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-20230322-0439.1",
|
4
4
|
"description": "Progress component for FluentUI v9",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -27,15 +27,15 @@
|
|
27
27
|
"devDependencies": {
|
28
28
|
"@fluentui/eslint-plugin": "*",
|
29
29
|
"@fluentui/react-conformance": "*",
|
30
|
-
"@fluentui/react-conformance-griffel": "0.0.0-nightly-
|
30
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20230322-0439.1",
|
31
31
|
"@fluentui/scripts-api-extractor": "*",
|
32
32
|
"@fluentui/scripts-tasks": "*"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
|
-
"@fluentui/react-field": "0.0.0-nightly-
|
36
|
-
"@fluentui/react-shared-contexts": "0.0.0-nightly-
|
37
|
-
"@fluentui/react-theme": "0.0.0-nightly-
|
38
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
35
|
+
"@fluentui/react-field": "0.0.0-nightly-20230322-0439.1",
|
36
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightly-20230322-0439.1",
|
37
|
+
"@fluentui/react-theme": "0.0.0-nightly-20230322-0439.1",
|
38
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20230322-0439.1",
|
39
39
|
"@griffel/react": "^1.5.2",
|
40
40
|
"@swc/helpers": "^0.4.14"
|
41
41
|
},
|
@@ -49,6 +49,7 @@
|
|
49
49
|
"exports": {
|
50
50
|
".": {
|
51
51
|
"types": "./dist/index.d.ts",
|
52
|
+
"node": "./lib-commonjs/index.js",
|
52
53
|
"import": "./lib/index.js",
|
53
54
|
"require": "./lib-commonjs/index.js"
|
54
55
|
},
|