@fluentui/web-components 3.0.0-beta.7 → 3.0.0-beta.8
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 +11 -2
- package/dist/dts/accordion/accordion.d.ts +47 -3
- package/dist/dts/accordion/accordion.definition.d.ts +0 -4
- package/dist/dts/accordion/accordion.options.d.ts +14 -0
- package/dist/dts/accordion/accordion.template.d.ts +4 -0
- package/dist/dts/accordion-item/accordion-item.d.ts +78 -3
- package/dist/dts/accordion-item/accordion-item.definition.d.ts +0 -3
- package/dist/dts/accordion-item/accordion-item.options.d.ts +1 -1
- package/dist/dts/accordion-item/accordion-item.template.d.ts +2 -1
- package/dist/dts/anchor-button/anchor-button.d.ts +116 -4
- package/dist/dts/anchor-button/anchor-button.definition.d.ts +0 -3
- package/dist/dts/anchor-button/anchor-button.options.d.ts +19 -2
- package/dist/dts/anchor-button/anchor-button.template.d.ts +7 -2
- package/dist/dts/avatar/avatar.options.d.ts +1 -1
- package/dist/dts/badge/badge.d.ts +1 -1
- package/dist/dts/badge/badge.definition.d.ts +0 -3
- package/dist/dts/badge/badge.options.d.ts +2 -2
- package/dist/dts/button/button.d.ts +142 -4
- package/dist/dts/button/button.definition.d.ts +0 -3
- package/dist/dts/button/button.form-associated.d.ts +14 -0
- package/dist/dts/button/button.options.d.ts +24 -3
- package/dist/dts/button/button.template.d.ts +2 -0
- package/dist/dts/checkbox/checkbox.d.ts +46 -3
- package/dist/dts/checkbox/checkbox.form-associated.d.ts +14 -0
- package/dist/dts/checkbox/checkbox.options.d.ts +1 -1
- package/dist/dts/checkbox/checkbox.template.d.ts +6 -1
- package/dist/dts/compound-button/compound-button.definition.d.ts +0 -3
- package/dist/dts/compound-button/compound-button.options.d.ts +6 -6
- package/dist/dts/counter-badge/counter-badge.d.ts +1 -1
- package/dist/dts/counter-badge/counter-badge.definition.d.ts +0 -4
- package/dist/dts/counter-badge/counter-badge.options.d.ts +1 -1
- package/dist/dts/dialog/dialog.options.d.ts +1 -1
- package/dist/dts/divider/divider.d.ts +20 -4
- package/dist/dts/divider/divider.options.d.ts +30 -6
- package/dist/dts/divider/divider.template.d.ts +1 -0
- package/dist/dts/form-associated/form-associated.d.ts +178 -0
- package/dist/dts/image/image.options.d.ts +1 -1
- package/dist/dts/label/label.options.d.ts +1 -1
- package/dist/dts/menu-button/menu-button.definition.d.ts +0 -3
- package/dist/dts/menu-button/menu-button.options.d.ts +2 -2
- package/dist/dts/menu-item/menu-item.d.ts +161 -4
- package/dist/dts/menu-item/menu-item.definition.d.ts +0 -4
- package/dist/dts/menu-item/menu-item.options.d.ts +30 -0
- package/dist/dts/menu-item/menu-item.template.d.ts +2 -1
- package/dist/dts/menu-list/menu-list.d.ts +71 -4
- package/dist/dts/menu-list/menu-list.definition.d.ts +0 -4
- package/dist/dts/menu-list/menu-list.template.d.ts +1 -0
- package/dist/dts/patterns/aria-globals.d.ts +189 -0
- package/dist/dts/patterns/index.d.ts +2 -0
- package/dist/dts/patterns/start-end.d.ts +44 -0
- package/dist/dts/progress-bar/base-progress.d.ts +41 -0
- package/dist/dts/progress-bar/progress-bar.d.ts +11 -4
- package/dist/dts/progress-bar/progress-bar.options.d.ts +10 -1
- package/dist/dts/progress-bar/progress-bar.template.d.ts +2 -0
- package/dist/dts/progress-ring/progress-ring.d.ts +15 -0
- package/dist/dts/progress-ring/progress-ring.options.d.ts +9 -0
- package/dist/dts/radio/radio.d.ts +54 -3
- package/dist/dts/radio/radio.form-associated.d.ts +14 -0
- package/dist/dts/radio/radio.template.d.ts +2 -1
- package/dist/dts/radio-group/index.d.ts +0 -1
- package/dist/dts/radio-group/radio-group.d.ts +91 -2
- package/dist/dts/radio-group/radio-group.options.d.ts +17 -0
- package/dist/dts/radio-group/radio-group.template.d.ts +1 -0
- package/dist/dts/slider/slider-utilities.d.ts +5 -0
- package/dist/dts/slider/slider.d.ts +195 -5
- package/dist/dts/slider/slider.form-associated.d.ts +14 -0
- package/dist/dts/slider/slider.options.d.ts +43 -2
- package/dist/dts/slider/slider.template.d.ts +4 -2
- package/dist/dts/spinner/spinner.d.ts +2 -2
- package/dist/dts/spinner/spinner.definition.d.ts +0 -4
- package/dist/dts/spinner/spinner.options.d.ts +1 -1
- package/dist/dts/spinner/spinner.template.d.ts +2 -0
- package/dist/dts/switch/switch.d.ts +34 -2
- package/dist/dts/switch/switch.form-associated.d.ts +14 -0
- package/dist/dts/switch/switch.options.d.ts +1 -1
- package/dist/dts/switch/switch.template.d.ts +2 -1
- package/dist/dts/tab/tab.d.ts +17 -2
- package/dist/dts/tab/tab.template.d.ts +3 -3
- package/dist/dts/tab-panel/tab-panel.d.ts +2 -2
- package/dist/dts/tab-panel/tab-panel.template.d.ts +4 -1
- package/dist/dts/tabs/tabs.d.ts +89 -4
- package/dist/dts/tabs/tabs.options.d.ts +21 -3
- package/dist/dts/tabs/tabs.template.d.ts +5 -1
- package/dist/dts/text/text.options.d.ts +1 -1
- package/dist/dts/text-input/index.d.ts +0 -1
- package/dist/dts/text-input/text-field.form-associated.d.ts +14 -0
- package/dist/dts/text-input/text-input.d.ts +134 -6
- package/dist/dts/text-input/text-input.options.d.ts +32 -1
- package/dist/dts/text-input/text-input.template.d.ts +2 -1
- package/dist/dts/toggle-button/toggle-button.definition.d.ts +0 -2
- package/dist/dts/toggle-button/toggle-button.options.d.ts +2 -2
- package/dist/dts/utils/direction.d.ts +10 -0
- package/dist/dts/utils/index.d.ts +4 -0
- package/dist/dts/utils/template-helpers.d.ts +16 -0
- package/dist/dts/utils/typings.d.ts +6 -0
- package/dist/dts/utils/whitespace-filter.d.ts +12 -0
- package/dist/esm/accordion/accordion.definition.js +0 -4
- package/dist/esm/accordion/accordion.definition.js.map +1 -1
- package/dist/esm/accordion/accordion.js +216 -3
- package/dist/esm/accordion/accordion.js.map +1 -1
- package/dist/esm/accordion/accordion.options.js +9 -0
- package/dist/esm/accordion/accordion.options.js.map +1 -0
- package/dist/esm/accordion/accordion.template.js +11 -1
- package/dist/esm/accordion/accordion.template.js.map +1 -1
- package/dist/esm/accordion-item/accordion-item.definition.js +0 -3
- package/dist/esm/accordion-item/accordion-item.definition.js.map +1 -1
- package/dist/esm/accordion-item/accordion-item.js +80 -4
- package/dist/esm/accordion-item/accordion-item.js.map +1 -1
- package/dist/esm/accordion-item/accordion-item.template.js +47 -2
- package/dist/esm/accordion-item/accordion-item.template.js.map +1 -1
- package/dist/esm/anchor-button/anchor-button.definition.js +0 -3
- package/dist/esm/anchor-button/anchor-button.definition.js.map +1 -1
- package/dist/esm/anchor-button/anchor-button.js +52 -4
- package/dist/esm/anchor-button/anchor-button.js.map +1 -1
- package/dist/esm/anchor-button/anchor-button.options.js +11 -0
- package/dist/esm/anchor-button/anchor-button.options.js.map +1 -1
- package/dist/esm/anchor-button/anchor-button.template.js +49 -1
- package/dist/esm/anchor-button/anchor-button.template.js.map +1 -1
- package/dist/esm/badge/badge.definition.js +0 -3
- package/dist/esm/badge/badge.definition.js.map +1 -1
- package/dist/esm/badge/badge.js +1 -1
- package/dist/esm/badge/badge.js.map +1 -1
- package/dist/esm/badge/badge.template.js +2 -2
- package/dist/esm/badge/badge.template.js.map +1 -1
- package/dist/esm/button/button.definition.js +0 -3
- package/dist/esm/button/button.definition.js.map +1 -1
- package/dist/esm/button/button.form-associated.js +14 -0
- package/dist/esm/button/button.form-associated.js.map +1 -0
- package/dist/esm/button/button.js +124 -4
- package/dist/esm/button/button.js.map +1 -1
- package/dist/esm/button/button.options.js +10 -0
- package/dist/esm/button/button.options.js.map +1 -1
- package/dist/esm/button/button.template.js +49 -1
- package/dist/esm/button/button.template.js.map +1 -1
- package/dist/esm/checkbox/checkbox.form-associated.js +14 -0
- package/dist/esm/checkbox/checkbox.form-associated.js.map +1 -0
- package/dist/esm/checkbox/checkbox.js +62 -4
- package/dist/esm/checkbox/checkbox.js.map +1 -1
- package/dist/esm/checkbox/checkbox.template.js +35 -7
- package/dist/esm/checkbox/checkbox.template.js.map +1 -1
- package/dist/esm/compound-button/compound-button.definition.js +0 -3
- package/dist/esm/compound-button/compound-button.definition.js.map +1 -1
- package/dist/esm/compound-button/compound-button.options.js.map +1 -1
- package/dist/esm/compound-button/compound-button.template.js +1 -1
- package/dist/esm/compound-button/compound-button.template.js.map +1 -1
- package/dist/esm/counter-badge/counter-badge.definition.js +0 -4
- package/dist/esm/counter-badge/counter-badge.definition.js.map +1 -1
- package/dist/esm/counter-badge/counter-badge.js +1 -1
- package/dist/esm/counter-badge/counter-badge.js.map +1 -1
- package/dist/esm/divider/divider.js +29 -4
- package/dist/esm/divider/divider.js.map +1 -1
- package/dist/esm/divider/divider.options.js +14 -5
- package/dist/esm/divider/divider.options.js.map +1 -1
- package/dist/esm/divider/divider.template.js +12 -1
- package/dist/esm/divider/divider.template.js.map +1 -1
- package/dist/esm/form-associated/form-associated.js +458 -0
- package/dist/esm/form-associated/form-associated.js.map +1 -0
- package/dist/esm/menu-button/menu-button.definition.js +0 -3
- package/dist/esm/menu-button/menu-button.definition.js.map +1 -1
- package/dist/esm/menu-button/menu-button.options.js.map +1 -1
- package/dist/esm/menu-button/menu-button.template.js +1 -1
- package/dist/esm/menu-button/menu-button.template.js.map +1 -1
- package/dist/esm/menu-item/menu-item.definition.js +0 -4
- package/dist/esm/menu-item/menu-item.definition.js.map +1 -1
- package/dist/esm/menu-item/menu-item.js +270 -4
- package/dist/esm/menu-item/menu-item.js.map +1 -1
- package/dist/esm/menu-item/menu-item.options.js +27 -0
- package/dist/esm/menu-item/menu-item.options.js.map +1 -0
- package/dist/esm/menu-item/menu-item.template.js +57 -2
- package/dist/esm/menu-item/menu-item.template.js.map +1 -1
- package/dist/esm/menu-list/menu-list.definition.js +0 -4
- package/dist/esm/menu-list/menu-list.definition.js.map +1 -1
- package/dist/esm/menu-list/menu-list.js +265 -10
- package/dist/esm/menu-list/menu-list.js.map +1 -1
- package/dist/esm/menu-list/menu-list.template.js +13 -1
- package/dist/esm/menu-list/menu-list.template.js.map +1 -1
- package/dist/esm/patterns/aria-globals.js +77 -0
- package/dist/esm/patterns/aria-globals.js.map +1 -0
- package/dist/esm/patterns/index.js +3 -0
- package/dist/esm/patterns/index.js.map +1 -0
- package/dist/esm/patterns/start-end.js +29 -0
- package/dist/esm/patterns/start-end.js.map +1 -0
- package/dist/esm/progress-bar/base-progress.js +61 -0
- package/dist/esm/progress-bar/base-progress.js.map +1 -0
- package/dist/esm/progress-bar/progress-bar.js +10 -3
- package/dist/esm/progress-bar/progress-bar.js.map +1 -1
- package/dist/esm/progress-bar/progress-bar.options.js.map +1 -1
- package/dist/esm/progress-bar/progress-bar.template.js +25 -1
- package/dist/esm/progress-bar/progress-bar.template.js.map +1 -1
- package/dist/esm/progress-ring/progress-ring.js +16 -0
- package/dist/esm/progress-ring/progress-ring.js.map +1 -0
- package/dist/esm/progress-ring/progress-ring.options.js +2 -0
- package/dist/esm/progress-ring/progress-ring.options.js.map +1 -0
- package/dist/esm/radio/radio.form-associated.js +14 -0
- package/dist/esm/radio/radio.form-associated.js.map +1 -0
- package/dist/esm/radio/radio.js +96 -3
- package/dist/esm/radio/radio.js.map +1 -1
- package/dist/esm/radio/radio.template.js +28 -2
- package/dist/esm/radio/radio.template.js.map +1 -1
- package/dist/esm/radio-group/index.js +0 -1
- package/dist/esm/radio-group/index.js.map +1 -1
- package/dist/esm/radio-group/radio-group.js +346 -3
- package/dist/esm/radio-group/radio-group.js.map +1 -1
- package/dist/esm/radio-group/radio-group.options.js +7 -0
- package/dist/esm/radio-group/radio-group.options.js.map +1 -0
- package/dist/esm/radio-group/radio-group.template.js +30 -1
- package/dist/esm/radio-group/radio-group.template.js.map +1 -1
- package/dist/esm/slider/slider-utilities.js +12 -0
- package/dist/esm/slider/slider-utilities.js.map +1 -0
- package/dist/esm/slider/slider.form-associated.js +14 -0
- package/dist/esm/slider/slider.form-associated.js.map +1 -0
- package/dist/esm/slider/slider.js +432 -16
- package/dist/esm/slider/slider.js.map +1 -1
- package/dist/esm/slider/slider.options.js +11 -1
- package/dist/esm/slider/slider.options.js.map +1 -1
- package/dist/esm/slider/slider.template.js +38 -1
- package/dist/esm/slider/slider.template.js.map +1 -1
- package/dist/esm/spinner/spinner.definition.js +0 -4
- package/dist/esm/spinner/spinner.definition.js.map +1 -1
- package/dist/esm/spinner/spinner.js +2 -2
- package/dist/esm/spinner/spinner.js.map +1 -1
- package/dist/esm/spinner/spinner.template.js +27 -1
- package/dist/esm/spinner/spinner.template.js.map +1 -1
- package/dist/esm/switch/switch.form-associated.js +14 -0
- package/dist/esm/switch/switch.form-associated.js.map +1 -0
- package/dist/esm/switch/switch.js +48 -3
- package/dist/esm/switch/switch.js.map +1 -1
- package/dist/esm/switch/switch.template.js +25 -1
- package/dist/esm/switch/switch.template.js.map +1 -1
- package/dist/esm/tab/tab.js +14 -3
- package/dist/esm/tab/tab.js.map +1 -1
- package/dist/esm/tab/tab.template.js +1 -1
- package/dist/esm/tab/tab.template.js.map +1 -1
- package/dist/esm/tab-panel/tab-panel.js +2 -2
- package/dist/esm/tab-panel/tab-panel.js.map +1 -1
- package/dist/esm/tab-panel/tab-panel.template.js +8 -1
- package/dist/esm/tab-panel/tab-panel.template.js.map +1 -1
- package/dist/esm/tabs/tabs.js +278 -5
- package/dist/esm/tabs/tabs.js.map +1 -1
- package/dist/esm/tabs/tabs.options.js +6 -2
- package/dist/esm/tabs/tabs.options.js.map +1 -1
- package/dist/esm/tabs/tabs.template.js +14 -1
- package/dist/esm/tabs/tabs.template.js.map +1 -1
- package/dist/esm/text-input/index.js +0 -1
- package/dist/esm/text-input/index.js.map +1 -1
- package/dist/esm/text-input/text-field.form-associated.js +14 -0
- package/dist/esm/text-input/text-field.form-associated.js.map +1 -0
- package/dist/esm/text-input/text-input.js +167 -7
- package/dist/esm/text-input/text-input.js.map +1 -1
- package/dist/esm/text-input/text-input.options.js +26 -0
- package/dist/esm/text-input/text-input.options.js.map +1 -1
- package/dist/esm/text-input/text-input.template.js +64 -1
- package/dist/esm/text-input/text-input.template.js.map +1 -1
- package/dist/esm/toggle-button/toggle-button.definition.js +0 -2
- package/dist/esm/toggle-button/toggle-button.definition.js.map +1 -1
- package/dist/esm/toggle-button/toggle-button.options.js.map +1 -1
- package/dist/esm/toggle-button/toggle-button.template.js +1 -1
- package/dist/esm/toggle-button/toggle-button.template.js.map +1 -1
- package/dist/esm/utils/direction.js +15 -0
- package/dist/esm/utils/direction.js.map +1 -0
- package/dist/esm/utils/index.js +5 -0
- package/dist/esm/utils/index.js.map +1 -0
- package/dist/esm/utils/template-helpers.js +19 -0
- package/dist/esm/utils/template-helpers.js.map +1 -0
- package/dist/esm/utils/typings.js +3 -0
- package/dist/esm/utils/typings.js.map +1 -0
- package/dist/esm/utils/whitespace-filter.js +13 -0
- package/dist/esm/utils/whitespace-filter.js.map +1 -0
- package/dist/fluent-web-components.api.json +9315 -3940
- package/dist/storybook/711.b5d63aa3.iframe.bundle.js +2 -0
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/main.588112e6.iframe.bundle.js +2 -0
- package/dist/storybook/project.json +1 -1
- package/dist/web-components.d.ts +2194 -241
- package/dist/web-components.js +1964 -3195
- package/dist/web-components.min.js +123 -123
- package/docs/api-report.md +600 -90
- package/package.json +1 -1
- package/dist/storybook/350.e4be85c2.iframe.bundle.js +0 -462
- package/dist/storybook/350.e4be85c2.iframe.bundle.js.map +0 -1
- package/dist/storybook/main.b095c2e8.iframe.bundle.js +0 -2
- /package/dist/storybook/{350.e4be85c2.iframe.bundle.js.LICENSE.txt → 711.b5d63aa3.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/dist/storybook/{main.b095c2e8.iframe.bundle.js.LICENSE.txt → main.588112e6.iframe.bundle.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ValuesOf } from '../utils/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Menu items roles.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare const MenuItemRole: {
|
|
7
|
+
/**
|
|
8
|
+
* The menu item has a "menuitem" role
|
|
9
|
+
*/
|
|
10
|
+
readonly menuitem: "menuitem";
|
|
11
|
+
/**
|
|
12
|
+
* The menu item has a "menuitemcheckbox" role
|
|
13
|
+
*/
|
|
14
|
+
readonly menuitemcheckbox: "menuitemcheckbox";
|
|
15
|
+
/**
|
|
16
|
+
* The menu item has a "menuitemradio" role
|
|
17
|
+
*/
|
|
18
|
+
readonly menuitemradio: "menuitemradio";
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* The types for menu item roles
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export declare type MenuItemRole = ValuesOf<typeof MenuItemRole>;
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
export declare const roleForMenuItem: {
|
|
29
|
+
[value in keyof typeof MenuItemRole]: typeof MenuItemRole[value];
|
|
30
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { ElementViewTemplate } from '@microsoft/fast-element';
|
|
2
|
-
import type { MenuItem } from './menu-item.js';
|
|
2
|
+
import type { MenuItem, MenuItemOptions } from './menu-item.js';
|
|
3
|
+
export declare function menuItemTemplate<T extends MenuItem>(options?: MenuItemOptions): ElementViewTemplate<T>;
|
|
3
4
|
export declare const template: ElementViewTemplate<MenuItem>;
|
|
@@ -1,9 +1,76 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FASTElement } from '@microsoft/fast-element';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* A Menu Custom HTML Element.
|
|
4
|
+
* Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#menu | ARIA menu }.
|
|
5
|
+
*
|
|
6
|
+
* @slot - The default slot for the menu items
|
|
7
|
+
*
|
|
4
8
|
* @public
|
|
5
9
|
*/
|
|
6
|
-
export declare class MenuList extends
|
|
7
|
-
|
|
10
|
+
export declare class MenuList extends FASTElement {
|
|
11
|
+
/**
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
items: HTMLElement[];
|
|
15
|
+
protected itemsChanged(oldValue: HTMLElement[], newValue: HTMLElement[]): void;
|
|
16
|
+
protected menuItems: Element[] | undefined;
|
|
17
|
+
private expandedItem;
|
|
18
|
+
/**
|
|
19
|
+
* The index of the focusable element in the items array
|
|
20
|
+
* defaults to -1
|
|
21
|
+
*/
|
|
22
|
+
private focusIndex;
|
|
23
|
+
private static focusableElementRoles;
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
connectedCallback(): void;
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
disconnectedCallback(): void;
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
readonly isNestedMenu: () => boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Focuses the first item in the menu.
|
|
38
|
+
*
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
|
+
focus(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Collapses any expanded menu items.
|
|
44
|
+
*
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
collapseExpandedItem(): void;
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
handleMenuKeyDown(e: KeyboardEvent): void | boolean;
|
|
52
|
+
/**
|
|
53
|
+
* if focus is moving out of the menu, reset to a stable initial state
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
handleFocusOut: (e: FocusEvent) => void;
|
|
57
|
+
private handleItemFocus;
|
|
58
|
+
private handleExpandedChanged;
|
|
59
|
+
private removeItemListeners;
|
|
8
60
|
private static elementIndent;
|
|
61
|
+
protected setItems(): void;
|
|
62
|
+
handleChange(source: any, propertyName: string): void;
|
|
63
|
+
/**
|
|
64
|
+
* handle change from child element
|
|
65
|
+
*/
|
|
66
|
+
private changeHandler;
|
|
67
|
+
/**
|
|
68
|
+
* check if the item is a menu item
|
|
69
|
+
*/
|
|
70
|
+
protected isMenuItemElement: (el: Element) => el is HTMLElement;
|
|
71
|
+
/**
|
|
72
|
+
* check if the item is focusable
|
|
73
|
+
*/
|
|
74
|
+
private isFocusableElement;
|
|
75
|
+
private setFocus;
|
|
9
76
|
}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Some states and properties are applicable to all host language elements regardless of whether a role is applied.
|
|
3
|
+
* The following global states and properties are supported by all roles and by all base markup elements.
|
|
4
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#global_states}
|
|
5
|
+
*
|
|
6
|
+
* This is intended to be used as a mixin. Be sure you extend FASTElement.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export declare class ARIAGlobalStatesAndProperties {
|
|
11
|
+
/**
|
|
12
|
+
* Indicates whether assistive technologies will present all, or only parts of,
|
|
13
|
+
* the changed region based on the change notifications defined by the aria-relevant attribute.
|
|
14
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#aria-atomic}
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
* @remarks
|
|
18
|
+
* HTML Attribute: aria-atomic
|
|
19
|
+
*/
|
|
20
|
+
ariaAtomic: 'true' | 'false' | string | null;
|
|
21
|
+
/**
|
|
22
|
+
* Indicates an element is being modified and that assistive technologies MAY want to wait
|
|
23
|
+
* until the modifications are complete before exposing them to the user.
|
|
24
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#aria-busy}
|
|
25
|
+
*
|
|
26
|
+
* @public
|
|
27
|
+
* @remarks
|
|
28
|
+
* HTML Attribute: aria-busy
|
|
29
|
+
*/
|
|
30
|
+
ariaBusy: 'true' | 'false' | string | null;
|
|
31
|
+
/**
|
|
32
|
+
* Identifies the element (or elements) whose contents or presence are controlled by the current element.
|
|
33
|
+
*
|
|
34
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#aria-controls}
|
|
35
|
+
* @public
|
|
36
|
+
* @remarks
|
|
37
|
+
* HTML Attribute: aria-controls
|
|
38
|
+
*/
|
|
39
|
+
ariaControls: string | null;
|
|
40
|
+
/**
|
|
41
|
+
* Indicates the element that represents the current item within a container or set of related elements.
|
|
42
|
+
*
|
|
43
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#aria-current}
|
|
44
|
+
* @public
|
|
45
|
+
* @remarks
|
|
46
|
+
* HTML Attribute: aria-current
|
|
47
|
+
*/
|
|
48
|
+
ariaCurrent: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false' | string | null;
|
|
49
|
+
/**
|
|
50
|
+
* Identifies the element (or elements) that describes the object.
|
|
51
|
+
*
|
|
52
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#aria-describedby}
|
|
53
|
+
* @public
|
|
54
|
+
* @remarks
|
|
55
|
+
* HTML Attribute: aria-describedby
|
|
56
|
+
*/
|
|
57
|
+
ariaDescribedby: string | null;
|
|
58
|
+
/**
|
|
59
|
+
* Identifies the element that provides a detailed, extended description for the object.
|
|
60
|
+
*
|
|
61
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#aria-details}
|
|
62
|
+
* @public
|
|
63
|
+
* @remarks
|
|
64
|
+
* HTML Attribute: aria-details
|
|
65
|
+
*/
|
|
66
|
+
ariaDetails: string | null;
|
|
67
|
+
/**
|
|
68
|
+
* Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
|
|
69
|
+
*
|
|
70
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#aria-disabled}
|
|
71
|
+
* @public
|
|
72
|
+
* @remarks
|
|
73
|
+
* HTML Attribute: aria-disabled
|
|
74
|
+
*/
|
|
75
|
+
ariaDisabled: 'true' | 'false' | string | null;
|
|
76
|
+
/**
|
|
77
|
+
* Identifies the element that provides an error message for the object.
|
|
78
|
+
*
|
|
79
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#aria-errormessage}
|
|
80
|
+
* @public
|
|
81
|
+
* @remarks
|
|
82
|
+
* HTML Attribute: aria-errormessage
|
|
83
|
+
*/
|
|
84
|
+
ariaErrormessage: string | null;
|
|
85
|
+
/**
|
|
86
|
+
* Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,
|
|
87
|
+
* allows assistive technology to override the general default of reading in document source order.
|
|
88
|
+
*
|
|
89
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#aria-flowto}
|
|
90
|
+
* @public
|
|
91
|
+
* @remarks
|
|
92
|
+
* HTML Attribute: aria-flowto
|
|
93
|
+
*/
|
|
94
|
+
ariaFlowto: string | null;
|
|
95
|
+
/**
|
|
96
|
+
* Indicates the availability and type of interactive popup element,
|
|
97
|
+
* such as menu or dialog, that can be triggered by an element.
|
|
98
|
+
*
|
|
99
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#aria-haspopup}
|
|
100
|
+
* @public
|
|
101
|
+
* @remarks
|
|
102
|
+
* HTML Attribute: aria-haspopup
|
|
103
|
+
*/
|
|
104
|
+
ariaHaspopup: 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | string | null;
|
|
105
|
+
/**
|
|
106
|
+
* Indicates whether the element is exposed to an accessibility API
|
|
107
|
+
*
|
|
108
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#aria-hidden}
|
|
109
|
+
* @public
|
|
110
|
+
* @remarks
|
|
111
|
+
* HTML Attribute: aria-hidden
|
|
112
|
+
*/
|
|
113
|
+
ariaHidden: 'false' | 'true' | string | null;
|
|
114
|
+
/**
|
|
115
|
+
* Indicates the entered value does not conform to the format expected by the application.
|
|
116
|
+
*
|
|
117
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#aria-invalid}
|
|
118
|
+
* @public
|
|
119
|
+
* @remarks
|
|
120
|
+
* HTML Attribute: aria-invalid
|
|
121
|
+
*/
|
|
122
|
+
ariaInvalid: 'false' | 'true' | 'grammar' | 'spelling' | string | null;
|
|
123
|
+
/**
|
|
124
|
+
* Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.
|
|
125
|
+
*
|
|
126
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#aria-keyshortcuts}
|
|
127
|
+
* @public
|
|
128
|
+
* @remarks
|
|
129
|
+
* HTML Attribute: aria-keyshortcuts
|
|
130
|
+
*/
|
|
131
|
+
ariaKeyshortcuts: string | null;
|
|
132
|
+
/**
|
|
133
|
+
* Defines a string value that labels the current element.
|
|
134
|
+
*
|
|
135
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#aria-label}
|
|
136
|
+
* @public
|
|
137
|
+
* @remarks
|
|
138
|
+
* HTML Attribute: aria-label
|
|
139
|
+
*/
|
|
140
|
+
ariaLabel: string | null;
|
|
141
|
+
/**
|
|
142
|
+
* Identifies the element (or elements) that labels the current element.
|
|
143
|
+
*
|
|
144
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby}
|
|
145
|
+
* @public
|
|
146
|
+
* @remarks
|
|
147
|
+
* HTML Attribute: aria-labelledby
|
|
148
|
+
*/
|
|
149
|
+
ariaLabelledby: string | null;
|
|
150
|
+
/**
|
|
151
|
+
* Indicates that an element will be updated, and describes the types of updates the user agents,
|
|
152
|
+
* assistive technologies, and user can expect from the live region.
|
|
153
|
+
*
|
|
154
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#aria-live}
|
|
155
|
+
* @public
|
|
156
|
+
* @remarks
|
|
157
|
+
* HTML Attribute: aria-live
|
|
158
|
+
*/
|
|
159
|
+
ariaLive: 'assertive' | 'off' | 'polite' | string | null;
|
|
160
|
+
/**
|
|
161
|
+
* Identifies an element (or elements) in order to define a visual,
|
|
162
|
+
* functional, or contextual parent/child relationship between DOM elements
|
|
163
|
+
* where the DOM hierarchy cannot be used to represent the relationship.
|
|
164
|
+
*
|
|
165
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#aria-owns}
|
|
166
|
+
* @public
|
|
167
|
+
* @remarks
|
|
168
|
+
* HTML Attribute: aria-owns
|
|
169
|
+
*/
|
|
170
|
+
ariaOwns: string | null;
|
|
171
|
+
/**
|
|
172
|
+
* Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
|
|
173
|
+
*
|
|
174
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#aria-relevant}
|
|
175
|
+
* @public
|
|
176
|
+
* @remarks
|
|
177
|
+
* HTML Attribute: aria-relevant
|
|
178
|
+
*/
|
|
179
|
+
ariaRelevant: 'additions' | 'additions text' | 'all' | 'removals' | 'text' | string | null;
|
|
180
|
+
/**
|
|
181
|
+
* Defines a human-readable, author-localized description for the role of an element.
|
|
182
|
+
*
|
|
183
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#aria-roledescription}
|
|
184
|
+
* @public
|
|
185
|
+
* @remarks
|
|
186
|
+
* HTML Attribute: aria-roledescription
|
|
187
|
+
*/
|
|
188
|
+
ariaRoledescription: string | null;
|
|
189
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { CaptureType } from '@microsoft/fast-element';
|
|
2
|
+
import type { StaticallyComposableHTML } from '../utils/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Start configuration options
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare type StartOptions<TSource = any, TParent = any> = {
|
|
8
|
+
start?: StaticallyComposableHTML<TSource, TParent>;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* End configuration options
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export declare type EndOptions<TSource = any, TParent = any> = {
|
|
15
|
+
end?: StaticallyComposableHTML<TSource, TParent>;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Start/End configuration options
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export declare type StartEndOptions<TSource = any, TParent = any> = StartOptions<TSource, TParent> & EndOptions<TSource, TParent>;
|
|
22
|
+
/**
|
|
23
|
+
* A mixin class implementing start and end slots.
|
|
24
|
+
* These are generally used to decorate text elements with icons or other visual indicators.
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
export declare class StartEnd {
|
|
28
|
+
start: HTMLSlotElement;
|
|
29
|
+
end: HTMLSlotElement;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The template for the end slot.
|
|
33
|
+
* For use with {@link StartEnd}
|
|
34
|
+
*
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
export declare function endSlotTemplate<TSource extends StartEnd = StartEnd, TParent = any>(options: EndOptions<TSource, TParent>): CaptureType<TSource, TParent>;
|
|
38
|
+
/**
|
|
39
|
+
* The template for the start slots.
|
|
40
|
+
* For use with {@link StartEnd}
|
|
41
|
+
*
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
export declare function startSlotTemplate<TSource extends StartEnd = StartEnd, TParent = any>(options: StartOptions<TSource, TParent>): CaptureType<TSource, TParent>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { FASTElement } from '@microsoft/fast-element';
|
|
2
|
+
/**
|
|
3
|
+
* A base class for progress components.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare class BaseProgress extends FASTElement {
|
|
7
|
+
/**
|
|
8
|
+
* The value of the progress
|
|
9
|
+
* @public
|
|
10
|
+
* @remarks
|
|
11
|
+
* HTML Attribute: value
|
|
12
|
+
*/
|
|
13
|
+
value: number | null;
|
|
14
|
+
protected valueChanged(): void;
|
|
15
|
+
/**
|
|
16
|
+
* The minimum value
|
|
17
|
+
* @public
|
|
18
|
+
* @remarks
|
|
19
|
+
* HTML Attribute: min
|
|
20
|
+
*/
|
|
21
|
+
min: number;
|
|
22
|
+
protected minChanged(): void;
|
|
23
|
+
/**
|
|
24
|
+
* The maximum value
|
|
25
|
+
* @public
|
|
26
|
+
* @remarks
|
|
27
|
+
* HTML Attribute: max
|
|
28
|
+
*/
|
|
29
|
+
max: number;
|
|
30
|
+
protected maxChanged(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Indicates progress in %
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
percentComplete: number;
|
|
36
|
+
/**
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
connectedCallback(): void;
|
|
40
|
+
private updatePercentComplete;
|
|
41
|
+
}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { BaseProgress } from './base-progress.js';
|
|
2
|
+
import { ProgressBarShape, ProgressBarThickness, ProgressBarValidationState } from './progress-bar.options.js';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* An Progress HTML Element.
|
|
5
|
+
* Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#progressbar | ARIA progressbar }.
|
|
6
|
+
*
|
|
7
|
+
* @slot indeterminate - The slot for a custom indeterminate indicator
|
|
8
|
+
* @csspart progress - Represents the progress element
|
|
9
|
+
* @csspart determinate - The determinate indicator
|
|
10
|
+
* @csspart indeterminate - The indeterminate indicator
|
|
11
|
+
*
|
|
5
12
|
* @public
|
|
6
13
|
*/
|
|
7
|
-
export declare class ProgressBar extends
|
|
14
|
+
export declare class ProgressBar extends BaseProgress {
|
|
8
15
|
/**
|
|
9
16
|
* The thickness of the progress bar
|
|
10
17
|
*
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { ValuesOf } from '
|
|
1
|
+
import type { StaticallyComposableHTML, ValuesOf } from '../utils/index.js';
|
|
2
|
+
import { ProgressBar } from './progress-bar.js';
|
|
2
3
|
/**
|
|
3
4
|
* ProgressBarThickness Constants
|
|
4
5
|
* @public
|
|
@@ -39,3 +40,11 @@ export declare const ProgressBarValidationState: {
|
|
|
39
40
|
* @public
|
|
40
41
|
*/
|
|
41
42
|
export declare type ProgressBarValidationState = ValuesOf<typeof ProgressBarValidationState>;
|
|
43
|
+
/**
|
|
44
|
+
* Progress configuration options
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
export declare type ProgressOptions = {
|
|
48
|
+
indeterminateIndicator1?: StaticallyComposableHTML<ProgressBar>;
|
|
49
|
+
indeterminateIndicator2?: StaticallyComposableHTML<ProgressBar>;
|
|
50
|
+
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import type { ElementViewTemplate } from '@microsoft/fast-element';
|
|
2
|
+
import type { ProgressOptions } from './progress-bar.options.js';
|
|
2
3
|
import type { ProgressBar } from './progress-bar.js';
|
|
4
|
+
export declare function progressTemplate<T extends ProgressBar>(options?: ProgressOptions): ElementViewTemplate<T>;
|
|
3
5
|
export declare const template: ElementViewTemplate<ProgressBar>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseProgress } from '../progress-bar/base-progress.js';
|
|
2
|
+
/**
|
|
3
|
+
* An circular Progress HTML Element.
|
|
4
|
+
* Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#progressbar | ARIA progressbar }.
|
|
5
|
+
*
|
|
6
|
+
* @slot indeterminate - The slot for a custom indeterminate indicator
|
|
7
|
+
* @slot determinate - The slot for a custom determinate indicator
|
|
8
|
+
* @csspart progress - Represents the progress element
|
|
9
|
+
* @csspart determinate - The determinate indicator
|
|
10
|
+
* @csspart background - The background
|
|
11
|
+
*
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export declare class ProgressRing extends BaseProgress {
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { StaticallyComposableHTML } from '../utils/template-helpers.js';
|
|
2
|
+
import type { ProgressRing } from './progress-ring.js';
|
|
3
|
+
/**
|
|
4
|
+
* ProgressRing configuration options
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare type ProgressRingOptions = {
|
|
8
|
+
indeterminateIndicator?: StaticallyComposableHTML<ProgressRing>;
|
|
9
|
+
};
|
|
@@ -1,7 +1,58 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { StaticallyComposableHTML } from '../utils/template-helpers.js';
|
|
2
|
+
import { FormAssociatedRadio } from './radio.form-associated.js';
|
|
2
3
|
/**
|
|
3
|
-
* The base class used for constructing a fluent-radio custom element
|
|
4
4
|
* @public
|
|
5
5
|
*/
|
|
6
|
-
export declare
|
|
6
|
+
export declare type RadioControl = Pick<HTMLInputElement, 'checked' | 'disabled' | 'focus' | 'setAttribute' | 'getAttribute'>;
|
|
7
|
+
/**
|
|
8
|
+
* Radio configuration options
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export declare type RadioOptions = {
|
|
12
|
+
checkedIndicator?: StaticallyComposableHTML<Radio>;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* A Radio Custom HTML Element.
|
|
16
|
+
* Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#radio | ARIA radio }.
|
|
17
|
+
*
|
|
18
|
+
* @slot checked-indicator - The checked indicator
|
|
19
|
+
* @slot - The default slot for the label
|
|
20
|
+
* @csspart control - The element representing the visual radio control
|
|
21
|
+
* @csspart label - The label
|
|
22
|
+
* @fires change - Emits a custom change event when the checked state changes
|
|
23
|
+
*
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export declare class Radio extends FormAssociatedRadio implements RadioControl {
|
|
27
|
+
/**
|
|
28
|
+
* The name of the radio. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname | name attribute} for more info.
|
|
29
|
+
*/
|
|
30
|
+
name: string;
|
|
31
|
+
/**
|
|
32
|
+
* The element's value to be included in form submission when checked.
|
|
33
|
+
* Default to "on" to reach parity with input[type="radio"]
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
initialValue: string;
|
|
38
|
+
/**
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
defaultSlottedNodes: Node[];
|
|
42
|
+
private get radioGroup();
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
defaultCheckedChanged(): void;
|
|
47
|
+
constructor();
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
connectedCallback(): void;
|
|
52
|
+
private isInsideRadioGroup;
|
|
53
|
+
/**
|
|
54
|
+
* Handles key presses on the radio.
|
|
55
|
+
* @beta
|
|
56
|
+
*/
|
|
57
|
+
keypressHandler(e: KeyboardEvent): boolean | void;
|
|
7
58
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FASTElement } from '@microsoft/fast-element';
|
|
2
|
+
import { CheckableFormAssociated } from '../form-associated/form-associated.js';
|
|
3
|
+
declare class _Radio extends FASTElement {
|
|
4
|
+
}
|
|
5
|
+
interface _Radio extends CheckableFormAssociated {
|
|
6
|
+
}
|
|
7
|
+
declare const FormAssociatedRadio_base: typeof _Radio;
|
|
8
|
+
/**
|
|
9
|
+
* @beta
|
|
10
|
+
*/
|
|
11
|
+
export declare class FormAssociatedRadio extends FormAssociatedRadio_base {
|
|
12
|
+
proxy: HTMLInputElement;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { ElementViewTemplate } from '@microsoft/fast-element';
|
|
2
|
-
import type { Radio } from './radio.js';
|
|
2
|
+
import type { Radio, RadioOptions } from './radio.js';
|
|
3
|
+
export declare function radioTemplate<T extends Radio>(options?: RadioOptions): ElementViewTemplate<T>;
|
|
3
4
|
export declare const template: ElementViewTemplate<Radio>;
|
|
@@ -2,4 +2,3 @@ export * from './radio-group.js';
|
|
|
2
2
|
export { definition as RadioGroupDefinition } from './radio-group.definition.js';
|
|
3
3
|
export { styles as RadioGroupStyles } from './radio-group.styles.js';
|
|
4
4
|
export { template as RadioGroupTemplate } from './radio-group.template.js';
|
|
5
|
-
export { RadioGroupOrientation } from '@microsoft/fast-foundation/radio-group.js';
|