@fluentui/web-components 3.0.2 → 3.1.0
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 +21 -1
- package/custom-elements.json +14 -202
- package/dist/esm/accordion-item/accordion-item.styles.css +3 -1
- package/dist/esm/button/button.styles.css +48 -12
- package/dist/esm/button/button.styles.js +21 -12
- package/dist/esm/button/button.styles.js.map +1 -1
- package/dist/esm/checkbox/checkbox.styles.css +13 -13
- package/dist/esm/checkbox/checkbox.styles.js +14 -14
- package/dist/esm/checkbox/checkbox.styles.js.map +1 -1
- package/dist/esm/compound-button/compound-button.styles.css +59 -14
- package/dist/esm/compound-button/compound-button.styles.js +11 -2
- package/dist/esm/compound-button/compound-button.styles.js.map +1 -1
- package/dist/esm/dropdown/dropdown.styles.css +8 -8
- package/dist/esm/dropdown/dropdown.styles.js +9 -9
- package/dist/esm/dropdown/dropdown.styles.js.map +1 -1
- package/dist/esm/link/link.styles.css +10 -1
- package/dist/esm/menu-button/menu-button.styles.css +48 -12
- package/dist/esm/menu-item/menu-item.styles.css +23 -39
- package/dist/esm/menu-item/menu-item.styles.js +25 -41
- package/dist/esm/menu-item/menu-item.styles.js.map +1 -1
- package/dist/esm/menu-list/menu-list.base.d.ts +0 -1
- package/dist/esm/menu-list/menu-list.base.js +0 -20
- package/dist/esm/menu-list/menu-list.base.js.map +1 -1
- package/dist/esm/menu-list/menu-list.styles.css +59 -7
- package/dist/esm/menu-list/menu-list.styles.js +60 -8
- package/dist/esm/menu-list/menu-list.styles.js.map +1 -1
- package/dist/esm/message-bar/message-bar.styles.css +1 -1
- package/dist/esm/message-bar/message-bar.styles.js +0 -1
- package/dist/esm/message-bar/message-bar.styles.js.map +1 -1
- package/dist/esm/option/option.styles.css +4 -4
- package/dist/esm/option/option.styles.js +5 -5
- package/dist/esm/option/option.styles.js.map +1 -1
- package/dist/esm/slider/slider.styles.css +2 -2
- package/dist/esm/slider/slider.styles.js +3 -2
- package/dist/esm/slider/slider.styles.js.map +1 -1
- package/dist/esm/styles/states/index.d.ts +9 -0
- package/dist/esm/styles/states/index.js +9 -0
- package/dist/esm/styles/states/index.js.map +1 -1
- package/dist/esm/switch/switch.styles.css +6 -6
- package/dist/esm/switch/switch.styles.js +7 -7
- package/dist/esm/switch/switch.styles.js.map +1 -1
- package/dist/esm/tab/tab.styles.css +10 -9
- package/dist/esm/tab/tab.styles.js +10 -9
- package/dist/esm/tab/tab.styles.js.map +1 -1
- package/dist/esm/tablist/tablist.base.d.ts +2 -0
- package/dist/esm/tablist/tablist.base.js +11 -7
- package/dist/esm/tablist/tablist.base.js.map +1 -1
- package/dist/esm/tablist/tablist.styles.css +28 -8
- package/dist/esm/tablist/tablist.styles.js +19 -1
- package/dist/esm/tablist/tablist.styles.js.map +1 -1
- package/dist/esm/tablist/tablist.template.html +1 -1
- package/dist/esm/tablist/tablist.template.js +1 -0
- package/dist/esm/tablist/tablist.template.js.map +1 -1
- package/dist/esm/text-input/text-input.styles.css +5 -5
- package/dist/esm/text-input/text-input.styles.js +6 -5
- package/dist/esm/text-input/text-input.styles.js.map +1 -1
- package/dist/esm/textarea/textarea.styles.css +6 -6
- package/dist/esm/textarea/textarea.styles.js +7 -7
- package/dist/esm/textarea/textarea.styles.js.map +1 -1
- package/dist/esm/toggle-button/toggle-button.styles.css +48 -12
- package/dist/esm/tree-item/tree-item.base.d.ts +1 -13
- package/dist/esm/tree-item/tree-item.base.js +2 -26
- package/dist/esm/tree-item/tree-item.base.js.map +1 -1
- package/dist/esm/tree-item/tree-item.styles.css +8 -2
- package/dist/esm/tree-item/tree-item.styles.js +8 -2
- package/dist/esm/tree-item/tree-item.styles.js.map +1 -1
- package/dist/web-components-all.js +25 -58
- package/dist/web-components-all.min.js +8 -8
- package/dist/web-components.d.ts +3 -14
- package/dist/web-components.js +25 -58
- package/dist/web-components.min.js +13 -13
- package/package.json +14 -14
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from '@microsoft/fast-element';
|
|
2
|
-
import { checkedState, indeterminateState } from '../styles/states/index.js';
|
|
2
|
+
import { checkedState, indeterminateState, nativeDisabledState } from '../styles/states/index.js';
|
|
3
3
|
import { borderRadiusCircular, borderRadiusMedium, borderRadiusSmall, colorCompoundBrandBackground, colorCompoundBrandBackgroundHover, colorCompoundBrandBackgroundPressed, colorCompoundBrandStroke, colorCompoundBrandStrokeHover, colorCompoundBrandStrokePressed, colorNeutralBackground1, colorNeutralBackgroundDisabled, colorNeutralForegroundInverted, colorNeutralStrokeAccessible, colorNeutralStrokeAccessibleHover, colorNeutralStrokeAccessiblePressed, colorNeutralStrokeDisabled, colorStrokeFocus2, colorTransparentStroke, strokeWidthThick, strokeWidthThin, } from '../theme/design-tokens.js';
|
|
4
4
|
import { display } from '../utils/display.js';
|
|
5
5
|
/** Checkbox styles
|
|
@@ -113,21 +113,21 @@ export const styles = css `
|
|
|
113
113
|
border-radius: ${borderRadiusCircular};
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
:host(
|
|
117
|
-
:host(
|
|
116
|
+
:host(${nativeDisabledState}),
|
|
117
|
+
:host(${nativeDisabledState}${checkedState}) {
|
|
118
118
|
background-color: ${colorNeutralBackgroundDisabled};
|
|
119
119
|
border-color: ${colorNeutralStrokeDisabled};
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
:host(
|
|
122
|
+
:host(${nativeDisabledState}) {
|
|
123
123
|
cursor: unset;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
:host(
|
|
126
|
+
:host(${nativeDisabledState}${indeterminateState}) .indeterminate-indicator {
|
|
127
127
|
background-color: ${colorNeutralStrokeDisabled};
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
:host(
|
|
130
|
+
:host(${nativeDisabledState}${checkedState}) .checked-indicator {
|
|
131
131
|
color: ${colorNeutralStrokeDisabled};
|
|
132
132
|
}
|
|
133
133
|
|
|
@@ -140,8 +140,8 @@ export const styles = css `
|
|
|
140
140
|
border-color: Canvas;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
:host(:not(
|
|
144
|
-
:host(${checkedState}:not(
|
|
143
|
+
:host(:not(${nativeDisabledState}):hover),
|
|
144
|
+
:host(${checkedState}:not(${nativeDisabledState}):hover),
|
|
145
145
|
:host(:not([slot='input']):focus-visible)::after {
|
|
146
146
|
border-color: Highlight;
|
|
147
147
|
}
|
|
@@ -156,21 +156,21 @@ export const styles = css `
|
|
|
156
156
|
background-color: FieldText;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
:host(${checkedState}:not(
|
|
160
|
-
:host(${indeterminateState}:not(
|
|
159
|
+
:host(${checkedState}:not(${nativeDisabledState}):hover),
|
|
160
|
+
:host(${indeterminateState}:not(${nativeDisabledState}):hover) .indeterminate-indicator {
|
|
161
161
|
background-color: Highlight;
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
:host(
|
|
164
|
+
:host(${nativeDisabledState}) {
|
|
165
165
|
border-color: GrayText;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
:host(
|
|
168
|
+
:host(${nativeDisabledState}${indeterminateState}) .indeterminate-indicator {
|
|
169
169
|
background-color: GrayText;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
:host(
|
|
173
|
-
:host(
|
|
172
|
+
:host(${nativeDisabledState}),
|
|
173
|
+
:host(${nativeDisabledState}${checkedState}) .checked-indicator {
|
|
174
174
|
color: GrayText;
|
|
175
175
|
}
|
|
176
176
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.styles.js","sourceRoot":"","sources":["../../../src/checkbox/checkbox.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"checkbox.styles.js","sourceRoot":"","sources":["../../../src/checkbox/checkbox.styles.ts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AG,kBAAkB;wBAC1B,0BAA0B;;;UAGxC,mBAAmB,GAAG,YAAY;aAC/B,0BAA0B;;;;;;;;;;;;iBAYtB,mBAAmB;YACxB,YAAY,QAAQ,mBAAmB;;;;;;;;;;YAUvC,YAAY;YACZ,kBAAkB;;;;YAIlB,YAAY,QAAQ,mBAAmB;YACvC,kBAAkB,QAAQ,mBAAmB;;;;YAI7C,mBAAmB;;;;YAInB,mBAAmB,GAAG,kBAAkB;;;;YAIxC,mBAAmB;YACnB,mBAAmB,GAAG,YAAY;;;;CAI7C,CAAC"}
|
|
@@ -213,33 +213,60 @@
|
|
|
213
213
|
border-color: transparent;
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
-
:host(
|
|
217
|
-
:
|
|
218
|
-
:
|
|
216
|
+
:host(
|
|
217
|
+
:is(
|
|
218
|
+
:disabled,
|
|
219
|
+
[disabled],
|
|
220
|
+
[disabled-focusable],
|
|
221
|
+
[appearance]:disabled,
|
|
222
|
+
[appearance][disabled],
|
|
223
|
+
[appearance][disabled-focusable]
|
|
224
|
+
)
|
|
225
|
+
),
|
|
226
|
+
:host(
|
|
227
|
+
:is(
|
|
228
|
+
:disabled,
|
|
229
|
+
[disabled],
|
|
230
|
+
[disabled-focusable],
|
|
231
|
+
[appearance]:disabled,
|
|
232
|
+
[appearance][disabled],
|
|
233
|
+
[appearance][disabled-focusable]
|
|
234
|
+
):hover
|
|
235
|
+
),
|
|
236
|
+
:host(
|
|
237
|
+
:is(
|
|
238
|
+
:disabled,
|
|
239
|
+
[disabled],
|
|
240
|
+
[disabled-focusable],
|
|
241
|
+
[appearance]:disabled,
|
|
242
|
+
[appearance][disabled],
|
|
243
|
+
[appearance][disabled-focusable]
|
|
244
|
+
):hover:active
|
|
245
|
+
) {
|
|
219
246
|
background-color: var(--colorNeutralBackgroundDisabled);
|
|
220
247
|
border-color: var(--colorNeutralStrokeDisabled);
|
|
221
248
|
color: var(--colorNeutralForegroundDisabled);
|
|
222
249
|
cursor: not-allowed;
|
|
223
250
|
}
|
|
224
251
|
|
|
225
|
-
:host([appearance='primary']:is(:disabled, [disabled-focusable])),
|
|
226
|
-
:host([appearance='primary']:is(:disabled, [disabled-focusable]):is(:hover, :hover:active)) {
|
|
252
|
+
:host([appearance='primary']:is(:disabled, [disabled], [disabled-focusable])),
|
|
253
|
+
:host([appearance='primary']:is(:disabled, [disabled], [disabled-focusable]):is(:hover, :hover:active)) {
|
|
227
254
|
border-color: transparent;
|
|
228
255
|
}
|
|
229
256
|
|
|
230
|
-
:host([appearance='outline']:is(:disabled, [disabled-focusable])),
|
|
231
|
-
:host([appearance='outline']:is(:disabled, [disabled-focusable]):is(:hover, :hover:active)) {
|
|
257
|
+
:host([appearance='outline']:is(:disabled, [disabled], [disabled-focusable])),
|
|
258
|
+
:host([appearance='outline']:is(:disabled, [disabled], [disabled-focusable]):is(:hover, :hover:active)) {
|
|
232
259
|
background-color: var(--colorTransparentBackground);
|
|
233
260
|
}
|
|
234
261
|
|
|
235
|
-
:host([appearance='subtle']:is(:disabled, [disabled-focusable])),
|
|
236
|
-
:host([appearance='subtle']:is(:disabled, [disabled-focusable]):is(:hover, :hover:active)) {
|
|
262
|
+
:host([appearance='subtle']:is(:disabled, [disabled], [disabled-focusable])),
|
|
263
|
+
:host([appearance='subtle']:is(:disabled, [disabled], [disabled-focusable]):is(:hover, :hover:active)) {
|
|
237
264
|
background-color: var(--colorTransparentBackground);
|
|
238
265
|
border-color: transparent;
|
|
239
266
|
}
|
|
240
267
|
|
|
241
|
-
:host([appearance='transparent']:is(:disabled, [disabled-focusable])),
|
|
242
|
-
:host([appearance='transparent']:is(:disabled, [disabled-focusable]):is(:hover, :hover:active)) {
|
|
268
|
+
:host([appearance='transparent']:is(:disabled, [disabled], [disabled-focusable])),
|
|
269
|
+
:host([appearance='transparent']:is(:disabled, [disabled], [disabled-focusable]):is(:hover, :hover:active)) {
|
|
243
270
|
border-color: transparent;
|
|
244
271
|
background-color: var(--colorTransparentBackground);
|
|
245
272
|
}
|
|
@@ -260,7 +287,16 @@
|
|
|
260
287
|
forced-color-adjust: none;
|
|
261
288
|
}
|
|
262
289
|
|
|
263
|
-
:host(
|
|
290
|
+
:host(
|
|
291
|
+
:is(
|
|
292
|
+
:disabled,
|
|
293
|
+
[disabled],
|
|
294
|
+
[disabled-focusable],
|
|
295
|
+
[appearance]:disabled,
|
|
296
|
+
[appearance][disabled],
|
|
297
|
+
[appearance][disabled-focusable]
|
|
298
|
+
)
|
|
299
|
+
) {
|
|
264
300
|
background-color: ButtonFace;
|
|
265
301
|
color: GrayText;
|
|
266
302
|
border-color: ButtonText;
|
|
@@ -323,7 +359,16 @@
|
|
|
323
359
|
color: var(--colorNeutralForeground2BrandPressed);
|
|
324
360
|
}
|
|
325
361
|
|
|
326
|
-
:host(
|
|
362
|
+
:host(
|
|
363
|
+
:is(
|
|
364
|
+
:disabled,
|
|
365
|
+
:disabled[appearance],
|
|
366
|
+
[disabled],
|
|
367
|
+
[disabled][appearance],
|
|
368
|
+
[disabled-focusable],
|
|
369
|
+
[disabled-focusable][appearance]
|
|
370
|
+
)
|
|
371
|
+
)
|
|
327
372
|
::slotted([slot='description']) {
|
|
328
373
|
color: var(--colorNeutralForegroundDisabled);
|
|
329
374
|
}
|
|
@@ -363,7 +408,7 @@
|
|
|
363
408
|
}
|
|
364
409
|
|
|
365
410
|
@media (forced-colors: active) {
|
|
366
|
-
:host([appearance='primary']:not(:hover, :focus-visible, :disabled, [disabled-focusable]))
|
|
411
|
+
:host([appearance='primary']:not(:hover, :focus-visible, :disabled, [disabled], [disabled-focusable]))
|
|
367
412
|
::slotted([slot='description']) {
|
|
368
413
|
color: HighlightText;
|
|
369
414
|
}
|
|
@@ -61,7 +61,16 @@ export const styles = css `
|
|
|
61
61
|
color: ${colorNeutralForeground2BrandPressed};
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
:host(
|
|
64
|
+
:host(
|
|
65
|
+
:is(
|
|
66
|
+
:disabled,
|
|
67
|
+
:disabled[appearance],
|
|
68
|
+
[disabled],
|
|
69
|
+
[disabled][appearance],
|
|
70
|
+
[disabled-focusable],
|
|
71
|
+
[disabled-focusable][appearance]
|
|
72
|
+
)
|
|
73
|
+
)
|
|
65
74
|
::slotted([slot='description']) {
|
|
66
75
|
color: ${colorNeutralForegroundDisabled};
|
|
67
76
|
}
|
|
@@ -101,7 +110,7 @@ export const styles = css `
|
|
|
101
110
|
}
|
|
102
111
|
|
|
103
112
|
@media (forced-colors: active) {
|
|
104
|
-
:host([appearance='primary']:not(:hover, :focus-visible, :disabled, [disabled-focusable]))
|
|
113
|
+
:host([appearance='primary']:not(:hover, :focus-visible, :disabled, [disabled], [disabled-focusable]))
|
|
105
114
|
::slotted([slot='description']) {
|
|
106
115
|
color: HighlightText;
|
|
107
116
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compound-button.styles.js","sourceRoot":"","sources":["../../../src/compound-button/compound-button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EACL,uBAAuB,EACvB,iCAAiC,EACjC,mCAAmC,EACnC,4BAA4B,EAC5B,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,eAAe,EACf,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AAEnC,oCAAoC;AACpC,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;IACrB,YAAY;;;;;;;;;iBASC,eAAe;mBACb,iBAAiB;;;;;;;;;;aAUvB,uBAAuB;;iBAEnB,eAAe;mBACb,iBAAiB;;;;;;;;;;;aAWvB,4BAA4B;;;;aAI5B,8BAA8B;;;;aAI9B,6BAA6B;;;;;aAK7B,uBAAuB;;;;aAIvB,iCAAiC;;;;aAIjC,mCAAmC
|
|
1
|
+
{"version":3,"file":"compound-button.styles.js","sourceRoot":"","sources":["../../../src/compound-button/compound-button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EACL,uBAAuB,EACvB,iCAAiC,EACjC,mCAAmC,EACnC,4BAA4B,EAC5B,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,eAAe,EACf,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AAEnC,oCAAoC;AACpC,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;IACrB,YAAY;;;;;;;;;iBASC,eAAe;mBACb,iBAAiB;;;;;;;;;;aAUvB,uBAAuB;;iBAEnB,eAAe;mBACb,iBAAiB;;;;;;;;;;;aAWvB,4BAA4B;;;;aAI5B,8BAA8B;;;;aAI9B,6BAA6B;;;;;aAK7B,uBAAuB;;;;aAIvB,iCAAiC;;;;aAIjC,mCAAmC;;;;;;;;;;;;;;aAcnC,8BAA8B;;;;;;;;;;;eAW5B,uBAAuB;;;;;;eAMvB,mBAAmB;;;;;;eAMnB,kBAAkB;;;;;;;iBAOhB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;;;;;;;;;CAS/B,CAAC"}
|
|
@@ -175,18 +175,18 @@
|
|
|
175
175
|
--control-border-color: var(--colorTransparentStroke);
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
:host(:disabled),
|
|
179
|
-
:host(:disabled) ::slotted(:where(button, input)) {
|
|
178
|
+
:host(:is([disabled], :disabled)),
|
|
179
|
+
:host(:is([disabled], :disabled)) ::slotted(:where(button, input)) {
|
|
180
180
|
cursor: not-allowed;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
:host(:disabled) .control::before,
|
|
184
|
-
:host(:disabled) .control::after {
|
|
183
|
+
:host(:is([disabled], :disabled)) .control::before,
|
|
184
|
+
:host(:is([disabled], :disabled)) .control::after {
|
|
185
185
|
content: none;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
:host(:disabled) .control:is(*, :active, :hover),
|
|
189
|
-
:host(:disabled) :where(slot[name='indicator'] > *, ::slotted([slot='indicator'])) {
|
|
188
|
+
:host(:is([disabled], :disabled)) .control:is(*, :active, :hover),
|
|
189
|
+
:host(:is([disabled], :disabled)) :where(slot[name='indicator'] > *, ::slotted([slot='indicator'])) {
|
|
190
190
|
--control-border-color: var(--colorNeutralStrokeDisabled);
|
|
191
191
|
background-color: var(--colorNeutralBackgroundDisabled);
|
|
192
192
|
color: var(--colorNeutralForegroundDisabled);
|
|
@@ -213,10 +213,10 @@
|
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
@media (forced-colors: active) {
|
|
216
|
-
:host(:disabled) .control {
|
|
216
|
+
:host(:is([disabled], :disabled)) .control {
|
|
217
217
|
border-color: GrayText;
|
|
218
218
|
}
|
|
219
|
-
:host(:disabled) :where(slot[name='indicator'] > *, ::slotted([slot='indicator'])) {
|
|
219
|
+
:host(:is([disabled], :disabled)) :where(slot[name='indicator'] > *, ::slotted([slot='indicator'])) {
|
|
220
220
|
color: GrayText;
|
|
221
221
|
}
|
|
222
222
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css } from '@microsoft/fast-element';
|
|
2
2
|
import { typographyBody1Styles, typographyBody2Styles, typographyCaption1Styles, } from '../styles/partials/typography.partials.js';
|
|
3
|
-
import { openState, placeholderShownState } from '../styles/states/index.js';
|
|
3
|
+
import { nativeDisabledState, openState, placeholderShownState } from '../styles/states/index.js';
|
|
4
4
|
import { borderRadiusMedium, borderRadiusNone, colorCompoundBrandBackgroundHover, colorCompoundBrandBackgroundPressed, colorCompoundBrandStroke, colorNeutralBackground1, colorNeutralBackground3, colorNeutralBackgroundDisabled, colorNeutralForeground1, colorNeutralForeground3, colorNeutralForeground4, colorNeutralForegroundDisabled, colorNeutralStroke1, colorNeutralStroke1Hover, colorNeutralStroke1Pressed, colorNeutralStrokeAccessible, colorNeutralStrokeAccessibleHover, colorNeutralStrokeAccessiblePressed, colorNeutralStrokeDisabled, colorStrokeFocus1, colorStrokeFocus2, colorTransparentBackground, colorTransparentStroke, colorTransparentStrokeInteractive, curveAccelerateMid, curveDecelerateMid, durationNormal, durationUltraFast, lineHeightBase200, lineHeightBase300, lineHeightBase400, spacingHorizontalM, spacingHorizontalMNudge, spacingHorizontalS, spacingHorizontalSNudge, spacingHorizontalXXS, spacingVerticalS, spacingVerticalSNudge, spacingVerticalXS, strokeWidthThick, strokeWidthThin, } from '../theme/design-tokens.js';
|
|
5
5
|
import { display } from '../utils/display.js';
|
|
6
6
|
/**
|
|
@@ -169,18 +169,18 @@ export const styles = css `
|
|
|
169
169
|
--control-border-color: ${colorTransparentStroke};
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
:host(
|
|
173
|
-
:host(
|
|
172
|
+
:host(${nativeDisabledState}),
|
|
173
|
+
:host(${nativeDisabledState}) ::slotted(:where(button, input)) {
|
|
174
174
|
cursor: not-allowed;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
:host(
|
|
178
|
-
:host(
|
|
177
|
+
:host(${nativeDisabledState}) .control::before,
|
|
178
|
+
:host(${nativeDisabledState}) .control::after {
|
|
179
179
|
content: none;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
:host(
|
|
183
|
-
:host(
|
|
182
|
+
:host(${nativeDisabledState}) .control:is(*, :active, :hover),
|
|
183
|
+
:host(${nativeDisabledState}) :where(slot[name='indicator'] > *, ::slotted([slot='indicator'])) {
|
|
184
184
|
--control-border-color: ${colorNeutralStrokeDisabled};
|
|
185
185
|
background-color: ${colorNeutralBackgroundDisabled};
|
|
186
186
|
color: ${colorNeutralForegroundDisabled};
|
|
@@ -207,10 +207,10 @@ export const styles = css `
|
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
@media (forced-colors: active) {
|
|
210
|
-
:host(
|
|
210
|
+
:host(${nativeDisabledState}) .control {
|
|
211
211
|
border-color: GrayText;
|
|
212
212
|
}
|
|
213
|
-
:host(
|
|
213
|
+
:host(${nativeDisabledState}) :where(slot[name='indicator'] > *, ::slotted([slot='indicator'])) {
|
|
214
214
|
color: GrayText;
|
|
215
215
|
}
|
|
216
216
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.styles.js","sourceRoot":"","sources":["../../../src/dropdown/dropdown.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"dropdown.styles.js","sourceRoot":"","sources":["../../../src/dropdown/dropdown.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClG,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,iCAAiC,EACjC,mCAAmC,EACnC,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,8BAA8B,EAC9B,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,8BAA8B,EAC9B,mBAAmB,EACnB,wBAAwB,EACxB,0BAA0B,EAC1B,4BAA4B,EAC5B,iCAAiC,EACjC,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C;;;;wBAIjC,iCAAiC;;;;8BAI3B,0BAA0B;;;;wBAIhC,mCAAmC;;;;wBAInC,mCAAmC;;;;wBAInC,uBAAuB;;;;8BAIjB,sBAAsB;;;UAG1C,mBAAmB;UACnB,mBAAmB;;;;UAInB,mBAAmB;UACnB,mBAAmB;;;;UAInB,mBAAmB;UACnB,mBAAmB;8BACC,0BAA0B;wBAChC,8BAA8B;aACzC,8BAA8B;;;;;;;;;;;8BAWb,iBAAiB,OAAO,qBAAqB,WAAW,eAAe;;;;8BAIvE,iBAAiB,OAAO,iBAAiB,WAAW,eAAe;;;;8BAInE,iBAAiB,OAAO,gBAAgB,WAAW,eAAe;;;;;YAKpF,mBAAmB;;;YAGnB,mBAAmB;;;;CAI9B,CAAC"}
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
user-select: text;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
:host(:
|
|
25
|
+
:host(:hover) {
|
|
26
26
|
outline: none;
|
|
27
27
|
text-decoration-line: underline;
|
|
28
28
|
}
|
|
@@ -55,6 +55,15 @@
|
|
|
55
55
|
text-decoration: underline;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
:host(:focus-visible),
|
|
59
|
+
:host-context(:is(h1, h2, h3, h4, h5, h6, p, fluent-text)):focus-visible,
|
|
60
|
+
:host([inline]:focus-visible) {
|
|
61
|
+
outline-style: none;
|
|
62
|
+
text-decoration-line: underline;
|
|
63
|
+
text-decoration-style: double;
|
|
64
|
+
text-decoration-color: var(--colorStrokeFocus2);
|
|
65
|
+
}
|
|
66
|
+
|
|
58
67
|
:host(:not([href])) {
|
|
59
68
|
color: inherit;
|
|
60
69
|
text-decoration: none;
|
|
@@ -213,33 +213,60 @@
|
|
|
213
213
|
border-color: transparent;
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
-
:host(
|
|
217
|
-
:
|
|
218
|
-
:
|
|
216
|
+
:host(
|
|
217
|
+
:is(
|
|
218
|
+
:disabled,
|
|
219
|
+
[disabled],
|
|
220
|
+
[disabled-focusable],
|
|
221
|
+
[appearance]:disabled,
|
|
222
|
+
[appearance][disabled],
|
|
223
|
+
[appearance][disabled-focusable]
|
|
224
|
+
)
|
|
225
|
+
),
|
|
226
|
+
:host(
|
|
227
|
+
:is(
|
|
228
|
+
:disabled,
|
|
229
|
+
[disabled],
|
|
230
|
+
[disabled-focusable],
|
|
231
|
+
[appearance]:disabled,
|
|
232
|
+
[appearance][disabled],
|
|
233
|
+
[appearance][disabled-focusable]
|
|
234
|
+
):hover
|
|
235
|
+
),
|
|
236
|
+
:host(
|
|
237
|
+
:is(
|
|
238
|
+
:disabled,
|
|
239
|
+
[disabled],
|
|
240
|
+
[disabled-focusable],
|
|
241
|
+
[appearance]:disabled,
|
|
242
|
+
[appearance][disabled],
|
|
243
|
+
[appearance][disabled-focusable]
|
|
244
|
+
):hover:active
|
|
245
|
+
) {
|
|
219
246
|
background-color: var(--colorNeutralBackgroundDisabled);
|
|
220
247
|
border-color: var(--colorNeutralStrokeDisabled);
|
|
221
248
|
color: var(--colorNeutralForegroundDisabled);
|
|
222
249
|
cursor: not-allowed;
|
|
223
250
|
}
|
|
224
251
|
|
|
225
|
-
:host([appearance='primary']:is(:disabled, [disabled-focusable])),
|
|
226
|
-
:host([appearance='primary']:is(:disabled, [disabled-focusable]):is(:hover, :hover:active)) {
|
|
252
|
+
:host([appearance='primary']:is(:disabled, [disabled], [disabled-focusable])),
|
|
253
|
+
:host([appearance='primary']:is(:disabled, [disabled], [disabled-focusable]):is(:hover, :hover:active)) {
|
|
227
254
|
border-color: transparent;
|
|
228
255
|
}
|
|
229
256
|
|
|
230
|
-
:host([appearance='outline']:is(:disabled, [disabled-focusable])),
|
|
231
|
-
:host([appearance='outline']:is(:disabled, [disabled-focusable]):is(:hover, :hover:active)) {
|
|
257
|
+
:host([appearance='outline']:is(:disabled, [disabled], [disabled-focusable])),
|
|
258
|
+
:host([appearance='outline']:is(:disabled, [disabled], [disabled-focusable]):is(:hover, :hover:active)) {
|
|
232
259
|
background-color: var(--colorTransparentBackground);
|
|
233
260
|
}
|
|
234
261
|
|
|
235
|
-
:host([appearance='subtle']:is(:disabled, [disabled-focusable])),
|
|
236
|
-
:host([appearance='subtle']:is(:disabled, [disabled-focusable]):is(:hover, :hover:active)) {
|
|
262
|
+
:host([appearance='subtle']:is(:disabled, [disabled], [disabled-focusable])),
|
|
263
|
+
:host([appearance='subtle']:is(:disabled, [disabled], [disabled-focusable]):is(:hover, :hover:active)) {
|
|
237
264
|
background-color: var(--colorTransparentBackground);
|
|
238
265
|
border-color: transparent;
|
|
239
266
|
}
|
|
240
267
|
|
|
241
|
-
:host([appearance='transparent']:is(:disabled, [disabled-focusable])),
|
|
242
|
-
:host([appearance='transparent']:is(:disabled, [disabled-focusable]):is(:hover, :hover:active)) {
|
|
268
|
+
:host([appearance='transparent']:is(:disabled, [disabled], [disabled-focusable])),
|
|
269
|
+
:host([appearance='transparent']:is(:disabled, [disabled], [disabled-focusable]):is(:hover, :hover:active)) {
|
|
243
270
|
border-color: transparent;
|
|
244
271
|
background-color: var(--colorTransparentBackground);
|
|
245
272
|
}
|
|
@@ -260,7 +287,16 @@
|
|
|
260
287
|
forced-color-adjust: none;
|
|
261
288
|
}
|
|
262
289
|
|
|
263
|
-
:host(
|
|
290
|
+
:host(
|
|
291
|
+
:is(
|
|
292
|
+
:disabled,
|
|
293
|
+
[disabled],
|
|
294
|
+
[disabled-focusable],
|
|
295
|
+
[appearance]:disabled,
|
|
296
|
+
[appearance][disabled],
|
|
297
|
+
[appearance][disabled-focusable]
|
|
298
|
+
)
|
|
299
|
+
) {
|
|
264
300
|
background-color: ButtonFace;
|
|
265
301
|
color: GrayText;
|
|
266
302
|
border-color: ButtonText;
|
|
@@ -2,25 +2,30 @@
|
|
|
2
2
|
display: none;
|
|
3
3
|
}
|
|
4
4
|
:host {
|
|
5
|
-
display:
|
|
5
|
+
display: flex;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
:host {
|
|
9
|
-
--indent: 0;
|
|
10
9
|
align-items: center;
|
|
11
10
|
background: var(--colorNeutralBackground1);
|
|
12
11
|
border-radius: var(--borderRadiusMedium);
|
|
12
|
+
box-sizing: border-box;
|
|
13
13
|
color: var(--colorNeutralForeground2);
|
|
14
|
-
contain: layout;
|
|
15
14
|
cursor: pointer;
|
|
16
|
-
/* Prevent shrinking of MenuItems when max-height is applied to MenuList */
|
|
17
|
-
flex-shrink: 0;
|
|
18
15
|
font: var(--fontWeightRegular) var(--fontSizeBase300) / var(--lineHeightBase300) var(--fontFamilyBase);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
height: 32px;
|
|
16
|
+
gap: 4px;
|
|
17
|
+
min-block-size: 32px;
|
|
22
18
|
overflow: visible;
|
|
23
|
-
padding:
|
|
19
|
+
padding-inline: 10px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@supports (grid-template-columns: subgrid) {
|
|
23
|
+
:host {
|
|
24
|
+
display: grid;
|
|
25
|
+
gap: 0;
|
|
26
|
+
grid-template-columns: subgrid;
|
|
27
|
+
padding-inline: unset;
|
|
28
|
+
}
|
|
24
29
|
}
|
|
25
30
|
|
|
26
31
|
:host(:hover) {
|
|
@@ -52,13 +57,6 @@
|
|
|
52
57
|
outline: 2px solid var(--colorStrokeFocus2);
|
|
53
58
|
}
|
|
54
59
|
|
|
55
|
-
.content {
|
|
56
|
-
white-space: nowrap;
|
|
57
|
-
flex-grow: 1;
|
|
58
|
-
grid-column: auto / span 2;
|
|
59
|
-
padding: 0 2px;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
60
|
:host(:not(:state(checked))) .indicator,
|
|
63
61
|
:host(:not(:state(checked))) ::slotted([slot='indicator']),
|
|
64
62
|
:host(:not(:state(submenu))) .submenu-glyph,
|
|
@@ -72,46 +70,32 @@
|
|
|
72
70
|
white-space: nowrap;
|
|
73
71
|
}
|
|
74
72
|
|
|
75
|
-
:host([data-indent='1']) {
|
|
76
|
-
--indent: 1;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
:host([data-indent='2']) {
|
|
80
|
-
--indent: 2;
|
|
81
|
-
grid-template-columns: 20px 20px auto auto;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
:host(:state(submenu)) {
|
|
85
|
-
grid-template-columns: 20px auto auto 20px;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
:host([data-indent='2']:state(submenu)) {
|
|
89
|
-
grid-template-columns: 20px 20px auto auto 20px;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
73
|
.indicator,
|
|
93
74
|
::slotted([slot='indicator']) {
|
|
94
|
-
grid-column:
|
|
75
|
+
grid-column: 2 / span 1;
|
|
95
76
|
width: 20px;
|
|
96
77
|
}
|
|
97
78
|
|
|
98
79
|
::slotted([slot='start']) {
|
|
99
80
|
display: inline-flex;
|
|
100
|
-
grid-column:
|
|
81
|
+
grid-column: 3 / span 1;
|
|
101
82
|
}
|
|
102
83
|
|
|
103
84
|
.content {
|
|
104
|
-
|
|
85
|
+
flex-grow: 1;
|
|
86
|
+
grid-column: 4 / span 1;
|
|
87
|
+
padding: 0 2px;
|
|
88
|
+
white-space: nowrap;
|
|
105
89
|
}
|
|
106
90
|
|
|
107
91
|
::slotted([slot='end']) {
|
|
108
|
-
grid-column:
|
|
92
|
+
grid-column: 5 / span 1;
|
|
109
93
|
justify-self: end;
|
|
110
94
|
}
|
|
111
95
|
|
|
112
96
|
.submenu-glyph,
|
|
113
97
|
::slotted([slot='submenu-glyph']) {
|
|
114
|
-
grid-column:
|
|
98
|
+
grid-column: 6 / span 1;
|
|
115
99
|
justify-self: end;
|
|
116
100
|
}
|
|
117
101
|
|
|
@@ -128,7 +112,7 @@
|
|
|
128
112
|
|
|
129
113
|
::slotted([popover]) {
|
|
130
114
|
margin: 0;
|
|
131
|
-
max-
|
|
115
|
+
max-block-size: var(--menu-max-height, auto);
|
|
132
116
|
position: fixed;
|
|
133
117
|
position-anchor: --menu-trigger;
|
|
134
118
|
inset: unset;
|