@fluentui/react-progress 0.0.0-nightly-20230804-0415.1 → 0.0.0-nightly-20230808-0415.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "name": "@fluentui/react-progress",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 04 Aug 2023 04:21:55 GMT",
6
- "tag": "@fluentui/react-progress_v0.0.0-nightly-20230804-0415.1",
7
- "version": "0.0.0-nightly-20230804-0415.1",
5
+ "date": "Tue, 08 Aug 2023 04:22:24 GMT",
6
+ "tag": "@fluentui/react-progress_v0.0.0-nightly-20230808-0415.1",
7
+ "version": "0.0.0-nightly-20230808-0415.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
@@ -16,44 +16,83 @@
16
16
  {
17
17
  "author": "beachball",
18
18
  "package": "@fluentui/react-progress",
19
- "comment": "Bump @fluentui/react-field to v0.0.0-nightly-20230804-0415.1",
20
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
19
+ "comment": "Bump @fluentui/react-field to v0.0.0-nightly-20230808-0415.1",
20
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
21
21
  },
22
22
  {
23
23
  "author": "beachball",
24
24
  "package": "@fluentui/react-progress",
25
- "comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230804-0415.1",
26
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
25
+ "comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230808-0415.1",
26
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
27
27
  },
28
28
  {
29
29
  "author": "beachball",
30
30
  "package": "@fluentui/react-progress",
31
- "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230804-0415.1",
32
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
31
+ "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230808-0415.1",
32
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
33
33
  },
34
34
  {
35
35
  "author": "beachball",
36
36
  "package": "@fluentui/react-progress",
37
- "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230804-0415.1",
38
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
37
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230808-0415.1",
38
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
39
39
  },
40
40
  {
41
41
  "author": "beachball",
42
42
  "package": "@fluentui/react-progress",
43
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230804-0415.1",
44
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
43
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230808-0415.1",
44
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
45
45
  },
46
46
  {
47
47
  "author": "beachball",
48
48
  "package": "@fluentui/react-progress",
49
- "comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-20230804-0415.1",
50
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
49
+ "comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-20230808-0415.1",
50
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
51
51
  },
52
52
  {
53
53
  "author": "beachball",
54
54
  "package": "@fluentui/react-progress",
55
- "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230804-0415.1",
56
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
55
+ "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230808-0415.1",
56
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
57
+ }
58
+ ]
59
+ }
60
+ },
61
+ {
62
+ "date": "Fri, 04 Aug 2023 08:52:58 GMT",
63
+ "tag": "@fluentui/react-progress_v9.1.25",
64
+ "version": "9.1.25",
65
+ "comments": {
66
+ "patch": [
67
+ {
68
+ "author": "beachball",
69
+ "package": "@fluentui/react-progress",
70
+ "comment": "Bump @fluentui/react-field to v9.1.15",
71
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
72
+ },
73
+ {
74
+ "author": "beachball",
75
+ "package": "@fluentui/react-progress",
76
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.13",
77
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
78
+ },
79
+ {
80
+ "author": "beachball",
81
+ "package": "@fluentui/react-progress",
82
+ "comment": "Bump @fluentui/react-shared-contexts to v9.7.1",
83
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
84
+ },
85
+ {
86
+ "author": "beachball",
87
+ "package": "@fluentui/react-progress",
88
+ "comment": "Bump @fluentui/react-theme to v9.1.10",
89
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
90
+ },
91
+ {
92
+ "author": "beachball",
93
+ "package": "@fluentui/react-progress",
94
+ "comment": "Bump @fluentui/react-utilities to v9.11.0",
95
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
57
96
  }
58
97
  ]
59
98
  }
package/CHANGELOG.md CHANGED
@@ -1,24 +1,37 @@
1
1
  # Change Log - @fluentui/react-progress
2
2
 
3
- This log was last generated on Fri, 04 Aug 2023 04:21:55 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 08 Aug 2023 04:22:24 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20230804-0415.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v0.0.0-nightly-20230804-0415.1)
7
+ ## [0.0.0-nightly-20230808-0415.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v0.0.0-nightly-20230808-0415.1)
8
8
 
