@fluentui/web-components 3.0.0-beta.83 → 3.0.0-beta.85

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 (204) hide show
  1. package/CHANGELOG.md +20 -2
  2. package/dist/dts/accordion-item/accordion-item.base.d.ts +71 -0
  3. package/dist/dts/accordion-item/accordion-item.d.ts +1 -71
  4. package/dist/dts/accordion-item/index.d.ts +2 -1
  5. package/dist/dts/anchor-button/anchor-button.base.d.ts +144 -0
  6. package/dist/dts/anchor-button/anchor-button.d.ts +2 -144
  7. package/dist/dts/anchor-button/index.d.ts +3 -1
  8. package/dist/dts/avatar/avatar.base.d.ts +42 -0
  9. package/dist/dts/avatar/avatar.d.ts +2 -42
  10. package/dist/dts/avatar/index.d.ts +2 -1
  11. package/dist/dts/button/button.base.d.ts +242 -0
  12. package/dist/dts/button/button.d.ts +2 -242
  13. package/dist/dts/button/index.d.ts +2 -1
  14. package/dist/dts/checkbox/checkbox.base.d.ts +288 -0
  15. package/dist/dts/checkbox/checkbox.d.ts +1 -288
  16. package/dist/dts/checkbox/index.d.ts +2 -1
  17. package/dist/dts/divider/divider.base.d.ts +49 -0
  18. package/dist/dts/divider/divider.d.ts +2 -49
  19. package/dist/dts/divider/index.d.ts +2 -1
  20. package/dist/dts/dropdown/dropdown.base.d.ts +418 -0
  21. package/dist/dts/dropdown/dropdown.d.ts +2 -418
  22. package/dist/dts/dropdown/dropdown.options.d.ts +1 -1
  23. package/dist/dts/dropdown/dropdown.template.d.ts +1 -1
  24. package/dist/dts/dropdown/index.d.ts +2 -1
  25. package/dist/dts/field/field.base.d.ts +120 -0
  26. package/dist/dts/field/field.d.ts +2 -120
  27. package/dist/dts/field/index.d.ts +2 -1
  28. package/dist/dts/index-rollup.d.ts +2 -0
  29. package/dist/dts/index.d.ts +7 -8
  30. package/dist/dts/link/link.d.ts +1 -1
  31. package/dist/dts/listbox/listbox.d.ts +1 -1
  32. package/dist/dts/progress-bar/index.d.ts +2 -1
  33. package/dist/dts/progress-bar/progress-bar.base.d.ts +73 -0
  34. package/dist/dts/progress-bar/progress-bar.d.ts +2 -73
  35. package/dist/dts/radio/radio.d.ts +1 -1
  36. package/dist/dts/rating-display/index.d.ts +2 -1
  37. package/dist/dts/rating-display/rating-display.base.d.ts +89 -0
  38. package/dist/dts/rating-display/rating-display.d.ts +1 -89
  39. package/dist/dts/spinner/index.d.ts +2 -1
  40. package/dist/dts/spinner/spinner.base.d.ts +14 -0
  41. package/dist/dts/spinner/spinner.d.ts +1 -14
  42. package/dist/dts/switch/switch.d.ts +1 -1
  43. package/dist/dts/tablist/index.d.ts +2 -1
  44. package/dist/dts/tablist/tablist.base.d.ts +95 -0
  45. package/dist/dts/tablist/tablist.d.ts +2 -95
  46. package/dist/dts/tabs/tabs.base.d.ts +90 -0
  47. package/dist/dts/tabs/tabs.d.ts +2 -90
  48. package/dist/dts/text-input/index.d.ts +2 -1
  49. package/dist/dts/text-input/text-input.base.d.ts +393 -0
  50. package/dist/dts/text-input/text-input.d.ts +2 -393
  51. package/dist/dts/textarea/index.d.ts +2 -1
  52. package/dist/dts/textarea/textarea.base.d.ts +347 -0
  53. package/dist/dts/textarea/textarea.d.ts +2 -347
  54. package/dist/dts/tree/define.d.ts +1 -0
  55. package/dist/dts/tree/index.d.ts +4 -0
  56. package/dist/dts/tree/tree.bench.d.ts +3 -0
  57. package/dist/dts/tree/tree.d.ts +88 -0
  58. package/dist/dts/tree/tree.definition.d.ts +8 -0
  59. package/dist/dts/tree/tree.styles.d.ts +1 -0
  60. package/dist/dts/tree/tree.template.d.ts +2 -0
  61. package/dist/dts/tree-item/define.d.ts +1 -0
  62. package/dist/dts/tree-item/index.d.ts +5 -0
  63. package/dist/dts/tree-item/tree-item.bench.d.ts +3 -0
  64. package/dist/dts/tree-item/tree-item.d.ts +121 -0
  65. package/dist/dts/tree-item/tree-item.definition.d.ts +8 -0
  66. package/dist/dts/tree-item/tree-item.options.d.ts +22 -0
  67. package/dist/dts/tree-item/tree-item.styles.d.ts +1 -0
  68. package/dist/dts/tree-item/tree-item.template.d.ts +2 -0
  69. package/dist/esm/accordion/accordion.js +1 -1
  70. package/dist/esm/accordion/accordion.js.map +1 -1
  71. package/dist/esm/accordion-item/accordion-item.base.js +94 -0
  72. package/dist/esm/accordion-item/accordion-item.base.js.map +1 -0
  73. package/dist/esm/accordion-item/accordion-item.js +2 -91
  74. package/dist/esm/accordion-item/accordion-item.js.map +1 -1
  75. package/dist/esm/accordion-item/index.js +2 -1
  76. package/dist/esm/accordion-item/index.js.map +1 -1
  77. package/dist/esm/anchor-button/anchor-button.base.js +147 -0
  78. package/dist/esm/anchor-button/anchor-button.base.js.map +1 -0
  79. package/dist/esm/anchor-button/anchor-button.js +3 -145
  80. package/dist/esm/anchor-button/anchor-button.js.map +1 -1
  81. package/dist/esm/anchor-button/index.js +3 -1
  82. package/dist/esm/anchor-button/index.js.map +1 -1
  83. package/dist/esm/avatar/avatar.base.js +28 -0
  84. package/dist/esm/avatar/avatar.base.js.map +1 -0
  85. package/dist/esm/avatar/avatar.js +2 -26
  86. package/dist/esm/avatar/avatar.js.map +1 -1
  87. package/dist/esm/avatar/index.js +2 -1
  88. package/dist/esm/avatar/index.js.map +1 -1
  89. package/dist/esm/button/button.base.js +283 -0
  90. package/dist/esm/button/button.base.js.map +1 -0
  91. package/dist/esm/button/button.js +3 -281
  92. package/dist/esm/button/button.js.map +1 -1
  93. package/dist/esm/button/button.styles.js +2 -1
  94. package/dist/esm/button/button.styles.js.map +1 -1
  95. package/dist/esm/button/index.js +2 -1
  96. package/dist/esm/button/index.js.map +1 -1
  97. package/dist/esm/checkbox/checkbox.base.js +366 -0
  98. package/dist/esm/checkbox/checkbox.base.js.map +1 -0
  99. package/dist/esm/checkbox/checkbox.js +2 -363
  100. package/dist/esm/checkbox/checkbox.js.map +1 -1
  101. package/dist/esm/checkbox/index.js +2 -1
  102. package/dist/esm/checkbox/index.js.map +1 -1
  103. package/dist/esm/divider/divider.base.js +61 -0
  104. package/dist/esm/divider/divider.base.js.map +1 -0
  105. package/dist/esm/divider/divider.js +3 -58
  106. package/dist/esm/divider/divider.js.map +1 -1
  107. package/dist/esm/divider/index.js +2 -1
  108. package/dist/esm/divider/index.js.map +1 -1
  109. package/dist/esm/dropdown/dropdown.base.js +677 -0
  110. package/dist/esm/dropdown/dropdown.base.js.map +1 -0
  111. package/dist/esm/dropdown/dropdown.js +3 -674
  112. package/dist/esm/dropdown/dropdown.js.map +1 -1
  113. package/dist/esm/dropdown/index.js +2 -1
  114. package/dist/esm/dropdown/index.js.map +1 -1
  115. package/dist/esm/field/field.base.js +189 -0
  116. package/dist/esm/field/field.base.js.map +1 -0
  117. package/dist/esm/field/field.js +3 -187
  118. package/dist/esm/field/field.js.map +1 -1
  119. package/dist/esm/field/index.js +2 -1
  120. package/dist/esm/field/index.js.map +1 -1
  121. package/dist/esm/index-rollup.js +2 -0
  122. package/dist/esm/index-rollup.js.map +1 -1
  123. package/dist/esm/index.js +6 -5
  124. package/dist/esm/index.js.map +1 -1
  125. package/dist/esm/link/link.js +1 -1
  126. package/dist/esm/link/link.js.map +1 -1
  127. package/dist/esm/progress-bar/index.js +2 -1
  128. package/dist/esm/progress-bar/index.js.map +1 -1
  129. package/dist/esm/progress-bar/progress-bar.base.js +90 -0
  130. package/dist/esm/progress-bar/progress-bar.base.js.map +1 -0
  131. package/dist/esm/progress-bar/progress-bar.js +3 -87
  132. package/dist/esm/progress-bar/progress-bar.js.map +1 -1
  133. package/dist/esm/radio/radio.js +1 -1
  134. package/dist/esm/radio/radio.js.map +1 -1
  135. package/dist/esm/rating-display/index.js +2 -1
  136. package/dist/esm/rating-display/index.js.map +1 -1
  137. package/dist/esm/rating-display/rating-display.base.js +94 -0
  138. package/dist/esm/rating-display/rating-display.base.js.map +1 -0
  139. package/dist/esm/rating-display/rating-display.js +2 -92
  140. package/dist/esm/rating-display/rating-display.js.map +1 -1
  141. package/dist/esm/spinner/index.js +2 -1
  142. package/dist/esm/spinner/index.js.map +1 -1
  143. package/dist/esm/spinner/spinner.base.js +18 -0
  144. package/dist/esm/spinner/spinner.base.js.map +1 -0
  145. package/dist/esm/spinner/spinner.js +2 -17
  146. package/dist/esm/spinner/spinner.js.map +1 -1
  147. package/dist/esm/switch/switch.js +1 -1
  148. package/dist/esm/switch/switch.js.map +1 -1
  149. package/dist/esm/tablist/index.js +2 -1
  150. package/dist/esm/tablist/index.js.map +1 -1
  151. package/dist/esm/tablist/tablist.base.js +248 -0
  152. package/dist/esm/tablist/tablist.base.js.map +1 -0
  153. package/dist/esm/tablist/tablist.js +3 -245
  154. package/dist/esm/tablist/tablist.js.map +1 -1
  155. package/dist/esm/tabs/tabs.base.js +279 -0
  156. package/dist/esm/tabs/tabs.base.js.map +1 -0
  157. package/dist/esm/tabs/tabs.js +2 -276
  158. package/dist/esm/tabs/tabs.js.map +1 -1
  159. package/dist/esm/text-input/index.js +2 -1
  160. package/dist/esm/text-input/index.js.map +1 -1
  161. package/dist/esm/text-input/text-input.base.js +409 -0
  162. package/dist/esm/text-input/text-input.base.js.map +1 -0
  163. package/dist/esm/text-input/text-input.js +3 -407
  164. package/dist/esm/text-input/text-input.js.map +1 -1
  165. package/dist/esm/textarea/index.js +2 -1
  166. package/dist/esm/textarea/index.js.map +1 -1
  167. package/dist/esm/textarea/textarea.base.js +494 -0
  168. package/dist/esm/textarea/textarea.base.js.map +1 -0
  169. package/dist/esm/textarea/textarea.js +3 -491
  170. package/dist/esm/textarea/textarea.js.map +1 -1
  171. package/dist/esm/tree/define.js +4 -0
  172. package/dist/esm/tree/define.js.map +1 -0
  173. package/dist/esm/tree/index.js +5 -0
  174. package/dist/esm/tree/index.js.map +1 -0
  175. package/dist/esm/tree/tree.bench.js +10 -0
  176. package/dist/esm/tree/tree.bench.js.map +1 -0
  177. package/dist/esm/tree/tree.definition.js +16 -0
  178. package/dist/esm/tree/tree.definition.js.map +1 -0
  179. package/dist/esm/tree/tree.js +274 -0
  180. package/dist/esm/tree/tree.js.map +1 -0
  181. package/dist/esm/tree/tree.styles.js +9 -0
  182. package/dist/esm/tree/tree.styles.js.map +1 -0
  183. package/dist/esm/tree/tree.template.js +18 -0
  184. package/dist/esm/tree/tree.template.js.map +1 -0
  185. package/dist/esm/tree-item/define.js +4 -0
  186. package/dist/esm/tree-item/define.js.map +1 -0
  187. package/dist/esm/tree-item/index.js +5 -0
  188. package/dist/esm/tree-item/index.js.map +1 -0
  189. package/dist/esm/tree-item/tree-item.bench.js +10 -0
  190. package/dist/esm/tree-item/tree-item.bench.js.map +1 -0
  191. package/dist/esm/tree-item/tree-item.definition.js +16 -0
  192. package/dist/esm/tree-item/tree-item.definition.js.map +1 -0
  193. package/dist/esm/tree-item/tree-item.js +201 -0
  194. package/dist/esm/tree-item/tree-item.js.map +1 -0
  195. package/dist/esm/tree-item/tree-item.options.js +24 -0
  196. package/dist/esm/tree-item/tree-item.options.js.map +1 -0
  197. package/dist/esm/tree-item/tree-item.styles.js +170 -0
  198. package/dist/esm/tree-item/tree-item.styles.js.map +1 -0
  199. package/dist/esm/tree-item/tree-item.template.js +41 -0
  200. package/dist/esm/tree-item/tree-item.template.js.map +1 -0
  201. package/dist/web-components.d.ts +157 -0
  202. package/dist/web-components.js +1445 -842
  203. package/dist/web-components.min.js +310 -303
  204. package/package.json +5 -1
