Initial commit

This commit is contained in:
2025-03-07 19:22:02 +01:00
commit 4a98255d83
55743 changed files with 5280367 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
"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;
},
useProgressBarStyles_unstable: function() {
return _index.useProgressBarStyles_unstable;
},
useProgressBar_unstable: function() {
return _index.useProgressBar_unstable;
}
});
const _index = require("./components/ProgressBar/index");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/ProgressBar.ts"],"sourcesContent":["export type { ProgressBarProps, ProgressBarSlots, ProgressBarState } from './components/ProgressBar/index';\nexport {\n ProgressBar,\n progressBarClassNames,\n renderProgressBar_unstable,\n useProgressBarStyles_unstable,\n useProgressBar_unstable,\n} from './components/ProgressBar/index';\n"],"names":["ProgressBar","progressBarClassNames","renderProgressBar_unstable","useProgressBarStyles_unstable","useProgressBar_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEEA,WAAW;eAAXA,kBAAW;;IACXC,qBAAqB;eAArBA,4BAAqB;;IACrBC,0BAA0B;eAA1BA,iCAA0B;;IAC1BC,6BAA6B;eAA7BA,oCAA6B;;IAC7BC,uBAAuB;eAAvBA,8BAAuB;;;uBAClB"}
@@ -0,0 +1,23 @@
"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';
@@ -0,0 +1 @@
{"version":3,"sources":["../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.styles';\nimport type { ProgressBarProps } from './ProgressBar.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * A ProgressBar bar shows the progression of a task.\n */\nexport const ProgressBar: ForwardRefComponent<ProgressBarProps> = React.forwardRef((props, ref) => {\n const state = useProgressBar_unstable(props, ref);\n\n useProgressBarStyles_unstable(state);\n\n useCustomStyleHook_unstable('useProgressBarStyles_unstable')(state);\n\n return renderProgressBar_unstable(state);\n});\n\nProgressBar.displayName = 'ProgressBar';\n"],"names":["ProgressBar","React","forwardRef","props","ref","state","useProgressBar_unstable","useProgressBarStyles_unstable","useCustomStyleHook_unstable","renderProgressBar_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;gCACiB;mCACG;4CACG;qCAGF;AAKrC,MAAMA,cAAAA,WAAAA,GAAqDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,QAAQC,IAAAA,uCAAAA,EAAwBH,OAAOC;IAE7CG,IAAAA,yDAAAA,EAA8BF;IAE9BG,IAAAA,gDAAAA,EAA4B,iCAAiCH;IAE7D,OAAOI,IAAAA,6CAAAA,EAA2BJ;AACpC;AAEAL,YAAYU,WAAW,GAAG"}
@@ -0,0 +1,6 @@
/**
* State used in rendering ProgressBar
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
{"version":3,"sources":["../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<Required<ProgressBarSlots>> &\n Required<Pick<ProgressBarProps, 'max' | 'shape' | 'thickness'>> &\n Pick<ProgressBarProps, 'value' | 'color'>;\n"],"names":[],"rangeMappings":";;","mappings":"AAgDA;;CAEC"}
@@ -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 _useProgressBarStylesstyles.progressBarClassNames;
},
renderProgressBar_unstable: function() {
return _renderProgressBar.renderProgressBar_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");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/ProgressBar/index.ts"],"sourcesContent":["export { ProgressBar } from './ProgressBar';\nexport type { ProgressBarProps, ProgressBarSlots, ProgressBarState } from './ProgressBar.types';\nexport { renderProgressBar_unstable } from './renderProgressBar';\nexport { useProgressBar_unstable } from './useProgressBar';\nexport { progressBarClassNames, useProgressBarStyles_unstable } from './useProgressBarStyles.styles';\n"],"names":["ProgressBar","progressBarClassNames","renderProgressBar_unstable","useProgressBarStyles_unstable","useProgressBar_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,WAAW;eAAXA,wBAAW;;IAIXC,qBAAqB;eAArBA,iDAAqB;;IAFrBC,0BAA0B;eAA1BA,6CAA0B;;IAEHC,6BAA6B;eAA7BA,yDAA6B;;IADpDC,uBAAuB;eAAvBA,uCAAuB;;;6BAHJ;mCAEe;gCACH;4CAC6B"}
@@ -0,0 +1,18 @@
"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 && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.bar, {})
});
};
@@ -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 { ProgressBarState, ProgressBarSlots } from './ProgressBar.types';\n\n/**\n * Render the final JSX of ProgressBar\n */\nexport const renderProgressBar_unstable = (state: ProgressBarState) => {\n assertSlots<ProgressBarSlots>(state);\n return <state.root>{state.bar && <state.bar />}</state.root>;\n};\n"],"names":["renderProgressBar_unstable","state","assertSlots","_jsx","root","bar"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAE4B;AAMrB,MAAMA,6BAA6B,CAACC;IACzCC,IAAAA,2BAAAA,EAA8BD;IAC9B,OAAA,WAAA,GAAOE,IAAAA,eAAA,EAACF,MAAMG,IAAI,EAAA;kBAAEH,MAAMI,GAAG,IAAA,WAAA,GAAIF,IAAAA,eAAA,EAACF,MAAMI,GAAG,EAAA,CAAA;;AAC7C"}
@@ -0,0 +1,62 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useProgressBar_unstable", {
enumerable: true,
get: 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 _reactutilities = require("@fluentui/react-utilities");
const _index = require("../../utils/index");
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' } = props;
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'
});
const state = {
color,
max,
shape,
thickness,
value,
components: {
root: 'div',
bar: 'div'
},
root,
bar
};
return state;
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/ProgressBar/useProgressBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport { clampValue, clampMax } from '../../utils/index';\nimport type { ProgressBarProps, ProgressBarState } from './ProgressBar.types';\n\n/**\n * Create the state required to render ProgressBar.\n *\n * The returned state can be modified with hooks such as useProgressBarStyles_unstable,\n * before being passed to renderProgressBar_unstable.\n *\n * @param props - props from this instance of ProgressBar\n * @param ref - reference to root HTMLElement of ProgressBar\n */\nexport const useProgressBar_unstable = (props: ProgressBarProps, ref: React.Ref<HTMLElement>): ProgressBarState => {\n const field = useFieldContext_unstable();\n const fieldState = field?.validationState;\n\n const {\n color = fieldState === 'error' || fieldState === 'warning' || fieldState === 'success' ? fieldState : 'brand',\n shape = 'rounded',\n thickness = 'medium',\n } = props;\n const max = clampMax(props.max ?? 1);\n const value = clampValue(props.value, max);\n\n const root = slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n role: 'progressbar',\n 'aria-valuemin': value !== undefined ? 0 : undefined,\n 'aria-valuemax': value !== undefined ? max : undefined,\n 'aria-valuenow': value,\n 'aria-labelledby': field?.labelId,\n ...props,\n }),\n { elementType: 'div' },\n );\n if (field && (field.validationMessageId || field.hintId)) {\n // Prepend the field's validation message and/or hint to the user's aria-describedby\n root['aria-describedby'] = [field?.validationMessageId, field?.hintId, root['aria-describedby']]\n .filter(Boolean)\n .join(' ');\n }\n const bar = slot.always(props.bar, { elementType: 'div' });\n const state: ProgressBarState = {\n color,\n max,\n shape,\n thickness,\n value,\n components: { root: 'div', bar: 'div' },\n root,\n bar,\n };\n\n return state;\n};\n"],"names":["useProgressBar_unstable","props","ref","field","useFieldContext_unstable","fieldState","validationState","color","shape","thickness","max","clampMax","value","clampValue","root","slot","always","getIntrinsicElementProps","role","undefined","labelId","elementType","validationMessageId","hintId","filter","Boolean","join","bar","state","components"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAeaA;;;eAAAA;;;;iEAfU;4BACkB;gCACM;uBACV;AAY9B,MAAMA,0BAA0B,CAACC,OAAyBC;IAC/D,MAAMC,QAAQC,IAAAA,oCAAAA;IACd,MAAMC,aAAaF,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOG,eAAe;IAEzC,MAAM,EACJC,QAAQF,eAAe,WAAWA,eAAe,aAAaA,eAAe,YAAYA,aAAa,OAAO,EAC7GG,QAAQ,SAAS,EACjBC,YAAY,QAAQ,EACrB,GAAGR;QACiBA;IAArB,MAAMS,MAAMC,IAAAA,eAAAA,EAASV,CAAAA,aAAAA,MAAMS,GAAG,AAAHA,MAAG,QAATT,eAAAA,KAAAA,IAAAA,aAAa;IAClC,MAAMW,QAAQC,IAAAA,iBAAAA,EAAWZ,MAAMW,KAAK,EAAEF;IAEtC,MAAMI,OAAOC,oBAAAA,CAAKC,MAAM,CACtBC,IAAAA,wCAAAA,EAAyB,OAAO;QAC9B,SAAS;QACT,4EAA4E;QAC5E,4FAA4F;QAC5Ff,KAAKA;QACLgB,MAAM;QACN,iBAAiBN,UAAUO,YAAY,IAAIA;QAC3C,iBAAiBP,UAAUO,YAAYT,MAAMS;QAC7C,iBAAiBP;QACjB,mBAAmBT,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOiB,OAAO;QACjC,GAAGnB,KAAK;IACV,IACA;QAAEoB,aAAa;IAAM;IAEvB,IAAIlB,SAAUA,CAAAA,MAAMmB,mBAAmB,IAAInB,MAAMoB,MAAM,AAANA,GAAS;QACxD,oFAAoF;QACpFT,IAAI,CAAC,mBAAmB,GAAG;YAACX,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOmB,mBAAmB;YAAEnB,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOoB,MAAM;YAAET,IAAI,CAAC,mBAAmB;SAAC,CAC7FU,MAAM,CAACC,SACPC,IAAI,CAAC;IACV;IACA,MAAMC,MAAMZ,oBAAAA,CAAKC,MAAM,CAACf,MAAM0B,GAAG,EAAE;QAAEN,aAAa;IAAM;IACxD,MAAMO,QAA0B;QAC9BrB;QACAG;QACAF;QACAC;QACAG;QACAiB,YAAY;YAAEf,MAAM;YAAOa,KAAK;QAAM;QACtCb;QACAa;IACF;IAEA,OAAOC;AACT"}
@@ -0,0 +1,219 @@
"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'
};
const indeterminateProgressBar = {
'0%': {
left: '-33%'
},
'100%': {
left: '100%'
}
};
/**
* Styles for the root slot
*/ const useRootStyles = /*#__PURE__*/ (0, _react.__styles)({
root: {
mc9l5x: "ftgm304",
De3pzq: "f18f03hv",
a9b677: "fly5x3f",
B68tc82: 0,
Bmxbyg5: 0,
Bpg54ce: "f1a3p1vp",
Bpep1pd: "fu42dvn"
},
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){.fu42dvn{background-color:CanvasText;}}",
{
m: "screen and (forced-colors: active)"
}
]
]
});
/**
* Styles for the ProgressBar bar
*/ const useBarStyles = /*#__PURE__*/ (0, _react.__styles)({
base: {
Bpep1pd: "f1neahkh",
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"
],
Bv12yb3: [
"fwd2bol",
"f14gig94"
],
vin17d: "f1a27w2r",
Ezkn3b: "f452v7t",
w3vfg9: "f1cpbl36",
Gqtpxc: "f4akx1t",
B3vm3ge: "f18p5put"
},
brand: {
De3pzq: "ftywsgz"
},
error: {
De3pzq: "fdl5y0r"
},
warning: {
De3pzq: "f1s438gw"
},
success: {
De3pzq: "flxk52p"
}
}, {
m: [
[
"@media screen and (forced-colors: active){.f1neahkh{background-color:Highlight;}}",
{
m: "screen and (forced-colors: active)"
}
],
[
"@media screen and (prefers-reduced-motion: reduce){.f4akx1t{animation-duration:0.01ms;}}",
{
m: "screen and (prefers-reduced-motion: reduce)"
}
],
[
"@media screen and (prefers-reduced-motion: reduce){.f18p5put{animation-iteration-count:1;}}",
{
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 );}",
".fwd2bol{animation-name:f1keuaan;}",
".f14gig94{animation-name:f10x8f8u;}",
".f1a27w2r{animation-duration:3s;}",
".f452v7t{animation-timing-function:linear;}",
".f1cpbl36{animation-iteration-count:infinite;}",
".ftywsgz{background-color:var(--colorCompoundBrandBackground);}",
".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}",
".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}",
".flxk52p{background-color:var(--colorPaletteGreenBackground3);}"
],
k: [
"@keyframes f1keuaan{0%{left:-33%;}100%{left:100%;}}",
"@keyframes f10x8f8u{0%{right:-33%;}100%{right:100%;}}"
]
});
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
+28
View File
@@ -0,0 +1,28 @@
"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;
},
useProgressBarStyles_unstable: function() {
return _ProgressBar.useProgressBarStyles_unstable;
},
useProgressBar_unstable: function() {
return _ProgressBar.useProgressBar_unstable;
}
});
const _ProgressBar = require("./ProgressBar");
+1
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} from './ProgressBar';\nexport type { ProgressBarProps, ProgressBarSlots, ProgressBarState } from './ProgressBar';\n"],"names":["ProgressBar","progressBarClassNames","renderProgressBar_unstable","useProgressBarStyles_unstable","useProgressBar_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACEA,WAAW;eAAXA,wBAAW;;IACXC,qBAAqB;eAArBA,kCAAqB;;IACrBC,0BAA0B;eAA1BA,uCAA0B;;IAE1BC,6BAA6B;eAA7BA,0CAA6B;;IAD7BC,uBAAuB;eAAvBA,oCAAuB;;;6BAElB"}
+20
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;
};
@@ -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"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAAaA;;;eAAAA;;;AAAN,MAAMA,WAAW,CAACC;IACvB,MAAMC,cAAcD,OAAO,IAAI,IAAIA;IAEnC,IAAIE,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,IAAIJ,OAAO,GAAG;YACZ,sCAAsC;YACtCK,QAAQC,KAAK,CAAC,CAAC,qDAAqD,EAAEN,IAAI,CAAC;QAC7E;IACF;IACA,OAAOC;AACT"}
+27
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;
};
@@ -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"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAAaA;;;eAAAA;;;AAAN,MAAMA,aAAa,CAACC,OAA2BC;IACpD,IAAID,UAAUE,WAAW;QACvB,OAAOF;IACT;IACA,MAAMG,gBAAgBH,QAAQ,IAAI,IAAIA,QAAQC,MAAMA,MAAMD;IAE1D,IAAII,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,IAAIN,QAAQ,GAAG;YACb,sCAAsC;YACtCO,QAAQC,KAAK,CAAC,CAAC,wEAAwE,EAAER,MAAM,CAAC;QAClG;QACA,IAAIA,QAAQC,KAAK;YACf,sCAAsC;YACtCM,QAAQC,KAAK,CAAC,CAAC,sEAAsE,EAAER,MAAM,OAAO,EAAEC,IAAI,CAAC;QAC7G;IACF;IACA,OAAOE;AACT"}
+20
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");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/utils/index.ts"],"sourcesContent":["export { clampMax } from './clampMax';\nexport { clampValue } from './clampValue';\n"],"names":["clampMax","clampValue"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,QAAQ;eAARA,kBAAQ;;IACRC,UAAU;eAAVA,sBAAU;;;0BADM;4BACE"}