@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.
Files changed (107) hide show
  1. package/CHANGELOG.json +51 -1
  2. package/CHANGELOG.md +22 -2
  3. package/dist/dts/button/button.d.ts +55 -0
  4. package/dist/dts/button/button.definition.d.ts +10 -0
  5. package/dist/dts/button/button.options.d.ts +46 -0
  6. package/dist/dts/button/button.styles.d.ts +1 -0
  7. package/dist/dts/button/button.template.d.ts +7 -0
  8. package/dist/dts/button/define.d.ts +1 -0
  9. package/dist/dts/button/index.d.ts +5 -0
  10. package/dist/dts/index.d.ts +5 -0
  11. package/dist/dts/menu-button/define.d.ts +1 -0
  12. package/dist/dts/menu-button/index.d.ts +5 -0
  13. package/dist/dts/menu-button/menu-button.d.ts +7 -0
  14. package/dist/dts/menu-button/menu-button.definition.d.ts +10 -0
  15. package/dist/dts/menu-button/menu-button.options.d.ts +46 -0
  16. package/dist/dts/menu-button/menu-button.template.d.ts +7 -0
  17. package/dist/dts/tab/define.d.ts +1 -0
  18. package/dist/dts/tab/index.d.ts +4 -0
  19. package/dist/dts/tab/tab.d.ts +8 -0
  20. package/dist/dts/tab/tab.definition.d.ts +2 -0
  21. package/dist/dts/tab/tab.styles.d.ts +1 -0
  22. package/dist/dts/tab/tab.template.d.ts +4 -0
  23. package/dist/dts/tab-panel/define.d.ts +1 -0
  24. package/dist/dts/tab-panel/index.d.ts +4 -0
  25. package/dist/dts/tab-panel/tab-panel.d.ts +3 -0
  26. package/dist/dts/tab-panel/tab-panel.definition.d.ts +2 -0
  27. package/dist/dts/tab-panel/tab-panel.styles.d.ts +1 -0
  28. package/dist/dts/tab-panel/tab-panel.template.d.ts +1 -0
  29. package/dist/dts/tabs/define.d.ts +1 -0
  30. package/dist/dts/tabs/index.d.ts +5 -0
  31. package/dist/dts/tabs/tabs.d.ts +88 -0
  32. package/dist/dts/tabs/tabs.definition.d.ts +2 -0
  33. package/dist/dts/tabs/tabs.options.d.ts +14 -0
  34. package/dist/dts/tabs/tabs.styles.d.ts +1 -0
  35. package/dist/dts/tabs/tabs.template.d.ts +1 -0
  36. package/dist/esm/button/button.definition.js +21 -0
  37. package/dist/esm/button/button.definition.js.map +1 -0
  38. package/dist/esm/button/button.js +72 -0
  39. package/dist/esm/button/button.js.map +1 -0
  40. package/dist/esm/button/button.options.js +30 -0
  41. package/dist/esm/button/button.options.js.map +1 -0
  42. package/dist/esm/button/button.styles.js +255 -0
  43. package/dist/esm/button/button.styles.js.map +1 -0
  44. package/dist/esm/button/button.template.js +7 -0
  45. package/dist/esm/button/button.template.js.map +1 -0
  46. package/dist/esm/button/define.js +4 -0
  47. package/dist/esm/button/define.js.map +1 -0
  48. package/dist/esm/button/index.js +6 -0
  49. package/dist/esm/button/index.js.map +1 -0
  50. package/dist/esm/index.js +5 -0
  51. package/dist/esm/index.js.map +1 -1
  52. package/dist/esm/menu-button/define.js +4 -0
  53. package/dist/esm/menu-button/define.js.map +1 -0
  54. package/dist/esm/menu-button/index.js +6 -0
  55. package/dist/esm/menu-button/index.js.map +1 -0
  56. package/dist/esm/menu-button/menu-button.definition.js +21 -0
  57. package/dist/esm/menu-button/menu-button.definition.js.map +1 -0
  58. package/dist/esm/menu-button/menu-button.js +8 -0
  59. package/dist/esm/menu-button/menu-button.js.map +1 -0
  60. package/dist/esm/menu-button/menu-button.options.js +17 -0
  61. package/dist/esm/menu-button/menu-button.options.js.map +1 -0
  62. package/dist/esm/menu-button/menu-button.template.js +10 -0
  63. package/dist/esm/menu-button/menu-button.template.js.map +1 -0
  64. package/dist/esm/tab/define.js +4 -0
  65. package/dist/esm/tab/define.js.map +1 -0
  66. package/dist/esm/tab/index.js +5 -0
  67. package/dist/esm/tab/index.js.map +1 -0
  68. package/dist/esm/tab/tab.definition.js +10 -0
  69. package/dist/esm/tab/tab.definition.js.map +1 -0
  70. package/dist/esm/tab/tab.js +20 -0
  71. package/dist/esm/tab/tab.js.map +1 -0
  72. package/dist/esm/tab/tab.styles.js +94 -0
  73. package/dist/esm/tab/tab.styles.js.map +1 -0
  74. package/dist/esm/tab/tab.template.js +13 -0
  75. package/dist/esm/tab/tab.template.js.map +1 -0
  76. package/dist/esm/tab-panel/define.js +4 -0
  77. package/dist/esm/tab-panel/define.js.map +1 -0
  78. package/dist/esm/tab-panel/index.js +5 -0
  79. package/dist/esm/tab-panel/index.js.map +1 -0
  80. package/dist/esm/tab-panel/tab-panel.definition.js +10 -0
  81. package/dist/esm/tab-panel/tab-panel.definition.js.map +1 -0
  82. package/dist/esm/tab-panel/tab-panel.js +4 -0
  83. package/dist/esm/tab-panel/tab-panel.js.map +1 -0
  84. package/dist/esm/tab-panel/tab-panel.styles.js +12 -0
  85. package/dist/esm/tab-panel/tab-panel.styles.js.map +1 -0
  86. package/dist/esm/tab-panel/tab-panel.template.js +3 -0
  87. package/dist/esm/tab-panel/tab-panel.template.js.map +1 -0
  88. package/dist/esm/tabs/define.js +4 -0
  89. package/dist/esm/tabs/define.js.map +1 -0
  90. package/dist/esm/tabs/index.js +6 -0
  91. package/dist/esm/tabs/index.js.map +1 -0
  92. package/dist/esm/tabs/tabs.definition.js +10 -0
  93. package/dist/esm/tabs/tabs.definition.js.map +1 -0
  94. package/dist/esm/tabs/tabs.js +158 -0
  95. package/dist/esm/tabs/tabs.js.map +1 -0
  96. package/dist/esm/tabs/tabs.options.js +12 -0
  97. package/dist/esm/tabs/tabs.options.js.map +1 -0
  98. package/dist/esm/tabs/tabs.styles.js +230 -0
  99. package/dist/esm/tabs/tabs.styles.js.map +1 -0
  100. package/dist/esm/tabs/tabs.template.js +3 -0
  101. package/dist/esm/tabs/tabs.template.js.map +1 -0
  102. package/dist/fluent-web-components.api.json +4778 -3155
  103. package/dist/web-components.d.ts +339 -0
  104. package/dist/web-components.js +971 -54
  105. package/dist/web-components.min.js +148 -132
  106. package/docs/api-report.md +178 -0
  107. package/package.json +14 -6
