@fluentui/web-components 3.0.0-beta.82 → 3.0.0-beta.84

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 (153) 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 +2 -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/link/link.d.ts +1 -1
  29. package/dist/dts/listbox/listbox.d.ts +1 -1
  30. package/dist/dts/progress-bar/index.d.ts +2 -1
  31. package/dist/dts/progress-bar/progress-bar.base.d.ts +73 -0
  32. package/dist/dts/progress-bar/progress-bar.d.ts +2 -73
  33. package/dist/dts/radio/radio.d.ts +1 -1
  34. package/dist/dts/rating-display/index.d.ts +2 -1
  35. package/dist/dts/rating-display/rating-display.base.d.ts +89 -0
  36. package/dist/dts/rating-display/rating-display.d.ts +1 -89
  37. package/dist/dts/spinner/index.d.ts +2 -1
  38. package/dist/dts/spinner/spinner.base.d.ts +14 -0
  39. package/dist/dts/spinner/spinner.d.ts +1 -14
  40. package/dist/dts/switch/switch.d.ts +1 -1
  41. package/dist/dts/tablist/index.d.ts +2 -1
  42. package/dist/dts/tablist/tablist.base.d.ts +95 -0
  43. package/dist/dts/tablist/tablist.d.ts +2 -94
  44. package/dist/dts/tabs/tabs.base.d.ts +90 -0
  45. package/dist/dts/tabs/tabs.d.ts +2 -90
  46. package/dist/dts/text-input/index.d.ts +2 -1
  47. package/dist/dts/text-input/text-input.base.d.ts +393 -0
  48. package/dist/dts/text-input/text-input.d.ts +2 -393
  49. package/dist/dts/textarea/index.d.ts +2 -1
  50. package/dist/dts/textarea/textarea.base.d.ts +347 -0
  51. package/dist/dts/textarea/textarea.d.ts +2 -347
  52. package/dist/esm/accordion/accordion.js +1 -1
  53. package/dist/esm/accordion/accordion.js.map +1 -1
  54. package/dist/esm/accordion-item/accordion-item.base.js +94 -0
  55. package/dist/esm/accordion-item/accordion-item.base.js.map +1 -0
  56. package/dist/esm/accordion-item/accordion-item.js +2 -91
  57. package/dist/esm/accordion-item/accordion-item.js.map +1 -1
  58. package/dist/esm/accordion-item/index.js +2 -1
  59. package/dist/esm/accordion-item/index.js.map +1 -1
  60. package/dist/esm/anchor-button/anchor-button.base.js +147 -0
  61. package/dist/esm/anchor-button/anchor-button.base.js.map +1 -0
  62. package/dist/esm/anchor-button/anchor-button.js +3 -145
  63. package/dist/esm/anchor-button/anchor-button.js.map +1 -1
  64. package/dist/esm/anchor-button/index.js +2 -1
  65. package/dist/esm/anchor-button/index.js.map +1 -1
  66. package/dist/esm/avatar/avatar.base.js +28 -0
  67. package/dist/esm/avatar/avatar.base.js.map +1 -0
  68. package/dist/esm/avatar/avatar.js +2 -26
  69. package/dist/esm/avatar/avatar.js.map +1 -1
  70. package/dist/esm/avatar/index.js +2 -1
  71. package/dist/esm/avatar/index.js.map +1 -1
  72. package/dist/esm/button/button.base.js +283 -0
  73. package/dist/esm/button/button.base.js.map +1 -0
  74. package/dist/esm/button/button.js +3 -281
  75. package/dist/esm/button/button.js.map +1 -1
  76. package/dist/esm/button/button.styles.js +2 -1
  77. package/dist/esm/button/button.styles.js.map +1 -1
  78. package/dist/esm/button/index.js +2 -1
  79. package/dist/esm/button/index.js.map +1 -1
  80. package/dist/esm/checkbox/checkbox.base.js +366 -0
  81. package/dist/esm/checkbox/checkbox.base.js.map +1 -0
  82. package/dist/esm/checkbox/checkbox.js +2 -363
  83. package/dist/esm/checkbox/checkbox.js.map +1 -1
  84. package/dist/esm/checkbox/index.js +2 -1
  85. package/dist/esm/checkbox/index.js.map +1 -1
  86. package/dist/esm/divider/divider.base.js +61 -0
  87. package/dist/esm/divider/divider.base.js.map +1 -0
  88. package/dist/esm/divider/divider.js +3 -58
  89. package/dist/esm/divider/divider.js.map +1 -1
  90. package/dist/esm/divider/index.js +2 -1
  91. package/dist/esm/divider/index.js.map +1 -1
  92. package/dist/esm/dropdown/dropdown.base.js +677 -0
  93. package/dist/esm/dropdown/dropdown.base.js.map +1 -0
  94. package/dist/esm/dropdown/dropdown.js +3 -674
  95. package/dist/esm/dropdown/dropdown.js.map +1 -1
  96. package/dist/esm/dropdown/index.js +2 -1
  97. package/dist/esm/dropdown/index.js.map +1 -1
  98. package/dist/esm/field/field.base.js +189 -0
  99. package/dist/esm/field/field.base.js.map +1 -0
  100. package/dist/esm/field/field.js +3 -187
  101. package/dist/esm/field/field.js.map +1 -1
  102. package/dist/esm/field/index.js +2 -1
  103. package/dist/esm/field/index.js.map +1 -1
  104. package/dist/esm/link/link.js +1 -1
  105. package/dist/esm/link/link.js.map +1 -1
  106. package/dist/esm/progress-bar/index.js +2 -1
  107. package/dist/esm/progress-bar/index.js.map +1 -1
  108. package/dist/esm/progress-bar/progress-bar.base.js +90 -0
  109. package/dist/esm/progress-bar/progress-bar.base.js.map +1 -0
  110. package/dist/esm/progress-bar/progress-bar.js +3 -87
  111. package/dist/esm/progress-bar/progress-bar.js.map +1 -1
  112. package/dist/esm/radio/radio.js +1 -1
  113. package/dist/esm/radio/radio.js.map +1 -1
  114. package/dist/esm/rating-display/index.js +2 -1
  115. package/dist/esm/rating-display/index.js.map +1 -1
  116. package/dist/esm/rating-display/rating-display.base.js +94 -0
  117. package/dist/esm/rating-display/rating-display.base.js.map +1 -0
  118. package/dist/esm/rating-display/rating-display.js +2 -92
  119. package/dist/esm/rating-display/rating-display.js.map +1 -1
  120. package/dist/esm/spinner/index.js +2 -1
  121. package/dist/esm/spinner/index.js.map +1 -1
  122. package/dist/esm/spinner/spinner.base.js +18 -0
  123. package/dist/esm/spinner/spinner.base.js.map +1 -0
  124. package/dist/esm/spinner/spinner.js +2 -17
  125. package/dist/esm/spinner/spinner.js.map +1 -1
  126. package/dist/esm/switch/switch.js +1 -1
  127. package/dist/esm/switch/switch.js.map +1 -1
  128. package/dist/esm/tablist/index.js +2 -1
  129. package/dist/esm/tablist/index.js.map +1 -1
  130. package/dist/esm/tablist/tablist.base.js +248 -0
  131. package/dist/esm/tablist/tablist.base.js.map +1 -0
  132. package/dist/esm/tablist/tablist.js +3 -221
  133. package/dist/esm/tablist/tablist.js.map +1 -1
  134. package/dist/esm/tabs/tabs.base.js +279 -0
  135. package/dist/esm/tabs/tabs.base.js.map +1 -0
  136. package/dist/esm/tabs/tabs.js +2 -276
  137. package/dist/esm/tabs/tabs.js.map +1 -1
  138. package/dist/esm/text-input/index.js +2 -1
  139. package/dist/esm/text-input/index.js.map +1 -1
  140. package/dist/esm/text-input/text-input.base.js +409 -0
  141. package/dist/esm/text-input/text-input.base.js.map +1 -0
  142. package/dist/esm/text-input/text-input.js +3 -407
  143. package/dist/esm/text-input/text-input.js.map +1 -1
  144. package/dist/esm/textarea/index.js +2 -1
  145. package/dist/esm/textarea/index.js.map +1 -1
  146. package/dist/esm/textarea/textarea.base.js +494 -0
  147. package/dist/esm/textarea/textarea.base.js.map +1 -0
  148. package/dist/esm/textarea/textarea.js +3 -491
  149. package/dist/esm/textarea/textarea.js.map +1 -1
  150. package/dist/web-components.d.ts +1 -0
  151. package/dist/web-components.js +707 -556
  152. package/dist/web-components.min.js +265 -265
  153. package/package.json +5 -1
