@fabric-msft/fabric-web 7.0.0 → 7.3.1

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 (281) hide show
  1. package/dts/components/card/card.d.ts +0 -5
  2. package/dts/components/card/card.d.ts.map +1 -1
  3. package/dts/components/carousel/carousel.d.ts +6 -42
  4. package/dts/components/carousel/carousel.d.ts.map +1 -1
  5. package/dts/components/carousel/carousel.styles.d.ts.map +1 -1
  6. package/dts/components/carousel/carousel.template.d.ts.map +1 -1
  7. package/dts/components/carousel/define.d.ts.map +1 -1
  8. package/dts/components/carousel-nav/carousel-nav.d.ts +10 -0
  9. package/dts/components/carousel-nav/carousel-nav.d.ts.map +1 -1
  10. package/dts/components/carousel-nav/carousel-nav.template.d.ts.map +1 -1
  11. package/dts/components/carousel-viewport/carousel-viewport.d.ts +34 -0
  12. package/dts/components/carousel-viewport/carousel-viewport.d.ts.map +1 -0
  13. package/dts/components/carousel-viewport/carousel-viewport.definition.d.ts +9 -0
  14. package/dts/components/carousel-viewport/carousel-viewport.definition.d.ts.map +1 -0
  15. package/dts/components/carousel-viewport/carousel-viewport.styles.d.ts +7 -0
  16. package/dts/components/carousel-viewport/carousel-viewport.styles.d.ts.map +1 -0
  17. package/dts/components/carousel-viewport/carousel-viewport.template.d.ts +9 -0
  18. package/dts/components/carousel-viewport/carousel-viewport.template.d.ts.map +1 -0
  19. package/dts/components/carousel-viewport/define.d.ts +2 -0
  20. package/dts/components/carousel-viewport/define.d.ts.map +1 -0
  21. package/dts/components/carousel-viewport/index.d.ts +5 -0
  22. package/dts/components/carousel-viewport/index.d.ts.map +1 -0
  23. package/dts/components/dynamic-tab/define.d.ts +2 -0
  24. package/dts/components/dynamic-tab/define.d.ts.map +1 -0
  25. package/dts/components/dynamic-tab/dynamic-tab.d.ts +142 -0
  26. package/dts/components/dynamic-tab/dynamic-tab.d.ts.map +1 -0
  27. package/dts/components/dynamic-tab/dynamic-tab.definition.d.ts +10 -0
  28. package/dts/components/dynamic-tab/dynamic-tab.definition.d.ts.map +1 -0
  29. package/dts/components/dynamic-tab/dynamic-tab.options.d.ts +10 -0
  30. package/dts/components/dynamic-tab/dynamic-tab.options.d.ts.map +1 -0
  31. package/dts/components/dynamic-tab/dynamic-tab.styles.d.ts +6 -0
  32. package/dts/components/dynamic-tab/dynamic-tab.styles.d.ts.map +1 -0
  33. package/dts/components/dynamic-tab/dynamic-tab.template.d.ts +13 -0
  34. package/dts/components/dynamic-tab/dynamic-tab.template.d.ts.map +1 -0
  35. package/dts/components/dynamic-tab/index.d.ts +6 -0
  36. package/dts/components/dynamic-tab/index.d.ts.map +1 -0
  37. package/dts/components/dynamic-tab-list/define.d.ts +2 -0
  38. package/dts/components/dynamic-tab-list/define.d.ts.map +1 -0
  39. package/dts/components/dynamic-tab-list/dynamic-tab-list.d.ts +360 -0
  40. package/dts/components/dynamic-tab-list/dynamic-tab-list.d.ts.map +1 -0
  41. package/dts/components/dynamic-tab-list/dynamic-tab-list.definition.d.ts +7 -0
  42. package/dts/components/dynamic-tab-list/dynamic-tab-list.definition.d.ts.map +1 -0
  43. package/dts/components/dynamic-tab-list/dynamic-tab-list.options.d.ts +24 -0
  44. package/dts/components/dynamic-tab-list/dynamic-tab-list.options.d.ts.map +1 -0
  45. package/dts/components/dynamic-tab-list/dynamic-tab-list.styles.d.ts +6 -0
  46. package/dts/components/dynamic-tab-list/dynamic-tab-list.styles.d.ts.map +1 -0
  47. package/dts/components/dynamic-tab-list/dynamic-tab-list.template.d.ts +13 -0
  48. package/dts/components/dynamic-tab-list/dynamic-tab-list.template.d.ts.map +1 -0
  49. package/dts/components/dynamic-tab-list/index.d.ts +7 -0
  50. package/dts/components/dynamic-tab-list/index.d.ts.map +1 -0
  51. package/dts/components/empty-state/define.d.ts +2 -0
  52. package/dts/components/empty-state/define.d.ts.map +1 -0
  53. package/dts/components/empty-state/empty-state.d.ts +32 -0
  54. package/dts/components/empty-state/empty-state.d.ts.map +1 -0
  55. package/dts/components/empty-state/empty-state.definition.d.ts +10 -0
  56. package/dts/components/empty-state/empty-state.definition.d.ts.map +1 -0
  57. package/dts/components/empty-state/empty-state.styles.d.ts +6 -0
  58. package/dts/components/empty-state/empty-state.styles.d.ts.map +1 -0
  59. package/dts/components/empty-state/empty-state.template.d.ts +9 -0
  60. package/dts/components/empty-state/empty-state.template.d.ts.map +1 -0
  61. package/dts/components/empty-state/index.d.ts +5 -0
  62. package/dts/components/empty-state/index.d.ts.map +1 -0
  63. package/dts/components/field/field.d.ts +44 -3
  64. package/dts/components/field/field.d.ts.map +1 -1
  65. package/dts/components/menu/index.d.ts +2 -2
  66. package/dts/components/menu/index.d.ts.map +1 -1
  67. package/dts/components/menu/menu.d.ts +17 -1
  68. package/dts/components/menu/menu.d.ts.map +1 -1
  69. package/dts/components/menu/menu.options.d.ts +15 -0
  70. package/dts/components/menu/menu.options.d.ts.map +1 -1
  71. package/dts/components/menu/menu.positioning.d.ts +8 -2
  72. package/dts/components/menu/menu.positioning.d.ts.map +1 -1
  73. package/dts/components/menu/menu.styles.d.ts.map +1 -1
  74. package/dts/components/menu-button/menu-button.d.ts +2 -2
  75. package/dts/components/menu-button/menu-button.definition.d.ts.map +1 -1
  76. package/dts/components/menu-button/menu-button.styles.d.ts +11 -0
  77. package/dts/components/menu-button/menu-button.styles.d.ts.map +1 -0
  78. package/dts/components/menu-item/menu-item.styles.d.ts.map +1 -1
  79. package/dts/components/menu-list/menu-list.styles.d.ts.map +1 -1
  80. package/dts/components/modal/define.d.ts +4 -0
  81. package/dts/components/modal/define.d.ts.map +1 -0
  82. package/dts/components/modal/index.d.ts +9 -0
  83. package/dts/components/modal/index.d.ts.map +1 -0
  84. package/dts/components/modal/modal.d.ts +209 -0
  85. package/dts/components/modal/modal.d.ts.map +1 -0
  86. package/dts/components/modal/modal.definition.d.ts +9 -0
  87. package/dts/components/modal/modal.definition.d.ts.map +1 -0
  88. package/dts/components/modal/modal.events.d.ts +26 -0
  89. package/dts/components/modal/modal.events.d.ts.map +1 -0
  90. package/dts/components/modal/modal.options.d.ts +15 -0
  91. package/dts/components/modal/modal.options.d.ts.map +1 -0
  92. package/dts/components/modal/modal.styles.d.ts +10 -0
  93. package/dts/components/modal/modal.styles.d.ts.map +1 -0
  94. package/dts/components/modal/modal.template.d.ts +12 -0
  95. package/dts/components/modal/modal.template.d.ts.map +1 -0
  96. package/dts/components/modal-fre-item/define.d.ts +2 -0
  97. package/dts/components/modal-fre-item/define.d.ts.map +1 -0
  98. package/dts/components/modal-fre-item/index.d.ts +3 -0
  99. package/dts/components/modal-fre-item/index.d.ts.map +1 -0
  100. package/dts/components/modal-fre-item/modal-fre-item.d.ts +65 -0
  101. package/dts/components/modal-fre-item/modal-fre-item.d.ts.map +1 -0
  102. package/dts/components/modal-fre-item/modal-fre-item.definition.d.ts +10 -0
  103. package/dts/components/modal-fre-item/modal-fre-item.definition.d.ts.map +1 -0
  104. package/dts/components/modal-fre-item/modal-fre-item.styles.d.ts +7 -0
  105. package/dts/components/modal-fre-item/modal-fre-item.styles.d.ts.map +1 -0
  106. package/dts/components/modal-fre-item/modal-fre-item.template.d.ts +11 -0
  107. package/dts/components/modal-fre-item/modal-fre-item.template.d.ts.map +1 -0
  108. package/dts/components/radio-group/radio-group.d.ts +15 -0
  109. package/dts/components/radio-group/radio-group.d.ts.map +1 -1
  110. package/dts/components/slider/slider.d.ts +2 -0
  111. package/dts/components/slider/slider.d.ts.map +1 -1
  112. package/dts/components/slider/slider.definition.d.ts.map +1 -1
  113. package/dts/components/slider/slider.styles.d.ts +10 -0
  114. package/dts/components/slider/slider.styles.d.ts.map +1 -0
  115. package/dts/components/slider/slider.template.d.ts +4 -0
  116. package/dts/components/slider/slider.template.d.ts.map +1 -0
  117. package/dts/components/styles/patterns/patterns.d.ts +8 -0
  118. package/dts/components/styles/patterns/patterns.d.ts.map +1 -0
  119. package/dts/index.d.ts +7 -0
  120. package/dts/index.d.ts.map +1 -1
  121. package/dts/util/a11y-playwright-utils.d.ts +7 -0
  122. package/dts/util/a11y-playwright-utils.d.ts.map +1 -0
  123. package/dts/util/carousel-controller.d.ts +120 -0
  124. package/dts/util/carousel-controller.d.ts.map +1 -0
  125. package/dts/util/icons.d.ts +15 -0
  126. package/dts/util/icons.d.ts.map +1 -1
  127. package/dts/util/index.d.ts +1 -0
  128. package/dts/util/index.d.ts.map +1 -1
  129. package/esm/components/accordion-menu-panel/accordion-menu-panel.styles.js +1 -1
  130. package/esm/components/card/card.js +0 -5
  131. package/esm/components/card/card.js.map +1 -1
  132. package/esm/components/card-header/card-header.styles.js +2 -2
  133. package/esm/components/card-header/card-header.styles.js.map +1 -1
  134. package/esm/components/carousel/carousel.js +30 -98
  135. package/esm/components/carousel/carousel.js.map +1 -1
  136. package/esm/components/carousel/carousel.styles.js +2 -2
  137. package/esm/components/carousel/carousel.styles.js.map +1 -1
  138. package/esm/components/carousel/carousel.template.js +3 -3
  139. package/esm/components/carousel/carousel.template.js.map +1 -1
  140. package/esm/components/carousel/define.js +5 -3
  141. package/esm/components/carousel/define.js.map +1 -1
  142. package/esm/components/carousel-item/carousel-item.template.js +1 -1
  143. package/esm/components/carousel-item/carousel-item.template.js.map +1 -1
  144. package/esm/components/carousel-nav/carousel-nav.js +12 -0
  145. package/esm/components/carousel-nav/carousel-nav.js.map +1 -1
  146. package/esm/components/carousel-nav/carousel-nav.styles.js +1 -0
  147. package/esm/components/carousel-nav/carousel-nav.template.js +4 -3
  148. package/esm/components/carousel-nav/carousel-nav.template.js.map +1 -1
  149. package/esm/components/carousel-nav-item/carousel-nav-item.styles.js +1 -0
  150. package/esm/components/carousel-viewport/carousel-viewport.definition.js +21 -0
  151. package/esm/components/carousel-viewport/carousel-viewport.definition.js.map +1 -0
  152. package/esm/components/carousel-viewport/carousel-viewport.js +37 -0
  153. package/esm/components/carousel-viewport/carousel-viewport.js.map +1 -0
  154. package/esm/components/carousel-viewport/carousel-viewport.styles.js +11 -0
  155. package/esm/components/carousel-viewport/carousel-viewport.styles.js.map +1 -0
  156. package/esm/components/carousel-viewport/carousel-viewport.template.js +15 -0
  157. package/esm/components/carousel-viewport/carousel-viewport.template.js.map +1 -0
  158. package/esm/components/carousel-viewport/define.js +4 -0
  159. package/esm/components/carousel-viewport/define.js.map +1 -0
  160. package/esm/components/carousel-viewport/index.js +5 -0
  161. package/esm/components/carousel-viewport/index.js.map +1 -0
  162. package/esm/components/dynamic-tab/define.js +4 -0
  163. package/esm/components/dynamic-tab/define.js.map +1 -0
  164. package/esm/components/dynamic-tab/dynamic-tab.definition.js +27 -0
  165. package/esm/components/dynamic-tab/dynamic-tab.definition.js.map +1 -0
  166. package/esm/components/dynamic-tab/dynamic-tab.js +232 -0
  167. package/esm/components/dynamic-tab/dynamic-tab.js.map +1 -0
  168. package/esm/components/dynamic-tab/dynamic-tab.options.js +11 -0
  169. package/esm/components/dynamic-tab/dynamic-tab.options.js.map +1 -0
  170. package/esm/components/dynamic-tab/dynamic-tab.styles.js +13 -0
  171. package/esm/components/dynamic-tab/dynamic-tab.styles.js.map +1 -0
  172. package/esm/components/dynamic-tab/dynamic-tab.template.js +18 -0
  173. package/esm/components/dynamic-tab/dynamic-tab.template.js.map +1 -0
  174. package/esm/components/dynamic-tab/index.js +6 -0
  175. package/esm/components/dynamic-tab/index.js.map +1 -0
  176. package/esm/components/dynamic-tab-list/define.js +12 -0
  177. package/esm/components/dynamic-tab-list/define.js.map +1 -0
  178. package/esm/components/dynamic-tab-list/dynamic-tab-list.definition.js +19 -0
  179. package/esm/components/dynamic-tab-list/dynamic-tab-list.definition.js.map +1 -0
  180. package/esm/components/dynamic-tab-list/dynamic-tab-list.js +788 -0
  181. package/esm/components/dynamic-tab-list/dynamic-tab-list.js.map +1 -0
  182. package/esm/components/dynamic-tab-list/dynamic-tab-list.options.js +19 -0
  183. package/esm/components/dynamic-tab-list/dynamic-tab-list.options.js.map +1 -0
  184. package/esm/components/dynamic-tab-list/dynamic-tab-list.styles.js +11 -0
  185. package/esm/components/dynamic-tab-list/dynamic-tab-list.styles.js.map +1 -0
  186. package/esm/components/dynamic-tab-list/dynamic-tab-list.template.js +41 -0
  187. package/esm/components/dynamic-tab-list/dynamic-tab-list.template.js.map +1 -0
  188. package/esm/components/dynamic-tab-list/index.js +6 -0
  189. package/esm/components/dynamic-tab-list/index.js.map +1 -0
  190. package/esm/components/empty-state/define.js +4 -0
  191. package/esm/components/empty-state/define.js.map +1 -0
  192. package/esm/components/empty-state/empty-state.definition.js +22 -0
  193. package/esm/components/empty-state/empty-state.definition.js.map +1 -0
  194. package/esm/components/empty-state/empty-state.js +33 -0
  195. package/esm/components/empty-state/empty-state.js.map +1 -0
  196. package/esm/components/empty-state/empty-state.styles.js +11 -0
  197. package/esm/components/empty-state/empty-state.styles.js.map +1 -0
  198. package/esm/components/empty-state/empty-state.template.js +12 -0
  199. package/esm/components/empty-state/empty-state.template.js.map +1 -0
  200. package/esm/components/empty-state/index.js +5 -0
  201. package/esm/components/empty-state/index.js.map +1 -0
  202. package/esm/components/field/field.js +91 -5
  203. package/esm/components/field/field.js.map +1 -1
  204. package/esm/components/filter-pill/filter-pill.styles.js +1 -0
  205. package/esm/components/menu/index.js +1 -1
  206. package/esm/components/menu/index.js.map +1 -1
  207. package/esm/components/menu/menu.js +30 -2
  208. package/esm/components/menu/menu.js.map +1 -1
  209. package/esm/components/menu/menu.options.js +11 -1
  210. package/esm/components/menu/menu.options.js.map +1 -1
  211. package/esm/components/menu/menu.positioning.js +32 -30
  212. package/esm/components/menu/menu.positioning.js.map +1 -1
  213. package/esm/components/menu/menu.styles.js +2 -1
  214. package/esm/components/menu/menu.styles.js.map +1 -1
  215. package/esm/components/menu-button/menu-button.definition.js +5 -2
  216. package/esm/components/menu-button/menu-button.definition.js.map +1 -1
  217. package/esm/components/menu-button/menu-button.js +2 -2
  218. package/esm/components/menu-button/menu-button.styles.js +18 -0
  219. package/esm/components/menu-button/menu-button.styles.js.map +1 -0
  220. package/esm/components/menu-item/menu-item.styles.js +1 -1
  221. package/esm/components/menu-item/menu-item.styles.js.map +1 -1
  222. package/esm/components/menu-list/menu-list.styles.js +2 -2
  223. package/esm/components/menu-list/menu-list.styles.js.map +1 -1
  224. package/esm/components/modal/define.js +9 -0
  225. package/esm/components/modal/define.js.map +1 -0
  226. package/esm/components/modal/index.js +7 -0
  227. package/esm/components/modal/index.js.map +1 -0
  228. package/esm/components/modal/modal.definition.js +29 -0
  229. package/esm/components/modal/modal.definition.js.map +1 -0
  230. package/esm/components/modal/modal.events.js +11 -0
  231. package/esm/components/modal/modal.events.js.map +1 -0
  232. package/esm/components/modal/modal.js +369 -0
  233. package/esm/components/modal/modal.js.map +1 -0
  234. package/esm/components/modal/modal.options.js +10 -0
  235. package/esm/components/modal/modal.options.js.map +1 -0
  236. package/esm/components/modal/modal.styles.js +14 -0
  237. package/esm/components/modal/modal.styles.js.map +1 -0
  238. package/esm/components/modal/modal.template.js +23 -0
  239. package/esm/components/modal/modal.template.js.map +1 -0
  240. package/esm/components/modal-fre-item/define.js +4 -0
  241. package/esm/components/modal-fre-item/define.js.map +1 -0
  242. package/esm/components/modal-fre-item/index.js +3 -0
  243. package/esm/components/modal-fre-item/index.js.map +1 -0
  244. package/esm/components/modal-fre-item/modal-fre-item.definition.js +27 -0
  245. package/esm/components/modal-fre-item/modal-fre-item.definition.js.map +1 -0
  246. package/esm/components/modal-fre-item/modal-fre-item.js +72 -0
  247. package/esm/components/modal-fre-item/modal-fre-item.js.map +1 -0
  248. package/esm/components/modal-fre-item/modal-fre-item.styles.js +11 -0
  249. package/esm/components/modal-fre-item/modal-fre-item.styles.js.map +1 -0
  250. package/esm/components/modal-fre-item/modal-fre-item.template.js +16 -0
  251. package/esm/components/modal-fre-item/modal-fre-item.template.js.map +1 -0
  252. package/esm/components/radio-group/radio-group.js +20 -1
  253. package/esm/components/radio-group/radio-group.js.map +1 -1
  254. package/esm/components/simple-table/simple-table.styles.js +1 -0
  255. package/esm/components/slider/slider.definition.js +4 -3
  256. package/esm/components/slider/slider.definition.js.map +1 -1
  257. package/esm/components/slider/slider.js +2 -0
  258. package/esm/components/slider/slider.js.map +1 -1
  259. package/esm/components/slider/slider.styles.js +24 -0
  260. package/esm/components/slider/slider.styles.js.map +1 -0
  261. package/esm/components/slider/slider.template.js +17 -0
  262. package/esm/components/slider/slider.template.js.map +1 -0
  263. package/esm/components/styles/patterns/patterns.js +11 -0
  264. package/esm/components/styles/patterns/patterns.js.map +1 -0
  265. package/esm/index.js +25 -0
  266. package/esm/index.js.map +1 -1
  267. package/esm/util/a11y-playwright-utils.js +11 -0
  268. package/esm/util/a11y-playwright-utils.js.map +1 -0
  269. package/esm/util/carousel-controller.js +153 -0
  270. package/esm/util/carousel-controller.js.map +1 -0
  271. package/esm/util/icons.js +16 -1
  272. package/esm/util/icons.js.map +1 -1
  273. package/esm/util/index.js +1 -0
  274. package/esm/util/index.js.map +1 -1
  275. package/index.d.ts +2125 -957
  276. package/index.d.ts.map +1 -1
  277. package/index.js +6812 -4700
  278. package/index.js.map +1 -1
  279. package/index.min.js +108 -88
  280. package/index.min.js.map +1 -1
  281. package/package.json +2 -2
