@react-spectrum/progress 3.6.2 → 3.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/import.mjs +124 -73
- package/dist/main.css +1 -1
- package/dist/main.js +124 -73
- package/dist/main.js.map +1 -1
- package/dist/module.js +124 -73
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/ProgressBar.tsx +4 -2
- package/src/ProgressCircle.tsx +4 -1
package/dist/main.js
CHANGED
|
@@ -51,55 +51,78 @@ $parcel$export(module.exports, "ProgressBarBase", () => $3d86ae6a9356cc8a$export
|
|
|
51
51
|
|
|
52
52
|
var $9f78a6c009f32d0a$exports = {};
|
|
53
53
|
|
|
54
|
+
$parcel$export($9f78a6c009f32d0a$exports, "focus-ring", () => $9f78a6c009f32d0a$export$f39a09f249340e2a, (v) => $9f78a6c009f32d0a$export$f39a09f249340e2a = v);
|
|
55
|
+
$parcel$export($9f78a6c009f32d0a$exports, "i18nFontFamily", () => $9f78a6c009f32d0a$export$8c4ee2c50c22c514, (v) => $9f78a6c009f32d0a$export$8c4ee2c50c22c514 = v);
|
|
56
|
+
$parcel$export($9f78a6c009f32d0a$exports, "indeterminate-loop-ltr", () => $9f78a6c009f32d0a$export$a889038a25113dd4, (v) => $9f78a6c009f32d0a$export$a889038a25113dd4 = v);
|
|
57
|
+
$parcel$export($9f78a6c009f32d0a$exports, "indeterminate-loop-rtl", () => $9f78a6c009f32d0a$export$aeff243cf3356f00, (v) => $9f78a6c009f32d0a$export$aeff243cf3356f00 = v);
|
|
58
|
+
$parcel$export($9f78a6c009f32d0a$exports, "is-critical", () => $9f78a6c009f32d0a$export$a1f608a9810da50f, (v) => $9f78a6c009f32d0a$export$a1f608a9810da50f = v);
|
|
59
|
+
$parcel$export($9f78a6c009f32d0a$exports, "is-positive", () => $9f78a6c009f32d0a$export$aea9fd919467f03a, (v) => $9f78a6c009f32d0a$export$aea9fd919467f03a = v);
|
|
60
|
+
$parcel$export($9f78a6c009f32d0a$exports, "is-warning", () => $9f78a6c009f32d0a$export$d4ebda6218901908, (v) => $9f78a6c009f32d0a$export$d4ebda6218901908 = v);
|
|
54
61
|
$parcel$export($9f78a6c009f32d0a$exports, "spectrum-BarLoader", () => $9f78a6c009f32d0a$export$162ba336fb0c239f, (v) => $9f78a6c009f32d0a$export$162ba336fb0c239f = v);
|
|
55
62
|
$parcel$export($9f78a6c009f32d0a$exports, "spectrum-BarLoader--indeterminate", () => $9f78a6c009f32d0a$export$1249dfbb98223794, (v) => $9f78a6c009f32d0a$export$1249dfbb98223794 = v);
|
|
63
|
+
$parcel$export($9f78a6c009f32d0a$exports, "spectrum-BarLoader--overBackground", () => $9f78a6c009f32d0a$export$55612d0bd9b5d41, (v) => $9f78a6c009f32d0a$export$55612d0bd9b5d41 = v);
|
|
56
64
|
$parcel$export($9f78a6c009f32d0a$exports, "spectrum-BarLoader--sideLabel", () => $9f78a6c009f32d0a$export$99af8802cc2a10dc, (v) => $9f78a6c009f32d0a$export$99af8802cc2a10dc = v);
|
|
57
|
-
$parcel$export($9f78a6c009f32d0a$exports, "spectrum-BarLoader
|
|
65
|
+
$parcel$export($9f78a6c009f32d0a$exports, "spectrum-BarLoader--small", () => $9f78a6c009f32d0a$export$b945305960ad74a7, (v) => $9f78a6c009f32d0a$export$b945305960ad74a7 = v);
|
|
66
|
+
$parcel$export($9f78a6c009f32d0a$exports, "spectrum-BarLoader--staticBlack", () => $9f78a6c009f32d0a$export$f45257a01e7aabeb, (v) => $9f78a6c009f32d0a$export$f45257a01e7aabeb = v);
|
|
67
|
+
$parcel$export($9f78a6c009f32d0a$exports, "spectrum-BarLoader--staticWhite", () => $9f78a6c009f32d0a$export$734e9273ae1f542e, (v) => $9f78a6c009f32d0a$export$734e9273ae1f542e = v);
|
|
58
68
|
$parcel$export($9f78a6c009f32d0a$exports, "spectrum-BarLoader-fill", () => $9f78a6c009f32d0a$export$84c9ee7bc724b71b, (v) => $9f78a6c009f32d0a$export$84c9ee7bc724b71b = v);
|
|
59
69
|
$parcel$export($9f78a6c009f32d0a$exports, "spectrum-BarLoader-label", () => $9f78a6c009f32d0a$export$5379ba198163be86, (v) => $9f78a6c009f32d0a$export$5379ba198163be86 = v);
|
|
60
70
|
$parcel$export($9f78a6c009f32d0a$exports, "spectrum-BarLoader-percentage", () => $9f78a6c009f32d0a$export$ecc9c825de9d1a18, (v) => $9f78a6c009f32d0a$export$ecc9c825de9d1a18 = v);
|
|
61
|
-
$parcel$export($9f78a6c009f32d0a$exports, "spectrum-BarLoader
|
|
62
|
-
$parcel$export($9f78a6c009f32d0a$exports, "
|
|
63
|
-
$parcel$export($9f78a6c009f32d0a$exports, "
|
|
64
|
-
$parcel$export($9f78a6c009f32d0a$exports, "spectrum-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
71
|
+
$parcel$export($9f78a6c009f32d0a$exports, "spectrum-BarLoader-track", () => $9f78a6c009f32d0a$export$3e2e13fb57b5c74b, (v) => $9f78a6c009f32d0a$export$3e2e13fb57b5c74b = v);
|
|
72
|
+
$parcel$export($9f78a6c009f32d0a$exports, "spectrum-FocusRing-ring", () => $9f78a6c009f32d0a$export$4109102f950813a6, (v) => $9f78a6c009f32d0a$export$4109102f950813a6 = v);
|
|
73
|
+
$parcel$export($9f78a6c009f32d0a$exports, "spectrum-FocusRing", () => $9f78a6c009f32d0a$export$24c7f46a6e3605dd, (v) => $9f78a6c009f32d0a$export$24c7f46a6e3605dd = v);
|
|
74
|
+
$parcel$export($9f78a6c009f32d0a$exports, "spectrum-FocusRing--quiet", () => $9f78a6c009f32d0a$export$2927016961429360, (v) => $9f78a6c009f32d0a$export$2927016961429360 = v);
|
|
75
|
+
var $9f78a6c009f32d0a$export$f39a09f249340e2a;
|
|
76
|
+
var $9f78a6c009f32d0a$export$8c4ee2c50c22c514;
|
|
77
|
+
var $9f78a6c009f32d0a$export$a889038a25113dd4;
|
|
78
|
+
var $9f78a6c009f32d0a$export$aeff243cf3356f00;
|
|
79
|
+
var $9f78a6c009f32d0a$export$a1f608a9810da50f;
|
|
80
|
+
var $9f78a6c009f32d0a$export$aea9fd919467f03a;
|
|
81
|
+
var $9f78a6c009f32d0a$export$d4ebda6218901908;
|
|
68
82
|
var $9f78a6c009f32d0a$export$162ba336fb0c239f;
|
|
69
83
|
var $9f78a6c009f32d0a$export$1249dfbb98223794;
|
|
84
|
+
var $9f78a6c009f32d0a$export$55612d0bd9b5d41;
|
|
70
85
|
var $9f78a6c009f32d0a$export$99af8802cc2a10dc;
|
|
71
|
-
var $9f78a6c009f32d0a$export$
|
|
86
|
+
var $9f78a6c009f32d0a$export$b945305960ad74a7;
|
|
87
|
+
var $9f78a6c009f32d0a$export$f45257a01e7aabeb;
|
|
88
|
+
var $9f78a6c009f32d0a$export$734e9273ae1f542e;
|
|
72
89
|
var $9f78a6c009f32d0a$export$84c9ee7bc724b71b;
|
|
73
90
|
var $9f78a6c009f32d0a$export$5379ba198163be86;
|
|
74
91
|
var $9f78a6c009f32d0a$export$ecc9c825de9d1a18;
|
|
75
|
-
var $9f78a6c009f32d0a$export$
|
|
76
|
-
var $9f78a6c009f32d0a$export$
|
|
77
|
-
var $9f78a6c009f32d0a$export$
|
|
78
|
-
var $9f78a6c009f32d0a$export$
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
$9f78a6c009f32d0a$export$
|
|
83
|
-
$9f78a6c009f32d0a$export$
|
|
84
|
-
$9f78a6c009f32d0a$export$
|
|
85
|
-
$9f78a6c009f32d0a$export$
|
|
86
|
-
$9f78a6c009f32d0a$export$
|
|
87
|
-
$9f78a6c009f32d0a$export$
|
|
88
|
-
$9f78a6c009f32d0a$export$
|
|
89
|
-
$9f78a6c009f32d0a$export$
|
|
90
|
-
$9f78a6c009f32d0a$export$
|
|
91
|
-
$9f78a6c009f32d0a$export$
|
|
92
|
-
$9f78a6c009f32d0a$export$
|
|
93
|
-
$9f78a6c009f32d0a$export$
|
|
94
|
-
$9f78a6c009f32d0a$export$
|
|
95
|
-
$9f78a6c009f32d0a$export$
|
|
92
|
+
var $9f78a6c009f32d0a$export$3e2e13fb57b5c74b;
|
|
93
|
+
var $9f78a6c009f32d0a$export$4109102f950813a6;
|
|
94
|
+
var $9f78a6c009f32d0a$export$24c7f46a6e3605dd;
|
|
95
|
+
var $9f78a6c009f32d0a$export$2927016961429360;
|
|
96
|
+
$9f78a6c009f32d0a$export$f39a09f249340e2a = `uFrYBa_focus-ring`;
|
|
97
|
+
$9f78a6c009f32d0a$export$8c4ee2c50c22c514 = `uFrYBa_i18nFontFamily`;
|
|
98
|
+
$9f78a6c009f32d0a$export$a889038a25113dd4 = `uFrYBa_indeterminate-loop-ltr`;
|
|
99
|
+
$9f78a6c009f32d0a$export$a889038a25113dd4;
|
|
100
|
+
$9f78a6c009f32d0a$export$aeff243cf3356f00 = `uFrYBa_indeterminate-loop-rtl`;
|
|
101
|
+
$9f78a6c009f32d0a$export$aeff243cf3356f00;
|
|
102
|
+
$9f78a6c009f32d0a$export$a1f608a9810da50f = `uFrYBa_is-critical`;
|
|
103
|
+
$9f78a6c009f32d0a$export$aea9fd919467f03a = `uFrYBa_is-positive`;
|
|
104
|
+
$9f78a6c009f32d0a$export$d4ebda6218901908 = `uFrYBa_is-warning`;
|
|
105
|
+
$9f78a6c009f32d0a$export$162ba336fb0c239f = `uFrYBa_spectrum-BarLoader`;
|
|
106
|
+
$9f78a6c009f32d0a$export$1249dfbb98223794 = `uFrYBa_spectrum-BarLoader--indeterminate`;
|
|
107
|
+
$9f78a6c009f32d0a$export$55612d0bd9b5d41 = `uFrYBa_spectrum-BarLoader--overBackground`;
|
|
108
|
+
$9f78a6c009f32d0a$export$99af8802cc2a10dc = `uFrYBa_spectrum-BarLoader--sideLabel`;
|
|
109
|
+
$9f78a6c009f32d0a$export$b945305960ad74a7 = `uFrYBa_spectrum-BarLoader--small`;
|
|
110
|
+
$9f78a6c009f32d0a$export$f45257a01e7aabeb = `uFrYBa_spectrum-BarLoader--staticBlack`;
|
|
111
|
+
$9f78a6c009f32d0a$export$734e9273ae1f542e = `uFrYBa_spectrum-BarLoader--staticWhite`;
|
|
112
|
+
$9f78a6c009f32d0a$export$84c9ee7bc724b71b = `uFrYBa_spectrum-BarLoader-fill`;
|
|
113
|
+
$9f78a6c009f32d0a$export$5379ba198163be86 = `uFrYBa_spectrum-BarLoader-label`;
|
|
114
|
+
$9f78a6c009f32d0a$export$ecc9c825de9d1a18 = `uFrYBa_spectrum-BarLoader-percentage`;
|
|
115
|
+
$9f78a6c009f32d0a$export$3e2e13fb57b5c74b = `uFrYBa_spectrum-BarLoader-track`;
|
|
116
|
+
$9f78a6c009f32d0a$export$4109102f950813a6 = `uFrYBa_spectrum-FocusRing-ring`;
|
|
117
|
+
$9f78a6c009f32d0a$export$24c7f46a6e3605dd = `uFrYBa_spectrum-FocusRing ${$9f78a6c009f32d0a$export$4109102f950813a6}`;
|
|
118
|
+
$9f78a6c009f32d0a$export$2927016961429360 = `uFrYBa_spectrum-FocusRing--quiet`;
|
|
96
119
|
|
|
97
120
|
|
|
98
121
|
// Base ProgressBar component shared with Meter.
|
|
99
122
|
function $3d86ae6a9356cc8a$var$ProgressBarBase(props, ref) {
|
|
100
|
-
let { value: value = 0
|
|
123
|
+
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;
|
|
101
124
|
let domRef = (0, $cIANI$reactspectrumutils.useDOMRef)(ref);
|
|
102
|
-
let { styleProps: styleProps
|
|
125
|
+
let { styleProps: styleProps } = (0, $cIANI$reactspectrumutils.useStyleProps)(otherProps);
|
|
103
126
|
value = (0, $cIANI$reactariautils.clamp)(value, minValue, maxValue);
|
|
104
127
|
let barStyle = {};
|
|
105
128
|
if (!isIndeterminate) {
|
|
@@ -142,15 +165,17 @@ let $3d86ae6a9356cc8a$export$7c6ed87244065f3a = /*#__PURE__*/ (0, ($parcel$inter
|
|
|
142
165
|
|
|
143
166
|
|
|
144
167
|
function $08d0cdc7f7a792a7$var$ProgressBar(props, ref) {
|
|
145
|
-
let { variant: variant
|
|
146
|
-
const { progressBarProps: progressBarProps
|
|
168
|
+
let { staticColor: staticColor, variant: variant, ...otherProps } = props;
|
|
169
|
+
const { progressBarProps: progressBarProps, labelProps: labelProps } = (0, $cIANI$reactariaprogress.useProgressBar)(props);
|
|
147
170
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($cIANI$react))).createElement((0, $3d86ae6a9356cc8a$export$7c6ed87244065f3a), {
|
|
148
171
|
...otherProps,
|
|
149
172
|
ref: ref,
|
|
150
173
|
barProps: progressBarProps,
|
|
151
174
|
labelProps: labelProps,
|
|
152
175
|
barClassName: (0, $cIANI$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($9f78a6c009f32d0a$exports))), {
|
|
153
|
-
"spectrum-BarLoader--overBackground": variant === "overBackground"
|
|
176
|
+
"spectrum-BarLoader--overBackground": variant === "overBackground",
|
|
177
|
+
"spectrum-BarLoader--staticWhite": staticColor === "white",
|
|
178
|
+
"spectrum-BarLoader--staticBlack": staticColor === "black"
|
|
154
179
|
})
|
|
155
180
|
});
|
|
156
181
|
}
|
|
@@ -175,63 +200,87 @@ function $08d0cdc7f7a792a7$var$ProgressBar(props, ref) {
|
|
|
175
200
|
|
|
176
201
|
var $f4d8d13edf2d3ca2$exports = {};
|
|
177
202
|
|
|
178
|
-
$parcel$export($f4d8d13edf2d3ca2$exports, "
|
|
179
|
-
$parcel$export($f4d8d13edf2d3ca2$exports, "
|
|
203
|
+
$parcel$export($f4d8d13edf2d3ca2$exports, "focus-ring", () => $f4d8d13edf2d3ca2$export$f39a09f249340e2a, (v) => $f4d8d13edf2d3ca2$export$f39a09f249340e2a = v);
|
|
204
|
+
$parcel$export($f4d8d13edf2d3ca2$exports, "i18nFontFamily", () => $f4d8d13edf2d3ca2$export$8c4ee2c50c22c514, (v) => $f4d8d13edf2d3ca2$export$8c4ee2c50c22c514 = v);
|
|
180
205
|
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-CircleLoader", () => $f4d8d13edf2d3ca2$export$9633d311d6d6830b, (v) => $f4d8d13edf2d3ca2$export$9633d311d6d6830b = v);
|
|
181
|
-
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-CircleLoader
|
|
182
|
-
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-CircleLoader-
|
|
206
|
+
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-CircleLoader--indeterminate", () => $f4d8d13edf2d3ca2$export$79b7e5abeef5134f, (v) => $f4d8d13edf2d3ca2$export$79b7e5abeef5134f = v);
|
|
207
|
+
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-CircleLoader--indeterminate-fill-submask-2", () => $f4d8d13edf2d3ca2$export$f7083dbeadcbb2bd, (v) => $f4d8d13edf2d3ca2$export$f7083dbeadcbb2bd = v);
|
|
208
|
+
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-CircleLoader--large", () => $f4d8d13edf2d3ca2$export$c8c34e5e37bf511c, (v) => $f4d8d13edf2d3ca2$export$c8c34e5e37bf511c = v);
|
|
209
|
+
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-CircleLoader--overBackground", () => $f4d8d13edf2d3ca2$export$6668708cb539f403, (v) => $f4d8d13edf2d3ca2$export$6668708cb539f403 = v);
|
|
210
|
+
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-CircleLoader--small", () => $f4d8d13edf2d3ca2$export$79819ab9844dbe9b, (v) => $f4d8d13edf2d3ca2$export$79819ab9844dbe9b = v);
|
|
211
|
+
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-CircleLoader--staticBlack", () => $f4d8d13edf2d3ca2$export$7f8072f8867b580e, (v) => $f4d8d13edf2d3ca2$export$7f8072f8867b580e = v);
|
|
212
|
+
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-CircleLoader--staticWhite", () => $f4d8d13edf2d3ca2$export$f2e90b77c21d4ec7, (v) => $f4d8d13edf2d3ca2$export$f2e90b77c21d4ec7 = v);
|
|
183
213
|
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-CircleLoader-fill", () => $f4d8d13edf2d3ca2$export$58fb9ac68cf8e784, (v) => $f4d8d13edf2d3ca2$export$58fb9ac68cf8e784 = v);
|
|
184
214
|
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-CircleLoader-fillMask1", () => $f4d8d13edf2d3ca2$export$b676cd958401a736, (v) => $f4d8d13edf2d3ca2$export$b676cd958401a736 = v);
|
|
185
215
|
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-CircleLoader-fillMask2", () => $f4d8d13edf2d3ca2$export$8c428f4f13e424b, (v) => $f4d8d13edf2d3ca2$export$8c428f4f13e424b = v);
|
|
186
216
|
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-CircleLoader-fillSubMask1", () => $f4d8d13edf2d3ca2$export$98ba5ef650aeb8ca, (v) => $f4d8d13edf2d3ca2$export$98ba5ef650aeb8ca = v);
|
|
187
217
|
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-CircleLoader-fillSubMask2", () => $f4d8d13edf2d3ca2$export$dc70b48c897b0f1a, (v) => $f4d8d13edf2d3ca2$export$dc70b48c897b0f1a = v);
|
|
188
|
-
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-CircleLoader
|
|
189
|
-
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-CircleLoader
|
|
190
|
-
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-
|
|
191
|
-
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-
|
|
218
|
+
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-CircleLoader-fills", () => $f4d8d13edf2d3ca2$export$3038f4c0c86f539b, (v) => $f4d8d13edf2d3ca2$export$3038f4c0c86f539b = v);
|
|
219
|
+
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-CircleLoader-track", () => $f4d8d13edf2d3ca2$export$278efdb85ed802da, (v) => $f4d8d13edf2d3ca2$export$278efdb85ed802da = v);
|
|
220
|
+
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-FocusRing-ring", () => $f4d8d13edf2d3ca2$export$4109102f950813a6, (v) => $f4d8d13edf2d3ca2$export$4109102f950813a6 = v);
|
|
221
|
+
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-FocusRing", () => $f4d8d13edf2d3ca2$export$24c7f46a6e3605dd, (v) => $f4d8d13edf2d3ca2$export$24c7f46a6e3605dd = v);
|
|
222
|
+
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-FocusRing--quiet", () => $f4d8d13edf2d3ca2$export$2927016961429360, (v) => $f4d8d13edf2d3ca2$export$2927016961429360 = v);
|
|
192
223
|
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-fill-mask-1", () => $f4d8d13edf2d3ca2$export$524c81e63e1d64f5, (v) => $f4d8d13edf2d3ca2$export$524c81e63e1d64f5 = v);
|
|
193
|
-
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-
|
|
194
|
-
|
|
195
|
-
var $f4d8d13edf2d3ca2$export$
|
|
224
|
+
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-fill-mask-2", () => $f4d8d13edf2d3ca2$export$7219832bea80eb54, (v) => $f4d8d13edf2d3ca2$export$7219832bea80eb54 = v);
|
|
225
|
+
$parcel$export($f4d8d13edf2d3ca2$exports, "spectrum-fills-rotate", () => $f4d8d13edf2d3ca2$export$3663cbdb240663ec, (v) => $f4d8d13edf2d3ca2$export$3663cbdb240663ec = v);
|
|
226
|
+
var $f4d8d13edf2d3ca2$export$f39a09f249340e2a;
|
|
227
|
+
var $f4d8d13edf2d3ca2$export$8c4ee2c50c22c514;
|
|
196
228
|
var $f4d8d13edf2d3ca2$export$9633d311d6d6830b;
|
|
197
|
-
var $f4d8d13edf2d3ca2$export$
|
|
198
|
-
var $f4d8d13edf2d3ca2$export$
|
|
229
|
+
var $f4d8d13edf2d3ca2$export$79b7e5abeef5134f;
|
|
230
|
+
var $f4d8d13edf2d3ca2$export$f7083dbeadcbb2bd;
|
|
231
|
+
var $f4d8d13edf2d3ca2$export$c8c34e5e37bf511c;
|
|
232
|
+
var $f4d8d13edf2d3ca2$export$6668708cb539f403;
|
|
233
|
+
var $f4d8d13edf2d3ca2$export$79819ab9844dbe9b;
|
|
234
|
+
var $f4d8d13edf2d3ca2$export$7f8072f8867b580e;
|
|
235
|
+
var $f4d8d13edf2d3ca2$export$f2e90b77c21d4ec7;
|
|
199
236
|
var $f4d8d13edf2d3ca2$export$58fb9ac68cf8e784;
|
|
200
237
|
var $f4d8d13edf2d3ca2$export$b676cd958401a736;
|
|
201
238
|
var $f4d8d13edf2d3ca2$export$8c428f4f13e424b;
|
|
202
239
|
var $f4d8d13edf2d3ca2$export$98ba5ef650aeb8ca;
|
|
203
240
|
var $f4d8d13edf2d3ca2$export$dc70b48c897b0f1a;
|
|
204
|
-
var $f4d8d13edf2d3ca2$export$
|
|
205
|
-
var $f4d8d13edf2d3ca2$export$
|
|
206
|
-
var $f4d8d13edf2d3ca2$export$
|
|
207
|
-
var $f4d8d13edf2d3ca2$export$
|
|
241
|
+
var $f4d8d13edf2d3ca2$export$3038f4c0c86f539b;
|
|
242
|
+
var $f4d8d13edf2d3ca2$export$278efdb85ed802da;
|
|
243
|
+
var $f4d8d13edf2d3ca2$export$4109102f950813a6;
|
|
244
|
+
var $f4d8d13edf2d3ca2$export$24c7f46a6e3605dd;
|
|
245
|
+
var $f4d8d13edf2d3ca2$export$2927016961429360;
|
|
208
246
|
var $f4d8d13edf2d3ca2$export$524c81e63e1d64f5;
|
|
209
|
-
var $f4d8d13edf2d3ca2$export$
|
|
210
|
-
$f4d8d13edf2d3ca2$export$
|
|
211
|
-
$f4d8d13edf2d3ca2$export$
|
|
212
|
-
$f4d8d13edf2d3ca2$export$
|
|
213
|
-
$f4d8d13edf2d3ca2$export$
|
|
214
|
-
$f4d8d13edf2d3ca2$export$
|
|
215
|
-
$f4d8d13edf2d3ca2$export$
|
|
216
|
-
$f4d8d13edf2d3ca2$export$
|
|
217
|
-
$f4d8d13edf2d3ca2$export$
|
|
218
|
-
$f4d8d13edf2d3ca2$export$
|
|
219
|
-
$f4d8d13edf2d3ca2$export$
|
|
220
|
-
$f4d8d13edf2d3ca2$export$
|
|
221
|
-
$f4d8d13edf2d3ca2$export$
|
|
222
|
-
$f4d8d13edf2d3ca2$export$
|
|
223
|
-
$f4d8d13edf2d3ca2$export$
|
|
224
|
-
$f4d8d13edf2d3ca2$export$
|
|
225
|
-
$f4d8d13edf2d3ca2$export$
|
|
247
|
+
var $f4d8d13edf2d3ca2$export$7219832bea80eb54;
|
|
248
|
+
var $f4d8d13edf2d3ca2$export$3663cbdb240663ec;
|
|
249
|
+
$f4d8d13edf2d3ca2$export$f39a09f249340e2a = `EQYv7q_focus-ring`;
|
|
250
|
+
$f4d8d13edf2d3ca2$export$8c4ee2c50c22c514 = `EQYv7q_i18nFontFamily`;
|
|
251
|
+
$f4d8d13edf2d3ca2$export$9633d311d6d6830b = `EQYv7q_spectrum-CircleLoader`;
|
|
252
|
+
$f4d8d13edf2d3ca2$export$79b7e5abeef5134f = `EQYv7q_spectrum-CircleLoader--indeterminate`;
|
|
253
|
+
$f4d8d13edf2d3ca2$export$f7083dbeadcbb2bd = `EQYv7q_spectrum-CircleLoader--indeterminate-fill-submask-2`;
|
|
254
|
+
$f4d8d13edf2d3ca2$export$c8c34e5e37bf511c = `EQYv7q_spectrum-CircleLoader--large`;
|
|
255
|
+
$f4d8d13edf2d3ca2$export$6668708cb539f403 = `EQYv7q_spectrum-CircleLoader--overBackground`;
|
|
256
|
+
$f4d8d13edf2d3ca2$export$79819ab9844dbe9b = `EQYv7q_spectrum-CircleLoader--small`;
|
|
257
|
+
$f4d8d13edf2d3ca2$export$7f8072f8867b580e = `EQYv7q_spectrum-CircleLoader--staticBlack`;
|
|
258
|
+
$f4d8d13edf2d3ca2$export$f2e90b77c21d4ec7 = `EQYv7q_spectrum-CircleLoader--staticWhite`;
|
|
259
|
+
$f4d8d13edf2d3ca2$export$58fb9ac68cf8e784 = `EQYv7q_spectrum-CircleLoader-fill`;
|
|
260
|
+
$f4d8d13edf2d3ca2$export$b676cd958401a736 = `EQYv7q_spectrum-CircleLoader-fillMask1`;
|
|
261
|
+
$f4d8d13edf2d3ca2$export$8c428f4f13e424b = `EQYv7q_spectrum-CircleLoader-fillMask2`;
|
|
262
|
+
$f4d8d13edf2d3ca2$export$98ba5ef650aeb8ca = `EQYv7q_spectrum-CircleLoader-fillSubMask1`;
|
|
263
|
+
$f4d8d13edf2d3ca2$export$dc70b48c897b0f1a = `EQYv7q_spectrum-CircleLoader-fillSubMask2`;
|
|
264
|
+
$f4d8d13edf2d3ca2$export$3038f4c0c86f539b = `EQYv7q_spectrum-CircleLoader-fills`;
|
|
265
|
+
$f4d8d13edf2d3ca2$export$278efdb85ed802da = `EQYv7q_spectrum-CircleLoader-track`;
|
|
266
|
+
$f4d8d13edf2d3ca2$export$4109102f950813a6 = `EQYv7q_spectrum-FocusRing-ring`;
|
|
267
|
+
$f4d8d13edf2d3ca2$export$24c7f46a6e3605dd = `EQYv7q_spectrum-FocusRing ${$f4d8d13edf2d3ca2$export$4109102f950813a6}`;
|
|
268
|
+
$f4d8d13edf2d3ca2$export$2927016961429360 = `EQYv7q_spectrum-FocusRing--quiet`;
|
|
269
|
+
$f4d8d13edf2d3ca2$export$524c81e63e1d64f5 = `EQYv7q_spectrum-fill-mask-1`;
|
|
270
|
+
$f4d8d13edf2d3ca2$export$524c81e63e1d64f5;
|
|
271
|
+
$f4d8d13edf2d3ca2$export$7219832bea80eb54 = `EQYv7q_spectrum-fill-mask-2`;
|
|
272
|
+
$f4d8d13edf2d3ca2$export$7219832bea80eb54;
|
|
273
|
+
$f4d8d13edf2d3ca2$export$3663cbdb240663ec = `EQYv7q_spectrum-fills-rotate`;
|
|
274
|
+
$f4d8d13edf2d3ca2$export$3663cbdb240663ec;
|
|
226
275
|
|
|
227
276
|
|
|
228
277
|
|
|
229
278
|
function $365887133501f5a1$var$ProgressCircle(props, ref) {
|
|
230
|
-
let { value: value = 0
|
|
279
|
+
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;
|
|
231
280
|
let domRef = (0, $cIANI$reactspectrumutils.useDOMRef)(ref);
|
|
232
|
-
let { styleProps: styleProps
|
|
281
|
+
let { styleProps: styleProps } = (0, $cIANI$reactspectrumutils.useStyleProps)(otherProps);
|
|
233
282
|
value = (0, $cIANI$reactariautils.clamp)(value, minValue, maxValue);
|
|
234
|
-
let { progressBarProps: progressBarProps
|
|
283
|
+
let { progressBarProps: progressBarProps } = (0, $cIANI$reactariaprogress.useProgressBar)({
|
|
235
284
|
...props,
|
|
236
285
|
value: value
|
|
237
286
|
});
|
|
@@ -259,7 +308,9 @@ function $365887133501f5a1$var$ProgressCircle(props, ref) {
|
|
|
259
308
|
"spectrum-CircleLoader--indeterminate": isIndeterminate,
|
|
260
309
|
"spectrum-CircleLoader--small": size === "S",
|
|
261
310
|
"spectrum-CircleLoader--large": size === "L",
|
|
262
|
-
"spectrum-CircleLoader--overBackground": variant === "overBackground"
|
|
311
|
+
"spectrum-CircleLoader--overBackground": variant === "overBackground",
|
|
312
|
+
"spectrum-CircleLoader--staticWhite": staticColor === "white",
|
|
313
|
+
"spectrum-CircleLoader--staticBlack": staticColor === "black"
|
|
263
314
|
}, styleProps.className)
|
|
264
315
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($cIANI$react))).createElement("div", {
|
|
265
316
|
className: (0, $cIANI$reactspectrumutils.classN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react-spectrum/progress/src/ProgressBar.tsx","packages/@react-spectrum/progress/src/ProgressBarBase.tsx","packages/@adobe/spectrum-css-temp/components/barloader/vars.css","packages/@react-spectrum/progress/src/ProgressCircle.tsx","packages/@adobe/spectrum-css-temp/components/circleloader/vars.css"],"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 './ProgressBar';\nexport {ProgressCircle} from './ProgressCircle';\nexport {ProgressBarBase} from './ProgressBarBase';\nexport type {SpectrumProgressBarProps, SpectrumProgressCircleProps} from '@react-types/progress';\n","/*\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 {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 }\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","/*\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 &&\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","/*\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@import './index.css';\n@import './skin.css';\n","/*\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\nfunction ProgressCircle(props: SpectrumProgressCircleProps, ref: DOMRef<HTMLDivElement>) {\n let {\n value = 0,\n minValue = 0,\n maxValue = 100,\n size = 'M',\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 },\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","/*\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@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"main.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;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.ts","packages/@react-spectrum/progress/src/ProgressBar.tsx","packages/@react-spectrum/progress/src/ProgressBarBase.tsx","packages/@adobe/spectrum-css-temp/components/barloader/vars.css","packages/@react-spectrum/progress/src/ProgressCircle.tsx","packages/@adobe/spectrum-css-temp/components/circleloader/vars.css"],"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 './ProgressBar';\nexport {ProgressCircle} from './ProgressCircle';\nexport {ProgressBarBase} from './ProgressBarBase';\nexport type {SpectrumProgressBarProps, SpectrumProgressCircleProps} from '@react-types/progress';\n","/*\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","/*\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 &&\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","/*\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@import './index.css';\n@import './skin.css';\n","/*\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\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","/*\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@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"main.js.map"}
|