@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,21 +1,28 @@
1
1
  <f-template name="fluent-dropdown" shadowrootmode="open">
2
- <template
3
- @click="{clickHandler($e)}"
4
- @focusout="{focusoutHandler($e)}"
5
- @keydown="{keydownHandler($e)}"
6
- @mousedown="{mousedownHandler($e)}"
7
- >{{styles}}
8
- <div class="control">
9
- <slot name="control" f-ref="{controlSlot}"></slot>
10
- <slot name="indicator" f-ref="{indicatorSlot}">
11
- <svg class="chevron-down-20-regular" aria-hidden="true" slot="indicator" viewBox="0 0 20 20" f-ref="{indicator}">
12
- <path
13
- d="M15.85 7.65a.5.5 0 0 1 0 .7l-5.46 5.49a.55.55 0 0 1-.78 0L4.15 8.35a.5.5 0 1 1 .7-.7L10 12.8l5.15-5.16a.5.5 0 0 1 .7 0"
14
- fill="currentColor"
15
- />
16
- </svg>
17
- </slot>
18
- </div>
19
- <slot @slotchange="{slotchangeHandler($e)}"></slot>
20
- </template>
2
+ <template
3
+ @click="{clickHandler($e)}"
4
+ @focusout="{focusoutHandler($e)}"
5
+ @keydown="{keydownHandler($e)}"
6
+ @mousedown="{mousedownHandler($e)}"
7
+ >
8
+ {{styles}}
9
+ <div class="control">
10
+ <slot name="control" f-ref="{controlSlot}"></slot>
11
+ <slot name="indicator" f-ref="{indicatorSlot}">
12
+ <svg
13
+ class="chevron-down-20-regular"
14
+ aria-hidden="true"
15
+ slot="indicator"
16
+ viewBox="0 0 20 20"
17
+ f-ref="{indicator}"
18
+ >
19
+ <path
20
+ d="M15.85 7.65a.5.5 0 0 1 0 .7l-5.46 5.49a.55.55 0 0 1-.78 0L4.15 8.35a.5.5 0 1 1 .7-.7L10 12.8l5.15-5.16a.5.5 0 0 1 .7 0"
21
+ fill="currentColor"
22
+ />
23
+ </svg>
24
+ </slot>
25
+ </div>
26
+ <slot @slotchange="{slotchangeHandler($e)}"></slot>
27
+ </template>
21
28
  </f-template>
