@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
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,57 @@
|
|
|
2
2
|
"name": "@fluentui/web-components",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 06 Apr 2023 04:22:02 GMT",
|
|
6
|
+
"tag": "@fluentui/web-components_v3.0.0-alpha.14",
|
|
7
|
+
"version": "3.0.0-alpha.14",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "mibaraka@microsoft.com",
|
|
12
|
+
"package": "@fluentui/web-components",
|
|
13
|
+
"commit": "55024b9a8799834f6d102445218ffd724a125913",
|
|
14
|
+
"comment": "Adding TabList, Tab, and TabPanel web components"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "chhol@microsoft.com",
|
|
18
|
+
"package": "@fluentui/web-components",
|
|
19
|
+
"commit": "2a1f8f60205b064140fab122cced18b06177546d",
|
|
20
|
+
"comment": "feat(menu-button): add menu button as new component"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"none": [
|
|
24
|
+
{
|
|
25
|
+
"author": "chhol@microsoft.com",
|
|
26
|
+
"package": "@fluentui/web-components",
|
|
27
|
+
"commit": "ca6e4dd7ed8476810a51384f0e44b54989cc0b66",
|
|
28
|
+
"comment": "chore(web-components): fixes the alphabetical order of package exports"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"date": "Fri, 31 Mar 2023 04:19:43 GMT",
|
|
35
|
+
"tag": "@fluentui/web-components_v3.0.0-alpha.13",
|
|
36
|
+
"version": "3.0.0-alpha.13",
|
|
37
|
+
"comments": {
|
|
38
|
+
"prerelease": [
|
|
39
|
+
{
|
|
40
|
+
"author": "chhol@microsoft.com",
|
|
41
|
+
"package": "@fluentui/web-components",
|
|
42
|
+
"commit": "7f5a5e507a3902a9703d5198a13cc96335c82eaa",
|
|
43
|
+
"comment": "update fast-element and fast-foundation dependencies"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"author": "chhol@microsoft.com",
|
|
47
|
+
"package": "@fluentui/web-components",
|
|
48
|
+
"commit": "d901fa95e8f90c1b5dabda8602a72ecb77288f0c",
|
|
49
|
+
"comment": "feat(button): add button web component"
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"date": "Tue, 28 Mar 2023 04:20:01 GMT",
|
|
6
56
|
"tag": "@fluentui/web-components_v3.0.0-alpha.12",
|
|
7
57
|
"version": "3.0.0-alpha.12",
|
|
8
58
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,32 @@
|
|
|
1
1
|
# Change Log - @fluentui/web-components
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 06 Apr 2023 04:22:02 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [3.0.0-alpha.14](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-alpha.14)
|
|
8
|
+
|
|
9
|
+
Thu, 06 Apr 2023 04:22:02 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-alpha.13..@fluentui/web-components_v3.0.0-alpha.14)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- Adding TabList, Tab, and TabPanel web components ([PR #27167](https://github.com/microsoft/fluentui/pull/27167) by mibaraka@microsoft.com)
|
|
15
|
+
- feat(menu-button): add menu button as new component ([PR #27396](https://github.com/microsoft/fluentui/pull/27396) by chhol@microsoft.com)
|
|
16
|
+
|
|
17
|
+
## [3.0.0-alpha.13](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-alpha.13)
|
|
18
|
+
|
|
19
|
+
Fri, 31 Mar 2023 04:19:43 GMT
|
|
20
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-alpha.12..@fluentui/web-components_v3.0.0-alpha.13)
|
|
21
|
+
|
|
22
|
+
### Changes
|
|
23
|
+
|
|
24
|
+
- update fast-element and fast-foundation dependencies ([PR #27392](https://github.com/microsoft/fluentui/pull/27392) by chhol@microsoft.com)
|
|
25
|
+
- feat(button): add button web component ([PR #27278](https://github.com/microsoft/fluentui/pull/27278) by chhol@microsoft.com)
|
|
26
|
+
|
|
7
27
|
## [3.0.0-alpha.12](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-alpha.12)
|
|
8
28
|
|
|
9
|
-
Tue, 28 Mar 2023 04:
|
|
29
|
+
Tue, 28 Mar 2023 04:20:01 GMT
|
|
10
30
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-alpha.11..@fluentui/web-components_v3.0.0-alpha.12)
|
|
11
31
|
|
|
12
32
|
### Changes
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { FASTButton } from '@microsoft/fast-foundation';
|
|
2
|
+
import { ButtonAppearance, ButtonShape, ButtonSize } from './button.options.js';
|
|
3
|
+
/**
|
|
4
|
+
* The base class used for constructing a fluent-button custom element
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare class Button extends FASTButton {
|
|
8
|
+
/**
|
|
9
|
+
* The appearance the button should have.
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
* @remarks
|
|
13
|
+
* HTML Attribute: appearance
|
|
14
|
+
*/
|
|
15
|
+
appearance?: ButtonAppearance | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* The shape the button should have.
|
|
18
|
+
*
|
|
19
|
+
* @public
|
|
20
|
+
* @remarks
|
|
21
|
+
* HTML Attribute: shape
|
|
22
|
+
*/
|
|
23
|
+
shape?: ButtonShape | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* The size the button should have.
|
|
26
|
+
*
|
|
27
|
+
* @public
|
|
28
|
+
* @remarks
|
|
29
|
+
* HTML Attribute: size
|
|
30
|
+
*/
|
|
31
|
+
size?: ButtonSize;
|
|
32
|
+
/**
|
|
33
|
+
* The button has an icon only, no text content
|
|
34
|
+
*
|
|
35
|
+
* @public
|
|
36
|
+
* @remarks
|
|
37
|
+
* HTML Attribute: icon-only
|
|
38
|
+
*/
|
|
39
|
+
iconOnly: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* The button is disabled but focusable
|
|
42
|
+
*
|
|
43
|
+
* @public
|
|
44
|
+
* @remarks
|
|
45
|
+
* HTML Attribute: disabled-focusable
|
|
46
|
+
*/
|
|
47
|
+
disabledFocusable?: boolean;
|
|
48
|
+
protected disabledFocusableChanged(prev: boolean, next: boolean): void;
|
|
49
|
+
/**
|
|
50
|
+
* Prevents disabledFocusable click events
|
|
51
|
+
*/
|
|
52
|
+
private handleDisabledFocusableClick;
|
|
53
|
+
connectedCallback(): void;
|
|
54
|
+
disconnectedCallback(): void;
|
|
55
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Button } from './button.js';
|
|
2
|
+
/**
|
|
3
|
+
* The Fluent Button Element. Implements {@link @microsoft/fast-foundation#Button },
|
|
4
|
+
* {@link @microsoft/fast-foundation#buttonTemplate}
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
* @remarks
|
|
8
|
+
* HTML Element: \<fluent-button\>
|
|
9
|
+
*/
|
|
10
|
+
export declare const definition: import("@microsoft/fast-element").FASTElementDefinition<typeof Button>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ButtonOptions, ValuesOf } from '@microsoft/fast-foundation';
|
|
2
|
+
/**
|
|
3
|
+
* ButtonAppearance constants
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare const ButtonAppearance: {
|
|
7
|
+
readonly primary: "primary";
|
|
8
|
+
readonly outline: "outline";
|
|
9
|
+
readonly subtle: "subtle";
|
|
10
|
+
readonly secondary: "secondary";
|
|
11
|
+
readonly transparent: "transparent";
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* A Button can be secondary, primary, outline, subtle, transparent
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export declare type ButtonAppearance = ValuesOf<typeof ButtonAppearance>;
|
|
18
|
+
/**
|
|
19
|
+
* A Button can be square, circular or rounded.
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export declare const ButtonShape: {
|
|
23
|
+
readonly circular: "circular";
|
|
24
|
+
readonly rounded: "rounded";
|
|
25
|
+
readonly square: "square";
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* A Button can be square, circular or rounded
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export declare type ButtonShape = ValuesOf<typeof ButtonShape>;
|
|
32
|
+
/**
|
|
33
|
+
* A Button can be a size of small, medium or large.
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
export declare const ButtonSize: {
|
|
37
|
+
readonly small: "small";
|
|
38
|
+
readonly medium: "medium";
|
|
39
|
+
readonly large: "large";
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* A Button can be on of several preset sizes.
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
export declare type ButtonSize = ValuesOf<typeof ButtonSize>;
|
|
46
|
+
export { ButtonOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("@microsoft/fast-element").ElementStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
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';
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -2,12 +2,17 @@ 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';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
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';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MenuButton } from './menu-button.js';
|
|
2
|
+
/**
|
|
3
|
+
* The Fluent Menu Button Element. Implements {@link @microsoft/fast-foundation#Button },
|
|
4
|
+
* {@link @microsoft/fast-foundation#buttonTemplate}
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
* @remarks
|
|
8
|
+
* HTML Element: \<fluent-button\>
|
|
9
|
+
*/
|
|
10
|
+
export declare const definition: import("@microsoft/fast-element").FASTElementDefinition<typeof MenuButton>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ButtonOptions, ValuesOf } from '@microsoft/fast-foundation';
|
|
2
|
+
/**
|
|
3
|
+
* Menu Button Appearance constants
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare const MenuButtonAppearance: {
|
|
7
|
+
readonly primary: "primary";
|
|
8
|
+
readonly outline: "outline";
|
|
9
|
+
readonly subtle: "subtle";
|
|
10
|
+
readonly secondary: "secondary";
|
|
11
|
+
readonly transparent: "transparent";
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* A Menu Button can be secondary, primary, outline, subtle, transparent
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export declare type MenuButtonAppearance = ValuesOf<typeof MenuButtonAppearance>;
|
|
18
|
+
/**
|
|
19
|
+
* A Menu Button can be square, circular or rounded.
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export declare const MenuButtonShape: {
|
|
23
|
+
readonly circular: "circular";
|
|
24
|
+
readonly rounded: "rounded";
|
|
25
|
+
readonly square: "square";
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* A Menu Button can be square, circular or rounded
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export declare type MenuButtonShape = ValuesOf<typeof MenuButtonShape>;
|
|
32
|
+
/**
|
|
33
|
+
* A Menu Button can be a size of small, medium or large.
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
export declare const MenuButtonSize: {
|
|
37
|
+
readonly small: "small";
|
|
38
|
+
readonly medium: "medium";
|
|
39
|
+
readonly large: "large";
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* A Menu Button can be on of several preset sizes.
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
export declare type MenuButtonSize = ValuesOf<typeof MenuButtonSize>;
|
|
46
|
+
export { ButtonOptions as MenuButtonOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("@microsoft/fast-element").ElementStyles;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FASTTab, TabOptions } from '@microsoft/fast-foundation';
|
|
2
|
+
import { ElementViewTemplate } from '@microsoft/fast-element';
|
|
3
|
+
export declare function tabTemplate<T extends FASTTab>(options?: TabOptions): ElementViewTemplate<T>;
|
|
4
|
+
export declare const template: ElementViewTemplate<FASTTab, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("@microsoft/fast-element").ElementStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const template: import("@microsoft/fast-element").ElementViewTemplate<import("@microsoft/fast-foundation").FASTTabPanel, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { FASTTabs } from '@microsoft/fast-foundation';
|
|
2
|
+
import { TabsAppearance, TabsSize } from './tabs.options.js';
|
|
3
|
+
/**
|
|
4
|
+
* TabList extends FASTTabs and is used for constructing a fluent-tab-list custom html element.
|
|
5
|
+
*
|
|
6
|
+
* @class TabList component
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export declare class Tabs extends FASTTabs {
|
|
10
|
+
/**
|
|
11
|
+
* activeTabData
|
|
12
|
+
* The positional coordinates and size dimensions of the active tab. Used for calculating the offset and scale of the tab active indicator.
|
|
13
|
+
*/
|
|
14
|
+
private activeTabData;
|
|
15
|
+
/**
|
|
16
|
+
* previousActiveTabData
|
|
17
|
+
* The positional coordinates and size dimensions of the active tab. Used for calculating the offset and scale of the tab active indicator.
|
|
18
|
+
*/
|
|
19
|
+
private previousActiveTabData;
|
|
20
|
+
/**
|
|
21
|
+
* activeTabOffset
|
|
22
|
+
* Used to position the active indicator for animations of the active indicator on active tab changes.
|
|
23
|
+
*/
|
|
24
|
+
private activeTabOffset;
|
|
25
|
+
/**
|
|
26
|
+
* activeTabScale
|
|
27
|
+
* Used to scale the tab active indicator up or down as animations of the active indicator occur.
|
|
28
|
+
*/
|
|
29
|
+
private activeTabScale;
|
|
30
|
+
/**
|
|
31
|
+
* styles
|
|
32
|
+
* used in the class for storing the css variables required for animations
|
|
33
|
+
*/
|
|
34
|
+
private styles;
|
|
35
|
+
/**
|
|
36
|
+
* appearance
|
|
37
|
+
* There are two modes of appearance: transparent and subtle.
|
|
38
|
+
*/
|
|
39
|
+
appearance?: TabsAppearance;
|
|
40
|
+
/**
|
|
41
|
+
* disabled
|
|
42
|
+
* Used for disabling all click and keyboard events for the tabs, child tab elements and tab panel elements. UI styling of content and tabs will appear as "grayed out."
|
|
43
|
+
*/
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* size
|
|
47
|
+
* defaults to medium.
|
|
48
|
+
* Used to set the size of all the tab controls, which effects text size and margins. Three sizes: small, medium and large.
|
|
49
|
+
*/
|
|
50
|
+
size?: TabsSize;
|
|
51
|
+
/**
|
|
52
|
+
* calculateAnimationProperties
|
|
53
|
+
*
|
|
54
|
+
* Recalculates the active tab offset and scale.
|
|
55
|
+
* These values will be applied to css variables that control the tab active indicator position animations
|
|
56
|
+
*/
|
|
57
|
+
private calculateAnimationProperties;
|
|
58
|
+
/**
|
|
59
|
+
* getSelectedTabPosition - gets the x or y coordinates of the tab
|
|
60
|
+
*/
|
|
61
|
+
private getTabPosition;
|
|
62
|
+
/**
|
|
63
|
+
* getSelectedTabScale - gets the scale of the tab
|
|
64
|
+
*/
|
|
65
|
+
private getTabScale;
|
|
66
|
+
/**
|
|
67
|
+
* applyUpdatedCSSValues
|
|
68
|
+
*
|
|
69
|
+
* calculates and applies updated values to CSS variables
|
|
70
|
+
* @param tab
|
|
71
|
+
*/
|
|
72
|
+
private applyUpdatedCSSValues;
|
|
73
|
+
/**
|
|
74
|
+
* animationLoop
|
|
75
|
+
* runs through all the operations required for setting the tab active indicator to its starting location, ending location, and applying the animated css class to the tab.
|
|
76
|
+
* @param tab
|
|
77
|
+
*/
|
|
78
|
+
private animationLoop;
|
|
79
|
+
/**
|
|
80
|
+
* setTabData
|
|
81
|
+
* sets the data from the active tab onto the class. used for making all the animation calculations for the active tab indicator.
|
|
82
|
+
*/
|
|
83
|
+
private setTabData;
|
|
84
|
+
private setTabOffsetCSSVar;
|
|
85
|
+
private setTabScaleCSSVar;
|
|
86
|
+
activeidChanged(oldValue: string, newValue: string): void;
|
|
87
|
+
tabsChanged(): void;
|
|
88
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ValuesOf } from '@microsoft/fast-foundation';
|
|
2
|
+
import { TabsOrientation } from '@microsoft/fast-foundation';
|
|
3
|
+
export declare const TabsAppearance: {
|
|
4
|
+
readonly subtle: "subtle";
|
|
5
|
+
readonly transparent: "transparent";
|
|
6
|
+
};
|
|
7
|
+
export declare type TabsAppearance = ValuesOf<typeof TabsAppearance>;
|
|
8
|
+
export declare const TabsSize: {
|
|
9
|
+
readonly small: "small";
|
|
10
|
+
readonly medium: "medium";
|
|
11
|
+
readonly large: "large";
|
|
12
|
+
};
|
|
13
|
+
export declare type TabsSize = ValuesOf<typeof TabsSize>;
|
|
14
|
+
export { TabsOrientation };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("@microsoft/fast-element").ElementStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const template: import("@microsoft/fast-element").ElementViewTemplate<import("@microsoft/fast-foundation").FASTTabs, any>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FluentDesignSystem } from '../fluent-design-system.js';
|
|
2
|
+
import { Button } from './button.js';
|
|
3
|
+
import { styles } from './button.styles.js';
|
|
4
|
+
import { template } from './button.template.js';
|
|
5
|
+
/**
|
|
6
|
+
* The Fluent 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 = Button.compose({
|
|
14
|
+
name: `${FluentDesignSystem.prefix}-button`,
|
|
15
|
+
template,
|
|
16
|
+
styles,
|
|
17
|
+
shadowOptions: {
|
|
18
|
+
delegatesFocus: true,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=button.definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.definition.js","sourceRoot":"","sources":["../../../src/button/button.definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC;IACvC,IAAI,EAAE,GAAG,kBAAkB,CAAC,MAAM,SAAS;IAC3C,QAAQ;IACR,MAAM;IACN,aAAa,EAAE;QACb,cAAc,EAAE,IAAI;KACrB;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { attr } from '@microsoft/fast-element';
|
|
3
|
+
import { FASTButton } from '@microsoft/fast-foundation';
|
|
4
|
+
/**
|
|
5
|
+
* The base class used for constructing a fluent-button custom element
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export class Button extends FASTButton {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
/**
|
|
12
|
+
* The button has an icon only, no text content
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
15
|
+
* @remarks
|
|
16
|
+
* HTML Attribute: icon-only
|
|
17
|
+
*/
|
|
18
|
+
this.iconOnly = false;
|
|
19
|
+
/**
|
|
20
|
+
* The button is disabled but focusable
|
|
21
|
+
*
|
|
22
|
+
* @public
|
|
23
|
+
* @remarks
|
|
24
|
+
* HTML Attribute: disabled-focusable
|
|
25
|
+
*/
|
|
26
|
+
this.disabledFocusable = false;
|
|
27
|
+
/**
|
|
28
|
+
* Prevents disabledFocusable click events
|
|
29
|
+
*/
|
|
30
|
+
this.handleDisabledFocusableClick = (e) => {
|
|
31
|
+
if (e && this.disabledFocusable) {
|
|
32
|
+
e.stopImmediatePropagation();
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
disabledFocusableChanged(prev, next) {
|
|
38
|
+
if (!this.$fastController.isConnected) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (this.disabledFocusable) {
|
|
42
|
+
this.setAttribute('aria-disabled', 'true');
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
this.removeAttribute('aria-disabled');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
connectedCallback() {
|
|
49
|
+
super.connectedCallback();
|
|
50
|
+
this.addEventListener('click', this.handleDisabledFocusableClick);
|
|
51
|
+
}
|
|
52
|
+
disconnectedCallback() {
|
|
53
|
+
super.disconnectedCallback();
|
|
54
|
+
this.removeEventListener('click', this.handleDisabledFocusableClick);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
__decorate([
|
|
58
|
+
attr
|
|
59
|
+
], Button.prototype, "appearance", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
attr
|
|
62
|
+
], Button.prototype, "shape", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
attr
|
|
65
|
+
], Button.prototype, "size", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
attr({ attribute: 'icon-only', mode: 'boolean' })
|
|
68
|
+
], Button.prototype, "iconOnly", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
attr({ attribute: 'disabled-focusable', mode: 'boolean' })
|
|
71
|
+
], Button.prototype, "disabledFocusable", void 0);
|
|
72
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/button/button.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAGxD;;;GAGG;AACH,MAAM,OAAO,MAAO,SAAQ,UAAU;IAAtC;;QA+BE;;;;;;WAMG;QAEI,aAAQ,GAAY,KAAK,CAAC;QAEjC;;;;;;WAMG;QAEI,sBAAiB,GAAa,KAAK,CAAC;QAa3C;;WAEG;QACK,iCAA4B,GAAG,CAAC,CAAa,EAAQ,EAAE;YAC7D,IAAI,CAAC,IAAI,IAAI,CAAC,iBAAiB,EAAE;gBAC/B,CAAC,CAAC,wBAAwB,EAAE,CAAC;gBAC7B,OAAO;aACR;QACH,CAAC,CAAC;IAaJ,CAAC;IAjCW,wBAAwB,CAAC,IAAa,EAAE,IAAa;QAC7D,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE;YACrC,OAAO;SACR;QAED,IAAI,IAAI,CAAC,iBAAiB,EAAE;YACxB,IAAgC,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;SAC1E;aAAM;YACH,IAAgC,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;SACrE;IACH,CAAC;IAYM,iBAAiB;QACtB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAExB,IAAgC,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,4BAA4B,CAAC,CAAC;IAClG,CAAC;IAEM,oBAAoB;QACzB,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAE3B,IAAgC,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,4BAA4B,CAAC,CAAC;IACrG,CAAC;CACF;AA1EC;IADC,IAAI;0CAC4C;AAUjD;IADC,IAAI;qCACkC;AAUvC;IADC,IAAI;oCACoB;AAUzB;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;wCACjB;AAUjC;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,oBAAoB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;iDAChB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ButtonAppearance constants
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export const ButtonAppearance = {
|
|
6
|
+
primary: 'primary',
|
|
7
|
+
outline: 'outline',
|
|
8
|
+
subtle: 'subtle',
|
|
9
|
+
secondary: 'secondary',
|
|
10
|
+
transparent: 'transparent',
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* A Button can be square, circular or rounded.
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export const ButtonShape = {
|
|
17
|
+
circular: 'circular',
|
|
18
|
+
rounded: 'rounded',
|
|
19
|
+
square: 'square',
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* A Button can be a size of small, medium or large.
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
export const ButtonSize = {
|
|
26
|
+
small: 'small',
|
|
27
|
+
medium: 'medium',
|
|
28
|
+
large: 'large',
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=button.options.js.map
|