@fluentui/react-progress 0.0.0-nightly-20230222-0421.1 → 0.0.0-nightly-20230223-2115.1
Sign up to get free protection for your applications and to get access to all the features.
- package/.swcrc +33 -0
- package/CHANGELOG.json +28 -13
- package/CHANGELOG.md +18 -9
- 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 +2 -5
- package/lib/components/ProgressBar/renderProgressBar.js.map +1 -1
- package/lib/components/ProgressBar/useProgressBar.js +1 -0
- package/lib/components/ProgressBar/useProgressBar.js.map +1 -1
- 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-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 +16 -15
- 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 +15 -20
- package/lib-commonjs/components/ProgressBar/renderProgressBar.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/useProgressBar.js +38 -49
- package/lib-commonjs/components/ProgressBar/useProgressBar.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js +246 -144
- 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/package.json +8 -8
package/.swcrc
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
{
|
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
|
+
},
|
12
|
+
"exclude": [
|
13
|
+
"/testing",
|
14
|
+
"/**/*.cy.ts",
|
15
|
+
"/**/*.cy.tsx",
|
16
|
+
"/**/*.spec.ts",
|
17
|
+
"/**/*.spec.tsx",
|
18
|
+
"/**/*.test.ts",
|
19
|
+
"/**/*.test.tsx"
|
20
|
+
],
|
21
|
+
"jsc": {
|
22
|
+
"parser": {
|
23
|
+
"syntax": "typescript",
|
24
|
+
"tsx": true,
|
25
|
+
"decorators": false,
|
26
|
+
"dynamicImport": false
|
27
|
+
},
|
28
|
+
"target": "es2019",
|
29
|
+
"externalHelpers": true
|
30
|
+
},
|
31
|
+
"minify": false,
|
32
|
+
"sourceMaps": true
|
33
|
+
}
|
package/CHANGELOG.json
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
"name": "@fluentui/react-progress",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-progress_v0.0.0-nightly-
|
7
|
-
"version": "0.0.0-nightly-
|
5
|
+
"date": "Thu, 23 Feb 2023 21:23:15 GMT",
|
6
|
+
"tag": "@fluentui/react-progress_v0.0.0-nightly-20230223-2115.1",
|
7
|
+
"version": "0.0.0-nightly-20230223-2115.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
@@ -16,32 +16,47 @@
|
|
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-20230223-2115.1",
|
20
|
+
"commit": "a400eb0e4c7e02093ab7fb103c74a8dcca00f17b"
|
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-20230223-2115.1",
|
26
|
+
"commit": "a400eb0e4c7e02093ab7fb103c74a8dcca00f17b"
|
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-20230223-2115.1",
|
32
|
+
"commit": "a400eb0e4c7e02093ab7fb103c74a8dcca00f17b"
|
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-20230223-2115.1",
|
38
|
+
"commit": "a400eb0e4c7e02093ab7fb103c74a8dcca00f17b"
|
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-20230223-2115.1",
|
44
|
+
"commit": "a400eb0e4c7e02093ab7fb103c74a8dcca00f17b"
|
45
|
+
}
|
46
|
+
]
|
47
|
+
}
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"date": "Wed, 22 Feb 2023 23:06:06 GMT",
|
51
|
+
"tag": "@fluentui/react-progress_v9.0.0",
|
52
|
+
"version": "9.0.0",
|
53
|
+
"comments": {
|
54
|
+
"minor": [
|
55
|
+
{
|
56
|
+
"author": "ololubek@microsoft.com",
|
57
|
+
"package": "@fluentui/react-progress",
|
58
|
+
"commit": "ba7aaecf417043f343933edc159bb5c7e745c8c6",
|
59
|
+
"comment": "feat: Move ProgressBar to stable"
|
45
60
|
}
|
46
61
|
]
|
47
62
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,22 +1,31 @@
|
|
1
1
|
# Change Log - @fluentui/react-progress
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Thu, 23 Feb 2023 21:23:15 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-20230223-2115.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v0.0.0-nightly-20230223-2115.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.0.0
|
9
|
+
Thu, 23 Feb 2023 21:23:15 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.0.0..@fluentui/react-progress_v0.0.0-nightly-20230223-2115.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-20230223-2115.1 ([commit](https://github.com/microsoft/fluentui/commit/a400eb0e4c7e02093ab7fb103c74a8dcca00f17b) by beachball)
|
16
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230223-2115.1 ([commit](https://github.com/microsoft/fluentui/commit/a400eb0e4c7e02093ab7fb103c74a8dcca00f17b) by beachball)
|
17
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20230223-2115.1 ([commit](https://github.com/microsoft/fluentui/commit/a400eb0e4c7e02093ab7fb103c74a8dcca00f17b) by beachball)
|
18
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20230223-2115.1 ([commit](https://github.com/microsoft/fluentui/commit/a400eb0e4c7e02093ab7fb103c74a8dcca00f17b) by beachball)
|
19
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230223-2115.1 ([commit](https://github.com/microsoft/fluentui/commit/a400eb0e4c7e02093ab7fb103c74a8dcca00f17b) by beachball)
|
20
|
+
|
21
|
+
## [9.0.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.0.0)
|
22
|
+
|
23
|
+
Wed, 22 Feb 2023 23:06:06 GMT
|
24
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.0.0-alpha.19..@fluentui/react-progress_v9.0.0)
|
25
|
+
|
26
|
+
### Minor changes
|
27
|
+
|
28
|
+
- feat: Move ProgressBar to stable ([PR #26008](https://github.com/microsoft/fluentui/pull/26008) by ololubek@microsoft.com)
|
20
29
|
|
21
30
|
## [9.0.0-alpha.19](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.0.0-alpha.19)
|
22
31
|
|
package/lib/ProgressBar.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"mappings":"AAAA,cAAc","names":[],"sources":["../src/ProgressBar.ts"],"sourcesContent":["export * from './components/ProgressBar/index';\n"]}
|
package/lib/ProgressField.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"mappings":"AAAA,cAAc","names":[],"sources":["../src/ProgressField.ts"],"sourcesContent":["export * from './components/ProgressField/index';\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"mappings":"AAAA,
|
1
|
+
{"version":3,"mappings":"AAAA,YAAYA,WAAW;AACvB,SAASC,uBAAuB,QAAQ;AACxC,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,6BAA6B,QAAQ;AAI9C;;;AAGA,OAAO,MAAMC,2BAAqDJ,MAAMK,UAAU,CAAC,CAACC,OAAOC,QAAQ;EACjG,MAAMC,QAAQP,wBAAwBK,OAAOC;EAE7CJ,8BAA8BK;EAC9B,OAAON,2BAA2BM;AACpC;AAEAJ,YAAYK,WAAW,GAAG","names":["React","useProgressBar_unstable","renderProgressBar_unstable","useProgressBarStyles_unstable","ProgressBar","forwardRef","props","ref","state","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';\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 return renderProgressBar_unstable(state);\n});\n\nProgressBar.displayName = 'ProgressBar';\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"mappings":"AAAA","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"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc","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"]}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import _extends from "@swc/helpers/src/_extends.mjs";
|
1
2
|
import * as React from 'react';
|
2
3
|
import { getSlots } from '@fluentui/react-utilities';
|
3
4
|
/**
|
@@ -8,10 +9,6 @@ export const renderProgressBar_unstable = state => {
|
|
8
9
|
slots,
|
9
10
|
slotProps
|
10
11
|
} = getSlots(state);
|
11
|
-
return /*#__PURE__*/React.createElement(slots.root, {
|
12
|
-
...slotProps.root
|
13
|
-
}, slots.bar && /*#__PURE__*/React.createElement(slots.bar, {
|
14
|
-
...slotProps.bar
|
15
|
-
}));
|
12
|
+
return /*#__PURE__*/React.createElement(slots.root, _extends({}, slotProps.root), slots.bar && /*#__PURE__*/React.createElement(slots.bar, _extends({}, slotProps.bar)));
|
16
13
|
};
|
17
14
|
//# sourceMappingURL=renderProgressBar.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"mappings":"AAAA,
|
1
|
+
{"version":3,"mappings":";AAAA,YAAYA,WAAW;AACvB,SAASC,QAAQ,QAAQ;AAGzB;;;AAGA,OAAO,MAAMC,6BAA8BC,SAA4B;EACrE,MAAM;IAAEC;IAAOC;EAAS,CAAE,GAAGJ,SAA2BE;EACxD,oBAAOH,oBAACI,MAAME,IAAI,eAAKD,UAAUC,IAAI,GAAGF,MAAMG,GAAG,iBAAIP,oBAACI,MAAMG,GAAG,eAAKF,UAAUE,GAAG;AACnF","names":["React","getSlots","renderProgressBar_unstable","state","slots","slotProps","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"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"mappings":"
|
1
|
+
{"version":3,"mappings":"AAAA,YAAYA,WAAW;AACvB,SAASC,qBAAqB,EAAEC,gBAAgB,QAAQ;AAGxD;;;;;;;;;AASA,OAAO,MAAMC,0BAA0B,CAACC,OAAyBC,QAAkD;EACjH;EACA,MAAM;IAAEC,QAAQ;IAASC,MAAM;IAAKC,QAAQ;IAAWC,YAAY;IAAUC;EAAK,CAAE,GAAGN;EAEvF,MAAMO,OAAOV,sBAAsB,OAAO;IACxCI;IACAO,MAAM;IACN,iBAAiBF,UAAUG,YAAY,IAAIA,SAAS;IACpD,iBAAiBH,UAAUG,YAAYN,MAAMM,SAAS;IACtD,iBAAiBH;IACjB,GAAGN;EACL;EAEA,MAAMU,MAAMZ,iBAAiBE,MAAMU,GAAG,EAAE;IACtCC,UAAU;EACZ;EAEA,MAAMC,QAA0B;IAC9BV;IACAC;IACAC;IACAC;IACAC;IACAO,YAAY;MACVN,MAAM;MACNG,KAAK;IACP;IACAH;IACAG;EACF;EAEA,OAAOE;AACT","names":["React","getNativeElementProps","resolveShorthand","useProgressBar_unstable","props","ref","color","max","shape","thickness","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 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', max = 1.0, shape = 'rounded', thickness = 'medium', value } = props;\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"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"mappings":"AAAA,mBAAqBA,YAAY,EAAEC,UAAU,QAAQ
|
1
|
+
{"version":3,"mappings":"AAAA,mBAAqBA,YAAY,EAAEC,UAAU,QAAQ;AACrD,SAASC,MAAM,QAAQ;AACvB,SAASC,sBAAsBC,SAAS,QAAQ;AAIhD,OAAO,MAAMC,wBAA0D;EACrEC,MAAM;EACNC,KAAK;AACP;AAEA;AACA;AACA,MAAMC,iBAAiB;AAEvB,MAAMC,qBAAqB;EACzBC,QAAQ;EACRC,OAAO;AACT;AAEA,MAAMC,2BAA2B;EAC/B,MAAM;IACJC,MAAM;EACR;EACA,QAAQ;IACNA,MAAM;EACR;AACF;AACA,MAAMC,8BAA8B;EAClC,QAAQ;IACNC,OAAO;EACT;EACA,MAAM;IACJA,OAAO;EACT;AACF;AAEA;;;AAGA,MAAMC,6BAAgBC;EAAAA;IAAAA;IAAAA;IAAAA;IAAAA;IAAAA;IAAAA;IAAAA;IAAAA;EAAAA;EAAAA;IAAAA;IAAAA;IAAAA;IAAAA;EAAAA;EAAAA;IAAAA;IAAAA;IAAAA;IAAAA;EAAAA;EAAAA;IAAAA;EAAAA;EAAAA;IAAAA;EAAAA;AAAAA;EAAAA;EAAAA;IAAAA;EAAAA;IAAAA;EAAAA;IAAAA;EAAAA;AAAAA,EAuBtB;AAEA;;;AAGA,MAAMC,4BAAeD;EAAAA;IAAAA;IAAAA;IAAAA;IAAAA;EAAAA;EAAAA;IAAAA;EAAAA;EAAAA;IAAAA;EAAAA;EAAAA;IAAAA;IAAAA;IAAAA;EAAAA;EAAAA;IAAAA;IAAAA;IAAAA;IAAAA;IAAAA;IAAAA;IAAAA;IAAAA;EAAAA;EAAAA;IAAAA;EAAAA;EAAAA;IAAAA;IAAAA;EAAAA;EAAAA;IAAAA;EAAAA;EAAAA;IAAAA;EAAAA;EAAAA;IAAAA;EAAAA;AAAAA;EAAAA;EAAAA;EAAAA;IAAAA;EAAAA;IAAAA;EAAAA;IAAAA;EAAAA;AAAAA,EAqDrB;AAEA;;;AAGA,OAAO,MAAME,gCAAiCC,SAA8C;EAC1F,MAAM;IAAEC;IAAOC;IAAKC;IAAOC;IAAWC;EAAK,CAAE,GAAGL;EAChD,MAAMM,aAAaV;EACnB,MAAMW,YAAYT;EAClB,MAAM;IAAEU;EAAG,CAAE,GAAGxB;EAEhBgB,MAAMd,IAAI,CAACuB,SAAS,GAAG7B,aACrBK,sBAAsBC,IAAI,EAC1BoB,WAAWpB,IAAI,EACfoB,UAAU,CAACH,MAAM,EACjBG,UAAU,CAACF,UAAU,EACrBJ,MAAMd,IAAI,CAACuB,SAAS;EAGtB,IAAIT,MAAMb,GAAG,EAAE;IACba,MAAMb,GAAG,CAACsB,SAAS,GAAG7B,aACpBK,sBAAsBE,GAAG,EACzBoB,UAAUG,IAAI,EACdH,UAAUI,KAAK,EACfN,UAAUO,aAAaL,UAAUM,aAAa,EAC9CR,UAAUO,aAAaJ,QAAQ,SAASD,UAAUO,GAAG,EACrDP,SAAS,CAACH,UAAU,EACpBC,UAAUO,aAAaP,QAAQjB,kBAAkBmB,UAAUQ,kBAAkB,EAC7Ed,SAASI,UAAUO,aAAaL,SAAS,CAACN,MAAM,EAChDD,MAAMb,GAAG,CAACsB,SAAS;EAEvB;EAEA,IAAIT,MAAMb,GAAG,IAAIkB,UAAUO,WAAW;IACpCZ,MAAMb,GAAG,CAAC6B,KAAK,GAAG;MAChBC,OAAOC,KAAKC,GAAG,CAAC,KAAKD,KAAKhB,GAAG,CAAC,GAAGG,KAACA,GAAQH,MAAO,QAAQ;MACzD,GAAGF,MAAMb,GAAG,CAAC6B;IACf;EACF;EAEA,OAAOhB;AACT","names":["mergeClasses","shorthands","tokens","useFluent_unstable","useFluent","progressBarClassNames","root","bar","ZERO_THRESHOLD","barThicknessValues","medium","large","indeterminateProgressBar","left","indeterminateProgressBarRTL","right","useRootStyles","makeStyles","useBarStyles","useProgressBarStyles_unstable","state","color","max","shape","thickness","value","rootStyles","barStyles","dir","className","base","brand","undefined","indeterminate","rtl","nonZeroDeterminate","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 { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\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: '-100% /* @noflip */',\n },\n '100%': {\n left: '100% /* @noflip */',\n },\n};\nconst indeterminateProgressBarRTL = {\n '100%': {\n right: '-100% /* @noflip */',\n },\n '0%': {\n right: '100% /* @noflip */',\n },\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootStyles = makeStyles({\n root: {\n display: 'block',\n backgroundColor: tokens.colorNeutralBackground6,\n justifySelf: 'stretch',\n ...shorthands.overflow('hidden'),\n\n '@media screen and (forced-colors: active)': {\n ...shorthands.borderBottom('1px', 'solid', '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 ...shorthands.borderRadius('inherit'),\n },\n medium: {\n height: barThicknessValues.medium,\n },\n large: {\n height: barThicknessValues.large,\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 animationIterationCount: 'infinite',\n '@media screen and (prefers-reduced-motion: reduce)': {\n animationDuration: '0.01ms',\n animationIterationCount: '1',\n },\n },\n\n rtl: {\n animationName: indeterminateProgressBarRTL,\n },\n\n brand: {\n backgroundColor: tokens.colorCompoundBrandBackground,\n '@media screen and (forced-colors: active)': {\n backgroundColor: 'Highlight',\n },\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 const { dir } = useFluent();\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 && dir === 'rtl' && barStyles.rtl,\n barStyles[thickness],\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"]}
|
@@ -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,"mappings":"AAAA
|
1
|
+
{"version":3,"mappings":"AAAA,4CACA,SAA+BA,4BAA4B,EAAEC,mBAAmB,QAAQ;AAExF,SAASC,WAAW,EAAEC,qBAAqB,QAA0B;AAIrE;AACA,OAAO,MAAMC,uCAA0BJ,6BAA6BG,sBAAsBE,IAAI;AAC9F;AACA,OAAO,MAAMC,6BAAyDL,oBAAoBC,aAAa;EACrGK,aAAa;EACbC,UAAWC,UAA+B;IACxC,GAAGA,KAAK;IACRC,SAAS;MAAE,GAAGD,MAAMC,OAAO;MAAEC,iBAAiBF,MAAME;IAAgB;EACtE;AACF","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"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"mappings":"AAAA,cAAc","names":[],"sources":["../../../src/components/ProgressField/index.ts"],"sourcesContent":["export * from './ProgressField';\n"]}
|
package/lib/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"mappings":"AAAA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,uBAAuB,EACvBC,6BAA6B,QACxB
|
1
|
+
{"version":3,"mappings":"AAAA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,uBAAuB,EACvBC,6BAA6B,QACxB;AAGP;AACA,SAASC,iBAAiBC,sBAAsB,EAAEC,uBAAuB,QAAQ","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"]}
|
@@ -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,20 +1,21 @@
|
|
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
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
const state = useProgressBar_1.useProgressBar_unstable(props, ref);
|
16
|
-
useProgressBarStyles_1.useProgressBarStyles_unstable(state);
|
17
|
-
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 ProgressBar = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
15
|
+
const state = (0, _useProgressBar.useProgressBar_unstable)(props, ref);
|
16
|
+
(0, _useProgressBarStyles.useProgressBarStyles_unstable)(state);
|
17
|
+
return (0, _renderProgressBar.renderProgressBar_unstable)(state);
|
18
18
|
});
|
19
|
-
|
19
|
+
ProgressBar.displayName = 'ProgressBar'; //# sourceMappingURL=ProgressBar.js.map
|
20
|
+
|
20
21
|
//# 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';\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 return renderProgressBar_unstable(state);\n});\nProgressBar.displayName = 'ProgressBar';\n//# sourceMappingURL=ProgressBar.js.map"],"names":["ProgressBar","React","forwardRef","props","ref","state","useProgressBar_unstable","useProgressBarStyles_unstable","renderProgressBar_unstable","displayName"],"mappings":";;;;+BAOaA;;aAAAA;;;6DAPU;gCACiB;mCACG;sCACG;AAIvC,MAAMA,cAAc,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACvE,MAAMC,QAAQC,IAAAA,uCAAuB,EAACH,OAAOC;IAC7CG,IAAAA,mDAA6B,EAACF;IAC9B,OAAOG,IAAAA,6CAA0B,EAACH;AACpC;AACAL,YAAYS,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,19 @@
|
|
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
|
-
const
|
13
|
-
|
14
|
-
|
15
|
-
|
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 _interopRequireDefault = require("@swc/helpers/lib/_interop_require_default.js").default;
|
10
|
+
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
11
|
+
const _extends = require("@swc/helpers/lib/_extends.js").default;
|
12
|
+
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
13
|
+
const _reactUtilities = require("@fluentui/react-utilities");
|
14
|
+
const renderProgressBar_unstable = (state)=>{
|
15
|
+
const { slots , slotProps } = (0, _reactUtilities.getSlots)(state);
|
16
|
+
return /*#__PURE__*/ _react.createElement(slots.root, _extends({}, slotProps.root), slots.bar && /*#__PURE__*/ _react.createElement(slots.bar, _extends({}, slotProps.bar)));
|
17
|
+
}; //# sourceMappingURL=renderProgressBar.js.map
|
18
|
+
|
24
19
|
//# sourceMappingURL=renderProgressBar.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../../lib/components/ProgressBar/renderProgressBar.js"],"sourcesContent":["import _extends from \"@swc/helpers/src/_extends.mjs\";\nimport * 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, _extends({}, slotProps.root), slots.bar && /*#__PURE__*/React.createElement(slots.bar, _extends({}, slotProps.bar)));\n};\n//# sourceMappingURL=renderProgressBar.js.map"],"names":["renderProgressBar_unstable","state","slots","slotProps","getSlots","React","createElement","root","_extends","bar"],"mappings":";;;;+BAMaA;;aAAAA;;;;yBANQ;6DACE;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,EAAEC,SAAS,CAAC,GAAGL,UAAUI,IAAI,GAAGL,MAAMO,GAAG,IAAI,WAAW,GAAEJ,OAAMC,aAAa,CAACJ,MAAMO,GAAG,EAAED,SAAS,CAAC,GAAGL,UAAUM,GAAG;AACvK,GACA,6CAA6C"}
|