@fluentui/web-components 3.0.0-alpha.13 → 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.
Files changed (88) hide show
  1. package/CHANGELOG.json +30 -1
  2. package/CHANGELOG.md +12 -2
  3. package/dist/dts/index.d.ts +4 -0
  4. package/dist/dts/menu-button/define.d.ts +1 -0
  5. package/dist/dts/menu-button/index.d.ts +5 -0
  6. package/dist/dts/menu-button/menu-button.d.ts +7 -0
  7. package/dist/dts/menu-button/menu-button.definition.d.ts +10 -0
  8. package/dist/dts/menu-button/menu-button.options.d.ts +46 -0
  9. package/dist/dts/menu-button/menu-button.template.d.ts +7 -0
  10. package/dist/dts/tab/define.d.ts +1 -0
  11. package/dist/dts/tab/index.d.ts +4 -0
  12. package/dist/dts/tab/tab.d.ts +8 -0
  13. package/dist/dts/tab/tab.definition.d.ts +2 -0
  14. package/dist/dts/tab/tab.styles.d.ts +1 -0
  15. package/dist/dts/tab/tab.template.d.ts +4 -0
  16. package/dist/dts/tab-panel/define.d.ts +1 -0
  17. package/dist/dts/tab-panel/index.d.ts +4 -0
  18. package/dist/dts/tab-panel/tab-panel.d.ts +3 -0
  19. package/dist/dts/tab-panel/tab-panel.definition.d.ts +2 -0
  20. package/dist/dts/tab-panel/tab-panel.styles.d.ts +1 -0
  21. package/dist/dts/tab-panel/tab-panel.template.d.ts +1 -0
  22. package/dist/dts/tabs/define.d.ts +1 -0
  23. package/dist/dts/tabs/index.d.ts +5 -0
  24. package/dist/dts/tabs/tabs.d.ts +88 -0
  25. package/dist/dts/tabs/tabs.definition.d.ts +2 -0
  26. package/dist/dts/tabs/tabs.options.d.ts +14 -0
  27. package/dist/dts/tabs/tabs.styles.d.ts +1 -0
  28. package/dist/dts/tabs/tabs.template.d.ts +1 -0
  29. package/dist/esm/button/button.styles.js +2 -0
  30. package/dist/esm/button/button.styles.js.map +1 -1
  31. package/dist/esm/index.js +4 -0
  32. package/dist/esm/index.js.map +1 -1
  33. package/dist/esm/menu-button/define.js +4 -0
  34. package/dist/esm/menu-button/define.js.map +1 -0
  35. package/dist/esm/menu-button/index.js +6 -0
  36. package/dist/esm/menu-button/index.js.map +1 -0
  37. package/dist/esm/menu-button/menu-button.definition.js +21 -0
  38. package/dist/esm/menu-button/menu-button.definition.js.map +1 -0
  39. package/dist/esm/menu-button/menu-button.js +8 -0
  40. package/dist/esm/menu-button/menu-button.js.map +1 -0
  41. package/dist/esm/menu-button/menu-button.options.js +17 -0
  42. package/dist/esm/menu-button/menu-button.options.js.map +1 -0
  43. package/dist/esm/menu-button/menu-button.template.js +10 -0
  44. package/dist/esm/menu-button/menu-button.template.js.map +1 -0
  45. package/dist/esm/tab/define.js +4 -0
  46. package/dist/esm/tab/define.js.map +1 -0
  47. package/dist/esm/tab/index.js +5 -0
  48. package/dist/esm/tab/index.js.map +1 -0
  49. package/dist/esm/tab/tab.definition.js +10 -0
  50. package/dist/esm/tab/tab.definition.js.map +1 -0
  51. package/dist/esm/tab/tab.js +20 -0
  52. package/dist/esm/tab/tab.js.map +1 -0
  53. package/dist/esm/tab/tab.styles.js +94 -0
  54. package/dist/esm/tab/tab.styles.js.map +1 -0
  55. package/dist/esm/tab/tab.template.js +13 -0
  56. package/dist/esm/tab/tab.template.js.map +1 -0
  57. package/dist/esm/tab-panel/define.js +4 -0
  58. package/dist/esm/tab-panel/define.js.map +1 -0
  59. package/dist/esm/tab-panel/index.js +5 -0
  60. package/dist/esm/tab-panel/index.js.map +1 -0
  61. package/dist/esm/tab-panel/tab-panel.definition.js +10 -0
  62. package/dist/esm/tab-panel/tab-panel.definition.js.map +1 -0
  63. package/dist/esm/tab-panel/tab-panel.js +4 -0
  64. package/dist/esm/tab-panel/tab-panel.js.map +1 -0
  65. package/dist/esm/tab-panel/tab-panel.styles.js +12 -0
  66. package/dist/esm/tab-panel/tab-panel.styles.js.map +1 -0
  67. package/dist/esm/tab-panel/tab-panel.template.js +3 -0
  68. package/dist/esm/tab-panel/tab-panel.template.js.map +1 -0
  69. package/dist/esm/tabs/define.js +4 -0
  70. package/dist/esm/tabs/define.js.map +1 -0
  71. package/dist/esm/tabs/index.js +6 -0
  72. package/dist/esm/tabs/index.js.map +1 -0
  73. package/dist/esm/tabs/tabs.definition.js +10 -0
  74. package/dist/esm/tabs/tabs.definition.js.map +1 -0
  75. package/dist/esm/tabs/tabs.js +158 -0
  76. package/dist/esm/tabs/tabs.js.map +1 -0
  77. package/dist/esm/tabs/tabs.options.js +12 -0
  78. package/dist/esm/tabs/tabs.options.js.map +1 -0
  79. package/dist/esm/tabs/tabs.styles.js +230 -0
  80. package/dist/esm/tabs/tabs.styles.js.map +1 -0
  81. package/dist/esm/tabs/tabs.template.js +3 -0
  82. package/dist/esm/tabs/tabs.template.js.map +1 -0
  83. package/dist/fluent-web-components.api.json +2082 -1054
  84. package/dist/web-components.d.ts +215 -2
  85. package/dist/web-components.js +636 -60
  86. package/dist/web-components.min.js +148 -136
  87. package/docs/api-report.md +121 -3
  88. package/package.json +8 -4
