@fluentui/react-progress 0.0.0-nightly-20230223-2115.1 → 0.0.0-nightly-20230227-0424.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. package/CHANGELOG.json +13 -13
  2. package/CHANGELOG.md +9 -9
  3. package/lib/ProgressBar.js.map +1 -1
  4. package/lib/ProgressField.js.map +1 -1
  5. package/lib/components/ProgressBar/ProgressBar.js.map +1 -1
  6. package/lib/components/ProgressBar/ProgressBar.types.js.map +1 -1
  7. package/lib/components/ProgressBar/index.js.map +1 -1
  8. package/lib/components/ProgressBar/renderProgressBar.js +5 -2
  9. package/lib/components/ProgressBar/renderProgressBar.js.map +1 -1
  10. package/lib/components/ProgressBar/useProgressBar.js +0 -1
  11. package/lib/components/ProgressBar/useProgressBar.js.map +1 -1
  12. package/lib/components/ProgressBar/useProgressBarStyles.js.map +1 -1
  13. package/lib/components/ProgressField/ProgressField.js +2 -1
  14. package/lib/components/ProgressField/ProgressField.js.map +1 -1
  15. package/lib/components/ProgressField/index.js.map +1 -1
  16. package/lib/index.js.map +1 -1
  17. package/lib-commonjs/ProgressBar.js +4 -5
  18. package/lib-commonjs/ProgressBar.js.map +1 -1
  19. package/lib-commonjs/ProgressField.js +4 -5
  20. package/lib-commonjs/ProgressField.js.map +1 -1
  21. package/lib-commonjs/components/ProgressBar/ProgressBar.js +15 -16
  22. package/lib-commonjs/components/ProgressBar/ProgressBar.js.map +1 -1
  23. package/lib-commonjs/components/ProgressBar/ProgressBar.types.js +2 -3
  24. package/lib-commonjs/components/ProgressBar/ProgressBar.types.js.map +1 -1
  25. package/lib-commonjs/components/ProgressBar/index.js +8 -9
  26. package/lib-commonjs/components/ProgressBar/index.js.map +1 -1
  27. package/lib-commonjs/components/ProgressBar/renderProgressBar.js +20 -15
  28. package/lib-commonjs/components/ProgressBar/renderProgressBar.js.map +1 -1
  29. package/lib-commonjs/components/ProgressBar/useProgressBar.js +49 -38
  30. package/lib-commonjs/components/ProgressBar/useProgressBar.js.map +1 -1
  31. package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js +144 -246
  32. package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js.map +1 -1
  33. package/lib-commonjs/components/ProgressField/ProgressField.js +19 -25
  34. package/lib-commonjs/components/ProgressField/ProgressField.js.map +1 -1
  35. package/lib-commonjs/components/ProgressField/index.js +4 -5
  36. package/lib-commonjs/components/ProgressField/index.js.map +1 -1
  37. package/lib-commonjs/index.js +49 -21
  38. package/lib-commonjs/index.js.map +1 -1
  39. package/package.json +8 -8
  40. package/.swcrc +0 -33