@@ -0,0 +1,242 @@
1
+ import { FASTElement } from '@microsoft/fast-element';
2
+ import { ButtonFormTarget, ButtonType } from './button.options.js';
3
+ /**
4
+ * A Button Custom HTML Element.
5
+ * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button | `<button>`} element.
6
+ *
7
+ * @slot start - Content which can be provided before the button content
8
+ * @slot end - Content which can be provided after the button content
9
+ * @slot - The default slot for button content
10
+ * @csspart content - The button content container
11
+ *
12
+ * @public
13
+ */
14
+ export declare class BaseButton extends FASTElement {
15
+ /**
16
+ * Indicates the button should be focused when the page is loaded.
17
+ * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#autofocus | `autofocus`} attribute
18
+ *
19
+ * @public
20
+ * @remarks
21
+ * HTML Attribute: `autofocus`
22
+ */
23
+ autofocus: boolean;
24
+ /**
25
+ * Default slotted content.
26
+ *
27
+ * @public
28
+ */
29
+ defaultSlottedContent: HTMLElement[];
30
+ /**
31
+ * Sets the element's disabled state.
32
+ * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#disabled | `disabled`} attribute
33
+ *
34
+ * @public
35
+ * @remarks
36
+ * HTML Attribute: `disabled`
37
+ */
38
+ disabled?: boolean;
39
+ /**
40
+ * Indicates that the button is focusable while disabled.
41
+ *
42
+ * @public
43
+ * @remarks
44
+ * HTML Attribute: `disabled-focusable`
45
+ */
46
+ disabledFocusable: boolean;
47
+ /**
48
+ * Sets that the button tabindex attribute
49
+ *
50
+ * @public
51
+ * @remarks
52
+ * HTML Attribute: `tabindex`
53
+ */
54
+ tabIndex: number;
55
+ /**
56
+ * Sets the element's internal disabled state when the element is focusable while disabled.
57
+ *
58
+ * @param previous - the previous disabledFocusable value
59
+ * @param next - the current disabledFocusable value
60
+ * @internal
61
+ */
62
+ disabledFocusableChanged(previous: boolean, next: boolean): void;
63
+ /**
64
+ * The internal {@link https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
65
+ *
66
+ * @internal
67
+ */
68
+ elementInternals: ElementInternals;
69
+ /**
70
+ * The associated form element.
71
+ *
72
+ * @public
73
+ */
74
+ get form(): HTMLFormElement | null;
75
+ /**
76
+ * The URL that processes the form submission.
77
+ * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formaction | `formaction`} attribute
78
+ *
79
+ * @public
80
+ * @remarks
81
+ * HTML Attribute: `formaction`
82
+ */
83
+ formAction?: string;
84
+ /**
85
+ * The form-associated flag.
86
+ * @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
87
+ *
88
+ * @public
89
+ */
90
+ static readonly formAssociated = true;
91
+ /**
92
+ * The id of a form to associate the element to.
93
+ * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#form | `form`} attribute
94
+ *
95
+ * @public
96
+ * @remarks
97
+ * HTML Attribute: `form`
98
+ */
99
+ formAttribute?: string;
100
+ /**
101
+ * The encoding type for the form submission.
102
+ * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formenctype | `formenctype`} attribute
103
+ *
104
+ * @public
105
+ * @remarks
106
+ * HTML Attribute: `formenctype`
107
+ */
108
+ formEnctype?: string;
109
+ /**
110
+ * The HTTP method that the browser uses to submit the form.
111
+ * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formmethod | `formmethod`} attribute
112
+ *
113
+ * @public
114
+ * @remarks
115
+ * HTML Attribute: `formmethod`
116
+ */
117
+ formMethod?: string;
118
+ /**
119
+ * Indicates that the form will not be validated when submitted.
120
+ * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formnovalidate | `formnovalidate`} attribute
121
+ *
122
+ * @public
123
+ * @remarks
124
+ * HTML Attribute: `formnovalidate`
125
+ */
126
+ formNoValidate?: boolean;
127
+ /**
128
+ * The internal form submission fallback control.
129
+ *
130
+ * @internal
131
+ */
132
+ private formSubmissionFallbackControl?;
133
+ /**
134
+ * The internal slot for the form submission fallback control.
135
+ *
136
+ * @internal
137
+ */
138
+ private formSubmissionFallbackControlSlot?;
139
+ /**
140
+ * The target frame or window to open the form submission in.
141
+ * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formtarget | `formtarget`} attribute
142
+ *
143
+ * @public
144
+ * @remarks
145
+ * HTML Attribute: `formtarget`
146
+ */
147
+ formTarget?: ButtonFormTarget;
148
+ /**
149
+ * A reference to all associated label elements.
150
+ *
151
+ * @public
152
+ */
153
+ get labels(): ReadonlyArray<Node>;
154
+ /**
155
+ * The name of the element. This element's value will be surfaced during form submission under the provided name.
156
+ * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#name | `name`} attribute
157
+ *
158
+ * @public
159
+ * @remarks
160
+ * HTML Attribute: `name`
161
+ */
162
+ name?: string;
163
+ /**
164
+ * The button type.
165
+ * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type | `type`} attribute
166
+ *
167
+ * @public
168
+ * @remarks
169
+ * HTML Attribute: `type`
170
+ */
171
+ type: ButtonType;
172
+ /**
173
+ * Removes the form submission fallback control when the type changes.
174
+ *
175
+ * @param previous - the previous type value
176
+ * @param next - the new type value
177
+ * @internal
178
+ */
179
+ typeChanged(previous: ButtonType, next: ButtonType): void;
180
+ /**
181
+ * The value attribute.
182
+ *
183
+ * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#value | `value`} attribute
184
+ *
185
+ * @public
186
+ * @remarks
187
+ * HTML Attribute: `value`
188
+ */
189
+ value?: string;
190
+ /**
191
+ * Handles the button click event.
192
+ *
193
+ * @param e - The event object
194
+ * @internal
195
+ */
196
+ clickHandler(e: Event): boolean | void;
197
+ connectedCallback(): void;
198
+ constructor();
199
+ /**
200
+ * This fallback creates a new slot, then creates a submit button to mirror the custom element's
201
+ * properties. The submit button is then appended to the slot and the form is submitted.
202
+ *
203
+ * @internal
204
+ * @privateRemarks
205
+ * This is a workaround until {@link https://github.com/WICG/webcomponents/issues/814 | WICG/webcomponents/issues/814} is resolved.
206
+ */
207
+ private createAndInsertFormSubmissionFallbackControl;
208
+ /**
209
+ * Invoked when a connected component's form or fieldset has its disabled state changed.
210
+ *
211
+ * @param disabled - the disabled value of the form / fieldset
212
+ *
213
+ * @internal
214
+ */
215
+ formDisabledCallback(disabled: boolean): void;
216
+ /**
217
+ * Handles keypress events for the button.
218
+ *
219
+ * @param e - the keyboard event
220
+ * @returns - the return value of the click handler
221
+ * @public
222
+ */
223
+ keypressHandler(e: KeyboardEvent): boolean | void;
224
+ /**
225
+ * Presses the button.
226
+ *
227
+ * @public
228
+ */
229
+ protected press(): void;
230
+ /**
231
+ * Resets the associated form.
232
+ *
233
+ * @public
234
+ */
235
+ resetForm(): void;
236
+ /**
237
+ * Submits the associated form.
238
+ *
239
+ * @internal
240
+ */
241
+ private submitForm;
242
+ }
@@ -1,246 +1,6 @@
1
- import { FASTElement } from '@microsoft/fast-element';
2
1
  import { StartEnd } from '../patterns/index.js';