@@ -14,10 +14,14 @@ import { FASTProgress } from '@microsoft/fast-foundation';
14
14
  import { FASTProgressRing } from '@microsoft/fast-foundation';
15
15
  import { FASTSlider } from '@microsoft/fast-foundation';
16
16
  import { FASTSwitch } from '@microsoft/fast-foundation';
17
+ import { FASTTab } from '@microsoft/fast-foundation';
18
+ import { FASTTabPanel } from '@microsoft/fast-foundation';
19
+ import { FASTTabs } from '@microsoft/fast-foundation';
17
20
  import { SliderOrientation } from '@microsoft/fast-foundation';
18
21
  import { StartEnd } from '@microsoft/fast-foundation';
19
22
  import { StartEndOptions } from '@microsoft/fast-foundation';
20
23
  import { StaticallyComposableHTML } from '@microsoft/fast-foundation';
24
+ import { TabsOrientation } from '@microsoft/fast-foundation';
21
25
  import type { Theme } from '@fluentui/tokens';
22
26
  import { ValuesOf } from '@microsoft/fast-foundation';
23
27
 
@@ -630,6 +634,7 @@ export declare type ButtonAppearance = ValuesOf<typeof ButtonAppearance>;
630
634
  export declare const ButtonDefinition: FASTElementDefinition<typeof Button>;
631
635
 
632
636
  export { ButtonOptions }
637
+ export { ButtonOptions as MenuButtonOptions }
633
638
 
634
639
  /**
635
640
  * A Button can be square, circular or rounded.
@@ -663,8 +668,6 @@ export declare const ButtonSize: {
663
668
  */
664
669
  export declare type ButtonSize = ValuesOf<typeof ButtonSize>;
665
670
 
