@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.
Files changed (293) hide show
  1. package/CHANGELOG.md +21 -2
  2. package/dist/dts/accordion/accordion.d.ts +47 -3
  3. package/dist/dts/accordion/accordion.definition.d.ts +0 -4
  4. package/dist/dts/accordion/accordion.options.d.ts +14 -0
  5. package/dist/dts/accordion/accordion.template.d.ts +4 -0
  6. package/dist/dts/accordion-item/accordion-item.d.ts +78 -3
  7. package/dist/dts/accordion-item/accordion-item.definition.d.ts +0 -3
  8. package/dist/dts/accordion-item/accordion-item.options.d.ts +1 -1
  9. package/dist/dts/accordion-item/accordion-item.template.d.ts +2 -1
  10. package/dist/dts/anchor-button/anchor-button.d.ts +116 -4
  11. package/dist/dts/anchor-button/anchor-button.definition.d.ts +0 -3
  12. package/dist/dts/anchor-button/anchor-button.options.d.ts +19 -2
  13. package/dist/dts/anchor-button/anchor-button.template.d.ts +7 -2
  14. package/dist/dts/avatar/avatar.options.d.ts +1 -1
  15. package/dist/dts/badge/badge.d.ts +1 -1
  16. package/dist/dts/badge/badge.definition.d.ts +0 -3
  17. package/dist/dts/badge/badge.options.d.ts +2 -2
  18. package/dist/dts/button/button.d.ts +142 -4
  19. package/dist/dts/button/button.definition.d.ts +0 -3
  20. package/dist/dts/button/button.form-associated.d.ts +14 -0
  21. package/dist/dts/button/button.options.d.ts +24 -3
  22. package/dist/dts/button/button.template.d.ts +2 -0
  23. package/dist/dts/checkbox/checkbox.d.ts +46 -3
  24. package/dist/dts/checkbox/checkbox.form-associated.d.ts +14 -0
  25. package/dist/dts/checkbox/checkbox.options.d.ts +1 -1
  26. package/dist/dts/checkbox/checkbox.template.d.ts +6 -1
  27. package/dist/dts/compound-button/compound-button.definition.d.ts +0 -3
  28. package/dist/dts/compound-button/compound-button.options.d.ts +6 -6
  29. package/dist/dts/counter-badge/counter-badge.d.ts +1 -1
  30. package/dist/dts/counter-badge/counter-badge.definition.d.ts +0 -4
  31. package/dist/dts/counter-badge/counter-badge.options.d.ts +1 -1
  32. package/dist/dts/dialog/dialog.options.d.ts +1 -1
  33. package/dist/dts/divider/divider.d.ts +20 -4
  34. package/dist/dts/divider/divider.options.d.ts +30 -6
  35. package/dist/dts/divider/divider.template.d.ts +1 -0
  36. package/dist/dts/form-associated/form-associated.d.ts +178 -0
  37. package/dist/dts/image/image.options.d.ts +1 -1
  38. package/dist/dts/label/label.options.d.ts +1 -1
  39. package/dist/dts/menu-button/menu-button.definition.d.ts +0 -3
  40. package/dist/dts/menu-button/menu-button.options.d.ts +2 -2
  41. package/dist/dts/menu-item/menu-item.d.ts +161 -4
  42. package/dist/dts/menu-item/menu-item.definition.d.ts +0 -4
  43. package/dist/dts/menu-item/menu-item.options.d.ts +30 -0
  44. package/dist/dts/menu-item/menu-item.template.d.ts +2 -1
  45. package/dist/dts/menu-list/menu-list.d.ts +71 -4
  46. package/dist/dts/menu-list/menu-list.definition.d.ts +0 -4
  47. package/dist/dts/menu-list/menu-list.template.d.ts +1 -0
  48. package/dist/dts/patterns/aria-globals.d.ts +189 -0
  49. package/dist/dts/patterns/index.d.ts +2 -0
  50. package/dist/dts/patterns/start-end.d.ts +44 -0
  51. package/dist/dts/progress-bar/base-progress.d.ts +41 -0
  52. package/dist/dts/progress-bar/progress-bar.d.ts +11 -4
  53. package/dist/dts/progress-bar/progress-bar.options.d.ts +10 -1
  54. package/dist/dts/progress-bar/progress-bar.template.d.ts +2 -0
  55. package/dist/dts/progress-ring/progress-ring.d.ts +15 -0
  56. package/dist/dts/progress-ring/progress-ring.options.d.ts +9 -0
  57. package/dist/dts/radio/radio.d.ts +54 -3
  58. package/dist/dts/radio/radio.form-associated.d.ts +14 -0
  59. package/dist/dts/radio/radio.template.d.ts +2 -1
  60. package/dist/dts/radio-group/index.d.ts +0 -1
  61. package/dist/dts/radio-group/radio-group.d.ts +91 -2
  62. package/dist/dts/radio-group/radio-group.options.d.ts +17 -0
  63. package/dist/dts/radio-group/radio-group.template.d.ts +1 -0
  64. package/dist/dts/slider/slider-utilities.d.ts +5 -0
  65. package/dist/dts/slider/slider.d.ts +195 -5
  66. package/dist/dts/slider/slider.form-associated.d.ts +14 -0
  67. package/dist/dts/slider/slider.options.d.ts +43 -2
  68. package/dist/dts/slider/slider.template.d.ts +4 -2
  69. package/dist/dts/spinner/spinner.d.ts +2 -2
  70. package/dist/dts/spinner/spinner.definition.d.ts +0 -4
  71. package/dist/dts/spinner/spinner.options.d.ts +1 -1
  72. package/dist/dts/spinner/spinner.template.d.ts +2 -0
  73. package/dist/dts/switch/switch.d.ts +34 -2
  74. package/dist/dts/switch/switch.form-associated.d.ts +14 -0
  75. package/dist/dts/switch/switch.options.d.ts +1 -1
  76. package/dist/dts/switch/switch.template.d.ts +2 -1
  77. package/dist/dts/tab/tab.d.ts +17 -2
  78. package/dist/dts/tab/tab.template.d.ts +3 -3
  79. package/dist/dts/tab-panel/tab-panel.d.ts +2 -2
  80. package/dist/dts/tab-panel/tab-panel.template.d.ts +4 -1
  81. package/dist/dts/tabs/tabs.d.ts +89 -4
  82. package/dist/dts/tabs/tabs.options.d.ts +21 -3
  83. package/dist/dts/tabs/tabs.template.d.ts +5 -1
  84. package/dist/dts/text/text.options.d.ts +1 -1
  85. package/dist/dts/text-input/index.d.ts +0 -1
  86. package/dist/dts/text-input/text-field.form-associated.d.ts +14 -0
  87. package/dist/dts/text-input/text-input.d.ts +134 -6
  88. package/dist/dts/text-input/text-input.options.d.ts +32 -1
  89. package/dist/dts/text-input/text-input.template.d.ts +2 -1
  90. package/dist/dts/theme/design-tokens.d.ts +53 -1
  91. package/dist/dts/toggle-button/toggle-button.definition.d.ts +0 -2
  92. package/dist/dts/toggle-button/toggle-button.options.d.ts +2 -2
  93. package/dist/dts/utils/benchmark-dependencies/tokens.d.ts +1 -0
  94. package/dist/dts/utils/benchmark-wrapper.d.ts +2 -0
  95. package/dist/dts/utils/direction.d.ts +10 -0
  96. package/dist/dts/utils/index.d.ts +4 -0
  97. package/dist/dts/utils/template-helpers.d.ts +16 -0
  98. package/dist/dts/utils/typings.d.ts +6 -0
  99. package/dist/dts/utils/whitespace-filter.d.ts +12 -0
  100. package/dist/esm/accordion/accordion.definition.js +0 -4
  101. package/dist/esm/accordion/accordion.definition.js.map +1 -1
  102. package/dist/esm/accordion/accordion.js +216 -3
  103. package/dist/esm/accordion/accordion.js.map +1 -1
  104. package/dist/esm/accordion/accordion.options.js +9 -0
  105. package/dist/esm/accordion/accordion.options.js.map +1 -0
  106. package/dist/esm/accordion/accordion.template.js +11 -1
  107. package/dist/esm/accordion/accordion.template.js.map +1 -1
  108. package/dist/esm/accordion-item/accordion-item.definition.js +0 -3
  109. package/dist/esm/accordion-item/accordion-item.definition.js.map +1 -1
  110. package/dist/esm/accordion-item/accordion-item.js +80 -4
  111. package/dist/esm/accordion-item/accordion-item.js.map +1 -1
  112. package/dist/esm/accordion-item/accordion-item.template.js +47 -2
  113. package/dist/esm/accordion-item/accordion-item.template.js.map +1 -1
  114. package/dist/esm/anchor-button/anchor-button.definition.js +0 -3
  115. package/dist/esm/anchor-button/anchor-button.definition.js.map +1 -1
  116. package/dist/esm/anchor-button/anchor-button.js +52 -4
  117. package/dist/esm/anchor-button/anchor-button.js.map +1 -1
  118. package/dist/esm/anchor-button/anchor-button.options.js +11 -0
  119. package/dist/esm/anchor-button/anchor-button.options.js.map +1 -1
  120. package/dist/esm/anchor-button/anchor-button.template.js +49 -1
  121. package/dist/esm/anchor-button/anchor-button.template.js.map +1 -1
  122. package/dist/esm/badge/badge.definition.js +0 -3
  123. package/dist/esm/badge/badge.definition.js.map +1 -1
  124. package/dist/esm/badge/badge.js +1 -1
  125. package/dist/esm/badge/badge.js.map +1 -1
  126. package/dist/esm/badge/badge.template.js +2 -2
  127. package/dist/esm/badge/badge.template.js.map +1 -1
  128. package/dist/esm/button/button.definition.js +0 -3
  129. package/dist/esm/button/button.definition.js.map +1 -1
  130. package/dist/esm/button/button.form-associated.js +14 -0
  131. package/dist/esm/button/button.form-associated.js.map +1 -0
  132. package/dist/esm/button/button.js +124 -4
  133. package/dist/esm/button/button.js.map +1 -1
  134. package/dist/esm/button/button.options.js +10 -0
  135. package/dist/esm/button/button.options.js.map +1 -1
  136. package/dist/esm/button/button.template.js +49 -1
  137. package/dist/esm/button/button.template.js.map +1 -1
  138. package/dist/esm/checkbox/checkbox.form-associated.js +14 -0
  139. package/dist/esm/checkbox/checkbox.form-associated.js.map +1 -0
  140. package/dist/esm/checkbox/checkbox.js +62 -4
  141. package/dist/esm/checkbox/checkbox.js.map +1 -1
  142. package/dist/esm/checkbox/checkbox.template.js +35 -7
  143. package/dist/esm/checkbox/checkbox.template.js.map +1 -1
  144. package/dist/esm/compound-button/compound-button.definition.js +0 -3
  145. package/dist/esm/compound-button/compound-button.definition.js.map +1 -1
  146. package/dist/esm/compound-button/compound-button.options.js.map +1 -1
  147. package/dist/esm/compound-button/compound-button.template.js +1 -1
  148. package/dist/esm/compound-button/compound-button.template.js.map +1 -1
  149. package/dist/esm/counter-badge/counter-badge.definition.js +0 -4
  150. package/dist/esm/counter-badge/counter-badge.definition.js.map +1 -1
  151. package/dist/esm/counter-badge/counter-badge.js +1 -1
  152. package/dist/esm/counter-badge/counter-badge.js.map +1 -1
  153. package/dist/esm/divider/divider.js +29 -4
  154. package/dist/esm/divider/divider.js.map +1 -1
  155. package/dist/esm/divider/divider.options.js +14 -5
  156. package/dist/esm/divider/divider.options.js.map +1 -1
  157. package/dist/esm/divider/divider.template.js +12 -1
  158. package/dist/esm/divider/divider.template.js.map +1 -1
  159. package/dist/esm/form-associated/form-associated.js +458 -0
  160. package/dist/esm/form-associated/form-associated.js.map +1 -0
  161. package/dist/esm/menu-button/menu-button.definition.js +0 -3
  162. package/dist/esm/menu-button/menu-button.definition.js.map +1 -1
  163. package/dist/esm/menu-button/menu-button.options.js.map +1 -1
  164. package/dist/esm/menu-button/menu-button.template.js +1 -1
  165. package/dist/esm/menu-button/menu-button.template.js.map +1 -1
  166. package/dist/esm/menu-item/menu-item.definition.js +0 -4
  167. package/dist/esm/menu-item/menu-item.definition.js.map +1 -1
  168. package/dist/esm/menu-item/menu-item.js +270 -4
  169. package/dist/esm/menu-item/menu-item.js.map +1 -1
  170. package/dist/esm/menu-item/menu-item.options.js +27 -0
  171. package/dist/esm/menu-item/menu-item.options.js.map +1 -0
  172. package/dist/esm/menu-item/menu-item.template.js +57 -2
  173. package/dist/esm/menu-item/menu-item.template.js.map +1 -1
  174. package/dist/esm/menu-list/menu-list.definition.js +0 -4
  175. package/dist/esm/menu-list/menu-list.definition.js.map +1 -1
  176. package/dist/esm/menu-list/menu-list.js +265 -10
  177. package/dist/esm/menu-list/menu-list.js.map +1 -1
  178. package/dist/esm/menu-list/menu-list.template.js +13 -1
  179. package/dist/esm/menu-list/menu-list.template.js.map +1 -1
  180. package/dist/esm/patterns/aria-globals.js +77 -0
  181. package/dist/esm/patterns/aria-globals.js.map +1 -0
  182. package/dist/esm/patterns/index.js +3 -0
  183. package/dist/esm/patterns/index.js.map +1 -0
  184. package/dist/esm/patterns/start-end.js +29 -0
  185. package/dist/esm/patterns/start-end.js.map +1 -0
  186. package/dist/esm/progress-bar/base-progress.js +61 -0
  187. package/dist/esm/progress-bar/base-progress.js.map +1 -0
  188. package/dist/esm/progress-bar/progress-bar.js +10 -3
  189. package/dist/esm/progress-bar/progress-bar.js.map +1 -1
  190. package/dist/esm/progress-bar/progress-bar.options.js.map +1 -1
  191. package/dist/esm/progress-bar/progress-bar.template.js +25 -1
  192. package/dist/esm/progress-bar/progress-bar.template.js.map +1 -1
  193. package/dist/esm/progress-ring/progress-ring.js +16 -0
  194. package/dist/esm/progress-ring/progress-ring.js.map +1 -0
  195. package/dist/esm/progress-ring/progress-ring.options.js +2 -0
  196. package/dist/esm/progress-ring/progress-ring.options.js.map +1 -0
  197. package/dist/esm/radio/radio.form-associated.js +14 -0
  198. package/dist/esm/radio/radio.form-associated.js.map +1 -0
  199. package/dist/esm/radio/radio.js +96 -3
  200. package/dist/esm/radio/radio.js.map +1 -1
  201. package/dist/esm/radio/radio.template.js +28 -2
  202. package/dist/esm/radio/radio.template.js.map +1 -1
  203. package/dist/esm/radio-group/index.js +0 -1
  204. package/dist/esm/radio-group/index.js.map +1 -1
  205. package/dist/esm/radio-group/radio-group.js +346 -3
  206. package/dist/esm/radio-group/radio-group.js.map +1 -1
  207. package/dist/esm/radio-group/radio-group.options.js +7 -0
  208. package/dist/esm/radio-group/radio-group.options.js.map +1 -0
  209. package/dist/esm/radio-group/radio-group.template.js +30 -1
  210. package/dist/esm/radio-group/radio-group.template.js.map +1 -1
  211. package/dist/esm/slider/slider-utilities.js +12 -0
  212. package/dist/esm/slider/slider-utilities.js.map +1 -0
  213. package/dist/esm/slider/slider.form-associated.js +14 -0
  214. package/dist/esm/slider/slider.form-associated.js.map +1 -0
  215. package/dist/esm/slider/slider.js +432 -16
  216. package/dist/esm/slider/slider.js.map +1 -1
  217. package/dist/esm/slider/slider.options.js +11 -1
  218. package/dist/esm/slider/slider.options.js.map +1 -1
  219. package/dist/esm/slider/slider.template.js +38 -1
  220. package/dist/esm/slider/slider.template.js.map +1 -1
  221. package/dist/esm/spinner/spinner.definition.js +0 -4
  222. package/dist/esm/spinner/spinner.definition.js.map +1 -1
  223. package/dist/esm/spinner/spinner.js +2 -2
  224. package/dist/esm/spinner/spinner.js.map +1 -1
  225. package/dist/esm/spinner/spinner.template.js +27 -1
  226. package/dist/esm/spinner/spinner.template.js.map +1 -1
  227. package/dist/esm/switch/switch.form-associated.js +14 -0
  228. package/dist/esm/switch/switch.form-associated.js.map +1 -0
  229. package/dist/esm/switch/switch.js +48 -3
  230. package/dist/esm/switch/switch.js.map +1 -1
  231. package/dist/esm/switch/switch.template.js +25 -1
  232. package/dist/esm/switch/switch.template.js.map +1 -1
  233. package/dist/esm/tab/tab.js +14 -3
  234. package/dist/esm/tab/tab.js.map +1 -1
  235. package/dist/esm/tab/tab.template.js +1 -1
  236. package/dist/esm/tab/tab.template.js.map +1 -1
  237. package/dist/esm/tab-panel/tab-panel.js +2 -2
  238. package/dist/esm/tab-panel/tab-panel.js.map +1 -1
  239. package/dist/esm/tab-panel/tab-panel.template.js +8 -1
  240. package/dist/esm/tab-panel/tab-panel.template.js.map +1 -1
  241. package/dist/esm/tabs/tabs.js +278 -5
  242. package/dist/esm/tabs/tabs.js.map +1 -1
  243. package/dist/esm/tabs/tabs.options.js +6 -2
  244. package/dist/esm/tabs/tabs.options.js.map +1 -1
  245. package/dist/esm/tabs/tabs.template.js +14 -1
  246. package/dist/esm/tabs/tabs.template.js.map +1 -1
  247. package/dist/esm/text-input/index.js +0 -1
  248. package/dist/esm/text-input/index.js.map +1 -1
  249. package/dist/esm/text-input/text-field.form-associated.js +14 -0
  250. package/dist/esm/text-input/text-field.form-associated.js.map +1 -0
  251. package/dist/esm/text-input/text-input.js +167 -7
  252. package/dist/esm/text-input/text-input.js.map +1 -1
  253. package/dist/esm/text-input/text-input.options.js +26 -0
  254. package/dist/esm/text-input/text-input.options.js.map +1 -1
  255. package/dist/esm/text-input/text-input.template.js +64 -1
  256. package/dist/esm/text-input/text-input.template.js.map +1 -1
  257. package/dist/esm/theme/design-tokens.js +53 -1
  258. package/dist/esm/theme/design-tokens.js.map +1 -1
  259. package/dist/esm/toggle-button/toggle-button.definition.js +0 -2
  260. package/dist/esm/toggle-button/toggle-button.definition.js.map +1 -1
  261. package/dist/esm/toggle-button/toggle-button.options.js.map +1 -1
  262. package/dist/esm/toggle-button/toggle-button.template.js +1 -1
  263. package/dist/esm/toggle-button/toggle-button.template.js.map +1 -1
  264. package/dist/esm/utils/benchmark-dependencies/tokens.js +2 -0
  265. package/dist/esm/utils/benchmark-dependencies/tokens.js.map +1 -0
  266. package/dist/esm/utils/benchmark-wrapper.js +18 -0
  267. package/dist/esm/utils/benchmark-wrapper.js.map +1 -0
  268. package/dist/esm/utils/direction.js +15 -0
  269. package/dist/esm/utils/direction.js.map +1 -0
  270. package/dist/esm/utils/index.js +5 -0
  271. package/dist/esm/utils/index.js.map +1 -0
  272. package/dist/esm/utils/template-helpers.js +19 -0
  273. package/dist/esm/utils/template-helpers.js.map +1 -0
  274. package/dist/esm/utils/typings.js +3 -0
  275. package/dist/esm/utils/typings.js.map +1 -0
  276. package/dist/esm/utils/whitespace-filter.js +13 -0
  277. package/dist/esm/utils/whitespace-filter.js.map +1 -0
  278. package/dist/fluent-web-components.api.json +9315 -3940
  279. package/dist/storybook/284.0946b1fb.iframe.bundle.js +2 -0
  280. package/dist/storybook/iframe.html +1 -1
  281. package/dist/storybook/main.59da076f.iframe.bundle.js +2 -0
  282. package/dist/storybook/project.json +1 -1
  283. package/dist/web-components.d.ts +2194 -241
  284. package/dist/web-components.js +2069 -3196
  285. package/dist/web-components.min.js +123 -123
  286. package/docs/api-report.md +600 -90
  287. package/package.json +5 -2
  288. package/tensile.config.js +24 -0
  289. package/dist/storybook/350.e4be85c2.iframe.bundle.js +0 -462
  290. package/dist/storybook/350.e4be85c2.iframe.bundle.js.map +0 -1
  291. package/dist/storybook/main.b095c2e8.iframe.bundle.js +0 -2
  292. /package/dist/storybook/{350.e4be85c2.iframe.bundle.js.LICENSE.txt → 284.0946b1fb.iframe.bundle.js.LICENSE.txt} +0 -0
  293. /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 type { ButtonOptions } from '@microsoft/fast-foundation/button.js';
