Private
Public Access
1
0

feat: Fluent UI Outlook Lite + connections mockup

This commit is contained in:
2026-04-14 18:52:25 +00:00
parent 1199eff6c3
commit dfa4010406
34820 changed files with 1003813 additions and 205 deletions

1758
node_modules/@fluentui/react-progress/CHANGELOG.md generated vendored Normal file

File diff suppressed because it is too large Load Diff

15
node_modules/@fluentui/react-progress/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,15 @@
@fluentui/react-progress
Copyright (c) Microsoft Corporation
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Note: Usage of the fonts and icons referenced in Fluent UI React is subject to the terms listed at https://aka.ms/fluentui-assets-license

44
node_modules/@fluentui/react-progress/README.md generated vendored Normal file
View File

@@ -0,0 +1,44 @@
# @fluentui/react-progress
**React Progress components for [Fluent UI React](https://react.fluentui.dev/)**
## Usage
To import `ProgressBar`:
```js
import { ProgressBar } from '@fluentui/react-components';
```
### Examples
```jsx
const ProgressBarExample = () => {
return <ProgressBar thickness="large" value={0.5} />;
};
```
#### Using Field
The `Field` component is a wrapper around the `ProgressBar` component that allows the user to add a `label`, `hint`, `validationMessage`, and `validationState` to the `ProgressBar` component. You can pass these props, as well as the regular `ProgressBar` props to a `Field` component.
To import `Field`:
```js
import { Field } from '@fluentui/react-field';
```
```jsx
const FieldExample = () => {
return (
<Field
label="Determinate ProgressBar"
hint="This is a determinate Progress with description"
value={0.5}
validationState="warning"
>
<ProgressBar />
</Field>
);
};
```

112
node_modules/@fluentui/react-progress/dist/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,112 @@
import type { ComponentProps } from '@fluentui/react-utilities';
import type { ComponentState } from '@fluentui/react-utilities';
import type { ForwardRefComponent } from '@fluentui/react-utilities';
import type { JSXElement } from '@fluentui/react-utilities';
import type { MotionSlotProps } from '@fluentui/react-motion';
import * as React_2 from 'react';
import type { Slot } from '@fluentui/react-utilities';
import type { SlotClassNames } from '@fluentui/react-utilities';
/**
* A ProgressBar bar shows the progression of a task.
*/
export declare const ProgressBar: ForwardRefComponent<ProgressBarProps>;
/**
* ProgressBar base props — excludes design props (shape, thickness, color).
*/
export declare type ProgressBarBaseProps = Omit<ProgressBarProps, 'shape' | 'thickness' | 'color' | 'indeterminateMotion'>;
/**
* ProgressBar base state — excludes design props (shape, thickness, color).
*/
export declare type ProgressBarBaseState = Omit<ProgressBarState, 'shape' | 'thickness' | 'color' | 'indeterminateMotion'>;
export declare const progressBarClassNames: SlotClassNames<Omit<ProgressBarSlots, 'indeterminateMotion'>>;
/**
* ProgressBar Props
*/
export declare type ProgressBarProps = Omit<ComponentProps<ProgressBarSlots>, 'size'> & {
/**
* The shape of the bar and track.
* @default rounded
*/
shape?: 'rounded' | 'square';
/**
* A decimal number between `0` and `1` (or between `0` and `max` if given),
* which specifies how much of the task has been completed.
*
* If `undefined` (default), the ProgressBar will display an **indeterminate** state.
*/
value?: number;
/**
* The maximum value, which indicates the task is complete.
* The ProgressBar bar will be full when `value` equals `max`.
* @default 1
*/
max?: number;
/**
* The thickness of the ProgressBar bar
* @default medium
*/
thickness?: 'medium' | 'large';
/**
* The status of the ProgressBar bar. Changes the color of the bar.
* @default brand
*/
color?: 'brand' | 'success' | 'warning' | 'error';
};
export declare type ProgressBarSlots = {
/**
* The track behind the ProgressBar bar
*/
root: NonNullable<Slot<'div'>>;
/**
* The filled portion of the ProgressBar bar. Animated in the indeterminate state, when no value is provided.
*/
bar?: NonNullable<Slot<'div'>>;
/**
* Motion slot for the indeterminate animation. Pass `null` to disable the animation.
*/
indeterminateMotion?: Slot<MotionSlotProps>;
};
/**
* State used in rendering ProgressBar
*/
export declare type ProgressBarState = ComponentState<Required<ProgressBarSlots>> & Required<Pick<ProgressBarProps, 'max' | 'shape' | 'thickness'>> & Pick<ProgressBarProps, 'value' | 'color'>;
/**
* Render the final JSX of ProgressBar
*/
export declare const renderProgressBar_unstable: (state: ProgressBarBaseState) => JSXElement;
/**
* Create the state required to render ProgressBar.
*
* The returned state can be modified with hooks such as useProgressBarStyles_unstable,
* before being passed to renderProgressBar_unstable.
*
* @param props - props from this instance of ProgressBar
* @param ref - reference to root HTMLElement of ProgressBar
*/
export declare const useProgressBar_unstable: (props: ProgressBarProps, ref: React_2.Ref<HTMLElement>) => ProgressBarState;
/**
* Base hook for ProgressBar component. Manages state related to ARIA progressbar attributes
* (role, aria-valuemin, aria-valuemax, aria-valuenow) and field context integration —
* without design props (shape, thickness, color).
*
* @param props - props from this instance of ProgressBar (without shape, thickness, color)
* @param ref - reference to root HTMLElement of ProgressBar
*/
export declare const useProgressBarBase_unstable: (props: ProgressBarBaseProps, ref: React_2.Ref<HTMLElement>) => ProgressBarBaseState;
/**
* Apply styling to the ProgressBar slots based on the state
*/
export declare const useProgressBarStyles_unstable: (state: ProgressBarState) => ProgressBarState;
export { }

View File

@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ProgressBar: function() {
return _index.ProgressBar;
},
progressBarClassNames: function() {
return _index.progressBarClassNames;
},
renderProgressBar_unstable: function() {
return _index.renderProgressBar_unstable;
},
useProgressBarBase_unstable: function() {
return _index.useProgressBarBase_unstable;
},
useProgressBarStyles_unstable: function() {
return _index.useProgressBarStyles_unstable;
},
useProgressBar_unstable: function() {
return _index.useProgressBar_unstable;
}
});
const _index = require("./components/ProgressBar/index");

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/ProgressBar.ts"],"sourcesContent":["export type {\n ProgressBarProps,\n ProgressBarBaseProps,\n ProgressBarSlots,\n ProgressBarState,\n ProgressBarBaseState,\n} from './components/ProgressBar/index';\nexport {\n ProgressBar,\n progressBarClassNames,\n renderProgressBar_unstable,\n useProgressBarStyles_unstable,\n useProgressBar_unstable,\n useProgressBarBase_unstable,\n} from './components/ProgressBar/index';\n"],"names":["ProgressBar","progressBarClassNames","renderProgressBar_unstable","useProgressBarStyles_unstable","useProgressBar_unstable","useProgressBarBase_unstable"],"mappings":";;;;;;;;;;;;eAQEA,kBAAW;;;eACXC,4BAAqB;;;eACrBC,iCAA0B;;;eAG1BG,kCAA2B;;;eAF3BF,oCAA6B;;;eAC7BC,8BAAuB;;;uBAElB,iCAAiC"}

