@fluentui/react-progress 0.0.0-nightly-20230317-1454.1 → 0.0.0-nightly-20230321-0440.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +13 -13
- package/CHANGELOG.md +9 -9
- package/lib/ProgressBar.js +1 -1
- package/lib/ProgressBar.js.map +1 -1
- package/lib/ProgressField.js +1 -1
- package/lib/ProgressField.js.map +1 -1
- package/lib/components/ProgressBar/ProgressBar.js +6 -6
- package/lib/components/ProgressBar/ProgressBar.js.map +1 -1
- package/lib/components/ProgressBar/ProgressBar.types.js.map +1 -1
- package/lib/components/ProgressBar/index.js +5 -5
- package/lib/components/ProgressBar/index.js.map +1 -1
- package/lib/components/ProgressBar/renderProgressBar.js +7 -3
- package/lib/components/ProgressBar/renderProgressBar.js.map +1 -1
- package/lib/components/ProgressBar/useProgressBar.js +14 -14
- package/lib/components/ProgressBar/useProgressBar.js.map +1 -1
- package/lib/components/ProgressBar/useProgressBarStyles.js +12 -11
- package/lib/components/ProgressBar/useProgressBarStyles.js.map +1 -1
- package/lib/components/ProgressField/ProgressField.js +4 -3
- package/lib/components/ProgressField/ProgressField.js.map +1 -1
- package/lib/components/ProgressField/index.js +1 -1
- package/lib/components/ProgressField/index.js.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/utils/clampMax.js +1 -1
- package/lib/utils/clampMax.js.map +1 -1
- package/lib/utils/clampValue.js +1 -1
- package/lib/utils/clampValue.js.map +1 -1
- package/lib/utils/index.js +2 -2
- package/lib/utils/index.js.map +1 -1
- package/lib-commonjs/ProgressBar.js +4 -5
- package/lib-commonjs/ProgressBar.js.map +1 -1
- package/lib-commonjs/ProgressField.js +4 -5
- package/lib-commonjs/ProgressField.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/ProgressBar.js +20 -19
- package/lib-commonjs/components/ProgressBar/ProgressBar.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/ProgressBar.types.js +2 -3
- package/lib-commonjs/components/ProgressBar/ProgressBar.types.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/index.js +8 -9
- package/lib-commonjs/components/ProgressBar/index.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/renderProgressBar.js +20 -13
- package/lib-commonjs/components/ProgressBar/renderProgressBar.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/useProgressBar.js +51 -41
- package/lib-commonjs/components/ProgressBar/useProgressBar.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js +122 -220
- package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js.map +1 -1
- package/lib-commonjs/components/ProgressField/ProgressField.js +19 -25
- package/lib-commonjs/components/ProgressField/ProgressField.js.map +1 -1
- package/lib-commonjs/components/ProgressField/index.js +4 -5
- package/lib-commonjs/components/ProgressField/index.js.map +1 -1
- package/lib-commonjs/index.js +49 -21
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/clampMax.js +13 -15
- package/lib-commonjs/utils/clampMax.js.map +1 -1
- package/lib-commonjs/utils/clampValue.js +19 -21
- package/lib-commonjs/utils/clampValue.js.map +1 -1
- package/lib-commonjs/utils/index.js +5 -6
- package/lib-commonjs/utils/index.js.map +1 -1
- package/package.json +9 -8
- package/.swcrc +0 -39
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"names":["React","require","useProgressBar_1","renderProgressBar_1","useProgressBarStyles_1","react_shared_contexts_1","exports","ProgressBar","forwardRef","props","ref","state","useProgressBar_unstable","useProgressBarStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderProgressBar_unstable","displayName"],"sources":["../../../../../../../../../packages/react-components/react-progress/src/components/ProgressBar/ProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useProgressBar_unstable } from './useProgressBar';\nimport { renderProgressBar_unstable } from './renderProgressBar';\nimport { useProgressBarStyles_unstable } from './useProgressBarStyles';\nimport type { ProgressBarProps } from './ProgressBar.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_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 const { useProgressBarStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderProgressBar_unstable(state);\n});\n\nProgressBar.displayName = 'ProgressBar';\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,gBAAA,gBAAAD,OAAA;AACA,MAAAE,mBAAA,gBAAAF,OAAA;AACA,MAAAG,sBAAA,gBAAAH,OAAA;AAGA,MAAAI,uBAAA,gBAAAJ,OAAA;AAEA;;;AAGaK,OAAA,CAAAC,WAAW,gBAA0CP,KAAK,CAACQ,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAChG,MAAMC,KAAK,GAAGT,gBAAA,CAAAU,uBAAuB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAEjDN,sBAAA,CAAAS,6BAA6B,CAACF,KAAK,CAAC;EAEpC,MAAM;IAAEE,6BAA6B,EAAEC;EAAe,CAAE,GAAGT,uBAAA,CAAAU,4BAA4B,EAAE;EACzFD,eAAe,CAACH,KAAK,CAAC;EAEtB,OAAOR,mBAAA,CAAAa,0BAA0B,CAACL,KAAK,CAAC;AAC1C,CAAC,CAAC;AAEFL,OAAA,CAAAC,WAAW,CAACU,WAAW,GAAG,aAAa"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"names":[],"sources":["../../../../../../../../../packages/react-components/react-progress/src/components/ProgressBar/ProgressBar.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type ProgressBarSlots = {\n /**\n * The track behind the ProgressBar bar\n */\n root: NonNullable<Slot<'div'>>;\n /**\n * The filled portion of the ProgressBar bar. Animated in the indeterminate state, when no value is provided.\n */\n bar?: NonNullable<Slot<'div'>>;\n};\n\n/**\n * ProgressBar Props\n */\nexport type ProgressBarProps = Omit<ComponentProps<ProgressBarSlots>, 'size'> & {\n /**\n * The shape of the bar and track.\n * @default rounded\n */\n shape?: 'rounded' | 'square';\n /**\n * A decimal number between `0` and `1` (or between `0` and `max` if given),\n * which specifies how much of the task has been completed.\n *\n * If `undefined` (default), the ProgressBar will display an **indeterminate** state.\n */\n value?: number;\n /**\n * The maximum value, which indicates the task is complete.\n * The ProgressBar bar will be full when `value` equals `max`.\n * @default 1\n */\n max?: number;\n /**\n * The thickness of the ProgressBar bar\n * @default medium\n */\n thickness?: 'medium' | 'large';\n\n /**\n * The status of the ProgressBar bar. Changes the color of the bar.\n * @default brand\n */\n color?: 'brand' | 'success' | 'warning' | 'error';\n};\n\n/**\n * State used in rendering ProgressBar\n */\nexport type ProgressBarState = ComponentState<ProgressBarSlots> &\n Required<Pick<ProgressBarProps, 'max' | 'shape' | 'thickness'>> &\n Pick<ProgressBarProps, 'value' | 'color'>;\n"],"mappings":""}
|
@@ -1,13 +1,12 @@
|
|
1
1
|
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
+
value: true
|
4
5
|
});
|
5
|
-
const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
//# sourceMappingURL=index.js.map
|
12
|
-
|
6
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
7
|
+
tslib_1.__exportStar(require("./ProgressBar"), exports);
|
8
|
+
tslib_1.__exportStar(require("./ProgressBar.types"), exports);
|
9
|
+
tslib_1.__exportStar(require("./renderProgressBar"), exports);
|
10
|
+
tslib_1.__exportStar(require("./useProgressBar"), exports);
|
11
|
+
tslib_1.__exportStar(require("./useProgressBarStyles"), exports);
|
13
12
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../../../../../../../../../packages/react-components/react-progress/src/components/ProgressBar/index.ts"],"sourcesContent":["export * from './ProgressBar';\nexport * from './ProgressBar.types';\nexport * from './renderProgressBar';\nexport * from './useProgressBar';\nexport * from './useProgressBarStyles';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,mBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,yBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,yBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,sBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,4BAAAC,OAAA"}
|
@@ -1,17 +1,24 @@
|
|
1
1
|
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
-
});
|
5
|
-
Object.defineProperty(exports, "renderProgressBar_unstable", {
|
6
|
-
enumerable: true,
|
7
|
-
get: ()=>renderProgressBar_unstable
|
4
|
+
value: true
|
8
5
|
});
|
9
|
-
|
10
|
-
const
|
11
|
-
const
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
6
|
+
exports.renderProgressBar_unstable = void 0;
|
7
|
+
const React = /*#__PURE__*/require("react");
|
8
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
9
|
+
/**
|
10
|
+
* Render the final JSX of ProgressBar
|
11
|
+
*/
|
12
|
+
const renderProgressBar_unstable = state => {
|
13
|
+
const {
|
14
|
+
slots,
|
15
|
+
slotProps
|
16
|
+
} = react_utilities_1.getSlots(state);
|
17
|
+
return React.createElement(slots.root, {
|
18
|
+
...slotProps.root
|
19
|
+
}, slots.bar && React.createElement(slots.bar, {
|
20
|
+
...slotProps.bar
|
21
|
+
}));
|
22
|
+
};
|
23
|
+
exports.renderProgressBar_unstable = renderProgressBar_unstable;
|
17
24
|
//# sourceMappingURL=renderProgressBar.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"names":["React","require","react_utilities_1","renderProgressBar_unstable","state","slots","slotProps","getSlots","createElement","root","bar","exports"],"sources":["../../../../../../../../../packages/react-components/react-progress/src/components/ProgressBar/renderProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { ProgressBarState, ProgressBarSlots } from './ProgressBar.types';\n\n/**\n * Render the final JSX of ProgressBar\n */\nexport const renderProgressBar_unstable = (state: ProgressBarState) => {\n const { slots, slotProps } = getSlots<ProgressBarSlots>(state);\n return <slots.root {...slotProps.root}>{slots.bar && <slots.bar {...slotProps.bar} />}</slots.root>;\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AAGA;;;AAGO,MAAME,0BAA0B,GAAIC,KAAuB,IAAI;EACpE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,iBAAA,CAAAK,QAAQ,CAAmBH,KAAK,CAAC;EAC9D,OAAOJ,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,GAAGJ,KAAK,CAACK,GAAG,IAAIV,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACK,GAAG;IAAA,GAAKJ,SAAS,CAACI;EAAG,EAAI,CAAc;AACrG,CAAC;AAHYC,OAAA,CAAAR,0BAA0B,GAAAA,0BAAA"}
|
@@ -1,45 +1,55 @@
|
|
1
1
|
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
-
});
|
5
|
-
Object.defineProperty(exports, "useProgressBar_unstable", {
|
6
|
-
enumerable: true,
|
7
|
-
get: ()=>useProgressBar_unstable
|
4
|
+
value: true
|
8
5
|
});
|
9
|
-
|
10
|
-
const
|
11
|
-
const
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
6
|
+
exports.useProgressBar_unstable = void 0;
|
7
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
8
|
+
const index_1 = /*#__PURE__*/require("../../utils/index");
|
9
|
+
/**
|
10
|
+
* Create the state required to render ProgressBar.
|
11
|
+
*
|
12
|
+
* The returned state can be modified with hooks such as useProgressBarStyles_unstable,
|
13
|
+
* before being passed to renderProgressBar_unstable.
|
14
|
+
*
|
15
|
+
* @param props - props from this instance of ProgressBar
|
16
|
+
* @param ref - reference to root HTMLElement of ProgressBar
|
17
|
+
*/
|
18
|
+
const useProgressBar_unstable = (props, ref) => {
|
19
|
+
var _a;
|
20
|
+
// Props
|
21
|
+
const {
|
22
|
+
color = 'brand',
|
23
|
+
shape = 'rounded',
|
24
|
+
thickness = 'medium'
|
25
|
+
} = props;
|
26
|
+
const max = index_1.clampMax((_a = props.max) !== null && _a !== void 0 ? _a : 1);
|
27
|
+
const value = index_1.clampValue(props.value, max);
|
28
|
+
const root = react_utilities_1.getNativeElementProps('div', {
|
29
|
+
ref,
|
30
|
+
role: 'progressbar',
|
31
|
+
'aria-valuemin': value !== undefined ? 0 : undefined,
|
32
|
+
'aria-valuemax': value !== undefined ? max : undefined,
|
33
|
+
'aria-valuenow': value,
|
34
|
+
...props
|
35
|
+
});
|
36
|
+
const bar = react_utilities_1.resolveShorthand(props.bar, {
|
37
|
+
required: true
|
38
|
+
});
|
39
|
+
const state = {
|
40
|
+
color,
|
41
|
+
max,
|
42
|
+
shape,
|
43
|
+
thickness,
|
44
|
+
value,
|
45
|
+
components: {
|
46
|
+
root: 'div',
|
47
|
+
bar: 'div'
|
48
|
+
},
|
49
|
+
root,
|
50
|
+
bar
|
51
|
+
};
|
52
|
+
return state;
|
53
|
+
};
|
54
|
+
exports.useProgressBar_unstable = useProgressBar_unstable;
|
45
55
|
//# sourceMappingURL=useProgressBar.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"names":["react_utilities_1","require","index_1","useProgressBar_unstable","props","ref","color","shape","thickness","max","clampMax","_a","value","clampValue","root","getNativeElementProps","role","undefined","bar","resolveShorthand","required","state","components","exports"],"sources":["../../../../../../../../../packages/react-components/react-progress/src/components/ProgressBar/useProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport { 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 // Props\n const { color = 'brand', shape = 'rounded', thickness = 'medium' } = props;\n const max = clampMax(props.max ?? 1);\n const value = clampValue(props.value, max);\n\n const root = getNativeElementProps('div', {\n ref,\n role: 'progressbar',\n 'aria-valuemin': value !== undefined ? 0 : undefined,\n 'aria-valuemax': value !== undefined ? max : undefined,\n 'aria-valuenow': value,\n ...props,\n });\n\n const bar = resolveShorthand(props.bar, {\n required: true,\n });\n\n const state: ProgressBarState = {\n color,\n max,\n shape,\n thickness,\n value,\n components: {\n root: 'div',\n bar: 'div',\n },\n root,\n bar,\n };\n\n return state;\n};\n"],"mappings":";;;;;;AACA,MAAAA,iBAAA,gBAAAC,OAAA;AACA,MAAAC,OAAA,gBAAAD,OAAA;AAGA;;;;;;;;;AASO,MAAME,uBAAuB,GAAGA,CAACC,KAAuB,EAAEC,GAA2B,KAAsB;;EAChH;EACA,MAAM;IAAEC,KAAK,GAAG,OAAO;IAAEC,KAAK,GAAG,SAAS;IAAEC,SAAS,GAAG;EAAQ,CAAE,GAAGJ,KAAK;EAC1E,MAAMK,GAAG,GAAGP,OAAA,CAAAQ,QAAQ,CAAC,CAAAC,EAAA,GAAAP,KAAK,CAACK,GAAG,cAAAE,EAAA,cAAAA,EAAA,GAAI,CAAC,CAAC;EACpC,MAAMC,KAAK,GAAGV,OAAA,CAAAW,UAAU,CAACT,KAAK,CAACQ,KAAK,EAAEH,GAAG,CAAC;EAE1C,MAAMK,IAAI,GAAGd,iBAAA,CAAAe,qBAAqB,CAAC,KAAK,EAAE;IACxCV,GAAG;IACHW,IAAI,EAAE,aAAa;IACnB,eAAe,EAAEJ,KAAK,KAAKK,SAAS,GAAG,CAAC,GAAGA,SAAS;IACpD,eAAe,EAAEL,KAAK,KAAKK,SAAS,GAAGR,GAAG,GAAGQ,SAAS;IACtD,eAAe,EAAEL,KAAK;IACtB,GAAGR;GACJ,CAAC;EAEF,MAAMc,GAAG,GAAGlB,iBAAA,CAAAmB,gBAAgB,CAACf,KAAK,CAACc,GAAG,EAAE;IACtCE,QAAQ,EAAE;GACX,CAAC;EAEF,MAAMC,KAAK,GAAqB;IAC9Bf,KAAK;IACLG,GAAG;IACHF,KAAK;IACLC,SAAS;IACTI,KAAK;IACLU,UAAU,EAAE;MACVR,IAAI,EAAE,KAAK;MACXI,GAAG,EAAE;KACN;IACDJ,IAAI;IACJI;GACD;EAED,OAAOG,KAAK;AACd,CAAC;AAlCYE,OAAA,CAAApB,uBAAuB,GAAAA,uBAAA"}
|
@@ -1,240 +1,142 @@
|
|
1
1
|
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
-
});
|
5
|
-
function _export(target, all) {
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
7
|
-
enumerable: true,
|
8
|
-
get: all[name]
|
9
|
-
});
|
10
|
-
}
|
11
|
-
_export(exports, {
|
12
|
-
progressBarClassNames: ()=>progressBarClassNames,
|
13
|
-
useProgressBarStyles_unstable: ()=>useProgressBarStyles_unstable
|
4
|
+
value: true
|
14
5
|
});
|
15
|
-
|
16
|
-
const
|
17
|
-
|
18
|
-
|
6
|
+
exports.useProgressBarStyles_unstable = exports.progressBarClassNames = void 0;
|
7
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
8
|
+
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
|
9
|
+
exports.progressBarClassNames = {
|
10
|
+
root: 'fui-ProgressBar',
|
11
|
+
bar: 'fui-ProgressBar__bar'
|
19
12
|
};
|
20
13
|
// If the percentComplete is near 0, don't animate it.
|
21
14
|
// This prevents animations on reset to 0 scenarios.
|
22
15
|
const ZERO_THRESHOLD = 0.01;
|
23
16
|
const barThicknessValues = {
|
24
|
-
|
25
|
-
|
17
|
+
medium: '2px',
|
18
|
+
large: '4px'
|
26
19
|
};
|
27
20
|
const indeterminateProgressBar = {
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
21
|
+
'0%': {
|
22
|
+
left: '-33%' // matches indeterminate bar width
|
23
|
+
},
|
24
|
+
|
25
|
+
'100%': {
|
26
|
+
left: '100%'
|
27
|
+
}
|
34
28
|
};
|
35
29
|
/**
|
36
30
|
* Styles for the root slot
|
37
|
-
*/
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
Bbmb7ep: [
|
66
|
-
"fzi6hpg",
|
67
|
-
"fyowgf4"
|
68
|
-
],
|
69
|
-
Beyfa6y: [
|
70
|
-
"fyowgf4",
|
71
|
-
"fzi6hpg"
|
72
|
-
],
|
73
|
-
B7oj6ja: [
|
74
|
-
"f3fg2lr",
|
75
|
-
"f13av6d4"
|
76
|
-
],
|
77
|
-
Btl43ni: [
|
78
|
-
"f13av6d4",
|
79
|
-
"f3fg2lr"
|
80
|
-
]
|
81
|
-
},
|
82
|
-
medium: {
|
83
|
-
Bqenvij: "f4t8t6x"
|
84
|
-
},
|
85
|
-
large: {
|
86
|
-
Bqenvij: "f6ywr7j"
|
87
|
-
}
|
31
|
+
*/
|
32
|
+
const useRootStyles = /*#__PURE__*/react_1.__styles({
|
33
|
+
root: {
|
34
|
+
mc9l5x: "ftgm304",
|
35
|
+
De3pzq: "f18f03hv",
|
36
|
+
a9b677: "fly5x3f",
|
37
|
+
B68tc82: "f1p9o1ba",
|
38
|
+
Bmxbyg5: "f1sil6mw",
|
39
|
+
Bpep1pd: "fu42dvn"
|
40
|
+
},
|
41
|
+
rounded: {
|
42
|
+
Bbmb7ep: ["f1aa9q02", "f16jpd5f"],
|
43
|
+
Beyfa6y: ["f16jpd5f", "f1aa9q02"],
|
44
|
+
B7oj6ja: ["f1jar5jt", "fyu767a"],
|
45
|
+
Btl43ni: ["fyu767a", "f1jar5jt"]
|
46
|
+
},
|
47
|
+
square: {
|
48
|
+
Bbmb7ep: ["fzi6hpg", "fyowgf4"],
|
49
|
+
Beyfa6y: ["fyowgf4", "fzi6hpg"],
|
50
|
+
B7oj6ja: ["f3fg2lr", "f13av6d4"],
|
51
|
+
Btl43ni: ["f13av6d4", "f3fg2lr"]
|
52
|
+
},
|
53
|
+
medium: {
|
54
|
+
Bqenvij: "f4t8t6x"
|
55
|
+
},
|
56
|
+
large: {
|
57
|
+
Bqenvij: "f6ywr7j"
|
58
|
+
}
|
88
59
|
}, {
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
".f1p9o1ba{overflow-x:hidden;}",
|
94
|
-
".f1sil6mw{overflow-y:hidden;}",
|
95
|
-
".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}",
|
96
|
-
".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}",
|
97
|
-
".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}",
|
98
|
-
".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}",
|
99
|
-
".fzi6hpg{border-bottom-right-radius:var(--borderRadiusNone);}",
|
100
|
-
".fyowgf4{border-bottom-left-radius:var(--borderRadiusNone);}",
|
101
|
-
".f3fg2lr{border-top-right-radius:var(--borderRadiusNone);}",
|
102
|
-
".f13av6d4{border-top-left-radius:var(--borderRadiusNone);}",
|
103
|
-
".f4t8t6x{height:2px;}",
|
104
|
-
".f6ywr7j{height:4px;}"
|
105
|
-
],
|
106
|
-
m: [
|
107
|
-
[
|
108
|
-
"@media screen and (forced-colors: active){.fu42dvn{background-color:CanvasText;}}",
|
109
|
-
{
|
110
|
-
m: "screen and (forced-colors: active)"
|
111
|
-
}
|
112
|
-
]
|
113
|
-
]
|
60
|
+
d: [".ftgm304{display:block;}", ".f18f03hv{background-color:var(--colorNeutralBackground6);}", ".fly5x3f{width:100%;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".fzi6hpg{border-bottom-right-radius:var(--borderRadiusNone);}", ".fyowgf4{border-bottom-left-radius:var(--borderRadiusNone);}", ".f3fg2lr{border-top-right-radius:var(--borderRadiusNone);}", ".f13av6d4{border-top-left-radius:var(--borderRadiusNone);}", ".f4t8t6x{height:2px;}", ".f6ywr7j{height:4px;}"],
|
61
|
+
m: [["@media screen and (forced-colors: active){.fu42dvn{background-color:CanvasText;}}", {
|
62
|
+
m: "screen and (forced-colors: active)"
|
63
|
+
}]]
|
114
64
|
});
|
115
65
|
/**
|
116
66
|
* Styles for the ProgressBar bar
|
117
|
-
*/
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
Ezkn3b: "f452v7t",
|
156
|
-
w3vfg9: "f1cpbl36",
|
157
|
-
Gqtpxc: "f4akx1t",
|
158
|
-
B3vm3ge: "f18p5put"
|
159
|
-
},
|
160
|
-
brand: {
|
161
|
-
De3pzq: "ftywsgz"
|
162
|
-
},
|
163
|
-
error: {
|
164
|
-
De3pzq: "fdl5y0r"
|
165
|
-
},
|
166
|
-
warning: {
|
167
|
-
De3pzq: "f1s438gw"
|
168
|
-
},
|
169
|
-
success: {
|
170
|
-
De3pzq: "flxk52p"
|
171
|
-
}
|
67
|
+
*/
|
68
|
+
const useBarStyles = /*#__PURE__*/react_1.__styles({
|
69
|
+
base: {
|
70
|
+
Bpep1pd: "f1neahkh",
|
71
|
+
Bbmb7ep: ["f1d9uwra", "fzibvwi"],
|
72
|
+
Beyfa6y: ["fzibvwi", "f1d9uwra"],
|
73
|
+
B7oj6ja: ["fuoumxm", "f1vtqnvc"],
|
74
|
+
Btl43ni: ["f1vtqnvc", "fuoumxm"],
|
75
|
+
Bqenvij: "f1l02sjl"
|
76
|
+
},
|
77
|
+
nonZeroDeterminate: {
|
78
|
+
Bmy1vo4: "fjt6zfz",
|
79
|
+
B3o57yi: "f1wofebd",
|
80
|
+
Bkqvd7p: "fv71qf3"
|
81
|
+
},
|
82
|
+
indeterminate: {
|
83
|
+
B2u0y6b: "fa0wk36",
|
84
|
+
qhf8xq: "f10pi13n",
|
85
|
+
Bcmaq0h: ["fpo0yib", "f1u5hf6c"],
|
86
|
+
Bv12yb3: ["fwd2bol", "f14gig94"],
|
87
|
+
vin17d: "f1a27w2r",
|
88
|
+
Ezkn3b: "f452v7t",
|
89
|
+
w3vfg9: "f1cpbl36",
|
90
|
+
Gqtpxc: "f4akx1t",
|
91
|
+
B3vm3ge: "f18p5put"
|
92
|
+
},
|
93
|
+
brand: {
|
94
|
+
De3pzq: "ftywsgz"
|
95
|
+
},
|
96
|
+
error: {
|
97
|
+
De3pzq: "fdl5y0r"
|
98
|
+
},
|
99
|
+
warning: {
|
100
|
+
De3pzq: "f1s438gw"
|
101
|
+
},
|
102
|
+
success: {
|
103
|
+
De3pzq: "flxk52p"
|
104
|
+
}
|
172
105
|
}, {
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
{
|
183
|
-
m: "screen and (prefers-reduced-motion: reduce)"
|
184
|
-
}
|
185
|
-
],
|
186
|
-
[
|
187
|
-
"@media screen and (prefers-reduced-motion: reduce){.f18p5put{-webkit-animation-iteration-count:1;animation-iteration-count:1;}}",
|
188
|
-
{
|
189
|
-
m: "screen and (prefers-reduced-motion: reduce)"
|
190
|
-
}
|
191
|
-
]
|
192
|
-
],
|
193
|
-
d: [
|
194
|
-
".f1d9uwra{border-bottom-right-radius:inherit;}",
|
195
|
-
".fzibvwi{border-bottom-left-radius:inherit;}",
|
196
|
-
".fuoumxm{border-top-right-radius:inherit;}",
|
197
|
-
".f1vtqnvc{border-top-left-radius:inherit;}",
|
198
|
-
".f1l02sjl{height:100%;}",
|
199
|
-
".fjt6zfz{transition-property:width;}",
|
200
|
-
".f1wofebd{transition-duration:0.3s;}",
|
201
|
-
".fv71qf3{transition-timing-function:ease;}",
|
202
|
-
".fa0wk36{max-width:33%;}",
|
203
|
-
".f10pi13n{position:relative;}",
|
204
|
-
".fpo0yib{background-image:linear-gradient(\n to right,\n var(--colorNeutralBackground6) 0%,\n var(--colorTransparentBackground) 50%,\n var(--colorNeutralBackground6) 100%\n );}",
|
205
|
-
".f1u5hf6c{background-image:linear-gradient(\n to left,\n var(--colorNeutralBackground6) 0%,\n var(--colorTransparentBackground) 50%,\n var(--colorNeutralBackground6) 100%\n );}",
|
206
|
-
".fwd2bol{-webkit-animation-name:f1keuaan;animation-name:f1keuaan;}",
|
207
|
-
".f14gig94{-webkit-animation-name:f10x8f8u;animation-name:f10x8f8u;}",
|
208
|
-
".f1a27w2r{-webkit-animation-duration:3s;animation-duration:3s;}",
|
209
|
-
".f452v7t{-webkit-animation-timing-function:linear;animation-timing-function:linear;}",
|
210
|
-
".f1cpbl36{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;}",
|
211
|
-
".ftywsgz{background-color:var(--colorCompoundBrandBackground);}",
|
212
|
-
".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}",
|
213
|
-
".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}",
|
214
|
-
".flxk52p{background-color:var(--colorPaletteGreenBackground3);}"
|
215
|
-
],
|
216
|
-
k: [
|
217
|
-
"@-webkit-keyframes f1keuaan{0%{left:-33%;}100%{left:100%;}}",
|
218
|
-
"@-webkit-keyframes f10x8f8u{0%{right:-33%;}100%{right:100%;}}",
|
219
|
-
"@keyframes f1keuaan{0%{left:-33%;}100%{left:100%;}}",
|
220
|
-
"@keyframes f10x8f8u{0%{right:-33%;}100%{right:100%;}}"
|
221
|
-
]
|
106
|
+
m: [["@media screen and (forced-colors: active){.f1neahkh{background-color:Highlight;}}", {
|
107
|
+
m: "screen and (forced-colors: active)"
|
108
|
+
}], ["@media screen and (prefers-reduced-motion: reduce){.f4akx1t{-webkit-animation-duration:0.01ms;animation-duration:0.01ms;}}", {
|
109
|
+
m: "screen and (prefers-reduced-motion: reduce)"
|
110
|
+
}], ["@media screen and (prefers-reduced-motion: reduce){.f18p5put{-webkit-animation-iteration-count:1;animation-iteration-count:1;}}", {
|
111
|
+
m: "screen and (prefers-reduced-motion: reduce)"
|
112
|
+
}]],
|
113
|
+
d: [".f1d9uwra{border-bottom-right-radius:inherit;}", ".fzibvwi{border-bottom-left-radius:inherit;}", ".fuoumxm{border-top-right-radius:inherit;}", ".f1vtqnvc{border-top-left-radius:inherit;}", ".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{-webkit-animation-name:f1keuaan;animation-name:f1keuaan;}", ".f14gig94{-webkit-animation-name:f10x8f8u;animation-name:f10x8f8u;}", ".f1a27w2r{-webkit-animation-duration:3s;animation-duration:3s;}", ".f452v7t{-webkit-animation-timing-function:linear;animation-timing-function:linear;}", ".f1cpbl36{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;}", ".ftywsgz{background-color:var(--colorCompoundBrandBackground);}", ".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}", ".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}", ".flxk52p{background-color:var(--colorPaletteGreenBackground3);}"],
|
114
|
+
k: ["@-webkit-keyframes f1keuaan{0%{left:-33%;}100%{left:100%;}}", "@-webkit-keyframes f10x8f8u{0%{right:-33%;}100%{right:100%;}}", "@keyframes f1keuaan{0%{left:-33%;}100%{left:100%;}}", "@keyframes f10x8f8u{0%{right:-33%;}100%{right:100%;}}"]
|
222
115
|
});
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
116
|
+
/**
|
117
|
+
* Apply styling to the ProgressBar slots based on the state
|
118
|
+
*/
|
119
|
+
const useProgressBarStyles_unstable = state => {
|
120
|
+
const {
|
121
|
+
color,
|
122
|
+
max,
|
123
|
+
shape,
|
124
|
+
thickness,
|
125
|
+
value
|
126
|
+
} = state;
|
127
|
+
const rootStyles = useRootStyles();
|
128
|
+
const barStyles = useBarStyles();
|
129
|
+
state.root.className = react_1.mergeClasses(exports.progressBarClassNames.root, rootStyles.root, rootStyles[shape], rootStyles[thickness], state.root.className);
|
130
|
+
if (state.bar) {
|
131
|
+
state.bar.className = react_1.mergeClasses(exports.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);
|
132
|
+
}
|
133
|
+
if (state.bar && value !== undefined) {
|
134
|
+
state.bar.style = {
|
135
|
+
width: Math.min(100, Math.max(0, value / max * 100)) + '%',
|
136
|
+
...state.bar.style
|
137
|
+
};
|
138
|
+
}
|
139
|
+
return state;
|
140
|
+
};
|
141
|
+
exports.useProgressBarStyles_unstable = useProgressBarStyles_unstable;
|
240
142
|
//# sourceMappingURL=useProgressBarStyles.js.map
|