@fluentui/web-components 3.0.0-alpha.16 → 3.0.0-alpha.18

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 (78) hide show
  1. package/CHANGELOG.json +58 -1
  2. package/CHANGELOG.md +22 -2
  3. package/dist/dts/anchor-button/anchor-button.d.ts +64 -0
  4. package/dist/dts/anchor-button/anchor-button.definition.d.ts +10 -0
  5. package/dist/dts/anchor-button/anchor-button.options.d.ts +46 -0
  6. package/dist/dts/anchor-button/anchor-button.styles.d.ts +1 -0
  7. package/dist/dts/anchor-button/anchor-button.template.d.ts +7 -0
  8. package/dist/dts/anchor-button/define.d.ts +1 -0
  9. package/dist/dts/anchor-button/index.d.ts +4 -0
  10. package/dist/dts/compound-button/compound-button.d.ts +7 -0
  11. package/dist/dts/compound-button/compound-button.definition.d.ts +10 -0
  12. package/dist/dts/compound-button/compound-button.options.d.ts +50 -0
  13. package/dist/dts/compound-button/compound-button.styles.d.ts +1 -0
  14. package/dist/dts/compound-button/compound-button.template.d.ts +13 -0
  15. package/dist/dts/compound-button/define.d.ts +1 -0
  16. package/dist/dts/compound-button/index.d.ts +5 -0
  17. package/dist/dts/index.d.ts +3 -0
  18. package/dist/dts/toggle-button/define.d.ts +1 -0
  19. package/dist/dts/toggle-button/index.d.ts +5 -0
  20. package/dist/dts/toggle-button/toggle-button.d.ts +48 -0
  21. package/dist/dts/toggle-button/toggle-button.definition.d.ts +10 -0
  22. package/dist/dts/toggle-button/toggle-button.options.d.ts +46 -0
  23. package/dist/dts/toggle-button/toggle-button.styles.d.ts +1 -0
  24. package/dist/dts/toggle-button/toggle-button.template.d.ts +7 -0
  25. package/dist/esm/anchor-button/anchor-button.definition.js +21 -0
  26. package/dist/esm/anchor-button/anchor-button.definition.js.map +1 -0
  27. package/dist/esm/anchor-button/anchor-button.js +93 -0
  28. package/dist/esm/anchor-button/anchor-button.js.map +1 -0
  29. package/dist/esm/anchor-button/anchor-button.options.js +17 -0
  30. package/dist/esm/anchor-button/anchor-button.options.js.map +1 -0
  31. package/dist/esm/anchor-button/anchor-button.styles.js +11 -0
  32. package/dist/esm/anchor-button/anchor-button.styles.js.map +1 -0
  33. package/dist/esm/anchor-button/anchor-button.template.js +7 -0
  34. package/dist/esm/anchor-button/anchor-button.template.js.map +1 -0
  35. package/dist/esm/anchor-button/define.js +4 -0
  36. package/dist/esm/anchor-button/define.js.map +1 -0
  37. package/dist/esm/anchor-button/index.js +5 -0
  38. package/dist/esm/anchor-button/index.js.map +1 -0
  39. package/dist/esm/button/button.styles.js +1 -0
  40. package/dist/esm/button/button.styles.js.map +1 -1
  41. package/dist/esm/compound-button/compound-button.definition.js +21 -0
  42. package/dist/esm/compound-button/compound-button.definition.js.map +1 -0
  43. package/dist/esm/compound-button/compound-button.js +8 -0
  44. package/dist/esm/compound-button/compound-button.js.map +1 -0
  45. package/dist/esm/compound-button/compound-button.options.js +17 -0
  46. package/dist/esm/compound-button/compound-button.options.js.map +1 -0
  47. package/dist/esm/compound-button/compound-button.styles.js +105 -0
  48. package/dist/esm/compound-button/compound-button.styles.js.map +1 -0
  49. package/dist/esm/compound-button/compound-button.template.js +60 -0
  50. package/dist/esm/compound-button/compound-button.template.js.map +1 -0
  51. package/dist/esm/compound-button/define.js +4 -0
  52. package/dist/esm/compound-button/define.js.map +1 -0
  53. package/dist/esm/compound-button/index.js +6 -0
  54. package/dist/esm/compound-button/index.js.map +1 -0
  55. package/dist/esm/image/image.styles.js +4 -1
  56. package/dist/esm/image/image.styles.js.map +1 -1
  57. package/dist/esm/index.js +3 -0
  58. package/dist/esm/index.js.map +1 -1
  59. package/dist/esm/toggle-button/define.js +4 -0
  60. package/dist/esm/toggle-button/define.js.map +1 -0
  61. package/dist/esm/toggle-button/index.js +6 -0
  62. package/dist/esm/toggle-button/index.js.map +1 -0
  63. package/dist/esm/toggle-button/toggle-button.definition.js +21 -0
  64. package/dist/esm/toggle-button/toggle-button.definition.js.map +1 -0
  65. package/dist/esm/toggle-button/toggle-button.js +99 -0
  66. package/dist/esm/toggle-button/toggle-button.js.map +1 -0
  67. package/dist/esm/toggle-button/toggle-button.options.js +17 -0
  68. package/dist/esm/toggle-button/toggle-button.options.js.map +1 -0
  69. package/dist/esm/toggle-button/toggle-button.styles.js +83 -0
  70. package/dist/esm/toggle-button/toggle-button.styles.js.map +1 -0
  71. package/dist/esm/toggle-button/toggle-button.template.js +7 -0
  72. package/dist/esm/toggle-button/toggle-button.template.js.map +1 -0
  73. package/dist/fluent-web-components.api.json +3168 -1471
  74. package/dist/web-components.d.ts +330 -0
  75. package/dist/web-components.js +488 -117
  76. package/dist/web-components.min.js +158 -146
  77. package/docs/api-report.md +173 -0
  78. package/package.json +13 -1
