@fluentui/web-components 3.0.0-beta.20 → 3.0.0-beta.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/CHANGELOG.md +20 -2
  2. package/dist/dts/accordion/accordion.options.d.ts +2 -2
  3. package/dist/dts/accordion-item/accordion-item.d.ts +1 -4
  4. package/dist/dts/accordion-item/accordion-item.template.d.ts +1 -1
  5. package/dist/dts/accordion-item/index.d.ts +2 -1
  6. package/dist/dts/anchor-button/index.d.ts +3 -2
  7. package/dist/dts/button/index.d.ts +4 -3
  8. package/dist/dts/checkbox/checkbox.d.ts +0 -3
  9. package/dist/dts/checkbox/index.d.ts +4 -3
  10. package/dist/dts/dialog/dialog.d.ts +14 -15
  11. package/dist/dts/divider/divider.d.ts +4 -7
  12. package/dist/dts/index-rollup.d.ts +29 -35
  13. package/dist/dts/index.d.ts +49 -34
  14. package/dist/dts/label/label.d.ts +0 -2
  15. package/dist/dts/menu/menu.d.ts +27 -25
  16. package/dist/dts/menu-button/index.d.ts +4 -3
  17. package/dist/dts/menu-button/menu-button.options.d.ts +1 -1
  18. package/dist/dts/menu-item/index.d.ts +4 -3
  19. package/dist/dts/progress-bar/index.d.ts +3 -2
  20. package/dist/dts/radio/index.d.ts +2 -1
  21. package/dist/dts/slider/index.d.ts +3 -2
  22. package/dist/dts/spinner/spinner.d.ts +0 -2
  23. package/dist/dts/switch/index.d.ts +3 -2
  24. package/dist/dts/switch/switch.d.ts +0 -1
  25. package/dist/dts/tab/index.d.ts +4 -3
  26. package/dist/dts/tab/tab.template.d.ts +1 -1
  27. package/dist/dts/tabs/index.d.ts +4 -3
  28. package/dist/dts/tabs/tabs.d.ts +13 -9
  29. package/dist/dts/text-input/index.d.ts +5 -4
  30. package/dist/dts/text-input/text-input.d.ts +282 -67
  31. package/dist/dts/text-input/text-input.definition.d.ts +2 -3
  32. package/dist/dts/text-input/text-input.options.d.ts +19 -29
  33. package/dist/dts/text-input/text-input.styles.d.ts +5 -2
  34. package/dist/dts/text-input/text-input.template.d.ts +9 -3
  35. package/dist/dts/theme/design-tokens.d.ts +1744 -0
  36. package/dist/dts/theme/set-theme.d.ts +5 -1
  37. package/dist/dts/toggle-button/index.d.ts +4 -3
  38. package/dist/dts/toggle-button/toggle-button.options.d.ts +1 -1
  39. package/dist/esm/accordion/accordion.js +1 -6
  40. package/dist/esm/accordion/accordion.js.map +1 -1
  41. package/dist/esm/accordion/accordion.options.js +1 -1
  42. package/dist/esm/accordion-item/accordion-item.js +1 -7
  43. package/dist/esm/accordion-item/accordion-item.js.map +1 -1
  44. package/dist/esm/accordion-item/index.js.map +1 -1
  45. package/dist/esm/anchor-button/anchor-button.js +1 -6
  46. package/dist/esm/anchor-button/anchor-button.js.map +1 -1
  47. package/dist/esm/anchor-button/index.js +2 -2
  48. package/dist/esm/anchor-button/index.js.map +1 -1
  49. package/dist/esm/avatar/avatar.js +1 -6
  50. package/dist/esm/avatar/avatar.js.map +1 -1
  51. package/dist/esm/badge/badge.js +1 -6
  52. package/dist/esm/badge/badge.js.map +1 -1
  53. package/dist/esm/button/button.js +1 -6
  54. package/dist/esm/button/button.js.map +1 -1
  55. package/dist/esm/button/index.js +3 -3
  56. package/dist/esm/button/index.js.map +1 -1
  57. package/dist/esm/checkbox/checkbox.js +1 -6
  58. package/dist/esm/checkbox/checkbox.js.map +1 -1
  59. package/dist/esm/checkbox/index.js +2 -2
  60. package/dist/esm/checkbox/index.js.map +1 -1
  61. package/dist/esm/counter-badge/counter-badge.js +1 -6
  62. package/dist/esm/counter-badge/counter-badge.js.map +1 -1
  63. package/dist/esm/dialog/dialog.js +15 -21
  64. package/dist/esm/dialog/dialog.js.map +1 -1
  65. package/dist/esm/divider/divider.js +2 -7
  66. package/dist/esm/divider/divider.js.map +1 -1
  67. package/dist/esm/image/image.js +1 -6
  68. package/dist/esm/image/image.js.map +1 -1
  69. package/dist/esm/index-rollup.js +29 -35
  70. package/dist/esm/index-rollup.js.map +1 -1
  71. package/dist/esm/index.js +33 -33
  72. package/dist/esm/index.js.map +1 -1
  73. package/dist/esm/label/label.js +1 -6
  74. package/dist/esm/label/label.js.map +1 -1
  75. package/dist/esm/menu/menu.js +26 -29
  76. package/dist/esm/menu/menu.js.map +1 -1
  77. package/dist/esm/menu-button/index.js +2 -2
  78. package/dist/esm/menu-button/index.js.map +1 -1
  79. package/dist/esm/menu-item/index.js +2 -2
  80. package/dist/esm/menu-item/index.js.map +1 -1
  81. package/dist/esm/menu-item/menu-item.js +1 -6
  82. package/dist/esm/menu-item/menu-item.js.map +1 -1
  83. package/dist/esm/menu-list/menu-list.js +3 -7
  84. package/dist/esm/menu-list/menu-list.js.map +1 -1
  85. package/dist/esm/patterns/aria-globals.js +1 -6
  86. package/dist/esm/patterns/aria-globals.js.map +1 -1
  87. package/dist/esm/progress-bar/base-progress.js +1 -6
  88. package/dist/esm/progress-bar/base-progress.js.map +1 -1
  89. package/dist/esm/progress-bar/index.js +2 -2
  90. package/dist/esm/progress-bar/index.js.map +1 -1
  91. package/dist/esm/progress-bar/progress-bar.js +1 -6
  92. package/dist/esm/progress-bar/progress-bar.js.map +1 -1
  93. package/dist/esm/radio/index.js +1 -1
  94. package/dist/esm/radio/index.js.map +1 -1
  95. package/dist/esm/radio/radio.js +1 -6
  96. package/dist/esm/radio/radio.js.map +1 -1
  97. package/dist/esm/radio-group/radio-group.js +1 -6
  98. package/dist/esm/radio-group/radio-group.js.map +1 -1
  99. package/dist/esm/slider/index.js +1 -1
  100. package/dist/esm/slider/index.js.map +1 -1
  101. package/dist/esm/slider/slider.js +1 -6
  102. package/dist/esm/slider/slider.js.map +1 -1
  103. package/dist/esm/spinner/spinner.js +1 -6
  104. package/dist/esm/spinner/spinner.js.map +1 -1
  105. package/dist/esm/switch/index.js +1 -1
  106. package/dist/esm/switch/index.js.map +1 -1
  107. package/dist/esm/switch/switch.js +1 -6
  108. package/dist/esm/switch/switch.js.map +1 -1
  109. package/dist/esm/tab/index.js +2 -2
  110. package/dist/esm/tab/index.js.map +1 -1
  111. package/dist/esm/tab/tab.js +1 -6
  112. package/dist/esm/tab/tab.js.map +1 -1
  113. package/dist/esm/tabs/index.js +2 -2
  114. package/dist/esm/tabs/index.js.map +1 -1
  115. package/dist/esm/tabs/tabs.js +14 -15
  116. package/dist/esm/tabs/tabs.js.map +1 -1
  117. package/dist/esm/text/text.js +1 -6
  118. package/dist/esm/text/text.js.map +1 -1
  119. package/dist/esm/text-input/index.js +3 -3
  120. package/dist/esm/text-input/index.js.map +1 -1
  121. package/dist/esm/text-input/text-input.definition.js +2 -3
  122. package/dist/esm/text-input/text-input.definition.js.map +1 -1
  123. package/dist/esm/text-input/text-input.js +271 -102
  124. package/dist/esm/text-input/text-input.js.map +1 -1
  125. package/dist/esm/text-input/text-input.options.js +25 -18
  126. package/dist/esm/text-input/text-input.options.js.map +1 -1
  127. package/dist/esm/text-input/text-input.styles.js +8 -3
  128. package/dist/esm/text-input/text-input.styles.js.map +1 -1
  129. package/dist/esm/text-input/text-input.template.js +16 -32
  130. package/dist/esm/text-input/text-input.template.js.map +1 -1
  131. package/dist/esm/theme/design-tokens.js +1744 -0
  132. package/dist/esm/theme/design-tokens.js.map +1 -1
  133. package/dist/esm/theme/set-theme.js +5 -1
  134. package/dist/esm/theme/set-theme.js.map +1 -1
  135. package/dist/esm/toggle-button/index.js +3 -3
  136. package/dist/esm/toggle-button/index.js.map +1 -1
  137. package/dist/esm/toggle-button/toggle-button.js +1 -6
  138. package/dist/esm/toggle-button/toggle-button.js.map +1 -1
  139. package/dist/fluent-web-components.api.json +890 -916
  140. package/dist/web-components.d.ts +2109 -187
  141. package/dist/web-components.js +1335 -2042
  142. package/dist/web-components.min.js +266 -266
  143. package/docs/api-report.md +654 -485
  144. package/package.json +7 -4
  145. package/tsdoc.json +44 -0
  146. package/dist/dts/text-input/text-field.form-associated.d.ts +0 -14
  147. package/dist/esm/text-input/text-field.form-associated.js +0 -14
  148. package/dist/esm/text-input/text-field.form-associated.js.map +0 -1