666
- export declare const ButtonStyles: ElementStyles;
667
-
668
671
  /**
669
672
  * The template for the Button component.
670
673
  * @public
@@ -1733,6 +1736,79 @@ export declare const lineHeightHero800: CSSDesignToken<string>;
1733
1736
 
1734
1737
  export declare const lineHeightHero900: CSSDesignToken<string>;
1735
1738
 
1739
+ /**
1740
+ * The base class used for constructing a fluent-menu-button custom element
1741
+ * @public
1742
+ */
1743
+ export declare class MenuButton extends Button {
1744
+ }
1745
+
1746
+ /**
1747
+ * Menu Button Appearance constants
1748
+ * @public
1749
+ */
1750
+ export declare const MenuButtonAppearance: {
1751
+ readonly primary: "primary";
1752
+ readonly outline: "outline";
1753
+ readonly subtle: "subtle";
1754
+ readonly secondary: "secondary";
1755
+ readonly transparent: "transparent";
1756
+ };
1757
+
1758
+ /**
1759
+ * A Menu Button can be secondary, primary, outline, subtle, transparent
1760
+ * @public
1761
+ */
1762
+ export declare type MenuButtonAppearance = ValuesOf<typeof MenuButtonAppearance>;
1763
+
1764
+ /**
1765
+ * The Fluent Menu Button Element. Implements {@link @microsoft/fast-foundation#Button },
1766
+ * {@link @microsoft/fast-foundation#buttonTemplate}
1767
+ *
1768
+ * @public
1769
+ * @remarks
1770
+ * HTML Element: \<fluent-button\>
1771
+ */
1772
+ export declare const MenuButtonDefinition: FASTElementDefinition<typeof MenuButton>;
1773
+
1774
+ /**
1775
+ * A Menu Button can be square, circular or rounded.
1776
+ * @public
1777
+ */
1778
+ export declare const MenuButtonShape: {
1779
+ readonly circular: "circular";
1780
+ readonly rounded: "rounded";
1781
+ readonly square: "square";
1782
+ };
1783
+
1784
+ /**
1785
+ * A Menu Button can be square, circular or rounded
1786
+ * @public
1787
+ */
1788
+ export declare type MenuButtonShape = ValuesOf<typeof MenuButtonShape>;
1789
+
1790
+ /**
1791
+ * A Menu Button can be a size of small, medium or large.
1792
+ * @public
1793
+ */
1794
+ export declare const MenuButtonSize: {
1795
+ readonly small: "small";
1796
+ readonly medium: "medium";
1797
+ readonly large: "large";
1798
+ };
1799
+
1800
+ /**
1801
+ * A Menu Button can be on of several preset sizes.
1802
+ * @public
1803
+ */
1804
+ export declare type MenuButtonSize = ValuesOf<typeof MenuButtonSize>;
1805
+
1806
+ /**
1807
+ * The template for the Button component.
1808
+ * @public
1809
+ */
1810
+ export declare const MenuButtonTemplate: ElementViewTemplate<MenuButton>;
1811
+
1736
1812
  /**
1737
1813
  * The base class used for constructing a fluent-progress-bar custom element
1738
1814
  * @public
@@ -2039,6 +2115,10 @@ export declare const strokeWidthThickest: CSSDesignToken<string>;
2039
2115
 
2040
2116
  export declare const strokeWidthThin: CSSDesignToken<string>;
2041
2117
 
2118
+ declare const styles: ElementStyles;
2119
+ export { styles as ButtonStyles }
2120
+ export { styles as MenuButtonStyles }
2121
+
2042
2122
  export declare class Switch extends FASTSwitch {
2043
2123
  /**
2044
2124
  * The label position of the switch
@@ -2071,6 +2151,139 @@ export declare const switchStyles: ElementStyles;
2071
2151
 
2072
2152
  export declare const switchTemplate: ElementViewTemplate<Switch>;
2073
2153
 
2154
+ /**
2155
+ * Tab extends the FASTTab and is a child of the TabList
2156
+ */
2157
+ export declare class Tab extends FASTTab {
2158
+ private styles;
2159
+ connectedCallback(): void;
2160
+ }
2161
+
2162
+ export declare const TabDefinition: FASTElementDefinition<typeof Tab>;
2163
+
2164
+ export declare class TabPanel extends FASTTabPanel {
2165
+ }
2166
+
2167
+ export declare const TabPanelDefinition: FASTElementDefinition<typeof TabPanel>;
2168
+
2169
+ export declare const TabPanelStyles: ElementStyles;
2170
+
2171
+ export declare const TabPanelTemplate: ElementViewTemplate<FASTTabPanel, any>;
2172
+
2173
+ /**
2174
+ * TabList extends FASTTabs and is used for constructing a fluent-tab-list custom html element.
2175
+ *
2176
+ * @class TabList component
2177
+ * @public
2178
+ */
2179
+ export declare class Tabs extends FASTTabs {
2180
+ /**
2181
+ * activeTabData
2182
+ * The positional coordinates and size dimensions of the active tab. Used for calculating the offset and scale of the tab active indicator.
2183
+ */
2184
+ private activeTabData;
2185
+ /**
2186
+ * previousActiveTabData
2187
+ * The positional coordinates and size dimensions of the active tab. Used for calculating the offset and scale of the tab active indicator.
2188
+ */
2189
+ private previousActiveTabData;
2190
+ /**
2191
+ * activeTabOffset
2192
+ * Used to position the active indicator for animations of the active indicator on active tab changes.
2193
+ */
2194
+ private activeTabOffset;
2195
+ /**
2196
+ * activeTabScale
2197
+ * Used to scale the tab active indicator up or down as animations of the active indicator occur.
2198
+ */
2199
+ private activeTabScale;
2200
+ /**
2201
+ * styles
2202
+ * used in the class for storing the css variables required for animations
2203
+ */
2204
+ private styles;
2205
+ /**
2206
+ * appearance
2207
+ * There are two modes of appearance: transparent and subtle.
2208
+ */
2209
+ appearance?: TabsAppearance;
2210
+ /**
2211
+ * disabled
2212
+ * 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."
2213
+ */
2214
+ disabled?: boolean;
2215
+ /**
2216
+ * size
2217
+ * defaults to medium.
2218
+ * Used to set the size of all the tab controls, which effects text size and margins. Three sizes: small, medium and large.
2219
+ */
2220
+ size?: TabsSize;
2221
+ /**
2222
+ * calculateAnimationProperties
2223
+ *
2224
+ * Recalculates the active tab offset and scale.
2225
+ * These values will be applied to css variables that control the tab active indicator position animations
2226
+ */
2227
+ private calculateAnimationProperties;
2228
+ /**
2229
+ * getSelectedTabPosition - gets the x or y coordinates of the tab
2230
+ */
2231
+ private getTabPosition;
2232
+ /**
2233
+ * getSelectedTabScale - gets the scale of the tab
2234
+ */
2235
+ private getTabScale;
2236
+ /**
2237
+ * applyUpdatedCSSValues
2238
+ *
2239
+ * calculates and applies updated values to CSS variables
2240
+ * @param tab
2241
+ */
2242
+ private applyUpdatedCSSValues;
2243
+ /**
2244
+ * animationLoop
2245
+ * 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.
2246
+ * @param tab
2247
+ */
2248
+ private animationLoop;
2249
+ /**
2250
+ * setTabData
2251
+ * sets the data from the active tab onto the class. used for making all the animation calculations for the active tab indicator.
2252
+ */
2253
+ private setTabData;
2254
+ private setTabOffsetCSSVar;
2255
+ private setTabScaleCSSVar;
2256
+ activeidChanged(oldValue: string, newValue: string): void;
2257
+ tabsChanged(): void;
2258
+ }
2259
+
2260
+ export declare const TabsAppearance: {
2261
+ readonly subtle: "subtle";
2262
+ readonly transparent: "transparent";
2263
+ };
2264
+
2265
+ export declare type TabsAppearance = ValuesOf<typeof TabsAppearance>;
2266
+
2267
+ export declare const TabsDefinition: FASTElementDefinition<typeof Tabs>;
2268
+
2269
+ export { TabsOrientation }
2270
+
2271
+ export declare const TabsSize: {
2272
+ readonly small: "small";
2273
+ readonly medium: "medium";
2274
+ readonly large: "large";
2275
+ };
2276
+
2277
+ export declare type TabsSize = ValuesOf<typeof TabsSize>;
2278
+
2279
+ export declare const TabsStyles: ElementStyles;
2280
+
2281
+ export declare const TabsTemplate: ElementViewTemplate<FASTTabs, any>;
2282
+
2283
+ export declare const TabStyles: ElementStyles;
2284
+
2285
+ export declare const TabTemplate: ElementViewTemplate<FASTTab, any>;
2286
+
2074
2287
  /**
2075
2288
  * The base class used for constructing a fluent-text custom element
2076
2289
  * @public