@fluentui/web-components 3.0.0-rc.11 → 3.0.0-rc.13

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 (33) hide show
  1. package/CHANGELOG.md +20 -2
  2. package/custom-elements.json +1091 -288
  3. package/dist/esm/accordion/accordion.d.ts +2 -1
  4. package/dist/esm/accordion/accordion.js +52 -49
  5. package/dist/esm/accordion/accordion.js.map +1 -1
  6. package/dist/esm/accordion-item/accordion-item.options.d.ts +11 -1
  7. package/dist/esm/accordion-item/accordion-item.options.js +12 -0
  8. package/dist/esm/accordion-item/accordion-item.options.js.map +1 -1
  9. package/dist/esm/index.d.ts +2 -2
  10. package/dist/esm/index.js +2 -2
  11. package/dist/esm/index.js.map +1 -1
  12. package/dist/esm/menu-list/index.d.ts +1 -0
  13. package/dist/esm/menu-list/index.js +1 -0
  14. package/dist/esm/menu-list/index.js.map +1 -1
  15. package/dist/esm/menu-list/menu-list.base.d.ts +76 -0
  16. package/dist/esm/menu-list/menu-list.base.js +251 -0
  17. package/dist/esm/menu-list/menu-list.base.js.map +1 -0
  18. package/dist/esm/menu-list/menu-list.d.ts +3 -70
  19. package/dist/esm/menu-list/menu-list.js +3 -244
  20. package/dist/esm/menu-list/menu-list.js.map +1 -1
  21. package/dist/esm/radio-group/index.d.ts +1 -0
  22. package/dist/esm/radio-group/index.js +1 -0
  23. package/dist/esm/radio-group/index.js.map +1 -1
  24. package/dist/esm/radio-group/radio-group.base.d.ts +285 -0
  25. package/dist/esm/radio-group/radio-group.base.js +497 -0
  26. package/dist/esm/radio-group/radio-group.base.js.map +1 -0
  27. package/dist/esm/radio-group/radio-group.d.ts +4 -280
  28. package/dist/esm/radio-group/radio-group.js +4 -491
  29. package/dist/esm/radio-group/radio-group.js.map +1 -1
  30. package/dist/web-components.d.ts +1847 -1828
  31. package/dist/web-components.js +95 -77
  32. package/dist/web-components.min.js +150 -150
  33. package/package.json +1 -1
