@fluentui/react-progress 9.1.80 → 9.1.81

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,12 +1,25 @@
1
1
  # Change Log - @fluentui/react-progress
2
2
 
3
- This log was last generated on Mon, 01 Jul 2024 20:25:40 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 15 Jul 2024 17:20:26 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.1.81](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.81)
8
+
9
+ Mon, 15 Jul 2024 17:20:26 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.80..@fluentui/react-progress_v9.1.81)
11
+
12
+ ### Patches
13
+
14
+ - fix: revert incorectly set npm versions in all packages ([PR #31937](https://github.com/microsoft/fluentui/pull/31937) by martinhochel@microsoft.com)
15
+ - Bump @fluentui/react-field to v9.1.70 ([PR #31998](https://github.com/microsoft/fluentui/pull/31998) by beachball)
16
+ - Bump @fluentui/react-jsx-runtime to v9.0.41 ([PR #31998](https://github.com/microsoft/fluentui/pull/31998) by beachball)
17
+ - Bump @fluentui/react-shared-contexts to v9.19.1 ([PR #31998](https://github.com/microsoft/fluentui/pull/31998) by beachball)
18
+ - Bump @fluentui/react-utilities to v9.18.12 ([PR #31998](https://github.com/microsoft/fluentui/pull/31998) by beachball)
19
+
7
20
  ## [9.1.80](https://github.com/microsoft/fluentui/tree/@fluentui/react-progress_v9.1.80)
8
21
 
9
- Mon, 01 Jul 2024 20:25:40 GMT
22
+ Mon, 01 Jul 2024 20:30:27 GMT
10
23
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-progress_v9.1.79..@fluentui/react-progress_v9.1.80)
11
24
 
12
25
  ### Patches
@@ -1 +1 @@
1
- {"version":3,"sources":["ProgressBar.ts"],"sourcesContent":["export * from './components/ProgressBar/index';\n"],"names":[],"mappings":"AAAA,cAAc,iCAAiC"}
1
+ {"version":3,"sources":["ProgressBar.ts"],"sourcesContent":["export * from './components/ProgressBar/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,iCAAiC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["ProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useProgressBar_unstable } from './useProgressBar';\nimport { renderProgressBar_unstable } from './renderProgressBar';\nimport { useProgressBarStyles_unstable } from './useProgressBarStyles.styles';\nimport type { ProgressBarProps } from './ProgressBar.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * A ProgressBar bar shows the progression of a task.\n */\nexport const ProgressBar: ForwardRefComponent<ProgressBarProps> = React.forwardRef((props, ref) => {\n const state = useProgressBar_unstable(props, ref);\n\n useProgressBarStyles_unstable(state);\n\n useCustomStyleHook_unstable('useProgressBarStyles_unstable')(state);\n\n return renderProgressBar_unstable(state);\n});\n\nProgressBar.displayName = 'ProgressBar';\n"],"names":["React","useProgressBar_unstable","renderProgressBar_unstable","useProgressBarStyles_unstable","useCustomStyleHook_unstable","ProgressBar","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,6BAA6B,QAAQ,gCAAgC;AAG9E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,4BAAqDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,QAAQR,wBAAwBM,OAAOC;IAE7CL,8BAA8BM;IAE9BL,4BAA4B,iCAAiCK;IAE7D,OAAOP,2BAA2BO;AACpC,GAAG;AAEHJ,YAAYK,WAAW,GAAG"}
1
+ {"version":3,"sources":["ProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useProgressBar_unstable } from './useProgressBar';\nimport { renderProgressBar_unstable } from './renderProgressBar';\nimport { useProgressBarStyles_unstable } from './useProgressBarStyles.styles';\nimport type { ProgressBarProps } from './ProgressBar.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * A ProgressBar bar shows the progression of a task.\n */\nexport const ProgressBar: ForwardRefComponent<ProgressBarProps> = React.forwardRef((props, ref) => {\n const state = useProgressBar_unstable(props, ref);\n\n useProgressBarStyles_unstable(state);\n\n useCustomStyleHook_unstable('useProgressBarStyles_unstable')(state);\n\n return renderProgressBar_unstable(state);\n});\n\nProgressBar.displayName = 'ProgressBar';\n"],"names":["React","useProgressBar_unstable","renderProgressBar_unstable","useProgressBarStyles_unstable","useCustomStyleHook_unstable","ProgressBar","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,6BAA6B,QAAQ,gCAAgC;AAG9E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,4BAAqDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,QAAQR,wBAAwBM,OAAOC;IAE7CL,8BAA8BM;IAE9BL,4BAA4B,iCAAiCK;IAE7D,OAAOP,2BAA2BO;AACpC,GAAG;AAEHJ,YAAYK,WAAW,GAAG"}
@@ -1 +1,3 @@
1
- export { };
1
+ /**
2
+ * State used in rendering ProgressBar
3
+ */ export { };
@@ -1 +1 @@
1
- {"version":3,"sources":["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<Required<ProgressBarSlots>> &\n Required<Pick<ProgressBarProps, 'max' | 'shape' | 'thickness'>> &\n Pick<ProgressBarProps, 'value' | 'color'>;\n"],"names":[],"mappings":"AAAA,WAqD4C"}
1
+ {"version":3,"sources":["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<Required<ProgressBarSlots>> &\n Required<Pick<ProgressBarProps, 'max' | 'shape' | 'thickness'>> &\n Pick<ProgressBarProps, 'value' | 'color'>;\n"],"names":[],"rangeMappings":";;","mappings":"AAgDA;;CAEC,GACD,WAE4C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './ProgressBar';\nexport * from './ProgressBar.types';\nexport * from './renderProgressBar';\nexport * from './useProgressBar';\nexport * from './useProgressBarStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,gBAAgB;AAC9B,cAAc,sBAAsB;AACpC,cAAc,sBAAsB;AACpC,cAAc,mBAAmB;AACjC,cAAc,gCAAgC"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './ProgressBar';\nexport * from './ProgressBar.types';\nexport * from './renderProgressBar';\nexport * from './useProgressBar';\nexport * from './useProgressBarStyles.styles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,gBAAgB;AAC9B,cAAc,sBAAsB;AACpC,cAAc,sBAAsB;AACpC,cAAc,mBAAmB;AACjC,cAAc,gCAAgC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderProgressBar.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @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":["assertSlots","renderProgressBar_unstable","state","root","bar"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC;IACzCF,YAA8BE;IAC9B,qBAAO,KAACA,MAAMC,IAAI;kBAAED,MAAME,GAAG,kBAAI,KAACF,MAAME,GAAG;;AAC7C,EAAE"}
1
+ {"version":3,"sources":["renderProgressBar.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @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":["assertSlots","renderProgressBar_unstable","state","root","bar"],"rangeMappings":";;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC;IACzCF,YAA8BE;IAC9B,qBAAO,KAACA,MAAMC,IAAI;kBAAED,MAAME,GAAG,kBAAI,KAACF,MAAME,GAAG;;AAC7C,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { getIntrinsicElementProps, 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 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 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","getIntrinsicElementProps","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,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAC3E,SAASC,UAAU,EAAEC,QAAQ,QAAQ,oBAAoB;AAGzD;;;;;;;;CAQC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAyBC;IAC/D,MAAMC,QAAQR;IACd,MAAMS,aAAaD,kBAAAA,4BAAAA,MAAOE,eAAe;IAEzC,MAAM,EACJC,QAAQF,eAAe,WAAWA,eAAe,aAAaA,eAAe,YAAYA,aAAa,OAAO,EAC7GG,QAAQ,SAAS,EACjBC,YAAY,QAAQ,EACrB,GAAGP;QACiBA;IAArB,MAAMQ,MAAMV,SAASE,CAAAA,aAAAA,MAAMQ,GAAG,cAATR,wBAAAA,aAAa;IAClC,MAAMS,QAAQZ,WAAWG,MAAMS,KAAK,EAAED;IAEtC,MAAME,OAAOd,KAAKe,MAAM,CACtBhB,yBAAyB,OAAO;QAC9B,SAAS;QACT,4EAA4E;QAC5E,4FAA4F;QAC5FM,KAAKA;QACLW,MAAM;QACN,iBAAiBH,UAAUI,YAAY,IAAIA;QAC3C,iBAAiBJ,UAAUI,YAAYL,MAAMK;QAC7C,iBAAiBJ;QACjB,iBAAiB,EAAEP,kBAAAA,4BAAAA,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,4BAAAA,MAAOc,mBAAmB;YAAEd,kBAAAA,4BAAAA,MAAOe,MAAM;YAAEP,IAAI,CAAC,mBAAmB;SAAC,CAC7FQ,MAAM,CAACC,SACPC,IAAI,CAAC;IACV;IACA,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"}
1
+ {"version":3,"sources":["useProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { getIntrinsicElementProps, 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 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 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","getIntrinsicElementProps","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"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,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"}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["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"],"names":["ProgressBar","progressBarClassNames","renderProgressBar_unstable","useProgressBar_unstable","useProgressBarStyles_unstable"],"mappings":"AAAA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,uBAAuB,EACvBC,6BAA6B,QACxB,gBAAgB"}
1
+ {"version":3,"sources":["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"],"names":["ProgressBar","progressBarClassNames","renderProgressBar_unstable","useProgressBar_unstable","useProgressBarStyles_unstable"],"rangeMappings":"","mappings":"AAAA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,uBAAuB,EACvBC,6BAA6B,QACxB,gBAAgB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["clampMax.ts"],"sourcesContent":["export const clampMax = (max: number): number => {\n const internalMax = max <= 0 ? 1 : max;\n\n if (process.env.NODE_ENV !== 'production') {\n if (max <= 0) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'max' must be greater than 0. Received max: ${max}`);\n }\n }\n return internalMax;\n};\n"],"names":["clampMax","max","internalMax","process","env","NODE_ENV","console","error"],"mappings":"AAAA,OAAO,MAAMA,WAAW,CAACC;IACvB,MAAMC,cAAcD,OAAO,IAAI,IAAIA;IAEnC,IAAIE,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,IAAIJ,OAAO,GAAG;YACZ,sCAAsC;YACtCK,QAAQC,KAAK,CAAC,CAAC,qDAAqD,EAAEN,IAAI,CAAC;QAC7E;IACF;IACA,OAAOC;AACT,EAAE"}
1
+ {"version":3,"sources":["clampMax.ts"],"sourcesContent":["export const clampMax = (max: number): number => {\n const internalMax = max <= 0 ? 1 : max;\n\n if (process.env.NODE_ENV !== 'production') {\n if (max <= 0) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'max' must be greater than 0. Received max: ${max}`);\n }\n }\n return internalMax;\n};\n"],"names":["clampMax","max","internalMax","process","env","NODE_ENV","console","error"],"rangeMappings":";;;;;;;;;","mappings":"AAAA,OAAO,MAAMA,WAAW,CAACC;IACvB,MAAMC,cAAcD,OAAO,IAAI,IAAIA;IAEnC,IAAIE,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,IAAIJ,OAAO,GAAG;YACZ,sCAAsC;YACtCK,QAAQC,KAAK,CAAC,CAAC,qDAAqD,EAAEN,IAAI,CAAC;QAC7E;IACF;IACA,OAAOC;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["clampValue.ts"],"sourcesContent":["export const clampValue = (value: number | undefined, max: number): number | undefined => {\n if (value === undefined) {\n return value;\n }\n const internalValue = value < 0 ? 0 : value > max ? max : value;\n\n if (process.env.NODE_ENV !== 'production') {\n if (value < 0) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'value' must be greater than or equal to zero. Received value: ${value}`);\n }\n if (value > max) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'value' must be less than or equal to 'max'. Received value: ${value}, max: ${max}`);\n }\n }\n return internalValue;\n};\n"],"names":["clampValue","value","max","undefined","internalValue","process","env","NODE_ENV","console","error"],"mappings":"AAAA,OAAO,MAAMA,aAAa,CAACC,OAA2BC;IACpD,IAAID,UAAUE,WAAW;QACvB,OAAOF;IACT;IACA,MAAMG,gBAAgBH,QAAQ,IAAI,IAAIA,QAAQC,MAAMA,MAAMD;IAE1D,IAAII,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,IAAIN,QAAQ,GAAG;YACb,sCAAsC;YACtCO,QAAQC,KAAK,CAAC,CAAC,wEAAwE,EAAER,MAAM,CAAC;QAClG;QACA,IAAIA,QAAQC,KAAK;YACf,sCAAsC;YACtCM,QAAQC,KAAK,CAAC,CAAC,sEAAsE,EAAER,MAAM,OAAO,EAAEC,IAAI,CAAC;QAC7G;IACF;IACA,OAAOE;AACT,EAAE"}
1
+ {"version":3,"sources":["clampValue.ts"],"sourcesContent":["export const clampValue = (value: number | undefined, max: number): number | undefined => {\n if (value === undefined) {\n return value;\n }\n const internalValue = value < 0 ? 0 : value > max ? max : value;\n\n if (process.env.NODE_ENV !== 'production') {\n if (value < 0) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'value' must be greater than or equal to zero. Received value: ${value}`);\n }\n if (value > max) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'value' must be less than or equal to 'max'. Received value: ${value}, max: ${max}`);\n }\n }\n return internalValue;\n};\n"],"names":["clampValue","value","max","undefined","internalValue","process","env","NODE_ENV","console","error"],"rangeMappings":";;;;;;;;;;;;;;;;","mappings":"AAAA,OAAO,MAAMA,aAAa,CAACC,OAA2BC;IACpD,IAAID,UAAUE,WAAW;QACvB,OAAOF;IACT;IACA,MAAMG,gBAAgBH,QAAQ,IAAI,IAAIA,QAAQC,MAAMA,MAAMD;IAE1D,IAAII,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,IAAIN,QAAQ,GAAG;YACb,sCAAsC;YACtCO,QAAQC,KAAK,CAAC,CAAC,wEAAwE,EAAER,MAAM,CAAC;QAClG;QACA,IAAIA,QAAQC,KAAK;YACf,sCAAsC;YACtCM,QAAQC,KAAK,CAAC,CAAC,sEAAsE,EAAER,MAAM,OAAO,EAAEC,IAAI,CAAC;QAC7G;IACF;IACA,OAAOE;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './clampMax';\nexport * from './clampValue';\n"],"names":[],"mappings":"AAAA,cAAc,aAAa;AAC3B,cAAc,eAAe"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './clampMax';\nexport * from './clampValue';\n"],"names":[],"rangeMappings":";","mappings":"AAAA,cAAc,aAAa;AAC3B,cAAc,eAAe"}
@@ -1 +1 @@
1
- {"version":3,"sources":["ProgressBar.js"],"sourcesContent":["export * from './components/ProgressBar/index';\n"],"names":[],"mappings":";;;;;uBAAc"}
1
+ {"version":3,"sources":["ProgressBar.ts"],"sourcesContent":["export * from './components/ProgressBar/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
@@ -1 +1 @@
1
- {"version":3,"sources":["ProgressBar.js"],"sourcesContent":["import * as React from 'react';\nimport { useProgressBar_unstable } from './useProgressBar';\nimport { renderProgressBar_unstable } from './renderProgressBar';\nimport { useProgressBarStyles_unstable } from './useProgressBarStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * A ProgressBar bar shows the progression of a task.\n */ export const ProgressBar = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useProgressBar_unstable(props, ref);\n useProgressBarStyles_unstable(state);\n useCustomStyleHook_unstable('useProgressBarStyles_unstable')(state);\n return renderProgressBar_unstable(state);\n});\nProgressBar.displayName = 'ProgressBar';\n"],"names":["ProgressBar","React","forwardRef","props","ref","state","useProgressBar_unstable","useProgressBarStyles_unstable","useCustomStyleHook_unstable","renderProgressBar_unstable","displayName"],"mappings":";;;;+BAOiBA;;;eAAAA;;;;iEAPM;gCACiB;mCACG;4CACG;qCACF;AAGjC,MAAMA,cAAc,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAClE,MAAMC,QAAQC,IAAAA,uCAAuB,EAACH,OAAOC;IAC7CG,IAAAA,yDAA6B,EAACF;IAC9BG,IAAAA,gDAA2B,EAAC,iCAAiCH;IAC7D,OAAOI,IAAAA,6CAA0B,EAACJ;AACtC;AACAL,YAAYU,WAAW,GAAG"}
1
+ {"version":3,"sources":["ProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useProgressBar_unstable } from './useProgressBar';\nimport { renderProgressBar_unstable } from './renderProgressBar';\nimport { useProgressBarStyles_unstable } from './useProgressBarStyles.styles';\nimport type { ProgressBarProps } from './ProgressBar.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * A ProgressBar bar shows the progression of a task.\n */\nexport const ProgressBar: ForwardRefComponent<ProgressBarProps> = React.forwardRef((props, ref) => {\n const state = useProgressBar_unstable(props, ref);\n\n useProgressBarStyles_unstable(state);\n\n useCustomStyleHook_unstable('useProgressBarStyles_unstable')(state);\n\n return renderProgressBar_unstable(state);\n});\n\nProgressBar.displayName = 'ProgressBar';\n"],"names":["ProgressBar","React","forwardRef","props","ref","state","useProgressBar_unstable","useProgressBarStyles_unstable","useCustomStyleHook_unstable","renderProgressBar_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;gCACiB;mCACG;4CACG;qCAGF;AAKrC,MAAMA,cAAAA,WAAAA,GAAqDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,QAAQC,IAAAA,uCAAAA,EAAwBH,OAAOC;IAE7CG,IAAAA,yDAAAA,EAA8BF;IAE9BG,IAAAA,gDAAAA,EAA4B,iCAAiCH;IAE7D,OAAOI,IAAAA,6CAAAA,EAA2BJ;AACpC;AAEAL,YAAYU,WAAW,GAAG"}
@@ -1,4 +1,6 @@
1
- "use strict";
1
+ /**
2
+ * State used in rendering ProgressBar
3
+ */ "use strict";
2
4
  Object.defineProperty(exports, "__esModule", {
3
5
  value: true
4
6
  });
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":""}
1
+ {"version":3,"sources":["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<Required<ProgressBarSlots>> &\n Required<Pick<ProgressBarProps, 'max' | 'shape' | 'thickness'>> &\n Pick<ProgressBarProps, 'value' | 'color'>;\n"],"names":[],"rangeMappings":";;","mappings":"AAgDA;;CAEC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './ProgressBar';\nexport * from './ProgressBar.types';\nexport * from './renderProgressBar';\nexport * from './useProgressBar';\nexport * from './useProgressBarStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './ProgressBar';\nexport * from './ProgressBar.types';\nexport * from './renderProgressBar';\nexport * from './useProgressBar';\nexport * from './useProgressBarStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderProgressBar.js"],"sourcesContent":[" import { jsx as _jsx } from \"@fluentui/react-jsx-runtime/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__*/ _jsx(state.root, {\n children: state.bar && /*#__PURE__*/ _jsx(state.bar, {})\n });\n};\n"],"names":["renderProgressBar_unstable","state","assertSlots","_jsx","root","children","bar"],"mappings":";;;;+BAIiBA;;;eAAAA;;;4BAJa;gCACF;AAGjB,MAAMA,6BAA6B,CAACC;IAC3CC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,eAAI,EAACF,MAAMG,IAAI,EAAE;QAClCC,UAAUJ,MAAMK,GAAG,IAAI,WAAW,GAAGH,IAAAA,eAAI,EAACF,MAAMK,GAAG,EAAE,CAAC;IAC1D;AACJ"}
1
+ {"version":3,"sources":["renderProgressBar.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @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":["renderProgressBar_unstable","state","assertSlots","_jsx","root","bar"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAE4B;AAMrB,MAAMA,6BAA6B,CAACC;IACzCC,IAAAA,2BAAAA,EAA8BD;IAC9B,OAAA,WAAA,GAAOE,IAAAA,eAAA,EAACF,MAAMG,IAAI,EAAA;kBAAEH,MAAMI,GAAG,IAAA,WAAA,GAAIF,IAAAA,eAAA,EAACF,MAAMI,GAAG,EAAA,CAAA;;AAC7C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useProgressBar.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { getIntrinsicElementProps, 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(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,\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","getIntrinsicElementProps","role","undefined","labelId","elementType","validationMessageId","hintId","filter","Boolean","join","bar","state","components"],"mappings":";;;;+BAYiBA;;;eAAAA;;;;iEAZM;4BACkB;gCACM;uBACV;AAS1B,MAAMA,0BAA0B,CAACC,OAAOC;IAC/C,MAAMC,QAAQC,IAAAA,oCAAwB;IACtC,MAAMC,aAAaF,UAAU,QAAQA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMG,eAAe;IACtF,MAAM,EAAEC,QAAQF,eAAe,WAAWA,eAAe,aAAaA,eAAe,YAAYA,aAAa,OAAO,EAAEG,QAAQ,SAAS,EAAEC,YAAY,QAAQ,EAAE,GAAGR;IACnK,IAAIS;IACJ,MAAMC,MAAMC,IAAAA,eAAQ,EAAC,AAACF,CAAAA,aAAaT,MAAMU,GAAG,AAAD,MAAO,QAAQD,eAAe,KAAK,IAAIA,aAAa;IAC/F,MAAMG,QAAQC,IAAAA,iBAAU,EAACb,MAAMY,KAAK,EAAEF;IACtC,MAAMI,OAAOC,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAAC,OAAO;QACrD,SAAS;QACT,4EAA4E;QAC5E,4FAA4F;QAC5FhB,KAAKA;QACLiB,MAAM;QACN,iBAAiBN,UAAUO,YAAY,IAAIA;QAC3C,iBAAiBP,UAAUO,YAAYT,MAAMS;QAC7C,iBAAiBP;QACjB,mBAAmBV,UAAU,QAAQA,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,QAAQA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMoB,mBAAmB;YACvEpB,UAAU,QAAQA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMqB,MAAM;YAC1DT,IAAI,CAAC,mBAAmB;SAC3B,CAACU,MAAM,CAACC,SAASC,IAAI,CAAC;IAC3B;IACA,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"}
1
+ {"version":3,"sources":["useProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { getIntrinsicElementProps, 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 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 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":["useProgressBar_unstable","props","ref","field","useFieldContext_unstable","fieldState","validationState","color","shape","thickness","max","clampMax","value","clampValue","root","slot","always","getIntrinsicElementProps","role","undefined","labelId","elementType","validationMessageId","hintId","filter","Boolean","join","bar","state","components"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAeaA;;;eAAAA;;;;iEAfU;4BACkB;gCACM;uBACV;AAY9B,MAAMA,0BAA0B,CAACC,OAAyBC;IAC/D,MAAMC,QAAQC,IAAAA,oCAAAA;IACd,MAAMC,aAAaF,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOG,eAAe;IAEzC,MAAM,EACJC,QAAQF,eAAe,WAAWA,eAAe,aAAaA,eAAe,YAAYA,aAAa,OAAO,EAC7GG,QAAQ,SAAS,EACjBC,YAAY,QAAQ,EACrB,GAAGR;QACiBA;IAArB,MAAMS,MAAMC,IAAAA,eAAAA,EAASV,CAAAA,aAAAA,MAAMS,GAAG,AAAHA,MAAG,QAATT,eAAAA,KAAAA,IAAAA,aAAa;IAClC,MAAMW,QAAQC,IAAAA,iBAAAA,EAAWZ,MAAMW,KAAK,EAAEF;IAEtC,MAAMI,OAAOC,oBAAAA,CAAKC,MAAM,CACtBC,IAAAA,wCAAAA,EAAyB,OAAO;QAC9B,SAAS;QACT,4EAA4E;QAC5E,4FAA4F;QAC5Ff,KAAKA;QACLgB,MAAM;QACN,iBAAiBN,UAAUO,YAAY,IAAIA;QAC3C,iBAAiBP,UAAUO,YAAYT,MAAMS;QAC7C,iBAAiBP;QACjB,mBAAmBT,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOiB,OAAO;QACjC,GAAGnB,KAAK;IACV,IACA;QAAEoB,aAAa;IAAM;IAEvB,IAAIlB,SAAUA,CAAAA,MAAMmB,mBAAmB,IAAInB,MAAMoB,MAAM,AAANA,GAAS;QACxD,oFAAoF;QACpFT,IAAI,CAAC,mBAAmB,GAAG;YAACX,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOmB,mBAAmB;YAAEnB,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOoB,MAAM;YAAET,IAAI,CAAC,mBAAmB;SAAC,CAC7FU,MAAM,CAACC,SACPC,IAAI,CAAC;IACV;IACA,MAAMC,MAAMZ,oBAAAA,CAAKC,MAAM,CAACf,MAAM0B,GAAG,EAAE;QAAEN,aAAa;IAAM;IACxD,MAAMO,QAA0B;QAC9BrB;QACAG;QACAF;QACAC;QACAG;QACAiB,YAAY;YAAEf,MAAM;YAAOa,KAAK;QAAM;QACtCb;QACAa;IACF;IAEA,OAAOC;AACT"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useProgressBarStyles.styles.js"],"sourcesContent":["import { __styles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const progressBarClassNames = {\n root: 'fui-ProgressBar',\n bar: 'fui-ProgressBar__bar'\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;\nconst barThicknessValues = {\n medium: '2px',\n large: '4px'\n};\nconst indeterminateProgressBar = {\n '0%': {\n left: '-33%'\n },\n '100%': {\n left: '100%'\n }\n};\n/**\n * Styles for the root slot\n */\nconst useRootStyles = /*#__PURE__*/__styles({\n root: {\n mc9l5x: \"ftgm304\",\n De3pzq: \"f18f03hv\",\n a9b677: \"fly5x3f\",\n B68tc82: 0,\n Bmxbyg5: 0,\n Bpg54ce: \"f1a3p1vp\",\n Bpep1pd: \"fu42dvn\"\n },\n rounded: {\n Beyfa6y: 0,\n Bbmb7ep: 0,\n Btl43ni: 0,\n B7oj6ja: 0,\n Dimara: \"ft85np5\"\n },\n square: {\n Beyfa6y: 0,\n Bbmb7ep: 0,\n Btl43ni: 0,\n B7oj6ja: 0,\n Dimara: \"f1fabniw\"\n },\n medium: {\n Bqenvij: \"f4t8t6x\"\n },\n large: {\n Bqenvij: \"f6ywr7j\"\n }\n}, {\n d: [\".ftgm304{display:block;}\", \".f18f03hv{background-color:var(--colorNeutralBackground6);}\", \".fly5x3f{width:100%;}\", [\".f1a3p1vp{overflow:hidden;}\", {\n p: -1\n }], [\".ft85np5{border-radius:var(--borderRadiusMedium);}\", {\n p: -1\n }], [\".f1fabniw{border-radius:var(--borderRadiusNone);}\", {\n p: -1\n }], \".f4t8t6x{height:2px;}\", \".f6ywr7j{height:4px;}\"],\n m: [[\"@media screen and (forced-colors: active){.fu42dvn{background-color:CanvasText;}}\", {\n m: \"screen and (forced-colors: active)\"\n }]]\n});\n/**\n * Styles for the ProgressBar bar\n */\nconst useBarStyles = /*#__PURE__*/__styles({\n base: {\n Bpep1pd: \"f1neahkh\",\n Beyfa6y: 0,\n Bbmb7ep: 0,\n Btl43ni: 0,\n B7oj6ja: 0,\n Dimara: \"f12b9xdw\",\n Bqenvij: \"f1l02sjl\"\n },\n nonZeroDeterminate: {\n Bmy1vo4: \"fjt6zfz\",\n B3o57yi: \"f1wofebd\",\n Bkqvd7p: \"fv71qf3\"\n },\n indeterminate: {\n B2u0y6b: \"fa0wk36\",\n qhf8xq: \"f10pi13n\",\n Bcmaq0h: [\"fpo0yib\", \"f1u5hf6c\"],\n Bv12yb3: [\"fwd2bol\", \"f14gig94\"],\n vin17d: \"f1a27w2r\",\n Ezkn3b: \"f452v7t\",\n w3vfg9: \"f1cpbl36\",\n Gqtpxc: \"f4akx1t\",\n B3vm3ge: \"f18p5put\"\n },\n brand: {\n De3pzq: \"ftywsgz\"\n },\n error: {\n De3pzq: \"fdl5y0r\"\n },\n warning: {\n De3pzq: \"f1s438gw\"\n },\n success: {\n De3pzq: \"flxk52p\"\n }\n}, {\n m: [[\"@media screen and (forced-colors: active){.f1neahkh{background-color:Highlight;}}\", {\n m: \"screen and (forced-colors: active)\"\n }], [\"@media screen and (prefers-reduced-motion: reduce){.f4akx1t{animation-duration:0.01ms;}}\", {\n m: \"screen and (prefers-reduced-motion: reduce)\"\n }], [\"@media screen and (prefers-reduced-motion: reduce){.f18p5put{animation-iteration-count:1;}}\", {\n m: \"screen and (prefers-reduced-motion: reduce)\"\n }]],\n d: [[\".f12b9xdw{border-radius:inherit;}\", {\n p: -1\n }], \".f1l02sjl{height:100%;}\", \".fjt6zfz{transition-property:width;}\", \".f1wofebd{transition-duration:0.3s;}\", \".fv71qf3{transition-timing-function:ease;}\", \".fa0wk36{max-width:33%;}\", \".f10pi13n{position:relative;}\", \".fpo0yib{background-image:linear-gradient(\\n to right,\\n var(--colorNeutralBackground6) 0%,\\n var(--colorTransparentBackground) 50%,\\n var(--colorNeutralBackground6) 100%\\n );}\", \".f1u5hf6c{background-image:linear-gradient(\\n to left,\\n var(--colorNeutralBackground6) 0%,\\n var(--colorTransparentBackground) 50%,\\n var(--colorNeutralBackground6) 100%\\n );}\", \".fwd2bol{animation-name:f1keuaan;}\", \".f14gig94{animation-name:f10x8f8u;}\", \".f1a27w2r{animation-duration:3s;}\", \".f452v7t{animation-timing-function:linear;}\", \".f1cpbl36{animation-iteration-count:infinite;}\", \".ftywsgz{background-color:var(--colorCompoundBrandBackground);}\", \".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}\", \".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}\", \".flxk52p{background-color:var(--colorPaletteGreenBackground3);}\"],\n k: [\"@keyframes f1keuaan{0%{left:-33%;}100%{left:100%;}}\", \"@keyframes f10x8f8u{0%{right:-33%;}100%{right:100%;}}\"]\n});\n/**\n * Apply styling to the ProgressBar slots based on the state\n */\nexport const useProgressBarStyles_unstable = state => {\n 'use no memo';\n\n const {\n color,\n max,\n shape,\n thickness,\n value\n } = state;\n const rootStyles = useRootStyles();\n const barStyles = useBarStyles();\n state.root.className = mergeClasses(progressBarClassNames.root, rootStyles.root, rootStyles[shape], rootStyles[thickness], state.root.className);\n if (state.bar) {\n state.bar.className = mergeClasses(progressBarClassNames.bar, barStyles.base, barStyles.brand, value === undefined && barStyles.indeterminate, value !== undefined && value > ZERO_THRESHOLD && barStyles.nonZeroDeterminate, color && value !== undefined && barStyles[color], state.bar.className);\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 return state;\n};\n//# sourceMappingURL=useProgressBarStyles.styles.js.map"],"names":["progressBarClassNames","useProgressBarStyles_unstable","root","bar","ZERO_THRESHOLD","barThicknessValues","medium","large","indeterminateProgressBar","left","useRootStyles","__styles","mc9l5x","De3pzq","a9b677","B68tc82","Bmxbyg5","Bpg54ce","Bpep1pd","rounded","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","square","Bqenvij","d","p","m","useBarStyles","base","nonZeroDeterminate","Bmy1vo4","B3o57yi","Bkqvd7p","indeterminate","B2u0y6b","qhf8xq","Bcmaq0h","Bv12yb3","vin17d","Ezkn3b","w3vfg9","Gqtpxc","B3vm3ge","brand","error","warning","success","k","state","color","max","shape","thickness","value","rootStyles","barStyles","className","mergeClasses","undefined","style","width","Math","min"],"mappings":";;;;;;;;;;;IAEaA,qBAAqB;eAArBA;;IAyHAC,6BAA6B;eAA7BA;;;uBA3H0B;AAEhC,MAAMD,wBAA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aH,SAAS,CAACN,MAAM,EAAED,MAAMhD,GAAG,CAACwD,SAAS;IACrS;IACA,IAAIR,MAAMhD,GAAG,IAAIqD,UAAUK,WAAW;QACpCV,MAAMhD,GAAG,CAAC2D,KAAK,GAAG;YAChBC,OAAOC,KAAKC,GAAG,CAAC,KAAKD,KAAKX,GAAG,CAAC,GAAGG,QAAQH,MAAM,QAAQ;YACvD,GAAGF,MAAMhD,GAAG,CAAC2D,KAAK;QACpB;IACF;IACA,OAAOX;AACT,GACA,uDAAuD"}
1
+ {"version":3,"sources":["useProgressBarStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const progressBarClassNames = {\n root: 'fui-ProgressBar',\n bar: 'fui-ProgressBar__bar'\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;\nconst barThicknessValues = {\n medium: '2px',\n large: '4px'\n};\nconst indeterminateProgressBar = {\n '0%': {\n left: '-33%'\n },\n '100%': {\n left: '100%'\n }\n};\n/**\n * Styles for the root slot\n */ const useRootStyles = makeStyles({\n root: {\n display: 'block',\n backgroundColor: tokens.colorNeutralBackground6,\n width: '100%',\n overflow: 'hidden',\n '@media screen and (forced-colors: active)': {\n backgroundColor: 'CanvasText'\n }\n },\n rounded: {\n borderRadius: tokens.borderRadiusMedium\n },\n square: {\n borderRadius: tokens.borderRadiusNone\n },\n medium: {\n height: barThicknessValues.medium\n },\n large: {\n height: barThicknessValues.large\n }\n});\n/**\n * Styles for the ProgressBar bar\n */ const useBarStyles = makeStyles({\n base: {\n '@media screen and (forced-colors: active)': {\n backgroundColor: 'Highlight'\n },\n borderRadius: 'inherit',\n height: '100%'\n },\n nonZeroDeterminate: {\n transitionProperty: 'width',\n transitionDuration: '0.3s',\n transitionTimingFunction: 'ease'\n },\n indeterminate: {\n maxWidth: '33%',\n position: 'relative',\n backgroundImage: `linear-gradient(\n to right,\n ${tokens.colorNeutralBackground6} 0%,\n ${tokens.colorTransparentBackground} 50%,\n ${tokens.colorNeutralBackground6} 100%\n )`,\n animationName: indeterminateProgressBar,\n animationDuration: '3s',\n animationTimingFunction: 'linear',\n animationIterationCount: 'infinite',\n '@media screen and (prefers-reduced-motion: reduce)': {\n animationDuration: '0.01ms',\n animationIterationCount: '1'\n }\n },\n brand: {\n backgroundColor: tokens.colorCompoundBrandBackground\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 * Apply styling to the ProgressBar slots based on the state\n */ export const useProgressBarStyles_unstable = (state)=>{\n 'use no memo';\n const { color, max, shape, thickness, value } = state;\n const rootStyles = useRootStyles();\n const barStyles = useBarStyles();\n state.root.className = mergeClasses(progressBarClassNames.root, rootStyles.root, rootStyles[shape], rootStyles[thickness], state.root.className);\n if (state.bar) {\n state.bar.className = mergeClasses(progressBarClassNames.bar, barStyles.base, barStyles.brand, value === undefined && barStyles.indeterminate, value !== undefined && value > ZERO_THRESHOLD && barStyles.nonZeroDeterminate, color && value !== undefined && barStyles[color], state.bar.className);\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 return state;\n};\n"],"names":["progressBarClassNames","useProgressBarStyles_unstable","root","bar","ZERO_THRESHOLD","barThicknessValues","medium","large","indeterminateProgressBar","left","useRootStyles","__styles","mc9l5x","De3pzq","a9b677","B68tc82","Bmxbyg5","Bpg54ce","Bpep1pd","rounded","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","square","Bqenvij","d","p","m","useBarStyles","base","nonZeroDeterminate","Bmy1vo4","B3o57yi","Bkqvd7p","indeterminate","B2u0y6b","qhf8xq","Bcmaq0h","Bv12yb3","vin17d","Ezkn3b","w3vfg9","Gqtpxc","B3vm3ge","brand","error","warning","success","k","state","color","max","shape","thickness","value","rootStyles","barStyles","className","mergeClasses","undefined","style","width","Math","min"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,qBAAqB;eAArBA;;IA4FIC,6BAA6B;eAA7BA;;;uBA9FwB;AAElC,MAAMD,wBAAwB;IACjCE,MAAM;IACNC,KAAK;AACT;AACA,sDAAA;AACA,oDAAA;AACA,MAAMC,iBAAiB;AACvB,MAAMC,qBAAqB;IACvBC,QAAQ;IACRC,OAAO;AACX;AACA,MAAMC,2BAA2B;IAC7B,MAAM;QACFC,MAAM;IACV;IACA,QAAQ;QACJA,MAAM;IACV;AACJ;AACA;;CAEA,GAAI,MAAMC,gBAAa,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAT,MAAA;QAAAU,QAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;IAAA;IAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;IAAA;IAAAC,QAAA;QAAAL,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;IAAA;IAAAlB,QAAA;QAAAoB,SAAA;IAAA;IAAAnB,OAAA;QAAAmB,SAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;gBAAAC,GAAA,CAAA;YAAA;SAAA;QAAA;YAAA;YAAA;gBAAAA,GAAA,CAAA;YAAA;SAAA;QAA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D,YAAY5B;IAClBqB,MAAMjD,IAAI,CAACyD,SAAS,GAAGC,IAAAA,mBAAY,EAAC5D,sBAAsBE,IAAI,EAAEuD,WAAWvD,IAAI,EAAEuD,UAAU,CAACH,MAAM,EAAEG,UAAU,CAACF,UAAU,EAAEJ,MAAMjD,IAAI,CAACyD,SAAS;IAC/I,IAAIR,MAAMhD,GAAG,EAAE;QACXgD,MAAMhD,GAAG,CAACwD,SAAS,GAAGC,IAAAA,mBAAY,EAAC5D,sBAAsBG,GAAG,EAAEuD,UAAU3B,IAAI,EAAE2B,UAAUZ,KAAK,EAAEU,UAAUK,aAAaH,UAAUtB,aAAa,EAAEoB,UAAUK,aAAaL,QAAQpD,kBAAkBsD,UAAU1B,kBAAkB,EAAEoB,SAASI,UAAUK,aAAaH,SAAS,CAACN,MAAM,EAAED,MAAMhD,GAAG,CAACwD,SAAS;IACvS;IACA,IAAIR,MAAMhD,GAAG,IAAIqD,UAAUK,WAAW;QAClCV,MAAMhD,GAAG,CAAC2D,KAAK,GAAG;YACdC,OAAOC,KAAKC,GAAG,CAAC,KAAKD,KAAKX,GAAG,CAAC,GAAGG,QAAQH,MAAM,QAAQ;YACvD,GAAGF,MAAMhD,GAAG,CAAC2D,KAAAA;QACjB;IACJ;IACA,OAAOX;AACX"}
@@ -18,11 +18,11 @@ _export(exports, {
18
18
  renderProgressBar_unstable: function() {
19
19
  return _ProgressBar.renderProgressBar_unstable;
20
20
  },
21
- useProgressBar_unstable: function() {
22
- return _ProgressBar.useProgressBar_unstable;
23
- },
24
21
  useProgressBarStyles_unstable: function() {
25
22
  return _ProgressBar.useProgressBarStyles_unstable;
23
+ },
24
+ useProgressBar_unstable: function() {
25
+ return _ProgressBar.useProgressBar_unstable;
26
26
  }
27
27
  });
28
28
  const _ProgressBar = require("./ProgressBar");
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export { ProgressBar, progressBarClassNames, renderProgressBar_unstable, useProgressBar_unstable, useProgressBarStyles_unstable } from './ProgressBar';\n"],"names":["ProgressBar","progressBarClassNames","renderProgressBar_unstable","useProgressBar_unstable","useProgressBarStyles_unstable"],"mappings":";;;;;;;;;;;IAASA,WAAW;eAAXA,wBAAW;;IAAEC,qBAAqB;eAArBA,kCAAqB;;IAAEC,0BAA0B;eAA1BA,uCAA0B;;IAAEC,uBAAuB;eAAvBA,oCAAuB;;IAAEC,6BAA6B;eAA7BA,0CAA6B;;;6BAAQ"}
1
+ {"version":3,"sources":["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"],"names":["ProgressBar","progressBarClassNames","renderProgressBar_unstable","useProgressBarStyles_unstable","useProgressBar_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACEA,WAAW;eAAXA,wBAAW;;IACXC,qBAAqB;eAArBA,kCAAqB;;IACrBC,0BAA0B;eAA1BA,uCAA0B;;IAE1BC,6BAA6B;eAA7BA,0CAA6B;;IAD7BC,uBAAuB;eAAvBA,oCAAuB;;;6BAElB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["clampMax.js"],"sourcesContent":["export const clampMax = (max)=>{\n const internalMax = max <= 0 ? 1 : max;\n if (process.env.NODE_ENV !== 'production') {\n if (max <= 0) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'max' must be greater than 0. Received max: ${max}`);\n }\n }\n return internalMax;\n};\n"],"names":["clampMax","max","internalMax","process","env","NODE_ENV","console","error"],"mappings":";;;;+BAAaA;;;eAAAA;;;AAAN,MAAMA,WAAW,CAACC;IACrB,MAAMC,cAAcD,OAAO,IAAI,IAAIA;IACnC,IAAIE,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACvC,IAAIJ,OAAO,GAAG;YACV,sCAAsC;YACtCK,QAAQC,KAAK,CAAC,CAAC,qDAAqD,EAAEN,IAAI,CAAC;QAC/E;IACJ;IACA,OAAOC;AACX"}
1
+ {"version":3,"sources":["clampMax.ts"],"sourcesContent":["export const clampMax = (max: number): number => {\n const internalMax = max <= 0 ? 1 : max;\n\n if (process.env.NODE_ENV !== 'production') {\n if (max <= 0) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'max' must be greater than 0. Received max: ${max}`);\n }\n }\n return internalMax;\n};\n"],"names":["clampMax","max","internalMax","process","env","NODE_ENV","console","error"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAAaA;;;eAAAA;;;AAAN,MAAMA,WAAW,CAACC;IACvB,MAAMC,cAAcD,OAAO,IAAI,IAAIA;IAEnC,IAAIE,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,IAAIJ,OAAO,GAAG;YACZ,sCAAsC;YACtCK,QAAQC,KAAK,CAAC,CAAC,qDAAqD,EAAEN,IAAI,CAAC;QAC7E;IACF;IACA,OAAOC;AACT"}
@@ -1 +1 @@
1
- {"version":3,"sources":["clampValue.js"],"sourcesContent":["export const clampValue = (value, max)=>{\n if (value === undefined) {\n return value;\n }\n const internalValue = value < 0 ? 0 : value > max ? max : value;\n if (process.env.NODE_ENV !== 'production') {\n if (value < 0) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'value' must be greater than or equal to zero. Received value: ${value}`);\n }\n if (value > max) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'value' must be less than or equal to 'max'. Received value: ${value}, max: ${max}`);\n }\n }\n return internalValue;\n};\n"],"names":["clampValue","value","max","undefined","internalValue","process","env","NODE_ENV","console","error"],"mappings":";;;;+BAAaA;;;eAAAA;;;AAAN,MAAMA,aAAa,CAACC,OAAOC;IAC9B,IAAID,UAAUE,WAAW;QACrB,OAAOF;IACX;IACA,MAAMG,gBAAgBH,QAAQ,IAAI,IAAIA,QAAQC,MAAMA,MAAMD;IAC1D,IAAII,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACvC,IAAIN,QAAQ,GAAG;YACX,sCAAsC;YACtCO,QAAQC,KAAK,CAAC,CAAC,wEAAwE,EAAER,MAAM,CAAC;QACpG;QACA,IAAIA,QAAQC,KAAK;YACb,sCAAsC;YACtCM,QAAQC,KAAK,CAAC,CAAC,sEAAsE,EAAER,MAAM,OAAO,EAAEC,IAAI,CAAC;QAC/G;IACJ;IACA,OAAOE;AACX"}
1
+ {"version":3,"sources":["clampValue.ts"],"sourcesContent":["export const clampValue = (value: number | undefined, max: number): number | undefined => {\n if (value === undefined) {\n return value;\n }\n const internalValue = value < 0 ? 0 : value > max ? max : value;\n\n if (process.env.NODE_ENV !== 'production') {\n if (value < 0) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'value' must be greater than or equal to zero. Received value: ${value}`);\n }\n if (value > max) {\n // eslint-disable-next-line no-console\n console.error(`The prop 'value' must be less than or equal to 'max'. Received value: ${value}, max: ${max}`);\n }\n }\n return internalValue;\n};\n"],"names":["clampValue","value","max","undefined","internalValue","process","env","NODE_ENV","console","error"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAAaA;;;eAAAA;;;AAAN,MAAMA,aAAa,CAACC,OAA2BC;IACpD,IAAID,UAAUE,WAAW;QACvB,OAAOF;IACT;IACA,MAAMG,gBAAgBH,QAAQ,IAAI,IAAIA,QAAQC,MAAMA,MAAMD;IAE1D,IAAII,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,IAAIN,QAAQ,GAAG;YACb,sCAAsC;YACtCO,QAAQC,KAAK,CAAC,CAAC,wEAAwE,EAAER,MAAM,CAAC;QAClG;QACA,IAAIA,QAAQC,KAAK;YACf,sCAAsC;YACtCM,QAAQC,KAAK,CAAC,CAAC,sEAAsE,EAAER,MAAM,OAAO,EAAEC,IAAI,CAAC;QAC7G;IACF;IACA,OAAOE;AACT"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './clampMax';\nexport * from './clampValue';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './clampMax';\nexport * from './clampValue';\n"],"names":[],"rangeMappings":";;;;;;","mappings":";;;;;uBAAc;uBACA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-progress",
3
- "version": "9.1.80",
3
+ "version": "9.1.81",
4
4
  "description": "Progress component for FluentUI v9",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -32,11 +32,11 @@
32
32
  "@fluentui/scripts-tasks": "*"
33
33
  },
34
34
  "dependencies": {
35
- "@fluentui/react-field": "^9.1.69",
36
- "@fluentui/react-jsx-runtime": "^9.0.40",
37
- "@fluentui/react-shared-contexts": "^9.19.0",
35
+ "@fluentui/react-field": "^9.1.70",
36
+ "@fluentui/react-jsx-runtime": "^9.0.41",
37
+ "@fluentui/react-shared-contexts": "^9.19.1",
38
38
  "@fluentui/react-theme": "^9.1.19",
39
- "@fluentui/react-utilities": "^9.18.11",
39
+ "@fluentui/react-utilities": "^9.18.12",
40
40
  "@griffel/react": "^1.5.22",
41
41
  "@swc/helpers": "^0.5.1"
42
42
  },