View File

@@ -0,0 +1,24 @@
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "ProgressBar", {
enumerable: true,
get: function() {
return ProgressBar;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useProgressBar = require("./useProgressBar");
const _renderProgressBar = require("./renderProgressBar");
const _useProgressBarStylesstyles = require("./useProgressBarStyles.styles");
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
const ProgressBar = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
const state = (0, _useProgressBar.useProgressBar_unstable)(props, ref);
(0, _useProgressBarStylesstyles.useProgressBarStyles_unstable)(state);
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useProgressBarStyles_unstable')(state);
return (0, _renderProgressBar.renderProgressBar_unstable)(state);
});
ProgressBar.displayName = 'ProgressBar';

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/ProgressBar/ProgressBar.tsx"],"sourcesContent":["'use client';\n\nimport * 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;;;;;;;;;;;;iEAEuB,QAAQ;gCACS,mBAAmB;mCAChB,sBAAsB;4CACnB,gCAAgC;qCAGlC,kCAAkC;AAKvE,MAAMK,cAAAA,WAAAA,GAAqDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,YAAQR,uCAAAA,EAAwBM,OAAOC;QAE7CL,yDAAAA,EAA8BM;QAE9BL,gDAAAA,EAA4B,iCAAiCK;IAE7D,WAAOP,6CAAAA,EAA2BO;AACpC,GAAG;AAEHJ,YAAYK,WAAW,GAAG"}

View File

@@ -0,0 +1,6 @@
/**
* ProgressBar base state — excludes design props (shape, thickness, color).
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/ProgressBar/ProgressBar.types.ts"],"sourcesContent":["import type { MotionSlotProps } from '@fluentui/react-motion';\nimport 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 * Motion slot for the indeterminate animation. Pass `null` to disable the animation.\n */\n indeterminateMotion?: Slot<MotionSlotProps>;\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 * ProgressBar base props — excludes design props (shape, thickness, color).\n */\nexport type ProgressBarBaseProps = Omit<ProgressBarProps, 'shape' | 'thickness' | 'color' | 'indeterminateMotion'>;\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\n/**\n * ProgressBar base state — excludes design props (shape, thickness, color).\n */\nexport type ProgressBarBaseState = Omit<ProgressBarState, 'shape' | 'thickness' | 'color' | 'indeterminateMotion'>;\n"],"names":[],"mappings":"AAiEA;;CAEC,GACD,WAAmH"}

View File

@@ -0,0 +1,34 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ProgressBar: function() {
return _ProgressBar.ProgressBar;
},
progressBarClassNames: function() {
return _useProgressBarStylesstyles.progressBarClassNames;
},
renderProgressBar_unstable: function() {
return _renderProgressBar.renderProgressBar_unstable;
},
useProgressBarBase_unstable: function() {
return _useProgressBar.useProgressBarBase_unstable;
},
useProgressBarStyles_unstable: function() {
return _useProgressBarStylesstyles.useProgressBarStyles_unstable;
},
useProgressBar_unstable: function() {
return _useProgressBar.useProgressBar_unstable;
}
});
const _ProgressBar = require("./ProgressBar");
const _renderProgressBar = require("./renderProgressBar");
const _useProgressBar = require("./useProgressBar");
const _useProgressBarStylesstyles = require("./useProgressBarStyles.styles");

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/ProgressBar/index.ts"],"sourcesContent":["export { ProgressBar } from './ProgressBar';\nexport type {\n ProgressBarProps,\n ProgressBarBaseProps,\n ProgressBarSlots,\n ProgressBarState,\n ProgressBarBaseState,\n} from './ProgressBar.types';\nexport { renderProgressBar_unstable } from './renderProgressBar';\nexport { useProgressBar_unstable, useProgressBarBase_unstable } from './useProgressBar';\nexport { progressBarClassNames, useProgressBarStyles_unstable } from './useProgressBarStyles.styles';\n"],"names":["ProgressBar","renderProgressBar_unstable","useProgressBar_unstable","useProgressBarBase_unstable","progressBarClassNames","useProgressBarStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,wBAAW;;;eAUXI,iDAAqB;;;eAFrBH,6CAA0B;;;eACDE,2CAA2B;;;eAC7BE,yDAA6B;;;eADpDH,uCAAuB;;;6BATJ,gBAAgB;mCAQD,sBAAsB;gCACI,mBAAmB;4CACnB,gCAAgC"}

View File

