@fluentui/web-components 3.0.0-beta.47 → 3.0.0-beta.48

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.
@@ -11,7 +11,6 @@ import type { HostController } from '@microsoft/fast-element';
11
11
  import { HTMLDirective } from '@microsoft/fast-element';
12
12
  import { Orientation } from '@microsoft/fast-web-utilities';
13
13
  import type { SyntheticViewTemplate } from '@microsoft/fast-element';
14
- import type { Theme } from '@fluentui/tokens';
15
14
  import { ViewTemplate } from '@microsoft/fast-element';
16
15
 
17
16
  /**
@@ -1616,6 +1615,92 @@ export declare class BaseDivider extends FASTElement {
1616
1615
  orientationChanged(previous: string | null, next: string | null): void;
1617
1616
  }
1618
1617
 
1618
+ /**
1619
+ * A Progress HTML Element.
1620
+ * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#progressbar | ARIA progressbar }.
1621
+ *
1622
+ * @public
1623
+ */
1624
+ export declare class BaseProgressBar 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 validation state of the progress bar
1633
+ * @public
1634
+ * HTML Attribute: `validation-state`
1635
+ */
1636
+ validationState: ProgressBarValidationState | null;
1637
+ /**
1638
+ * Handles changes to validation-state attribute custom states
1639
+ * @param prev - the previous state
1640
+ * @param next - the next state
1641
+ */
1642
+ validationStateChanged(prev: ProgressBarValidationState | undefined, next: ProgressBarValidationState | undefined): void;
1643
+ /**
1644
+ * The value of the progress
1645
+ * @internal
1646
+ * HTML Attribute: `value`
1647
+ */
1648
+ value?: number;
1649
+ /**
1650
+ * Updates the percent complete when the `value` property changes.
1651
+ *
1652
+ * @internal
1653
+ */
1654
+ protected valueChanged(prev: number | undefined, next: number | undefined): void;
1655
+ /**
1656
+ * The minimum value
1657
+ * @internal
1658
+ * HTML Attribute: `min`
1659
+ */
1660
+ min?: number;
1661
+ /**
1662
+ * Updates the percent complete when the `min` property changes.
1663
+ *
1664
+ * @param prev - The previous min value
1665
+ * @param next - The current min value
1666
+ */
1667
+ protected minChanged(prev: number | undefined, next: number | undefined): void;
1668
+ /**
1669
+ * The maximum value
1670
+ * @internal
1671
+ * HTML Attribute: `max`
1672
+ */
1673
+ max?: number;
1674
+ /**
1675
+ * Updates the percent complete when the `max` property changes.
1676
+ *
1677
+ * @param prev - The previous max value
1678
+ * @param next - The current max value
1679
+ * @internal
1680
+ */
1681
+ protected maxChanged(prev: number | undefined, next: number | undefined): void;
1682
+ /**
1683
+ * Indicates progress in %
1684
+ * @internal
1685
+ */
1686
+ get percentComplete(): number;
1687
+ constructor();
1688
+ }
1689
+
1690
+ /**
1691
+ * The base class used for constructing a fluent-spinner custom element
1692
+ * @public
1693
+ */
1694
+ export declare class BaseSpinner extends FASTElement {
1695
+ /**
1696
+ * The internal {@link https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
1697
+ *
1698
+ * @internal
1699
+ */
1700
+ elementInternals: ElementInternals;
1701
+ constructor();
1702
+ }
1703
+
1619
1704
  /**
1620
1705
  * A Tabs component that wraps a collection of tab and tab panel elements.
1621
1706
  *
@@ -6367,18 +6452,12 @@ export declare const MenuStyles: ElementStyles;
6367
6452
  export declare const MenuTemplate: ElementViewTemplate<Menu>;
6368
6453
 
6369
6454
  /**
6370
- * An Progress HTML Element.
6371
- * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#progressbar | ARIA progressbar }.
6455
+ * A Progress HTML Element.
6456
+ * Based on BaseProgressBar and includes style and layout specific attributes
6372
6457
  *
6373
6458
  * @public
6374
6459
  */
