@fluentui/web-components 3.0.0-beta.7 → 3.0.0-beta.8

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 (283) hide show
  1. package/CHANGELOG.md +11 -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/toggle-button/toggle-button.definition.d.ts +0 -2
  91. package/dist/dts/toggle-button/toggle-button.options.d.ts +2 -2
  92. package/dist/dts/utils/direction.d.ts +10 -0
  93. package/dist/dts/utils/index.d.ts +4 -0
  94. package/dist/dts/utils/template-helpers.d.ts +16 -0
  95. package/dist/dts/utils/typings.d.ts +6 -0
  96. package/dist/dts/utils/whitespace-filter.d.ts +12 -0
  97. package/dist/esm/accordion/accordion.definition.js +0 -4
  98. package/dist/esm/accordion/accordion.definition.js.map +1 -1
  99. package/dist/esm/accordion/accordion.js +216 -3
  100. package/dist/esm/accordion/accordion.js.map +1 -1
  101. package/dist/esm/accordion/accordion.options.js +9 -0
  102. package/dist/esm/accordion/accordion.options.js.map +1 -0
  103. package/dist/esm/accordion/accordion.template.js +11 -1
  104. package/dist/esm/accordion/accordion.template.js.map +1 -1
  105. package/dist/esm/accordion-item/accordion-item.definition.js +0 -3
  106. package/dist/esm/accordion-item/accordion-item.definition.js.map +1 -1
  107. package/dist/esm/accordion-item/accordion-item.js +80 -4
  108. package/dist/esm/accordion-item/accordion-item.js.map +1 -1
  109. package/dist/esm/accordion-item/accordion-item.template.js +47 -2
  110. package/dist/esm/accordion-item/accordion-item.template.js.map +1 -1
  111. package/dist/esm/anchor-button/anchor-button.definition.js +0 -3
  112. package/dist/esm/anchor-button/anchor-button.definition.js.map +1 -1
  113. package/dist/esm/anchor-button/anchor-button.js +52 -4
  114. package/dist/esm/anchor-button/anchor-button.js.map +1 -1
  115. package/dist/esm/anchor-button/anchor-button.options.js +11 -0
  116. package/dist/esm/anchor-button/anchor-button.options.js.map +1 -1
  117. package/dist/esm/anchor-button/anchor-button.template.js +49 -1
  118. package/dist/esm/anchor-button/anchor-button.template.js.map +1 -1
  119. package/dist/esm/badge/badge.definition.js +0 -3
  120. package/dist/esm/badge/badge.definition.js.map +1 -1
  121. package/dist/esm/badge/badge.js +1 -1
  122. package/dist/esm/badge/badge.js.map +1 -1
  123. package/dist/esm/badge/badge.template.js +2 -2
  124. package/dist/esm/badge/badge.template.js.map +1 -1
  125. package/dist/esm/button/button.definition.js +0 -3
  126. package/dist/esm/button/button.definition.js.map +1 -1
  127. package/dist/esm/button/button.form-associated.js +14 -0
  128. package/dist/esm/button/button.form-associated.js.map +1 -0
  129. package/dist/esm/button/button.js +124 -4
  130. package/dist/esm/button/button.js.map +1 -1
  131. package/dist/esm/button/button.options.js +10 -0
  132. package/dist/esm/button/button.options.js.map +1 -1
  133. package/dist/esm/button/button.template.js +49 -1
  134. package/dist/esm/button/button.template.js.map +1 -1
  135. package/dist/esm/checkbox/checkbox.form-associated.js +14 -0
  136. package/dist/esm/checkbox/checkbox.form-associated.js.map +1 -0
  137. package/dist/esm/checkbox/checkbox.js +62 -4
  138. package/dist/esm/checkbox/checkbox.js.map +1 -1
  139. package/dist/esm/checkbox/checkbox.template.js +35 -7
  140. package/dist/esm/checkbox/checkbox.template.js.map +1 -1
  141. package/dist/esm/compound-button/compound-button.definition.js +0 -3
  142. package/dist/esm/compound-button/compound-button.definition.js.map +1 -1
  143. package/dist/esm/compound-button/compound-button.options.js.map +1 -1
  144. package/dist/esm/compound-button/compound-button.template.js +1 -1
  145. package/dist/esm/compound-button/compound-button.template.js.map +1 -1
  146. package/dist/esm/counter-badge/counter-badge.definition.js +0 -4
  147. package/dist/esm/counter-badge/counter-badge.definition.js.map +1 -1
  148. package/dist/esm/counter-badge/counter-badge.js +1 -1
  149. package/dist/esm/counter-badge/counter-badge.js.map +1 -1
  150. package/dist/esm/divider/divider.js +29 -4
  151. package/dist/esm/divider/divider.js.map +1 -1
  152. package/dist/esm/divider/divider.options.js +14 -5
  153. package/dist/esm/divider/divider.options.js.map +1 -1
  154. package/dist/esm/divider/divider.template.js +12 -1
  155. package/dist/esm/divider/divider.template.js.map +1 -1
  156. package/dist/esm/form-associated/form-associated.js +458 -0
  157. package/dist/esm/form-associated/form-associated.js.map +1 -0
  158. package/dist/esm/menu-button/menu-button.definition.js +0 -3
  159. package/dist/esm/menu-button/menu-button.definition.js.map +1 -1
  160. package/dist/esm/menu-button/menu-button.options.js.map +1 -1
  161. package/dist/esm/menu-button/menu-button.template.js +1 -1
  162. package/dist/esm/menu-button/menu-button.template.js.map +1 -1
  163. package/dist/esm/menu-item/menu-item.definition.js +0 -4
  164. package/dist/esm/menu-item/menu-item.definition.js.map +1 -1
  165. package/dist/esm/menu-item/menu-item.js +270 -4
  166. package/dist/esm/menu-item/menu-item.js.map +1 -1
  167. package/dist/esm/menu-item/menu-item.options.js +27 -0
  168. package/dist/esm/menu-item/menu-item.options.js.map +1 -0
  169. package/dist/esm/menu-item/menu-item.template.js +57 -2
  170. package/dist/esm/menu-item/menu-item.template.js.map +1 -1
  171. package/dist/esm/menu-list/menu-list.definition.js +0 -4
  172. package/dist/esm/menu-list/menu-list.definition.js.map +1 -1
  173. package/dist/esm/menu-list/menu-list.js +265 -10
  174. package/dist/esm/menu-list/menu-list.js.map +1 -1
  175. package/dist/esm/menu-list/menu-list.template.js +13 -1
  176. package/dist/esm/menu-list/menu-list.template.js.map +1 -1
  177. package/dist/esm/patterns/aria-globals.js +77 -0
  178. package/dist/esm/patterns/aria-globals.js.map +1 -0
  179. package/dist/esm/patterns/index.js +3 -0
  180. package/dist/esm/patterns/index.js.map +1 -0
  181. package/dist/esm/patterns/start-end.js +29 -0
  182. package/dist/esm/patterns/start-end.js.map +1 -0
  183. package/dist/esm/progress-bar/base-progress.js +61 -0
  184. package/dist/esm/progress-bar/base-progress.js.map +1 -0
  185. package/dist/esm/progress-bar/progress-bar.js +10 -3
  186. package/dist/esm/progress-bar/progress-bar.js.map +1 -1
  187. package/dist/esm/progress-bar/progress-bar.options.js.map +1 -1
  188. package/dist/esm/progress-bar/progress-bar.template.js +25 -1
  189. package/dist/esm/progress-bar/progress-bar.template.js.map +1 -1
  190. package/dist/esm/progress-ring/progress-ring.js +16 -0
  191. package/dist/esm/progress-ring/progress-ring.js.map +1 -0
  192. package/dist/esm/progress-ring/progress-ring.options.js +2 -0
  193. package/dist/esm/progress-ring/progress-ring.options.js.map +1 -0
  194. package/dist/esm/radio/radio.form-associated.js +14 -0
  195. package/dist/esm/radio/radio.form-associated.js.map +1 -0
  196. package/dist/esm/radio/radio.js +96 -3
  197. package/dist/esm/radio/radio.js.map +1 -1
  198. package/dist/esm/radio/radio.template.js +28 -2
  199. package/dist/esm/radio/radio.template.js.map +1 -1
  200. package/dist/esm/radio-group/index.js +0 -1
  201. package/dist/esm/radio-group/index.js.map +1 -1
  202. package/dist/esm/radio-group/radio-group.js +346 -3
  203. package/dist/esm/radio-group/radio-group.js.map +1 -1
  204. package/dist/esm/radio-group/radio-group.options.js +7 -0
  205. package/dist/esm/radio-group/radio-group.options.js.map +1 -0
  206. package/dist/esm/radio-group/radio-group.template.js +30 -1
  207. package/dist/esm/radio-group/radio-group.template.js.map +1 -1
  208. package/dist/esm/slider/slider-utilities.js +12 -0
  209. package/dist/esm/slider/slider-utilities.js.map +1 -0
  210. package/dist/esm/slider/slider.form-associated.js +14 -0
  211. package/dist/esm/slider/slider.form-associated.js.map +1 -0
  212. package/dist/esm/slider/slider.js +432 -16
  213. package/dist/esm/slider/slider.js.map +1 -1
  214. package/dist/esm/slider/slider.options.js +11 -1
  215. package/dist/esm/slider/slider.options.js.map +1 -1
  216. package/dist/esm/slider/slider.template.js +38 -1
  217. package/dist/esm/slider/slider.template.js.map +1 -1
  218. package/dist/esm/spinner/spinner.definition.js +0 -4
  219. package/dist/esm/spinner/spinner.definition.js.map +1 -1
  220. package/dist/esm/spinner/spinner.js +2 -2
  221. package/dist/esm/spinner/spinner.js.map +1 -1
  222. package/dist/esm/spinner/spinner.template.js +27 -1
  223. package/dist/esm/spinner/spinner.template.js.map +1 -1
  224. package/dist/esm/switch/switch.form-associated.js +14 -0
  225. package/dist/esm/switch/switch.form-associated.js.map +1 -0
  226. package/dist/esm/switch/switch.js +48 -3
  227. package/dist/esm/switch/switch.js.map +1 -1
  228. package/dist/esm/switch/switch.template.js +25 -1
  229. package/dist/esm/switch/switch.template.js.map +1 -1
  230. package/dist/esm/tab/tab.js +14 -3
  231. package/dist/esm/tab/tab.js.map +1 -1
  232. package/dist/esm/tab/tab.template.js +1 -1
  233. package/dist/esm/tab/tab.template.js.map +1 -1
  234. package/dist/esm/tab-panel/tab-panel.js +2 -2
  235. package/dist/esm/tab-panel/tab-panel.js.map +1 -1
  236. package/dist/esm/tab-panel/tab-panel.template.js +8 -1
  237. package/dist/esm/tab-panel/tab-panel.template.js.map +1 -1
  238. package/dist/esm/tabs/tabs.js +278 -5
  239. package/dist/esm/tabs/tabs.js.map +1 -1
  240. package/dist/esm/tabs/tabs.options.js +6 -2
  241. package/dist/esm/tabs/tabs.options.js.map +1 -1
  242. package/dist/esm/tabs/tabs.template.js +14 -1
  243. package/dist/esm/tabs/tabs.template.js.map +1 -1
  244. package/dist/esm/text-input/index.js +0 -1
  245. package/dist/esm/text-input/index.js.map +1 -1
  246. package/dist/esm/text-input/text-field.form-associated.js +14 -0
  247. package/dist/esm/text-input/text-field.form-associated.js.map +1 -0
  248. package/dist/esm/text-input/text-input.js +167 -7
  249. package/dist/esm/text-input/text-input.js.map +1 -1
  250. package/dist/esm/text-input/text-input.options.js +26 -0
  251. package/dist/esm/text-input/text-input.options.js.map +1 -1
  252. package/dist/esm/text-input/text-input.template.js +64 -1
  253. package/dist/esm/text-input/text-input.template.js.map +1 -1
  254. package/dist/esm/toggle-button/toggle-button.definition.js +0 -2
  255. package/dist/esm/toggle-button/toggle-button.definition.js.map +1 -1
  256. package/dist/esm/toggle-button/toggle-button.options.js.map +1 -1
  257. package/dist/esm/toggle-button/toggle-button.template.js +1 -1
  258. package/dist/esm/toggle-button/toggle-button.template.js.map +1 -1
  259. package/dist/esm/utils/direction.js +15 -0
  260. package/dist/esm/utils/direction.js.map +1 -0
  261. package/dist/esm/utils/index.js +5 -0
  262. package/dist/esm/utils/index.js.map +1 -0
  263. package/dist/esm/utils/template-helpers.js +19 -0
  264. package/dist/esm/utils/template-helpers.js.map +1 -0
  265. package/dist/esm/utils/typings.js +3 -0
  266. package/dist/esm/utils/typings.js.map +1 -0
  267. package/dist/esm/utils/whitespace-filter.js +13 -0
  268. package/dist/esm/utils/whitespace-filter.js.map +1 -0
  269. package/dist/fluent-web-components.api.json +9315 -3940
  270. package/dist/storybook/711.b5d63aa3.iframe.bundle.js +2 -0
  271. package/dist/storybook/iframe.html +1 -1
  272. package/dist/storybook/main.588112e6.iframe.bundle.js +2 -0
  273. package/dist/storybook/project.json +1 -1
  274. package/dist/web-components.d.ts +2194 -241
  275. package/dist/web-components.js +1964 -3195
  276. package/dist/web-components.min.js +123 -123
  277. package/docs/api-report.md +600 -90
  278. package/package.json +1 -1
  279. package/dist/storybook/350.e4be85c2.iframe.bundle.js +0 -462
  280. package/dist/storybook/350.e4be85c2.iframe.bundle.js.map +0 -1
  281. package/dist/storybook/main.b095c2e8.iframe.bundle.js +0 -2
  282. /package/dist/storybook/{350.e4be85c2.iframe.bundle.js.LICENSE.txt → 711.b5d63aa3.iframe.bundle.js.LICENSE.txt} +0 -0
  283. /package/dist/storybook/{main.b095c2e8.iframe.bundle.js.LICENSE.txt → main.588112e6.iframe.bundle.js.LICENSE.txt} +0 -0