@@ -33,7 +33,7 @@ export declare class Accordion extends FASTElement {
33
33
  * HTML attribute: expand-mode
34
34
  */
35
35
  expandmode: AccordionExpandMode;
36
- expandmodeChanged(prev: AccordionExpandMode, next: AccordionExpandMode): void;
36
+ expandmodeChanged(prev: AccordionExpandMode | undefined, next: AccordionExpandMode): void;
37
37
  /**
38
38
  * @internal
39
39
  */
@@ -85,6 +85,7 @@ export declare class Accordion extends FASTElement {
85
85
  * @returns
86
86
  */
87
87
  private expandedChangedHandler;
88
+ connectedCallback(): void;
88
89
  }
89
90
 
90
91
  /**
@@ -2284,6 +2285,82 @@ export declare class BaseField extends FASTElement {
2284
2285
  setValidationStates(): void;
2285
2286
  }
2286
2287
 
2288
+ /**
2289
+ * A Base Menu List Custom HTML Element.
2290
+ * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#menu | ARIA menu }.
2291
+ *
2292
+ * @public
2293
+ */
2294
+ export declare class BaseMenuList extends FASTElement {
2295
+ /**
2296
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
2297
+ *
2298
+ * @internal
2299
+ */
2300
+ elementInternals: ElementInternals;
2301
+ /**
2302
+ * @internal
2303
+ */
2304
+ items: HTMLElement[];
2305
+ protected itemsChanged(oldValue: HTMLElement[], newValue: HTMLElement[]): void;
2306
+ protected menuItems: Element[] | undefined;
2307
+ /**
2308
+ * The index of the focusable element in the items array
2309
+ * defaults to -1
2310
+ */
2311
+ private focusIndex;
2312
+ private static focusableElementRoles;
2313
+ constructor();
2314
+ /**
2315
+ * @internal
2316
+ */
2317
+ connectedCallback(): void;
2318
+ /**
2319
+ * @internal
2320
+ */
2321
+ disconnectedCallback(): void;
2322
+ /**
2323
+ * @internal
2324
+ */
2325
+ readonly isNestedMenu: () => boolean;
2326
+ /**
2327
+ * Focuses the first item in the menu.
2328
+ *
2329
+ * @public
2330
+ */
2331
+ focus(): void;
2332
+ /**
2333
+ * @internal
2334
+ */
2335
+ handleMenuKeyDown(e: KeyboardEvent): void | boolean;
2336
+ /**
2337
+ * if focus is moving out of the menu, reset to a stable initial state
2338
+ * @internal
2339
+ */
2340
+ handleFocusOut: (e: FocusEvent) => void;
2341
+ private handleItemFocus;
2342
+ private removeItemListeners;
2343
+ private static elementIndent;
2344
+ protected setItems(): void;
2345
+ /**
2346
+ * Method for Observable changes to the hidden attribute of child elements
2347
+ */
2348
+ handleChange(source: any, propertyName: string): void;
2349
+ /**
2350
+ * Handle change from child MenuItem element and set radio group behavior
2351
+ */
2352
+ private changedMenuItemHandler;
2353
+ /**
2354
+ * check if the item is a menu item
2355
+ */
2356
+ protected isMenuItemElement: (el: Element) => el is HTMLElement;
2357
+ /**
2358
+ * check if the item is focusable
2359
+ */
2360
+ private isFocusableElement;
2361
+ private setFocus;
2362
+ }
2363
+
2287
2364
  /**
2288
2365
  * A Progress HTML Element.
2289
2366
  * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#progressbar | ARIA progressbar }.
@@ -2383,576 +2460,562 @@ export declare class BaseProgressBar extends FASTElement {
2383
2460
  }
2384
2461
 
2385
2462
  /**
2386
- * The base class used for constructing a fluent-rating-display custom element
2387
- *
2388
- * @slot icon - SVG element used as the rating icon
2463
+ * A Base Radio Group Custom HTML Element.
2464
+ * Implements the {@link https://w3c.github.io/aria/#radiogroup | ARIA `radiogroup` role}.
2389
2465
  *
2390
2466
  * @public
2391
2467
  */
2392
- export declare class BaseRatingDisplay extends FASTElement {
2393
- private numberFormatter;
2394
- /**
2395
- * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
2396
- *
2397
- * @internal
2398
- */
2399
- elementInternals: ElementInternals;
2468
+ export declare class BaseRadioGroup extends FASTElement {
2400
2469
  /**
2401
- * Reference to the slot element used for the rating icon.
2470
+ * The index of the checked radio, scoped to the enabled radios.
2402
2471
  *
2403
2472
  * @internal
2404
2473
  */
2405
- iconSlot: HTMLSlotElement;
2474
+ protected checkedIndex: number;
2406
2475
  /**
2407
- * Updates the icon when the referenced slot is bound in the template.
2476
+ * Sets the checked state of the nearest enabled radio when the `checkedIndex` changes.
2408
2477
  *
2478
+ * @param prev - the previous index
2479
+ * @param next - the current index
2409
2480
  * @internal
2410
2481
  */
2411
- iconSlotChanged(): void;
2412
- protected defaultCustomIconViewBox: string;
2482
+ protected checkedIndexChanged(prev: number | undefined, next: number): void;
2413
2483
  /**
2414
- * The element that displays the rating icons.
2415
- * @internal
2484
+ * Indicates that the value has been changed by the user.
2416
2485
  */
2417
- display: HTMLElement;
2486
+ private dirtyState;
2418
2487
  /**
2419
- * The number of ratings.
2488
+ * Disables the radio group and child radios.
2420
2489
  *
2421
2490
  * @public
2422
2491
  * @remarks
2423
- * HTML Attribute: `count`
2492
+ * HTML Attribute: `disabled`
2424
2493
  */
2425
- count?: number;
2494
+ disabled: boolean;
2426
2495
  /**
2427
- * The `viewBox` attribute of the icon <svg> element.
2496
+ * Sets the `disabled` attribute on all child radios when the `disabled` property changes.
2428
2497
  *
2429
- * @public
2430
- * @remarks
2431
- * HTML Attribute: `icon-view-box`
2432
- * @deprecated Add `viewBox` attribute on the custom SVG directly.
2498
+ * @param prev - the previous disabled value
2499
+ * @param next - the current disabled value
2500
+ * @internal
2433
2501
  */
2434
- iconViewBox?: string;
2502
+ protected disabledChanged(prev?: boolean, next?: boolean): void;
2435
2503
  /**
2436
- * The maximum possible value of the rating.
2437
- * This attribute determines the number of icons displayed.
2438
- * Must be a whole number greater than 1.
2504
+ * The value of the checked radio.
2439
2505
  *
2440
2506
  * @public
2441
2507
  * @remarks
2442
- * HTML Attribute: `max`
2508
+ * HTML Attribute: `value`
2443
2509
  */
2444
- max?: number;
2445
- protected maxChanged(): void;
2510
+ initialValue?: string;
2446
2511
  /**
2447
- * The value of the rating.
2512
+ * Sets the matching radio to checked when the value changes. If no radio matches the value, no radio will be checked.
2513
+ *
2514
+ * @param prev - the previous value
2515
+ * @param next - the current value
2516
+ */
2517
+ initialValueChanged(prev: string | undefined, next: string | undefined): void;
2518
+ /**
2519
+ * The name of the radio group.
2448
2520
  *
2449
2521
  * @public
2450
2522
  * @remarks
2451
- * HTML Attribute: `value`
2523
+ * HTML Attribute: `name`
2452
2524
  */
2453
- value?: number;
2454
- protected valueChanged(): void;
2455
- constructor();
2456
- connectedCallback(): void;
2525
+ name: string;
2457
2526
  /**
2458
- * Returns "count" as string, formatted according to the locale.
2527
+ * Sets the `name` attribute on all child radios when the `name` property changes.
2459
2528
  *
2460
2529
  * @internal
2461
2530
  */
2462
- get formattedCount(): string;
2463
- /** @internal */
2464
- handleSlotChange(): void;
2465
- protected renderSlottedIcon(svg: SVGSVGElement | null): void;
2466
- protected setCustomPropertyValue(propertyName: PropertyNameForCalculation): void;
2467
- }
2468
-
2469
- /**
2470
- * The base class used for constructing a fluent-spinner custom element
2471
- * @public
2472
- */
2473
- export declare class BaseSpinner extends FASTElement {
2531
+ protected nameChanged(prev: string | undefined, next: string | undefined): void;
2474
2532
  /**
2475
- * The internal {@link https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
2533
+ * The orientation of the group.
2476
2534
  *
2477
- * @internal
2535
+ * @public
2536
+ * @remarks
2537
+ * HTML Attribute: `orientation`
2478
2538
  */
2479
- elementInternals: ElementInternals;
2480
- constructor();
2481
- }
2482
-
2483
- /**
2484
- * A Tablist element that wraps a collection of tab elements
2485
- * @public
2486
- */
2487
- export declare class BaseTablist extends FASTElement {
2539
+ orientation?: RadioGroupOrientation;
2488
2540
  /**
2489
- * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
2541
+ * Sets the ariaOrientation attribute when the orientation changes.
2490
2542
  *
2543
+ * @param prev - the previous orientation
2544
+ * @param next - the current orientation
2491
2545
  * @internal
2492
2546
  */
2493
- elementInternals: ElementInternals;
2547
+ orientationChanged(prev: RadioGroupOrientation | undefined, next: RadioGroupOrientation | undefined): void;
2494
2548
  /**
2495
- * Used for disabling all click and keyboard events for the tabs, child tab elements.
2549
+ * The collection of all child radios.
2550
+ *
2496
2551
  * @public
2497
- * @remarks
2498
- * HTML Attribute: disabled.
2499
2552
  */
2500
- disabled: boolean;
2553
+ radios: Radio[];
2501
2554
  /**
2502
- * Handles disabled changes
2503
- * @param prev - previous value
2504
- * @param next - next value
2555
+ * Updates the enabled radios collection when properties on the child radios change.
2505
2556
  *
2506
- * @internal
2557
+ * @param prev - the previous radios
2558
+ * @param next - the current radios
2507
2559
  */
2508
- protected disabledChanged(prev: boolean, next: boolean): void;
2560
+ radiosChanged(prev: Radio[] | undefined, next: Radio[] | undefined): void;
2509
2561
  /**
2510
- * The orientation
2562
+ * Indicates whether the radio group is required.
2563
+ *
2511
2564
  * @public
2512
2565
  * @remarks
2513
- * HTML Attribute: orientation
2566
+ * HTML Attribute: `required`
2514
2567
  */
2515
- orientation: TablistOrientation;
2568
+ required: boolean;
2569
+ /**
2570
+ *
2571
+ * @param prev - the previous required value
2572
+ * @param next - the current required value
2573
+ */
2574
+ requiredChanged(prev: boolean, next: boolean): void;
2516
2575
  /**
2576
+ * The collection of radios that are slotted into the default slot.
2577
+ *
2517
2578
  * @internal
2518
2579
  */
2519
- protected orientationChanged(prev: TablistOrientation, next: TablistOrientation): void;
2580
+ slottedRadios: Radio[];
2520
2581
  /**
2521
- * The id of the active tab
2582
+ * Updates the radios collection when the slotted radios change.
2522
2583
  *
2523
- * @public
2524
- * @remarks
2525
- * HTML Attribute: activeid
2584
+ * @param prev - the previous slotted radios
2585
+ * @param next - the current slotted radios
2526
2586
  */
2527
- activeid: string;
2587
+ slottedRadiosChanged(prev: Radio[] | undefined, next: Radio[]): void;
2528
2588
  /**
2589
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
2590
+ *
2529
2591
  * @internal
2530
2592
  */
2531
- protected activeidChanged(oldValue: string, newValue: string): void;
2593
+ elementInternals: ElementInternals;
2532
2594
  /**
2533
- * Content slotted in the tab slot.
2595
+ * A collection of child radios that are not disabled.
2596
+ *
2534
2597
  * @internal
2535
2598
  */
2536
- slottedTabs: Node[];
2599
+ get enabledRadios(): Radio[];
2537
2600
  /**
2538
- * Updates the tabs property when content in the tabs slot changes.
2539
- * @internal
2601
+ * The form-associated flag.
2602
+ * @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
2603
+ *
2604
+ * @public
2540
2605
  */
2541
- slottedTabsChanged(prev: Node[] | undefined, next: Node[] | undefined): void;
2606
+ static formAssociated: boolean;
2542
2607
  /**
2608
+ * The fallback validation message, taken from a native checkbox `<input>` element.
2609
+ *
2543
2610
  * @internal
2544
2611
  */
2545
- tabs: Tab[];
2612
+ private _validationFallbackMessage;
2546
2613
  /**
2614
+ * The validation message. Uses the browser's default validation message for native checkboxes if not otherwise
2615
+ * specified (e.g., via `setCustomValidity`).
2616
+ *
2547
2617
  * @internal
2548
2618
  */
2549
- protected tabsChanged(prev: Tab[] | undefined, next: Tab[] | undefined): void;
2619
+ get validationMessage(): string;
2550
2620
  /**
2551
- * A reference to the active tab
2621
+ * The element's validity state.
2622
+ *
2552
2623
  * @public
2624
+ * @remarks
2625
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/validity | `ElementInternals.validity`} property.
2553
2626
  */
2554
- activetab: Tab;
2555
- private prevActiveTabIndex;
2556
- private activeTabIndex;
2557
- private tabIds;
2558
- private tabPanelMap;
2559
- private change;
2560
- private getActiveIndex;
2627
+ get validity(): ValidityState;
2561
2628
  /**
2562
- * Function that is invoked whenever the selected tab or the tab collection changes.
2629
+ * The current value of the checked radio.
2563
2630
  *
2564
2631
  * @public
2565
2632
  */
2566
- protected setTabs(): void;
2567
- private getTabIds;
2568
- private setComponent;
2569
- private handleTabClick;
2570
- private isHorizontal;
2571
- private handleTabKeyDown;
2633
+ get value(): string | null;
2634
+ set value(next: string | null);
2572
2635
  /**
2573
- * The adjust method for FASTTabs
2574
- * @public
2575
- * @remarks
2576
- * This method allows the active index to be adjusted by numerical increments
2636
+ * Sets the checked state of all radios when any radio emits a `change` event.
2637
+ *
2638
+ * @param e - the change event
2577
2639
  */
2578
- adjust(adjustment: number): void;
2579
- private activateTabByIndex;
2580
- private focusTab;
2581
- constructor();
2640
+ changeHandler(e: Event): boolean | void;
2582
2641
  /**
2642
+ * Checks the radio at the specified index.
2643
+ *
2644
+ * @param index - the index of the radio to check
2583
2645
  * @internal
2584
2646
  */
2585
- connectedCallback(): void;
2586
- }
2587
-
2588
- /**
2589
- * A Text Area Custom HTML Element.
2590
- * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea | `<textarea>`} element.
2591
- *
2592
- * @slot - The default content/value of the component.
2593
- * @slot label - The content for the `<label>`, it should be a `<fluent-label>` element.
2594
- * @csspart label - The `<label>` element.
2595
- * @csspart root - The container element of the `<textarea>` element.
2596
- * @csspart control - The internal `<textarea>` element.
2597
- * @fires change - Fires after the control loses focus, if the content has changed.
2598
- * @fires select - Fires when the `select()` method is called.
2599
- *
2600
- * @public
2601
- */
2602
- export declare class BaseTextArea extends FASTElement {
2647
+ checkRadio(index?: number, shouldEmit?: boolean): void;
2603
2648
  /**
2604
- * The form-associated flag.
2605
- * @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
2649
+ * Checks the validity of the element and returns the result.
2606
2650
  *
2607
2651
  * @public
2652
+ * @remarks
2653
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/checkValidity | `HTMLInputElement.checkValidity()`} method.
2608
2654
  */
2609
- static readonly formAssociated = true;
2655
+ checkValidity(): boolean;
2610
2656
  /**
2611
- * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
2657
+ * Handles click events for the radio group.
2612
2658
  *
2659
+ * @param e - the click event
2613
2660
  * @internal
2614
2661
  */
2615
- elementInternals: ElementInternals;
2616
- /**
2617
- * The `<label>` element.
2618
- * @internal
2619
- */
2620
- labelEl: HTMLLabelElement;
2621
- /**
2622
- * The root container element.
2623
- * @internal
2624
- */
2625
- rootEl: HTMLDivElement;
2626
- /**
2627
- * The `<textarea>` element.
2628
- * @internal
2629
- */
2630
- controlEl: HTMLTextAreaElement;
2662
+ clickHandler(e: MouseEvent): boolean | void;
2663
+ constructor();
2631
2664
  /**
2632
- * Sets up a mutation observer to watch for changes to the control element's
2633
- * attributes that could affect validity, and binds an input event listener to detect user interaction.
2665
+ * Focuses the checked radio or the first enabled radio.
2634
2666
  *
2635
2667
  * @internal
2636
2668
  */
2637
- protected controlElChanged(): void;
2669
+ focus(): void;
2638
2670
  /**
2671
+ * Enables tabbing through the radio group when the group receives focus.
2672
+ *
2673
+ * @param e - the focus event
2639
2674
  * @internal
2640
2675
  */
2641
- autoSizerEl?: HTMLDivElement;
2676
+ focusinHandler(e: FocusEvent): boolean | void;
2642
2677
  /**
2643
- * The list of nodes that are assigned to the default slot.
2678
+ * Sets the tabindex of the radios based on the checked state when the radio group loses focus.
2679
+ *
2680
+ * @param e - the focusout event
2644
2681
  * @internal
2645
2682
  */
2646
- defaultSlottedNodes: Node[];
2647
- protected defaultSlottedNodesChanged(): void;
2648
- private filteredLabelSlottedNodes;
2683
+ focusoutHandler(e: FocusEvent): boolean | void;
2684
+ formResetCallback(): void;
2685
+ private getEnabledIndexInBounds;
2649
2686
  /**
2650
- * The list of nodes that are assigned to the `label` slot.
2687
+ * Handles keydown events for the radio group.
2688
+ *
2689
+ * @param e - the keyboard event
2651
2690
  * @internal
2652
2691
  */
2653
- labelSlottedNodes: Label[];
2654
- protected labelSlottedNodesChanged(): void;
2655
- private userInteracted;
2656
- private autoSizerObserver?;
2657
- private controlElAttrObserver;
2658
- private preConnectControlEl;
2692
+ keydownHandler(e: KeyboardEvent): boolean | void;
2659
2693
  /**
2660
- * Indicates the element's autocomplete state.
2661
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/autocomplete | `autocomplete`} attribute
2662
2694
  *
2663
- * @public
2664
- * @remarks
2665
- * HTML Attribute: `autocomplete`
2695
+ * @param e - the disabled event
2666
2696
  */
2667
- autocomplete?: TextAreaAutocomplete;
2697
+ disabledRadioHandler(e: CustomEvent): void;
2668
2698
  /**
2669
- * Indicates whether the element’s block size (height) should be automatically changed based on the content.
2670
- * Note: When this property’s value is set to be `true`, the element should not have a fixed block-size
2671
- * defined in CSS. Instead, use `min-height` or `min-block-size`.
2699
+ * Reports the validity of the element.
2672
2700
  *
2673
2701
  * @public
2674
2702
  * @remarks
2675
- * HTML Attribute: `auto-resize`
2703
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/reportValidity | `HTMLInputElement.reportValidity()`} method.
2676
2704
  */
2677
- autoResize: boolean;
2678
- protected autoResizeChanged(): void;
2705
+ reportValidity(): boolean;
2679
2706
  /**
2680
- * Sets the name of the value directionality to be submitted with form data.
2681
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/dirname | `dirname`} attribute
2707
+ * Resets the `tabIndex` for all child radios when the radio group loses focus.
2682
2708
  *
2683
- * @public
2684
- * @remarks
2685
- * HTML Attribute: `dirname`
2709
+ * @internal
2686
2710
  */
2687
- dirName?: string;
2711
+ private restrictFocus;
2688
2712
  /**
2689
- * Sets the element's disabled state.
2690
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/disabled | `disabled`} attribute
2713
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/setFormValue | `ElementInternals.setFormValue()`} method.
2691
2714
  *
2692
- * @public
2693
- * @remarks
2694
- * HTML Attribute: `disabled`
2715
+ * @internal
2695
2716
  */
2696
- disabled: boolean;
2697
- protected disabledChanged(): void;
2717
+ setFormValue(value: File | string | FormData | null, state?: File | string | FormData | null): void;
2698
2718
  /**
2699
- * Indicates whether the element displays a box shadow. This only has effect when `appearance` is set to be `filled-darker` or `filled-lighter`.
2719
+ * Sets the validity of the element.
2700
2720
  *
2701
- * @public
2721
+ * @param flags - Validity flags to set.
2722
+ * @param message - Optional message to supply. If not provided, the element's `validationMessage` will be used.
2723
+ * @param anchor - Optional anchor to use for the validation message.
2724
+ *
2725
+ * @internal
2702
2726
  * @remarks
2703
- * HTML Attribute: `display-shadow`
2727
+ * RadioGroup validation is reported through the individual Radio elements rather than the RadioGroup itself.
2728
+ * This is necessary because:
2729
+ * 1. Each Radio is form-associated (extends BaseCheckbox which has `formAssociated = true`)
2730
+ * 2. Browser validation UIs and screen readers announce validation against individual form controls
2731
+ * 3. For groups like RadioGroup, the browser needs to report the error on a specific member of the group
2732
+ * 4. We anchor the error to the first Radio so it receives focus and announcement
2733
+ *
2734
+ * When the group is invalid (required but no selection):
2735
+ * - Only the first Radio gets the invalid state with the validation message
2736
+ * - Other Radios are kept valid since selecting any of them would satisfy the requirement
2737
+ *
2738
+ * When the group becomes valid (user selects any Radio):
2739
+ * - All Radios are cleared back to valid state
2740
+ * - This allows form submission to proceed
2704
2741
  */
2705
- displayShadow: boolean;
2742
+ setValidity(flags?: Partial<ValidityState>, message?: string, anchor?: HTMLElement): void;
2743
+ }
2744
+
2745
+ /**
2746
+ * The base class used for constructing a fluent-rating-display custom element
2747
+ *
2748
+ * @slot icon - SVG element used as the rating icon
2749
+ *
2750
+ * @public
2751
+ */
2752
+ export declare class BaseRatingDisplay extends FASTElement {
2753
+ private numberFormatter;
2706
2754
  /**
2707
- * The id of a form to associate the element to.
2755
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
2708
2756
  *
2709
- * @public
2710
- * @remarks
2711
- * HTML Attribute: `form`
2757
+ * @internal
2712
2758
  */
2713
- initialForm?: string;
2759
+ elementInternals: ElementInternals;
2714
2760
  /**
2715
- * The form element that’s associated to the element, or `null` if no form is associated.
2761
+ * Reference to the slot element used for the rating icon.
2716
2762
  *
2717
- * @public
2763
+ * @internal
2718
2764
  */
2719
- get form(): HTMLFormElement | null;
2765
+ iconSlot: HTMLSlotElement;
2720
2766
  /**
2721
- * A `NodeList` of `<label>` element associated with the element.
2722
- * @see The {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement/labels | `labels`} property
2767
+ * Updates the icon when the referenced slot is bound in the template.
2723
2768
  *
2724
- * @public
2769
+ * @internal
2725
2770
  */
2726
- get labels(): NodeList;
2771
+ iconSlotChanged(): void;
2772
+ protected defaultCustomIconViewBox: string;
2727
2773
  /**
2728
- * The maximum number of characters a user can enter.
2729
- *
2730
- * @public
2731
- * @remarks
2732
- * HTML Attribute: `maxlength`
2774
+ * The element that displays the rating icons.
2775
+ * @internal
2733
2776
  */
2734
- maxLength?: number;
2777
+ display: HTMLElement;
2735
2778
  /**
2736
- * The minimum number of characters a user can enter.
2737
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/minlength | `minlength`} attribute
2779
+ * The number of ratings.
2738
2780
  *
2739
2781
  * @public
2740
2782
  * @remarks
2741
- * HTML Attribute: `minlength`
2783
+ * HTML Attribute: `count`
2742
2784
  */
2743
- minLength?: number;
2785
+ count?: number;
2744
2786
  /**
2745
- * The name of the element. This element's value will be surfaced during form submission under the provided name.
2787
+ * The `viewBox` attribute of the icon <svg> element.
2746
2788
  *
2747
2789
  * @public
2748
2790
  * @remarks
2749
- * HTML Attribute: `name`
2791
+ * HTML Attribute: `icon-view-box`
2792
+ * @deprecated Add `viewBox` attribute on the custom SVG directly.
2750
2793
  */
2751
- name: string;
2794
+ iconViewBox?: string;
2752
2795
  /**
2753
- * Sets the placeholder value of the element, generally used to provide a hint to the user.
2754
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/placeholder | `placeholder`} attribute
2796
+ * The maximum possible value of the rating.
2797
+ * This attribute determines the number of icons displayed.
2798
+ * Must be a whole number greater than 1.
2755
2799
  *
2756
2800
  * @public
2757
2801
  * @remarks
2758
- * HTML Attribute: `placeholder`
2759
- * This attribute is not a valid substitute for a label.
2802
+ * HTML Attribute: `max`
2760
2803
  */
2761
- placeholder?: string;
2804
+ max?: number;
2805
+ protected maxChanged(): void;
2762
2806
  /**
2763
- * When true, the control will be immutable by user interaction.
2764
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/readonly | `readonly`} attribute
2807
+ * The value of the rating.
2765
2808
  *
2766
2809
  * @public
2767
2810
  * @remarks
2768
- * HTML Attribute: `readonly`
2811
+ * HTML Attribute: `value`
2769
2812
  */
2770
- readOnly: boolean;
2771
- protected readOnlyChanged(): void;
2813
+ value?: number;
2814
+ protected valueChanged(): void;
2815
+ constructor();
2816
+ connectedCallback(): void;
2772
2817
  /**
2773
- * The element's required attribute.
2818
+ * Returns "count" as string, formatted according to the locale.
2774
2819
  *
2775
- * @public
2776
- * @remarks
2777
- * HTML Attribute: `required`
2820
+ * @internal
2778
2821
  */
2779
- required: boolean;
2780
- protected requiredChanged(): void;
2781
- /**
2782
- * Indicates whether the element can be resized by end users.
2783
- *
2784
- * @public
2785
- * @remarks
2786
- * HTML Attribute: `resize`
2787
- */
2788
- resize: TextAreaResize;
2789
- protected resizeChanged(prev: TextAreaResize | undefined, next: TextAreaResize | undefined): void;
2790
- /**
2791
- * Controls whether or not to enable spell checking for the input field, or if the default spell checking configuration should be used.
2792
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Global_attributes/spellcheck | `spellcheck`} attribute
2793
- *
2794
- * @public
2795
- * @remarks
2796
- * HTML Attribute: `spellcheck`
2797
- */
2798
- spellcheck: boolean;
2822
+ get formattedCount(): string;
2823
+ /** @internal */
2824
+ handleSlotChange(): void;
2825
+ protected renderSlottedIcon(svg: SVGSVGElement | null): void;
2826
+ protected setCustomPropertyValue(propertyName: PropertyNameForCalculation): void;
2827
+ }
2828
+
2829
+ /**
2830
+ * The base class used for constructing a fluent-spinner custom element
2831
+ * @public
2832
+ */
2833
+ export declare class BaseSpinner extends FASTElement {
2799
2834
  /**
2800
- * The length of the current value.
2801
- * @see The {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement#textLength | 'textLength'} property
2835
+ * The internal {@link https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
2802
2836
  *
2803
- * @public
2837
+ * @internal
2804
2838
  */
2805
- get textLength(): number;
2839
+ elementInternals: ElementInternals;
2840
+ constructor();
2841
+ }
2842
+
2843
+ /**
2844
+ * A Tablist element that wraps a collection of tab elements
2845
+ * @public
2846
+ */
2847
+ export declare class BaseTablist extends FASTElement {
2806
2848
  /**
2807
- * The type of the element, which is always "textarea".
2808
- * @see The {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement/type | `type`} property
2849
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
2809
2850
  *
2810
- * @public
2851
+ * @internal
2811
2852
  */
2812
- get type(): 'textarea';
2853
+ elementInternals: ElementInternals;
2813
2854
  /**
2814
- * The element's validity state.
2815
- *
2855
+ * Used for disabling all click and keyboard events for the tabs, child tab elements.
2816
2856
  * @public
2817
2857
  * @remarks
2818
- * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/validity | `ElementInternals.validity`} property.
2858
+ * HTML Attribute: disabled.
2819
2859
  */
2820
- get validity(): ValidityState;
2860
+ disabled: boolean;
2821
2861
  /**
2822
- * The validation message.
2862
+ * Handles disabled changes
2863
+ * @param prev - previous value
2864
+ * @param next - next value
2823
2865
  *
2824
- * @public
2825
- * @remarks
2826
- * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/validationMessage | `ElementInternals.validationMessage`} property.
2866
+ * @internal
2827
2867
  */
2828
- get validationMessage(): string;
2868
+ protected disabledChanged(prev: boolean, next: boolean): void;
2829
2869
  /**
2830
- * Determines if the control can be submitted for constraint validation.
2831
- *
2870
+ * The orientation
2832
2871
  * @public
2833
2872
  * @remarks
2834
- * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/willValidate | `ElementInternals.willValidate`} property.
2873
+ * HTML Attribute: orientation
2835
2874
  */
2836
- get willValidate(): boolean;
2875
+ orientation: TablistOrientation;
2837
2876
  /**
2838
- * The text content of the element before user interaction.
2839
- * @see The {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement#defaultvalue | `defaultValue`} property
2840
- *
2841
- * @public
2842
- * @remarks
2843
- * In order to set the initial/default value, an author should either add the default value in the HTML as the children
2844
- * of the component, or setting this property in JavaScript. Setting `innerHTML`, `innerText`, or `textContent` on this
2845
- * component will not change the default value or the content displayed inside the component.
2877
+ * @internal
2846
2878
  */
2847
- get defaultValue(): string;
2848
- set defaultValue(next: string);
2879
+ protected orientationChanged(prev: TablistOrientation, next: TablistOrientation): void;
2849
2880
  /**
2850
- * The value of the element.
2881
+ * The id of the active tab
2851
2882
  *
2852
2883
  * @public
2853
2884
  * @remarks
2854
- * Reflects the `value` property.
2885
+ * HTML Attribute: activeid
2855
2886
  */
2856
- get value(): string;
2857
- set value(next: string);
2858
- constructor();
2887
+ activeid: string;
2859
2888
  /**
2860
2889
  * @internal
2861
2890
  */
2862
- connectedCallback(): void;
2891
+ protected activeidChanged(oldValue: string, newValue: string): void;
2863
2892
  /**
2893
+ * Content slotted in the tab slot.
2864
2894
  * @internal
2865
2895
  */
2866
- disconnectedCallback(): void;
2896
+ slottedTabs: Node[];
2867
2897
  /**
2868
- * Resets the value to its initial value when the form is reset.
2869
- *
2898
+ * Updates the tabs property when content in the tabs slot changes.
2870
2899
  * @internal
2871
2900
  */
2872
- formResetCallback(): void;
2901
+ slottedTabsChanged(prev: Node[] | undefined, next: Node[] | undefined): void;
2873
2902
  /**
2874
2903
  * @internal
2875
2904
  */
2876
- formDisabledCallback(disabled: boolean): void;
2905
+ tabs: Tab[];
2877
2906
  /**
2878
- * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/setFormValue | `ElementInternals.setFormValue()`} method.
2879
- *
2880
2907
  * @internal
2881
2908
  */
2882
- setFormValue(value: File | string | FormData | null, state?: File | string | FormData | null): void;
2909
+ protected tabsChanged(prev: Tab[] | undefined, next: Tab[] | undefined): void;
2883
2910
  /**
2884
- * Checks the validity of the element and returns the result.
2885
- *
2911
+ * A reference to the active tab
2886
2912
  * @public
2887
- * @remarks
2888
- * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/checkValidity | `HTMLInputElement.checkValidity()`} method.
2889
2913
  */
2890
- checkValidity(): boolean;
2914
+ activetab: Tab;
2915
+ private prevActiveTabIndex;
2916
+ private activeTabIndex;
2917
+ private tabIds;
2918
+ private tabPanelMap;
2919
+ private change;
2920
+ private getActiveIndex;
2891
2921
  /**
2892
- * Reports the validity of the element.
2922
+ * Function that is invoked whenever the selected tab or the tab collection changes.
2893
2923
  *
2894
2924
  * @public
2925
+ */
2926
+ protected setTabs(): void;
2927
+ private getTabIds;
2928
+ private setComponent;
2929
+ private handleTabClick;
2930
+ private isHorizontal;
2931
+ private handleTabKeyDown;
2932
+ /**
2933
+ * The adjust method for FASTTabs
2934
+ * @public
2895
2935
  * @remarks
2896
- * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/reportValidity | `HTMLInputElement.reportValidity()`} method.
2936
+ * This method allows the active index to be adjusted by numerical increments
2897
2937
  */
2898
- reportValidity(): boolean;
2938
+ adjust(adjustment: number): void;
2939
+ private activateTabByIndex;
2940
+ private focusTab;
2941
+ constructor();
2899
2942
  /**
2900
- * Sets the custom validity message.
2901
- * @param message - The message to set
2943
+ * @internal
2944
+ */
2945
+ connectedCallback(): void;
2946
+ }
2947
+
2948
+ /**
2949
+ * A Text Area Custom HTML Element.
2950
+ * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea | `<textarea>`} element.
2951
+ *
2952
+ * @slot - The default content/value of the component.
2953
+ * @slot label - The content for the `<label>`, it should be a `<fluent-label>` element.
2954
+ * @csspart label - The `<label>` element.
2955
+ * @csspart root - The container element of the `<textarea>` element.
2956
+ * @csspart control - The internal `<textarea>` element.
2957
+ * @fires change - Fires after the control loses focus, if the content has changed.
2958
+ * @fires select - Fires when the `select()` method is called.
2959
+ *
2960
+ * @public
2961
+ */
2962
+ export declare class BaseTextArea extends FASTElement {
2963
+ /**
2964
+ * The form-associated flag.
2965
+ * @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
2902
2966
  *
2903
2967
  * @public
2904
2968
  */
2905
- setCustomValidity(message: string | null): void;
2969
+ static readonly formAssociated = true;
2906
2970
  /**
2907
- * Sets the validity of the control.
2908
- *
2909
- * @param flags - Validity flags. If not provided, the control's `validity` will be used.
2910
- * @param message - Optional message to supply. If not provided, the control's `validationMessage` will be used. If the control does not have a `validationMessage`, the message will be empty.
2911
- * @param anchor - Optional anchor to use for the validation message. If not provided, the control will be used.
2971
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
2912
2972
  *
2913
2973
  * @internal
2914
2974
  */
2915
- setValidity(flags?: Partial<ValidityState>, message?: string, anchor?: HTMLElement): void;
2975
+ elementInternals: ElementInternals;
2916
2976
  /**
2917
- * Selects the content in the element.
2918
- *
2919
- * @public
2977
+ * The `<label>` element.
2978
+ * @internal
2920
2979
  */
2921
- select(): void;
2980
+ labelEl: HTMLLabelElement;
2922
2981
  /**
2923
- * Gets the content inside the light DOM, if any HTML element is present, use its `outerHTML` value.
2982
+ * The root container element.
2983
+ * @internal
2924
2984
  */
2925
- private getContent;
2926
- private setDisabledSideEffect;
2927
- private toggleUserValidityState;
2928
- private maybeCreateAutoSizerEl;
2985
+ rootEl: HTMLDivElement;
2929
2986
  /**
2987
+ * The `<textarea>` element.
2930
2988
  * @internal
2931
2989
  */
2932
- handleControlInput(): void;
2990
+ controlEl: HTMLTextAreaElement;
2933
2991
  /**
2992
+ * Sets up a mutation observer to watch for changes to the control element's
2993
+ * attributes that could affect validity, and binds an input event listener to detect user interaction.
2994
+ *
2934
2995
  * @internal
2935
2996
  */
2936
- handleControlChange(): void;
2997
+ protected controlElChanged(): void;
2937
2998
  /**
2938
2999
  * @internal
2939
3000
  */
2940
- handleControlSelect(): void;
2941
- }
2942
-
2943
- /**
2944
- * A Text Input Custom HTML Element.
2945
- * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input | `<input>`} element.
2946
- *
2947
- * @slot start - Content which can be provided before the input
2948
- * @slot end - Content which can be provided after the input
2949
- * @slot - The default slot for button content
2950
- * @csspart label - The internal `<label>` element
2951
- * @csspart root - the root container for the internal control
2952
- * @csspart control - The internal `<input>` control
2953
- * @public
2954
- */
2955
- export declare class BaseTextInput extends FASTElement {
3001
+ autoSizerEl?: HTMLDivElement;
3002
+ /**
3003
+ * The list of nodes that are assigned to the default slot.
3004
+ * @internal
3005
+ */
3006
+ defaultSlottedNodes: Node[];
3007
+ protected defaultSlottedNodesChanged(): void;
3008
+ private filteredLabelSlottedNodes;
3009
+ /**
3010
+ * The list of nodes that are assigned to the `label` slot.
3011
+ * @internal
3012
+ */
3013
+ labelSlottedNodes: Label[];
3014
+ protected labelSlottedNodesChanged(): void;
3015
+ private userInteracted;
3016
+ private autoSizerObserver?;
3017
+ private controlElAttrObserver;
3018
+ private preConnectControlEl;
2956
3019
  /**
2957
3020
  * Indicates the element's autocomplete state.
2958
3021
  * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/autocomplete | `autocomplete`} attribute
@@ -2961,53 +3024,27 @@ export declare class BaseTextInput extends FASTElement {
2961
3024
  * @remarks
2962
3025
  * HTML Attribute: `autocomplete`
2963
3026
  */
2964
- autocomplete?: string;
3027
+ autocomplete?: TextAreaAutocomplete;
2965
3028
  /**
2966
- * Indicates that the element should get focus after the page finishes loading.
2967
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/input#autofocus | `autofocus`} attribute
3029
+ * Indicates whether the element’s block size (height) should be automatically changed based on the content.
3030
+ * Note: When this property’s value is set to be `true`, the element should not have a fixed block-size
3031
+ * defined in CSS. Instead, use `min-height` or `min-block-size`.
2968
3032
  *
2969
3033
  * @public
2970
3034
  * @remarks
2971
- * HTML Attribute: `autofocus`
3035
+ * HTML Attribute: `auto-resize`
2972
3036
  */
2973
- autofocus: boolean;
3037
+ autoResize: boolean;
3038
+ protected autoResizeChanged(): void;
2974
3039
  /**
2975
- * The current value of the input.
3040
+ * Sets the name of the value directionality to be submitted with form data.
3041
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/dirname | `dirname`} attribute
3042
+ *
2976
3043
  * @public
2977
3044
  * @remarks
2978
- * HTML Attribute: `current-value`
3045
+ * HTML Attribute: `dirname`
2979
3046
  */
2980
- currentValue: string;
2981
- /**
2982
- * Tracks the current value of the input.
2983
- *
2984
- * @param prev - the previous value
2985
- * @param next - the next value
2986
- *
2987
- * @internal
2988
- */
2989
- currentValueChanged(prev: string, next: string): void;
2990
- /**
2991
- * The default slotted content. This is the content that appears in the text field label.
2992
- *
2993
- * @internal
2994
- */
2995
- defaultSlottedNodes: Node[];
2996
- /**
2997
- * Updates the control label visibility based on the presence of default slotted content.
2998
- *
2999
- * @internal
3000
- */
3001
- defaultSlottedNodesChanged(prev: Node[] | undefined, next: Node[] | undefined): void;
3002
- /**
3003
- * Sets the directionality of the element to be submitted with form data.
3004
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/dirname | `dirname`} attribute
3005
- *
3006
- * @public
3007
- * @remarks
3008
- * HTML Attribute: `dirname`
3009
- */
3010
- dirname?: string;
3047
+ dirName?: string;
3011
3048
  /**
3012
3049
  * Sets the element's disabled state.
3013
3050
  * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/disabled | `disabled`} attribute
@@ -3016,39 +3053,37 @@ export declare class BaseTextInput extends FASTElement {
3016
3053
  * @remarks
3017
3054
  * HTML Attribute: `disabled`
3018
3055
  */
3019
- disabled?: boolean;
3056
+ disabled: boolean;
3057
+ protected disabledChanged(): void;
3020
3058
  /**
3021
- * The id of a form to associate the element to.
3022
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/input#form | `form`} attribute
3059
+ * Indicates whether the element displays a box shadow. This only has effect when `appearance` is set to be `filled-darker` or `filled-lighter`.
3023
3060
  *
3024
3061
  * @public
3025
3062
  * @remarks
3026
- * HTML Attribute: `form`
3063
+ * HTML Attribute: `display-shadow`
3027
3064
  */
3028
- formAttribute?: string;
3065
+ displayShadow: boolean;
3029
3066
  /**
3030
- * The initial value of the input.
3067
+ * The id of a form to associate the element to.
3031
3068
  *
3032
3069
  * @public
3033
3070
  * @remarks
3034
- * HTML Attribute: `value`
3071
+ * HTML Attribute: `form`
3035
3072
  */
3036
- initialValue: string;
3073
+ initialForm?: string;
3037
3074
  /**
3038
- * Sets the value of the element to the initial value.
3075
+ * The form element that’s associated to the element, or `null` if no form is associated.
3039
3076
  *
3040
- * @internal
3077
+ * @public
3041
3078
  */
3042
- initialValueChanged(): void;
3079
+ get form(): HTMLFormElement | null;
3043
3080
  /**
3044
- * Allows associating a `<datalist>` to the element by ID.
3045
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/input#list | `list`} attribute
3081
+ * A `NodeList` of `<label>` element associated with the element.
3082
+ * @see The {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement/labels | `labels`} property
3046
3083
  *
3047
3084
  * @public
3048
- * @remarks
3049
- * HTML Attribute: `list`
3050
3085
  */
3051
- list: string;
3086
+ get labels(): NodeList;
3052
3087
  /**
3053
3088
  * The maximum number of characters a user can enter.
3054
3089
  *
@@ -3056,7 +3091,7 @@ export declare class BaseTextInput extends FASTElement {
3056
3091
  * @remarks
3057
3092
  * HTML Attribute: `maxlength`
3058
3093
  */
3059
- maxlength: number;
3094
+ maxLength?: number;
3060
3095
  /**
3061
3096
  * The minimum number of characters a user can enter.
3062
3097
  * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/minlength | `minlength`} attribute
@@ -3065,16 +3100,7 @@ export declare class BaseTextInput extends FASTElement {
3065
3100
  * @remarks
3066
3101
  * HTML Attribute: `minlength`
3067
3102
  */
3068
- minlength: number;
3069
- /**
3070
- * Indicates that a comma-separated list of email addresses can be entered. This attribute is only valid when `type="email"`.
3071
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/multiple | `multiple`} attribute
3072
- *
3073
- * @public
3074
- * @remarks
3075
- * HTML Attribute: `multiple`
3076
- */
3077
- multiple: boolean;
3103
+ minLength?: number;
3078
3104
  /**
3079
3105
  * The name of the element. This element's value will be surfaced during form submission under the provided name.
3080
3106
  *
@@ -3083,14 +3109,6 @@ export declare class BaseTextInput extends FASTElement {
3083
3109
  * HTML Attribute: `name`
3084
3110
  */
3085
3111
  name: string;
3086
- /**
3087
- * A regular expression that the value must match to pass validation.
3088
- *
3089
- * @public
3090
- * @remarks
3091
- * HTML Attribute: `pattern`
3092
- */
3093
- pattern: string;
3094
3112
  /**
3095
3113
  * Sets the placeholder value of the element, generally used to provide a hint to the user.
3096
3114
  * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/placeholder | `placeholder`} attribute
@@ -3100,7 +3118,7 @@ export declare class BaseTextInput extends FASTElement {
3100
3118
  * HTML Attribute: `placeholder`
3101
3119
  * This attribute is not a valid substitute for a label.
3102
3120
  */
3103
- placeholder: string;
3121
+ placeholder?: string;
3104
3122
  /**
3105
3123
  * When true, the control will be immutable by user interaction.
3106
3124
  * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/readonly | `readonly`} attribute
@@ -3109,13 +3127,8 @@ export declare class BaseTextInput extends FASTElement {
3109
3127
  * @remarks
3110
3128
  * HTML Attribute: `readonly`
3111
3129
  */
3112
- readOnly?: boolean;
3113
- /**
3114
- * Syncs the `ElementInternals.ariaReadOnly` property when the `readonly` property changes.
3115
- *
3116
- * @internal
3117
- */
3118
- readOnlyChanged(): void;
3130
+ readOnly: boolean;
3131
+ protected readOnlyChanged(): void;
3119
3132
  /**
3120
3133
  * The element's required attribute.
3121
3134
  *
@@ -3124,23 +3137,16 @@ export declare class BaseTextInput extends FASTElement {
3124
3137
  * HTML Attribute: `required`
3125
3138
  */
3126
3139
  required: boolean;
3140
+ protected requiredChanged(): void;
3127
3141
  /**
3128
- * Syncs the element's internal `aria-required` state with the `required` attribute.
3129
- *
3130
- * @param previous - the previous required state
3131
- * @param next - the current required state
3132
- *
3133
- * @internal
3134
- */
3135
- requiredChanged(previous: boolean, next: boolean): void;
3136
- /**
3137
- * Sets the width of the element to a specified number of characters.
3142
+ * Indicates whether the element can be resized by end users.
3138
3143
  *
3139
3144
  * @public
3140
3145
  * @remarks
3141
- * HTML Attribute: `size`
3146
+ * HTML Attribute: `resize`
3142
3147
  */
3143
- size: number;
3148
+ resize: TextAreaResize;
3149
+ protected resizeChanged(prev: TextAreaResize | undefined, next: TextAreaResize | undefined): void;
3144
3150
  /**
3145
3151
  * Controls whether or not to enable spell checking for the input field, or if the default spell checking configuration should be used.
3146
3152
  * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Global_attributes/spellcheck | `spellcheck`} attribute
@@ -3151,53 +3157,19 @@ export declare class BaseTextInput extends FASTElement {
3151
3157
  */
3152
3158
  spellcheck: boolean;
3153
3159
  /**
3154
- * Allows setting a type or mode of text.
3160
+ * The length of the current value.
3161
+ * @see The {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement#textLength | 'textLength'} property
3155
3162
  *
3156
3163
  * @public
3157
- * @remarks
3158
- * HTML Attribute: `type`
3159
- */
3160
- type: TextInputType;
3161
- /**
3162
- * A reference to the internal input element.
3163
- *
3164
- * @internal
3165
- */
3166
- control: HTMLInputElement;
3167
- /**
3168
- * Calls the `setValidity` method when the control reference changes.
3169
- *
3170
- * @param prev - the previous control reference
3171
- * @param next - the current control reference
3172
- *
3173
- * @internal
3174
- */
3175
- controlChanged(prev: HTMLInputElement | undefined, next: HTMLInputElement | undefined): void;
3176
- /**
3177
- * A reference to the internal label element.
3178
- *
3179
- * @internal
3180
- */
3181
- controlLabel: HTMLLabelElement;
3182
- /**
3183
- * Indicates that the value has been changed by the user.
3184
- *
3185
- * @internal
3186
- */
3187
- private dirtyValue;
3188
- /**
3189
- * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
3190
- *
3191
- * @internal
3192
3164
  */
3193
- elementInternals: ElementInternals;
3165
+ get textLength(): number;
3194
3166
  /**
3195
- * The form-associated flag.
3196
- * @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
3167
+ * The type of the element, which is always "textarea".
3168
+ * @see The {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement/type | `type`} property
3197
3169
  *
3198
3170
  * @public
3199
3171
  */
3200
- static readonly formAssociated = true;
3172
+ get type(): 'textarea';
3201
3173
  /**
3202
3174
  * The element's validity state.
3203
3175
  *
@@ -3214,12 +3186,6 @@ export declare class BaseTextInput extends FASTElement {
3214
3186
  * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/validationMessage | `ElementInternals.validationMessage`} property.
3215
3187
  */
3216
3188
  get validationMessage(): string;
3217
- /**
3218
- * The current value of the input.
3219
- * @public
3220
- */
3221
- get value(): string;
3222
- set value(value: string);
3223
3189
  /**
3224
3190
  * Determines if the control can be submitted for constraint validation.
3225
3191
  *
@@ -3229,50 +3195,35 @@ export declare class BaseTextInput extends FASTElement {
3229
3195
  */
3230
3196
  get willValidate(): boolean;
3231
3197
  /**
3232
- * The associated form element.
3198
+ * The text content of the element before user interaction.
3199
+ * @see The {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement#defaultvalue | `defaultValue`} property
3233
3200
  *
3234
3201
  * @public
3235
3202
  * @remarks
3236
- * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/form | `ElementInternals.form`} property.
3237
- */
3238
- get form(): HTMLFormElement | null;
3239
- /**
3240
- * Handles the internal control's `keypress` event.
3241
- *
3242
- * @internal
3243
- */
3244
- beforeinputHandler(e: InputEvent): boolean | void;
3245
- /**
3246
- * Change event handler for inner control.
3247
- *
3248
- * @internal
3249
- * @privateRemarks
3250
- * "Change" events are not `composable` so they will not permeate the shadow DOM boundary. This function effectively
3251
- * proxies the change event, emitting a `change` event whenever the internal control emits a `change` event.
3203
+ * In order to set the initial/default value, an author should either add the default value in the HTML as the children
3204
+ * of the component, or setting this property in JavaScript. Setting `innerHTML`, `innerText`, or `textContent` on this
3205
+ * component will not change the default value or the content displayed inside the component.
3252
3206
  */
3253
- changeHandler(e: InputEvent): boolean | void;
3207
+ get defaultValue(): string;
3208
+ set defaultValue(next: string);
3254
3209
  /**
3255
- * Checks the validity of the element and returns the result.
3210
+ * The value of the element.
3256
3211
  *
3257
3212
  * @public
3258
3213
  * @remarks
3259
- * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/checkValidity | `HTMLInputElement.checkValidity()`} method.
3214
+ * Reflects the `value` property.
3260
3215
  */
3261
- checkValidity(): boolean;
3216
+ get value(): string;
3217
+ set value(next: string);
3218
+ constructor();
3262
3219
  /**
3263
- * Clicks the inner control when the component is clicked.
3264
- *
3265
- * @param e - the event object
3220
+ * @internal
3266
3221
  */
3267
- clickHandler(e: MouseEvent): boolean | void;
3268
3222
  connectedCallback(): void;
3269
3223
  /**
3270
- * Focuses the inner control when the component is focused.
3271
- *
3272
- * @param e - the event object
3273
- * @public
3224
+ * @internal
3274
3225
  */
3275
- focusinHandler(e: FocusEvent): boolean | void;
3226
+ disconnectedCallback(): void;
3276
3227
  /**
3277
3228
  * Resets the value to its initial value when the form is reset.
3278
3229
  *
@@ -3280,41 +3231,23 @@ export declare class BaseTextInput extends FASTElement {
3280
3231
  */
3281
3232
  formResetCallback(): void;
3282
3233
  /**
3283
- * Handles implicit form submission when the user presses the "Enter" key.
3284
- *
3285
- * @internal
3286
- */
3287
- private implicitSubmit;
3288
- /**
3289
- * Handles the internal control's `input` event.
3290
- *
3291
3234
  * @internal
3292
3235
  */
3293
- inputHandler(e: InputEvent): boolean | void;
3236
+ formDisabledCallback(disabled: boolean): void;
3294
3237
  /**
3295
- * Handles the internal control's `keydown` event.
3238
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/setFormValue | `ElementInternals.setFormValue()`} method.
3296
3239
  *
3297
- * @param e - the event object
3298
3240
  * @internal
3299
3241
  */
3300
- keydownHandler(e: KeyboardEvent): boolean | void;
3301
- /**
3302
- * Selects all the text in the text field.
3303
- *
3304
- * @public
3305
- * @privateRemarks
3306
- * The `select` event does not permeate the shadow DOM boundary. This function effectively proxies the event,
3307
- * emitting a `select` event whenever the internal control emits a `select` event
3308
- *
3309
- */
3310
- select(): void;
3242
+ setFormValue(value: File | string | FormData | null, state?: File | string | FormData | null): void;
3311
3243
  /**
3312
- * Sets the custom validity message.
3313
- * @param message - The message to set
3244
+ * Checks the validity of the element and returns the result.
3314
3245
  *
3315
3246
  * @public
3247
+ * @remarks
3248
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/checkValidity | `HTMLInputElement.checkValidity()`} method.
3316
3249
  */
3317
- setCustomValidity(message: string): void;
3250
+ checkValidity(): boolean;
3318
3251
  /**
3319
3252
  * Reports the validity of the element.
3320
3253
  *
@@ -3324,11 +3257,12 @@ export declare class BaseTextInput extends FASTElement {
3324
3257
  */
3325
3258
  reportValidity(): boolean;
3326
3259
  /**
3327
- * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/setFormValue | `ElementInternals.setFormValue()`} method.
3260
+ * Sets the custom validity message.
3261
+ * @param message - The message to set
3328
3262
  *
3329
- * @internal
3263
+ * @public
3330
3264
  */
3331
- setFormValue(value: File | string | FormData | null, state?: File | string | FormData | null): void;
3265
+ setCustomValidity(message: string | null): void;
3332
3266
  /**
3333
3267
  * Sets the validity of the control.
3334
3268
  *
@@ -3339,188 +3273,614 @@ export declare class BaseTextInput extends FASTElement {
3339
3273
  * @internal
3340
3274
  */
3341
3275
  setValidity(flags?: Partial<ValidityState>, message?: string, anchor?: HTMLElement): void;
3342
- }
3343
-
3344
- export declare class BaseTree extends FASTElement {
3345
3276
  /**
3346
- * The currently selected tree item
3277
+ * Selects the content in the element.
3278
+ *
3347
3279
  * @public
3348
3280
  */
3349
- currentSelected: HTMLElement | null;
3281
+ select(): void;
3282
+ /**
3283
+ * Gets the content inside the light DOM, if any HTML element is present, use its `outerHTML` value.
3284
+ */
3285
+ private getContent;
3286
+ private setDisabledSideEffect;
3287
+ private toggleUserValidityState;
3288
+ private maybeCreateAutoSizerEl;
3350
3289
  /**
3351
- * The tree item that is designated to be in the tab queue.
3352
- *
3353
3290
  * @internal
3354
3291
  */
3355
- private currentFocused;
3292
+ handleControlInput(): void;
3356
3293
  /**
3357
- * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
3358
- *
3359
3294
  * @internal
3360
3295
  */
3361
- elementInternals: ElementInternals;
3362
- /** @internal */
3363
- defaultSlot: HTMLSlotElement;
3296
+ handleControlChange(): void;
3364
3297
  /**
3365
- * Calls the slot change handler when the `defaultSlot` reference is updated
3366
- * by the template binding.
3367
- *
3368
3298
  * @internal
3369
3299
  */
3370
- defaultSlotChanged(): void;
3371
- constructor();
3372
- connectedCallback(): void;
3373
- /** @internal */
3374
- childTreeItems: BaseTreeItem[];
3375
- /** @internal */
3376
- childTreeItemsChanged(): void;
3300
+ handleControlSelect(): void;
3301
+ }
3302
+
3303
+ /**
3304
+ * A Text Input Custom HTML Element.
3305
+ * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input | `<input>`} element.
3306
+ *
3307
+ * @slot start - Content which can be provided before the input
3308
+ * @slot end - Content which can be provided after the input
3309
+ * @slot - The default slot for button content
3310
+ * @csspart label - The internal `<label>` element
3311
+ * @csspart root - the root container for the internal control
3312
+ * @csspart control - The internal `<input>` control
3313
+ * @public
3314
+ */
3315
+ export declare class BaseTextInput extends FASTElement {
3377
3316
  /**
3378
- * Updates current selected when slottedTreeItems changes
3317
+ * Indicates the element's autocomplete state.
3318
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/autocomplete | `autocomplete`} attribute
3319
+ *
3320
+ * @public
3321
+ * @remarks
3322
+ * HTML Attribute: `autocomplete`
3379
3323
  */
3380
- private updateCurrentSelected;
3324
+ autocomplete?: string;
3381
3325
  /**
3382
- * KeyDown handler
3326
+ * Indicates that the element should get focus after the page finishes loading.
3327
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/input#autofocus | `autofocus`} attribute
3383
3328
  *
3384
- * @internal
3329
+ * @public
3330
+ * @remarks
3331
+ * HTML Attribute: `autofocus`
3385
3332
  */
3386
- keydownHandler(e: KeyboardEvent): boolean | void;
3333
+ autofocus: boolean;
3387
3334
  /**
3388
- * Handle focus events
3335
+ * The current value of the input.
3336
+ * @public
3337
+ * @remarks
3338
+ * HTML Attribute: `current-value`
3339
+ */
3340
+ currentValue: string;
3341
+ /**
3342
+ * Tracks the current value of the input.
3343
+ *
3344
+ * @param prev - the previous value
3345
+ * @param next - the next value
3389
3346
  *
3390
3347
  * @internal
3391
3348
  */
3392
- focusHandler(e: FocusEvent): void;
3349
+ currentValueChanged(prev: string, next: string): void;
3393
3350
  /**
3394
- * Handle blur events
3351
+ * The default slotted content. This is the content that appears in the text field label.
3395
3352
  *
3396
3353
  * @internal
3397
3354
  */
3398
- blurHandler(e: FocusEvent): void;
3355
+ defaultSlottedNodes: Node[];
3399
3356
  /**
3400
- * Handles click events bubbling up
3357
+ * Updates the control label visibility based on the presence of default slotted content.
3401
3358
  *
3402
- * @internal
3359
+ * @internal
3403
3360
  */
3404
- clickHandler(e: Event): boolean | void;
3361
+ defaultSlottedNodesChanged(prev: Node[] | undefined, next: Node[] | undefined): void;
3405
3362
  /**
3406
- * Handles the selected-changed events bubbling up
3407
- * from child tree items
3363
+ * Sets the directionality of the element to be submitted with form data.
3364
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/dirname | `dirname`} attribute
3408
3365
  *
3409
- * @internal
3366
+ * @public
3367
+ * @remarks
3368
+ * HTML Attribute: `dirname`
3410
3369
  */
3411
- changeHandler(e: Event): boolean | void;
3370
+ dirname?: string;
3412
3371
  /**
3413
- * checks if there are any nested tree items
3372
+ * Sets the element's disabled state.
3373
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/disabled | `disabled`} attribute
3374
+ *
3375
+ * @public
3376
+ * @remarks
3377
+ * HTML Attribute: `disabled`
3414
3378
  */
3415
- private getValidFocusableItem;
3416
- private getVisibleNodes;
3379
+ disabled?: boolean;
3417
3380
  /**
3418
- * Move focus to a tree item based on its offset from the provided item
3381
+ * The id of a form to associate the element to.
3382
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/input#form | `form`} attribute
3383
+ *
3384
+ * @public
3385
+ * @remarks
3386
+ * HTML Attribute: `form`
3419
3387
  */
3420
- private focusNextNode;
3421
- /** @internal */
3422
- handleDefaultSlotChange(): void;
3423
- }
3424
-
3425
- declare class BaseTreeItem extends FASTElement {
3388
+ formAttribute?: string;
3426
3389
  /**
3427
- * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
3390
+ * The initial value of the input.
3428
3391
  *
3429
- * @internal
3392
+ * @public
3393
+ * @remarks
3394
+ * HTML Attribute: `value`
3430
3395
  */
3431
- elementInternals: ElementInternals;
3432
- /** @internal */
3433
- itemSlot: HTMLSlotElement;
3396
+ initialValue: string;
3434
3397
  /**
3435
- * Calls the slot change handler when the `itemSlot` reference is updated
3436
- * by the template binding.
3398
+ * Sets the value of the element to the initial value.
3437
3399
  *
3438
3400
  * @internal
3439
3401
  */
3440
- itemSlotChanged(): void;
3441
- constructor();
3402
+ initialValueChanged(): void;
3442
3403
  /**
3443
- * When true, the control will be appear expanded by user interaction.
3444
- * When true, the control will be appear expanded by user interaction.
3404
+ * Allows associating a `<datalist>` to the element by ID.
3405
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/input#list | `list`} attribute
3445
3406
  *
3446
- * HTML Attribute: `expanded`
3407
+ * @public
3408
+ * @remarks
3409
+ * HTML Attribute: `list`
3410
+ */
3411
+ list: string;
3412
+ /**
3413
+ * The maximum number of characters a user can enter.
3447
3414
  *
3448
3415
  * @public
3416
+ * @remarks
3417
+ * HTML Attribute: `maxlength`
3449
3418
  */
3450
- expanded: boolean;
3419
+ maxlength: number;
3451
3420
  /**
3452
- * Handles changes to the expanded attribute
3453
- * @param prev - the previous state
3454
- * @param next - the next state
3421
+ * The minimum number of characters a user can enter.
3422
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/minlength | `minlength`} attribute
3455
3423
  *
3456
3424
  * @public
3425
+ * @remarks
3426
+ * HTML Attribute: `minlength`
3457
3427
  */
3458
- expandedChanged(prev: boolean, next: boolean): void;
3428
+ minlength: number;
3459
3429
  /**
3460
- * When true, the control will appear selected by user interaction.
3430
+ * Indicates that a comma-separated list of email addresses can be entered. This attribute is only valid when `type="email"`.
3431
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/multiple | `multiple`} attribute
3432
+ *
3461
3433
  * @public
3462
3434
  * @remarks
3463
- * HTML Attribute: selected
3435
+ * HTML Attribute: `multiple`
3464
3436
  */
3465
- selected: boolean;
3437
+ multiple: boolean;
3466
3438
  /**
3467
- * Handles changes to the selected attribute
3468
- * @param prev - the previous state
3469
- * @param next - the next state
3439
+ * The name of the element. This element's value will be surfaced during form submission under the provided name.
3470
3440
  *
3471
- * @internal
3441
+ * @public
3442
+ * @remarks
3443
+ * HTML Attribute: `name`
3472
3444
  */
3473
- protected selectedChanged(prev: boolean, next: boolean): void;
3445
+ name: string;
3474
3446
  /**
3475
- * When true, the control has no child tree items
3476
- * When true, the control has no child tree items
3447
+ * A regular expression that the value must match to pass validation.
3477
3448
  *
3478
- * HTML Attribute: empty
3449
+ * @public
3450
+ * @remarks
3451
+ * HTML Attribute: `pattern`
3452
+ */
3453
+ pattern: string;
3454
+ /**
3455
+ * Sets the placeholder value of the element, generally used to provide a hint to the user.
3456
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/placeholder | `placeholder`} attribute
3479
3457
  *
3480
3458
  * @public
3459
+ * @remarks
3460
+ * HTML Attribute: `placeholder`
3461
+ * This attribute is not a valid substitute for a label.
3481
3462
  */
3482
- empty: boolean;
3483
- private styles;
3463
+ placeholder: string;
3484
3464
  /**
3485
- * The indent of the tree item element.
3486
- * This is not needed once css attr() is supported (--indent: attr(data-indent type(<number>)));
3465
+ * When true, the control will be immutable by user interaction.
3466
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/readonly | `readonly`} attribute
3467
+ *
3487
3468
  * @public
3469
+ * @remarks
3470
+ * HTML Attribute: `readonly`
3488
3471
  */
3489
- dataIndent: number | undefined;
3490
- protected dataIndentChanged(prev: number, next: number): void;
3491
- /** @internal */
3492
- childTreeItems: BaseTreeItem[] | undefined;
3472
+ readOnly?: boolean;
3493
3473
  /**
3494
- * Handles changes to the child tree items
3474
+ * Syncs the `ElementInternals.ariaReadOnly` property when the `readonly` property changes.
3475
+ *
3476
+ * @internal
3477
+ */
3478
+ readOnlyChanged(): void;
3479
+ /**
3480
+ * The element's required attribute.
3495
3481
  *
3496
3482
  * @public
3483
+ * @remarks
3484
+ * HTML Attribute: `required`
3497
3485
  */
3498
- childTreeItemsChanged(): void;
3499
- connectedCallback(): void;
3486
+ required: boolean;
3500
3487
  /**
3501
- * Updates the childrens indent
3488
+ * Syncs the element's internal `aria-required` state with the `required` attribute.
3489
+ *
3490
+ * @param previous - the previous required state
3491
+ * @param next - the current required state
3492
+ *
3493
+ * @internal
3494
+ */
3495
+ requiredChanged(previous: boolean, next: boolean): void;
3496
+ /**
3497
+ * Sets the width of the element to a specified number of characters.
3502
3498
  *
3503
3499
  * @public
3500
+ * @remarks
3501
+ * HTML Attribute: `size`
3504
3502
  */
3505
- updateChildTreeItems(): void;
3503
+ size: number;
3506
3504
  /**
3507
- * Sets the indent for each item
3505
+ * Controls whether or not to enable spell checking for the input field, or if the default spell checking configuration should be used.
3506
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Global_attributes/spellcheck | `spellcheck`} attribute
3507
+ *
3508
+ * @public
3509
+ * @remarks
3510
+ * HTML Attribute: `spellcheck`
3508
3511
  */
3509
- private setIndent;
3512
+ spellcheck: boolean;
3510
3513
  /**
3511
- * Toggle the expansion state of the tree item
3514
+ * Allows setting a type or mode of text.
3512
3515
  *
3513
3516
  * @public
3517
+ * @remarks
3518
+ * HTML Attribute: `type`
3514
3519
  */
3515
- toggleExpansion(): void;
3520
+ type: TextInputType;
3516
3521
  /**
3517
- * Whether the tree is nested
3522
+ * A reference to the internal input element.
3523
+ *
3518
3524
  * @internal
3519
3525
  */
3520
- get isNestedItem(): boolean;
3521
- protected updateTabindexBySelected(): void;
3522
- /** @internal */
3523
- handleItemSlotChange(): void;
3526
+ control: HTMLInputElement;
3527
+ /**
3528
+ * Calls the `setValidity` method when the control reference changes.
3529
+ *
3530
+ * @param prev - the previous control reference
3531
+ * @param next - the current control reference
3532
+ *
3533
+ * @internal
3534
+ */
3535
+ controlChanged(prev: HTMLInputElement | undefined, next: HTMLInputElement | undefined): void;
3536
+ /**
3537
+ * A reference to the internal label element.
3538
+ *
3539
+ * @internal
3540
+ */
3541
+ controlLabel: HTMLLabelElement;
3542
+ /**
3543
+ * Indicates that the value has been changed by the user.
3544
+ *
3545
+ * @internal
3546
+ */
3547
+ private dirtyValue;
3548
+ /**
3549
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
3550
+ *
3551
+ * @internal
3552
+ */
3553
+ elementInternals: ElementInternals;
3554
+ /**
3555
+ * The form-associated flag.
3556
+ * @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
3557
+ *
3558
+ * @public
3559
+ */
3560
+ static readonly formAssociated = true;
3561
+ /**
3562
+ * The element's validity state.
3563
+ *
3564
+ * @public
3565
+ * @remarks
3566
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/validity | `ElementInternals.validity`} property.
3567
+ */
3568
+ get validity(): ValidityState;
3569
+ /**
3570
+ * The validation message.
3571
+ *
3572
+ * @public
3573
+ * @remarks
3574
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/validationMessage | `ElementInternals.validationMessage`} property.
3575
+ */
3576
+ get validationMessage(): string;
3577
+ /**
3578
+ * The current value of the input.
3579
+ * @public
3580
+ */
3581
+ get value(): string;
3582
+ set value(value: string);
3583
+ /**
3584
+ * Determines if the control can be submitted for constraint validation.
3585
+ *
3586
+ * @public
3587
+ * @remarks
3588
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/willValidate | `ElementInternals.willValidate`} property.
3589
+ */
3590
+ get willValidate(): boolean;
3591
+ /**
3592
+ * The associated form element.
3593
+ *
3594
+ * @public
3595
+ * @remarks
3596
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/form | `ElementInternals.form`} property.
3597
+ */
3598
+ get form(): HTMLFormElement | null;
3599
+ /**
3600
+ * Handles the internal control's `keypress` event.
3601
+ *
3602
+ * @internal
3603
+ */
3604
+ beforeinputHandler(e: InputEvent): boolean | void;
3605
+ /**
3606
+ * Change event handler for inner control.
3607
+ *
3608
+ * @internal
3609
+ * @privateRemarks
3610
+ * "Change" events are not `composable` so they will not permeate the shadow DOM boundary. This function effectively
3611
+ * proxies the change event, emitting a `change` event whenever the internal control emits a `change` event.
3612
+ */
3613
+ changeHandler(e: InputEvent): boolean | void;
3614
+ /**
3615
+ * Checks the validity of the element and returns the result.
3616
+ *
3617
+ * @public
3618
+ * @remarks
3619
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/checkValidity | `HTMLInputElement.checkValidity()`} method.
3620
+ */
3621
+ checkValidity(): boolean;
3622
+ /**
3623
+ * Clicks the inner control when the component is clicked.
3624
+ *
3625
+ * @param e - the event object
3626
+ */
3627
+ clickHandler(e: MouseEvent): boolean | void;
3628
+ connectedCallback(): void;
3629
+ /**
3630
+ * Focuses the inner control when the component is focused.
3631
+ *
3632
+ * @param e - the event object
3633
+ * @public
3634
+ */
3635
+ focusinHandler(e: FocusEvent): boolean | void;
3636
+ /**
3637
+ * Resets the value to its initial value when the form is reset.
3638
+ *
3639
+ * @internal
3640
+ */
3641
+ formResetCallback(): void;
3642
+ /**
3643
+ * Handles implicit form submission when the user presses the "Enter" key.
3644
+ *
3645
+ * @internal
3646
+ */
3647
+ private implicitSubmit;
3648
+ /**
3649
+ * Handles the internal control's `input` event.
3650
+ *
3651
+ * @internal
3652
+ */
3653
+ inputHandler(e: InputEvent): boolean | void;
3654
+ /**
3655
+ * Handles the internal control's `keydown` event.
3656
+ *
3657
+ * @param e - the event object
3658
+ * @internal
3659
+ */
3660
+ keydownHandler(e: KeyboardEvent): boolean | void;
3661
+ /**
3662
+ * Selects all the text in the text field.
3663
+ *
3664
+ * @public
3665
+ * @privateRemarks
3666
+ * The `select` event does not permeate the shadow DOM boundary. This function effectively proxies the event,
3667
+ * emitting a `select` event whenever the internal control emits a `select` event
3668
+ *
3669
+ */
3670
+ select(): void;
3671
+ /**
3672
+ * Sets the custom validity message.
3673
+ * @param message - The message to set
3674
+ *
3675
+ * @public
3676
+ */
3677
+ setCustomValidity(message: string): void;
3678
+ /**
3679
+ * Reports the validity of the element.
3680
+ *
3681
+ * @public
3682
+ * @remarks
3683
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/reportValidity | `HTMLInputElement.reportValidity()`} method.
3684
+ */
3685
+ reportValidity(): boolean;
3686
+ /**
3687
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/setFormValue | `ElementInternals.setFormValue()`} method.
3688
+ *
3689
+ * @internal
3690
+ */
3691
+ setFormValue(value: File | string | FormData | null, state?: File | string | FormData | null): void;
3692
+ /**
3693
+ * Sets the validity of the control.
3694
+ *
3695
+ * @param flags - Validity flags. If not provided, the control's `validity` will be used.
3696
+ * @param message - Optional message to supply. If not provided, the control's `validationMessage` will be used. If the control does not have a `validationMessage`, the message will be empty.
3697
+ * @param anchor - Optional anchor to use for the validation message. If not provided, the control will be used.
3698
+ *
3699
+ * @internal
3700
+ */
3701
+ setValidity(flags?: Partial<ValidityState>, message?: string, anchor?: HTMLElement): void;
3702
+ }
3703
+
3704
+ export declare class BaseTree extends FASTElement {
3705
+ /**
3706
+ * The currently selected tree item
3707
+ * @public
3708
+ */
3709
+ currentSelected: HTMLElement | null;
3710
+ /**
3711
+ * The tree item that is designated to be in the tab queue.
3712
+ *
3713
+ * @internal
3714
+ */
3715
+ private currentFocused;
3716
+ /**
3717
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
3718
+ *
3719
+ * @internal
3720
+ */
3721
+ elementInternals: ElementInternals;
3722
+ /** @internal */
3723
+ defaultSlot: HTMLSlotElement;
3724
+ /**
3725
+ * Calls the slot change handler when the `defaultSlot` reference is updated
3726
+ * by the template binding.
3727
+ *
3728
+ * @internal
3729
+ */
3730
+ defaultSlotChanged(): void;
3731
+ constructor();
3732
+ connectedCallback(): void;
3733
+ /** @internal */
3734
+ childTreeItems: BaseTreeItem[];
3735
+ /** @internal */
3736
+ childTreeItemsChanged(): void;
3737
+ /**
3738
+ * Updates current selected when slottedTreeItems changes
3739
+ */
3740
+ private updateCurrentSelected;
3741
+ /**
3742
+ * KeyDown handler
3743
+ *
3744
+ * @internal
3745
+ */
3746
+ keydownHandler(e: KeyboardEvent): boolean | void;
3747
+ /**
3748
+ * Handle focus events
3749
+ *
3750
+ * @internal
3751
+ */
3752
+ focusHandler(e: FocusEvent): void;
3753
+ /**
3754
+ * Handle blur events
3755
+ *
3756
+ * @internal
3757
+ */
3758
+ blurHandler(e: FocusEvent): void;
3759
+ /**
3760
+ * Handles click events bubbling up
3761
+ *
3762
+ * @internal
3763
+ */
3764
+ clickHandler(e: Event): boolean | void;
3765
+ /**
3766
+ * Handles the selected-changed events bubbling up
3767
+ * from child tree items
3768
+ *
3769
+ * @internal
3770
+ */
3771
+ changeHandler(e: Event): boolean | void;
3772
+ /**
3773
+ * checks if there are any nested tree items
3774
+ */
3775
+ private getValidFocusableItem;
3776
+ private getVisibleNodes;
3777
+ /**
3778
+ * Move focus to a tree item based on its offset from the provided item
3779
+ */
3780
+ private focusNextNode;
3781
+ /** @internal */
3782
+ handleDefaultSlotChange(): void;
3783
+ }
3784
+
3785
+ declare class BaseTreeItem extends FASTElement {
3786
+ /**
3787
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
3788
+ *
3789
+ * @internal
3790
+ */
3791
+ elementInternals: ElementInternals;
3792
+ /** @internal */
3793
+ itemSlot: HTMLSlotElement;
3794
+ /**
3795
+ * Calls the slot change handler when the `itemSlot` reference is updated
3796
+ * by the template binding.
3797
+ *
3798
+ * @internal
3799
+ */
3800
+ itemSlotChanged(): void;
3801
+ constructor();
3802
+ /**
3803
+ * When true, the control will be appear expanded by user interaction.
3804
+ * When true, the control will be appear expanded by user interaction.
3805
+ *
3806
+ * HTML Attribute: `expanded`
3807
+ *
3808
+ * @public
3809
+ */
3810
+ expanded: boolean;
3811
+ /**
3812
+ * Handles changes to the expanded attribute
3813
+ * @param prev - the previous state
3814
+ * @param next - the next state
3815
+ *
3816
+ * @public
3817
+ */
3818
+ expandedChanged(prev: boolean, next: boolean): void;
3819
+ /**
3820
+ * When true, the control will appear selected by user interaction.
3821
+ * @public
3822
+ * @remarks
3823
+ * HTML Attribute: selected
3824
+ */
3825
+ selected: boolean;
3826
+ /**
3827
+ * Handles changes to the selected attribute
3828
+ * @param prev - the previous state
3829
+ * @param next - the next state
3830
+ *
3831
+ * @internal
3832
+ */
3833
+ protected selectedChanged(prev: boolean, next: boolean): void;
3834
+ /**
3835
+ * When true, the control has no child tree items
3836
+ * When true, the control has no child tree items
3837
+ *
3838
+ * HTML Attribute: empty
3839
+ *
3840
+ * @public
3841
+ */
3842
+ empty: boolean;
3843
+ private styles;
3844
+ /**
3845
+ * The indent of the tree item element.
3846
+ * This is not needed once css attr() is supported (--indent: attr(data-indent type(<number>)));
3847
+ * @public
3848
+ */
3849
+ dataIndent: number | undefined;
3850
+ protected dataIndentChanged(prev: number, next: number): void;
3851
+ /** @internal */
3852
+ childTreeItems: BaseTreeItem[] | undefined;
3853
+ /**
3854
+ * Handles changes to the child tree items
3855
+ *
3856
+ * @public
3857
+ */
3858
+ childTreeItemsChanged(): void;
3859
+ connectedCallback(): void;
3860
+ /**
3861
+ * Updates the childrens indent
3862
+ *
3863
+ * @public
3864
+ */
3865
+ updateChildTreeItems(): void;
3866
+ /**
3867
+ * Sets the indent for each item
3868
+ */
3869
+ private setIndent;
3870
+ /**
3871
+ * Toggle the expansion state of the tree item
3872
+ *
3873
+ * @public
3874
+ */
3875
+ toggleExpansion(): void;
3876
+ /**
3877
+ * Whether the tree is nested
3878
+ * @internal
3879
+ */
3880
+ get isNestedItem(): boolean;
3881
+ protected updateTabindexBySelected(): void;
3882
+ /** @internal */
3883
+ handleItemSlotChange(): void;
3524
3884
  }
3525
3885
 
3526
3886
  /**
@@ -7844,1544 +8204,1203 @@ export declare const lineHeightBase500 = "var(--lineHeightBase500)";
7844
8204
  export declare const lineHeightBase600 = "var(--lineHeightBase600)";
7845
8205
 
7846
8206
  /**
7847
- * CSS custom property value for the {@link @fluentui/tokens#lineHeightHero1000 | `lineHeightHero1000`} design token.
7848
- * @public
7849
- */
7850
- export declare const lineHeightHero1000 = "var(--lineHeightHero1000)";
7851
-
7852
- /**
7853
- * CSS custom property value for the {@link @fluentui/tokens#lineHeightHero700 | `lineHeightHero700`} design token.
7854
- * @public
7855
- */
7856
- export declare const lineHeightHero700 = "var(--lineHeightHero700)";
7857
-
7858
- /**
7859
- * CSS custom property value for the {@link @fluentui/tokens#lineHeightHero800 | `lineHeightHero800`} design token.
7860
- * @public
7861
- */
7862
- export declare const lineHeightHero800 = "var(--lineHeightHero800)";
7863
-
7864
- /**
7865
- * CSS custom property value for the {@link @fluentui/tokens#lineHeightHero900 | `lineHeightHero900`} design token.
7866
- * @public
7867
- */
7868
- export declare const lineHeightHero900 = "var(--lineHeightHero900)";
7869
-
7870
- /**
7871
- * An Anchor Custom HTML Element.
7872
- * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element }.
7873
- *
7874
- * @tag fluent-link
7875
- *
7876
- * @slot start - Content which can be provided before the link content
7877
- * @slot end - Content which can be provided after the link content
7878
- * @slot - The default slot for link content
7879
- *
7880
- * @public
7881
- */
7882
- export declare class Link extends BaseAnchor {
7883
- /**
7884
- * The appearance the link should have.
7885
- *
7886
- * @public
7887
- * @remarks
7888
- * HTML Attribute: `appearance`
7889
- */
7890
- appearance?: LinkAppearance | undefined;
7891
- /**
7892
- * The link is inline with text
7893
- * In chromium browsers, if the link is contained within a semantic
7894
- * text element (`h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `p`) or `fluent-text`,
7895
- * `:host-context()` ensures inline links are styled appropriately.
7896
- *
7897
- * @public
7898
- * @remarks
7899
- * HTML Attribute: `inline`
7900
- */
7901
- inline: boolean;
7902
- }
7903
-
7904
- /**
7905
- * Link Appearance constants
7906
- * @public
7907
- */
7908
- export declare const LinkAppearance: {
7909
- readonly subtle: "subtle";
7910
- };
7911
-
7912
- /**
7913
- * An Link can be subtle or the default appearance
7914
- * @public
7915
- */
7916
- export declare type LinkAppearance = ValuesOf<typeof LinkAppearance>;
7917
-
7918
- /**
7919
- * @public
7920
- * @remarks
7921
- * HTML Element: \<fluent-link\>
7922
- */
7923
- export declare const LinkDefinition: FASTElementDefinition<typeof Link>;
7924
-
7925
- export declare const LinkStyles: ElementStyles;
7926
-
7927
- /**
7928
- * Link target values.
7929
- *
7930
- * @public
7931
- */
7932
- export declare const LinkTarget: {
7933
- readonly _self: "_self";
7934
- readonly _blank: "_blank";
7935
- readonly _parent: "_parent";
7936
- readonly _top: "_top";
7937
- };
7938
-
7939
- /**
7940
- * Type for link target values.
7941
- *
7942
- * @public
7943
- */
7944
- export declare type LinkTarget = ValuesOf<typeof AnchorTarget>;
7945
-
7946
- /**
7947
- * The template for the Link component.
7948
- * @public
7949
- */
7950
- export declare const LinkTemplate: ElementViewTemplate<Link>;
7951
-
7952
- /**
7953
- * A Listbox Custom HTML Element.
7954
- * Implements the {@link https://w3c.github.io/aria/#listbox | ARIA listbox } role.
7955
- *
7956
- * @tag fluent-listbox
7957
- *
7958
- * @slot - The default slot for the options.
7959
- *
7960
- * @remarks
7961
- * The listbox component represents a list of options that can be selected.
7962
- * It is intended to be used in conjunction with the {@link BaseDropdown | Dropdown} component.
7963
- *
7964
- * @public
7965
- */
7966
- export declare class Listbox extends FASTElement {
7967
- /**
7968
- * A reference to the default slot element.
7969
- *
7970
- * @internal
7971
- */
7972
- defaultSlot: HTMLSlotElement;
7973
- /**
7974
- * Calls the `slotchangeHandler` when the `defaultSlot` element is assigned
7975
- * via the `ref` directive in the template.
7976
- *
7977
- * @internal
7978
- */
7979
- protected defaultSlotChanged(): void;
7980
- /**
7981
- * Indicates whether the listbox allows multiple selection.
7982
- *
7983
- * @public
7984
- */
7985
- multiple?: boolean;
7986
- /**
7987
- * Updates the multiple selection state of the listbox and its options.
7988
- *
7989
- * @param prev - the previous multiple value
7990
- * @param next - the current multiple value
7991
- */
7992
- multipleChanged(prev: boolean | undefined, next: boolean | undefined): void;
7993
- /**
7994
- * The collection of all child options.
7995
- *
7996
- * @public
7997
- */
7998
- options: DropdownOption[];
7999
- /**
8000
- * Updates the enabled options collection when properties on the child options change.
8001
- *
8002
- * @param prev - the previous options
8003
- * @param next - the current options
8004
- *
8005
- * @internal
8006
- */
8007
- optionsChanged(prev: DropdownOption[] | undefined, next: DropdownOption[] | undefined): void;
8008
- /**
8009
- * The index of the first selected and enabled option.
8010
- * @internal
8011
- */
8012
- selectedIndex: number;
8013
- /**
8014
- * Reference to the parent dropdown element.
8015
- * @internal
8016
- */
8017
- dropdown?: BaseDropdown;
8018
- /**
8019
- * Handles the `beforetoggle` event on the listbox.
8020
- *
8021
- * @param e - the toggle event
8022
- * @returns true to allow the default popover behavior, undefined to prevent it
8023
- * @internal
8024
- */
8025
- beforetoggleHandler(e: ToggleEvent): boolean | undefined;
8026
- /**
8027
- * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
8028
- *
8029
- * @internal
8030
- */
8031
- elementInternals: ElementInternals;
8032
- /**
8033
- * The collection of child options that are not disabled.
8034
- *
8035
- * @internal
8036
- */
8037
- get enabledOptions(): DropdownOption[];
8038
- /**
8039
- * The collection of child options that are selected.
8040
- *
8041
- * @public
8042
- */
8043
- get selectedOptions(): DropdownOption[];
8044
- /**
8045
- * Sets the `selected` state on a target option when clicked.
8046
- *
8047
- * @param e - The pointer event
8048
- * @public
8049
- */
8050
- clickHandler(e: PointerEvent): boolean | void;
8051
- constructor();
8052
- connectedCallback(): void;
8053
- /**
8054
- * Handles observable subscriptions for the listbox.
8055
- *
8056
- * @param source - The source of the observed change
8057
- * @param propertyName - The name of the property that changed
8058
- *
8059
- * @internal
8060
- */
8061
- handleChange(source: any, propertyName?: string): void;
8062
- /**
8063
- * Selects an option by index.
8064
- *
8065
- * @param index - The index of the option to select.
8066
- * @public
8067
- */
8068
- selectOption(index?: number): void;
8069
- /**
8070
- * Handles the `slotchange` event for the default slot.
8071
- * Sets the `options` property to the list of slotted options.
8072
- *
8073
- * @param e - The slotchange event
8074
- * @public
8075
- */
8076
- slotchangeHandler(e?: Event): void;
8077
- }
8078
-
8079
- /**
8080
- * The Fluent Listbox Element
8081
- *
8207
+ * CSS custom property value for the {@link @fluentui/tokens#lineHeightHero1000 | `lineHeightHero1000`} design token.
8082
8208
  * @public
8083
- * @remarks
8084
- * HTML Element: `<fluent-listbox>`
8085
8209
  */
8086
- export declare const ListboxDefinition: FASTElementDefinition<typeof Listbox>;
8210
+ export declare const lineHeightHero1000 = "var(--lineHeightHero1000)";
8087
8211
 
8088
8212
  /**
8089
- * Styles for the {@link (Listbox:class)} component.
8090
- *
8213
+ * CSS custom property value for the {@link @fluentui/tokens#lineHeightHero700 | `lineHeightHero700`} design token.
8091
8214
  * @public
8092
8215
  */
8093
- export declare const ListboxStyles: ElementStyles;
8216
+ export declare const lineHeightHero700 = "var(--lineHeightHero700)";
8094
8217
 
8095
8218
  /**
8096
- * Template for the Listbox component.
8097
- *
8219
+ * CSS custom property value for the {@link @fluentui/tokens#lineHeightHero800 | `lineHeightHero800`} design token.
8098
8220
  * @public
8099
8221
  */
8100
- export declare const ListboxTemplate: ElementViewTemplate<Listbox>;
8222
+ export declare const lineHeightHero800 = "var(--lineHeightHero800)";
8101
8223
 
8102
8224
  /**
8103
- * Generates a template for the {@link (Dropdown:class)} component.
8104
- *
8105
- * @returns The template object.
8106
- *
8225
+ * CSS custom property value for the {@link @fluentui/tokens#lineHeightHero900 | `lineHeightHero900`} design token.
8107
8226
  * @public
8108
8227
  */
8109
- export declare function listboxTemplate<T extends Listbox>(): ElementViewTemplate<T>;
8228
+ export declare const lineHeightHero900 = "var(--lineHeightHero900)";
8110
8229
 
8111
8230
  /**
8112
- * An abstract behavior to react to media queries. Implementations should implement
8113
- * the `constructListener` method to perform some action based on media query changes.
8231
+ * An Anchor Custom HTML Element.
8232
+ * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element }.
8233
+ *
8234
+ * @tag fluent-link
8235
+ *
8236
+ * @slot start - Content which can be provided before the link content
8237
+ * @slot end - Content which can be provided after the link content
8238
+ * @slot - The default slot for link content
8114
8239
  *
8115
8240
  * @public
8116
8241
  */
8117
- export declare abstract class MatchMediaBehavior implements HostBehavior {
8118
- /**
8119
- * The behavior needs to operate on element instances but elements might share a behavior instance.
8120
- * To ensure proper attachment / detachment per instance, we construct a listener for
8121
- * each bind invocation and cache the listeners by element reference.
8122
- */
8123
- private listenerCache;
8124
- /**
8125
- * The media query that the behavior operates on.
8126
- */
8127
- readonly query: MediaQueryList;
8242
+ export declare class Link extends BaseAnchor {
8128
8243
  /**
8244
+ * The appearance the link should have.
8129
8245
  *
8130
- * @param query - The media query to operate from.
8131
- */
8132
- constructor(query: MediaQueryList);
8133
- /**
8134
- * Constructs a function that will be invoked with the MediaQueryList context
8135
- * @param controller - The host controller orchestrating this behavior.
8136
- */
8137
- protected abstract constructListener(controller: HostController): MediaQueryListListener;
8138
- /**
8139
- * Binds the behavior to the element.
8140
- * @param controller - The host controller orchestrating this behavior.
8246
+ * @public
8247
+ * @remarks
8248
+ * HTML Attribute: `appearance`
8141
8249
  */
8142
- connectedCallback(controller: HostController): void;
8250
+ appearance?: LinkAppearance | undefined;
8143
8251
  /**
8144
- * Unbinds the behavior from the element.
8145
- * @param controller - The host controller orchestrating this behavior.
8252
+ * The link is inline with text
8253
+ * In chromium browsers, if the link is contained within a semantic
8254
+ * text element (`h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `p`) or `fluent-text`,
8255
+ * `:host-context()` ensures inline links are styled appropriately.
8256
+ *
8257
+ * @public
8258
+ * @remarks
8259
+ * HTML Attribute: `inline`
8146
8260
  */
8147
- disconnectedCallback(controller: HostController): void;
8261
+ inline: boolean;
8148
8262
  }
8149
8263
 
8150
8264
  /**
8151
- * A behavior to add or remove a stylesheet from an element based on a media query. The behavior ensures that
8152
- * styles are applied while the a query matches the environment and that styles are not applied if the query does
8153
- * not match the environment.
8154
- *
8265
+ * Link Appearance constants
8155
8266
  * @public
8156
8267
  */
8157
- export declare class MatchMediaStyleSheetBehavior extends MatchMediaBehavior {
8158
- /**
8159
- * The media query that the behavior operates on.
8160
- */
8161
- readonly query: MediaQueryList;
8162
- /**
8163
- * The styles object to be managed by the behavior.
8164
- */
8165
- readonly styles: ElementStyles;
8166
- /**
8167
- * Constructs a {@link MatchMediaStyleSheetBehavior} instance.
8168
- * @param query - The media query to operate from.
8169
- * @param styles - The styles to coordinate with the query.
8170
- */
8171
- constructor(query: MediaQueryList, styles: ElementStyles);
8172
- /**
8173
- * Defines a function to construct {@link MatchMediaStyleSheetBehavior | MatchMediaStyleSheetBehaviors} for
8174
- * a provided query.
8175
- * @param query - The media query to operate from.
8176
- *
8177
- * @public
8178
- * @example
8179
- *
8180
- * ```ts
8181
- * import { css } from "@microsoft/fast-element";
8182
- * import { MatchMediaStyleSheetBehavior } from "@fluentui/web-components";
8183
- *
8184
- * const landscapeBehavior = MatchMediaStyleSheetBehavior.with(
8185
- * window.matchMedia("(orientation: landscape)")
8186
- * );
8187
- *
8188
- * const styles = css`
8189
- * :host {
8190
- * width: 200px;
8191
- * height: 400px;
8192
- * }
8193
- * `
8194
- * .withBehaviors(landscapeBehavior(css`
8195
- * :host {
8196
- * width: 400px;
8197
- * height: 200px;
8198
- * }
8199
- * `))
8200
- * ```
8201
- */
8202
- static with(query: MediaQueryList): (styles: ElementStyles) => MatchMediaStyleSheetBehavior;
8203
- /**
8204
- * Constructs a match-media listener for a provided element.
8205
- * @param source - the element for which to attach or detach styles.
8206
- */
8207
- protected constructListener(controller: HostController): MediaQueryListListener;
8208
- /**
8209
- * Unbinds the behavior from the element.
8210
- * @param controller - The host controller orchestrating this behavior.
8211
- * @internal
8212
- */
8213
- removedCallback(controller: HostController<any>): void;
8214
- }
8268
+ export declare const LinkAppearance: {
8269
+ readonly subtle: "subtle";
8270
+ };
8215
8271
 
8216
8272
  /**
8217
- * An event listener fired by a {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList | MediaQueryList }.
8273
+ * An Link can be subtle or the default appearance
8218
8274
  * @public
8219
8275
  */
8220
- export declare type MediaQueryListListener = (this: MediaQueryList, ev?: MediaQueryListEvent) => void;
8276
+ export declare type LinkAppearance = ValuesOf<typeof LinkAppearance>;
8221
8277
 
8222
8278
  /**
8223
- * A Menu component that provides a customizable menu element.
8224
- *
8225
- * @tag fluent-menu
8226
- *
8227
- * @class Menu
8228
- * @extends FASTElement
8229
- *
8230
- * @attr open-on-hover - Determines if the menu should open on hover.
8231
- * @attr open-on-context - Determines if the menu should open on right click.
8232
- * @attr close-on-scroll - Determines if the menu should close on scroll.
8233
- * @attr persist-on-item-click - Determines if the menu open state should persist on click of menu item.
8234
- * @attr split - Determines if the menu is in split state.
8235
- *
8236
- * @cssproperty --menu-max-height - The max-height of the menu.
8237
- *
8238
- * @slot primary-action - Slot for the primary action elements. Used when in `split` state.
8239
- * @slot trigger - Slot for the trigger elements.
8240
- * @slot - Default slot for the menu list.
8241
- *
8242
- * @method connectedCallback - Called when the element is connected to the DOM. Sets up the component.
8243
- * @method disconnectedCallback - Called when the element is disconnected from the DOM. Removes event listeners.
8244
- * @method setComponent - Sets the component state.
8245
- * @method toggleMenu - Toggles the open state of the menu.
8246
- * @method closeMenu - Closes the menu.
8247
- * @method openMenu - Opens the menu.
8248
- * @method focusMenuList - Focuses on the menu list.
8249
- * @method focusTrigger - Focuses on the menu trigger.
8250
- * @method openOnHoverChanged - Called whenever the 'openOnHover' property changes.
8251
- * @method persistOnItemClickChanged - Called whenever the 'persistOnItemClick' property changes.
8252
- * @method openOnContextChanged - Called whenever the 'openOnContext' property changes.
8253
- * @method closeOnScrollChanged - Called whenever the 'closeOnScroll' property changes.
8254
- * @method addListeners - Adds event listeners.
8255
- * @method removeListeners - Removes event listeners.
8256
- * @method menuKeydownHandler - Handles keyboard interaction for the menu.
8257
- * @method triggerKeydownHandler - Handles keyboard interaction for the trigger.
8258
- * @method documentClickHandler - Handles document click events to close the menu when a click occurs outside of the menu or the trigger.
8259
- *
8260
- * @summary The Menu component functions as a customizable menu element.
8261
- *
8262
- * @tag fluent-menu
8279
+ * @public
8280
+ * @remarks
8281
+ * HTML Element: \<fluent-link\>
8282
+ */
8283
+ export declare const LinkDefinition: FASTElementDefinition<typeof Link>;
8284
+
8285
+ export declare const LinkStyles: ElementStyles;
8286
+
8287
+ /**
8288
+ * Link target values.
8263
8289
  *
8264
8290
  * @public
8265
8291
  */
8266
- export declare class Menu extends FASTElement {
8267
- /**
8268
- * Determines if the menu should open on hover.
8269
- * @public
8270
- */
8271
- openOnHover?: boolean;
8272
- /**
8273
- * Determines if the menu should open on right click.
8274
- * @public
8275
- */
8276
- openOnContext?: boolean;
8277
- /**
8278
- * Determines if the menu should close on scroll.
8279
- * @public
8280
- */
8281
- closeOnScroll?: boolean;
8282
- /**
8283
- * Determines if the menu open state should persis on click of menu item
8284
- * @public
8285
- */
8286
- persistOnItemClick?: boolean;
8287
- /**
8288
- * Determines if the menu is in split state.
8289
- * @public
8290
- */
8291
- split?: boolean;
8292
- /**
8293
- * Holds the slotted menu list.
8294
- * @public
8295
- */
8296
- slottedMenuList: MenuList[];
8297
- /**
8298
- * Sets up the component when the slotted menu list changes.
8299
- * @param prev - The previous items in the slotted menu list.
8300
- * @param next - The new items in the slotted menu list.
8301
- * @internal
8302
- */
8303
- slottedMenuListChanged(prev: MenuList[] | undefined, next: MenuList[] | undefined): void;
8304
- /**
8305
- * Holds the slotted triggers.
8306
- * @public
8307
- */
8308
- slottedTriggers: HTMLElement[];
8309
- /**
8310
- * Holds the primary slot element.
8311
- * @public
8312
- */
8313
- primaryAction: HTMLSlotElement;
8314
- /**
8315
- * Defines whether the menu is open or not.
8316
- * @internal
8317
- */
8318
- private _open;
8292
+ export declare const LinkTarget: {
8293
+ readonly _self: "_self";
8294
+ readonly _blank: "_blank";
8295
+ readonly _parent: "_parent";
8296
+ readonly _top: "_top";
8297
+ };
8298
+
8299
+ /**
8300
+ * Type for link target values.
8301
+ *
8302
+ * @public
8303
+ */
8304
+ export declare type LinkTarget = ValuesOf<typeof AnchorTarget>;
8305
+
8306
+ /**
8307
+ * The template for the Link component.
8308
+ * @public
8309
+ */
8310
+ export declare const LinkTemplate: ElementViewTemplate<Link>;
8311
+
8312
+ /**
8313
+ * A Listbox Custom HTML Element.
8314
+ * Implements the {@link https://w3c.github.io/aria/#listbox | ARIA listbox } role.
8315
+ *
8316
+ * @tag fluent-listbox
8317
+ *
8318
+ * @slot - The default slot for the options.
8319
+ *
8320
+ * @remarks
8321
+ * The listbox component represents a list of options that can be selected.
8322
+ * It is intended to be used in conjunction with the {@link BaseDropdown | Dropdown} component.
8323
+ *
8324
+ * @public
8325
+ */
8326
+ export declare class Listbox extends FASTElement {
8319
8327
  /**
8320
- * The trigger element of the menu.
8328
+ * A reference to the default slot element.
8329
+ *
8321
8330
  * @internal
8322
8331
  */
8323
- private _trigger?;
8332
+ defaultSlot: HTMLSlotElement;
8324
8333
  /**
8325
- * The menu list element of the menu which has the popover behavior.
8334
+ * Calls the `slotchangeHandler` when the `defaultSlot` element is assigned
8335
+ * via the `ref` directive in the template.
8336
+ *
8326
8337
  * @internal
8327
8338
  */
8328
- private _menuList?;
8329
- /**
8330
- * Called when the element is connected to the DOM.
8331
- * Sets up the component.
8332
- * @public
8333
- */
8334
- connectedCallback(): void;
8335
- /**
8336
- * Called when the element is disconnected from the DOM.
8337
- * Removes event listeners.
8338
- * @public
8339
- */
8340
- disconnectedCallback(): void;
8339
+ protected defaultSlotChanged(): void;
8341
8340
  /**
8342
- * Sets the component.
8343
- * Sets the trigger and menu list elements and adds event listeners.
8341
+ * Indicates whether the listbox allows multiple selection.
8342
+ *
8344
8343
  * @public
8345
8344
  */
8346
- setComponent(): void;
8345
+ multiple?: boolean;
8347
8346
  /**
8348
- * Toggles the open state of the menu.
8349
- * @public
8347
+ * Updates the multiple selection state of the listbox and its options.
8348
+ *
8349
+ * @param prev - the previous multiple value
8350
+ * @param next - the current multiple value
8350
8351
  */
8351
- toggleMenu: () => void;
8352
+ multipleChanged(prev: boolean | undefined, next: boolean | undefined): void;
8352
8353
  /**
8353
- * Closes the menu.
8354
+ * The collection of all child options.
8355
+ *
8354
8356
  * @public
8355
8357
  */
8356
- closeMenu: (event?: Event) => void;
8358
+ options: DropdownOption[];
8357
8359
  /**
8358
- * Opens the menu.
8359
- * @public
8360
+ * Updates the enabled options collection when properties on the child options change.
8361
+ *
8362
+ * @param prev - the previous options
8363
+ * @param next - the current options
8364
+ *
8365
+ * @internal
8360
8366
  */
8361
- openMenu: (e?: Event) => void;
8367
+ optionsChanged(prev: DropdownOption[] | undefined, next: DropdownOption[] | undefined): void;
8362
8368
  /**
8363
- * Focuses on the menu list.
8364
- * @public
8369
+ * The index of the first selected and enabled option.
8370
+ * @internal
8365
8371
  */
8366
- focusMenuList(): void;
8372
+ selectedIndex: number;
8367
8373
  /**
8368
- * Focuses on the menu trigger.
8369
- * @public
8374
+ * Reference to the parent dropdown element.
8375
+ * @internal
8370
8376
  */
8371
- focusTrigger(): void;
8377
+ dropdown?: BaseDropdown;
8372
8378
  /**
8373
- * Handles the 'toggle' event on the popover.
8374
- * @public
8375
- * @param e - the event
8376
- * @returns void
8379
+ * Handles the `beforetoggle` event on the listbox.
8380
+ *
8381
+ * @param e - the toggle event
8382
+ * @returns true to allow the default popover behavior, undefined to prevent it
8383
+ * @internal
8377
8384
  */
8378
- toggleHandler: (e: Event) => void;
8385
+ beforetoggleHandler(e: ToggleEvent): boolean | undefined;
8379
8386
  /**
8380
- * Called whenever the 'openOnHover' property changes.
8381
- * Adds or removes a 'mouseover' event listener to the trigger based on the new value.
8387
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
8382
8388
  *
8383
- * @param oldValue - The previous value of 'openOnHover'.
8384
- * @param newValue - The new value of 'openOnHover'.
8385
- * @public
8389
+ * @internal
8386
8390
  */
8387
- openOnHoverChanged(oldValue: boolean, newValue: boolean): void;
8391
+ elementInternals: ElementInternals;
8388
8392
  /**
8389
- * Called whenever the 'persistOnItemClick' property changes.
8390
- * Adds or removes a 'click' event listener to the menu list based on the new value.
8391
- * @public
8392
- * @param oldValue - The previous value of 'persistOnItemClick'.
8393
- * @param newValue - The new value of 'persistOnItemClick'.
8393
+ * The collection of child options that are not disabled.
8394
+ *
8395
+ * @internal
8394
8396
  */
8395
- persistOnItemClickChanged(oldValue: boolean, newValue: boolean): void;
8397
+ get enabledOptions(): DropdownOption[];
8396
8398
  /**
8397
- * Called whenever the 'openOnContext' property changes.
8398
- * Adds or removes a 'contextmenu' event listener to the trigger based on the new value.
8399
+ * The collection of child options that are selected.
8400
+ *
8399
8401
  * @public
8400
- * @param oldValue - The previous value of 'openOnContext'.
8401
- * @param newValue - The new value of 'openOnContext'.
8402
8402
  */
8403
- openOnContextChanged(oldValue: boolean, newValue: boolean): void;
8403
+ get selectedOptions(): DropdownOption[];
8404
8404
  /**
8405
- * Called whenever the 'closeOnScroll' property changes.
8406
- * Adds or removes a 'closeOnScroll' event listener to the trigger based on the new value.
8405
+ * Sets the `selected` state on a target option when clicked.
8406
+ *
8407
+ * @param e - The pointer event
8407
8408
  * @public
8408
- * @param oldValue - The previous value of 'closeOnScroll'.
8409
- * @param newValue - The new value of 'closeOnScroll'.
8410
- */
8411
- closeOnScrollChanged(oldValue: boolean, newValue: boolean): void;
8412
- /**
8413
- * Adds event listeners.
8414
- * Adds click and keydown event listeners to the trigger.
8415
- * Adds a 'toggle' event listener to the menu list.
8416
- * If 'openOnHover' is true, adds a 'mouseover' event listener to the trigger.
8417
- * If 'openOnContext' is true, adds a 'contextmenu' event listener to the trigger and a document 'click' event listener.
8418
- * @internal
8419
8409
  */
8420
- private addListeners;
8410
+ clickHandler(e: PointerEvent): boolean | void;
8411
+ constructor();
8412
+ connectedCallback(): void;
8421
8413
  /**
8422
- * Removes event listeners.
8423
- * Removes click and keydown event listeners from the trigger.
8424
- * Also removes toggle event listener from the menu list.
8425
- * Also removes 'mouseover' event listeners from the trigger.
8426
- * Also removes 'contextmenu' event listeners from the trigger and document 'click' event listeners.
8414
+ * Handles observable subscriptions for the listbox.
8415
+ *
8416
+ * @param source - The source of the observed change
8417
+ * @param propertyName - The name of the property that changed
8418
+ *
8427
8419
  * @internal
8428
8420
  */
8429
- private removeListeners;
8421
+ handleChange(source: any, propertyName?: string): void;
8430
8422
  /**
8431
- * Handles keyboard interaction for the menu. Closes the menu and focuses on the trigger when the Escape key is
8432
- * pressed. Closes the menu when the Tab key is pressed.
8423
+ * Selects an option by index.
8433
8424
  *
8434
- * @param e - the keyboard event
8425
+ * @param index - The index of the option to select.
8435
8426
  * @public
8436
8427
  */
8437
- menuKeydownHandler(e: KeyboardEvent): boolean | void;
8428
+ selectOption(index?: number): void;
8438
8429
  /**
8439
- * Handles keyboard interaction for the trigger. Toggles the menu when the Space or Enter key is pressed. If the menu
8440
- * is open, focuses on the menu list.
8430
+ * Handles the `slotchange` event for the default slot.
8431
+ * Sets the `options` property to the list of slotted options.
8441
8432
  *
8442
- * @param e - the keyboard event
8433
+ * @param e - The slotchange event
8443
8434
  * @public
8444
8435
  */
8445
- triggerKeydownHandler: (e: KeyboardEvent) => boolean | void;
8446
- /**
8447
- * Handles document click events to close a menu opened with contextmenu in popover="manual" mode.
8448
- * @internal
8449
- * @param e - The event triggered on document click.
8450
- */
8451
- private documentClickHandler;
8436
+ slotchangeHandler(e?: Event): void;
8452
8437
  }
8453
8438
 
8454
8439
  /**
8455
- * The base class used for constructing a fluent-menu-button custom element
8456
- *
8457
- * @tag fluent-menu-button
8440
+ * The Fluent Listbox Element
8458
8441
  *
8459
- * @public
8460
- */
8461
- export declare class MenuButton extends Button {
8462
- }
8463
-
8464
- /**
8465
- * Menu Button Appearance constants
8466
- * @public
8467
- */
8468
- export declare const MenuButtonAppearance: {
8469
- readonly primary: "primary";
8470
- readonly outline: "outline";
8471
- readonly subtle: "subtle";
8472
- readonly transparent: "transparent";
8473
- };
8474
-
8475
- /**
8476
- * A Menu Button can be secondary, primary, outline, subtle, transparent
8477
- * @public
8478
- */
8479
- export declare type MenuButtonAppearance = ValuesOf<typeof MenuButtonAppearance>;
8480
-
8481
- /**
8482
8442
  * @public
8483
8443
  * @remarks
8484
- * HTML Element: \<fluent-button\>
8485
- */
8486
- export declare const MenuButtonDefinition: FASTElementDefinition<typeof MenuButton>;
8487
-
8488
- /**
8489
- * A Menu Button can be square, circular or rounded.
8490
- * @public
8491
- */
8492
- export declare const MenuButtonShape: {
8493
- readonly circular: "circular";
8494
- readonly rounded: "rounded";
8495
- readonly square: "square";
8496
- };
8497
-
8498
- /**
8499
- * A Menu Button can be square, circular or rounded
8500
- * @public
8501
- */
8502
- export declare type MenuButtonShape = ValuesOf<typeof MenuButtonShape>;
8503
-
8504
- /**
8505
- * A Menu Button can be a size of small, medium or large.
8506
- * @public
8444
+ * HTML Element: `<fluent-listbox>`
8507
8445
  */
8508
- export declare const MenuButtonSize: {
8509
- readonly small: "small";
8510
- readonly medium: "medium";
8511
- readonly large: "large";
8512
- };
8446
+ export declare const ListboxDefinition: FASTElementDefinition<typeof Listbox>;
8513
8447
 
8514
8448
  /**
8515
- * A Menu Button can be on of several preset sizes.
8449
+ * Styles for the {@link (Listbox:class)} component.
8450
+ *
8516
8451
  * @public
8517
8452
  */
8518
- export declare type MenuButtonSize = ValuesOf<typeof MenuButtonSize>;
8453
+ export declare const ListboxStyles: ElementStyles;
8519
8454
 
8520
8455
  /**
8521
- * The template for the Button component.
8456
+ * Template for the Listbox component.
8457
+ *
8522
8458
  * @public
8523
8459
  */
8524
- export declare const MenuButtonTemplate: ElementViewTemplate<MenuButton>;
8460
+ export declare const ListboxTemplate: ElementViewTemplate<Listbox>;
8525
8461
 
8526
8462
  /**
8527
- * The Fluent Menu Element.
8463
+ * Generates a template for the {@link (Dropdown:class)} component.
8464
+ *
8465
+ * @returns The template object.
8528
8466
  *
8529
8467
  * @public
8530
- * @remarks
8531
- * HTML Element: <fluent-menu>
8532
8468
  */
8533
- export declare const MenuDefinition: FASTElementDefinition<typeof Menu>;
8469
+ export declare function listboxTemplate<T extends Listbox>(): ElementViewTemplate<T>;
8534
8470
 
8535
8471
  /**
8536
- * A Switch Custom HTML Element.
8537
- * Implements {@link https://www.w3.org/TR/wai-aria-1.1/#menuitem | ARIA menuitem }, {@link https://www.w3.org/TR/wai-aria-1.1/#menuitemcheckbox | ARIA menuitemcheckbox}, or {@link https://www.w3.org/TR/wai-aria-1.1/#menuitemradio | ARIA menuitemradio }.
8538
- *
8539
- * @tag fluent-menu-item
8540
- *
8541
- * @slot indicator - The checkbox or radio indicator
8542
- * @slot start - Content which can be provided before the menu item content
8543
- * @slot - The default slot for menu item content
8544
- * @slot end - Content which can be provided after the menu item content
8545
- * @slot submenu-glyph - The submenu expand/collapse indicator
8546
- * @slot submenu - Used to nest menu's within menu items
8547
- * @csspart content - The element wrapping the menu item content
8548
- * @fires change - Fires a custom 'change' event when a non-submenu item with a role of `menuitemcheckbox`, `menuitemradio`, or `menuitem` is invoked
8472
+ * An abstract behavior to react to media queries. Implementations should implement
8473
+ * the `constructListener` method to perform some action based on media query changes.
8549
8474
  *
8550
8475
  * @public
8551
8476
  */
8552
- export declare class MenuItem extends FASTElement {
8477
+ export declare abstract class MatchMediaBehavior implements HostBehavior {
8553
8478
  /**
8554
- * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
8555
- *
8556
- * @internal
8479
+ * The behavior needs to operate on element instances but elements might share a behavior instance.
8480
+ * To ensure proper attachment / detachment per instance, we construct a listener for
8481
+ * each bind invocation and cache the listeners by element reference.
8557
8482
  */
8558
- elementInternals: ElementInternals;
8483
+ private listenerCache;
8559
8484
  /**
8560
- * The disabled state of the element.
8561
- *
8562
- * @public
8563
- * @remarks
8564
- * HTML Attribute: disabled
8485
+ * The media query that the behavior operates on.
8565
8486
  */
8566
- disabled: boolean;
8487
+ readonly query: MediaQueryList;
8567
8488
  /**
8568
- * Handles changes to disabled attribute custom states and element internals
8569
- * @param prev - the previous state
8570
- * @param next - the next state
8489
+ *
8490
+ * @param query - The media query to operate from.
8571
8491
  */
8572
- disabledChanged(prev: boolean | undefined, next: boolean | undefined): void;
8492
+ constructor(query: MediaQueryList);
8573
8493
  /**
8574
- * The role of the element.
8575
- *
8576
- * @public
8577
- * @remarks
8578
- * HTML Attribute: role
8494
+ * Constructs a function that will be invoked with the MediaQueryList context
8495
+ * @param controller - The host controller orchestrating this behavior.
8579
8496
  */
8580
- role: MenuItemRole;
8497
+ protected abstract constructListener(controller: HostController): MediaQueryListListener;
8581
8498
  /**
8582
- * Handles changes to role attribute element internals properties
8583
- * @param prev - the previous state
8584
- * @param next - the next state
8499
+ * Binds the behavior to the element.
8500
+ * @param controller - The host controller orchestrating this behavior.
8585
8501
  */
8586
- roleChanged(prev: MenuItemRole | undefined, next: MenuItemRole | undefined): void;
8502
+ connectedCallback(controller: HostController): void;
8587
8503
  /**
8588
- * The checked value of the element.
8589
- *
8590
- * @public
8591
- * @remarks
8592
- * HTML Attribute: checked
8504
+ * Unbinds the behavior from the element.
8505
+ * @param controller - The host controller orchestrating this behavior.
8593
8506
  */
8594
- checked: boolean;
8507
+ disconnectedCallback(controller: HostController): void;
8508
+ }
8509
+
8510
+ /**
8511
+ * A behavior to add or remove a stylesheet from an element based on a media query. The behavior ensures that
8512
+ * styles are applied while the a query matches the environment and that styles are not applied if the query does
8513
+ * not match the environment.
8514
+ *
8515
+ * @public
8516
+ */
8517
+ export declare class MatchMediaStyleSheetBehavior extends MatchMediaBehavior {
8595
8518
  /**
8596
- * Handles changes to checked attribute custom states and element internals
8597
- * @param prev - the previous state
8598
- * @param next - the next state
8519
+ * The media query that the behavior operates on.
8599
8520
  */
8600
- protected checkedChanged(prev: boolean, next: boolean): void;
8521
+ readonly query: MediaQueryList;
8601
8522
  /**
8602
- * The hidden attribute.
8603
- *
8604
- * @public
8605
- * @remarks
8606
- * HTML Attribute: hidden
8523
+ * The styles object to be managed by the behavior.
8607
8524
  */
8608
- hidden: boolean;
8525
+ readonly styles: ElementStyles;
8609
8526
  /**
8610
- * The submenu slotted content.
8611
- *
8612
- * @internal
8527
+ * Constructs a {@link MatchMediaStyleSheetBehavior} instance.
8528
+ * @param query - The media query to operate from.
8529
+ * @param styles - The styles to coordinate with the query.
8613
8530
  */
8614
- slottedSubmenu: HTMLElement[];
8531
+ constructor(query: MediaQueryList, styles: ElementStyles);
8615
8532
  /**
8616
- * Sets the submenu and updates its position.
8533
+ * Defines a function to construct {@link MatchMediaStyleSheetBehavior | MatchMediaStyleSheetBehaviors} for
8534
+ * a provided query.
8535
+ * @param query - The media query to operate from.
8617
8536
  *
8618
- * @internal
8537
+ * @public
8538
+ * @example
8539
+ *
8540
+ * ```ts
8541
+ * import { css } from "@microsoft/fast-element";
8542
+ * import { MatchMediaStyleSheetBehavior } from "@fluentui/web-components";
8543
+ *
8544
+ * const landscapeBehavior = MatchMediaStyleSheetBehavior.with(
8545
+ * window.matchMedia("(orientation: landscape)")
8546
+ * );
8547
+ *
8548
+ * const styles = css`
8549
+ * :host {
8550
+ * width: 200px;
8551
+ * height: 400px;
8552
+ * }
8553
+ * `
8554
+ * .withBehaviors(landscapeBehavior(css`
8555
+ * :host {
8556
+ * width: 400px;
8557
+ * height: 200px;
8558
+ * }
8559
+ * `))
8560
+ * ```
8619
8561
  */
8620
- protected slottedSubmenuChanged(prev: HTMLElement[] | undefined, next: HTMLElement[]): void;
8562
+ static with(query: MediaQueryList): (styles: ElementStyles) => MatchMediaStyleSheetBehavior;
8621
8563
  /**
8622
- * @internal
8564
+ * Constructs a match-media listener for a provided element.
8565
+ * @param source - the element for which to attach or detach styles.
8623
8566
  */
8624
- submenu: HTMLElement | undefined;
8625
- connectedCallback(): void;
8567
+ protected constructListener(controller: HostController): MediaQueryListListener;
8626
8568
  /**
8569
+ * Unbinds the behavior from the element.
8570
+ * @param controller - The host controller orchestrating this behavior.
8627
8571
  * @internal
8628
8572
  */
8629
- handleMenuItemKeyDown: (e: KeyboardEvent) => boolean;
8573
+ removedCallback(controller: HostController<any>): void;
8574
+ }
8575
+
8576
+ /**
8577
+ * An event listener fired by a {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList | MediaQueryList }.
8578
+ * @public
8579
+ */
8580
+ export declare type MediaQueryListListener = (this: MediaQueryList, ev?: MediaQueryListEvent) => void;
8581
+
8582
+ /**
8583
+ * A Menu component that provides a customizable menu element.
8584
+ *
8585
+ * @tag fluent-menu
8586
+ *
8587
+ * @class Menu
8588
+ * @extends FASTElement
8589
+ *
8590
+ * @attr open-on-hover - Determines if the menu should open on hover.
8591
+ * @attr open-on-context - Determines if the menu should open on right click.
8592
+ * @attr close-on-scroll - Determines if the menu should close on scroll.
8593
+ * @attr persist-on-item-click - Determines if the menu open state should persist on click of menu item.
8594
+ * @attr split - Determines if the menu is in split state.
8595
+ *
8596
+ * @cssproperty --menu-max-height - The max-height of the menu.
8597
+ *
8598
+ * @slot primary-action - Slot for the primary action elements. Used when in `split` state.
8599
+ * @slot trigger - Slot for the trigger elements.
8600
+ * @slot - Default slot for the menu list.
8601
+ *
8602
+ * @method connectedCallback - Called when the element is connected to the DOM. Sets up the component.
8603
+ * @method disconnectedCallback - Called when the element is disconnected from the DOM. Removes event listeners.
8604
+ * @method setComponent - Sets the component state.
8605
+ * @method toggleMenu - Toggles the open state of the menu.
8606
+ * @method closeMenu - Closes the menu.
8607
+ * @method openMenu - Opens the menu.
8608
+ * @method focusMenuList - Focuses on the menu list.
8609
+ * @method focusTrigger - Focuses on the menu trigger.
8610
+ * @method openOnHoverChanged - Called whenever the 'openOnHover' property changes.
8611
+ * @method persistOnItemClickChanged - Called whenever the 'persistOnItemClick' property changes.
8612
+ * @method openOnContextChanged - Called whenever the 'openOnContext' property changes.
8613
+ * @method closeOnScrollChanged - Called whenever the 'closeOnScroll' property changes.
8614
+ * @method addListeners - Adds event listeners.
8615
+ * @method removeListeners - Removes event listeners.
8616
+ * @method menuKeydownHandler - Handles keyboard interaction for the menu.
8617
+ * @method triggerKeydownHandler - Handles keyboard interaction for the trigger.
8618
+ * @method documentClickHandler - Handles document click events to close the menu when a click occurs outside of the menu or the trigger.
8619
+ *
8620
+ * @summary The Menu component functions as a customizable menu element.
8621
+ *
8622
+ * @tag fluent-menu
8623
+ *
8624
+ * @public
8625
+ */
8626
+ export declare class Menu extends FASTElement {
8630
8627
  /**
8631
- * @internal
8628
+ * Determines if the menu should open on hover.
8629
+ * @public
8632
8630
  */
8633
- handleMenuItemClick: (e: MouseEvent) => boolean;
8631
+ openOnHover?: boolean;
8634
8632
  /**
8635
- * @internal
8633
+ * Determines if the menu should open on right click.
8634
+ * @public
8636
8635
  */
8637
- handleMouseOver: (e: MouseEvent) => boolean;
8636
+ openOnContext?: boolean;
8638
8637
  /**
8639
- * @internal
8638
+ * Determines if the menu should close on scroll.
8639
+ * @public
8640
8640
  */
8641
- handleMouseOut: (e: MouseEvent) => boolean;
8641
+ closeOnScroll?: boolean;
8642
8642
  /**
8643
- * Setup required ARIA on open/close
8644
- * @internal
8643
+ * Determines if the menu open state should persis on click of menu item
8644
+ * @public
8645
8645
  */
8646
- toggleHandler: (e: Event) => void;
8646
+ persistOnItemClick?: boolean;
8647
8647
  /**
8648
- * @internal
8648
+ * Determines if the menu is in split state.
8649
+ * @public
8649
8650
  */
8650
- private invoke;
8651
+ split?: boolean;
8651
8652
  /**
8652
- * Set fallback position of menu on open when CSS anchor not supported
8653
- * @internal
8654
- */
8655
- setSubmenuPosition: () => void;
8656
- }
8657
-
8658
- /**
8659
- * Mark internal because exporting class and interface of the same name
8660
- * confuses API documenter.
8661
- * TODO: https://github.com/microsoft/fast/issues/3317
8662
- * @internal
8663
- */
8664
- export declare interface MenuItem extends StartEnd {
8665
- }
8666
-
8667
- export declare type MenuItemColumnCount = 0 | 1 | 2;
8668
-
8669
- /**
8670
- * @public
8671
- * @remarks
8672
- * HTML Element: <fluent-menu-item>
8673
- */
8674
- export declare const MenuItemDefinition: FASTElementDefinition<typeof MenuItem>;
8675
-
8676
- /**
8677
- * Menu Item configuration options
8678
- * @public
8679
- */
8680
- export declare type MenuItemOptions = StartEndOptions<MenuItem> & {
8681
- indicator?: StaticallyComposableHTML<MenuItem>;
8682
- submenuGlyph?: StaticallyComposableHTML<MenuItem>;
8683
- };
8684
-
8685
- /**
8686
- * Menu items roles.
8687
- * @public
8688
- */
8689
- export declare const MenuItemRole: {
8653
+ * Holds the slotted menu list.
8654
+ * @public
8655
+ */
8656
+ slottedMenuList: MenuList[];
8690
8657
  /**
8691
- * The menu item has a "menuitem" role
8658
+ * Sets up the component when the slotted menu list changes.
8659
+ * @param prev - The previous items in the slotted menu list.
8660
+ * @param next - The new items in the slotted menu list.
8661
+ * @internal
8692
8662
  */
8693
- readonly menuitem: "menuitem";
8663
+ slottedMenuListChanged(prev: MenuList[] | undefined, next: MenuList[] | undefined): void;
8694
8664
  /**
8695
- * The menu item has a "menuitemcheckbox" role
8665
+ * Holds the slotted triggers.
8666
+ * @public
8696
8667
  */
8697
- readonly menuitemcheckbox: "menuitemcheckbox";
8668
+ slottedTriggers: HTMLElement[];
8698
8669
  /**
8699
- * The menu item has a "menuitemradio" role
8670
+ * Holds the primary slot element.
8671
+ * @public
8700
8672
  */
8701
- readonly menuitemradio: "menuitemradio";
8702
- };
8703
-
8704
- /**
8705
- * The types for menu item roles
8706
- * @public
8707
- */
8708
- export declare type MenuItemRole = ValuesOf<typeof MenuItemRole>;
8709
-
8710
- /** MenuItem styles
8711
- * @public
8712
- */
8713
- export declare const MenuItemStyles: ElementStyles;
8714
-
8715
- export declare const MenuItemTemplate: ElementViewTemplate<MenuItem>;
8716
-
8717
- /**
8718
- * A Menu Custom HTML Element.
8719
- * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#menu | ARIA menu }.
8720
- *
8721
- * @tag fluent-menu-list
8722
- *
8723
- * @slot - The default slot for the menu items
8724
- *
8725
- * @public
8726
- */
8727
- export declare class MenuList extends FASTElement {
8673
+ primaryAction: HTMLSlotElement;
8728
8674
  /**
8729
- * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
8730
- *
8675
+ * Defines whether the menu is open or not.
8731
8676
  * @internal
8732
8677
  */
8733
- elementInternals: ElementInternals;
8678
+ private _open;
8734
8679
  /**
8680
+ * The trigger element of the menu.
8735
8681
  * @internal
8736
8682
  */
8737
- items: HTMLElement[];
8738
- protected itemsChanged(oldValue: HTMLElement[], newValue: HTMLElement[]): void;
8739
- protected menuItems: Element[] | undefined;
8683
+ private _trigger?;
8740
8684
  /**
8741
- * The index of the focusable element in the items array
8742
- * defaults to -1
8685
+ * The menu list element of the menu which has the popover behavior.
8686
+ * @internal
8743
8687
  */
8744
- private focusIndex;
8745
- private static focusableElementRoles;
8746
- constructor();
8688
+ private _menuList?;
8747
8689
  /**
8748
- * @internal
8690
+ * Called when the element is connected to the DOM.
8691
+ * Sets up the component.
8692
+ * @public
8749
8693
  */
8750
8694
  connectedCallback(): void;
8751
8695
  /**
8752
- * @internal
8696
+ * Called when the element is disconnected from the DOM.
8697
+ * Removes event listeners.
8698
+ * @public
8753
8699
  */
8754
8700
  disconnectedCallback(): void;
8755
8701
  /**
8756
- * @internal
8702
+ * Sets the component.
8703
+ * Sets the trigger and menu list elements and adds event listeners.
8704
+ * @public
8757
8705
  */
8758
- readonly isNestedMenu: () => boolean;
8706
+ setComponent(): void;
8759
8707
  /**
8760
- * Focuses the first item in the menu.
8761
- *
8708
+ * Toggles the open state of the menu.
8762
8709
  * @public
8763
8710
  */
8764
- focus(): void;
8711
+ toggleMenu: () => void;
8765
8712
  /**
8766
- * @internal
8713
+ * Closes the menu.
8714
+ * @public
8767
8715
  */
8768
- handleMenuKeyDown(e: KeyboardEvent): void | boolean;
8716
+ closeMenu: (event?: Event) => void;
8769
8717
  /**
8770
- * if focus is moving out of the menu, reset to a stable initial state
8771
- * @internal
8718
+ * Opens the menu.
8719
+ * @public
8772
8720
  */
8773
- handleFocusOut: (e: FocusEvent) => void;
8774
- private handleItemFocus;
8775
- private removeItemListeners;
8776
- private static elementIndent;
8777
- protected setItems(): void;
8721
+ openMenu: (e?: Event) => void;
8778
8722
  /**
8779
- * Method for Observable changes to the hidden attribute of child elements
8723
+ * Focuses on the menu list.
8724
+ * @public
8780
8725
  */
8781
- handleChange(source: any, propertyName: string): void;
8726
+ focusMenuList(): void;
8782
8727
  /**
8783
- * Handle change from child MenuItem element and set radio group behavior
8728
+ * Focuses on the menu trigger.
8729
+ * @public
8784
8730
  */
8785
- private changedMenuItemHandler;
8731
+ focusTrigger(): void;
8786
8732
  /**
8787
- * check if the item is a menu item
8733
+ * Handles the 'toggle' event on the popover.
8734
+ * @public
8735
+ * @param e - the event
8736
+ * @returns void
8788
8737
  */
8789
- protected isMenuItemElement: (el: Element) => el is HTMLElement;
8738
+ toggleHandler: (e: Event) => void;
8790
8739
  /**
8791
- * check if the item is focusable
8740
+ * Called whenever the 'openOnHover' property changes.
8741
+ * Adds or removes a 'mouseover' event listener to the trigger based on the new value.
8742
+ *
8743
+ * @param oldValue - The previous value of 'openOnHover'.
8744
+ * @param newValue - The new value of 'openOnHover'.
8745
+ * @public
8792
8746
  */
8793
- private isFocusableElement;
8794
- private setFocus;
8795
- }
8796
-
8797
- /**
8798
- * @public
8799
- * @remarks
8800
- * HTML Element: <fluent-menu-list>
8801
- */
8802
- export declare const MenuListDefinition: FASTElementDefinition<typeof MenuList>;
8803
-
8804
- /** MenuList styles
8805
- * @public
8806
- */
8807
- export declare const MenuListStyles: ElementStyles;
8808
-
8809
- export declare const MenuListTemplate: ElementViewTemplate<MenuList>;
8810
-
8811
- /** Menu styles
8812
- * @public
8813
- */
8814
- export declare const MenuStyles: ElementStyles;
8815
-
8816
- export declare const MenuTemplate: ElementViewTemplate<Menu>;
8817
-
8818
- /**
8819
- * A Message Bar Custom HTML Element.
8820
- *
8821
- * @tag fluent-message-bar
8822
- *
8823
- * @slot actions - Content that can be provided for the actions
8824
- * @slot dismiss - Content that can be provided for the dismiss button
8825
- * @slot - The default slot for the content
8826
- * @public
8827
- */
8828
- export declare class MessageBar extends FASTElement {
8747
+ openOnHoverChanged(oldValue: boolean, newValue: boolean): void;
8829
8748
  /**
8830
- * The internal {@link https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
8831
- *
8832
- * @internal
8749
+ * Called whenever the 'persistOnItemClick' property changes.
8750
+ * Adds or removes a 'click' event listener to the menu list based on the new value.
8751
+ * @public
8752
+ * @param oldValue - The previous value of 'persistOnItemClick'.
8753
+ * @param newValue - The new value of 'persistOnItemClick'.
8833
8754
  */
8834
- elementInternals: ElementInternals;
8835
- constructor();
8755
+ persistOnItemClickChanged(oldValue: boolean, newValue: boolean): void;
8836
8756
  /**
8837
- * Sets the shape of the Message Bar.
8838
- *
8757
+ * Called whenever the 'openOnContext' property changes.
8758
+ * Adds or removes a 'contextmenu' event listener to the trigger based on the new value.
8839
8759
  * @public
8840
- * @remarks
8841
- * HTML Attribute: `shape`
8760
+ * @param oldValue - The previous value of 'openOnContext'.
8761
+ * @param newValue - The new value of 'openOnContext'.
8842
8762
  */
8843
- shape?: MessageBarShape;
8763
+ openOnContextChanged(oldValue: boolean, newValue: boolean): void;
8844
8764
  /**
8845
- * Sets the layout of the control.
8846
- *
8765
+ * Called whenever the 'closeOnScroll' property changes.
8766
+ * Adds or removes a 'closeOnScroll' event listener to the trigger based on the new value.
8847
8767
  * @public
8848
- * @remarks
8849
- * HTML Attribute: `layout`
8768
+ * @param oldValue - The previous value of 'closeOnScroll'.
8769
+ * @param newValue - The new value of 'closeOnScroll'.
8850
8770
  */
8851
- layout?: MessageBarLayout;
8771
+ closeOnScrollChanged(oldValue: boolean, newValue: boolean): void;
8852
8772
  /**
8853
- * Sets the intent of the control.
8773
+ * Adds event listeners.
8774
+ * Adds click and keydown event listeners to the trigger.
8775
+ * Adds a 'toggle' event listener to the menu list.
8776
+ * If 'openOnHover' is true, adds a 'mouseover' event listener to the trigger.
8777
+ * If 'openOnContext' is true, adds a 'contextmenu' event listener to the trigger and a document 'click' event listener.
8778
+ * @internal
8779
+ */
8780
+ private addListeners;
8781
+ /**
8782
+ * Removes event listeners.
8783
+ * Removes click and keydown event listeners from the trigger.
8784
+ * Also removes toggle event listener from the menu list.
8785
+ * Also removes 'mouseover' event listeners from the trigger.
8786
+ * Also removes 'contextmenu' event listeners from the trigger and document 'click' event listeners.
8787
+ * @internal
8788
+ */
8789
+ private removeListeners;
8790
+ /**
8791
+ * Handles keyboard interaction for the menu. Closes the menu and focuses on the trigger when the Escape key is
8792
+ * pressed. Closes the menu when the Tab key is pressed.
8854
8793
  *
8794
+ * @param e - the keyboard event
8855
8795
  * @public
8856
- * @remarks
8857
- * HTML Attribute: `intent`
8858
8796
  */
8859
- intent?: MessageBarIntent;
8797
+ menuKeydownHandler(e: KeyboardEvent): boolean | void;
8860
8798
  /**
8861
- * Method to emit a `dismiss` event when the message bar is dismissed
8799
+ * Handles keyboard interaction for the trigger. Toggles the menu when the Space or Enter key is pressed. If the menu
8800
+ * is open, focuses on the menu list.
8862
8801
  *
8802
+ * @param e - the keyboard event
8863
8803
  * @public
8864
8804
  */
8865
- dismissMessageBar: () => void;
8805
+ triggerKeydownHandler: (e: KeyboardEvent) => boolean | void;
8806
+ /**
8807
+ * Handles document click events to close a menu opened with contextmenu in popover="manual" mode.
8808
+ * @internal
8809
+ * @param e - The event triggered on document click.
8810
+ */
8811
+ private documentClickHandler;
8866
8812
  }
8867
8813
 
8868
8814
  /**
8869
- * The Fluent MessageBar Element definition.
8815
+ * The base class used for constructing a fluent-menu-button custom element
8816
+ *
8817
+ * @tag fluent-menu-button
8870
8818
  *
8819
+ * @public
8820
+ */
8821
+ export declare class MenuButton extends Button {
8822
+ }
8823
+
8824
+ /**
8825
+ * Menu Button Appearance constants
8826
+ * @public
8827
+ */
8828
+ export declare const MenuButtonAppearance: {
8829
+ readonly primary: "primary";
8830
+ readonly outline: "outline";
8831
+ readonly subtle: "subtle";
8832
+ readonly transparent: "transparent";
8833
+ };
8834
+
8835
+ /**
8836
+ * A Menu Button can be secondary, primary, outline, subtle, transparent
8837
+ * @public
8838
+ */
8839
+ export declare type MenuButtonAppearance = ValuesOf<typeof MenuButtonAppearance>;
8840
+
8841
+ /**
8871
8842
  * @public
8872
8843
  * @remarks
8873
- * HTML Element: `<fluent-message-bar>`
8844
+ * HTML Element: \<fluent-button\>
8874
8845
  */
8875
- export declare const MessageBarDefinition: FASTElementDefinition<typeof MessageBar>;
8846
+ export declare const MenuButtonDefinition: FASTElementDefinition<typeof MenuButton>;
8876
8847
 
8877
8848
  /**
8878
- * The `intent` variations for the MessageBar component.
8879
- *
8849
+ * A Menu Button can be square, circular or rounded.
8880
8850
  * @public
8881
8851
  */
8882
- export declare const MessageBarIntent: {
8883
- readonly success: "success";
8884
- readonly warning: "warning";
8885
- readonly error: "error";
8886
- readonly info: "info";
8852
+ export declare const MenuButtonShape: {
8853
+ readonly circular: "circular";
8854
+ readonly rounded: "rounded";
8855
+ readonly square: "square";
8887
8856
  };
8888
8857
 
8889
- export declare type MessageBarIntent = ValuesOf<typeof MessageBarIntent>;
8890
-
8891
8858
  /**
8892
- * The `layout` variations for the MessageBar component.
8893
- *
8859
+ * A Menu Button can be square, circular or rounded
8894
8860
  * @public
8895
8861
  */
8896
- export declare const MessageBarLayout: {
8897
- readonly multiline: "multiline";
8898
- readonly singleline: "singleline";
8899
- };
8900
-
8901
- export declare type MessageBarLayout = ValuesOf<typeof MessageBarLayout>;
8862
+ export declare type MenuButtonShape = ValuesOf<typeof MenuButtonShape>;
8902
8863
 
8903
8864
  /**
8904
- * The `shape` variations for the MessageBar component.
8905
- *
8865
+ * A Menu Button can be a size of small, medium or large.
8906
8866
  * @public
8907
8867
  */
8908
- export declare const MessageBarShape: {
8909
- readonly rounded: "rounded";
8910
- readonly square: "square";
8868
+ export declare const MenuButtonSize: {
8869
+ readonly small: "small";
8870
+ readonly medium: "medium";
8871
+ readonly large: "large";
8911
8872
  };
8912
8873
 
8913
- export declare type MessageBarShape = ValuesOf<typeof MessageBarShape>;
8874
+ /**
8875
+ * A Menu Button can be on of several preset sizes.
8876
+ * @public
8877
+ */
8878
+ export declare type MenuButtonSize = ValuesOf<typeof MenuButtonSize>;
8914
8879
 
8915
8880
  /**
8916
- * Styles for the MessageBar component.
8917
- *
8881
+ * The template for the Button component.
8918
8882
  * @public
8919
8883
  */
8920
- export declare const MessageBarStyles: ElementStyles;
8884
+ export declare const MenuButtonTemplate: ElementViewTemplate<MenuButton>;
8921
8885
 
8922
8886
  /**
8923
- * The template for the MessageBar component.
8924
- * @type {ElementViewTemplate<MessageBar>}
8887
+ * The Fluent Menu Element.
8888
+ *
8889
+ * @public
8890
+ * @remarks
8891
+ * HTML Element: <fluent-menu>
8925
8892
  */
8926
- export declare const MessageBarTemplate: ElementViewTemplate<MessageBar>;
8893
+ export declare const MenuDefinition: FASTElementDefinition<typeof Menu>;
8927
8894
 
8928
8895
  /**
8929
- * A Progress HTML Element.
8930
- * Based on BaseProgressBar and includes style and layout specific attributes
8896
+ * A Switch Custom HTML Element.
8897
+ * Implements {@link https://www.w3.org/TR/wai-aria-1.1/#menuitem | ARIA menuitem }, {@link https://www.w3.org/TR/wai-aria-1.1/#menuitemcheckbox | ARIA menuitemcheckbox}, or {@link https://www.w3.org/TR/wai-aria-1.1/#menuitemradio | ARIA menuitemradio }.
8931
8898
  *
8932
- * @tag fluent-progress-bar
8899
+ * @tag fluent-menu-item
8900
+ *
8901
+ * @slot indicator - The checkbox or radio indicator
8902
+ * @slot start - Content which can be provided before the menu item content
8903
+ * @slot - The default slot for menu item content
8904
+ * @slot end - Content which can be provided after the menu item content
8905
+ * @slot submenu-glyph - The submenu expand/collapse indicator
8906
+ * @slot submenu - Used to nest menu's within menu items
8907
+ * @csspart content - The element wrapping the menu item content
8908
+ * @fires change - Fires a custom 'change' event when a non-submenu item with a role of `menuitemcheckbox`, `menuitemradio`, or `menuitem` is invoked
8933
8909
  *
8934
8910
  * @public
8935
8911
  */
8936
- export declare class ProgressBar extends BaseProgressBar {
8912
+ export declare class MenuItem extends FASTElement {
8937
8913
  /**
8938
- * The thickness of the progress bar
8914
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
8939
8915
  *
8940
- * The thickness of the progress bar
8916
+ * @internal
8917
+ */
8918
+ elementInternals: ElementInternals;
8919
+ /**
8920
+ * The disabled state of the element.
8941
8921
  *
8942
- * HTML Attribute: `thickness`
8922
+ * @public
8923
+ * @remarks
8924
+ * HTML Attribute: disabled
8925
+ */
8926
+ disabled: boolean;
8927
+ /**
8928
+ * Handles changes to disabled attribute custom states and element internals
8929
+ * @param prev - the previous state
8930
+ * @param next - the next state
8931
+ */
8932
+ disabledChanged(prev: boolean | undefined, next: boolean | undefined): void;
8933
+ /**
8934
+ * The role of the element.
8943
8935
  *
8944
8936
  * @public
8937
+ * @remarks
8938
+ * HTML Attribute: role
8945
8939
  */
8946
- thickness?: ProgressBarThickness;
8940
+ role: MenuItemRole;
8947
8941
  /**
8948
- * The shape of the progress bar
8949
- * The shape of the progress bar
8942
+ * Handles changes to role attribute element internals properties
8943
+ * @param prev - the previous state
8944
+ * @param next - the next state
8945
+ */
8946
+ roleChanged(prev: MenuItemRole | undefined, next: MenuItemRole | undefined): void;
8947
+ /**
8948
+ * The checked value of the element.
8950
8949
  *
8951
- * HTML Attribute: `shape`
8950
+ * @public
8951
+ * @remarks
8952
+ * HTML Attribute: checked
8953
+ */
8954
+ checked: boolean;
8955
+ /**
8956
+ * Handles changes to checked attribute custom states and element internals
8957
+ * @param prev - the previous state
8958
+ * @param next - the next state
8959
+ */
8960
+ protected checkedChanged(prev: boolean, next: boolean): void;
8961
+ /**
8962
+ * The hidden attribute.
8952
8963
  *
8953
8964
  * @public
8965
+ * @remarks
8966
+ * HTML Attribute: hidden
8954
8967
  */
8955
- shape?: ProgressBarShape;
8968
+ hidden: boolean;
8969
+ /**
8970
+ * The submenu slotted content.
8971
+ *
8972
+ * @internal
8973
+ */
8974
+ slottedSubmenu: HTMLElement[];
8975
+ /**
8976
+ * Sets the submenu and updates its position.
8977
+ *
8978
+ * @internal
8979
+ */
8980
+ protected slottedSubmenuChanged(prev: HTMLElement[] | undefined, next: HTMLElement[]): void;
8981
+ /**
8982
+ * @internal
8983
+ */
8984
+ submenu: HTMLElement | undefined;
8985
+ connectedCallback(): void;
8986
+ /**
8987
+ * @internal
8988
+ */
8989
+ handleMenuItemKeyDown: (e: KeyboardEvent) => boolean;
8990
+ /**
8991
+ * @internal
8992
+ */
8993
+ handleMenuItemClick: (e: MouseEvent) => boolean;
8994
+ /**
8995
+ * @internal
8996
+ */
8997
+ handleMouseOver: (e: MouseEvent) => boolean;
8998
+ /**
8999
+ * @internal
9000
+ */
9001
+ handleMouseOut: (e: MouseEvent) => boolean;
9002
+ /**
9003
+ * Setup required ARIA on open/close
9004
+ * @internal
9005
+ */
9006
+ toggleHandler: (e: Event) => void;
9007
+ /**
9008
+ * @internal
9009
+ */
9010
+ private invoke;
9011
+ /**
9012
+ * Set fallback position of menu on open when CSS anchor not supported
9013
+ * @internal
9014
+ */
9015
+ setSubmenuPosition: () => void;
8956
9016
  }
8957
9017
 
8958
9018
  /**
8959
- * The Fluent ProgressBar Element.
8960
- *
8961
- *
9019
+ * Mark internal because exporting class and interface of the same name
9020
+ * confuses API documenter.
9021
+ * TODO: https://github.com/microsoft/fast/issues/3317
9022
+ * @internal
9023
+ */
9024
+ export declare interface MenuItem extends StartEnd {
9025
+ }
9026
+
9027
+ export declare type MenuItemColumnCount = 0 | 1 | 2;
9028
+
9029
+ /**
8962
9030
  * @public
8963
9031
  * @remarks
8964
- * HTML Element: \<fluent-progress-bar\>
9032
+ * HTML Element: <fluent-menu-item>
8965
9033
  */
8966
- export declare const ProgressBarDefinition: FASTElementDefinition<typeof ProgressBar>;
9034
+ export declare const MenuItemDefinition: FASTElementDefinition<typeof MenuItem>;
8967
9035
 
8968
9036
  /**
8969
- * ProgressBarShape Constants
9037
+ * Menu Item configuration options
8970
9038
  * @public
8971
9039
  */
8972
- export declare const ProgressBarShape: {
8973
- readonly rounded: "rounded";
8974
- readonly square: "square";
9040
+ export declare type MenuItemOptions = StartEndOptions<MenuItem> & {
9041
+ indicator?: StaticallyComposableHTML<MenuItem>;
9042
+ submenuGlyph?: StaticallyComposableHTML<MenuItem>;
8975
9043
  };
8976
9044
 
8977
9045
  /**
8978
- * Applies bar shape to the content
9046
+ * Menu items roles.
8979
9047
  * @public
8980
9048
  */
8981
- export declare type ProgressBarShape = ValuesOf<typeof ProgressBarShape>;
9049
+ export declare const MenuItemRole: {
9050
+ /**
9051
+ * The menu item has a "menuitem" role
9052
+ */
9053
+ readonly menuitem: "menuitem";
9054
+ /**
9055
+ * The menu item has a "menuitemcheckbox" role
9056
+ */
9057
+ readonly menuitemcheckbox: "menuitemcheckbox";
9058
+ /**
9059
+ * The menu item has a "menuitemradio" role
9060
+ */
9061
+ readonly menuitemradio: "menuitemradio";
9062
+ };
8982
9063
 
8983
- /** ProgressBar styles
9064
+ /**
9065
+ * The types for menu item roles
8984
9066
  * @public
8985
9067
  */
8986
- export declare const ProgressBarStyles: ElementStyles;
9068
+ export declare type MenuItemRole = ValuesOf<typeof MenuItemRole>;
8987
9069
 
8988
- export declare const ProgressBarTemplate: ElementViewTemplate<ProgressBar>;
9070
+ /** MenuItem styles
9071
+ * @public
9072
+ */
9073
+ export declare const MenuItemStyles: ElementStyles;
9074
+
9075
+ export declare const MenuItemTemplate: ElementViewTemplate<MenuItem>;
8989
9076
 
8990
9077
  /**
8991
- * ProgressBarThickness Constants
9078
+ * A Menu List Custom HTML Element.
9079
+ * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#menu | ARIA menu }.
9080
+ *
9081
+ * @tag fluent-menu-list
9082
+ *
9083
+ * @slot - The default slot for the menu items
9084
+ *
8992
9085
  * @public
8993
9086
  */
8994
- export declare const ProgressBarThickness: {
8995
- readonly medium: "medium";
8996
- readonly large: "large";
8997
- };
9087
+ export declare class MenuList extends BaseMenuList {
9088
+ }
8998
9089
 
8999
9090
  /**
9000
- * Applies bar thickness to the content
9001
9091
  * @public
9092
+ * @remarks
9093
+ * HTML Element: <fluent-menu-list>
9002
9094
  */
9003
- export declare type ProgressBarThickness = ValuesOf<typeof ProgressBarThickness>;
9095
+ export declare const MenuListDefinition: FASTElementDefinition<typeof MenuList>;
9004
9096
 
9005
- /**
9006
- * ProgressBarValidationState Constants
9097
+ /** MenuList styles
9007
9098
  * @public
9008
9099
  */
9009
- export declare const ProgressBarValidationState: {
9010
- readonly success: "success";
9011
- readonly warning: "warning";
9012
- readonly error: "error";
9013
- };
9100
+ export declare const MenuListStyles: ElementStyles;
9101
+
9102
+ export declare const MenuListTemplate: ElementViewTemplate<MenuList>;
9014
9103
 
9015
- /**
9016
- * Applies validation state to the content
9104
+ /** Menu styles
9017
9105
  * @public
9018
9106
  */
9019
- export declare type ProgressBarValidationState = ValuesOf<typeof ProgressBarValidationState>;
9107
+ export declare const MenuStyles: ElementStyles;
9020
9108
 
9021
- declare type PropertyNameForCalculation = 'max' | 'value';
9109
+ export declare const MenuTemplate: ElementViewTemplate<Menu>;
9022
9110
 
9023
9111
  /**
9024
- * A Radio Custom HTML Element.
9025
- * Implements the {@link https://w3c.github.io/aria/#radio | ARIA `radio` role}.
9026
- *
9027
- * @tag fluent-radio
9112
+ * A Message Bar Custom HTML Element.
9028
9113
  *
9029
- * @slot checked-indicator - The checked indicator slot
9030
- * @fires change - Emits a custom change event when the checked state changes
9031
- * @fires input - Emits a custom input event when the checked state changes
9114
+ * @tag fluent-message-bar
9032
9115
  *
9116
+ * @slot actions - Content that can be provided for the actions
9117
+ * @slot dismiss - Content that can be provided for the dismiss button
9118
+ * @slot - The default slot for the content
9033
9119
  * @public
9034
9120
  */
9035
- export declare class Radio extends BaseCheckbox {
9036
- constructor();
9121
+ export declare class MessageBar extends FASTElement {
9037
9122
  /**
9038
- * Toggles the disabled state when the user changes the `disabled` property.
9123
+ * The internal {@link https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
9039
9124
  *
9040
- * @param prev - the previous value of the `disabled` property
9041
- * @param next - the current value of the `disabled` property
9042
9125
  * @internal
9043
- * @override
9044
9126
  */
9045
- protected disabledChanged(prev: boolean | undefined, next: boolean | undefined): void;
9127
+ elementInternals: ElementInternals;
9128
+ constructor();
9046
9129
  /**
9047
- * This method is a no-op for the radio component.
9130
+ * Sets the shape of the Message Bar.
9048
9131
  *
9049
- * @internal
9050
- * @override
9132
+ * @public
9051
9133
  * @remarks
9052
- * To make a group of radio controls required, see {@link RadioGroup.required}.
9134
+ * HTML Attribute: `shape`
9053
9135
  */
9054
- protected requiredChanged(): void;
9136
+ shape?: MessageBarShape;
9055
9137
  /**
9056
- * This method is a no-op for the radio component.
9138
+ * Sets the layout of the control.
9057
9139
  *
9058
- * @internal
9059
- * @override
9140
+ * @public
9060
9141
  * @remarks
9061
- * The radio form value is controlled by the `RadioGroup` component.
9142
+ * HTML Attribute: `layout`
9062
9143
  */
9063
- setFormValue(): void;
9144
+ layout?: MessageBarLayout;
9064
9145
  /**
9065
- * Sets the validity of the control.
9146
+ * Sets the intent of the control.
9066
9147
  *
9067
- * @internal
9068
- * @override
9148
+ * @public
9069
9149
  * @remarks
9070
- * The radio component does not have a `required` attribute, so this method always sets the validity to `true`.
9150
+ * HTML Attribute: `intent`
9071
9151
  */
9072
- setValidity(): void;
9152
+ intent?: MessageBarIntent;
9073
9153
  /**
9074
- * Toggles the checked state of the control.
9154
+ * Method to emit a `dismiss` event when the message bar is dismissed
9075
9155
  *
9076
- * @param force - Forces the element to be checked or unchecked
9077
9156
  * @public
9078
- * @override
9079
- * @remarks
9080
- * The radio checked state is controlled by the `RadioGroup` component, so the `force` parameter defaults to `true`.
9081
9157
  */
9082
- toggleChecked(force?: boolean): void;
9158
+ dismissMessageBar: () => void;
9083
9159
  }
9084
9160
 
9085
9161
  /**
9162
+ * The Fluent MessageBar Element definition.
9163
+ *
9086
9164
  * @public
9165
+ * @remarks
9166
+ * HTML Element: `<fluent-message-bar>`
9087
9167
  */
9088
- export declare type RadioControl = Pick<HTMLInputElement, 'checked' | 'disabled' | 'focus' | 'setAttribute' | 'getAttribute'>;
9168
+ export declare const MessageBarDefinition: FASTElementDefinition<typeof MessageBar>;
9089
9169
 
9090
9170
  /**
9091
- * The Fluent Radio Element.
9092
- *
9171
+ * The `intent` variations for the MessageBar component.
9093
9172
  *
9094
9173
  * @public
9095
- * @remarks
9096
- * HTML Element: \<fluent-radio\>
9097
9174
  */
9098
- export declare const RadioDefinition: FASTElementDefinition<typeof Radio>;
9175
+ export declare const MessageBarIntent: {
9176
+ readonly success: "success";
9177
+ readonly warning: "warning";
9178
+ readonly error: "error";
9179
+ readonly info: "info";
9180
+ };
9181
+
9182
+ export declare type MessageBarIntent = ValuesOf<typeof MessageBarIntent>;
9099
9183
 
9100
9184
  /**
9101
- * A Radio Group Custom HTML Element.
9102
- * Implements the {@link https://w3c.github.io/aria/#radiogroup | ARIA `radiogroup` role}.
9103
- *
9104
- * @tag fluent-radio-group
9185
+ * The `layout` variations for the MessageBar component.
9105
9186
  *
9106
9187
  * @public
9188
+ */
9189
+ export declare const MessageBarLayout: {
9190
+ readonly multiline: "multiline";
9191
+ readonly singleline: "singleline";
9192
+ };
9193
+
9194
+ export declare type MessageBarLayout = ValuesOf<typeof MessageBarLayout>;
9195
+
9196
+ /**
9197
+ * The `shape` variations for the MessageBar component.
9107
9198
  *
9108
- * @slot - The default slot for the radio group
9199
+ * @public
9109
9200
  */
9110
- export declare class RadioGroup extends FASTElement {
9111
- /**
9112
- * The index of the checked radio, scoped to the enabled radios.
9113
- *
9114
- * @internal
9115
- */
9116
- protected checkedIndex: number;
9117
- /**
9118
- * Sets the checked state of the nearest enabled radio when the `checkedIndex` changes.
9119
- *
9120
- * @param prev - the previous index
9121
- * @param next - the current index
9122
- * @internal
9123
- */
9124
- protected checkedIndexChanged(prev: number | undefined, next: number): void;
9125
- /**
9126
- * Indicates that the value has been changed by the user.
9127
- */
9128
- private dirtyState;
9129
- /**
9130
- * Disables the radio group and child radios.
9131
- *
9132
- * @public
9133
- * @remarks
9134
- * HTML Attribute: `disabled`
9135
- */
9136
- disabled: boolean;
9137
- /**
9138
- * Sets the `disabled` attribute on all child radios when the `disabled` property changes.
9139
- *
9140
- * @param prev - the previous disabled value
9141
- * @param next - the current disabled value
9142
- * @internal
9143
- */
9144
- protected disabledChanged(prev?: boolean, next?: boolean): void;
9145
- /**
9146
- * The value of the checked radio.
9147
- *
9148
- * @public
9149
- * @remarks
9150
- * HTML Attribute: `value`
9151
- */
9152
- initialValue?: string;
9153
- /**
9154
- * Sets the matching radio to checked when the value changes. If no radio matches the value, no radio will be checked.
9155
- *
9156
- * @param prev - the previous value
9157
- * @param next - the current value
9158
- */
9159
- initialValueChanged(prev: string | undefined, next: string | undefined): void;
9160
- /**
9161
- * The name of the radio group.
9162
- *
9163
- * @public
9164
- * @remarks
9165
- * HTML Attribute: `name`
9166
- */
9167
- name: string;
9168
- /**
9169
- * Sets the `name` attribute on all child radios when the `name` property changes.
9170
- *
9171
- * @internal
9172
- */
9173
- protected nameChanged(prev: string | undefined, next: string | undefined): void;
9174
- /**
9175
- * The orientation of the group.
9176
- *
9177
- * @public
9178
- * @remarks
9179
- * HTML Attribute: `orientation`
9180
- */
9181
- orientation?: RadioGroupOrientation;
9182
- /**
9183
- * Sets the ariaOrientation attribute when the orientation changes.
9184
- *
9185
- * @param prev - the previous orientation
9186
- * @param next - the current orientation
9187
- * @internal
9188
- */
9189
- orientationChanged(prev: RadioGroupOrientation | undefined, next: RadioGroupOrientation | undefined): void;
9190
- /**
9191
- * The collection of all child radios.
9192
- *
9193
- * @public
9194
- */
9195
- radios: Radio[];
9196
- /**
9197
- * Updates the enabled radios collection when properties on the child radios change.
9198
- *
9199
- * @param prev - the previous radios
9200
- * @param next - the current radios
9201
- */
9202
- radiosChanged(prev: Radio[] | undefined, next: Radio[] | undefined): void;
9203
- /**
9204
- * Indicates whether the radio group is required.
9205
- *
9206
- * @public
9207
- * @remarks
9208
- * HTML Attribute: `required`
9209
- */
9210
- required: boolean;
9211
- /**
9212
- *
9213
- * @param prev - the previous required value
9214
- * @param next - the current required value
9215
- */
9216
- requiredChanged(prev: boolean, next: boolean): void;
9217
- /**
9218
- * The collection of radios that are slotted into the default slot.
9219
- *
9220
- * @internal
9221
- */
9222
- slottedRadios: Radio[];
9223
- /**
9224
- * Updates the radios collection when the slotted radios change.
9225
- *
9226
- * @param prev - the previous slotted radios
9227
- * @param next - the current slotted radios
9228
- */
9229
- slottedRadiosChanged(prev: Radio[] | undefined, next: Radio[]): void;
9230
- /**
9231
- * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
9232
- *
9233
- * @internal
9234
- */
9235
- elementInternals: ElementInternals;
9236
- /**
9237
- * A collection of child radios that are not disabled.
9238
- *
9239
- * @internal
9240
- */
9241
- get enabledRadios(): Radio[];
9242
- /**
9243
- * The form-associated flag.
9244
- * @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
9245
- *
9246
- * @public
9247
- */
9248
- static formAssociated: boolean;
9249
- /**
9250
- * The fallback validation message, taken from a native checkbox `<input>` element.
9251
- *
9252
- * @internal
9253
- */
9254
- private _validationFallbackMessage;
9201
+ export declare const MessageBarShape: {
9202
+ readonly rounded: "rounded";
9203
+ readonly square: "square";
9204
+ };
9205
+
9206
+ export declare type MessageBarShape = ValuesOf<typeof MessageBarShape>;
9207
+
9208
+ /**
9209
+ * Styles for the MessageBar component.
9210
+ *
9211
+ * @public
9212
+ */
9213
+ export declare const MessageBarStyles: ElementStyles;
9214
+
9215
+ /**
9216
+ * The template for the MessageBar component.
9217
+ * @type {ElementViewTemplate<MessageBar>}
9218
+ */
9219
+ export declare const MessageBarTemplate: ElementViewTemplate<MessageBar>;
9220
+
9221
+ /**
9222
+ * A Progress HTML Element.
9223
+ * Based on BaseProgressBar and includes style and layout specific attributes
9224
+ *
9225
+ * @tag fluent-progress-bar
9226
+ *
9227
+ * @public
9228
+ */
9229
+ export declare class ProgressBar extends BaseProgressBar {
9255
9230
  /**
9256
- * The validation message. Uses the browser's default validation message for native checkboxes if not otherwise
9257
- * specified (e.g., via `setCustomValidity`).
9231
+ * The thickness of the progress bar
9258
9232
  *
9259
- * @internal
9260
- */
9261
- get validationMessage(): string;
9262
- /**
9263
- * The element's validity state.
9233
+ * The thickness of the progress bar
9264
9234
  *
9265
- * @public
9266
- * @remarks
9267
- * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/validity | `ElementInternals.validity`} property.
9268
- */
9269
- get validity(): ValidityState;
9270
- /**
9271
- * The current value of the checked radio.
9235
+ * HTML Attribute: `thickness`
9272
9236
  *
9273
9237
  * @public
9274
9238
  */
9275
- get value(): string | null;
9276
- set value(next: string | null);
9277
- /**
9278
- * Sets the checked state of all radios when any radio emits a `change` event.
9279
- *
9280
- * @param e - the change event
9281
- */
9282
- changeHandler(e: Event): boolean | void;
9239
+ thickness?: ProgressBarThickness;
9283
9240
  /**
9284
- * Checks the radio at the specified index.
9241
+ * The shape of the progress bar
9242
+ * The shape of the progress bar
9285
9243
  *
9286
- * @param index - the index of the radio to check
9287
- * @internal
9288
- */
9289
- checkRadio(index?: number, shouldEmit?: boolean): void;
9290
- /**
9291
- * Checks the validity of the element and returns the result.
9244
+ * HTML Attribute: `shape`
9292
9245
  *
9293
9246
  * @public
9294
- * @remarks
9295
- * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/checkValidity | `HTMLInputElement.checkValidity()`} method.
9296
- */
9297
- checkValidity(): boolean;
9298
- /**
9299
- * Handles click events for the radio group.
9300
- *
9301
- * @param e - the click event
9302
- * @internal
9303
9247
  */
9304
- clickHandler(e: MouseEvent): boolean | void;
9248
+ shape?: ProgressBarShape;
9249
+ }
9250
+
9251
+ /**
9252
+ * The Fluent ProgressBar Element.
9253
+ *
9254
+ *
9255
+ * @public
9256
+ * @remarks
9257
+ * HTML Element: \<fluent-progress-bar\>
9258
+ */
9259
+ export declare const ProgressBarDefinition: FASTElementDefinition<typeof ProgressBar>;
9260
+
9261
+ /**
9262
+ * ProgressBarShape Constants
9263
+ * @public
9264
+ */
9265
+ export declare const ProgressBarShape: {
9266
+ readonly rounded: "rounded";
9267
+ readonly square: "square";
9268
+ };
9269
+
9270
+ /**
9271
+ * Applies bar shape to the content
9272
+ * @public
9273
+ */
9274
+ export declare type ProgressBarShape = ValuesOf<typeof ProgressBarShape>;
9275
+
9276
+ /** ProgressBar styles
9277
+ * @public
9278
+ */
9279
+ export declare const ProgressBarStyles: ElementStyles;
9280
+
9281
+ export declare const ProgressBarTemplate: ElementViewTemplate<ProgressBar>;
9282
+
9283
+ /**
9284
+ * ProgressBarThickness Constants
9285
+ * @public
9286
+ */
9287
+ export declare const ProgressBarThickness: {
9288
+ readonly medium: "medium";
9289
+ readonly large: "large";
9290
+ };
9291
+
9292
+ /**
9293
+ * Applies bar thickness to the content
9294
+ * @public
9295
+ */
9296
+ export declare type ProgressBarThickness = ValuesOf<typeof ProgressBarThickness>;
9297
+
9298
+ /**
9299
+ * ProgressBarValidationState Constants
9300
+ * @public
9301
+ */
9302
+ export declare const ProgressBarValidationState: {
9303
+ readonly success: "success";
9304
+ readonly warning: "warning";
9305
+ readonly error: "error";
9306
+ };
9307
+
9308
+ /**
9309
+ * Applies validation state to the content
9310
+ * @public
9311
+ */
9312
+ export declare type ProgressBarValidationState = ValuesOf<typeof ProgressBarValidationState>;
9313
+
9314
+ declare type PropertyNameForCalculation = 'max' | 'value';
9315
+
9316
+ /**
9317
+ * A Radio Custom HTML Element.
9318
+ * Implements the {@link https://w3c.github.io/aria/#radio | ARIA `radio` role}.
9319
+ *
9320
+ * @tag fluent-radio
9321
+ *
9322
+ * @slot checked-indicator - The checked indicator slot
9323
+ * @fires change - Emits a custom change event when the checked state changes
9324
+ * @fires input - Emits a custom input event when the checked state changes
9325
+ *
9326
+ * @public
9327
+ */
9328
+ export declare class Radio extends BaseCheckbox {
9305
9329
  constructor();
9306
9330
  /**
9307
- * Focuses the checked radio or the first enabled radio.
9308
- *
9309
- * @internal
9310
- */
9311
- focus(): void;
9312
- /**
9313
- * Enables tabbing through the radio group when the group receives focus.
9314
- *
9315
- * @param e - the focus event
9316
- * @internal
9317
- */
9318
- focusinHandler(e: FocusEvent): boolean | void;
9319
- /**
9320
- * Sets the tabindex of the radios based on the checked state when the radio group loses focus.
9331
+ * Toggles the disabled state when the user changes the `disabled` property.
9321
9332
  *
9322
- * @param e - the focusout event
9333
+ * @param prev - the previous value of the `disabled` property
9334
+ * @param next - the current value of the `disabled` property
9323
9335
  * @internal
9336
+ * @override
9324
9337
  */
9325
- focusoutHandler(e: FocusEvent): boolean | void;
9326
- formResetCallback(): void;
9327
- private getEnabledIndexInBounds;
9338
+ protected disabledChanged(prev: boolean | undefined, next: boolean | undefined): void;
9328
9339
  /**
9329
- * Handles keydown events for the radio group.
9340
+ * This method is a no-op for the radio component.
9330
9341
  *
9331
- * @param e - the keyboard event
9332
9342
  * @internal
9333
- */
9334
- keydownHandler(e: KeyboardEvent): boolean | void;
9335
- /**
9336
- *
9337
- * @param e - the disabled event
9338
- */
9339
- disabledRadioHandler(e: CustomEvent): void;
9340
- /**
9341
- * Reports the validity of the element.
9342
- *
9343
- * @public
9343
+ * @override
9344
9344
  * @remarks
9345
- * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/reportValidity | `HTMLInputElement.reportValidity()`} method.
9345
+ * To make a group of radio controls required, see {@link RadioGroup.required}.
9346
9346
  */
9347
- reportValidity(): boolean;
9347
+ protected requiredChanged(): void;
9348
9348
  /**
9349
- * Resets the `tabIndex` for all child radios when the radio group loses focus.
9349
+ * This method is a no-op for the radio component.
9350
9350
  *
9351
9351
  * @internal
9352
+ * @override
9353
+ * @remarks
9354
+ * The radio form value is controlled by the `RadioGroup` component.
9352
9355
  */
9353
- private restrictFocus;
9356
+ setFormValue(): void;
9354
9357
  /**
9355
- * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/setFormValue | `ElementInternals.setFormValue()`} method.
9358
+ * Sets the validity of the control.
9356
9359
  *
9357
9360
  * @internal
9361
+ * @override
9362
+ * @remarks
9363
+ * The radio component does not have a `required` attribute, so this method always sets the validity to `true`.
9358
9364
  */
9359
- setFormValue(value: File | string | FormData | null, state?: File | string | FormData | null): void;
9365
+ setValidity(): void;
9360
9366
  /**
9361
- * Sets the validity of the element.
9362
- *
9363
- * @param flags - Validity flags to set.
9364
- * @param message - Optional message to supply. If not provided, the element's `validationMessage` will be used.
9365
- * @param anchor - Optional anchor to use for the validation message.
9367
+ * Toggles the checked state of the control.
9366
9368
  *
9367
- * @internal
9369
+ * @param force - Forces the element to be checked or unchecked
9370
+ * @public
9371
+ * @override
9368
9372
  * @remarks
9369
- * RadioGroup validation is reported through the individual Radio elements rather than the RadioGroup itself.
9370
- * This is necessary because:
9371
- * 1. Each Radio is form-associated (extends BaseCheckbox which has `formAssociated = true`)
9372
- * 2. Browser validation UIs and screen readers announce validation against individual form controls
9373
- * 3. For groups like RadioGroup, the browser needs to report the error on a specific member of the group
9374
- * 4. We anchor the error to the first Radio so it receives focus and announcement
9375
- *
9376
- * When the group is invalid (required but no selection):
9377
- * - Only the first Radio gets the invalid state with the validation message
9378
- * - Other Radios are kept valid since selecting any of them would satisfy the requirement
9379
- *
9380
- * When the group becomes valid (user selects any Radio):
9381
- * - All Radios are cleared back to valid state
9382
- * - This allows form submission to proceed
9373
+ * The radio checked state is controlled by the `RadioGroup` component, so the `force` parameter defaults to `true`.
9383
9374
  */
9384
- setValidity(flags?: Partial<ValidityState>, message?: string, anchor?: HTMLElement): void;
9375
+ toggleChecked(force?: boolean): void;
9376
+ }
9377
+
9378
+ /**
9379
+ * @public
9380
+ */
9381
+ export declare type RadioControl = Pick<HTMLInputElement, 'checked' | 'disabled' | 'focus' | 'setAttribute' | 'getAttribute'>;
9382
+
9383
+ /**
9384
+ * The Fluent Radio Element.
9385
+ *
9386
+ *
9387
+ * @public
9388
+ * @remarks
9389
+ * HTML Element: \<fluent-radio\>
9390
+ */
9391
+ export declare const RadioDefinition: FASTElementDefinition<typeof Radio>;
9392
+
9393
+ /**
9394
+ * A Radio Group Custom HTML Element.
9395
+ * Implements the {@link https://w3c.github.io/aria/#radiogroup | ARIA `radiogroup` role}.
9396
+ *
9397
+ * @tag fluent-radio-group
9398
+ *
9399
+ * @slot - The default slot for the radio group
9400
+ *
9401
+ * @public
9402
+ */
9403
+ export declare class RadioGroup extends BaseRadioGroup {
9385
9404
  }
9386
9405
 
9387
9406
  /**