@fluentui/web-components 3.0.0-rc.1 → 3.0.0-rc.10
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 +84 -2
- package/custom-elements.json +705 -1223
- package/dist/esm/anchor-button/anchor-button.base.js +3 -0
- package/dist/esm/anchor-button/anchor-button.base.js.map +1 -1
- package/dist/esm/avatar/avatar.base.d.ts +20 -0
- package/dist/esm/avatar/avatar.base.js +37 -1
- package/dist/esm/avatar/avatar.base.js.map +1 -1
- package/dist/esm/avatar/avatar.js +1 -1
- package/dist/esm/avatar/avatar.js.map +1 -1
- package/dist/esm/avatar/avatar.styles.js +4 -4
- package/dist/esm/avatar/avatar.styles.js.map +1 -1
- package/dist/esm/avatar/avatar.template.js +2 -2
- package/dist/esm/avatar/avatar.template.js.map +1 -1
- package/dist/esm/badge/badge.options.d.ts +3 -1
- package/dist/esm/badge/badge.options.js.map +1 -1
- package/dist/esm/compound-button/compound-button.styles.js +1 -1
- package/dist/esm/compound-button/compound-button.styles.js.map +1 -1
- package/dist/esm/counter-badge/counter-badge.d.ts +2 -1
- package/dist/esm/counter-badge/counter-badge.js +2 -1
- package/dist/esm/counter-badge/counter-badge.js.map +1 -1
- package/dist/esm/dialog/dialog.d.ts +23 -8
- package/dist/esm/dialog/dialog.js +15 -6
- package/dist/esm/dialog/dialog.js.map +1 -1
- package/dist/esm/dialog/dialog.template.js.map +1 -1
- package/dist/esm/dialog-body/dialog-body.js +1 -1
- package/dist/esm/dialog-body/dialog-body.js.map +1 -1
- package/dist/esm/drawer/drawer.d.ts +18 -9
- package/dist/esm/drawer/drawer.js +12 -6
- package/dist/esm/drawer/drawer.js.map +1 -1
- package/dist/esm/drawer-body/drawer-body.js +1 -1
- package/dist/esm/drawer-body/drawer-body.js.map +1 -1
- package/dist/esm/index-rollup.d.ts +1 -2
- package/dist/esm/index-rollup.js +1 -2
- package/dist/esm/index-rollup.js.map +1 -1
- package/dist/esm/index.d.ts +2 -4
- package/dist/esm/index.js +0 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/menu-list/menu-list.js +4 -4
- package/dist/esm/menu-list/menu-list.js.map +1 -1
- package/dist/esm/message-bar/message-bar.d.ts +2 -1
- package/dist/esm/message-bar/message-bar.js +2 -1
- package/dist/esm/message-bar/message-bar.js.map +1 -1
- package/dist/esm/message-bar/message-bar.options.d.ts +6 -3
- package/dist/esm/message-bar/message-bar.options.js +6 -3
- package/dist/esm/message-bar/message-bar.options.js.map +1 -1
- package/dist/esm/progress-bar/progress-bar.base.d.ts +16 -4
- package/dist/esm/progress-bar/progress-bar.base.js +4 -1
- package/dist/esm/progress-bar/progress-bar.base.js.map +1 -1
- package/dist/esm/progress-bar/progress-bar.d.ts +8 -2
- package/dist/esm/progress-bar/progress-bar.js.map +1 -1
- package/dist/esm/styles/partials/badge.partials.d.ts +2 -1
- package/dist/esm/styles/partials/badge.partials.js +2 -1
- package/dist/esm/styles/partials/badge.partials.js.map +1 -1
- package/dist/esm/textarea/textarea.base.d.ts +5 -0
- package/dist/esm/textarea/textarea.base.js +4 -1
- package/dist/esm/textarea/textarea.base.js.map +1 -1
- package/dist/esm/textarea/textarea.template.js +1 -1
- package/dist/esm/textarea/textarea.template.js.map +1 -1
- package/dist/esm/theme/design-tokens.d.ts +115 -0
- package/dist/esm/theme/design-tokens.js +115 -0
- package/dist/esm/theme/design-tokens.js.map +1 -1
- package/dist/esm/theme/set-theme.d.ts +2 -2
- package/dist/esm/theme/set-theme.js +1 -1
- package/dist/esm/tree/tree.base.d.ts +1 -1
- package/dist/esm/tree/tree.base.js +1 -1
- package/dist/esm/tree/tree.base.js.map +1 -1
- package/dist/esm/tree/tree.d.ts +8 -2
- package/dist/esm/tree/tree.js +8 -2
- package/dist/esm/tree/tree.js.map +1 -1
- package/dist/esm/tree-item/tree-item.base.d.ts +8 -2
- package/dist/esm/tree-item/tree-item.base.js +8 -2
- package/dist/esm/tree-item/tree-item.base.js.map +1 -1
- package/dist/web-components.d.ts +256 -284
- package/dist/web-components.js +956 -1232
- package/dist/web-components.min.js +276 -270
- package/package.json +5 -6
- package/dist/esm/tab-panel/define.d.ts +0 -1
- package/dist/esm/tab-panel/define.js +0 -7
- package/dist/esm/tab-panel/define.js.map +0 -1
- package/dist/esm/tab-panel/index.d.ts +0 -4
- package/dist/esm/tab-panel/index.js +0 -5
- package/dist/esm/tab-panel/index.js.map +0 -1
- package/dist/esm/tab-panel/tab-panel.bench.d.ts +0 -3
- package/dist/esm/tab-panel/tab-panel.bench.js +0 -13
- package/dist/esm/tab-panel/tab-panel.bench.js.map +0 -1
- package/dist/esm/tab-panel/tab-panel.d.ts +0 -8
- package/dist/esm/tab-panel/tab-panel.definition.d.ts +0 -5
- package/dist/esm/tab-panel/tab-panel.definition.js +0 -13
- package/dist/esm/tab-panel/tab-panel.definition.js.map +0 -1
- package/dist/esm/tab-panel/tab-panel.js +0 -9
- package/dist/esm/tab-panel/tab-panel.js.map +0 -1
- package/dist/esm/tab-panel/tab-panel.styles.d.ts +0 -1
- package/dist/esm/tab-panel/tab-panel.styles.js +0 -12
- package/dist/esm/tab-panel/tab-panel.styles.js.map +0 -1
- package/dist/esm/tab-panel/tab-panel.template.d.ts +0 -7
- package/dist/esm/tab-panel/tab-panel.template.js +0 -13
- package/dist/esm/tab-panel/tab-panel.template.js.map +0 -1
- package/dist/esm/tabs/define.d.ts +0 -1
- package/dist/esm/tabs/define.js +0 -7
- package/dist/esm/tabs/define.js.map +0 -1
- package/dist/esm/tabs/index.d.ts +0 -6
- package/dist/esm/tabs/index.js +0 -6
- package/dist/esm/tabs/index.js.map +0 -1
- package/dist/esm/tabs/tabs.base.d.ts +0 -90
- package/dist/esm/tabs/tabs.base.js +0 -279
- package/dist/esm/tabs/tabs.base.js.map +0 -1
- package/dist/esm/tabs/tabs.bench.d.ts +0 -3
- package/dist/esm/tabs/tabs.bench.js +0 -32
- package/dist/esm/tabs/tabs.bench.js.map +0 -1
- package/dist/esm/tabs/tabs.d.ts +0 -100
- package/dist/esm/tabs/tabs.definition.d.ts +0 -5
- package/dist/esm/tabs/tabs.definition.js +0 -13
- package/dist/esm/tabs/tabs.definition.js.map +0 -1
- package/dist/esm/tabs/tabs.js +0 -180
- package/dist/esm/tabs/tabs.js.map +0 -1
- package/dist/esm/tabs/tabs.options.d.ts +0 -32
- package/dist/esm/tabs/tabs.options.js +0 -16
- package/dist/esm/tabs/tabs.options.js.map +0 -1
- package/dist/esm/tabs/tabs.styles.d.ts +0 -1
- package/dist/esm/tabs/tabs.styles.js +0 -230
- package/dist/esm/tabs/tabs.styles.js.map +0 -1
- package/dist/esm/tabs/tabs.template.d.ts +0 -8
- package/dist/esm/tabs/tabs.template.js +0 -19
- package/dist/esm/tabs/tabs.template.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.bench.js","sourceRoot":"","sources":["../../../src/tabs/tabs.bench.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,UAAU,IAAI,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,UAAU,IAAI,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AACxF,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEpE,aAAa,CAAC,MAAM,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;AAClD,kBAAkB,CAAC,MAAM,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;AACvD,cAAc,CAAC,MAAM,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;AAEnD,MAAM,YAAY,GAAG,GAAG,EAAE;IACxB,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IACnD,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;IAC5D,MAAM,SAAS,GAA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s/tabs.d.ts
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { StartEnd } from '../patterns/index.js';
|
|
2
|
-
import { BaseTabs } from './tabs.base.js';
|
|
3
|
-
import { TabsAppearance, type TabsSize } from './tabs.options.js';
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated - Use tablist instead
|
|
6
|
-
*
|
|
7
|
-
* @tag fluent-tabs
|
|
8
|
-
*/
|
|
9
|
-
export declare class Tabs extends BaseTabs {
|
|
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
|
-
* Calculates and applies updated values to CSS variables.
|
|
68
|
-
*
|
|
69
|
-
* @param tab - the tab element to apply the updated values to
|
|
70
|
-
* @internal
|
|
71
|
-
*/
|
|
72
|
-
private applyUpdatedCSSValues;
|
|
73
|
-
/**
|
|
74
|
-
* Runs through all the operations required for setting the tab active indicator to its starting location, ending
|
|
75
|
-
* location, and applying the animated css class to the tab.
|
|
76
|
-
*
|
|
77
|
-
* @param tab - the tab element to apply the updated values to
|
|
78
|
-
* @internal
|
|
79
|
-
*/
|
|
80
|
-
private animationLoop;
|
|
81
|
-
/**
|
|
82
|
-
* Gets the position data for a tab element relative to its parent
|
|
83
|
-
* @param tab - The tab element to get position data for
|
|
84
|
-
* @returns The position data for the tab
|
|
85
|
-
*/
|
|
86
|
-
private getTabPositionData;
|
|
87
|
-
/**
|
|
88
|
-
* Sets the data from the active tab onto the class. used for making all the animation calculations for the active
|
|
89
|
-
* tab indicator.
|
|
90
|
-
*
|
|
91
|
-
* @internal
|
|
92
|
-
*/
|
|
93
|
-
private setTabData;
|
|
94
|
-
private setTabOffsetCSSVar;
|
|
95
|
-
private setTabScaleCSSVar;
|
|
96
|
-
activeidChanged(oldValue: string, newValue: string): void;
|
|
97
|
-
tabsChanged(): void;
|
|
98
|
-
}
|
|
99
|
-
export interface Tabs extends StartEnd {
|
|
100
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FluentDesignSystem } from '../fluent-design-system.js';
|
|
2
|
-
import { Tabs } from './tabs.js';
|
|
3
|
-
import { template } from './tabs.template.js';
|
|
4
|
-
import { styles } from './tabs.styles.js';
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated - Use tablist instead
|
|
7
|
-
*/
|
|
8
|
-
export const definition = Tabs.compose({
|
|
9
|
-
name: `${FluentDesignSystem.prefix}-tabs`,
|
|
10
|
-
template,
|
|
11
|
-
styles,
|
|
12
|
-
});
|
|
13
|
-
//# sourceMappingURL=tabs.definition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.definition.js","sourceRoot":"","sources":["../../../src/tabs/tabs.definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC;IACrC,IAAI,EAAE,GAAG,kBAAkB,CAAC,MAAM,OAAO;IACzC,QAAQ;IACR,MAAM;CACP,CAAC,CAAC"}
|
package/dist/esm/tabs/tabs.js
DELETED
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { attr, css } from '@microsoft/fast-element';
|
|
3
|
-
import { applyMixins } from '../utils/apply-mixins.js';
|
|
4
|
-
import { StartEnd } from '../patterns/index.js';
|
|
5
|
-
import { BaseTabs } from './tabs.base.js';
|
|
6
|
-
import { TabsAppearance, TabsOrientation } from './tabs.options.js';
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated - Use tablist instead
|
|
9
|
-
*
|
|
10
|
-
* @tag fluent-tabs
|
|
11
|
-
*/
|
|
12
|
-
export class Tabs extends BaseTabs {
|
|
13
|
-
constructor() {
|
|
14
|
-
super(...arguments);
|
|
15
|
-
/**
|
|
16
|
-
* activeTabData
|
|
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
|
-
this.activeTabData = { x: 0, y: 0, height: 0, width: 0 };
|
|
20
|
-
/**
|
|
21
|
-
* previousActiveTabData
|
|
22
|
-
* The positional coordinates and size dimensions of the active tab. Used for calculating the offset and scale of the tab active indicator.
|
|
23
|
-
*/
|
|
24
|
-
this.previousActiveTabData = { x: 0, y: 0, height: 0, width: 0 };
|
|
25
|
-
/**
|
|
26
|
-
* activeTabOffset
|
|
27
|
-
* Used to position the active indicator for animations of the active indicator on active tab changes.
|
|
28
|
-
*/
|
|
29
|
-
this.activeTabOffset = 0;
|
|
30
|
-
/**
|
|
31
|
-
* activeTabScale
|
|
32
|
-
* Used to scale the tab active indicator up or down as animations of the active indicator occur.
|
|
33
|
-
*/
|
|
34
|
-
this.activeTabScale = 1;
|
|
35
|
-
/**
|
|
36
|
-
* appearance
|
|
37
|
-
* There are two modes of appearance: transparent and subtle.
|
|
38
|
-
*/
|
|
39
|
-
this.appearance = TabsAppearance.transparent;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* calculateAnimationProperties
|
|
43
|
-
*
|
|
44
|
-
* Recalculates the active tab offset and scale.
|
|
45
|
-
* These values will be applied to css variables that control the tab active indicator position animations
|
|
46
|
-
*/
|
|
47
|
-
calculateAnimationProperties(tab) {
|
|
48
|
-
this.activeTabOffset = this.getTabPosition(tab);
|
|
49
|
-
this.activeTabScale = this.getTabScale(tab);
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* getSelectedTabPosition - gets the x or y coordinates of the tab
|
|
53
|
-
*/
|
|
54
|
-
getTabPosition(tab) {
|
|
55
|
-
if (this.orientation === TabsOrientation.horizontal) {
|
|
56
|
-
return this.previousActiveTabData.x - (tab.getBoundingClientRect().x - this.getBoundingClientRect().x);
|
|
57
|
-
}
|
|
58
|
-
else
|
|
59
|
-
return this.previousActiveTabData.y - (tab.getBoundingClientRect().y - this.getBoundingClientRect().y);
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* getSelectedTabScale - gets the scale of the tab
|
|
63
|
-
*/
|
|
64
|
-
getTabScale(tab) {
|
|
65
|
-
if (this.orientation === TabsOrientation.horizontal) {
|
|
66
|
-
return this.previousActiveTabData.width / tab.getBoundingClientRect().width;
|
|
67
|
-
}
|
|
68
|
-
else
|
|
69
|
-
return this.previousActiveTabData.height / tab.getBoundingClientRect().height;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Calculates and applies updated values to CSS variables.
|
|
73
|
-
*
|
|
74
|
-
* @param tab - the tab element to apply the updated values to
|
|
75
|
-
* @internal
|
|
76
|
-
*/
|
|
77
|
-
applyUpdatedCSSValues(tab) {
|
|
78
|
-
this.calculateAnimationProperties(tab);
|
|
79
|
-
this.setTabScaleCSSVar();
|
|
80
|
-
this.setTabOffsetCSSVar();
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Runs through all the operations required for setting the tab active indicator to its starting location, ending
|
|
84
|
-
* location, and applying the animated css class to the tab.
|
|
85
|
-
*
|
|
86
|
-
* @param tab - the tab element to apply the updated values to
|
|
87
|
-
* @internal
|
|
88
|
-
*/
|
|
89
|
-
animationLoop(tab) {
|
|
90
|
-
// remove the animated class so nothing animates yet
|
|
91
|
-
tab.setAttribute('data-animate', 'false');
|
|
92
|
-
// animation start - this applyUpdeatedCSSValues sets the active indicator to the location of the previously selected tab
|
|
93
|
-
this.applyUpdatedCSSValues(tab);
|
|
94
|
-
// changing the previously active tab allows the applyUpdatedCSSValues method to calculate the correct end to the animation.
|
|
95
|
-
this.previousActiveTabData = this.activeTabData;
|
|
96
|
-
// calculate and apply updated css values for animation.
|
|
97
|
-
this.applyUpdatedCSSValues(tab);
|
|
98
|
-
// add the css class and active indicator will animate from the previous tab location to its tab location
|
|
99
|
-
tab.setAttribute('data-animate', 'true');
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Gets the position data for a tab element relative to its parent
|
|
103
|
-
* @param tab - The tab element to get position data for
|
|
104
|
-
* @returns The position data for the tab
|
|
105
|
-
*/
|
|
106
|
-
getTabPositionData(tab) {
|
|
107
|
-
const rect = tab.getBoundingClientRect();
|
|
108
|
-
const parentRect = this.getBoundingClientRect();
|
|
109
|
-
return {
|
|
110
|
-
x: rect.x - parentRect.x,
|
|
111
|
-
y: rect.y - parentRect.y,
|
|
112
|
-
height: rect.height,
|
|
113
|
-
width: rect.width,
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Sets the data from the active tab onto the class. used for making all the animation calculations for the active
|
|
118
|
-
* tab indicator.
|
|
119
|
-
*
|
|
120
|
-
* @internal
|
|
121
|
-
*/
|
|
122
|
-
setTabData() {
|
|
123
|
-
if (this.tabs && this.tabs.length > 0) {
|
|
124
|
-
const tabs = this.tabs;
|
|
125
|
-
const activeTab = this.activetab || tabs[0];
|
|
126
|
-
this.activeTabData = this.getTabPositionData(activeTab);
|
|
127
|
-
if (this.previousActiveTabData?.x !== this.activeTabData?.x &&
|
|
128
|
-
this.previousActiveTabData?.y !== this.activeTabData?.y) {
|
|
129
|
-
this.previousActiveTabData = this.activeTabData;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
setTabOffsetCSSVar() {
|
|
134
|
-
this.styles = css /**css*/ `
|
|
135
|
-
:host {
|
|
136
|
-
--tabIndicatorOffset: ${this.activeTabOffset.toString()}px;
|
|
137
|
-
}
|
|
138
|
-
`;
|
|
139
|
-
this.$fastController.addStyles(this.styles);
|
|
140
|
-
}
|
|
141
|
-
setTabScaleCSSVar() {
|
|
142
|
-
this.styles = css /**css*/ `
|
|
143
|
-
:host {
|
|
144
|
-
--tabIndicatorScale: ${this.activeTabScale.toString()};
|
|
145
|
-
}
|
|
146
|
-
`;
|
|
147
|
-
this.$fastController.addStyles(this.styles);
|
|
148
|
-
}
|
|
149
|
-
activeidChanged(oldValue, newValue) {
|
|
150
|
-
if (oldValue && this.tabs) {
|
|
151
|
-
const oldTab = this.tabs.find(tab => tab.id === oldValue);
|
|
152
|
-
if (oldTab) {
|
|
153
|
-
this.previousActiveTabData = this.getTabPositionData(oldTab);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
super.activeidChanged(oldValue, newValue);
|
|
157
|
-
this.setTabData();
|
|
158
|
-
if (this.activetab) {
|
|
159
|
-
this.animationLoop(this.activetab);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
tabsChanged() {
|
|
163
|
-
super.tabsChanged();
|
|
164
|
-
this.setTabData();
|
|
165
|
-
if (this.activetab) {
|
|
166
|
-
this.animationLoop(this.activetab);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
__decorate([
|
|
171
|
-
attr
|
|
172
|
-
], Tabs.prototype, "appearance", void 0);
|
|
173
|
-
__decorate([
|
|
174
|
-
attr({ mode: 'boolean' })
|
|
175
|
-
], Tabs.prototype, "disabled", void 0);
|
|
176
|
-
__decorate([
|
|
177
|
-
attr
|
|
178
|
-
], Tabs.prototype, "size", void 0);
|
|
179
|
-
applyMixins(Tabs, StartEnd);
|
|
180
|
-
//# sourceMappingURL=tabs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","sourceRoot":"","sources":["../../../src/tabs/tabs.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAsB,MAAM,yBAAyB,CAAC;AAExE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,QA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M,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC;YAC1D,IAAI,MAAM,EAAE,CAAC;gBACX,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;YAC/D,CAAC;QACH,CAAC;QAED,KAAK,CAAC,eAAe,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC1C,IAAI,CAAC,UAAU,EAAE,CAAC;QAElB,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAgB,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;IAEM,WAAW;QAChB,KAAK,CAAC,WAAW,EAAE,CAAC;QACpB,IAAI,CAAC,UAAU,EAAE,CAAC;QAElB,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAgB,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;CACF;AA9JQ;IADN,IAAI;wCAC2D;AAOzD;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;sCACA;AAQnB;IADN,IAAI;kCACkB;AAmJzB,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { StartEndOptions } from '../patterns/start-end.js';
|
|
2
|
-
import type { ValuesOf } from '../utils/index.js';
|
|
3
|
-
import type { Tabs } from './tabs.js';
|
|
4
|
-
export declare const TabsAppearance: {
|
|
5
|
-
readonly subtle: "subtle";
|
|
6
|
-
readonly transparent: "transparent";
|
|
7
|
-
};
|
|
8
|
-
export type TabsAppearance = ValuesOf<typeof TabsAppearance>;
|
|
9
|
-
export declare const TabsSize: {
|
|
10
|
-
readonly small: "small";
|
|
11
|
-
readonly medium: "medium";
|
|
12
|
-
readonly large: "large";
|
|
13
|
-
};
|
|
14
|
-
export type TabsSize = ValuesOf<typeof TabsSize>;
|
|
15
|
-
/**
|
|
16
|
-
* Tabs option configuration options
|
|
17
|
-
* @public
|
|
18
|
-
*/
|
|
19
|
-
export type TabsOptions = StartEndOptions<Tabs>;
|
|
20
|
-
/**
|
|
21
|
-
* The orientation of the component
|
|
22
|
-
* @public
|
|
23
|
-
*/
|
|
24
|
-
export declare const TabsOrientation: {
|
|
25
|
-
readonly horizontal: "horizontal";
|
|
26
|
-
readonly vertical: "vertical";
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* The types for the Tabs component
|
|
30
|
-
* @public
|
|
31
|
-
*/
|
|
32
|
-
export type TabsOrientation = ValuesOf<typeof TabsOrientation>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Orientation } from '@microsoft/fast-web-utilities';
|
|
2
|
-
export const TabsAppearance = {
|
|
3
|
-
subtle: 'subtle',
|
|
4
|
-
transparent: 'transparent',
|
|
5
|
-
};
|
|
6
|
-
export const TabsSize = {
|
|
7
|
-
small: 'small',
|
|
8
|
-
medium: 'medium',
|
|
9
|
-
large: 'large',
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* The orientation of the component
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
export const TabsOrientation = Orientation;
|
|
16
|
-
//# sourceMappingURL=tabs.options.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.options.js","sourceRoot":"","sources":["../../../src/tabs/tabs.options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAK5D,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,aAAa;CAClB,CAAC;AAIX,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;CACN,CAAC;AAUX;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const styles: import("@microsoft/fast-element").ElementStyles;
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
import { css } from '@microsoft/fast-element';
|
|
2
|
-
import { display } from '../utils/index.js';
|
|
3
|
-
import { borderRadiusCircular, borderRadiusMedium, colorCompoundBrandForeground1Hover, colorNeutralForeground1, colorNeutralForeground1Hover, colorNeutralForeground2, colorNeutralForegroundDisabled, colorSubtleBackgroundHover, colorSubtleBackgroundPressed, curveDecelerateMax, durationSlow, fontFamilyBase, fontSizeBase300, fontSizeBase400, lineHeightBase300, lineHeightBase400, spacingHorizontalMNudge, spacingHorizontalSNudge, spacingVerticalL, spacingVerticalMNudge, spacingVerticalS, spacingVerticalSNudge, spacingVerticalXXS, strokeWidthThicker, } from '../theme/design-tokens.js';
|
|
4
|
-
export const styles = css `
|
|
5
|
-
${display('grid')}
|
|
6
|
-
|
|
7
|
-
:host {
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
font-family: ${fontFamilyBase};
|
|
10
|
-
font-size: ${fontSizeBase300};
|
|
11
|
-
line-height: ${lineHeightBase300};
|
|
12
|
-
color: ${colorNeutralForeground2};
|
|
13
|
-
grid-template-columns: auto 1fr auto;
|
|
14
|
-
grid-template-rows: auto 1fr;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
:host([disabled]) {
|
|
18
|
-
cursor: not-allowed;
|
|
19
|
-
color: ${colorNeutralForegroundDisabled};
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
:host([disabled]) ::slotted(fluent-tab) {
|
|
23
|
-
pointer-events: none;
|
|
24
|
-
cursor: not-allowed;
|
|
25
|
-
color: ${colorNeutralForegroundDisabled};
|
|
26
|
-
}
|
|
27
|
-
:host([disabled]) ::slotted(fluent-tab:after) {
|
|
28
|
-
background-color: ${colorNeutralForegroundDisabled};
|
|
29
|
-
}
|
|
30
|
-
:host([disabled]) ::slotted(fluent-tab[aria-selected='true'])::after {
|
|
31
|
-
background-color: ${colorNeutralForegroundDisabled};
|
|
32
|
-
}
|
|
33
|
-
:host([disabled]) ::slotted(fluent-tab:hover):before {
|
|
34
|
-
content: unset;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
:host ::slotted(fluent-tab) {
|
|
38
|
-
border-radius: ${borderRadiusMedium};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
:host ::slotted(fluent-tab[aria-selected='true'])::before {
|
|
42
|
-
background-color: ${colorNeutralForegroundDisabled};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.tablist {
|
|
46
|
-
display: grid;
|
|
47
|
-
grid-template-rows: auto auto;
|
|
48
|
-
grid-template-columns: auto;
|
|
49
|
-
position: relative;
|
|
50
|
-
width: max-content;
|
|
51
|
-
align-self: end;
|
|
52
|
-
box-sizing: border-box;
|
|
53
|
-
}
|
|
54
|
-
::slotted([slot='start']),
|
|
55
|
-
::slotted([slot='end']) {
|
|
56
|
-
display: flex;
|
|
57
|
-
align-self: center;
|
|
58
|
-
}
|
|
59
|
-
::slotted([slot='start']) {
|
|
60
|
-
margin-inline-end: 11px;
|
|
61
|
-
}
|
|
62
|
-
::slotted([slot='end']) {
|
|
63
|
-
margin-inline-start: 11px;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.tabpanel {
|
|
67
|
-
grid-row: 2;
|
|
68
|
-
grid-column-start: 1;
|
|
69
|
-
grid-column-end: 4;
|
|
70
|
-
position: relative;
|
|
71
|
-
}
|
|
72
|
-
:host([orientation='vertical']) {
|
|
73
|
-
grid-template-rows: auto 1fr auto;
|
|
74
|
-
grid-template-columns: auto 1fr;
|
|
75
|
-
}
|
|
76
|
-
:host([orientation='vertical']) .tablist {
|
|
77
|
-
grid-row-start: 2;
|
|
78
|
-
grid-row-end: 2;
|
|
79
|
-
display: grid;
|
|
80
|
-
grid-template-rows: auto;
|
|
81
|
-
grid-template-columns: auto 1fr;
|
|
82
|
-
position: relative;
|
|
83
|
-
width: max-content;
|
|
84
|
-
justify-self: end;
|
|
85
|
-
align-self: flex-start;
|
|
86
|
-
width: 100%;
|
|
87
|
-
}
|
|
88
|
-
:host([orientation='vertical']) .tabpanel {
|
|
89
|
-
grid-column: 2;
|
|
90
|
-
grid-row-start: 1;
|
|
91
|
-
grid-row-end: 4;
|
|
92
|
-
}
|
|
93
|
-
:host([orientation='vertical']) ::slotted([slot='end']) {
|
|
94
|
-
grid-row: 3;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
:host([appearance='subtle']) ::slotted(fluent-tab:hover) {
|
|
98
|
-
background-color: ${colorSubtleBackgroundHover};
|
|
99
|
-
color: ${colorNeutralForeground1Hover};
|
|
100
|
-
fill: ${colorCompoundBrandForeground1Hover};
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
:host([appearance='subtle']) ::slotted(fluent-tab:active) {
|
|
104
|
-
background-color: ${colorSubtleBackgroundPressed};
|
|
105
|
-
fill: ${colorSubtleBackgroundPressed};
|
|
106
|
-
color: ${colorNeutralForeground1};
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
:host([size='small']) ::slotted(fluent-tab) {
|
|
110
|
-
font-size: ${fontSizeBase300};
|
|
111
|
-
line-height: ${lineHeightBase300};
|
|
112
|
-
padding: ${spacingVerticalSNudge} ${spacingHorizontalSNudge};
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
:host([size='large']) ::slotted(fluent-tab) {
|
|
116
|
-
font-size: ${fontSizeBase400};
|
|
117
|
-
line-height: ${lineHeightBase400};
|
|
118
|
-
padding: ${spacingVerticalL} ${spacingHorizontalMNudge};
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/* indicator animation */
|
|
122
|
-
:host ::slotted(fluent-tab[data-animate='true'])::after {
|
|
123
|
-
transition-property: transform;
|
|
124
|
-
transition-duration: ${durationSlow};
|
|
125
|
-
transition-timing-function: ${curveDecelerateMax};
|
|
126
|
-
}
|
|
127
|
-
:host ::slotted(fluent-tab)::after {
|
|
128
|
-
height: ${strokeWidthThicker};
|
|
129
|
-
margin-top: auto;
|
|
130
|
-
transform-origin: left;
|
|
131
|
-
transform: translateX(var(--tabIndicatorOffset)) scaleX(var(--tabIndicatorScale));
|
|
132
|
-
}
|
|
133
|
-
:host([orientation='vertical']) ::slotted(fluent-tab)::after {
|
|
134
|
-
width: ${strokeWidthThicker};
|
|
135
|
-
height: unset;
|
|
136
|
-
margin-top: unset;
|
|
137
|
-
transform-origin: top;
|
|
138
|
-
transform: translateY(var(--tabIndicatorOffset)) scaleY(var(--tabIndicatorScale));
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/* ::before adds a secondary indicator placeholder that appears right after click on the active tab */
|
|
142
|
-
:host ::slotted(fluent-tab)::before {
|
|
143
|
-
height: ${strokeWidthThicker};
|
|
144
|
-
border-radius: ${borderRadiusCircular};
|
|
145
|
-
content: '';
|
|
146
|
-
inset: 0;
|
|
147
|
-
position: absolute;
|
|
148
|
-
margin-top: auto;
|
|
149
|
-
}
|
|
150
|
-
:host([orientation='vertical']) ::slotted(fluent-tab)::before {
|
|
151
|
-
height: unset;
|
|
152
|
-
width: ${strokeWidthThicker};
|
|
153
|
-
margin-inline-end: auto;
|
|
154
|
-
transform-origin: top;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
:host ::slotted(fluent-tab[aria-selected='false']:hover)::after {
|
|
158
|
-
height: ${strokeWidthThicker};
|
|
159
|
-
margin-top: auto;
|
|
160
|
-
transform-origin: left;
|
|
161
|
-
}
|
|
162
|
-
:host([orientation='vertical']) ::slotted(fluent-tab[aria-selected='false']:hover)::after {
|
|
163
|
-
height: unset;
|
|
164
|
-
margin-inline-end: auto;
|
|
165
|
-
transform-origin: top;
|
|
166
|
-
width: ${strokeWidthThicker};
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
:host([orientation='vertical']) ::slotted(fluent-tab) {
|
|
170
|
-
align-items: flex-start;
|
|
171
|
-
grid-column: 2;
|
|
172
|
-
padding-top: ${spacingVerticalSNudge};
|
|
173
|
-
padding-bottom: ${spacingVerticalSNudge};
|
|
174
|
-
}
|
|
175
|
-
:host([orientation='vertical'][size='small']) ::slotted(fluent-tab) {
|
|
176
|
-
padding-top: ${spacingVerticalXXS};
|
|
177
|
-
padding-bottom: ${spacingVerticalXXS};
|
|
178
|
-
}
|
|
179
|
-
:host([orientation='vertical'][size='large']) ::slotted(fluent-tab) {
|
|
180
|
-
padding-top: ${spacingVerticalS};
|
|
181
|
-
padding-bottom: ${spacingVerticalS};
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/* horizontal spacing for indicator */
|
|
185
|
-
:host([size='small']) ::slotted(fluent-tab)::after,
|
|
186
|
-
:host([size='small']) ::slotted(fluent-tab)::before,
|
|
187
|
-
:host([size='small']) ::slotted(fluent-tab:hover)::after {
|
|
188
|
-
right: ${spacingHorizontalSNudge};
|
|
189
|
-
left: ${spacingHorizontalSNudge};
|
|
190
|
-
}
|
|
191
|
-
:host ::slotted(fluent-tab)::after,
|
|
192
|
-
:host ::slotted(fluent-tab)::before,
|
|
193
|
-
:host ::slotted(fluent-tab:hover)::after {
|
|
194
|
-
right: ${spacingHorizontalMNudge};
|
|
195
|
-
left: ${spacingHorizontalMNudge};
|
|
196
|
-
}
|
|
197
|
-
:host([size='large']) ::slotted(fluent-tab)::after,
|
|
198
|
-
:host([size='large']) ::slotted(fluent-tab)::before,
|
|
199
|
-
:host([size='large']) ::slotted(fluent-tab:hover)::after {
|
|
200
|
-
right: ${spacingHorizontalMNudge};
|
|
201
|
-
left: ${spacingHorizontalMNudge};
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/* vertical spacing for indicator */
|
|
205
|
-
:host([orientation='vertical'][size='small']) ::slotted(fluent-tab)::after,
|
|
206
|
-
:host([orientation='vertical'][size='small']) ::slotted(fluent-tab)::before,
|
|
207
|
-
:host([orientation='vertical'][size='small']) ::slotted(fluent-tab:hover)::after {
|
|
208
|
-
right: 0;
|
|
209
|
-
left: 0;
|
|
210
|
-
top: ${spacingVerticalSNudge};
|
|
211
|
-
bottom: ${spacingVerticalSNudge};
|
|
212
|
-
}
|
|
213
|
-
:host([orientation='vertical']) ::slotted(fluent-tab)::after,
|
|
214
|
-
:host([orientation='vertical']) ::slotted(fluent-tab)::before,
|
|
215
|
-
:host([orientation='vertical']) ::slotted(fluent-tab:hover)::after {
|
|
216
|
-
right: 0;
|
|
217
|
-
left: 0;
|
|
218
|
-
top: ${spacingVerticalS};
|
|
219
|
-
bottom: ${spacingVerticalS};
|
|
220
|
-
}
|
|
221
|
-
:host([orientation='vertical'][size='large']) ::slotted(fluent-tab)::after,
|
|
222
|
-
:host([orientation='vertical'][size='large']) ::slotted(fluent-tab)::before,
|
|
223
|
-
:host([orientation='vertical'][size='large']) ::slotted(fluent-tab:hover)::after {
|
|
224
|
-
right: 0;
|
|
225
|
-
left: 0;
|
|
226
|
-
top: ${spacingVerticalMNudge};
|
|
227
|
-
bottom: ${spacingVerticalMNudge};
|
|
228
|
-
}
|
|
229
|
-
`;
|
|
230
|
-
//# sourceMappingURL=tabs.styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.styles.js","sourceRoot":"","sources":["../../../src/tabs/tabs.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,kCAAkC,EAClC,uBAAuB,EACvB,4BAA4B,EAC5B,uBAAuB,EACvB,8BAA8B,EAC9B,0BAA0B,EAC1B,4BAA4B,EAC5B,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,uBAAu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
|
1
|
-
import { type ElementViewTemplate } from '@microsoft/fast-element';
|
|
2
|
-
import type { Tabs } from './tabs.js';
|
|
3
|
-
import type { TabsOptions } from './tabs.options.js';
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated - Use tablist instead
|
|
6
|
-
*/
|
|
7
|
-
export declare function tabsTemplate<T extends Tabs>(options?: TabsOptions): ElementViewTemplate<T>;
|
|
8
|
-
export declare const template: ElementViewTemplate<Tabs, any>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { html, slotted } from '@microsoft/fast-element';
|
|
2
|
-
import { endSlotTemplate, startSlotTemplate } from '../patterns/index.js';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated - Use tablist instead
|
|
5
|
-
*/
|
|
6
|
-
export function tabsTemplate(options = {}) {
|
|
7
|
-
return html `
|
|
8
|
-
${startSlotTemplate(options)}
|
|
9
|
-
<div class="tablist" part="tablist" role="tablist">
|
|
10
|
-
<slot name="tab" ${slotted('tabs')}></slot>
|
|
11
|
-
</div>
|
|
12
|
-
${endSlotTemplate(options)}
|
|
13
|
-
<div class="tabpanel" part="tabpanel">
|
|
14
|
-
<slot name="tabpanel" ${slotted('tabpanels')}></slot>
|
|
15
|
-
</div>
|
|
16
|
-
`;
|
|
17
|
-
}
|
|
18
|
-
export const template = tabsTemplate({});
|
|
19
|
-
//# sourceMappingURL=tabs.template.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.template.js","sourceRoot":"","sources":["../../../src/tabs/tabs.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,IAAI,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAI1E;;GAEG;AACH,MAAM,UAAU,YAAY,CAAiB,UAAuB,EAAE;IACpE,OAAO,IAAI,CAAG;MACV,iBAAiB,CAAC,OAAO,CAAC;;yBAEP,OAAO,CAAC,MAAM,CAAC;;MAElC,eAAe,CAAC,OAAO,CAAC;;8BAEA,OAAO,CAAC,WAAW,CAAC;;GAE/C,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC,EAAE,CAAC,CAAC"}
|