package/CHANGELOG.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "name": "@fluentui/react-progress",
3
3
  "entries": [
4
4
  {
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",
5
+ "date": "Mon, 27 Feb 2023 04:31:27 GMT",
6
+ "tag": "@fluentui/react-progress_v0.0.0-nightly-20230227-0424.1",
7
+ "version": "0.0.0-nightly-20230227-0424.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
@@ -16,32 +16,32 @@
16
16
  {
17
17
  "author": "beachball",
18
18
  "package": "@fluentui/react-progress",
19
- "comment": "Bump @fluentui/react-field to v0.0.0-nightly-20230223-2115.1",
20
- "commit": "a400eb0e4c7e02093ab7fb103c74a8dcca00f17b"
19
+ "comment": "Bump @fluentui/react-field to v0.0.0-nightly-20230227-0424.1",
20
+ "commit": "aa8e336db1e2cb3ce6a73000564bfb59f2fbdf3d"
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-20230223-2115.1",
26
- "commit": "a400eb0e4c7e02093ab7fb103c74a8dcca00f17b"
25
+ "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230227-0424.1",
26
+ "commit": "aa8e336db1e2cb3ce6a73000564bfb59f2fbdf3d"
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-20230223-2115.1",
32
- "commit": "a400eb0e4c7e02093ab7fb103c74a8dcca00f17b"
31
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230227-0424.1",
32
+ "commit": "aa8e336db1e2cb3ce6a73000564bfb59f2fbdf3d"
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-20230223-2115.1",
38
- "commit": "a400eb0e4c7e02093ab7fb103c74a8dcca00f17b"
37
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230227-0424.1",
38
+ "commit": "aa8e336db1e2cb3ce6a73000564bfb59f2fbdf3d"
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-20230223-2115.1",
44
- "commit": "a400eb0e4c7e02093ab7fb103c74a8dcca00f17b"
43
+ "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230227-0424.1",
44
+ "commit": "aa8e336db1e2cb3ce6a73000564bfb59f2fbdf3d"
45
45
  }
46
46
  ]
47
47
  }
package/CHANGELOG.md CHANGED
@@ -1,22 +1,22 @@
1
1
  # Change Log - @fluentui/react-progress
2
2
 