@@ -1,121 +1,125 @@
1
-
2
- :host([hidden]){display:none}:host{display:inline-grid}
3
-
4
- :host {
5
- color: var(--colorNeutralForeground1);
6
- align-items: center;
7
- gap: 0 var(--spacingHorizontalM);
8
- justify-items: start;
9
- }
10
-
11
- :has([slot='message']) {
12
- color: var(--colorNeutralForeground1);
13
- row-gap: var(--spacingVerticalS);
14
- }
15
-
16
- :not(::slotted([slot='label'])) {
17
- gap: 0;
18
- }
19
-
20
- :host([label-position='before']) {
21
- grid-template-areas: 'label input' 'label message';
22
- }
23
-
24
- :host([label-position='after']) {
25
- gap: 0;
26
- grid-template-areas: 'input label' 'message message';
27
- grid-template-columns: auto 1fr;
28
- }
29
-
30
- :host([label-position='after']) ::slotted([slot='input']) {
31
- margin-inline-end: var(--spacingHorizontalM);
32
- }
33
-
34
- :host([label-position='above']) {
35
- grid-template-areas: 'label' 'input' 'message';
36
- row-gap: var(--spacingVerticalXXS);
37
- }
38
-
39
- :host([label-position='below']) {
40
- grid-template-areas: 'input' 'label' 'message';
41
- justify-items: center;
42
- }
43
-
44
- :host([label-position='below']) ::slotted([slot='label']) {
45
- margin-block-start: var(--spacingVerticalM);
46
- }
47
-
48
- :host(:state(required)) ::slotted([slot='label'])::after {
49
- content: '*' / '';
50
- color: var(--colorPaletteRedForeground1);
51
- margin-inline-start: var(--spacingHorizontalXS);
52
- }
53
-
54
- ::slotted([slot='input']) {
55
- grid-area: input;
56
- }
57
-
58
- ::slotted([slot='message']) {
59
- color: var(--colorNeutralForeground3);
60
- font-family: var(--fontFamilyBase);
61
- font-size: var(--fontSizeBase200);
62
- font-weight: var(--fontWeightRegular);
63
- grid-area: message;
64
- line-height: var(--lineHeightBase200);
65
- margin-block-start: var(--spacingVerticalXXS);
66
- }
67
-
68
- :host(:state(focus-visible):focus-within) {
69
- border-radius: var(--borderRadiusMedium);
70
- outline: var(--strokeWidthThick) solid var(--colorStrokeFocus2);
71
- }
72
-
73
- ::slotted(label),
74
- ::slotted([slot='label']) {
75
- cursor: inherit;
76
- display: inline-flex;
77
- font-family: var(--fontFamilyBase);
78
- font-size: var(--fontSizeBase300);
79
- font-weight: var(--fontWeightRegular);
80
- grid-area: label;
81
- line-height: var(--lineHeightBase300);
82
- justify-self: stretch;
83
- user-select: none;
84
- }
85
-
86
- :host([size='small']) ::slotted(label) {
87
- font-size: var(--fontSizeBase200);
88
- line-height: var(--lineHeightBase200);
89
- }
90
-
91
- :host([size='large']) ::slotted(label) {
92
- font-size: var(--fontSizeBase400);
93
- line-height: var(--lineHeightBase400);
94
- }
95
-
96
- :host([size='large']) ::slotted(label),
97
- :host([weight='semibold']) ::slotted(label) {
98
- font-weight: var(--fontWeightSemibold);
99
- }
100
-
101
- :host(:state(disabled)) {
102
- cursor: default;
103
- }
104
-
105
- ::slotted([flag]) {
106
- display: none;
107
- }
108
-
109
- :host(:state(bad-input)) ::slotted([flag='bad-input']),
110
- :host(:state(custom-error)) ::slotted([flag='custom-error']),
111
- :host(:state(pattern-mismatch)) ::slotted([flag='pattern-mismatch']),
112
- :host(:state(range-overflow)) ::slotted([flag='range-overflow']),
113
- :host(:state(range-underflow)) ::slotted([flag='range-underflow']),
114
- :host(:state(step-mismatch)) ::slotted([flag='step-mismatch']),
115
- :host(:state(too-long)) ::slotted([flag='too-long']),
116
- :host(:state(too-short)) ::slotted([flag='too-short']),
117
- :host(:state(type-mismatch)) ::slotted([flag='type-mismatch']),
118
- :host(:state(value-missing)) ::slotted([flag='value-missing']),
119
- :host(:state(valid)) ::slotted([flag='valid']) {
120
- display: block;
121
- }
1
+ :host([hidden]) {
2
+ display: none;
3
+ }
4
+ :host {
5
+ display: inline-grid;
6
+ }
7
+
8
+ :host {
9
+ color: var(--colorNeutralForeground1);
10
+ align-items: center;
11
+ gap: 0 var(--spacingHorizontalM);
12
+ justify-items: start;
13
+ }
14
+
15
+ :has([slot='message']) {
16
+ color: var(--colorNeutralForeground1);
17
+ row-gap: var(--spacingVerticalS);
18
+ }
19
+
20
+ :not(::slotted([slot='label'])) {
21
+ gap: 0;
22
+ }
23
+
24
+ :host([label-position='before']) {
25
+ grid-template-areas: 'label input' 'label message';
26
+ }
27
+
28
+ :host([label-position='after']) {
29
+ gap: 0;
30
+ grid-template-areas: 'input label' 'message message';
31
+ grid-template-columns: auto 1fr;
32
+ }
33
+
34
+ :host([label-position='after']) ::slotted([slot='input']) {
35
+ margin-inline-end: var(--spacingHorizontalM);
36
+ }
37
+
38
+ :host([label-position='above']) {
39
+ grid-template-areas: 'label' 'input' 'message';
40
+ row-gap: var(--spacingVerticalXXS);
41
+ }
42
+
43
+ :host([label-position='below']) {
44
+ grid-template-areas: 'input' 'label' 'message';
45
+ justify-items: center;
46
+ }
47
+
48
+ :host([label-position='below']) ::slotted([slot='label']) {
49
+ margin-block-start: var(--spacingVerticalM);
50
+ }
51
+
52
+ :host(:state(required)) ::slotted([slot='label'])::after {
53
+ content: '*' / '';
54
+ color: var(--colorPaletteRedForeground1);
55
+ margin-inline-start: var(--spacingHorizontalXS);
56
+ }
57
+
58
+ ::slotted([slot='input']) {
59
+ grid-area: input;
60
+ }
61
+
62
+ ::slotted([slot='message']) {
63
+ color: var(--colorNeutralForeground3);
64
+ font-family: var(--fontFamilyBase);
65
+ font-size: var(--fontSizeBase200);
66
+ font-weight: var(--fontWeightRegular);
67
+ grid-area: message;
68
+ line-height: var(--lineHeightBase200);
69
+ margin-block-start: var(--spacingVerticalXXS);
70
+ }
71
+
72
+ :host(:state(focus-visible):focus-within) {
73
+ border-radius: var(--borderRadiusMedium);
74
+ outline: var(--strokeWidthThick) solid var(--colorStrokeFocus2);
75
+ }
76
+
77
+ ::slotted(label),
78
+ ::slotted([slot='label']) {
79
+ cursor: inherit;
80
+ display: inline-flex;
81
+ font-family: var(--fontFamilyBase);
82
+ font-size: var(--fontSizeBase300);
83
+ font-weight: var(--fontWeightRegular);
84
+ grid-area: label;
85
+ line-height: var(--lineHeightBase300);
86
+ justify-self: stretch;
87
+ user-select: none;
88
+ }
89
+
90
+ :host([size='small']) ::slotted(label) {
91
+ font-size: var(--fontSizeBase200);
92
+ line-height: var(--lineHeightBase200);
93
+ }
94
+
95
+ :host([size='large']) ::slotted(label) {
96
+ font-size: var(--fontSizeBase400);
97
+ line-height: var(--lineHeightBase400);
98
+ }
99
+
100
+ :host([size='large']) ::slotted(label),
101
+ :host([weight='semibold']) ::slotted(label) {
102
+ font-weight: var(--fontWeightSemibold);
103
+ }
104
+
105
+ :host(:state(disabled)) {
106
+ cursor: default;
107
+ }
108
+
109
+ ::slotted([flag]) {
110
+ display: none;
111
+ }
112
+
113
+ :host(:state(bad-input)) ::slotted([flag='bad-input']),
114
+ :host(:state(custom-error)) ::slotted([flag='custom-error']),
115
+ :host(:state(pattern-mismatch)) ::slotted([flag='pattern-mismatch']),
116
+ :host(:state(range-overflow)) ::slotted([flag='range-overflow']),
117
+ :host(:state(range-underflow)) ::slotted([flag='range-underflow']),
118
+ :host(:state(step-mismatch)) ::slotted([flag='step-mismatch']),
119
+ :host(:state(too-long)) ::slotted([flag='too-long']),
120
+ :host(:state(too-short)) ::slotted([flag='too-short']),
121
+ :host(:state(type-mismatch)) ::slotted([flag='type-mismatch']),
122
+ :host(:state(value-missing)) ::slotted([flag='value-missing']),
123
+ :host(:state(valid)) ::slotted([flag='valid']) {
124
+ display: block;
125
+ }
@@ -1,10 +1,11 @@
1
1
  <f-template name="fluent-field" shadowrootmode="open" shadowrootdelegatesfocus>
