@fluentui/react-progress 9.1.4 → 9.1.6
Sign up to get free protection for your applications and to get access to all the features.
- package/.swcrc +30 -0
- package/CHANGELOG.json +73 -1
- package/CHANGELOG.md +27 -2
- 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 +1 -5
- package/lib/components/ProgressBar/renderProgressBar.js.map +1 -1
- package/lib/components/ProgressBar/useProgressBar.js +3 -2
- package/lib/components/ProgressBar/useProgressBar.js.map +1 -1
- package/lib/components/ProgressBar/useProgressBarStyles.js +1 -2
- package/lib/components/ProgressBar/useProgressBarStyles.js.map +1 -1
- package/lib/components/ProgressField/ProgressField.js +1 -2
- 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/utils/clampMax.js.map +1 -1
- package/lib/utils/clampValue.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib-commonjs/ProgressBar.js +5 -4
- package/lib-commonjs/ProgressBar.js.map +1 -1
- package/lib-commonjs/ProgressField.js +5 -4
- package/lib-commonjs/ProgressField.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/ProgressBar.js +19 -20
- package/lib-commonjs/components/ProgressBar/ProgressBar.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/ProgressBar.types.js +3 -2
- package/lib-commonjs/components/ProgressBar/ProgressBar.types.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/index.js +9 -8
- package/lib-commonjs/components/ProgressBar/index.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/renderProgressBar.js +13 -20
- package/lib-commonjs/components/ProgressBar/renderProgressBar.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/useProgressBar.js +42 -51
- package/lib-commonjs/components/ProgressBar/useProgressBar.js.map +1 -1
- package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js +220 -122
- package/lib-commonjs/components/ProgressBar/useProgressBarStyles.js.map +1 -1
- package/lib-commonjs/components/ProgressField/ProgressField.js +25 -19
- package/lib-commonjs/components/ProgressField/ProgressField.js.map +1 -1
- package/lib-commonjs/components/ProgressField/index.js +5 -4
- package/lib-commonjs/components/ProgressField/index.js.map +1 -1
- package/lib-commonjs/index.js +21 -49
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/clampMax.js +15 -13
- package/lib-commonjs/utils/clampMax.js.map +1 -1
- package/lib-commonjs/utils/clampValue.js +21 -19
- package/lib-commonjs/utils/clampValue.js.map +1 -1
- package/lib-commonjs/utils/index.js +6 -5
- package/lib-commonjs/utils/index.js.map +1 -1
- package/package.json +9 -8
- package/lib-amd/ProgressBar.js +0 -6
- package/lib-amd/ProgressBar.js.map +0 -1
- package/lib-amd/ProgressField.js +0 -6
- package/lib-amd/ProgressField.js.map +0 -1
- package/lib-amd/components/ProgressBar/ProgressBar.js +0 -17
- package/lib-amd/components/ProgressBar/ProgressBar.js.map +0 -1
- package/lib-amd/components/ProgressBar/ProgressBar.types.js +0 -5
- package/lib-amd/components/ProgressBar/ProgressBar.types.js.map +0 -1
- package/lib-amd/components/ProgressBar/index.js +0 -10
- package/lib-amd/components/ProgressBar/index.js.map +0 -1
- package/lib-amd/components/ProgressBar/renderProgressBar.js +0 -14
- package/lib-amd/components/ProgressBar/renderProgressBar.js.map +0 -1
- package/lib-amd/components/ProgressBar/useProgressBar.js +0 -41
- package/lib-amd/components/ProgressBar/useProgressBar.js.map +0 -1
- package/lib-amd/components/ProgressBar/useProgressBarStyles.js +0 -96
- package/lib-amd/components/ProgressBar/useProgressBarStyles.js.map +0 -1
- package/lib-amd/components/ProgressField/ProgressField.js +0 -13
- package/lib-amd/components/ProgressField/ProgressField.js.map +0 -1
- package/lib-amd/components/ProgressField/index.js +0 -6
- package/lib-amd/components/ProgressField/index.js.map +0 -1
- package/lib-amd/index.js +0 -13
- package/lib-amd/index.js.map +0 -1
- package/lib-amd/utils/clampMax.js +0 -17
- package/lib-amd/utils/clampMax.js.map +0 -1
- package/lib-amd/utils/clampValue.js +0 -24
- package/lib-amd/utils/clampValue.js.map +0 -1
- package/lib-amd/utils/index.js +0 -7
- package/lib-amd/utils/index.js.map +0 -1
@@ -1,55 +1,46 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
Object.defineProperty(exports, "useProgressBar_unstable", {
|
6
|
+
enumerable: true,
|
7
|
+
get: ()=>useProgressBar_unstable
|
5
8
|
});
|
6
|
-
|
7
|
-
const
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
thickness,
|
44
|
-
value,
|
45
|
-
components: {
|
46
|
-
root: 'div',
|
47
|
-
bar: 'div'
|
48
|
-
},
|
49
|
-
root,
|
50
|
-
bar
|
51
|
-
};
|
52
|
-
return state;
|
53
|
-
};
|
54
|
-
exports.useProgressBar_unstable = useProgressBar_unstable;
|
9
|
+
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
10
|
+
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
11
|
+
const _reactUtilities = require("@fluentui/react-utilities");
|
12
|
+
const _index = require("../../utils/index");
|
13
|
+
const useProgressBar_unstable = (props, ref)=>{
|
14
|
+
// Props
|
15
|
+
const { color ='brand' , shape ='rounded' , thickness ='medium' } = props;
|
16
|
+
var _props_max;
|
17
|
+
const max = (0, _index.clampMax)((_props_max = props.max) !== null && _props_max !== void 0 ? _props_max : 1);
|
18
|
+
const value = (0, _index.clampValue)(props.value, max);
|
19
|
+
const root = (0, _reactUtilities.getNativeElementProps)('div', {
|
20
|
+
ref,
|
21
|
+
role: 'progressbar',
|
22
|
+
'aria-valuemin': value !== undefined ? 0 : undefined,
|
23
|
+
'aria-valuemax': value !== undefined ? max : undefined,
|
24
|
+
'aria-valuenow': value,
|
25
|
+
...props
|
26
|
+
});
|
27
|
+
const bar = (0, _reactUtilities.resolveShorthand)(props.bar, {
|
28
|
+
required: true
|
29
|
+
});
|
30
|
+
const state = {
|
31
|
+
color,
|
32
|
+
max,
|
33
|
+
shape,
|
34
|
+
thickness,
|
35
|
+
value,
|
36
|
+
components: {
|
37
|
+
root: 'div',
|
38
|
+
bar: 'div'
|
39
|
+
},
|
40
|
+
root,
|
41
|
+
bar
|
42
|
+
};
|
43
|
+
return state;
|
44
|
+
}; //# sourceMappingURL=useProgressBar.js.map
|
45
|
+
|
55
46
|
//# sourceMappingURL=useProgressBar.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../../lib/components/ProgressBar/useProgressBar.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport { clampValue, clampMax } from '../../utils/index';\n/**\n * Create the state required to render ProgressBar.\n *\n * The returned state can be modified with hooks such as useProgressBarStyles_unstable,\n * before being passed to renderProgressBar_unstable.\n *\n * @param props - props from this instance of ProgressBar\n * @param ref - reference to root HTMLElement of ProgressBar\n */\nexport const useProgressBar_unstable = (props, ref) => {\n // Props\n const {\n color = 'brand',\n shape = 'rounded',\n thickness = 'medium'\n } = props;\n var _props_max;\n const max = clampMax((_props_max = props.max) !== null && _props_max !== void 0 ? _props_max : 1);\n const value = clampValue(props.value, max);\n const root = getNativeElementProps('div', {\n ref,\n role: 'progressbar',\n 'aria-valuemin': value !== undefined ? 0 : undefined,\n 'aria-valuemax': value !== undefined ? max : undefined,\n 'aria-valuenow': value,\n ...props\n });\n const bar = resolveShorthand(props.bar, {\n required: true\n });\n const state = {\n color,\n max,\n shape,\n thickness,\n value,\n components: {\n root: 'div',\n bar: 'div'\n },\n root,\n bar\n };\n return state;\n};\n//# sourceMappingURL=useProgressBar.js.map"],"names":["useProgressBar_unstable","props","ref","color","shape","thickness","_props_max","max","clampMax","value","clampValue","root","getNativeElementProps","role","undefined","bar","resolveShorthand","required","state","components"],"mappings":";;;;+BAYaA;;aAAAA;;;6DAZU;gCACiC;uBACnB;AAU9B,MAAMA,0BAA0B,CAACC,OAAOC,MAAQ;IACrD,QAAQ;IACR,MAAM,EACJC,OAAQ,QAAO,EACfC,OAAQ,UAAS,EACjBC,WAAY,SAAQ,EACrB,GAAGJ;IACJ,IAAIK;IACJ,MAAMC,MAAMC,IAAAA,eAAQ,EAAC,AAACF,CAAAA,aAAaL,MAAMM,GAAG,AAAD,MAAO,IAAI,IAAID,eAAe,KAAK,IAAIA,aAAa,CAAC;IAChG,MAAMG,QAAQC,IAAAA,iBAAU,EAACT,MAAMQ,KAAK,EAAEF;IACtC,MAAMI,OAAOC,IAAAA,qCAAqB,EAAC,OAAO;QACxCV;QACAW,MAAM;QACN,iBAAiBJ,UAAUK,YAAY,IAAIA,SAAS;QACpD,iBAAiBL,UAAUK,YAAYP,MAAMO,SAAS;QACtD,iBAAiBL;QACjB,GAAGR,KAAK;IACV;IACA,MAAMc,MAAMC,IAAAA,gCAAgB,EAACf,MAAMc,GAAG,EAAE;QACtCE,UAAU,IAAI;IAChB;IACA,MAAMC,QAAQ;QACZf;QACAI;QACAH;QACAC;QACAI;QACAU,YAAY;YACVR,MAAM;YACNI,KAAK;QACP;QACAJ;QACAI;IACF;IACA,OAAOG;AACT,GACA,0CAA0C"}
|
@@ -1,142 +1,240 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
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
|
+
progressBarClassNames: ()=>progressBarClassNames,
|
13
|
+
useProgressBarStyles_unstable: ()=>useProgressBarStyles_unstable
|
5
14
|
});
|
6
|
-
|
7
|
-
const
|
8
|
-
|
9
|
-
|
10
|
-
root: 'fui-ProgressBar',
|
11
|
-
bar: 'fui-ProgressBar__bar'
|
15
|
+
const _react = require("@griffel/react");
|
16
|
+
const progressBarClassNames = {
|
17
|
+
root: 'fui-ProgressBar',
|
18
|
+
bar: 'fui-ProgressBar__bar'
|
12
19
|
};
|
13
20
|
// If the percentComplete is near 0, don't animate it.
|
14
21
|
// This prevents animations on reset to 0 scenarios.
|
15
22
|
const ZERO_THRESHOLD = 0.01;
|
16
23
|
const barThicknessValues = {
|
17
|
-
|
18
|
-
|
24
|
+
medium: '2px',
|
25
|
+
large: '4px'
|
19
26
|
};
|
20
27
|
const indeterminateProgressBar = {
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
}
|
28
|
+
'0%': {
|
29
|
+
left: '-33%'
|
30
|
+
},
|
31
|
+
'100%': {
|
32
|
+
left: '100%'
|
33
|
+
}
|
28
34
|
};
|
29
35
|
/**
|
30
36
|
* Styles for the root slot
|
31
|
-
*/
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
37
|
+
*/ const useRootStyles = /*#__PURE__*/ (0, _react["__styles"])({
|
38
|
+
root: {
|
39
|
+
mc9l5x: "ftgm304",
|
40
|
+
De3pzq: "f18f03hv",
|
41
|
+
a9b677: "fly5x3f",
|
42
|
+
B68tc82: "f1p9o1ba",
|
43
|
+
Bmxbyg5: "f1sil6mw",
|
44
|
+
Bpep1pd: "fu42dvn"
|
45
|
+
},
|
46
|
+
rounded: {
|
47
|
+
Bbmb7ep: [
|
48
|
+
"f1aa9q02",
|
49
|
+
"f16jpd5f"
|
50
|
+
],
|
51
|
+
Beyfa6y: [
|
52
|
+
"f16jpd5f",
|
53
|
+
"f1aa9q02"
|
54
|
+
],
|
55
|
+
B7oj6ja: [
|
56
|
+
"f1jar5jt",
|
57
|
+
"fyu767a"
|
58
|
+
],
|
59
|
+
Btl43ni: [
|
60
|
+
"fyu767a",
|
61
|
+
"f1jar5jt"
|
62
|
+
]
|
63
|
+
},
|
64
|
+
square: {
|
65
|
+
Bbmb7ep: [
|
66
|
+
"fzi6hpg",
|
67
|
+
"fyowgf4"
|
68
|
+
],
|
69
|
+
Beyfa6y: [
|
70
|
+
"fyowgf4",
|
71
|
+
"fzi6hpg"
|
72
|
+
],
|
73
|
+
B7oj6ja: [
|
74
|
+
"f3fg2lr",
|
75
|
+
"f13av6d4"
|
76
|
+
],
|
77
|
+
Btl43ni: [
|
78
|
+
"f13av6d4",
|
79
|
+
"f3fg2lr"
|
80
|
+
]
|
81
|
+
},
|
82
|
+
medium: {
|
83
|
+
Bqenvij: "f4t8t6x"
|
84
|
+
},
|
85
|
+
large: {
|
86
|
+
Bqenvij: "f6ywr7j"
|
87
|
+
}
|
59
88
|
}, {
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
89
|
+
d: [
|
90
|
+
".ftgm304{display:block;}",
|
91
|
+
".f18f03hv{background-color:var(--colorNeutralBackground6);}",
|
92
|
+
".fly5x3f{width:100%;}",
|
93
|
+
".f1p9o1ba{overflow-x:hidden;}",
|
94
|
+
".f1sil6mw{overflow-y:hidden;}",
|
95
|
+
".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}",
|
96
|
+
".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}",
|
97
|
+
".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}",
|
98
|
+
".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}",
|
99
|
+
".fzi6hpg{border-bottom-right-radius:var(--borderRadiusNone);}",
|
100
|
+
".fyowgf4{border-bottom-left-radius:var(--borderRadiusNone);}",
|
101
|
+
".f3fg2lr{border-top-right-radius:var(--borderRadiusNone);}",
|
102
|
+
".f13av6d4{border-top-left-radius:var(--borderRadiusNone);}",
|
103
|
+
".f4t8t6x{height:2px;}",
|
104
|
+
".f6ywr7j{height:4px;}"
|
105
|
+
],
|
106
|
+
m: [
|
107
|
+
[
|
108
|
+
"@media screen and (forced-colors: active){.fu42dvn{background-color:CanvasText;}}",
|
109
|
+
{
|
110
|
+
m: "screen and (forced-colors: active)"
|
111
|
+
}
|
112
|
+
]
|
113
|
+
]
|
64
114
|
});
|
65
115
|
/**
|
66
116
|
* Styles for the ProgressBar bar
|
67
|
-
*/
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
117
|
+
*/ const useBarStyles = /*#__PURE__*/ (0, _react["__styles"])({
|
118
|
+
base: {
|
119
|
+
Bpep1pd: "f1neahkh",
|
120
|
+
Bbmb7ep: [
|
121
|
+
"f1d9uwra",
|
122
|
+
"fzibvwi"
|
123
|
+
],
|
124
|
+
Beyfa6y: [
|
125
|
+
"fzibvwi",
|
126
|
+
"f1d9uwra"
|
127
|
+
],
|
128
|
+
B7oj6ja: [
|
129
|
+
"fuoumxm",
|
130
|
+
"f1vtqnvc"
|
131
|
+
],
|
132
|
+
Btl43ni: [
|
133
|
+
"f1vtqnvc",
|
134
|
+
"fuoumxm"
|
135
|
+
],
|
136
|
+
Bqenvij: "f1l02sjl"
|
137
|
+
},
|
138
|
+
nonZeroDeterminate: {
|
139
|
+
Bmy1vo4: "fjt6zfz",
|
140
|
+
B3o57yi: "f1wofebd",
|
141
|
+
Bkqvd7p: "fv71qf3"
|
142
|
+
},
|
143
|
+
indeterminate: {
|
144
|
+
B2u0y6b: "fa0wk36",
|
145
|
+
qhf8xq: "f10pi13n",
|
146
|
+
Bcmaq0h: [
|
147
|
+
"fpo0yib",
|
148
|
+
"f1u5hf6c"
|
149
|
+
],
|
150
|
+
Bv12yb3: [
|
151
|
+
"fwd2bol",
|
152
|
+
"f14gig94"
|
153
|
+
],
|
154
|
+
vin17d: "f1a27w2r",
|
155
|
+
Ezkn3b: "f452v7t",
|
156
|
+
w3vfg9: "f1cpbl36",
|
157
|
+
Gqtpxc: "f4akx1t",
|
158
|
+
B3vm3ge: "f18p5put"
|
159
|
+
},
|
160
|
+
brand: {
|
161
|
+
De3pzq: "ftywsgz"
|
162
|
+
},
|
163
|
+
error: {
|
164
|
+
De3pzq: "fdl5y0r"
|
165
|
+
},
|
166
|
+
warning: {
|
167
|
+
De3pzq: "f1s438gw"
|
168
|
+
},
|
169
|
+
success: {
|
170
|
+
De3pzq: "flxk52p"
|
171
|
+
}
|
105
172
|
}, {
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
173
|
+
m: [
|
174
|
+
[
|
175
|
+
"@media screen and (forced-colors: active){.f1neahkh{background-color:Highlight;}}",
|
176
|
+
{
|
177
|
+
m: "screen and (forced-colors: active)"
|
178
|
+
}
|
179
|
+
],
|
180
|
+
[
|
181
|
+
"@media screen and (prefers-reduced-motion: reduce){.f4akx1t{-webkit-animation-duration:0.01ms;animation-duration:0.01ms;}}",
|
182
|
+
{
|
183
|
+
m: "screen and (prefers-reduced-motion: reduce)"
|
184
|
+
}
|
185
|
+
],
|
186
|
+
[
|
187
|
+
"@media screen and (prefers-reduced-motion: reduce){.f18p5put{-webkit-animation-iteration-count:1;animation-iteration-count:1;}}",
|
188
|
+
{
|
189
|
+
m: "screen and (prefers-reduced-motion: reduce)"
|
190
|
+
}
|
191
|
+
]
|
192
|
+
],
|
193
|
+
d: [
|
194
|
+
".f1d9uwra{border-bottom-right-radius:inherit;}",
|
195
|
+
".fzibvwi{border-bottom-left-radius:inherit;}",
|
196
|
+
".fuoumxm{border-top-right-radius:inherit;}",
|
197
|
+
".f1vtqnvc{border-top-left-radius:inherit;}",
|
198
|
+
".f1l02sjl{height:100%;}",
|
199
|
+
".fjt6zfz{transition-property:width;}",
|
200
|
+
".f1wofebd{transition-duration:0.3s;}",
|
201
|
+
".fv71qf3{transition-timing-function:ease;}",
|
202
|
+
".fa0wk36{max-width:33%;}",
|
203
|
+
".f10pi13n{position:relative;}",
|
204
|
+
".fpo0yib{background-image:linear-gradient(\n to right,\n var(--colorNeutralBackground6) 0%,\n var(--colorTransparentBackground) 50%,\n var(--colorNeutralBackground6) 100%\n );}",
|
205
|
+
".f1u5hf6c{background-image:linear-gradient(\n to left,\n var(--colorNeutralBackground6) 0%,\n var(--colorTransparentBackground) 50%,\n var(--colorNeutralBackground6) 100%\n );}",
|
206
|
+
".fwd2bol{-webkit-animation-name:f1keuaan;animation-name:f1keuaan;}",
|
207
|
+
".f14gig94{-webkit-animation-name:f10x8f8u;animation-name:f10x8f8u;}",
|
208
|
+
".f1a27w2r{-webkit-animation-duration:3s;animation-duration:3s;}",
|
209
|
+
".f452v7t{-webkit-animation-timing-function:linear;animation-timing-function:linear;}",
|
210
|
+
".f1cpbl36{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;}",
|
211
|
+
".ftywsgz{background-color:var(--colorCompoundBrandBackground);}",
|
212
|
+
".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}",
|
213
|
+
".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}",
|
214
|
+
".flxk52p{background-color:var(--colorPaletteGreenBackground3);}"
|
215
|
+
],
|
216
|
+
k: [
|
217
|
+
"@-webkit-keyframes f1keuaan{0%{left:-33%;}100%{left:100%;}}",
|
218
|
+
"@-webkit-keyframes f10x8f8u{0%{right:-33%;}100%{right:100%;}}",
|
219
|
+
"@keyframes f1keuaan{0%{left:-33%;}100%{left:100%;}}",
|
220
|
+
"@keyframes f10x8f8u{0%{right:-33%;}100%{right:100%;}}"
|
221
|
+
]
|
115
222
|
});
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
const
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
if (state.bar && value !== undefined) {
|
134
|
-
state.bar.style = {
|
135
|
-
width: Math.min(100, Math.max(0, value / max * 100)) + '%',
|
136
|
-
...state.bar.style
|
137
|
-
};
|
138
|
-
}
|
139
|
-
return state;
|
140
|
-
};
|
141
|
-
exports.useProgressBarStyles_unstable = useProgressBarStyles_unstable;
|
223
|
+
const useProgressBarStyles_unstable = (state)=>{
|
224
|
+
const { color , max , shape , thickness , value } = state;
|
225
|
+
const rootStyles = useRootStyles();
|
226
|
+
const barStyles = useBarStyles();
|
227
|
+
state.root.className = (0, _react.mergeClasses)(progressBarClassNames.root, rootStyles.root, rootStyles[shape], rootStyles[thickness], state.root.className);
|
228
|
+
if (state.bar) {
|
229
|
+
state.bar.className = (0, _react.mergeClasses)(progressBarClassNames.bar, barStyles.base, barStyles.brand, value === undefined && barStyles.indeterminate, value !== undefined && value > ZERO_THRESHOLD && barStyles.nonZeroDeterminate, color && value !== undefined && barStyles[color], state.bar.className);
|
230
|
+
}
|
231
|
+
if (state.bar && value !== undefined) {
|
232
|
+
state.bar.style = {
|
233
|
+
width: Math.min(100, Math.max(0, value / max * 100)) + '%',
|
234
|
+
...state.bar.style
|
235
|
+
};
|
236
|
+
}
|
237
|
+
return state;
|
238
|
+
}; //# sourceMappingURL=useProgressBarStyles.js.map
|
239
|
+
|
142
240
|
//# sourceMappingURL=useProgressBarStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../../lib/components/ProgressBar/useProgressBarStyles.js"],"sourcesContent":["import { __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\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: '-33%'\n },\n '100%': {\n left: '100%'\n }\n};\n/**\n * Styles for the root slot\n */\nconst useRootStyles = /*#__PURE__*/__styles({\n root: {\n mc9l5x: \"ftgm304\",\n De3pzq: \"f18f03hv\",\n a9b677: \"fly5x3f\",\n B68tc82: \"f1p9o1ba\",\n Bmxbyg5: \"f1sil6mw\",\n Bpep1pd: \"fu42dvn\"\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);}\", \".fly5x3f{width:100%;}\", \".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){.fu42dvn{background-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 Bpep1pd: \"f1neahkh\",\n Bbmb7ep: [\"f1d9uwra\", \"fzibvwi\"],\n Beyfa6y: [\"fzibvwi\", \"f1d9uwra\"],\n B7oj6ja: [\"fuoumxm\", \"f1vtqnvc\"],\n Btl43ni: [\"f1vtqnvc\", \"fuoumxm\"],\n Bqenvij: \"f1l02sjl\"\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: [\"fwd2bol\", \"f14gig94\"],\n vin17d: \"f1a27w2r\",\n Ezkn3b: \"f452v7t\",\n w3vfg9: \"f1cpbl36\",\n Gqtpxc: \"f4akx1t\",\n B3vm3ge: \"f18p5put\"\n },\n brand: {\n De3pzq: \"ftywsgz\"\n },\n error: {\n De3pzq: \"fdl5y0r\"\n },\n warning: {\n De3pzq: \"f1s438gw\"\n },\n success: {\n De3pzq: \"flxk52p\"\n }\n}, {\n m: [[\"@media screen and (forced-colors: active){.f1neahkh{background-color:Highlight;}}\", {\n m: \"screen and (forced-colors: active)\"\n }], [\"@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 }]],\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;}\", \".f1l02sjl{height:100%;}\", \".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 );}\", \".fwd2bol{-webkit-animation-name:f1keuaan;animation-name:f1keuaan;}\", \".f14gig94{-webkit-animation-name:f10x8f8u;animation-name:f10x8f8u;}\", \".f1a27w2r{-webkit-animation-duration:3s;animation-duration:3s;}\", \".f452v7t{-webkit-animation-timing-function:linear;animation-timing-function:linear;}\", \".f1cpbl36{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;}\", \".ftywsgz{background-color:var(--colorCompoundBrandBackground);}\", \".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}\", \".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}\", \".flxk52p{background-color:var(--colorPaletteGreenBackground3);}\"],\n k: [\"@-webkit-keyframes f1keuaan{0%{left:-33%;}100%{left:100%;}}\", \"@-webkit-keyframes f10x8f8u{0%{right:-33%;}100%{right:100%;}}\", \"@keyframes f1keuaan{0%{left:-33%;}100%{left:100%;}}\", \"@keyframes f10x8f8u{0%{right:-33%;}100%{right:100%;}}\"]\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 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 && 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","useRootStyles","__styles","mc9l5x","De3pzq","a9b677","B68tc82","Bmxbyg5","Bpep1pd","rounded","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","square","Bqenvij","d","m","useBarStyles","base","nonZeroDeterminate","Bmy1vo4","B3o57yi","Bkqvd7p","indeterminate","B2u0y6b","qhf8xq","Bcmaq0h","Bv12yb3","vin17d","Ezkn3b","w3vfg9","Gqtpxc","B3vm3ge","brand","error","warning","success","k","state","color","max","shape","thickness","value","rootStyles","barStyles","className","mergeClasses","undefined","style","width","Math","min"],"mappings":"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"}
|
@@ -1,23 +1,29 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
1
|
+
/* eslint-disable deprecation/deprecation */ "use strict";
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
3
|
+
value: true
|
5
4
|
});
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
mapProps: props => ({
|
16
|
-
...props,
|
17
|
-
control: {
|
18
|
-
...props.control,
|
19
|
-
validationState: props.validationState
|
20
|
-
}
|
21
|
-
})
|
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
|
+
progressFieldClassNames: ()=>progressFieldClassNames,
|
13
|
+
ProgressField: ()=>ProgressField
|
22
14
|
});
|
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
|
+
|
23
29
|
//# sourceMappingURL=ProgressField.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../../lib/components/ProgressField/ProgressField.js"],"sourcesContent":["/* eslint-disable deprecation/deprecation */import { getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';\nimport { ProgressBar, progressBarClassNames } from '../../ProgressBar';\n/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */\nexport const progressFieldClassNames = /*#__PURE__*/getDeprecatedFieldClassNames(progressBarClassNames.root);\n/** @deprecated Use Field with ProgressBar: `<Field><ProgressBar /></Field>` */\nexport const ProgressField = /*#__PURE__*/makeDeprecatedField(ProgressBar, {\n displayName: 'ProgressField',\n mapProps: props => ({\n ...props,\n control: {\n ...props.control,\n validationState: props.validationState\n }\n })\n});\n//# sourceMappingURL=ProgressField.js.map"],"names":["progressFieldClassNames","ProgressField","getDeprecatedFieldClassNames","progressBarClassNames","root","makeDeprecatedField","ProgressBar","displayName","mapProps","props","control","validationState"],"mappings":"AAAA,0CAA0C;;;;;;;;;;;IAG7BA,uBAAuB,MAAvBA;IAEAC,aAAa,MAAbA;;4BALiG;6BAC3D;AAE5C,MAAMD,0BAA0B,WAAW,GAAEE,IAAAA,wCAA4B,EAACC,kCAAqB,CAACC,IAAI;AAEpG,MAAMH,gBAAgB,WAAW,GAAEI,IAAAA,+BAAmB,EAACC,wBAAW,EAAE;IACzEC,aAAa;IACbC,UAAUC,CAAAA,QAAU,CAAA;YAClB,GAAGA,KAAK;YACRC,SAAS;gBACP,GAAGD,MAAMC,OAAO;gBAChBC,iBAAiBF,MAAME,eAAe;YACxC;QACF,CAAA;AACF,IACA,yCAAyC"}
|