@@ -0,0 +1,43 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "ProgressBarIndeterminateMotion", {
enumerable: true,
get: function() {
return ProgressBarIndeterminateMotion;
}
});
const _reactmotion = require("@fluentui/react-motion");
const ProgressBarIndeterminateMotion = (0, _reactmotion.createMotionComponent)({
// translate percentages are relative to the element's own width, not the container's.
// The indeterminate bar is ~33% the width of its container, so:
// translate: '-100%' === left: '-33%' (one bar-width off-screen to the left)
// translate: '300%' === left: '100%' (3 × bar-width ≈ full container width, off-screen to the right)
keyframes: [
{
translate: '-100%'
},
{
translate: '300%'
}
],
duration: 3000,
iterations: Infinity,
easing: _reactmotion.motionTokens.curveLinear,
reducedMotion: {
keyframes: [
{
opacity: 0.2
},
{
opacity: 1
},
{
opacity: 0.2
}
],
duration: 3000,
iterations: Infinity
}
});

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/ProgressBar/progressBarMotions.ts"],"sourcesContent":["import { createMotionComponent, motionTokens } from '@fluentui/react-motion';\n\n/**\n * Motion component for the indeterminate ProgressBar bar:\n * a horizontal sliding animation that loops indefinitely.\n * In reduced motion mode, the bar pulses opacity instead of sliding.\n */\nexport const ProgressBarIndeterminateMotion = createMotionComponent({\n // translate percentages are relative to the element's own width, not the container's.\n // The indeterminate bar is ~33% the width of its container, so:\n // translate: '-100%' === left: '-33%' (one bar-width off-screen to the left)\n // translate: '300%' === left: '100%' (3 × bar-width ≈ full container width, off-screen to the right)\n keyframes: [{ translate: '-100%' }, { translate: '300%' }],\n duration: 3000,\n iterations: Infinity,\n easing: motionTokens.curveLinear,\n\n reducedMotion: {\n keyframes: [{ opacity: 0.2 }, { opacity: 1 }, { opacity: 0.2 }],\n duration: 3000,\n iterations: Infinity,\n },\n});\n"],"names":["createMotionComponent","motionTokens","ProgressBarIndeterminateMotion","keyframes","translate","duration","iterations","Infinity","easing","curveLinear","reducedMotion","opacity"],"mappings":";;;;+BAOaE;;;;;;6BAPuC,yBAAyB;AAOtE,2CAAuCF,kCAAAA,EAAsB;IAClE,sFAAsF;IACtF,gEAAgE;IAChE,+EAA+E;IAC/E,wGAAwG;IACxGG,WAAW;QAAC;YAAEC,WAAW;QAAQ;QAAG;YAAEA,WAAW;QAAO;KAAE;IAC1DC,UAAU;IACVC,YAAYC;IACZC,QAAQP,yBAAAA,CAAaQ,WAAW;IAEhCC,eAAe;QACbP,WAAW;YAAC;gBAAEQ,SAAS;YAAI;YAAG;gBAAEA,SAAS;YAAE;YAAG;gBAAEA,SAAS;YAAI;SAAE;QAC/DN,UAAU;QACVC,YAAYC;IACd;AACF,GAAG"}

View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "renderProgressBar_unstable", {
enumerable: true,
get: function() {
return renderProgressBar_unstable;
}
});
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
const _reactutilities = require("@fluentui/react-utilities");
const renderProgressBar_unstable = (state)=>{
(0, _reactutilities.assertSlots)(state);
return /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {
children: state.bar && (state.indeterminateMotion ? /*#__PURE__*/ (0, _jsxruntime.jsx)(state.indeterminateMotion, {
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.bar, {})
}) : /*#__PURE__*/ (0, _jsxruntime.jsx)(state.bar, {}))
});
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/ProgressBar/renderProgressBar.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { ProgressBarBaseState, ProgressBarSlots } from './ProgressBar.types';\n\n/**\n * Render the final JSX of ProgressBar\n */\nexport const renderProgressBar_unstable = (state: ProgressBarBaseState): JSXElement => {\n assertSlots<ProgressBarSlots>(state);\n return (\n <state.root>\n {state.bar &&\n (state.indeterminateMotion ? (\n <state.indeterminateMotion>\n <state.bar />\n </state.indeterminateMotion>\n ) : (\n <state.bar />\n ))}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderProgressBar_unstable","state","root","bar","indeterminateMotion"],"mappings":";;;;+BAUaC;;;;;;4BATb,gDAAiD;gCAErB,4BAA4B;AAOjD,mCAAmC,CAACC;QACzCF,2BAAAA,EAA8BE;IAC9B,OAAA,WAAA,OACE,eAAA,EAACA,MAAMC,IAAI,EAAA;kBACRD,MAAME,GAAG,IACPF,CAAAA,MAAMG,mBAAmB,GAAA,WAAA,OACxB,eAAA,EAACH,MAAMG,mBAAmB,EAAA;sBACxB,WAAA,OAAA,eAAA,EAACH,MAAME,GAAG,EAAA,CAAA;+BAGZ,eAAA,EAACF,MAAME,GAAG,EAAA,CAAA,EAAA,CACZ;;AAGR,EAAE"}

View File

@@ -0,0 +1,84 @@
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
useProgressBarBase_unstable: function() {
return useProgressBarBase_unstable;
},
useProgressBar_unstable: function() {
return useProgressBar_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _reactfield = require("@fluentui/react-field");
const _reactmotion = require("@fluentui/react-motion");
const _reactutilities = require("@fluentui/react-utilities");
const _index = require("../../utils/index");
const _progressBarMotions = require("./progressBarMotions");
const useProgressBar_unstable = (props, ref)=>{
const field = (0, _reactfield.useFieldContext_unstable)();
const fieldState = field === null || field === void 0 ? void 0 : field.validationState;
const { color = fieldState === 'error' || fieldState === 'warning' || fieldState === 'success' ? fieldState : 'brand', shape = 'rounded', thickness = 'medium', indeterminateMotion, ...baseProps } = props;
const state = useProgressBarBase_unstable(baseProps, ref);
return {
...state,
color,
shape,
thickness,
indeterminateMotion: state.value === undefined ? (0, _reactmotion.motionSlot)(indeterminateMotion, {
elementType: _progressBarMotions.ProgressBarIndeterminateMotion,
defaultProps: {}
}) : undefined
};
};
const useProgressBarBase_unstable = (props, ref)=>{
const field = (0, _reactfield.useFieldContext_unstable)();
var _props_max;
const max = (0, _index.clampMax)((_props_max = props.max) !== null && _props_max !== void 0 ? _props_max : 1);
const value = (0, _index.clampValue)(props.value, max);
const root = _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('div', {
// FIXME:
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
ref: ref,
role: 'progressbar',
'aria-valuemin': value !== undefined ? 0 : undefined,
'aria-valuemax': value !== undefined ? max : undefined,
'aria-valuenow': value,
'aria-labelledby': field === null || field === void 0 ? void 0 : field.labelId,
...props
}), {
elementType: 'div'
});
if (field && (field.validationMessageId || field.hintId)) {
// Prepend the field's validation message and/or hint to the user's aria-describedby
root['aria-describedby'] = [
field === null || field === void 0 ? void 0 : field.validationMessageId,
field === null || field === void 0 ? void 0 : field.hintId,
root['aria-describedby']
].filter(Boolean).join(' ');
}
const bar = _reactutilities.slot.always(props.bar, {
elementType: 'div'
});
return {
max,
value,
components: {
root: 'div',
bar: 'div',
indeterminateMotion: _progressBarMotions.ProgressBarIndeterminateMotion
},
root,
bar
};
};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,189 @@
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
progressBarClassNames: function() {
return progressBarClassNames;
},
useProgressBarStyles_unstable: function() {
return useProgressBarStyles_unstable;
}
});
const _react = require("@griffel/react");
const progressBarClassNames = {
root: 'fui-ProgressBar',
bar: 'fui-ProgressBar__bar'
};
// If the percentComplete is near 0, don't animate it.
// This prevents animations on reset to 0 scenarios.
const ZERO_THRESHOLD = 0.01;
const barThicknessValues = {
medium: '2px',
large: '4px'
};
/**
* Styles for the root slot
*/ const useRootStyles = /*#__PURE__*/ (0, _react.__styles)({
root: {
mc9l5x: "ftgm304",
De3pzq: "f18f03hv",
a9b677: "fly5x3f",
B68tc82: 0,
Bmxbyg5: 0,
Bpg54ce: "f1a3p1vp",
Bomf52o: "f1skxd4g"
},
rounded: {
Beyfa6y: 0,
Bbmb7ep: 0,
Btl43ni: 0,
B7oj6ja: 0,
Dimara: "ft85np5"
},
square: {
Beyfa6y: 0,
Bbmb7ep: 0,
Btl43ni: 0,
B7oj6ja: 0,
Dimara: "f1fabniw"
},
medium: {
Bqenvij: "f4t8t6x"
},
large: {
Bqenvij: "f6ywr7j"
}
}, {
d: [
".ftgm304{display:block;}",
".f18f03hv{background-color:var(--colorNeutralBackground6);}",
".fly5x3f{width:100%;}",
[
".f1a3p1vp{overflow:hidden;}",
{
p: -1
}
],
[
".ft85np5{border-radius:var(--borderRadiusMedium);}",
{
p: -1
}
],
[
".f1fabniw{border-radius:var(--borderRadiusNone);}",
{
p: -1
}
],
".f4t8t6x{height:2px;}",
".f6ywr7j{height:4px;}"
],
m: [
[
"@media screen and (forced-colors: active){.f1skxd4g{background-color:CanvasText;}}",
{
m: "screen and (forced-colors: active)"
}
]
]
});
/**
* Styles for the ProgressBar bar
*/ const useBarStyles = /*#__PURE__*/ (0, _react.__styles)({
base: {
Bomf52o: "f1tnpuu0",
Beyfa6y: 0,
Bbmb7ep: 0,
Btl43ni: 0,
B7oj6ja: 0,
Dimara: "f12b9xdw",
Bqenvij: "f1l02sjl"
},
nonZeroDeterminate: {
Bmy1vo4: "fjt6zfz",
B3o57yi: "f1wofebd",
Bkqvd7p: "fv71qf3"
},
indeterminate: {
B2u0y6b: "fa0wk36",
qhf8xq: "f10pi13n",
Bcmaq0h: [
"fpo0yib",
"f1u5hf6c"
],
jpy9cc: "f3z2g5w"
},
brand: {
De3pzq: "ftywsgz"
},
error: {
De3pzq: "fdl5y0r"
},
warning: {
De3pzq: "f1s438gw"
},
success: {
De3pzq: "flxk52p"
}
}, {
m: [
[
"@media screen and (forced-colors: active){.f1tnpuu0{background-color:Highlight;}}",
{
m: "screen and (forced-colors: active)"
}
],
[
"@media screen and (prefers-reduced-motion: reduce){.f3z2g5w{max-width:100%;}}",
{
m: "screen and (prefers-reduced-motion: reduce)"
}
]
],
d: [
[
".f12b9xdw{border-radius:inherit;}",
{
p: -1
}
],
".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 );}",
".ftywsgz{background-color:var(--colorCompoundBrandBackground);}",
".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}",
".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}",
".flxk52p{background-color:var(--colorPaletteGreenBackground3);}"
]
});
const useProgressBarStyles_unstable = (state)=>{
'use no memo';
const { color, max, shape, thickness, value } = state;
const rootStyles = useRootStyles();
const barStyles = useBarStyles();
state.root.className = (0, _react.mergeClasses)(progressBarClassNames.root, rootStyles.root, rootStyles[shape], rootStyles[thickness], state.root.className);
if (state.bar) {
state.bar.className = (0, _react.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);
}
if (state.bar && value !== undefined) {
state.bar.style = {
width: Math.min(100, Math.max(0, value / max * 100)) + '%',
...state.bar.style
};
}
return state;
};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,116 @@
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
progressBarClassNames: function() {
return progressBarClassNames;
},
useProgressBarStyles_unstable: function() {
return useProgressBarStyles_unstable;
}
});
const _react = require("@griffel/react");
const _reacttheme = require("@fluentui/react-theme");
const progressBarClassNames = {
root: 'fui-ProgressBar',
bar: 'fui-ProgressBar__bar'
};
// If the percentComplete is near 0, don't animate it.
// This prevents animations on reset to 0 scenarios.
const ZERO_THRESHOLD = 0.01;
const barThicknessValues = {
medium: '2px',
large: '4px'
};
/**
* Styles for the root slot
*/ const useRootStyles = (0, _react.makeStyles)({
root: {
display: 'block',
backgroundColor: _reacttheme.tokens.colorNeutralBackground6,
width: '100%',
overflow: 'hidden',
'@media screen and (forced-colors: active)': {
backgroundColor: 'CanvasText'
}
},
rounded: {
borderRadius: _reacttheme.tokens.borderRadiusMedium
},
square: {
borderRadius: _reacttheme.tokens.borderRadiusNone
},
medium: {
height: barThicknessValues.medium
},
large: {
height: barThicknessValues.large
}
});
/**
* Styles for the ProgressBar bar
*/ const useBarStyles = (0, _react.makeStyles)({
base: {
'@media screen and (forced-colors: active)': {
backgroundColor: 'Highlight'
},
borderRadius: 'inherit',
height: '100%'
},
nonZeroDeterminate: {
transitionProperty: 'width',
transitionDuration: '0.3s',
transitionTimingFunction: 'ease'
},
indeterminate: {
maxWidth: '33%',
position: 'relative',
backgroundImage: `linear-gradient(
to right,
${_reacttheme.tokens.colorNeutralBackground6} 0%,
${_reacttheme.tokens.colorTransparentBackground} 50%,
${_reacttheme.tokens.colorNeutralBackground6} 100%
)`,
'@media screen and (prefers-reduced-motion: reduce)': {
// Reduced motion: bar is sized here, and the opacity is pulsed by ProgressBarIndeterminateMotion
maxWidth: '100%'
}
},
brand: {
backgroundColor: _reacttheme.tokens.colorCompoundBrandBackground
},
error: {
backgroundColor: _reacttheme.tokens.colorPaletteRedBackground3
},
warning: {
backgroundColor: _reacttheme.tokens.colorPaletteDarkOrangeBackground3
},
success: {
backgroundColor: _reacttheme.tokens.colorPaletteGreenBackground3
}
});
const useProgressBarStyles_unstable = (state)=>{
'use no memo';
const { color, max, shape, thickness, value } = state;
const rootStyles = useRootStyles();
const barStyles = useBarStyles();
state.root.className = (0, _react.mergeClasses)(progressBarClassNames.root, rootStyles.root, rootStyles[shape], rootStyles[thickness], state.root.className);
if (state.bar) {
state.bar.className = (0, _react.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);
}
if (state.bar && value !== undefined) {
state.bar.style = {
width: Math.min(100, Math.max(0, value / max * 100)) + '%',
...state.bar.style
};
}
return state;
};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ProgressBar: function() {
return _ProgressBar.ProgressBar;
},
progressBarClassNames: function() {
return _ProgressBar.progressBarClassNames;
},
renderProgressBar_unstable: function() {
return _ProgressBar.renderProgressBar_unstable;
},
useProgressBarBase_unstable: function() {
return _ProgressBar.useProgressBarBase_unstable;
},
useProgressBarStyles_unstable: function() {
return _ProgressBar.useProgressBarStyles_unstable;
},
useProgressBar_unstable: function() {
return _ProgressBar.useProgressBar_unstable;
}
});
const _ProgressBar = require("./ProgressBar");

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n ProgressBar,\n progressBarClassNames,\n renderProgressBar_unstable,\n useProgressBar_unstable,\n useProgressBarStyles_unstable,\n useProgressBarBase_unstable,\n} from './ProgressBar';\nexport type {\n ProgressBarProps,\n ProgressBarSlots,\n ProgressBarState,\n ProgressBarBaseProps,\n ProgressBarBaseState,\n} from './ProgressBar';\n"],"names":["ProgressBar","progressBarClassNames","renderProgressBar_unstable","useProgressBar_unstable","useProgressBarStyles_unstable","useProgressBarBase_unstable"],"mappings":";;;;;;;;;;;;eACEA,wBAAW;;;eACXC,kCAAqB;;;eACrBC,uCAA0B;;;eAG1BG,wCAA2B;;;eAD3BD,0CAA6B;;;eAD7BD,oCAAuB;;;6BAGlB,gBAAgB"}

