@fluentui/web-components 3.0.0-rc.26 → 3.0.0-rc.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.
Files changed (128) hide show
  1. package/CHANGELOG.md +21 -2
  2. package/README.md +26 -0
  3. package/custom-elements.json +41 -56
  4. package/dist/esm/accordion/accordion.styles.css +11 -7
  5. package/dist/esm/accordion/accordion.template.html +4 -3
  6. package/dist/esm/accordion-item/accordion-item.styles.css +174 -170
  7. package/dist/esm/accordion-item/accordion-item.template.html +38 -31
  8. package/dist/esm/anchor-button/anchor-button.styles.css +224 -223
  9. package/dist/esm/anchor-button/anchor-button.template.html +8 -11
  10. package/dist/esm/avatar/avatar.styles.css +475 -470
  11. package/dist/esm/avatar/avatar.template.html +10 -14
  12. package/dist/esm/badge/badge.styles.css +264 -266
  13. package/dist/esm/badge/badge.template.html +5 -2
  14. package/dist/esm/button/button.base.js +2 -0
  15. package/dist/esm/button/button.base.js.map +1 -1
  16. package/dist/esm/button/button.styles.css +260 -259
  17. package/dist/esm/button/button.template.html +8 -10
  18. package/dist/esm/checkbox/checkbox.base.js +2 -0
  19. package/dist/esm/checkbox/checkbox.base.js.map +1 -1
  20. package/dist/esm/checkbox/checkbox.styles.css +146 -142
  21. package/dist/esm/checkbox/checkbox.template.html +21 -16
  22. package/dist/esm/compound-button/compound-button.styles.css +363 -365
  23. package/dist/esm/compound-button/compound-button.template.html +9 -11
  24. package/dist/esm/counter-badge/counter-badge.styles.css +177 -177
  25. package/dist/esm/counter-badge/counter-badge.template.html +5 -2
  26. package/dist/esm/dialog/dialog.styles.css +65 -66
  27. package/dist/esm/dialog/dialog.template.html +18 -15
  28. package/dist/esm/dialog-body/dialog-body.styles.css +81 -76
  29. package/dist/esm/dialog-body/dialog-body.styles.js +1 -0
  30. package/dist/esm/dialog-body/dialog-body.styles.js.map +1 -1
  31. package/dist/esm/dialog-body/dialog-body.template.html +2 -1
  32. package/dist/esm/divider/divider.styles.css +105 -101
  33. package/dist/esm/divider/divider.template.html +6 -1
  34. package/dist/esm/drawer/drawer.styles.css +124 -119
  35. package/dist/esm/drawer/drawer.template.html +5 -2
  36. package/dist/esm/drawer-body/drawer-body.styles.css +29 -26
  37. package/dist/esm/drawer-body/drawer-body.template.html +5 -2
  38. package/dist/esm/dropdown/dropdown.base.d.ts +1 -1
  39. package/dist/esm/dropdown/dropdown.base.js +3 -1
  40. package/dist/esm/dropdown/dropdown.base.js.map +1 -1
  41. package/dist/esm/dropdown/dropdown.styles.css +192 -190
  42. package/dist/esm/dropdown/dropdown.styles.js +1 -0
  43. package/dist/esm/dropdown/dropdown.styles.js.map +1 -1
  44. package/dist/esm/dropdown/dropdown.template.html +26 -19
  45. package/dist/esm/field/field.styles.css +125 -121
  46. package/dist/esm/field/field.template.html +3 -2
  47. package/dist/esm/image/image.styles.css +49 -50
  48. package/dist/esm/image/image.template.html +6 -1
  49. package/dist/esm/label/label.styles.css +34 -30
  50. package/dist/esm/label/label.template.html +5 -2
  51. package/dist/esm/link/link.styles.css +58 -54
  52. package/dist/esm/link/link.template.html +4 -7
  53. package/dist/esm/listbox/listbox.styles.css +40 -36
  54. package/dist/esm/listbox/listbox.styles.js +2 -2
  55. package/dist/esm/listbox/listbox.template.html +4 -6
  56. package/dist/esm/menu/menu.d.ts +8 -8
  57. package/dist/esm/menu/menu.js.map +1 -1
  58. package/dist/esm/menu/menu.styles.css +56 -52
  59. package/dist/esm/menu/menu.styles.js +5 -5
  60. package/dist/esm/menu/menu.template.html +6 -5
  61. package/dist/esm/menu-button/menu-button.styles.css +260 -259
  62. package/dist/esm/menu-button/menu-button.template.html +23 -14
  63. package/dist/esm/menu-item/menu-item.js +2 -0
  64. package/dist/esm/menu-item/menu-item.js.map +1 -1
  65. package/dist/esm/menu-item/menu-item.styles.css +141 -137
  66. package/dist/esm/menu-item/menu-item.styles.js +8 -3
  67. package/dist/esm/menu-item/menu-item.styles.js.map +1 -1
  68. package/dist/esm/menu-item/menu-item.template.html +48 -17
  69. package/dist/esm/menu-list/menu-list.styles.css +19 -15
  70. package/dist/esm/menu-list/menu-list.template.html +4 -3
  71. package/dist/esm/message-bar/message-bar.styles.css +83 -84
  72. package/dist/esm/message-bar/message-bar.template.html +7 -2
  73. package/dist/esm/option/option.styles.css +117 -114
  74. package/dist/esm/option/option.template.html +17 -14
  75. package/dist/esm/progress-bar/progress-bar.styles.css +83 -79
  76. package/dist/esm/progress-bar/progress-bar.template.html +4 -1
  77. package/dist/esm/radio/radio.styles.css +100 -96
  78. package/dist/esm/radio/radio.template.html +6 -9
  79. package/dist/esm/radio-group/radio-group.styles.css +45 -41
  80. package/dist/esm/radio-group/radio-group.template.html +11 -10
  81. package/dist/esm/rating-display/rating-display.styles.css +136 -134
  82. package/dist/esm/rating-display/rating-display.template.html +5 -2
  83. package/dist/esm/slider/slider.js +2 -0
  84. package/dist/esm/slider/slider.js.map +1 -1
  85. package/dist/esm/slider/slider.styles.css +186 -182
  86. package/dist/esm/slider/slider.template.html +13 -15
  87. package/dist/esm/spinner/spinner.styles.css +155 -151
  88. package/dist/esm/spinner/spinner.template.html +16 -11
  89. package/dist/esm/switch/switch.styles.css +112 -108
  90. package/dist/esm/switch/switch.template.html +9 -8
  91. package/dist/esm/tab/tab.js +2 -0
  92. package/dist/esm/tab/tab.js.map +1 -1
  93. package/dist/esm/tab/tab.styles.css +112 -108
  94. package/dist/esm/tab/tab.template.html +6 -5
  95. package/dist/esm/tablist/tablist.styles.css +194 -190
  96. package/dist/esm/tablist/tablist.template.html +2 -5
  97. package/dist/esm/text/text.styles.css +105 -101
  98. package/dist/esm/text/text.template.html +6 -1
  99. package/dist/esm/text-input/text-input.base.d.ts +0 -7
  100. package/dist/esm/text-input/text-input.base.js +3 -14
  101. package/dist/esm/text-input/text-input.base.js.map +1 -1
  102. package/dist/esm/text-input/text-input.styles.css +199 -195
  103. package/dist/esm/text-input/text-input.template.html +34 -35
  104. package/dist/esm/text-input/text-input.template.js +1 -4
  105. package/dist/esm/text-input/text-input.template.js.map +1 -1
  106. package/dist/esm/textarea/textarea.base.js +2 -0
  107. package/dist/esm/textarea/textarea.base.js.map +1 -1
  108. package/dist/esm/textarea/textarea.styles.css +254 -250
  109. package/dist/esm/textarea/textarea.template.html +28 -27
  110. package/dist/esm/toggle-button/toggle-button.styles.css +360 -357
  111. package/dist/esm/toggle-button/toggle-button.template.html +8 -10
  112. package/dist/esm/tooltip/tooltip.styles.css +81 -77
  113. package/dist/esm/tooltip/tooltip.template.html +6 -1
  114. package/dist/esm/tree/tree.styles.css +9 -5
  115. package/dist/esm/tree/tree.template.html +3 -2
  116. package/dist/esm/tree-item/tree-item.base.js +2 -0
  117. package/dist/esm/tree-item/tree-item.base.js.map +1 -1
  118. package/dist/esm/tree-item/tree-item.styles.css +157 -153
  119. package/dist/esm/tree-item/tree-item.template.html +8 -7
  120. package/dist/esm/utils/autofocus.d.ts +12 -0
  121. package/dist/esm/utils/autofocus.js +25 -0
  122. package/dist/esm/utils/autofocus.js.map +1 -0
  123. package/dist/web-components-all.js +26 -20
  124. package/dist/web-components-all.min.js +15 -15
  125. package/dist/web-components.d.ts +9 -16
  126. package/dist/web-components.js +26 -20
  127. package/dist/web-components.min.js +15 -15
  128. package/package.json +4 -5