9
- Fri, 04 Aug 2023 04:21:55 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.24..@fluentui/react-progress_v0.0.0-nightly-20230804-0415.1)
9
+ Tue, 08 Aug 2023 04:22:24 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.25..@fluentui/react-progress_v0.0.0-nightly-20230808-0415.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-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
16
- - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
17
- - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
18
- - Bump @fluentui/react-theme to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
19
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
20
- - Bump @fluentui/react-conformance to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
21
- - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
15
+ - Bump @fluentui/react-field to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
16
+ - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
17
+ - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
18
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
19
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
20
+ - Bump @fluentui/react-conformance to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
21
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
22
+
23
+ ## [9.1.25](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.25)
24
+
25
+ Fri, 04 Aug 2023 08:52:58 GMT
26
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.24..@fluentui/react-progress_v9.1.25)
27
+
28
+ ### Patches
29
+
30
+ - Bump @fluentui/react-field to v9.1.15 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
31
+ - Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.13 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
32
+ - Bump @fluentui/react-shared-contexts to v9.7.1 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
33
+ - Bump @fluentui/react-theme to v9.1.10 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
34
+ - Bump @fluentui/react-utilities to v9.11.0 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
22
35
 
23
36
  ## [9.1.24](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.24)
24
37
 
@@ -1,8 +1,8 @@
1
1
  /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