@@ -1,5 +1,6 @@
1
- export { ProgressBar } from './progress-bar.js';
2
- export { ProgressOptions, ProgressBarShape, ProgressBarThickness, ProgressBarValidationState, } from './progress-bar.options.js';
3
1
  export { definition as ProgressBarDefinition } from './progress-bar.definition.js';
2
+ export { ProgressBar } from './progress-bar.js';
3
+ export { ProgressBarShape, ProgressBarThickness, ProgressBarValidationState } from './progress-bar.options.js';
4
+ export type { ProgressOptions } from './progress-bar.options.js';
4
5
  export { styles as ProgressBarStyles } from './progress-bar.styles.js';
5
6
  export { template as ProgressBarTemplate } from './progress-bar.template.js';
@@ -1,4 +1,5 @@
1
- export { Radio, RadioControl, RadioOptions } from './radio.js';
2
1
  export { definition as RadioDefinition } from './radio.definition.js';
2
+ export { Radio } from './radio.js';
3
+ export type { RadioControl, RadioOptions } from './radio.js';
3
4
  export { styles as RadioStyles } from './radio.styles.js';
4
5
  export { template as RadioTemplate } from './radio.template.js';
@@ -1,5 +1,6 @@
1
- export { Slider } from './slider.js';
2
- export { SliderConfiguration, SliderMode, SliderOptions, SliderOrientation, SliderSize } from './slider.options.js';
3
1
  export { definition as SliderDefinition } from './slider.definition.js';