@@ -1,358 +1,361 @@
1
-
2
- :host([hidden]){display:none}:host{display:inline-flex}
3
-
1
+ :host([hidden]) {
2
+ display: none;
3
+ }
4
+ :host {
5
+ display: inline-flex;
6
+ }
7
+
8
+ :host {
9
+ --icon-spacing: var(--spacingHorizontalSNudge);
10
+ position: relative;
11
+ contain: layout style;
12
+ vertical-align: middle;
13
+ align-items: center;
14
+ box-sizing: border-box;
15
+ justify-content: center;
16
+ text-align: center;
17
+ text-decoration-line: none;
18
+ margin: 0;
19
+ min-height: 32px;
20
+ outline-style: none;
21
+ background-color: var(--colorNeutralBackground1);
22
+ color: var(--colorNeutralForeground1);
23
+ border: var(--strokeWidthThin) solid var(--colorNeutralStroke1);
24
+ padding: 0 var(--spacingHorizontalM);
25
+ min-width: 96px;
26
+ border-radius: var(--borderRadiusMedium);
27
+ font-size: var(--fontSizeBase300);
28
+ font-family: var(--fontFamilyBase);
29
+ font-weight: var(--fontWeightSemibold);
30
+ line-height: var(--lineHeightBase300);
31
+ transition-duration: var(--durationFaster);
32
+ transition-property: background, border, color;
33
+ transition-timing-function: var(--curveEasyEase);
34
+ cursor: pointer;
35
+ user-select: none;
36
+ }
37
+
38
+ .content {
39
+ display: inherit;
40
+ }
41
+
42
+ :host(:hover) {
43
+ background-color: var(--colorNeutralBackground1Hover);
44
+ color: var(--colorNeutralForeground1Hover);
45
+ border-color: var(--colorNeutralStroke1Hover);
46
+ }
47
+
48
+ :host(:hover:active) {
49
+ background-color: var(--colorNeutralBackground1Pressed);
50
+ border-color: var(--colorNeutralStroke1Pressed);
51
+ color: var(--colorNeutralForeground1Pressed);
52
+ outline-style: none;
53
+ }
54
+
55
+ :host(:focus-visible) {
56
+ border-color: var(--colorTransparentStroke);
57
+ outline: var(--strokeWidthThick) solid var(--colorTransparentStroke);
58
+ box-shadow: var(--shadow4), 0 0 0 2px var(--colorStrokeFocus2);
59
+ }
60
+
61
+ @media screen and (prefers-reduced-motion: reduce) {
4
62
  :host {
5
- --icon-spacing: var(--spacingHorizontalSNudge);
6
- position: relative;
7
- contain: layout style;
8
- vertical-align: middle;
9
- align-items: center;
10
- box-sizing: border-box;
11
- justify-content: center;
12
- text-align: center;
13
- text-decoration-line: none;
14
- margin: 0;
15
- min-height: 32px;
16
- outline-style: none;
17
- background-color: var(--colorNeutralBackground1);
18
- color: var(--colorNeutralForeground1);
19
- border: var(--strokeWidthThin) solid var(--colorNeutralStroke1);
20
- padding: 0 var(--spacingHorizontalM);
21
- min-width: 96px;
22
- border-radius: var(--borderRadiusMedium);
23
- font-size: var(--fontSizeBase300);
24
- font-family: var(--fontFamilyBase);
25
- font-weight: var(--fontWeightSemibold);
26
- line-height: var(--lineHeightBase300);
27
- transition-duration: var(--durationFaster);
28
- transition-property: background, border, color;
29
- transition-timing-function: var(--curveEasyEase);
30
- cursor: pointer;
31
- user-select: none;
32
- }
33
-
34
- .content {
35
- display: inherit;
36
- }
37
-
38
- :host(:hover) {
39
- background-color: var(--colorNeutralBackground1Hover);
40
- color: var(--colorNeutralForeground1Hover);
41
- border-color: var(--colorNeutralStroke1Hover);
42
- }
43
-
44
- :host(:hover:active) {
45
- background-color: var(--colorNeutralBackground1Pressed);
46
- border-color: var(--colorNeutralStroke1Pressed);
47
- color: var(--colorNeutralForeground1Pressed);
48
- outline-style: none;
49
- }
50
-
51
- :host(:focus-visible) {
52
- border-color: var(--colorTransparentStroke);
53
- outline: var(--strokeWidthThick) solid var(--colorTransparentStroke);
54
- box-shadow: var(--shadow4), 0 0 0 2px var(--colorStrokeFocus2);
55
- }
56
-
57
- @media screen and (prefers-reduced-motion: reduce) {
58
- :host {
59
- transition-duration: 0.01ms;
60
- }
61
- }
62
-
63
- ::slotted(svg) {
64
- font-size: 20px;
65
- height: 20px;
66
- width: 20px;
67
- fill: currentColor;
68
- }
69
-
70
- ::slotted([slot='start']) {
71
- margin-inline-end: var(--icon-spacing);
72
- }
73
-
74
- ::slotted([slot='end']),
75
- [slot='end'] {
76
- flex-shrink: 0;
77
- margin-inline-start: var(--icon-spacing);
78
- }
79
-
80
- :host([icon-only]) {
81
- min-width: 32px;
82
- max-width: 32px;
83
- }
84
-
85
- :host([size='small']) {
86
- --icon-spacing: var(--spacingHorizontalXS);
87
- min-height: 24px;
88
- min-width: 64px;
89
- padding: 0 var(--spacingHorizontalS);
90
- border-radius: var(--borderRadiusSmall);
91
- font-size: var(--fontSizeBase200);
92
- line-height: var(--lineHeightBase200);
93
- font-weight: var(--fontWeightRegular);
94
- }
95
-
96
- :host([size='small'][icon-only]) {
97
- min-width: 24px;
98
- max-width: 24px;
99
- }
100
-
101
- :host([size='large']) {
102
- min-height: 40px;
103
- border-radius: var(--borderRadiusLarge);
104
- padding: 0 var(--spacingHorizontalL);
105
- font-size: var(--fontSizeBase400);
106
- line-height: var(--lineHeightBase400);
107
- }
108
-
109
- :host([size='large'][icon-only]) {
110
- min-width: 40px;
111
- max-width: 40px;
112
- }
113
-
114
- :host([size='large']) ::slotted(svg) {
115
- font-size: 24px;
116
- height: 24px;
117
- width: 24px;
118
- }
119
-
120
- :host(:is([shape='circular'], [shape='circular']:focus-visible)) {
121
- border-radius: var(--borderRadiusCircular);
122
- }
123
-
124
- :host(:is([shape='square'], [shape='square']:focus-visible)) {
125
- border-radius: var(--borderRadiusNone);
126
- }
127
-
128
- :host([appearance='primary']) {
129
- background-color: var(--colorBrandBackground);
130
- color: var(--colorNeutralForegroundOnBrand);
131
- border-color: transparent;
132
- }
133
-
134
- :host([appearance='primary']:hover) {
135
- background-color: var(--colorBrandBackgroundHover);
136
- }
137
-
138
- :host([appearance='primary']:is(:hover, :hover:active):not(:focus-visible)) {
139
- border-color: transparent;
140
- }
141
-
142
- :host([appearance='primary']:is(:hover, :hover:active)) {
143
- color: var(--colorNeutralForegroundOnBrand);
144
- }
145
-
146
- :host([appearance='primary']:hover:active) {
147
- background-color: var(--colorBrandBackgroundPressed);
148
- }
149
-
150
- :host([appearance='primary']:focus-visible) {
151
- border-color: var(--colorNeutralForegroundOnBrand);
152
- box-shadow: var(--shadow2), 0 0 0 2px var(--colorStrokeFocus2);
153
- }
154
-
155
- :host([appearance='outline']) {
156
- background-color: var(--colorTransparentBackground);
157
- }
158
-
159
- :host([appearance='outline']:hover) {
160
- background-color: var(--colorTransparentBackgroundHover);
161
- }
162
-
163
- :host([appearance='outline']:hover:active) {
164
- background-color: var(--colorTransparentBackgroundPressed);
165
- }
166
-
167
- :host([appearance='subtle']) {
168
- background-color: var(--colorSubtleBackground);
169
- color: var(--colorNeutralForeground2);
170
- border-color: transparent;
171
- }
172
-
173
- :host([appearance='subtle']:hover) {
174
- background-color: var(--colorSubtleBackgroundHover);
175
- color: var(--colorNeutralForeground2Hover);
176
- border-color: transparent;
177
- }
178
-
179
- :host([appearance='subtle']:hover:active) {
180
- background-color: var(--colorSubtleBackgroundPressed);
181
- color: var(--colorNeutralForeground2Pressed);
182
- border-color: transparent;
183
- }
184
-
185
- :host([appearance='subtle']:hover) ::slotted(svg) {
186
- fill: var(--colorNeutralForeground2BrandHover);
187
- }
188
-
189
- :host([appearance='subtle']:hover:active) ::slotted(svg) {
190
- fill: var(--colorNeutralForeground2BrandPressed);
191
- }
192
-
193
- :host([appearance='transparent']) {
194
- background-color: var(--colorTransparentBackground);
195
- color: var(--colorNeutralForeground2);
196
- }
197
-
198
- :host([appearance='transparent']:hover) {
199
- background-color: var(--colorTransparentBackgroundHover);
200
- color: var(--colorNeutralForeground2BrandHover);
201
- }
202
-
203
- :host([appearance='transparent']:hover:active) {
204
- background-color: var(--colorTransparentBackgroundPressed);
205
- color: var(--colorNeutralForeground2BrandPressed);
206
- }
207
-
208
- :host(:is([appearance='transparent'], [appearance='transparent']:is(:hover, :active))) {
209
- border-color: transparent;
210
- }
211
-
212
-
213
-
214
-
215
- :host(:is(:disabled, [disabled-focusable], [appearance]:disabled, [appearance][disabled-focusable])),
216
- :host(:is(:disabled, [disabled-focusable], [appearance]:disabled, [appearance][disabled-focusable]):hover),
217
- :host(:is(:disabled, [disabled-focusable], [appearance]:disabled, [appearance][disabled-focusable]):hover:active) {
218
- background-color: var(--colorNeutralBackgroundDisabled);
219
- border-color: var(--colorNeutralStrokeDisabled);
220
- color: var(--colorNeutralForegroundDisabled);
221
- cursor: not-allowed;
222
- }
223
-
224
- :host([appearance='primary']:is(:disabled, [disabled-focusable])),
225
- :host([appearance='primary']:is(:disabled, [disabled-focusable]):is(:hover, :hover:active)) {
226
- border-color: transparent;
227
- }
228
-
229
- :host([appearance='outline']:is(:disabled, [disabled-focusable])),
230
- :host([appearance='outline']:is(:disabled, [disabled-focusable]):is(:hover, :hover:active)) {
231
- background-color: var(--colorTransparentBackground);
232
- }
233
-
234
- :host([appearance='subtle']:is(:disabled, [disabled-focusable])),
235
- :host([appearance='subtle']:is(:disabled, [disabled-focusable]):is(:hover, :hover:active)) {
236
- background-color: var(--colorTransparentBackground);
237
- border-color: transparent;
238
- }
239
-
240
- :host([appearance='transparent']:is(:disabled, [disabled-focusable])),
241
- :host([appearance='transparent']:is(:disabled, [disabled-focusable]):is(:hover, :hover:active)) {
242
- border-color: transparent;
243
- background-color: var(--colorTransparentBackground);
244
- }
245
-
246
- @media (forced-colors: active) {
247
- :host {
248
- background-color: ButtonFace;
249
- color: ButtonText;
250
- }
251
-
252
- :host(:is(:hover, :focus-visible)) {
253
- border-color: Highlight !important;
254
- }
255
-
256
- :host([appearance='primary']:not(:is(:hover, :focus-visible))) {
257
- background-color: Highlight;
258
- color: HighlightText;
259
- forced-color-adjust: none;
260
- }
261
-
262
- :host(:is(:disabled, [disabled-focusable], [appearance]:disabled, [appearance][disabled-focusable])) {
263
- background-color: ButtonFace;
264
- color: GrayText;
265
- border-color: ButtonText;
266
- }
267
- }
268
-
269
-
270
-
271
-
272
- :host(:state(pressed)) {
273
- border-color: var(--colorNeutralStroke1);
274
- background-color: var(--colorNeutralBackground1Selected);
275
- color: var(--colorNeutralForeground1);
276
- border-width: var(--strokeWidthThin);
277
- }
278
-
279
- :host(:state(pressed):hover) {
280
- border-color: var(--colorNeutralStroke1Hover);
281
- background-color: var(--colorNeutralBackground1Hover);
282
- }
283
-
284
- :host(:state(pressed):active) {
285
- border-color: var(--colorNeutralStroke1Pressed);
286
- background-color: var(--colorNeutralBackground1Pressed);
287
- }
288
-
289
- :host(:state(pressed)[appearance='primary']:not(:focus-visible)) {
290
- border-color: transparent;
291
- }
292
-
293
- :host(:state(pressed)[appearance='primary']) {
294
- background-color: var(--colorBrandBackgroundSelected);
295
- color: var(--colorNeutralForegroundOnBrand);
296
- }
297
-
298
- :host(:state(pressed)[appearance='primary']:hover) {
299
- background-color: var(--colorBrandBackgroundHover);
300
- }
301
-
302
- :host(:state(pressed)[appearance='primary']:active) {
303
- background-color: var(--colorBrandBackgroundPressed);
304
- }
305
-
306
- :host(:state(pressed)[appearance='subtle']) {
307
- border-color: transparent;
308
- background-color: var(--colorSubtleBackgroundSelected);
309
- color: var(--colorNeutralForeground2Selected);
310
- }
311
-
312
- :host(:state(pressed)[appearance='subtle']:hover) {
313
- background-color: var(--colorSubtleBackgroundHover);
314
- color: var(--colorNeutralForeground2Hover);
315
- }
316
-
317
- :host(:state(pressed)[appearance='subtle']:active) {
318
- background-color: var(--colorSubtleBackgroundPressed);
319
- color: var(--colorNeutralForeground2Pressed);
320
- }
321
-
322
- :host(:state(pressed)[appearance='outline']),
323
- :host(:state(pressed)[appearance='transparent']) {
324
- background-color: var(--colorTransparentBackgroundSelected);
325
- }
326
-
327
- :host(:state(pressed)[appearance='outline']:hover),
328
- :host(:state(pressed)[appearance='transparent']:hover) {
329
- background-color: var(--colorTransparentBackgroundHover);
330
- }
331
-
332
- :host(:state(pressed)[appearance='outline']:active),
333
- :host(:state(pressed)[appearance='transparent']:active) {
334
- background-color: var(--colorTransparentBackgroundPressed);
335
- }
336
-
337
- :host(:state(pressed)[appearance='transparent']) {
338
- border-color: transparent;
339
- color: var(--colorNeutralForeground2BrandSelected);
340
- }
341
-
342
- :host(:state(pressed)[appearance='transparent']:hover) {
343
- color: var(--colorNeutralForeground2BrandHover);
344
- }
345
-
346
- :host(:state(pressed)[appearance='transparent']:active) {
347
- color: var(--colorNeutralForeground2BrandPressed);
348
- }
349
-
350
- @media (forced-colors: active) {
351
- :host(:state(pressed)),
352
- :host(
353
- :state(pressed):is([appearance='primary'], [appearance='subtle'], [appearance='outline'], [appearance='transparent'])
354
- ) {
355
- background: SelectedItem;
356
- color: SelectedItemText;
357
- }
358
- }
63
+ transition-duration: 0.01ms;
64
+ }
65
+ }
66
+
67
+ ::slotted(svg) {
68
+ font-size: 20px;
69
+ height: 20px;
70
+ width: 20px;
71
+ fill: currentColor;
72
+ }
73
+
74
+ ::slotted([slot='start']) {
75
+ margin-inline-end: var(--icon-spacing);
76
+ }
77
+
78
+ ::slotted([slot='end']),
79
+ [slot='end'] {
80
+ flex-shrink: 0;
81
+ margin-inline-start: var(--icon-spacing);
82
+ }
83
+
84
+ :host([icon-only]) {
85
+ min-width: 32px;
86
+ max-width: 32px;
87
+ }
88
+
89
+ :host([size='small']) {
90
+ --icon-spacing: var(--spacingHorizontalXS);
91
+ min-height: 24px;
92
+ min-width: 64px;
93
+ padding: 0 var(--spacingHorizontalS);
94
+ border-radius: var(--borderRadiusSmall);
95
+ font-size: var(--fontSizeBase200);
96
+ line-height: var(--lineHeightBase200);
97
+ font-weight: var(--fontWeightRegular);
98
+ }
99
+
100
+ :host([size='small'][icon-only]) {
101
+ min-width: 24px;
102
+ max-width: 24px;
103
+ }
104
+
105
+ :host([size='large']) {
106
+ min-height: 40px;
107
+ border-radius: var(--borderRadiusLarge);
108
+ padding: 0 var(--spacingHorizontalL);
109
+ font-size: var(--fontSizeBase400);
110
+ line-height: var(--lineHeightBase400);
111
+ }
112
+
113
+ :host([size='large'][icon-only]) {
114
+ min-width: 40px;
115
+ max-width: 40px;
116
+ }
117
+
118
+ :host([size='large']) ::slotted(svg) {
119
+ font-size: 24px;
120
+ height: 24px;
121
+ width: 24px;
122
+ }
123
+
124
+ :host(:is([shape='circular'], [shape='circular']:focus-visible)) {
125
+ border-radius: var(--borderRadiusCircular);
126
+ }
127
+
128
+ :host(:is([shape='square'], [shape='square']:focus-visible)) {
129
+ border-radius: var(--borderRadiusNone);
130
+ }
131
+
132
+ :host([appearance='primary']) {
133
+ background-color: var(--colorBrandBackground);
134
+ color: var(--colorNeutralForegroundOnBrand);
135
+ border-color: transparent;
136
+ }
137
+
138
+ :host([appearance='primary']:hover) {
139
+ background-color: var(--colorBrandBackgroundHover);
140
+ }
141
+
142
+ :host([appearance='primary']:is(:hover, :hover:active):not(:focus-visible)) {
143
+ border-color: transparent;
144
+ }
145
+
146
+ :host([appearance='primary']:is(:hover, :hover:active)) {
147
+ color: var(--colorNeutralForegroundOnBrand);
148
+ }
149
+
150
+ :host([appearance='primary']:hover:active) {
151
+ background-color: var(--colorBrandBackgroundPressed);
152
+ }
153
+
154
+ :host([appearance='primary']:focus-visible) {
155
+ border-color: var(--colorNeutralForegroundOnBrand);
156
+ box-shadow: var(--shadow2), 0 0 0 2px var(--colorStrokeFocus2);
157
+ }
158
+
159
+ :host([appearance='outline']) {
160
+ background-color: var(--colorTransparentBackground);
161
+ }
162
+
163
+ :host([appearance='outline']:hover) {
164
+ background-color: var(--colorTransparentBackgroundHover);
165
+ }
166
+
167
+ :host([appearance='outline']:hover:active) {
168
+ background-color: var(--colorTransparentBackgroundPressed);
169
+ }
170
+
171
+ :host([appearance='subtle']) {
172
+ background-color: var(--colorSubtleBackground);
173
+ color: var(--colorNeutralForeground2);
174
+ border-color: transparent;
175
+ }
176
+
177
+ :host([appearance='subtle']:hover) {
178
+ background-color: var(--colorSubtleBackgroundHover);
179
+ color: var(--colorNeutralForeground2Hover);
180
+ border-color: transparent;
181
+ }
182
+
183
+ :host([appearance='subtle']:hover:active) {
184
+ background-color: var(--colorSubtleBackgroundPressed);
185
+ color: var(--colorNeutralForeground2Pressed);
186
+ border-color: transparent;
187
+ }
188
+
189
+ :host([appearance='subtle']:hover) ::slotted(svg) {
190
+ fill: var(--colorNeutralForeground2BrandHover);
191
+ }
192
+
193
+ :host([appearance='subtle']:hover:active) ::slotted(svg) {
194
+ fill: var(--colorNeutralForeground2BrandPressed);
195
+ }
196
+
197
+ :host([appearance='transparent']) {
198
+ background-color: var(--colorTransparentBackground);
199
+ color: var(--colorNeutralForeground2);
200
+ }
201
+
202
+ :host([appearance='transparent']:hover) {
203
+ background-color: var(--colorTransparentBackgroundHover);
204
+ color: var(--colorNeutralForeground2BrandHover);
205
+ }
206
+
207
+ :host([appearance='transparent']:hover:active) {
208
+ background-color: var(--colorTransparentBackgroundPressed);
209
+ color: var(--colorNeutralForeground2BrandPressed);
210
+ }
211
+
212
+ :host(:is([appearance='transparent'], [appearance='transparent']:is(:hover, :active))) {
213
+ border-color: transparent;
214
+ }
215
+
216
+ :host(:is(:disabled, [disabled-focusable], [appearance]:disabled, [appearance][disabled-focusable])),
217
+ :host(:is(:disabled, [disabled-focusable], [appearance]:disabled, [appearance][disabled-focusable]):hover),
218
+ :host(:is(:disabled, [disabled-focusable], [appearance]:disabled, [appearance][disabled-focusable]):hover:active) {
219
+ background-color: var(--colorNeutralBackgroundDisabled);
220
+ border-color: var(--colorNeutralStrokeDisabled);
221
+ color: var(--colorNeutralForegroundDisabled);
222
+ cursor: not-allowed;
223
+ }
224
+
225
+ :host([appearance='primary']:is(:disabled, [disabled-focusable])),
226
+ :host([appearance='primary']:is(:disabled, [disabled-focusable]):is(:hover, :hover:active)) {
227
+ border-color: transparent;
228
+ }
229
+
230
+ :host([appearance='outline']:is(:disabled, [disabled-focusable])),
231
+ :host([appearance='outline']:is(:disabled, [disabled-focusable]):is(:hover, :hover:active)) {
232
+ background-color: var(--colorTransparentBackground);
233
+ }
234
+
235
+ :host([appearance='subtle']:is(:disabled, [disabled-focusable])),
236
+ :host([appearance='subtle']:is(:disabled, [disabled-focusable]):is(:hover, :hover:active)) {
237
+ background-color: var(--colorTransparentBackground);
238
+ border-color: transparent;
239
+ }
240
+
241
+ :host([appearance='transparent']:is(:disabled, [disabled-focusable])),
242
+ :host([appearance='transparent']:is(:disabled, [disabled-focusable]):is(:hover, :hover:active)) {
243
+ border-color: transparent;
244
+ background-color: var(--colorTransparentBackground);
245
+ }
246
+
247
+ @media (forced-colors: active) {
248
+ :host {
249
+ background-color: ButtonFace;
250
+ color: ButtonText;
251
+ }
252
+
253
+ :host(:is(:hover, :focus-visible)) {
254
+ border-color: Highlight !important;
255
+ }
256
+
257
+ :host([appearance='primary']:not(:is(:hover, :focus-visible))) {
258
+ background-color: Highlight;
259
+ color: HighlightText;
260
+ forced-color-adjust: none;
261
+ }
262
+
263
+ :host(:is(:disabled, [disabled-focusable], [appearance]:disabled, [appearance][disabled-focusable])) {
264
+ background-color: ButtonFace;
265
+ color: GrayText;
266
+ border-color: ButtonText;
267
+ }
268
+ }
269
+
270
+ :host(:state(pressed)) {
271
+ border-color: var(--colorNeutralStroke1);
272
+ background-color: var(--colorNeutralBackground1Selected);
273
+ color: var(--colorNeutralForeground1);
274
+ border-width: var(--strokeWidthThin);
275
+ }
276
+
277
+ :host(:state(pressed):hover) {
278
+ border-color: var(--colorNeutralStroke1Hover);
279
+ background-color: var(--colorNeutralBackground1Hover);
280
+ }
281
+
282
+ :host(:state(pressed):active) {
283
+ border-color: var(--colorNeutralStroke1Pressed);
284
+ background-color: var(--colorNeutralBackground1Pressed);
285
+ }
286
+
287
+ :host(:state(pressed)[appearance='primary']:not(:focus-visible)) {
288
+ border-color: transparent;
289
+ }
290
+
291
+ :host(:state(pressed)[appearance='primary']) {
292
+ background-color: var(--colorBrandBackgroundSelected);
293
+ color: var(--colorNeutralForegroundOnBrand);
294
+ }
295
+
296
+ :host(:state(pressed)[appearance='primary']:hover) {
297
+ background-color: var(--colorBrandBackgroundHover);
298
+ }
299
+
300
+ :host(:state(pressed)[appearance='primary']:active) {
301
+ background-color: var(--colorBrandBackgroundPressed);
302
+ }
303
+
304
+ :host(:state(pressed)[appearance='subtle']) {
305
+ border-color: transparent;
306
+ background-color: var(--colorSubtleBackgroundSelected);
307
+ color: var(--colorNeutralForeground2Selected);
308
+ }
309
+
310
+ :host(:state(pressed)[appearance='subtle']:hover) {
311
+ background-color: var(--colorSubtleBackgroundHover);
312
+ color: var(--colorNeutralForeground2Hover);
313
+ }
314
+
315
+ :host(:state(pressed)[appearance='subtle']:active) {
316
+ background-color: var(--colorSubtleBackgroundPressed);
317
+ color: var(--colorNeutralForeground2Pressed);
318
+ }
319
+
320
+ :host(:state(pressed)[appearance='outline']),
321
+ :host(:state(pressed)[appearance='transparent']) {
322
+ background-color: var(--colorTransparentBackgroundSelected);
323
+ }
324
+
325
+ :host(:state(pressed)[appearance='outline']:hover),
326
+ :host(:state(pressed)[appearance='transparent']:hover) {
327
+ background-color: var(--colorTransparentBackgroundHover);
328
+ }
329
+
330
+ :host(:state(pressed)[appearance='outline']:active),
331
+ :host(:state(pressed)[appearance='transparent']:active) {
332
+ background-color: var(--colorTransparentBackgroundPressed);
333
+ }
334
+
335
+ :host(:state(pressed)[appearance='transparent']) {
336
+ border-color: transparent;
337
+ color: var(--colorNeutralForeground2BrandSelected);
338
+ }
339
+
340
+ :host(:state(pressed)[appearance='transparent']:hover) {
341
+ color: var(--colorNeutralForeground2BrandHover);
342
+ }
343
+
344
+ :host(:state(pressed)[appearance='transparent']:active) {
345
+ color: var(--colorNeutralForeground2BrandPressed);
346
+ }
347
+
348
+ @media (forced-colors: active) {
349
+ :host(:state(pressed)),
350
+ :host(
351
+ :state(pressed):is(
352
+ [appearance='primary'],
353
+ [appearance='subtle'],
354
+ [appearance='outline'],
355
+ [appearance='transparent']
356
+ )
357
+ ) {
358
+ background: SelectedItem;
359
+ color: SelectedItemText;
360
+ }
361
+ }