@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.
- package/CHANGELOG.md +21 -2
- package/README.md +26 -0
- package/custom-elements.json +41 -56
- package/dist/esm/accordion/accordion.styles.css +11 -7
- package/dist/esm/accordion/accordion.template.html +4 -3
- package/dist/esm/accordion-item/accordion-item.styles.css +174 -170
- package/dist/esm/accordion-item/accordion-item.template.html +38 -31
- package/dist/esm/anchor-button/anchor-button.styles.css +224 -223
- package/dist/esm/anchor-button/anchor-button.template.html +8 -11
- package/dist/esm/avatar/avatar.styles.css +475 -470
- package/dist/esm/avatar/avatar.template.html +10 -14
- package/dist/esm/badge/badge.styles.css +264 -266
- package/dist/esm/badge/badge.template.html +5 -2
- package/dist/esm/button/button.base.js +2 -0
- package/dist/esm/button/button.base.js.map +1 -1
- package/dist/esm/button/button.styles.css +260 -259
- package/dist/esm/button/button.template.html +8 -10
- package/dist/esm/checkbox/checkbox.base.js +2 -0
- package/dist/esm/checkbox/checkbox.base.js.map +1 -1
- package/dist/esm/checkbox/checkbox.styles.css +146 -142
- package/dist/esm/checkbox/checkbox.template.html +21 -16
- package/dist/esm/compound-button/compound-button.styles.css +363 -365
- package/dist/esm/compound-button/compound-button.template.html +9 -11
- package/dist/esm/counter-badge/counter-badge.styles.css +177 -177
- package/dist/esm/counter-badge/counter-badge.template.html +5 -2
- package/dist/esm/dialog/dialog.styles.css +65 -66
- package/dist/esm/dialog/dialog.template.html +18 -15
- package/dist/esm/dialog-body/dialog-body.styles.css +81 -76
- package/dist/esm/dialog-body/dialog-body.styles.js +1 -0
- package/dist/esm/dialog-body/dialog-body.styles.js.map +1 -1
- package/dist/esm/dialog-body/dialog-body.template.html +2 -1
- package/dist/esm/divider/divider.styles.css +105 -101
- package/dist/esm/divider/divider.template.html +6 -1
- package/dist/esm/drawer/drawer.styles.css +124 -119
- package/dist/esm/drawer/drawer.template.html +5 -2
- package/dist/esm/drawer-body/drawer-body.styles.css +29 -26
- package/dist/esm/drawer-body/drawer-body.template.html +5 -2
- package/dist/esm/dropdown/dropdown.base.d.ts +1 -1
- package/dist/esm/dropdown/dropdown.base.js +3 -1
- package/dist/esm/dropdown/dropdown.base.js.map +1 -1
- package/dist/esm/dropdown/dropdown.styles.css +192 -190
- package/dist/esm/dropdown/dropdown.styles.js +1 -0
- package/dist/esm/dropdown/dropdown.styles.js.map +1 -1
- package/dist/esm/dropdown/dropdown.template.html +26 -19
- package/dist/esm/field/field.styles.css +125 -121
- package/dist/esm/field/field.template.html +3 -2
- package/dist/esm/image/image.styles.css +49 -50
- package/dist/esm/image/image.template.html +6 -1
- package/dist/esm/label/label.styles.css +34 -30
- package/dist/esm/label/label.template.html +5 -2
- package/dist/esm/link/link.styles.css +58 -54
- package/dist/esm/link/link.template.html +4 -7
- package/dist/esm/listbox/listbox.styles.css +40 -36
- package/dist/esm/listbox/listbox.styles.js +2 -2
- package/dist/esm/listbox/listbox.template.html +4 -6
- package/dist/esm/menu/menu.d.ts +8 -8
- package/dist/esm/menu/menu.js.map +1 -1
- package/dist/esm/menu/menu.styles.css +56 -52
- package/dist/esm/menu/menu.styles.js +5 -5
- package/dist/esm/menu/menu.template.html +6 -5
- package/dist/esm/menu-button/menu-button.styles.css +260 -259
- package/dist/esm/menu-button/menu-button.template.html +23 -14
- package/dist/esm/menu-item/menu-item.js +2 -0
- package/dist/esm/menu-item/menu-item.js.map +1 -1
- package/dist/esm/menu-item/menu-item.styles.css +141 -137
- package/dist/esm/menu-item/menu-item.styles.js +8 -3
- package/dist/esm/menu-item/menu-item.styles.js.map +1 -1
- package/dist/esm/menu-item/menu-item.template.html +48 -17
- package/dist/esm/menu-list/menu-list.styles.css +19 -15
- package/dist/esm/menu-list/menu-list.template.html +4 -3
- package/dist/esm/message-bar/message-bar.styles.css +83 -84
- package/dist/esm/message-bar/message-bar.template.html +7 -2
- package/dist/esm/option/option.styles.css +117 -114
- package/dist/esm/option/option.template.html +17 -14
- package/dist/esm/progress-bar/progress-bar.styles.css +83 -79
- package/dist/esm/progress-bar/progress-bar.template.html +4 -1
- package/dist/esm/radio/radio.styles.css +100 -96
- package/dist/esm/radio/radio.template.html +6 -9
- package/dist/esm/radio-group/radio-group.styles.css +45 -41
- package/dist/esm/radio-group/radio-group.template.html +11 -10
- package/dist/esm/rating-display/rating-display.styles.css +136 -134
- package/dist/esm/rating-display/rating-display.template.html +5 -2
- package/dist/esm/slider/slider.js +2 -0
- package/dist/esm/slider/slider.js.map +1 -1
- package/dist/esm/slider/slider.styles.css +186 -182
- package/dist/esm/slider/slider.template.html +13 -15
- package/dist/esm/spinner/spinner.styles.css +155 -151
- package/dist/esm/spinner/spinner.template.html +16 -11
- package/dist/esm/switch/switch.styles.css +112 -108
- package/dist/esm/switch/switch.template.html +9 -8
- package/dist/esm/tab/tab.js +2 -0
- package/dist/esm/tab/tab.js.map +1 -1
- package/dist/esm/tab/tab.styles.css +112 -108
- package/dist/esm/tab/tab.template.html +6 -5
- package/dist/esm/tablist/tablist.styles.css +194 -190
- package/dist/esm/tablist/tablist.template.html +2 -5
- package/dist/esm/text/text.styles.css +105 -101
- package/dist/esm/text/text.template.html +6 -1
- package/dist/esm/text-input/text-input.base.d.ts +0 -7
- package/dist/esm/text-input/text-input.base.js +3 -14
- package/dist/esm/text-input/text-input.base.js.map +1 -1
- package/dist/esm/text-input/text-input.styles.css +199 -195
- package/dist/esm/text-input/text-input.template.html +34 -35
- package/dist/esm/text-input/text-input.template.js +1 -4
- package/dist/esm/text-input/text-input.template.js.map +1 -1
- package/dist/esm/textarea/textarea.base.js +2 -0
- package/dist/esm/textarea/textarea.base.js.map +1 -1
- package/dist/esm/textarea/textarea.styles.css +254 -250
- package/dist/esm/textarea/textarea.template.html +28 -27
- package/dist/esm/toggle-button/toggle-button.styles.css +360 -357
- package/dist/esm/toggle-button/toggle-button.template.html +8 -10
- package/dist/esm/tooltip/tooltip.styles.css +81 -77
- package/dist/esm/tooltip/tooltip.template.html +6 -1
- package/dist/esm/tree/tree.styles.css +9 -5
- package/dist/esm/tree/tree.template.html +3 -2
- package/dist/esm/tree-item/tree-item.base.js +2 -0
- package/dist/esm/tree-item/tree-item.base.js.map +1 -1
- package/dist/esm/tree-item/tree-item.styles.css +157 -153
- package/dist/esm/tree-item/tree-item.template.html +8 -7
- package/dist/esm/utils/autofocus.d.ts +12 -0
- package/dist/esm/utils/autofocus.js +25 -0
- package/dist/esm/utils/autofocus.js.map +1 -0
- package/dist/web-components-all.js +26 -20
- package/dist/web-components-all.min.js +15 -15
- package/dist/web-components.d.ts +9 -16
- package/dist/web-components.js +26 -20
- package/dist/web-components.min.js +15 -15
- package/package.json +4 -5
|
@@ -1,118 +1,122 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
1
|
+
:host([hidden]) {
|
|
2
|
+
display: none;
|
|
3
|
+
}
|
|
4
|
+
:host {
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:host {
|
|
9
|
+
position: relative;
|
|
10
|
+
flex-direction: row;
|
|
11
|
+
align-items: center;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
line-height: var(--lineHeightBase300);
|
|
16
|
+
font-family: var(--fontFamilyBase);
|
|
17
|
+
font-size: var(--fontSizeBase300);
|
|
18
|
+
color: var(--colorNeutralForeground2);
|
|
19
|
+
fill: currentcolor;
|
|
20
|
+
grid-row: 1;
|
|
21
|
+
padding: var(--spacingHorizontalM) var(--spacingHorizontalMNudge);
|
|
22
|
+
border-radius: var(--borderRadiusMedium);
|
|
23
|
+
gap: 4px;
|
|
24
|
+
}
|
|
25
|
+
:host .tab-content {
|
|
26
|
+
display: inline-flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
padding: 0 2px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:host([aria-selected='true']) {
|
|
32
|
+
color: var(--colorNeutralForeground1);
|
|
33
|
+
font-weight: var(--fontWeightSemibold);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* adds hidden textContent to prevent shifting ui on bold / unbolding of text */
|
|
37
|
+
:host .tab-content::after {
|
|
38
|
+
content: var(--textContent);
|
|
39
|
+
visibility: hidden;
|
|
40
|
+
height: 0;
|
|
41
|
+
line-height: var(--lineHeightBase300);
|
|
42
|
+
font-weight: var(--fontWeightSemibold);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:host([aria-selected='true'])::after {
|
|
46
|
+
background-color: var(--colorCompoundBrandStroke);
|
|
47
|
+
border-radius: var(--borderRadiusCircular);
|
|
48
|
+
content: '';
|
|
49
|
+
inset: 0;
|
|
50
|
+
position: absolute;
|
|
51
|
+
z-index: 2;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host([aria-selected='false']:hover)::after {
|
|
55
|
+
background-color: var(--colorNeutralStroke1Hover);
|
|
56
|
+
border-radius: var(--borderRadiusCircular);
|
|
57
|
+
content: '';
|
|
58
|
+
inset: 0;
|
|
59
|
+
position: absolute;
|
|
60
|
+
z-index: 1;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/*
|
|
60
64
|
* TODO: Remove '(text-size-adjust: auto)' after this bug is fixed:
|
|
61
65
|
* https://bugs.webkit.org/show_bug.cgi?id=298646
|
|
62
66
|
* Also remove the same trick from tablist.styles.ts.
|
|
63
67
|
* Using '@supports (text-size-adjust: auto)' here to exclude Safari 26 from
|
|
64
68
|
* using CSS Anchor Positioning here because it crashes.
|
|
65
69
|
*/
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
:host([aria-selected='true']:hover)::after {
|
|
72
|
-
background-color: var(--colorNeutralStroke1Hover);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
:host([aria-selected='true'][disabled])::after {
|
|
77
|
-
background-color: var(--colorNeutralForegroundDisabled);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
::slotted([slot='start']),
|
|
81
|
-
::slotted([slot='end']) {
|
|
82
|
-
display: flex;
|
|
83
|
-
}
|
|
84
|
-
:host([disabled]) {
|
|
85
|
-
cursor: not-allowed;
|
|
86
|
-
fill: var(--colorNeutralForegroundDisabled);
|
|
87
|
-
color: var(--colorNeutralForegroundDisabled);
|
|
88
|
-
pointer-events: none;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
:host([disabled]:hover)::after {
|
|
92
|
-
background-color: unset;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
:host(:focus) {
|
|
96
|
-
outline: none;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
:host(:focus-visible) {
|
|
100
|
-
border-radius: var(--borderRadiusSmall);
|
|
101
|
-
box-shadow: 0 0 0 3px var(--colorStrokeFocus2);
|
|
102
|
-
outline: 1px solid var(--colorStrokeFocus1);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
:host([data-hasIndent]) {
|
|
106
|
-
display: grid;
|
|
107
|
-
grid-template-columns: 20px 1fr auto;
|
|
70
|
+
@supports (anchor-name: --a) and (text-size-adjust: auto) {
|
|
71
|
+
:host([aria-selected='true'])::after {
|
|
72
|
+
background-color: transparent;
|
|
108
73
|
}
|
|
109
74
|
|
|
110
|
-
:host([
|
|
111
|
-
|
|
75
|
+
:host([aria-selected='true']:hover)::after {
|
|
76
|
+
background-color: var(--colorNeutralStroke1Hover);
|
|
112
77
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:host([aria-selected='true'][disabled])::after {
|
|
81
|
+
background-color: var(--colorNeutralForegroundDisabled);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
::slotted([slot='start']),
|
|
85
|
+
::slotted([slot='end']) {
|
|
86
|
+
display: flex;
|
|
87
|
+
}
|
|
88
|
+
:host([disabled]) {
|
|
89
|
+
cursor: not-allowed;
|
|
90
|
+
fill: var(--colorNeutralForegroundDisabled);
|
|
91
|
+
color: var(--colorNeutralForegroundDisabled);
|
|
92
|
+
pointer-events: none;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
:host([disabled]:hover)::after {
|
|
96
|
+
background-color: unset;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
:host(:focus) {
|
|
100
|
+
outline: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
:host(:focus-visible) {
|
|
104
|
+
border-radius: var(--borderRadiusSmall);
|
|
105
|
+
box-shadow: 0 0 0 3px var(--colorStrokeFocus2);
|
|
106
|
+
outline: 1px solid var(--colorStrokeFocus1);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:host([data-hasIndent]) {
|
|
110
|
+
display: grid;
|
|
111
|
+
grid-template-columns: 20px 1fr auto;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
:host([data-hasIndent]) .tab-content {
|
|
115
|
+
grid-column: 2;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@media (forced-colors: active) {
|
|
119
|
+
:host([aria-selected='true'])::after {
|
|
120
|
+
background-color: Highlight;
|
|
118
121
|
}
|
|
122
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<f-template name="fluent-tab" shadowrootmode="open">
|
|
2
|
-
<template slot="tab" role="tab">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
<template slot="tab" role="tab">
|
|
3
|
+
{{styles}}
|
|
4
|
+
<slot name="start" f-ref="{start}"></slot>
|
|
5
|
+
<span class="tab-content"><slot></slot></span>
|
|
6
|
+
<slot name="end" f-ref="{end}"></slot>
|
|
7
|
+
</template>
|
|
7
8
|
</f-template>
|
|
@@ -1,203 +1,207 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
1
|
+
:host([hidden]) {
|
|
2
|
+
display: none;
|
|
3
|
+
}
|
|
4
|
+
:host {
|
|
5
|
+
display: flex;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:host {
|
|
9
|
+
--tabPaddingInline: var(--spacingHorizontalMNudge);
|
|
10
|
+
--tabPaddingBlock: var(--spacingHorizontalM);
|
|
11
|
+
--tabIndicatorInsetInline: var(--tabPaddingInline);
|
|
12
|
+
--tabIndicatorInsetBlock: 0;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
color: var(--colorNeutralForeground2);
|
|
15
|
+
flex-direction: row;
|
|
16
|
+
position: relative;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:host([size='small']) {
|
|
20
|
+
--tabPaddingBlock: var(--spacingVerticalSNudge);
|
|
21
|
+
--tabPaddingInline: var(--spacingHorizontalSNudge);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:host([size='large']) {
|
|
25
|
+
--tabPaddingBlock: var(--spacingVerticalL);
|
|
26
|
+
--tabPaddingInline: var(--spacingHorizontalMNudge);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:host([orientation='vertical']) {
|
|
30
|
+
--tabPaddingBlock: var(--spacingVerticalS);
|
|
31
|
+
--tabIndicatorInsetBlock: var(--spacingVerticalS);
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:host([orientation='vertical'][size='small']) {
|
|
36
|
+
--tabPaddingBlock: var(--spacingVerticalXXS);
|
|
37
|
+
--tabIndicatorInsetBlock: var(--spacingVerticalSNudge);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:host([orientation='vertical'][size='large']) {
|
|
41
|
+
--tabPaddingBlock: var(--spacingVerticalS);
|
|
42
|
+
--tabIndicatorInsetBlock: var(--spacingVerticalMNudge);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
::slotted([slot='tab']) {
|
|
46
|
+
padding-inline: var(--tabPaddingInline);
|
|
47
|
+
padding-block: var(--tabPaddingBlock);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:host([orientation='vertical']) ::slotted([role='tab']) {
|
|
51
|
+
justify-content: flex-start;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host ::slotted([slot='tab'])::after {
|
|
55
|
+
height: var(--strokeWidthThicker);
|
|
56
|
+
margin-block-start: auto;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host([orientation='vertical']) ::slotted([slot='tab'])::after {
|
|
60
|
+
width: var(--strokeWidthThicker);
|
|
61
|
+
height: unset;
|
|
62
|
+
margin-block-start: unset;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* ::before adds a secondary indicator placeholder that appears right after click on the active tab */
|
|
66
|
+
:host ::slotted([slot='tab'])::before {
|
|
67
|
+
height: var(--strokeWidthThicker);
|
|
68
|
+
border-radius: var(--borderRadiusCircular);
|
|
69
|
+
content: '';
|
|
70
|
+
inset-inline: var(--tabIndicatorInsetInline);
|
|
71
|
+
inset-block: var(--tabIndicatorInsetBlock);
|
|
72
|
+
position: absolute;
|
|
73
|
+
margin-top: auto;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:host ::slotted([slot='tab'])::before {
|
|
77
|
+
inset-inline: var(--tabIndicatorInsetInline);
|
|
78
|
+
inset-block: var(--tabIndicatorInsetBlock);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:host ::slotted([slot='tab'][aria-selected='true'])::before {
|
|
82
|
+
background-color: var(--colorNeutralForegroundDisabled);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:host ::slotted([slot='tab'][aria-selected='false']:hover)::after {
|
|
86
|
+
height: var(--strokeWidthThicker);
|
|
87
|
+
margin-block-start: auto;
|
|
88
|
+
transform-origin: left;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:host([orientation='vertical']) ::slotted([slot='tab'])::before,
|
|
92
|
+
:host([orientation='vertical']) ::slotted([slot='tab'][aria-selected='false']:hover)::after {
|
|
93
|
+
height: unset;
|
|
94
|
+
width: var(--strokeWidthThicker);
|
|
95
|
+
margin-inline-end: auto;
|
|
96
|
+
transform-origin: top;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
:host([size='small']) ::slotted([slot='tab']) {
|
|
100
|
+
font-size: var(--fontSizeBase300);
|
|
101
|
+
line-height: var(--lineHeightBase300);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
:host([size='large']) ::slotted([slot='tab']) {
|
|
105
|
+
font-size: var(--fontSizeBase400);
|
|
106
|
+
line-height: var(--lineHeightBase400);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* horizontal spacing for indicator */
|
|
110
|
+
:host ::slotted([slot='tab'])::after,
|
|
111
|
+
:host ::slotted([slot='tab'])::before,
|
|
112
|
+
:host ::slotted([slot='tab']:hover)::after {
|
|
113
|
+
inset-inline: var(--tabIndicatorInsetInline);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:host([orientation='vertical']) ::slotted([slot='tab'])::after,
|
|
117
|
+
:host([orientation='vertical']) ::slotted([slot='tab'])::before,
|
|
118
|
+
:host([orientation='vertical']) ::slotted([slot='tab']:hover)::after {
|
|
119
|
+
inset-inline: 0;
|
|
120
|
+
inset-block: var(--tabIndicatorInsetBlock);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* disabled styles */
|
|
124
|
+
:host([disabled]) {
|
|
125
|
+
cursor: not-allowed;
|
|
126
|
+
color: var(--colorNeutralForegroundDisabled);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
:host([disabled]) ::slotted([slot='tab']) {
|
|
130
|
+
pointer-events: none;
|
|
131
|
+
cursor: not-allowed;
|
|
132
|
+
color: var(--colorNeutralForegroundDisabled);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
:host([disabled]) ::slotted([slot='tab']:after) {
|
|
136
|
+
background-color: var(--colorNeutralForegroundDisabled);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
:host([disabled]) ::slotted([slot='tab'][aria-selected='true'])::after {
|
|
140
|
+
background-color: var(--colorNeutralForegroundDisabled);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
:host([disabled]) ::slotted([slot='tab']:hover):before {
|
|
144
|
+
content: unset;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
:host([appearance='subtle']) ::slotted([slot='tab']:hover) {
|
|
148
|
+
background-color: var(--colorSubtleBackgroundHover);
|
|
149
|
+
color: var(--colorNeutralForeground1Hover);
|
|
150
|
+
fill: var(--colorCompoundBrandForeground1Hover);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
:host([appearance='subtle']) ::slotted([slot='tab']:active) {
|
|
154
|
+
background-color: var(--colorSubtleBackgroundPressed);
|
|
155
|
+
fill: var(--colorSubtleBackgroundPressed);
|
|
156
|
+
color: var(--colorNeutralForeground1);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/*
|
|
160
|
+
* TODO: Remove '(text-size-adjust: auto)' after this bug is fixed:
|
|
161
|
+
* https://bugs.webkit.org/show_bug.cgi?id=298646
|
|
162
|
+
* Also remove the same trick from tab.styles.ts.
|
|
163
|
+
* Using '@supports (text-size-adjust: auto)' here to exclude Safari 26 from
|
|
164
|
+
* using CSS Anchor Positioning here because it crashes.
|
|
165
|
+
*/
|
|
166
|
+
@supports (anchor-name: --a) and (text-size-adjust: auto) {
|
|
167
|
+
::slotted([slot='tab'][aria-selected='true']) {
|
|
168
|
+
anchor-name: --tab;
|
|
59
169
|
}
|
|
60
170
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
height: var(--strokeWidthThicker);
|
|
64
|
-
border-radius: var(--borderRadiusCircular);
|
|
171
|
+
:host::after {
|
|
172
|
+
background-color: var(--colorCompoundBrandStroke);
|
|
65
173
|
content: '';
|
|
66
|
-
|
|
67
|
-
inset
|
|
68
|
-
position:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
:host ::slotted([slot='tab'][aria-selected='false']:hover)::after {
|
|
174
|
+
inline-size: 100%;
|
|
175
|
+
inset: auto auto anchor(end) anchor(center);
|
|
176
|
+
position: fixed;
|
|
177
|
+
position-anchor: --tab;
|
|
178
|
+
transform: translateX(-50%);
|
|
179
|
+
transition-property: inset-inline, width;
|
|
180
|
+
transition-duration: var(--durationSlow);
|
|
181
|
+
transition-timing-function: var(--curveDecelerateMax);
|
|
182
|
+
z-index: 3;
|
|
183
|
+
|
|
184
|
+
/* These styles should be in sync with tab.styles.ts’s :host::after */
|
|
185
|
+
border-radius: var(--borderRadiusCircular);
|
|
186
|
+
width: calc(anchor-size() - var(--tabIndicatorInsetInline) * 2);
|
|
82
187
|
height: var(--strokeWidthThicker);
|
|
83
|
-
margin-block-start: auto;
|
|
84
|
-
transform-origin: left;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
:host([orientation='vertical']) ::slotted([slot='tab'])::before,
|
|
88
|
-
:host([orientation='vertical']) ::slotted([slot='tab'][aria-selected='false']:hover)::after {
|
|
89
|
-
height: unset;
|
|
90
|
-
width: var(--strokeWidthThicker);
|
|
91
|
-
margin-inline-end: auto;
|
|
92
|
-
transform-origin: top;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
:host([size='small']) ::slotted([slot='tab']) {
|
|
96
|
-
font-size: var(--fontSizeBase300);
|
|
97
|
-
line-height: var(--lineHeightBase300);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
:host([size='large']) ::slotted([slot='tab']) {
|
|
101
|
-
font-size: var(--fontSizeBase400);
|
|
102
|
-
line-height: var(--lineHeightBase400);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/* horizontal spacing for indicator */
|
|
106
|
-
:host ::slotted([slot='tab'])::after,
|
|
107
|
-
:host ::slotted([slot='tab'])::before,
|
|
108
|
-
:host ::slotted([slot='tab']:hover)::after {
|
|
109
|
-
inset-inline: var(--tabIndicatorInsetInline);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
:host([orientation='vertical']) ::slotted([slot='tab'])::after,
|
|
113
|
-
:host([orientation='vertical']) ::slotted([slot='tab'])::before,
|
|
114
|
-
:host([orientation='vertical']) ::slotted([slot='tab']:hover)::after {
|
|
115
|
-
inset-inline: 0;
|
|
116
|
-
inset-block: var(--tabIndicatorInsetBlock);
|
|
117
188
|
}
|
|
118
189
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
190
|
+
:host([orientation='vertical'])::after {
|
|
191
|
+
inset: anchor(center) anchor(end) auto 0;
|
|
192
|
+
transform: translateY(-50%);
|
|
193
|
+
transition-property: inset-block, height;
|
|
124
194
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
color: var(--colorNeutralForegroundDisabled);
|
|
195
|
+
/* These styles should be in sync with #vertical-tab-highlight above */
|
|
196
|
+
width: var(--strokeWidthThicker);
|
|
197
|
+
height: calc(anchor-size() - var(--tabIndicatorInsetBlock) * 2);
|
|
129
198
|
}
|
|
130
199
|
|
|
131
|
-
:host(
|
|
132
|
-
|
|
200
|
+
:host(:dir(rtl)[orientation='vertical'])::after {
|
|
201
|
+
inset: anchor(center) anchor(start) auto 0;
|
|
133
202
|
}
|
|
134
203
|
|
|
135
|
-
:host([disabled])
|
|
204
|
+
:host([disabled])::after {
|
|
136
205
|
background-color: var(--colorNeutralForegroundDisabled);
|
|
137
206
|
}
|
|
138
|
-
|
|
139
|
-
:host([disabled]) ::slotted([slot='tab']:hover):before {
|
|
140
|
-
content: unset;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
:host([appearance='subtle']) ::slotted([slot='tab']:hover) {
|
|
144
|
-
background-color: var(--colorSubtleBackgroundHover);
|
|
145
|
-
color: var(--colorNeutralForeground1Hover);
|
|
146
|
-
fill: var(--colorCompoundBrandForeground1Hover);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
:host([appearance='subtle']) ::slotted([slot='tab']:active) {
|
|
150
|
-
background-color: var(--colorSubtleBackgroundPressed);
|
|
151
|
-
fill: var(--colorSubtleBackgroundPressed);
|
|
152
|
-
color: var(--colorNeutralForeground1);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/*
|
|
156
|
-
* TODO: Remove '(text-size-adjust: auto)' after this bug is fixed:
|
|
157
|
-
* https://bugs.webkit.org/show_bug.cgi?id=298646
|
|
158
|
-
* Also remove the same trick from tab.styles.ts.
|
|
159
|
-
* Using '@supports (text-size-adjust: auto)' here to exclude Safari 26 from
|
|
160
|
-
* using CSS Anchor Positioning here because it crashes.
|
|
161
|
-
*/
|
|
162
|
-
@supports (anchor-name: --a) and (text-size-adjust: auto) {
|
|
163
|
-
::slotted([slot='tab'][aria-selected='true']) {
|
|
164
|
-
anchor-name: --tab;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
:host::after {
|
|
168
|
-
background-color: var(--colorCompoundBrandStroke);
|
|
169
|
-
content: '';
|
|
170
|
-
inline-size: 100%;
|
|
171
|
-
inset: auto auto anchor(end) anchor(center);
|
|
172
|
-
position: fixed;
|
|
173
|
-
position-anchor: --tab;
|
|
174
|
-
transform: translateX(-50%);
|
|
175
|
-
transition-property: inset-inline, width;
|
|
176
|
-
transition-duration: var(--durationSlow);
|
|
177
|
-
transition-timing-function: var(--curveDecelerateMax);
|
|
178
|
-
z-index: 3;
|
|
179
|
-
|
|
180
|
-
/* These styles should be in sync with tab.styles.ts’s :host::after */
|
|
181
|
-
border-radius: var(--borderRadiusCircular);
|
|
182
|
-
width: calc(anchor-size() - var(--tabIndicatorInsetInline) * 2);
|
|
183
|
-
height: var(--strokeWidthThicker);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
:host([orientation='vertical'])::after {
|
|
187
|
-
inset: anchor(center) anchor(end) auto 0;
|
|
188
|
-
transform: translateY(-50%);
|
|
189
|
-
transition-property: inset-block, height;
|
|
190
|
-
|
|
191
|
-
/* These styles should be in sync with #vertical-tab-highlight above */
|
|
192
|
-
width: var(--strokeWidthThicker);
|
|
193
|
-
height: calc(anchor-size() - var(--tabIndicatorInsetBlock) * 2);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
:host(:dir(rtl)[orientation='vertical'])::after {
|
|
197
|
-
inset: anchor(center) anchor(start) auto 0;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
:host([disabled])::after {
|
|
201
|
-
background-color: var(--colorNeutralForegroundDisabled);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
207
|
+
}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
<f-template name="fluent-tablist" shadowrootmode="open">
|
|
2
|
-
<template
|
|
3
|
-
|
|
4
|
-
focusgroup="tablist inline block"
|
|
5
|
-
@focusin="{handleFocusIn($e)}"
|
|
6
|
-
>{{styles}}
|
|
2
|
+
<template role="tablist" focusgroup="tablist inline block" @focusin="{handleFocusIn($e)}">
|
|
3
|
+
{{styles}}
|
|
7
4
|
<slot name="tab" f-slotted="{slottedTabs}"></slot>
|
|
8
5
|
</template>
|
|
9
6
|
</f-template>
|