@@ -1,3 +1,4 @@
1
+ import { AnchorOptions as AnchorButtonOptions } from '@microsoft/fast-foundation';
1
2
  import { ButtonOptions } from '@microsoft/fast-foundation';
2
3
  import { CSSDesignToken } from '@microsoft/fast-foundation';
3
4
  import { DividerOrientation } from '@microsoft/fast-foundation';
@@ -6,6 +7,7 @@ import { ElementStyles } from '@microsoft/fast-element';
6
7
  import { ElementViewTemplate } from '@microsoft/fast-element';
7
8
  import { FASTAccordion } from '@microsoft/fast-foundation';
8
9
  import { FASTAccordionItem } from '@microsoft/fast-foundation';
10
+ import { FASTAnchor } from '@microsoft/fast-foundation';
9
11
  import { FASTButton } from '@microsoft/fast-foundation';
10
12
  import { FASTDivider } from '@microsoft/fast-foundation';
11
13
  import { FASTElement } from '@microsoft/fast-element';
@@ -128,6 +130,137 @@ export declare const accordionStyles: ElementStyles;
128
130
 
129
131
  export declare const accordionTemplate: ElementViewTemplate<Accordion>;
130
132
 
133
+ /**
134
+ * The base class used for constructing a fluent-anchor-button custom element
135
+ * @public
136
+ */
137
+ export declare class AnchorButton extends FASTAnchor {
138
+ /**
139
+ * The appearance the anchor button should have.
140
+ *
141
+ * @public
142
+ * @remarks
143
+ * HTML Attribute: appearance
144
+ */
145
+ appearance?: AnchorButtonAppearance | undefined;
146
+ /**
147
+ * The shape the anchor button should have.
148
+ *
149
+ * @public
150
+ * @remarks
151
+ * HTML Attribute: shape
152
+ */
153
+ shape?: AnchorButtonShape | undefined;
154
+ /**
155
+ * The size the anchor button should have.
156
+ *
157
+ * @public
158
+ * @remarks
159
+ * HTML Attribute: size
160
+ */
161
+ size?: AnchorButtonSize;
162
+ /**
163
+ * The anchor button has an icon only, no text content
164
+ *
165
+ * @public
166
+ * @remarks
167
+ * HTML Attribute: icon-only
168
+ */
169
+ iconOnly: boolean;
170
+ /**
171
+ * The anchor button is disabled
172
+ *
173
+ * @public
174
+ * @remarks
175
+ * HTML Attribute: disabled-focusable
176
+ */
177
+ disabled?: boolean;
178
+ protected disabledChanged(prev: boolean, next: boolean): void;
179
+ /**
180
+ * The anchor button is disabled but focusable
181
+ *
182
+ * @public
183
+ * @remarks
184
+ * HTML Attribute: disabled-focusable
185
+ */
186
+ disabledFocusable?: boolean;
187
+ protected disabledFocusableChanged(prev: boolean, next: boolean): void;
188
+ /**
189
+ * Prevents disabledFocusable click events
190
+ */
191
+ private handleDisabledFocusableClick;
192
+ connectedCallback(): void;
193
+ disconnectedCallback(): void;
194
+ }
195
+
196
+ /**
197
+ * Anchor Button Appearance constants
198
+ * @public
199
+ */
200
+ export declare const AnchorButtonAppearance: {
201
+ readonly primary: "primary";
202
+ readonly outline: "outline";
203
+ readonly subtle: "subtle";
204
+ readonly secondary: "secondary";
205
+ readonly transparent: "transparent";
206
+ };
207
+
208
+ /**
209
+ * An Anchor Button can be secondary, primary, outline, subtle, transparent
210
+ * @public
211
+ */
212
+ export declare type AnchorButtonAppearance = ValuesOf<typeof AnchorButtonAppearance>;
213
+
214
+ /**
215
+ * The Fluent Anchor Button Element. Implements {@link @microsoft/fast-foundation#Anchor },
216
+ * {@link @microsoft/fast-foundation#anchorTemplate}
217
+ *
218
+ * @public
219
+ * @remarks
220
+ * HTML Element: \<fluent-anchor-button\>
221
+ */
222
+ export declare const AnchorButtonDefinition: FASTElementDefinition<typeof AnchorButton>;
223
+
224
+ export { AnchorButtonOptions }
225
+
226
+ /**
227
+ * An Anchor Button can be square, circular or rounded.
228
+ * @public
229
+ */
230
+ export declare const AnchorButtonShape: {
231
+ readonly circular: "circular";
232
+ readonly rounded: "rounded";
233
+ readonly square: "square";
234
+ };
235
+
236
+ /**
237
+ * An Anchor Button can be square, circular or rounded
238
+ * @public
239
+ */
240
+ export declare type AnchorButtonShape = ValuesOf<typeof AnchorButtonShape>;
241
+
242
+ /**
243
+ * An Anchor Button can be a size of small, medium or large.
244
+ * @public
245
+ */
246
+ export declare const AnchorButtonSize: {
247
+ readonly small: "small";
248
+ readonly medium: "medium";
249
+ readonly large: "large";
250
+ };
251
+
252
+ /**
253
+ * An Anchor Button can be on of several preset sizes.
254
+ * @public
255
+ */
256
+ export declare type AnchorButtonSize = ValuesOf<typeof AnchorButtonSize>;
257
+
258
+ /**
259
+ * The template for the Button component.
260
+ * @public
261
+ */
262
+ export declare const AnchorButtonTemplate: ElementViewTemplate<AnchorButton>;
263
+
131
264
  /**
132
265
  * The base class used for constructing a fluent-avatar custom element
133
266
  * @public
@@ -634,7 +767,9 @@ export declare type ButtonAppearance = ValuesOf<typeof ButtonAppearance>;
634
767
  export declare const ButtonDefinition: FASTElementDefinition<typeof Button>;
635
768
 
636
769
  export { ButtonOptions }
770
+ export { ButtonOptions as CompoundButtonOptions }
637
771
  export { ButtonOptions as MenuButtonOptions }
772
+ export { ButtonOptions as ToggleButtonOptions }
638
773
 
639
774
  /**
640
775
  * A Button can be square, circular or rounded.
@@ -1268,6 +1403,85 @@ export declare const colorTransparentStrokeDisabled: CSSDesignToken<string>;
1268
1403
 
1269
1404
  export declare const colorTransparentStrokeInteractive: CSSDesignToken<string>;
1270
1405
 
1406
+ /**
1407
+ * The base class used for constructing a fluent-compound-button custom element
1408
+ * @public
1409
+ */
1410
+ export declare class CompoundButton extends Button {
1411
+ }
1412
+
1413
+ /**
1414
+ * Compound Button Appearance constants
1415
+ * @public
1416
+ */
1417
+ export declare const CompoundButtonAppearance: {
1418
+ readonly primary: "primary";
1419
+ readonly outline: "outline";
1420
+ readonly subtle: "subtle";
1421
+ readonly secondary: "secondary";
1422
+ readonly transparent: "transparent";
1423
+ };
1424
+
1425
+ /**
1426
+ * A Compound Button can be secondary, primary, outline, subtle, transparent
1427
+ * @public
1428
+ */
1429
+ export declare type CompoundButtonAppearance = ValuesOf<typeof CompoundButtonAppearance>;
1430
+
1431
+ /**
1432
+ * The Fluent Compound Button Element. Implements {@link @microsoft/fast-foundation#Button },
1433
+ * {@link @microsoft/fast-foundation#buttonTemplate}
1434
+ *
1435
+ * @public
1436
+ * @remarks
1437
+ * HTML Element: \<fluent-comopund-button\>
1438
+ */
1439
+ export declare const CompoundButtonDefinition: FASTElementDefinition<typeof CompoundButton>;
1440
+
1441
+ /**
1442
+ * A Compound Button can be square, circular or rounded.
1443
+ * @public
1444
+ */
1445
+ export declare const CompoundButtonShape: {
1446
+ readonly circular: "circular";
1447
+ readonly rounded: "rounded";
1448
+ readonly square: "square";
1449
+ };
1450
+
1451
+ /**
1452
+ * A Compound Button can be square, circular or rounded
1453
+ * @public
1454
+ */
1455
+ export declare type CompoundButtonShape = ValuesOf<typeof CompoundButtonShape>;
1456
+
1457
+ /**
1458
+ * A Compound Button can be a size of small, medium or large.
1459
+ * @public
1460
+ */
1461
+ export declare const CompoundButtonSize: {
1462
+ readonly small: "small";
1463
+ /**
1464
+ * A Compound Button can be on of several preset sizes.
1465
+ * @public
1466
+ */
1467
+ readonly medium: "medium";
1468
+ readonly large: "large";
1469
+ };
1470
+
1471
+ /**
1472
+ * A Compound Button can be on of several preset sizes.
1473
+ * @public
1474
+ */
1475
+ export declare type CompoundButtonSize = ValuesOf<typeof CompoundButtonSize>;
1476
+
1477
+ export declare const CompoundButtonStyles: ElementStyles;
1478
+
1479
+ /**
1480
+ * The template for the Button component.
1481
+ * @public
1482
+ */
1483
+ export declare const CompoundButtonTemplate: ElementViewTemplate<CompoundButton>;
1484
+
1271
1485
  /**
1272
1486
  * The base class used for constructing a fluent-badge custom element
1273
1487
  * @public
@@ -2556,4 +2770,120 @@ export declare const TextWeight: {
2556
2770
  */
