@fluentui/web-components 3.0.0-rc.19 → 3.0.0-rc.20

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 (31) hide show
  1. package/CHANGELOG.md +12 -2
  2. package/custom-elements.json +201 -26
  3. package/dist/esm/badge/index.d.ts +3 -4
  4. package/dist/esm/badge/index.js +3 -4
  5. package/dist/esm/badge/index.js.map +1 -1
  6. package/dist/esm/counter-badge/counter-badge.base.d.ts +55 -0
  7. package/dist/esm/counter-badge/counter-badge.base.js +84 -0
  8. package/dist/esm/counter-badge/counter-badge.base.js.map +1 -0
  9. package/dist/esm/counter-badge/counter-badge.d.ts +4 -57
  10. package/dist/esm/counter-badge/counter-badge.js +6 -77
  11. package/dist/esm/counter-badge/counter-badge.js.map +1 -1
  12. package/dist/esm/counter-badge/counter-badge.options.d.ts +19 -11
  13. package/dist/esm/counter-badge/counter-badge.options.js +8 -4
  14. package/dist/esm/counter-badge/counter-badge.options.js.map +1 -1
  15. package/dist/esm/counter-badge/counter-badge.template.d.ts +9 -1
  16. package/dist/esm/counter-badge/counter-badge.template.js +15 -7
  17. package/dist/esm/counter-badge/counter-badge.template.js.map +1 -1
  18. package/dist/esm/counter-badge/index.d.ts +4 -4
  19. package/dist/esm/counter-badge/index.js +4 -4
  20. package/dist/esm/counter-badge/index.js.map +1 -1
  21. package/dist/esm/dropdown/dropdown.styles.js +1 -0
  22. package/dist/esm/dropdown/dropdown.styles.js.map +1 -1
  23. package/dist/esm/index.d.ts +1 -1
  24. package/dist/esm/index.js +1 -1
  25. package/dist/esm/index.js.map +1 -1
  26. package/dist/web-components-all.js +170 -166
  27. package/dist/web-components-all.min.js +15 -15
  28. package/dist/web-components.d.ts +81 -65
  29. package/dist/web-components.js +169 -165
  30. package/dist/web-components.min.js +18 -18
  31. package/package.json +1 -1
@@ -1614,6 +1614,61 @@ export declare class BaseCheckbox extends FASTElement {
1614
1614
  toggleChecked(force?: boolean): void;
1615
1615
  }
1616
1616
 
1617
+ /**
1618
+ * The base class used for constructing a fluent-counter-badge custom element.
1619
+ * Contains the count-related state and display logic, without any visual
1620
+ * appearance attributes.
1621
+ *
1622
+ * @public
1623
+ */
1624
+ export declare class BaseCounterBadge extends FASTElement {
1625
+ /**
1626
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
1627
+ *
1628
+ * @internal
1629
+ */
1630
+ elementInternals: ElementInternals;
1631
+ /**
1632
+ * The count to be displayed in the badge.
1633
+ *
1634
+ * @public
1635
+ * @remarks
1636
+ * HTML Attribute: `count`
1637
+ */
1638
+ count: number;
1639
+ /**
1640
+ * The maximum count to be displayed before showing the overflow count (e.g. "99+").
1641
+ *
1642
+ * @public
1643
+ * @remarks
1644
+ * HTML Attribute: `overflow-count`
1645
+ */
1646
+ overflowCount: number;
1647
+ /**
1648
+ * Whether to show the badge when the count is zero. By default, the badge will be hidden when the count is zero.
1649
+ *
1650
+ * @public
1651
+ * @remarks
1652
+ * HTML Attribute: `show-zero`
1653
+ */
1654
+ showZero: boolean;
1655
+ /**
1656
+ * Whether to display the badge as a dot. When true, the badge will be displayed as a dot and the count will not be
1657
+ * shown.
1658
+ *
1659
+ * @public
1660
+ * @remarks
1661
+ * HTML Attribute: `dot`
1662
+ */
1663
+ dot: boolean;
1664
+ /**
1665
+ * The value to be displayed in the badge, which is determined by the `count`, `overflow-count`, and `show-zero` attributes.
1666
+ *
1667
+ * @public
1668
+ */
1669
+ get displayValue(): string | undefined;
1670
+ }
1671
+
1617
1672
  /**
1618
1673
  * A Divider Custom HTML Element.
1619
1674
  * A divider groups sections of content to create visual rhythm and hierarchy. Use dividers along with spacing and headers to organize content in your layout.
@@ -6407,19 +6462,14 @@ export declare const CompoundButtonStyles: ElementStyles;
6407
6462
  export declare const CompoundButtonTemplate: ElementViewTemplate<CompoundButton>;
6408
6463
 
6409
6464
  /**
6410
- * The base class used for constructing a fluent-badge custom element
6465
+ * A CounterBadge Custom HTML Element.
6466
+ * Based on BaseCounterBadge and includes style and layout specific attributes.
6411
6467
  *
6412
6468
  * @tag fluent-counter-badge
6413
6469
  *
6414
6470
  * @public
6415
6471
  */
