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