2
- import { getSlotsNext } from '@fluentui/react-utilities';
2
+ import { assertSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of ProgressBar
5
5
  */ export const renderProgressBar_unstable = (state)=>{
6
- const { slots , slotProps } = getSlotsNext(state);
7
- return /*#__PURE__*/ createElement(slots.root, slotProps.root, slots.bar && /*#__PURE__*/ createElement(slots.bar, slotProps.bar));
6
+ assertSlots(state);
7
+ return /*#__PURE__*/ createElement(state.root, null, state.bar && /*#__PURE__*/ createElement(state.bar, null));
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderProgressBar.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } 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 } = getSlotsNext<ProgressBarSlots>(state);\n return <slots.root {...slotProps.root}>{slots.bar && <slots.bar {...slotProps.bar} />}</slots.root>;\n};\n"],"names":["createElement","getSlotsNext","renderProgressBar_unstable","state","slots","slotProps","root","bar"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,YAAY,QAAQ,4BAA4B;AAGzD;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC,QAA4B;IACrE,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGJ,aAA+BE;IAC5D,qBAAO,AAZT,cAYUC,MAAME,IAAI,EAAKD,UAAUC,IAAI,EAAGF,MAAMG,GAAG,kBAAI,AAZvD,cAYwDH,MAAMG,GAAG,EAAKF,UAAUE,GAAG;AACnF,EAAE"}
1
+ {"version":3,"sources":["renderProgressBar.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { assertSlots } 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 assertSlots<ProgressBarSlots>(state);\n return <state.root>{state.bar && <state.bar />}</state.root>;\n};\n"],"names":["createElement","assertSlots","renderProgressBar_unstable","state","root","bar"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC,QAA4B;IACrEF,YAA8BE;IAC9B,qBAAO,AAZT,cAYUA,MAAMC,IAAI,QAAED,MAAME,GAAG,kBAAI,AAZnC,cAYoCF,MAAME,GAAG;AAC7C,EAAE"}
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { useFieldContext_unstable } from '@fluentui/react-field';
3
- import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';
3
+ import { getNativeElementProps, slot } from '@fluentui/react-utilities';
4
4
  import { clampValue, clampMax } from '../../utils/index';
5
5
  /**
6
6
  * Create the state required to render ProgressBar.
@@ -17,7 +17,7 @@ import { clampValue, clampMax } from '../../utils/index';
17
17
  var _props_max;
18
18
  const max = clampMax((_props_max = props.max) !== null && _props_max !== void 0 ? _props_max : 1);
19
19
  const value = clampValue(props.value, max);
20
- const root = getNativeElementProps('div', {
20
+ const root = slot.always(getNativeElementProps('div', {
21
21
  ref,
22
22
  role: 'progressbar',
23
23
  'aria-valuemin': value !== undefined ? 0 : undefined,
@@ -25,6 +25,8 @@ import { clampValue, clampMax } from '../../utils/index';
25
25
  'aria-valuenow': value,
26
26
  'aria-labelledby': field === null || field === void 0 ? void 0 : field.labelId,
27
27
  ...props
28
+ }), {
29
+ elementType: 'div'
28
30
  });
29
31
  if (field && (field.validationMessageId || field.hintId)) {
30
32
  // Prepend the field's validation message and/or hint to the user's aria-describedby
@@ -34,8 +36,8 @@ import { clampValue, clampMax } from '../../utils/index';
34
36
  root['aria-describedby']
35
37
  ].filter(Boolean).join(' ');
36
38
  }
37
- const bar = resolveShorthand(props.bar, {
38
- required: true
39
+ const bar = slot.always(props.bar, {
40
+ elementType: 'div'
39
41
  });
40
42
  const state = {
41
43
  color,
@@ -1 +1 @@
1
- {"version":3,"sources":["useProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport { clampValue, clampMax } from '../../utils/index';\nimport type { ProgressBarProps, ProgressBarState } from './ProgressBar.types';\n\n/**\n * Create the state required to render ProgressBar.\n *\n * The returned state can be modified with hooks such as useProgressBarStyles_unstable,\n * before being passed to renderProgressBar_unstable.\n *\n * @param props - props from this instance of ProgressBar\n * @param ref - reference to root HTMLElement of ProgressBar\n */\nexport const useProgressBar_unstable = (props: ProgressBarProps, ref: React.Ref<HTMLElement>): ProgressBarState => {\n const field = useFieldContext_unstable();\n const fieldState = field?.validationState;\n\n const {\n color = fieldState === 'error' || fieldState === 'warning' || fieldState === 'success' ? fieldState : 'brand',\n shape = 'rounded',\n thickness = 'medium',\n } = props;\n const max = clampMax(props.max ?? 1);\n const value = clampValue(props.value, max);\n\n const root = 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 'aria-labelledby': field?.labelId,\n ...props,\n });\n\n if (field && (field.validationMessageId || field.hintId)) {\n // Prepend the field's validation message and/or hint to the user's aria-describedby\n root['aria-describedby'] = [field?.validationMessageId, field?.hintId, root['aria-describedby']]\n .filter(Boolean)\n .join(' ');\n }\n\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"],"names":["React","useFieldContext_unstable","getNativeElementProps","resolveShorthand","clampValue","clampMax","useProgressBar_unstable","props","ref","field","fieldState","validationState","color","shape","thickness","max","value","root","role","undefined","labelId","validationMessageId","hintId","filter","Boolean","join","bar","required","state","components"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,QAAQ,wBAAwB;AACjE,SAASC,qBAAqB,EAAEC,gBAAgB,QAAQ,4BAA4B;AACpF,SAASC,UAAU,EAAEC,QAAQ,QAAQ,oBAAoB;AAGzD;;;;;;;;CAQC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAyBC,MAAkD;IACjH,MAAMC,QAAQR;IACd,MAAMS,aAAaD,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOE,eAAe;IAEzC,MAAM,EACJC,OAAQF,eAAe,WAAWA,eAAe,aAAaA,eAAe,YAAYA,aAAa,OAAO,CAAA,EAC7GG,OAAQ,UAAS,EACjBC,WAAY,SAAQ,EACrB,GAAGP;QACiBA;IAArB,MAAMQ,MAAMV,SAASE,CAAAA,aAAAA,MAAMQ,GAAG,cAATR,wBAAAA,aAAa,CAAC;IACnC,MAAMS,QAAQZ,WAAWG,MAAMS,KAAK,EAAED;IAEtC,MAAME,OAAOf,sBAAsB,OAAO;QACxCM;QACAU,MAAM;QACN,iBAAiBF,UAAUG,YAAY,IAAIA,SAAS;QACpD,iBAAiBH,UAAUG,YAAYJ,MAAMI,SAAS;QACtD,iBAAiBH;QACjB,mBAAmBP,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOW,OAAO;QACjC,GAAGb,KAAK;IACV;IAEA,IAAIE,SAAUA,CAAAA,MAAMY,mBAAmB,IAAIZ,MAAMa,MAAM,AAAD,GAAI;QACxD,oFAAoF;QACpFL,IAAI,CAAC,mBAAmB,GAAG;YAACR,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOY,mBAAmB;YAAEZ,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOa,MAAM;YAAEL,IAAI,CAAC,mBAAmB;SAAC,CAC7FM,MAAM,CAACC,SACPC,IAAI,CAAC;IACV,CAAC;IAED,MAAMC,MAAMvB,iBAAiBI,MAAMmB,GAAG,EAAE;QACtCC,UAAU,IAAI;IAChB;IAEA,MAAMC,QAA0B;QAC9BhB;QACAG;QACAF;QACAC;QACAE;QACAa,YAAY;YACVZ,MAAM;YACNS,KAAK;QACP;QACAT;QACAS;IACF;IAEA,OAAOE;AACT,EAAE"}
1
+ {"version":3,"sources":["useProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { clampValue, clampMax } from '../../utils/index';\nimport type { ProgressBarProps, ProgressBarState } from './ProgressBar.types';\n\n/**\n * Create the state required to render ProgressBar.\n *\n * The returned state can be modified with hooks such as useProgressBarStyles_unstable,\n * before being passed to renderProgressBar_unstable.\n *\n * @param props - props from this instance of ProgressBar\n * @param ref - reference to root HTMLElement of ProgressBar\n */\nexport const useProgressBar_unstable = (props: ProgressBarProps, ref: React.Ref<HTMLElement>): ProgressBarState => {\n const field = useFieldContext_unstable();\n const fieldState = field?.validationState;\n\n const {\n color = fieldState === 'error' || fieldState === 'warning' || fieldState === 'success' ? fieldState : 'brand',\n shape = 'rounded',\n thickness = 'medium',\n } = props;\n const max = clampMax(props.max ?? 1);\n const value = clampValue(props.value, max);\n\n const root = slot.always(\n 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 'aria-labelledby': field?.labelId,\n ...props,\n }),\n { elementType: 'div' },\n );\n if (field && (field.validationMessageId || field.hintId)) {\n // Prepend the field's validation message and/or hint to the user's aria-describedby\n root['aria-describedby'] = [field?.validationMessageId, field?.hintId, root['aria-describedby']]\n .filter(Boolean)\n .join(' ');\n }\n const bar = slot.always(props.bar, { elementType: 'div' });\n const state: ProgressBarState = {\n color,\n max,\n shape,\n thickness,\n value,\n components: { root: 'div', bar: 'div' },\n root,\n bar,\n };\n\n return state;\n};\n"],"names":["React","useFieldContext_unstable","getNativeElementProps","slot","clampValue","clampMax","useProgressBar_unstable","props","ref","field","fieldState","validationState","color","shape","thickness","max","value","root","always","role","undefined","labelId","elementType","validationMessageId","hintId","filter","Boolean","join","bar","state","components"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,QAAQ,wBAAwB;AACjE,SAASC,qBAAqB,EAAEC,IAAI,QAAQ,4BAA4B;AACxE,SAASC,UAAU,EAAEC,QAAQ,QAAQ,oBAAoB;AAGzD;;;;;;;;CAQC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAyBC,MAAkD;IACjH,MAAMC,QAAQR;IACd,MAAMS,aAAaD,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOE,eAAe;IAEzC,MAAM,EACJC,OAAQF,eAAe,WAAWA,eAAe,aAAaA,eAAe,YAAYA,aAAa,OAAO,CAAA,EAC7GG,OAAQ,UAAS,EACjBC,WAAY,SAAQ,EACrB,GAAGP;QACiBA;IAArB,MAAMQ,MAAMV,SAASE,CAAAA,aAAAA,MAAMQ,GAAG,cAATR,wBAAAA,aAAa,CAAC;IACnC,MAAMS,QAAQZ,WAAWG,MAAMS,KAAK,EAAED;IAEtC,MAAME,OAAOd,KAAKe,MAAM,CACtBhB,sBAAsB,OAAO;QAC3BM;QACAW,MAAM;QACN,iBAAiBH,UAAUI,YAAY,IAAIA,SAAS;QACpD,iBAAiBJ,UAAUI,YAAYL,MAAMK,SAAS;QACtD,iBAAiBJ;QACjB,mBAAmBP,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOY,OAAO;QACjC,GAAGd,KAAK;IACV,IACA;QAAEe,aAAa;IAAM;IAEvB,IAAIb,SAAUA,CAAAA,MAAMc,mBAAmB,IAAId,MAAMe,MAAM,AAAD,GAAI;QACxD,oFAAoF;QACpFP,IAAI,CAAC,mBAAmB,GAAG;YAACR,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOc,mBAAmB;YAAEd,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOe,MAAM;YAAEP,IAAI,CAAC,mBAAmB;SAAC,CAC7FQ,MAAM,CAACC,SACPC,IAAI,CAAC;IACV,CAAC;IACD,MAAMC,MAAMzB,KAAKe,MAAM,CAACX,MAAMqB,GAAG,EAAE;QAAEN,aAAa;IAAM;IACxD,MAAMO,QAA0B;QAC9BjB;QACAG;QACAF;QACAC;QACAE;QACAc,YAAY;YAAEb,MAAM;YAAOW,KAAK;QAAM;QACtCX;QACAW;IACF;IAEA,OAAOC;AACT,EAAE"}
@@ -9,6 +9,6 @@ Object.defineProperty(exports, "renderProgressBar_unstable", {
9
9
  const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
10
10
  const _reactUtilities = require("@fluentui/react-utilities");
11
11
  const renderProgressBar_unstable = (state)=>{
12
- const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
13
- return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root, slots.bar && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.bar, slotProps.bar));
12
+ (0, _reactUtilities.assertSlots)(state);
13
+ return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.root, null, state.bar && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.bar, null));
14
14
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderProgressBar.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of ProgressBar\n */ export const renderProgressBar_unstable = (state)=>{\n const { slots , slotProps } = getSlotsNext(state);\n return /*#__PURE__*/ createElement(slots.root, slotProps.root, slots.bar && /*#__PURE__*/ createElement(slots.bar, slotProps.bar));\n};\n"],"names":["renderProgressBar_unstable","state","slots","slotProps","getSlotsNext","createElement","root","bar"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACtD;AAGlB,MAAMA,6BAA6B,CAACC,QAAQ;IACnD,MAAM,EAAEC,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACH;IAC5C,OAAO,WAAW,GAAGI,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAEH,UAAUG,IAAI,EAAEJ,MAAMK,GAAG,IAAI,WAAW,GAAGF,IAAAA,8BAAa,EAACH,MAAMK,GAAG,EAAEJ,UAAUI,GAAG;AACpI"}
1
+ {"version":3,"sources":["renderProgressBar.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of ProgressBar\n */ export const renderProgressBar_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ createElement(state.root, null, state.bar && /*#__PURE__*/ createElement(state.bar, null));\n};\n"],"names":["renderProgressBar_unstable","state","assertSlots","createElement","root","bar"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACvD;AAGjB,MAAMA,6BAA6B,CAACC,QAAQ;IACnDC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,8BAAa,EAACF,MAAMG,IAAI,EAAE,IAAI,EAAEH,MAAMI,GAAG,IAAI,WAAW,GAAGF,IAAAA,8BAAa,EAACF,MAAMI,GAAG,EAAE,IAAI;AACjH"}
@@ -18,7 +18,7 @@ const useProgressBar_unstable = (props, ref)=>{
18
18
  var _props_max;
19
19
  const max = (0, _index.clampMax)((_props_max = props.max) !== null && _props_max !== void 0 ? _props_max : 1);
20
20
  const value = (0, _index.clampValue)(props.value, max);
21
- const root = (0, _reactUtilities.getNativeElementProps)('div', {
21
+ const root = _reactUtilities.slot.always((0, _reactUtilities.getNativeElementProps)('div', {
22
22
  ref,
23
23
  role: 'progressbar',
24
24
  'aria-valuemin': value !== undefined ? 0 : undefined,
@@ -26,6 +26,8 @@ const useProgressBar_unstable = (props, ref)=>{
26
26
  'aria-valuenow': value,
27
27
  'aria-labelledby': field === null || field === void 0 ? void 0 : field.labelId,
28
28
  ...props
29
+ }), {
30
+ elementType: 'div'
29
31
  });
30
32
  if (field && (field.validationMessageId || field.hintId)) {
31
33
  // Prepend the field's validation message and/or hint to the user's aria-describedby
@@ -35,8 +37,8 @@ const useProgressBar_unstable = (props, ref)=>{
35
37
  root['aria-describedby']
36
38
  ].filter(Boolean).join(' ');
37
39
  }
38
- const bar = (0, _reactUtilities.resolveShorthand)(props.bar, {
39
- required: true
40
+ const bar = _reactUtilities.slot.always(props.bar, {
41
+ elementType: 'div'
40
42
  });
41
43
  const state = {
42
44
  color,
@@ -1 +1 @@
1
- {"version":3,"sources":["useProgressBar.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport { clampValue, clampMax } from '../../utils/index';\n/**\n * Create the state required to render ProgressBar.\n *\n * The returned state can be modified with hooks such as useProgressBarStyles_unstable,\n * before being passed to renderProgressBar_unstable.\n *\n * @param props - props from this instance of ProgressBar\n * @param ref - reference to root HTMLElement of ProgressBar\n */ export const useProgressBar_unstable = (props, ref)=>{\n const field = useFieldContext_unstable();\n const fieldState = field === null || field === void 0 ? void 0 : field.validationState;\n const { color =fieldState === 'error' || fieldState === 'warning' || fieldState === 'success' ? fieldState : 'brand' , shape ='rounded' , thickness ='medium' } = props;\n var _props_max;\n const max = clampMax((_props_max = props.max) !== null && _props_max !== void 0 ? _props_max : 1);\n const value = clampValue(props.value, max);\n const root = 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 'aria-labelledby': field === null || field === void 0 ? void 0 : field.labelId,\n ...props\n });\n if (field && (field.validationMessageId || field.hintId)) {\n // Prepend the field's validation message and/or hint to the user's aria-describedby\n root['aria-describedby'] = [\n field === null || field === void 0 ? void 0 : field.validationMessageId,\n field === null || field === void 0 ? void 0 : field.hintId,\n root['aria-describedby']\n ].filter(Boolean).join(' ');\n }\n const bar = 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"],"names":["useProgressBar_unstable","props","ref","field","useFieldContext_unstable","fieldState","validationState","color","shape","thickness","_props_max","max","clampMax","value","clampValue","root","getNativeElementProps","role","undefined","labelId","validationMessageId","hintId","filter","Boolean","join","bar","resolveShorthand","required","state","components"],"mappings":";;;;+BAYiBA;;aAAAA;;;6DAZM;4BACkB;gCACe;uBACnB;AAS1B,MAAMA,0BAA0B,CAACC,OAAOC,MAAM;IACrD,MAAMC,QAAQC,IAAAA,oCAAwB;IACtC,MAAMC,aAAaF,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMG,eAAe;IACtF,MAAM,EAAEC,OAAOF,eAAe,WAAWA,eAAe,aAAaA,eAAe,YAAYA,aAAa,OAAO,CAAA,EAAGG,OAAO,UAAS,EAAGC,WAAW,SAAQ,EAAG,GAAGR;IACnK,IAAIS;IACJ,MAAMC,MAAMC,IAAAA,eAAQ,EAAC,AAACF,CAAAA,aAAaT,MAAMU,GAAG,AAAD,MAAO,IAAI,IAAID,eAAe,KAAK,IAAIA,aAAa,CAAC;IAChG,MAAMG,QAAQC,IAAAA,iBAAU,EAACb,MAAMY,KAAK,EAAEF;IACtC,MAAMI,OAAOC,IAAAA,qCAAqB,EAAC,OAAO;QACtCd;QACAe,MAAM;QACN,iBAAiBJ,UAAUK,YAAY,IAAIA,SAAS;QACpD,iBAAiBL,UAAUK,YAAYP,MAAMO,SAAS;QACtD,iBAAiBL;QACjB,mBAAmBV,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMgB,OAAO;QAC9E,GAAGlB,KAAK;IACZ;IACA,IAAIE,SAAUA,CAAAA,MAAMiB,mBAAmB,IAAIjB,MAAMkB,MAAM,AAAD,GAAI;QACtD,oFAAoF;QACpFN,IAAI,CAAC,mBAAmB,GAAG;YACvBZ,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMiB,mBAAmB;YACvEjB,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMkB,MAAM;YAC1DN,IAAI,CAAC,mBAAmB;SAC3B,CAACO,MAAM,CAACC,SAASC,IAAI,CAAC;IAC3B,CAAC;IACD,MAAMC,MAAMC,IAAAA,gCAAgB,EAACzB,MAAMwB,GAAG,EAAE;QACpCE,UAAU,IAAI;IAClB;IACA,MAAMC,QAAQ;QACVrB;QACAI;QACAH;QACAC;QACAI;QACAgB,YAAY;YACRd,MAAM;YACNU,KAAK;QACT;QACAV;QACAU;IACJ;IACA,OAAOG;AACX"}
1
+ {"version":3,"sources":["useProgressBar.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { clampValue, clampMax } from '../../utils/index';\n/**\n * Create the state required to render ProgressBar.\n *\n * The returned state can be modified with hooks such as useProgressBarStyles_unstable,\n * before being passed to renderProgressBar_unstable.\n *\n * @param props - props from this instance of ProgressBar\n * @param ref - reference to root HTMLElement of ProgressBar\n */ export const useProgressBar_unstable = (props, ref)=>{\n const field = useFieldContext_unstable();\n const fieldState = field === null || field === void 0 ? void 0 : field.validationState;\n const { color =fieldState === 'error' || fieldState === 'warning' || fieldState === 'success' ? fieldState : 'brand' , shape ='rounded' , thickness ='medium' } = props;\n var _props_max;\n const max = clampMax((_props_max = props.max) !== null && _props_max !== void 0 ? _props_max : 1);\n const value = clampValue(props.value, max);\n const root = slot.always(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 'aria-labelledby': field === null || field === void 0 ? void 0 : field.labelId,\n ...props\n }), {\n elementType: 'div'\n });\n if (field && (field.validationMessageId || field.hintId)) {\n // Prepend the field's validation message and/or hint to the user's aria-describedby\n root['aria-describedby'] = [\n field === null || field === void 0 ? void 0 : field.validationMessageId,\n field === null || field === void 0 ? void 0 : field.hintId,\n root['aria-describedby']\n ].filter(Boolean).join(' ');\n }\n const bar = slot.always(props.bar, {\n elementType: 'div'\n });\n const state = {\n color,\n max,\n shape,\n thickness,\n value,\n components: {\n root: 'div',\n bar: 'div'\n },\n root,\n bar\n };\n return state;\n};\n"],"names":["useProgressBar_unstable","props","ref","field","useFieldContext_unstable","fieldState","validationState","color","shape","thickness","_props_max","max","clampMax","value","clampValue","root","slot","always","getNativeElementProps","role","undefined","labelId","elementType","validationMessageId","hintId","filter","Boolean","join","bar","state","components"],"mappings":";;;;+BAYiBA;;aAAAA;;;6DAZM;4BACkB;gCACG;uBACP;AAS1B,MAAMA,0BAA0B,CAACC,OAAOC,MAAM;IACrD,MAAMC,QAAQC,IAAAA,oCAAwB;IACtC,MAAMC,aAAaF,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMG,eAAe;IACtF,MAAM,EAAEC,OAAOF,eAAe,WAAWA,eAAe,aAAaA,eAAe,YAAYA,aAAa,OAAO,CAAA,EAAGG,OAAO,UAAS,EAAGC,WAAW,SAAQ,EAAG,GAAGR;IACnK,IAAIS;IACJ,MAAMC,MAAMC,IAAAA,eAAQ,EAAC,AAACF,CAAAA,aAAaT,MAAMU,GAAG,AAAD,MAAO,IAAI,IAAID,eAAe,KAAK,IAAIA,aAAa,CAAC;IAChG,MAAMG,QAAQC,IAAAA,iBAAU,EAACb,MAAMY,KAAK,EAAEF;IACtC,MAAMI,OAAOC,oBAAI,CAACC,MAAM,CAACC,IAAAA,qCAAqB,EAAC,OAAO;QAClDhB;QACAiB,MAAM;QACN,iBAAiBN,UAAUO,YAAY,IAAIA,SAAS;QACpD,iBAAiBP,UAAUO,YAAYT,MAAMS,SAAS;QACtD,iBAAiBP;QACjB,mBAAmBV,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMkB,OAAO;QAC9E,GAAGpB,KAAK;IACZ,IAAI;QACAqB,aAAa;IACjB;IACA,IAAInB,SAAUA,CAAAA,MAAMoB,mBAAmB,IAAIpB,MAAMqB,MAAM,AAAD,GAAI;QACtD,oFAAoF;QACpFT,IAAI,CAAC,mBAAmB,GAAG;YACvBZ,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMoB,mBAAmB;YACvEpB,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMqB,MAAM;YAC1DT,IAAI,CAAC,mBAAmB;SAC3B,CAACU,MAAM,CAACC,SAASC,IAAI,CAAC;IAC3B,CAAC;IACD,MAAMC,MAAMZ,oBAAI,CAACC,MAAM,CAAChB,MAAM2B,GAAG,EAAE;QAC/BN,aAAa;IACjB;IACA,MAAMO,QAAQ;QACVtB;QACAI;QACAH;QACAC;QACAI;QACAiB,YAAY;YACRf,MAAM;YACNa,KAAK;QACT;QACAb;QACAa;IACJ;IACA,OAAOC;AACX"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-progress",
3
- "version": "0.0.0-nightly-20230804-0415.1",
3
+ "version": "0.0.0-nightly-20230808-0415.1",
4
4
  "description": "Progress component for FluentUI v9",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -27,17 +27,17 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  "@fluentui/eslint-plugin": "*",
30
- "@fluentui/react-conformance": "0.0.0-nightly-20230804-0415.1",
31
- "@fluentui/react-conformance-griffel": "0.0.0-nightly-20230804-0415.1",
30
+ "@fluentui/react-conformance": "0.0.0-nightly-20230808-0415.1",
31
+ "@fluentui/react-conformance-griffel": "0.0.0-nightly-20230808-0415.1",
32
32
  "@fluentui/scripts-api-extractor": "*",
33
33
  "@fluentui/scripts-tasks": "*"
34
34
  },
35
35
  "dependencies": {
36
- "@fluentui/react-field": "0.0.0-nightly-20230804-0415.1",
37
- "@fluentui/react-jsx-runtime": "0.0.0-nightly-20230804-0415.1",
38
- "@fluentui/react-shared-contexts": "0.0.0-nightly-20230804-0415.1",
39
- "@fluentui/react-theme": "0.0.0-nightly-20230804-0415.1",
40
- "@fluentui/react-utilities": "0.0.0-nightly-20230804-0415.1",
36
+ "@fluentui/react-field": "0.0.0-nightly-20230808-0415.1",
37
+ "@fluentui/react-jsx-runtime": "0.0.0-nightly-20230808-0415.1",
38
+ "@fluentui/react-shared-contexts": "0.0.0-nightly-20230808-0415.1",
39
+ "@fluentui/react-theme": "0.0.0-nightly-20230808-0415.1",
40
+ "@fluentui/react-utilities": "0.0.0-nightly-20230808-0415.1",
41
41
  "@griffel/react": "^1.5.7",
42
42
  "@swc/helpers": "^0.4.14"
43
43
  },