@fluentui/web-components 3.0.0-beta.7 → 3.0.0-beta.9
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 +21 -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/theme/design-tokens.d.ts +53 -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/benchmark-dependencies/tokens.d.ts +1 -0
- package/dist/dts/utils/benchmark-wrapper.d.ts +2 -0
- 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/theme/design-tokens.js +53 -1
- package/dist/esm/theme/design-tokens.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/benchmark-dependencies/tokens.js +2 -0
- package/dist/esm/utils/benchmark-dependencies/tokens.js.map +1 -0
- package/dist/esm/utils/benchmark-wrapper.js +18 -0
- package/dist/esm/utils/benchmark-wrapper.js.map +1 -0
- 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/284.0946b1fb.iframe.bundle.js +2 -0
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/main.59da076f.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 +2069 -3196
- package/dist/web-components.min.js +123 -123
- package/docs/api-report.md +600 -90
- package/package.json +5 -2
- package/tensile.config.js +24 -0
- 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 → 284.0946b1fb.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/dist/storybook/{main.b095c2e8.iframe.bundle.js.LICENSE.txt → main.59da076f.iframe.bundle.js.LICENSE.txt} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { ValuesOf } from '
|
|
1
|
+
import { StartEndOptions } from '../patterns/index.js';
|
|
2
|
+
import type { ValuesOf } from '../utils/index.js';
|
|
3
|
+
import type { Button } from './button.js';
|
|
3
4
|
/**
|
|
4
5
|
* ButtonAppearance constants
|
|
5
6
|
* @public
|
|
@@ -44,4 +45,24 @@ export declare const ButtonSize: {
|
|
|
44
45
|
* @public
|
|
45
46
|
*/
|
|
46
47
|
export declare type ButtonSize = ValuesOf<typeof ButtonSize>;
|
|
47
|
-
|
|
48
|
+
/**
|
|
49
|
+
* Button type values.
|
|
50
|
+
*
|
|
51
|
+
* @public
|
|
52
|
+
*/
|
|
53
|
+
export declare const ButtonType: {
|
|
54
|
+
readonly submit: "submit";
|
|
55
|
+
readonly reset: "reset";
|
|
56
|
+
readonly button: "button";
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Type for button type values.
|
|
60
|
+
*
|
|
61
|
+
* @public
|
|
62
|
+
*/
|
|
63
|
+
export declare type ButtonType = ValuesOf<typeof ButtonType>;
|
|
64
|
+
/**
|
|
65
|
+
* Button configuration options
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
68
|
+
export declare type ButtonOptions = StartEndOptions<Button>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ElementViewTemplate } from '@microsoft/fast-element';
|
|
2
2
|
import type { Button } from './button.js';
|
|
3
|
+
import { ButtonOptions } from './button.options.js';
|
|
3
4
|
/**
|
|
4
5
|
* The template for the Button component.
|
|
5
6
|
* @public
|
|
6
7
|
*/
|
|
8
|
+
export declare function buttonTemplate<T extends Button>(options?: ButtonOptions): ElementViewTemplate<T>;
|
|
7
9
|
export declare const template: ElementViewTemplate<Button>;
|
|
@@ -1,10 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { StaticallyComposableHTML } from '../utils/template-helpers.js';
|
|
2
|
+
import { FormAssociatedCheckbox } from './checkbox.form-associated.js';
|
|
2
3
|
import { CheckboxLabelPosition, CheckboxShape, CheckboxSize } from './checkbox.options.js';
|
|
3
4
|
/**
|
|
4
|
-
*
|
|
5
|
+
* Checkbox configuration options
|
|
5
6
|
* @public
|
|
6
7
|
*/
|
|
7
|
-
export declare
|
|
8
|
+
export declare type CheckboxOptions = {
|
|
9
|
+
checkedIndicator?: StaticallyComposableHTML<Checkbox>;
|
|
10
|
+
indeterminateIndicator?: StaticallyComposableHTML<Checkbox>;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* A Checkbox Custom HTML Element.
|
|
14
|
+
* Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#checkbox | ARIA checkbox }.
|
|
15
|
+
*
|
|
16
|
+
* @slot checked-indicator - The checked indicator
|
|
17
|
+
* @slot indeterminate-indicator - The indeterminate indicator
|
|
18
|
+
* @slot - The default slot for the label
|
|
19
|
+
* @csspart control - The element representing the visual checkbox control
|
|
20
|
+
* @csspart label - The label
|
|
21
|
+
* @fires change - Emits a custom change event when the checked state changes
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
export declare class Checkbox extends FormAssociatedCheckbox {
|
|
8
26
|
/**
|
|
9
27
|
* Sets shape of the checkbox.
|
|
10
28
|
*
|
|
@@ -32,4 +50,29 @@ export declare class Checkbox extends FASTCheckbox {
|
|
|
32
50
|
* HTML Attribute: label-position
|
|
33
51
|
*/
|
|
34
52
|
labelPosition?: CheckboxLabelPosition;
|
|
53
|
+
/**
|
|
54
|
+
* The element's value to be included in form submission when checked.
|
|
55
|
+
* Default to "on" to reach parity with input[type="checkbox"]
|
|
56
|
+
*
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
initialValue: string;
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
defaultSlottedNodes: Node[];
|
|
64
|
+
/**
|
|
65
|
+
* The indeterminate state of the control
|
|
66
|
+
*/
|
|
67
|
+
indeterminate: boolean;
|
|
68
|
+
constructor();
|
|
69
|
+
private toggleChecked;
|
|
70
|
+
/**
|
|
71
|
+
* @internal
|
|
72
|
+
*/
|
|
73
|
+
keypressHandler: (e: KeyboardEvent) => void;
|
|
74
|
+
/**
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
clickHandler: (e: MouseEvent) => void;
|
|
35
78
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FASTElement } from '@microsoft/fast-element';
|
|
2
|
+
import { CheckableFormAssociated } from '../form-associated/form-associated.js';
|
|
3
|
+
declare class _Checkbox extends FASTElement {
|
|
4
|
+
}
|
|
5
|
+
interface _Checkbox extends CheckableFormAssociated {
|
|
6
|
+
}
|
|
7
|
+
declare const FormAssociatedCheckbox_base: typeof _Checkbox;
|
|
8
|
+
/**
|
|
9
|
+
* @beta
|
|
10
|
+
*/
|
|
11
|
+
export declare class FormAssociatedCheckbox extends FormAssociatedCheckbox_base {
|
|
12
|
+
proxy: HTMLInputElement;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { ElementViewTemplate } from '@microsoft/fast-element';
|
|
2
|
-
import type { Checkbox } from './checkbox.js';
|
|
2
|
+
import type { Checkbox, CheckboxOptions } from './checkbox.js';
|
|
3
|
+
/**
|
|
4
|
+
* Template for the Checkbox component
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare function checkboxTemplate<T extends Checkbox>(options?: CheckboxOptions): ElementViewTemplate<T>;
|
|
3
8
|
/**
|
|
4
9
|
* Template for the Checkbox component
|
|
5
10
|
* @public
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { CompoundButton } from './compound-button.js';
|
|
2
2
|
/**
|
|
3
|
-
* The Fluent Compound Button Element. Implements {@link @microsoft/fast-foundation#Button },
|
|
4
|
-
* {@link @microsoft/fast-foundation#buttonTemplate}
|
|
5
|
-
*
|
|
6
3
|
* @public
|
|
7
4
|
* @remarks
|
|
8
5
|
* HTML Element: \<fluent-comopund-button\>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ButtonOptions } from '
|
|
2
|
-
import type { ValuesOf } from '
|
|
1
|
+
import type { ButtonOptions } from '../button/button.options.js';
|
|
2
|
+
import type { ValuesOf } from '../utils/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* Compound Button Appearance constants
|
|
5
5
|
* @public
|
|
@@ -9,6 +9,10 @@ export declare const CompoundButtonAppearance: {
|
|
|
9
9
|
readonly outline: "outline";
|
|
10
10
|
readonly subtle: "subtle";
|
|
11
11
|
readonly secondary: "secondary";
|
|
12
|
+
/**
|
|
13
|
+
* A Compound Button can be secondary, primary, outline, subtle, transparent
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
12
16
|
readonly transparent: "transparent";
|
|
13
17
|
};
|
|
14
18
|
/**
|
|
@@ -36,10 +40,6 @@ export declare type CompoundButtonShape = ValuesOf<typeof CompoundButtonShape>;
|
|
|
36
40
|
*/
|
|
37
41
|
export declare const CompoundButtonSize: {
|
|
38
42
|
readonly small: "small";
|
|
39
|
-
/**
|
|
40
|
-
* A Compound Button can be on of several preset sizes.
|
|
41
|
-
* @public
|
|
42
|
-
*/
|
|
43
43
|
readonly medium: "medium";
|
|
44
44
|
readonly large: "large";
|
|
45
45
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FASTElement } from '@microsoft/fast-element';
|
|
2
|
-
import { StartEnd } from '
|
|
2
|
+
import { StartEnd } from '../patterns/index.js';
|
|
3
3
|
import { CounterBadgeAppearance, CounterBadgeColor, CounterBadgeShape, CounterBadgeSize } from './counter-badge.options.js';
|
|
4
4
|
/**
|
|
5
5
|
* The base class used for constructing a fluent-badge custom element
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { CounterBadge } from './counter-badge.js';
|
|
2
2
|
/**
|
|
3
|
-
* The Fluent CounterBadge Element. Implements {@link @microsoft/fast-foundation#Badge },
|
|
4
|
-
* {@link @microsoft/fast-foundation#badgeTemplate}
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
3
|
* @public
|
|
8
4
|
* @remarks
|
|
9
5
|
* HTML Element: \<fluent-counter-badge\>
|
|
@@ -1,12 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DividerAlignContent, DividerAppearance } from './divider.options.js';
|
|
1
|
+
import { FASTElement } from '@microsoft/fast-element';
|
|
2
|
+
import { DividerAlignContent, DividerAppearance, DividerOrientation, DividerRole } from './divider.options.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class Divider component
|
|
5
5
|
*
|
|
6
6
|
* @remarks
|
|
7
|
-
*
|
|
7
|
+
* A divider groups sections of content to create visual rhythm and hierarchy. Use dividers along with spacing and headers to organize content in your layout.
|
|
8
8
|
*/
|
|
9
|
-
export declare class Divider extends
|
|
9
|
+
export declare class Divider extends FASTElement {
|
|
10
|
+
/**
|
|
11
|
+
* The role of the element.
|
|
12
|
+
*
|
|
13
|
+
* @public
|
|
14
|
+
* @remarks
|
|
15
|
+
* HTML Attribute: role
|
|
16
|
+
*/
|
|
17
|
+
role: DividerRole;
|
|
18
|
+
/**
|
|
19
|
+
* The orientation of the divider.
|
|
20
|
+
*
|
|
21
|
+
* @public
|
|
22
|
+
* @remarks
|
|
23
|
+
* HTML Attribute: orientation
|
|
24
|
+
*/
|
|
25
|
+
orientation: DividerOrientation;
|
|
10
26
|
/**
|
|
11
27
|
* @property alignContent
|
|
12
28
|
* @default center
|
|
@@ -1,15 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { ValuesOf } from '@microsoft/fast-foundation/utilities.js';
|
|
1
|
+
import type { ValuesOf } from '../utils/index.js';
|
|
3
2
|
/**
|
|
4
|
-
*
|
|
3
|
+
* Divider roles
|
|
5
4
|
* @public
|
|
6
5
|
*/
|
|
7
|
-
export
|
|
6
|
+
export declare const DividerRole: {
|
|
7
|
+
/**
|
|
8
|
+
* The divider semantically separates content
|
|
9
|
+
*/
|
|
10
|
+
readonly separator: "separator";
|
|
11
|
+
/**
|
|
12
|
+
* The divider has no semantic value and is for visual presentation only.
|
|
13
|
+
*/
|
|
14
|
+
readonly presentation: "presentation";
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The types for Divider roles
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export declare type DividerRole = ValuesOf<typeof DividerRole>;
|
|
21
|
+
/**
|
|
22
|
+
* Divider orientation
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
export declare const DividerOrientation: {
|
|
26
|
+
readonly horizontal: "horizontal"; /**
|
|
27
|
+
* Divider roles
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
readonly vertical: "vertical";
|
|
31
|
+
};
|
|
8
32
|
/**
|
|
9
|
-
*
|
|
33
|
+
* The types for Divider orientation
|
|
10
34
|
* @public
|
|
11
35
|
*/
|
|
12
|
-
export
|
|
36
|
+
export declare type DividerOrientation = ValuesOf<typeof DividerOrientation>;
|
|
13
37
|
/**
|
|
14
38
|
* Align content within divider
|
|
15
39
|
* @public
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import type { Constructable, FASTElement } from '@microsoft/fast-element';
|
|
2
|
+
/**
|
|
3
|
+
* This file enables typing support for ElementInternals APIs.
|
|
4
|
+
* It is largely taken from https://github.com/microsoft/TSJS-lib-generator/pull/818/files.
|
|
5
|
+
*
|
|
6
|
+
* When TypeScript adds support for these APIs we can delete this file.
|
|
7
|
+
*/
|
|
8
|
+
interface ValidityStateFlags {
|
|
9
|
+
badInput?: boolean;
|
|
10
|
+
customError?: boolean;
|
|
11
|
+
patternMismatch?: boolean;
|
|
12
|
+
rangeOverflow?: boolean;
|
|
13
|
+
rangeUnderflow?: boolean;
|
|
14
|
+
stepMismatch?: boolean;
|
|
15
|
+
tooLong?: boolean;
|
|
16
|
+
tooShort?: boolean;
|
|
17
|
+
typeMismatch?: boolean;
|
|
18
|
+
valueMissing?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Source:
|
|
22
|
+
* https://html.spec.whatwg.org/multipage/custom-elements.html#elementinternals
|
|
23
|
+
*/
|
|
24
|
+
interface ElementInternals {
|
|
25
|
+
/**
|
|
26
|
+
* Returns the form owner of internals target element.
|
|
27
|
+
*/
|
|
28
|
+
readonly form: HTMLFormElement | null;
|
|
29
|
+
/**
|
|
30
|
+
* Returns a NodeList of all the label elements that internals target element is associated with.
|
|
31
|
+
*/
|
|
32
|
+
readonly labels: NodeList;
|
|
33
|
+
/**
|
|
34
|
+
* Returns the error message that would be shown to the user if internals target element was to be checked for validity.
|
|
35
|
+
*/
|
|
36
|
+
readonly validationMessage: string;
|
|
37
|
+
/**
|
|
38
|
+
* Returns the ValidityState object for internals target element.
|
|
39
|
+
*/
|
|
40
|
+
readonly validity: ValidityState;
|
|
41
|
+
/**
|
|
42
|
+
* Returns true if internals target element will be validated when the form is submitted; false otherwise.
|
|
43
|
+
*/
|
|
44
|
+
readonly willValidate: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Returns true if internals target element has no validity problems; false otherwise. Fires an invalid event at the element in the latter case.
|
|
47
|
+
*/
|
|
48
|
+
checkValidity(): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Returns true if internals target element has no validity problems; otherwise,
|
|
51
|
+
* returns false, fires an invalid event at the element, and (if the event isn't canceled) reports the problem to the user.
|
|
52
|
+
*/
|
|
53
|
+
reportValidity(): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Sets both the state and submission value of internals target element to value.
|
|
56
|
+
*
|
|
57
|
+
* While "null" isn't enumerated as a argument type (here)[https://html.spec.whatwg.org/multipage/custom-elements.html#the-elementinternals-interface],
|
|
58
|
+
* In practice it appears to remove the value from the form data on submission. Adding it as a valid type here
|
|
59
|
+
* becuase that capability is required for checkbox and radio types
|
|
60
|
+
*/
|
|
61
|
+
setFormValue(value: File | string | FormData | null, state?: File | string | FormData | null): void;
|
|
62
|
+
/**
|
|
63
|
+
* Marks internals target element as suffering from the constraints indicated by the flags argument,
|
|
64
|
+
* and sets the element's validation message to message.
|
|
65
|
+
* If anchor is specified, the user agent might use
|
|
66
|
+
* it to indicate problems with the constraints of internals target
|
|
67
|
+
* element when the form owner is validated interactively or reportValidity() is called.
|
|
68
|
+
*/
|
|
69
|
+
setValidity(flags: ValidityStateFlags, message?: string, anchor?: HTMLElement): void;
|
|
70
|
+
}
|
|
71
|
+
declare let ElementInternals: {
|
|
72
|
+
prototype: ElementInternals;
|
|
73
|
+
new (): ElementInternals;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* @alpha
|
|
77
|
+
*/
|
|
78
|
+
export declare const supportsElementInternals: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Base class for providing Custom Element Form Association.
|
|
81
|
+
*
|
|
82
|
+
* @beta
|
|
83
|
+
*/
|
|
84
|
+
export interface FormAssociated extends Omit<ElementInternals, 'labels'> {
|
|
85
|
+
dirtyValue: boolean;
|
|
86
|
+
disabled: boolean;
|
|
87
|
+
readonly elementInternals: ElementInternals | null;
|
|
88
|
+
readonly formAssociated: boolean;
|
|
89
|
+
initialValue: string;
|
|
90
|
+
readonly labels: ReadonlyArray<Node[]>;
|
|
91
|
+
name: string;
|
|
92
|
+
required: boolean;
|
|
93
|
+
value: string;
|
|
94
|
+
currentValue: string;
|
|
95
|
+
attachProxy(): void;
|
|
96
|
+
detachProxy(): void;
|
|
97
|
+
disabledChanged?(previous: boolean, next: boolean): void;
|
|
98
|
+
formDisabledCallback?(disabled: boolean): void;
|
|
99
|
+
formResetCallback(): void;
|
|
100
|
+
initialValueChanged?(previous: string, next: string): void;
|
|
101
|
+
nameChanged?(previous: string, next: string): void;
|
|
102
|
+
requiredChanged(prev: boolean, next: boolean): void;
|
|
103
|
+
stopPropagation(e: Event): void;
|
|
104
|
+
/**
|
|
105
|
+
* Sets the validity of the custom element. By default this uses the proxy element to determine
|
|
106
|
+
* validity, but this can be extended or replaced in implementation.
|
|
107
|
+
*
|
|
108
|
+
* @param anchor - The anchor element to provide to ElementInternals.setValidity for surfacing the browser's constraint validation UI
|
|
109
|
+
*/
|
|
110
|
+
validate(anchor?: HTMLElement): void;
|
|
111
|
+
valueChanged(previous: string, next: string): void;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Base class for providing Custom Element Form Association with checkable features.
|
|
115
|
+
*
|
|
116
|
+
* @beta
|
|
117
|
+
*/
|
|
118
|
+
export interface CheckableFormAssociated extends FormAssociated {
|
|
119
|
+
currentChecked: boolean;
|
|
120
|
+
dirtyChecked: boolean;
|
|
121
|
+
checkedAttribute: boolean;
|
|
122
|
+
defaultChecked: boolean;
|
|
123
|
+
defaultCheckedChanged(oldValue: boolean | undefined, newValue: boolean): void;
|
|
124
|
+
checked: boolean;
|
|
125
|
+
checkedChanged(oldValue: boolean | undefined, newValue: boolean): void;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Avaiable types for the `proxy` property.
|
|
129
|
+
* @beta
|
|
130
|
+
*/
|
|
131
|
+
export declare type ProxyElement = HTMLSelectElement | HTMLTextAreaElement | HTMLInputElement;
|
|
132
|
+
/**
|
|
133
|
+
* Identifies a class as having a proxy element and optional submethods related
|
|
134
|
+
* to the proxy element.
|
|
135
|
+
*
|
|
136
|
+
* @beta
|
|
137
|
+
*/
|
|
138
|
+
export interface FormAssociatedProxy {
|
|
139
|
+
proxy: ProxyElement;
|
|
140
|
+
disabledChanged?(previous: boolean, next: boolean): void;
|
|
141
|
+
formDisabledCallback?(disabled: boolean): void;
|
|
142
|
+
formResetCallback?(): void;
|
|
143
|
+
initialValueChanged?(previous: string, next: string): void;
|
|
144
|
+
valueChanged?(previous: string, next: string): void;
|
|
145
|
+
nameChanged?(previous: string, next: string): void;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Combined type to describe a Form-associated element.
|
|
149
|
+
*
|
|
150
|
+
* @beta
|
|
151
|
+
*/
|
|
152
|
+
export declare type FormAssociatedElement = FormAssociated & FASTElement & HTMLElement & FormAssociatedProxy;
|
|
153
|
+
/**
|
|
154
|
+
* Combined type to describe a checkable Form-associated element.
|
|
155
|
+
*
|
|
156
|
+
* @beta
|
|
157
|
+
*/
|
|
158
|
+
export declare type CheckableFormAssociatedElement = FormAssociatedElement & CheckableFormAssociated & {
|
|
159
|
+
proxy: HTMLInputElement;
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* Combined type to describe a Constructable Form-Associated type.
|
|
163
|
+
*
|
|
164
|
+
* @beta
|
|
165
|
+
*/
|
|
166
|
+
export declare type ConstructableFormAssociated = Constructable<HTMLElement & FASTElement>;
|
|
167
|
+
/**
|
|
168
|
+
* Base function for providing Custom Element Form Association.
|
|
169
|
+
*
|
|
170
|
+
* @beta
|
|
171
|
+
*/
|
|
172
|
+
export declare function FormAssociated<T extends ConstructableFormAssociated>(BaseCtor: T): T;
|
|
173
|
+
/**
|
|
174
|
+
* Creates a checkable form associated component.
|
|
175
|
+
* @beta
|
|
176
|
+
*/
|
|
177
|
+
export declare function CheckableFormAssociated<T extends ConstructableFormAssociated>(BaseCtor: T): T;
|
|
178
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ButtonOptions } from '
|
|
2
|
-
import type { ValuesOf } from '
|
|
1
|
+
import type { ButtonOptions } from '../button/index.js';
|
|
2
|
+
import type { ValuesOf } from '../utils/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* Menu Button Appearance constants
|
|
5
5
|
* @public
|