6375
- export declare class ProgressBar extends FASTElement {
6376
- /**
6377
- * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
6378
- *
6379
- * @internal
6380
- */
6381
- elementInternals: ElementInternals;
6460
+ export declare class ProgressBar extends BaseProgressBar {
6382
6461
  /**
6383
6462
  * The thickness of the progress bar
6384
6463
  *
@@ -6404,63 +6483,6 @@ export declare class ProgressBar extends FASTElement {
6404
6483
  * @param next - the next state
6405
6484
  */
6406
6485
  shapeChanged(prev: ProgressBarShape | undefined, next: ProgressBarShape | undefined): void;
6407
- /**
6408
- * The validation state of the progress bar
6409
- * @public
6410
- * HTML Attribute: `validation-state`
6411
- */
6412
- validationState: ProgressBarValidationState | null;
6413
- /**
6414
- * Handles changes to validation-state attribute custom states
6415
- * @param prev - the previous state
6416
- * @param next - the next state
6417
- */
6418
- validationStateChanged(prev: ProgressBarValidationState | undefined, next: ProgressBarValidationState | undefined): void;
6419
- /**
6420
- * The value of the progress
6421
- * @internal
6422
- * HTML Attribute: `value`
6423
- */
6424
- value?: number;
6425
- /**
6426
- * Updates the percent complete when the `value` property changes.
6427
- *
6428
- * @internal
6429
- */
6430
- protected valueChanged(prev: number | undefined, next: number | undefined): void;
6431
- /**
6432
- * The minimum value
6433
- * @internal
6434
- * HTML Attribute: `min`
6435
- */
6436
- min?: number;
6437
- /**
6438
- * Updates the percent complete when the `min` property changes.
6439
- *
6440
- * @param prev - The previous min value
6441
- * @param next - The current min value
6442
- */
6443
- protected minChanged(prev: number | undefined, next: number | undefined): void;
6444
- /**
6445
- * The maximum value
6446
- * @internal
6447
- * HTML Attribute: `max`
6448
- */
6449
- max?: number;
6450
- /**
6451
- * Updates the percent complete when the `max` property changes.
6452
- *
6453
- * @param prev - The previous max value
6454
- * @param next - The current max value
6455
- * @internal
6456
- */
6457
- protected maxChanged(prev: number | undefined, next: number | undefined): void;
6458
- /**
6459
- * Indicates progress in %
6460
- * @internal
6461
- */
6462
- get percentComplete(): number;
6463
- constructor();
6464
6486
  }
6465
6487
 
6466
6488
  /**
@@ -7743,16 +7765,12 @@ export declare const spacingVerticalXXS = "var(--spacingVerticalXXS)";
7743
7765
  export declare const spacingVerticalXXXL = "var(--spacingVerticalXXXL)";
7744
7766
 
7745
7767
  /**
7746
- * The base class used for constructing a fluent-spinner custom element
7768
+ * A Spinner Custom HTML Element.
7769
+ * Based on BaseSpinner and includes style and layout specific attributes
7770
+ *
7747
7771
  * @public
7748
7772
  */
7749
- export declare class Spinner extends FASTElement {
7750
- /**
7751
- * The internal {@link https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
7752
- *
7753
- * @internal
7754
- */
7755
- elementInternals: ElementInternals;
7773
+ export declare class Spinner extends BaseSpinner {
7756
7774
  /**
7757
7775
  * The size of the spinner
7758
7776
  *
@@ -7780,7 +7798,6 @@ export declare class Spinner extends FASTElement {
7780
7798
  * @param next - the next state
7781
7799
  */
7782
7800
  appearanceChanged(prev: SpinnerAppearance | undefined, next: SpinnerAppearance | undefined): void;
7783
- constructor();
7784
7801
  }
7785
7802
 
7786
7803
  /**
@@ -8816,6 +8833,13 @@ export declare const TextWeight: {
8816
8833
  */
8817
8834
  export declare type TextWeight = ValuesOf<typeof TextWeight>;
8818
8835
 
8836
+ /**
8837
+ * Not using the `Theme` type from `@fluentui/tokens` package to allow custom
8838
+ * tokens to be added.
8839
+ * @internal
8840
+ */
8841
+ export declare type Theme = Record<string, string | number>;
8842
+
8819
8843
  /**
8820
8844
  * The base class used for constructing a `<fluent-toggle-button>` custom element.
8821
8845
  *
@@ -7961,7 +7961,7 @@ var __decorateClass$9 = (decorators, target, key, kind) => {
7961
7961
  if (kind && result) __defProp$9(target, key, result);
7962
7962
  return result;
7963
7963
  };
7964
- class ProgressBar extends FASTElement {
7964
+ class BaseProgressBar extends FASTElement {
7965
7965
  constructor() {
7966
7966
  super();
7967
7967
  /**
@@ -7973,32 +7973,6 @@ class ProgressBar extends FASTElement {
7973
7973
  this.validationState = null;
7974
7974
  this.elementInternals.role = "progressbar";
7975
7975
  }
7976
- /**
7977
- * Handles changes to thickness attribute custom states
7978
- * @param prev - the previous state
7979
- * @param next - the next state
7980
- */
7981
- thicknessChanged(prev, next) {
7982
- if (prev) {
7983
- toggleState(this.elementInternals, `${prev}`, false);
7984
- }
7985
- if (next) {
7986
- toggleState(this.elementInternals, `${next}`, true);
7987
- }
7988
- }
7989
- /**
7990
- * Handles changes to shape attribute custom states
7991
- * @param prev - the previous state
7992
- * @param next - the next state
7993
- */
7994
- shapeChanged(prev, next) {
7995
- if (prev) {
7996
- toggleState(this.elementInternals, `${prev}`, false);
7997
- }
7998
- if (next) {
7999
- toggleState(this.elementInternals, `${next}`, true);
8000
- }
8001
- }
8002
7976
  /**
8003
7977
  * Handles changes to validation-state attribute custom states
8004
7978
  * @param prev - the previous state
@@ -8047,21 +8021,49 @@ class ProgressBar extends FASTElement {
8047
8021
  return range === 0 ? 0 : Math.fround((value - min) / range * 100);
8048
8022
  }
8049
8023
  }
8050
- __decorateClass$9([attr], ProgressBar.prototype, "thickness", 2);
8051
- __decorateClass$9([attr], ProgressBar.prototype, "shape", 2);
8052
8024
  __decorateClass$9([attr({
8053
8025
  attribute: "validation-state"
8054
- })], ProgressBar.prototype, "validationState", 2);
8026
+ })], BaseProgressBar.prototype, "validationState", 2);
8055
8027
  __decorateClass$9([attr({
8056
8028
  converter: nullableNumberConverter
8057
- })], ProgressBar.prototype, "value", 2);
8029
+ })], BaseProgressBar.prototype, "value", 2);
8058
8030
  __decorateClass$9([attr({
8059
8031
  converter: nullableNumberConverter
8060
- })], ProgressBar.prototype, "min", 2);
8032
+ })], BaseProgressBar.prototype, "min", 2);
8061
8033
  __decorateClass$9([attr({
8062
8034
  converter: nullableNumberConverter
8063
- })], ProgressBar.prototype, "max", 2);
8064
- __decorateClass$9([volatile], ProgressBar.prototype, "percentComplete", 1);
8035
+ })], BaseProgressBar.prototype, "max", 2);
8036
+ __decorateClass$9([volatile], BaseProgressBar.prototype, "percentComplete", 1);
8037
+ class ProgressBar extends BaseProgressBar {
8038
+ /**
8039
+ * Handles changes to thickness attribute custom states
8040
+ * @param prev - the previous state
8041
+ * @param next - the next state
8042
+ */
8043
+ thicknessChanged(prev, next) {
8044
+ if (prev) {
8045
+ toggleState(this.elementInternals, `${prev}`, false);
8046
+ }
8047
+ if (next) {
8048
+ toggleState(this.elementInternals, `${next}`, true);
8049
+ }
8050
+ }
8051
+ /**
8052
+ * Handles changes to shape attribute custom states
8053
+ * @param prev - the previous state
8054
+ * @param next - the next state
8055
+ */
8056
+ shapeChanged(prev, next) {
8057
+ if (prev) {
8058
+ toggleState(this.elementInternals, `${prev}`, false);
8059
+ }
8060
+ if (next) {
8061
+ toggleState(this.elementInternals, `${next}`, true);
8062
+ }
8063
+ }
8064
+ }
8065
+ __decorateClass$9([attr], ProgressBar.prototype, "thickness", 2);
8066
+ __decorateClass$9([attr], ProgressBar.prototype, "shape", 2);
8065
8067
 
8066
8068
  const styles$c = css`
8067
8069
  ${display("block")}
@@ -9371,7 +9373,7 @@ var __decorateClass$5 = (decorators, target, key, kind) => {
9371
9373
  if (kind && result) __defProp$5(target, key, result);
9372
9374
  return result;
9373
9375
  };
9374
- class Spinner extends FASTElement {
9376
+ class BaseSpinner extends FASTElement {
9375
9377
  constructor() {
9376
9378
  super();
9377
9379
  /**
@@ -9382,6 +9384,8 @@ class Spinner extends FASTElement {
9382
9384
  this.elementInternals = this.attachInternals();
9383
9385
  this.elementInternals.role = "progressbar";
9384
9386
  }
9387
+ }
9388
+ class Spinner extends BaseSpinner {
9385
9389
  /**
9386
9390
  * Handles changes to size attribute custom states
9387
9391
  * @param prev - the previous state