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

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.
@@ -1050,7 +1050,7 @@ declare class BaseAnchor extends FASTElement {
1050
1050
  *
1051
1051
  * @public
1052
1052
  */
1053
- declare class BaseButton extends FASTElement {
1053
+ export declare class BaseButton extends FASTElement {
1054
1054
  /**
1055
1055
  * Indicates the button should be focused when the page is loaded.
1056
1056
  * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#autofocus | `autofocus`} attribute
@@ -1568,6 +1568,54 @@ declare class BaseCheckbox extends FASTElement {
1568
1568
  toggleChecked(force?: boolean): void;
1569
1569
  }
1570
1570
 
1571
+ /**
1572
+ * A Divider Custom HTML Element.
1573
+ * 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.
1574
+ *
1575
+ * @public
1576
+ */
1577
+ export declare class BaseDivider extends FASTElement {
1578
+ /**
1579
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
1580
+ *
1581
+ * @internal
1582
+ */
1583
+ elementInternals: ElementInternals;
1584
+ /**
1585
+ * The role of the element.
1586
+ *
1587
+ * @public
1588
+ * @remarks
1589
+ * HTML Attribute: role
1590
+ */
1591
+ role: DividerRole;
1592
+ /**
1593
+ * The orientation of the divider.
1594
+ *
1595
+ * @public
1596
+ * @remarks
1597
+ * HTML Attribute: orientation
1598
+ */
1599
+ orientation?: DividerOrientation;
1600
+ connectedCallback(): void;
1601
+ /**
1602
+ * Sets the element's internal role when the role attribute changes.
1603
+ *
1604
+ * @param previous - the previous role value
1605
+ * @param next - the current role value
1606
+ * @internal
1607
+ */
1608
+ roleChanged(previous: string | null, next: string | null): void;
1609
+ /**
1610
+ * Sets the element's internal orientation when the orientation attribute changes.
1611
+ *
1612
+ * @param previous - the previous orientation value
1613
+ * @param next - the current orientation value
1614
+ * @internal
1615
+ */
1616
+ orientationChanged(previous: string | null, next: string | null): void;
1617
+ }
1618
+
1571
1619
  /**
1572
1620
  * A Tabs component that wraps a collection of tab and tab panel elements.
1573
1621
  *
@@ -4576,33 +4624,11 @@ export declare function display(displayValue: CSSDisplayPropertyValue): string;
4576
4624
 
4577
4625
  /**
4578
4626
  * A Divider Custom HTML Element.
4627
+ * Based on BaseDivider and includes style and layout specific attributes
4579
4628
  *
4580
- * @remarks
4581
- * 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.
4629
+ * @public
4582
4630
  */
4583
- export declare class Divider extends FASTElement {
4584
- /**
4585
- * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
4586
- *
4587
- * @internal
4588
- */
4589
- elementInternals: ElementInternals;
4590
- /**
4591
- * The role of the element.
4592
- *
4593
- * @public
4594
- * @remarks
4595
- * HTML Attribute: role
4596
- */
4597
- role: DividerRole;
4598
- /**
4599
- * The orientation of the divider.
4600
- *
4601
- * @public
4602
- * @remarks
4603
- * HTML Attribute: orientation
4604
- */
4605
- orientation?: DividerOrientation;
4631
+ export declare class Divider extends BaseDivider {
4606
4632
  /**
4607
4633
  * @public
4608
4634
  * @remarks
@@ -4639,23 +4665,6 @@ export declare class Divider extends FASTElement {
4639
4665
  * @param next - the next state
4640
4666
  */
4641
4667
  insetChanged(prev: boolean, next: boolean): void;
4642
- connectedCallback(): void;
4643
- /**
4644
- * Sets the element's internal role when the role attribute changes.
4645
- *
4646
- * @param previous - the previous role value
4647
- * @param next - the current role value
4648
- * @internal
4649
- */
4650
- roleChanged(previous: string | null, next: string | null): void;
4651
- /**
4652
- * Sets the element's internal orientation when the orientation attribute changes.
4653
- *
4654
- * @param previous - the previous orientation value
4655
- * @param next - the current orientation value
4656
- * @internal
4657
- */
4658
- orientationChanged(previous: string | null, next: string | null): void;
4659
4668
  }
4660
4669
 
4661
4670
  /**
@@ -6278,7 +6278,7 @@ var __decorateClass$j = (decorators, target, key, kind) => {
6278
6278
  if (kind && result) __defProp$j(target, key, result);
6279
6279
  return result;
6280
6280
  };
6281
- class Divider extends FASTElement {
6281
+ class BaseDivider extends FASTElement {
6282
6282
  constructor() {
6283
6283
  super(...arguments);
6284
6284
  /**
@@ -6287,41 +6287,6 @@ class Divider extends FASTElement {
6287
6287
  * @internal
6288
6288
  */
6289
6289
  this.elementInternals = this.attachInternals();
6290
- this.inset = false;
6291
- }
6292
- /**
6293
- * Handles changes to align-content attribute custom states
6294
- * @param prev - the previous state
6295
- * @param next - the next state
6296
- */
6297
- alignContentChanged(prev, next) {
6298
- if (prev) {
6299
- toggleState(this.elementInternals, `align-${prev}`, false);
6300
- }
6301
- if (next) {
6302
- toggleState(this.elementInternals, `align-${next}`, true);
6303
- }
6304
- }
6305
- /**
6306
- * Handles changes to appearance attribute custom states
6307
- * @param prev - the previous state
6308
- * @param next - the next state
6309
- */
6310
- appearanceChanged(prev, next) {
6311
- if (prev) {
6312
- toggleState(this.elementInternals, `${prev}`, false);
6313
- }
6314
- if (next) {
6315
- toggleState(this.elementInternals, `${next}`, true);
6316
- }
6317
- }
6318
- /**
6319
- * Handles changes to inset custom states
6320
- * @param prev - the previous state
6321
- * @param next - the next state
6322
- */
6323
- insetChanged(prev, next) {
6324
- toggleState(this.elementInternals, "inset", next);
6325
6290
  }
6326
6291
  connectedCallback() {
6327
6292
  super.connectedCallback();
@@ -6362,8 +6327,48 @@ class Divider extends FASTElement {
6362
6327
  }
6363
6328
  }
6364
6329
  }
6365
- __decorateClass$j([attr], Divider.prototype, "role", 2);
6366
- __decorateClass$j([attr], Divider.prototype, "orientation", 2);
6330
+ __decorateClass$j([attr], BaseDivider.prototype, "role", 2);
6331
+ __decorateClass$j([attr], BaseDivider.prototype, "orientation", 2);
6332
+ class Divider extends BaseDivider {
6333
+ constructor() {
6334
+ super(...arguments);
6335
+ this.inset = false;
6336
+ }
6337
+ /**
6338
+ * Handles changes to align-content attribute custom states
6339
+ * @param prev - the previous state
6340
+ * @param next - the next state
6341
+ */
6342
+ alignContentChanged(prev, next) {
6343
+ if (prev) {
6344
+ toggleState(this.elementInternals, `align-${prev}`, false);
6345
+ }
6346
+ if (next) {
6347
+ toggleState(this.elementInternals, `align-${next}`, true);
6348
+ }
6349
+ }
6350
+ /**
6351
+ * Handles changes to appearance attribute custom states
6352
+ * @param prev - the previous state
6353
+ * @param next - the next state
6354
+ */
6355
+ appearanceChanged(prev, next) {
6356
+ if (prev) {
6357
+ toggleState(this.elementInternals, `${prev}`, false);
6358
+ }
6359
+ if (next) {
6360
+ toggleState(this.elementInternals, `${next}`, true);
6361
+ }
6362
+ }
6363
+ /**
6364
+ * Handles changes to inset custom states
6365
+ * @param prev - the previous state
6366
+ * @param next - the next state
6367
+ */
6368
+ insetChanged(prev, next) {
6369
+ toggleState(this.elementInternals, "inset", next);
6370
+ }
6371
+ }
6367
6372
  __decorateClass$j([attr({
6368
6373
  attribute: "align-content"
6369
6374
  })], Divider.prototype, "alignContent", 2);
@@ -9408,11 +9413,12 @@ __decorateClass$5([attr], Spinner.prototype, "size", 2);
9408
9413
  __decorateClass$5([attr], Spinner.prototype, "appearance", 2);
9409
9414
 
9410
9415
  const styles$7 = css`
9411
- ${display("flex")}
9416
+ ${display("inline-flex")}
9412
9417
 
9413
- :host{display:flex;align-items:center;height:32px;width:32px;contain:content}:host(${tinyState}){height:20px;width:20px}:host(${extraSmallState}){height:24px;width:24px}:host(${smallState}){height:28px;width:28px}:host(${largeState}){height:36px;width:36px}:host(${extraLargeState}){height:40px;width:40px}:host(${hugeState}){height:44px;width:44px}.progress{height:100%;width:100%}.background{fill:none;stroke:${colorBrandStroke2};stroke-width:1.5px}:host(${invertedState}) .background{stroke:rgba(255,255,255,0.2)}.indicator{stroke:${colorBrandStroke1};fill:none;stroke-width:1.5px;stroke-linecap:round;transform-origin:50% 50%;transform:rotate(-90deg);transition:all 0.2s ease-in-out;animation:spin-infinite 3s cubic-bezier(0.53,0.21,0.29,0.67) infinite}:host(${invertedState}) .indicator{stroke:${colorNeutralStrokeOnBrand2}}@keyframes spin-infinite{0%{stroke-dasharray:0.01px 43.97px;transform:rotate(0deg)}50%{stroke-dasharray:21.99px 21.99px;transform:rotate(450deg)}100%{stroke-dasharray:0.01px 43.97px;transform:rotate(1080deg)}}`;
9418
+ :host{--duration:1.5s;--indicatorSize:${strokeWidthThicker};--size:32px;height:var(--size);width:var(--size);contain:strict;content-visibility:auto}:host(${tinyState}){--indicatorSize:${strokeWidthThick};--size:20px}:host(${extraSmallState}){--indicatorSize:${strokeWidthThick};--size:24px}:host(${smallState}){--indicatorSize:${strokeWidthThick};--size:28px}:host(${largeState}){--indicatorSize:${strokeWidthThicker};--size:36px}:host(${extraLargeState}){--indicatorSize:${strokeWidthThicker};--size:40px}:host(${hugeState}){--indicatorSize:${strokeWidthThickest};--size:44px}.progress,.background,.spinner,.start,.end,.indicator{position:absolute;inset:0}.progress,.spinner,.indicator{animation:none var(--duration) infinite ${curveEasyEase}}.progress{animation-timing-function:linear;animation-name:spin-linear}.background{border:var(--indicatorSize) solid ${colorBrandStroke2};border-radius:50%}:host(${invertedState}) .background{border-color:rgba(255,255,255,0.2)}.spinner{animation-name:spin-swing}.start{overflow:hidden;inset-inline-end:50%}.end{overflow:hidden;inset-inline-start:50%}.indicator{color:${colorBrandStroke1};box-sizing:border-box;border-radius:50%;border:var(--indicatorSize) solid transparent;border-block-start-color:currentcolor;border-inline-end-color:currentcolor}:host(${invertedState}) .indicator{color:${colorNeutralStrokeOnBrand2}}.start .indicator{rotate:135deg;inset:0 -100% 0 0;animation-name:spin-start}.end .indicator{rotate:135deg;inset:0 0 0 -100%;animation-name:spin-end}@keyframes spin-linear{100%{transform:rotate(360deg)}}@keyframes spin-swing{0%{transform:rotate(-135deg)}50%{transform:rotate(0deg)}100%{transform:rotate(225deg)}}@keyframes spin-start{0%,100%{transform:rotate(0deg)}50%{transform:rotate(-80deg)}}@keyframes spin-end{0%,100%{transform:rotate(0deg)}50%{transform:rotate(70deg)}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
9419
+ .background{display:none}.indicator{border-color:Canvas;border-block-start-color:Highlight;border-inline-end-color:Highlight}`));
9414
9420
 
9415
- const template$7 = html`<slot name="indicator"><svg class="progress" part="progress" viewBox="0 0 16 16"><circle class="background" cx="8px" cy="8px" r="7px"></circle><circle class="indicator" cx="8px" cy="8px" r="7px"></circle></svg></slot>`;
9421
+ const template$7 = html`<slot name="indicator"><div class="background"></div><div class="progress"><div class="spinner"><div class="start"><div class="indicator"></div></div><div class="end"><div class="indicator"></div></div></div></div></slot>`;
9416
9422
 
9417
9423
  const definition$7 = Spinner.compose({
9418
9424
  name: `${FluentDesignSystem.prefix}-spinner`,