@react-spectrum/progress 3.7.23 → 3.8.0
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/import.mjs +4 -4
- package/dist/main.js +6 -6
- package/dist/main.js.map +1 -1
- package/dist/module.js +4 -4
- package/dist/module.js.map +1 -1
- package/dist/types/src/index.d.ts +6 -0
- package/package.json +12 -29
- package/src/index.ts +7 -4
- package/dist/ProgressBar.main.js +0 -50
- package/dist/ProgressBar.main.js.map +0 -1
- package/dist/ProgressBar.mjs +0 -45
- package/dist/ProgressBar.module.js +0 -45
- package/dist/ProgressBar.module.js.map +0 -1
- package/dist/ProgressBarBase.main.js +0 -72
- package/dist/ProgressBarBase.main.js.map +0 -1
- package/dist/ProgressBarBase.mjs +0 -67
- package/dist/ProgressBarBase.module.js +0 -67
- package/dist/ProgressBarBase.module.js.map +0 -1
- package/dist/ProgressCircle.main.js +0 -94
- package/dist/ProgressCircle.main.js.map +0 -1
- package/dist/ProgressCircle.mjs +0 -89
- package/dist/ProgressCircle.module.js +0 -89
- package/dist/ProgressCircle.module.js.map +0 -1
- package/dist/barloader_vars_css.main.js +0 -73
- package/dist/barloader_vars_css.main.js.map +0 -1
- package/dist/barloader_vars_css.mjs +0 -75
- package/dist/barloader_vars_css.module.js +0 -75
- package/dist/barloader_vars_css.module.js.map +0 -1
- package/dist/circleloader_vars_css.main.js +0 -80
- package/dist/circleloader_vars_css.main.js.map +0 -1
- package/dist/circleloader_vars_css.mjs +0 -82
- package/dist/circleloader_vars_css.module.js +0 -82
- package/dist/circleloader_vars_css.module.js.map +0 -1
- package/dist/progress.e9f8ae49.css +0 -719
- package/dist/progress.e9f8ae49.css.map +0 -1
- package/dist/progress.fc185de6.css +0 -288
- package/dist/progress.fc185de6.css.map +0 -1
- package/dist/types.d.ts +0 -22
- package/dist/types.d.ts.map +0 -1
- package/src/ProgressBar.tsx +0 -49
- package/src/ProgressBarBase.tsx +0 -99
- package/src/ProgressCircle.tsx +0 -106
package/dist/import.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {ProgressBar as $
|
|
2
|
-
import {ProgressCircle as $
|
|
3
|
-
import {ProgressBarBase as $
|
|
1
|
+
import {ProgressBar as $ccdd476060bddf8d$re_export$ProgressBar} from "@adobe/react-spectrum/ProgressBar";
|
|
2
|
+
import {ProgressCircle as $ccdd476060bddf8d$re_export$ProgressCircle} from "@adobe/react-spectrum/ProgressCircle";
|
|
3
|
+
import {ProgressBarBase as $ccdd476060bddf8d$re_export$ProgressBarBase} from "@adobe/react-spectrum/private/progress/ProgressBarBase";
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -18,5 +18,5 @@ import {ProgressBarBase as $ddf9337e928b5fe6$export$7c6ed87244065f3a} from "./Pr
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
export {$
|
|
21
|
+
export {$ccdd476060bddf8d$re_export$ProgressBar as ProgressBar, $ccdd476060bddf8d$re_export$ProgressCircle as ProgressCircle, $ccdd476060bddf8d$re_export$ProgressBarBase as ProgressBarBase};
|
|
22
22
|
//# sourceMappingURL=module.js.map
|
package/dist/main.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $
|
|
3
|
-
var $
|
|
1
|
+
var $cv5kY$adobereactspectrumProgressBar = require("@adobe/react-spectrum/ProgressBar");
|
|
2
|
+
var $cv5kY$adobereactspectrumProgressCircle = require("@adobe/react-spectrum/ProgressCircle");
|
|
3
|
+
var $cv5kY$adobereactspectrumprivateprogressProgressBarBase = require("@adobe/react-spectrum/private/progress/ProgressBarBase");
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
function $parcel$export(e, n, v, s) {
|
|
7
7
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
$parcel$export(module.exports, "ProgressBar", ()
|
|
11
|
-
$parcel$export(module.exports, "ProgressCircle", ()
|
|
12
|
-
$parcel$export(module.exports, "ProgressBarBase", ()
|
|
10
|
+
$parcel$export(module.exports, "ProgressBar", function () { return $cv5kY$adobereactspectrumProgressBar.ProgressBar; });
|
|
11
|
+
$parcel$export(module.exports, "ProgressCircle", function () { return $cv5kY$adobereactspectrumProgressCircle.ProgressCircle; });
|
|
12
|
+
$parcel$export(module.exports, "ProgressBarBase", function () { return $cv5kY$adobereactspectrumprivateprogressProgressBarBase.ProgressBarBase; });
|
|
13
13
|
/*
|
|
14
14
|
* Copyright 2020 Adobe. All rights reserved.
|
|
15
15
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/progress/src/index.ts"],"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\n/// <reference types=\"css-module-types\" />\n\nexport {ProgressBar} from '
|
|
1
|
+
{"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/progress/src/index.ts"],"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\n/// <reference types=\"css-module-types\" />\n\nexport {ProgressBar} from '@adobe/react-spectrum/ProgressBar';\n\nexport {ProgressCircle} from '@adobe/react-spectrum/ProgressCircle';\nexport {ProgressBarBase} from '@adobe/react-spectrum/private/progress/ProgressBarBase';\nexport type {SpectrumProgressBarBaseProps} from '@adobe/react-spectrum/private/progress/ProgressBarBase';\nexport type {SpectrumProgressBarProps} from '@adobe/react-spectrum/ProgressBar';\nexport type {SpectrumProgressCircleProps, ProgressCircleProps, AriaProgressCircleProps} from '@adobe/react-spectrum/ProgressCircle';\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {ProgressBar as $
|
|
2
|
-
import {ProgressCircle as $
|
|
3
|
-
import {ProgressBarBase as $
|
|
1
|
+
import {ProgressBar as $ccdd476060bddf8d$re_export$ProgressBar} from "@adobe/react-spectrum/ProgressBar";
|
|
2
|
+
import {ProgressCircle as $ccdd476060bddf8d$re_export$ProgressCircle} from "@adobe/react-spectrum/ProgressCircle";
|
|
3
|
+
import {ProgressBarBase as $ccdd476060bddf8d$re_export$ProgressBarBase} from "@adobe/react-spectrum/private/progress/ProgressBarBase";
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -18,5 +18,5 @@ import {ProgressBarBase as $ddf9337e928b5fe6$export$7c6ed87244065f3a} from "./Pr
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
export {$
|
|
21
|
+
export {$ccdd476060bddf8d$re_export$ProgressBar as ProgressBar, $ccdd476060bddf8d$re_export$ProgressCircle as ProgressCircle, $ccdd476060bddf8d$re_export$ProgressBarBase as ProgressBarBase};
|
|
22
22
|
//# sourceMappingURL=module.js.map
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/progress/src/index.ts"],"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\n/// <reference types=\"css-module-types\" />\n\nexport {ProgressBar} from '
|
|
1
|
+
{"mappings":";;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/progress/src/index.ts"],"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\n/// <reference types=\"css-module-types\" />\n\nexport {ProgressBar} from '@adobe/react-spectrum/ProgressBar';\n\nexport {ProgressCircle} from '@adobe/react-spectrum/ProgressCircle';\nexport {ProgressBarBase} from '@adobe/react-spectrum/private/progress/ProgressBarBase';\nexport type {SpectrumProgressBarBaseProps} from '@adobe/react-spectrum/private/progress/ProgressBarBase';\nexport type {SpectrumProgressBarProps} from '@adobe/react-spectrum/ProgressBar';\nexport type {SpectrumProgressCircleProps, ProgressCircleProps, AriaProgressCircleProps} from '@adobe/react-spectrum/ProgressCircle';\n"],"names":[],"version":3,"file":"module.js.map"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ProgressBar } from '@adobe/react-spectrum/ProgressBar';
|
|
2
|
+
export { ProgressCircle } from '@adobe/react-spectrum/ProgressCircle';
|
|
3
|
+
export { ProgressBarBase } from '@adobe/react-spectrum/private/progress/ProgressBarBase';
|
|
4
|
+
export type { SpectrumProgressBarBaseProps } from '@adobe/react-spectrum/private/progress/ProgressBarBase';
|
|
5
|
+
export type { SpectrumProgressBarProps } from '@adobe/react-spectrum/ProgressBar';
|
|
6
|
+
export type { SpectrumProgressCircleProps, ProgressCircleProps, AriaProgressCircleProps } from '@adobe/react-spectrum/ProgressCircle';
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/progress",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
7
7
|
"module": "dist/module.js",
|
|
8
8
|
"exports": {
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
"./dist/types.d.ts",
|
|
12
|
-
"./
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
9
|
+
".": {
|
|
10
|
+
"source": "./src/index.ts",
|
|
11
|
+
"types": "./dist/types/src/index.d.ts",
|
|
12
|
+
"import": "./dist/import.mjs",
|
|
13
|
+
"require": "./dist/main.js"
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
16
|
},
|
|
17
|
-
"types": "dist/types.d.ts",
|
|
17
|
+
"types": "dist/types/src/index.d.ts",
|
|
18
18
|
"source": "src/index.ts",
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
@@ -24,39 +24,22 @@
|
|
|
24
24
|
"*.css"
|
|
25
25
|
],
|
|
26
26
|
"targets": {
|
|
27
|
-
"
|
|
28
|
-
"includeNodeModules": [
|
|
29
|
-
"@adobe/spectrum-css-temp"
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
|
-
"module": {
|
|
33
|
-
"includeNodeModules": [
|
|
34
|
-
"@adobe/spectrum-css-temp"
|
|
35
|
-
]
|
|
36
|
-
}
|
|
27
|
+
"types": false
|
|
37
28
|
},
|
|
38
29
|
"repository": {
|
|
39
30
|
"type": "git",
|
|
40
31
|
"url": "https://github.com/adobe/react-spectrum"
|
|
41
32
|
},
|
|
42
33
|
"dependencies": {
|
|
43
|
-
"@react-
|
|
44
|
-
"@react-aria/utils": "^3.33.1",
|
|
45
|
-
"@react-spectrum/utils": "^3.12.12",
|
|
46
|
-
"@react-types/progress": "^3.5.18",
|
|
47
|
-
"@react-types/shared": "^3.33.1",
|
|
34
|
+
"@adobe/react-spectrum": "3.47.0",
|
|
48
35
|
"@swc/helpers": "^0.5.0"
|
|
49
36
|
},
|
|
50
|
-
"devDependencies": {
|
|
51
|
-
"@adobe/spectrum-css-temp": "3.0.0-alpha.1"
|
|
52
|
-
},
|
|
53
37
|
"peerDependencies": {
|
|
54
|
-
"@react-spectrum/provider": "^3.0.0",
|
|
55
38
|
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
|
|
56
39
|
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
|
57
40
|
},
|
|
58
41
|
"publishConfig": {
|
|
59
42
|
"access": "public"
|
|
60
43
|
},
|
|
61
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
|
|
62
45
|
}
|
package/src/index.ts
CHANGED
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
|
|
13
13
|
/// <reference types="css-module-types" />
|
|
14
14
|
|
|
15
|
-
export {ProgressBar} from '
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
export
|
|
15
|
+
export {ProgressBar} from '@adobe/react-spectrum/ProgressBar';
|
|
16
|
+
|
|
17
|
+
export {ProgressCircle} from '@adobe/react-spectrum/ProgressCircle';
|
|
18
|
+
export {ProgressBarBase} from '@adobe/react-spectrum/private/progress/ProgressBarBase';
|
|
19
|
+
export type {SpectrumProgressBarBaseProps} from '@adobe/react-spectrum/private/progress/ProgressBarBase';
|
|
20
|
+
export type {SpectrumProgressBarProps} from '@adobe/react-spectrum/ProgressBar';
|
|
21
|
+
export type {SpectrumProgressCircleProps, ProgressCircleProps, AriaProgressCircleProps} from '@adobe/react-spectrum/ProgressCircle';
|
package/dist/ProgressBar.main.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
var $3d86ae6a9356cc8a$exports = require("./ProgressBarBase.main.js");
|
|
2
|
-
require("./progress.fc185de6.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
|
-
const $08d0cdc7f7a792a7$export$c17561cb55d4db30 = /*#__PURE__*/ (0, ($parcel$interopDefault($24n0W$react))).forwardRef(function 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
|
-
|
|
50
|
-
//# sourceMappingURL=ProgressBar.main.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAcM,MAAM,0DAAc,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,YAAY,KAA+B,EAAE,GAA2B;IAC3H,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","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\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 */\nexport const ProgressBar = React.forwardRef(function 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"],"names":[],"version":3,"file":"ProgressBar.main.js.map"}
|
package/dist/ProgressBar.mjs
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import {ProgressBarBase as $ddf9337e928b5fe6$export$7c6ed87244065f3a} from "./ProgressBarBase.mjs";
|
|
2
|
-
import "./progress.fc185de6.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
|
-
const $551ca31cb687f352$export$c17561cb55d4db30 = /*#__PURE__*/ (0, $b214y$react).forwardRef(function 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
|
-
|
|
44
|
-
export {$551ca31cb687f352$export$c17561cb55d4db30 as ProgressBar};
|
|
45
|
-
//# sourceMappingURL=ProgressBar.module.js.map
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import {ProgressBarBase as $ddf9337e928b5fe6$export$7c6ed87244065f3a} from "./ProgressBarBase.module.js";
|
|
2
|
-
import "./progress.fc185de6.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
|
-
const $551ca31cb687f352$export$c17561cb55d4db30 = /*#__PURE__*/ (0, $b214y$react).forwardRef(function 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
|
-
|
|
44
|
-
export {$551ca31cb687f352$export$c17561cb55d4db30 as ProgressBar};
|
|
45
|
-
//# sourceMappingURL=ProgressBar.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAcM,MAAM,0DAAc,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,YAAY,KAA+B,EAAE,GAA2B;IAC3H,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","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\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 */\nexport const ProgressBar = React.forwardRef(function 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"],"names":[],"version":3,"file":"ProgressBar.module.js.map"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
require("./progress.fc185de6.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
|
-
const $3d86ae6a9356cc8a$export$7c6ed87244065f3a = /*#__PURE__*/ (0, ($parcel$interopDefault($jAYvx$react))).forwardRef(function ProgressBarBase(props, ref) {
|
|
32
|
-
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;
|
|
33
|
-
let domRef = (0, $jAYvx$reactspectrumutils.useDOMRef)(ref);
|
|
34
|
-
let { styleProps: styleProps } = (0, $jAYvx$reactspectrumutils.useStyleProps)(otherProps);
|
|
35
|
-
value = (0, $jAYvx$reactariautils.clamp)(value, minValue, maxValue);
|
|
36
|
-
let barStyle = {};
|
|
37
|
-
if (!isIndeterminate) {
|
|
38
|
-
let percentage = (value - minValue) / (maxValue - minValue);
|
|
39
|
-
barStyle.width = `${Math.round(percentage * 100)}%`;
|
|
40
|
-
}
|
|
41
|
-
// Ideally this should be in useProgressBar, but children
|
|
42
|
-
// are not supported in ProgressCircle which shares that hook...
|
|
43
|
-
if (!label && !ariaLabel && !ariaLabelledby && process.env.NODE_ENV !== 'production') console.warn('If you do not provide a visible label via children, you must specify an aria-label or aria-labelledby attribute for accessibility');
|
|
44
|
-
// use inline style for fit-content because cssnano is too smart for us and will strip out the -moz prefix in css files
|
|
45
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($jAYvx$react))).createElement("div", {
|
|
46
|
-
...barProps,
|
|
47
|
-
ref: domRef,
|
|
48
|
-
className: (0, $jAYvx$reactspectrumutils.classNames)((0, ($parcel$interopDefault($9f78a6c009f32d0a$exports))), 'spectrum-BarLoader', {
|
|
49
|
-
'spectrum-BarLoader--small': size === 'S',
|
|
50
|
-
'spectrum-BarLoader--large': size === 'L',
|
|
51
|
-
'spectrum-BarLoader--indeterminate': isIndeterminate,
|
|
52
|
-
'spectrum-BarLoader--sideLabel': labelPosition === 'side'
|
|
53
|
-
}, barClassName, styleProps.className),
|
|
54
|
-
style: {
|
|
55
|
-
minWidth: '-moz-fit-content',
|
|
56
|
-
...styleProps.style
|
|
57
|
-
}
|
|
58
|
-
}, label && /*#__PURE__*/ (0, ($parcel$interopDefault($jAYvx$react))).createElement("span", {
|
|
59
|
-
...labelProps,
|
|
60
|
-
className: (0, $jAYvx$reactspectrumutils.classNames)((0, ($parcel$interopDefault($9f78a6c009f32d0a$exports))), 'spectrum-BarLoader-label')
|
|
61
|
-
}, label), showValueLabel && barProps && /*#__PURE__*/ (0, ($parcel$interopDefault($jAYvx$react))).createElement("div", {
|
|
62
|
-
className: (0, $jAYvx$reactspectrumutils.classNames)((0, ($parcel$interopDefault($9f78a6c009f32d0a$exports))), 'spectrum-BarLoader-percentage')
|
|
63
|
-
}, barProps['aria-valuetext']), /*#__PURE__*/ (0, ($parcel$interopDefault($jAYvx$react))).createElement("div", {
|
|
64
|
-
className: (0, $jAYvx$reactspectrumutils.classNames)((0, ($parcel$interopDefault($9f78a6c009f32d0a$exports))), 'spectrum-BarLoader-track')
|
|
65
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($jAYvx$react))).createElement("div", {
|
|
66
|
-
className: (0, $jAYvx$reactspectrumutils.classNames)((0, ($parcel$interopDefault($9f78a6c009f32d0a$exports))), 'spectrum-BarLoader-fill'),
|
|
67
|
-
style: barStyle
|
|
68
|
-
})));
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
//# sourceMappingURL=ProgressBarBase.main.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAgBM,MAAM,0DAAkB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,gBAAgB,KAA2B,EAAE,GAA2B;IAC/H,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,GAAG,KAAK,KAAK,CAAC,aAAa,KAAK,CAAC,CAAC;IACrD;IAEA,yDAAyD;IACzD,gEAAgE;IAChE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,kBAAkB,QAAQ,GAAG,CAAC,QAAQ,KAAK,cACtE,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","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.\nexport const ProgressBarBase = React.forwardRef(function 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 && process.env.NODE_ENV !== 'production') {\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"],"names":[],"version":3,"file":"ProgressBarBase.main.js.map"}
|
package/dist/ProgressBarBase.mjs
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import "./progress.fc185de6.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
|
-
const $ddf9337e928b5fe6$export$7c6ed87244065f3a = /*#__PURE__*/ (0, $hlUTw$react).forwardRef(function ProgressBarBase(props, ref) {
|
|
26
|
-
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;
|
|
27
|
-
let domRef = (0, $hlUTw$useDOMRef)(ref);
|
|
28
|
-
let { styleProps: styleProps } = (0, $hlUTw$useStyleProps)(otherProps);
|
|
29
|
-
value = (0, $hlUTw$clamp)(value, minValue, maxValue);
|
|
30
|
-
let barStyle = {};
|
|
31
|
-
if (!isIndeterminate) {
|
|
32
|
-
let percentage = (value - minValue) / (maxValue - minValue);
|
|
33
|
-
barStyle.width = `${Math.round(percentage * 100)}%`;
|
|
34
|
-
}
|
|
35
|
-
// Ideally this should be in useProgressBar, but children
|
|
36
|
-
// are not supported in ProgressCircle which shares that hook...
|
|
37
|
-
if (!label && !ariaLabel && !ariaLabelledby && process.env.NODE_ENV !== 'production') console.warn('If you do not provide a visible label via children, you must specify an aria-label or aria-labelledby attribute for accessibility');
|
|
38
|
-
// use inline style for fit-content because cssnano is too smart for us and will strip out the -moz prefix in css files
|
|
39
|
-
return /*#__PURE__*/ (0, $hlUTw$react).createElement("div", {
|
|
40
|
-
...barProps,
|
|
41
|
-
ref: domRef,
|
|
42
|
-
className: (0, $hlUTw$classNames)((0, ($parcel$interopDefault($hlUTw$barloader_vars_cssmodulejs))), 'spectrum-BarLoader', {
|
|
43
|
-
'spectrum-BarLoader--small': size === 'S',
|
|
44
|
-
'spectrum-BarLoader--large': size === 'L',
|
|
45
|
-
'spectrum-BarLoader--indeterminate': isIndeterminate,
|
|
46
|
-
'spectrum-BarLoader--sideLabel': labelPosition === 'side'
|
|
47
|
-
}, barClassName, styleProps.className),
|
|
48
|
-
style: {
|
|
49
|
-
minWidth: '-moz-fit-content',
|
|
50
|
-
...styleProps.style
|
|
51
|
-
}
|
|
52
|
-
}, label && /*#__PURE__*/ (0, $hlUTw$react).createElement("span", {
|
|
53
|
-
...labelProps,
|
|
54
|
-
className: (0, $hlUTw$classNames)((0, ($parcel$interopDefault($hlUTw$barloader_vars_cssmodulejs))), 'spectrum-BarLoader-label')
|
|
55
|
-
}, label), showValueLabel && barProps && /*#__PURE__*/ (0, $hlUTw$react).createElement("div", {
|
|
56
|
-
className: (0, $hlUTw$classNames)((0, ($parcel$interopDefault($hlUTw$barloader_vars_cssmodulejs))), 'spectrum-BarLoader-percentage')
|
|
57
|
-
}, barProps['aria-valuetext']), /*#__PURE__*/ (0, $hlUTw$react).createElement("div", {
|
|
58
|
-
className: (0, $hlUTw$classNames)((0, ($parcel$interopDefault($hlUTw$barloader_vars_cssmodulejs))), 'spectrum-BarLoader-track')
|
|
59
|
-
}, /*#__PURE__*/ (0, $hlUTw$react).createElement("div", {
|
|
60
|
-
className: (0, $hlUTw$classNames)((0, ($parcel$interopDefault($hlUTw$barloader_vars_cssmodulejs))), 'spectrum-BarLoader-fill'),
|
|
61
|
-
style: barStyle
|
|
62
|
-
})));
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
export {$ddf9337e928b5fe6$export$7c6ed87244065f3a as ProgressBarBase};
|
|
67
|
-
//# sourceMappingURL=ProgressBarBase.module.js.map
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import "./progress.fc185de6.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
|
-
const $ddf9337e928b5fe6$export$7c6ed87244065f3a = /*#__PURE__*/ (0, $hlUTw$react).forwardRef(function ProgressBarBase(props, ref) {
|
|
26
|
-
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;
|
|
27
|
-
let domRef = (0, $hlUTw$useDOMRef)(ref);
|
|
28
|
-
let { styleProps: styleProps } = (0, $hlUTw$useStyleProps)(otherProps);
|
|
29
|
-
value = (0, $hlUTw$clamp)(value, minValue, maxValue);
|
|
30
|
-
let barStyle = {};
|
|
31
|
-
if (!isIndeterminate) {
|
|
32
|
-
let percentage = (value - minValue) / (maxValue - minValue);
|
|
33
|
-
barStyle.width = `${Math.round(percentage * 100)}%`;
|
|
34
|
-
}
|
|
35
|
-
// Ideally this should be in useProgressBar, but children
|
|
36
|
-
// are not supported in ProgressCircle which shares that hook...
|
|
37
|
-
if (!label && !ariaLabel && !ariaLabelledby && process.env.NODE_ENV !== 'production') console.warn('If you do not provide a visible label via children, you must specify an aria-label or aria-labelledby attribute for accessibility');
|
|
38
|
-
// use inline style for fit-content because cssnano is too smart for us and will strip out the -moz prefix in css files
|
|
39
|
-
return /*#__PURE__*/ (0, $hlUTw$react).createElement("div", {
|
|
40
|
-
...barProps,
|
|
41
|
-
ref: domRef,
|
|
42
|
-
className: (0, $hlUTw$classNames)((0, ($parcel$interopDefault($hlUTw$barloader_vars_cssmodulejs))), 'spectrum-BarLoader', {
|
|
43
|
-
'spectrum-BarLoader--small': size === 'S',
|
|
44
|
-
'spectrum-BarLoader--large': size === 'L',
|
|
45
|
-
'spectrum-BarLoader--indeterminate': isIndeterminate,
|
|
46
|
-
'spectrum-BarLoader--sideLabel': labelPosition === 'side'
|
|
47
|
-
}, barClassName, styleProps.className),
|
|
48
|
-
style: {
|
|
49
|
-
minWidth: '-moz-fit-content',
|
|
50
|
-
...styleProps.style
|
|
51
|
-
}
|
|
52
|
-
}, label && /*#__PURE__*/ (0, $hlUTw$react).createElement("span", {
|
|
53
|
-
...labelProps,
|
|
54
|
-
className: (0, $hlUTw$classNames)((0, ($parcel$interopDefault($hlUTw$barloader_vars_cssmodulejs))), 'spectrum-BarLoader-label')
|
|
55
|
-
}, label), showValueLabel && barProps && /*#__PURE__*/ (0, $hlUTw$react).createElement("div", {
|
|
56
|
-
className: (0, $hlUTw$classNames)((0, ($parcel$interopDefault($hlUTw$barloader_vars_cssmodulejs))), 'spectrum-BarLoader-percentage')
|
|
57
|
-
}, barProps['aria-valuetext']), /*#__PURE__*/ (0, $hlUTw$react).createElement("div", {
|
|
58
|
-
className: (0, $hlUTw$classNames)((0, ($parcel$interopDefault($hlUTw$barloader_vars_cssmodulejs))), 'spectrum-BarLoader-track')
|
|
59
|
-
}, /*#__PURE__*/ (0, $hlUTw$react).createElement("div", {
|
|
60
|
-
className: (0, $hlUTw$classNames)((0, ($parcel$interopDefault($hlUTw$barloader_vars_cssmodulejs))), 'spectrum-BarLoader-fill'),
|
|
61
|
-
style: barStyle
|
|
62
|
-
})));
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
export {$ddf9337e928b5fe6$export$7c6ed87244065f3a as ProgressBarBase};
|
|
67
|
-
//# sourceMappingURL=ProgressBarBase.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAgBM,MAAM,0DAAkB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,gBAAgB,KAA2B,EAAE,GAA2B;IAC/H,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,GAAG,KAAK,KAAK,CAAC,aAAa,KAAK,CAAC,CAAC;IACrD;IAEA,yDAAyD;IACzD,gEAAgE;IAChE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,kBAAkB,QAAQ,GAAG,CAAC,QAAQ,KAAK,cACtE,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","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.\nexport const ProgressBarBase = React.forwardRef(function 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 && process.env.NODE_ENV !== 'production') {\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"],"names":[],"version":3,"file":"ProgressBarBase.module.js.map"}
|