@@ -1,3 +1,4 @@
1
+ import { ButtonOptions } from '@microsoft/fast-foundation';
1
2
  import { CSSDesignToken } from '@microsoft/fast-foundation';
2
3
  import { DividerOrientation } from '@microsoft/fast-foundation';
3
4
  import { DividerRole } from '@microsoft/fast-foundation';
@@ -5,6 +6,7 @@ import { ElementStyles } from '@microsoft/fast-element';
5
6
  import { ElementViewTemplate } from '@microsoft/fast-element';
6
7
  import { FASTAccordion } from '@microsoft/fast-foundation';
7
8
  import { FASTAccordionItem } from '@microsoft/fast-foundation';
9
+ import { FASTButton } from '@microsoft/fast-foundation';
8
10
  import { FASTDivider } from '@microsoft/fast-foundation';
9
11
  import { FASTElement } from '@microsoft/fast-element';
10
12
  import { FASTElementDefinition } from '@microsoft/fast-element';
@@ -12,10 +14,14 @@ import { FASTProgress } from '@microsoft/fast-foundation';
12
14
  import { FASTProgressRing } from '@microsoft/fast-foundation';
13
15
  import { FASTSlider } from '@microsoft/fast-foundation';
14
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';
15
20
  import { SliderOrientation } from '@microsoft/fast-foundation';
16
21
  import { StartEnd } from '@microsoft/fast-foundation';
17
22
  import { StartEndOptions } from '@microsoft/fast-foundation';
18
23
  import { StaticallyComposableHTML } from '@microsoft/fast-foundation';
24
+ import { TabsOrientation } from '@microsoft/fast-foundation';
19
25
  import type { Theme } from '@fluentui/tokens';
20
26
  import { ValuesOf } from '@microsoft/fast-foundation';
21
27
 
@@ -545,6 +551,129 @@ export declare const borderRadiusSmall: CSSDesignToken<string>;
545
551
 
546
552
  export declare const borderRadiusXLarge: CSSDesignToken<string>;
547
553
 