2
- <template
2
+ <template
3
3
  @click="{clickHandler($e)}"
4
4
  @change="{changeHandler($e)}"
5
5
  @focusin="{focusinHandler($e)}"
6
6
  @focusout="{focusoutHandler($e)}"
7
- >{{styles}}
7
+ >
8
+ {{styles}}
8
9
  <slot name="label" part="label" f-slotted="{labelSlot}"></slot>
9
10
  <slot name="input" part="input" f-slotted="{slottedInputs}"></slot>
10
11
  <slot name="message" part="message" f-slotted="{messageSlot filter elements([flag])}"></slot>
@@ -1,51 +1,50 @@
1
+ :host {
2
+ contain: content;
3
+ }
1
4
 
2
- :host {
3
- contain: content;
4
- }
5
-
6
- :host ::slotted(img) {
7
- box-sizing: border-box;
8
- min-height: 8px;
9
- min-width: 8px;
10
- display: inline-block;
11
- }
12
- :host([block]) ::slotted(img) {
13
- width: 100%;
14
- height: auto;
15
- }
16
- :host([bordered]) ::slotted(img) {
17
- border: var(--strokeWidthThin) solid var(--colorNeutralStroke2);
18
- }
19
- :host([fit='none']) ::slotted(img) {
20
- object-fit: none;
21
- object-position: top left;
22
- height: 100%;
23
- width: 100%;
24
- }
25
- :host([fit='center']) ::slotted(img) {
26
- object-fit: none;
27
- object-position: center;
28
- height: 100%;
29
- width: 100%;
30
- }
31
- :host([fit='contain']) ::slotted(img) {
32
- object-fit: contain;
33
- object-position: center;
34
- height: 100%;
35
- width: 100%;
36
- }
37
- :host([fit='cover']) ::slotted(img) {
38
- object-fit: cover;
39
- object-position: center;
40
- height: 100%;
41
- width: 100%;
42
- }
43
- :host([shadow]) ::slotted(img) {
44
- box-shadow: var(--shadow4);
45
- }
46
- :host([shape='circular']) ::slotted(img) {
47
- border-radius: var(--borderRadiusCircular);
48
- }
49
- :host([shape='rounded']) ::slotted(img) {
50
- border-radius: var(--borderRadiusMedium);
51
- }
5
+ :host ::slotted(img) {
6
+ box-sizing: border-box;
7
+ min-height: 8px;
8
+ min-width: 8px;
9
+ display: inline-block;
10
+ }
11
+ :host([block]) ::slotted(img) {
12
+ width: 100%;
13
+ height: auto;
14
+ }
15
+ :host([bordered]) ::slotted(img) {
16
+ border: var(--strokeWidthThin) solid var(--colorNeutralStroke2);
17
+ }
18
+ :host([fit='none']) ::slotted(img) {
19
+ object-fit: none;
20
+ object-position: top left;
21
+ height: 100%;
22
+ width: 100%;
23
+ }
24
+ :host([fit='center']) ::slotted(img) {
25
+ object-fit: none;
26
+ object-position: center;
27
+ height: 100%;
28
+ width: 100%;
29
+ }
30
+ :host([fit='contain']) ::slotted(img) {
31
+ object-fit: contain;
32
+ object-position: center;
33
+ height: 100%;
34
+ width: 100%;
35
+ }
36
+ :host([fit='cover']) ::slotted(img) {
37
+ object-fit: cover;
38
+ object-position: center;
39
+ height: 100%;
40
+ width: 100%;
41
+ }
42
+ :host([shadow]) ::slotted(img) {
43
+ box-shadow: var(--shadow4);
44
+ }
45
+ :host([shape='circular']) ::slotted(img) {
46
+ border-radius: var(--borderRadiusCircular);
47
+ }
48
+ :host([shape='rounded']) ::slotted(img) {
49
+ border-radius: var(--borderRadiusMedium);
50
+ }
@@ -1 +1,6 @@
1
- <f-template name="fluent-image" shadowrootmode="open"><template>{{styles}}<slot></slot></template></f-template>
1
+ <f-template name="fluent-image" shadowrootmode="open">
2
+ <template>
3
+ {{styles}}
4
+ <slot></slot>
5
+ </template>
6
+ </f-template>
@@ -1,36 +1,40 @@
1
+ :host([hidden]) {
2
+ display: none;
3
+ }
4
+ :host {
5
+ display: inline-flex;
6
+ }
1
7
 