@@ -1,397 +1,6 @@
1
- import { FASTElement } from '@microsoft/fast-element';
2
1
  import { StartEnd } from '../patterns/start-end.js';
3
- import { TextInputAppearance, TextInputControlSize, TextInputType } from './text-input.options.js';
4
- /**
5
- * A Text Input Custom HTML Element.
6
- * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input | `<input>`} element.
7
- *
8
- * @slot start - Content which can be provided before the input
9
- * @slot end - Content which can be provided after the input
10
- * @slot - The default slot for button content
11
- * @csspart label - The internal `<label>` element
12
- * @csspart root - the root container for the internal control
13
- * @csspart control - The internal `<input>` control
14
- * @public
15
- */
16
- export declare class BaseTextInput extends FASTElement {
17
- /**
18
- * Indicates the element's autocomplete state.
19
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/autocomplete | `autocomplete`} attribute
20
- *
21
- * @public
22
- * @remarks
23
- * HTML Attribute: `autocomplete`
24
- */
25
- autocomplete?: string;
26
- /**
27
- * Indicates that the element should get focus after the page finishes loading.
28
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/input#autofocus | `autofocus`} attribute
29
- *
30
- * @public
31
- * @remarks
32
- * HTML Attribute: `autofocus`
33
- */
34
- autofocus: boolean;
35
- /**
36
- * The current value of the input.
37
- * @public
38
- * @remarks
39
- * HTML Attribute: `current-value`
40
- */
41
- currentValue: string;
42
- /**
43
- * Tracks the current value of the input.
44
- *
45
- * @param prev - the previous value
46
- * @param next - the next value
47
- *
48
- * @internal
49
- */
50
- currentValueChanged(prev: string, next: string): void;
51
- /**
52
- * The default slotted content. This is the content that appears in the text field label.
53
- *
54
- * @internal
55
- */
56
- defaultSlottedNodes: Node[];
57
- /**
58
- * Updates the control label visibility based on the presence of default slotted content.
59
- *
60
- * @internal
61
- */
62
- defaultSlottedNodesChanged(prev: Node[] | undefined, next: Node[] | undefined): void;
63
- /**
64
- * Sets the directionality of the element to be submitted with form data.
65
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/dirname | `dirname`} attribute
66
- *
67
- * @public
68
- * @remarks
69
- * HTML Attribute: `dirname`
70
- */
71
- dirname?: string;
72
- /**
73
- * Sets the element's disabled state.
74
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/disabled | `disabled`} attribute
75
- *
76
- * @public
77
- * @remarks
78
- * HTML Attribute: `disabled`
79
- */
80
- disabled?: boolean;
81
- /**
82
- * The id of a form to associate the element to.
83
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/input#form | `form`} attribute
84
- *
85
- * @public
86
- * @remarks
87
- * HTML Attribute: `form`
88
- */
89
- formAttribute?: string;
90
- /**
91
- * The initial value of the input.
92
- *
93
- * @public
94
- * @remarks
95
- * HTML Attribute: `value`
96
- */
97
- initialValue: string;
98
- /**
99
- * Sets the value of the element to the initial value.
100
- *
101
- * @internal
102
- */
103
- initialValueChanged(): void;
104
- /**
105
- * Allows associating a `<datalist>` to the element by ID.
106
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/input#list | `list`} attribute
107
- *
108
- * @public
109
- * @remarks
110
- * HTML Attribute: `list`
111
- */
112
- list: string;
113
- /**
114
- * The maximum number of characters a user can enter.
115
- *
116
- * @public
117
- * @remarks
118
- * HTML Attribute: `maxlength`
119
- */
120
- maxlength: number;
121
- /**
122
- * The minimum number of characters a user can enter.
123
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/minlength | `minlength`} attribute
124
- *
125
- * @public
126
- * @remarks
127
- * HTML Attribute: `minlength`
128
- */
129
- minlength: number;
130
- /**
131
- * Indicates that a comma-separated list of email addresses can be entered. This attribute is only valid when `type="email"`.
132
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/multiple | `multiple`} attribute
133
- *
134
- * @public
135
- * @remarks
136
- * HTML Attribute: `multiple`
137
- */
138
- multiple: boolean;
139
- /**
140
- * The name of the element. This element's value will be surfaced during form submission under the provided name.
141
- *
142
- * @public
143
- * @remarks
144
- * HTML Attribute: `name`
145
- */
146
- name: string;
147
- /**
148
- * A regular expression that the value must match to pass validation.
149
- *
150
- * @public
151
- * @remarks
152
- * HTML Attribute: `pattern`
153
- */
154
- pattern: string;
155
- /**
156
- * Sets the placeholder value of the element, generally used to provide a hint to the user.
157
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/placeholder | `placeholder`} attribute
158
- *
159
- * @public
160
- * @remarks
161
- * HTML Attribute: `placeholder`
162
- * This attribute is not a valid substitute for a label.
163
- */
164
- placeholder: string;
165
- /**
166
- * When true, the control will be immutable by user interaction.
167
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Attributes/readonly | `readonly`} attribute
168
- *
169
- * @public
170
- * @remarks
171
- * HTML Attribute: `readonly`
172
- */
173
- readOnly?: boolean;
174
- /**
175
- * Syncs the `ElementInternals.ariaReadOnly` property when the `readonly` property changes.
176
- *
177
- * @internal
178
- */
179
- readOnlyChanged(): void;
180
- /**
181
- * The element's required attribute.
182
- *
183
- * @public
184
- * @remarks
185
- * HTML Attribute: `required`
186
- */
187
- required: boolean;
188
- /**
189
- * Syncs the element's internal `aria-required` state with the `required` attribute.
190
- *
191
- * @param previous - the previous required state
192
- * @param next - the current required state
193
- *
194
- * @internal
195
- */
196
- requiredChanged(previous: boolean, next: boolean): void;
197
- /**
198
- * Sets the width of the element to a specified number of characters.
199
- *
200
- * @public
201
- * @remarks
202
- * HTML Attribute: `size`
203
- */
204
- size: number;
205
- /**
206
- * Controls whether or not to enable spell checking for the input field, or if the default spell checking configuration should be used.
207
- * @see The {@link https://developer.mozilla.org/docs/Web/HTML/Global_attributes/spellcheck | `spellcheck`} attribute
208
- *
209
- * @public
210
- * @remarks
211
- * HTML Attribute: `spellcheck`
212
- */
213
- spellcheck: boolean;
214
- /**
215
- * Allows setting a type or mode of text.
216
- *
217
- * @public
218
- * @remarks
219
- * HTML Attribute: `type`
220
- */
221
- type: TextInputType;
222
- /**
223
- * A reference to the internal input element.
224
- *
225
- * @internal
226
- */
227
- control: HTMLInputElement;
228
- /**
229
- * A reference to the internal label element.
230
- *
231
- * @internal
232
- */
233
- controlLabel: HTMLLabelElement;
234
- /**
235
- * Indicates that the value has been changed by the user.
236
- *
237
- * @internal
238
- */
239
- private dirtyValue;
240
- /**
241
- * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
242
- *
243
- * @internal
244
- */
245
- elementInternals: ElementInternals;
246
- /**
247
- * The form-associated flag.
248
- * @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
249
- *
250
- * @public
251
- */
252
- static readonly formAssociated = true;
253
- /**
254
- * The element's validity state.
255
- *
256
- * @public
257
- * @remarks
258
- * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/validity | `ElementInternals.validity`} property.
259
- */
260
- get validity(): ValidityState;
261
- /**
262
- * The validation message.
263
- *
264
- * @public
265
- * @remarks
266
- * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/validationMessage | `ElementInternals.validationMessage`} property.
267
- */
268
- get validationMessage(): string;
269
- /**
270
- * The current value of the input.
271
- * @public
272
- */
273
- get value(): string;
274
- set value(value: string);
275
- /**
276
- * Determines if the control can be submitted for constraint validation.
277
- *
278
- * @public
279
- * @remarks
280
- * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/willValidate | `ElementInternals.willValidate`} property.
281
- */
282
- get willValidate(): boolean;
283
- /**
284
- * The associated form element.
285
- *
286
- * @public
287
- * @remarks
288
- * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/form | `ElementInternals.form`} property.
289
- */
290
- get form(): HTMLFormElement | null;
291
- /**
292
- * Handles the internal control's `keypress` event.
293
- *
294
- * @internal
295
- */
296
- beforeinputHandler(e: InputEvent): boolean | void;
297
- /**
298
- * Change event handler for inner control.
299
- *
300
- * @internal
301
- * @privateRemarks
302
- * "Change" events are not `composable` so they will not permeate the shadow DOM boundary. This function effectively
303
- * proxies the change event, emitting a `change` event whenever the internal control emits a `change` event.
304
- */
305
- changeHandler(e: InputEvent): boolean | void;
306
- /**
307
- * Checks the validity of the element and returns the result.
308
- *
309
- * @public
310
- * @remarks
311
- * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/checkValidity | `HTMLInputElement.checkValidity()`} method.
312
- */
313
- checkValidity(): boolean;
314
- /**
315
- * Clicks the inner control when the component is clicked.
316
- *
317
- * @param e - the event object
318
- */
319
- clickHandler(e: MouseEvent): boolean | void;
320
- connectedCallback(): void;
321
- /**
322
- * Focuses the inner control when the component is focused.
323
- *
324
- * @param e - the event object
325
- * @public
326
- */
327
- focusinHandler(e: FocusEvent): boolean | void;
328
- /**
329
- * Resets the value to its initial value when the form is reset.
330
- *
331
- * @internal
332
- */
333
- formResetCallback(): void;
334
- /**
335
- * Handles implicit form submission when the user presses the "Enter" key.
336
- *
337
- * @internal
338
- */
339
- private implicitSubmit;
340
- /**
341
- * Handles the internal control's `input` event.
342
- *
343
- * @internal
344
- */
345
- inputHandler(e: InputEvent): boolean | void;
346
- /**
347
- * Handles the internal control's `keydown` event.
348
- *
349
- * @param e - the event object
350
- * @internal
351
- */
352
- keydownHandler(e: KeyboardEvent): boolean | void;
353
- /**
354
- * Selects all the text in the text field.
355
- *
356
- * @public
357
- * @privateRemarks
358
- * The `select` event does not permeate the shadow DOM boundary. This function effectively proxies the event,
359
- * emitting a `select` event whenever the internal control emits a `select` event
360
- *
361
- */
362
- select(): void;
363
- /**
364
- * Sets the custom validity message.
365
- * @param message - The message to set
366
- *
367
- * @public
368
- */
369
- setCustomValidity(message: string): void;
370
- /**
371
- * Reports the validity of the element.
372
- *
373
- * @public
374
- * @remarks
375
- * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/reportValidity | `HTMLInputElement.reportValidity()`} method.
376
- */
377
- reportValidity(): boolean;
378
- /**
379
- * Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/setFormValue | `ElementInternals.setFormValue()`} method.
380
- *
381
- * @internal
382
- */
383
- setFormValue(value: File | string | FormData | null, state?: File | string | FormData | null): void;
384
- /**
385
- * Sets the validity of the control.
386
- *
387
- * @param flags - Validity flags. If not provided, the control's `validity` will be used.
388
- * @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.
389
- * @param anchor - Optional anchor to use for the validation message. If not provided, the control will be used.
390
- *
391
- * @internal
392
- */
393
- setValidity(flags?: Partial<ValidityState>, message?: string, anchor?: HTMLElement): void;
394
- }
2
+ import { BaseTextInput } from './text-input.base.js';
3
+ import { TextInputAppearance, TextInputControlSize } from './text-input.options.js';
395
4
  /**
396
5
  * A Text Input Custom HTML Element.
397
6
  * Based on BaseTextInput and includes style and layout specific attributes
@@ -1,5 +1,6 @@
1
1
  export { definition as TextAreaDefinition } from './textarea.definition.js';
2
- export { BaseTextArea, TextArea } from './textarea.js';
2
+ export { BaseTextArea } from './textarea.base.js';
3
+ export { TextArea } from './textarea.js';
3
4
  export { TextAreaAppearance, TextAreaAppearancesForDisplayShadow, TextAreaAutocomplete, TextAreaResize, TextAreaSize, } from './textarea.options.js';
4
5
  export { styles as TextAreaStyles } from './textarea.styles.js';
5
6
  export { template as TextAreaTemplate } from './textarea.template.js';