View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "clampMax", {
enumerable: true,
get: function() {
return clampMax;
}
});
const clampMax = (max)=>{
const internalMax = max <= 0 ? 1 : max;
if (process.env.NODE_ENV !== 'production') {
if (max <= 0) {
// eslint-disable-next-line no-console
console.error(`The prop 'max' must be greater than 0. Received max: ${max}`);
}
}
return internalMax;
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/utils/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":";;;;+BAAaA;;;;;;AAAN,iBAAiB,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,KAAK;QAC7E;IACF;IACA,OAAOC;AACT,EAAE"}

View File

@@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "clampValue", {
enumerable: true,
get: function() {
return clampValue;
}
});
const clampValue = (value, max)=>{
if (value === undefined) {
return value;
}
const internalValue = value < 0 ? 0 : value > max ? max : value;
if (process.env.NODE_ENV !== 'production') {
if (value < 0) {
// eslint-disable-next-line no-console
console.error(`The prop 'value' must be greater than or equal to zero. Received value: ${value}`);
}
if (value > max) {
// eslint-disable-next-line no-console
console.error(`The prop 'value' must be less than or equal to 'max'. Received value: ${value}, max: ${max}`);
}
}
return internalValue;
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/utils/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":";;;;+BAAaA;;;;;;AAAN,mBAAmB,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,OAAO;QAClG;QACA,IAAIA,QAAQC,KAAK;YACf,sCAAsC;YACtCM,QAAQC,KAAK,CAAC,CAAC,sEAAsE,EAAER,MAAM,OAAO,EAAEC,KAAK;QAC7G;IACF;IACA,OAAOE;AACT,EAAE"}

View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
clampMax: function() {
return _clampMax.clampMax;
},
clampValue: function() {
return _clampValue.clampValue;
}
});
const _clampMax = require("./clampMax");
const _clampValue = require("./clampValue");

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/utils/index.ts"],"sourcesContent":["export { clampMax } from './clampMax';\nexport { clampValue } from './clampValue';\n"],"names":["clampMax","clampValue"],"mappings":";;;;;;;;;;;;eAASA,kBAAQ;;;eACRC,sBAAU;;;0BADM,aAAa;4BACX,eAAe"}

