@fluentui/web-components 3.0.0-alpha.12 → 3.0.0-alpha.14
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.json +51 -1
- package/CHANGELOG.md +22 -2
- package/dist/dts/button/button.d.ts +55 -0
- package/dist/dts/button/button.definition.d.ts +10 -0
- package/dist/dts/button/button.options.d.ts +46 -0
- package/dist/dts/button/button.styles.d.ts +1 -0
- package/dist/dts/button/button.template.d.ts +7 -0
- package/dist/dts/button/define.d.ts +1 -0
- package/dist/dts/button/index.d.ts +5 -0
- package/dist/dts/index.d.ts +5 -0
- package/dist/dts/menu-button/define.d.ts +1 -0
- package/dist/dts/menu-button/index.d.ts +5 -0
- package/dist/dts/menu-button/menu-button.d.ts +7 -0
- package/dist/dts/menu-button/menu-button.definition.d.ts +10 -0
- package/dist/dts/menu-button/menu-button.options.d.ts +46 -0
- package/dist/dts/menu-button/menu-button.template.d.ts +7 -0
- package/dist/dts/tab/define.d.ts +1 -0
- package/dist/dts/tab/index.d.ts +4 -0
- package/dist/dts/tab/tab.d.ts +8 -0
- package/dist/dts/tab/tab.definition.d.ts +2 -0
- package/dist/dts/tab/tab.styles.d.ts +1 -0
- package/dist/dts/tab/tab.template.d.ts +4 -0
- package/dist/dts/tab-panel/define.d.ts +1 -0
- package/dist/dts/tab-panel/index.d.ts +4 -0
- package/dist/dts/tab-panel/tab-panel.d.ts +3 -0
- package/dist/dts/tab-panel/tab-panel.definition.d.ts +2 -0
- package/dist/dts/tab-panel/tab-panel.styles.d.ts +1 -0
- package/dist/dts/tab-panel/tab-panel.template.d.ts +1 -0
- package/dist/dts/tabs/define.d.ts +1 -0
- package/dist/dts/tabs/index.d.ts +5 -0
- package/dist/dts/tabs/tabs.d.ts +88 -0
- package/dist/dts/tabs/tabs.definition.d.ts +2 -0
- package/dist/dts/tabs/tabs.options.d.ts +14 -0
- package/dist/dts/tabs/tabs.styles.d.ts +1 -0
- package/dist/dts/tabs/tabs.template.d.ts +1 -0
- package/dist/esm/button/button.definition.js +21 -0
- package/dist/esm/button/button.definition.js.map +1 -0
- package/dist/esm/button/button.js +72 -0
- package/dist/esm/button/button.js.map +1 -0
- package/dist/esm/button/button.options.js +30 -0
- package/dist/esm/button/button.options.js.map +1 -0
- package/dist/esm/button/button.styles.js +255 -0
- package/dist/esm/button/button.styles.js.map +1 -0
- package/dist/esm/button/button.template.js +7 -0
- package/dist/esm/button/button.template.js.map +1 -0
- package/dist/esm/button/define.js +4 -0
- package/dist/esm/button/define.js.map +1 -0
- package/dist/esm/button/index.js +6 -0
- package/dist/esm/button/index.js.map +1 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/menu-button/define.js +4 -0
- package/dist/esm/menu-button/define.js.map +1 -0
- package/dist/esm/menu-button/index.js +6 -0
- package/dist/esm/menu-button/index.js.map +1 -0
- package/dist/esm/menu-button/menu-button.definition.js +21 -0
- package/dist/esm/menu-button/menu-button.definition.js.map +1 -0
- package/dist/esm/menu-button/menu-button.js +8 -0
- package/dist/esm/menu-button/menu-button.js.map +1 -0
- package/dist/esm/menu-button/menu-button.options.js +17 -0
- package/dist/esm/menu-button/menu-button.options.js.map +1 -0
- package/dist/esm/menu-button/menu-button.template.js +10 -0
- package/dist/esm/menu-button/menu-button.template.js.map +1 -0
- package/dist/esm/tab/define.js +4 -0
- package/dist/esm/tab/define.js.map +1 -0
- package/dist/esm/tab/index.js +5 -0
- package/dist/esm/tab/index.js.map +1 -0
- package/dist/esm/tab/tab.definition.js +10 -0
- package/dist/esm/tab/tab.definition.js.map +1 -0
- package/dist/esm/tab/tab.js +20 -0
- package/dist/esm/tab/tab.js.map +1 -0
- package/dist/esm/tab/tab.styles.js +94 -0
- package/dist/esm/tab/tab.styles.js.map +1 -0
- package/dist/esm/tab/tab.template.js +13 -0
- package/dist/esm/tab/tab.template.js.map +1 -0
- package/dist/esm/tab-panel/define.js +4 -0
- package/dist/esm/tab-panel/define.js.map +1 -0
- package/dist/esm/tab-panel/index.js +5 -0
- package/dist/esm/tab-panel/index.js.map +1 -0
- package/dist/esm/tab-panel/tab-panel.definition.js +10 -0
- package/dist/esm/tab-panel/tab-panel.definition.js.map +1 -0
- package/dist/esm/tab-panel/tab-panel.js +4 -0
- package/dist/esm/tab-panel/tab-panel.js.map +1 -0
- package/dist/esm/tab-panel/tab-panel.styles.js +12 -0
- package/dist/esm/tab-panel/tab-panel.styles.js.map +1 -0
- package/dist/esm/tab-panel/tab-panel.template.js +3 -0
- package/dist/esm/tab-panel/tab-panel.template.js.map +1 -0
- package/dist/esm/tabs/define.js +4 -0
- package/dist/esm/tabs/define.js.map +1 -0
- package/dist/esm/tabs/index.js +6 -0
- package/dist/esm/tabs/index.js.map +1 -0
- package/dist/esm/tabs/tabs.definition.js +10 -0
- package/dist/esm/tabs/tabs.definition.js.map +1 -0
- package/dist/esm/tabs/tabs.js +158 -0
- package/dist/esm/tabs/tabs.js.map +1 -0
- package/dist/esm/tabs/tabs.options.js +12 -0
- package/dist/esm/tabs/tabs.options.js.map +1 -0
- package/dist/esm/tabs/tabs.styles.js +230 -0
- package/dist/esm/tabs/tabs.styles.js.map +1 -0
- package/dist/esm/tabs/tabs.template.js +3 -0
- package/dist/esm/tabs/tabs.template.js.map +1 -0
- package/dist/fluent-web-components.api.json +4778 -3155
- package/dist/web-components.d.ts +339 -0
- package/dist/web-components.js +971 -54
- package/dist/web-components.min.js +148 -132
- package/docs/api-report.md +178 -0
- package/package.json +14 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.options.js","sourceRoot":"","sources":["../../../src/button/button.options.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;IACtB,WAAW,EAAE,aAAa;CAClB,CAAC;AAQX;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACR,CAAC;AAQX;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;CACN,CAAC"}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import { css } from '@microsoft/fast-element';
|
|
2
|
+
import { display } from '@microsoft/fast-foundation';
|
|
3
|
+
import { borderRadiusCircular, borderRadiusLarge, borderRadiusMedium, borderRadiusNone, borderRadiusSmall, colorBrandBackground, colorBrandBackgroundHover, colorBrandBackgroundPressed, colorNeutralBackground1, colorNeutralBackground1Hover, colorNeutralBackground1Pressed, colorNeutralBackgroundDisabled, colorNeutralForeground1, colorNeutralForeground1Hover, colorNeutralForeground1Pressed, colorNeutralForeground2, colorNeutralForeground2BrandHover, colorNeutralForeground2BrandPressed, colorNeutralForeground2Hover, colorNeutralForeground2Pressed, colorNeutralForegroundDisabled, colorNeutralForegroundOnBrand, colorNeutralStroke1, colorNeutralStroke1Hover, colorNeutralStroke1Pressed, colorNeutralStrokeDisabled, colorStrokeFocus2, colorSubtleBackground, colorSubtleBackgroundHover, colorSubtleBackgroundPressed, colorTransparentBackground, colorTransparentBackgroundHover, colorTransparentBackgroundPressed, colorTransparentStroke, curveEasyEase, durationFaster, fontFamilyBase, fontSizeBase200, fontSizeBase300, fontSizeBase400, fontWeightRegular, fontWeightSemibold, lineHeightBase200, lineHeightBase300, lineHeightBase400, shadow2, shadow4, spacingHorizontalL, spacingHorizontalM, spacingHorizontalS, spacingHorizontalSNudge, spacingHorizontalXS, strokeWidthThick, strokeWidthThin, } from '../theme/design-tokens.js';
|
|
4
|
+
// Need to support icon hover styles
|
|
5
|
+
export const styles = css `
|
|
6
|
+
${display('inline-flex')}
|
|
7
|
+
|
|
8
|
+
:host {
|
|
9
|
+
--icon-spacing: ${spacingHorizontalSNudge};
|
|
10
|
+
contain: layout style;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:host .control {
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
text-decoration-line: none;
|
|
19
|
+
margin: 0;
|
|
20
|
+
min-height: 32px;
|
|
21
|
+
outline-style: none;
|
|
22
|
+
background-color: ${colorNeutralBackground1};
|
|
23
|
+
color: ${colorNeutralForeground1};
|
|
24
|
+
border: ${strokeWidthThin} solid ${colorNeutralStroke1};
|
|
25
|
+
padding: 0 ${spacingHorizontalM};
|
|
26
|
+
min-width: 96px;
|
|
27
|
+
border-radius: ${borderRadiusMedium};
|
|
28
|
+
font-size: ${fontSizeBase300};
|
|
29
|
+
font-family: ${fontFamilyBase};
|
|
30
|
+
font-weight: ${fontWeightSemibold};
|
|
31
|
+
line-height: ${lineHeightBase300};
|
|
32
|
+
transition-duration: ${durationFaster};
|
|
33
|
+
transition-property: background, border, color;
|
|
34
|
+
transition-timing-function: ${curveEasyEase};
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.content {
|
|
39
|
+
display: inherit;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host(:hover) .control {
|
|
43
|
+
background-color: ${colorNeutralBackground1Hover};
|
|
44
|
+
color: ${colorNeutralForeground1Hover};
|
|
45
|
+
border-color: ${colorNeutralStroke1Hover};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:host(:hover:active) .control {
|
|
49
|
+
background-color: ${colorNeutralBackground1Pressed};
|
|
50
|
+
border-color: ${colorNeutralStroke1Pressed};
|
|
51
|
+
color: ${colorNeutralForeground1Pressed};
|
|
52
|
+
outline-style: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:host .control:focus-visible {
|
|
56
|
+
border-color: ${colorTransparentStroke};
|
|
57
|
+
outline: ${strokeWidthThick} solid ${colorTransparentStroke};
|
|
58
|
+
box-shadow: ${shadow4}, 0 0 0 2px ${colorStrokeFocus2};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@media screen and (prefers-reduced-motion: reduce) {
|
|
62
|
+
transition-duration: 0.01ms;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
::slotted(svg) {
|
|
66
|
+
font-size: 20px;
|
|
67
|
+
height: 20px;
|
|
68
|
+
width: 20px;
|
|
69
|
+
fill: currentColor;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
[slot='start'],
|
|
73
|
+
::slotted([slot='start']) {
|
|
74
|
+
margin-inline-end: var(--icon-spacing);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
[slot='end'],
|
|
78
|
+
::slotted([slot='end']) {
|
|
79
|
+
margin-inline-start: var(--icon-spacing);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:host([icon-only]) .control {
|
|
83
|
+
min-width: 32px;
|
|
84
|
+
max-width: 32px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:host([size='small']) {
|
|
88
|
+
--icon-spacing: ${spacingHorizontalXS};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:host([size='small']) .control {
|
|
92
|
+
min-height: 24px;
|
|
93
|
+
min-width: 64px;
|
|
94
|
+
padding: 0 ${spacingHorizontalS};
|
|
95
|
+
border-radius: ${borderRadiusSmall};
|
|
96
|
+
font-size: ${fontSizeBase200};
|
|
97
|
+
line-height: ${lineHeightBase200};
|
|
98
|
+
font-weight: ${fontWeightRegular};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
:host([size='small'][icon-only]) .control {
|
|
102
|
+
min-width: 24px;
|
|
103
|
+
max-width: 24px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
:host([size='large']) .control {
|
|
107
|
+
min-height: 40px;
|
|
108
|
+
border-radius: ${borderRadiusLarge};
|
|
109
|
+
padding: 0 ${spacingHorizontalL};
|
|
110
|
+
font-size: ${fontSizeBase400};
|
|
111
|
+
line-height: ${lineHeightBase400};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
:host([size='large'][icon-only]) .control {
|
|
115
|
+
min-width: 40px;
|
|
116
|
+
max-width: 40px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
:host([size='large']) ::slotted(svg) {
|
|
120
|
+
font-size: 24px;
|
|
121
|
+
height: 24px;
|
|
122
|
+
width: 24px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:host([shape='circular']) .control,
|
|
126
|
+
:host([shape='circular']) .control:focus-visible {
|
|
127
|
+
border-radius: ${borderRadiusCircular};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
:host([shape='square']) .control,
|
|
131
|
+
:host([shape='square']) .control:focus-visible {
|
|
132
|
+
border-radius: ${borderRadiusNone};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
:host([appearance='primary']) .control {
|
|
136
|
+
background-color: ${colorBrandBackground};
|
|
137
|
+
color: ${colorNeutralForegroundOnBrand};
|
|
138
|
+
border-color: transparent;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
:host([appearance='primary']:hover) .control {
|
|
142
|
+
background-color: ${colorBrandBackgroundHover};
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
:host([appearance='primary']:hover) .control,
|
|
146
|
+
:host([appearance='primary']:hover:active) .control {
|
|
147
|
+
border-color: transparent;
|
|
148
|
+
color: ${colorNeutralForegroundOnBrand};
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
:host([appearance='primary']:hover:active) .control {
|
|
152
|
+
background-color: ${colorBrandBackgroundPressed};
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
:host([appearance='primary']) .control:focus-visible {
|
|
156
|
+
border-color: ${colorNeutralForegroundOnBrand};
|
|
157
|
+
box-shadow: ${shadow2}, 0 0 0 2px ${colorStrokeFocus2};
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
:host(is:([disabled][appearance='primary'], [disabled-focusabale][appearance="primary"])) .control,
|
|
161
|
+
:host(is:([disabled][appearance='primary'], [disabled-focusabale][appearance="primary"]):hover) .control,
|
|
162
|
+
:host(is:([disabled][appearance='primary'], [disabled-focusabale][appearance="primary"]):hover:active) .control {
|
|
163
|
+
border-color: transparent;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
:host([appearance='outline']) .control {
|
|
167
|
+
background-color: ${colorTransparentBackground};
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
:host([appearance='outline']:hover) .control {
|
|
171
|
+
background-color: ${colorTransparentBackgroundHover};
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
:host([appearance='outline']:hover:active) .control {
|
|
175
|
+
background-color: ${colorTransparentBackgroundPressed};
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
:host(is:([disabled][appearance='outline'], [disabled-focusabale][appearance="outline"])) .control,
|
|
179
|
+
:host(is:([disabled][appearance='outline'], [disabled-focusabale][appearance="outline"]):hover) .control,
|
|
180
|
+
:host(is:([disabled][appearance='outline'], [disabled-focusabale][appearance="outline"]):hover:active) .control {
|
|
181
|
+
background-color: ${colorTransparentBackground};
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
:host([appearance='subtle']) .control {
|
|
185
|
+
background-color: ${colorSubtleBackground};
|
|
186
|
+
color: ${colorNeutralForeground2};
|
|
187
|
+
border-color: transparent;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
:host([appearance='subtle']:hover) .control {
|
|
191
|
+
background-color: ${colorSubtleBackgroundHover};
|
|
192
|
+
color: ${colorNeutralForeground2Hover};
|
|
193
|
+
border-color: transparent;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
:host([appearance='subtle']:hover:active) .control {
|
|
197
|
+
background-color: ${colorSubtleBackgroundPressed};
|
|
198
|
+
color: ${colorNeutralForeground2Pressed};
|
|
199
|
+
border-color: transparent;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
:host(is:([disabled][appearance='subtle'], [disabled-focusabale][appearance="subtle"])) .control,
|
|
203
|
+
:host(is:([disabled][appearance='subtle'], [disabled-focusabale][appearance="subtle"]):hover) .control,
|
|
204
|
+
:host(is:([disabled][appearance='subtle'], [disabled-focusabale][appearance="subtle"]):hover:active) .control {
|
|
205
|
+
background-color: ${colorTransparentBackground};
|
|
206
|
+
border-color: transparent;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
:host([appearance='subtle']:hover) ::slotted(svg) {
|
|
210
|
+
fill: ${colorNeutralForeground2BrandHover};
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
:host([appearance='subtle']:hover:active) ::slotted(svg) {
|
|
214
|
+
fill: ${colorNeutralForeground2BrandPressed};
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
:host([appearance='transparent']) .control {
|
|
218
|
+
background-color: ${colorTransparentBackground};
|
|
219
|
+
color: ${colorNeutralForeground2};
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
:host([appearance='transparent']:hover) .control {
|
|
223
|
+
background-color: ${colorTransparentBackgroundHover};
|
|
224
|
+
color: ${colorNeutralForeground2BrandHover};
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
:host([appearance='transparent']:hover:active) .control {
|
|
228
|
+
background-color: ${colorTransparentBackgroundPressed};
|
|
229
|
+
color: ${colorNeutralForeground2BrandPressed};
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
:host([appearance='transparent']) .control,
|
|
233
|
+
:host([appearance='transparent']:hover) .control,
|
|
234
|
+
:host([appearance='transparent']:hover:active) .control {
|
|
235
|
+
border-color: transparent;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
:host(is:([disabled][appearance='transparent'], [disabled-focusabale][appearance="transparent"])) .control,
|
|
239
|
+
:host(is:([disabled][appearance='transparent'], [disabled-focusabale][appearance="transparent"]):hover) .control,
|
|
240
|
+
:host(is:([disabled][appearance='transparent'], [disabled-focusabale][appearance="transparent"]):hover:active) .control {
|
|
241
|
+
border-color: transparent;
|
|
242
|
+
background-color: ${colorTransparentBackground};
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
:host(:is([disabled], [disabled-focusable], [appearance][disabled], [appearance][disabled-focusable])) .control,
|
|
246
|
+
:host(:is([disabled], [disabled-focusable], [appearance][disabled], [appearance][disabled-focusable]):hover) .control,
|
|
247
|
+
:host(:is([disabled], [disabled-focusable], [appearance][disabled], [appearance][disabled-focusable]):hover:active)
|
|
248
|
+
.control {
|
|
249
|
+
background-color: ${colorNeutralBackgroundDisabled};
|
|
250
|
+
border-color: ${colorNeutralStrokeDisabled};
|
|
251
|
+
color: ${colorNeutralForegroundDisabled};
|
|
252
|
+
cursor: not-allowed;
|
|
253
|
+
}
|
|
254
|
+
`;
|
|
255
|
+
//# sourceMappingURL=button.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.styles.js","sourceRoot":"","sources":["../../../src/button/button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,EACzB,2BAA2B,EAC3B,uBAAuB,EACvB,4BAA4B,EAC5B,8BAA8B,EAC9B,8BAA8B,EAC9B,uBAAuB,EACvB,4BAA4B,EAC5B,8BAA8B,EAC9B,uBAAuB,EACvB,iCAAiC,EACjC,mCAAmC,EACnC,4BAA4B,EAC5B,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,mBAAmB,EACnB,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,EAC1B,iBAAiB,EACjB,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5B,0BAA0B,EAC1B,+BAA+B,EAC/B,iCAAiC,EACjC,sBAAsB,EACtB,aAAa,EACb,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,OAAO,EACP,OAAO,EACP,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,GAChB,MAAM,2BAA2B,CAAC;AAEnC,oCAAoC;AACpC,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;IACrB,OAAO,CAAC,aAAa,CAAC;;;sBAGJ,uBAAuB;;;;;;;;;;;;;wBAarB,uBAAuB;aAClC,uBAAuB;cACtB,eAAe,UAAU,mBAAmB;iBACzC,kBAAkB;;qBAEd,kBAAkB;iBACtB,eAAe;mBACb,cAAc;mBACd,kBAAkB;mBAClB,iBAAiB;2BACT,cAAc;;kCAEP,aAAa;;;;;;;;;wBASvB,4BAA4B;aACvC,4BAA4B;oBACrB,wBAAwB;;;;wBAIpB,8BAA8B;oBAClC,0BAA0B;aACjC,8BAA8B;;;;;oBAKvB,sBAAsB;eAC3B,gBAAgB,UAAU,sBAAsB;kBAC7C,OAAO,eAAe,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBA8BnC,mBAAmB;;;;;;iBAMxB,kBAAkB;qBACd,iBAAiB;iBACrB,eAAe;mBACb,iBAAiB;mBACjB,iBAAiB;;;;;;;;;;qBAUf,iBAAiB;iBACrB,kBAAkB;iBAClB,eAAe;mBACb,iBAAiB;;;;;;;;;;;;;;;;qBAgBf,oBAAoB;;;;;qBAKpB,gBAAgB;;;;wBAIb,oBAAoB;aAC/B,6BAA6B;;;;;wBAKlB,yBAAyB;;;;;;aAMpC,6BAA6B;;;;wBAIlB,2BAA2B;;;;oBAI/B,6BAA6B;kBAC/B,OAAO,eAAe,iBAAiB;;;;;;;;;;wBAUjC,0BAA0B;;;;wBAI1B,+BAA+B;;;;wBAI/B,iCAAiC;;;;;;wBAMjC,0BAA0B;;;;wBAI1B,qBAAqB;aAChC,uBAAuB;;;;;wBAKZ,0BAA0B;aACrC,4BAA4B;;;;;wBAKjB,4BAA4B;aACvC,8BAA8B;;;;;;;wBAOnB,0BAA0B;;;;;YAKtC,iCAAiC;;;;YAIjC,mCAAmC;;;;wBAIvB,0BAA0B;aACrC,uBAAuB;;;;wBAIZ,+BAA+B;aAC1C,iCAAiC;;;;wBAItB,iCAAiC;aAC5C,mCAAmC;;;;;;;;;;;;;wBAaxB,0BAA0B;;;;;;;wBAO1B,8BAA8B;oBAClC,0BAA0B;aACjC,8BAA8B;;;CAG1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.template.js","sourceRoot":"","sources":["../../../src/button/button.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAG5D;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAgC,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.js","sourceRoot":"","sources":["../../../src/button/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,UAAU,CAAC,MAAM,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './button.js';
|
|
2
|
+
export * from './button.options.js';
|
|
3
|
+
export { template as ButtonTemplate } from './button.template.js';
|
|
4
|
+
export { styles as ButtonStyles } from './button.styles.js';
|
|
5
|
+
export { definition as ButtonDefinition } from './button.definition.js';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/button/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -2,13 +2,18 @@ export * from './accordion/index.js';
|
|
|
2
2
|
export * from './accordion-item/index.js';
|
|
3
3
|
export * from './avatar/index.js';
|
|
4
4
|
export * from './badge/index.js';
|
|
5
|
+
export * from './button/index.js';
|
|
5
6
|
export * from './counter-badge/index.js';
|
|
6
7
|
export * from './divider/index.js';
|
|
7
8
|
export * from './image/index.js';
|
|
9
|
+
export * from './menu-button/index.js';
|
|
8
10
|
export * from './progress-bar/index.js';
|
|
9
11
|
export * from './slider/index.js';
|
|
10
12
|
export * from './spinner/index.js';
|
|
11
13
|
export * from './switch/index.js';
|
|
14
|
+
export * from './tabs/index.js';
|
|
15
|
+
export * from './tab/index.js';
|
|
16
|
+
export * from './tab-panel/index.js';
|
|
12
17
|
export * from './text/index.js';
|
|
13
18
|
export * from './theme/index.js';
|
|
14
19
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.js","sourceRoot":"","sources":["../../../src/menu-button/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,UAAU,CAAC,MAAM,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './menu-button.js';
|
|
2
|
+
export * from './menu-button.options.js';
|
|
3
|
+
export { template as MenuButtonTemplate } from './menu-button.template.js';
|
|
4
|
+
export { styles as MenuButtonStyles } from '../button/button.styles.js';
|
|
5
|
+
export { definition as MenuButtonDefinition } from './menu-button.definition.js';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/menu-button/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,QAAQ,IAAI,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,UAAU,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FluentDesignSystem } from '../fluent-design-system.js';
|
|
2
|
+
import { styles } from '../button/button.styles.js';
|
|
3
|
+
import { MenuButton } from './menu-button.js';
|
|
4
|
+
import { template } from './menu-button.template.js';
|
|
5
|
+
/**
|
|
6
|
+
* The Fluent Menu Button Element. Implements {@link @microsoft/fast-foundation#Button },
|
|
7
|
+
* {@link @microsoft/fast-foundation#buttonTemplate}
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
* @remarks
|
|
11
|
+
* HTML Element: \<fluent-button\>
|
|
12
|
+
*/
|
|
13
|
+
export const definition = MenuButton.compose({
|
|
14
|
+
name: `${FluentDesignSystem.prefix}-menu-button`,
|
|
15
|
+
template,
|
|
16
|
+
styles,
|
|
17
|
+
shadowOptions: {
|
|
18
|
+
delegatesFocus: true,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=menu-button.definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-button.definition.js","sourceRoot":"","sources":["../../../src/menu-button/menu-button.definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC;IAC3C,IAAI,EAAE,GAAG,kBAAkB,CAAC,MAAM,cAAc;IAChD,QAAQ;IACR,MAAM;IACN,aAAa,EAAE;QACb,cAAc,EAAE,IAAI;KACrB;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-button.js","sourceRoot":"","sources":["../../../src/menu-button/menu-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C;;;GAGG;AACH,MAAM,OAAO,UAAW,SAAQ,MAAM;CAAG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ButtonAppearance, ButtonShape, ButtonSize } from '../button/button.options.js';
|
|
2
|
+
/**
|
|
3
|
+
* Menu Button Appearance constants
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export const MenuButtonAppearance = ButtonAppearance;
|
|
7
|
+
/**
|
|
8
|
+
* A Menu Button can be square, circular or rounded.
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export const MenuButtonShape = ButtonShape;
|
|
12
|
+
/**
|
|
13
|
+
* A Menu Button can be a size of small, medium or large.
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export const MenuButtonSize = ButtonSize;
|
|
17
|
+
//# sourceMappingURL=menu-button.options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-button.options.js","sourceRoot":"","sources":["../../../src/menu-button/menu-button.options.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAExF;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,gBAAgB,CAAC;AAQrD;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;AAQ3C;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { html } from '@microsoft/fast-element';
|
|
2
|
+
import { buttonTemplate } from '@microsoft/fast-foundation';
|
|
3
|
+
/**
|
|
4
|
+
* The template for the Button component.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export const template = buttonTemplate({
|
|
8
|
+
end: html.partial(`<svg slot="end" fill="currentColor" aria-hidden="true" width="1em" height="1em" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.85 7.65c.2.2.2.5 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.16c.2-.2.5-.2.7 0Z" fill="currentColor"></path></svg>`),
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=menu-button.template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-button.template.js","sourceRoot":"","sources":["../../../src/menu-button/menu-button.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAG5D;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAoC,cAAc,CAAa;IAClF,GAAG,EAAE,IAAI,CAAC,OAAO,CACf,ySAAyS,CAC1S;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.js","sourceRoot":"","sources":["../../../src/tab/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,UAAU,CAAC,MAAM,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tab/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,QAAQ,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,UAAU,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FluentDesignSystem } from '../fluent-design-system.js';
|
|
2
|
+
import { Tab } from './tab.js';
|
|
3
|
+
import { template } from './tab.template.js';
|
|
4
|
+
import { styles } from './tab.styles.js';
|
|
5
|
+
export const definition = Tab.compose({
|
|
6
|
+
name: `${FluentDesignSystem.prefix}-tab`,
|
|
7
|
+
template,
|
|
8
|
+
styles,
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=tab.definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab.definition.js","sourceRoot":"","sources":["../../../src/tab/tab.definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC;IACpC,IAAI,EAAE,GAAG,kBAAkB,CAAC,MAAM,MAAM;IACxC,QAAQ;IACR,MAAM;CACP,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { css } from '@microsoft/fast-element';
|
|
2
|
+
import { FASTTab } from '@microsoft/fast-foundation';
|
|
3
|
+
/**
|
|
4
|
+
* Tab extends the FASTTab and is a child of the TabList
|
|
5
|
+
*/
|
|
6
|
+
export class Tab extends FASTTab {
|
|
7
|
+
connectedCallback() {
|
|
8
|
+
super.connectedCallback();
|
|
9
|
+
if (this.styles !== undefined) {
|
|
10
|
+
this.$fastController.removeStyles(this.styles);
|
|
11
|
+
}
|
|
12
|
+
this.styles = css /**css*/ `
|
|
13
|
+
:host {
|
|
14
|
+
--textContent: '${this.textContent}';
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
17
|
+
this.$fastController.addStyles(this.styles);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=tab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab.js","sourceRoot":"","sources":["../../../src/tab/tab.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAiB,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD;;GAEG;AACH,MAAM,OAAO,GAAI,SAAQ,OAAO;IAG9B,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAE1B,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE;YAC7B,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAChD;QAED,IAAI,CAAC,MAAM,GAAG,GAAG,CAAA,QAAQ,CAAC;;0BAEJ,IAAI,CAAC,WAAkB;;KAE5C,CAAC;QAEF,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;CACF"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { css } from '@microsoft/fast-element';
|
|
2
|
+
import { display } from '@microsoft/fast-foundation';
|
|
3
|
+
import { borderRadiusCircular, borderRadiusMedium, borderRadiusSmall, colorCompoundBrandStroke, colorNeutralForeground1, colorNeutralForeground2, colorNeutralForegroundDisabled, colorNeutralStroke1Hover, colorStrokeFocus1, colorStrokeFocus2, fontFamilyBase, fontSizeBase300, fontWeightSemibold, lineHeightBase300, spacingHorizontalM, spacingHorizontalMNudge, } from '../theme/design-tokens.js';
|
|
4
|
+
export const styles = css `
|
|
5
|
+
${display('inline-flex')}
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
position: relative;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
line-height: ${lineHeightBase300};
|
|
14
|
+
font-family: ${fontFamilyBase};
|
|
15
|
+
font-size: ${fontSizeBase300};
|
|
16
|
+
color: ${colorNeutralForeground2};
|
|
17
|
+
fill: currentcolor;
|
|
18
|
+
grid-row: 1;
|
|
19
|
+
padding: ${spacingHorizontalM} ${spacingHorizontalMNudge};
|
|
20
|
+
border-radius: ${borderRadiusMedium};
|
|
21
|
+
}
|
|
22
|
+
:host .tab-content {
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
padding: 0 2px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host([aria-selected='true']) {
|
|
29
|
+
color: ${colorNeutralForeground1};
|
|
30
|
+
font-weight: ${fontWeightSemibold};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* adds hidden textContent to prevent shifting ui on bold / unbolding of text */
|
|
34
|
+
:host .tab-content::after {
|
|
35
|
+
content: var(--textContent);
|
|
36
|
+
visibility: hidden;
|
|
37
|
+
height: 0;
|
|
38
|
+
line-height: ${lineHeightBase300};
|
|
39
|
+
font-weight: ${fontWeightSemibold};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host([aria-selected='true'])::after {
|
|
43
|
+
background-color: ${colorCompoundBrandStroke};
|
|
44
|
+
border-radius: ${borderRadiusCircular};
|
|
45
|
+
content: '';
|
|
46
|
+
inset: 0;
|
|
47
|
+
position: absolute;
|
|
48
|
+
z-index: 2;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:host([aria-selected='false']:hover)::after {
|
|
52
|
+
background-color: ${colorNeutralStroke1Hover};
|
|
53
|
+
border-radius: ${borderRadiusCircular};
|
|
54
|
+
content: '';
|
|
55
|
+
inset: 0;
|
|
56
|
+
position: absolute;
|
|
57
|
+
z-index: 1;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host([aria-selected='true'][disabled])::after {
|
|
61
|
+
background-color: ${colorNeutralForegroundDisabled};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
::slotted([slot='start']),
|
|
65
|
+
::slotted([slot='end']) {
|
|
66
|
+
display: flex;
|
|
67
|
+
}
|
|
68
|
+
::slotted([slot='start']) {
|
|
69
|
+
margin-inline-end: 11px;
|
|
70
|
+
}
|
|
71
|
+
::slotted([slot='end']) {
|
|
72
|
+
margin-inline-start: 11px;
|
|
73
|
+
}
|
|
74
|
+
:host([disabled]) {
|
|
75
|
+
cursor: not-allowed;
|
|
76
|
+
fill: ${colorNeutralForegroundDisabled};
|
|
77
|
+
color: ${colorNeutralForegroundDisabled};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:host([disabled]:hover)::after {
|
|
81
|
+
background-color: unset;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
:host(:focus) {
|
|
85
|
+
outline: none;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
:host(:focus-visible) {
|
|
89
|
+
border-radius: ${borderRadiusSmall};
|
|
90
|
+
box-shadow: 0 0 0 3px ${colorStrokeFocus2};
|
|
91
|
+
outline: 1px solid ${colorStrokeFocus1};
|
|
92
|
+
}
|
|
93
|
+
`;
|
|
94
|
+
//# sourceMappingURL=tab.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab.styles.js","sourceRoot":"","sources":["../../../src/tab/tab.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,8BAA8B,EAC9B,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;IACrB,OAAO,CAAC,aAAa,CAAC;;;;;;;;mBAQP,iBAAiB;mBACjB,cAAc;iBAChB,eAAe;aACnB,uBAAuB;;;eAGrB,kBAAkB,IAAI,uBAAuB;qBACvC,kBAAkB;;;;;;;;;aAS1B,uBAAuB;mBACjB,kBAAkB;;;;;;;;mBAQlB,iBAAiB;mBACjB,kBAAkB;;;;wBAIb,wBAAwB;qBAC3B,oBAAoB;;;;;;;;wBAQjB,wBAAwB;qBAC3B,oBAAoB;;;;;;;;wBAQjB,8BAA8B;;;;;;;;;;;;;;;YAe1C,8BAA8B;aAC7B,8BAA8B;;;;;;;;;;;;qBAYtB,iBAAiB;4BACV,iBAAiB;yBACpB,iBAAiB;;CAEzC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { endSlotTemplate, startSlotTemplate } from '@microsoft/fast-foundation';
|
|
2
|
+
import { html } from '@microsoft/fast-element';
|
|
3
|
+
export function tabTemplate(options = {}) {
|
|
4
|
+
return html `
|
|
5
|
+
<template slot="tab" role="tab" aria-disabled="${x => x.disabled}">
|
|
6
|
+
${startSlotTemplate(options)}
|
|
7
|
+
<span class="tab-content"><slot></slot></span>
|
|
8
|
+
${endSlotTemplate(options)}
|
|
9
|
+
</template>
|
|
10
|
+
`;
|
|
11
|
+
}
|
|
12
|
+
export const template = tabTemplate({});
|
|
13
|
+
//# sourceMappingURL=tab.template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab.template.js","sourceRoot":"","sources":["../../../src/tab/tab.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAW,iBAAiB,EAAc,MAAM,4BAA4B,CAAC;AACrG,OAAO,EAAuB,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpE,MAAM,UAAU,WAAW,CAAoB,UAAsB,EAAE;IACrE,OAAO,IAAI,CAAG;qDACqC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ;QAC5D,iBAAiB,CAAC,OAAO,CAAC;;QAE1B,eAAe,CAAC,OAAO,CAAC;;GAE7B,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.js","sourceRoot":"","sources":["../../../src/tab-panel/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,UAAU,CAAC,MAAM,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from './tab-panel.js';
|
|
2
|
+
export { template as TabPanelTemplate } from './tab-panel.template.js';
|
|
3
|
+
export { styles as TabPanelStyles } from './tab-panel.styles.js';
|
|
4
|
+
export { definition as TabPanelDefinition } from './tab-panel.definition.js';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tab-panel/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,QAAQ,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,UAAU,IAAI,kBAAkB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FluentDesignSystem } from '../fluent-design-system.js';
|
|
2
|
+
import { TabPanel } from './tab-panel.js';
|
|
3
|
+
import { template } from './tab-panel.template.js';
|
|
4
|
+
import { styles } from './tab-panel.styles.js';
|
|
5
|
+
export const definition = TabPanel.compose({
|
|
6
|
+
name: `${FluentDesignSystem.prefix}-tab-panel`,
|
|
7
|
+
template,
|
|
8
|
+
styles,
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=tab-panel.definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab-panel.definition.js","sourceRoot":"","sources":["../../../src/tab-panel/tab-panel.definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,OAAO,CAAC;IACzC,IAAI,EAAE,GAAG,kBAAkB,CAAC,MAAM,YAAY;IAC9C,QAAQ;IACR,MAAM;CACP,CAAC,CAAC"}
|