3
- import { ButtonAppearance, ButtonFormTarget, ButtonShape, ButtonSize, ButtonType } from './button.options.js';
4
- /**
5
- * A Button Custom HTML Element.
6
- * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button | `<button>`} element.
7
- *
8
- * @slot start - Content which can be provided before the button content
9
- * @slot end - Content which can be provided after the button content
10
- * @slot - The default slot for button content
11
- * @csspart content - The button content container
12
- *
13
- * @public
14
- */
15
- export declare class BaseButton extends FASTElement {
16
- /**
17
- * Indicates the button should be focused when the page is loaded.
18
- * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#autofocus | `autofocus`} attribute
19
- *
20
- * @public
21
- * @remarks
22
- * HTML Attribute: `autofocus`
23
- */
24
- autofocus: boolean;
25
- /**
26
- * Default slotted content.
27
- *
28
- * @public
29
- */
30
- defaultSlottedContent: HTMLElement[];
31
- /**
32
- * Sets the element's disabled state.
33
- * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#disabled | `disabled`} attribute
34
- *
35
- * @public
36
- * @remarks
37
- * HTML Attribute: `disabled`
38
- */
39
- disabled?: boolean;
40
- /**
41
- * Indicates that the button is focusable while disabled.
42
- *
43
- * @public
44
- * @remarks
45
- * HTML Attribute: `disabled-focusable`
46
- */
47
- disabledFocusable: boolean;
48
- /**
49
- * Sets that the button tabindex attribute
50
- *
51
- * @public
52
- * @remarks
53
- * HTML Attribute: `tabindex`
54
- */
55
- tabIndex: number;
56
- /**
57
- * Sets the element's internal disabled state when the element is focusable while disabled.
58
- *
59
- * @param previous - the previous disabledFocusable value
60
- * @param next - the current disabledFocusable value
61
- * @internal
62
- */
63
- disabledFocusableChanged(previous: boolean, next: boolean): void;
64
- /**
65
- * The internal {@link https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
66
- *
67
- * @internal
68
- */
69
- elementInternals: ElementInternals;
70
- /**
71
- * The associated form element.
72
- *
73
- * @public
74
- */
75
- get form(): HTMLFormElement | null;
76
- /**
77
- * The URL that processes the form submission.
78
- * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formaction | `formaction`} attribute
79
- *
80
- * @public
81
- * @remarks
82
- * HTML Attribute: `formaction`
83
- */
84
- formAction?: string;
85
- /**
86
- * The form-associated flag.
87
- * @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
88
- *
89
- * @public
90
- */
91
- static readonly formAssociated = true;
92
- /**
93
- * The id of a form to associate the element to.
94
- * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#form | `form`} attribute
95
- *
96
- * @public
97
- * @remarks
98
- * HTML Attribute: `form`
99
- */
100
- formAttribute?: string;
101
- /**
102
- * The encoding type for the form submission.
103
- * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formenctype | `formenctype`} attribute
104
- *
105
- * @public
106
- * @remarks
107
- * HTML Attribute: `formenctype`
108
- */
109
- formEnctype?: string;
110
- /**
111
- * The HTTP method that the browser uses to submit the form.
112
- * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formmethod | `formmethod`} attribute
113
- *
114
- * @public
115
- * @remarks
116
- * HTML Attribute: `formmethod`
117
- */
118
- formMethod?: string;
119
- /**
120
- * Indicates that the form will not be validated when submitted.
121
- * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formnovalidate | `formnovalidate`} attribute
122
- *
123
- * @public
124
- * @remarks
125
- * HTML Attribute: `formnovalidate`
126
- */
127
- formNoValidate?: boolean;
128
- /**
129
- * The internal form submission fallback control.
130
- *
131
- * @internal
132
- */
133
- private formSubmissionFallbackControl?;
134
- /**
135
- * The internal slot for the form submission fallback control.
136
- *
137
- * @internal
138
- */
139
- private formSubmissionFallbackControlSlot?;
140
- /**
141
- * The target frame or window to open the form submission in.
142
- * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formtarget | `formtarget`} attribute
143
- *
144
- * @public
145
- * @remarks
146
- * HTML Attribute: `formtarget`
147
- */
148
- formTarget?: ButtonFormTarget;
149
- /**
150
- * A reference to all associated label elements.
151
- *
152
- * @public
153
- */
154
- get labels(): ReadonlyArray<Node>;
155
- /**
156
- * The name of the element. This element's value will be surfaced during form submission under the provided name.
157
- * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#name | `name`} attribute
158
- *
159
- * @public
160
- * @remarks
161
- * HTML Attribute: `name`
162
- */
163
- name?: string;
164
- /**
165
- * The button type.
166
- * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type | `type`} attribute
167
- *
168
- * @public
169
- * @remarks
170
- * HTML Attribute: `type`
171
- */
172
- type: ButtonType;
173
- /**
174
- * Removes the form submission fallback control when the type changes.
175
- *
176
- * @param previous - the previous type value
177
- * @param next - the new type value
178
- * @internal
179
- */
180
- typeChanged(previous: ButtonType, next: ButtonType): void;
181
- /**
182
- * The value attribute.
183
- *
184
- * @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#value | `value`} attribute
185
- *
186
- * @public
187
- * @remarks
188
- * HTML Attribute: `value`
189
- */
190
- value?: string;
191
- /**
192
- * Handles the button click event.
193
- *
194
- * @param e - The event object
195
- * @internal
196
- */
197
- clickHandler(e: Event): boolean | void;
198
- connectedCallback(): void;
199
- constructor();
200
- /**
201
- * This fallback creates a new slot, then creates a submit button to mirror the custom element's
202
- * properties. The submit button is then appended to the slot and the form is submitted.
203
- *
204
- * @internal
205
- * @privateRemarks
206
- * This is a workaround until {@link https://github.com/WICG/webcomponents/issues/814 | WICG/webcomponents/issues/814} is resolved.
207
- */
208
- private createAndInsertFormSubmissionFallbackControl;
209
- /**
210
- * Invoked when a connected component's form or fieldset has its disabled state changed.
211
- *
212
- * @param disabled - the disabled value of the form / fieldset
213
- *
214
- * @internal
215
- */
216
- formDisabledCallback(disabled: boolean): void;
217
- /**
218
- * Handles keypress events for the button.
219
- *
220
- * @param e - the keyboard event
221
- * @returns - the return value of the click handler
222
- * @public
223
- */
224
- keypressHandler(e: KeyboardEvent): boolean | void;
225
- /**
226
- * Presses the button.
227
- *
228
- * @public
229
- */
230
- protected press(): void;
231
- /**
232
- * Resets the associated form.
233
- *
234
- * @public
235
- */
236
- resetForm(): void;
237
- /**
238
- * Submits the associated form.
239
- *
240
- * @internal
241
- */
242
- private submitForm;
243
- }
2
+ import { BaseButton } from './button.base.js';
3
+ import { ButtonAppearance, ButtonShape, ButtonSize } from './button.options.js';
244
4
  /**
245
5
  * A Button Custom HTML Element.
246
6
  * Based on BaseButton and includes style and layout specific attributes
@@ -1,5 +1,6 @@
1
1
  export { definition as ButtonDefinition } from './button.definition.js';
2
- export { BaseButton, Button } from './button.js';
2
+ export { BaseButton } from './button.base.js';
3
+ export { Button } from './button.js';
3
4
  export { ButtonAppearance, ButtonFormTarget, ButtonShape, ButtonSize, ButtonType } from './button.options.js';
4
5
  export type { ButtonOptions } from './button.options.js';
5
6
  export { styles as ButtonStyles } from './button.styles.js';