View File

@@ -0,0 +1 @@
export { ProgressBar, progressBarClassNames, renderProgressBar_unstable, useProgressBarStyles_unstable, useProgressBar_unstable, useProgressBarBase_unstable } from './components/ProgressBar/index';

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/ProgressBar.ts"],"sourcesContent":["export type {\n ProgressBarProps,\n ProgressBarBaseProps,\n ProgressBarSlots,\n ProgressBarState,\n ProgressBarBaseState,\n} from './components/ProgressBar/index';\nexport {\n ProgressBar,\n progressBarClassNames,\n renderProgressBar_unstable,\n useProgressBarStyles_unstable,\n useProgressBar_unstable,\n useProgressBarBase_unstable,\n} from './components/ProgressBar/index';\n"],"names":["ProgressBar","progressBarClassNames","renderProgressBar_unstable","useProgressBarStyles_unstable","useProgressBar_unstable","useProgressBarBase_unstable"],"mappings":"AAOA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,EACvBC,2BAA2B,QACtB,iCAAiC"}

View File

@@ -0,0 +1,15 @@
'use client';
import * as React from 'react';
import { useProgressBar_unstable } from './useProgressBar';
import { renderProgressBar_unstable } from './renderProgressBar';
import { useProgressBarStyles_unstable } from './useProgressBarStyles.styles';
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
/**
* A ProgressBar bar shows the progression of a task.
*/ export const ProgressBar = /*#__PURE__*/ React.forwardRef((props, ref)=>{
const state = useProgressBar_unstable(props, ref);
useProgressBarStyles_unstable(state);
useCustomStyleHook_unstable('useProgressBarStyles_unstable')(state);
return renderProgressBar_unstable(state);
});
ProgressBar.displayName = 'ProgressBar';

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/ProgressBar/ProgressBar.tsx"],"sourcesContent":["'use client';\n\nimport * 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;AAEA,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"}

View File

@@ -0,0 +1,3 @@
/**
* ProgressBar base state — excludes design props (shape, thickness, color).
*/ export { };

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/ProgressBar/ProgressBar.types.ts"],"sourcesContent":["import type { MotionSlotProps } from '@fluentui/react-motion';\nimport 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 * Motion slot for the indeterminate animation. Pass `null` to disable the animation.\n */\n indeterminateMotion?: Slot<MotionSlotProps>;\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 * ProgressBar base props — excludes design props (shape, thickness, color).\n */\nexport type ProgressBarBaseProps = Omit<ProgressBarProps, 'shape' | 'thickness' | 'color' | 'indeterminateMotion'>;\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\n/**\n * ProgressBar base state — excludes design props (shape, thickness, color).\n */\nexport type ProgressBarBaseState = Omit<ProgressBarState, 'shape' | 'thickness' | 'color' | 'indeterminateMotion'>;\n"],"names":[],"mappings":"AAiEA;;CAEC,GACD,WAAmH"}

View File