@@ -1,9 +1,10 @@
1
- import { FASTRadioGroup } from '@microsoft/fast-foundation/radio-group.js';
1
+ import { FASTElement } from '@microsoft/fast-element';
2
+ import { RadioGroupOrientation } from './radio-group.options.js';
2
3
  /**
3
4
  * The base class used for constructing a fluent-radio-group custom element
4
5
  * @public
5
6
  */
6
- export declare class RadioGroup extends FASTRadioGroup {
7
+ export declare class RadioGroup extends FASTElement {
7
8
  /**
8
9
  * sets radio layout styles
9
10
  *
@@ -12,4 +13,92 @@ export declare class RadioGroup extends FASTRadioGroup {
12
13
  * HTML Attribute: stacked
13
14
  */
14
15
  stacked: boolean;
16
+ /**
17
+ * When true, the child radios will be immutable by user interaction. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly | readonly HTML attribute} for more information.
18
+ * @public
19
+ * @remarks
20
+ * HTML Attribute: readonly
21
+ */
22
+ readOnly: boolean;
23
+ /**
24
+ * Disables the radio group and child radios.
25
+ *
26
+ * @public
27
+ * @remarks
28
+ * HTML Attribute: disabled
29
+ */
30
+ disabled: boolean;
31
+ /**
32
+ * The name of the radio group. Setting this value will set the name value
33
+ * for all child radio elements.
34
+ *
35
+ * @public
36
+ * @remarks
37
+ * HTML Attribute: name
38
+ */
39
+ name: string;
40
+ protected nameChanged(): void;
41
+ /**
42
+ * The value of the checked radio
43
+ *
44
+ * @public
45
+ * @remarks
46
+ * HTML Attribute: value
47
+ */
48
+ value: string;
49
+ protected valueChanged(): void;
50
+ /**
51
+ * The orientation of the group
52
+ *
53
+ * @public
54
+ * @remarks
55
+ * HTML Attribute: orientation
56
+ */
57
+ orientation: RadioGroupOrientation;
58
+ childItems: HTMLElement[];
59
+ /**
60
+ * @internal
61
+ */
62
+ slottedRadioButtons: HTMLElement[];
63
+ protected slottedRadioButtonsChanged(oldValue: unknown, newValue: HTMLElement[]): void;
64
+ private selectedRadio;
65
+ private focusedRadio;
66
+ private direction;
67
+ private get parentToolbar();
68
+ private get isInsideToolbar();
69
+ private get isInsideFoundationToolbar();
70
+ /**
71
+ * @internal
72
+ */
73
+ connectedCallback(): void;
74
+ disconnectedCallback(): void;
75
+ private setupRadioButtons;
76
+ private radioChangeHandler;
77
+ private moveToRadioByIndex;
78
+ private moveRightOffGroup;
79
+ private moveLeftOffGroup;
80
+ /**
81
+ * @internal
82
+ */
83
+ focusOutHandler: (e: FocusEvent) => boolean | void;
84
+ /**
85
+ * @internal
86
+ */
87
+ handleDisabledClick: (e: MouseEvent) => void | boolean;
88
+ /**
89
+ * @internal
90
+ */
91
+ clickHandler: (e: MouseEvent) => void | boolean;
92
+ private shouldMoveOffGroupToTheRight;
93
+ private shouldMoveOffGroupToTheLeft;
94
+ private checkFocusedRadio;
95
+ private moveRight;
96
+ private moveLeft;
97
+ /**
98
+ * keyboard handling per https://w3c.github.io/aria-practices/#for-radio-groups-not-contained-in-a-toolbar
99
+ * navigation is different when there is an ancestor with role='toolbar'
100
+ *
101
+ * @internal
102
+ */
103
+ keydownHandler: (e: KeyboardEvent) => boolean | void;
15
104
  }
@@ -0,0 +1,17 @@
1
+ import type { ValuesOf } from '../utils/index.js';
2
+ /**
3
+ * Radio Group orientation
4
+ * @public
5
+ */
6
+ export declare const RadioGroupOrientation: {
7
+ readonly horizontal: "horizontal"; /**
8
+ * Radio Group orientation
9
+ * @public
10
+ */
11
+ readonly vertical: "vertical";
12
+ };
13
+ /**
14
+ * Types of Radio Group orientation
15
+ * @public
16
+ */
17
+ export declare type RadioGroupOrientation = ValuesOf<typeof RadioGroupOrientation>;
@@ -1,3 +1,4 @@
1
1
  import type { ElementViewTemplate } from '@microsoft/fast-element';
2
2
  import type { RadioGroup } from './radio-group.js';
3
+ export declare function radioGroupTemplate<T extends RadioGroup>(): ElementViewTemplate<T>;
3
4
  export declare const template: ElementViewTemplate<RadioGroup>;
@@ -0,0 +1,5 @@
1
+ import { Direction } from '@microsoft/fast-web-utilities';
2
+ /**
3
+ * Converts a pixel coordinate on the track to a percent of the track's range
4
+ */
5
+ export declare function convertPixelToPercent(pixelPos: number, minPosition: number, maxPosition: number, direction?: Direction): number;
@@ -1,10 +1,11 @@
1
- import { FASTSlider } from '@microsoft/fast-foundation/slider.js';
2
- import type { SliderSize } from './slider.options.js';
1
+ import { Direction, Orientation } from '@microsoft/fast-web-utilities';
2
+ import { SliderConfiguration, SliderMode, SliderSize } from './slider.options.js';
3
+ import { FormAssociatedSlider } from './slider.form-associated.js';
3
4
  /**
4
5
  * The base class used for constructing a fluent-slider custom element
5
6
  * @public
6
7
  */
7
- export declare class Slider extends FASTSlider {
8
+ export declare class Slider extends FormAssociatedSlider implements SliderConfiguration {
8
9
  /**
9
10
  * The size of the slider
10
11
  * @public
@@ -13,12 +14,201 @@ export declare class Slider extends FASTSlider {
13
14
  */
14
15
  size?: SliderSize;
15
16
  handleChange(source: any, propertyName: string): void;
16
- connectedCallback(): void;
17
- disconnectedCallback(): void;
18
17
  private stepStyles?;
19
18
  /**
20
19
  * Handles changes to step styling based on the step value
21
20
  * NOTE: This function is not a changed callback, stepStyles is not observable
22
21
  */
23
22
  private handleStepStyles;
23
+ /**
24
+ * When true, the control will be immutable by user interaction. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly | readonly HTML attribute} for more information.
25
+ *
26
+ * @public
27
+ * @remarks
28
+ * HTML Attribute: readonly
29
+ */
30
+ readOnly: boolean;
31
+ protected readOnlyChanged(): void;
32
+ /**
33
+ * @internal
34
+ */
35
+ track: HTMLDivElement;
36
+ /**
37
+ * @internal
38
+ */
39
+ thumb: HTMLDivElement;
40
+ /**
41
+ * @internal
42
+ */
43
+ stepMultiplier: number;
44
+ /**
45
+ * @internal
46
+ */
47
+ direction: Direction;
48
+ /**
49
+ * @internal
50
+ */
51
+ isDragging: boolean;
52
+ /**
53
+ * @internal
54
+ */
55
+ position: string;
56
+ /**
57
+ * @internal
58
+ */
59
+ trackWidth: number;
60
+ /**
61
+ * @internal
62
+ */
63
+ trackMinWidth: number;
64
+ /**
65
+ * @internal
66
+ */
67
+ trackHeight: number;
68
+ /**
69
+ * @internal
70
+ */
71
+ trackLeft: number;
72
+ /**
73
+ * @internal
74
+ */
75
+ trackMinHeight: number;
76
+ /**
77
+ * The value property, typed as a number.
78
+ *
79
+ * @public
80
+ */
81
+ get valueAsNumber(): number;
82
+ set valueAsNumber(next: number);
83
+ /**
84
+ * Custom function that generates a string for the component's "aria-valuetext" attribute based on the current value.
85
+ *
86
+ * @public
87
+ */
88
+ valueTextFormatter: (value: string) => string | null;
89
+ /**
90
+ * @internal
91
+ */
92
+ valueChanged(previous: string, next: string): void;
93
+ /**
94
+ * The minimum allowed value.
95
+ *
96
+ * @defaultValue - 0
97
+ * @public
98
+ * @remarks
99
+ * HTML Attribute: min
100
+ */
101
+ min: number;
102
+ protected minChanged(): void;
103
+ /**
104
+ * The maximum allowed value.
105
+ *
106
+ * @defaultValue - 10
107
+ * @public
108
+ * @remarks
109
+ * HTML Attribute: max
110
+ */
111
+ max: number;
112
+ protected maxChanged(): void;
113
+ /**
114
+ * Value to increment or decrement via arrow keys, mouse click or drag.
115
+ *
116
+ * @public
117
+ * @remarks
118
+ * HTML Attribute: step
119
+ */
120
+ step: number | undefined;
121
+ protected stepChanged(): void;
122
+ /**
123
+ * The orientation of the slider.
124
+ *
125
+ * @public
126
+ * @remarks
127
+ * HTML Attribute: orientation
128
+ */
129
+ orientation: Orientation;
130
+ protected orientationChanged(): void;
131
+ /**
132
+ * The selection mode.
133
+ *
134
+ * @public
135
+ * @remarks
136
+ * HTML Attribute: mode
137
+ */
138
+ mode: SliderMode;
139
+ /**
140
+ * @internal
141
+ */
142
+ connectedCallback(): void;
143
+ /**
144
+ * @internal
145
+ */
146
+ disconnectedCallback(): void;
147
+ /**
148
+ * Increment the value by the step
149
+ *
150
+ * @public
151
+ */
152
+ increment(): void;
153
+ /**
154
+ * Decrement the value by the step
155
+ *
156
+ * @public
157
+ */
158
+ decrement(): void;
159
+ keypressHandler: (e: KeyboardEvent) => void;
160
+ /**
161
+ * Gets the actual step value for the slider
162
+ *
163
+ */
164
+ private get stepValue();
165
+ /**
166
+ * Places the thumb based on the current value
167
+ *
168
+ * @public
169
+ * @param direction - writing mode
170
+ */
171
+ private setThumbPositionForOrientation;
172
+ /**
173
+ * Update the step multiplier used to ensure rounding errors from steps that
174
+ * are not whole numbers
175
+ */
176
+ private updateStepMultiplier;
177
+ private setupTrackConstraints;
178
+ private setupListeners;
179
+ /**
180
+ * @internal
181
+ */
182
+ initialValue: string;
183
+ private get midpoint();
184
+ private setupDefaultValue;
185
+ /**
186
+ * Handle mouse moves during a thumb drag operation
187
+ * If the event handler is null it removes the events
188
+ */
189
+ handleThumbMouseDown: (event: MouseEvent | null) => void;
190
+ /**
191
+ * Handle mouse moves during a thumb drag operation
192
+ */
193
+ private handleMouseMove;
194
+ /**
195
+ * Calculate the new value based on the given raw pixel value.
196
+ *
197
+ * @param rawValue - the value to be converted to a constrained value
198
+ * @returns the constrained value
199
+ *
200
+ * @internal
201
+ */
202
+ calculateNewValue(rawValue: number): number;
203
+ /**
204
+ * Handle a window mouse up during a drag operation
205
+ */
206
+ private handleWindowMouseUp;
207
+ private stopDragging;
208
+ /**
209
+ *
210
+ * @param e - MouseEvent or null. If there is no event handler it will remove the events
211
+ */
212
+ handleMouseDown: (e: MouseEvent | null) => void;
213
+ private convertToConstrainedValue;
24
214
  }
@@ -0,0 +1,14 @@
1
+ import { FASTElement } from '@microsoft/fast-element';
2
+ import { FormAssociated } from '../form-associated/form-associated.js';
3
+ declare class _Slider extends FASTElement {
4
+ }
5
+ interface _Slider extends FormAssociated {
6
+ }
7
+ declare const FormAssociatedSlider_base: typeof _Slider;
8
+ /**
9
+ * @beta
10
+ */
11
+ export declare class FormAssociatedSlider extends FormAssociatedSlider_base {
12
+ proxy: HTMLInputElement;
13
+ }
14
+ export {};
@@ -1,5 +1,6 @@
1
- import type { ValuesOf } from '@microsoft/fast-foundation/utilities.js';
2
- export { SliderOrientation } from '@microsoft/fast-foundation/slider.js';
1
+ import type { Direction } from '@microsoft/fast-web-utilities';
2
+ import type { StaticallyComposableHTML, ValuesOf } from '../utils/index.js';
3
+ import type { Slider } from './slider.js';
3
4
  /**
4
5
  * SliderSize Constants
5
6
  * @public
@@ -13,3 +14,43 @@ export declare const SliderSize: {
13
14
  * @public
14
15
  */
15
16
  export declare type SliderSize = ValuesOf<typeof SliderSize>;
17
+ /**
18
+ * @public
19
+ */
20
+ export declare const SliderOrientation: {
21
+ readonly horizontal: "horizontal";
22
+ readonly vertical: "vertical";
23
+ };
24
+ /**
25
+ * The types for the orientation of the slider
26
+ * @public
27
+ */
28
+ export declare type SliderOrientation = ValuesOf<typeof SliderOrientation>;
29
+ /**
30
+ * @public
31
+ */
32
+ export declare const SliderMode: {
33
+ readonly singleValue: "single-value";
34
+ };
35
+ /**
36
+ * The types for the selection mode of the slider
37
+ * @public
38
+ */
39
+ export declare type SliderMode = ValuesOf<typeof SliderMode>;
40
+ /**
41
+ * @public
42
+ */
43
+ export interface SliderConfiguration {
44
+ max: number;
45
+ min: number;
46
+ orientation?: SliderOrientation;
47
+ direction?: Direction;
48
+ disabled?: boolean;
49
+ }
50
+ /**
51
+ * Slider configuration options
52
+ * @public
53
+ */
54
+ export declare type SliderOptions = {
55
+ thumb?: StaticallyComposableHTML<Slider>;
56
+ };
@@ -1,3 +1,5 @@
1
1
  import type { ElementViewTemplate } from '@microsoft/fast-element';
2
- import { FASTSlider } from '@microsoft/fast-foundation/slider.js';
3
- export declare const template: ElementViewTemplate<FASTSlider>;
2
+ import { SliderOptions } from './slider.options.js';
3
+ import { Slider } from './slider.js';
4
+ export declare function sliderTemplate<T extends Slider>(options?: SliderOptions): ElementViewTemplate<T>;
5
+ export declare const template: ElementViewTemplate<Slider>;
@@ -1,10 +1,10 @@
1
- import { FASTProgressRing } from '@microsoft/fast-foundation/progress-ring.js';
1
+ import { ProgressRing } from '../progress-ring/progress-ring.js';
2
2
  import type { SpinnerAppearance, SpinnerSize } from './spinner.options.js';
3
3
  /**
4
4
  * The base class used for constructing a fluent-spinner custom element
5
5
  * @public
6
6
  */
7
- export declare class Spinner extends FASTProgressRing {
7
+ export declare class Spinner extends ProgressRing {
8
8
  /**
9
9
  * The size of the spinner
10
10
  *
@@ -1,9 +1,5 @@
1
1
  import { Spinner } from './spinner.js';
2
2
  /**
3
- * The Fluent Spinner Element. Implements {@link @microsoft/fast-foundation#ProgressRing },
4
- * {@link @microsoft/fast-foundation#progress-ringTemplate}
5
- *
6
- *
7
3
  * @public
8
4
  * @remarks
9
5
  * HTML Element: \<fluent-spinner\>
@@ -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
  * SpinnerAppearance constants
4
4
  * @public
@@ -1,3 +1,5 @@
1
1
  import type { ElementViewTemplate } from '@microsoft/fast-element';
2
+ import { ProgressRingOptions } from '../progress-ring/progress-ring.options.js';
2
3
  import { Spinner } from './spinner.js';
4
+ export declare function progressRingTemplate<T extends Spinner>(options?: ProgressRingOptions): ElementViewTemplate<T>;
3
5
  export declare const template: ElementViewTemplate<Spinner>;
@@ -1,6 +1,10 @@
1
- import { FASTSwitch } from '@microsoft/fast-foundation/switch.js';
1
+ import type { StaticallyComposableHTML } from '../utils/index.js';
2
2
  import { SwitchLabelPosition } from './switch.options.js';
3
- export declare class Switch extends FASTSwitch {
3
+ import { FormAssociatedSwitch } from './switch.form-associated.js';
4
+ export declare type SwitchOptions = {
5
+ switch?: StaticallyComposableHTML<Switch>;
6
+ };
7
+ export declare class Switch extends FormAssociatedSwitch {
4
8
  /**
5
9
  * The label position of the switch
6
10
  *
@@ -10,4 +14,32 @@ export declare class Switch extends FASTSwitch {
10
14
  * HTML Attribute: labelposition
11
15
  */
12
16
  labelPosition: SwitchLabelPosition | undefined;
17
+ /**
18
+ * When true, the control will be immutable by user interaction. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly | readonly HTML attribute} for more information.
19
+ * @public
20
+ * @remarks
21
+ * HTML Attribute: readonly
22
+ */
23
+ readOnly: boolean;
24
+ protected readOnlyChanged(): void;
25
+ /**
26
+ * The element's value to be included in form submission when checked.
27
+ * Default to "on" to reach parity with input[type="checkbox"]
28
+ *
29
+ * @internal
30
+ */
31
+ initialValue: string;
32
+ /**
33
+ * @internal
34
+ */
35
+ defaultSlottedNodes: Node[];
36
+ constructor();
37
+ /**
38
+ * @internal
39
+ */
40
+ keypressHandler: (e: KeyboardEvent) => void;
41
+ /**
42
+ * @internal
43
+ */
44
+ clickHandler: (e: MouseEvent) => void;
13
45
  }
@@ -0,0 +1,14 @@
1
+ import { FASTElement } from '@microsoft/fast-element';
2
+ import { CheckableFormAssociated } from '../form-associated/form-associated.js';
3
+ declare class _Switch extends FASTElement {
4
+ }
5
+ interface _Switch extends CheckableFormAssociated {
6
+ }
7
+ declare const FormAssociatedSwitch_base: typeof _Switch;
8
+ /**
9
+ * @beta
10
+ */
11
+ export declare class FormAssociatedSwitch extends FormAssociatedSwitch_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
  * SwitchLabelPosition Constants
4
4
  * @public
@@ -1,3 +1,4 @@
1
1
  import { ElementViewTemplate } from '@microsoft/fast-element';
2
- import { Switch } from './switch.js';
2
+ import { Switch, SwitchOptions } from './switch.js';
3
+ export declare function switchTemplate<T extends Switch>(options?: SwitchOptions): ElementViewTemplate<T>;
3
4
  export declare const template: ElementViewTemplate<Switch>;
@@ -1,8 +1,23 @@
1
- import { FASTTab } from '@microsoft/fast-foundation/tab.js';
1
+ import { FASTElement } from '@microsoft/fast-element';
2
+ import { StartEnd, StartEndOptions } from '../patterns/index.js';
3
+ /**
4
+ * Tab configuration options
5
+ * @public
6
+ */
7
+ export declare type TabOptions = StartEndOptions<Tab>;
2
8
  /**
3
9
  * Tab extends the FASTTab and is a child of the TabList
4
10
  */
5
- export declare class Tab extends FASTTab {
11
+ export declare class Tab extends FASTElement {
12
+ /**
13
+ * When true, the control will be immutable by user interaction. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled | disabled HTML attribute} for more information.
14
+ * @public
15
+ * @remarks
16
+ * HTML Attribute: disabled
17
+ */
18
+ disabled: boolean;
6
19
  private styles;
7
20
  connectedCallback(): void;
8
21
  }
22
+ export interface Tab extends StartEnd {
23
+ }
@@ -1,4 +1,4 @@
1
- import { FASTTab, TabOptions } from '@microsoft/fast-foundation/tab.js';
2
1
  import { ElementViewTemplate } from '@microsoft/fast-element';
3
- export declare function tabTemplate<T extends FASTTab>(options?: TabOptions): ElementViewTemplate<T>;
4
- export declare const template: ElementViewTemplate<FASTTab, any>;
2
+ import { Tab, TabOptions } from './tab.js';
3
+ export declare function tabTemplate<T extends Tab>(options?: TabOptions): ElementViewTemplate<T>;
4
+ export declare const template: ElementViewTemplate<Tab, any>;
@@ -1,3 +1,3 @@
1
- import { FASTTabPanel } from '@microsoft/fast-foundation/tab-panel.js';
2
- export declare class TabPanel extends FASTTabPanel {
1
+ import { FASTElement } from '@microsoft/fast-element';
2
+ export declare class TabPanel extends FASTElement {
3
3
  }
@@ -1 +1,4 @@
1
- export declare const template: import("@microsoft/fast-element").ElementViewTemplate<import("@microsoft/fast-foundation/tab-panel.js").FASTTabPanel, any>;
1
+ import { ElementViewTemplate } from '@microsoft/fast-element';
2
+ import { TabPanel } from './tab-panel.js';
3
+ export declare function tabPanelTemplate<T extends TabPanel>(): ElementViewTemplate<T>;
4
+ export declare const template: ElementViewTemplate<TabPanel, any>;