2
- :host([hidden]){display:none}:host{display:inline-flex}
8
+ :host {
9
+ color: var(--colorNeutralForeground1);
10
+ cursor: pointer;
11
+ font-family: var(--fontFamilyBase);
12
+ font-size: var(--fontSizeBase300);
13
+ font-weight: var(--fontWeightRegular);
14
+ line-height: var(--lineHeightBase300);
15
+ user-select: none;
16
+ }
3
17
 
4
- :host {
5
- color: var(--colorNeutralForeground1);
6
- cursor: pointer;
7
- font-family: var(--fontFamilyBase);
8
- font-size: var(--fontSizeBase300);
9
- font-weight: var(--fontWeightRegular);
10
- line-height: var(--lineHeightBase300);
11
- user-select: none;
12
- }
18
+ .asterisk {
19
+ color: var(--colorPaletteRedForeground1);
20
+ margin-inline-start: var(--spacingHorizontalXS);
21
+ }
13
22
 
14
- .asterisk {
15
- color: var(--colorPaletteRedForeground1);
16
- margin-inline-start: var(--spacingHorizontalXS);
17
- }
23
+ :host([size='small']) {
24
+ font-size: var(--fontSizeBase200);
25
+ line-height: var(--lineHeightBase200);
26
+ }
18
27
 