@@ -0,0 +1,369 @@
1
+ import { attr, nullableNumberConverter, observable, FASTElement, Observable } from '@microsoft/fast-element';
2
+ import { ModalModes } from './modal.options.js';
3
+ import { ModalEventNames } from './modal.events.js';
4
+ import { CarouselController } from '../../util/carousel-controller.js';
5
+ import { getString } from '@fabric-msft/localization';
6
+
7
+ var __decorate = globalThis && globalThis.__decorate || function (decorators, target, key, desc) {
8
+ var c = arguments.length,
9
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
10
+ d;
11
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
12
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
13
+ };
14
+ /**
15
+ * Default button labels sourced from the localization bundle.
16
+ * @internal
17
+ */
18
+ const defaultPrimaryLabel = () => getString("Modal_PrimaryAction");
19
+ const defaultNextLabel = () => getString("Modal_Next");
20
+ const defaultDoneLabel = () => getString("Modal_Done");
21
+ const defaultTryLaterLabel = () => getString("Modal_TryLater");
22
+ const defaultBackLabel = () => getString("Modal_Back");
23
+ const defaultDismissLabel = () => getString("Modal_Dismiss");
24
+ /**
25
+ * @summary A modal dialog with optional FRE (First Run Experience) multi-step wizard mode.
26
+ * Uses fabric-dialog internally for native backdrop, focus trapping, and Escape key handling.
27
+ *
28
+ * @example Default mode
29
+ * ```html
30
+ * <fabric-modal open modal-title="Confirm action">
31
+ * <h2>Are you sure?</h2>
32
+ * <p>This action cannot be undone.</p>
33
+ * </fabric-modal>
34
+ * ```
35
+ *
36
+ * @example FRE mode
37
+ * ```html
38
+ * <fabric-modal mode="fre" open modal-title="Welcome">
39
+ * <fabric-modal-fre-item>
40
+ * <span slot="title">Step 1</span>
41
+ * <span slot="description">First step details.</span>
42
+ * <img src="hero1.png" alt="Step 1" />
43
+ * </fabric-modal-fre-item>
44
+ * <fabric-modal-fre-item>
45
+ * <span slot="title">Step 2</span>
46
+ * <span slot="description">Second step details.</span>
47
+ * <img src="hero2.png" alt="Step 2" />
48
+ * </fabric-modal-fre-item>
49
+ * </fabric-modal>
50
+ * ```
51
+ *
52
+ * @attr {string} mode - Modal mode: "default" or "fre".
53
+ * @attr {boolean} open - Whether the modal is visible.
54
+ * @attr {string} modal-title - Accessible label for the modal.
55
+ * @attr {number} current-step - Active step index (FRE mode).
56
+ * @attr {string} primary-label - Label for the primary button in default mode (defaults to "OK").
57
+ * @attr {string} next-label - Label for the "Next" button in FRE mode (defaults to "Next").
58
+ * @attr {string} done-label - Label for the "Done" button in FRE mode (defaults to "Done").
59
+ * @attr {string} try-later-label - Label for the secondary button on FRE first step (defaults to "Try Later").
60
+ * @attr {string} back-label - Label for the secondary "Back" button in FRE mode (defaults to "Back").
61
+ * @attr {string} dismiss-label - Label for the secondary "Dismiss" button on FRE last step (defaults to "Dismiss").
62
+ *
63
+ * @prop {ModalMode} mode - Modal mode.
64
+ * @prop {boolean} open - Whether the modal is visible.
65
+ * @prop {string} modalTitle - Accessible label.
66
+ * @prop {number} currentStep - Active step index (FRE mode).
67
+ * @prop {number} totalSteps - Total step count (FRE mode, readonly).
68
+ *
69
+ * @slot default - Modal content. In FRE mode, accepts fabric-modal-fre-item elements.
70
+ *
71
+ * @fires open-change - Fired when open state changes.
72
+ * @fires dismiss - Fired when the modal is dismissed. Detail includes `{ complete: boolean }` indicating if dismissal was due to FRE wizard completion.
73
+ * @fires step-change - Fired when the active step changes (FRE mode).
74
+ *
75
+ * @extends FASTElement
76
+ * @tagname fabric-modal
77
+ * @public
78
+ */
79
+ class Modal extends FASTElement {
80
+ constructor() {
81
+ super(...arguments);
82
+ /**
83
+ * Carousel controller for FRE mode.
84
+ * @internal
85
+ */
86
+ this.carouselController = new CarouselController();
87
+ /**
88
+ * Modal mode: "default" for simple modal, "fre" for multi-step wizard.
89
+ * @public
90
+ */
91
+ this.mode = ModalModes.default;
92
+ /**
93
+ * Whether the modal is visible.
94
+ * @public
95
+ */
96
+ this.open = false;
97
+ /**
98
+ * Accessible label for the modal.
99
+ * @public
100
+ */
101
+ this.modalTitle = "";
102
+ /**
103
+ * Active step index. Only meaningful in FRE mode.
104
+ * @public
105
+ */
106
+ this.currentStep = 0;
107
+ /**
108
+ * Label for the primary button in default mode.
109
+ * @public
110
+ */
111
+ this.primaryLabel = "";
112
+ /**
113
+ * Label for the "Next" button in FRE mode.
114
+ * @public
115
+ */
116
+ this.nextLabel = "";
117
+ /**
118
+ * Label for the "Done" button in FRE mode.
119
+ * @public
120
+ */
121
+ this.doneLabel = "";
122
+ /**
123
+ * Label for the secondary button on FRE first step.
124
+ * @public
125
+ */
126
+ this.tryLaterLabel = "";
127
+ /**
128
+ * Label for the secondary "Back" button in FRE mode.
129
+ * @public
130
+ */
131
+ this.backLabel = "";
132
+ /**
133
+ * Label for the secondary "Dismiss" button on FRE last step.
134
+ * @public
135
+ */
136
+ this.dismissLabel = "";
137
+ /**
138
+ * Slotted items (used in FRE mode to track fre-items, or carousel-items in default).
139
+ * @internal
140
+ */
141
+ this.slottedContent = [];
142
+ /**
143
+ * FRE items parsed from slotted content.
144
+ * @internal
145
+ */
146
+ this.freItems = [];
147
+ }
148
+ /**
149
+ * Total step count (FRE mode).
150
+ * @public
151
+ * @readonly
152
+ */
153
+ get totalSteps() {
154
+ return this.carouselController.totalItems;
155
+ }
156
+ /**
157
+ * Callback when open changes.
158
+ * Delegates to the inner fabric-dialog's show/hide.
159
+ * @internal
160
+ */
161
+ openChanged(_oldValue, newValue) {
162
+ var _a, _b;
163
+ if (this.dialog) {
164
+ const dialogOpen = (_b = (_a = this.dialog.dialog) === null || _a === void 0 ? void 0 : _a.open) !== null && _b !== void 0 ? _b : false;
165
+ if (newValue && !dialogOpen) {
166
+ this.dialog.show();
167
+ } else if (!newValue && dialogOpen) {
168
+ this.dialog.hide();
169
+ }
170
+ }
171
+ if (this.$fastController.isConnected) {
172
+ this.emitOpenChange(newValue);
173
+ }
174
+ }
175
+ /**
176
+ * Callback when current-step attribute changes.
177
+ * Syncs the controller to the attribute value.
178
+ * @internal
179
+ */
180
+ currentStepChanged(_oldValue, newValue) {
181
+ const numValue = typeof newValue === "string" ? parseInt(newValue, 10) : newValue;
182
+ if (!isNaN(numValue)) {
183
+ this.carouselController.scrollToIndex(numValue);
184
+ }
185
+ }
186
+ /**
187
+ * Callback when slotted content changes.
188
+ * In FRE mode, extracts fre-items and assigns them directly to the carousel controller.
189
+ * @internal
190
+ */
191
+ slottedContentChanged() {
192
+ if (this.mode === ModalModes.fre) {
193
+ this.freItems = this.slottedContent.filter(el => el.tagName === "FABRIC-MODAL-FRE-ITEM");
194
+ this.carouselController.items = this.freItems;
195
+ this.carouselController.updateActiveStates();
196
+ }
197
+ }
198
+ /**
199
+ * Handles the toggle event from the inner fabric-dialog.
200
+ * Syncs open state when the dialog is closed externally (Escape key, backdrop click).
201
+ * @internal
202
+ */
203
+ handleDialogToggle(event) {
204
+ var _a;
205
+ const closed = ((_a = event.detail) === null || _a === void 0 ? void 0 : _a.newState) === "closed";
206
+ if (closed && this.open) {
207
+ this.handleDismiss();
208
+ }
209
+ }
210
+ /**
211
+ * Handles the primary button action.
212
+ * In default mode: dismisses. In FRE mode: advances step or completes.
213
+ * @internal
214
+ */
215
+ handlePrimaryAction() {
216
+ if (this.mode === ModalModes.fre) {
217
+ const isLastStep = this.carouselController.currentIndex >= this.carouselController.totalItems - 1;
218
+ if (isLastStep) {
219
+ this.handleDismiss(true);
220
+ } else {
221
+ this.carouselController.next();
222
+ }
223
+ } else {
224
+ this.handleDismiss();
225
+ }
226
+ }
227
+ /**
228
+ * Handles the secondary button action.
229
+ * In FRE mode: "Try Later" / "Back" / "Dismiss" depending on step.
230
+ * @internal
231
+ */
232
+ handleSecondaryAction() {
233
+ if (this.mode !== ModalModes.fre) {
234
+ return;
235
+ }
236
+ const isFirstStep = this.carouselController.currentIndex === 0;
237
+ const isLastStep = this.carouselController.currentIndex >= this.carouselController.totalItems - 1;
238
+ if (isFirstStep || isLastStep) {
239
+ this.handleDismiss();
240
+ } else {
241
+ this.carouselController.prev();
242
+ }
243
+ }
244
+ /**
245
+ * Handles dismiss (close button, Escape, backdrop click, or FRE completion).
246
+ * @param complete - Whether the dismiss was triggered by completing the FRE wizard.
247
+ * @internal
248
+ */
249
+ handleDismiss(complete = false) {
250
+ this.open = false;
251
+ const detail = {
252
+ complete
253
+ };
254
+ this.dispatchEvent(new CustomEvent(ModalEventNames.dismiss, {
255
+ detail,
256
+ bubbles: true,
257
+ composed: true
258
+ }));
259
+ }
260
+ /**
261
+ * Gets the label for the secondary button based on current FRE step.
262
+ * @internal
263
+ */
264
+ get secondaryButtonLabel() {
265
+ if (this.mode !== ModalModes.fre) {
266
+ return "";
267
+ }
268
+ const isFirstStep = this.carouselController.currentIndex === 0;
269
+ const isLastStep = this.carouselController.currentIndex >= this.carouselController.totalItems - 1;
270
+ if (isFirstStep) {
271
+ return this.tryLaterLabel || defaultTryLaterLabel();
272
+ }
273
+ if (isLastStep) {
274
+ return this.dismissLabel || defaultDismissLabel();
275
+ }
276
+ return this.backLabel || defaultBackLabel();
277
+ }
278
+ /**
279
+ * Gets the label for the primary button.
280
+ * @internal
281
+ */
282
+ get primaryButtonLabel() {
283
+ if (this.mode !== ModalModes.fre) {
284
+ return this.primaryLabel || defaultPrimaryLabel();
285
+ }
286
+ const isLastStep = this.carouselController.currentIndex >= this.carouselController.totalItems - 1;
287
+ return isLastStep ? this.doneLabel || defaultDoneLabel() : this.nextLabel || defaultNextLabel();
288
+ }
289
+ /**
290
+ * Subscriber implementation for CarouselController changes.
291
+ * Syncs currentStep attribute and emits step-change event.
292
+ * @internal
293
+ */
294
+ handleChange(source, propertyName) {
295
+ if (propertyName === "currentIndex" && this.currentStep !== source.currentIndex) {
296
+ this.currentStep = source.currentIndex;
297
+ this.emitStepChange();
298
+ }
299
+ }
300
+ connectedCallback() {
301
+ super.connectedCallback();
302
+ Observable.getNotifier(this.carouselController).subscribe(this, "currentIndex");
303
+ }
304
+ disconnectedCallback() {
305
+ super.disconnectedCallback();
306
+ Observable.getNotifier(this.carouselController).unsubscribe(this, "currentIndex");
307
+ }
308
+ /**
309
+ * Emits open-change event.
310
+ * @internal
311
+ */
312
+ emitOpenChange(open) {
313
+ this.dispatchEvent(new CustomEvent(ModalEventNames.openChange, {
314
+ detail: {
315
+ open
316
+ },
317
+ bubbles: true,
318
+ composed: true
319
+ }));
320
+ }
321
+ /**
322
+ * Emits step-change event.
323
+ * @internal
324
+ */
325
+ emitStepChange() {
326
+ this.dispatchEvent(new CustomEvent(ModalEventNames.stepChange, {
327
+ detail: {
328
+ currentStep: this.carouselController.currentIndex,
329
+ totalSteps: this.carouselController.totalItems
330
+ },
331
+ bubbles: true,
332
+ composed: true
333
+ }));
334
+ }
335
+ }
336
+ __decorate([attr], Modal.prototype, "mode", void 0);
337
+ __decorate([attr({
338
+ mode: "boolean"
339
+ })], Modal.prototype, "open", void 0);
340
+ __decorate([attr({
341
+ attribute: "modal-title"
342
+ })], Modal.prototype, "modalTitle", void 0);
343
+ __decorate([attr({
344
+ attribute: "current-step",
345
+ converter: nullableNumberConverter
346
+ })], Modal.prototype, "currentStep", void 0);
347
+ __decorate([attr({
348
+ attribute: "primary-label"
349
+ })], Modal.prototype, "primaryLabel", void 0);
350
+ __decorate([attr({
351
+ attribute: "next-label"
352
+ })], Modal.prototype, "nextLabel", void 0);
353
+ __decorate([attr({
354
+ attribute: "done-label"
355
+ })], Modal.prototype, "doneLabel", void 0);
356
+ __decorate([attr({
357
+ attribute: "try-later-label"
358
+ })], Modal.prototype, "tryLaterLabel", void 0);
359
+ __decorate([attr({
360
+ attribute: "back-label"
361
+ })], Modal.prototype, "backLabel", void 0);
362
+ __decorate([attr({
363
+ attribute: "dismiss-label"
364
+ })], Modal.prototype, "dismissLabel", void 0);
365
+ __decorate([observable], Modal.prototype, "dialog", void 0);
366
+ __decorate([observable], Modal.prototype, "slottedContent", void 0);
367
+ __decorate([observable], Modal.prototype, "freItems", void 0);
368
+
369
+ export { Modal };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal.js","sourceRoot":"","sources":["../../../../src/components/modal/modal.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,WAAW,EACX,UAAU,EACV,IAAI,EACJ,uBAAuB,EACvB,UAAU,EAEX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAkB,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAGvE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD;;;GAGG;AACH,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC;AAC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OrC;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;mCACJ;AAOtB;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;yCACX;AAOxB;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,uBAAuB,EAAE,CAAC;0CAChD;AAOxB;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;2CACX;AAO1B;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;wCACX;AAOvB;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;wCACX;AAOvB;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;4CACZ;AAO3B;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;wCACX;AAOvB;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;2CACX;AAO1B;IADC,UAAU;qCACK;AAOhB;IADC,UAAU;6CACwB;AAOnC;IADC,UAAU;uCACmB"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Modal mode options.
3
+ * @public
4
+ */
5
+ const ModalModes = {
6
+ default: "default",
7
+ fre: "fre"
8
+ };
9
+
10
+ export { ModalModes };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal.options.js","sourceRoot":"","sources":["../../../../src/components/modal/modal.options.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,OAAO,EAAE,SAAS;IAClB,GAAG,EAAE,KAAK;CACF,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { css } from '@microsoft/fast-element';
2
+ import { spacingVerticalM, spacingHorizontalL, spacingVerticalL, spacingHorizontalXL, fontSizeBase500, fontWeightSemibold, colorNeutralForeground1, spacingVerticalS, fontSizeBase300, colorNeutralForeground2 } from '@fluentui/web-components';
3
+
4
+ /**
5
+ * Styles for the {@link @fabric-msft/fabric-web#(Modal:class)} component.
6
+ * The outer dialog chrome (backdrop, border-radius, shadow, max-width) is
7
+ * provided by the inner fabric-dialog; these styles handle modal-specific
8
+ * layout (close button, content area, footer, FRE nav, buttons).
9
+ * @public
10
+ */
11
+ const styles = css`
12
+ :host{display:contents}.modal-body{display:flex;flex-direction:column;position:relative;max-height:85vh}.close-button{position:absolute;inset-block-start:${spacingVerticalM};inset-inline-end:${spacingHorizontalL};z-index:1}.content{flex:1;overflow:auto;padding:${spacingVerticalL} ${spacingHorizontalXL}}:host([mode="fre"]) .content{padding:0;overflow:hidden}::slotted(fabric-modal-fre-item){display:block}::slotted(fabric-modal-fre-item:not([active])){display:none !important}.footer{display:flex;align-items:center;justify-content:space-between;padding:${spacingVerticalL} ${spacingHorizontalXL};gap:${spacingHorizontalL}}.nav{flex:1;display:flex;justify-content:center}::slotted(h1),::slotted(h2),::slotted(h3){font-size:${fontSizeBase500};font-weight:${fontWeightSemibold};color:${colorNeutralForeground1};margin:0 0 ${spacingVerticalS}}::slotted(p){font-size:${fontSizeBase300};color:${colorNeutralForeground2};margin:0}`;
13
+
14
+ export { styles };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal.styles.js","sourceRoot":"","sources":["../../../../src/components/modal/modal.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAE9C,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,0BAA0B,CAAC;AAElC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,MAAM,GAAkB,GAAG,CAAA;;;;;;;;;;;;;;yBAcf,gBAAgB;wBACjB,kBAAkB;;;;;;;eAO3B,gBAAgB,IAAI,mBAAmB;;;;;;;;;;;;;;;;;;;;eAoBvC,gBAAgB,IAAI,mBAAmB;WAC3C,kBAAkB;;;;;;;;;;;;iBAYZ,eAAe;mBACb,kBAAkB;aACxB,uBAAuB;kBAClB,gBAAgB;;;;iBAIjB,eAAe;aACnB,uBAAuB;;;CAGnC,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { ref, when, oneTime, html, slotted, repeat } from '@microsoft/fast-element';
2
+ import { ModalModes } from './modal.options.js';
3
+ import { dismissIcon } from '../../static/component-svgs.js';
4
+ import { getString } from '@fabric-msft/localization';
5
+
6
+ /**
7
+ * The template for the {@link @fabric-msft/fabric-web#(Modal:class)} component.
8
+ * Uses fabric-dialog internally for native backdrop, focus trapping, and Escape handling.
9
+ *
10
+ * FRE mode tab order: dismiss button (inside fre-item) → secondary button → carousel nav → primary button.
11
+ * @public
12
+ */
13
+ function modalTemplate() {
14
+ return html`<template><fabric-dialog type="modal" aria-label="${x => x.modalTitle}" ${ref("dialog")} @toggle="${(x, c) => x.handleDialogToggle(c.event)}"><div class="modal-body">${when(x => x.mode !== ModalModes.fre, html`<fabric-button class="close-button" appearance="subtle" size="small" aria-label="${oneTime(() => getString("Modal_Close"))}" @click="${x => x.handleDismiss()}">${dismissIcon}</fabric-button>`)}<div class="content" @dismiss="${x => x.handleDismiss()}">${when(x => x.mode === ModalModes.fre, html`<slot ${slotted({
15
+ property: "slottedContent",
16
+ filter: el => el.tagName === "FABRIC-MODAL-FRE-ITEM"
17
+ })}></slot>`)} ${when(x => x.mode !== ModalModes.fre, html`<slot></slot>`)}</div><div class="footer">${when(x => x.mode === ModalModes.fre, html`<fabric-button appearance="outline" @click="${x => x.handleSecondaryAction()}">${x => x.secondaryButtonLabel}</fabric-button>`)} ${when(x => x.mode === ModalModes.fre, html`<div class="nav"><fabric-carousel-nav :controller="${x => x.carouselController}" button-placement="hidden" current-index="${x => x.carouselController.currentIndex}">${repeat(x => x.carouselController.items, html`<fabric-carousel-nav-item :tabId="${(_item, c) => c.parent.carouselController.getTabId(c.index)}" :panelId="${(_item, c) => c.parent.carouselController.getPanelId(c.index)}" :tabLabel="${(_item, c) => c.parent.carouselController.getTabLabel(c.index)}"></fabric-carousel-nav-item>`, {
18
+ positioning: true
19
+ })}</fabric-carousel-nav></div>`)}<fabric-button appearance="primary" @click="${x => x.handlePrimaryAction()}">${x => x.primaryButtonLabel}</fabric-button></div></div></fabric-dialog></template>`;
20
+ }
21
+ const template = modalTemplate();
22
+
23
+ export { modalTemplate, template };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal.template.js","sourceRoot":"","sources":["../../../../src/components/modal/modal.template.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,OAAO,EACP,GAAG,EACH,MAAM,EACN,OAAO,EACP,IAAI,EACL,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD;;;;;;GAMG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,IAAI,CAAG;;;;sBAIM,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU;UAC/B,GAAG,CAAC,QAAQ,CAAC;mBACJ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,KAAoB,CAAC;;;YAG7D,IAAI,CACJ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,UAAU,CAAC,GAAG,EAChC,IAAI,CAAG;;;;;8BAKW,OAAO,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;0BAC3C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,EAAE;;kBAEhC,WAAW;;aAEhB,CACF;;2CAEgC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,EAAE;cACr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AK,EAAE,CAAC,EAAE,EAAE,CACxB,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC;;uBAErD,EACD,EAAE,WAAW,EAAE,IAAI,EAAE,CACtB;;;eAGN,CACF;;;;wBAIW,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,mBAAmB,EAAE;;gBAEtC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,kBAAkB;;;;;;GAMxC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAA+B,aAAa,EAAE,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { modalFreItemDefinition } from "./modal-fre-item.definition.js";
2
+ import { DesignSystem } from "../design-system.js";
3
+ modalFreItemDefinition.define(DesignSystem.registry);
4
+ //# sourceMappingURL=define.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define.js","sourceRoot":"","sources":["../../../../src/components/modal-fre-item/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,sBAAsB,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { ModalFreItem } from "./modal-fre-item.js";
2
+ export { modalFreItemDefinition as ModalFreItemDefinition } from "./modal-fre-item.definition.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/modal-fre-item/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,sBAAsB,IAAI,sBAAsB,EAAE,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { definition } from '../button/button.definition.js';
2
+ import { DesignSystem } from '../design-system.js';
3
+ import { composeDefinitions, fromFAST } from '../../util/element-definition.js';
4
+ import { ModalFreItem } from './modal-fre-item.js';
5
+ import { modalFreItemStyles } from './modal-fre-item.styles.js';
6
+ import { modalFreItemTemplate_ } from './modal-fre-item.template.js';
7
+
8
+ /** @internal */
9
+ const ModalFreItemDefinition = ModalFreItem.compose({
10
+ name: `${DesignSystem.prefix}-modal-fre-item`,
11
+ template: modalFreItemTemplate_,
12
+ styles: modalFreItemStyles,
13
+ shadowOptions: {
14
+ mode: DesignSystem.shadowRootMode
15
+ }
16
+ });
17
+ /**
18
+ * Composed element definition for `<fabric-modal-fre-item>`, registering the
19
+ * `fabric-button` dependency before the element itself.
20
+ *
21
+ * @public
22
+ * @remarks
23
+ * HTML Element: `<fabric-modal-fre-item>`
24
+ */
25
+ const modalFreItemDefinition = composeDefinitions(fromFAST(ModalFreItemDefinition), fromFAST(definition));
26
+
27
+ export { modalFreItemDefinition };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal-fre-item.definition.js","sourceRoot":"","sources":["../../../../src/components/modal-fre-item/modal-fre-item.definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,gBAAgB;AAChB,MAAM,sBAAsB,GAAG,YAAY,CAAC,OAAO,CAAC;IAClD,IAAI,EAAE,GAAG,YAAY,CAAC,MAAM,iBAAiB;IAC7C,QAAQ,EAAE,qBAAqB;IAC/B,MAAM,EAAE,kBAAkB;IAC1B,aAAa,EAAE;QACb,IAAI,EAAE,YAAY,CAAC,cAAc;KAClC;CACF,CAAC,CAAC;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,kBAAkB,CACtD,QAAQ,CAAC,sBAAsB,CAAC,EAChC,QAAQ,CAAC,gBAAgB,CAAC,CAC3B,CAAC"}
@@ -0,0 +1,72 @@
1
+ import { attr, observable, FASTElement } from '@microsoft/fast-element';
2
+
3
+ var __decorate = globalThis && globalThis.__decorate || function (decorators, target, key, desc) {
4
+ var c = arguments.length,
5
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
6
+ d;
7
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
8
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
9
+ };
10
+ /**
11
+ * @summary A content item for the modal FRE (First Run Experience) wizard.
12
+ *
13
+ * Each fre-item is a self-contained step that renders its own hero content,
14
+ * title, description, and dismiss button. The parent `fabric-modal` assigns
15
+ * fre-items to a {@link CarouselController} which manages active state and
16
+ * ARIA linkage. Only the active item is visible.
17
+ *
18
+ * @example
19
+ * ```html
20
+ * <fabric-modal-fre-item>
21
+ * <span slot="title">Welcome</span>
22
+ * <span slot="description">Get started with Fabric.</span>
23
+ * <img src="hero.png" alt="Welcome illustration" />
24
+ * </fabric-modal-fre-item>
25
+ * ```
26
+ *
27
+ * @attr {boolean} active - Whether this item is the currently visible step.
28
+ * @attr {string} label - Accessible label for this step.
29
+ *
30
+ * @prop {string} panelId - Unique ID for this panel (set by CarouselController).
31
+ * @prop {string} tabId - ID of the associated tab (for aria-labelledby, set by CarouselController).
32
+ *
33
+ * @slot default - Hero content (image, illustration, or any visual).
34
+ * @slot title - Title content for this step.
35
+ * @slot description - Description content for this step.
36
+ *
37
+ * @fires dismiss - Fired when the dismiss button is clicked. Bubbles and is composed.
38
+ *
39
+ * @extends FASTElement
40
+ * @tagname fabric-modal-fre-item
41
+ * @public
42
+ */
43
+ class ModalFreItem extends FASTElement {
44
+ constructor() {
45
+ super(...arguments);
46
+ /**
47
+ * Whether this item is the currently visible step.
48
+ * Managed by the CarouselController.
49
+ * @public
50
+ */
51
+ this.active = false;
52
+ }
53
+ /**
54
+ * Handles the dismiss button click.
55
+ * Dispatches a bubbling, composed dismiss event.
56
+ * @internal
57
+ */
58
+ handleDismiss() {
59
+ this.dispatchEvent(new CustomEvent("dismiss", {
60
+ bubbles: true,
61
+ composed: true
62
+ }));
63
+ }
64
+ }
65
+ __decorate([attr({
66
+ mode: "boolean"
67
+ })], ModalFreItem.prototype, "active", void 0);
68
+ __decorate([attr], ModalFreItem.prototype, "label", void 0);
69
+ __decorate([observable], ModalFreItem.prototype, "panelId", void 0);
70
+ __decorate([observable], ModalFreItem.prototype, "tabId", void 0);
71
+
72
+ export { ModalFreItem };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal-fre-item.js","sourceRoot":"","sources":["../../../../src/components/modal-fre-item/modal-fre-item.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAA7C;;QACE;;;;WAIG;QAEH,WAAM,GAAY,KAAK,CAAC;IAoC1B,CAAC;IAbC;;;;OAIG;IACH,aAAa;QACX,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,SAAS,EAAE;YACzB,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;SACf,CAAC,CACH,CAAC;IACJ,CAAC;CACF;AApCC;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;4CACF;AAOxB;IADC,IAAI;2CACU;AAOf;IADC,UAAU;6CACM;AAOjB;IADC,UAAU;2CACI"}
@@ -0,0 +1,11 @@
1
+ import { css } from '@microsoft/fast-element';
2
+ import { spacingHorizontalXL, spacingHorizontalL, fontSizeBase400, fontWeightSemibold, colorNeutralForeground1, spacingVerticalXS, fontSizeBase300, lineHeightBase300, colorNeutralForeground2 } from '@fluentui/web-components';
3
+
4
+ /**
5
+ * Styles for the {@link @fabric-msft/fabric-web#(ModalFreItem:class)} component.
6
+ * @public
7
+ */
8
+ const modalFreItemStyles = css`
9
+ :host{display:none}:host([active]){display:block}.hero{overflow:hidden}.hero ::slotted(*){display:block;width:100%}.info{padding:${spacingHorizontalXL};padding-block-end:0}.info-header{display:flex;align-items:flex-start;justify-content:space-between;gap:${spacingHorizontalL}}.title{font-size:${fontSizeBase400};font-weight:${fontWeightSemibold};color:${colorNeutralForeground1};margin:0}.description{margin:${spacingVerticalXS} 0 0;font-size:${fontSizeBase300};line-height:${lineHeightBase300};color:${colorNeutralForeground2}}`;
10
+
11
+ export { modalFreItemStyles };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal-fre-item.styles.js","sourceRoot":"","sources":["../../../../src/components/modal-fre-item/modal-fre-item.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAE9C,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,0BAA0B,CAAC;AAElC;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAkB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;eAmBrC,mBAAmB;;;;;;;;WAQvB,kBAAkB;;;;iBAIZ,eAAe;mBACb,kBAAkB;aACxB,uBAAuB;;;;;cAKtB,iBAAiB;iBACd,eAAe;mBACb,iBAAiB;aACvB,uBAAuB;;CAEnC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { oneTime, html } from '@microsoft/fast-element';
2
+ import { dismissIcon } from '../../static/component-svgs.js';
3
+ import { getString } from '@fabric-msft/localization';
4
+
5
+ /**
6
+ * The template for the {@link @fabric-msft/fabric-web#(ModalFreItem:class)} component.
7
+ * Renders a self-contained FRE step: hero content, title with dismiss button, and description.
8
+ * Uses ARIA tabpanel pattern driven by the CarouselController.
9
+ * @public
10
+ */
11
+ function modalFreItemTemplate() {
12
+ return html`<template role="tabpanel" id="${x => x.panelId}" aria-labelledby="${x => x.tabId}" aria-label="${x => x.label}" aria-hidden="${x => !x.active ? "true" : null}" tabindex="-1"><div class="hero"><slot></slot></div><div class="info"><div class="info-header"><h2 class="title"><slot name="title"></slot></h2><fabric-button appearance="subtle" class="dismiss-button" size="small" icon-only aria-label="${oneTime(() => getString("Modal_Close"))}" @click="${x => x.handleDismiss()}">${dismissIcon}</fabric-button></div><p class="description"><slot name="description"></slot></p></div></template>`;
13
+ }
14
+ const modalFreItemTemplate_ = modalFreItemTemplate();
15
+
16
+ export { modalFreItemTemplate, modalFreItemTemplate_ };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal-fre-item.template.js","sourceRoot":"","sources":["../../../../src/components/modal-fre-item/modal-fre-item.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAGxD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB;IAGlC,OAAO,IAAI,CAAG;;;YAGJ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO;yBACH,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK;oBACnB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK;qBACb,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;;;;;;;;;;;;;;0BAc7B,OAAO,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;sBAC3C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,EAAE;;cAEhC,WAAW;;;;;;GAMtB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAChC,oBAAoB,EAAE,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { RadioGroup as RadioGroup$1 } from '@fluentui/web-components';
2
+ import { Radio } from '../radio/radio.js';
2
3
 
