@react-spectrum/s2 3.0.0-nightly-c904e066c-240917 → 3.0.0-nightly-9e79420c1-240918
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/Card.cjs +1 -0
- package/dist/Card.cjs.map +1 -1
- package/dist/Card.css +4 -0
- package/dist/Card.css.map +1 -1
- package/dist/Card.mjs +1 -0
- package/dist/Card.mjs.map +1 -1
- package/dist/CardView.cjs +8 -4
- package/dist/CardView.cjs.map +1 -1
- package/dist/CardView.css.map +1 -1
- package/dist/CardView.mjs +8 -4
- package/dist/CardView.mjs.map +1 -1
- package/dist/ProgressCircle.cjs +69 -254
- package/dist/ProgressCircle.cjs.map +1 -1
- package/dist/ProgressCircle.css +58 -484
- package/dist/ProgressCircle.css.map +1 -1
- package/dist/ProgressCircle.mjs +69 -254
- package/dist/ProgressCircle.mjs.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +14 -14
- package/src/Card.tsx +1 -0
- package/src/CardView.tsx +3 -1
- package/src/ProgressCircle.tsx +73 -433
package/dist/ProgressCircle.cjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
require("./ProgressCircle.css");
|
|
2
2
|
var $ac757a4c2bd72aee$exports = require("./useSpectrumContextProps.cjs");
|
|
3
3
|
var $5RNes$reactjsxruntime = require("react/jsx-runtime");
|
|
4
|
-
var $5RNes$reactariautils = require("@react-aria/utils");
|
|
5
4
|
var $5RNes$reactariacomponents = require("react-aria-components");
|
|
6
5
|
var $5RNes$react = require("react");
|
|
7
6
|
var $5RNes$reactspectrumutils = require("@react-spectrum/utils");
|
|
@@ -28,48 +27,17 @@ $parcel$export(module.exports, "ProgressCircle", () => $1c116ea4b0d2d023$export$
|
|
|
28
27
|
|
|
29
28
|
|
|
30
29
|
|
|
31
|
-
|
|
32
30
|
const $1c116ea4b0d2d023$export$afffa1e5edf12209 = /*#__PURE__*/ (0, $5RNes$react.createContext)(null);
|
|
33
|
-
const $1c116ea4b0d2d023$var$fillMask1Frames = "-_5slx9u";
|
|
34
|
-
const $1c116ea4b0d2d023$var$fillMask2Frames = "-_36n5pc";
|
|
35
|
-
const $1c116ea4b0d2d023$var$fillsRotate = "-nqh121";
|
|
36
|
-
const $1c116ea4b0d2d023$var$circleDims = {
|
|
37
|
-
height: {
|
|
38
|
-
default: 32,
|
|
39
|
-
size: {
|
|
40
|
-
S: 16,
|
|
41
|
-
L: 64
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
width: {
|
|
45
|
-
default: 32,
|
|
46
|
-
size: {
|
|
47
|
-
S: 16,
|
|
48
|
-
L: 64
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
aspectRatio: 'square'
|
|
52
|
-
};
|
|
53
31
|
// Double check the types passed to each style, may not need all for each
|
|
54
32
|
const $1c116ea4b0d2d023$var$wrapper = function anonymous(props, overrides) {
|
|
55
33
|
let rules = " .";
|
|
56
|
-
let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|_9|_8|h|_5|_4|__A|__c|__d|__a|__b|U|__Q|X|Z|V|W|l|q|r)[^\s]+/g) || [];
|
|
34
|
+
let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|_9|_8|h|_5|_4|__A|__c|__d|__a|__b|U|__Q|X|Z|V|W|l|q|r|k|o|p)[^\s]+/g) || [];
|
|
57
35
|
rules += matches.join('');
|
|
58
36
|
let $l = false;
|
|
59
|
-
let $
|
|
37
|
+
let $k = false;
|
|
60
38
|
for (let p of matches){
|
|
61
39
|
if (/^\s*l/.test(p)) $l = true;
|
|
62
|
-
if (/^\s*
|
|
63
|
-
}
|
|
64
|
-
if (props.size === "L") {
|
|
65
|
-
rules += ' kbC';
|
|
66
|
-
rules += ' kB';
|
|
67
|
-
} else if (props.size === "S") {
|
|
68
|
-
rules += ' kbk';
|
|
69
|
-
rules += ' kj';
|
|
70
|
-
} else {
|
|
71
|
-
rules += ' kbr';
|
|
72
|
-
rules += ' kq';
|
|
40
|
+
if (/^\s*k/.test(p)) $k = true;
|
|
73
41
|
}
|
|
74
42
|
if (!$l) {
|
|
75
43
|
if (props.size === "L") {
|
|
@@ -83,199 +51,52 @@ const $1c116ea4b0d2d023$var$wrapper = function anonymous(props, overrides) {
|
|
|
83
51
|
rules += ' lq';
|
|
84
52
|
}
|
|
85
53
|
}
|
|
54
|
+
if (!$k) {
|
|
55
|
+
if (props.size === "L") {
|
|
56
|
+
rules += ' kbC';
|
|
57
|
+
rules += ' kB';
|
|
58
|
+
} else if (props.size === "S") {
|
|
59
|
+
rules += ' kbk';
|
|
60
|
+
rules += ' kj';
|
|
61
|
+
} else {
|
|
62
|
+
rules += ' kbr';
|
|
63
|
+
rules += ' kq';
|
|
64
|
+
}
|
|
65
|
+
}
|
|
86
66
|
rules += ' _bb';
|
|
87
67
|
rules += ' _Zb';
|
|
88
|
-
if (!$U) rules += ' Uc';
|
|
89
68
|
return rules;
|
|
90
69
|
};
|
|
91
|
-
const $1c116ea4b0d2d023$var$trackStyles = {
|
|
92
|
-
...$1c116ea4b0d2d023$var$circleDims,
|
|
93
|
-
boxSizing: 'border-box',
|
|
94
|
-
borderStyle: 'solid',
|
|
95
|
-
borderWidth: {
|
|
96
|
-
default: '[3px]',
|
|
97
|
-
size: {
|
|
98
|
-
S: 2,
|
|
99
|
-
L: 4
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
borderRadius: 'full'
|
|
103
|
-
};
|
|
104
70
|
const $1c116ea4b0d2d023$var$track = function anonymous(props) {
|
|
105
71
|
let rules = " .";
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
rules += ' kbk';
|
|
111
|
-
rules += ' kj';
|
|
112
|
-
} else {
|
|
113
|
-
rules += ' kbr';
|
|
114
|
-
rules += ' kq';
|
|
115
|
-
}
|
|
116
|
-
if (props.size === "L") {
|
|
117
|
-
rules += ' lbC';
|
|
118
|
-
rules += ' lB';
|
|
119
|
-
} else if (props.size === "S") {
|
|
120
|
-
rules += ' lbk';
|
|
121
|
-
rules += ' lj';
|
|
122
|
-
} else {
|
|
123
|
-
rules += ' lbr';
|
|
124
|
-
rules += ' lq';
|
|
125
|
-
}
|
|
126
|
-
rules += ' _bb';
|
|
127
|
-
rules += ' __na';
|
|
128
|
-
rules += ' wa';
|
|
129
|
-
if (props.size === "L") rules += ' ud';
|
|
130
|
-
else if (props.size === "S") rules += ' uc';
|
|
131
|
-
else rules += ' u-3760g0';
|
|
132
|
-
if (props.size === "L") rules += ' vd';
|
|
133
|
-
else if (props.size === "S") rules += ' vc';
|
|
134
|
-
else rules += ' v-3760g0';
|
|
135
|
-
if (props.size === "L") rules += ' sd';
|
|
136
|
-
else if (props.size === "S") rules += ' sc';
|
|
137
|
-
else rules += ' s-3760g0';
|
|
138
|
-
if (props.size === "L") rules += ' td';
|
|
139
|
-
else if (props.size === "S") rules += ' tc';
|
|
140
|
-
else rules += ' t-3760g0';
|
|
141
|
-
rules += ' _vf';
|
|
142
|
-
rules += ' _wf';
|
|
143
|
-
rules += ' _xf';
|
|
144
|
-
rules += ' _yf';
|
|
145
|
-
rules += ' ca_____u';
|
|
146
|
-
if (props.staticColor === "black") {
|
|
147
|
-
if (props.isPressed) rules += ' c_____n';
|
|
148
|
-
else if (props.isFocusVisible) rules += ' c_____n';
|
|
149
|
-
else if (props.isHovered) rules += ' c_____n';
|
|
150
|
-
else rules += ' c_____m';
|
|
151
|
-
} else if (props.staticColor === "white") {
|
|
152
|
-
if (props.isPressed) rules += ' c_____a';
|
|
153
|
-
else if (props.isFocusVisible) rules += ' c_____a';
|
|
154
|
-
else if (props.isHovered) rules += ' c_____a';
|
|
155
|
-
else rules += ' c____9';
|
|
156
|
-
} else {
|
|
157
|
-
if (props.isPressed) rules += ' cj';
|
|
158
|
-
else if (props.isFocusVisible) rules += ' cj';
|
|
159
|
-
else if (props.isHovered) rules += ' cj';
|
|
160
|
-
else rules += ' ci';
|
|
161
|
-
}
|
|
72
|
+
rules += ' fa_____w';
|
|
73
|
+
if (props.staticColor === "black") rules += ' f_____o';
|
|
74
|
+
else if (props.staticColor === "white") rules += ' f_____b';
|
|
75
|
+
else rules += ' fk';
|
|
162
76
|
return rules;
|
|
163
77
|
};
|
|
164
78
|
const $1c116ea4b0d2d023$var$fill = function anonymous(props) {
|
|
165
79
|
let rules = " .";
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
} else {
|
|
173
|
-
rules += ' kbr';
|
|
174
|
-
rules += ' kq';
|
|
175
|
-
}
|
|
176
|
-
if (props.size === "L") {
|
|
177
|
-
rules += ' lbC';
|
|
178
|
-
rules += ' lB';
|
|
179
|
-
} else if (props.size === "S") {
|
|
180
|
-
rules += ' lbk';
|
|
181
|
-
rules += ' lj';
|
|
182
|
-
} else {
|
|
183
|
-
rules += ' lbr';
|
|
184
|
-
rules += ' lq';
|
|
185
|
-
}
|
|
186
|
-
rules += ' _bb';
|
|
187
|
-
rules += ' __na';
|
|
188
|
-
rules += ' wa';
|
|
189
|
-
if (props.size === "L") rules += ' ud';
|
|
190
|
-
else if (props.size === "S") rules += ' uc';
|
|
191
|
-
else rules += ' u-3760g0';
|
|
192
|
-
if (props.size === "L") rules += ' vd';
|
|
193
|
-
else if (props.size === "S") rules += ' vc';
|
|
194
|
-
else rules += ' v-3760g0';
|
|
195
|
-
if (props.size === "L") rules += ' sd';
|
|
196
|
-
else if (props.size === "S") rules += ' sc';
|
|
197
|
-
else rules += ' s-3760g0';
|
|
198
|
-
if (props.size === "L") rules += ' td';
|
|
199
|
-
else if (props.size === "S") rules += ' tc';
|
|
200
|
-
else rules += ' t-3760g0';
|
|
201
|
-
rules += ' _vf';
|
|
202
|
-
rules += ' _wf';
|
|
203
|
-
rules += ' _xf';
|
|
204
|
-
rules += ' _yf';
|
|
205
|
-
rules += ' ca_____z';
|
|
206
|
-
if (props.staticColor === "black") {
|
|
207
|
-
if (props.isPressed) rules += ' c_____t';
|
|
208
|
-
else if (props.isFocusVisible) rules += ' c_____t';
|
|
209
|
-
else if (props.isHovered) rules += ' c_____t';
|
|
210
|
-
else rules += ' c_____s';
|
|
211
|
-
} else if (props.staticColor === "white") {
|
|
212
|
-
if (props.isPressed) rules += ' c_____g';
|
|
213
|
-
else if (props.isFocusVisible) rules += ' c_____g';
|
|
214
|
-
else if (props.isHovered) rules += ' c_____g';
|
|
215
|
-
else rules += ' c_____f';
|
|
216
|
-
} else {
|
|
217
|
-
if (props.isPressed) rules += ' cz';
|
|
218
|
-
else if (props.isFocusVisible) rules += ' cz';
|
|
219
|
-
else if (props.isHovered) rules += ' cz';
|
|
220
|
-
else rules += ' cy';
|
|
221
|
-
}
|
|
80
|
+
rules += ' fa_____B';
|
|
81
|
+
if (props.staticColor === "black") rules += ' f_____u';
|
|
82
|
+
else if (props.staticColor === "white") rules += ' f_____h';
|
|
83
|
+
else rules += ' fA';
|
|
84
|
+
rules += ' R-375ty3';
|
|
85
|
+
rules += ' __Ga';
|
|
222
86
|
return rules;
|
|
223
87
|
};
|
|
224
|
-
const $1c116ea4b0d2d023$var$
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
left: 0,
|
|
228
|
-
size: 'full'
|
|
229
|
-
};
|
|
230
|
-
const $1c116ea4b0d2d023$var$fillsWrapper = " . Ua Xa Ya l4 k4";
|
|
231
|
-
const $1c116ea4b0d2d023$var$fillsWrapperIndeterminate = " . Ua Xa Ya l4 k4 __Pd T-1ecy9hq _S-157qd4d _T-yjb9nq _Y-1fqa2yh _X-twzmrf __Ga";
|
|
232
|
-
const $1c116ea4b0d2d023$var$commonFillMask = {
|
|
233
|
-
position: 'absolute',
|
|
234
|
-
width: '[50%]',
|
|
235
|
-
height: 'full',
|
|
236
|
-
transformOrigin: '[100% center]',
|
|
237
|
-
overflow: 'hidden'
|
|
238
|
-
};
|
|
239
|
-
const $1c116ea4b0d2d023$var$fillMask1 = " . Ua l-3760fj k4 __G-1gvo10c __vb __wb T-115o53i";
|
|
240
|
-
const $1c116ea4b0d2d023$var$fillMask2 = " . Ua l-3760fj k4 __G-1gvo10c __vb __wb T-1gm38v9";
|
|
241
|
-
const $1c116ea4b0d2d023$var$commonFillSubMask = {
|
|
242
|
-
width: 'full',
|
|
243
|
-
height: 'full',
|
|
244
|
-
transformOrigin: '[100% center]',
|
|
245
|
-
transform: 'rotate(-180deg)',
|
|
246
|
-
overflow: 'hidden'
|
|
247
|
-
};
|
|
248
|
-
const $1c116ea4b0d2d023$var$commonFillSubMaskIndeterminate = {
|
|
249
|
-
transform: 'translateZ(0)',
|
|
250
|
-
willChange: 'transform',
|
|
251
|
-
animationDuration: 1000,
|
|
252
|
-
animationTimingFunction: 'linear',
|
|
253
|
-
animationIterationCount: 'infinite'
|
|
254
|
-
};
|
|
255
|
-
const $1c116ea4b0d2d023$var$fillSubMask = " . l4 k4 __G-1gvo10c T-11akxcr __vb __wb";
|
|
256
|
-
const $1c116ea4b0d2d023$var$fillSubMask1Indeterminate = " . l4 k4 __G-1gvo10c T-1ecy9hq __vb __wb _S-6p1wh7 _T-yjb9nq _Yb __Pd _X-twzmrf";
|
|
257
|
-
const $1c116ea4b0d2d023$var$fillSubMask2Indeterminate = " . l4 k4 __G-1gvo10c T-1ecy9hq __vb __wb _S-47ds34 _T-yjb9nq _Yb __Pd _X-twzmrf";
|
|
88
|
+
const $1c116ea4b0d2d023$var$rotationAnimation = "-u41dq3";
|
|
89
|
+
// stroke-dashoffset represents `100 - percentage`. See below for how this works.
|
|
90
|
+
const $1c116ea4b0d2d023$var$dashoffsetAnimation = "-_1i5ccgk";
|
|
258
91
|
function $1c116ea4b0d2d023$var$ProgressCircle(props, ref) {
|
|
259
92
|
[props, ref] = (0, $ac757a4c2bd72aee$exports.useSpectrumContextProps)(props, ref, $1c116ea4b0d2d023$export$afffa1e5edf12209);
|
|
260
|
-
let {
|
|
93
|
+
let { size: size = 'M', staticColor: staticColor, UNSAFE_style: UNSAFE_style, UNSAFE_className: UNSAFE_className = '' } = props;
|
|
261
94
|
let domRef = (0, $5RNes$reactspectrumutils.useDOMRef)(ref);
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
let angle;
|
|
268
|
-
if (percentage > 0 && percentage <= 50) {
|
|
269
|
-
angle = -180 + percentage / 50 * 180;
|
|
270
|
-
subMask1Style.transform = `rotate(${angle}deg)`;
|
|
271
|
-
subMask2Style.transform = 'rotate(-180deg)';
|
|
272
|
-
} else if (percentage > 50) {
|
|
273
|
-
angle = -180 + (percentage - 50) / 50 * 180;
|
|
274
|
-
subMask1Style.transform = 'rotate(0deg)';
|
|
275
|
-
subMask2Style.transform = `rotate(${angle}deg)`;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
if (!ariaLabel && !ariaLabelledby) console.warn('ProgressCircle requires an aria-label or aria-labelledby attribute for accessibility');
|
|
95
|
+
let strokeWidth = 3;
|
|
96
|
+
if (size === 'S') strokeWidth = 2;
|
|
97
|
+
else if (size === 'L') strokeWidth = 4;
|
|
98
|
+
// SVG strokes are centered, so subtract half the stroke width from the radius to create an inner stroke.
|
|
99
|
+
let radius = `calc(50% - ${strokeWidth / 2}px)`;
|
|
279
100
|
return /*#__PURE__*/ (0, $5RNes$reactjsxruntime.jsx)((0, $5RNes$reactariacomponents.ProgressBar), {
|
|
280
101
|
...props,
|
|
281
102
|
ref: domRef,
|
|
@@ -284,48 +105,42 @@ function $1c116ea4b0d2d023$var$ProgressCircle(props, ref) {
|
|
|
284
105
|
...renderProps,
|
|
285
106
|
size: size
|
|
286
107
|
}, props.styles),
|
|
287
|
-
children:
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
/*#__PURE__*/ (0, $5RNes$reactjsxruntime.jsx)("div", {
|
|
300
|
-
className: $1c116ea4b0d2d023$var$fillMask1,
|
|
301
|
-
children: /*#__PURE__*/ (0, $5RNes$reactjsxruntime.jsx)("div", {
|
|
302
|
-
className: isIndeterminate ? $1c116ea4b0d2d023$var$fillSubMask1Indeterminate : $1c116ea4b0d2d023$var$fillSubMask,
|
|
303
|
-
style: subMask1Style,
|
|
304
|
-
children: /*#__PURE__*/ (0, $5RNes$reactjsxruntime.jsx)("div", {
|
|
305
|
-
className: $1c116ea4b0d2d023$var$fill({
|
|
306
|
-
size: size,
|
|
307
|
-
staticColor: staticColor
|
|
308
|
-
})
|
|
309
|
-
})
|
|
310
|
-
})
|
|
311
|
-
}),
|
|
312
|
-
/*#__PURE__*/ (0, $5RNes$reactjsxruntime.jsx)("div", {
|
|
313
|
-
className: $1c116ea4b0d2d023$var$fillMask2,
|
|
314
|
-
children: /*#__PURE__*/ (0, $5RNes$reactjsxruntime.jsx)("div", {
|
|
315
|
-
className: isIndeterminate ? $1c116ea4b0d2d023$var$fillSubMask2Indeterminate : $1c116ea4b0d2d023$var$fillSubMask,
|
|
316
|
-
style: subMask2Style,
|
|
317
|
-
children: /*#__PURE__*/ (0, $5RNes$reactjsxruntime.jsx)("div", {
|
|
318
|
-
className: $1c116ea4b0d2d023$var$fill({
|
|
319
|
-
size: size,
|
|
320
|
-
staticColor: staticColor
|
|
321
|
-
})
|
|
322
|
-
})
|
|
323
|
-
})
|
|
108
|
+
children: ({ percentage: percentage, isIndeterminate: isIndeterminate })=>/*#__PURE__*/ (0, $5RNes$reactjsxruntime.jsxs)("svg", {
|
|
109
|
+
fill: "none",
|
|
110
|
+
width: "100%",
|
|
111
|
+
height: "100%",
|
|
112
|
+
children: [
|
|
113
|
+
/*#__PURE__*/ (0, $5RNes$reactjsxruntime.jsx)("circle", {
|
|
114
|
+
cx: "50%",
|
|
115
|
+
cy: "50%",
|
|
116
|
+
r: radius,
|
|
117
|
+
strokeWidth: strokeWidth,
|
|
118
|
+
className: $1c116ea4b0d2d023$var$track({
|
|
119
|
+
staticColor: staticColor
|
|
324
120
|
})
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
121
|
+
}),
|
|
122
|
+
/*#__PURE__*/ (0, $5RNes$reactjsxruntime.jsx)("circle", {
|
|
123
|
+
cx: "50%",
|
|
124
|
+
cy: "50%",
|
|
125
|
+
r: radius,
|
|
126
|
+
strokeWidth: strokeWidth,
|
|
127
|
+
className: $1c116ea4b0d2d023$var$fill({
|
|
128
|
+
staticColor: staticColor
|
|
129
|
+
}),
|
|
130
|
+
style: {
|
|
131
|
+
// These cubic-bezier timing functions were derived from the previous animation keyframes
|
|
132
|
+
// using a best fit algorithm, and then manually adjusted to approximate the original animation.
|
|
133
|
+
animation: isIndeterminate ? `${$1c116ea4b0d2d023$var$rotationAnimation} 1s cubic-bezier(.6, .1, .3, .9) infinite, ${$1c116ea4b0d2d023$var$dashoffsetAnimation} 1s cubic-bezier(.25, .1, .25, 1.3) infinite` : undefined
|
|
134
|
+
},
|
|
135
|
+
// Normalize the path length to 100 so we can easily set stroke-dashoffset to a percentage.
|
|
136
|
+
pathLength: "100",
|
|
137
|
+
// Add extra gap between dashes so 0% works in Chrome.
|
|
138
|
+
strokeDasharray: "100 200",
|
|
139
|
+
strokeDashoffset: isIndeterminate || percentage == null ? undefined : 100 - percentage,
|
|
140
|
+
strokeLinecap: "round"
|
|
141
|
+
})
|
|
142
|
+
]
|
|
143
|
+
})
|
|
329
144
|
});
|
|
330
145
|
}
|
|
331
146
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"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","sources":["packages/@react-spectrum/s2/src/ProgressCircle.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 {baseColor, style} from '../style/spectrum-theme' with {type: 'macro'};\nimport {clamp} from '@react-aria/utils';\nimport {ContextValue, ProgressBar as RACProgressBar, ProgressBarProps as RACProgressBarProps} from 'react-aria-components';\nimport {createContext, CSSProperties, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {keyframes} from '../style/style-macro' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ProgressCircleStyleProps {\n /**\n * The size of the ProgressCircle.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L',\n /** The static color style to apply. Useful when the button appears over a color background. */\n staticColor?: 'black' | 'white',\n /**\n * Whether presentation is indeterminate when progress isn't known.\n */\n isIndeterminate?: boolean\n}\n\nexport const ProgressCircleContext = createContext<ContextValue<ProgressCircleProps, DOMRefValue<HTMLDivElement>>>(null);\n\nconst fillMask1Frames = keyframes(`\n0% {\n transform: rotate(90deg);\n}\n\n1.69% {\n transform: rotate(72.3deg);\n}\n\n3.39% {\n transform: rotate(55.5deg);\n}\n\n5.08% {\n transform: rotate(40.3deg);\n}\n\n6.78% {\n transform: rotate(25deg);\n}\n\n8.47% {\n transform: rotate(10.6deg);\n}\n\n10.17%, 40.68% {\n transform: rotate(0deg);\n}\n\n42.37% {\n transform: rotate(5.3deg);\n}\n\n44.07% {\n transform: rotate(13.4deg);\n}\n\n45.76% {\n transform: rotate(20.6deg);\n}\n\n47.46% {\n transform: rotate(29deg);\n}\n\n49.15% {\n transform: rotate(36.5deg);\n}\n\n50.85% {\n transform: rotate(42.6deg);\n}\n\n52.54% {\n transform: rotate(48.8deg);\n}\n\n54.24% {\n transform: rotate(54.2deg);\n}\n\n55.93% {\n transform: rotate(59.4deg);\n}\n\n57.63% {\n transform: rotate(63.2deg);\n}\n\n59.32% {\n transform: rotate(67.2deg);\n}\n\n61.02% {\n transform: rotate(70.8deg);\n}\n\n62.71% {\n transform: rotate(73.8deg);\n}\n\n64.41% {\n transform: rotate(76.2deg);\n}\n\n66.1% {\n transform: rotate(78.7deg);\n}\n\n67.8% {\n transform: rotate(80.6deg);\n}\n\n69.49% {\n transform: rotate(82.6deg);\n}\n\n71.19% {\n transform: rotate(83.7deg);\n}\n\n72.88% {\n transform: rotate(85deg);\n}\n\n74.58% {\n transform: rotate(86.3deg);\n}\n\n76.27% {\n transform: rotate(87deg);\n}\n\n77.97% {\n transform: rotate(87.7deg);\n}\n\n79.66% {\n transform: rotate(88.3deg);\n}\n\n81.36% {\n transform: rotate(88.6deg);\n}\n\n83.05% {\n transform: rotate(89.2deg);\n}\n\n84.75% {\n transform: rotate(89.2deg);\n}\n\n86.44% {\n transform: rotate(89.5deg);\n}\n\n88.14% {\n transform: rotate(89.9deg);\n}\n\n89.83% {\n transform: rotate(89.7deg);\n}\n\n91.53% {\n transform: rotate(90.1deg);\n}\n\n93.22% {\n transform: rotate(90.2deg);\n}\n\n94.92% {\n transform: rotate(90.1deg);\n}\n\n96.61% {\n transform: rotate(90deg);\n}\n\n98.31% {\n transform: rotate(89.8deg);\n}\n\n100% {\n transform: rotate(90deg);\n}\n`);\n\nconst fillMask2Frames = keyframes(`\n0%, 8.47% {\n transform: rotate(180deg);\n}\n\n10.17% {\n transform: rotate(179.2deg);\n}\n\n11.86% {\n transform: rotate(164deg);\n}\n\n13.56% {\n transform: rotate(151.8deg);\n}\n\n15.25% {\n transform: rotate(140.8deg);\n}\n\n16.95% {\n transform: rotate(130.3deg);\n}\n\n18.64% {\n transform: rotate(120.4deg);\n}\n\n20.34% {\n transform: rotate(110.8deg);\n}\n\n22.03% {\n transform: rotate(101.6deg);\n}\n\n23.73% {\n transform: rotate(93.5deg);\n}\n\n25.42% {\n transform: rotate(85.4deg);\n}\n\n27.12% {\n transform: rotate(78.1deg);\n}\n\n28.81% {\n transform: rotate(71.2deg);\n}\n\n30.51% {\n transform: rotate(89.1deg);\n}\n\n32.2% {\n transform: rotate(105.5deg);\n}\n\n33.9% {\n transform: rotate(121.3deg);\n}\n\n35.59% {\n transform: rotate(135.5deg);\n}\n\n37.29% {\n transform: rotate(148.4deg);\n}\n\n38.98% {\n transform: rotate(161deg);\n}\n\n40.68% {\n transform: rotate(173.5deg);\n}\n\n42.37%, 100% {\n transform: rotate(180deg);\n}\n`);\n\nconst fillsRotate = keyframes(`\n0% {transform: rotate(-90deg)}\n100% {transform: rotate(270deg)}\n`);\n\nconst circleDims = {\n height: {\n default: 32,\n size: {\n S: 16,\n L: 64\n }\n },\n width: {\n default: 32,\n size: {\n S: 16,\n L: 64\n }\n },\n aspectRatio: 'square'\n} as const;\n\n// Double check the types passed to each style, may not need all for each\nconst wrapper = style<ProgressCircleStyleProps>({\n ...circleDims,\n display: 'inline-block',\n position: 'relative'\n}, getAllowedOverrides());\n\nconst trackStyles = {\n ...circleDims,\n boxSizing: 'border-box',\n borderStyle: 'solid',\n borderWidth: {\n default: '[3px]',\n size: {\n S: 2,\n L: 4\n }\n },\n borderRadius: 'full'\n} as const;\n\nconst track = style<ProgressCircleStyleProps>({\n ...trackStyles,\n borderColor: {\n default: baseColor('gray-300'),\n staticColor: {\n white: {\n default: baseColor('transparent-white-300'),\n forcedColors: 'Background'\n },\n // TODO: no designs for this one\n black: {\n default: baseColor('transparent-black-300'),\n forcedColors: 'Background'\n }\n },\n forcedColors: 'Background'\n }\n});\n\nconst fill = style<ProgressCircleStyleProps>({\n ...trackStyles,\n borderColor: {\n default: baseColor('blue-900'),\n staticColor: {\n white: {\n default: baseColor('transparent-white-900'),\n forcedColors: 'Highlight'\n },\n // TODO: no designs for this one\n black: {\n default: baseColor('transparent-black-900'),\n forcedColors: 'Highlight'\n }\n },\n forcedColors: 'Highlight'\n }\n});\n\nconst fillsWrapperStyles = {\n position: 'absolute',\n top: 0,\n left: 0,\n size: 'full'\n} as const;\n\nconst fillsWrapper = style({\n ...fillsWrapperStyles\n});\n\nconst fillsWrapperIndeterminate = style({\n ...fillsWrapperStyles,\n willChange: 'transform',\n transform: 'translateZ(0)',\n animation: fillsRotate,\n animationDuration: 1000,\n animationTimingFunction: '[cubic-bezier(.25,.78,.48,.89)]',\n animationIterationCount: 'infinite',\n transformOrigin: 'center'\n});\n\nconst commonFillMask = {\n position: 'absolute',\n width: '[50%]',\n height: 'full',\n transformOrigin: '[100% center]',\n overflow: 'hidden'\n} as const;\n\nconst fillMask1 = style({\n ...commonFillMask,\n transform: 'rotate(180deg)'\n});\n\nconst fillMask2 = style({\n ...commonFillMask,\n transform: 'rotate(0deg)'\n});\n\nconst commonFillSubMask = {\n width: 'full',\n height: 'full',\n transformOrigin: '[100% center]',\n transform: 'rotate(-180deg)',\n overflow: 'hidden'\n} as const;\n\nconst commonFillSubMaskIndeterminate = {\n transform: 'translateZ(0)',\n willChange: 'transform',\n animationDuration: 1000,\n animationTimingFunction: 'linear',\n animationIterationCount: 'infinite'\n} as const;\n\nconst fillSubMask = style({\n ...commonFillSubMask\n});\n\nconst fillSubMask1Indeterminate = style({\n ...commonFillSubMask,\n animation: fillMask1Frames,\n ...commonFillSubMaskIndeterminate\n});\n\nconst fillSubMask2Indeterminate = style({\n ...commonFillSubMask,\n animation: fillMask2Frames,\n ...commonFillSubMaskIndeterminate\n});\n\nexport interface ProgressCircleProps extends Omit<RACProgressBarProps, 'children' | 'style' | 'valueLabel' | 'formatOptions' | 'label' | 'className'>, ProgressCircleStyleProps, StyleProps {}\n\nfunction ProgressCircle(props: ProgressCircleProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ProgressCircleContext);\n let {\n value = 0,\n minValue = 0,\n maxValue = 100,\n size = 'M',\n staticColor,\n isIndeterminate = false,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n UNSAFE_style,\n UNSAFE_className = ''\n } = props;\n let domRef = useDOMRef(ref);\n\n value = clamp(value, minValue, maxValue);\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 <RACProgressBar\n {...props}\n ref={domRef}\n style={UNSAFE_style}\n className={renderProps => UNSAFE_className + wrapper({\n ...renderProps,\n size\n }, props.styles)}>\n <div dir=\"ltr\">\n <div className={track({size, staticColor})} />\n <div className={isIndeterminate ? fillsWrapperIndeterminate : fillsWrapper}>\n <div className={fillMask1}>\n <div\n className={isIndeterminate ? fillSubMask1Indeterminate : fillSubMask}\n style={subMask1Style}>\n <div className={fill({size, staticColor})} />\n </div>\n </div>\n <div className={fillMask2}>\n <div\n className={isIndeterminate ? fillSubMask2Indeterminate : fillSubMask}\n style={subMask2Style}>\n <div className={fill({size, staticColor})} />\n </div>\n </div>\n </div>\n </div>\n </RACProgressBar>\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 = /*#__PURE__*/ forwardRef(ProgressCircle);\nexport {_ProgressCircle as ProgressCircle};\n"],"names":[],"version":3,"file":"ProgressCircle.cjs.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AA0BM,MAAM,0DAAwB,CAAA,GAAA,0BAAY,EAAkE;AAEnH,yEAAyE;AACzE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYN,MAAM;;;;;;;;AAWN,MAAM;;;;;;;;;;AAeN,MAAM;AAUN,iFAAiF;AACjF,MAAM;AAUN,SAAS,qCAAe,KAA0B,EAAE,GAA2B;IAC7E,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,QACF,OAAO,kBACP,WAAW,gBACX,YAAY,oBACZ,mBAAmB,IACpB,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,IAAI,cAAc;IAClB,IAAI,SAAS,KACX,cAAc;SACT,IAAI,SAAS,KAClB,cAAc;IAGhB,yGAAyG;IACzG,IAAI,SAAS,CAAC,WAAW,EAAE,cAAc,EAAE,GAAG,CAAC;IAE/C,qBACE,gCAAC,CAAA,GAAA,sCAAa;QACX,GAAG,KAAK;QACT,KAAK;QACL,OAAO;QACP,WAAW,CAAA,cAAe,mBAAmB,8BAAQ;gBACnD,GAAG,WAAW;sBACd;YACF,GAAG,MAAM,MAAM;kBACd,CAAC,cAAC,UAAU,mBAAE,eAAe,EAAC,iBAC7B,iCAAC;gBACC,MAAK;gBACL,OAAM;gBACN,QAAO;;kCACP,gCAAC;wBACC,IAAG;wBACH,IAAG;wBACH,GAAG;wBACH,aAAa;wBACb,WAAW,4BAAM;yCAAC;wBAAW;;kCAC/B,gCAAC;wBACC,IAAG;wBACH,IAAG;wBACH,GAAG;wBACH,aAAa;wBACb,WAAW,2BAAK;yCAAC;wBAAW;wBAC5B,OAAO;4BACL,yFAAyF;4BACzF,gGAAgG;4BAChG,WAAW,kBAAkB,CAAC,EAAE,wCAAkB,2CAA2C,EAAE,0CAAoB,4CAA4C,CAAC,GAAG;wBACrK;wBACA,2FAA2F;wBAC3F,YAAW;wBACX,sDAAsD;wBACtD,iBAAgB;wBAChB,kBAAkB,mBAAmB,cAAc,OAAO,YAAY,MAAM;wBAC5E,eAAc;;;;;AAK1B;AAEA;;;CAGC,GACD,IAAI,4CAAkB,WAAW,GAAG,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/ProgressCircle.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 {ContextValue, ProgressBar as RACProgressBar, ProgressBarProps as RACProgressBarProps} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {keyframes} from '../style/style-macro' with {type: 'macro'};\nimport {style} from '../style/spectrum-theme' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ProgressCircleStyleProps {\n /**\n * The size of the ProgressCircle.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L',\n /** The static color style to apply. Useful when the button appears over a color background. */\n staticColor?: 'black' | 'white',\n /**\n * Whether presentation is indeterminate when progress isn't known.\n */\n isIndeterminate?: boolean\n}\n\nexport const ProgressCircleContext = createContext<ContextValue<ProgressCircleProps, DOMRefValue<HTMLDivElement>>>(null);\n\n// Double check the types passed to each style, may not need all for each\nconst wrapper = style<ProgressCircleStyleProps>({\n size: {\n default: 32,\n size: {\n S: 16,\n L: 64\n }\n },\n aspectRatio: 'square',\n display: 'inline-block'\n}, getAllowedOverrides({height: true}));\n\nconst track = style<ProgressCircleStyleProps>({\n stroke: {\n default: 'gray-300',\n staticColor: {\n white: 'transparent-white-300',\n black: 'transparent-black-300'\n },\n forcedColors: 'Background'\n }\n});\n\nconst fill = style<ProgressCircleStyleProps>({\n stroke: {\n default: 'blue-900',\n staticColor: {\n white: 'transparent-white-900',\n black: 'transparent-black-900'\n },\n forcedColors: 'Highlight'\n },\n rotate: -90,\n transformOrigin: 'center'\n});\n\nexport interface ProgressCircleProps extends Omit<RACProgressBarProps, 'children' | 'style' | 'valueLabel' | 'formatOptions' | 'label' | 'className'>, ProgressCircleStyleProps, StyleProps {}\n\nconst rotationAnimation = keyframes(`\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n`);\n\n// stroke-dashoffset represents `100 - percentage`. See below for how this works.\nconst dashoffsetAnimation = keyframes(`\n 0%, 100% {\n stroke-dashoffset: 75;\n }\n\n 30% {\n stroke-dashoffset: 20;\n }\n`);\n\nfunction ProgressCircle(props: ProgressCircleProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ProgressCircleContext);\n let {\n size = 'M',\n staticColor,\n UNSAFE_style,\n UNSAFE_className = ''\n } = props;\n let domRef = useDOMRef(ref);\n\n let strokeWidth = 3;\n if (size === 'S') {\n strokeWidth = 2;\n } else if (size === 'L') {\n strokeWidth = 4;\n }\n\n // SVG strokes are centered, so subtract half the stroke width from the radius to create an inner stroke.\n let radius = `calc(50% - ${strokeWidth / 2}px)`;\n\n return (\n <RACProgressBar\n {...props}\n ref={domRef}\n style={UNSAFE_style}\n className={renderProps => UNSAFE_className + wrapper({\n ...renderProps,\n size\n }, props.styles)}>\n {({percentage, isIndeterminate}) => (\n <svg\n fill=\"none\"\n width=\"100%\"\n height=\"100%\">\n <circle\n cx=\"50%\"\n cy=\"50%\"\n r={radius}\n strokeWidth={strokeWidth}\n className={track({staticColor})} />\n <circle\n cx=\"50%\"\n cy=\"50%\"\n r={radius}\n strokeWidth={strokeWidth}\n className={fill({staticColor})}\n style={{\n // These cubic-bezier timing functions were derived from the previous animation keyframes\n // using a best fit algorithm, and then manually adjusted to approximate the original animation.\n animation: isIndeterminate ? `${rotationAnimation} 1s cubic-bezier(.6, .1, .3, .9) infinite, ${dashoffsetAnimation} 1s cubic-bezier(.25, .1, .25, 1.3) infinite` : undefined\n }}\n // Normalize the path length to 100 so we can easily set stroke-dashoffset to a percentage.\n pathLength=\"100\"\n // Add extra gap between dashes so 0% works in Chrome.\n strokeDasharray=\"100 200\"\n strokeDashoffset={isIndeterminate || percentage == null ? undefined : 100 - percentage}\n strokeLinecap=\"round\" />\n </svg>\n )}\n </RACProgressBar>\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 = /*#__PURE__*/ forwardRef(ProgressCircle);\nexport {_ProgressCircle as ProgressCircle};\n"],"names":[],"version":3,"file":"ProgressCircle.cjs.map"}
|