@@ -0,0 +1,4 @@
export { ProgressBar } from './ProgressBar';
export { renderProgressBar_unstable } from './renderProgressBar';
export { useProgressBar_unstable, useProgressBarBase_unstable } from './useProgressBar';
export { progressBarClassNames, useProgressBarStyles_unstable } from './useProgressBarStyles.styles';

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/ProgressBar/index.ts"],"sourcesContent":["export { ProgressBar } from './ProgressBar';\nexport type {\n ProgressBarProps,\n ProgressBarBaseProps,\n ProgressBarSlots,\n ProgressBarState,\n ProgressBarBaseState,\n} from './ProgressBar.types';\nexport { renderProgressBar_unstable } from './renderProgressBar';\nexport { useProgressBar_unstable, useProgressBarBase_unstable } from './useProgressBar';\nexport { progressBarClassNames, useProgressBarStyles_unstable } from './useProgressBarStyles.styles';\n"],"names":["ProgressBar","renderProgressBar_unstable","useProgressBar_unstable","useProgressBarBase_unstable","progressBarClassNames","useProgressBarStyles_unstable"],"mappings":"AAAA,SAASA,WAAW,QAAQ,gBAAgB;AAQ5C,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,uBAAuB,EAAEC,2BAA2B,QAAQ,mBAAmB;AACxF,SAASC,qBAAqB,EAAEC,6BAA6B,QAAQ,gCAAgC"}

View File