19
- :host([size='small']) {
20
- font-size: var(--fontSizeBase200);
21
- line-height: var(--lineHeightBase200);
22
- }
28
+ :host([size='large']) {
29
+ font-size: var(--fontSizeBase400);
30
+ line-height: var(--lineHeightBase400);
31
+ }
23
32
 
24
- :host([size='large']) {
25
- font-size: var(--fontSizeBase400);
26
- line-height: var(--lineHeightBase400);
27
- }
33
+ :host(:is([size='large'], [weight='semibold'])) {
34
+ font-weight: var(--fontWeightSemibold);
35
+ }
28
36
 
29
- :host(:is([size='large'], [weight='semibold'])) {
30
- font-weight: var(--fontWeightSemibold);
31
- }
32
-
33
- :host([disabled]),
34
- :host([disabled]) .asterisk {
35
- color: var(--colorNeutralForegroundDisabled);
36
- }
37
+ :host([disabled]),
38
+ :host([disabled]) .asterisk {
39
+ color: var(--colorNeutralForegroundDisabled);
40
+ }
@@ -1,4 +1,7 @@
1
1
  <f-template name="fluent-label" shadowrootmode="open">
2
- <template>{{styles}}<slot></slot>
3
- <span part="asterisk" class="asterisk" aria-hidden="true" ?hidden="{{!required}}">*</span></template>
2
+ <template>
3
+ {{styles}}
4
+ <slot></slot>
5
+ <span part="asterisk" class="asterisk" aria-hidden="true" ?hidden="{{!required}}">*</span>
6
+ </template>
4
7
  </f-template>
@@ -1,68 +1,72 @@
1
+ :host([hidden]) {
2
+ display: none;
3
+ }
4
+ :host {
5
+ display: inline;
6
+ }
1
7
 
2
- :host([hidden]){display:none}:host{display:inline}
8
+ :host {
9
+ position: relative;
10
+ box-sizing: border-box;
11
+ background-color: transparent;
12
+ color: var(--colorBrandForegroundLink);
13
+ cursor: pointer;
14
+ font-family: var(--fontFamilyBase);
15
+ font-size: var(--fontSizeBase300);
16
+ font-weight: var(--fontWeightRegular);
17
+ overflow: inherit;
18
+ text-align: start;
19
+ text-decoration: none;
20
+ text-decoration-thickness: var(--strokeWidthThin);
21
+ text-overflow: inherit;
22
+ user-select: text;
23
+ }
3
24
 
