@fluentui/web-components 2.5.6 → 2.5.8
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.json +46 -1
- package/CHANGELOG.md +20 -2
- package/dist/dts/combobox/combobox.stories.d.ts +5 -0
- package/dist/dts/custom-elements.d.ts +3 -35
- package/dist/dts/number-field/index.d.ts +1 -1
- package/dist/dts/number-field/number-field.styles.d.ts +1 -2
- package/dist/dts/search/index.d.ts +1 -1
- package/dist/dts/search/search.styles.d.ts +2 -3
- package/dist/dts/select/index.d.ts +1 -1
- package/dist/dts/select/select.styles.d.ts +11 -3
- package/dist/dts/styles/patterns/button.styles.d.ts +12 -6
- package/dist/dts/styles/patterns/input.styles.d.ts +13 -5
- package/dist/dts/text-area/index.d.ts +2 -18
- package/dist/dts/text-area/text-area.stories.d.ts +1 -17
- package/dist/dts/text-area/text-area.styles.d.ts +1 -2
- package/dist/dts/text-field/index.d.ts +2 -18
- package/dist/dts/text-field/text-field.stories.d.ts +1 -17
- package/dist/dts/text-field/text-field.styles.d.ts +1 -2
- package/dist/esm/anchor/anchor.styles.js +3 -10
- package/dist/esm/button/button.styles.js +14 -39
- package/dist/esm/combobox/combobox.stories.js +7 -2
- package/dist/esm/combobox/combobox.styles.js +22 -32
- package/dist/esm/number-field/number-field.styles.js +5 -16
- package/dist/esm/search/search.styles.js +8 -11
- package/dist/esm/select/select.stories.js +2 -2
- package/dist/esm/select/select.styles.js +35 -100
- package/dist/esm/styles/patterns/button.styles.js +190 -149
- package/dist/esm/styles/patterns/input.styles.js +112 -93
- package/dist/esm/text-area/text-area.styles.js +5 -11
- package/dist/esm/text-field/text-field.styles.js +5 -11
- package/dist/fluent-web-components.api.json +127 -397
- package/dist/web-components.d.ts +39 -90
- package/dist/web-components.js +148 -135
- package/dist/web-components.min.js +203 -233
- package/docs/api-report.md +38 -99
- package/karma.conf.js +3 -8
- package/package.json +29 -42
|
@@ -6,10 +6,14 @@ import { accentFillActive, accentFillHover, accentFillRest, accentForegroundActi
|
|
|
6
6
|
import { typeRampBase } from '../../styles/patterns/type-ramp';
|
|
7
7
|
import { focusTreatmentBase, focusTreatmentTight } from '../focus';
|
|
8
8
|
/**
|
|
9
|
+
* The base styles for button controls, without `appearance` visual differences.
|
|
10
|
+
*
|
|
9
11
|
* @internal
|
|
10
12
|
*/
|
|
11
|
-
export const baseButtonStyles = (context, definition, interactivitySelector
|
|
12
|
-
${display('inline-flex')}
|
|
13
|
+
export const baseButtonStyles = (context, definition, interactivitySelector, nonInteractivitySelector = '[disabled]') => css `
|
|
14
|
+
${display('inline-flex')}
|
|
15
|
+
|
|
16
|
+
:host {
|
|
13
17
|
position: relative;
|
|
14
18
|
box-sizing: border-box;
|
|
15
19
|
${typeRampBase}
|
|
@@ -18,12 +22,9 @@ export const baseButtonStyles = (context, definition, interactivitySelector = ''
|
|
|
18
22
|
color: ${neutralForegroundRest};
|
|
19
23
|
border-radius: calc(${controlCornerRadius} * 1px);
|
|
20
24
|
fill: currentcolor;
|
|
21
|
-
cursor: pointer;
|
|
22
25
|
}
|
|
23
26
|
|
|
24
|
-
|
|
25
|
-
background: padding-box linear-gradient(${neutralFillRest}, ${neutralFillRest}),
|
|
26
|
-
border-box ${neutralStrokeControlRest};
|
|
27
|
+
.control {
|
|
27
28
|
border: calc(${strokeWidth} * 1px) solid transparent;
|
|
28
29
|
flex-grow: 1;
|
|
29
30
|
box-sizing: border-box;
|
|
@@ -37,7 +38,6 @@ export const baseButtonStyles = (context, definition, interactivitySelector = ''
|
|
|
37
38
|
color: inherit;
|
|
38
39
|
border-radius: inherit;
|
|
39
40
|
fill: inherit;
|
|
40
|
-
cursor: inherit;
|
|
41
41
|
font-family: inherit;
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -52,24 +52,10 @@ export const baseButtonStyles = (context, definition, interactivitySelector = ''
|
|
|
52
52
|
line-height: 0;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
background: padding-box linear-gradient(${neutralFillHover}, ${neutralFillHover}),
|
|
57
|
-
border-box ${neutralStrokeControlHover};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
:host .control${interactivitySelector}:active {
|
|
61
|
-
background: padding-box linear-gradient(${neutralFillActive}, ${neutralFillActive}),
|
|
62
|
-
border-box ${neutralStrokeControlActive};
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
:host .control:${focusVisible} {
|
|
55
|
+
.control:${focusVisible} {
|
|
66
56
|
${focusTreatmentBase}
|
|
67
57
|
}
|
|
68
58
|
|
|
69
|
-
:host .control${nonInteractivitySelector} {
|
|
70
|
-
background: padding-box linear-gradient(${neutralFillRest}, ${neutralFillRest}), border-box ${neutralStrokeRest};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
59
|
.control::-moz-focus-inner {
|
|
74
60
|
border: 0;
|
|
75
61
|
}
|
|
@@ -91,114 +77,138 @@ export const baseButtonStyles = (context, definition, interactivitySelector = ''
|
|
|
91
77
|
.end {
|
|
92
78
|
margin-inline-start: 11px;
|
|
93
79
|
}
|
|
80
|
+
`;
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
export const NeutralButtonStyles = (context, definition, interactivitySelector, nonInteractivitySelector = '[disabled]') => css `
|
|
85
|
+
.control {
|
|
86
|
+
background: padding-box linear-gradient(${neutralFillRest}, ${neutralFillRest}),
|
|
87
|
+
border-box ${neutralStrokeControlRest};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:host(${interactivitySelector}:hover) .control {
|
|
91
|
+
background: padding-box linear-gradient(${neutralFillHover}, ${neutralFillHover}),
|
|
92
|
+
border-box ${neutralStrokeControlHover};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
:host(${interactivitySelector}:active) .control {
|
|
96
|
+
background: padding-box linear-gradient(${neutralFillActive}, ${neutralFillActive}),
|
|
97
|
+
border-box ${neutralStrokeControlActive};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:host(${nonInteractivitySelector}) .control {
|
|
101
|
+
background: padding-box linear-gradient(${neutralFillRest}, ${neutralFillRest}),
|
|
102
|
+
border-box ${neutralStrokeRest};
|
|
103
|
+
}
|
|
94
104
|
`.withBehaviors(forcedColorsStylesheetBehavior(css `
|
|
95
|
-
|
|
105
|
+
.control {
|
|
96
106
|
background: ${SystemColors.ButtonFace};
|
|
97
107
|
border-color: ${SystemColors.ButtonText};
|
|
98
108
|
color: ${SystemColors.ButtonText};
|
|
99
|
-
fill: currentcolor;
|
|
100
109
|
}
|
|
101
|
-
|
|
102
|
-
:host
|
|
103
|
-
|
|
110
|
+
|
|
111
|
+
:host(${interactivitySelector}:hover) .control,
|
|
112
|
+
:host(${interactivitySelector}:active) .control {
|
|
104
113
|
forced-color-adjust: none;
|
|
105
|
-
background: ${SystemColors.
|
|
106
|
-
color: ${SystemColors.
|
|
114
|
+
background: ${SystemColors.HighlightText};
|
|
115
|
+
border-color: ${SystemColors.Highlight};
|
|
116
|
+
color: ${SystemColors.Highlight};
|
|
107
117
|
}
|
|
108
|
-
|
|
109
|
-
:host .control
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
118
|
+
|
|
119
|
+
:host(${nonInteractivitySelector}) .control {
|
|
120
|
+
background: transparent;
|
|
121
|
+
border-color: ${SystemColors.GrayText};
|
|
122
|
+
color: ${SystemColors.GrayText};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.control:${focusVisible} {
|
|
126
|
+
outline-color: ${SystemColors.CanvasText};
|
|
114
127
|
}
|
|
128
|
+
|
|
115
129
|
:host([href]) .control {
|
|
116
|
-
background:
|
|
130
|
+
background: transparent;
|
|
117
131
|
border-color: ${SystemColors.LinkText};
|
|
118
132
|
color: ${SystemColors.LinkText};
|
|
119
|
-
fill: currentcolor;
|
|
120
|
-
}
|
|
121
|
-
:host([href]) .control:hover,
|
|
122
|
-
:host(.neutral[href]) .control:hover {
|
|
123
|
-
background: ${SystemColors.LinkText};
|
|
124
|
-
border-color: ${SystemColors.LinkText} !important;
|
|
125
|
-
color: ${SystemColors.HighlightText};
|
|
126
|
-
fill: currentcolor;
|
|
127
133
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
134
|
+
|
|
135
|
+
:host([href]:hover) .control,
|
|
136
|
+
:host([href]:active) .control {
|
|
137
|
+
background: transparent;
|
|
138
|
+
border-color: ${SystemColors.CanvasText};
|
|
139
|
+
color: ${SystemColors.CanvasText};
|
|
131
140
|
}
|
|
132
141
|
`));
|
|
133
142
|
/**
|
|
134
143
|
* @internal
|
|
135
144
|
*/
|
|
136
|
-
export const AccentButtonStyles = (context, definition, interactivitySelector
|
|
137
|
-
|
|
145
|
+
export const AccentButtonStyles = (context, definition, interactivitySelector, nonInteractivitySelector = '[disabled]') => css `
|
|
146
|
+
.control {
|
|
138
147
|
background: padding-box linear-gradient(${accentFillRest}, ${accentFillRest}),
|
|
139
148
|
border-box ${accentStrokeControlRest};
|
|
140
149
|
color: ${foregroundOnAccentRest};
|
|
141
150
|
}
|
|
142
151
|
|
|
143
|
-
:host
|
|
152
|
+
:host(${interactivitySelector}:hover) .control {
|
|
144
153
|
background: padding-box linear-gradient(${accentFillHover}, ${accentFillHover}),
|
|
145
154
|
border-box ${accentStrokeControlHover};
|
|
146
155
|
color: ${foregroundOnAccentHover};
|
|
147
156
|
}
|
|
148
157
|
|
|
149
|
-
:host
|
|
158
|
+
:host(${interactivitySelector}:active) .control {
|
|
150
159
|
background: padding-box linear-gradient(${accentFillActive}, ${accentFillActive}),
|
|
151
160
|
border-box ${accentStrokeControlActive};
|
|
152
161
|
color: ${foregroundOnAccentActive};
|
|
153
162
|
}
|
|
154
163
|
|
|
155
|
-
:host .control
|
|
156
|
-
${
|
|
157
|
-
box-shadow: 0 0 0 calc(((${focusStrokeWidth} + ${strokeWidth}) - ${strokeWidth}) * 1px) ${focusStrokeInner} inset !important;
|
|
164
|
+
:host(${nonInteractivitySelector}) .control {
|
|
165
|
+
background: ${accentFillRest};
|
|
158
166
|
}
|
|
159
167
|
|
|
160
|
-
|
|
161
|
-
|
|
168
|
+
.control:${focusVisible} {
|
|
169
|
+
box-shadow: 0 0 0 calc(${focusStrokeWidth} * 1px) ${focusStrokeInner} inset !important;
|
|
162
170
|
}
|
|
163
171
|
`.withBehaviors(forcedColorsStylesheetBehavior(css `
|
|
164
|
-
|
|
172
|
+
.control {
|
|
165
173
|
forced-color-adjust: none;
|
|
166
174
|
background: ${SystemColors.Highlight};
|
|
167
175
|
color: ${SystemColors.HighlightText};
|
|
168
176
|
}
|
|
169
|
-
|
|
170
|
-
:host
|
|
177
|
+
|
|
178
|
+
:host(${interactivitySelector}:hover) .control,
|
|
179
|
+
:host(${interactivitySelector}:active) .control {
|
|
171
180
|
background: ${SystemColors.HighlightText};
|
|
172
181
|
border-color: ${SystemColors.Highlight};
|
|
173
182
|
color: ${SystemColors.Highlight};
|
|
174
183
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
184
|
+
|
|
185
|
+
:host(${nonInteractivitySelector}) .control {
|
|
186
|
+
background: transparent;
|
|
187
|
+
border-color: ${SystemColors.GrayText};
|
|
188
|
+
color: ${SystemColors.GrayText};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.control:${focusVisible} {
|
|
192
|
+
outline-color: ${SystemColors.CanvasText};
|
|
193
|
+
box-shadow: 0 0 0 calc(${focusStrokeWidth} * 1px) ${SystemColors.HighlightText} inset !important;
|
|
179
194
|
}
|
|
195
|
+
|
|
180
196
|
:host([href]) .control {
|
|
181
197
|
background: ${SystemColors.LinkText};
|
|
182
198
|
color: ${SystemColors.HighlightText};
|
|
183
199
|
}
|
|
184
|
-
|
|
200
|
+
|
|
201
|
+
:host([href]:hover) .control,
|
|
202
|
+
:host([href]:active) .control {
|
|
185
203
|
background: ${SystemColors.ButtonFace};
|
|
186
204
|
border-color: ${SystemColors.LinkText};
|
|
187
205
|
color: ${SystemColors.LinkText};
|
|
188
|
-
fill: currentcolor;
|
|
189
|
-
}
|
|
190
|
-
:host([href]) .control:${focusVisible} {
|
|
191
|
-
background: ${SystemColors.LinkText};
|
|
192
|
-
outline-color: ${SystemColors.LinkText};
|
|
193
|
-
box-shadow: 0 0 0 calc(((${focusStrokeWidth} + ${strokeWidth}) - ${strokeWidth}) * 1px) ${SystemColors.HighlightText} inset !important;
|
|
194
|
-
color: ${SystemColors.HighlightText};
|
|
195
|
-
fill: currentcolor;
|
|
196
206
|
}
|
|
197
207
|
`));
|
|
198
208
|
/**
|
|
199
209
|
* @internal
|
|
200
210
|
*/
|
|
201
|
-
export const HypertextStyles = (context, definition, interactivitySelector
|
|
211
|
+
export const HypertextStyles = (context, definition, interactivitySelector, nonInteractivitySelector = '[disabled]') => css `
|
|
202
212
|
:host {
|
|
203
213
|
height: auto;
|
|
204
214
|
font-family: inherit;
|
|
@@ -207,180 +217,211 @@ export const HypertextStyles = (context, definition, interactivitySelector = '',
|
|
|
207
217
|
min-width: 0;
|
|
208
218
|
}
|
|
209
219
|
|
|
210
|
-
|
|
220
|
+
.control {
|
|
211
221
|
display: inline;
|
|
212
222
|
padding: 0;
|
|
213
|
-
background: transparent;
|
|
214
223
|
border: none;
|
|
215
224
|
box-shadow: none;
|
|
216
225
|
line-height: 1;
|
|
217
|
-
text-decoration: underline 1px;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
:host .control:not([href]) {
|
|
221
|
-
background: transparent;
|
|
222
226
|
}
|
|
223
227
|
|
|
224
|
-
:host
|
|
225
|
-
background: transparent;
|
|
228
|
+
:host(${interactivitySelector}) .control {
|
|
226
229
|
color: ${accentForegroundRest};
|
|
230
|
+
text-decoration: underline 1px;
|
|
227
231
|
}
|
|
228
232
|
|
|
229
|
-
:host
|
|
230
|
-
background: transparent;
|
|
233
|
+
:host(${interactivitySelector}:hover) .control {
|
|
231
234
|
color: ${accentForegroundHover};
|
|
232
235
|
text-decoration: none;
|
|
233
236
|
}
|
|
234
237
|
|
|
235
|
-
:host
|
|
236
|
-
background: transparent;
|
|
238
|
+
:host(${interactivitySelector}:active) .control {
|
|
237
239
|
color: ${accentForegroundActive};
|
|
238
240
|
text-decoration: none;
|
|
239
241
|
}
|
|
240
242
|
|
|
241
|
-
|
|
243
|
+
.control:${focusVisible} {
|
|
242
244
|
${focusTreatmentTight}
|
|
243
245
|
}
|
|
244
|
-
|
|
245
|
-
:host .control${nonInteractivitySelector} {
|
|
246
|
-
background: transparent;
|
|
247
|
-
}
|
|
248
246
|
`.withBehaviors(forcedColorsStylesheetBehavior(css `
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
247
|
+
:host(${interactivitySelector}) .control {
|
|
248
|
+
color: ${SystemColors.LinkText};
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
:host(${interactivitySelector}:hover) .control,
|
|
252
|
+
:host(${interactivitySelector}:active) .control {
|
|
253
|
+
color: ${SystemColors.CanvasText};
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.control:${focusVisible} {
|
|
257
|
+
outline-color: ${SystemColors.CanvasText};
|
|
258
|
+
}
|
|
256
259
|
`));
|
|
257
260
|
/**
|
|
258
261
|
* @internal
|
|
259
262
|
*/
|
|
260
|
-
export const LightweightButtonStyles = (context, definition, interactivitySelector
|
|
263
|
+
export const LightweightButtonStyles = (context, definition, interactivitySelector, nonInteractivitySelector = '[disabled]') => css `
|
|
261
264
|
:host {
|
|
262
265
|
color: ${accentForegroundRest};
|
|
263
266
|
}
|
|
264
267
|
|
|
265
|
-
|
|
268
|
+
.control {
|
|
266
269
|
background: ${neutralFillStealthRest};
|
|
267
270
|
}
|
|
268
271
|
|
|
269
|
-
:host
|
|
272
|
+
:host(${interactivitySelector}:hover) .control {
|
|
270
273
|
background: ${neutralFillStealthHover};
|
|
271
274
|
color: ${accentForegroundHover};
|
|
272
275
|
}
|
|
273
276
|
|
|
274
|
-
:host
|
|
277
|
+
:host(${interactivitySelector}:active) .control {
|
|
275
278
|
background: ${neutralFillStealthActive};
|
|
276
279
|
color: ${accentForegroundActive};
|
|
277
280
|
}
|
|
278
281
|
|
|
279
|
-
:host
|
|
282
|
+
:host(${nonInteractivitySelector}) .control {
|
|
280
283
|
background: ${neutralFillStealthRest};
|
|
281
284
|
}
|
|
282
285
|
`.withBehaviors(forcedColorsStylesheetBehavior(css `
|
|
283
|
-
:host
|
|
284
|
-
border-color: ${SystemColors.ButtonFace};
|
|
286
|
+
:host {
|
|
285
287
|
color: ${SystemColors.ButtonText};
|
|
286
288
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
289
|
+
|
|
290
|
+
.control {
|
|
291
|
+
forced-color-adjust: none;
|
|
292
|
+
background: transparent;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
:host(${interactivitySelector}:hover) .control,
|
|
296
|
+
:host(${interactivitySelector}:active) .control {
|
|
297
|
+
background: transparent;
|
|
298
|
+
border-color: ${SystemColors.ButtonText};
|
|
299
|
+
color: ${SystemColors.ButtonText};
|
|
293
300
|
}
|
|
301
|
+
|
|
302
|
+
:host(${nonInteractivitySelector}) .control {
|
|
303
|
+
background: transparent;
|
|
304
|
+
color: ${SystemColors.GrayText};
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.control:${focusVisible} {
|
|
308
|
+
outline-color: ${SystemColors.CanvasText};
|
|
309
|
+
}
|
|
310
|
+
|
|
294
311
|
:host([href]) .control {
|
|
295
|
-
border-color: ${SystemColors.ButtonFace};
|
|
296
312
|
color: ${SystemColors.LinkText};
|
|
297
313
|
}
|
|
298
|
-
|
|
299
|
-
:host([href]) .control
|
|
300
|
-
|
|
314
|
+
|
|
315
|
+
:host([href]:hover) .control,
|
|
316
|
+
:host([href]:active) .control {
|
|
317
|
+
border-color: ${SystemColors.LinkText};
|
|
301
318
|
color: ${SystemColors.LinkText};
|
|
302
319
|
}
|
|
303
320
|
`));
|
|
304
321
|
/**
|
|
305
322
|
* @internal
|
|
306
323
|
*/
|
|
307
|
-
export const OutlineButtonStyles = (context, definition, interactivitySelector
|
|
308
|
-
|
|
324
|
+
export const OutlineButtonStyles = (context, definition, interactivitySelector, nonInteractivitySelector = '[disabled]') => css `
|
|
325
|
+
.control {
|
|
309
326
|
background: transparent !important;
|
|
310
327
|
border-color: ${neutralStrokeRest};
|
|
311
328
|
}
|
|
312
329
|
|
|
313
|
-
:host
|
|
330
|
+
:host(${interactivitySelector}:hover) .control {
|
|
314
331
|
border-color: ${neutralStrokeHover};
|
|
315
332
|
}
|
|
316
333
|
|
|
317
|
-
:host
|
|
334
|
+
:host(${interactivitySelector}:active) .control {
|
|
318
335
|
border-color: ${neutralStrokeActive};
|
|
319
336
|
}
|
|
320
337
|
|
|
321
|
-
:host
|
|
338
|
+
:host(${nonInteractivitySelector}) .control {
|
|
322
339
|
background: transparent !important;
|
|
323
340
|
border-color: ${neutralStrokeRest};
|
|
324
341
|
}
|
|
325
342
|
`.withBehaviors(forcedColorsStylesheetBehavior(css `
|
|
326
|
-
|
|
343
|
+
.control {
|
|
327
344
|
border-color: ${SystemColors.ButtonText};
|
|
345
|
+
color: ${SystemColors.ButtonText};
|
|
328
346
|
}
|
|
329
|
-
|
|
347
|
+
|
|
348
|
+
:host(${interactivitySelector}:hover) .control,
|
|
349
|
+
:host(${interactivitySelector}:active) .control {
|
|
350
|
+
background: ${SystemColors.HighlightText};
|
|
330
351
|
border-color: ${SystemColors.Highlight};
|
|
331
|
-
color: ${SystemColors.
|
|
352
|
+
color: ${SystemColors.Highlight};
|
|
332
353
|
}
|
|
333
|
-
|
|
334
|
-
|
|
354
|
+
|
|
355
|
+
:host(${nonInteractivitySelector}) .control {
|
|
356
|
+
border-color: ${SystemColors.GrayText};
|
|
357
|
+
color: ${SystemColors.GrayText};
|
|
335
358
|
}
|
|
336
|
-
|
|
337
|
-
|
|
359
|
+
|
|
360
|
+
.control:${focusVisible} {
|
|
361
|
+
outline-color: ${SystemColors.CanvasText};
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
:host([href]) .control {
|
|
365
|
+
border-color: ${SystemColors.LinkText};
|
|
338
366
|
color: ${SystemColors.LinkText};
|
|
339
367
|
}
|
|
368
|
+
|
|
369
|
+
:host([href]:hover) .control,
|
|
370
|
+
:host([href]:active) .control {
|
|
371
|
+
border-color: ${SystemColors.CanvasText};
|
|
372
|
+
color: ${SystemColors.CanvasText};
|
|
373
|
+
}
|
|
340
374
|
`));
|
|
341
375
|
/**
|
|
342
376
|
* @internal
|
|
343
377
|
*/
|
|
344
|
-
export const StealthButtonStyles = (context, definition, interactivitySelector
|
|
345
|
-
|
|
378
|
+
export const StealthButtonStyles = (context, definition, interactivitySelector, nonInteractivitySelector = '[disabled]') => css `
|
|
379
|
+
.control {
|
|
346
380
|
background: ${neutralFillStealthRest};
|
|
347
381
|
}
|
|
348
382
|
|
|
349
|
-
:host
|
|
383
|
+
:host(${interactivitySelector}:hover) .control {
|
|
350
384
|
background: ${neutralFillStealthHover};
|
|
351
385
|
}
|
|
352
386
|
|
|
353
|
-
:host
|
|
387
|
+
:host(${interactivitySelector}:active) .control {
|
|
354
388
|
background: ${neutralFillStealthActive};
|
|
355
389
|
}
|
|
356
390
|
|
|
357
|
-
:host
|
|
391
|
+
:host(${nonInteractivitySelector}) .control {
|
|
358
392
|
background: ${neutralFillStealthRest};
|
|
359
393
|
}
|
|
360
394
|
`.withBehaviors(forcedColorsStylesheetBehavior(css `
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
395
|
+
.control {
|
|
396
|
+
forced-color-adjust: none;
|
|
397
|
+
background: transparent;
|
|
364
398
|
color: ${SystemColors.ButtonText};
|
|
365
|
-
fill: currentcolor;
|
|
366
399
|
}
|
|
367
|
-
|
|
368
|
-
:host
|
|
369
|
-
:host .control
|
|
370
|
-
background:
|
|
371
|
-
border-color: ${SystemColors.
|
|
372
|
-
color: ${SystemColors.
|
|
373
|
-
fill: currentcolor;
|
|
400
|
+
|
|
401
|
+
:host(${interactivitySelector}:hover) .control,
|
|
402
|
+
:host(${interactivitySelector}:active) .control {
|
|
403
|
+
background: transparent;
|
|
404
|
+
border-color: ${SystemColors.ButtonText};
|
|
405
|
+
color: ${SystemColors.ButtonText};
|
|
374
406
|
}
|
|
407
|
+
|
|
408
|
+
:host(${nonInteractivitySelector}) .control {
|
|
409
|
+
background: transparent;
|
|
410
|
+
color: ${SystemColors.GrayText};
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.control:${focusVisible} {
|
|
414
|
+
outline-color: ${SystemColors.CanvasText};
|
|
415
|
+
}
|
|
416
|
+
|
|
375
417
|
:host([href]) .control {
|
|
376
|
-
border-color: ${SystemColors.ButtonFace};
|
|
377
418
|
color: ${SystemColors.LinkText};
|
|
378
419
|
}
|
|
379
|
-
|
|
380
|
-
:host([href]) .control
|
|
381
|
-
|
|
420
|
+
|
|
421
|
+
:host([href]:hover) .control,
|
|
422
|
+
:host([href]:active) .control {
|
|
423
|
+
background: transparent;
|
|
382
424
|
border-color: ${SystemColors.LinkText};
|
|
383
|
-
color: ${SystemColors.
|
|
384
|
-
fill: currentcolor;
|
|
425
|
+
color: ${SystemColors.LinkText};
|
|
385
426
|
}
|
|
386
427
|
`));
|