2
+ export { Slider } from './slider.js';
3
+ export { SliderMode, SliderOrientation, SliderSize } from './slider.options.js';
4
+ export type { SliderConfiguration, SliderOptions } from './slider.options.js';
4
5
  export { styles as SliderStyles } from './slider.styles.js';
5
6
  export { template as SliderTemplate } from './slider.template.js';
@@ -15,7 +15,6 @@ export declare class Spinner extends FASTElement {
15
15
  * The size of the spinner
16
16
  *
17
17
  * @public
18
- * @default 'medium'
19
18
  * @remarks
20
19
  * HTML Attribute: size
21
20
  */
@@ -23,7 +22,6 @@ export declare class Spinner extends FASTElement {
23
22
  /**
24
23
  * The appearance of the spinner
25
24
  * @public
26
- * @default 'primary'
27
25
  * @remarks
28
26
  * HTML Attribute: appearance
29
27
  */
@@ -1,5 +1,6 @@
1
- export { Switch, SwitchOptions } from './switch.js';
2
- export { SwitchLabelPosition } from './switch.options.js';
3
1
  export { definition as SwitchDefinition } from './switch.definition.js';
2
+ export { Switch } from './switch.js';
3
+ export type { SwitchOptions } from './switch.js';
4
+ export { SwitchLabelPosition } from './switch.options.js';
4
5
  export { styles as SwitchStyles } from './switch.styles.js';
5
6
  export { template as SwitchTemplate } from './switch.template.js';
@@ -9,7 +9,6 @@ export declare class Switch extends FormAssociatedSwitch {
9
9
  * The label position of the switch
10
10
  *
11
11
  * @public
12
- * @default 'after'
13
12
  * @remarks
14
13
  * HTML Attribute: labelposition
15
14
  */
@@ -1,4 +1,5 @@
1
- export { Tab, TabOptions } from './tab.js';
2
- export { template as TabTemplate } from './tab.template.js';
3
- export { styles as TabStyles } from './tab.styles.js';
4
1
  export { definition as TabDefinition } from './tab.definition.js';
2
+ export { Tab } from './tab.js';
3
+ export type { TabOptions } from './tab.js';
4
+ export { styles as TabStyles } from './tab.styles.js';
5
+ export { template as TabTemplate } from './tab.template.js';
@@ -1,4 +1,4 @@
1
1
  import { ElementViewTemplate } from '@microsoft/fast-element';
2
- import { Tab, TabOptions } from './tab.js';
2
+ import type { Tab, TabOptions } from './tab.js';
3
3
  export declare function tabTemplate<T extends Tab>(options?: TabOptions): ElementViewTemplate<T>;
4
4
  export declare const template: ElementViewTemplate<Tab, any>;
@@ -1,5 +1,6 @@
1
+ export { definition as TabsDefinition } from './tabs.definition.js';
1
2
  export { Tabs } from './tabs.js';
2
- export { TabsAppearance, TabsOptions, TabsOrientation, TabsSize } from './tabs.options.js';
3
- export { template as TabsTemplate } from './tabs.template.js';
3
+ export { TabsAppearance, TabsOrientation, TabsSize } from './tabs.options.js';
4
+ export type { TabsOptions } from './tabs.options.js';
4
5
  export { styles as TabsStyles } from './tabs.styles.js';
5
- export { definition as TabsDefinition } from './tabs.definition.js';
6
+ export { template as TabsTemplate } from './tabs.template.js';
@@ -2,8 +2,8 @@ import { FASTElement } from '@microsoft/fast-element';
2
2
  import { StartEnd } from '../patterns/index.js';
3
3
  import { TabsAppearance, TabsOrientation, TabsSize } from './tabs.options.js';
4
4
  /**
5
+ * A Tabs component that wraps a collection of tab and tab panel elements.
5
6
  *
6
- * @class TabList component
7
7
  * @public
8
8
  */
9
9
  export declare class BaseTabs extends FASTElement {
@@ -147,21 +147,25 @@ export declare class Tabs extends BaseTabs {
147
147
  */
148
148
  private getTabScale;
149
149
  /**
150
- * applyUpdatedCSSValues
150
+ * Calculates and applies updated values to CSS variables.
151
151
  *
152
- * calculates and applies updated values to CSS variables
153
- * @param tab
152
+ * @param tab - the tab element to apply the updated values to
153
+ * @internal
154
154
  */
155
155
  private applyUpdatedCSSValues;
156
156
  /**
157
- * animationLoop
158
- * runs through all the operations required for setting the tab active indicator to its starting location, ending location, and applying the animated css class to the tab.
159
- * @param tab
157
+ * Runs through all the operations required for setting the tab active indicator to its starting location, ending
158
+ * location, and applying the animated css class to the tab.
159
+ *
160
+ * @param tab - the tab element to apply the updated values to
161
+ * @internal
160
162
  */
161
163
  private animationLoop;
162
164
  /**
163
- * setTabData
164
- * sets the data from the active tab onto the class. used for making all the animation calculations for the active tab indicator.
165
+ * Sets the data from the active tab onto the class. used for making all the animation calculations for the active
166
+ * tab indicator.
167
+ *
168
+ * @internal
165
169
  */
166
170
  private setTabData;
167
171
  private setTabOffsetCSSVar;
@@ -1,5 +1,6 @@
1
- export { TextInputOptions, TextInput } from './text-input.js';
2
- export { TextInputType, TextInputAppearance, TextInputControlSize } from './text-input.options.js';
3
- export { template as TextInputTemplate } from './text-input.template.js';
4
- export { styles as TextInputStyles } from './text-input.styles.js';
5
1
  export { definition as TextInputDefinition } from './text-input.definition.js';
2
+ export { TextInput } from './text-input.js';
3
+ export { TextInputAppearance, TextInputControlSize, TextInputType } from './text-input.options.js';
4
+ export type { TextInputOptions } from './text-input.options.js';
5
+ export { styles as TextInputStyles } from './text-input.styles.js';
6
+ export { template as TextInputTemplate } from './text-input.template.js';
@@ -1,154 +1,369 @@
1
- import { ARIAGlobalStatesAndProperties, StartEnd, StartEndOptions } from '../patterns/index.js';
2
- import { TextInputAppearance, TextInputControlSize } from './text-input.options.js';
3
- import { TextInputType } from './text-input.options.js';
4
- import { FormAssociatedTextField } from './text-field.form-associated.js';
5
- export { TextInputType };
6
- export declare type TextInputOptions = StartEndOptions<TextInput>;
7
- export declare class TextInput extends FormAssociatedTextField {
1
+ /// <reference types="web" />
2
+ import { FASTElement } from '@microsoft/fast-element';
3
+ import { StartEnd } from '../patterns/start-end.js';
4
+ import type { TextInputControlSize } from './text-input.options.js';
5
+ import { TextInputAppearance, TextInputType } from './text-input.options.js';
6
+ /**
7
+ * A Text Input Custom HTML Element.
8
+ * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input | `<input>`} element.
9
+ *
10
+ * @slot start - Content which can be provided before the input
11
+ * @slot end - Content which can be provided after the input
12
+ * @slot - The default slot for button content
13
+ * @csspart label - The internal `<label>` element
14
+ * @csspart root - the root container for the internal control
15
+ * @csspart control - The internal `<input>` control
16
+ * @public
17
+ */
18
+ export declare class TextInput extends FASTElement {
8
19
  /**
9
- * Defines TextInput control size
20
+ * Indicates the styled appearance of the element.
10
21
  *
11
22
  * @public
12
- * @default 'medium'
13
23
  * @remarks
14
- * HTML Attribute: control-size
24
+ * HTML Attribute: `appearance`
15
25
  */
16
- controlSize?: TextInputControlSize;
26
+ appearance?: TextInputAppearance;
17
27
  /**
18
- * Defines TextInput appearance.
28
+ * Indicates the element's autocomplete state.
29
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/autocomplete | `autocomplete`} attribute
19
30
  *
20
31
  * @public
21
- * @default 'outline'
22
32
  * @remarks
23
- * HTML Attribute: appearance
33
+ * HTML Attribute: `autocomplete`
24
34
  */
25
- appearance?: TextInputAppearance;
35
+ autocomplete?: string;
26
36
  /**
27
- * When true, the control will be immutable by user interaction. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly | readonly HTML attribute} for more information.
37
+ * Indicates that the element should get focus after the page finishes loading.
38
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/input#autofocus | `autofocus`} attribute
39
+ *
28
40
  * @public
29
41
  * @remarks
30
- * HTML Attribute: readonly
42
+ * HTML Attribute: `autofocus`
31
43
  */
32
- readOnly: boolean;
33
- protected readOnlyChanged(): void;
44
+ autofocus: boolean;
34
45
  /**
35
- * Indicates that this element should get focus after the page finishes loading. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefautofocus | autofocus HTML attribute} for more information.
46
+ * Sets the size of the control.
47
+ *
36
48
  * @public
37
49
  * @remarks
38
- * HTML Attribute: autofocus
50
+ * HTML Attribute: `control-size`
39
51
  */
40
- autofocus: boolean;
41
- protected autofocusChanged(): void;
52
+ controlSize?: TextInputControlSize;
42
53
  /**
43
- * Sets the placeholder value of the element, generally used to provide a hint to the user.
54
+ * The default slotted content. This is the content that appears in the text field label.
55
+ *
56
+ * @internal
57
+ */
58
+ defaultSlottedNodes: Node[];
59
+ /**
60
+ * Updates the control label visibility based on the presence of default slotted content.
61
+ *
62
+ * @internal
63
+ */
64
+ defaultSlottedNodesChanged(prev: Node[] | undefined, next: Node[] | undefined): void;
65
+ /**
66
+ * Sets the directionality of the element to be submitted with form data.
67
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/dirname | `dirname`} attribute
68
+ *
44
69
  * @public
45
70
  * @remarks
46
- * HTML Attribute: placeholder
47
- * Using this attribute does is not a valid substitute for a labeling element.
71
+ * HTML Attribute: `dirname`
48
72
  */
49
- placeholder: string;
50
- protected placeholderChanged(): void;
73
+ dirname?: string;
51
74
  /**
52
- * Allows setting a type or mode of text.
75
+ * Sets the element's disabled state.
76
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/disabled | `disabled`} attribute
77
+ *
53
78
  * @public
54
79
  * @remarks
55
- * HTML Attribute: type
80
+ * HTML Attribute: `disabled`
56
81
  */
57
- type: TextInputType;
58
- private typeChanged;
82
+ disabled?: boolean;
83
+ /**
84
+ * The id of a form to associate the element to.
85
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/input#form | `form`} attribute
86
+ *
87
+ * @public
88
+ * @remarks
89
+ * HTML Attribute: `form`
90
+ */
91
+ formAttribute?: string;
92
+ /**
93
+ * The initial value of the input.
94
+ *
95
+ * @public
96
+ * @remarks
97
+ * HTML Attribute: `value`
98
+ */
99
+ initialValue: string;
100
+ /**
101
+ * Sets the value of the element to the initial value.
102
+ *
103
+ * @internal
104
+ */
105
+ initialValueChanged(): void;
59
106
  /**
60
- * Allows associating a {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist | datalist} to the element by {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/id}.
107
+ * Allows associating a `<datalist>` to the element by ID.
108
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/input#list | `list`} attribute
109
+ *
61
110
  * @public
62
111
  * @remarks
63
- * HTML Attribute: list
112
+ * HTML Attribute: `list`
64
113
  */
65
114
  list: string;
66
- protected listChanged(): void;
67
115
  /**
68
116
  * The maximum number of characters a user can enter.
117
+ *
69
118
  * @public
70
119
  * @remarks
71
- * HTMLAttribute: maxlength
120
+ * HTML Attribute: `maxlength`
72
121
  */
73
122
  maxlength: number;
74
- protected maxlengthChanged(): void;
75
123
  /**
76
124
  * The minimum number of characters a user can enter.
125
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/minlength | `minlength`} attribute
126
+ *
77
127
  * @public
78
128
  * @remarks
79
- * HTMLAttribute: minlength
129
+ * HTML Attribute: `minlength`
80
130
  */
81
131
  minlength: number;
82
- protected minlengthChanged(): void;
132
+ /**
133
+ * Indicates that a comma-separated list of email addresses can be entered. This attribute is only valid when `type="email"`.
134
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/multiple | `multiple`} attribute
135
+ *
136
+ * @public
137
+ * @remarks
138
+ * HTML Attribute: `multiple`
139
+ */
140
+ multiple: boolean;
141
+ /**
142
+ * The name of the element. This element's value will be surfaced during form submission under the provided name.
143
+ *
144
+ * @public
145
+ * @remarks
146
+ * HTML Attribute: `name`
147
+ */
148
+ name: string;
83
149
  /**
84
150
  * A regular expression that the value must match to pass validation.
151
+ *
85
152
  * @public
86
153
  * @remarks
87
- * HTMLAttribute: pattern
154
+ * HTML Attribute: `pattern`
88
155
  */
89
156
  pattern: string;
90
- protected patternChanged(): void;
157
+ /**
158
+ * Sets the placeholder value of the element, generally used to provide a hint to the user.
159
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/placeholder | `placeholder`} attribute
160
+ *
161
+ * @public
162
+ * @remarks
163
+ * HTML Attribute: `placeholder`
164
+ * This attribute is not a valid substitute for a label.
165
+ */
166
+ placeholder: string;
167
+ /**
168
+ * When true, the control will be immutable by user interaction.
169
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/readonly | `readonly`} attribute
170
+ *
171
+ * @public
172
+ * @remarks
173
+ * HTML Attribute: `readonly`
174
+ */
175
+ readonly?: boolean;
176
+ /**
177
+ * Syncs the `ElementInternals.ariaReadOnly` property when the `readonly` property changes.
178
+ *
179
+ * @internal
180
+ */
181
+ readonlyChanged(): void;
182
+ /**
183
+ * The element's required attribute.
184
+ *
185
+ * @public
186
+ * @remarks
187
+ * HTML Attribute: `required`
188
+ */
189
+ required: boolean;
190
+ /**
191
+ * Syncs the element's internal `aria-required` state with the `required` attribute.
192
+ *
193
+ * @param previous - the previous required state
194
+ * @param next - the current required state
195
+ *
196
+ * @internal
197
+ */
198
+ requiredChanged(previous: boolean, next: boolean): void;
91
199
  /**
92
200
  * Sets the width of the element to a specified number of characters.
201
+ *
93
202
  * @public
94
203
  * @remarks
95
- * HTMLAttribute: size
204
+ * HTML Attribute: `size`
96
205
  */
97
206
  size: number;
98
- protected sizeChanged(): void;
99
207
  /**
100
208
  * Controls whether or not to enable spell checking for the input field, or if the default spell checking configuration should be used.
209
+ * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Global_attributes/spellcheck | `spellcheck`} attribute
210
+ *
101
211
  * @public
102
212
  * @remarks
103
- * HTMLAttribute: size
213
+ * HTML Attribute: `spellcheck`
104
214
  */
105
215
  spellcheck: boolean;
106
- protected spellcheckChanged(): void;
107
216
  /**
217
+ * Allows setting a type or mode of text.
218
+ *
219
+ * @public
220
+ * @remarks
221
+ * HTML Attribute: `type`
222
+ */
223
+ type: TextInputType;
224
+ /**
225
+ * The current value of the input.
226
+ *
108
227
  * @internal
109
228
  */
110
- defaultSlottedNodes: Node[];
229
+ private _value;
111
230
  /**
112
- * A reference to the internal input element
231
+ * A reference to the internal input element.
232
+ *
113
233
  * @internal
114
234
  */
115
235
  control: HTMLInputElement;
116
236
  /**
237
+ * A reference to the internal label element.
238
+ *
239
+ * @internal
240
+ */
241
+ controlLabel: HTMLLabelElement;
242
+ /**
243
+ * Indicates that the value has been changed by the user.
244
+ *
245
+ * @internal
246
+ */
247
+ private dirtyValue;
248
+ /**
249
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
250
+ *
251
+ * @internal
252
+ */
253
+ protected elementInternals: ElementInternals;
254
+ /**
255
+ * The form-associated flag.
256
+ * @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
257
+ *
258
+ * @public
259
+ */
260
+ static readonly formAssociated = true;
261
+ /**
262
+ * The element's validity state.
263
+ *
264
+ * @public
265
+ * @remarks
266
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/validity | `ElementInternals.validity`} property.
267
+ */
268
+ get validity(): ValidityState;
269
+ /**
270
+ * The validation message.
271
+ *
272
+ * @public
273
+ * @remarks
274
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/validationMessage | `ElementInternals.validationMessage`} property.
275
+ */
276
+ get validationMessage(): string;
277
+ /**
278
+ * The current value of the input.
279
+ * @public
280
+ */
281
+ get value(): string;
282
+ set value(value: string);
283
+ /**
284
+ * Determines if the control can be submitted for constraint validation.
285
+ *
286
+ * @public
287
+ * @remarks
288
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/willValidate | `ElementInternals.willValidate`} property.
289
+ */
290
+ get willValidate(): boolean;
291
+ /**
292
+ * The associated form element.
293
+ *
294
+ * @public
295
+ * @remarks
296
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/form | `ElementInternals.form`} property.
297
+ */
298
+ get form(): HTMLFormElement | null;
299
+ /**
300
+ * Change event handler for inner control.
301
+ *
117
302
  * @internal
303
+ * @privateRemarks
304
+ * "Change" events are not `composable` so they will not permeate the shadow DOM boundary. This function effectively
305
+ * proxies the change event, emitting a `change` event whenever the internal control emits a `change` event.
118
306
  */
307
+ changeHandler(e: InputEvent): void;
119
308
  connectedCallback(): void;
309
+ disconnectedCallback(): void;
310
+ /**
311
+ * Resets the value to its initial value when the form is reset.
312
+ *
313
+ * @internal
314
+ */
315
+ formResetCallback(): void;
316
+ /**
317
+ * Handles implicit form submission when the user presses the "Enter" key.
318
+ *
319
+ * @internal
320
+ */
321
+ private implicitSubmit;
322
+ /**
323
+ * Handles the internal control's `input` event.
324
+ *
325
+ * @internal
326
+ */
327
+ inputHandler(e: InputEvent): boolean | void;
328
+ /**
329
+ * Handles the internal control's `keypress` event.
330
+ *
331
+ * @internal
332
+ */
333
+ keypressHandler(e: KeyboardEvent): boolean | void;
120
334
  /**
121
- * Selects all the text in the text field
335
+ * Selects all the text in the text field.
122
336
  *
123
337
  * @public
338
+ * @privateRemarks
339
+ * The `select` event does not permeate the shadow DOM boundary. This function effectively proxies the event,
340
+ * emitting a `select` event whenever the internal control emits a `select` event
341
+ *
124
342
  */
125
343
  select(): void;
126
344
  /**
127
- * Handles the internal control's `input` event
345
+ * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/setFormValue | `ElementInternals.setFormValue()`} method.
346
+ *
128
347
  * @internal
129
348
  */
130
- handleTextInput(): void;
349
+ setFormValue(value: File | string | FormData | null, state?: File | string | FormData | null): void;
131
350
  /**
132
- * Change event handler for inner control.
133
- * @remarks
134
- * "Change" events are not `composable` so they will not
135
- * permeate the shadow DOM boundary. This fn effectively proxies
136
- * the change event, emitting a `change` event whenever the internal
137
- * control emits a `change` event
351
+ * Sets the validity of the control.
352
+ *
353
+ * @param flags - Validity flags. If not provided, the control's `validity` will be used.
354
+ * @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.
355
+ * @param anchor - Optional anchor to use for the validation message. If not provided, the control will be used.
356
+ *
138
357
  * @internal
139
358
  */
140
- handleChange(): void;
141
- /** {@inheritDoc (FormAssociated:interface).validate} */
142
- validate(): void;
359
+ setValidity(flags?: ValidityStateFlags, message?: string, anchor?: HTMLElement): void;
143
360
  }
144
361
  /**
145
- * Includes ARIA states and properties relating to the ARIA textbox role
146
- *
147
- * @public
362
+ * @internal
363
+ * @privateRemarks
364
+ * Mark internal because exporting class and interface of the same name
365
+ * confuses API documenter.
366
+ * TODO: https://github.com/microsoft/rushstack/issues/1308
148
367
  */
149
- export declare class DelegatesARIATextbox {
150
- }
151
- export interface DelegatesARIATextbox extends ARIAGlobalStatesAndProperties {
152
- }
153
- export interface TextInput extends StartEnd, DelegatesARIATextbox {
368
+ export interface TextInput extends StartEnd {
154
369
  }
@@ -1,10 +1,9 @@
1
1
  import { TextInput } from './text-input.js';
2
2
  /**
3
- * The Fluent TextInput Element.
4
- *
3
+ * The Fluent TextInput Element definition.
5
4
  *
6
5
  * @public
7
6
  * @remarks
8
- * HTML Element: \<fluent-text-input\>
7
+ * HTML Element: `<fluent-text-input>`
9
8
  */
10
9
  export declare const definition: import("@microsoft/fast-element").FASTElementDefinition<typeof TextInput>;