@react-spectrum/progress 3.7.5 → 3.7.7
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/dist/ProgressBar.main.js +54 -0
- package/dist/ProgressBar.main.js.map +1 -0
- package/dist/ProgressBar.mjs +49 -0
- package/dist/ProgressBar.module.js +49 -0
- package/dist/ProgressBar.module.js.map +1 -0
- package/dist/ProgressBarBase.main.js +74 -0
- package/dist/ProgressBarBase.main.js.map +1 -0
- package/dist/ProgressBarBase.mjs +69 -0
- package/dist/ProgressBarBase.module.js +69 -0
- package/dist/ProgressBarBase.module.js.map +1 -0
- package/dist/ProgressCircle.main.js +98 -0
- package/dist/ProgressCircle.main.js.map +1 -0
- package/dist/ProgressCircle.mjs +93 -0
- package/dist/ProgressCircle.module.js +93 -0
- package/dist/ProgressCircle.module.js.map +1 -0
- package/dist/barloader_vars_css.main.js +73 -0
- package/dist/barloader_vars_css.main.js.map +1 -0
- package/dist/barloader_vars_css.mjs +75 -0
- package/dist/barloader_vars_css.module.js +75 -0
- package/dist/barloader_vars_css.module.js.map +1 -0
- package/dist/circleloader_vars_css.main.js +80 -0
- package/dist/circleloader_vars_css.main.js.map +1 -0
- package/dist/circleloader_vars_css.mjs +82 -0
- package/dist/circleloader_vars_css.module.js +82 -0
- package/dist/circleloader_vars_css.module.js.map +1 -0
- package/dist/import.mjs +3 -326
- package/dist/main.js +6 -325
- package/dist/main.js.map +1 -1
- package/dist/module.js +3 -326
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +4 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/vars.596fab4e.css +288 -0
- package/dist/vars.596fab4e.css.map +1 -0
- package/dist/{main.css → vars.c3d4124d.css} +15 -333
- package/dist/vars.c3d4124d.css.map +1 -0
- package/package.json +7 -7
- package/dist/main.css.map +0 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var $3d86ae6a9356cc8a$exports = require("./ProgressBarBase.main.js");
|
|
2
|
+
require("./vars.596fab4e.css");
|
|
3
|
+
var $9f78a6c009f32d0a$exports = require("./barloader_vars_css.main.js");
|
|
4
|
+
var $24n0W$reactspectrumutils = require("@react-spectrum/utils");
|
|
5
|
+
var $24n0W$react = require("react");
|
|
6
|
+
var $24n0W$reactariaprogress = require("@react-aria/progress");
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function $parcel$interopDefault(a) {
|
|
10
|
+
return a && a.__esModule ? a.default : a;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function $parcel$export(e, n, v, s) {
|
|
14
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
$parcel$export(module.exports, "ProgressBar", () => $08d0cdc7f7a792a7$export$c17561cb55d4db30);
|
|
18
|
+
/*
|
|
19
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
20
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
21
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
22
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
23
|
+
*
|
|
24
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
25
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
26
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
27
|
+
* governing permissions and limitations under the License.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
function $08d0cdc7f7a792a7$var$ProgressBar(props, ref) {
|
|
34
|
+
let { staticColor: staticColor, variant: variant, ...otherProps } = props;
|
|
35
|
+
const { progressBarProps: progressBarProps, labelProps: labelProps } = (0, $24n0W$reactariaprogress.useProgressBar)(props);
|
|
36
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($24n0W$react))).createElement((0, $3d86ae6a9356cc8a$exports.ProgressBarBase), {
|
|
37
|
+
...otherProps,
|
|
38
|
+
ref: ref,
|
|
39
|
+
barProps: progressBarProps,
|
|
40
|
+
labelProps: labelProps,
|
|
41
|
+
barClassName: (0, $24n0W$reactspectrumutils.classNames)((0, ($parcel$interopDefault($9f78a6c009f32d0a$exports))), {
|
|
42
|
+
'spectrum-BarLoader--overBackground': variant === 'overBackground',
|
|
43
|
+
'spectrum-BarLoader--staticWhite': staticColor === 'white',
|
|
44
|
+
'spectrum-BarLoader--staticBlack': staticColor === 'black'
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* ProgressBars show the progression of a system operation: downloading, uploading, processing, etc., in a visual way.
|
|
50
|
+
* They can represent either determinate or indeterminate progress.
|
|
51
|
+
*/ let $08d0cdc7f7a792a7$export$c17561cb55d4db30 = /*#__PURE__*/ (0, ($parcel$interopDefault($24n0W$react))).forwardRef($08d0cdc7f7a792a7$var$ProgressBar);
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=ProgressBar.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAUD,SAAS,kCAAY,KAA+B,EAAE,GAA2B;IAC/E,IAAI,eAAC,WAAW,WAAE,OAAO,EAAE,GAAG,YAAW,GAAG;IAC5C,MAAM,oBACJ,gBAAgB,cAChB,UAAU,EACX,GAAG,CAAA,GAAA,uCAAa,EAAE;IAEnB,qBACE,0DAAC,CAAA,GAAA,yCAAc;QACZ,GAAG,UAAU;QACd,KAAK;QACL,UAAU;QACV,YAAY;QACZ,cACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL;YACE,sCAAsC,YAAY;YAClD,mCAAmC,gBAAgB;YACnD,mCAAmC,gBAAgB;QACrD;;AAIV;AAEA;;;CAGC,GACD,IAAI,0DAAe,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/progress/src/ProgressBar.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {ProgressBarBase} from './ProgressBarBase';\nimport React from 'react';\nimport {SpectrumProgressBarProps} from '@react-types/progress';\nimport styles from '@adobe/spectrum-css-temp/components/barloader/vars.css';\nimport {useProgressBar} from '@react-aria/progress';\n\nfunction ProgressBar(props: SpectrumProgressBarProps, ref: DOMRef<HTMLDivElement>) {\n let {staticColor, variant, ...otherProps} = props;\n const {\n progressBarProps,\n labelProps\n } = useProgressBar(props);\n\n return (\n <ProgressBarBase\n {...otherProps}\n ref={ref}\n barProps={progressBarProps}\n labelProps={labelProps}\n barClassName={\n classNames(\n styles,\n {\n 'spectrum-BarLoader--overBackground': variant === 'overBackground',\n 'spectrum-BarLoader--staticWhite': staticColor === 'white',\n 'spectrum-BarLoader--staticBlack': staticColor === 'black'\n }\n )\n } />\n );\n}\n\n/**\n * ProgressBars show the progression of a system operation: downloading, uploading, processing, etc., in a visual way.\n * They can represent either determinate or indeterminate progress.\n */\nlet _ProgressBar = React.forwardRef(ProgressBar);\nexport {_ProgressBar as ProgressBar};\n"],"names":[],"version":3,"file":"ProgressBar.main.js.map"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {ProgressBarBase as $ddf9337e928b5fe6$export$7c6ed87244065f3a} from "./ProgressBarBase.mjs";
|
|
2
|
+
import "./vars.596fab4e.css";
|
|
3
|
+
import $b214y$barloader_vars_cssmodulejs from "./barloader_vars_css.mjs";
|
|
4
|
+
import {classNames as $b214y$classNames} from "@react-spectrum/utils";
|
|
5
|
+
import $b214y$react from "react";
|
|
6
|
+
import {useProgressBar as $b214y$useProgressBar} from "@react-aria/progress";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function $parcel$interopDefault(a) {
|
|
10
|
+
return a && a.__esModule ? a.default : a;
|
|
11
|
+
}
|
|
12
|
+
/*
|
|
13
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
14
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
15
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
16
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
*
|
|
18
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
19
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
20
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
21
|
+
* governing permissions and limitations under the License.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
function $551ca31cb687f352$var$ProgressBar(props, ref) {
|
|
28
|
+
let { staticColor: staticColor, variant: variant, ...otherProps } = props;
|
|
29
|
+
const { progressBarProps: progressBarProps, labelProps: labelProps } = (0, $b214y$useProgressBar)(props);
|
|
30
|
+
return /*#__PURE__*/ (0, $b214y$react).createElement((0, $ddf9337e928b5fe6$export$7c6ed87244065f3a), {
|
|
31
|
+
...otherProps,
|
|
32
|
+
ref: ref,
|
|
33
|
+
barProps: progressBarProps,
|
|
34
|
+
labelProps: labelProps,
|
|
35
|
+
barClassName: (0, $b214y$classNames)((0, ($parcel$interopDefault($b214y$barloader_vars_cssmodulejs))), {
|
|
36
|
+
'spectrum-BarLoader--overBackground': variant === 'overBackground',
|
|
37
|
+
'spectrum-BarLoader--staticWhite': staticColor === 'white',
|
|
38
|
+
'spectrum-BarLoader--staticBlack': staticColor === 'black'
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* ProgressBars show the progression of a system operation: downloading, uploading, processing, etc., in a visual way.
|
|
44
|
+
* They can represent either determinate or indeterminate progress.
|
|
45
|
+
*/ let $551ca31cb687f352$export$c17561cb55d4db30 = /*#__PURE__*/ (0, $b214y$react).forwardRef($551ca31cb687f352$var$ProgressBar);
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
export {$551ca31cb687f352$export$c17561cb55d4db30 as ProgressBar};
|
|
49
|
+
//# sourceMappingURL=ProgressBar.module.js.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {ProgressBarBase as $ddf9337e928b5fe6$export$7c6ed87244065f3a} from "./ProgressBarBase.module.js";
|
|
2
|
+
import "./vars.596fab4e.css";
|
|
3
|
+
import $b214y$barloader_vars_cssmodulejs from "./barloader_vars_css.module.js";
|
|
4
|
+
import {classNames as $b214y$classNames} from "@react-spectrum/utils";
|
|
5
|
+
import $b214y$react from "react";
|
|
6
|
+
import {useProgressBar as $b214y$useProgressBar} from "@react-aria/progress";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function $parcel$interopDefault(a) {
|
|
10
|
+
return a && a.__esModule ? a.default : a;
|
|
11
|
+
}
|
|
12
|
+
/*
|
|
13
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
14
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
15
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
16
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
*
|
|
18
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
19
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
20
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
21
|
+
* governing permissions and limitations under the License.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
function $551ca31cb687f352$var$ProgressBar(props, ref) {
|
|
28
|
+
let { staticColor: staticColor, variant: variant, ...otherProps } = props;
|
|
29
|
+
const { progressBarProps: progressBarProps, labelProps: labelProps } = (0, $b214y$useProgressBar)(props);
|
|
30
|
+
return /*#__PURE__*/ (0, $b214y$react).createElement((0, $ddf9337e928b5fe6$export$7c6ed87244065f3a), {
|
|
31
|
+
...otherProps,
|
|
32
|
+
ref: ref,
|
|
33
|
+
barProps: progressBarProps,
|
|
34
|
+
labelProps: labelProps,
|
|
35
|
+
barClassName: (0, $b214y$classNames)((0, ($parcel$interopDefault($b214y$barloader_vars_cssmodulejs))), {
|
|
36
|
+
'spectrum-BarLoader--overBackground': variant === 'overBackground',
|
|
37
|
+
'spectrum-BarLoader--staticWhite': staticColor === 'white',
|
|
38
|
+
'spectrum-BarLoader--staticBlack': staticColor === 'black'
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* ProgressBars show the progression of a system operation: downloading, uploading, processing, etc., in a visual way.
|
|
44
|
+
* They can represent either determinate or indeterminate progress.
|
|
45
|
+
*/ let $551ca31cb687f352$export$c17561cb55d4db30 = /*#__PURE__*/ (0, $b214y$react).forwardRef($551ca31cb687f352$var$ProgressBar);
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
export {$551ca31cb687f352$export$c17561cb55d4db30 as ProgressBar};
|
|
49
|
+
//# sourceMappingURL=ProgressBar.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAUD,SAAS,kCAAY,KAA+B,EAAE,GAA2B;IAC/E,IAAI,eAAC,WAAW,WAAE,OAAO,EAAE,GAAG,YAAW,GAAG;IAC5C,MAAM,oBACJ,gBAAgB,cAChB,UAAU,EACX,GAAG,CAAA,GAAA,qBAAa,EAAE;IAEnB,qBACE,gCAAC,CAAA,GAAA,yCAAc;QACZ,GAAG,UAAU;QACd,KAAK;QACL,UAAU;QACV,YAAY;QACZ,cACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,2DAAK,GACL;YACE,sCAAsC,YAAY;YAClD,mCAAmC,gBAAgB;YACnD,mCAAmC,gBAAgB;QACrD;;AAIV;AAEA;;;CAGC,GACD,IAAI,0DAAe,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/progress/src/ProgressBar.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {ProgressBarBase} from './ProgressBarBase';\nimport React from 'react';\nimport {SpectrumProgressBarProps} from '@react-types/progress';\nimport styles from '@adobe/spectrum-css-temp/components/barloader/vars.css';\nimport {useProgressBar} from '@react-aria/progress';\n\nfunction ProgressBar(props: SpectrumProgressBarProps, ref: DOMRef<HTMLDivElement>) {\n let {staticColor, variant, ...otherProps} = props;\n const {\n progressBarProps,\n labelProps\n } = useProgressBar(props);\n\n return (\n <ProgressBarBase\n {...otherProps}\n ref={ref}\n barProps={progressBarProps}\n labelProps={labelProps}\n barClassName={\n classNames(\n styles,\n {\n 'spectrum-BarLoader--overBackground': variant === 'overBackground',\n 'spectrum-BarLoader--staticWhite': staticColor === 'white',\n 'spectrum-BarLoader--staticBlack': staticColor === 'black'\n }\n )\n } />\n );\n}\n\n/**\n * ProgressBars show the progression of a system operation: downloading, uploading, processing, etc., in a visual way.\n * They can represent either determinate or indeterminate progress.\n */\nlet _ProgressBar = React.forwardRef(ProgressBar);\nexport {_ProgressBar as ProgressBar};\n"],"names":[],"version":3,"file":"ProgressBar.module.js.map"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
require("./vars.596fab4e.css");
|
|
2
|
+
var $9f78a6c009f32d0a$exports = require("./barloader_vars_css.main.js");
|
|
3
|
+
var $jAYvx$reactariautils = require("@react-aria/utils");
|
|
4
|
+
var $jAYvx$reactspectrumutils = require("@react-spectrum/utils");
|
|
5
|
+
var $jAYvx$react = require("react");
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
function $parcel$interopDefault(a) {
|
|
9
|
+
return a && a.__esModule ? a.default : a;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function $parcel$export(e, n, v, s) {
|
|
13
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
$parcel$export(module.exports, "ProgressBarBase", () => $3d86ae6a9356cc8a$export$7c6ed87244065f3a);
|
|
17
|
+
/*
|
|
18
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
19
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
20
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
21
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
22
|
+
*
|
|
23
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
24
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
25
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
26
|
+
* governing permissions and limitations under the License.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
// Base ProgressBar component shared with Meter.
|
|
32
|
+
function $3d86ae6a9356cc8a$var$ProgressBarBase(props, ref) {
|
|
33
|
+
let { value: value = 0, minValue: minValue = 0, maxValue: maxValue = 100, size: size = 'L', label: label, barClassName: barClassName, showValueLabel: showValueLabel = !!label, labelPosition: labelPosition = 'top', isIndeterminate: isIndeterminate = false, barProps: barProps, labelProps: labelProps, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, ...otherProps } = props;
|
|
34
|
+
let domRef = (0, $jAYvx$reactspectrumutils.useDOMRef)(ref);
|
|
35
|
+
let { styleProps: styleProps } = (0, $jAYvx$reactspectrumutils.useStyleProps)(otherProps);
|
|
36
|
+
value = (0, $jAYvx$reactariautils.clamp)(value, minValue, maxValue);
|
|
37
|
+
let barStyle = {};
|
|
38
|
+
if (!isIndeterminate) {
|
|
39
|
+
let percentage = (value - minValue) / (maxValue - minValue);
|
|
40
|
+
barStyle.width = `${Math.round(percentage * 100)}%`;
|
|
41
|
+
}
|
|
42
|
+
// Ideally this should be in useProgressBar, but children
|
|
43
|
+
// are not supported in ProgressCircle which shares that hook...
|
|
44
|
+
if (!label && !ariaLabel && !ariaLabelledby) console.warn('If you do not provide a visible label via children, you must specify an aria-label or aria-labelledby attribute for accessibility');
|
|
45
|
+
// use inline style for fit-content because cssnano is too smart for us and will strip out the -moz prefix in css files
|
|
46
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($jAYvx$react))).createElement("div", {
|
|
47
|
+
...barProps,
|
|
48
|
+
ref: domRef,
|
|
49
|
+
className: (0, $jAYvx$reactspectrumutils.classNames)((0, ($parcel$interopDefault($9f78a6c009f32d0a$exports))), 'spectrum-BarLoader', {
|
|
50
|
+
'spectrum-BarLoader--small': size === 'S',
|
|
51
|
+
'spectrum-BarLoader--large': size === 'L',
|
|
52
|
+
'spectrum-BarLoader--indeterminate': isIndeterminate,
|
|
53
|
+
'spectrum-BarLoader--sideLabel': labelPosition === 'side'
|
|
54
|
+
}, barClassName, styleProps.className),
|
|
55
|
+
style: {
|
|
56
|
+
minWidth: '-moz-fit-content',
|
|
57
|
+
...styleProps.style
|
|
58
|
+
}
|
|
59
|
+
}, label && /*#__PURE__*/ (0, ($parcel$interopDefault($jAYvx$react))).createElement("span", {
|
|
60
|
+
...labelProps,
|
|
61
|
+
className: (0, $jAYvx$reactspectrumutils.classNames)((0, ($parcel$interopDefault($9f78a6c009f32d0a$exports))), 'spectrum-BarLoader-label')
|
|
62
|
+
}, label), showValueLabel && barProps && /*#__PURE__*/ (0, ($parcel$interopDefault($jAYvx$react))).createElement("div", {
|
|
63
|
+
className: (0, $jAYvx$reactspectrumutils.classNames)((0, ($parcel$interopDefault($9f78a6c009f32d0a$exports))), 'spectrum-BarLoader-percentage')
|
|
64
|
+
}, barProps['aria-valuetext']), /*#__PURE__*/ (0, ($parcel$interopDefault($jAYvx$react))).createElement("div", {
|
|
65
|
+
className: (0, $jAYvx$reactspectrumutils.classNames)((0, ($parcel$interopDefault($9f78a6c009f32d0a$exports))), 'spectrum-BarLoader-track')
|
|
66
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($jAYvx$react))).createElement("div", {
|
|
67
|
+
className: (0, $jAYvx$reactspectrumutils.classNames)((0, ($parcel$interopDefault($9f78a6c009f32d0a$exports))), 'spectrum-BarLoader-fill'),
|
|
68
|
+
style: barStyle
|
|
69
|
+
})));
|
|
70
|
+
}
|
|
71
|
+
let $3d86ae6a9356cc8a$export$7c6ed87244065f3a = /*#__PURE__*/ (0, ($parcel$interopDefault($jAYvx$react))).forwardRef($3d86ae6a9356cc8a$var$ProgressBarBase);
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
//# sourceMappingURL=ProgressBarBase.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAeD,gDAAgD;AAChD,SAAS,sCAAgB,KAA2B,EAAE,GAA2B;IAC/E,IAAI,SACF,QAAQ,aACR,WAAW,aACX,WAAW,WACX,OAAO,YACP,KAAK,gBACL,YAAY,kBACZ,iBAAiB,CAAC,CAAC,sBACnB,gBAAgB,wBAChB,kBAAkB,iBAClB,QAAQ,cACR,UAAU,EACV,cAAc,SAAS,EACvB,mBAAmB,cAAc,EACjC,GAAG,YACJ,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IAEjC,QAAQ,CAAA,GAAA,2BAAI,EAAE,OAAO,UAAU;IAE/B,IAAI,WAA0B,CAAC;IAC/B,IAAI,CAAC,iBAAiB;QACpB,IAAI,aAAa,AAAC,CAAA,QAAQ,QAAO,IAAM,CAAA,WAAW,QAAO;QACzD,SAAS,KAAK,GAAG,CAAC,EAAE,KAAK,KAAK,CAAC,aAAa,KAAK,CAAC,CAAC;IACrD;IAEA,yDAAyD;IACzD,gEAAgE;IAChE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,gBAC3B,QAAQ,IAAI,CAAC;IAEf,uHAAuH;IACvH,qBACE,0DAAC;QACE,GAAG,QAAQ;QACZ,KAAK;QACL,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL,sBACA;YACE,6BAA6B,SAAS;YACtC,6BAA6B,SAAS;YACtC,qCAAqC;YACrC,iCAAiC,kBAAkB;QACrD,GACA,cACA,WAAW,SAAS;QAGxB,OAAO;YAAC,UAAU;YAAoB,GAAG,WAAW,KAAK;QAAA;OACxD,uBACC,0DAAC;QACE,GAAG,UAAU;QACd,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OAC3B,QAGN,kBAAkB,0BACjB,0DAAC;QAAI,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OAChC,QAAQ,CAAC,iBAAiB,iBAG/B,0DAAC;QAAI,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;qBACjC,0DAAC;QACC,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAC9B,OAAO;;AAIjB;AAEA,IAAI,0DAAmB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/progress/src/ProgressBarBase.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {clamp} from '@react-aria/utils';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {ProgressBarProps, SpectrumProgressBarBaseProps} from '@react-types/progress';\nimport React, {CSSProperties, HTMLAttributes} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/barloader/vars.css';\n\ninterface ProgressBarBaseProps extends SpectrumProgressBarBaseProps, ProgressBarProps {\n barClassName?: string,\n barProps?: HTMLAttributes<HTMLDivElement>,\n labelProps?: HTMLAttributes<HTMLLabelElement>\n}\n\n// Base ProgressBar component shared with Meter.\nfunction ProgressBarBase(props: ProgressBarBaseProps, ref: DOMRef<HTMLDivElement>) {\n let {\n value = 0,\n minValue = 0,\n maxValue = 100,\n size = 'L',\n label,\n barClassName,\n showValueLabel = !!label,\n labelPosition = 'top',\n isIndeterminate = false,\n barProps,\n labelProps,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n\n value = clamp(value, minValue, maxValue);\n\n let barStyle: CSSProperties = {};\n if (!isIndeterminate) {\n let percentage = (value - minValue) / (maxValue - minValue);\n barStyle.width = `${Math.round(percentage * 100)}%`;\n }\n\n // Ideally this should be in useProgressBar, but children\n // are not supported in ProgressCircle which shares that hook...\n if (!label && !ariaLabel && !ariaLabelledby) {\n console.warn('If you do not provide a visible label via children, you must specify an aria-label or aria-labelledby attribute for accessibility');\n }\n // use inline style for fit-content because cssnano is too smart for us and will strip out the -moz prefix in css files\n return (\n <div\n {...barProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-BarLoader',\n {\n 'spectrum-BarLoader--small': size === 'S',\n 'spectrum-BarLoader--large': size === 'L',\n 'spectrum-BarLoader--indeterminate': isIndeterminate,\n 'spectrum-BarLoader--sideLabel': labelPosition === 'side'\n },\n barClassName,\n styleProps.className\n )\n }\n style={{minWidth: '-moz-fit-content', ...styleProps.style}}>\n {label &&\n <span\n {...labelProps}\n className={classNames(styles, 'spectrum-BarLoader-label')}>\n {label}\n </span>\n }\n {showValueLabel && barProps && \n <div className={classNames(styles, 'spectrum-BarLoader-percentage')}>\n {barProps['aria-valuetext']}\n </div>\n }\n <div className={classNames(styles, 'spectrum-BarLoader-track')}>\n <div\n className={classNames(styles, 'spectrum-BarLoader-fill')}\n style={barStyle} />\n </div>\n </div>\n );\n}\n\nlet _ProgressBarBase = React.forwardRef(ProgressBarBase);\nexport {_ProgressBarBase as ProgressBarBase};\n"],"names":[],"version":3,"file":"ProgressBarBase.main.js.map"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import "./vars.596fab4e.css";
|
|
2
|
+
import $hlUTw$barloader_vars_cssmodulejs from "./barloader_vars_css.mjs";
|
|
3
|
+
import {clamp as $hlUTw$clamp} from "@react-aria/utils";
|
|
4
|
+
import {useDOMRef as $hlUTw$useDOMRef, useStyleProps as $hlUTw$useStyleProps, classNames as $hlUTw$classNames} from "@react-spectrum/utils";
|
|
5
|
+
import $hlUTw$react from "react";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
function $parcel$interopDefault(a) {
|
|
9
|
+
return a && a.__esModule ? a.default : a;
|
|
10
|
+
}
|
|
11
|
+
/*
|
|
12
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
13
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
14
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
15
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
+
*
|
|
17
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
18
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
19
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
20
|
+
* governing permissions and limitations under the License.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
// Base ProgressBar component shared with Meter.
|
|
26
|
+
function $ddf9337e928b5fe6$var$ProgressBarBase(props, ref) {
|
|
27
|
+
let { value: value = 0, minValue: minValue = 0, maxValue: maxValue = 100, size: size = 'L', label: label, barClassName: barClassName, showValueLabel: showValueLabel = !!label, labelPosition: labelPosition = 'top', isIndeterminate: isIndeterminate = false, barProps: barProps, labelProps: labelProps, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, ...otherProps } = props;
|
|
28
|
+
let domRef = (0, $hlUTw$useDOMRef)(ref);
|
|
29
|
+
let { styleProps: styleProps } = (0, $hlUTw$useStyleProps)(otherProps);
|
|
30
|
+
value = (0, $hlUTw$clamp)(value, minValue, maxValue);
|
|
31
|
+
let barStyle = {};
|
|
32
|
+
if (!isIndeterminate) {
|
|
33
|
+
let percentage = (value - minValue) / (maxValue - minValue);
|
|
34
|
+
barStyle.width = `${Math.round(percentage * 100)}%`;
|
|
35
|
+
}
|
|
36
|
+
// Ideally this should be in useProgressBar, but children
|
|
37
|
+
// are not supported in ProgressCircle which shares that hook...
|
|
38
|
+
if (!label && !ariaLabel && !ariaLabelledby) console.warn('If you do not provide a visible label via children, you must specify an aria-label or aria-labelledby attribute for accessibility');
|
|
39
|
+
// use inline style for fit-content because cssnano is too smart for us and will strip out the -moz prefix in css files
|
|
40
|
+
return /*#__PURE__*/ (0, $hlUTw$react).createElement("div", {
|
|
41
|
+
...barProps,
|
|
42
|
+
ref: domRef,
|
|
43
|
+
className: (0, $hlUTw$classNames)((0, ($parcel$interopDefault($hlUTw$barloader_vars_cssmodulejs))), 'spectrum-BarLoader', {
|
|
44
|
+
'spectrum-BarLoader--small': size === 'S',
|
|
45
|
+
'spectrum-BarLoader--large': size === 'L',
|
|
46
|
+
'spectrum-BarLoader--indeterminate': isIndeterminate,
|
|
47
|
+
'spectrum-BarLoader--sideLabel': labelPosition === 'side'
|
|
48
|
+
}, barClassName, styleProps.className),
|
|
49
|
+
style: {
|
|
50
|
+
minWidth: '-moz-fit-content',
|
|
51
|
+
...styleProps.style
|
|
52
|
+
}
|
|
53
|
+
}, label && /*#__PURE__*/ (0, $hlUTw$react).createElement("span", {
|
|
54
|
+
...labelProps,
|
|
55
|
+
className: (0, $hlUTw$classNames)((0, ($parcel$interopDefault($hlUTw$barloader_vars_cssmodulejs))), 'spectrum-BarLoader-label')
|
|
56
|
+
}, label), showValueLabel && barProps && /*#__PURE__*/ (0, $hlUTw$react).createElement("div", {
|
|
57
|
+
className: (0, $hlUTw$classNames)((0, ($parcel$interopDefault($hlUTw$barloader_vars_cssmodulejs))), 'spectrum-BarLoader-percentage')
|
|
58
|
+
}, barProps['aria-valuetext']), /*#__PURE__*/ (0, $hlUTw$react).createElement("div", {
|
|
59
|
+
className: (0, $hlUTw$classNames)((0, ($parcel$interopDefault($hlUTw$barloader_vars_cssmodulejs))), 'spectrum-BarLoader-track')
|
|
60
|
+
}, /*#__PURE__*/ (0, $hlUTw$react).createElement("div", {
|
|
61
|
+
className: (0, $hlUTw$classNames)((0, ($parcel$interopDefault($hlUTw$barloader_vars_cssmodulejs))), 'spectrum-BarLoader-fill'),
|
|
62
|
+
style: barStyle
|
|
63
|
+
})));
|
|
64
|
+
}
|
|
65
|
+
let $ddf9337e928b5fe6$export$7c6ed87244065f3a = /*#__PURE__*/ (0, $hlUTw$react).forwardRef($ddf9337e928b5fe6$var$ProgressBarBase);
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
export {$ddf9337e928b5fe6$export$7c6ed87244065f3a as ProgressBarBase};
|
|
69
|
+
//# sourceMappingURL=ProgressBarBase.module.js.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import "./vars.596fab4e.css";
|
|
2
|
+
import $hlUTw$barloader_vars_cssmodulejs from "./barloader_vars_css.module.js";
|
|
3
|
+
import {clamp as $hlUTw$clamp} from "@react-aria/utils";
|
|
4
|
+
import {useDOMRef as $hlUTw$useDOMRef, useStyleProps as $hlUTw$useStyleProps, classNames as $hlUTw$classNames} from "@react-spectrum/utils";
|
|
5
|
+
import $hlUTw$react from "react";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
function $parcel$interopDefault(a) {
|
|
9
|
+
return a && a.__esModule ? a.default : a;
|
|
10
|
+
}
|
|
11
|
+
/*
|
|
12
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
13
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
14
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
15
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
+
*
|
|
17
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
18
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
19
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
20
|
+
* governing permissions and limitations under the License.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
// Base ProgressBar component shared with Meter.
|
|
26
|
+
function $ddf9337e928b5fe6$var$ProgressBarBase(props, ref) {
|
|
27
|
+
let { value: value = 0, minValue: minValue = 0, maxValue: maxValue = 100, size: size = 'L', label: label, barClassName: barClassName, showValueLabel: showValueLabel = !!label, labelPosition: labelPosition = 'top', isIndeterminate: isIndeterminate = false, barProps: barProps, labelProps: labelProps, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, ...otherProps } = props;
|
|
28
|
+
let domRef = (0, $hlUTw$useDOMRef)(ref);
|
|
29
|
+
let { styleProps: styleProps } = (0, $hlUTw$useStyleProps)(otherProps);
|
|
30
|
+
value = (0, $hlUTw$clamp)(value, minValue, maxValue);
|
|
31
|
+
let barStyle = {};
|
|
32
|
+
if (!isIndeterminate) {
|
|
33
|
+
let percentage = (value - minValue) / (maxValue - minValue);
|
|
34
|
+
barStyle.width = `${Math.round(percentage * 100)}%`;
|
|
35
|
+
}
|
|
36
|
+
// Ideally this should be in useProgressBar, but children
|
|
37
|
+
// are not supported in ProgressCircle which shares that hook...
|
|
38
|
+
if (!label && !ariaLabel && !ariaLabelledby) console.warn('If you do not provide a visible label via children, you must specify an aria-label or aria-labelledby attribute for accessibility');
|
|
39
|
+
// use inline style for fit-content because cssnano is too smart for us and will strip out the -moz prefix in css files
|
|
40
|
+
return /*#__PURE__*/ (0, $hlUTw$react).createElement("div", {
|
|
41
|
+
...barProps,
|
|
42
|
+
ref: domRef,
|
|
43
|
+
className: (0, $hlUTw$classNames)((0, ($parcel$interopDefault($hlUTw$barloader_vars_cssmodulejs))), 'spectrum-BarLoader', {
|
|
44
|
+
'spectrum-BarLoader--small': size === 'S',
|
|
45
|
+
'spectrum-BarLoader--large': size === 'L',
|
|
46
|
+
'spectrum-BarLoader--indeterminate': isIndeterminate,
|
|
47
|
+
'spectrum-BarLoader--sideLabel': labelPosition === 'side'
|
|
48
|
+
}, barClassName, styleProps.className),
|
|
49
|
+
style: {
|
|
50
|
+
minWidth: '-moz-fit-content',
|
|
51
|
+
...styleProps.style
|
|
52
|
+
}
|
|
53
|
+
}, label && /*#__PURE__*/ (0, $hlUTw$react).createElement("span", {
|
|
54
|
+
...labelProps,
|
|
55
|
+
className: (0, $hlUTw$classNames)((0, ($parcel$interopDefault($hlUTw$barloader_vars_cssmodulejs))), 'spectrum-BarLoader-label')
|
|
56
|
+
}, label), showValueLabel && barProps && /*#__PURE__*/ (0, $hlUTw$react).createElement("div", {
|
|
57
|
+
className: (0, $hlUTw$classNames)((0, ($parcel$interopDefault($hlUTw$barloader_vars_cssmodulejs))), 'spectrum-BarLoader-percentage')
|
|
58
|
+
}, barProps['aria-valuetext']), /*#__PURE__*/ (0, $hlUTw$react).createElement("div", {
|
|
59
|
+
className: (0, $hlUTw$classNames)((0, ($parcel$interopDefault($hlUTw$barloader_vars_cssmodulejs))), 'spectrum-BarLoader-track')
|
|
60
|
+
}, /*#__PURE__*/ (0, $hlUTw$react).createElement("div", {
|
|
61
|
+
className: (0, $hlUTw$classNames)((0, ($parcel$interopDefault($hlUTw$barloader_vars_cssmodulejs))), 'spectrum-BarLoader-fill'),
|
|
62
|
+
style: barStyle
|
|
63
|
+
})));
|
|
64
|
+
}
|
|
65
|
+
let $ddf9337e928b5fe6$export$7c6ed87244065f3a = /*#__PURE__*/ (0, $hlUTw$react).forwardRef($ddf9337e928b5fe6$var$ProgressBarBase);
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
export {$ddf9337e928b5fe6$export$7c6ed87244065f3a as ProgressBarBase};
|
|
69
|
+
//# sourceMappingURL=ProgressBarBase.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAeD,gDAAgD;AAChD,SAAS,sCAAgB,KAA2B,EAAE,GAA2B;IAC/E,IAAI,SACF,QAAQ,aACR,WAAW,aACX,WAAW,WACX,OAAO,YACP,KAAK,gBACL,YAAY,kBACZ,iBAAiB,CAAC,CAAC,sBACnB,gBAAgB,wBAChB,kBAAkB,iBAClB,QAAQ,cACR,UAAU,EACV,cAAc,SAAS,EACvB,mBAAmB,cAAc,EACjC,GAAG,YACJ,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IAEjC,QAAQ,CAAA,GAAA,YAAI,EAAE,OAAO,UAAU;IAE/B,IAAI,WAA0B,CAAC;IAC/B,IAAI,CAAC,iBAAiB;QACpB,IAAI,aAAa,AAAC,CAAA,QAAQ,QAAO,IAAM,CAAA,WAAW,QAAO;QACzD,SAAS,KAAK,GAAG,CAAC,EAAE,KAAK,KAAK,CAAC,aAAa,KAAK,CAAC,CAAC;IACrD;IAEA,yDAAyD;IACzD,gEAAgE;IAChE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,gBAC3B,QAAQ,IAAI,CAAC;IAEf,uHAAuH;IACvH,qBACE,gCAAC;QACE,GAAG,QAAQ;QACZ,KAAK;QACL,WACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,2DAAK,GACL,sBACA;YACE,6BAA6B,SAAS;YACtC,6BAA6B,SAAS;YACtC,qCAAqC;YACrC,iCAAiC,kBAAkB;QACrD,GACA,cACA,WAAW,SAAS;QAGxB,OAAO;YAAC,UAAU;YAAoB,GAAG,WAAW,KAAK;QAAA;OACxD,uBACC,gCAAC;QACE,GAAG,UAAU;QACd,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,2DAAK,GAAG;OAC3B,QAGN,kBAAkB,0BACjB,gCAAC;QAAI,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,2DAAK,GAAG;OAChC,QAAQ,CAAC,iBAAiB,iBAG/B,gCAAC;QAAI,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,2DAAK,GAAG;qBACjC,gCAAC;QACC,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,2DAAK,GAAG;QAC9B,OAAO;;AAIjB;AAEA,IAAI,0DAAmB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/progress/src/ProgressBarBase.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {clamp} from '@react-aria/utils';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {ProgressBarProps, SpectrumProgressBarBaseProps} from '@react-types/progress';\nimport React, {CSSProperties, HTMLAttributes} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/barloader/vars.css';\n\ninterface ProgressBarBaseProps extends SpectrumProgressBarBaseProps, ProgressBarProps {\n barClassName?: string,\n barProps?: HTMLAttributes<HTMLDivElement>,\n labelProps?: HTMLAttributes<HTMLLabelElement>\n}\n\n// Base ProgressBar component shared with Meter.\nfunction ProgressBarBase(props: ProgressBarBaseProps, ref: DOMRef<HTMLDivElement>) {\n let {\n value = 0,\n minValue = 0,\n maxValue = 100,\n size = 'L',\n label,\n barClassName,\n showValueLabel = !!label,\n labelPosition = 'top',\n isIndeterminate = false,\n barProps,\n labelProps,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n\n value = clamp(value, minValue, maxValue);\n\n let barStyle: CSSProperties = {};\n if (!isIndeterminate) {\n let percentage = (value - minValue) / (maxValue - minValue);\n barStyle.width = `${Math.round(percentage * 100)}%`;\n }\n\n // Ideally this should be in useProgressBar, but children\n // are not supported in ProgressCircle which shares that hook...\n if (!label && !ariaLabel && !ariaLabelledby) {\n console.warn('If you do not provide a visible label via children, you must specify an aria-label or aria-labelledby attribute for accessibility');\n }\n // use inline style for fit-content because cssnano is too smart for us and will strip out the -moz prefix in css files\n return (\n <div\n {...barProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-BarLoader',\n {\n 'spectrum-BarLoader--small': size === 'S',\n 'spectrum-BarLoader--large': size === 'L',\n 'spectrum-BarLoader--indeterminate': isIndeterminate,\n 'spectrum-BarLoader--sideLabel': labelPosition === 'side'\n },\n barClassName,\n styleProps.className\n )\n }\n style={{minWidth: '-moz-fit-content', ...styleProps.style}}>\n {label &&\n <span\n {...labelProps}\n className={classNames(styles, 'spectrum-BarLoader-label')}>\n {label}\n </span>\n }\n {showValueLabel && barProps && \n <div className={classNames(styles, 'spectrum-BarLoader-percentage')}>\n {barProps['aria-valuetext']}\n </div>\n }\n <div className={classNames(styles, 'spectrum-BarLoader-track')}>\n <div\n className={classNames(styles, 'spectrum-BarLoader-fill')}\n style={barStyle} />\n </div>\n </div>\n );\n}\n\nlet _ProgressBarBase = React.forwardRef(ProgressBarBase);\nexport {_ProgressBarBase as ProgressBarBase};\n"],"names":[],"version":3,"file":"ProgressBarBase.module.js.map"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
require("./vars.c3d4124d.css");
|
|
2
|
+
var $f4d8d13edf2d3ca2$exports = require("./circleloader_vars_css.main.js");
|
|
3
|
+
var $eahRj$reactariautils = require("@react-aria/utils");
|
|
4
|
+
var $eahRj$reactspectrumutils = require("@react-spectrum/utils");
|
|
5
|
+
var $eahRj$react = require("react");
|
|
6
|
+
var $eahRj$reactariaprogress = require("@react-aria/progress");
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function $parcel$interopDefault(a) {
|
|
10
|
+
return a && a.__esModule ? a.default : a;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function $parcel$export(e, n, v, s) {
|
|
14
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
$parcel$export(module.exports, "ProgressCircle", () => $365887133501f5a1$export$c79b9d6b4cc92af7);
|
|
18
|
+
/*
|
|
19
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
20
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
21
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
22
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
23
|
+
*
|
|
24
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
25
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
26
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
27
|
+
* governing permissions and limitations under the License.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
function $365887133501f5a1$var$ProgressCircle(props, ref) {
|
|
34
|
+
let { value: value = 0, minValue: minValue = 0, maxValue: maxValue = 100, size: size = 'M', staticColor: staticColor, variant: variant, isIndeterminate: isIndeterminate = false, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, ...otherProps } = props;
|
|
35
|
+
let domRef = (0, $eahRj$reactspectrumutils.useDOMRef)(ref);
|
|
36
|
+
let { styleProps: styleProps } = (0, $eahRj$reactspectrumutils.useStyleProps)(otherProps);
|
|
37
|
+
value = (0, $eahRj$reactariautils.clamp)(value, minValue, maxValue);
|
|
38
|
+
let { progressBarProps: progressBarProps } = (0, $eahRj$reactariaprogress.useProgressBar)({
|
|
39
|
+
...props,
|
|
40
|
+
value: value
|
|
41
|
+
});
|
|
42
|
+
let subMask1Style = {};
|
|
43
|
+
let subMask2Style = {};
|
|
44
|
+
if (!isIndeterminate) {
|
|
45
|
+
let percentage = (value - minValue) / (maxValue - minValue) * 100;
|
|
46
|
+
let angle;
|
|
47
|
+
if (percentage > 0 && percentage <= 50) {
|
|
48
|
+
angle = -180 + percentage / 50 * 180;
|
|
49
|
+
subMask1Style.transform = `rotate(${angle}deg)`;
|
|
50
|
+
subMask2Style.transform = 'rotate(-180deg)';
|
|
51
|
+
} else if (percentage > 50) {
|
|
52
|
+
angle = -180 + (percentage - 50) / 50 * 180;
|
|
53
|
+
subMask1Style.transform = 'rotate(0deg)';
|
|
54
|
+
subMask2Style.transform = `rotate(${angle}deg)`;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if (!ariaLabel && !ariaLabelledby) console.warn('ProgressCircle requires an aria-label or aria-labelledby attribute for accessibility');
|
|
58
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($eahRj$react))).createElement("div", {
|
|
59
|
+
...styleProps,
|
|
60
|
+
...progressBarProps,
|
|
61
|
+
ref: domRef,
|
|
62
|
+
className: (0, $eahRj$reactspectrumutils.classNames)((0, ($parcel$interopDefault($f4d8d13edf2d3ca2$exports))), 'spectrum-CircleLoader', {
|
|
63
|
+
'spectrum-CircleLoader--indeterminate': isIndeterminate,
|
|
64
|
+
'spectrum-CircleLoader--small': size === 'S',
|
|
65
|
+
'spectrum-CircleLoader--large': size === 'L',
|
|
66
|
+
'spectrum-CircleLoader--overBackground': variant === 'overBackground',
|
|
67
|
+
'spectrum-CircleLoader--staticWhite': staticColor === 'white',
|
|
68
|
+
'spectrum-CircleLoader--staticBlack': staticColor === 'black'
|
|
69
|
+
}, styleProps.className)
|
|
70
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($eahRj$react))).createElement("div", {
|
|
71
|
+
className: (0, $eahRj$reactspectrumutils.classNames)((0, ($parcel$interopDefault($f4d8d13edf2d3ca2$exports))), 'spectrum-CircleLoader-track')
|
|
72
|
+
}), /*#__PURE__*/ (0, ($parcel$interopDefault($eahRj$react))).createElement("div", {
|
|
73
|
+
className: (0, $eahRj$reactspectrumutils.classNames)((0, ($parcel$interopDefault($f4d8d13edf2d3ca2$exports))), 'spectrum-CircleLoader-fills')
|
|
74
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($eahRj$react))).createElement("div", {
|
|
75
|
+
className: (0, $eahRj$reactspectrumutils.classNames)((0, ($parcel$interopDefault($f4d8d13edf2d3ca2$exports))), 'spectrum-CircleLoader-fillMask1')
|
|
76
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($eahRj$react))).createElement("div", {
|
|
77
|
+
className: (0, $eahRj$reactspectrumutils.classNames)((0, ($parcel$interopDefault($f4d8d13edf2d3ca2$exports))), 'spectrum-CircleLoader-fillSubMask1'),
|
|
78
|
+
"data-testid": "fillSubMask1",
|
|
79
|
+
style: subMask1Style
|
|
80
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($eahRj$react))).createElement("div", {
|
|
81
|
+
className: (0, $eahRj$reactspectrumutils.classNames)((0, ($parcel$interopDefault($f4d8d13edf2d3ca2$exports))), 'spectrum-CircleLoader-fill')
|
|
82
|
+
}))), /*#__PURE__*/ (0, ($parcel$interopDefault($eahRj$react))).createElement("div", {
|
|
83
|
+
className: (0, $eahRj$reactspectrumutils.classNames)((0, ($parcel$interopDefault($f4d8d13edf2d3ca2$exports))), 'spectrum-CircleLoader-fillMask2')
|
|
84
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($eahRj$react))).createElement("div", {
|
|
85
|
+
className: (0, $eahRj$reactspectrumutils.classNames)((0, ($parcel$interopDefault($f4d8d13edf2d3ca2$exports))), 'spectrum-CircleLoader-fillSubMask2'),
|
|
86
|
+
"data-testid": "fillSubMask2",
|
|
87
|
+
style: subMask2Style
|
|
88
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($eahRj$react))).createElement("div", {
|
|
89
|
+
className: (0, $eahRj$reactspectrumutils.classNames)((0, ($parcel$interopDefault($f4d8d13edf2d3ca2$exports))), 'spectrum-CircleLoader-fill')
|
|
90
|
+
})))));
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* ProgressCircles show the progression of a system operation such as downloading, uploading, or processing, in a visual way.
|
|
94
|
+
* They can represent determinate or indeterminate progress.
|
|
95
|
+
*/ let $365887133501f5a1$export$c79b9d6b4cc92af7 = /*#__PURE__*/ (0, ($parcel$interopDefault($eahRj$react))).forwardRef($365887133501f5a1$var$ProgressCircle);
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
//# sourceMappingURL=ProgressCircle.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAWD,SAAS,qCAAe,KAAkC,EAAE,GAA2B;IACrF,IAAI,SACF,QAAQ,aACR,WAAW,aACX,WAAW,WACX,OAAO,kBACP,WAAW,WACX,OAAO,mBACP,kBAAkB,OAClB,cAAc,SAAS,EACvB,mBAAmB,cAAc,EACjC,GAAG,YACJ,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IAEjC,QAAQ,CAAA,GAAA,2BAAI,EAAE,OAAO,UAAU;IAC/B,IAAI,oBAAC,gBAAgB,EAAC,GAAG,CAAA,GAAA,uCAAa,EAAE;QAAC,GAAG,KAAK;eAAE;IAAK;IAExD,IAAI,gBAA+B,CAAC;IACpC,IAAI,gBAA+B,CAAC;IACpC,IAAI,CAAC,iBAAiB;QACpB,IAAI,aAAa,AAAC,CAAA,QAAQ,QAAO,IAAM,CAAA,WAAW,QAAO,IAAK;QAC9D,IAAI;QACJ,IAAI,aAAa,KAAK,cAAc,IAAI;YACtC,QAAQ,OAAQ,aAAa,KAAK;YAClC,cAAc,SAAS,GAAG,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;YAC/C,cAAc,SAAS,GAAG;QAC5B,OAAO,IAAI,aAAa,IAAI;YAC1B,QAAQ,OAAO,AAAC,CAAA,aAAa,EAAC,IAAK,KAAK;YACxC,cAAc,SAAS,GAAG;YAC1B,cAAc,SAAS,GAAG,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;QACjD;IACF;IAEA,IAAI,CAAC,aAAa,CAAC,gBACjB,QAAQ,IAAI,CAAC;IAGf,qBACE,0DAAC;QACE,GAAG,UAAU;QACb,GAAG,gBAAgB;QACpB,KAAK;QACL,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL,yBACA;YACE,wCAAwC;YACxC,gCAAgC,SAAS;YACzC,gCAAgC,SAAS;YACzC,yCAAyC,YAAY;YACrD,sCAAsC,gBAAgB;YACtD,sCAAsC,gBAAgB;QACxD,GACA,WAAW,SAAS;qBAGxB,0DAAC;QAAI,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;sBACnC,0DAAC;QAAI,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;qBACjC,0DAAC;QAAI,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;qBACjC,0DAAC;QACC,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAC9B,eAAY;QACZ,OAAO;qBACP,0DAAC;QAAI,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;wBAGvC,0DAAC;QAAI,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;qBACjC,0DAAC;QACC,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAC9B,eAAY;QACZ,OAAO;qBACP,0DAAC;QAAI,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;;AAM/C;AAEA;;;CAGC,GACD,IAAI,0DAAkB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/progress/src/ProgressCircle.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {clamp} from '@react-aria/utils';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport React, {CSSProperties} from 'react';\nimport {SpectrumProgressCircleProps} from '@react-types/progress';\nimport styles from '@adobe/spectrum-css-temp/components/circleloader/vars.css';\nimport {useProgressBar} from '@react-aria/progress';\n\n\nfunction ProgressCircle(props: SpectrumProgressCircleProps, ref: DOMRef<HTMLDivElement>) {\n let {\n value = 0,\n minValue = 0,\n maxValue = 100,\n size = 'M',\n staticColor,\n variant,\n isIndeterminate = false,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n\n value = clamp(value, minValue, maxValue);\n let {progressBarProps} = useProgressBar({...props, value});\n\n let subMask1Style: CSSProperties = {};\n let subMask2Style: CSSProperties = {};\n if (!isIndeterminate) {\n let percentage = (value - minValue) / (maxValue - minValue) * 100;\n let angle;\n if (percentage > 0 && percentage <= 50) {\n angle = -180 + (percentage / 50 * 180);\n subMask1Style.transform = `rotate(${angle}deg)`;\n subMask2Style.transform = 'rotate(-180deg)';\n } else if (percentage > 50) {\n angle = -180 + (percentage - 50) / 50 * 180;\n subMask1Style.transform = 'rotate(0deg)';\n subMask2Style.transform = `rotate(${angle}deg)`;\n }\n }\n\n if (!ariaLabel && !ariaLabelledby) {\n console.warn('ProgressCircle requires an aria-label or aria-labelledby attribute for accessibility');\n }\n\n return (\n <div\n {...styleProps}\n {...progressBarProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-CircleLoader',\n {\n 'spectrum-CircleLoader--indeterminate': isIndeterminate,\n 'spectrum-CircleLoader--small': size === 'S',\n 'spectrum-CircleLoader--large': size === 'L',\n 'spectrum-CircleLoader--overBackground': variant === 'overBackground',\n 'spectrum-CircleLoader--staticWhite': staticColor === 'white',\n 'spectrum-CircleLoader--staticBlack': staticColor === 'black'\n },\n styleProps.className\n )\n }>\n <div className={classNames(styles, 'spectrum-CircleLoader-track')} />\n <div className={classNames(styles, 'spectrum-CircleLoader-fills')} >\n <div className={classNames(styles, 'spectrum-CircleLoader-fillMask1')} >\n <div\n className={classNames(styles, 'spectrum-CircleLoader-fillSubMask1')}\n data-testid=\"fillSubMask1\"\n style={subMask1Style}>\n <div className={classNames(styles, 'spectrum-CircleLoader-fill')} />\n </div>\n </div>\n <div className={classNames(styles, 'spectrum-CircleLoader-fillMask2')} >\n <div\n className={classNames(styles, 'spectrum-CircleLoader-fillSubMask2')}\n data-testid=\"fillSubMask2\"\n style={subMask2Style} >\n <div className={classNames(styles, 'spectrum-CircleLoader-fill')} />\n </div>\n </div>\n </div>\n </div>\n );\n}\n\n/**\n * ProgressCircles show the progression of a system operation such as downloading, uploading, or processing, in a visual way.\n * They can represent determinate or indeterminate progress.\n */\nlet _ProgressCircle = React.forwardRef(ProgressCircle);\nexport {_ProgressCircle as ProgressCircle};\n"],"names":[],"version":3,"file":"ProgressCircle.main.js.map"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import "./vars.c3d4124d.css";
|
|
2
|
+
import $a4QS8$circleloader_vars_cssmodulejs from "./circleloader_vars_css.mjs";
|
|
3
|
+
import {clamp as $a4QS8$clamp} from "@react-aria/utils";
|
|
4
|
+
import {useDOMRef as $a4QS8$useDOMRef, useStyleProps as $a4QS8$useStyleProps, classNames as $a4QS8$classNames} from "@react-spectrum/utils";
|
|
5
|
+
import $a4QS8$react from "react";
|
|
6
|
+
import {useProgressBar as $a4QS8$useProgressBar} from "@react-aria/progress";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function $parcel$interopDefault(a) {
|
|
10
|
+
return a && a.__esModule ? a.default : a;
|
|
11
|
+
}
|
|
12
|
+
/*
|
|
13
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
14
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
15
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
16
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
*
|
|
18
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
19
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
20
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
21
|
+
* governing permissions and limitations under the License.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
function $79c16f64960b6385$var$ProgressCircle(props, ref) {
|
|
28
|
+
let { value: value = 0, minValue: minValue = 0, maxValue: maxValue = 100, size: size = 'M', staticColor: staticColor, variant: variant, isIndeterminate: isIndeterminate = false, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, ...otherProps } = props;
|
|
29
|
+
let domRef = (0, $a4QS8$useDOMRef)(ref);
|
|
30
|
+
let { styleProps: styleProps } = (0, $a4QS8$useStyleProps)(otherProps);
|
|
31
|
+
value = (0, $a4QS8$clamp)(value, minValue, maxValue);
|
|
32
|
+
let { progressBarProps: progressBarProps } = (0, $a4QS8$useProgressBar)({
|
|
33
|
+
...props,
|
|
34
|
+
value: value
|
|
35
|
+
});
|
|
36
|
+
let subMask1Style = {};
|
|
37
|
+
let subMask2Style = {};
|
|
38
|
+
if (!isIndeterminate) {
|
|
39
|
+
let percentage = (value - minValue) / (maxValue - minValue) * 100;
|
|
40
|
+
let angle;
|
|
41
|
+
if (percentage > 0 && percentage <= 50) {
|
|
42
|
+
angle = -180 + percentage / 50 * 180;
|
|
43
|
+
subMask1Style.transform = `rotate(${angle}deg)`;
|
|
44
|
+
subMask2Style.transform = 'rotate(-180deg)';
|
|
45
|
+
} else if (percentage > 50) {
|
|
46
|
+
angle = -180 + (percentage - 50) / 50 * 180;
|
|
47
|
+
subMask1Style.transform = 'rotate(0deg)';
|
|
48
|
+
subMask2Style.transform = `rotate(${angle}deg)`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (!ariaLabel && !ariaLabelledby) console.warn('ProgressCircle requires an aria-label or aria-labelledby attribute for accessibility');
|
|
52
|
+
return /*#__PURE__*/ (0, $a4QS8$react).createElement("div", {
|
|
53
|
+
...styleProps,
|
|
54
|
+
...progressBarProps,
|
|
55
|
+
ref: domRef,
|
|
56
|
+
className: (0, $a4QS8$classNames)((0, ($parcel$interopDefault($a4QS8$circleloader_vars_cssmodulejs))), 'spectrum-CircleLoader', {
|
|
57
|
+
'spectrum-CircleLoader--indeterminate': isIndeterminate,
|
|
58
|
+
'spectrum-CircleLoader--small': size === 'S',
|
|
59
|
+
'spectrum-CircleLoader--large': size === 'L',
|
|
60
|
+
'spectrum-CircleLoader--overBackground': variant === 'overBackground',
|
|
61
|
+
'spectrum-CircleLoader--staticWhite': staticColor === 'white',
|
|
62
|
+
'spectrum-CircleLoader--staticBlack': staticColor === 'black'
|
|
63
|
+
}, styleProps.className)
|
|
64
|
+
}, /*#__PURE__*/ (0, $a4QS8$react).createElement("div", {
|
|
65
|
+
className: (0, $a4QS8$classNames)((0, ($parcel$interopDefault($a4QS8$circleloader_vars_cssmodulejs))), 'spectrum-CircleLoader-track')
|
|
66
|
+
}), /*#__PURE__*/ (0, $a4QS8$react).createElement("div", {
|
|
67
|
+
className: (0, $a4QS8$classNames)((0, ($parcel$interopDefault($a4QS8$circleloader_vars_cssmodulejs))), 'spectrum-CircleLoader-fills')
|
|
68
|
+
}, /*#__PURE__*/ (0, $a4QS8$react).createElement("div", {
|
|
69
|
+
className: (0, $a4QS8$classNames)((0, ($parcel$interopDefault($a4QS8$circleloader_vars_cssmodulejs))), 'spectrum-CircleLoader-fillMask1')
|
|
70
|
+
}, /*#__PURE__*/ (0, $a4QS8$react).createElement("div", {
|
|
71
|
+
className: (0, $a4QS8$classNames)((0, ($parcel$interopDefault($a4QS8$circleloader_vars_cssmodulejs))), 'spectrum-CircleLoader-fillSubMask1'),
|
|
72
|
+
"data-testid": "fillSubMask1",
|
|
73
|
+
style: subMask1Style
|
|
74
|
+
}, /*#__PURE__*/ (0, $a4QS8$react).createElement("div", {
|
|
75
|
+
className: (0, $a4QS8$classNames)((0, ($parcel$interopDefault($a4QS8$circleloader_vars_cssmodulejs))), 'spectrum-CircleLoader-fill')
|
|
76
|
+
}))), /*#__PURE__*/ (0, $a4QS8$react).createElement("div", {
|
|
77
|
+
className: (0, $a4QS8$classNames)((0, ($parcel$interopDefault($a4QS8$circleloader_vars_cssmodulejs))), 'spectrum-CircleLoader-fillMask2')
|
|
78
|
+
}, /*#__PURE__*/ (0, $a4QS8$react).createElement("div", {
|
|
79
|
+
className: (0, $a4QS8$classNames)((0, ($parcel$interopDefault($a4QS8$circleloader_vars_cssmodulejs))), 'spectrum-CircleLoader-fillSubMask2'),
|
|
80
|
+
"data-testid": "fillSubMask2",
|
|
81
|
+
style: subMask2Style
|
|
82
|
+
}, /*#__PURE__*/ (0, $a4QS8$react).createElement("div", {
|
|
83
|
+
className: (0, $a4QS8$classNames)((0, ($parcel$interopDefault($a4QS8$circleloader_vars_cssmodulejs))), 'spectrum-CircleLoader-fill')
|
|
84
|
+
})))));
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* ProgressCircles show the progression of a system operation such as downloading, uploading, or processing, in a visual way.
|
|
88
|
+
* They can represent determinate or indeterminate progress.
|
|
89
|
+
*/ let $79c16f64960b6385$export$c79b9d6b4cc92af7 = /*#__PURE__*/ (0, $a4QS8$react).forwardRef($79c16f64960b6385$var$ProgressCircle);
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
export {$79c16f64960b6385$export$c79b9d6b4cc92af7 as ProgressCircle};
|
|
93
|
+
//# sourceMappingURL=ProgressCircle.module.js.map
|