@design-factory/angular 21.1.0-next.1 → 22.0.0-next.0

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 (331) hide show
  1. package/.ai/docs/components/accordion/accessibility.md +45 -0
  2. package/.ai/docs/components/accordion/api.md +279 -0
  3. package/.ai/docs/components/accordion/developer.md +43 -0
  4. package/.ai/docs/components/accordion/guidelines.md +99 -0
  5. package/.ai/docs/components/accordion/overview.md +17 -0
  6. package/.ai/docs/components/alert/accessibility.md +24 -0
  7. package/.ai/docs/components/alert/api.md +65 -0
  8. package/.ai/docs/components/alert/developer.md +63 -0
  9. package/.ai/docs/components/alert/guidelines.md +62 -0
  10. package/.ai/docs/components/alert/overview.md +12 -0
  11. package/.ai/docs/components/button/accessibility.md +25 -0
  12. package/.ai/docs/components/button/api.md +71 -0
  13. package/.ai/docs/components/button/developer.md +52 -0
  14. package/.ai/docs/components/button/guidelines.md +75 -0
  15. package/.ai/docs/components/button/overview.md +15 -0
  16. package/.ai/docs/components/buttongroup/api.md +16 -0
  17. package/.ai/docs/components/buttongroup/developer.md +32 -0
  18. package/.ai/docs/components/drawer/accessibility.md +15 -0
  19. package/.ai/docs/components/drawer/api.md +56 -0
  20. package/.ai/docs/components/drawer/developer.md +36 -0
  21. package/.ai/docs/components/drawer/examples.md +9 -0
  22. package/.ai/docs/components/drawer/guidelines.md +58 -0
  23. package/.ai/docs/components/drawer/overview.md +19 -0
  24. package/.ai/docs/components/dropdown/accessibility.md +27 -0
  25. package/.ai/docs/components/dropdown/api.md +85 -0
  26. package/.ai/docs/components/dropdown/developer.md +59 -0
  27. package/.ai/docs/components/dropdown/guidelines.md +80 -0
  28. package/.ai/docs/components/dropdown/overview.md +16 -0
  29. package/.ai/docs/components/sidenav/accessibility.md +48 -0
  30. package/.ai/docs/components/sidenav/api.md +110 -0
  31. package/.ai/docs/components/sidenav/developer.md +14 -0
  32. package/.ai/docs/components/sidenav/guidelines.md +83 -0
  33. package/.ai/docs/components/sidenav/overview.md +16 -0
  34. package/.ai/docs/components/tooltip/accessibility.md +11 -0
  35. package/.ai/docs/components/tooltip/api.md +39 -0
  36. package/.ai/docs/components/tooltip/developer.md +16 -0
  37. package/.ai/docs/components/tooltip/guidelines.md +84 -0
  38. package/.ai/docs/components/tooltip/overview.md +23 -0
  39. package/.ai/docs/components/topnav/accessibility.md +51 -0
  40. package/.ai/docs/components/topnav/api.md +190 -0
  41. package/.ai/docs/components/topnav/developer.md +43 -0
  42. package/.ai/docs/components/topnav/guidelines.md +121 -0
  43. package/.ai/docs/components/topnav/overview.md +17 -0
  44. package/.ai/docs/demos/accordion/addons-subtitle/accordion-addons-subtitle.html +75 -0
  45. package/.ai/docs/demos/accordion/addons-subtitle/accordion-addons-subtitle.ts +27 -0
  46. package/.ai/docs/demos/accordion/basic/accordion-basic.html +16 -0
  47. package/.ai/docs/demos/accordion/basic/accordion-basic.ts +14 -0
  48. package/.ai/docs/demos/accordion/close-others/accordion-close-others.html +16 -0
  49. package/.ai/docs/demos/accordion/close-others/accordion-close-others.ts +14 -0
  50. package/.ai/docs/demos/accordion/interactive/accordion-interactive.html +84 -0
  51. package/.ai/docs/demos/accordion/interactive/accordion-interactive.ts +30 -0
  52. package/.ai/docs/demos/accordion/interactive-addons-subtitle/accordion-interactive-addons-subtitle.html +126 -0
  53. package/.ai/docs/demos/accordion/interactive-addons-subtitle/accordion-interactive-addons-subtitle.ts +33 -0
  54. package/.ai/docs/demos/accordion/programmatic-control/accordion-programmatic-control.html +36 -0
  55. package/.ai/docs/demos/accordion/programmatic-control/accordion-programmatic-control.ts +15 -0
  56. package/.ai/docs/demos/accordion/selectable/accordion-selectable.html +16 -0
  57. package/.ai/docs/demos/accordion/selectable/accordion-selectable.ts +14 -0
  58. package/.ai/docs/demos/accordion/selectable-extended/accordion-selectable-extended.html +28 -0
  59. package/.ai/docs/demos/accordion/selectable-extended/accordion-selectable-extended.ts +80 -0
  60. package/.ai/docs/demos/accordion/separator/accordion-separator.html +16 -0
  61. package/.ai/docs/demos/accordion/separator/accordion-separator.ts +14 -0
  62. package/.ai/docs/demos/alert/banner/alert-banner.html +15 -0
  63. package/.ai/docs/demos/alert/banner/alert-banner.ts +16 -0
  64. package/.ai/docs/demos/alert/basic/alert-basic.html +6 -0
  65. package/.ai/docs/demos/alert/basic/alert-basic.ts +9 -0
  66. package/.ai/docs/demos/alert/card/alert-card.html +15 -0
  67. package/.ai/docs/demos/alert/card/alert-card.ts +9 -0
  68. package/.ai/docs/demos/alert/dismissal/alert-dismissal.html +5 -0
  69. package/.ai/docs/demos/alert/dismissal/alert-dismissal.ts +27 -0
  70. package/.ai/docs/demos/alert/expandable/alert-expandable.html +9 -0
  71. package/.ai/docs/demos/alert/expandable/alert-expandable.ts +11 -0
  72. package/.ai/docs/demos/button/basic/button-basic.html +4 -0
  73. package/.ai/docs/demos/button/basic/button-basic.ts +9 -0
  74. package/.ai/docs/demos/button/disabled/button-disabled.html +18 -0
  75. package/.ai/docs/demos/button/disabled/button-disabled.ts +12 -0
  76. package/.ai/docs/demos/button/icons/button-icons.html +17 -0
  77. package/.ai/docs/demos/button/icons/button-icons.ts +10 -0
  78. package/.ai/docs/demos/button/surfaces/button-surfaces.html +13 -0
  79. package/.ai/docs/demos/button/surfaces/button-surfaces.ts +9 -0
  80. package/.ai/docs/demos/button/variants/button-variants.html +49 -0
  81. package/.ai/docs/demos/button/variants/button-variants.ts +9 -0
  82. package/.ai/docs/demos/buttongroup/basic/buttongroup-basic.html +6 -0
  83. package/.ai/docs/demos/buttongroup/basic/buttongroup-basic.ts +10 -0
  84. package/.ai/docs/demos/buttongroup/disabled/buttongroup-disabled.html +6 -0
  85. package/.ai/docs/demos/buttongroup/disabled/buttongroup-disabled.ts +10 -0
  86. package/.ai/docs/demos/buttongroup/mirror/buttongroup-mirror.html +8 -0
  87. package/.ai/docs/demos/buttongroup/mirror/buttongroup-mirror.ts +10 -0
  88. package/.ai/docs/demos/buttongroup/orientation/buttongroup-orientation.html +19 -0
  89. package/.ai/docs/demos/buttongroup/orientation/buttongroup-orientation.ts +10 -0
  90. package/.ai/docs/demos/buttongroup/sizing/buttongroup-sizing.html +19 -0
  91. package/.ai/docs/demos/buttongroup/sizing/buttongroup-sizing.ts +10 -0
  92. package/.ai/docs/demos/drawer/inline/drawer-inline-basic.html +46 -0
  93. package/.ai/docs/demos/drawer/inline/drawer-inline-basic.ts +33 -0
  94. package/.ai/docs/demos/drawer/overlay/drawer-overlay-basic.html +30 -0
  95. package/.ai/docs/demos/drawer/overlay/drawer-overlay-basic.ts +25 -0
  96. package/.ai/docs/demos/dropdown/basic/dropdown-basic.html +8 -0
  97. package/.ai/docs/demos/dropdown/basic/dropdown-basic.ts +15 -0
  98. package/.ai/docs/demos/dropdown/sizes/dropdown-sizes.html +9 -0
  99. package/.ai/docs/demos/dropdown/sizes/dropdown-sizes.ts +21 -0
  100. package/.ai/docs/demos/dropdown/split/dropdown-split.html +9 -0
  101. package/.ai/docs/demos/dropdown/split/dropdown-split.ts +11 -0
  102. package/.ai/docs/demos/dropdown/toggle/dropdown-toggle.html +22 -0
  103. package/.ai/docs/demos/dropdown/toggle/dropdown-toggle.ts +10 -0
  104. package/.ai/docs/demos/sidenav/sidenav-basic-no-icon/routes.ts +95 -0
  105. package/.ai/docs/demos/sidenav/sidenav-basic-no-icon/sidenav-basic-no-icon.html +42 -0
  106. package/.ai/docs/demos/sidenav/sidenav-basic-no-icon/sidenav-basic-no-icon.ts +12 -0
  107. package/.ai/docs/demos/sidenav/sidenav-basic-with-icon/routes.ts +41 -0
  108. package/.ai/docs/demos/sidenav/sidenav-basic-with-icon/sidenav-basic-with-icon.html +34 -0
  109. package/.ai/docs/demos/sidenav/sidenav-basic-with-icon/sidenav-basic-with-icon.ts +12 -0
  110. package/.ai/docs/demos/tooltip/basic/tooltip-basic.html +1 -0
  111. package/.ai/docs/demos/tooltip/basic/tooltip-basic.ts +10 -0
  112. package/.ai/docs/demos/tooltip/placements/tooltip-placements.html +35 -0
  113. package/.ai/docs/demos/tooltip/placements/tooltip-placements.ts +12 -0
  114. package/.ai/docs/demos/tooltip/sizes/tooltip-sizes.html +5 -0
  115. package/.ai/docs/demos/tooltip/sizes/tooltip-sizes.ts +10 -0
  116. package/.ai/docs/demos/topnav/brand/topnav-brand.ts +64 -0
  117. package/.ai/docs/demos/topnav/environment-banner/topnav-environment-banner.ts +20 -0
  118. package/.ai/docs/demos/topnav/navigation/routes.ts +35 -0
  119. package/.ai/docs/demos/topnav/navigation/topnav-navigation-flat.ts +67 -0
  120. package/.ai/docs/demos/topnav/navigation/topnav-navigation-tree.ts +82 -0
  121. package/.ai/docs/demos/topnav/quick-actions/notifications.ts +75 -0
  122. package/.ai/docs/demos/topnav/quick-actions/topnav-quick-actions.ts +108 -0
  123. package/.ai/docs/demos/topnav/quick-actions/user-account.ts +23 -0
  124. package/.ai/index.md +26 -0
  125. package/fesm2022/design-factory-angular-accordion.mjs +1153 -0
  126. package/fesm2022/design-factory-angular-accordion.mjs.map +1 -0
  127. package/fesm2022/design-factory-angular-alert.mjs +312 -0
  128. package/fesm2022/design-factory-angular-alert.mjs.map +1 -0
  129. package/fesm2022/design-factory-angular-breakpoints.mjs +53 -0
  130. package/fesm2022/design-factory-angular-breakpoints.mjs.map +1 -0
  131. package/fesm2022/design-factory-angular-button.mjs +240 -0
  132. package/fesm2022/design-factory-angular-button.mjs.map +1 -0
  133. package/fesm2022/design-factory-angular-buttongroup.mjs +75 -0
  134. package/fesm2022/design-factory-angular-buttongroup.mjs.map +1 -0
  135. package/fesm2022/design-factory-angular-drawer.mjs +76 -81
  136. package/fesm2022/design-factory-angular-drawer.mjs.map +1 -1
  137. package/fesm2022/design-factory-angular-dropdown.mjs +323 -0
  138. package/fesm2022/design-factory-angular-dropdown.mjs.map +1 -0
  139. package/fesm2022/design-factory-angular-form-field.mjs +287 -0
  140. package/fesm2022/design-factory-angular-form-field.mjs.map +1 -0
  141. package/fesm2022/design-factory-angular-icon.mjs +24 -0
  142. package/fesm2022/design-factory-angular-icon.mjs.map +1 -0
  143. package/fesm2022/design-factory-angular-input.mjs +34 -0
  144. package/fesm2022/design-factory-angular-input.mjs.map +1 -0
  145. package/fesm2022/design-factory-angular-internals.mjs +119 -39
  146. package/fesm2022/design-factory-angular-internals.mjs.map +1 -1
  147. package/fesm2022/design-factory-angular-separator.mjs +43 -0
  148. package/fesm2022/design-factory-angular-separator.mjs.map +1 -0
  149. package/fesm2022/design-factory-angular-sidenav.mjs +766 -438
  150. package/fesm2022/design-factory-angular-sidenav.mjs.map +1 -1
  151. package/fesm2022/design-factory-angular-slider.mjs +451 -0
  152. package/fesm2022/design-factory-angular-slider.mjs.map +1 -0
  153. package/fesm2022/design-factory-angular-theme.mjs +30 -20
  154. package/fesm2022/design-factory-angular-theme.mjs.map +1 -1
  155. package/fesm2022/design-factory-angular-toggle.mjs +172 -0
  156. package/fesm2022/design-factory-angular-toggle.mjs.map +1 -0
  157. package/fesm2022/design-factory-angular-tooltip.mjs +138 -0
  158. package/fesm2022/design-factory-angular-tooltip.mjs.map +1 -0
  159. package/fesm2022/design-factory-angular-topnav.mjs +635 -558
  160. package/fesm2022/design-factory-angular-topnav.mjs.map +1 -1
  161. package/package.json +61 -8
  162. package/schematics/collection.json +35 -0
  163. package/schematics/component-migration/accordion/constants.d.ts +10 -0
  164. package/schematics/component-migration/accordion/constants.js +46 -0
  165. package/schematics/component-migration/accordion/guide.md +257 -0
  166. package/schematics/component-migration/accordion/index.d.ts +2 -0
  167. package/schematics/component-migration/accordion/index.js +5 -0
  168. package/schematics/component-migration/accordion/migration.d.ts +2 -0
  169. package/schematics/component-migration/accordion/migration.js +13 -0
  170. package/schematics/component-migration/accordion/schema.json +25 -0
  171. package/schematics/component-migration/accordion/steps/accordion-imports.d.ts +3 -0
  172. package/schematics/component-migration/accordion/steps/accordion-imports.js +41 -0
  173. package/schematics/component-migration/accordion/steps/template-migration.d.ts +3 -0
  174. package/schematics/component-migration/accordion/steps/template-migration.js +554 -0
  175. package/schematics/component-migration/accordion/steps/title-content.d.ts +9 -0
  176. package/schematics/component-migration/accordion/steps/title-content.js +75 -0
  177. package/schematics/component-migration/ai/prompt.md +83 -0
  178. package/schematics/component-migration/alert/guide.md +246 -0
  179. package/schematics/component-migration/alert/index.d.ts +2 -0
  180. package/schematics/component-migration/alert/index.js +5 -0
  181. package/schematics/component-migration/alert/migration.d.ts +2 -0
  182. package/schematics/component-migration/alert/migration.js +50 -0
  183. package/schematics/component-migration/alert/schema.json +25 -0
  184. package/schematics/component-migration/alert/steps/alert-imports.d.ts +4 -0
  185. package/schematics/component-migration/alert/steps/alert-imports.js +97 -0
  186. package/schematics/component-migration/alert/steps/animation-input.d.ts +3 -0
  187. package/schematics/component-migration/alert/steps/animation-input.js +17 -0
  188. package/schematics/component-migration/alert/steps/close-output.d.ts +3 -0
  189. package/schematics/component-migration/alert/steps/close-output.js +17 -0
  190. package/schematics/component-migration/alert/steps/icon-directive-imports.d.ts +3 -0
  191. package/schematics/component-migration/alert/steps/icon-directive-imports.js +84 -0
  192. package/schematics/component-migration/alert/steps/icon-directive.d.ts +3 -0
  193. package/schematics/component-migration/alert/steps/icon-directive.js +10 -0
  194. package/schematics/component-migration/alert/steps/legacy-module-imports.d.ts +3 -0
  195. package/schematics/component-migration/alert/steps/legacy-module-imports.js +57 -0
  196. package/schematics/component-migration/alert/steps/programmatic-close.d.ts +3 -0
  197. package/schematics/component-migration/alert/steps/programmatic-close.js +44 -0
  198. package/schematics/component-migration/alert/steps/selector.d.ts +3 -0
  199. package/schematics/component-migration/alert/steps/selector.js +18 -0
  200. package/schematics/component-migration/alert/steps/static-classes.d.ts +3 -0
  201. package/schematics/component-migration/alert/steps/static-classes.js +97 -0
  202. package/schematics/component-migration/alert/steps/static-type.d.ts +3 -0
  203. package/schematics/component-migration/alert/steps/static-type.js +28 -0
  204. package/schematics/component-migration/alert/steps/template-reference.d.ts +3 -0
  205. package/schematics/component-migration/alert/steps/template-reference.js +15 -0
  206. package/schematics/component-migration/alert/steps/template-todos.d.ts +3 -0
  207. package/schematics/component-migration/alert/steps/template-todos.js +78 -0
  208. package/schematics/component-migration/button/guide.md +278 -0
  209. package/schematics/component-migration/button/index.d.ts +2 -0
  210. package/schematics/component-migration/button/index.js +5 -0
  211. package/schematics/component-migration/button/migration.d.ts +2 -0
  212. package/schematics/component-migration/button/migration.js +180 -0
  213. package/schematics/component-migration/button/schema.json +25 -0
  214. package/schematics/component-migration/button/steps/static-classes.d.ts +10 -0
  215. package/schematics/component-migration/button/steps/static-classes.js +128 -0
  216. package/schematics/component-migration/button/steps/template-todos.d.ts +19 -0
  217. package/schematics/component-migration/button/steps/template-todos.js +120 -0
  218. package/schematics/component-migration/button/types.d.ts +7 -0
  219. package/schematics/component-migration/button/types.js +2 -0
  220. package/schematics/component-migration/dropdown/guide.md +252 -0
  221. package/schematics/component-migration/dropdown/index.d.ts +2 -0
  222. package/schematics/component-migration/dropdown/index.js +5 -0
  223. package/schematics/component-migration/dropdown/migration.d.ts +2 -0
  224. package/schematics/component-migration/dropdown/migration.js +41 -0
  225. package/schematics/component-migration/dropdown/schema.json +25 -0
  226. package/schematics/component-migration/dropdown/steps/dropdown-imports.d.ts +3 -0
  227. package/schematics/component-migration/dropdown/steps/dropdown-imports.js +308 -0
  228. package/schematics/component-migration/dropdown/steps/template-attributes.d.ts +10 -0
  229. package/schematics/component-migration/dropdown/steps/template-attributes.js +57 -0
  230. package/schematics/component-migration/dropdown/steps/template-helpers.d.ts +20 -0
  231. package/schematics/component-migration/dropdown/steps/template-helpers.js +125 -0
  232. package/schematics/component-migration/dropdown/steps/template-imports.d.ts +22 -0
  233. package/schematics/component-migration/dropdown/steps/template-imports.js +12 -0
  234. package/schematics/component-migration/dropdown/steps/template-items.d.ts +7 -0
  235. package/schematics/component-migration/dropdown/steps/template-items.js +58 -0
  236. package/schematics/component-migration/dropdown/steps/template-menu.d.ts +14 -0
  237. package/schematics/component-migration/dropdown/steps/template-menu.js +107 -0
  238. package/schematics/component-migration/dropdown/steps/template-todos.d.ts +19 -0
  239. package/schematics/component-migration/dropdown/steps/template-todos.js +118 -0
  240. package/schematics/component-migration/dropdown/steps/template-toggle.d.ts +9 -0
  241. package/schematics/component-migration/dropdown/steps/template-toggle.js +70 -0
  242. package/schematics/component-migration/dropdown/steps/template-wrapper.d.ts +12 -0
  243. package/schematics/component-migration/dropdown/steps/template-wrapper.js +105 -0
  244. package/schematics/component-migration/index.d.ts +3 -0
  245. package/schematics/component-migration/index.js +26 -0
  246. package/schematics/component-migration/next-steps/index.d.ts +13 -0
  247. package/schematics/component-migration/next-steps/index.js +34 -0
  248. package/schematics/component-migration/registry.d.ts +1 -0
  249. package/schematics/component-migration/registry.js +15 -0
  250. package/schematics/component-migration/schema.json +20 -0
  251. package/schematics/component-migration/shared/ai-handoff.d.ts +2 -0
  252. package/schematics/component-migration/shared/ai-handoff.js +28 -0
  253. package/schematics/component-migration/shared/angular-component.d.ts +10 -0
  254. package/schematics/component-migration/shared/angular-component.js +125 -0
  255. package/schematics/component-migration/shared/button-visual-classes.d.ts +24 -0
  256. package/schematics/component-migration/shared/button-visual-classes.js +111 -0
  257. package/schematics/component-migration/shared/component-context.d.ts +7 -0
  258. package/schematics/component-migration/shared/component-context.js +24 -0
  259. package/schematics/component-migration/shared/component-imports.d.ts +45 -0
  260. package/schematics/component-migration/shared/component-imports.js +380 -0
  261. package/schematics/component-migration/shared/create-component-schematic.d.ts +3 -0
  262. package/schematics/component-migration/shared/create-component-schematic.js +55 -0
  263. package/schematics/component-migration/shared/import-edits.d.ts +11 -0
  264. package/schematics/component-migration/shared/import-edits.js +157 -0
  265. package/schematics/component-migration/shared/legacy-config-todos.d.ts +3 -0
  266. package/schematics/component-migration/shared/legacy-config-todos.js +90 -0
  267. package/schematics/component-migration/shared/migrate-project.d.ts +12 -0
  268. package/schematics/component-migration/shared/migrate-project.js +151 -0
  269. package/schematics/component-migration/shared/project-templates.d.ts +15 -0
  270. package/schematics/component-migration/shared/project-templates.js +43 -0
  271. package/schematics/component-migration/shared/scan-project.d.ts +3 -0
  272. package/schematics/component-migration/shared/scan-project.js +24 -0
  273. package/schematics/component-migration/shared/static-placement.d.ts +1 -0
  274. package/schematics/component-migration/shared/static-placement.js +45 -0
  275. package/schematics/component-migration/shared/template-edits.d.ts +28 -0
  276. package/schematics/component-migration/shared/template-edits.js +153 -0
  277. package/schematics/component-migration/shared/template-result.d.ts +3 -0
  278. package/schematics/component-migration/shared/template-result.js +11 -0
  279. package/schematics/component-migration/shared/testing.d.ts +13 -0
  280. package/schematics/component-migration/shared/testing.js +59 -0
  281. package/schematics/component-migration/shared/todo-comments.d.ts +10 -0
  282. package/schematics/component-migration/shared/todo-comments.js +81 -0
  283. package/schematics/component-migration/shared/types.d.ts +41 -0
  284. package/schematics/component-migration/shared/types.js +2 -0
  285. package/schematics/component-migration/tooltip/guide.md +196 -0
  286. package/schematics/component-migration/tooltip/index.d.ts +2 -0
  287. package/schematics/component-migration/tooltip/index.js +5 -0
  288. package/schematics/component-migration/tooltip/migration.d.ts +2 -0
  289. package/schematics/component-migration/tooltip/migration.js +50 -0
  290. package/schematics/component-migration/tooltip/schema.json +25 -0
  291. package/schematics/component-migration/tooltip/steps/template-attributes.d.ts +13 -0
  292. package/schematics/component-migration/tooltip/steps/template-attributes.js +266 -0
  293. package/schematics/component-migration/tooltip/steps/template-todos.d.ts +24 -0
  294. package/schematics/component-migration/tooltip/steps/template-todos.js +115 -0
  295. package/schematics/component-migration/tooltip/steps/tooltip-imports.d.ts +3 -0
  296. package/schematics/component-migration/tooltip/steps/tooltip-imports.js +79 -0
  297. package/schematics/component-migration/utils/component-resource-collector.d.ts +34 -0
  298. package/schematics/component-migration/utils/component-resource-collector.js +107 -0
  299. package/schematics/component-migration/utils/project_tsconfig_paths.d.ts +18 -0
  300. package/schematics/component-migration/utils/project_tsconfig_paths.js +105 -0
  301. package/schematics/component-migration/utils/typescript/compiler_host.d.ts +44 -0
  302. package/schematics/component-migration/utils/typescript/compiler_host.js +87 -0
  303. package/schematics/component-migration/utils/typescript/decorators.d.ts +22 -0
  304. package/schematics/component-migration/utils/typescript/decorators.js +41 -0
  305. package/schematics/component-migration/utils/typescript/functions.d.ts +14 -0
  306. package/schematics/component-migration/utils/typescript/functions.js +20 -0
  307. package/schematics/component-migration/utils/typescript/imports.d.ts +17 -0
  308. package/schematics/component-migration/utils/typescript/imports.js +110 -0
  309. package/schematics/component-migration/utils/typescript/parse_tsconfig.d.ts +9 -0
  310. package/schematics/component-migration/utils/typescript/parse_tsconfig.js +29 -0
  311. package/schematics/component-migration/utils/typescript/property-name.d.ts +13 -0
  312. package/schematics/component-migration/utils/typescript/property-name.js +22 -0
  313. package/schematics/package.json +3 -0
  314. package/types/design-factory-angular-accordion.d.ts +553 -0
  315. package/types/design-factory-angular-alert.d.ts +166 -0
  316. package/types/design-factory-angular-breakpoints.d.ts +13 -0
  317. package/types/design-factory-angular-button.d.ts +166 -0
  318. package/types/design-factory-angular-buttongroup.d.ts +45 -0
  319. package/types/design-factory-angular-drawer.d.ts +19 -26
  320. package/types/design-factory-angular-dropdown.d.ts +148 -0
  321. package/types/design-factory-angular-form-field.d.ts +122 -0
  322. package/types/design-factory-angular-icon.d.ts +11 -0
  323. package/types/design-factory-angular-input.d.ts +16 -0
  324. package/types/design-factory-angular-internals.d.ts +78 -19
  325. package/types/design-factory-angular-separator.d.ts +29 -0
  326. package/types/design-factory-angular-sidenav.d.ts +114 -17
  327. package/types/design-factory-angular-slider.d.ts +239 -0
  328. package/types/design-factory-angular-toggle.d.ts +93 -0
  329. package/types/design-factory-angular-tooltip.d.ts +113 -0
  330. package/types/design-factory-angular-topnav.d.ts +47 -52
  331. package/drawer/README.md +0 -54
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.editIconDirective = editIconDirective;
4
+ const template_edits_1 = require("../../shared/template-edits");
5
+ function editIconDirective(element, edits) {
6
+ const iconDirective = (0, template_edits_1.findTextAttribute)(element, 'dfInsertAlertIcon');
7
+ if (iconDirective) {
8
+ edits.push((0, template_edits_1.removeTextAttribute)(iconDirective));
9
+ }
10
+ }
@@ -0,0 +1,3 @@
1
+ import { TemplateEdit } from '../../shared/template-edits';
2
+ import { ComponentMigrationSourceContext } from '../../shared/types';
3
+ export declare function editLegacyModuleImportTodos(context: ComponentMigrationSourceContext): TemplateEdit[];
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.editLegacyModuleImportTodos = editLegacyModuleImportTodos;
4
+ const tslib_1 = require("tslib");
5
+ const ts = tslib_1.__importStar(require("typescript"));
6
+ const todo_comments_1 = require("../../shared/todo-comments");
7
+ const alert_imports_1 = require("./alert-imports");
8
+ const LEGACY_NG_BOOTSTRAP_IMPORTS = new Set(['@ng-bootstrap/ng-bootstrap/alert', '@ng-bootstrap/ng-bootstrap']);
9
+ const LEGACY_DESIGN_FACTORY_IMPORTS = new Set([
10
+ '@design-factory/design-factory',
11
+ '@design-factory/design-factory/alert'
12
+ ]);
13
+ const NGB_ALERT_MODULE = 'NgbAlertModule';
14
+ const DF_ALERT_MODULE = 'DfAlertModule';
15
+ function getNamedImportNames(statement) {
16
+ const namedBindings = statement.importClause?.namedBindings;
17
+ if (!namedBindings || !ts.isNamedImports(namedBindings)) {
18
+ return [];
19
+ }
20
+ return namedBindings.elements.map((element) => element.propertyName?.text ?? element.name.text);
21
+ }
22
+ function getLegacyAlertModuleNames(statement) {
23
+ if (!ts.isStringLiteral(statement.moduleSpecifier)) {
24
+ return [];
25
+ }
26
+ const moduleName = statement.moduleSpecifier.text;
27
+ const importedNames = getNamedImportNames(statement);
28
+ if (LEGACY_NG_BOOTSTRAP_IMPORTS.has(moduleName)) {
29
+ return importedNames.filter((name) => name === NGB_ALERT_MODULE);
30
+ }
31
+ if (LEGACY_DESIGN_FACTORY_IMPORTS.has(moduleName)) {
32
+ return importedNames.filter((name) => name === DF_ALERT_MODULE);
33
+ }
34
+ return [];
35
+ }
36
+ function editLegacyModuleImportTodos(context) {
37
+ const edits = [];
38
+ const skipNgbAlertModule = (0, alert_imports_1.sourceFileNeedsDfAlert)(context);
39
+ for (const statement of context.sourceFile.statements) {
40
+ if (!ts.isImportDeclaration(statement)) {
41
+ continue;
42
+ }
43
+ const legacyModuleNames = getLegacyAlertModuleNames(statement).filter((name) => name !== NGB_ALERT_MODULE || !skipNgbAlertModule);
44
+ if (legacyModuleNames.length === 0) {
45
+ continue;
46
+ }
47
+ const edit = (0, todo_comments_1.editSourceTodo)(context.sourceFile, statement, {
48
+ code: 'alert.legacy-module-import',
49
+ message: 'Legacy alert module import remains. Verify whether it is still needed for other legacy components or remove it after alert migration.'
50
+ });
51
+ if (edit) {
52
+ edits.push(edit);
53
+ break;
54
+ }
55
+ }
56
+ return edits;
57
+ }
@@ -0,0 +1,3 @@
1
+ import { TemplateEdit } from '../../shared/template-edits';
2
+ import { ComponentMigrationSourceContext } from '../../shared/types';
3
+ export declare function editProgrammaticCloseTodos(context: ComponentMigrationSourceContext): TemplateEdit[];
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.editProgrammaticCloseTodos = editProgrammaticCloseTodos;
4
+ const tslib_1 = require("tslib");
5
+ const ts = tslib_1.__importStar(require("typescript"));
6
+ const todo_comments_1 = require("../../shared/todo-comments");
7
+ function isCloseSubscribeCall(node) {
8
+ if (!ts.isCallExpression(node) || !ts.isPropertyAccessExpression(node.expression)) {
9
+ return false;
10
+ }
11
+ const closeCall = node.expression.expression;
12
+ return (node.expression.name.text === 'subscribe' &&
13
+ ts.isCallExpression(closeCall) &&
14
+ ts.isPropertyAccessExpression(closeCall.expression) &&
15
+ closeCall.expression.name.text === 'close');
16
+ }
17
+ function findStatement(node) {
18
+ let current = node;
19
+ while (current.parent && !ts.isStatement(current)) {
20
+ current = current.parent;
21
+ }
22
+ return current;
23
+ }
24
+ function editProgrammaticCloseTodos(context) {
25
+ const edits = [];
26
+ const hasAlertTemplate = [...context.templatesByComponent.values()].some((templates) => templates.some((template) => template.includes('<ngb-alert') || template.includes('<df-alert')));
27
+ if (!hasAlertTemplate) {
28
+ return edits;
29
+ }
30
+ const visitNode = (node) => {
31
+ if (isCloseSubscribeCall(node)) {
32
+ const edit = (0, todo_comments_1.editSourceTodo)(context.sourceFile, findStatement(node), {
33
+ code: 'alert.programmatic-close',
34
+ message: 'close() now returns a Promise. Migrate this legacy Observable close handling manually.'
35
+ });
36
+ if (edit) {
37
+ edits.push(edit);
38
+ }
39
+ }
40
+ ts.forEachChild(node, visitNode);
41
+ };
42
+ visitNode(context.sourceFile);
43
+ return edits;
44
+ }
@@ -0,0 +1,3 @@
1
+ import { TmplAstElement } from '@angular/compiler';
2
+ import { TemplateEdit } from '../../shared/template-edits';
3
+ export declare function editSelector(element: TmplAstElement, edits: TemplateEdit[]): void;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.editSelector = editSelector;
4
+ function editSelector(element, edits) {
5
+ const startTagOffset = element.startSourceSpan.start.offset;
6
+ edits.push({
7
+ start: startTagOffset + 1,
8
+ end: startTagOffset + 10,
9
+ text: 'df-alert'
10
+ });
11
+ if (element.endSourceSpan) {
12
+ edits.push({
13
+ start: element.endSourceSpan.start.offset + 2,
14
+ end: element.endSourceSpan.start.offset + 11,
15
+ text: 'df-alert'
16
+ });
17
+ }
18
+ }
@@ -0,0 +1,3 @@
1
+ import { TmplAstElement } from '@angular/compiler';
2
+ import { TemplateEdit } from '../../shared/template-edits';
3
+ export declare function editStaticClasses(element: TmplAstElement, edits: TemplateEdit[]): void;
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.editStaticClasses = editStaticClasses;
4
+ const template_edits_1 = require("../../shared/template-edits");
5
+ const SIZE_CLASSES = new Map([
6
+ ['df-alert-sm', 'sm'],
7
+ ['df-alert-lg', 'lg']
8
+ ]);
9
+ const BANNER_CLASSES = new Set(['df-page-alert', 'df-card-alert']);
10
+ const RESPONSIVE_BREAKPOINT = '(?:sm|md|lg|xl|xxl)';
11
+ const SPACING_CLASS = new RegExp(`^[mp][trblxy]?(?:-${RESPONSIVE_BREAKPOINT})?-(?:n?\\d+|auto)$`);
12
+ const BOTTOM_MARGIN_CLASS = new RegExp(`^m(?:[by])?(?:-${RESPONSIVE_BREAKPOINT})?-(?:n?\\d+|auto)$`);
13
+ const UTILITY_CLASS_PATTERNS = [
14
+ SPACING_CLASS,
15
+ /^d(?:-(?:sm|md|lg|xl|xxl))?-(?:none|inline|inline-block|block|grid|inline-grid|table|table-row|table-cell|flex|inline-flex)$/,
16
+ /^w-(?:25|50|75|100|auto)$/,
17
+ /^h-(?:25|50|75|100|auto)$/,
18
+ /^text-/,
19
+ /^fw-/,
20
+ /^fs-/,
21
+ /^lh-/,
22
+ /^align-/,
23
+ /^justify-content-/,
24
+ /^align-items-/,
25
+ /^align-self-/,
26
+ /^flex-/,
27
+ /^overflow-/,
28
+ /^position-/,
29
+ /^rounded(?:-.+)?$/,
30
+ /^border(?:-.+)?$/,
31
+ /^word-break-all$/,
32
+ /^overflow-wrap-word$/
33
+ ];
34
+ function hasBottomMarginClass(classes) {
35
+ return classes.some((className) => BOTTOM_MARGIN_CLASS.test(className));
36
+ }
37
+ function isUtilityClass(className) {
38
+ return UTILITY_CLASS_PATTERNS.some((pattern) => pattern.test(className));
39
+ }
40
+ function shouldAddDefaultBottomMargin(element, classes, remainingClasses) {
41
+ if ((0, template_edits_1.hasDynamicClassBinding)(element) || hasBottomMarginClass(classes)) {
42
+ return false;
43
+ }
44
+ if (classes.some((className) => BANNER_CLASSES.has(className))) {
45
+ return false;
46
+ }
47
+ if ((0, template_edits_1.findTextAttribute)(element, 'appearance') || (0, template_edits_1.findBoundAttribute)(element, 'appearance')) {
48
+ return false;
49
+ }
50
+ return remainingClasses.every(isUtilityClass);
51
+ }
52
+ function editStaticClasses(element, edits) {
53
+ const classAttribute = (0, template_edits_1.findTextAttribute)(element, 'class');
54
+ const classes = classAttribute?.value.split(/\s+/).filter(Boolean) ?? [];
55
+ const removableClasses = new Set();
56
+ const addedAttributes = [];
57
+ const sizeClasses = classes.filter((className) => SIZE_CLASSES.has(className));
58
+ if (sizeClasses.length === 1 && !(0, template_edits_1.findTextAttribute)(element, 'size') && !(0, template_edits_1.findBoundAttribute)(element, 'size')) {
59
+ removableClasses.add(sizeClasses[0]);
60
+ addedAttributes.push(`size="${SIZE_CLASSES.get(sizeClasses[0])}"`);
61
+ }
62
+ const hasBannerClass = classes.some((className) => BANNER_CLASSES.has(className));
63
+ if (hasBannerClass && !(0, template_edits_1.findTextAttribute)(element, 'appearance') && !(0, template_edits_1.findBoundAttribute)(element, 'appearance')) {
64
+ for (const className of BANNER_CLASSES) {
65
+ removableClasses.add(className);
66
+ }
67
+ addedAttributes.push('appearance="banner"');
68
+ }
69
+ const remainingClasses = classes.filter((className) => !removableClasses.has(className));
70
+ if (shouldAddDefaultBottomMargin(element, classes, remainingClasses)) {
71
+ remainingClasses.push('mb-5');
72
+ }
73
+ if (removableClasses.size === 0 && remainingClasses.length === classes.length && addedAttributes.length === 0) {
74
+ return;
75
+ }
76
+ if (!classAttribute && remainingClasses.length > 0) {
77
+ addedAttributes.unshift(`class="${remainingClasses.join(' ')}"`);
78
+ }
79
+ else if (classAttribute && remainingClasses.length === 0) {
80
+ edits.push((0, template_edits_1.removeTextAttribute)(classAttribute));
81
+ }
82
+ else if (classAttribute?.valueSpan) {
83
+ edits.push({
84
+ start: classAttribute.valueSpan.start.offset,
85
+ end: classAttribute.valueSpan.end.offset,
86
+ text: remainingClasses.join(' ')
87
+ });
88
+ }
89
+ if (addedAttributes.length > 0) {
90
+ const insertOffset = (0, template_edits_1.getStartTagInsertOffset)(element);
91
+ edits.push({
92
+ start: insertOffset,
93
+ end: insertOffset,
94
+ text: ` ${addedAttributes.join(' ')}`
95
+ });
96
+ }
97
+ }
@@ -0,0 +1,3 @@
1
+ import { TmplAstElement } from '@angular/compiler';
2
+ import { TemplateEdit } from '../../shared/template-edits';
3
+ export declare function editStaticType(element: TmplAstElement, edits: TemplateEdit[]): void;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.editStaticType = editStaticType;
4
+ const template_edits_1 = require("../../shared/template-edits");
5
+ const SUPPORTED_TYPES = new Set(['success', 'info', 'warning', 'danger', 'tip']);
6
+ const UNSUPPORTED_TYPE_REPLACEMENTS = new Map([
7
+ ['primary', 'info'],
8
+ ['secondary', 'info'],
9
+ ['light', 'info'],
10
+ ['dark', 'info']
11
+ ]);
12
+ function editStaticType(element, edits) {
13
+ if ((0, template_edits_1.findBoundAttribute)(element, 'type')) {
14
+ return;
15
+ }
16
+ const typeAttribute = (0, template_edits_1.findTextAttribute)(element, 'type');
17
+ if (!typeAttribute || !typeAttribute.valueSpan || typeAttribute.value.includes('{{')) {
18
+ return;
19
+ }
20
+ if (SUPPORTED_TYPES.has(typeAttribute.value)) {
21
+ return;
22
+ }
23
+ edits.push({
24
+ start: typeAttribute.valueSpan.start.offset,
25
+ end: typeAttribute.valueSpan.end.offset,
26
+ text: UNSUPPORTED_TYPE_REPLACEMENTS.get(typeAttribute.value) ?? 'info'
27
+ });
28
+ }
@@ -0,0 +1,3 @@
1
+ import { TmplAstElement } from '@angular/compiler';
2
+ import { TemplateEdit } from '../../shared/template-edits';
3
+ export declare function editTemplateReference(element: TmplAstElement, edits: TemplateEdit[]): void;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.editTemplateReference = editTemplateReference;
4
+ function editTemplateReference(element, edits) {
5
+ for (const reference of element.references) {
6
+ if (reference.value !== 'ngbAlert') {
7
+ continue;
8
+ }
9
+ edits.push({
10
+ start: reference.sourceSpan.start.offset,
11
+ end: reference.sourceSpan.end.offset,
12
+ text: `#${reference.name}`
13
+ });
14
+ }
15
+ }
@@ -0,0 +1,3 @@
1
+ import { TmplAstElement } from '@angular/compiler';
2
+ import { TemplateEdit } from '../../shared/template-edits';
3
+ export declare function editAlertTemplateTodos(element: TmplAstElement, edits: TemplateEdit[]): void;
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.editAlertTemplateTodos = editAlertTemplateTodos;
4
+ const compiler_1 = require("@angular/compiler");
5
+ const todo_comments_1 = require("../../shared/todo-comments");
6
+ const template_edits_1 = require("../../shared/template-edits");
7
+ function hasCollapsibleDescendant(element) {
8
+ const visitNode = (node) => {
9
+ if (!(node instanceof compiler_1.TmplAstElement)) {
10
+ return false;
11
+ }
12
+ const classes = (0, template_edits_1.getStaticClassTokens)(node);
13
+ if ((0, template_edits_1.findTextAttribute)(node, 'ngbCollapse') ||
14
+ (0, template_edits_1.findBoundAttribute)(node, 'ngbCollapse') ||
15
+ classes.includes('df-alert-collapse-main-text') ||
16
+ classes.includes('df-alert-collapsed-text')) {
17
+ return true;
18
+ }
19
+ return node.children.some(visitNode);
20
+ };
21
+ return element.children.some(visitNode);
22
+ }
23
+ function hasDynamicLegacyClassBinding(element) {
24
+ const legacyClassNames = new Set([
25
+ 'df-alert-sm',
26
+ 'df-alert-lg',
27
+ 'df-page-alert',
28
+ 'df-card-alert',
29
+ 'df-superheader',
30
+ 'df-alert-collapse-main-text',
31
+ 'df-alert-collapsed-text'
32
+ ]);
33
+ return element.inputs.some((input) => legacyClassNames.has(input.name));
34
+ }
35
+ function hasPageLevelAlertClass(element) {
36
+ return ((0, template_edits_1.getStaticClassTokens)(element).includes('df-page-alert') ||
37
+ element.inputs.some((input) => input.name === 'df-page-alert'));
38
+ }
39
+ function editAlertTemplateTodos(element, edits) {
40
+ const todos = [
41
+ {
42
+ code: 'alert.review',
43
+ message: 'This alert was migrated automatically. Verify behavior and visual appearance.'
44
+ }
45
+ ];
46
+ if ((0, template_edits_1.hasDynamicClassBinding)(element)) {
47
+ todos.push({
48
+ code: 'alert.dynamic-class',
49
+ message: 'Dynamic alert classes were not migrated. Check whether they still target legacy alert classes.'
50
+ });
51
+ }
52
+ if (hasDynamicLegacyClassBinding(element)) {
53
+ todos.push({
54
+ code: 'alert.dynamic-legacy-class',
55
+ message: 'Dynamic legacy alert class binding was not migrated. Convert it to size or appearance input logic.'
56
+ });
57
+ }
58
+ if (hasPageLevelAlertClass(element)) {
59
+ todos.push({
60
+ code: 'alert.page-level-layout',
61
+ marker: 'human',
62
+ message: 'Legacy df-page-alert fixed positioning was not migrated. Move this banner into the page layout alert slot or add app-owned positioning below the top navigation.'
63
+ });
64
+ }
65
+ if ((0, template_edits_1.findBoundAttribute)(element, 'type')) {
66
+ todos.push({
67
+ code: 'alert.dynamic-type',
68
+ message: 'Dynamic alert type was preserved. Verify it only produces df-alert supported types.'
69
+ });
70
+ }
71
+ if (hasCollapsibleDescendant(element)) {
72
+ todos.push({
73
+ code: 'alert.collapsible-pattern',
74
+ message: 'Legacy collapsible alert markup was not migrated. Convert it to expandable alert structure manually.'
75
+ });
76
+ }
77
+ (0, todo_comments_1.editTemplateTodos)(element, todos, edits);
78
+ }
@@ -0,0 +1,278 @@
1
+ # Button Migration Guide
2
+
3
+ This guide is used by AI-assisted migration after the deterministic `migrate-button` schematic has run.
4
+
5
+ Use it together with the user's current working tree and current git diff. The diff shows which safe changes were made
6
+ by the schematic and which `TODO(df-migration ...)` comments still need review.
7
+
8
+ ## Legacy API
9
+
10
+ Legacy buttons are plain `button` or `a` elements styled with Bootstrap and legacy Design Factory classes:
11
+
12
+ - `btn`
13
+ - `btn-primary`
14
+ - `btn-outline-primary`
15
+ - `btn-neutral`
16
+ - `btn-outline-neutral`
17
+ - `btn-danger`
18
+ - `btn-outline-danger`
19
+ - `btn-link`
20
+ - `btn-sm`
21
+ - `btn-lg`
22
+ - `df-btn-tertiary`
23
+ - `df-btn-transparent`
24
+ - `df-btn-icononly`
25
+ - `df-btn-primary-mirror`
26
+ - `df-btn-outline-primary-mirror`
27
+ - `df-btn-neutral-mirror`
28
+ - `df-btn-outline-neutral-mirror`
29
+ - `df-btn-danger-mirror`
30
+ - `df-btn-outline-danger-mirror`
31
+
32
+ Some Bootstrap button-like patterns are not migrated deterministically, including dropdown toggles, button groups, and
33
+ radio/checkbox `btn-check` patterns.
34
+
35
+ ## New API
36
+
37
+ New buttons use standalone exports from `@design-factory/angular/button`:
38
+
39
+ ```ts
40
+ import { DfButton, DfIconButton } from '@design-factory/angular/button';
41
+ ```
42
+
43
+ Supported directives:
44
+
45
+ - `button[dfButton]`
46
+ - `a[dfButton]`
47
+ - `button[dfIconButton]`
48
+ - `a[dfIconButton]`
49
+
50
+ Supported visual inputs:
51
+
52
+ - `variant`: `primary`, `neutral`, `danger`
53
+ - `appearance`: `solid`, `outline`, `text`
54
+ - `size`: `sm`, `md`, `lg`
55
+ - `transparent`
56
+ - `mirror`
57
+
58
+ Native `button` hosts default to `type="button"`. Preserve explicit non-default types such as `type="submit"`.
59
+
60
+ `dfIconButton` does not project content. Icon classes must be present on the `button` or `a` host.
61
+
62
+ ## Deterministic Schematic Changes
63
+
64
+ The schematic handles static legacy button classes when the host is `button` or `a` and exact static class `btn` is
65
+ present.
66
+
67
+ It can:
68
+
69
+ - add `dfButton` or `dfIconButton`;
70
+ - convert supported static variant, appearance, size, transparent, mirror, and icon-only classes;
71
+ - move a single static projected icon element class to the host for simple icon-only buttons;
72
+ - keep complex projected icon-only content in place while still migrating the host;
73
+ - remove `type="button"` from `button` hosts;
74
+ - preserve `type="submit"` and other non-default button types;
75
+ - preserve unrelated user classes;
76
+ - add standalone imports;
77
+ - add TODO comments for review, skipped patterns, and dynamic legacy class logic.
78
+
79
+ The schematic intentionally ignores already migrated button directives.
80
+
81
+ ## TODO Codes
82
+
83
+ TODO comments may include `[human]`.
84
+
85
+ Verify every TODO and remove it only when the underlying issue is actually resolved. Preserve `[human]` TODO comments
86
+ unchanged so a human can review them after the AI-assisted pass. `[human]` does not forbid AI-assisted edits around the
87
+ comment when the intent is clear; it means the final result must remain visible for human verification.
88
+
89
+ Some button TODO sections explicitly say to leave a pattern unchanged during the AI-assisted pass. Those instructions
90
+ override the general `[human]` rule because the behavior belongs to another component migration or changes host
91
+ semantics too much for a safe button-only pass.
92
+
93
+ ### `button.review`
94
+
95
+ The button was migrated automatically. Verify behavior and visual appearance.
96
+
97
+ Keep or remove this TODO based on review. If no behavior issue is found, remove it.
98
+
99
+ Pay attention to custom classes preserved by the schematic. A class that previously relied on `.btn` may need a local
100
+ CSS adjustment after `.btn` is removed.
101
+
102
+ ### `button.unsupported-static-classes`
103
+
104
+ The element has exact static `btn` but the deterministic schematic could not map the static legacy classes.
105
+
106
+ Do not resolve this TODO in the AI-assisted pass. Preserve the TODO and leave the markup unchanged unless the user
107
+ explicitly asks to map the unsupported visual style manually.
108
+
109
+ Common cases:
110
+
111
+ - `btn-success`
112
+ - `btn-info`
113
+ - `btn-warning`
114
+ - `btn-secondary`
115
+ - `btn-light`
116
+ - `btn-dark`
117
+ For unsupported color variants, prefer migrating the structural button API and mapping to the closest supported new
118
+ variant only when the semantic intent is clear. Supported variants are `primary`, `neutral`, and `danger`.
119
+
120
+ If the old color was purely decorative or ambiguous, keep the migration local and leave a review note rather than
121
+ inventing behavior.
122
+
123
+ ### `button.dropdown-pattern`
124
+
125
+ The button is part of a legacy dropdown pattern. Leave it for the dropdown migration unless the user explicitly asks to
126
+ handle dropdowns now.
127
+
128
+ Common detected patterns:
129
+
130
+ - dropdown toggles, such as `ngbDropdownToggle`, `dropdownToggle`, `dropdown-toggle`, or `dropdown-toggle-split`;
131
+ - dropdown item buttons such as `ngbDropdownItem` or `dropdown-item`.
132
+
133
+ Regular buttons inside dropdown containers are still handled by the button migration unless the button itself is a
134
+ dropdown toggle or item.
135
+
136
+ Do not blindly remove dropdown classes or directives. Preserve dropdown behavior, IDs used by menus, and test selectors.
137
+
138
+ ### `button.link-pattern`
139
+
140
+ The button uses legacy `btn-link` styling.
141
+
142
+ The closest new API is probably `appearance="text"`, but `btn-link` is no longer supported by DF.
143
+ Do not resolve this TODO in the AI-assisted pass. Preserve the TODO and leave the button unchanged unless the user
144
+ explicitly asks to handle `btn-link` manually.
145
+
146
+ ### `button.card-pattern`
147
+
148
+ The button is used as a selectable card or card-like control and was skipped by the deterministic migration.
149
+
150
+ Do not blindly remove `card` classes or custom selectable-card directives. Check whether this should remain custom card
151
+ markup, use a future card migration, or use a button directive only for keyboard/interaction behavior.
152
+
153
+ ### `button.group-pattern`
154
+
155
+ The button is inside a legacy `.btn-group`, `.btn-group-vertical`, or `.btn-toolbar` container and was skipped by the
156
+ deterministic migration.
157
+
158
+ Do not resolve this TODO in the AI-assisted pass. Preserve the TODO and leave the markup unchanged unless the user
159
+ explicitly asks to handle button groups manually.
160
+
161
+ Button groups may depend on shared borders, focus order, selection semantics, or a future group-specific migration.
162
+
163
+ ### `button.non-native-icon-only-pattern`
164
+
165
+ The element uses legacy icon-only button classes on a non-native host such as `span`.
166
+
167
+ Do not resolve this TODO in the AI-assisted pass. Preserve the TODO and leave the markup unchanged unless the user
168
+ explicitly asks to handle this pattern manually.
169
+
170
+ A non-native host may be purely decorative today, while a native button becomes focusable and clickable. Removing legacy
171
+ button classes can also change visual styling without proving intent.
172
+
173
+ ### `button.projected-icon-only-content`
174
+
175
+ The legacy icon-only button projects content, but the new `dfIconButton` ignores projected content.
176
+
177
+ The deterministic schematic migrates the host to `dfIconButton` even when projected content is complex. It only removes
178
+ projected content for the safe case where the content is one static `span`, `i`, or `df-icon` element with a static
179
+ `class`. For this TODO, inspect the remaining projected content and migrate it only when intent is clear:
180
+
181
+ - move static icon classes to the `button` or `a` host;
182
+ - remove the projected icon element only if it has no behavior or meaningful attributes;
183
+ - convert projected visually-hidden label text to `aria-label` or `[attr.aria-label]` when the value is clear;
184
+ - preserve dynamic icon logic by moving it to host class bindings when straightforward;
185
+ - leave the TODO in place when there are multiple children, conditional content, events, directives, or unclear visual
186
+ logic.
187
+
188
+ ### `button.icon-only-accessible-name`
189
+
190
+ The icon-only button has no obvious `aria-label`, `aria-labelledby`, or known project helper such as
191
+ `prefixAriaLabelledby`.
192
+
193
+ This TODO is marked `[human]`. AI may add an accessible name when the intent is clear from nearby text, a projected
194
+ visually-hidden label, icon class names, click handlers, or component context, but the TODO must remain for human
195
+ review. Leave the markup unchanged when the label would be a guess.
196
+
197
+ ### `button.non-native-button-pattern`
198
+
199
+ The element uses legacy button classes on a non-native host such as `span`.
200
+
201
+ Do not resolve this TODO in the AI-assisted pass. Preserve the TODO and leave the markup unchanged unless the user
202
+ explicitly asks to handle this pattern manually.
203
+
204
+ Changing the host to a native button can alter layout, focus behavior, keyboard behavior, form behavior, and
205
+ accessibility semantics. Removing legacy button classes can also change visual styling without proving intent.
206
+
207
+ ### `button.trigger-click-pattern`
208
+
209
+ The element uses `dfTriggerClick` with legacy button-like markup.
210
+
211
+ Do not resolve this TODO in the AI-assisted pass. Preserve the TODO and leave the markup unchanged unless the user
212
+ explicitly asks to handle this pattern manually.
213
+
214
+ `dfTriggerClick` often delegates interaction to another control, such as a hidden file input. Replacing it with a native
215
+ button and direct click handler changes behavior and must be reviewed manually.
216
+
217
+ ### `button.dynamic-class`
218
+
219
+ Dynamic button classes were detected on a legacy-looking button.
220
+
221
+ This TODO is emitted only when the element has exact static `btn` with a generic class expression, or explicit dynamic
222
+ legacy button class bindings. It is not emitted for non-button class bindings such as icon or state classes, and it is
223
+ not emitted when the element already has a hard-stop TODO, such as `button.unsupported-static-classes`,
224
+ `button.card-pattern`, `button.dropdown-pattern`, `button.group-pattern`, `button.link-pattern`,
225
+ `button.non-native-button-pattern`, `button.non-native-icon-only-pattern`, or `button.trigger-click-pattern`.
226
+
227
+ Arbitrary dynamic-class buttons without legacy button evidence should not be migrated.
228
+
229
+ Inspect `[class]`, `[ngClass]`, and class binding expressions. Convert legacy button styling to new inputs only when the
230
+ expression is clear.
231
+
232
+ ### `button.dynamic-legacy-class`
233
+
234
+ An explicit dynamic legacy button class binding was detected, for example `[class.btn-lg]` or
235
+ `[class.btn-primary]`.
236
+
237
+ Convert to input logic when possible:
238
+
239
+ - `[class.btn-lg]="large"` -> `[size]="large ? 'lg' : 'md'"`
240
+ - `[class.btn-sm]="small"` -> `[size]="small ? 'sm' : 'md'"`
241
+ - `[class.df-btn-tertiary]="text"` -> `[appearance]="text ? 'text' : defaultAppearance"` where `defaultAppearance`
242
+ preserves the existing static style, such as `solid` or `outline`
243
+ - `[class.df-btn-transparent]="transparent"` -> `[transparent]="transparent"`
244
+ - `[class.df-btn-primary-mirror]="mirror"` -> `[mirror]="mirror"` and keep/default `variant="primary"`
245
+
246
+ When multiple dynamic legacy classes can conflict, prefer a small TypeScript helper that returns a typed value for
247
+ `variant`, `appearance`, or `size`.
248
+
249
+ ### `button.indirect-component-imports`
250
+
251
+ The component needs one or more DF button imports, but its Angular `imports` metadata is not a simple array literal.
252
+
253
+ Inspect the referenced value or expression. Add the required imports, such as `DfButton` or `DfIconButton`, only when
254
+ the shape is clear. If the imports value is computed, shared, or otherwise ambiguous, preserve the TODO for human
255
+ review.
256
+
257
+ ## Links
258
+
259
+ For `a.btn.disabled` legacy links, prefer `a dfButton disabled` when the anchor should behave as a disabled button.
260
+ Clean up stale `disabled` class, `aria-disabled`, or `tabindex` only when the new directive now owns the behavior and no
261
+ custom logic relies on those attributes.
262
+
263
+ Preserve `href`, `routerLink`, query params, targets, rel attributes, click handlers, and test selectors.
264
+
265
+ ## Configuration Migration
266
+
267
+ Configuration migration is out of scope for this component migration. Do not migrate global or shared button styling,
268
+ theme configuration, or wrapper defaults unless the user explicitly asks for configuration migration.
269
+
270
+ ## Validation
271
+
272
+ After AI-assisted button migration:
273
+
274
+ 1. Confirm no unexpected legacy `btn` button usages remain for the selected scope.
275
+ 2. Run the narrowest useful typecheck/build command for touched projects when the command is clear.
276
+ 3. Run visual or e2e checks for links, disabled states, dropdowns, button groups, icon-only buttons, and dynamic class
277
+ logic.
278
+ 4. Ask the user before running broad or expensive validation commands if the right command is unclear.
@@ -0,0 +1,2 @@
1
+ declare const _default: (options: import("../shared/types").ComponentMigrationSchema) => import("@angular-devkit/schematics").Rule;
2
+ export default _default;