4
- :host {
5
- position: relative;
6
- box-sizing: border-box;
7
- background-color: transparent;
8
- color: var(--colorBrandForegroundLink);
9
- cursor: pointer;
10
- font-family: var(--fontFamilyBase);
11
- font-size: var(--fontSizeBase300);
12
- font-weight: var(--fontWeightRegular);
13
- overflow: inherit;
14
- text-align: start;
15
- text-decoration: none;
16
- text-decoration-thickness: var(--strokeWidthThin);
17
- text-overflow: inherit;
18
- user-select: text;
19
- }
25
+ :host(:is(:hover, :focus-visible)) {
26
+ outline: none;
27
+ text-decoration-line: underline;
28
+ }
20
29
 
21
- :host(:is(:hover, :focus-visible)) {
22
- outline: none;
23
- text-decoration-line: underline;
30
+ @media (hover: hover) {
31
+ :host(:hover) {
32
+ color: var(--colorBrandForegroundLinkHover);
24
33
  }
25
34
 
26
- @media (hover: hover) {
27
- :host(:hover) {
28
- color: var(--colorBrandForegroundLinkHover);
29
- }
30
-
31
- :host(:active) {
32
- color: var(--colorBrandForegroundLinkPressed);
33
- }
34
-
35
- :host([appearance='subtle']:hover) {
36
- color: var(--colorNeutralForeground2LinkHover);
37
- }
38
-
39
- :host([appearance='subtle']:active) {
40
- color: var(--colorNeutralForeground2LinkPressed);
41
- }
35
+ :host(:active) {
36
+ color: var(--colorBrandForegroundLinkPressed);
42
37
  }
43
38
 
44
- :host([appearance='subtle']) {
45
- color: var(--colorNeutralForeground2Link);
39
+ :host([appearance='subtle']:hover) {
40
+ color: var(--colorNeutralForeground2LinkHover);
46
41
  }
47
42
 
48
- :host-context(:is(h1, h2, h3, h4, h5, h6, p, fluent-text)),
49
- :host([inline]) {
50
- font: inherit;
51
- text-decoration: underline;
43
+ :host([appearance='subtle']:active) {
44
+ color: var(--colorNeutralForeground2LinkPressed);
52
45
  }
46
+ }
53
47
 
54
- :host(:not([href])) {
55
- color: inherit;
56
- text-decoration: none;
57
- }
48
+ :host([appearance='subtle']) {
49
+ color: var(--colorNeutralForeground2Link);
50
+ }
58
51
 
59
- ::slotted(a) {
60
- position: absolute;
61
- inset: 0;
62
- }
52
+ :host-context(:is(h1, h2, h3, h4, h5, h6, p, fluent-text)),
53
+ :host([inline]) {
54
+ font: inherit;
55
+ text-decoration: underline;
56
+ }
57
+
58
+ :host(:not([href])) {
59
+ color: inherit;
60
+ text-decoration: none;
61
+ }
63
62
 
64
- @media (forced-colors: active) {
65
- :host {
66
- color: LinkText;
67
- }
63
+ ::slotted(a) {
64
+ position: absolute;
65
+ inset: 0;
66
+ }
67
+
68
+ @media (forced-colors: active) {
69
+ :host {
70
+ color: LinkText;
68
71
  }
72
+ }
@@ -1,9 +1,6 @@
1
1
  <f-template name="fluent-link" shadowrootmode="open">
2
- <template
3
- tabindex="0"
4
- @click="{clickHandler($e)}"
5
- @keydown="{keydownHandler($e)}"
6
- >{{styles}}
7
- <slot></slot>
8
- </template>
2
+ <template tabindex="0" @click="{clickHandler($e)}" @keydown="{keydownHandler($e)}">
3
+ {{styles}}
4
+ <slot></slot>
5
+ </template>
9
6
  </f-template>