554
+ /**
555
+ * The base class used for constructing a fluent-button custom element
556
+ * @public
557
+ */
558
+ export declare class Button extends FASTButton {
559
+ /**
560
+ * The appearance the button should have.
561
+ *
562
+ * @public
563
+ * @remarks
564
+ * HTML Attribute: appearance
565
+ */
566
+ appearance?: ButtonAppearance | undefined;
567
+ /**
568
+ * The shape the button should have.
569
+ *
570
+ * @public
571
+ * @remarks
572
+ * HTML Attribute: shape
573
+ */
574
+ shape?: ButtonShape | undefined;
575
+ /**
576
+ * The size the button should have.
577
+ *
578
+ * @public
579
+ * @remarks
580
+ * HTML Attribute: size
581
+ */
582
+ size?: ButtonSize;
583
+ /**
584
+ * The button has an icon only, no text content
585
+ *
586
+ * @public
587
+ * @remarks
588
+ * HTML Attribute: icon-only
589
+ */
590
+ iconOnly: boolean;
591
+ /**
592
+ * The button is disabled but focusable
593
+ *
594
+ * @public
595
+ * @remarks
596
+ * HTML Attribute: disabled-focusable
597
+ */
598
+ disabledFocusable?: boolean;
599
+ protected disabledFocusableChanged(prev: boolean, next: boolean): void;
600
+ /**
601
+ * Prevents disabledFocusable click events
602
+ */
603
+ private handleDisabledFocusableClick;
604
+ connectedCallback(): void;
605
+ disconnectedCallback(): void;
606
+ }
607
+
608
+ /**
609
+ * ButtonAppearance constants
610
+ * @public
611
+ */
612
+ export declare const ButtonAppearance: {
613
+ readonly primary: "primary";
614
+ readonly outline: "outline";
615
+ readonly subtle: "subtle";
616
+ readonly secondary: "secondary";
617
+ readonly transparent: "transparent";
618
+ };
619
+
620
+ /**
621
+ * A Button can be secondary, primary, outline, subtle, transparent
622
+ * @public
623
+ */
624
+ export declare type ButtonAppearance = ValuesOf<typeof ButtonAppearance>;
625
+
626
+ /**
627
+ * The Fluent Button Element. Implements {@link @microsoft/fast-foundation#Button },
628
+ * {@link @microsoft/fast-foundation#buttonTemplate}
629
+ *
630
+ * @public
631
+ * @remarks
632
+ * HTML Element: \<fluent-button\>
633
+ */
634
+ export declare const ButtonDefinition: FASTElementDefinition<typeof Button>;
635
+
636
+ export { ButtonOptions }
637
+ export { ButtonOptions as MenuButtonOptions }
638
+
639
+ /**
640
+ * A Button can be square, circular or rounded.
641
+ * @public
642
+ */
643
+ export declare const ButtonShape: {
644
+ readonly circular: "circular";
645
+ readonly rounded: "rounded";
646
+ readonly square: "square";
647
+ };
648
+
649
+ /**
650
+ * A Button can be square, circular or rounded
651
+ * @public
652
+ */
653
+ export declare type ButtonShape = ValuesOf<typeof ButtonShape>;
654
+
655
+ /**
656
+ * A Button can be a size of small, medium or large.
657
+ * @public
658
+ */
659
+ export declare const ButtonSize: {
660
+ readonly small: "small";
661
+ readonly medium: "medium";
662
+ readonly large: "large";
663
+ };
664
+
665
+ /**
666
+ * A Button can be on of several preset sizes.
667
+ * @public
668
+ */
669
+ export declare type ButtonSize = ValuesOf<typeof ButtonSize>;
670
+
671
+ /**
672
+ * The template for the Button component.
673
+ * @public
674
+ */
675
+ export declare const ButtonTemplate: ElementViewTemplate<Button>;
676
+
548
677
  export declare const colorBackgroundOverlay: CSSDesignToken<string>;
549
678
 
550
679
  export declare const colorBrandBackground: CSSDesignToken<string>;
@@ -1607,6 +1736,79 @@ export declare const lineHeightHero800: CSSDesignToken<string>;
1607
1736
 
1608
1737
  export declare const lineHeightHero900: CSSDesignToken<string>;
1609
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
+
1610
1812
  /**
1611
1813
  * The base class used for constructing a fluent-progress-bar custom element
1612
1814
  * @public
@@ -1913,6 +2115,10 @@ export declare const strokeWidthThickest: CSSDesignToken<string>;
1913
2115
 
1914
2116
  export declare const strokeWidthThin: CSSDesignToken<string>;
1915
2117
 
2118
+ declare const styles: ElementStyles;
2119
+ export { styles as ButtonStyles }
2120
+ export { styles as MenuButtonStyles }
2121
+
1916
2122
  export declare class Switch extends FASTSwitch {
1917
2123
  /**
1918
2124
  * The label position of the switch
@@ -1945,6 +2151,139 @@ export declare const switchStyles: ElementStyles;
1945
2151
 
1946
2152
  export declare const switchTemplate: ElementViewTemplate<Switch>;
1947
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
+
1948
2287
  /**
1949
2288
  * The base class used for constructing a fluent-text custom element
1950
2289
  * @public