@fluentui/react-progress 9.1.4 → 9.1.6
Sign up to get free protection for your applications and to get access to all the features.
- package/.swcrc +30 -0
- package/CHANGELOG.json +73 -1
- package/CHANGELOG.md +27 -2
- package/lib/ProgressBar.js.map +1 -1
- package/lib/ProgressField.js.map +1 -1
- package/lib/components/ProgressBar/ProgressBar.js.map +1 -1
- package/lib/components/ProgressBar/ProgressBar.types.js.map +1 -1
- package/lib/components/ProgressBar/index.js.map +1 -1
- package/lib/components/ProgressBar/renderProgressBar.js +1 -5
- package/lib/components/ProgressBar/renderProgressBar.js.map +1 -1
- package/lib/components/ProgressBar/useProgressBar.js +3 -2
- package/lib/components/ProgressBar/useProgressBar.js.map +1 -1
- package/lib/components/ProgressBar/useProgressBarStyles.js +1 -2
- package/lib/components/ProgressBar/useProgressBarStyles.js.map +1 -1
- package/lib/components/ProgressField/ProgressField.js +1 -2
- package/lib/components/ProgressField/ProgressField.js.map +1 -1
- package/lib/components/ProgressField/index.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/utils/clampMax.js.map +1 -1
- package/lib/utils/clampValue.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib-commonjs/ProgressBar.js +5 -4
- package/lib-commonjs/ProgressBar.js.map +1 -1
- package/lib-commonjs/ProgressField.js +5 -4
- package/lib-commonjs/ProgressField.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/ProgressBar.js +19 -20
- package/lib-commonjs/components/ProgressBar/ProgressBar.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/ProgressBar.types.js +3 -2
- package/lib-commonjs/components/ProgressBar/ProgressBar.types.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/index.js +9 -8
- package/lib-commonjs/components/ProgressBar/index.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/renderProgressBar.js +13 -20
- package/lib-commonjs/components/ProgressBar/renderProgressBar.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/useProgressBar.js +42 -51
- package/lib-commonjs/components/ProgressBar/useProgressBar.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js +220 -122
- package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js.map +1 -1
- package/lib-commonjs/components/ProgressField/ProgressField.js +25 -19
- package/lib-commonjs/components/ProgressField/ProgressField.js.map +1 -1
- package/lib-commonjs/components/ProgressField/index.js +5 -4
- package/lib-commonjs/components/ProgressField/index.js.map +1 -1
- package/lib-commonjs/index.js +21 -49
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/clampMax.js +15 -13
- package/lib-commonjs/utils/clampMax.js.map +1 -1
- package/lib-commonjs/utils/clampValue.js +21 -19
- package/lib-commonjs/utils/clampValue.js.map +1 -1
- package/lib-commonjs/utils/index.js +6 -5
- package/lib-commonjs/utils/index.js.map +1 -1
- package/package.json +9 -8
- package/lib-amd/ProgressBar.js +0 -6
- package/lib-amd/ProgressBar.js.map +0 -1
- package/lib-amd/ProgressField.js +0 -6
- package/lib-amd/ProgressField.js.map +0 -1
- package/lib-amd/components/ProgressBar/ProgressBar.js +0 -17
- package/lib-amd/components/ProgressBar/ProgressBar.js.map +0 -1
- package/lib-amd/components/ProgressBar/ProgressBar.types.js +0 -5
- package/lib-amd/components/ProgressBar/ProgressBar.types.js.map +0 -1
- package/lib-amd/components/ProgressBar/index.js +0 -10
- package/lib-amd/components/ProgressBar/index.js.map +0 -1
- package/lib-amd/components/ProgressBar/renderProgressBar.js +0 -14
- package/lib-amd/components/ProgressBar/renderProgressBar.js.map +0 -1
- package/lib-amd/components/ProgressBar/useProgressBar.js +0 -41
- package/lib-amd/components/ProgressBar/useProgressBar.js.map +0 -1
- package/lib-amd/components/ProgressBar/useProgressBarStyles.js +0 -96
- package/lib-amd/components/ProgressBar/useProgressBarStyles.js.map +0 -1
- package/lib-amd/components/ProgressField/ProgressField.js +0 -13
- package/lib-amd/components/ProgressField/ProgressField.js.map +0 -1
- package/lib-amd/components/ProgressField/index.js +0 -6
- package/lib-amd/components/ProgressField/index.js.map +0 -1
- package/lib-amd/index.js +0 -13
- package/lib-amd/index.js.map +0 -1
- package/lib-amd/utils/clampMax.js +0 -17
- package/lib-amd/utils/clampMax.js.map +0 -1
- package/lib-amd/utils/clampValue.js +0 -24
- package/lib-amd/utils/clampValue.js.map +0 -1
- package/lib-amd/utils/index.js +0 -7
- package/lib-amd/utils/index.js.map +0 -1
package/.swcrc
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "https://json.schemastore.org/swcrc",
|
3
|
+
"exclude": [
|
4
|
+
"/testing",
|
5
|
+
"/**/*.cy.ts",
|
6
|
+
"/**/*.cy.tsx",
|
7
|
+
"/**/*.spec.ts",
|
8
|
+
"/**/*.spec.tsx",
|
9
|
+
"/**/*.test.ts",
|
10
|
+
"/**/*.test.tsx"
|
11
|
+
],
|
12
|
+
"jsc": {
|
13
|
+
"parser": {
|
14
|
+
"syntax": "typescript",
|
15
|
+
"tsx": true,
|
16
|
+
"decorators": false,
|
17
|
+
"dynamicImport": false
|
18
|
+
},
|
19
|
+
"externalHelpers": true,
|
20
|
+
"transform": {
|
21
|
+
"react": {
|
22
|
+
"runtime": "classic",
|
23
|
+
"useSpread": true
|
24
|
+
}
|
25
|
+
},
|
26
|
+
"target": "es2019"
|
27
|
+
},
|
28
|
+
"minify": false,
|
29
|
+
"sourceMaps": true
|
30
|
+
}
|
package/CHANGELOG.json
CHANGED
@@ -2,7 +2,79 @@
|
|
2
2
|
"name": "@fluentui/react-progress",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "Thu,
|
5
|
+
"date": "Thu, 23 Mar 2023 12:28:45 GMT",
|
6
|
+
"tag": "@fluentui/react-progress_v9.1.6",
|
7
|
+
"version": "9.1.6",
|
8
|
+
"comments": {
|
9
|
+
"patch": [
|
10
|
+
{
|
11
|
+
"author": "beachball",
|
12
|
+
"package": "@fluentui/react-progress",
|
13
|
+
"comment": "Bump @fluentui/react-field to v9.0.0-alpha.28",
|
14
|
+
"commit": "be0ca69899300abe3c8478c435e0f6837138479b"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"author": "beachball",
|
18
|
+
"package": "@fluentui/react-progress",
|
19
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.3.3",
|
20
|
+
"commit": "be0ca69899300abe3c8478c435e0f6837138479b"
|
21
|
+
}
|
22
|
+
]
|
23
|
+
}
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"date": "Tue, 21 Mar 2023 21:23:46 GMT",
|
27
|
+
"tag": "@fluentui/react-progress_v9.1.5",
|
28
|
+
"version": "9.1.5",
|
29
|
+
"comments": {
|
30
|
+
"patch": [
|
31
|
+
{
|
32
|
+
"author": "tristan.watanabe@gmail.com",
|
33
|
+
"package": "@fluentui/react-progress",
|
34
|
+
"commit": "2fac1a139149bd13b76b1306207bc988dca9c72c",
|
35
|
+
"comment": "chore: migrate to swc transpilation approach."
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"author": "tristan.watanabe@gmail.com",
|
39
|
+
"package": "@fluentui/react-progress",
|
40
|
+
"commit": "ead1c6d4c2ac3f3596b62b8cbc07b0a03041f11f",
|
41
|
+
"comment": "fix: add node field to package.json exports map."
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"author": "beachball",
|
45
|
+
"package": "@fluentui/react-progress",
|
46
|
+
"comment": "Bump @fluentui/react-field to v9.0.0-alpha.27",
|
47
|
+
"commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"author": "beachball",
|
51
|
+
"package": "@fluentui/react-progress",
|
52
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.3.2",
|
53
|
+
"commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"author": "beachball",
|
57
|
+
"package": "@fluentui/react-progress",
|
58
|
+
"comment": "Bump @fluentui/react-theme to v9.1.7",
|
59
|
+
"commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"author": "beachball",
|
63
|
+
"package": "@fluentui/react-progress",
|
64
|
+
"comment": "Bump @fluentui/react-utilities to v9.7.2",
|
65
|
+
"commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
|
66
|
+
},
|
67
|
+
{
|
68
|
+
"author": "beachball",
|
69
|
+
"package": "@fluentui/react-progress",
|
70
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.20",
|
71
|
+
"commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
|
72
|
+
}
|
73
|
+
]
|
74
|
+
}
|
75
|
+
},
|
76
|
+
{
|
77
|
+
"date": "Thu, 16 Mar 2023 14:36:59 GMT",
|
6
78
|
"tag": "@fluentui/react-progress_v9.1.4",
|
7
79
|
"version": "9.1.4",
|
8
80
|
"comments": {
|
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,37 @@
|
|
1
1
|
# Change Log - @fluentui/react-progress
|
2
2
|
|
3
|
-
This log was last generated on Thu,
|
3
|
+
This log was last generated on Thu, 23 Mar 2023 12:28:45 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.1.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.6)
|
8
|
+
|
9
|
+
Thu, 23 Mar 2023 12:28:45 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.5..@fluentui/react-progress_v9.1.6)
|
11
|
+
|
12
|
+
### Patches
|
13
|
+
|
14
|
+
- Bump @fluentui/react-field to v9.0.0-alpha.28 ([PR #27286](https://github.com/microsoft/fluentui/pull/27286) by beachball)
|
15
|
+
- Bump @fluentui/react-shared-contexts to v9.3.3 ([PR #27286](https://github.com/microsoft/fluentui/pull/27286) by beachball)
|
16
|
+
|
17
|
+
## [9.1.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.5)
|
18
|
+
|
19
|
+
Tue, 21 Mar 2023 21:23:46 GMT
|
20
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.4..@fluentui/react-progress_v9.1.5)
|
21
|
+
|
22
|
+
### Patches
|
23
|
+
|
24
|
+
- chore: migrate to swc transpilation approach. ([PR #27250](https://github.com/microsoft/fluentui/pull/27250) by tristan.watanabe@gmail.com)
|
25
|
+
- fix: add node field to package.json exports map. ([PR #27154](https://github.com/microsoft/fluentui/pull/27154) by tristan.watanabe@gmail.com)
|
26
|
+
- Bump @fluentui/react-field to v9.0.0-alpha.27 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
|
27
|
+
- Bump @fluentui/react-shared-contexts to v9.3.2 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
|
28
|
+
- Bump @fluentui/react-theme to v9.1.7 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
|
29
|
+
- Bump @fluentui/react-utilities to v9.7.2 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
|
30
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.20 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
|
31
|
+
|
7
32
|
## [9.1.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.4)
|
8
33
|
|
9
|
-
Thu, 16 Mar 2023 14:
|
34
|
+
Thu, 16 Mar 2023 14:36:59 GMT
|
10
35
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.3..@fluentui/react-progress_v9.1.4)
|
11
36
|
|
12
37
|
### Patches
|
package/lib/ProgressBar.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":[],"sources":["../src/ProgressBar.ts"],"sourcesContent":["export * from './components/ProgressBar/index';\n"],"mappings":"AAAA,cAAc"}
|
package/lib/ProgressField.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":[],"sources":["../src/ProgressField.ts"],"sourcesContent":["export * from './components/ProgressField/index';\n"],"mappings":"AAAA,cAAc"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","useProgressBar_unstable","renderProgressBar_unstable","useProgressBarStyles_unstable","useCustomStyleHooks_unstable","ProgressBar","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["
|
1
|
+
{"version":3,"names":["React","useProgressBar_unstable","renderProgressBar_unstable","useProgressBarStyles_unstable","useCustomStyleHooks_unstable","ProgressBar","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../../../src/components/ProgressBar/ProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useProgressBar_unstable } from './useProgressBar';\nimport { renderProgressBar_unstable } from './renderProgressBar';\nimport { useProgressBarStyles_unstable } from './useProgressBarStyles';\nimport type { ProgressBarProps } from './ProgressBar.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * A ProgressBar bar shows the progression of a task.\n */\nexport const ProgressBar: ForwardRefComponent<ProgressBarProps> = React.forwardRef((props, ref) => {\n const state = useProgressBar_unstable(props, ref);\n\n useProgressBarStyles_unstable(state);\n\n const { useProgressBarStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderProgressBar_unstable(state);\n});\n\nProgressBar.displayName = 'ProgressBar';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,uBAAuB,QAAQ;AACxC,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,6BAA6B,QAAQ;AAG9C,SAASC,4BAA4B,QAAQ;AAE7C;;;AAGA,OAAO,MAAMC,WAAA,gBAAqDL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACjG,MAAMC,KAAA,GAAQR,uBAAA,CAAwBM,KAAA,EAAOC,GAAA;EAE7CL,6BAAA,CAA8BM,KAAA;EAE9B,MAAM;IAAEN,6BAAA,EAA+BO;EAAe,CAAE,GAAGN,4BAAA;EAC3DM,eAAA,CAAgBD,KAAA;EAEhB,OAAOP,0BAAA,CAA2BO,KAAA;AACpC;AAEAJ,WAAA,CAAYM,WAAW,GAAG"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/ProgressBar/ProgressBar.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type ProgressBarSlots = {\n /**\n * The track behind the ProgressBar bar\n */\n root: NonNullable<Slot<'div'>>;\n /**\n * The filled portion of the ProgressBar bar. Animated in the indeterminate state, when no value is provided.\n */\n bar?: NonNullable<Slot<'div'>>;\n};\n\n/**\n * ProgressBar Props\n */\nexport type ProgressBarProps = Omit<ComponentProps<ProgressBarSlots>, 'size'> & {\n /**\n * The shape of the bar and track.\n * @default rounded\n */\n shape?: 'rounded' | 'square';\n /**\n * A decimal number between `0` and `1` (or between `0` and `max` if given),\n * which specifies how much of the task has been completed.\n *\n * If `undefined` (default), the ProgressBar will display an **indeterminate** state.\n */\n value?: number;\n /**\n * The maximum value, which indicates the task is complete.\n * The ProgressBar bar will be full when `value` equals `max`.\n * @default 1\n */\n max?: number;\n /**\n * The thickness of the ProgressBar bar\n * @default medium\n */\n thickness?: 'medium' | 'large';\n\n /**\n * The status of the ProgressBar bar. Changes the color of the bar.\n * @default brand\n */\n color?: 'brand' | 'success' | 'warning' | 'error';\n};\n\n/**\n * State used in rendering ProgressBar\n */\nexport type ProgressBarState = ComponentState<ProgressBarSlots> &\n Required<Pick<ProgressBarProps, 'max' | 'shape' | 'thickness'>> &\n Pick<ProgressBarProps, 'value' | 'color'>;\n"],"mappings":"AAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/ProgressBar/index.ts"],"sourcesContent":["export * from './ProgressBar';\nexport * from './ProgressBar.types';\nexport * from './renderProgressBar';\nexport * from './useProgressBar';\nexport * from './useProgressBarStyles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
|
@@ -8,10 +8,6 @@ export const renderProgressBar_unstable = state => {
|
|
8
8
|
slots,
|
9
9
|
slotProps
|
10
10
|
} = getSlots(state);
|
11
|
-
return /*#__PURE__*/React.createElement(slots.root,
|
12
|
-
...slotProps.root
|
13
|
-
}, slots.bar && /*#__PURE__*/React.createElement(slots.bar, {
|
14
|
-
...slotProps.bar
|
15
|
-
}));
|
11
|
+
return /*#__PURE__*/React.createElement(slots.root, slotProps.root, slots.bar && /*#__PURE__*/React.createElement(slots.bar, slotProps.bar));
|
16
12
|
};
|
17
13
|
//# sourceMappingURL=renderProgressBar.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","getSlots","renderProgressBar_unstable","state","slots","slotProps","createElement","root","bar"],"sources":["
|
1
|
+
{"version":3,"names":["React","getSlots","renderProgressBar_unstable","state","slots","slotProps","createElement","root","bar"],"sources":["../../../src/components/ProgressBar/renderProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { ProgressBarState, ProgressBarSlots } from './ProgressBar.types';\n\n/**\n * Render the final JSX of ProgressBar\n */\nexport const renderProgressBar_unstable = (state: ProgressBarState) => {\n const { slots, slotProps } = getSlots<ProgressBarSlots>(state);\n return <slots.root {...slotProps.root}>{slots.bar && <slots.bar {...slotProps.bar} />}</slots.root>;\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,QAAQ,QAAQ;AAGzB;;;AAGA,OAAO,MAAMC,0BAAA,GAA8BC,KAAA,IAA4B;EACrE,MAAM;IAAEC,KAAA;IAAOC;EAAS,CAAE,GAAGJ,QAAA,CAA2BE,KAAA;EACxD,oBAAOH,KAAA,CAAAM,aAAA,CAACF,KAAA,CAAMG,IAAI,EAAKF,SAAA,CAAUE,IAAI,EAAGH,KAAA,CAAMI,GAAG,iBAAIR,KAAA,CAAAM,aAAA,CAACF,KAAA,CAAMI,GAAG,EAAKH,SAAA,CAAUG,GAAG;AACnF"}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import * as React from 'react';
|
1
2
|
import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';
|
2
3
|
import { clampValue, clampMax } from '../../utils/index';
|
3
4
|
/**
|
@@ -10,14 +11,14 @@ import { clampValue, clampMax } from '../../utils/index';
|
|
10
11
|
* @param ref - reference to root HTMLElement of ProgressBar
|
11
12
|
*/
|
12
13
|
export const useProgressBar_unstable = (props, ref) => {
|
13
|
-
var _a;
|
14
14
|
// Props
|
15
15
|
const {
|
16
16
|
color = 'brand',
|
17
17
|
shape = 'rounded',
|
18
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
23
|
const root = getNativeElementProps('div', {
|
23
24
|
ref,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["getNativeElementProps","resolveShorthand","clampValue","clampMax","useProgressBar_unstable","props","ref","color","shape","thickness","
|
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 +1 @@
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","shorthands","tokens","progressBarClassNames","root","bar","ZERO_THRESHOLD","barThicknessValues","medium","large","indeterminateProgressBar","left","useRootStyles","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","useProgressBarStyles_unstable","state","color","max","shape","thickness","value","rootStyles","barStyles","className","undefined","style","width","Math","min"],"sources":["
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","shorthands","tokens","progressBarClassNames","root","bar","ZERO_THRESHOLD","barThicknessValues","medium","large","indeterminateProgressBar","left","useRootStyles","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","useProgressBarStyles_unstable","state","color","max","shape","thickness","value","rootStyles","barStyles","className","undefined","style","width","Math","min"],"sources":["../../../src/components/ProgressBar/useProgressBarStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { ProgressBarState, ProgressBarSlots } from './ProgressBar.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const progressBarClassNames: SlotClassNames<ProgressBarSlots> = {\n root: 'fui-ProgressBar',\n bar: 'fui-ProgressBar__bar',\n};\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;\n\nconst barThicknessValues = {\n medium: '2px',\n large: '4px',\n};\n\nconst indeterminateProgressBar = {\n '0%': {\n left: '-33%', // matches indeterminate bar width\n },\n '100%': {\n left: '100%',\n },\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootStyles = makeStyles({\n root: {\n display: 'block',\n backgroundColor: tokens.colorNeutralBackground6,\n width: '100%',\n ...shorthands.overflow('hidden'),\n\n '@media screen and (forced-colors: active)': {\n backgroundColor: 'CanvasText',\n },\n },\n rounded: {\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n },\n square: {\n ...shorthands.borderRadius(tokens.borderRadiusNone),\n },\n medium: {\n height: barThicknessValues.medium,\n },\n large: {\n height: barThicknessValues.large,\n },\n});\n\n/**\n * Styles for the ProgressBar bar\n */\nconst useBarStyles = makeStyles({\n base: {\n '@media screen and (forced-colors: active)': {\n backgroundColor: 'Highlight',\n },\n ...shorthands.borderRadius('inherit'),\n height: '100%',\n },\n nonZeroDeterminate: {\n transitionProperty: 'width',\n transitionDuration: '0.3s',\n transitionTimingFunction: 'ease',\n },\n indeterminate: {\n maxWidth: '33%',\n position: 'relative',\n backgroundImage: `linear-gradient(\n to right,\n ${tokens.colorNeutralBackground6} 0%,\n ${tokens.colorTransparentBackground} 50%,\n ${tokens.colorNeutralBackground6} 100%\n )`,\n animationName: indeterminateProgressBar,\n animationDuration: '3s',\n animationTimingFunction: 'linear',\n animationIterationCount: 'infinite',\n '@media screen and (prefers-reduced-motion: reduce)': {\n animationDuration: '0.01ms',\n animationIterationCount: '1',\n },\n },\n\n brand: {\n backgroundColor: tokens.colorCompoundBrandBackground,\n },\n\n error: {\n backgroundColor: tokens.colorPaletteRedBackground3,\n },\n warning: {\n backgroundColor: tokens.colorPaletteDarkOrangeBackground3,\n },\n success: {\n backgroundColor: tokens.colorPaletteGreenBackground3,\n },\n});\n\n/**\n * Apply styling to the ProgressBar slots based on the state\n */\nexport const useProgressBarStyles_unstable = (state: ProgressBarState): ProgressBarState => {\n const { color, max, shape, thickness, value } = state;\n const rootStyles = useRootStyles();\n const barStyles = useBarStyles();\n\n state.root.className = mergeClasses(\n progressBarClassNames.root,\n rootStyles.root,\n rootStyles[shape],\n rootStyles[thickness],\n state.root.className,\n );\n\n if (state.bar) {\n state.bar.className = mergeClasses(\n progressBarClassNames.bar,\n barStyles.base,\n barStyles.brand,\n value === undefined && barStyles.indeterminate,\n value !== undefined && value > ZERO_THRESHOLD && barStyles.nonZeroDeterminate,\n color && value !== undefined && barStyles[color],\n state.bar.className,\n );\n }\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\n return state;\n};\n"],"mappings":"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"}
|
@@ -1,5 +1,4 @@
|
|
1
|
-
/* eslint-disable deprecation/deprecation */
|
2
|
-
import { getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';
|
1
|
+
/* eslint-disable deprecation/deprecation */import { getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';
|
3
2
|
import { ProgressBar, progressBarClassNames } from '../../ProgressBar';
|
4
3
|
/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */
|
5
4
|
export const progressFieldClassNames = /*#__PURE__*/getDeprecatedFieldClassNames(progressBarClassNames.root);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["getDeprecatedFieldClassNames","makeDeprecatedField","ProgressBar","progressBarClassNames","progressFieldClassNames","root","ProgressField","displayName","mapProps","props","control","validationState"],"sources":["
|
1
|
+
{"version":3,"names":["getDeprecatedFieldClassNames","makeDeprecatedField","ProgressBar","progressBarClassNames","progressFieldClassNames","root","ProgressField","displayName","mapProps","props","control","validationState"],"sources":["../../../src/components/ProgressField/ProgressField.tsx"],"sourcesContent":["/* eslint-disable deprecation/deprecation */\nimport { DeprecatedFieldProps, getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { ProgressBar, progressBarClassNames, ProgressBarProps } from '../../ProgressBar';\n\n/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */\nexport type ProgressFieldProps = DeprecatedFieldProps<ProgressBarProps>;\n/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */\nexport const progressFieldClassNames = getDeprecatedFieldClassNames(progressBarClassNames.root);\n/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */\nexport const ProgressField: ForwardRefComponent<ProgressFieldProps> = makeDeprecatedField(ProgressBar, {\n displayName: 'ProgressField',\n mapProps: (props: ProgressFieldProps) => ({\n ...props,\n control: { ...props.control, validationState: props.validationState },\n }),\n});\n"],"mappings":"AAAA,4CACA,SAA+BA,4BAA4B,EAAEC,mBAAmB,QAAQ;AAExF,SAASC,WAAW,EAAEC,qBAAqB,QAA0B;AAIrE;AACA,OAAO,MAAMC,uBAAA,gBAA0BJ,4BAAA,CAA6BG,qBAAA,CAAsBE,IAAI;AAC9F;AACA,OAAO,MAAMC,aAAA,gBAAyDL,mBAAA,CAAoBC,WAAA,EAAa;EACrGK,WAAA,EAAa;EACbC,QAAA,EAAWC,KAAA,KAA+B;IACxC,GAAGA,KAAK;IACRC,OAAA,EAAS;MAAE,GAAGD,KAAA,CAAMC,OAAO;MAAEC,eAAA,EAAiBF,KAAA,CAAME;IAAgB;EACtE;AACF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/ProgressField/index.ts"],"sourcesContent":["export * from './ProgressField';\n"],"mappings":"AAAA,cAAc"}
|
package/lib/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["ProgressBar","progressBarClassNames","renderProgressBar_unstable","useProgressBar_unstable","useProgressBarStyles_unstable","ProgressField","ProgressField_unstable","progressFieldClassNames"],"sources":["../src/
|
1
|
+
{"version":3,"names":["ProgressBar","progressBarClassNames","renderProgressBar_unstable","useProgressBar_unstable","useProgressBarStyles_unstable","ProgressField","ProgressField_unstable","progressFieldClassNames"],"sources":["../src/index.ts"],"sourcesContent":["export {\n ProgressBar,\n progressBarClassNames,\n renderProgressBar_unstable,\n useProgressBar_unstable,\n useProgressBarStyles_unstable,\n} from './ProgressBar';\nexport type { ProgressBarProps, ProgressBarSlots, ProgressBarState } from './ProgressBar';\n\n// eslint-disable-next-line deprecation/deprecation\nexport { ProgressField as ProgressField_unstable, progressFieldClassNames } from './ProgressField';\n// eslint-disable-next-line deprecation/deprecation\nexport type { ProgressFieldProps as ProgressFieldProps_unstable } from './ProgressField';\n"],"mappings":"AAAA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,uBAAuB,EACvBC,6BAA6B,QACxB;AAGP;AACA,SAASC,aAAA,IAAiBC,sBAAsB,EAAEC,uBAAuB,QAAQ"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["clampMax","max","internalMax","process","env","NODE_ENV","console","error"],"sources":["
|
1
|
+
{"version":3,"names":["clampMax","max","internalMax","process","env","NODE_ENV","console","error"],"sources":["../../src/utils/clampMax.ts"],"sourcesContent":["export const clampMax = (max: number): number => {\n const internalMax = max <= 0 ? 1 : max;\n\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"],"mappings":"AAAA,OAAO,MAAMA,QAAA,GAAYC,GAAA,IAAwB;EAC/C,MAAMC,WAAA,GAAcD,GAAA,IAAO,IAAI,IAAIA,GAAG;EAEtC,IAAIE,OAAA,CAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzC,IAAIJ,GAAA,IAAO,GAAG;MACZ;MACAK,OAAA,CAAQC,KAAK,CAAE,wDAAuDN,GAAI,EAAC;IAC7E;EACF;EACA,OAAOC,WAAA;AACT"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["clampValue","value","max","undefined","internalValue","process","env","NODE_ENV","console","error"],"sources":["
|
1
|
+
{"version":3,"names":["clampValue","value","max","undefined","internalValue","process","env","NODE_ENV","console","error"],"sources":["../../src/utils/clampValue.ts"],"sourcesContent":["export const clampValue = (value: number | undefined, max: number): number | undefined => {\n if (value === undefined) {\n return value;\n }\n const internalValue = value < 0 ? 0 : value > max ? max : value;\n\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"],"mappings":"AAAA,OAAO,MAAMA,UAAA,GAAaA,CAACC,KAAA,EAA2BC,GAAA,KAAoC;EACxF,IAAID,KAAA,KAAUE,SAAA,EAAW;IACvB,OAAOF,KAAA;EACT;EACA,MAAMG,aAAA,GAAgBH,KAAA,GAAQ,IAAI,IAAIA,KAAA,GAAQC,GAAA,GAAMA,GAAA,GAAMD,KAAK;EAE/D,IAAII,OAAA,CAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzC,IAAIN,KAAA,GAAQ,GAAG;MACb;MACAO,OAAA,CAAQC,KAAK,CAAE,2EAA0ER,KAAM,EAAC;IAClG;IACA,IAAIA,KAAA,GAAQC,GAAA,EAAK;MACf;MACAM,OAAA,CAAQC,KAAK,CAAE,yEAAwER,KAAM,UAASC,GAAI,EAAC;IAC7G;EACF;EACA,OAAOE,aAAA;AACT"}
|
package/lib/utils/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":[],"sources":["../../src/utils/index.ts"],"sourcesContent":["export * from './clampMax';\nexport * from './clampValue';\n"],"mappings":"AAAA,cAAc;AACd,cAAc"}
|
@@ -1,8 +1,9 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
3
|
+
value: true
|
5
4
|
});
|
6
|
-
const
|
7
|
-
|
5
|
+
const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
|
6
|
+
_exportStar(require("./components/ProgressBar/index"), exports);
|
7
|
+
//# sourceMappingURL=ProgressBar.js.map
|
8
|
+
|
8
9
|
//# sourceMappingURL=ProgressBar.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../lib/ProgressBar.js"],"sourcesContent":["export * from './components/ProgressBar/index';\n//# sourceMappingURL=ProgressBar.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,uCAAuC"}
|
@@ -1,8 +1,9 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
3
|
+
value: true
|
5
4
|
});
|
6
|
-
const
|
7
|
-
|
5
|
+
const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
|
6
|
+
_exportStar(require("./components/ProgressField/index"), exports);
|
7
|
+
//# sourceMappingURL=ProgressField.js.map
|
8
|
+
|
8
9
|
//# sourceMappingURL=ProgressField.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../lib/ProgressField.js"],"sourcesContent":["export * from './components/ProgressField/index';\n//# sourceMappingURL=ProgressField.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,yCAAyC"}
|
@@ -1,25 +1,24 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
Object.defineProperty(exports, "ProgressBar", {
|
6
|
+
enumerable: true,
|
7
|
+
get: ()=>ProgressBar
|
5
8
|
});
|
6
|
-
|
7
|
-
const
|
8
|
-
const
|
9
|
-
const
|
10
|
-
const
|
11
|
-
const
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
const {
|
19
|
-
useProgressBarStyles_unstable: useCustomStyles
|
20
|
-
} = react_shared_contexts_1.useCustomStyleHooks_unstable();
|
21
|
-
useCustomStyles(state);
|
22
|
-
return renderProgressBar_1.renderProgressBar_unstable(state);
|
9
|
+
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
10
|
+
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
11
|
+
const _useProgressBar = require("./useProgressBar");
|
12
|
+
const _renderProgressBar = require("./renderProgressBar");
|
13
|
+
const _useProgressBarStyles = require("./useProgressBarStyles");
|
14
|
+
const _reactSharedContexts = require("@fluentui/react-shared-contexts");
|
15
|
+
const ProgressBar = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
16
|
+
const state = (0, _useProgressBar.useProgressBar_unstable)(props, ref);
|
17
|
+
(0, _useProgressBarStyles.useProgressBarStyles_unstable)(state);
|
18
|
+
const { useProgressBarStyles_unstable: useCustomStyles } = (0, _reactSharedContexts.useCustomStyleHooks_unstable)();
|
19
|
+
useCustomStyles(state);
|
20
|
+
return (0, _renderProgressBar.renderProgressBar_unstable)(state);
|
23
21
|
});
|
24
|
-
|
22
|
+
ProgressBar.displayName = 'ProgressBar'; //# sourceMappingURL=ProgressBar.js.map
|
23
|
+
|
25
24
|
//# sourceMappingURL=ProgressBar.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
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,"
|
1
|
+
{"version":3,"sources":["../../../lib/components/ProgressBar/ProgressBar.types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=ProgressBar.types.js.map"],"names":[],"mappings":";;;;CACA,6CAA6C"}
|
@@ -1,12 +1,13 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
3
|
+
value: true
|
5
4
|
});
|
6
|
-
const
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
5
|
+
const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
|
6
|
+
_exportStar(require("./ProgressBar"), exports);
|
7
|
+
_exportStar(require("./ProgressBar.types"), exports);
|
8
|
+
_exportStar(require("./renderProgressBar"), exports);
|
9
|
+
_exportStar(require("./useProgressBar"), exports);
|
10
|
+
_exportStar(require("./useProgressBarStyles"), exports);
|
11
|
+
//# sourceMappingURL=index.js.map
|
12
|
+
|
12
13
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
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,24 +1,17 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
Object.defineProperty(exports, "renderProgressBar_unstable", {
|
6
|
+
enumerable: true,
|
7
|
+
get: ()=>renderProgressBar_unstable
|
5
8
|
});
|
6
|
-
|
7
|
-
const
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
*/
|
12
|
-
|
13
|
-
|
14
|
-
slots,
|
15
|
-
slotProps
|
16
|
-
} = react_utilities_1.getSlots(state);
|
17
|
-
return React.createElement(slots.root, {
|
18
|
-
...slotProps.root
|
19
|
-
}, slots.bar && React.createElement(slots.bar, {
|
20
|
-
...slotProps.bar
|
21
|
-
}));
|
22
|
-
};
|
23
|
-
exports.renderProgressBar_unstable = renderProgressBar_unstable;
|
9
|
+
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
10
|
+
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
11
|
+
const _reactUtilities = require("@fluentui/react-utilities");
|
12
|
+
const renderProgressBar_unstable = (state)=>{
|
13
|
+
const { slots , slotProps } = (0, _reactUtilities.getSlots)(state);
|
14
|
+
return /*#__PURE__*/ _react.createElement(slots.root, slotProps.root, slots.bar && /*#__PURE__*/ _react.createElement(slots.bar, slotProps.bar));
|
15
|
+
}; //# sourceMappingURL=renderProgressBar.js.map
|
16
|
+
|
24
17
|
//# sourceMappingURL=renderProgressBar.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
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"}
|