2
- import type { ValuesOf } from '@microsoft/fast-foundation/utilities.js';
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
- export { ButtonOptions };
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 { FASTCheckbox } from '@microsoft/fast-foundation/checkbox.js';
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
- * The base class used for constucting a fluent checkbox custom element
5
+ * Checkbox configuration options
5
6
  * @public
6
7
  */
7
- export declare class Checkbox extends FASTCheckbox {
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,4 +1,4 @@
1
- import type { ValuesOf } from '@microsoft/fast-foundation/utilities.js';
1
+ import type { ValuesOf } from '../utils/index.js';
2
2
  /**
3
3
  * Checkbox shape
4
4
  * @public
@@ -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 '@microsoft/fast-foundation/button.js';
2
- import type { ValuesOf } from '@microsoft/fast-foundation/utilities.js';
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 '@microsoft/fast-foundation/patterns.js';
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,5 +1,5 @@
1
- import type { ValuesOf } from '@microsoft/fast-foundation/utilities.js';
2
1
  import { BadgeOptions } from '../badge/badge.options.js';
2
+ import type { ValuesOf } from '../utils/index.js';
3
3
  /**
4
4
  * CounterBadge options
5
5
  * @public
@@ -1,4 +1,4 @@
1
- import type { ValuesOf } from '@microsoft/fast-foundation/utilities.js';
1
+ import type { ValuesOf } from '../utils/index.js';
2
2
  /**
3
3
  * Dialog modal type
4
4
  * @public
@@ -1,12 +1,28 @@
1
- import { FASTDivider } from '@microsoft/fast-foundation/divider.js';
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
- * This class extends the FASTDivider. 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.
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 FASTDivider {
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 { DividerOrientation, DividerRole } from '@microsoft/fast-foundation/divider.js';
2
- import type { ValuesOf } from '@microsoft/fast-foundation/utilities.js';
1
+ import type { ValuesOf } from '../utils/index.js';
3
2
  /**
4
- * Fast Foundation DividerRole property
3
+ * Divider roles
5
4
  * @public
6
5
  */
7
- export { DividerRole };
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
- * Fast Foundation Orientation property
33
+ * The types for Divider orientation
10
34
  * @public
11
35
  */
12
- export { DividerOrientation };
36
+ export declare type DividerOrientation = ValuesOf<typeof DividerOrientation>;
13
37
  /**
14
38
  * Align content within divider
15
39
  * @public
@@ -1,5 +1,6 @@
1
1
  import { ElementViewTemplate } from '@microsoft/fast-element';
2
2
  import type { Divider } from './divider.js';
3
+ export declare function dividerTemplate<T extends Divider>(): ElementViewTemplate<T>;
3
4
  /**
4
5
  * Template for the Divider component
5
6
  * @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,4 +1,4 @@
1
- import type { ValuesOf } from '@microsoft/fast-foundation/utilities.js';
1
+ import type { ValuesOf } from '../utils/index.js';
2
2
  /**
3
3
  * Image fit
4
4
  * @public
@@ -1,4 +1,4 @@
1
- import type { ValuesOf } from '@microsoft/fast-foundation/utilities.js';
1
+ import type { ValuesOf } from '../utils/index.js';
2
2
  /**
3
3
  * A Labels font size can be small, medium, or large
4
4
  */
@@ -1,8 +1,5 @@
1
1
  import { MenuButton } from './menu-button.js';
2
2
  /**
3
- * The Fluent Menu 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-button\>
@@ -1,5 +1,5 @@
1
- import type { ButtonOptions } from '@microsoft/fast-foundation/button.js';
2
- import type { ValuesOf } from '@microsoft/fast-foundation/utilities.js';
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