@fluentui/web-components 3.0.0-beta.27 → 3.0.0-beta.28
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/CHANGELOG.md +12 -2
- package/dist/dts/anchor-button/anchor-button.d.ts +82 -78
- package/dist/dts/anchor-button/anchor-button.options.d.ts +21 -0
- package/dist/dts/button/button.styles.d.ts +4 -0
- package/dist/dts/index.d.ts +0 -1
- package/dist/dts/progress-bar/index.d.ts +0 -1
- package/dist/dts/progress-bar/progress-bar.d.ts +56 -13
- package/dist/dts/progress-bar/progress-bar.options.d.ts +1 -10
- package/dist/dts/progress-bar/progress-bar.template.d.ts +1 -2
- package/dist/esm/anchor-button/anchor-button.definition.js +0 -3
- package/dist/esm/anchor-button/anchor-button.definition.js.map +1 -1
- package/dist/esm/anchor-button/anchor-button.js +78 -67
- package/dist/esm/anchor-button/anchor-button.js.map +1 -1
- package/dist/esm/anchor-button/anchor-button.options.js +15 -0
- package/dist/esm/anchor-button/anchor-button.options.js.map +1 -1
- package/dist/esm/anchor-button/anchor-button.styles.js +6 -258
- package/dist/esm/anchor-button/anchor-button.styles.js.map +1 -1
- package/dist/esm/anchor-button/anchor-button.template.js +7 -35
- package/dist/esm/anchor-button/anchor-button.template.js.map +1 -1
- package/dist/esm/button/button.styles.js +16 -5
- package/dist/esm/button/button.styles.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/progress-bar/index.js.map +1 -1
- package/dist/esm/progress-bar/progress-bar.js +62 -11
- package/dist/esm/progress-bar/progress-bar.js.map +1 -1
- package/dist/esm/progress-bar/progress-bar.styles.js +48 -127
- package/dist/esm/progress-bar/progress-bar.styles.js.map +1 -1
- package/dist/esm/progress-bar/progress-bar.template.js +8 -26
- package/dist/esm/progress-bar/progress-bar.template.js.map +1 -1
- package/dist/web-components.d.ts +135 -330
- package/dist/web-components.js +404 -367
- package/dist/web-components.min.js +214 -224
- package/package.json +1 -1
- package/dist/dts/progress-bar/base-progress.d.ts +0 -41
- package/dist/esm/progress-bar/base-progress.js +0 -56
- package/dist/esm/progress-bar/base-progress.js.map +0 -1
|
@@ -1,172 +1,93 @@
|
|
|
1
1
|
import { css } from '@microsoft/fast-element';
|
|
2
2
|
import { display, forcedColorsStylesheetBehavior } from '../utils/index.js';
|
|
3
|
-
import { borderRadiusMedium,
|
|
3
|
+
import { borderRadiusMedium, borderRadiusNone, colorCompoundBrandBackground, colorNeutralBackground6, colorPaletteDarkOrangeBackground3, colorPaletteGreenBackground3, colorPaletteRedBackground3, colorTransparentBackground, } from '../theme/design-tokens.js';
|
|
4
4
|
/** ProgressBar styles
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
|
7
7
|
export const styles = css `
|
|
8
|
-
${display('
|
|
8
|
+
${display('block')}
|
|
9
9
|
|
|
10
10
|
:host {
|
|
11
|
-
|
|
11
|
+
width: 100%;
|
|
12
12
|
height: 2px;
|
|
13
13
|
overflow-x: hidden;
|
|
14
|
+
background-color: ${colorNeutralBackground6};
|
|
14
15
|
border-radius: ${borderRadiusMedium};
|
|
15
16
|
contain: content;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
:host([thickness='large'])
|
|
19
|
-
:host([thickness='large']) .progress,
|
|
20
|
-
:host([thickness='large']) .determinate {
|
|
19
|
+
:host([thickness='large']) {
|
|
21
20
|
height: 4px;
|
|
22
21
|
}
|
|
23
22
|
|
|
24
|
-
:host([shape='square'])
|
|
25
|
-
|
|
26
|
-
:host([shape='square']) .determinate {
|
|
27
|
-
border-radius: 0;
|
|
23
|
+
:host([shape='square']) {
|
|
24
|
+
border-radius: ${borderRadiusNone};
|
|
28
25
|
}
|
|
29
26
|
|
|
30
|
-
|
|
31
|
-
background-color: ${
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
:host([validation-state='error']) .indeterminate-indicator-1,
|
|
35
|
-
:host([validation-state='error']) .indeterminate-indicator-2 {
|
|
36
|
-
background: linear-gradient(
|
|
37
|
-
to right,
|
|
38
|
-
${colorPaletteRedBackground2} 0%,
|
|
39
|
-
${colorPaletteRedBackground3} 50%,
|
|
40
|
-
${colorPaletteRedBackground2}
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
:host([validation-state='warning']) .determinate {
|
|
45
|
-
background-color: ${colorPaletteDarkOrangeBackground3};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
:host([validation-state='warning']) .indeterminate-indicator-1,
|
|
49
|
-
:host([validation-state='warning']) .indeterminate-indicator-2 {
|
|
50
|
-
background: linear-gradient(
|
|
51
|
-
to right,
|
|
52
|
-
${colorPaletteDarkOrangeBackground2} 0%,
|
|
53
|
-
${colorPaletteDarkOrangeBackground3} 50%,
|
|
54
|
-
${colorPaletteDarkOrangeBackground2}
|
|
55
|
-
);
|
|
27
|
+
.indicator {
|
|
28
|
+
background-color: ${colorCompoundBrandBackground};
|
|
29
|
+
border-radius: inherit;
|
|
30
|
+
height: 100%;
|
|
56
31
|
}
|
|
57
32
|
|
|
58
|
-
:host([
|
|
59
|
-
|
|
33
|
+
:host([value]) .indicator {
|
|
34
|
+
transition: all 0.2s ease-in-out;
|
|
60
35
|
}
|
|
61
36
|
|
|
62
|
-
:host([
|
|
63
|
-
|
|
64
|
-
|
|
37
|
+
:host(:not([value])) .indicator {
|
|
38
|
+
position: relative;
|
|
39
|
+
width: 33%;
|
|
40
|
+
background-image: linear-gradient(
|
|
65
41
|
to right,
|
|
66
|
-
${
|
|
67
|
-
${
|
|
68
|
-
${
|
|
42
|
+
${colorNeutralBackground6} 0%,
|
|
43
|
+
${colorTransparentBackground} 50%,
|
|
44
|
+
${colorNeutralBackground6} 100%
|
|
69
45
|
);
|
|
46
|
+
animation-name: indeterminate;
|
|
47
|
+
animation-duration: 3s;
|
|
48
|
+
animation-timing-function: linear;
|
|
49
|
+
animation-iteration-count: infinite;
|
|
70
50
|
}
|
|
71
51
|
|
|
72
|
-
.
|
|
73
|
-
background-color: ${
|
|
74
|
-
border-radius: ${borderRadiusMedium};
|
|
75
|
-
width: 100%;
|
|
76
|
-
height: 2px;
|
|
77
|
-
display: flex;
|
|
78
|
-
align-items: center;
|
|
79
|
-
position: relative;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.determinate {
|
|
83
|
-
background-color: ${colorCompoundBrandBackground};
|
|
84
|
-
border-radius: ${borderRadiusMedium};
|
|
85
|
-
height: 2px;
|
|
86
|
-
transition: all 0.2s ease-in-out;
|
|
87
|
-
display: flex;
|
|
52
|
+
:host([validation-state='error']) .indicator {
|
|
53
|
+
background-color: ${colorPaletteRedBackground3};
|
|
88
54
|
}
|
|
89
55
|
|
|
90
|
-
.
|
|
91
|
-
|
|
92
|
-
opacity: 0;
|
|
93
|
-
height: 100%;
|
|
94
|
-
background: linear-gradient(
|
|
95
|
-
to right,
|
|
96
|
-
${colorBrandBackground2} 0%,
|
|
97
|
-
${colorCompoundBrandBackground} 50%,
|
|
98
|
-
${colorBrandBackground2}
|
|
99
|
-
);
|
|
100
|
-
border-radius: ${borderRadiusMedium};
|
|
101
|
-
animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
|
|
102
|
-
width: 40%;
|
|
103
|
-
animation: indeterminate-1 3s infinite;
|
|
56
|
+
:host([validation-state='warning']) .indicator {
|
|
57
|
+
background-color: ${colorPaletteDarkOrangeBackground3};
|
|
104
58
|
}
|
|
105
59
|
|
|
106
|
-
.
|
|
107
|
-
|
|
108
|
-
opacity: 0;
|
|
109
|
-
height: 100%;
|
|
110
|
-
background: linear-gradient(
|
|
111
|
-
to right,
|
|
112
|
-
${colorBrandBackground2} 0%,
|
|
113
|
-
${colorCompoundBrandBackground} 50%,
|
|
114
|
-
${colorBrandBackground2}
|
|
115
|
-
);
|
|
116
|
-
border-radius: ${borderRadiusMedium};
|
|
117
|
-
animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
|
|
118
|
-
width: 60%;
|
|
119
|
-
animation: indeterminate-2 3s infinite;
|
|
60
|
+
:host([validation-state='success']) .indicator {
|
|
61
|
+
background-color: ${colorPaletteGreenBackground3};
|
|
120
62
|
}
|
|
121
63
|
|
|
122
|
-
@
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
opacity: 0;
|
|
133
|
-
}
|
|
134
|
-
100% {
|
|
135
|
-
opacity: 0;
|
|
136
|
-
transform: translateX(300%);
|
|
64
|
+
@layer animations {
|
|
65
|
+
/* Disable animations for reduced motion */
|
|
66
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
67
|
+
:host([value]) {
|
|
68
|
+
transition: none;
|
|
69
|
+
}
|
|
70
|
+
:host(:not([value])) .indicator {
|
|
71
|
+
animation-duration: 0.01ms;
|
|
72
|
+
animation-iteration-count: 1;
|
|
73
|
+
}
|
|
137
74
|
}
|
|
138
75
|
}
|
|
139
|
-
|
|
76
|
+
|
|
77
|
+
@keyframes indeterminate {
|
|
140
78
|
0% {
|
|
141
|
-
|
|
142
|
-
transform: translateX(-150%);
|
|
143
|
-
}
|
|
144
|
-
29.99% {
|
|
145
|
-
opacity: 0;
|
|
146
|
-
}
|
|
147
|
-
30% {
|
|
148
|
-
opacity: 1;
|
|
149
|
-
transform: translateX(-150%);
|
|
79
|
+
inset-inline-start: -33%;
|
|
150
80
|
}
|
|
151
81
|
100% {
|
|
152
|
-
|
|
153
|
-
opacity: 1;
|
|
82
|
+
inset-inline-start: 100%;
|
|
154
83
|
}
|
|
155
84
|
}
|
|
156
85
|
`.withBehaviors(forcedColorsStylesheetBehavior(css `
|
|
157
|
-
|
|
158
|
-
background-color:
|
|
86
|
+
:host {
|
|
87
|
+
background-color: CanvasText;
|
|
159
88
|
}
|
|
160
|
-
.
|
|
161
|
-
:host([validation-state='success']) .
|
|
162
|
-
:host([validation-state='warning']) .determinate,
|
|
163
|
-
:host([validation-state='error']) .determinate,
|
|
164
|
-
:host([validation-state='success']) ..indeterminate-indicator-1,
|
|
165
|
-
:host([validation-state='success']) ..indeterminate-indicator-2,
|
|
166
|
-
:host([validation-state='warning']) .indeterminate-indicator-1,
|
|
167
|
-
:host([validation-state='warning']) .indeterminate-indicator-2,
|
|
168
|
-
:host([validation-state='error']) .indeterminate-indicator-1,
|
|
169
|
-
:host([validation-state='error']) .indeterminate-indicator-2 {
|
|
89
|
+
.indicator,
|
|
90
|
+
:host(:is([validation-state='success'], [validation-state='warning'], [validation-state='error'])) .indicator {
|
|
170
91
|
background-color: Highlight;
|
|
171
92
|
}
|
|
172
93
|
`));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-bar.styles.js","sourceRoot":"","sources":["../../../src/progress-bar/progress-bar.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EACL,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"progress-bar.styles.js","sourceRoot":"","sources":["../../../src/progress-bar/progress-bar.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,4BAA4B,EAC5B,uBAAuB,EACvB,iCAAiC,EACjC,4BAA4B,EAC5B,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;IACrB,OAAO,CAAC,OAAO,CAAC;;;;;;wBAMI,uBAAuB;qBAC1B,kBAAkB;;;;;;;;;qBASlB,gBAAgB;;;;wBAIb,4BAA4B;;;;;;;;;;;;;;QAc5C,uBAAuB;QACvB,0BAA0B;QAC1B,uBAAuB;;;;;;;;;wBASP,0BAA0B;;;;wBAI1B,iCAAiC;;;;wBAIjC,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;CAwBnD,CAAC,aAAa,CACb,8BAA8B,CAAC,GAAG,CAAA;;;;;;;;GAQjC,CAAC,CACH,CAAC"}
|
|
@@ -1,30 +1,12 @@
|
|
|
1
|
-
import { html
|
|
2
|
-
|
|
3
|
-
export function progressTemplate(options = {}) {
|
|
1
|
+
import { html } from '@microsoft/fast-element';
|
|
2
|
+
export function progressTemplate() {
|
|
4
3
|
return html `
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
>
|
|
11
|
-
${when(x => typeof x.value === 'number', html `
|
|
12
|
-
<div class="progress" part="progress" slot="determinate">
|
|
13
|
-
<div class="determinate" part="determinate" style="width: ${x => x.percentComplete}%"></div>
|
|
14
|
-
</div>
|
|
15
|
-
`, html `
|
|
16
|
-
<div class="progress" part="progress" slot="indeterminate">
|
|
17
|
-
<slot name="indeterminate">
|
|
18
|
-
${staticallyCompose(options.indeterminateIndicator1)}
|
|
19
|
-
${staticallyCompose(options.indeterminateIndicator2)}
|
|
20
|
-
</slot>
|
|
21
|
-
</div>
|
|
22
|
-
`)}
|
|
23
|
-
</template>
|
|
4
|
+
<div
|
|
5
|
+
class="indicator"
|
|
6
|
+
part="indicator"
|
|
7
|
+
style="${x => (typeof x.value === 'number' ? `width: ${x.percentComplete}%` : void 0)}"
|
|
8
|
+
></div>
|
|
24
9
|
`;
|
|
25
10
|
}
|
|
26
|
-
export const template = progressTemplate(
|
|
27
|
-
indeterminateIndicator1: `<span class="indeterminate-indicator-1" part="indeterminate-indicator-1></span>`,
|
|
28
|
-
indeterminateIndicator2: `<span class="indeterminate-indicator-2" part="indeterminate-indicator-2"></span>`,
|
|
29
|
-
});
|
|
11
|
+
export const template = progressTemplate();
|
|
30
12
|
//# sourceMappingURL=progress-bar.template.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-bar.template.js","sourceRoot":"","sources":["../../../src/progress-bar/progress-bar.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"progress-bar.template.js","sourceRoot":"","sources":["../../../src/progress-bar/progress-bar.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAI/C,MAAM,UAAU,gBAAgB;IAC9B,OAAO,IAAI,CAAA;;;;eAIE,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,eAAe,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;;GAExF,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAqC,gBAAgB,EAAE,CAAC"}
|