@react-spectrum/progress 3.7.22 → 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
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
.yaf-qa_i18nFontFamily {
|
|
2
|
-
font-synthesis: weight;
|
|
3
|
-
font-family: adobe-clean, Source Sans Pro, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Trebuchet MS, Lucida Grande, sans-serif;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.yaf-qa_i18nFontFamily:lang(ar) {
|
|
7
|
-
font-family: myriad-arabic, adobe-clean, Source Sans Pro, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Trebuchet MS, Lucida Grande, sans-serif;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.yaf-qa_i18nFontFamily:lang(he) {
|
|
11
|
-
font-family: myriad-hebrew, adobe-clean, Source Sans Pro, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Trebuchet MS, Lucida Grande, sans-serif;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.yaf-qa_i18nFontFamily:lang(zh) {
|
|
15
|
-
font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Heiti TC Light, sans-serif;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.yaf-qa_i18nFontFamily:lang(zh-Hans) {
|
|
19
|
-
font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.yaf-qa_i18nFontFamily:lang(zh-Hant) {
|
|
23
|
-
font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Microsoft JhengHei UI, Microsoft JhengHei, Heiti TC Light, sans-serif;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.yaf-qa_i18nFontFamily:lang(zh-SG), .yaf-qa_i18nFontFamily:lang(zh-CN) {
|
|
27
|
-
font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.yaf-qa_i18nFontFamily:lang(ko) {
|
|
31
|
-
font-family: adobe-clean-han-korean, source-han-korean, Malgun Gothic, Apple Gothic, sans-serif;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.yaf-qa_i18nFontFamily:lang(ja) {
|
|
35
|
-
font-family: adobe-clean-han-japanese, Hiragino Kaku Gothic ProN, ヒラギノ角ゴ ProN W3, Osaka, YuGothic, Yu Gothic, メイリオ, Meiryo, MS Pゴシック, MS PGothic, sans-serif;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.yaf-qa_spectrum-FocusRing-ring {
|
|
39
|
-
--spectrum-focus-ring-border-radius: var(--spectrum-textfield-border-radius, var(--spectrum-alias-border-radius-regular));
|
|
40
|
-
--spectrum-focus-ring-gap: var(--spectrum-alias-input-focusring-gap);
|
|
41
|
-
--spectrum-focus-ring-size: var(--spectrum-alias-input-focusring-size);
|
|
42
|
-
--spectrum-focus-ring-border-size: 0px;
|
|
43
|
-
--spectrum-focus-ring-color: var(--spectrum-high-contrast-focus-ring-color, var(--spectrum-alias-focus-ring-color, var(--spectrum-alias-focus-color)));
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.yaf-qa_spectrum-FocusRing-ring:after {
|
|
47
|
-
border-radius: calc(var(--spectrum-focus-ring-border-radius) + var(--spectrum-focus-ring-gap));
|
|
48
|
-
content: "";
|
|
49
|
-
margin: calc(-1 * var(--spectrum-focus-ring-border-size));
|
|
50
|
-
pointer-events: none;
|
|
51
|
-
transition: box-shadow var(--spectrum-global-animation-duration-100, .13s) ease-out, margin var(--spectrum-global-animation-duration-100, .13s) ease-out;
|
|
52
|
-
display: block;
|
|
53
|
-
position: absolute;
|
|
54
|
-
inset: 0;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.yaf-qa_spectrum-FocusRing.yaf-qa_focus-ring:after {
|
|
58
|
-
margin: calc(var(--spectrum-focus-ring-gap) * -1 - var(--spectrum-focus-ring-border-size));
|
|
59
|
-
box-shadow: 0 0 0 var(--spectrum-focus-ring-size) var(--spectrum-focus-ring-color);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.yaf-qa_spectrum-FocusRing--quiet:after {
|
|
63
|
-
border-radius: 0;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.yaf-qa_spectrum-FocusRing--quiet.yaf-qa_focus-ring:after {
|
|
67
|
-
margin: 0 0 calc(var(--spectrum-focus-ring-gap) * -1 - var(--spectrum-focus-ring-border-size)) 0;
|
|
68
|
-
box-shadow: 0 var(--spectrum-focus-ring-size) 0 var(--spectrum-focus-ring-color);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
@media (forced-colors: active) {
|
|
72
|
-
.yaf-qa_spectrum-FocusRing, .yaf-qa_spectrum-FocusRing-ring, .yaf-qa_spectrum-FocusRing--quiet {
|
|
73
|
-
--spectrum-high-contrast-focus-ring-color: Highlight;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
:is(.yaf-qa_spectrum-FocusRing, .yaf-qa_spectrum-FocusRing-ring, .yaf-qa_spectrum-FocusRing--quiet):after {
|
|
77
|
-
forced-color-adjust: none;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.yaf-qa_spectrum-BarLoader {
|
|
82
|
-
min-inline-size: var(--spectrum-global-dimension-static-size-600, 48px);
|
|
83
|
-
inline-size: var(--spectrum-barloader-large-width, var(--spectrum-global-dimension-size-2400));
|
|
84
|
-
vertical-align: top;
|
|
85
|
-
isolation: isolate;
|
|
86
|
-
flex-flow: wrap;
|
|
87
|
-
justify-content: space-between;
|
|
88
|
-
align-items: center;
|
|
89
|
-
display: inline-flex;
|
|
90
|
-
position: relative;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.yaf-qa_spectrum-BarLoader.yaf-qa_spectrum-BarLoader--indeterminate {
|
|
94
|
-
max-inline-size: var(--spectrum-barloader-large-width, var(--spectrum-global-dimension-size-2400));
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.yaf-qa_spectrum-BarLoader.yaf-qa_spectrum-BarLoader--indeterminate.yaf-qa_spectrum-BarLoader--sideLabel .yaf-qa_spectrum-BarLoader-track {
|
|
98
|
-
max-inline-size: var(--spectrum-barloader-large-width, var(--spectrum-global-dimension-size-2400));
|
|
99
|
-
inline-size: 100%;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.yaf-qa_spectrum-BarLoader-track {
|
|
103
|
-
min-inline-size: var(--spectrum-global-dimension-static-size-600, 48px);
|
|
104
|
-
inline-size: 100%;
|
|
105
|
-
height: var(--spectrum-barloader-large-height, var(--spectrum-global-dimension-size-75));
|
|
106
|
-
border-radius: var(--spectrum-barloader-large-border-radius);
|
|
107
|
-
z-index: 1;
|
|
108
|
-
overflow: hidden;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.yaf-qa_spectrum-BarLoader-fill {
|
|
112
|
-
height: var(--spectrum-barloader-large-height, var(--spectrum-global-dimension-size-75));
|
|
113
|
-
border: none;
|
|
114
|
-
transition: width 1s;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.yaf-qa_spectrum-BarLoader-label, .yaf-qa_spectrum-BarLoader-percentage {
|
|
118
|
-
font-size: var(--spectrum-fieldlabel-text-size, var(--spectrum-global-dimension-font-size-75));
|
|
119
|
-
font-weight: var(--spectrum-fieldlabel-text-font-weight, var(--spectrum-global-font-weight-regular));
|
|
120
|
-
line-height: var(--spectrum-fieldlabel-text-line-height, var(--spectrum-global-font-line-height-small));
|
|
121
|
-
text-align: start;
|
|
122
|
-
margin-bottom: var(--spectrum-barloader-large-label-gap-y, var(--spectrum-global-dimension-size-115));
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.yaf-qa_spectrum-BarLoader-label {
|
|
126
|
-
flex: 1;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.yaf-qa_spectrum-BarLoader-percentage {
|
|
130
|
-
align-self: flex-start;
|
|
131
|
-
margin-inline-start: var(--spectrum-barloader-small-label-gap-x, var(--spectrum-global-dimension-size-150));
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.yaf-qa_spectrum-BarLoader--sideLabel {
|
|
135
|
-
flex-flow: row;
|
|
136
|
-
justify-content: space-between;
|
|
137
|
-
min-inline-size: fit-content;
|
|
138
|
-
display: inline-flex;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.yaf-qa_spectrum-BarLoader--sideLabel .yaf-qa_spectrum-BarLoader-track {
|
|
142
|
-
inline-size: inherit;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.yaf-qa_spectrum-BarLoader--sideLabel .yaf-qa_spectrum-BarLoader-label {
|
|
146
|
-
margin-inline-end: var(--spectrum-barloader-large-label-gap-x, var(--spectrum-global-dimension-size-150));
|
|
147
|
-
margin-bottom: 0;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.yaf-qa_spectrum-BarLoader--sideLabel .yaf-qa_spectrum-BarLoader-percentage {
|
|
151
|
-
text-align: end;
|
|
152
|
-
margin-inline-start: var(--spectrum-barloader-large-label-gap-x, var(--spectrum-global-dimension-size-150));
|
|
153
|
-
order: 3;
|
|
154
|
-
margin-bottom: 0;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.yaf-qa_spectrum-BarLoader--small {
|
|
158
|
-
min-inline-size: var(--spectrum-global-dimension-static-size-600, 48px);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.yaf-qa_spectrum-BarLoader--small .yaf-qa_spectrum-BarLoader-fill {
|
|
162
|
-
height: var(--spectrum-barloader-small-height, var(--spectrum-global-dimension-size-50));
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.yaf-qa_spectrum-BarLoader--small .yaf-qa_spectrum-BarLoader-track {
|
|
166
|
-
height: var(--spectrum-barloader-small-height, var(--spectrum-global-dimension-size-50));
|
|
167
|
-
border-radius: var(--spectrum-barloader-small-border-radius);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.yaf-qa_spectrum-BarLoader--indeterminate .yaf-qa_spectrum-BarLoader-fill {
|
|
171
|
-
inline-size: var(--spectrum-barloader-large-indeterminate-fill-width, var(--spectrum-global-dimension-size-1700));
|
|
172
|
-
animation-duration: var(--spectrum-barloader-large-indeterminate-duration, var(--spectrum-global-animation-duration-2000));
|
|
173
|
-
animation-iteration-count: infinite;
|
|
174
|
-
animation-timing-function: var(--spectrum-barloader-large-indeterminate-animation-ease, var(--spectrum-global-animation-ease-in-out));
|
|
175
|
-
will-change: transform;
|
|
176
|
-
position: relative;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
[dir="ltr"] :is(.yaf-qa_spectrum-BarLoader--indeterminate .yaf-qa_spectrum-BarLoader-fill) {
|
|
180
|
-
animation-name: yaf-qa_indeterminate-loop-ltr;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
[dir="rtl"] :is(.yaf-qa_spectrum-BarLoader--indeterminate .yaf-qa_spectrum-BarLoader-fill) {
|
|
184
|
-
animation-name: yaf-qa_indeterminate-loop-rtl;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
@keyframes yaf-qa_indeterminate-loop-ltr {
|
|
188
|
-
from {
|
|
189
|
-
transform: translate(calc(var(--spectrum-barloader-large-indeterminate-fill-width, var(--spectrum-global-dimension-size-1700)) * -1));
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
to {
|
|
193
|
-
transform: translate(var(--spectrum-barloader-large-width, var(--spectrum-global-dimension-size-2400)));
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
@keyframes yaf-qa_indeterminate-loop-rtl {
|
|
198
|
-
from {
|
|
199
|
-
transform: translate(var(--spectrum-barloader-large-width, var(--spectrum-global-dimension-size-2400)));
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
to {
|
|
203
|
-
transform: translate(calc(var(--spectrum-barloader-large-width, var(--spectrum-global-dimension-size-2400)) * -1));
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.yaf-qa_spectrum-BarLoader {
|
|
208
|
-
--spectrum-barloader-large-track-fill-color: var(--spectrum-accent-color-900);
|
|
209
|
-
--spectrum-barloader-static-black-track-color: #00000040;
|
|
210
|
-
--spectrum-barloader-static-black-fill-color: var(--spectrum-global-color-static-black, #000);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.yaf-qa_spectrum-BarLoader .yaf-qa_spectrum-BarLoader-fill {
|
|
214
|
-
background: var(--spectrum-barloader-large-track-fill-color, var(--spectrum-global-color-blue-500));
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.yaf-qa_spectrum-BarLoader .yaf-qa_spectrum-BarLoader-track {
|
|
218
|
-
background-color: var(--spectrum-barloader-large-track-color, var(--spectrum-alias-track-color-default));
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.yaf-qa_spectrum-BarLoader.yaf-qa_spectrum-BarLoader--overBackground .yaf-qa_spectrum-BarLoader-fill {
|
|
222
|
-
background: var(--spectrum-barloader-large-over-background-track-fill-color, var(--spectrum-global-color-static-white));
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
.yaf-qa_spectrum-BarLoader.yaf-qa_spectrum-BarLoader--overBackground .yaf-qa_spectrum-BarLoader-label, .yaf-qa_spectrum-BarLoader.yaf-qa_spectrum-BarLoader--overBackground .yaf-qa_spectrum-BarLoader-percentage {
|
|
226
|
-
color: var(--spectrum-barloader-large-over-background-track-fill-color, var(--spectrum-global-color-static-white));
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.yaf-qa_spectrum-BarLoader.yaf-qa_spectrum-BarLoader--overBackground .yaf-qa_spectrum-BarLoader-track {
|
|
230
|
-
background-color: var(--spectrum-barloader-large-over-background-track-color, var(--spectrum-alias-track-color-over-background));
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.yaf-qa_spectrum-BarLoader.yaf-qa_spectrum-BarLoader--staticWhite .yaf-qa_spectrum-BarLoader-fill {
|
|
234
|
-
background: var(--spectrum-barloader-large-over-background-track-fill-color, var(--spectrum-global-color-static-white));
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.yaf-qa_spectrum-BarLoader.yaf-qa_spectrum-BarLoader--staticWhite .yaf-qa_spectrum-BarLoader-label, .yaf-qa_spectrum-BarLoader.yaf-qa_spectrum-BarLoader--staticWhite .yaf-qa_spectrum-BarLoader-percentage {
|
|
238
|
-
color: var(--spectrum-barloader-large-over-background-track-fill-color, var(--spectrum-global-color-static-white));
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.yaf-qa_spectrum-BarLoader.yaf-qa_spectrum-BarLoader--staticWhite .yaf-qa_spectrum-BarLoader-track {
|
|
242
|
-
background-color: var(--spectrum-barloader-large-over-background-track-color, var(--spectrum-alias-track-color-over-background));
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.yaf-qa_spectrum-BarLoader.yaf-qa_spectrum-BarLoader--staticBlack .yaf-qa_spectrum-BarLoader-track {
|
|
246
|
-
background-color: var(--spectrum-barloader-static-black-track-color);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.yaf-qa_spectrum-BarLoader.yaf-qa_spectrum-BarLoader--staticBlack .yaf-qa_spectrum-BarLoader-label, .yaf-qa_spectrum-BarLoader.yaf-qa_spectrum-BarLoader--staticBlack .yaf-qa_spectrum-BarLoader-percentage {
|
|
250
|
-
color: var(--spectrum-barloader-static-black-fill-color);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
.yaf-qa_spectrum-BarLoader.yaf-qa_spectrum-BarLoader--staticBlack .yaf-qa_spectrum-BarLoader-fill {
|
|
254
|
-
background: var(--spectrum-barloader-static-black-fill-color);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.yaf-qa_spectrum-BarLoader.yaf-qa_is-positive .yaf-qa_spectrum-BarLoader-fill {
|
|
258
|
-
background: var(--spectrum-meter-large-track-color-positive, var(--spectrum-semantic-positive-color-status));
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
.yaf-qa_spectrum-BarLoader.yaf-qa_is-warning .yaf-qa_spectrum-BarLoader-fill {
|
|
262
|
-
background: var(--spectrum-meter-large-track-color-warning, var(--spectrum-semantic-notice-color-status));
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
.yaf-qa_spectrum-BarLoader.yaf-qa_is-critical .yaf-qa_spectrum-BarLoader-fill {
|
|
266
|
-
background: var(--spectrum-meter-large-track-color-critical, var(--spectrum-semantic-negative-color-status));
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.yaf-qa_spectrum-BarLoader-label, .yaf-qa_spectrum-BarLoader-percentage {
|
|
270
|
-
color: var(--spectrum-fieldlabel-text-color, var(--spectrum-alias-label-text-color));
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
@media (forced-colors: active) {
|
|
274
|
-
.yaf-qa_spectrum-BarLoader-track {
|
|
275
|
-
forced-color-adjust: none;
|
|
276
|
-
--spectrum-barloader-large-track-fill-color: ButtonText;
|
|
277
|
-
--spectrum-barloader-large-over-background-track-fill-color: ButtonText;
|
|
278
|
-
--spectrum-barloader-large-over-background-track-color: ButtonFace;
|
|
279
|
-
--spectrum-barloader-static-black-track-color: ButtonFace;
|
|
280
|
-
--spectrum-barloader-static-black-fill-color: ButtonText;
|
|
281
|
-
--spectrum-meter-large-track-color-positive: ButtonText;
|
|
282
|
-
--spectrum-meter-large-track-color-warning: ButtonText;
|
|
283
|
-
--spectrum-meter-large-track-color-critical: ButtonText;
|
|
284
|
-
--spectrum-barloader-large-track-color: ButtonFace;
|
|
285
|
-
border: 1px solid buttontext;
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
/*# sourceMappingURL=progress.fc185de6.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAMJ;;;;;;;;;;;;AAWE;;;;AAKE;;;;;AAOJ;;;;;;;;;AAUA;;;;;;AAOA;;;;;;;;AASA;;;;AAIA;;;;;AAKA;;;;;;;AAME;;;;AAIA;;;;;AAIA;;;;;;;AAQF;;;;AAGE;;;;AAIA;;;;;AAMF;;;;;;;;;AAQE;;;;AAGA;;;;AAKF;;;;;;;;;;AASA;;;;;;;;;;AAqBA;;;;;;AAKE;;;;AAIA;;;;AAME;;;;AAIA;;;;AAKA;;;;AATA;;;;AAIA;;;;AAKA;;;;AAMA;;;;AAIA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAMJ;;;;AAeA;EACE","sources":["packages/@adobe/spectrum-css-temp/components/barloader/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@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"progress.fc185de6.css.map"}
|
package/dist/types.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ProgressBarProps, SpectrumProgressBarBaseProps, SpectrumProgressBarProps, SpectrumProgressCircleProps } from "@react-types/progress";
|
|
2
|
-
import React, { HTMLAttributes } from "react";
|
|
3
|
-
import { DOMRefValue } from "@react-types/shared";
|
|
4
|
-
interface ProgressBarBaseProps extends SpectrumProgressBarBaseProps, ProgressBarProps {
|
|
5
|
-
barClassName?: string;
|
|
6
|
-
barProps?: HTMLAttributes<HTMLDivElement>;
|
|
7
|
-
labelProps?: HTMLAttributes<HTMLLabelElement>;
|
|
8
|
-
}
|
|
9
|
-
export const ProgressBarBase: React.ForwardRefExoticComponent<ProgressBarBaseProps & React.RefAttributes<DOMRefValue<HTMLDivElement>>>;
|
|
10
|
-
/**
|
|
11
|
-
* ProgressBars show the progression of a system operation: downloading, uploading, processing, etc., in a visual way.
|
|
12
|
-
* They can represent either determinate or indeterminate progress.
|
|
13
|
-
*/
|
|
14
|
-
export const ProgressBar: React.ForwardRefExoticComponent<SpectrumProgressBarProps & React.RefAttributes<DOMRefValue<HTMLDivElement>>>;
|
|
15
|
-
/**
|
|
16
|
-
* ProgressCircles show the progression of a system operation such as downloading, uploading, or processing, in a visual way.
|
|
17
|
-
* They can represent determinate or indeterminate progress.
|
|
18
|
-
*/
|
|
19
|
-
export const ProgressCircle: React.ForwardRefExoticComponent<SpectrumProgressCircleProps & React.RefAttributes<DOMRefValue<HTMLDivElement>>>;
|
|
20
|
-
export type { SpectrumProgressBarProps, SpectrumProgressCircleProps } from '@react-types/progress';
|
|
21
|
-
|
|
22
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;AAmBA,8BAA+B,SAAQ,4BAA4B,EAAE,gBAAgB;IACnF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,eAAe,cAAc,CAAC,CAAC;IAC1C,UAAU,CAAC,EAAE,eAAe,gBAAgB,CAAC,CAAA;CAC9C;AAGD,OAAO,MAAM,yHAwEX,CAAC;AC9EH;;;GAGG;AACH,OAAO,MAAM,yHAwBX,CAAC;AC3BH;;;GAGG;AACH,OAAO,MAAM,+HAgFX,CAAC;ACxFH,YAAY,EAAC,wBAAwB,EAAE,2BAA2B,EAAC,MAAM,uBAAuB,CAAC","sources":["packages/@react-spectrum/progress/src/packages/@react-spectrum/progress/src/ProgressBarBase.tsx","packages/@react-spectrum/progress/src/packages/@react-spectrum/progress/src/ProgressBar.tsx","packages/@react-spectrum/progress/src/packages/@react-spectrum/progress/src/ProgressCircle.tsx","packages/@react-spectrum/progress/src/packages/@react-spectrum/progress/src/index.ts","packages/@react-spectrum/progress/src/index.ts"],"sourcesContent":[null,null,null,null,"/*\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"],"names":[],"version":3,"file":"types.d.ts.map"}
|
package/src/ProgressBar.tsx
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import {classNames} from '@react-spectrum/utils';
|
|
14
|
-
import {DOMRef} from '@react-types/shared';
|
|
15
|
-
import {ProgressBarBase} from './ProgressBarBase';
|
|
16
|
-
import React from 'react';
|
|
17
|
-
import {SpectrumProgressBarProps} from '@react-types/progress';
|
|
18
|
-
import styles from '@adobe/spectrum-css-temp/components/barloader/vars.css';
|
|
19
|
-
import {useProgressBar} from '@react-aria/progress';
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* ProgressBars show the progression of a system operation: downloading, uploading, processing, etc., in a visual way.
|
|
23
|
-
* They can represent either determinate or indeterminate progress.
|
|
24
|
-
*/
|
|
25
|
-
export const ProgressBar = React.forwardRef(function ProgressBar(props: SpectrumProgressBarProps, ref: DOMRef<HTMLDivElement>) {
|
|
26
|
-
let {staticColor, variant, ...otherProps} = props;
|
|
27
|
-
const {
|
|
28
|
-
progressBarProps,
|
|
29
|
-
labelProps
|
|
30
|
-
} = useProgressBar(props);
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<ProgressBarBase
|
|
34
|
-
{...otherProps}
|
|
35
|
-
ref={ref}
|
|
36
|
-
barProps={progressBarProps}
|
|
37
|
-
labelProps={labelProps}
|
|
38
|
-
barClassName={
|
|
39
|
-
classNames(
|
|
40
|
-
styles,
|
|
41
|
-
{
|
|
42
|
-
'spectrum-BarLoader--overBackground': variant === 'overBackground',
|
|
43
|
-
'spectrum-BarLoader--staticWhite': staticColor === 'white',
|
|
44
|
-
'spectrum-BarLoader--staticBlack': staticColor === 'black'
|
|
45
|
-
}
|
|
46
|
-
)
|
|
47
|
-
} />
|
|
48
|
-
);
|
|
49
|
-
});
|
package/src/ProgressBarBase.tsx
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import {clamp} from '@react-aria/utils';
|
|
14
|
-
import {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';
|
|
15
|
-
import {DOMRef} from '@react-types/shared';
|
|
16
|
-
import {ProgressBarProps, SpectrumProgressBarBaseProps} from '@react-types/progress';
|
|
17
|
-
import React, {CSSProperties, HTMLAttributes} from 'react';
|
|
18
|
-
import styles from '@adobe/spectrum-css-temp/components/barloader/vars.css';
|
|
19
|
-
|
|
20
|
-
interface ProgressBarBaseProps extends SpectrumProgressBarBaseProps, ProgressBarProps {
|
|
21
|
-
barClassName?: string,
|
|
22
|
-
barProps?: HTMLAttributes<HTMLDivElement>,
|
|
23
|
-
labelProps?: HTMLAttributes<HTMLLabelElement>
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// Base ProgressBar component shared with Meter.
|
|
27
|
-
export const ProgressBarBase = React.forwardRef(function ProgressBarBase(props: ProgressBarBaseProps, ref: DOMRef<HTMLDivElement>) {
|
|
28
|
-
let {
|
|
29
|
-
value = 0,
|
|
30
|
-
minValue = 0,
|
|
31
|
-
maxValue = 100,
|
|
32
|
-
size = 'L',
|
|
33
|
-
label,
|
|
34
|
-
barClassName,
|
|
35
|
-
showValueLabel = !!label,
|
|
36
|
-
labelPosition = 'top',
|
|
37
|
-
isIndeterminate = false,
|
|
38
|
-
barProps,
|
|
39
|
-
labelProps,
|
|
40
|
-
'aria-label': ariaLabel,
|
|
41
|
-
'aria-labelledby': ariaLabelledby,
|
|
42
|
-
...otherProps
|
|
43
|
-
} = props;
|
|
44
|
-
let domRef = useDOMRef(ref);
|
|
45
|
-
let {styleProps} = useStyleProps(otherProps);
|
|
46
|
-
|
|
47
|
-
value = clamp(value, minValue, maxValue);
|
|
48
|
-
|
|
49
|
-
let barStyle: CSSProperties = {};
|
|
50
|
-
if (!isIndeterminate) {
|
|
51
|
-
let percentage = (value - minValue) / (maxValue - minValue);
|
|
52
|
-
barStyle.width = `${Math.round(percentage * 100)}%`;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// Ideally this should be in useProgressBar, but children
|
|
56
|
-
// are not supported in ProgressCircle which shares that hook...
|
|
57
|
-
if (!label && !ariaLabel && !ariaLabelledby && process.env.NODE_ENV !== 'production') {
|
|
58
|
-
console.warn('If you do not provide a visible label via children, you must specify an aria-label or aria-labelledby attribute for accessibility');
|
|
59
|
-
}
|
|
60
|
-
// use inline style for fit-content because cssnano is too smart for us and will strip out the -moz prefix in css files
|
|
61
|
-
return (
|
|
62
|
-
<div
|
|
63
|
-
{...barProps}
|
|
64
|
-
ref={domRef}
|
|
65
|
-
className={
|
|
66
|
-
classNames(
|
|
67
|
-
styles,
|
|
68
|
-
'spectrum-BarLoader',
|
|
69
|
-
{
|
|
70
|
-
'spectrum-BarLoader--small': size === 'S',
|
|
71
|
-
'spectrum-BarLoader--large': size === 'L',
|
|
72
|
-
'spectrum-BarLoader--indeterminate': isIndeterminate,
|
|
73
|
-
'spectrum-BarLoader--sideLabel': labelPosition === 'side'
|
|
74
|
-
},
|
|
75
|
-
barClassName,
|
|
76
|
-
styleProps.className
|
|
77
|
-
)
|
|
78
|
-
}
|
|
79
|
-
style={{minWidth: '-moz-fit-content', ...styleProps.style}}>
|
|
80
|
-
{label &&
|
|
81
|
-
<span
|
|
82
|
-
{...labelProps}
|
|
83
|
-
className={classNames(styles, 'spectrum-BarLoader-label')}>
|
|
84
|
-
{label}
|
|
85
|
-
</span>
|
|
86
|
-
}
|
|
87
|
-
{showValueLabel && barProps &&
|
|
88
|
-
<div className={classNames(styles, 'spectrum-BarLoader-percentage')}>
|
|
89
|
-
{barProps['aria-valuetext']}
|
|
90
|
-
</div>
|
|
91
|
-
}
|
|
92
|
-
<div className={classNames(styles, 'spectrum-BarLoader-track')}>
|
|
93
|
-
<div
|
|
94
|
-
className={classNames(styles, 'spectrum-BarLoader-fill')}
|
|
95
|
-
style={barStyle} />
|
|
96
|
-
</div>
|
|
97
|
-
</div>
|
|
98
|
-
);
|
|
99
|
-
});
|
package/src/ProgressCircle.tsx
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import {clamp} from '@react-aria/utils';
|
|
14
|
-
import {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';
|
|
15
|
-
import {DOMRef} from '@react-types/shared';
|
|
16
|
-
import React, {CSSProperties} from 'react';
|
|
17
|
-
import {SpectrumProgressCircleProps} from '@react-types/progress';
|
|
18
|
-
import styles from '@adobe/spectrum-css-temp/components/circleloader/vars.css';
|
|
19
|
-
import {useProgressBar} from '@react-aria/progress';
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* ProgressCircles show the progression of a system operation such as downloading, uploading, or processing, in a visual way.
|
|
24
|
-
* They can represent determinate or indeterminate progress.
|
|
25
|
-
*/
|
|
26
|
-
export const ProgressCircle = React.forwardRef(function ProgressCircle(props: SpectrumProgressCircleProps, ref: DOMRef<HTMLDivElement>) {
|
|
27
|
-
let {
|
|
28
|
-
value = 0,
|
|
29
|
-
minValue = 0,
|
|
30
|
-
maxValue = 100,
|
|
31
|
-
size = 'M',
|
|
32
|
-
staticColor,
|
|
33
|
-
variant,
|
|
34
|
-
isIndeterminate = false,
|
|
35
|
-
'aria-label': ariaLabel,
|
|
36
|
-
'aria-labelledby': ariaLabelledby,
|
|
37
|
-
...otherProps
|
|
38
|
-
} = props;
|
|
39
|
-
let domRef = useDOMRef(ref);
|
|
40
|
-
let {styleProps} = useStyleProps(otherProps);
|
|
41
|
-
|
|
42
|
-
value = clamp(value, minValue, maxValue);
|
|
43
|
-
let {progressBarProps} = useProgressBar({...props, value});
|
|
44
|
-
|
|
45
|
-
let subMask1Style: CSSProperties = {};
|
|
46
|
-
let subMask2Style: CSSProperties = {};
|
|
47
|
-
if (!isIndeterminate) {
|
|
48
|
-
let percentage = (value - minValue) / (maxValue - minValue) * 100;
|
|
49
|
-
let angle;
|
|
50
|
-
if (percentage > 0 && percentage <= 50) {
|
|
51
|
-
angle = -180 + (percentage / 50 * 180);
|
|
52
|
-
subMask1Style.transform = `rotate(${angle}deg)`;
|
|
53
|
-
subMask2Style.transform = 'rotate(-180deg)';
|
|
54
|
-
} else if (percentage > 50) {
|
|
55
|
-
angle = -180 + (percentage - 50) / 50 * 180;
|
|
56
|
-
subMask1Style.transform = 'rotate(0deg)';
|
|
57
|
-
subMask2Style.transform = `rotate(${angle}deg)`;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if (!ariaLabel && !ariaLabelledby && process.env.NODE_ENV !== 'production') {
|
|
62
|
-
console.warn('ProgressCircle requires an aria-label or aria-labelledby attribute for accessibility');
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return (
|
|
66
|
-
<div
|
|
67
|
-
{...styleProps}
|
|
68
|
-
{...progressBarProps}
|
|
69
|
-
ref={domRef}
|
|
70
|
-
className={
|
|
71
|
-
classNames(
|
|
72
|
-
styles,
|
|
73
|
-
'spectrum-CircleLoader',
|
|
74
|
-
{
|
|
75
|
-
'spectrum-CircleLoader--indeterminate': isIndeterminate,
|
|
76
|
-
'spectrum-CircleLoader--small': size === 'S',
|
|
77
|
-
'spectrum-CircleLoader--large': size === 'L',
|
|
78
|
-
'spectrum-CircleLoader--overBackground': variant === 'overBackground',
|
|
79
|
-
'spectrum-CircleLoader--staticWhite': staticColor === 'white',
|
|
80
|
-
'spectrum-CircleLoader--staticBlack': staticColor === 'black'
|
|
81
|
-
},
|
|
82
|
-
styleProps.className
|
|
83
|
-
)
|
|
84
|
-
}>
|
|
85
|
-
<div className={classNames(styles, 'spectrum-CircleLoader-track')} />
|
|
86
|
-
<div className={classNames(styles, 'spectrum-CircleLoader-fills')} >
|
|
87
|
-
<div className={classNames(styles, 'spectrum-CircleLoader-fillMask1')} >
|
|
88
|
-
<div
|
|
89
|
-
className={classNames(styles, 'spectrum-CircleLoader-fillSubMask1')}
|
|
90
|
-
data-testid="fillSubMask1"
|
|
91
|
-
style={subMask1Style}>
|
|
92
|
-
<div className={classNames(styles, 'spectrum-CircleLoader-fill')} />
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
<div className={classNames(styles, 'spectrum-CircleLoader-fillMask2')} >
|
|
96
|
-
<div
|
|
97
|
-
className={classNames(styles, 'spectrum-CircleLoader-fillSubMask2')}
|
|
98
|
-
data-testid="fillSubMask2"
|
|
99
|
-
style={subMask2Style} >
|
|
100
|
-
<div className={classNames(styles, 'spectrum-CircleLoader-fill')} />
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
104
|
-
</div>
|
|
105
|
-
);
|
|
106
|
-
});
|