6416
- export declare class CounterBadge extends FASTElement {
6417
- /**
6418
- * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
6419
- *
6420
- * @internal
6421
- */
6422
- elementInternals: ElementInternals;
6472
+ export declare class CounterBadge extends BaseCounterBadge {
6423
6473
  /**
6424
6474
  * The appearance the badge should have.
6425
6475
  *
@@ -6452,61 +6502,14 @@ export declare class CounterBadge extends FASTElement {
6452
6502
  * HTML Attribute: size
6453
6503
  */
6454
6504
  size?: CounterBadgeSize;
6455
- /**
6456
- * The count the badge should have.
6457
- *
6458
- * @public
6459
- * @remarks
6460
- * HTML Attribute: count
6461
- */
6462
- count: number;
6463
- protected countChanged(): void;
6464
- /**
6465
- * Max number to be displayed
6466
- *
6467
- * @public
6468
- * @remarks
6469
- * HTML Attribute: overflow-count
6470
- */
6471
- overflowCount: number;
6472
- protected overflowCountChanged(): void;
6473
- /**
6474
- * If the badge should be shown when count is 0
6475
- *
6476
- * @public
6477
- * @remarks
6478
- * HTML Attribute: show-zero
6479
- */
6480
- showZero: boolean;
6481
- /**
6482
- * If a dot should be displayed without the count
6483
- *
6484
- * @public
6485
- * @remarks
6486
- * HTML Attribute: dot
6487
- */
6488
- dot: boolean;
6489
- /**
6490
- * Function to set the count
6491
- * This is the default slotted content for the counter badge
6492
- * If children are slotted, that will override the value returned
6493
- *
6494
- * @internal
6495
- */
6496
- setCount(): string | void;
6497
6505
  }
6498
6506
 
6499
- /**
6500
- * Mark internal because exporting class and interface of the same name
6501
- * confuses API extractor.
6502
- * TODO: Below will be unnecessary when Badge class gets updated
6503
- * @internal
6504
- */
6505
6507
  export declare interface CounterBadge extends StartEnd {
6506
6508
  }
6507
6509
 
6508
6510
  /**
6509
- * CounterBadgeAppearance constants
6511
+ * Values for the `appearance` attribute on CounterBadge elements.
6512
+ *
6510
6513
  * @public
6511
6514
  */
6512
6515
  export declare const CounterBadgeAppearance: {
@@ -6515,13 +6518,14 @@ export declare const CounterBadgeAppearance: {
6515
6518
  };
6516
6519
 
6517
6520
  /**
6518
- * A CounterBadge can have an appearance of filled or ghost
6521
+ * Type for the `appearance` attribute on CounterBadge elements, based on the CounterBadgeAppearance constants.
6519
6522
  * @public
6520
6523
  */
6521
6524
  export declare type CounterBadgeAppearance = ValuesOf<typeof CounterBadgeAppearance>;
6522
6525
 
6523
6526
  /**
6524
- * CounterBadgeColor constants
6527
+ * Values for the `color` attribute on CounterBadge elements.
6528
+ *
6525
6529
  * @public
6526
6530
  */
6527
6531
  export declare const CounterBadgeColor: {
@@ -6536,7 +6540,7 @@ export declare const CounterBadgeColor: {
6536
6540
  };
6537
6541
 
6538
6542
  /**
6539
- * A CounterBadge can be one of preset colors
6543
+ * Type for the `color` attribute on CounterBadge elements, based on the CounterBadgeColor constants.
6540
6544
  * @public
6541
6545
  */
6542
6546
  export declare type CounterBadgeColor = ValuesOf<typeof CounterBadgeColor>;
@@ -6549,7 +6553,8 @@ export declare type CounterBadgeColor = ValuesOf<typeof CounterBadgeColor>;
6549
6553
  export declare const CounterBadgeDefinition: FASTElementDefinition<typeof CounterBadge>;
6550
6554
 
6551
6555
  /**
6552
- * A CounterBadge shape can be circular or rounded.
6556
+ * Values for the `shape` attribute on CounterBadge elements.
6557
+ *
6553
6558
  * @public
6554
6559
  */
6555
6560
  export declare const CounterBadgeShape: {
@@ -6558,13 +6563,15 @@ export declare const CounterBadgeShape: {
6558
6563
  };
6559
6564
 
6560
6565
  /**
6561
- * A CounterBadge can be one of preset colors
6566
+ * Type for the `shape` attribute on CounterBadge elements, based on the CounterBadgeShape constants.
6567
+ *
6562
6568
  * @public
6563
6569
  */
6564
6570
  export declare type CounterBadgeShape = ValuesOf<typeof CounterBadgeShape>;
6565
6571
 
6566
6572
  /**
6567
- * A CounterBadge can be square, circular or rounded.
6573
+ * Values for the `size` attribute on CounterBadge elements.
6574
+ *
6568
6575
  * @public
6569
6576
  */
6570
6577
  export declare const CounterBadgeSize: {
@@ -6577,7 +6584,8 @@ export declare const CounterBadgeSize: {
6577
6584
  };
6578
6585
 
6579
6586
  /**
6580
- * A CounterBadge can be on of several preset sizes.
6587
+ * Type for the `size` attribute on CounterBadge elements, based on the CounterBadgeSize constants.
6588
+ *
6581
6589
  * @public
6582
6590
  */
6583
6591
  export declare type CounterBadgeSize = ValuesOf<typeof CounterBadgeSize>;
@@ -6588,7 +6596,15 @@ export declare type CounterBadgeSize = ValuesOf<typeof CounterBadgeSize>;
6588
6596
  export declare const CounterBadgeStyles: ElementStyles;
6589
6597
 
6590
6598
  /**
6591
- * The template for the Counter Badge component.
6599
+ * The tag name for the counter badge element.
6600
+ *
6601
+ * @public
6602
+ */
6603
+ export declare const CounterBadgeTagName: "fluent-counter-badge";
6604
+
6605
+ /**
6606
+ * The template for the fluent-counter-badge component.
6607
+ *
6592
6608
  * @public
6593
6609
  */
6594
6610
  export declare const CounterBadgeTemplate: ElementViewTemplate<CounterBadge>;