@@ -0,0 +1,37 @@
import { createMotionComponent, motionTokens } from '@fluentui/react-motion';
/**
* Motion component for the indeterminate ProgressBar bar:
* a horizontal sliding animation that loops indefinitely.
* In reduced motion mode, the bar pulses opacity instead of sliding.
*/ export const ProgressBarIndeterminateMotion = createMotionComponent({
// translate percentages are relative to the element's own width, not the container's.
// The indeterminate bar is ~33% the width of its container, so:
// translate: '-100%' === left: '-33%' (one bar-width off-screen to the left)
// translate: '300%' === left: '100%' (3 × bar-width ≈ full container width, off-screen to the right)
keyframes: [
{
translate: '-100%'
},
{
translate: '300%'
}
],
duration: 3000,
iterations: Infinity,
easing: motionTokens.curveLinear,
reducedMotion: {
keyframes: [
{
opacity: 0.2
},
{
opacity: 1
},
{
opacity: 0.2
}
],
duration: 3000,
iterations: Infinity
}
});

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/ProgressBar/progressBarMotions.ts"],"sourcesContent":["import { createMotionComponent, motionTokens } from '@fluentui/react-motion';\n\n/**\n * Motion component for the indeterminate ProgressBar bar:\n * a horizontal sliding animation that loops indefinitely.\n * In reduced motion mode, the bar pulses opacity instead of sliding.\n */\nexport const ProgressBarIndeterminateMotion = createMotionComponent({\n // translate percentages are relative to the element's own width, not the container's.\n // The indeterminate bar is ~33% the width of its container, so:\n // translate: '-100%' === left: '-33%' (one bar-width off-screen to the left)\n // translate: '300%' === left: '100%' (3 × bar-width ≈ full container width, off-screen to the right)\n keyframes: [{ translate: '-100%' }, { translate: '300%' }],\n duration: 3000,\n iterations: Infinity,\n easing: motionTokens.curveLinear,\n\n reducedMotion: {\n keyframes: [{ opacity: 0.2 }, { opacity: 1 }, { opacity: 0.2 }],\n duration: 3000,\n iterations: Infinity,\n },\n});\n"],"names":["createMotionComponent","motionTokens","ProgressBarIndeterminateMotion","keyframes","translate","duration","iterations","Infinity","easing","curveLinear","reducedMotion","opacity"],"mappings":"AAAA,SAASA,qBAAqB,EAAEC,YAAY,QAAQ,yBAAyB;AAE7E;;;;CAIC,GACD,OAAO,MAAMC,iCAAiCF,sBAAsB;IAClE,sFAAsF;IACtF,gEAAgE;IAChE,+EAA+E;IAC/E,wGAAwG;IACxGG,WAAW;QAAC;YAAEC,WAAW;QAAQ;QAAG;YAAEA,WAAW;QAAO;KAAE;IAC1DC,UAAU;IACVC,YAAYC;IACZC,QAAQP,aAAaQ,WAAW;IAEhCC,eAAe;QACbP,WAAW;YAAC;gBAAEQ,SAAS;YAAI;YAAG;gBAAEA,SAAS;YAAE;YAAG;gBAAEA,SAAS;YAAI;SAAE;QAC/DN,UAAU;QACVC,YAAYC;IACd;AACF,GAAG"}

View File

@@ -0,0 +1,12 @@
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
import { assertSlots } from '@fluentui/react-utilities';
/**
* Render the final JSX of ProgressBar
*/ export const renderProgressBar_unstable = (state)=>{
assertSlots(state);
return /*#__PURE__*/ _jsx(state.root, {
children: state.bar && (state.indeterminateMotion ? /*#__PURE__*/ _jsx(state.indeterminateMotion, {
children: /*#__PURE__*/ _jsx(state.bar, {})
}) : /*#__PURE__*/ _jsx(state.bar, {}))
});
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/ProgressBar/renderProgressBar.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { ProgressBarBaseState, ProgressBarSlots } from './ProgressBar.types';\n\n/**\n * Render the final JSX of ProgressBar\n */\nexport const renderProgressBar_unstable = (state: ProgressBarBaseState): JSXElement => {\n assertSlots<ProgressBarSlots>(state);\n return (\n <state.root>\n {state.bar &&\n (state.indeterminateMotion ? (\n <state.indeterminateMotion>\n <state.bar />\n </state.indeterminateMotion>\n ) : (\n <state.bar />\n ))}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderProgressBar_unstable","state","root","bar","indeterminateMotion"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC;IACzCF,YAA8BE;IAC9B,qBACE,KAACA,MAAMC,IAAI;kBACRD,MAAME,GAAG,IACPF,CAAAA,MAAMG,mBAAmB,iBACxB,KAACH,MAAMG,mBAAmB;sBACxB,cAAA,KAACH,MAAME,GAAG;2BAGZ,KAACF,MAAME,GAAG,KACZ;;AAGR,EAAE"}

View File

@@ -0,0 +1,80 @@
'use client';
import * as React from 'react';
import { useFieldContext_unstable } from '@fluentui/react-field';
import { motionSlot } from '@fluentui/react-motion';
import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
import { clampValue, clampMax } from '../../utils/index';
import { ProgressBarIndeterminateMotion } from './progressBarMotions';
/**
* Create the state required to render ProgressBar.
*
* The returned state can be modified with hooks such as useProgressBarStyles_unstable,
* before being passed to renderProgressBar_unstable.
*
* @param props - props from this instance of ProgressBar
* @param ref - reference to root HTMLElement of ProgressBar
*/ export const useProgressBar_unstable = (props, ref)=>{
const field = useFieldContext_unstable();
const fieldState = field === null || field === void 0 ? void 0 : field.validationState;
const { color = fieldState === 'error' || fieldState === 'warning' || fieldState === 'success' ? fieldState : 'brand', shape = 'rounded', thickness = 'medium', indeterminateMotion, ...baseProps } = props;
const state = useProgressBarBase_unstable(baseProps, ref);
return {
...state,
color,
shape,
thickness,
indeterminateMotion: state.value === undefined ? motionSlot(indeterminateMotion, {
elementType: ProgressBarIndeterminateMotion,
defaultProps: {}
}) : undefined
};
};
/**
* Base hook for ProgressBar component. Manages state related to ARIA progressbar attributes
* (role, aria-valuemin, aria-valuemax, aria-valuenow) and field context integration —
* without design props (shape, thickness, color).
*
* @param props - props from this instance of ProgressBar (without shape, thickness, color)
* @param ref - reference to root HTMLElement of ProgressBar
*/ export const useProgressBarBase_unstable = (props, ref)=>{
const field = useFieldContext_unstable();
var _props_max;
const max = clampMax((_props_max = props.max) !== null && _props_max !== void 0 ? _props_max : 1);
const value = clampValue(props.value, max);
const root = slot.always(getIntrinsicElementProps('div', {
// FIXME:
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
ref: ref,
role: 'progressbar',
'aria-valuemin': value !== undefined ? 0 : undefined,
'aria-valuemax': value !== undefined ? max : undefined,
'aria-valuenow': value,
'aria-labelledby': field === null || field === void 0 ? void 0 : field.labelId,
...props
}), {
elementType: 'div'
});
if (field && (field.validationMessageId || field.hintId)) {
// Prepend the field's validation message and/or hint to the user's aria-describedby
root['aria-describedby'] = [
field === null || field === void 0 ? void 0 : field.validationMessageId,
field === null || field === void 0 ? void 0 : field.hintId,
root['aria-describedby']
].filter(Boolean).join(' ');
}
const bar = slot.always(props.bar, {
elementType: 'div'
});
return {
max,
value,
components: {
root: 'div',
bar: 'div',
indeterminateMotion: ProgressBarIndeterminateMotion
},
root,
bar
};
};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,133 @@
'use client';
import { __styles, mergeClasses } from '@griffel/react';
import { tokens } from '@fluentui/react-theme';
export const progressBarClassNames = {
root: 'fui-ProgressBar',
bar: 'fui-ProgressBar__bar'
};
// If the percentComplete is near 0, don't animate it.
// This prevents animations on reset to 0 scenarios.
const ZERO_THRESHOLD = 0.01;
const barThicknessValues = {
medium: '2px',
large: '4px'
};
/**
* Styles for the root slot
*/
const useRootStyles = /*#__PURE__*/__styles({
root: {
mc9l5x: "ftgm304",
De3pzq: "f18f03hv",
a9b677: "fly5x3f",
B68tc82: 0,
Bmxbyg5: 0,
Bpg54ce: "f1a3p1vp",
Bomf52o: "f1skxd4g"
},
rounded: {
Beyfa6y: 0,
Bbmb7ep: 0,
Btl43ni: 0,
B7oj6ja: 0,
Dimara: "ft85np5"
},
square: {
Beyfa6y: 0,
Bbmb7ep: 0,
Btl43ni: 0,
B7oj6ja: 0,
Dimara: "f1fabniw"
},
medium: {
Bqenvij: "f4t8t6x"
},
large: {
Bqenvij: "f6ywr7j"
}
}, {
d: [".ftgm304{display:block;}", ".f18f03hv{background-color:var(--colorNeutralBackground6);}", ".fly5x3f{width:100%;}", [".f1a3p1vp{overflow:hidden;}", {
p: -1
}], [".ft85np5{border-radius:var(--borderRadiusMedium);}", {
p: -1
}], [".f1fabniw{border-radius:var(--borderRadiusNone);}", {
p: -1
}], ".f4t8t6x{height:2px;}", ".f6ywr7j{height:4px;}"],
m: [["@media screen and (forced-colors: active){.f1skxd4g{background-color:CanvasText;}}", {
m: "screen and (forced-colors: active)"
}]]
});
/**
* Styles for the ProgressBar bar
*/
const useBarStyles = /*#__PURE__*/__styles({
base: {
Bomf52o: "f1tnpuu0",
Beyfa6y: 0,
Bbmb7ep: 0,
Btl43ni: 0,
B7oj6ja: 0,
Dimara: "f12b9xdw",
Bqenvij: "f1l02sjl"
},
nonZeroDeterminate: {
Bmy1vo4: "fjt6zfz",
B3o57yi: "f1wofebd",
Bkqvd7p: "fv71qf3"
},
indeterminate: {
B2u0y6b: "fa0wk36",
qhf8xq: "f10pi13n",
Bcmaq0h: ["fpo0yib", "f1u5hf6c"],
jpy9cc: "f3z2g5w"
},
brand: {
De3pzq: "ftywsgz"
},
error: {
De3pzq: "fdl5y0r"
},
warning: {
De3pzq: "f1s438gw"
},
success: {
De3pzq: "flxk52p"
}
}, {
m: [["@media screen and (forced-colors: active){.f1tnpuu0{background-color:Highlight;}}", {
m: "screen and (forced-colors: active)"
}], ["@media screen and (prefers-reduced-motion: reduce){.f3z2g5w{max-width:100%;}}", {
m: "screen and (prefers-reduced-motion: reduce)"
}]],
d: [[".f12b9xdw{border-radius:inherit;}", {
p: -1
}], ".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 );}", ".ftywsgz{background-color:var(--colorCompoundBrandBackground);}", ".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}", ".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}", ".flxk52p{background-color:var(--colorPaletteGreenBackground3);}"]
});
/**
* Apply styling to the ProgressBar slots based on the state
*/
export const useProgressBarStyles_unstable = state => {
'use no memo';
const {
color,
max,
shape,
thickness,
value
} = state;
const rootStyles = useRootStyles();
const barStyles = useBarStyles();
state.root.className = mergeClasses(progressBarClassNames.root, rootStyles.root, rootStyles[shape], rootStyles[thickness], state.root.className);
if (state.bar) {
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);
}
if (state.bar && value !== undefined) {
state.bar.style = {
width: Math.min(100, Math.max(0, value / max * 100)) + '%',
...state.bar.style
};
}
return state;
};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,100 @@
'use client';
import { makeStyles, mergeClasses } from '@griffel/react';
import { tokens } from '@fluentui/react-theme';
export const progressBarClassNames = {
root: 'fui-ProgressBar',
bar: 'fui-ProgressBar__bar'
};
// If the percentComplete is near 0, don't animate it.
// This prevents animations on reset to 0 scenarios.
const ZERO_THRESHOLD = 0.01;
const barThicknessValues = {
medium: '2px',
large: '4px'
};
/**
* Styles for the root slot
*/ const useRootStyles = makeStyles({
root: {
display: 'block',
backgroundColor: tokens.colorNeutralBackground6,
width: '100%',
overflow: 'hidden',
'@media screen and (forced-colors: active)': {
backgroundColor: 'CanvasText'
}
},
rounded: {
borderRadius: tokens.borderRadiusMedium
},
square: {
borderRadius: tokens.borderRadiusNone
},
medium: {
height: barThicknessValues.medium
},
large: {
height: barThicknessValues.large
}
});
/**
* Styles for the ProgressBar bar
*/ const useBarStyles = makeStyles({
base: {
'@media screen and (forced-colors: active)': {
backgroundColor: 'Highlight'
},
borderRadius: 'inherit',
height: '100%'
},
nonZeroDeterminate: {
transitionProperty: 'width',
transitionDuration: '0.3s',
transitionTimingFunction: 'ease'
},
indeterminate: {
maxWidth: '33%',
position: 'relative',
backgroundImage: `linear-gradient(
to right,
${tokens.colorNeutralBackground6} 0%,
${tokens.colorTransparentBackground} 50%,
${tokens.colorNeutralBackground6} 100%
)`,
'@media screen and (prefers-reduced-motion: reduce)': {
// Reduced motion: bar is sized here, and the opacity is pulsed by ProgressBarIndeterminateMotion
maxWidth: '100%'
}
},
brand: {
backgroundColor: tokens.colorCompoundBrandBackground
},
error: {
backgroundColor: tokens.colorPaletteRedBackground3
},
warning: {
backgroundColor: tokens.colorPaletteDarkOrangeBackground3
},
success: {
backgroundColor: tokens.colorPaletteGreenBackground3
}
});
/**
* Apply styling to the ProgressBar slots based on the state
*/ export const useProgressBarStyles_unstable = (state)=>{
'use no memo';
const { color, max, shape, thickness, value } = state;
const rootStyles = useRootStyles();
const barStyles = useBarStyles();
state.root.className = mergeClasses(progressBarClassNames.root, rootStyles.root, rootStyles[shape], rootStyles[thickness], state.root.className);
if (state.bar) {
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);
}
if (state.bar && value !== undefined) {
state.bar.style = {
width: Math.min(100, Math.max(0, value / max * 100)) + '%',
...state.bar.style
};
}
return state;
};

File diff suppressed because one or more lines are too long

1
node_modules/@fluentui/react-progress/lib/index.js generated vendored Normal file
View File

@@ -0,0 +1 @@
export { ProgressBar, progressBarClassNames, renderProgressBar_unstable, useProgressBar_unstable, useProgressBarStyles_unstable, useProgressBarBase_unstable } from './ProgressBar';

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n ProgressBar,\n progressBarClassNames,\n renderProgressBar_unstable,\n useProgressBar_unstable,\n useProgressBarStyles_unstable,\n useProgressBarBase_unstable,\n} from './ProgressBar';\nexport type {\n ProgressBarProps,\n ProgressBarSlots,\n ProgressBarState,\n ProgressBarBaseProps,\n ProgressBarBaseState,\n} from './ProgressBar';\n"],"names":["ProgressBar","progressBarClassNames","renderProgressBar_unstable","useProgressBar_unstable","useProgressBarStyles_unstable","useProgressBarBase_unstable"],"mappings":"AAAA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,uBAAuB,EACvBC,6BAA6B,EAC7BC,2BAA2B,QACtB,gBAAgB"}

View File

@@ -0,0 +1,10 @@
export const clampMax = (max)=>{
const internalMax = max <= 0 ? 1 : max;
if (process.env.NODE_ENV !== 'production') {
if (max <= 0) {
// eslint-disable-next-line no-console
console.error(`The prop 'max' must be greater than 0. Received max: ${max}`);
}
}
return internalMax;
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/utils/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,KAAK;QAC7E;IACF;IACA,OAAOC;AACT,EAAE"}

View File

@@ -0,0 +1,17 @@
export const clampValue = (value, max)=>{
if (value === undefined) {
return value;
}
const internalValue = value < 0 ? 0 : value > max ? max : value;
if (process.env.NODE_ENV !== 'production') {
if (value < 0) {
// eslint-disable-next-line no-console
console.error(`The prop 'value' must be greater than or equal to zero. Received value: ${value}`);
}
if (value > max) {
// eslint-disable-next-line no-console
console.error(`The prop 'value' must be less than or equal to 'max'. Received value: ${value}, max: ${max}`);
}
}
return internalValue;
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/utils/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,OAAO;QAClG;QACA,IAAIA,QAAQC,KAAK;YACf,sCAAsC;YACtCM,QAAQC,KAAK,CAAC,CAAC,sEAAsE,EAAER,MAAM,OAAO,EAAEC,KAAK;QAC7G;IACF;IACA,OAAOE;AACT,EAAE"}

View File

@@ -0,0 +1,2 @@
export { clampMax } from './clampMax';
export { clampValue } from './clampValue';

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/utils/index.ts"],"sourcesContent":["export { clampMax } from './clampMax';\nexport { clampValue } from './clampValue';\n"],"names":["clampMax","clampValue"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,aAAa;AACtC,SAASC,UAAU,QAAQ,eAAe"}

51
node_modules/@fluentui/react-progress/package.json generated vendored Normal file
View File

@@ -0,0 +1,51 @@
{
"name": "@fluentui/react-progress",
"version": "9.5.0",
"description": "Progress component for FluentUI v9",
"main": "lib-commonjs/index.js",
"module": "lib/index.js",
"typings": "./dist/index.d.ts",
"sideEffects": false,
"repository": {
"type": "git",
"url": "https://github.com/microsoft/fluentui"
},
"license": "MIT",
"dependencies": {
"@fluentui/react-motion": "^9.14.0",
"@fluentui/react-field": "^9.5.0",
"@fluentui/react-jsx-runtime": "^9.4.1",
"@fluentui/react-shared-contexts": "^9.26.2",
"@fluentui/react-theme": "^9.2.1",
"@fluentui/react-utilities": "^9.26.2",
"@griffel/react": "^1.5.32",
"@swc/helpers": "^0.5.1"
},
"peerDependencies": {
"@types/react": ">=16.14.0 <20.0.0",
"@types/react-dom": ">=16.9.0 <20.0.0",
"react": ">=16.14.0 <20.0.0",
"react-dom": ">=16.14.0 <20.0.0"
},
"beachball": {
"disallowedChangeTypes": [
"major",
"prerelease"
]
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"node": "./lib-commonjs/index.js",
"import": "./lib/index.js",
"require": "./lib-commonjs/index.js"
},
"./package.json": "./package.json"
},
"files": [
"*.md",
"dist/*.d.ts",
"lib",
"lib-commonjs"
]
}