@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,9 +1,166 @@
1
- import { FASTMenuItem, MenuItemRole } from '@microsoft/fast-foundation/menu-item.js';
1
+ import { FASTElement } from '@microsoft/fast-element';
2
+ import type { StaticallyComposableHTML } from '../utils/template-helpers.js';
3
+ import type { StartEndOptions } from '../patterns/start-end.js';
4
+ import { StartEnd } from '../patterns/start-end.js';
5
+ import { MenuItemRole, roleForMenuItem } from './menu-item.options.js';
2
6
  export declare type MenuItemColumnCount = 0 | 1 | 2;
3
- export { MenuItemRole };
7
+ export { MenuItemRole, roleForMenuItem };
4
8
  /**
5
- * The base class used for constructing a fluent-menu-item custom element
9
+ * Menu Item configuration options
6
10
  * @public
7
11
  */
8
- export declare class MenuItem extends FASTMenuItem {
12
+ export declare type MenuItemOptions = StartEndOptions<MenuItem> & {
13
+ checkboxIndicator?: StaticallyComposableHTML<MenuItem>;
14
+ expandCollapseGlyph?: StaticallyComposableHTML<MenuItem>;
15
+ radioIndicator?: StaticallyComposableHTML<MenuItem>;
16
+ };
17
+ /**
18
+ * A Switch Custom HTML Element.
19
+ * Implements {@link https://www.w3.org/TR/wai-aria-1.1/#menuitem | ARIA menuitem }, {@link https://www.w3.org/TR/wai-aria-1.1/#menuitemcheckbox | ARIA menuitemcheckbox}, or {@link https://www.w3.org/TR/wai-aria-1.1/#menuitemradio | ARIA menuitemradio }.
20
+ *
21
+ * @slot checked-indicator - The checked indicator
22
+ * @slot radio-indicator - The radio indicator
23
+ * @slot start - Content which can be provided before the menu item content
24
+ * @slot end - Content which can be provided after the menu item content
25
+ * @slot - The default slot for menu item content
26
+ * @slot expand-collapse-indicator - The expand/collapse indicator
27
+ * @slot submenu - Used to nest menu's within menu items
28
+ * @csspart input-container - The element representing the visual checked or radio indicator
29
+ * @csspart checkbox - The element wrapping the `menuitemcheckbox` indicator
30
+ * @csspart radio - The element wrapping the `menuitemradio` indicator
31
+ * @csspart content - The element wrapping the menu item content
32
+ * @csspart expand-collapse-glyph-container - The element wrapping the expand collapse element
33
+ * @csspart expand-collapse - The expand/collapse element
34
+ * @csspart submenu-region - The container for the submenu, used for positioning
35
+ * @fires expanded-change - Fires a custom 'expanded-change' event when the expanded state changes
36
+ * @fires change - Fires a custom 'change' event when a non-submenu item with a role of `menuitemcheckbox`, `menuitemradio`, or `menuitem` is invoked
37
+ *
38
+ * @public
39
+ */
40
+ export declare class MenuItem extends FASTElement {
41
+ /**
42
+ * The disabled state of the element.
43
+ *
44
+ * @public
45
+ * @remarks
46
+ * HTML Attribute: disabled
47
+ */
48
+ disabled: boolean;
49
+ /**
50
+ * The expanded state of the element.
51
+ *
52
+ * @public
53
+ * @remarks
54
+ * HTML Attribute: expanded
55
+ */
56
+ expanded: boolean;
57
+ protected expandedChanged(prev: boolean | undefined, next: boolean): void;
58
+ /**
59
+ * The role of the element.
60
+ *
61
+ * @public
62
+ * @remarks
63
+ * HTML Attribute: role
64
+ */
65
+ role: MenuItemRole;
66
+ /**
67
+ * Cleanup function for the submenu positioner.
68
+ *
69
+ * @public
70
+ */
71
+ cleanup: () => void;
72
+ /**
73
+ * The checked value of the element.
74
+ *
75
+ * @public
76
+ * @remarks
77
+ * HTML Attribute: checked
78
+ */
79
+ checked: boolean;
80
+ protected checkedChanged(oldValue: boolean, newValue: boolean): void;
81
+ /**
82
+ * The hidden attribute.
83
+ *
84
+ * @public
85
+ * @remarks
86
+ * HTML Attribute: hidden
87
+ */
88
+ hidden: boolean;
89
+ /**
90
+ * The submenu slotted content.
91
+ *
92
+ * @internal
93
+ */
94
+ slottedSubmenu: HTMLElement[];
95
+ /**
96
+ * @internal
97
+ */
98
+ get hasSubmenu(): boolean;
99
+ /**
100
+ * Sets the submenu and updates its position.
101
+ *
102
+ * @internal
103
+ */
104
+ protected slottedSubmenuChanged(prev: HTMLElement[] | undefined, next: HTMLElement[]): void;
105
+ /**
106
+ * The container for the submenu.
107
+ *
108
+ * @internal
109
+ */
110
+ submenuContainer: HTMLDivElement;
111
+ /**
112
+ * @internal
113
+ */
114
+ submenu: HTMLElement | undefined;
115
+ private focusSubmenuOnLoad;
116
+ /**
117
+ * @internal
118
+ */
119
+ disconnectedCallback(): void;
120
+ /**
121
+ * @internal
122
+ */
123
+ handleMenuItemKeyDown: (e: KeyboardEvent) => boolean;
124
+ /**
125
+ * @internal
126
+ */
127
+ handleMenuItemClick: (e: MouseEvent) => boolean;
128
+ /**
129
+ * @internal
130
+ */
131
+ submenuLoaded: () => void;
132
+ /**
133
+ * @internal
134
+ */
135
+ handleMouseOver: (e: MouseEvent) => boolean;
136
+ /**
137
+ * @internal
138
+ */
139
+ handleMouseOut: (e: MouseEvent) => boolean;
140
+ /**
141
+ * @internal
142
+ */
143
+ private closeSubMenu;
144
+ /**
145
+ * @internal
146
+ */
147
+ private expandAndFocus;
148
+ /**
149
+ * @internal
150
+ */
151
+ private invoke;
152
+ /**
153
+ * Calculate and apply submenu positioning.
154
+ *
155
+ * @public
156
+ */
157
+ updateSubmenu(): void;
158
+ }
159
+ /**
160
+ * Mark internal because exporting class and interface of the same name
161
+ * confuses API documenter.
162
+ * TODO: https://github.com/microsoft/fast/issues/3317
163
+ * @internal
164
+ */
165
+ export interface MenuItem extends StartEnd {
9
166
  }
@@ -1,9 +1,5 @@
1
1
  import { MenuItem } from './menu-item.js';
2
2
  /**
3
- * The Fluent Menu Item Element. Implements {@link @microsoft/fast-foundation#MenuItem },
4
- * {@link @microsoft/fast-foundation#menuItemTemplate}
5
- *
6
- *
7
3
  * @public
8
4
  * @remarks
9
5
  * HTML Element: <fluent-menu-item>
@@ -0,0 +1,30 @@
1
+ import type { ValuesOf } from '../utils/index.js';
2
+ /**
3
+ * Menu items roles.
4
+ * @public
5
+ */
6
+ export declare const MenuItemRole: {
7
+ /**
8
+ * The menu item has a "menuitem" role
9
+ */
10
+ readonly menuitem: "menuitem";
11
+ /**
12
+ * The menu item has a "menuitemcheckbox" role
13
+ */
14
+ readonly menuitemcheckbox: "menuitemcheckbox";
15
+ /**
16
+ * The menu item has a "menuitemradio" role
17
+ */
18
+ readonly menuitemradio: "menuitemradio";
19
+ };
20
+ /**
21
+ * The types for menu item roles
22
+ * @public
23
+ */
24
+ export declare type MenuItemRole = ValuesOf<typeof MenuItemRole>;
25
+ /**
26
+ * @internal
27
+ */
28
+ export declare const roleForMenuItem: {
29
+ [value in keyof typeof MenuItemRole]: typeof MenuItemRole[value];
30
+ };
@@ -1,3 +1,4 @@
1
1
  import type { ElementViewTemplate } from '@microsoft/fast-element';
2
- import type { MenuItem } from './menu-item.js';
2
+ import type { MenuItem, MenuItemOptions } from './menu-item.js';
3
+ export declare function menuItemTemplate<T extends MenuItem>(options?: MenuItemOptions): ElementViewTemplate<T>;
3
4
  export declare const template: ElementViewTemplate<MenuItem>;
@@ -1,9 +1,76 @@
1
- import { FASTMenu } from '@microsoft/fast-foundation/menu.js';
1
+ import { FASTElement } from '@microsoft/fast-element';
2
2
  /**
3
- * The base class used for constructing a fluent-menu-list custom element
3
+ * A Menu Custom HTML Element.
4
+ * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#menu | ARIA menu }.
5
+ *
6
+ * @slot - The default slot for the menu items
7
+ *
4
8
  * @public
5
9
  */
6
- export declare class MenuList extends FASTMenu {
7
- protected setItems(): void;
10
+ export declare class MenuList extends FASTElement {
11
+ /**
12
+ * @internal
13
+ */
14
+ items: HTMLElement[];
15
+ protected itemsChanged(oldValue: HTMLElement[], newValue: HTMLElement[]): void;
16
+ protected menuItems: Element[] | undefined;
17
+ private expandedItem;
18
+ /**
19
+ * The index of the focusable element in the items array
20
+ * defaults to -1
21
+ */
22
+ private focusIndex;
23
+ private static focusableElementRoles;
24
+ /**
25
+ * @internal
26
+ */
27
+ connectedCallback(): void;
28
+ /**
29
+ * @internal
30
+ */
31
+ disconnectedCallback(): void;
32
+ /**
33
+ * @internal
34
+ */
35
+ readonly isNestedMenu: () => boolean;
36
+ /**
37
+ * Focuses the first item in the menu.
38
+ *
39
+ * @public
40
+ */
41
+ focus(): void;
42
+ /**
43
+ * Collapses any expanded menu items.
44
+ *
45
+ * @public
46
+ */
47
+ collapseExpandedItem(): void;
48
+ /**
49
+ * @internal
50
+ */
51
+ handleMenuKeyDown(e: KeyboardEvent): void | boolean;
52
+ /**
53
+ * if focus is moving out of the menu, reset to a stable initial state
54
+ * @internal
55
+ */
56
+ handleFocusOut: (e: FocusEvent) => void;
57
+ private handleItemFocus;
58
+ private handleExpandedChanged;
59
+ private removeItemListeners;
8
60
  private static elementIndent;
61
+ protected setItems(): void;
62
+ handleChange(source: any, propertyName: string): void;
63
+ /**
64
+ * handle change from child element
65
+ */
66
+ private changeHandler;
67
+ /**
68
+ * check if the item is a menu item
69
+ */
70
+ protected isMenuItemElement: (el: Element) => el is HTMLElement;
71
+ /**
72
+ * check if the item is focusable
73
+ */
74
+ private isFocusableElement;
75
+ private setFocus;
9
76
  }
@@ -1,9 +1,5 @@
1
1
  import { MenuList } from './menu-list.js';
2
2
  /**
3
- * The Fluent MenuList Element. Implements {@link @microsoft/fast-foundation#Menu },
4
- * {@link @microsoft/fast-foundation#menuTemplate}
5
- *
6
- *
7
3
  * @public
8
4
  * @remarks
9
5
  * HTML Element: <fluent-menu-list>
@@ -1,3 +1,4 @@
1
1
  import { ElementViewTemplate } from '@microsoft/fast-element';
2
2
  import type { MenuList } from './menu-list.js';
3
+ export declare function menuTemplate<T extends MenuList>(): ElementViewTemplate<T>;
3
4
  export declare const template: ElementViewTemplate<MenuList>;
@@ -0,0 +1,189 @@
1
+ /**
2
+ * Some states and properties are applicable to all host language elements regardless of whether a role is applied.
3
+ * The following global states and properties are supported by all roles and by all base markup elements.
4
+ * {@link https://www.w3.org/TR/wai-aria-1.1/#global_states}
5
+ *
6
+ * This is intended to be used as a mixin. Be sure you extend FASTElement.
7
+ *
8
+ * @public
9
+ */
10
+ export declare class ARIAGlobalStatesAndProperties {
11
+ /**
12
+ * Indicates whether assistive technologies will present all, or only parts of,
13
+ * the changed region based on the change notifications defined by the aria-relevant attribute.
14
+ * {@link https://www.w3.org/TR/wai-aria-1.1/#aria-atomic}
15
+ *
16
+ * @public
17
+ * @remarks
18
+ * HTML Attribute: aria-atomic
19
+ */
20
+ ariaAtomic: 'true' | 'false' | string | null;
21
+ /**
22
+ * Indicates an element is being modified and that assistive technologies MAY want to wait
23
+ * until the modifications are complete before exposing them to the user.
24
+ * {@link https://www.w3.org/TR/wai-aria-1.1/#aria-busy}
25
+ *
26
+ * @public
27
+ * @remarks
28
+ * HTML Attribute: aria-busy
29
+ */
30
+ ariaBusy: 'true' | 'false' | string | null;
31
+ /**
32
+ * Identifies the element (or elements) whose contents or presence are controlled by the current element.
33
+ *
34
+ * {@link https://www.w3.org/TR/wai-aria-1.1/#aria-controls}
35
+ * @public
36
+ * @remarks
37
+ * HTML Attribute: aria-controls
38
+ */
39
+ ariaControls: string | null;
40
+ /**
41
+ * Indicates the element that represents the current item within a container or set of related elements.
42
+ *
43
+ * {@link https://www.w3.org/TR/wai-aria-1.1/#aria-current}
44
+ * @public
45
+ * @remarks
46
+ * HTML Attribute: aria-current
47
+ */
48
+ ariaCurrent: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false' | string | null;
49
+ /**
50
+ * Identifies the element (or elements) that describes the object.
51
+ *
52
+ * {@link https://www.w3.org/TR/wai-aria-1.1/#aria-describedby}
53
+ * @public
54
+ * @remarks
55
+ * HTML Attribute: aria-describedby
56
+ */
57
+ ariaDescribedby: string | null;
58
+ /**
59
+ * Identifies the element that provides a detailed, extended description for the object.
60
+ *
61
+ * {@link https://www.w3.org/TR/wai-aria-1.1/#aria-details}
62
+ * @public
63
+ * @remarks
64
+ * HTML Attribute: aria-details
65
+ */
66
+ ariaDetails: string | null;
67
+ /**
68
+ * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
69
+ *
70
+ * {@link https://www.w3.org/TR/wai-aria-1.1/#aria-disabled}
71
+ * @public
72
+ * @remarks
73
+ * HTML Attribute: aria-disabled
74
+ */
75
+ ariaDisabled: 'true' | 'false' | string | null;
76
+ /**
77
+ * Identifies the element that provides an error message for the object.
78
+ *
79
+ * {@link https://www.w3.org/TR/wai-aria-1.1/#aria-errormessage}
80
+ * @public
81
+ * @remarks
82
+ * HTML Attribute: aria-errormessage
83
+ */
84
+ ariaErrormessage: string | null;
85
+ /**
86
+ * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,
87
+ * allows assistive technology to override the general default of reading in document source order.
88
+ *
89
+ * {@link https://www.w3.org/TR/wai-aria-1.1/#aria-flowto}
90
+ * @public
91
+ * @remarks
92
+ * HTML Attribute: aria-flowto
93
+ */
94
+ ariaFlowto: string | null;
95
+ /**
96
+ * Indicates the availability and type of interactive popup element,
97
+ * such as menu or dialog, that can be triggered by an element.
98
+ *
99
+ * {@link https://www.w3.org/TR/wai-aria-1.1/#aria-haspopup}
100
+ * @public
101
+ * @remarks
102
+ * HTML Attribute: aria-haspopup
103
+ */
104
+ ariaHaspopup: 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | string | null;
105
+ /**
106
+ * Indicates whether the element is exposed to an accessibility API
107
+ *
108
+ * {@link https://www.w3.org/TR/wai-aria-1.1/#aria-hidden}
109
+ * @public
110
+ * @remarks
111
+ * HTML Attribute: aria-hidden
112
+ */
113
+ ariaHidden: 'false' | 'true' | string | null;
114
+ /**
115
+ * Indicates the entered value does not conform to the format expected by the application.
116
+ *
117
+ * {@link https://www.w3.org/TR/wai-aria-1.1/#aria-invalid}
118
+ * @public
119
+ * @remarks
120
+ * HTML Attribute: aria-invalid
121
+ */
122
+ ariaInvalid: 'false' | 'true' | 'grammar' | 'spelling' | string | null;
123
+ /**
124
+ * Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.
125
+ *
126
+ * {@link https://www.w3.org/TR/wai-aria-1.1/#aria-keyshortcuts}
127
+ * @public
128
+ * @remarks
129
+ * HTML Attribute: aria-keyshortcuts
130
+ */
131
+ ariaKeyshortcuts: string | null;
132
+ /**
133
+ * Defines a string value that labels the current element.
134
+ *
135
+ * {@link https://www.w3.org/TR/wai-aria-1.1/#aria-label}
136
+ * @public
137
+ * @remarks
138
+ * HTML Attribute: aria-label
139
+ */
140
+ ariaLabel: string | null;
141
+ /**
142
+ * Identifies the element (or elements) that labels the current element.
143
+ *
144
+ * {@link https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby}
145
+ * @public
146
+ * @remarks
147
+ * HTML Attribute: aria-labelledby
148
+ */
149
+ ariaLabelledby: string | null;
150
+ /**
151
+ * Indicates that an element will be updated, and describes the types of updates the user agents,
152
+ * assistive technologies, and user can expect from the live region.
153
+ *
154
+ * {@link https://www.w3.org/TR/wai-aria-1.1/#aria-live}
155
+ * @public
156
+ * @remarks
157
+ * HTML Attribute: aria-live
158
+ */
159
+ ariaLive: 'assertive' | 'off' | 'polite' | string | null;
160
+ /**
161
+ * Identifies an element (or elements) in order to define a visual,
162
+ * functional, or contextual parent/child relationship between DOM elements
163
+ * where the DOM hierarchy cannot be used to represent the relationship.
164
+ *
165
+ * {@link https://www.w3.org/TR/wai-aria-1.1/#aria-owns}
166
+ * @public
167
+ * @remarks
168
+ * HTML Attribute: aria-owns
169
+ */
170
+ ariaOwns: string | null;
171
+ /**
172
+ * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
173
+ *
174
+ * {@link https://www.w3.org/TR/wai-aria-1.1/#aria-relevant}
175
+ * @public
176
+ * @remarks
177
+ * HTML Attribute: aria-relevant
178
+ */
179
+ ariaRelevant: 'additions' | 'additions text' | 'all' | 'removals' | 'text' | string | null;
180
+ /**
181
+ * Defines a human-readable, author-localized description for the role of an element.
182
+ *
183
+ * {@link https://www.w3.org/TR/wai-aria-1.1/#aria-roledescription}
184
+ * @public
185
+ * @remarks
186
+ * HTML Attribute: aria-roledescription
187
+ */
188
+ ariaRoledescription: string | null;
189
+ }
@@ -0,0 +1,2 @@
1
+ export * from './aria-globals.js';
2
+ export * from './start-end.js';
@@ -0,0 +1,44 @@
1
+ import { CaptureType } from '@microsoft/fast-element';
2
+ import type { StaticallyComposableHTML } from '../utils/index.js';
3
+ /**
4
+ * Start configuration options
5
+ * @public
6
+ */
7
+ export declare type StartOptions<TSource = any, TParent = any> = {
8
+ start?: StaticallyComposableHTML<TSource, TParent>;
9
+ };
10
+ /**
11
+ * End configuration options
12
+ * @public
13
+ */
14
+ export declare type EndOptions<TSource = any, TParent = any> = {
15
+ end?: StaticallyComposableHTML<TSource, TParent>;
16
+ };
17
+ /**
18
+ * Start/End configuration options
19
+ * @public
20
+ */
21
+ export declare type StartEndOptions<TSource = any, TParent = any> = StartOptions<TSource, TParent> & EndOptions<TSource, TParent>;
22
+ /**
23
+ * A mixin class implementing start and end slots.
24
+ * These are generally used to decorate text elements with icons or other visual indicators.
25
+ * @public
26
+ */
27
+ export declare class StartEnd {
28
+ start: HTMLSlotElement;
29
+ end: HTMLSlotElement;
30
+ }
31
+ /**
32
+ * The template for the end slot.
33
+ * For use with {@link StartEnd}
34
+ *
35
+ * @public
36
+ */
37
+ export declare function endSlotTemplate<TSource extends StartEnd = StartEnd, TParent = any>(options: EndOptions<TSource, TParent>): CaptureType<TSource, TParent>;
38
+ /**
39
+ * The template for the start slots.
40
+ * For use with {@link StartEnd}
41
+ *
42
+ * @public
43
+ */
44
+ export declare function startSlotTemplate<TSource extends StartEnd = StartEnd, TParent = any>(options: StartOptions<TSource, TParent>): CaptureType<TSource, TParent>;
@@ -0,0 +1,41 @@
1
+ import { FASTElement } from '@microsoft/fast-element';
2
+ /**
3
+ * A base class for progress components.
4
+ * @public
5
+ */
6
+ export declare class BaseProgress extends FASTElement {
7
+ /**
8
+ * The value of the progress
9
+ * @public
10
+ * @remarks
11
+ * HTML Attribute: value
12
+ */
13
+ value: number | null;
14
+ protected valueChanged(): void;
15
+ /**
16
+ * The minimum value
17
+ * @public
18
+ * @remarks
19
+ * HTML Attribute: min
20
+ */
21
+ min: number;
22
+ protected minChanged(): void;
23
+ /**
24
+ * The maximum value
25
+ * @public
26
+ * @remarks
27
+ * HTML Attribute: max
28
+ */
29
+ max: number;
30
+ protected maxChanged(): void;
31
+ /**
32
+ * Indicates progress in %
33
+ * @internal
34
+ */
35
+ percentComplete: number;
36
+ /**
37
+ * @internal
38
+ */
39
+ connectedCallback(): void;
40
+ private updatePercentComplete;
41
+ }
@@ -1,10 +1,17 @@
1
- import { FASTProgress } from '@microsoft/fast-foundation/progress.js';
2
- import type { ProgressBarShape, ProgressBarThickness, ProgressBarValidationState } from './progress-bar.options.js';
1
+ import { BaseProgress } from './base-progress.js';
2
+ import { ProgressBarShape, ProgressBarThickness, ProgressBarValidationState } from './progress-bar.options.js';
3
3
  /**
4
- * The base class used for constructing a fluent-progress-bar custom element
4
+ * An Progress HTML Element.
5
+ * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#progressbar | ARIA progressbar }.
6
+ *
7
+ * @slot indeterminate - The slot for a custom indeterminate indicator
8
+ * @csspart progress - Represents the progress element
9
+ * @csspart determinate - The determinate indicator
10
+ * @csspart indeterminate - The indeterminate indicator
11
+ *
5
12
  * @public
6
13
  */
7
- export declare class ProgressBar extends FASTProgress {
14
+ export declare class ProgressBar extends BaseProgress {
8
15
  /**
9
16
  * The thickness of the progress bar
10
17
  *
@@ -1,4 +1,5 @@
1
- import type { ValuesOf } from '@microsoft/fast-foundation/utilities.js';
1
+ import type { StaticallyComposableHTML, ValuesOf } from '../utils/index.js';
2
+ import { ProgressBar } from './progress-bar.js';
2
3
  /**
3
4
  * ProgressBarThickness Constants
4
5
  * @public
@@ -39,3 +40,11 @@ export declare const ProgressBarValidationState: {
39
40
  * @public
40
41
  */
41
42
  export declare type ProgressBarValidationState = ValuesOf<typeof ProgressBarValidationState>;
43
+ /**
44
+ * Progress configuration options
45
+ * @public
46
+ */
47
+ export declare type ProgressOptions = {
48
+ indeterminateIndicator1?: StaticallyComposableHTML<ProgressBar>;
49
+ indeterminateIndicator2?: StaticallyComposableHTML<ProgressBar>;
50
+ };
@@ -1,3 +1,5 @@
1
1
  import type { ElementViewTemplate } from '@microsoft/fast-element';
2
+ import type { ProgressOptions } from './progress-bar.options.js';
2
3
  import type { ProgressBar } from './progress-bar.js';
4
+ export declare function progressTemplate<T extends ProgressBar>(options?: ProgressOptions): ElementViewTemplate<T>;
3
5
  export declare const template: ElementViewTemplate<ProgressBar>;
@@ -0,0 +1,15 @@
1
+ import { BaseProgress } from '../progress-bar/base-progress.js';
2
+ /**
3
+ * An circular Progress HTML Element.
4
+ * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#progressbar | ARIA progressbar }.
5
+ *
6
+ * @slot indeterminate - The slot for a custom indeterminate indicator
7
+ * @slot determinate - The slot for a custom determinate indicator
8
+ * @csspart progress - Represents the progress element
9
+ * @csspart determinate - The determinate indicator
10
+ * @csspart background - The background
11
+ *
12
+ * @public
13
+ */
14
+ export declare class ProgressRing extends BaseProgress {
15
+ }
@@ -0,0 +1,9 @@
1
+ import type { StaticallyComposableHTML } from '../utils/template-helpers.js';
2
+ import type { ProgressRing } from './progress-ring.js';
3
+ /**
4
+ * ProgressRing configuration options
5
+ * @public
6
+ */
7
+ export declare type ProgressRingOptions = {
8
+ indeterminateIndicator?: StaticallyComposableHTML<ProgressRing>;
9
+ };