3
- This log was last generated on Thu, 23 Feb 2023 21:23:15 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 27 Feb 2023 04:31:27 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20230223-2115.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v0.0.0-nightly-20230223-2115.1)
7
+ ## [0.0.0-nightly-20230227-0424.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v0.0.0-nightly-20230227-0424.1)
8
8
 
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)
9
+ Mon, 27 Feb 2023 04:31:27 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.0.0..@fluentui/react-progress_v0.0.0-nightly-20230227-0424.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-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)
15
+ - Bump @fluentui/react-field to v0.0.0-nightly-20230227-0424.1 ([commit](https://github.com/microsoft/fluentui/commit/aa8e336db1e2cb3ce6a73000564bfb59f2fbdf3d) by beachball)
16
+ - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230227-0424.1 ([commit](https://github.com/microsoft/fluentui/commit/aa8e336db1e2cb3ce6a73000564bfb59f2fbdf3d) by beachball)
17
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20230227-0424.1 ([commit](https://github.com/microsoft/fluentui/commit/aa8e336db1e2cb3ce6a73000564bfb59f2fbdf3d) by beachball)
18
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20230227-0424.1 ([commit](https://github.com/microsoft/fluentui/commit/aa8e336db1e2cb3ce6a73000564bfb59f2fbdf3d) by beachball)
19
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230227-0424.1 ([commit](https://github.com/microsoft/fluentui/commit/aa8e336db1e2cb3ce6a73000564bfb59f2fbdf3d) by beachball)
20
20
 
21
21
  ## [9.0.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.0.0)
22
22
 
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,cAAc","names":[],"sources":["../src/ProgressBar.ts"],"sourcesContent":["export * from './components/ProgressBar/index';\n"]}
1
+ {"version":3,"file":"ProgressBar.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-progress/src/ProgressBar.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC","sourcesContent":["export * from './components/ProgressBar/index';\n"]}
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,cAAc","names":[],"sources":["../src/ProgressField.ts"],"sourcesContent":["export * from './components/ProgressField/index';\n"]}
1
+ {"version":3,"file":"ProgressField.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-progress/src/ProgressField.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './components/ProgressField/index';\n"]}
@@ -1 +1 @@
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
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,uBAAuB,QAAQ,kBAAkB;AAC1D,SAASC,0BAA0B,QAAQ,qBAAqB;AAChE,SAASC,6BAA6B,QAAQ,wBAAwB;AAItE;;;AAGA,OAAO,MAAMC,WAAW,gBAA0CJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAChG,MAAMC,KAAK,GAAGP,uBAAuB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAEjDJ,6BAA6B,CAACK,KAAK,CAAC;EACpC,OAAON,0BAA0B,CAACM,KAAK,CAAC;AAC1C,CAAC,CAAC;AAEFJ,WAAW,CAACK,WAAW,GAAG,aAAa","names":["React","useProgressBar_unstable","renderProgressBar_unstable","useProgressBarStyles_unstable","ProgressBar","forwardRef","props","ref","state","displayName"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/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,"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
+ {"version":3,"file":"ProgressBar.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/src/components/ProgressBar/ProgressBar.types.ts"],"names":[],"mappings":"","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,"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
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/src/components/ProgressBar/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC","sourcesContent":["export * from './ProgressBar';\nexport * from './ProgressBar.types';\nexport * from './renderProgressBar';\nexport * from './useProgressBar';\nexport * from './useProgressBarStyles';\n"]}
@@ -1,4 +1,3 @@
1
- import _extends from "@swc/helpers/src/_extends.mjs";
2
1
  import * as React from 'react';
3
2
  import { getSlots } from '@fluentui/react-utilities';
4
3
  /**
@@ -9,6 +8,10 @@ export const renderProgressBar_unstable = state => {
9
8
  slots,
10
9
  slotProps
11
10
  } = getSlots(state);
12
- return /*#__PURE__*/React.createElement(slots.root, _extends({}, slotProps.root), slots.bar && /*#__PURE__*/React.createElement(slots.bar, _extends({}, slotProps.bar)));
11
+ return /*#__PURE__*/React.createElement(slots.root, {
12
+ ...slotProps.root
13
+ }, slots.bar && /*#__PURE__*/React.createElement(slots.bar, {
14
+ ...slotProps.bar
15
+ }));
13
16
  };
14
17
  //# sourceMappingURL=renderProgressBar.js.map
@@ -1 +1 @@
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
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,0BAA0B,GAAIC,KAAuB,IAAI;EACpE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAmBE,KAAK,CAAC;EAC9D,oBAAOH,oBAACI,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,GAAGF,KAAK,CAACG,GAAG,iBAAIP,oBAACI,KAAK,CAACG,GAAG;IAAA,GAAKF,SAAS,CAACE;EAAG,EAAI,CAAc;AACrG,CAAC","names":["React","getSlots","renderProgressBar_unstable","state","slots","slotProps","root","bar"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/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,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';
3
2
  /**
4
3
  * Create the state required to render ProgressBar.
@@ -1 +1 @@
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
+ {"version":3,"mappings":"AACA,SAASA,qBAAqB,EAAEC,gBAAgB,QAAQ,2BAA2B;AAGnF;;;;;;;;;AASA,OAAO,MAAMC,uBAAuB,GAAG,CAACC,KAAuB,EAAEC,GAA2B,KAAsB;EAChH;EACA,MAAM;IAAEC,KAAK,GAAG,OAAO;IAAEC,GAAG,GAAG,GAAG;IAAEC,KAAK,GAAG,SAAS;IAAEC,SAAS,GAAG,QAAQ;IAAEC;EAAK,CAAE,GAAGN,KAAK;EAE5F,MAAMO,IAAI,GAAGV,qBAAqB,CAAC,KAAK,EAAE;IACxCI,GAAG;IACHO,IAAI,EAAE,aAAa;IACnB,eAAe,EAAEF,KAAK,KAAKG,SAAS,GAAG,CAAC,GAAGA,SAAS;IACpD,eAAe,EAAEH,KAAK,KAAKG,SAAS,GAAGN,GAAG,GAAGM,SAAS;IACtD,eAAe,EAAEH,KAAK;IACtB,GAAGN;GACJ,CAAC;EAEF,MAAMU,GAAG,GAAGZ,gBAAgB,CAACE,KAAK,CAACU,GAAG,EAAE;IACtCC,QAAQ,EAAE;GACX,CAAC;EAEF,MAAMC,KAAK,GAAqB;IAC9BV,KAAK;IACLC,GAAG;IACHC,KAAK;IACLC,SAAS;IACTC,KAAK;IACLO,UAAU,EAAE;MACVN,IAAI,EAAE,KAAK;MACXG,GAAG,EAAE;KACN;IACDH,IAAI;IACJG;GACD;EAED,OAAOE,KAAK;AACd,CAAC","names":["getNativeElementProps","resolveShorthand","useProgressBar_unstable","props","ref","color","max","shape","thickness","value","root","role","undefined","bar","required","state","components"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/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;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
+ {"version":3,"mappings":"AAAA,mBAAqBA,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,kBAAkB,IAAIC,SAAS,QAAQ,iCAAiC;AAIjF,OAAO,MAAMC,qBAAqB,GAAqC;EACrEC,IAAI,EAAE,iBAAiB;EACvBC,GAAG,EAAE;CACN;AAED;AACA;AACA,MAAMC,cAAc,GAAG,IAAI;AAE3B,MAAMC,kBAAkB,GAAG;EACzBC,MAAM,EAAE,KAAK;EACbC,KAAK,EAAE;CACR;AAED,MAAMC,wBAAwB,GAAG;EAC/B,IAAI,EAAE;IACJC,IAAI,EAAE;GACP;EACD,MAAM,EAAE;IACNA,IAAI,EAAE;;CAET;AACD,MAAMC,2BAA2B,GAAG;EAClC,MAAM,EAAE;IACNC,KAAK,EAAE;GACR;EACD,IAAI,EAAE;IACJA,KAAK,EAAE;;CAEV;AAED;;;AAGA,MAAMC,aAAa,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;AAAA,EAuBpB;AAEF;;;AAGA,MAAMC,YAAY,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;EAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;AAAA,EAqDnB;AAEF;;;AAGA,OAAO,MAAMC,6BAA6B,GAAIC,KAAuB,IAAsB;EACzF,MAAM;IAAEC,KAAK;IAAEC,GAAG;IAAEC,KAAK;IAAEC,SAAS;IAAEC;EAAK,CAAE,GAAGL,KAAK;EACrD,MAAMM,UAAU,GAAGT,aAAa,EAAE;EAClC,MAAMU,SAAS,GAAGT,YAAY,EAAE;EAChC,MAAM;IAAEU;EAAG,CAAE,GAAGvB,SAAS,EAAE;EAE3Be,KAAK,CAACb,IAAI,CAACsB,SAAS,GAAG5B,YAAY,CACjCK,qBAAqB,CAACC,IAAI,EAC1BmB,UAAU,CAACnB,IAAI,EACfmB,UAAU,CAACH,KAAK,CAAC,EACjBG,UAAU,CAACF,SAAS,CAAC,EACrBJ,KAAK,CAACb,IAAI,CAACsB,SAAS,CACrB;EAED,IAAIT,KAAK,CAACZ,GAAG,EAAE;IACbY,KAAK,CAACZ,GAAG,CAACqB,SAAS,GAAG5B,YAAY,CAChCK,qBAAqB,CAACE,GAAG,EACzBmB,SAAS,CAACG,IAAI,EACdH,SAAS,CAACI,KAAK,EACfN,KAAK,KAAKO,SAAS,IAAIL,SAAS,CAACM,aAAa,EAC9CR,KAAK,KAAKO,SAAS,IAAIJ,GAAG,KAAK,KAAK,IAAID,SAAS,CAACO,GAAG,EACrDP,SAAS,CAACH,SAAS,CAAC,EACpBC,KAAK,KAAKO,SAAS,IAAIP,KAAK,GAAGhB,cAAc,IAAIkB,SAAS,CAACQ,kBAAkB,EAC7Ed,KAAK,IAAII,KAAK,KAAKO,SAAS,IAAIL,SAAS,CAACN,KAAK,CAAC,EAChDD,KAAK,CAACZ,GAAG,CAACqB,SAAS,CACpB;;EAGH,IAAIT,KAAK,CAACZ,GAAG,IAAIiB,KAAK,KAAKO,SAAS,EAAE;IACpCZ,KAAK,CAACZ,GAAG,CAAC4B,KAAK,GAAG;MAChBC,KAAK,EAAEC,IAAI,CAACC,GAAG,CAAC,GAAG,EAAED,IAAI,CAAChB,GAAG,CAAC,CAAC,EAAGG,KAAK,GAAGH,GAAG,GAAI,GAAG,CAAC,CAAC,GAAG,GAAG;MAC5D,GAAGF,KAAK,CAACZ,GAAG,CAAC4B;KACd;;EAGH,OAAOhB,KAAK;AACd,CAAC","names":["mergeClasses","shorthands","tokens","useFluent_unstable","useFluent","progressBarClassNames","root","bar","ZERO_THRESHOLD","barThicknessValues","medium","large","indeterminateProgressBar","left","indeterminateProgressBarRTL","right","useRootStyles","useBarStyles","useProgressBarStyles_unstable","state","color","max","shape","thickness","value","rootStyles","barStyles","dir","className","base","brand","undefined","indeterminate","rtl","nonZeroDeterminate","style","width","Math","min"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/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,4 +1,5 @@
1
- /* eslint-disable deprecation/deprecation */import { getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';
1
+ /* eslint-disable deprecation/deprecation */
2
+ import { getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';
2
3
  import { ProgressBar, progressBarClassNames } from '../../ProgressBar';
3
4
  /** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */
4
5
  export const progressFieldClassNames = /*#__PURE__*/getDeprecatedFieldClassNames(progressBarClassNames.root);
@@ -1 +1 @@
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
+ {"version":3,"mappings":"AAAA;AACA,SAA+BA,4BAA4B,EAAEC,mBAAmB,QAAQ,uBAAuB;AAE/G,SAASC,WAAW,EAAEC,qBAAqB,QAA0B,mBAAmB;AAIxF;AACA,OAAO,MAAMC,uBAAuB,gBAAGJ,4BAA4B,CAACG,qBAAqB,CAACE,IAAI,CAAC;AAC/F;AACA,OAAO,MAAMC,aAAa,gBAA4CL,mBAAmB,CAACC,WAAW,EAAE;EACrGK,WAAW,EAAE,eAAe;EAC5BC,QAAQ,EAAGC,KAAyB,KAAM;IACxC,GAAGA,KAAK;IACRC,OAAO,EAAE;MAAE,GAAGD,KAAK,CAACC,OAAO;MAAEC,eAAe,EAAEF,KAAK,CAACE;IAAe;GACpE;CACF,CAAC","names":["getDeprecatedFieldClassNames","makeDeprecatedField","ProgressBar","progressBarClassNames","progressFieldClassNames","root","ProgressField","displayName","mapProps","props","control","validationState"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/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,"mappings":"AAAA,cAAc","names":[],"sources":["../../../src/components/ProgressField/index.ts"],"sourcesContent":["export * from './ProgressField';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/src/components/ProgressField/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC","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;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
+ {"version":3,"mappings":"AAAA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,uBAAuB,EACvBC,6BAA6B,QACxB,eAAe;AAGtB;AACA,SAASC,aAAa,IAAIC,sBAAsB,EAAEC,uBAAuB,QAAQ,iBAAiB","names":["ProgressBar","progressBarClassNames","renderProgressBar_unstable","useProgressBar_unstable","useProgressBarStyles_unstable","ProgressField","ProgressField_unstable","progressFieldClassNames"],"sourceRoot":"","sources":["../../../../../../../packages/react-components/react-progress/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,9 +1,8 @@
1
1
  "use strict";
2
+
2
3
  Object.defineProperty(exports, "__esModule", {
3
- value: true
4
+ value: true
4
5
  });
5
- const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
- _exportStar(require("./components/ProgressBar/index"), exports);
7
- //# sourceMappingURL=ProgressBar.js.map
8
-
6
+ const tslib_1 = /*#__PURE__*/require("tslib");
7
+ tslib_1.__exportStar(require("./components/ProgressBar/index"), exports);
9
8
  //# sourceMappingURL=ProgressBar.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/ProgressBar.js"],"sourcesContent":["export * from './components/ProgressBar/index';\n//# sourceMappingURL=ProgressBar.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,uCAAuC"}
1
+ {"version":3,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"","sources":["../../../../../../../packages/react-components/react-progress/src/ProgressBar.ts"],"sourcesContent":["export * from './components/ProgressBar/index';\n"]}
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
+
2
3
  Object.defineProperty(exports, "__esModule", {
3
- value: true
4
+ value: true
4
5
  });
5
- const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
- _exportStar(require("./components/ProgressField/index"), exports);
7
- //# sourceMappingURL=ProgressField.js.map
8
-
6
+ const tslib_1 = /*#__PURE__*/require("tslib");
7
+ tslib_1.__exportStar(require("./components/ProgressField/index"), exports);
9
8
  //# sourceMappingURL=ProgressField.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/ProgressField.js"],"sourcesContent":["export * from './components/ProgressField/index';\n//# sourceMappingURL=ProgressField.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,yCAAyC"}
1
+ {"version":3,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"","sources":["../../../../../../../packages/react-components/react-progress/src/ProgressField.ts"],"sourcesContent":["export * from './components/ProgressField/index';\n"]}
@@ -1,21 +1,20 @@
1
1
  "use strict";
2
+
2
3
  Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "ProgressBar", {
6
- enumerable: true,
7
- get: ()=>ProgressBar
4
+ value: true
8
5
  });
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);
6
+ exports.ProgressBar = void 0;
7
+ const React = /*#__PURE__*/require("react");
8
+ const useProgressBar_1 = /*#__PURE__*/require("./useProgressBar");
9
+ const renderProgressBar_1 = /*#__PURE__*/require("./renderProgressBar");
10
+ const useProgressBarStyles_1 = /*#__PURE__*/require("./useProgressBarStyles");
11
+ /**
12
+ * A ProgressBar bar shows the progression of a task.
13
+ */
14
+ exports.ProgressBar = /*#__PURE__*/React.forwardRef((props, ref) => {
15
+ const state = useProgressBar_1.useProgressBar_unstable(props, ref);
16
+ useProgressBarStyles_1.useProgressBarStyles_unstable(state);
17
+ return renderProgressBar_1.renderProgressBar_unstable(state);
18
18
  });
19
- ProgressBar.displayName = 'ProgressBar'; //# sourceMappingURL=ProgressBar.js.map
20
-
19
+ exports.ProgressBar.displayName = 'ProgressBar';
21
20
  //# sourceMappingURL=ProgressBar.js.map
@@ -1 +1 @@
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
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAIA;;;AAGaA,mBAAW,gBAA0CC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAChG,MAAMC,KAAK,GAAGC,wCAAuB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAEjDG,oDAA6B,CAACF,KAAK,CAAC;EACpC,OAAOG,8CAA0B,CAACH,KAAK,CAAC;AAC1C,CAAC,CAAC;AAEFL,mBAAW,CAACS,WAAW,GAAG,aAAa","names":["exports","React","forwardRef","props","ref","state","useProgressBar_1","useProgressBarStyles_1","renderProgressBar_1","displayName"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/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,7 +1,6 @@
1
1
  "use strict";
2
+
2
3
  Object.defineProperty(exports, "__esModule", {
3
- value: true
4
+ value: true
4
5
  });
5
- //# sourceMappingURL=ProgressBar.types.js.map
6
-
7
6
  //# sourceMappingURL=ProgressBar.types.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/ProgressBar/ProgressBar.types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=ProgressBar.types.js.map"],"names":[],"mappings":";;;;CACA,6CAA6C"}
1
+ {"version":3,"mappings":"","names":[],"sourceRoot":"","sources":[],"sourcesContent":[]}
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
+
2
3
  Object.defineProperty(exports, "__esModule", {
3
- value: true
4
+ value: true
4
5
  });
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
-
6
+ const tslib_1 = /*#__PURE__*/require("tslib");
7
+ tslib_1.__exportStar(require("./ProgressBar"), exports);
8
+ tslib_1.__exportStar(require("./ProgressBar.types"), exports);
9
+ tslib_1.__exportStar(require("./renderProgressBar"), exports);
10
+ tslib_1.__exportStar(require("./useProgressBar"), exports);
11
+ tslib_1.__exportStar(require("./useProgressBarStyles"), exports);
13
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
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
+ {"version":3,"mappings":";;;;;;AAAAA;AACAA;AACAA;AACAA;AACAA","names":["tslib_1"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/src/components/ProgressBar/index.ts"],"sourcesContent":["export * from './ProgressBar';\nexport * from './ProgressBar.types';\nexport * from './renderProgressBar';\nexport * from './useProgressBar';\nexport * from './useProgressBarStyles';\n"]}
@@ -1,19 +1,24 @@
1
1
  "use strict";
2
+
2
3
  Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "renderProgressBar_unstable", {
6
- enumerable: true,
7
- get: ()=>renderProgressBar_unstable
4
+ value: true
8
5
  });
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
-
6
+ exports.renderProgressBar_unstable = void 0;
7
+ const React = /*#__PURE__*/require("react");
8
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
+ /**
10
+ * Render the final JSX of ProgressBar
11
+ */
12
+ const renderProgressBar_unstable = state => {
13
+ const {
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;
19
24
  //# sourceMappingURL=renderProgressBar.js.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AAGA;;;AAGO,MAAMA,0BAA0B,GAAIC,KAAuB,IAAI;EACpE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGC,0BAAQ,CAAmBH,KAAK,CAAC;EAC9D,OAAOI,oBAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,GAAGJ,KAAK,CAACK,GAAG,IAAIF,oBAACH,KAAK,CAACK,GAAG;IAAA,GAAKJ,SAAS,CAACI;EAAG,EAAI,CAAc;AACrG,CAAC;AAHYC,kCAA0B","names":["renderProgressBar_unstable","state","slots","slotProps","react_utilities_1","React","root","bar","exports"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/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,42 +1,53 @@
1
1
  "use strict";
2
+
2
3
  Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "useProgressBar_unstable", {
6
- enumerable: true,
7
- get: ()=>useProgressBar_unstable
4
+ value: true
8
5
  });
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 useProgressBar_unstable = (props, ref)=>{
13
- // Props
14
- const { color ='brand' , max =1.0 , shape ='rounded' , thickness ='medium' , value } = props;
15
- const root = (0, _reactUtilities.getNativeElementProps)('div', {
16
- ref,
17
- role: 'progressbar',
18
- 'aria-valuemin': value !== undefined ? 0 : undefined,
19
- 'aria-valuemax': value !== undefined ? max : undefined,
20
- 'aria-valuenow': value,
21
- ...props
22
- });
23
- const bar = (0, _reactUtilities.resolveShorthand)(props.bar, {
24
- required: true
25
- });
26
- const state = {
27
- color,
28
- max,
29
- shape,
30
- thickness,
31
- value,
32
- components: {
33
- root: 'div',
34
- bar: 'div'
35
- },
36
- root,
37
- bar
38
- };
39
- return state;
40
- }; //# sourceMappingURL=useProgressBar.js.map
41
-
6
+ exports.useProgressBar_unstable = void 0;
7
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
8
+ /**
9
+ * Create the state required to render ProgressBar.
10
+ *
11
+ * The returned state can be modified with hooks such as useProgressBarStyles_unstable,
12
+ * before being passed to renderProgressBar_unstable.
13
+ *
14
+ * @param props - props from this instance of ProgressBar
15
+ * @param ref - reference to root HTMLElement of ProgressBar
16
+ */
17
+ const useProgressBar_unstable = (props, ref) => {
18
+ // Props
19
+ const {
20
+ color = 'brand',
21
+ max = 1.0,
22
+ shape = 'rounded',
23
+ thickness = 'medium',
24
+ value
25
+ } = props;
26
+ const root = react_utilities_1.getNativeElementProps('div', {
27
+ ref,
28
+ role: 'progressbar',
29
+ 'aria-valuemin': value !== undefined ? 0 : undefined,
30
+ 'aria-valuemax': value !== undefined ? max : undefined,
31
+ 'aria-valuenow': value,
32
+ ...props
33
+ });
34
+ const bar = react_utilities_1.resolveShorthand(props.bar, {
35
+ required: true
36
+ });
37
+ const state = {
38
+ color,
39
+ max,
40
+ shape,
41
+ thickness,
42
+ value,
43
+ components: {
44
+ root: 'div',
45
+ bar: 'div'
46
+ },
47
+ root,
48
+ bar
49
+ };
50
+ return state;
51
+ };
52
+ exports.useProgressBar_unstable = useProgressBar_unstable;
42
53
  //# sourceMappingURL=useProgressBar.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/ProgressBar/useProgressBar.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\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 max = 1.0,\n shape = 'rounded',\n thickness = 'medium',\n value\n } = props;\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","max","shape","thickness","value","root","getNativeElementProps","role","undefined","bar","resolveShorthand","required","state","components"],"mappings":";;;;+BAWaA;;aAAAA;;;6DAXU;gCACiC;AAUjD,MAAMA,0BAA0B,CAACC,OAAOC,MAAQ;IACrD,QAAQ;IACR,MAAM,EACJC,OAAQ,QAAO,EACfC,KAAM,IAAG,EACTC,OAAQ,UAAS,EACjBC,WAAY,SAAQ,EACpBC,MAAK,EACN,GAAGN;IACJ,MAAMO,OAAOC,IAAAA,qCAAqB,EAAC,OAAO;QACxCP;QACAQ,MAAM;QACN,iBAAiBH,UAAUI,YAAY,IAAIA,SAAS;QACpD,iBAAiBJ,UAAUI,YAAYP,MAAMO,SAAS;QACtD,iBAAiBJ;QACjB,GAAGN,KAAK;IACV;IACA,MAAMW,MAAMC,IAAAA,gCAAgB,EAACZ,MAAMW,GAAG,EAAE;QACtCE,UAAU,IAAI;IAChB;IACA,MAAMC,QAAQ;QACZZ;QACAC;QACAC;QACAC;QACAC;QACAS,YAAY;YACVR,MAAM;YACNI,KAAK;QACP;QACAJ;QACAI;IACF;IACA,OAAOG;AACT,GACA,0CAA0C"}
1
+ {"version":3,"mappings":";;;;;;AACA;AAGA;;;;;;;;;AASO,MAAMA,uBAAuB,GAAG,CAACC,KAAuB,EAAEC,GAA2B,KAAsB;EAChH;EACA,MAAM;IAAEC,KAAK,GAAG,OAAO;IAAEC,GAAG,GAAG,GAAG;IAAEC,KAAK,GAAG,SAAS;IAAEC,SAAS,GAAG,QAAQ;IAAEC;EAAK,CAAE,GAAGN,KAAK;EAE5F,MAAMO,IAAI,GAAGC,uCAAqB,CAAC,KAAK,EAAE;IACxCP,GAAG;IACHQ,IAAI,EAAE,aAAa;IACnB,eAAe,EAAEH,KAAK,KAAKI,SAAS,GAAG,CAAC,GAAGA,SAAS;IACpD,eAAe,EAAEJ,KAAK,KAAKI,SAAS,GAAGP,GAAG,GAAGO,SAAS;IACtD,eAAe,EAAEJ,KAAK;IACtB,GAAGN;GACJ,CAAC;EAEF,MAAMW,GAAG,GAAGH,kCAAgB,CAACR,KAAK,CAACW,GAAG,EAAE;IACtCC,QAAQ,EAAE;GACX,CAAC;EAEF,MAAMC,KAAK,GAAqB;IAC9BX,KAAK;IACLC,GAAG;IACHC,KAAK;IACLC,SAAS;IACTC,KAAK;IACLQ,UAAU,EAAE;MACVP,IAAI,EAAE,KAAK;MACXI,GAAG,EAAE;KACN;IACDJ,IAAI;IACJI;GACD;EAED,OAAOE,KAAK;AACd,CAAC;AAhCYE,+BAAuB","names":["useProgressBar_unstable","props","ref","color","max","shape","thickness","value","root","react_utilities_1","role","undefined","bar","required","state","components","exports"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/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"]}