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