3
4
  /**
4
5
  * RadioGroup
@@ -41,6 +42,24 @@ import { RadioGroup as RadioGroup$1 } from '@fluentui/web-components';
41
42
  * @tagname fabric-radio-group
42
43
  * @public
43
44
  */
44
- class RadioGroup extends RadioGroup$1 {}
45
+ class RadioGroup extends RadioGroup$1 {
46
+ /**
47
+ * Re-collects `this.radios` from slotted children, restricted to elements
48
+ * that have already upgraded to the `Radio` class.
49
+ *
50
+ * @remarks
51
+ * The upstream implementation collects every descendant whose tag name
52
+ * ends in `-radio` (via `isRadio`), which matches bare `HTMLElement`s
53
+ * that haven't been upgraded yet.
54
+ *
55
+ * Filtering with `instanceof Radio` excludes pre-upgrade elements, so we
56
+ * never write through their shadowed accessors.
57
+ *
58
+ * @internal
59
+ */
60
+ slottedRadiosChanged() {
61
+ this.radios = [...this.querySelectorAll("*")].filter(x => x instanceof Radio);
62
+ }
63
+ }
45
64
 
46
65
  export { RadioGroup };
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../../../src/components/radio-group/radio-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,OAAO,UAAW,SAAQ,gBAAgB;CAAG"}
1
+ {"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../../../src/components/radio-group/radio-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,OAAO,UAAW,SAAQ,gBAAgB;IAC9C;;;;;;;;;;;;;OAaG;IACa,oBAAoB;QAClC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAClD,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,YAAY,KAAK,CACf,CAAC;IACf,CAAC;CACF"}