@fluentui/react-progress 9.5.0 → 9.5.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.md CHANGED
@@ -1,12 +1,25 @@
1
1
  # Change Log - @fluentui/react-progress
2
2
 
3
- This log was last generated on Wed, 01 Apr 2026 15:50:22 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 23 Apr 2026 11:59:29 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.5.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.5.1)
8
+
9
+ Thu, 23 Apr 2026 11:59:29 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.5.0..@fluentui/react-progress_v9.5.1)
11
+
12
+ ### Patches
13
+
14
+ - fix: drop unnecessary dependencies from base hooks ([PR #35972](https://github.com/microsoft/fluentui/pull/35972) by dmytrokirpa@microsoft.com)
15
+ - Bump @fluentui/react-motion to v9.15.0 ([PR #35996](https://github.com/microsoft/fluentui/pull/35996) by beachball)
16
+ - Bump @fluentui/react-field to v9.5.1 ([PR #35996](https://github.com/microsoft/fluentui/pull/35996) by beachball)
17
+ - Bump @fluentui/react-jsx-runtime to v9.4.2 ([PR #35996](https://github.com/microsoft/fluentui/pull/35996) by beachball)
18
+ - Bump @fluentui/react-utilities to v9.26.3 ([PR #35996](https://github.com/microsoft/fluentui/pull/35996) by beachball)
19
+
7
20
  ## [9.5.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.5.0)
8
21
 
9
- Wed, 01 Apr 2026 15:50:22 GMT
22
+ Wed, 01 Apr 2026 15:52:42 GMT
10
23
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.4.17..@fluentui/react-progress_v9.5.0)
11
24
 
12
25
  ### Minor changes
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import type { ComponentState } from '@fluentui/react-utilities';
3
3
  import type { ForwardRefComponent } from '@fluentui/react-utilities';
4
4
  import type { JSXElement } from '@fluentui/react-utilities';
5
5
  import type { MotionSlotProps } from '@fluentui/react-motion';
6
- import * as React_2 from 'react';
6
+ import type * as React_2 from 'react';
7
7
  import type { Slot } from '@fluentui/react-utilities';
8
8
  import type { SlotClassNames } from '@fluentui/react-utilities';
9
9
 
@@ -1,5 +1,4 @@
1
1
  'use client';
2
- import * as React from 'react';
3
2
  import { useFieldContext_unstable } from '@fluentui/react-field';
4
3
  import { motionSlot } from '@fluentui/react-motion';
5
4
  import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
@@ -20,6 +19,11 @@ import { ProgressBarIndeterminateMotion } from './progressBarMotions';
20
19
  const state = useProgressBarBase_unstable(baseProps, ref);
21
20
  return {
22
21
  ...state,
22
+ components: {
23
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
24
+ ...state.components,
25
+ indeterminateMotion: ProgressBarIndeterminateMotion
26
+ },
23
27
  color,
24
28
  shape,
25
29
  thickness,
@@ -72,7 +76,7 @@ import { ProgressBarIndeterminateMotion } from './progressBarMotions';
72
76
  components: {
73
77
  root: 'div',
74
78
  bar: 'div',
75
- indeterminateMotion: ProgressBarIndeterminateMotion
79
+ indeterminateMotion: 'div'
76
80
  },
77
81
  root,
78
82
  bar
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ProgressBar/useProgressBar.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { motionSlot } from '@fluentui/react-motion';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport { clampValue, clampMax } from '../../utils/index';\nimport type {\n ProgressBarProps,\n ProgressBarState,\n ProgressBarBaseProps,\n ProgressBarBaseState,\n} from './ProgressBar.types';\nimport { ProgressBarIndeterminateMotion } from './progressBarMotions';\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 indeterminateMotion,\n ...baseProps\n } = props;\n\n const state = useProgressBarBase_unstable(baseProps, ref);\n\n return {\n ...state,\n color,\n shape,\n thickness,\n indeterminateMotion:\n state.value === undefined\n ? motionSlot(indeterminateMotion, {\n elementType: ProgressBarIndeterminateMotion,\n defaultProps: {},\n })\n : undefined,\n };\n};\n\n/**\n * Base hook for ProgressBar component. Manages state related to ARIA progressbar attributes\n * (role, aria-valuemin, aria-valuemax, aria-valuenow) and field context integration —\n * without design props (shape, thickness, color).\n *\n * @param props - props from this instance of ProgressBar (without shape, thickness, color)\n * @param ref - reference to root HTMLElement of ProgressBar\n */\nexport const useProgressBarBase_unstable = (\n props: ProgressBarBaseProps,\n ref: React.Ref<HTMLElement>,\n): ProgressBarBaseState => {\n const field = useFieldContext_unstable();\n\n const max = clampMax(props.max ?? 1);\n const value = clampValue(props.value, max);\n\n const root = slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\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\n return {\n max,\n value,\n components: { root: 'div', bar: 'div', indeterminateMotion: ProgressBarIndeterminateMotion },\n root,\n bar,\n };\n};\n"],"names":["React","useFieldContext_unstable","motionSlot","getIntrinsicElementProps","slot","clampValue","clampMax","ProgressBarIndeterminateMotion","useProgressBar_unstable","props","ref","field","fieldState","validationState","color","shape","thickness","indeterminateMotion","baseProps","state","useProgressBarBase_unstable","value","undefined","elementType","defaultProps","max","root","always","role","labelId","validationMessageId","hintId","filter","Boolean","join","bar","components"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,QAAQ,wBAAwB;AACjE,SAASC,UAAU,QAAQ,yBAAyB;AACpD,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAC3E,SAASC,UAAU,EAAEC,QAAQ,QAAQ,oBAAoB;AAOzD,SAASC,8BAA8B,QAAQ,uBAAuB;AAEtE;;;;;;;;CAQC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAyBC;IAC/D,MAAMC,QAAQV;IACd,MAAMW,aAAaD,kBAAAA,4BAAAA,MAAOE,eAAe;IAEzC,MAAM,EACJC,QAAQF,eAAe,WAAWA,eAAe,aAAaA,eAAe,YAAYA,aAAa,OAAO,EAC7GG,QAAQ,SAAS,EACjBC,YAAY,QAAQ,EACpBC,mBAAmB,EACnB,GAAGC,WACJ,GAAGT;IAEJ,MAAMU,QAAQC,4BAA4BF,WAAWR;IAErD,OAAO;QACL,GAAGS,KAAK;QACRL;QACAC;QACAC;QACAC,qBACEE,MAAME,KAAK,KAAKC,YACZpB,WAAWe,qBAAqB;YAC9BM,aAAahB;YACbiB,cAAc,CAAC;QACjB,KACAF;IACR;AACF,EAAE;AAEF;;;;;;;CAOC,GACD,OAAO,MAAMF,8BAA8B,CACzCX,OACAC;IAEA,MAAMC,QAAQV;QAEOQ;IAArB,MAAMgB,MAAMnB,SAASG,CAAAA,aAAAA,MAAMgB,GAAG,cAAThB,wBAAAA,aAAa;IAClC,MAAMY,QAAQhB,WAAWI,MAAMY,KAAK,EAAEI;IAEtC,MAAMC,OAAOtB,KAAKuB,MAAM,CACtBxB,yBAAyB,OAAO;QAC9B,SAAS;QACT,4EAA4E;QAC5E,4FAA4F;QAC5FO,KAAKA;QACLkB,MAAM;QACN,iBAAiBP,UAAUC,YAAY,IAAIA;QAC3C,iBAAiBD,UAAUC,YAAYG,MAAMH;QAC7C,iBAAiBD;QACjB,iBAAiB,EAAEV,kBAAAA,4BAAAA,MAAOkB,OAAO;QACjC,GAAGpB,KAAK;IACV,IACA;QAAEc,aAAa;IAAM;IAEvB,IAAIZ,SAAUA,CAAAA,MAAMmB,mBAAmB,IAAInB,MAAMoB,MAAM,AAAD,GAAI;QACxD,oFAAoF;QACpFL,IAAI,CAAC,mBAAmB,GAAG;YAACf,kBAAAA,4BAAAA,MAAOmB,mBAAmB;YAAEnB,kBAAAA,4BAAAA,MAAOoB,MAAM;YAAEL,IAAI,CAAC,mBAAmB;SAAC,CAC7FM,MAAM,CAACC,SACPC,IAAI,CAAC;IACV;IACA,MAAMC,MAAM/B,KAAKuB,MAAM,CAAClB,MAAM0B,GAAG,EAAE;QAAEZ,aAAa;IAAM;IAExD,OAAO;QACLE;QACAJ;QACAe,YAAY;YAAEV,MAAM;YAAOS,KAAK;YAAOlB,qBAAqBV;QAA+B;QAC3FmB;QACAS;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/ProgressBar/useProgressBar.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { motionSlot } from '@fluentui/react-motion';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport { clampValue, clampMax } from '../../utils/index';\nimport type {\n ProgressBarProps,\n ProgressBarState,\n ProgressBarBaseProps,\n ProgressBarBaseState,\n} from './ProgressBar.types';\nimport { ProgressBarIndeterminateMotion } from './progressBarMotions';\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 indeterminateMotion,\n ...baseProps\n } = props;\n\n const state = useProgressBarBase_unstable(baseProps, ref);\n\n return {\n ...state,\n components: {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...state.components,\n indeterminateMotion: ProgressBarIndeterminateMotion,\n },\n color,\n shape,\n thickness,\n indeterminateMotion:\n state.value === undefined\n ? motionSlot(indeterminateMotion, {\n elementType: ProgressBarIndeterminateMotion,\n defaultProps: {},\n })\n : undefined,\n };\n};\n\n/**\n * Base hook for ProgressBar component. Manages state related to ARIA progressbar attributes\n * (role, aria-valuemin, aria-valuemax, aria-valuenow) and field context integration —\n * without design props (shape, thickness, color).\n *\n * @param props - props from this instance of ProgressBar (without shape, thickness, color)\n * @param ref - reference to root HTMLElement of ProgressBar\n */\nexport const useProgressBarBase_unstable = (\n props: ProgressBarBaseProps,\n ref: React.Ref<HTMLElement>,\n): ProgressBarBaseState => {\n const field = useFieldContext_unstable();\n\n const max = clampMax(props.max ?? 1);\n const value = clampValue(props.value, max);\n\n const root = slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\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\n return {\n max,\n value,\n components: { root: 'div', bar: 'div', indeterminateMotion: 'div' },\n root,\n bar,\n };\n};\n"],"names":["useFieldContext_unstable","motionSlot","getIntrinsicElementProps","slot","clampValue","clampMax","ProgressBarIndeterminateMotion","useProgressBar_unstable","props","ref","field","fieldState","validationState","color","shape","thickness","indeterminateMotion","baseProps","state","useProgressBarBase_unstable","components","value","undefined","elementType","defaultProps","max","root","always","role","labelId","validationMessageId","hintId","filter","Boolean","join","bar"],"mappings":"AAAA;AAGA,SAASA,wBAAwB,QAAQ,wBAAwB;AACjE,SAASC,UAAU,QAAQ,yBAAyB;AACpD,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAC3E,SAASC,UAAU,EAAEC,QAAQ,QAAQ,oBAAoB;AAOzD,SAASC,8BAA8B,QAAQ,uBAAuB;AAEtE;;;;;;;;CAQC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAyBC;IAC/D,MAAMC,QAAQV;IACd,MAAMW,aAAaD,kBAAAA,4BAAAA,MAAOE,eAAe;IAEzC,MAAM,EACJC,QAAQF,eAAe,WAAWA,eAAe,aAAaA,eAAe,YAAYA,aAAa,OAAO,EAC7GG,QAAQ,SAAS,EACjBC,YAAY,QAAQ,EACpBC,mBAAmB,EACnB,GAAGC,WACJ,GAAGT;IAEJ,MAAMU,QAAQC,4BAA4BF,WAAWR;IAErD,OAAO;QACL,GAAGS,KAAK;QACRE,YAAY;YACV,4DAA4D;YAC5D,GAAGF,MAAME,UAAU;YACnBJ,qBAAqBV;QACvB;QACAO;QACAC;QACAC;QACAC,qBACEE,MAAMG,KAAK,KAAKC,YACZrB,WAAWe,qBAAqB;YAC9BO,aAAajB;YACbkB,cAAc,CAAC;QACjB,KACAF;IACR;AACF,EAAE;AAEF;;;;;;;CAOC,GACD,OAAO,MAAMH,8BAA8B,CACzCX,OACAC;IAEA,MAAMC,QAAQV;QAEOQ;IAArB,MAAMiB,MAAMpB,SAASG,CAAAA,aAAAA,MAAMiB,GAAG,cAATjB,wBAAAA,aAAa;IAClC,MAAMa,QAAQjB,WAAWI,MAAMa,KAAK,EAAEI;IAEtC,MAAMC,OAAOvB,KAAKwB,MAAM,CACtBzB,yBAAyB,OAAO;QAC9B,SAAS;QACT,4EAA4E;QAC5E,4FAA4F;QAC5FO,KAAKA;QACLmB,MAAM;QACN,iBAAiBP,UAAUC,YAAY,IAAIA;QAC3C,iBAAiBD,UAAUC,YAAYG,MAAMH;QAC7C,iBAAiBD;QACjB,iBAAiB,EAAEX,kBAAAA,4BAAAA,MAAOmB,OAAO;QACjC,GAAGrB,KAAK;IACV,IACA;QAAEe,aAAa;IAAM;IAEvB,IAAIb,SAAUA,CAAAA,MAAMoB,mBAAmB,IAAIpB,MAAMqB,MAAM,AAAD,GAAI;QACxD,oFAAoF;QACpFL,IAAI,CAAC,mBAAmB,GAAG;YAAChB,kBAAAA,4BAAAA,MAAOoB,mBAAmB;YAAEpB,kBAAAA,4BAAAA,MAAOqB,MAAM;YAAEL,IAAI,CAAC,mBAAmB;SAAC,CAC7FM,MAAM,CAACC,SACPC,IAAI,CAAC;IACV;IACA,MAAMC,MAAMhC,KAAKwB,MAAM,CAACnB,MAAM2B,GAAG,EAAE;QAAEZ,aAAa;IAAM;IAExD,OAAO;QACLE;QACAJ;QACAD,YAAY;YAAEM,MAAM;YAAOS,KAAK;YAAOnB,qBAAqB;QAAM;QAClEU;QACAS;IACF;AACF,EAAE"}
@@ -17,8 +17,6 @@ _export(exports, {
17
17
  return useProgressBar_unstable;
18
18
  }
19
19
  });
20
- const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
21
- const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
22
20
  const _reactfield = require("@fluentui/react-field");
23
21
  const _reactmotion = require("@fluentui/react-motion");
24
22
  const _reactutilities = require("@fluentui/react-utilities");
@@ -31,6 +29,11 @@ const useProgressBar_unstable = (props, ref)=>{
31
29
  const state = useProgressBarBase_unstable(baseProps, ref);
32
30
  return {
33
31
  ...state,
32
+ components: {
33
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
34
+ ...state.components,
35
+ indeterminateMotion: _progressBarMotions.ProgressBarIndeterminateMotion
36
+ },
34
37
  color,
35
38
  shape,
36
39
  thickness,
@@ -76,7 +79,7 @@ const useProgressBarBase_unstable = (props, ref)=>{
76
79
  components: {
77
80
  root: 'div',
78
81
  bar: 'div',
79
- indeterminateMotion: _progressBarMotions.ProgressBarIndeterminateMotion
82
+ indeterminateMotion: 'div'
80
83
  },
81
84
  root,
82
85
  bar
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ProgressBar/useProgressBar.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { motionSlot } from '@fluentui/react-motion';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport { clampValue, clampMax } from '../../utils/index';\nimport type {\n ProgressBarProps,\n ProgressBarState,\n ProgressBarBaseProps,\n ProgressBarBaseState,\n} from './ProgressBar.types';\nimport { ProgressBarIndeterminateMotion } from './progressBarMotions';\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 indeterminateMotion,\n ...baseProps\n } = props;\n\n const state = useProgressBarBase_unstable(baseProps, ref);\n\n return {\n ...state,\n color,\n shape,\n thickness,\n indeterminateMotion:\n state.value === undefined\n ? motionSlot(indeterminateMotion, {\n elementType: ProgressBarIndeterminateMotion,\n defaultProps: {},\n })\n : undefined,\n };\n};\n\n/**\n * Base hook for ProgressBar component. Manages state related to ARIA progressbar attributes\n * (role, aria-valuemin, aria-valuemax, aria-valuenow) and field context integration —\n * without design props (shape, thickness, color).\n *\n * @param props - props from this instance of ProgressBar (without shape, thickness, color)\n * @param ref - reference to root HTMLElement of ProgressBar\n */\nexport const useProgressBarBase_unstable = (\n props: ProgressBarBaseProps,\n ref: React.Ref<HTMLElement>,\n): ProgressBarBaseState => {\n const field = useFieldContext_unstable();\n\n const max = clampMax(props.max ?? 1);\n const value = clampValue(props.value, max);\n\n const root = slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\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\n return {\n max,\n value,\n components: { root: 'div', bar: 'div', indeterminateMotion: ProgressBarIndeterminateMotion },\n root,\n bar,\n };\n};\n"],"names":["React","useFieldContext_unstable","motionSlot","getIntrinsicElementProps","slot","clampValue","clampMax","ProgressBarIndeterminateMotion","useProgressBar_unstable","props","ref","field","fieldState","validationState","color","shape","thickness","indeterminateMotion","baseProps","state","useProgressBarBase_unstable","value","undefined","elementType","defaultProps","max","root","always","role","labelId","validationMessageId","hintId","filter","Boolean","join","bar","components"],"mappings":"AAAA;;;;;;;;;;;;+BA6DaoB;eAAAA;;IArCAZ,uBAAAA;;;;;iEAtBU,QAAQ;4BACU,wBAAwB;6BACtC,yBAAyB;gCACL,4BAA4B;uBACtC,oBAAoB;oCAOV,uBAAuB;AAW/D,gCAAgC,CAACC,OAAyBC;IAC/D,MAAMC,YAAQV,oCAAAA;IACd,MAAMW,aAAaD,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOE,eAAe;IAEzC,MAAM,EACJC,QAAQF,eAAe,WAAWA,eAAe,aAAaA,eAAe,YAAYA,aAAa,OAAO,EAC7GG,QAAQ,SAAS,EACjBC,YAAY,QAAQ,EACpBC,mBAAmB,EACnB,GAAGC,WACJ,GAAGT;IAEJ,MAAMU,QAAQC,4BAA4BF,WAAWR;IAErD,OAAO;QACL,GAAGS,KAAK;QACRL;QACAC;QACAC;QACAC,qBACEE,MAAME,KAAK,KAAKC,gBACZpB,uBAAAA,EAAWe,qBAAqB;YAC9BM,aAAahB,kDAAAA;YACbiB,cAAc,CAAC;QACjB,KACAF;IACR;AACF,EAAE;AAUK,oCAAoC,CACzCb,OACAC;IAEA,MAAMC,QAAQV,wCAAAA;QAEOQ;IAArB,MAAMgB,UAAMnB,eAAAA,EAASG,CAAAA,aAAAA,MAAMgB,GAAAA,AAAG,MAAA,QAAThB,eAAAA,KAAAA,IAAAA,aAAa;IAClC,MAAMY,YAAQhB,iBAAAA,EAAWI,MAAMY,KAAK,EAAEI;IAEtC,MAAMC,OAAOtB,oBAAAA,CAAKuB,MAAM,KACtBxB,wCAAAA,EAAyB,OAAO;QAC9B,SAAS;QACT,4EAA4E;QAC5E,4FAA4F;QAC5FO,KAAKA;QACLkB,MAAM;QACN,iBAAiBP,UAAUC,YAAY,IAAIA;QAC3C,iBAAiBD,UAAUC,YAAYG,MAAMH;QAC7C,iBAAiBD;QACjB,iBAAiB,EAAEV,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOkB,OAAO;QACjC,GAAGpB,KAAK;IACV,IACA;QAAEc,aAAa;IAAM;IAEvB,IAAIZ,SAAUA,CAAAA,MAAMmB,mBAAmB,IAAInB,MAAMoB,MAAAA,AAAK,GAAI;QACxD,oFAAoF;QACpFL,IAAI,CAAC,mBAAmB,GAAG;YAACf,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOmB,mBAAmB;YAAEnB,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOoB,MAAM;YAAEL,IAAI,CAAC,mBAAmB;SAAC,CAC7FM,MAAM,CAACC,SACPC,IAAI,CAAC;IACV;IACA,MAAMC,MAAM/B,oBAAAA,CAAKuB,MAAM,CAAClB,MAAM0B,GAAG,EAAE;QAAEZ,aAAa;IAAM;IAExD,OAAO;QACLE;QACAJ;QACAe,YAAY;YAAEV,MAAM;YAAOS,KAAK;YAAOlB,qBAAqBV,kDAAAA;QAA+B;QAC3FmB;QACAS;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/ProgressBar/useProgressBar.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { motionSlot } from '@fluentui/react-motion';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport { clampValue, clampMax } from '../../utils/index';\nimport type {\n ProgressBarProps,\n ProgressBarState,\n ProgressBarBaseProps,\n ProgressBarBaseState,\n} from './ProgressBar.types';\nimport { ProgressBarIndeterminateMotion } from './progressBarMotions';\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 indeterminateMotion,\n ...baseProps\n } = props;\n\n const state = useProgressBarBase_unstable(baseProps, ref);\n\n return {\n ...state,\n components: {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...state.components,\n indeterminateMotion: ProgressBarIndeterminateMotion,\n },\n color,\n shape,\n thickness,\n indeterminateMotion:\n state.value === undefined\n ? motionSlot(indeterminateMotion, {\n elementType: ProgressBarIndeterminateMotion,\n defaultProps: {},\n })\n : undefined,\n };\n};\n\n/**\n * Base hook for ProgressBar component. Manages state related to ARIA progressbar attributes\n * (role, aria-valuemin, aria-valuemax, aria-valuenow) and field context integration —\n * without design props (shape, thickness, color).\n *\n * @param props - props from this instance of ProgressBar (without shape, thickness, color)\n * @param ref - reference to root HTMLElement of ProgressBar\n */\nexport const useProgressBarBase_unstable = (\n props: ProgressBarBaseProps,\n ref: React.Ref<HTMLElement>,\n): ProgressBarBaseState => {\n const field = useFieldContext_unstable();\n\n const max = clampMax(props.max ?? 1);\n const value = clampValue(props.value, max);\n\n const root = slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\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\n return {\n max,\n value,\n components: { root: 'div', bar: 'div', indeterminateMotion: 'div' },\n root,\n bar,\n };\n};\n"],"names":["useFieldContext_unstable","motionSlot","getIntrinsicElementProps","slot","clampValue","clampMax","ProgressBarIndeterminateMotion","useProgressBar_unstable","props","ref","field","fieldState","validationState","color","shape","thickness","indeterminateMotion","baseProps","state","useProgressBarBase_unstable","components","value","undefined","elementType","defaultProps","max","root","always","role","labelId","validationMessageId","hintId","filter","Boolean","join","bar"],"mappings":"AAAA;;;;;;;;;;;;+BAkEamB;eAAAA;;IA1CAZ,uBAAAA;;;;4BArB4B,wBAAwB;6BACtC,yBAAyB;gCACL,4BAA4B;uBACtC,oBAAoB;oCAOV,uBAAuB;AAW/D,gCAAgC,CAACC,OAAyBC;IAC/D,MAAMC,YAAQV,oCAAAA;IACd,MAAMW,aAAaD,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOE,eAAe;IAEzC,MAAM,EACJC,QAAQF,eAAe,WAAWA,eAAe,aAAaA,eAAe,YAAYA,aAAa,OAAO,EAC7GG,QAAQ,SAAS,EACjBC,YAAY,QAAQ,EACpBC,mBAAmB,EACnB,GAAGC,WACJ,GAAGT;IAEJ,MAAMU,QAAQC,4BAA4BF,WAAWR;IAErD,OAAO;QACL,GAAGS,KAAK;QACRE,YAAY;YACV,4DAA4D;YAC5D,GAAGF,MAAME,UAAU;YACnBJ,qBAAqBV,kDAAAA;QACvB;QACAO;QACAC;QACAC;QACAC,qBACEE,MAAMG,KAAK,KAAKC,gBACZrB,uBAAAA,EAAWe,qBAAqB;YAC9BO,aAAajB,kDAAAA;YACbkB,cAAc,CAAC;QACjB,KACAF;IACR;AACF,EAAE;AAUK,oCAAoC,CACzCd,OACAC;IAEA,MAAMC,YAAQV,oCAAAA;QAEOQ;IAArB,MAAMiB,UAAMpB,eAAAA,EAASG,cAAAA,MAAMiB,GAAAA,AAAG,MAAA,QAATjB,eAAAA,KAAAA,IAAAA,aAAa;IAClC,MAAMa,YAAQjB,iBAAAA,EAAWI,MAAMa,KAAK,EAAEI;IAEtC,MAAMC,OAAOvB,oBAAAA,CAAKwB,MAAM,KACtBzB,wCAAAA,EAAyB,OAAO;QAC9B,SAAS;QACT,4EAA4E;QAC5E,4FAA4F;QAC5FO,KAAKA;QACLmB,MAAM;QACN,iBAAiBP,UAAUC,YAAY,IAAIA;QAC3C,iBAAiBD,UAAUC,YAAYG,MAAMH;QAC7C,iBAAiBD;QACjB,iBAAiB,EAAEX,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOmB,OAAO;QACjC,GAAGrB,KAAK;IACV,IACA;QAAEe,aAAa;IAAM;IAEvB,IAAIb,SAAUA,CAAAA,MAAMoB,mBAAmB,IAAIpB,MAAMqB,MAAAA,AAAK,GAAI;QACxD,oFAAoF;QACpFL,IAAI,CAAC,mBAAmB,GAAG;YAAChB,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOoB,mBAAmB;YAAEpB,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOqB,MAAM;YAAEL,IAAI,CAAC,mBAAmB;SAAC,CAC7FM,MAAM,CAACC,SACPC,IAAI,CAAC;IACV;IACA,MAAMC,MAAMhC,oBAAAA,CAAKwB,MAAM,CAACnB,MAAM2B,GAAG,EAAE;QAAEZ,aAAa;IAAM;IAExD,OAAO;QACLE;QACAJ;QACAD,YAAY;YAAEM,MAAM;YAAOS,KAAK;YAAOnB,qBAAqB;QAAM;QAClEU;QACAS;IACF;AACF,EAAE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-progress",
3
- "version": "9.5.0",
3
+ "version": "9.5.1",
4
4
  "description": "Progress component for FluentUI v9",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -12,12 +12,12 @@
12
12
  },
13
13
  "license": "MIT",
14
14
  "dependencies": {
15
- "@fluentui/react-motion": "^9.14.0",
16
- "@fluentui/react-field": "^9.5.0",
17
- "@fluentui/react-jsx-runtime": "^9.4.1",
15
+ "@fluentui/react-motion": "^9.15.0",
16
+ "@fluentui/react-field": "^9.5.1",
17
+ "@fluentui/react-jsx-runtime": "^9.4.2",
18
18
  "@fluentui/react-shared-contexts": "^9.26.2",
19
19
  "@fluentui/react-theme": "^9.2.1",
20
- "@fluentui/react-utilities": "^9.26.2",
20
+ "@fluentui/react-utilities": "^9.26.3",
21
21
  "@griffel/react": "^1.5.32",
22
22
  "@swc/helpers": "^0.5.1"
23
23
  },