@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,5 +1,7 @@
1
1
  <f-template name="fluent-accordion-item" shadowrootmode="open">
2
- <template>{{styles}}<div class="heading" part="heading" role="heading" aria-level="{{headinglevel}}">
2
+ <template>
3
+ {{styles}}
4
+ <div class="heading" part="heading" role="heading" aria-level="{{headinglevel}}">
3
5
  <button
4
6
  class="button"
5
7
  part="button"
@@ -11,37 +13,42 @@
11
13
  >
12
14
  <slot name="heading"></slot>
13
15
  </button>
14
- <slot name="start" f-ref="{start}"></slot>
15
- <slot name="marker-expanded"> <svg
16
- width="20"
17
- height="20"
18
- viewBox="0 0 20 20"
19
- fill="none"
20
- xmlns="http://www.w3.org/2000/svg"
21
- class="default-marker-expanded"
22
- aria-hidden="true"
23
- >
24
- <path
25
- d="M15.794 7.73271C16.0797 8.03263 16.0681 8.50737 15.7682 8.79306L10.5178 13.7944C10.2281 14.0703 9.77285 14.0703 9.48318 13.7944L4.23271 8.79306C3.93279 8.50737 3.92125 8.03263 4.20694 7.73271C4.49264 7.43279 4.96737 7.42125 5.26729 7.70694L10.0005 12.2155L14.7336 7.70694C15.0336 7.42125 15.5083 7.43279 15.794 7.73271Z"
26
- fill="currentColor"
27
- />
28
- </svg> </slot>
29
- <slot name="marker-collapsed"> <svg
30
- width="20"
31
- height="20"
32
- viewBox="0 0 20 20"
33
- fill="none"
34
- xmlns="http://www.w3.org/2000/svg"
35
- class="default-marker-collapsed"
36
- aria-hidden="true"
37
- >
38
- <path
39
- d="M7.73271 4.20694C8.03263 3.92125 8.50737 3.93279 8.79306 4.23271L13.7944 9.48318C14.0703 9.77285 14.0703 10.2281 13.7944 10.5178L8.79306 15.7682C8.50737 16.0681 8.03263 16.0797 7.73271 15.794C7.43279 15.5083 7.42125 15.0336 7.70694 14.7336L12.2155 10.0005L7.70694 5.26729C7.42125 4.96737 7.43279 4.49264 7.73271 4.20694Z"
40
- fill="currentColor"
41
- />
42
- </svg> </slot>
16
+ <slot name="start" f-ref="{start}"></slot>
17
+ <slot name="marker-expanded">
18
+ <svg
19
+ width="20"
20
+ height="20"
21
+ viewBox="0 0 20 20"
22
+ fill="none"
23
+ xmlns="http://www.w3.org/2000/svg"
24
+ class="default-marker-expanded"
25
+ aria-hidden="true"
26
+ >
27
+ <path
28
+ d="M15.794 7.73271C16.0797 8.03263 16.0681 8.50737 15.7682 8.79306L10.5178 13.7944C10.2281 14.0703 9.77285 14.0703 9.48318 13.7944L4.23271 8.79306C3.93279 8.50737 3.92125 8.03263 4.20694 7.73271C4.49264 7.43279 4.96737 7.42125 5.26729 7.70694L10.0005 12.2155L14.7336 7.70694C15.0336 7.42125 15.5083 7.43279 15.794 7.73271Z"
29
+ fill="currentColor"
30
+ />
31
+ </svg>
32
+ </slot>
33
+ <slot name="marker-collapsed">
34
+ <svg
35
+ width="20"
36
+ height="20"
37
+ viewBox="0 0 20 20"
38
+ fill="none"
39
+ xmlns="http://www.w3.org/2000/svg"
40
+ class="default-marker-collapsed"
41
+ aria-hidden="true"
42
+ >
43
+ <path
44
+ d="M7.73271 4.20694C8.03263 3.92125 8.50737 3.93279 8.79306 4.23271L13.7944 9.48318C14.0703 9.77285 14.0703 10.2281 13.7944 10.5178L8.79306 15.7682C8.50737 16.0681 8.03263 16.0797 7.73271 15.794C7.43279 15.5083 7.42125 15.0336 7.70694 14.7336L12.2155 10.0005L7.70694 5.26729C7.42125 4.96737 7.43279 4.49264 7.73271 4.20694Z"
45
+ fill="currentColor"
46
+ />
47
+ </svg>
48
+ </slot>
43
49
  </div>
44
50
  <div class="content" part="content" id="panel" role="region" aria-labelledby="control">
45
51
  <slot></slot>
46
- </div></template>
52
+ </div>
53
+ </template>
47
54
  </f-template>
@@ -1,225 +1,226 @@
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
- ::slotted(a) {
216
- position: absolute;
217
- inset: 0;
218
- }
219
-
220
- @media (forced-colors: active) {
221
- :host {
222
- border-color: LinkText;
223
- color: LinkText;
224
- }
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
+ ::slotted(a) {
217
+ position: absolute;
218
+ inset: 0;
219
+ }
220
+
221
+ @media (forced-colors: active) {
222
+ :host {
223
+ border-color: LinkText;
224
+ color: LinkText;
225
225
  }
226
+ }
@@ -1,13 +1,10 @@
1
1
  <f-template name="fluent-anchor-button" shadowrootmode="open">
2
- <template
3
- tabindex="0"
4
- @click="{clickHandler($e)}"
5
- @keydown="{keydownHandler($e)}"
6
- >{{styles}}
7
- <slot name="start" f-ref="{start}"></slot>
8
- <span class="content" part="content">
9
- <slot></slot>
10
- </span>
11
- <slot name="end" f-ref="{end}"></slot>
12
- </template>
2
+ <template tabindex="0" @click="{clickHandler($e)}" @keydown="{keydownHandler($e)}">
3
+ {{styles}}
4
+ <slot name="start" f-ref="{start}"></slot>
5
+ <span class="content" part="content">
6
+ <slot></slot>
7
+ </span>
8
+ <slot name="end" f-ref="{end}"></slot>
9
+ </template>
13
10
  </f-template>