@fluentui/react-progress 0.0.0-nightly-20230223-2115.1 → 0.0.0-nightly-20230227-0424.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +13 -13
- package/CHANGELOG.md +9 -9
- package/lib/ProgressBar.js.map +1 -1
- package/lib/ProgressField.js.map +1 -1
- package/lib/components/ProgressBar/ProgressBar.js.map +1 -1
- package/lib/components/ProgressBar/ProgressBar.types.js.map +1 -1
- package/lib/components/ProgressBar/index.js.map +1 -1
- package/lib/components/ProgressBar/renderProgressBar.js +5 -2
- package/lib/components/ProgressBar/renderProgressBar.js.map +1 -1
- package/lib/components/ProgressBar/useProgressBar.js +0 -1
- package/lib/components/ProgressBar/useProgressBar.js.map +1 -1
- package/lib/components/ProgressBar/useProgressBarStyles.js.map +1 -1
- package/lib/components/ProgressField/ProgressField.js +2 -1
- package/lib/components/ProgressField/ProgressField.js.map +1 -1
- package/lib/components/ProgressField/index.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/ProgressBar.js +4 -5
- package/lib-commonjs/ProgressBar.js.map +1 -1
- package/lib-commonjs/ProgressField.js +4 -5
- package/lib-commonjs/ProgressField.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/ProgressBar.js +15 -16
- package/lib-commonjs/components/ProgressBar/ProgressBar.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/ProgressBar.types.js +2 -3
- package/lib-commonjs/components/ProgressBar/ProgressBar.types.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/index.js +8 -9
- package/lib-commonjs/components/ProgressBar/index.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/renderProgressBar.js +20 -15
- package/lib-commonjs/components/ProgressBar/renderProgressBar.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/useProgressBar.js +49 -38
- package/lib-commonjs/components/ProgressBar/useProgressBar.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js +144 -246
- package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js.map +1 -1
- package/lib-commonjs/components/ProgressField/ProgressField.js +19 -25
- package/lib-commonjs/components/ProgressField/ProgressField.js.map +1 -1
- package/lib-commonjs/components/ProgressField/index.js +4 -5
- package/lib-commonjs/components/ProgressField/index.js.map +1 -1
- package/lib-commonjs/index.js +49 -21
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +8 -8
- package/.swcrc +0 -33
@@ -1,268 +1,166 @@
|
|
1
1
|
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
-
});
|
5
|
-
function _export(target, all) {
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
7
|
-
enumerable: true,
|
8
|
-
get: all[name]
|
9
|
-
});
|
10
|
-
}
|
11
|
-
_export(exports, {
|
12
|
-
progressBarClassNames: ()=>progressBarClassNames,
|
13
|
-
useProgressBarStyles_unstable: ()=>useProgressBarStyles_unstable
|
4
|
+
value: true
|
14
5
|
});
|
15
|
-
|
16
|
-
const
|
17
|
-
const
|
18
|
-
|
19
|
-
|
6
|
+
exports.useProgressBarStyles_unstable = exports.progressBarClassNames = void 0;
|
7
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
8
|
+
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
|
9
|
+
const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
|
10
|
+
exports.progressBarClassNames = {
|
11
|
+
root: 'fui-ProgressBar',
|
12
|
+
bar: 'fui-ProgressBar__bar'
|
20
13
|
};
|
21
14
|
// If the percentComplete is near 0, don't animate it.
|
22
15
|
// This prevents animations on reset to 0 scenarios.
|
23
16
|
const ZERO_THRESHOLD = 0.01;
|
24
17
|
const barThicknessValues = {
|
25
|
-
|
26
|
-
|
18
|
+
medium: '2px',
|
19
|
+
large: '4px'
|
27
20
|
};
|
28
21
|
const indeterminateProgressBar = {
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
22
|
+
'0%': {
|
23
|
+
left: '-100% /* @noflip */'
|
24
|
+
},
|
25
|
+
'100%': {
|
26
|
+
left: '100% /* @noflip */'
|
27
|
+
}
|
35
28
|
};
|
36
29
|
const indeterminateProgressBarRTL = {
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
30
|
+
'100%': {
|
31
|
+
right: '-100% /* @noflip */'
|
32
|
+
},
|
33
|
+
'0%': {
|
34
|
+
right: '100% /* @noflip */'
|
35
|
+
}
|
43
36
|
};
|
44
37
|
/**
|
45
38
|
* Styles for the root slot
|
46
|
-
*/
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
Bbmb7ep: [
|
77
|
-
"fzi6hpg",
|
78
|
-
"fyowgf4"
|
79
|
-
],
|
80
|
-
Beyfa6y: [
|
81
|
-
"fyowgf4",
|
82
|
-
"fzi6hpg"
|
83
|
-
],
|
84
|
-
B7oj6ja: [
|
85
|
-
"f3fg2lr",
|
86
|
-
"f13av6d4"
|
87
|
-
],
|
88
|
-
Btl43ni: [
|
89
|
-
"f13av6d4",
|
90
|
-
"f3fg2lr"
|
91
|
-
]
|
92
|
-
},
|
93
|
-
medium: {
|
94
|
-
Bqenvij: "f4t8t6x"
|
95
|
-
},
|
96
|
-
large: {
|
97
|
-
Bqenvij: "f6ywr7j"
|
98
|
-
}
|
39
|
+
*/
|
40
|
+
const useRootStyles = /*#__PURE__*/react_1.__styles({
|
41
|
+
root: {
|
42
|
+
mc9l5x: "ftgm304",
|
43
|
+
De3pzq: "f18f03hv",
|
44
|
+
Bdqf98w: "fhb5wj7",
|
45
|
+
B68tc82: "f1p9o1ba",
|
46
|
+
Bmxbyg5: "f1sil6mw",
|
47
|
+
I5kgcl: "fs8b23g",
|
48
|
+
tu2nte: "f1mcb20s",
|
49
|
+
y0r1ed: "fek7wd8"
|
50
|
+
},
|
51
|
+
rounded: {
|
52
|
+
Bbmb7ep: ["f1aa9q02", "f16jpd5f"],
|
53
|
+
Beyfa6y: ["f16jpd5f", "f1aa9q02"],
|
54
|
+
B7oj6ja: ["f1jar5jt", "fyu767a"],
|
55
|
+
Btl43ni: ["fyu767a", "f1jar5jt"]
|
56
|
+
},
|
57
|
+
square: {
|
58
|
+
Bbmb7ep: ["fzi6hpg", "fyowgf4"],
|
59
|
+
Beyfa6y: ["fyowgf4", "fzi6hpg"],
|
60
|
+
B7oj6ja: ["f3fg2lr", "f13av6d4"],
|
61
|
+
Btl43ni: ["f13av6d4", "f3fg2lr"]
|
62
|
+
},
|
63
|
+
medium: {
|
64
|
+
Bqenvij: "f4t8t6x"
|
65
|
+
},
|
66
|
+
large: {
|
67
|
+
Bqenvij: "f6ywr7j"
|
68
|
+
}
|
99
69
|
}, {
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}",
|
109
|
-
".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}",
|
110
|
-
".fzi6hpg{border-bottom-right-radius:var(--borderRadiusNone);}",
|
111
|
-
".fyowgf4{border-bottom-left-radius:var(--borderRadiusNone);}",
|
112
|
-
".f3fg2lr{border-top-right-radius:var(--borderRadiusNone);}",
|
113
|
-
".f13av6d4{border-top-left-radius:var(--borderRadiusNone);}",
|
114
|
-
".f4t8t6x{height:2px;}",
|
115
|
-
".f6ywr7j{height:4px;}"
|
116
|
-
],
|
117
|
-
m: [
|
118
|
-
[
|
119
|
-
"@media screen and (forced-colors: active){.fs8b23g{border-bottom-width:1px;}}",
|
120
|
-
{
|
121
|
-
m: "screen and (forced-colors: active)"
|
122
|
-
}
|
123
|
-
],
|
124
|
-
[
|
125
|
-
"@media screen and (forced-colors: active){.f1mcb20s{border-bottom-style:solid;}}",
|
126
|
-
{
|
127
|
-
m: "screen and (forced-colors: active)"
|
128
|
-
}
|
129
|
-
],
|
130
|
-
[
|
131
|
-
"@media screen and (forced-colors: active){.fek7wd8{border-bottom-color:CanvasText;}}",
|
132
|
-
{
|
133
|
-
m: "screen and (forced-colors: active)"
|
134
|
-
}
|
135
|
-
]
|
136
|
-
]
|
70
|
+
d: [".ftgm304{display:block;}", ".f18f03hv{background-color:var(--colorNeutralBackground6);}", ".fhb5wj7{justify-self:stretch;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".fzi6hpg{border-bottom-right-radius:var(--borderRadiusNone);}", ".fyowgf4{border-bottom-left-radius:var(--borderRadiusNone);}", ".f3fg2lr{border-top-right-radius:var(--borderRadiusNone);}", ".f13av6d4{border-top-left-radius:var(--borderRadiusNone);}", ".f4t8t6x{height:2px;}", ".f6ywr7j{height:4px;}"],
|
71
|
+
m: [["@media screen and (forced-colors: active){.fs8b23g{border-bottom-width:1px;}}", {
|
72
|
+
m: "screen and (forced-colors: active)"
|
73
|
+
}], ["@media screen and (forced-colors: active){.f1mcb20s{border-bottom-style:solid;}}", {
|
74
|
+
m: "screen and (forced-colors: active)"
|
75
|
+
}], ["@media screen and (forced-colors: active){.fek7wd8{border-bottom-color:CanvasText;}}", {
|
76
|
+
m: "screen and (forced-colors: active)"
|
77
|
+
}]]
|
137
78
|
});
|
138
79
|
/**
|
139
80
|
* Styles for the ProgressBar bar
|
140
|
-
*/
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
},
|
186
|
-
brand: {
|
187
|
-
De3pzq: "ftywsgz",
|
188
|
-
Bpep1pd: "f1neahkh"
|
189
|
-
},
|
190
|
-
error: {
|
191
|
-
De3pzq: "fdl5y0r"
|
192
|
-
},
|
193
|
-
warning: {
|
194
|
-
De3pzq: "f1s438gw"
|
195
|
-
},
|
196
|
-
success: {
|
197
|
-
De3pzq: "flxk52p"
|
198
|
-
}
|
81
|
+
*/
|
82
|
+
const useBarStyles = /*#__PURE__*/react_1.__styles({
|
83
|
+
base: {
|
84
|
+
Bbmb7ep: ["f1d9uwra", "fzibvwi"],
|
85
|
+
Beyfa6y: ["fzibvwi", "f1d9uwra"],
|
86
|
+
B7oj6ja: ["fuoumxm", "f1vtqnvc"],
|
87
|
+
Btl43ni: ["f1vtqnvc", "fuoumxm"]
|
88
|
+
},
|
89
|
+
medium: {
|
90
|
+
Bqenvij: "f4t8t6x"
|
91
|
+
},
|
92
|
+
large: {
|
93
|
+
Bqenvij: "f6ywr7j"
|
94
|
+
},
|
95
|
+
nonZeroDeterminate: {
|
96
|
+
Bmy1vo4: "fjt6zfz",
|
97
|
+
B3o57yi: "f1wofebd",
|
98
|
+
Bkqvd7p: "fv71qf3"
|
99
|
+
},
|
100
|
+
indeterminate: {
|
101
|
+
B2u0y6b: "fa0wk36",
|
102
|
+
qhf8xq: "f10pi13n",
|
103
|
+
Bcmaq0h: ["fpo0yib", "f1u5hf6c"],
|
104
|
+
Bv12yb3: "f1jk3tlg",
|
105
|
+
vin17d: "f1a27w2r",
|
106
|
+
w3vfg9: "f1cpbl36",
|
107
|
+
Gqtpxc: "f4akx1t",
|
108
|
+
B3vm3ge: "f18p5put"
|
109
|
+
},
|
110
|
+
rtl: {
|
111
|
+
Bv12yb3: "fjhwsai"
|
112
|
+
},
|
113
|
+
brand: {
|
114
|
+
De3pzq: "ftywsgz",
|
115
|
+
Bpep1pd: "f1neahkh"
|
116
|
+
},
|
117
|
+
error: {
|
118
|
+
De3pzq: "fdl5y0r"
|
119
|
+
},
|
120
|
+
warning: {
|
121
|
+
De3pzq: "f1s438gw"
|
122
|
+
},
|
123
|
+
success: {
|
124
|
+
De3pzq: "flxk52p"
|
125
|
+
}
|
199
126
|
}, {
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
".fv71qf3{transition-timing-function:ease;}",
|
210
|
-
".fa0wk36{max-width:33%;}",
|
211
|
-
".f10pi13n{position:relative;}",
|
212
|
-
".fpo0yib{background-image:linear-gradient(\n to right,\n var(--colorNeutralBackground6) 0%,\n var(--colorTransparentBackground) 50%,\n var(--colorNeutralBackground6) 100%\n );}",
|
213
|
-
".f1u5hf6c{background-image:linear-gradient(\n to left,\n var(--colorNeutralBackground6) 0%,\n var(--colorTransparentBackground) 50%,\n var(--colorNeutralBackground6) 100%\n );}",
|
214
|
-
".f1jk3tlg{-webkit-animation-name:fzkbrka;animation-name:fzkbrka;}",
|
215
|
-
".f1a27w2r{-webkit-animation-duration:3s;animation-duration:3s;}",
|
216
|
-
".f1cpbl36{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;}",
|
217
|
-
".fjhwsai{-webkit-animation-name:f1kx06uz;animation-name:f1kx06uz;}",
|
218
|
-
".ftywsgz{background-color:var(--colorCompoundBrandBackground);}",
|
219
|
-
".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}",
|
220
|
-
".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}",
|
221
|
-
".flxk52p{background-color:var(--colorPaletteGreenBackground3);}"
|
222
|
-
],
|
223
|
-
k: [
|
224
|
-
"@-webkit-keyframes fzkbrka{0%{left:-100%;}100%{left:100%;}}",
|
225
|
-
"@keyframes fzkbrka{0%{left:-100%;}100%{left:100%;}}",
|
226
|
-
"@-webkit-keyframes f1kx06uz{100%{right:-100%;}0%{right:100%;}}",
|
227
|
-
"@keyframes f1kx06uz{100%{right:-100%;}0%{right:100%;}}"
|
228
|
-
],
|
229
|
-
m: [
|
230
|
-
[
|
231
|
-
"@media screen and (prefers-reduced-motion: reduce){.f4akx1t{-webkit-animation-duration:0.01ms;animation-duration:0.01ms;}}",
|
232
|
-
{
|
233
|
-
m: "screen and (prefers-reduced-motion: reduce)"
|
234
|
-
}
|
235
|
-
],
|
236
|
-
[
|
237
|
-
"@media screen and (prefers-reduced-motion: reduce){.f18p5put{-webkit-animation-iteration-count:1;animation-iteration-count:1;}}",
|
238
|
-
{
|
239
|
-
m: "screen and (prefers-reduced-motion: reduce)"
|
240
|
-
}
|
241
|
-
],
|
242
|
-
[
|
243
|
-
"@media screen and (forced-colors: active){.f1neahkh{background-color:Highlight;}}",
|
244
|
-
{
|
245
|
-
m: "screen and (forced-colors: active)"
|
246
|
-
}
|
247
|
-
]
|
248
|
-
]
|
127
|
+
d: [".f1d9uwra{border-bottom-right-radius:inherit;}", ".fzibvwi{border-bottom-left-radius:inherit;}", ".fuoumxm{border-top-right-radius:inherit;}", ".f1vtqnvc{border-top-left-radius:inherit;}", ".f4t8t6x{height:2px;}", ".f6ywr7j{height:4px;}", ".fjt6zfz{transition-property:width;}", ".f1wofebd{transition-duration:0.3s;}", ".fv71qf3{transition-timing-function:ease;}", ".fa0wk36{max-width:33%;}", ".f10pi13n{position:relative;}", ".fpo0yib{background-image:linear-gradient(\n to right,\n var(--colorNeutralBackground6) 0%,\n var(--colorTransparentBackground) 50%,\n var(--colorNeutralBackground6) 100%\n );}", ".f1u5hf6c{background-image:linear-gradient(\n to left,\n var(--colorNeutralBackground6) 0%,\n var(--colorTransparentBackground) 50%,\n var(--colorNeutralBackground6) 100%\n );}", ".f1jk3tlg{-webkit-animation-name:fzkbrka;animation-name:fzkbrka;}", ".f1a27w2r{-webkit-animation-duration:3s;animation-duration:3s;}", ".f1cpbl36{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;}", ".fjhwsai{-webkit-animation-name:f1kx06uz;animation-name:f1kx06uz;}", ".ftywsgz{background-color:var(--colorCompoundBrandBackground);}", ".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}", ".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}", ".flxk52p{background-color:var(--colorPaletteGreenBackground3);}"],
|
128
|
+
k: ["@-webkit-keyframes fzkbrka{0%{left:-100%;}100%{left:100%;}}", "@keyframes fzkbrka{0%{left:-100%;}100%{left:100%;}}", "@-webkit-keyframes f1kx06uz{100%{right:-100%;}0%{right:100%;}}", "@keyframes f1kx06uz{100%{right:-100%;}0%{right:100%;}}"],
|
129
|
+
m: [["@media screen and (prefers-reduced-motion: reduce){.f4akx1t{-webkit-animation-duration:0.01ms;animation-duration:0.01ms;}}", {
|
130
|
+
m: "screen and (prefers-reduced-motion: reduce)"
|
131
|
+
}], ["@media screen and (prefers-reduced-motion: reduce){.f18p5put{-webkit-animation-iteration-count:1;animation-iteration-count:1;}}", {
|
132
|
+
m: "screen and (prefers-reduced-motion: reduce)"
|
133
|
+
}], ["@media screen and (forced-colors: active){.f1neahkh{background-color:Highlight;}}", {
|
134
|
+
m: "screen and (forced-colors: active)"
|
135
|
+
}]]
|
249
136
|
});
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
137
|
+
/**
|
138
|
+
* Apply styling to the ProgressBar slots based on the state
|
139
|
+
*/
|
140
|
+
const useProgressBarStyles_unstable = state => {
|
141
|
+
const {
|
142
|
+
color,
|
143
|
+
max,
|
144
|
+
shape,
|
145
|
+
thickness,
|
146
|
+
value
|
147
|
+
} = state;
|
148
|
+
const rootStyles = useRootStyles();
|
149
|
+
const barStyles = useBarStyles();
|
150
|
+
const {
|
151
|
+
dir
|
152
|
+
} = react_shared_contexts_1.useFluent_unstable();
|
153
|
+
state.root.className = react_1.mergeClasses(exports.progressBarClassNames.root, rootStyles.root, rootStyles[shape], rootStyles[thickness], state.root.className);
|
154
|
+
if (state.bar) {
|
155
|
+
state.bar.className = react_1.mergeClasses(exports.progressBarClassNames.bar, barStyles.base, barStyles.brand, value === undefined && barStyles.indeterminate, value === undefined && dir === 'rtl' && barStyles.rtl, barStyles[thickness], value !== undefined && value > ZERO_THRESHOLD && barStyles.nonZeroDeterminate, color && value !== undefined && barStyles[color], state.bar.className);
|
156
|
+
}
|
157
|
+
if (state.bar && value !== undefined) {
|
158
|
+
state.bar.style = {
|
159
|
+
width: Math.min(100, Math.max(0, value / max * 100)) + '%',
|
160
|
+
...state.bar.style
|
161
|
+
};
|
162
|
+
}
|
163
|
+
return state;
|
164
|
+
};
|
165
|
+
exports.useProgressBarStyles_unstable = useProgressBarStyles_unstable;
|
268
166
|
//# sourceMappingURL=useProgressBarStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/ProgressBar/useProgressBarStyles.js"],"sourcesContent":["import { __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nexport const progressBarClassNames = {\n root: 'fui-ProgressBar',\n bar: 'fui-ProgressBar__bar'\n};\n// If the percentComplete is near 0, don't animate it.\n// This prevents animations on reset to 0 scenarios.\nconst ZERO_THRESHOLD = 0.01;\nconst barThicknessValues = {\n medium: '2px',\n large: '4px'\n};\nconst indeterminateProgressBar = {\n '0%': {\n left: '-100% /* @noflip */'\n },\n '100%': {\n left: '100% /* @noflip */'\n }\n};\nconst indeterminateProgressBarRTL = {\n '100%': {\n right: '-100% /* @noflip */'\n },\n '0%': {\n right: '100% /* @noflip */'\n }\n};\n/**\n * Styles for the root slot\n */\nconst useRootStyles = /*#__PURE__*/__styles({\n root: {\n mc9l5x: \"ftgm304\",\n De3pzq: \"f18f03hv\",\n Bdqf98w: \"fhb5wj7\",\n B68tc82: \"f1p9o1ba\",\n Bmxbyg5: \"f1sil6mw\",\n I5kgcl: \"fs8b23g\",\n tu2nte: \"f1mcb20s\",\n y0r1ed: \"fek7wd8\"\n },\n rounded: {\n Bbmb7ep: [\"f1aa9q02\", \"f16jpd5f\"],\n Beyfa6y: [\"f16jpd5f\", \"f1aa9q02\"],\n B7oj6ja: [\"f1jar5jt\", \"fyu767a\"],\n Btl43ni: [\"fyu767a\", \"f1jar5jt\"]\n },\n square: {\n Bbmb7ep: [\"fzi6hpg\", \"fyowgf4\"],\n Beyfa6y: [\"fyowgf4\", \"fzi6hpg\"],\n B7oj6ja: [\"f3fg2lr\", \"f13av6d4\"],\n Btl43ni: [\"f13av6d4\", \"f3fg2lr\"]\n },\n medium: {\n Bqenvij: \"f4t8t6x\"\n },\n large: {\n Bqenvij: \"f6ywr7j\"\n }\n}, {\n d: [\".ftgm304{display:block;}\", \".f18f03hv{background-color:var(--colorNeutralBackground6);}\", \".fhb5wj7{justify-self:stretch;}\", \".f1p9o1ba{overflow-x:hidden;}\", \".f1sil6mw{overflow-y:hidden;}\", \".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}\", \".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}\", \".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}\", \".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}\", \".fzi6hpg{border-bottom-right-radius:var(--borderRadiusNone);}\", \".fyowgf4{border-bottom-left-radius:var(--borderRadiusNone);}\", \".f3fg2lr{border-top-right-radius:var(--borderRadiusNone);}\", \".f13av6d4{border-top-left-radius:var(--borderRadiusNone);}\", \".f4t8t6x{height:2px;}\", \".f6ywr7j{height:4px;}\"],\n m: [[\"@media screen and (forced-colors: active){.fs8b23g{border-bottom-width:1px;}}\", {\n m: \"screen and (forced-colors: active)\"\n }], [\"@media screen and (forced-colors: active){.f1mcb20s{border-bottom-style:solid;}}\", {\n m: \"screen and (forced-colors: active)\"\n }], [\"@media screen and (forced-colors: active){.fek7wd8{border-bottom-color:CanvasText;}}\", {\n m: \"screen and (forced-colors: active)\"\n }]]\n});\n/**\n * Styles for the ProgressBar bar\n */\nconst useBarStyles = /*#__PURE__*/__styles({\n base: {\n Bbmb7ep: [\"f1d9uwra\", \"fzibvwi\"],\n Beyfa6y: [\"fzibvwi\", \"f1d9uwra\"],\n B7oj6ja: [\"fuoumxm\", \"f1vtqnvc\"],\n Btl43ni: [\"f1vtqnvc\", \"fuoumxm\"]\n },\n medium: {\n Bqenvij: \"f4t8t6x\"\n },\n large: {\n Bqenvij: \"f6ywr7j\"\n },\n nonZeroDeterminate: {\n Bmy1vo4: \"fjt6zfz\",\n B3o57yi: \"f1wofebd\",\n Bkqvd7p: \"fv71qf3\"\n },\n indeterminate: {\n B2u0y6b: \"fa0wk36\",\n qhf8xq: \"f10pi13n\",\n Bcmaq0h: [\"fpo0yib\", \"f1u5hf6c\"],\n Bv12yb3: \"f1jk3tlg\",\n vin17d: \"f1a27w2r\",\n w3vfg9: \"f1cpbl36\",\n Gqtpxc: \"f4akx1t\",\n B3vm3ge: \"f18p5put\"\n },\n rtl: {\n Bv12yb3: \"fjhwsai\"\n },\n brand: {\n De3pzq: \"ftywsgz\",\n Bpep1pd: \"f1neahkh\"\n },\n error: {\n De3pzq: \"fdl5y0r\"\n },\n warning: {\n De3pzq: \"f1s438gw\"\n },\n success: {\n De3pzq: \"flxk52p\"\n }\n}, {\n d: [\".f1d9uwra{border-bottom-right-radius:inherit;}\", \".fzibvwi{border-bottom-left-radius:inherit;}\", \".fuoumxm{border-top-right-radius:inherit;}\", \".f1vtqnvc{border-top-left-radius:inherit;}\", \".f4t8t6x{height:2px;}\", \".f6ywr7j{height:4px;}\", \".fjt6zfz{transition-property:width;}\", \".f1wofebd{transition-duration:0.3s;}\", \".fv71qf3{transition-timing-function:ease;}\", \".fa0wk36{max-width:33%;}\", \".f10pi13n{position:relative;}\", \".fpo0yib{background-image:linear-gradient(\\n to right,\\n var(--colorNeutralBackground6) 0%,\\n var(--colorTransparentBackground) 50%,\\n var(--colorNeutralBackground6) 100%\\n );}\", \".f1u5hf6c{background-image:linear-gradient(\\n to left,\\n var(--colorNeutralBackground6) 0%,\\n var(--colorTransparentBackground) 50%,\\n var(--colorNeutralBackground6) 100%\\n );}\", \".f1jk3tlg{-webkit-animation-name:fzkbrka;animation-name:fzkbrka;}\", \".f1a27w2r{-webkit-animation-duration:3s;animation-duration:3s;}\", \".f1cpbl36{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;}\", \".fjhwsai{-webkit-animation-name:f1kx06uz;animation-name:f1kx06uz;}\", \".ftywsgz{background-color:var(--colorCompoundBrandBackground);}\", \".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}\", \".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}\", \".flxk52p{background-color:var(--colorPaletteGreenBackground3);}\"],\n k: [\"@-webkit-keyframes fzkbrka{0%{left:-100%;}100%{left:100%;}}\", \"@keyframes fzkbrka{0%{left:-100%;}100%{left:100%;}}\", \"@-webkit-keyframes f1kx06uz{100%{right:-100%;}0%{right:100%;}}\", \"@keyframes f1kx06uz{100%{right:-100%;}0%{right:100%;}}\"],\n m: [[\"@media screen and (prefers-reduced-motion: reduce){.f4akx1t{-webkit-animation-duration:0.01ms;animation-duration:0.01ms;}}\", {\n m: \"screen and (prefers-reduced-motion: reduce)\"\n }], [\"@media screen and (prefers-reduced-motion: reduce){.f18p5put{-webkit-animation-iteration-count:1;animation-iteration-count:1;}}\", {\n m: \"screen and (prefers-reduced-motion: reduce)\"\n }], [\"@media screen and (forced-colors: active){.f1neahkh{background-color:Highlight;}}\", {\n m: \"screen and (forced-colors: active)\"\n }]]\n});\n/**\n * Apply styling to the ProgressBar slots based on the state\n */\nexport const useProgressBarStyles_unstable = state => {\n const {\n color,\n max,\n shape,\n thickness,\n value\n } = state;\n const rootStyles = useRootStyles();\n const barStyles = useBarStyles();\n const {\n dir\n } = useFluent();\n state.root.className = mergeClasses(progressBarClassNames.root, rootStyles.root, rootStyles[shape], rootStyles[thickness], state.root.className);\n if (state.bar) {\n state.bar.className = mergeClasses(progressBarClassNames.bar, barStyles.base, barStyles.brand, value === undefined && barStyles.indeterminate, value === undefined && dir === 'rtl' && barStyles.rtl, barStyles[thickness], value !== undefined && value > ZERO_THRESHOLD && barStyles.nonZeroDeterminate, color && value !== undefined && barStyles[color], state.bar.className);\n }\n if (state.bar && value !== undefined) {\n state.bar.style = {\n width: Math.min(100, Math.max(0, value / max * 100)) + '%',\n ...state.bar.style\n };\n }\n return state;\n};\n//# sourceMappingURL=useProgressBarStyles.js.map"],"names":["progressBarClassNames","useProgressBarStyles_unstable","root","bar","ZERO_THRESHOLD","barThicknessValues","medium","large","indeterminateProgressBar","left","indeterminateProgressBarRTL","right","useRootStyles","__styles","mc9l5x","De3pzq","Bdqf98w","B68tc82","Bmxbyg5","I5kgcl","tu2nte","y0r1ed","rounded","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","square","Bqenvij","d","m","useBarStyles","base","nonZeroDeterminate","Bmy1vo4","B3o57yi","Bkqvd7p","indeterminate","B2u0y6b","qhf8xq","Bcmaq0h","Bv12yb3","vin17d","w3vfg9","Gqtpxc","B3vm3ge","rtl","brand","Bpep1pd","error","warning","success","k","state","color","max","shape","thickness","value","rootStyles","barStyles","dir","useFluent","className","mergeClasses","undefined","style","width","Math","min"],"mappings":";;;;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rBJ,KAAK,CAACd,IAAI,CAACwB,SAAS,CACrB;EAED,IAAIV,KAAK,CAACb,GAAG,EAAE;IACba,KAAK,CAACb,GAAG,CAACuB,SAAS,GAAGb,oBAAY,CAChCZ,6BAAqB,CAACE,GAAG,EACzBoB,SAAS,CAACI,IAAI,EACdJ,SAAS,CAACK,KAAK,EACfP,KAAK,KAAKQ,SAAS,IAAIN,SAAS,CAACO,aAAa,EAC9CT,KAAK,KAAKQ,SAAS,IAAIL,GAAG,KAAK,KAAK,IAAID,SAAS,CAACQ,GAAG,EACrDR,SAAS,CAACH,SAAS,CAAC,EACpBC,KAAK,KAAKQ,SAAS,IAAIR,KAAK,GAAGjB,cAAc,IAAImB,SAAS,CAACS,kBAAkB,EAC7Ef,KAAK,IAAII,KAAK,KAAKQ,SAAS,IAAIN,SAAS,CAACN,KAAK,CAAC,EAChDD,KAAK,CAACb,GAAG,CAACuB,SAAS,CACpB;;EAGH,IAAIV,KAAK,CAACb,GAAG,IAAIkB,KAAK,KAAKQ,SAAS,EAAE;IACpCb,KAAK,CAACb,GAAG,CAAC8B,KAAK,GAAG;MAChBC,KAAK,EAAEC,IAAI,CAACC,GAAG,CAAC,GAAG,EAAED,IAAI,CAACjB,GAAG,CAAC,CAAC,EAAGG,KAAK,GAAGH,GAAG,GAAI,GAAG,CAAC,CAAC,GAAG,GAAG;MAC5D,GAAGF,KAAK,CAACb,GAAG,CAAC8B;KACd;;EAGH,OAAOjB,KAAK;AACd,CAAC;AApCYf,qCAA6B","names":["exports","root","bar","ZERO_THRESHOLD","barThicknessValues","medium","large","indeterminateProgressBar","left","indeterminateProgressBarRTL","right","useRootStyles","react_1","useBarStyles","useProgressBarStyles_unstable","state","color","max","shape","thickness","value","rootStyles","barStyles","dir","react_shared_contexts_1","className","base","brand","undefined","indeterminate","rtl","nonZeroDeterminate","style","width","Math","min"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/src/components/ProgressBar/useProgressBarStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport type { ProgressBarState, ProgressBarSlots } from './ProgressBar.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const progressBarClassNames: SlotClassNames<ProgressBarSlots> = {\n root: 'fui-ProgressBar',\n bar: 'fui-ProgressBar__bar',\n};\n\n// If the percentComplete is near 0, don't animate it.\n// This prevents animations on reset to 0 scenarios.\nconst ZERO_THRESHOLD = 0.01;\n\nconst barThicknessValues = {\n medium: '2px',\n large: '4px',\n};\n\nconst indeterminateProgressBar = {\n '0%': {\n left: '-100% /* @noflip */',\n },\n '100%': {\n left: '100% /* @noflip */',\n },\n};\nconst indeterminateProgressBarRTL = {\n '100%': {\n right: '-100% /* @noflip */',\n },\n '0%': {\n right: '100% /* @noflip */',\n },\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootStyles = makeStyles({\n root: {\n display: 'block',\n backgroundColor: tokens.colorNeutralBackground6,\n justifySelf: 'stretch',\n ...shorthands.overflow('hidden'),\n\n '@media screen and (forced-colors: active)': {\n ...shorthands.borderBottom('1px', 'solid', 'CanvasText'),\n },\n },\n rounded: {\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n },\n square: {\n ...shorthands.borderRadius(tokens.borderRadiusNone),\n },\n medium: {\n height: barThicknessValues.medium,\n },\n large: {\n height: barThicknessValues.large,\n },\n});\n\n/**\n * Styles for the ProgressBar bar\n */\nconst useBarStyles = makeStyles({\n base: {\n ...shorthands.borderRadius('inherit'),\n },\n medium: {\n height: barThicknessValues.medium,\n },\n large: {\n height: barThicknessValues.large,\n },\n nonZeroDeterminate: {\n transitionProperty: 'width',\n transitionDuration: '0.3s',\n transitionTimingFunction: 'ease',\n },\n indeterminate: {\n maxWidth: '33%',\n position: 'relative',\n backgroundImage: `linear-gradient(\n to right,\n ${tokens.colorNeutralBackground6} 0%,\n ${tokens.colorTransparentBackground} 50%,\n ${tokens.colorNeutralBackground6} 100%\n )`,\n animationName: indeterminateProgressBar,\n animationDuration: '3s',\n animationIterationCount: 'infinite',\n '@media screen and (prefers-reduced-motion: reduce)': {\n animationDuration: '0.01ms',\n animationIterationCount: '1',\n },\n },\n\n rtl: {\n animationName: indeterminateProgressBarRTL,\n },\n\n brand: {\n backgroundColor: tokens.colorCompoundBrandBackground,\n '@media screen and (forced-colors: active)': {\n backgroundColor: 'Highlight',\n },\n },\n\n error: {\n backgroundColor: tokens.colorPaletteRedBackground3,\n },\n warning: {\n backgroundColor: tokens.colorPaletteDarkOrangeBackground3,\n },\n success: {\n backgroundColor: tokens.colorPaletteGreenBackground3,\n },\n});\n\n/**\n * Apply styling to the ProgressBar slots based on the state\n */\nexport const useProgressBarStyles_unstable = (state: ProgressBarState): ProgressBarState => {\n const { color, max, shape, thickness, value } = state;\n const rootStyles = useRootStyles();\n const barStyles = useBarStyles();\n const { dir } = useFluent();\n\n state.root.className = mergeClasses(\n progressBarClassNames.root,\n rootStyles.root,\n rootStyles[shape],\n rootStyles[thickness],\n state.root.className,\n );\n\n if (state.bar) {\n state.bar.className = mergeClasses(\n progressBarClassNames.bar,\n barStyles.base,\n barStyles.brand,\n value === undefined && barStyles.indeterminate,\n value === undefined && dir === 'rtl' && barStyles.rtl,\n barStyles[thickness],\n value !== undefined && value > ZERO_THRESHOLD && barStyles.nonZeroDeterminate,\n color && value !== undefined && barStyles[color],\n state.bar.className,\n );\n }\n\n if (state.bar && value !== undefined) {\n state.bar.style = {\n width: Math.min(100, Math.max(0, (value / max) * 100)) + '%',\n ...state.bar.style,\n };\n }\n\n return state;\n};\n"]}
|
@@ -1,29 +1,23 @@
|
|
1
|
-
|
1
|
+
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
+
value: true
|
4
5
|
});
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
6
|
+
exports.ProgressField = exports.progressFieldClassNames = void 0;
|
7
|
+
/* eslint-disable deprecation/deprecation */
|
8
|
+
const react_field_1 = /*#__PURE__*/require("@fluentui/react-field");
|
9
|
+
const ProgressBar_1 = /*#__PURE__*/require("../../ProgressBar");
|
10
|
+
/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */
|
11
|
+
exports.progressFieldClassNames = /*#__PURE__*/react_field_1.getDeprecatedFieldClassNames(ProgressBar_1.progressBarClassNames.root);
|
12
|
+
/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */
|
13
|
+
exports.ProgressField = /*#__PURE__*/react_field_1.makeDeprecatedField(ProgressBar_1.ProgressBar, {
|
14
|
+
displayName: 'ProgressField',
|
15
|
+
mapProps: props => ({
|
16
|
+
...props,
|
17
|
+
control: {
|
18
|
+
...props.control,
|
19
|
+
validationState: props.validationState
|
20
|
+
}
|
21
|
+
})
|
14
22
|
});
|
15
|
-
const _reactField = require("@fluentui/react-field");
|
16
|
-
const _progressBar = require("../../ProgressBar");
|
17
|
-
const progressFieldClassNames = /*#__PURE__*/ (0, _reactField.getDeprecatedFieldClassNames)(_progressBar.progressBarClassNames.root);
|
18
|
-
const ProgressField = /*#__PURE__*/ (0, _reactField.makeDeprecatedField)(_progressBar.ProgressBar, {
|
19
|
-
displayName: 'ProgressField',
|
20
|
-
mapProps: (props)=>({
|
21
|
-
...props,
|
22
|
-
control: {
|
23
|
-
...props.control,
|
24
|
-
validationState: props.validationState
|
25
|
-
}
|
26
|
-
})
|
27
|
-
}); //# sourceMappingURL=ProgressField.js.map
|
28
|
-
|
29
23
|
//# sourceMappingURL=ProgressField.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AAEA;AAIA;AACaA,+BAAuB,gBAAGC,0CAA4B,CAACC,mCAAqB,CAACC,IAAI,CAAC;AAC/F;AACaH,qBAAa,gBAA4CC,iCAAmB,CAACC,yBAAW,EAAE;EACrGE,WAAW,EAAE,eAAe;EAC5BC,QAAQ,EAAGC,KAAyB,KAAM;IACxC,GAAGA,KAAK;IACRC,OAAO,EAAE;MAAE,GAAGD,KAAK,CAACC,OAAO;MAAEC,eAAe,EAAEF,KAAK,CAACE;IAAe;GACpE;CACF,CAAC","names":["exports","react_field_1","ProgressBar_1","root","displayName","mapProps","props","control","validationState"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/src/components/ProgressField/ProgressField.tsx"],"sourcesContent":["/* eslint-disable deprecation/deprecation */\nimport { DeprecatedFieldProps, getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { ProgressBar, progressBarClassNames, ProgressBarProps } from '../../ProgressBar';\n\n/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */\nexport type ProgressFieldProps = DeprecatedFieldProps<ProgressBarProps>;\n/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */\nexport const progressFieldClassNames = getDeprecatedFieldClassNames(progressBarClassNames.root);\n/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */\nexport const ProgressField: ForwardRefComponent<ProgressFieldProps> = makeDeprecatedField(ProgressBar, {\n displayName: 'ProgressField',\n mapProps: (props: ProgressFieldProps) => ({\n ...props,\n control: { ...props.control, validationState: props.validationState },\n }),\n});\n"]}
|
@@ -1,9 +1,8 @@
|
|
1
1
|
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
+
value: true
|
4
5
|
});
|
5
|
-
const
|
6
|
-
|
7
|
-
//# sourceMappingURL=index.js.map
|
8
|
-
|
6
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
7
|
+
tslib_1.__exportStar(require("./ProgressField"), exports);
|
9
8
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-progress/src/components/ProgressField/index.ts"],"sourcesContent":["export * from './ProgressField';\n"]}
|
package/lib-commonjs/index.js
CHANGED
@@ -1,24 +1,52 @@
|
|
1
1
|
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
3
|
-
value: true
|
4
|
-
});
|
5
|
-
function _export(target, all) {
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
7
|
-
enumerable: true,
|
8
|
-
get: all[name]
|
9
|
-
});
|
10
|
-
}
|
11
|
-
_export(exports, {
|
12
|
-
ProgressBar: ()=>_progressBar.ProgressBar,
|
13
|
-
progressBarClassNames: ()=>_progressBar.progressBarClassNames,
|
14
|
-
renderProgressBar_unstable: ()=>_progressBar.renderProgressBar_unstable,
|
15
|
-
useProgressBar_unstable: ()=>_progressBar.useProgressBar_unstable,
|
16
|
-
useProgressBarStyles_unstable: ()=>_progressBar.useProgressBarStyles_unstable,
|
17
|
-
ProgressField_unstable: ()=>_progressField.ProgressField,
|
18
|
-
progressFieldClassNames: ()=>_progressField.progressFieldClassNames
|
19
|
-
});
|
20
|
-
const _progressBar = require("./ProgressBar");
|
21
|
-
const _progressField = require("./ProgressField");
|
22
|
-
//# sourceMappingURL=index.js.map
|
23
2
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.progressFieldClassNames = exports.ProgressField_unstable = exports.useProgressBarStyles_unstable = exports.useProgressBar_unstable = exports.renderProgressBar_unstable = exports.progressBarClassNames = exports.ProgressBar = void 0;
|
7
|
+
var ProgressBar_1 = /*#__PURE__*/require("./ProgressBar");
|
8
|
+
Object.defineProperty(exports, "ProgressBar", {
|
9
|
+
enumerable: true,
|
10
|
+
get: function () {
|
11
|
+
return ProgressBar_1.ProgressBar;
|
12
|
+
}
|
13
|
+
});
|
14
|
+
Object.defineProperty(exports, "progressBarClassNames", {
|
15
|
+
enumerable: true,
|
16
|
+
get: function () {
|
17
|
+
return ProgressBar_1.progressBarClassNames;
|
18
|
+
}
|
19
|
+
});
|
20
|
+
Object.defineProperty(exports, "renderProgressBar_unstable", {
|
21
|
+
enumerable: true,
|
22
|
+
get: function () {
|
23
|
+
return ProgressBar_1.renderProgressBar_unstable;
|
24
|
+
}
|
25
|
+
});
|
26
|
+
Object.defineProperty(exports, "useProgressBar_unstable", {
|
27
|
+
enumerable: true,
|
28
|
+
get: function () {
|
29
|
+
return ProgressBar_1.useProgressBar_unstable;
|
30
|
+
}
|
31
|
+
});
|
32
|
+
Object.defineProperty(exports, "useProgressBarStyles_unstable", {
|
33
|
+
enumerable: true,
|
34
|
+
get: function () {
|
35
|
+
return ProgressBar_1.useProgressBarStyles_unstable;
|
36
|
+
}
|
37
|
+
});
|
38
|
+
// eslint-disable-next-line deprecation/deprecation
|
39
|
+
var ProgressField_1 = /*#__PURE__*/require("./ProgressField");
|
40
|
+
Object.defineProperty(exports, "ProgressField_unstable", {
|
41
|
+
enumerable: true,
|
42
|
+
get: function () {
|
43
|
+
return ProgressField_1.ProgressField;
|
44
|
+
}
|
45
|
+
});
|
46
|
+
Object.defineProperty(exports, "progressFieldClassNames", {
|
47
|
+
enumerable: true,
|
48
|
+
get: function () {
|
49
|
+
return ProgressField_1.progressFieldClassNames;
|
50
|
+
}
|
51
|
+
});
|
24
52
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACEA;EAAAC;EAAAC;IAAA,gCAAW;EAAA;AAAA;AACXF;EAAAC;EAAAC;IAAA,0CAAqB;EAAA;AAAA;AACrBF;EAAAC;EAAAC;IAAA,+CAA0B;EAAA;AAAA;AAC1BF;EAAAC;EAAAC;IAAA,4CAAuB;EAAA;AAAA;AACvBF;EAAAC;EAAAC;IAAA,kDAA6B;EAAA;AAAA;AAI/B;AACA;AAASF;EAAAC;EAAAC;IAAA,oCAAa;EAAA;AAAA;AAA4BF;EAAAC;EAAAC;IAAA,8CAAuB;EAAA;AAAA","names":["Object","enumerable","get"],"sourceRoot":"","sources":["../../../../../../../packages/react-components/react-progress/src/index.ts"],"sourcesContent":["export {\n ProgressBar,\n progressBarClassNames,\n renderProgressBar_unstable,\n useProgressBar_unstable,\n useProgressBarStyles_unstable,\n} from './ProgressBar';\nexport type { ProgressBarProps, ProgressBarSlots, ProgressBarState } from './ProgressBar';\n\n// eslint-disable-next-line deprecation/deprecation\nexport { ProgressField as ProgressField_unstable, progressFieldClassNames } from './ProgressField';\n// eslint-disable-next-line deprecation/deprecation\nexport type { ProgressFieldProps as ProgressFieldProps_unstable } from './ProgressField';\n"]}
|