2557
2771
  export declare type TextWeight = ValuesOf<typeof TextWeight>;
2558
2772
 
2773
+ /**
2774
+ * The base class used for constructing a fluent-toggle-button custom element
2775
+ * @public
2776
+ */
2777
+ export declare class ToggleButton extends Button {
2778
+ /**
2779
+ * Tracks whether the "checked" property has been changed.
2780
+ * This is necessary to provide consistent behavior with
2781
+ * normal input checkboxes
2782
+ */
2783
+ protected dirtyChecked: boolean;
2784
+ /**
2785
+ * Provides the default checkedness of the input element
2786
+ * Passed down to proxy
2787
+ *
2788
+ * @public
2789
+ * @remarks
2790
+ * HTML Attribute: checked
2791
+ */
2792
+ checkedAttribute: boolean;
2793
+ protected checkedAttributeChanged(): void;
2794
+ defaultChecked: boolean;
2795
+ protected defaultCheckedChanged(): void;
2796
+ /**
2797
+ * The checked state of the control.
2798
+ *
2799
+ * @public
2800
+ */
2801
+ checked: boolean;
2802
+ protected checkedChanged(prev: boolean | undefined, next: boolean): void;
2803
+ /**
2804
+ * The current checkedness of the element. This property serves as a mechanism
2805
+ * to set the `checked` property through both property assignment and the
2806
+ * .setAttribute() method. This is useful for setting the field's checkedness
2807
+ * in UI libraries that bind data through the .setAttribute() API
2808
+ * and don't support IDL attribute binding.
2809
+ */
2810
+ currentChecked: boolean;
2811
+ currentCheckedChanged(prev: boolean | undefined, next: boolean): void;
2812
+ constructor();
2813
+ connectedCallback(): void;
2814
+ disconnectedCallback(): void;
2815
+ /**
2816
+ * @internal
2817
+ */
2818
+ protected handleToggleButtonClick: (e: MouseEvent) => void;
2819
+ }
2820
+
2821
+ /**
2822
+ * Toggle Button Appearance constants
2823
+ * @public
2824
+ */
2825
+ export declare const ToggleButtonAppearance: {
2826
+ readonly primary: "primary";
2827
+ readonly outline: "outline";
2828
+ readonly subtle: "subtle";
2829
+ readonly secondary: "secondary";
2830
+ readonly transparent: "transparent";
2831
+ };
2832
+
2833
+ /**
2834
+ * A Toggle Button can be secondary, primary, outline, subtle, transparent
2835
+ * @public
2836
+ */
2837
+ export declare type ToggleButtonAppearance = ValuesOf<typeof ToggleButtonAppearance>;
2838
+
2839
+ /**
2840
+ * The Fluent Toggle Button Element. Implements {@link @microsoft/fast-foundation#Button },
2841
+ * {@link @microsoft/fast-foundation#buttonTemplate}
2842
+ *
2843
+ * @public
2844
+ * @remarks
2845
+ * HTML Element: \<fluent-toggle-button\>
2846
+ */
2847
+ export declare const ToggleButtonDefinition: FASTElementDefinition<typeof ToggleButton>;
2848
+
2849
+ /**
2850
+ * A Toggle Button can be square, circular or rounded.
2851
+ * @public
2852
+ */
2853
+ export declare const ToggleButtonShape: {
2854
+ readonly circular: "circular";
2855
+ readonly rounded: "rounded";
2856
+ readonly square: "square";
2857
+ };
2858
+
2859
+ /**
2860
+ * A Toggle Button can be square, circular or rounded
2861
+ * @public
2862
+ */
2863
+ export declare type ToggleButtonShape = ValuesOf<typeof ToggleButtonShape>;
2864
+
2865
+ /**
2866
+ * A Toggle Button can be a size of small, medium or large.
2867
+ * @public
2868
+ */
2869
+ export declare const ToggleButtonSize: {
2870
+ readonly small: "small";
2871
+ readonly medium: "medium";
2872
+ readonly large: "large";
2873
+ };
2874
+
2875
+ /**
2876
+ * A Toggle Button can be on of several preset sizes.
2877
+ * @public
2878
+ */
2879
+ export declare type ToggleButtonSize = ValuesOf<typeof ToggleButtonSize>;
2880
+
2881
+ export declare const ToggleButtonStyles: ElementStyles;
2882
+
2883
+ /**
2884
+ * The template for the ToggleButton component.
2885
+ * @public
2886
+ */
2887
+ export declare const ToggleButtonTemplate: ElementViewTemplate<ToggleButton>;
2888
+
2559
2889
  export { }