@radix-ng/primitives 0.11.1 → 0.12.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 (449) hide show
  1. package/.compodocrc.json +12 -0
  2. package/CHANGELOG.md +182 -0
  3. package/LICENSE +21 -0
  4. package/accordion/__tests__/accordion-content.directive.spec.ts +8 -0
  5. package/accordion/__tests__/accordion-header.directive.spec.ts +8 -0
  6. package/accordion/__tests__/accordion-item.directive.spec.ts +8 -0
  7. package/accordion/__tests__/accordion-root.directive.spec.ts +8 -0
  8. package/accordion/__tests__/accordion-trigger.directive.spec.ts +8 -0
  9. package/accordion/ng-package.json +5 -0
  10. package/accordion/src/accordion-content.directive.ts +46 -0
  11. package/accordion/src/accordion-header.directive.ts +15 -0
  12. package/accordion/src/accordion-item.directive.ts +216 -0
  13. package/accordion/src/accordion-root.directive.ts +205 -0
  14. package/accordion/src/accordion-trigger.directive.ts +37 -0
  15. package/accordion/stories/accordion.docs.mdx +77 -0
  16. package/accordion/stories/accordion.stories.ts +340 -0
  17. package/alert-dialog/{index.d.ts → index.ts} +1 -0
  18. package/alert-dialog/ng-package.json +5 -0
  19. package/alert-dialog/src/alert-dialog-cancel.directive.ts +17 -0
  20. package/alert-dialog/src/alert-dialog-content.directive.ts +24 -0
  21. package/alert-dialog/src/alert-dialog-root.directive.ts +15 -0
  22. package/alert-dialog/src/alert-dialog-title.directive.ts +7 -0
  23. package/alert-dialog/src/alert-dialog-trigger.directive.ts +17 -0
  24. package/alert-dialog/src/alert-dialog.service.ts +51 -0
  25. package/alert-dialog/stories/alert-dialog.stories.ts +139 -0
  26. package/avatar/__tests__/avatar-fallback.directive.spec.ts +31 -0
  27. package/avatar/__tests__/avatar-image.directive.spec.ts +36 -0
  28. package/avatar/ng-package.json +5 -0
  29. package/avatar/src/avatar-fallback.directive.ts +62 -0
  30. package/avatar/src/avatar-image.directive.ts +55 -0
  31. package/avatar/src/avatar-root.directive.ts +35 -0
  32. package/avatar/src/avatar.config.ts +29 -0
  33. package/avatar/stories/avatar.docs.mdx +37 -0
  34. package/avatar/stories/avatar.stories.ts +87 -0
  35. package/button/__tests__/.gitkeep +0 -0
  36. package/button/src/button-abstract.directive.ts +46 -0
  37. package/checkbox/ng-package.json +5 -0
  38. package/checkbox/src/checkbox-button.directive.ts +26 -0
  39. package/checkbox/src/checkbox-indicator.directive.ts +16 -0
  40. package/checkbox/src/checkbox-input.directive.ts +36 -0
  41. package/checkbox/src/checkbox.directive.ts +146 -0
  42. package/checkbox/src/checkbox.token.ts +8 -0
  43. package/checkbox/stories/checkbox-group.component.ts +87 -0
  44. package/checkbox/stories/checkbox-group.styles.scss +49 -0
  45. package/checkbox/stories/checkbox-indeterminate.component.ts +52 -0
  46. package/checkbox/stories/checkbox.docs.mdx +58 -0
  47. package/checkbox/stories/checkbox.stories.ts +105 -0
  48. package/collapsible/__tests__/collapsible-content.directive.spec.ts +30 -0
  49. package/collapsible/__tests__/collapsible-root.directive.spec.ts +27 -0
  50. package/collapsible/__tests__/collapsible-trigger.directive.spec.ts +30 -0
  51. package/collapsible/ng-package.json +5 -0
  52. package/collapsible/src/collapsible-content.directive.ts +34 -0
  53. package/collapsible/src/collapsible-content.token.ts +6 -0
  54. package/collapsible/src/collapsible-root.directive.ts +120 -0
  55. package/collapsible/src/collapsible-trigger.directive.ts +44 -0
  56. package/collapsible/stories/collapsible-animation.component.ts +116 -0
  57. package/collapsible/stories/collapsible-external-triggering.component.ts +86 -0
  58. package/collapsible/stories/collapsible.docs.mdx +53 -0
  59. package/collapsible/stories/collapsible.stories.ts +151 -0
  60. package/context-menu/README.md +1 -0
  61. package/context-menu/index.ts +10 -0
  62. package/context-menu/ng-package.json +5 -0
  63. package/context-menu/src/context-menu-content.directive.ts +47 -0
  64. package/context-menu/src/context-menu-item-checkbox.directive.ts +30 -0
  65. package/context-menu/src/context-menu-item-indicator.directive.ts +14 -0
  66. package/context-menu/src/context-menu-item-radio-group.directive.ts +31 -0
  67. package/context-menu/src/context-menu-item-radio.directive.ts +69 -0
  68. package/context-menu/src/context-menu-item-selectable.ts +18 -0
  69. package/context-menu/src/context-menu-item.directive.ts +65 -0
  70. package/context-menu/src/context-menu-label.directive.ts +7 -0
  71. package/context-menu/src/context-menu-separator.directive.ts +13 -0
  72. package/context-menu/src/context-menu-trigger.directive.ts +82 -0
  73. package/context-menu/stories/context-menu.docs.mdx +23 -0
  74. package/context-menu/stories/context-menu.stories.ts +253 -0
  75. package/core/index.ts +3 -0
  76. package/core/src/accessor/provide-value-accessor.ts +20 -0
  77. package/core/src/auto-focus.directive.ts +81 -0
  78. package/core/src/inject-ng-control.ts +28 -0
  79. package/core/src/mount.ts +27 -0
  80. package/dialog/__tests__/dialog-content.directive.spec.ts +77 -0
  81. package/dialog/__tests__/dialog-trigger.directive.spec.ts +85 -0
  82. package/dialog/index.ts +31 -0
  83. package/dialog/ng-package.json +5 -0
  84. package/dialog/src/dialog-close.directive.ts +18 -0
  85. package/dialog/src/dialog-content.directive.ts +45 -0
  86. package/dialog/src/dialog-description.directive.ts +7 -0
  87. package/dialog/src/dialog-dismiss.directive.ts +18 -0
  88. package/dialog/src/dialog-ref.ts +70 -0
  89. package/dialog/src/dialog-title.directive.ts +7 -0
  90. package/dialog/src/dialog-trigger.directive.ts +52 -0
  91. package/dialog/src/dialog.config.ts +55 -0
  92. package/dialog/src/dialog.injectors.ts +12 -0
  93. package/dialog/src/dialog.providers.ts +27 -0
  94. package/dialog/src/dialog.service.ts +94 -0
  95. package/dialog/stories/dialog.docs.mdx +32 -0
  96. package/dialog/stories/dialog.stories.ts +233 -0
  97. package/dropdown-menu/ng-package.json +5 -0
  98. package/dropdown-menu/src/dropdown-menu-content.directive.ts +47 -0
  99. package/dropdown-menu/src/dropdown-menu-item-checkbox.directive.ts +30 -0
  100. package/dropdown-menu/src/dropdown-menu-item-indicator.directive.ts +14 -0
  101. package/dropdown-menu/src/dropdown-menu-item-radio-group.directive.ts +31 -0
  102. package/dropdown-menu/src/dropdown-menu-item-radio.directive.ts +72 -0
  103. package/dropdown-menu/src/dropdown-menu-item-selectable.ts +18 -0
  104. package/dropdown-menu/src/dropdown-menu-item.directive.ts +66 -0
  105. package/dropdown-menu/src/dropdown-menu-label.directive.ts +7 -0
  106. package/dropdown-menu/src/dropdown-menu-separator.directive.ts +13 -0
  107. package/dropdown-menu/src/dropdown-menu-trigger.directive.ts +185 -0
  108. package/dropdown-menu/stories/dropdown-menu-item-checkbox.component.ts +104 -0
  109. package/dropdown-menu/stories/dropdown-menu-item-checkbox.styles.scss +106 -0
  110. package/dropdown-menu/stories/dropdown-menu-item-radio.component.ts +95 -0
  111. package/dropdown-menu/stories/dropdown-menu-item-radio.styles.scss +106 -0
  112. package/dropdown-menu/stories/dropdown.docs.mdx +27 -0
  113. package/dropdown-menu/stories/dropdown.stories.ts +212 -0
  114. package/form-field/index.ts +1 -0
  115. package/form-field/src/.gitkeep +0 -0
  116. package/jest.config.ts +21 -0
  117. package/label/__tests__/label-root.directive.spec.ts +99 -0
  118. package/label/ng-package.json +5 -0
  119. package/label/src/label.directive.ts +58 -0
  120. package/label/stories/label.docs.mdx +40 -0
  121. package/label/stories/label.stories.ts +76 -0
  122. package/menu/index.ts +29 -0
  123. package/menu/ng-package.json +5 -0
  124. package/menu/src/menu-content.directive.ts +9 -0
  125. package/menu/src/menu-directive.ts +10 -0
  126. package/menu/src/menu-group.directive.ts +12 -0
  127. package/menu/src/menu-item.directive.ts +44 -0
  128. package/menu/src/menu-label.directive.ts +7 -0
  129. package/menu/src/menu-separator.directive.ts +13 -0
  130. package/menubar/index.ts +38 -0
  131. package/menubar/ng-package.json +5 -0
  132. package/menubar/src/menubar-content.directive.ts +9 -0
  133. package/menubar/src/menubar-item-checkbox.directive.ts +32 -0
  134. package/menubar/src/menubar-item-indicator.directive.ts +10 -0
  135. package/menubar/src/menubar-item-radio.directive.ts +33 -0
  136. package/menubar/src/menubar-item.directive.ts +12 -0
  137. package/menubar/src/menubar-radio-group.directive.ts +9 -0
  138. package/menubar/src/menubar-root.directive.ts +15 -0
  139. package/menubar/src/menubar-separator.directive.ts +9 -0
  140. package/menubar/src/menubar-trigger.directive.ts +40 -0
  141. package/menubar/stories/menubar.stories.ts +229 -0
  142. package/ng-package.json +8 -0
  143. package/package.json +4 -118
  144. package/portal/stories/portal.docs.mdx +85 -0
  145. package/presence/__test__/presence-test.component.ts +51 -0
  146. package/presence/__test__/presence.spec.ts +50 -0
  147. package/presence/index.ts +4 -0
  148. package/presence/src/presence.ts +119 -0
  149. package/presence/src/transitions/transition.collapse.ts +99 -0
  150. package/presence/src/transitions/transition.toast.ts +27 -0
  151. package/presence/src/types.ts +20 -0
  152. package/presence/src/utils.ts +63 -0
  153. package/presence/stories/presence-story.componen.ts +69 -0
  154. package/presence/stories/presence.docs.mdx +40 -0
  155. package/presence/stories/presence.stories.ts +29 -0
  156. package/progress/__test__/progress.spec.ts +55 -0
  157. package/progress/{index.d.ts → index.ts} +1 -0
  158. package/progress/ng-package.json +5 -0
  159. package/progress/src/progress-indicator.directive.ts +26 -0
  160. package/progress/src/progress-root.directive.ts +134 -0
  161. package/progress/stories/progress.docs.mdx +65 -0
  162. package/progress/stories/progress.stories.ts +66 -0
  163. package/project.json +39 -0
  164. package/radio/{index.d.ts → index.ts} +1 -0
  165. package/radio/ng-package.json +5 -0
  166. package/radio/src/radio-indicator.directive.ts +17 -0
  167. package/radio/src/radio-item.directive.ts +68 -0
  168. package/radio/src/radio-root.directive.ts +207 -0
  169. package/radio/src/{radio-tokens.d.ts → radio-tokens.ts} +5 -1
  170. package/radio/stories/radio-group.component.ts +39 -0
  171. package/radio/stories/radio-group.styles.scss +70 -0
  172. package/radio/stories/radio.docs.mdx +68 -0
  173. package/radio/stories/radio.stories.ts +155 -0
  174. package/separator/__tests__/separator.directive.spec.ts +58 -0
  175. package/separator/ng-package.json +5 -0
  176. package/separator/src/separator.directive.ts +35 -0
  177. package/separator/stories/separator.docs.mdx +37 -0
  178. package/separator/stories/separator.stories.ts +82 -0
  179. package/slider/src/slider-input.directive.ts +0 -0
  180. package/slider/src/slider-thumb.directives.ts +60 -0
  181. package/slider/src/slider-track.directive.ts +11 -0
  182. package/slider/src/slider.directive.ts +59 -0
  183. package/slider/src/slider.types.ts +4 -0
  184. package/switch/index.ts +22 -0
  185. package/switch/ng-package.json +5 -0
  186. package/switch/src/switch-input.directive.ts +24 -0
  187. package/switch/src/switch-root.directive.ts +127 -0
  188. package/switch/src/switch-thumb.directive.ts +15 -0
  189. package/switch/stories/switch.docs.mdx +83 -0
  190. package/switch/stories/switch.stories.ts +149 -0
  191. package/tabs/__tests__/tabs-context.service.spec.ts +35 -0
  192. package/tabs/index.ts +26 -0
  193. package/tabs/ng-package.json +5 -0
  194. package/tabs/src/tabs-content.directive.ts +23 -0
  195. package/tabs/src/tabs-context.service.ts +43 -0
  196. package/tabs/src/tabs-list.directive.ts +21 -0
  197. package/tabs/src/tabs-root.directive.ts +70 -0
  198. package/tabs/src/tabs-trigger.directive.ts +55 -0
  199. package/tabs/stories/tabs.stories.ts +213 -0
  200. package/test-setup.ts +1 -0
  201. package/toggle/__tests__/toggle.directive.spec.ts +87 -0
  202. package/toggle/ng-package.json +5 -0
  203. package/toggle/src/toggle.directive.ts +49 -0
  204. package/toggle/stories/toggle.docs.mdx +60 -0
  205. package/toggle/stories/toggle.stories.ts +84 -0
  206. package/toggle-group/ng-package.json +5 -0
  207. package/toggle-group/src/toggle-group-button.directive.ts +73 -0
  208. package/toggle-group/src/toggle-group-button.token.ts +8 -0
  209. package/toggle-group/src/toggle-group-multi.directive.ts +158 -0
  210. package/toggle-group/src/toggle-group.directive.ts +148 -0
  211. package/toggle-group/src/toggle-group.token.ts +11 -0
  212. package/toggle-group/stories/toggle-group.docs.mdx +87 -0
  213. package/toggle-group/stories/toggle-group.stories.ts +95 -0
  214. package/tsconfig.doc.json +11 -0
  215. package/tsconfig.json +29 -0
  216. package/tsconfig.lib.json +19 -0
  217. package/tsconfig.lib.prod.json +12 -0
  218. package/tsconfig.spec.json +11 -0
  219. package/visually-hidden/README.md +3 -0
  220. package/visually-hidden/stories/visually-hidden.docs.mdx +36 -0
  221. package/accordion/src/accordion-content.directive.d.ts +0 -11
  222. package/accordion/src/accordion-header.directive.d.ts +0 -7
  223. package/accordion/src/accordion-item.directive.d.ts +0 -64
  224. package/accordion/src/accordion-root.directive.d.ts +0 -78
  225. package/accordion/src/accordion-trigger.directive.d.ts +0 -15
  226. package/alert-dialog/src/alert-dialog-cancel.directive.d.ts +0 -7
  227. package/alert-dialog/src/alert-dialog-content.directive.d.ts +0 -9
  228. package/alert-dialog/src/alert-dialog-root.directive.d.ts +0 -9
  229. package/alert-dialog/src/alert-dialog-title.directive.d.ts +0 -5
  230. package/alert-dialog/src/alert-dialog-trigger.directive.d.ts +0 -7
  231. package/alert-dialog/src/alert-dialog.service.d.ts +0 -14
  232. package/avatar/src/avatar-fallback.directive.d.ts +0 -27
  233. package/avatar/src/avatar-image.directive.d.ts +0 -16
  234. package/avatar/src/avatar-root.directive.d.ts +0 -21
  235. package/avatar/src/avatar.config.d.ts +0 -13
  236. package/checkbox/src/checkbox-button.directive.d.ts +0 -8
  237. package/checkbox/src/checkbox-indicator.directive.d.ts +0 -6
  238. package/checkbox/src/checkbox-input.directive.d.ts +0 -9
  239. package/checkbox/src/checkbox.directive.d.ts +0 -75
  240. package/checkbox/src/checkbox.token.d.ts +0 -4
  241. package/collapsible/src/collapsible-content.directive.d.ts +0 -17
  242. package/collapsible/src/collapsible-content.token.d.ts +0 -3
  243. package/collapsible/src/collapsible-root.directive.d.ts +0 -55
  244. package/collapsible/src/collapsible-trigger.directive.d.ts +0 -26
  245. package/compodoc/documentation.json +0 -11759
  246. package/dropdown-menu/src/dropdown-menu-content.directive.d.ts +0 -15
  247. package/dropdown-menu/src/dropdown-menu-item-checkbox.directive.d.ts +0 -9
  248. package/dropdown-menu/src/dropdown-menu-item-indicator.directive.d.ts +0 -7
  249. package/dropdown-menu/src/dropdown-menu-item-radio-group.directive.d.ts +0 -12
  250. package/dropdown-menu/src/dropdown-menu-item-radio.directive.d.ts +0 -19
  251. package/dropdown-menu/src/dropdown-menu-item-selectable.d.ts +0 -12
  252. package/dropdown-menu/src/dropdown-menu-item.directive.d.ts +0 -17
  253. package/dropdown-menu/src/dropdown-menu-label.directive.d.ts +0 -5
  254. package/dropdown-menu/src/dropdown-menu-separator.directive.d.ts +0 -6
  255. package/dropdown-menu/src/dropdown-menu-trigger.directive.d.ts +0 -43
  256. package/esm2022/accordion/index.mjs +0 -6
  257. package/esm2022/accordion/radix-ng-primitives-accordion.mjs +0 -5
  258. package/esm2022/accordion/src/accordion-content.directive.mjs +0 -42
  259. package/esm2022/accordion/src/accordion-header.directive.mjs +0 -23
  260. package/esm2022/accordion/src/accordion-item.directive.mjs +0 -175
  261. package/esm2022/accordion/src/accordion-root.directive.mjs +0 -160
  262. package/esm2022/accordion/src/accordion-trigger.directive.mjs +0 -42
  263. package/esm2022/alert-dialog/index.mjs +0 -7
  264. package/esm2022/alert-dialog/radix-ng-primitives-alert-dialog.mjs +0 -5
  265. package/esm2022/alert-dialog/src/alert-dialog-cancel.directive.mjs +0 -24
  266. package/esm2022/alert-dialog/src/alert-dialog-content.directive.mjs +0 -34
  267. package/esm2022/alert-dialog/src/alert-dialog-root.directive.mjs +0 -25
  268. package/esm2022/alert-dialog/src/alert-dialog-title.directive.mjs +0 -14
  269. package/esm2022/alert-dialog/src/alert-dialog-trigger.directive.mjs +0 -24
  270. package/esm2022/alert-dialog/src/alert-dialog.service.mjs +0 -47
  271. package/esm2022/avatar/index.mjs +0 -5
  272. package/esm2022/avatar/radix-ng-primitives-avatar.mjs +0 -5
  273. package/esm2022/avatar/src/avatar-fallback.directive.mjs +0 -54
  274. package/esm2022/avatar/src/avatar-image.directive.mjs +0 -48
  275. package/esm2022/avatar/src/avatar-root.directive.mjs +0 -38
  276. package/esm2022/avatar/src/avatar.config.mjs +0 -17
  277. package/esm2022/checkbox/index.mjs +0 -6
  278. package/esm2022/checkbox/radix-ng-primitives-checkbox.mjs +0 -5
  279. package/esm2022/checkbox/src/checkbox-button.directive.mjs +0 -33
  280. package/esm2022/checkbox/src/checkbox-indicator.directive.mjs +0 -24
  281. package/esm2022/checkbox/src/checkbox-input.directive.mjs +0 -41
  282. package/esm2022/checkbox/src/checkbox.directive.mjs +0 -141
  283. package/esm2022/checkbox/src/checkbox.token.mjs +0 -6
  284. package/esm2022/collapsible/index.mjs +0 -4
  285. package/esm2022/collapsible/radix-ng-primitives-collapsible.mjs +0 -5
  286. package/esm2022/collapsible/src/collapsible-content.directive.mjs +0 -45
  287. package/esm2022/collapsible/src/collapsible-content.token.mjs +0 -3
  288. package/esm2022/collapsible/src/collapsible-root.directive.mjs +0 -118
  289. package/esm2022/collapsible/src/collapsible-trigger.directive.mjs +0 -49
  290. package/esm2022/dialog/index.mjs +0 -2
  291. package/esm2022/dialog/radix-ng-primitives-dialog.mjs +0 -5
  292. package/esm2022/dropdown-menu/index.mjs +0 -11
  293. package/esm2022/dropdown-menu/radix-ng-primitives-dropdown-menu.mjs +0 -5
  294. package/esm2022/dropdown-menu/src/dropdown-menu-content.directive.mjs +0 -56
  295. package/esm2022/dropdown-menu/src/dropdown-menu-item-checkbox.directive.mjs +0 -36
  296. package/esm2022/dropdown-menu/src/dropdown-menu-item-indicator.directive.mjs +0 -22
  297. package/esm2022/dropdown-menu/src/dropdown-menu-item-radio-group.directive.mjs +0 -37
  298. package/esm2022/dropdown-menu/src/dropdown-menu-item-radio.directive.mjs +0 -64
  299. package/esm2022/dropdown-menu/src/dropdown-menu-item-selectable.mjs +0 -31
  300. package/esm2022/dropdown-menu/src/dropdown-menu-item.directive.mjs +0 -71
  301. package/esm2022/dropdown-menu/src/dropdown-menu-label.directive.mjs +0 -14
  302. package/esm2022/dropdown-menu/src/dropdown-menu-separator.directive.mjs +0 -21
  303. package/esm2022/dropdown-menu/src/dropdown-menu-trigger.directive.mjs +0 -176
  304. package/esm2022/index.mjs +0 -2
  305. package/esm2022/label/index.mjs +0 -2
  306. package/esm2022/label/radix-ng-primitives-label.mjs +0 -5
  307. package/esm2022/label/src/label.directive.mjs +0 -59
  308. package/esm2022/menu/index.mjs +0 -45
  309. package/esm2022/menu/radix-ng-primitives-menu.mjs +0 -5
  310. package/esm2022/menu/src/menu-content.directive.mjs +0 -17
  311. package/esm2022/menu/src/menu-directive.mjs +0 -18
  312. package/esm2022/menu/src/menu-group.directive.mjs +0 -20
  313. package/esm2022/menu/src/menu-item.directive.mjs +0 -46
  314. package/esm2022/menu/src/menu-label.directive.mjs +0 -14
  315. package/esm2022/menu/src/menu-separator.directive.mjs +0 -21
  316. package/esm2022/menubar/index.mjs +0 -60
  317. package/esm2022/menubar/radix-ng-primitives-menubar.mjs +0 -5
  318. package/esm2022/menubar/src/menubar-content.directive.mjs +0 -17
  319. package/esm2022/menubar/src/menubar-item-checkbox.directive.mjs +0 -34
  320. package/esm2022/menubar/src/menubar-item-indicator.directive.mjs +0 -17
  321. package/esm2022/menubar/src/menubar-item-radio.directive.mjs +0 -35
  322. package/esm2022/menubar/src/menubar-item.directive.mjs +0 -20
  323. package/esm2022/menubar/src/menubar-radio-group.directive.mjs +0 -17
  324. package/esm2022/menubar/src/menubar-root.directive.mjs +0 -24
  325. package/esm2022/menubar/src/menubar-separator.directive.mjs +0 -17
  326. package/esm2022/menubar/src/menubar-trigger.directive.mjs +0 -45
  327. package/esm2022/progress/index.mjs +0 -3
  328. package/esm2022/progress/radix-ng-primitives-progress.mjs +0 -5
  329. package/esm2022/progress/src/progress-indicator.directive.mjs +0 -34
  330. package/esm2022/progress/src/progress-root.directive.mjs +0 -127
  331. package/esm2022/radio/index.mjs +0 -4
  332. package/esm2022/radio/radix-ng-primitives-radio.mjs +0 -5
  333. package/esm2022/radio/src/radio-indicator.directive.mjs +0 -25
  334. package/esm2022/radio/src/radio-item.directive.mjs +0 -70
  335. package/esm2022/radio/src/radio-root.directive.mjs +0 -194
  336. package/esm2022/radio/src/radio-tokens.mjs +0 -3
  337. package/esm2022/radix-ng-primitives.mjs +0 -5
  338. package/esm2022/separator/index.mjs +0 -2
  339. package/esm2022/separator/radix-ng-primitives-separator.mjs +0 -5
  340. package/esm2022/separator/src/separator.directive.mjs +0 -31
  341. package/esm2022/switch/index.mjs +0 -30
  342. package/esm2022/switch/radix-ng-primitives-switch.mjs +0 -5
  343. package/esm2022/switch/src/switch-input.directive.mjs +0 -32
  344. package/esm2022/switch/src/switch-root.directive.mjs +0 -95
  345. package/esm2022/switch/src/switch-thumb.directive.mjs +0 -23
  346. package/esm2022/tabs/index.mjs +0 -38
  347. package/esm2022/tabs/radix-ng-primitives-tabs.mjs +0 -5
  348. package/esm2022/tabs/src/tabs-content.directive.mjs +0 -29
  349. package/esm2022/tabs/src/tabs-context.service.mjs +0 -43
  350. package/esm2022/tabs/src/tabs-list.directive.mjs +0 -23
  351. package/esm2022/tabs/src/tabs-root.directive.mjs +0 -54
  352. package/esm2022/tabs/src/tabs-trigger.directive.mjs +0 -52
  353. package/esm2022/toggle/index.mjs +0 -2
  354. package/esm2022/toggle/radix-ng-primitives-toggle.mjs +0 -5
  355. package/esm2022/toggle/src/toggle.directive.mjs +0 -39
  356. package/esm2022/toggle-group/index.mjs +0 -6
  357. package/esm2022/toggle-group/radix-ng-primitives-toggle-group.mjs +0 -5
  358. package/esm2022/toggle-group/src/toggle-group-button.directive.mjs +0 -75
  359. package/esm2022/toggle-group/src/toggle-group-button.token.mjs +0 -6
  360. package/esm2022/toggle-group/src/toggle-group-multi.directive.mjs +0 -143
  361. package/esm2022/toggle-group/src/toggle-group.directive.mjs +0 -134
  362. package/esm2022/toggle-group/src/toggle-group.token.mjs +0 -6
  363. package/fesm2022/radix-ng-primitives-accordion.mjs +0 -431
  364. package/fesm2022/radix-ng-primitives-accordion.mjs.map +0 -1
  365. package/fesm2022/radix-ng-primitives-alert-dialog.mjs +0 -161
  366. package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +0 -1
  367. package/fesm2022/radix-ng-primitives-avatar.mjs +0 -156
  368. package/fesm2022/radix-ng-primitives-avatar.mjs.map +0 -1
  369. package/fesm2022/radix-ng-primitives-checkbox.mjs +0 -241
  370. package/fesm2022/radix-ng-primitives-checkbox.mjs.map +0 -1
  371. package/fesm2022/radix-ng-primitives-collapsible.mjs +0 -213
  372. package/fesm2022/radix-ng-primitives-collapsible.mjs.map +0 -1
  373. package/fesm2022/radix-ng-primitives-dialog.mjs +0 -4
  374. package/fesm2022/radix-ng-primitives-dialog.mjs.map +0 -1
  375. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +0 -502
  376. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +0 -1
  377. package/fesm2022/radix-ng-primitives-label.mjs +0 -66
  378. package/fesm2022/radix-ng-primitives-label.mjs.map +0 -1
  379. package/fesm2022/radix-ng-primitives-menu.mjs +0 -158
  380. package/fesm2022/radix-ng-primitives-menu.mjs.map +0 -1
  381. package/fesm2022/radix-ng-primitives-menubar.mjs +0 -245
  382. package/fesm2022/radix-ng-primitives-menubar.mjs.map +0 -1
  383. package/fesm2022/radix-ng-primitives-progress.mjs +0 -165
  384. package/fesm2022/radix-ng-primitives-progress.mjs.map +0 -1
  385. package/fesm2022/radix-ng-primitives-radio.mjs +0 -289
  386. package/fesm2022/radix-ng-primitives-radio.mjs.map +0 -1
  387. package/fesm2022/radix-ng-primitives-separator.mjs +0 -38
  388. package/fesm2022/radix-ng-primitives-separator.mjs.map +0 -1
  389. package/fesm2022/radix-ng-primitives-switch.mjs +0 -173
  390. package/fesm2022/radix-ng-primitives-switch.mjs.map +0 -1
  391. package/fesm2022/radix-ng-primitives-tabs.mjs +0 -222
  392. package/fesm2022/radix-ng-primitives-tabs.mjs.map +0 -1
  393. package/fesm2022/radix-ng-primitives-toggle-group.mjs +0 -358
  394. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +0 -1
  395. package/fesm2022/radix-ng-primitives-toggle.mjs +0 -46
  396. package/fesm2022/radix-ng-primitives-toggle.mjs.map +0 -1
  397. package/fesm2022/radix-ng-primitives.mjs +0 -4
  398. package/fesm2022/radix-ng-primitives.mjs.map +0 -1
  399. package/index.d.ts +0 -1
  400. package/label/src/label.directive.d.ts +0 -29
  401. package/menu/index.d.ts +0 -18
  402. package/menu/src/menu-content.directive.d.ts +0 -6
  403. package/menu/src/menu-directive.d.ts +0 -6
  404. package/menu/src/menu-group.directive.d.ts +0 -6
  405. package/menu/src/menu-item.directive.d.ts +0 -12
  406. package/menu/src/menu-label.directive.d.ts +0 -5
  407. package/menu/src/menu-separator.directive.d.ts +0 -6
  408. package/menubar/index.d.ts +0 -24
  409. package/menubar/src/menubar-content.directive.d.ts +0 -6
  410. package/menubar/src/menubar-item-checkbox.directive.d.ts +0 -14
  411. package/menubar/src/menubar-item-indicator.directive.d.ts +0 -5
  412. package/menubar/src/menubar-item-radio.directive.d.ts +0 -14
  413. package/menubar/src/menubar-item.directive.d.ts +0 -8
  414. package/menubar/src/menubar-radio-group.directive.d.ts +0 -6
  415. package/menubar/src/menubar-root.directive.d.ts +0 -7
  416. package/menubar/src/menubar-separator.directive.d.ts +0 -6
  417. package/menubar/src/menubar-trigger.directive.d.ts +0 -11
  418. package/progress/src/progress-indicator.directive.d.ts +0 -16
  419. package/progress/src/progress-root.directive.d.ts +0 -63
  420. package/radio/src/radio-indicator.directive.d.ts +0 -9
  421. package/radio/src/radio-item.directive.d.ts +0 -21
  422. package/radio/src/radio-root.directive.d.ts +0 -72
  423. package/separator/src/separator.directive.d.ts +0 -22
  424. package/switch/index.d.ts +0 -13
  425. package/switch/src/switch-input.directive.d.ts +0 -6
  426. package/switch/src/switch-root.directive.d.ts +0 -51
  427. package/switch/src/switch-thumb.directive.d.ts +0 -6
  428. package/tabs/index.d.ts +0 -15
  429. package/tabs/src/tabs-content.directive.d.ts +0 -8
  430. package/tabs/src/tabs-context.service.d.ts +0 -22
  431. package/tabs/src/tabs-list.directive.d.ts +0 -6
  432. package/tabs/src/tabs-root.directive.d.ts +0 -37
  433. package/tabs/src/tabs-trigger.directive.d.ts +0 -19
  434. package/toggle/src/toggle.directive.d.ts +0 -30
  435. package/toggle-group/src/toggle-group-button.directive.d.ts +0 -39
  436. package/toggle-group/src/toggle-group-button.token.d.ts +0 -4
  437. package/toggle-group/src/toggle-group-multi.directive.d.ts +0 -93
  438. package/toggle-group/src/toggle-group.directive.d.ts +0 -84
  439. package/toggle-group/src/toggle-group.token.d.ts +0 -5
  440. /package/accordion/{index.d.ts → index.ts} +0 -0
  441. /package/avatar/{index.d.ts → index.ts} +0 -0
  442. /package/checkbox/{index.d.ts → index.ts} +0 -0
  443. /package/collapsible/{index.d.ts → index.ts} +0 -0
  444. /package/dropdown-menu/{index.d.ts → index.ts} +0 -0
  445. /package/{dialog/index.d.ts → index.ts} +0 -0
  446. /package/label/{index.d.ts → index.ts} +0 -0
  447. /package/separator/{index.d.ts → index.ts} +0 -0
  448. /package/toggle/{index.d.ts → index.ts} +0 -0
  449. /package/toggle-group/{index.d.ts → index.ts} +0 -0
@@ -1,431 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, EventEmitter, booleanAttribute, Directive, Input, ContentChildren, forwardRef, Output, ElementRef, ChangeDetectorRef, ContentChild } from '@angular/core';
3
- import { UniqueSelectionDispatcher } from '@angular/cdk/collections';
4
- import { Subject, merge, Subscription } from 'rxjs';
5
- import { FocusKeyManager } from '@angular/cdk/a11y';
6
- import { Directionality } from '@angular/cdk/bidi';
7
- import { ENTER, SPACE } from '@angular/cdk/keycodes';
8
-
9
- const RdxAccordionRootToken = new InjectionToken('RdxAccordionRootDirective');
10
- let nextId$1 = 0;
11
- class RdxAccordionRootDirective {
12
- constructor() {
13
- this.selectionDispatcher = inject(UniqueSelectionDispatcher);
14
- this.dir = inject(Directionality, { optional: true });
15
- this.id = `rdx-accordion-${nextId$1++}`;
16
- this.openCloseAllActions = new Subject();
17
- /**
18
- * The orientation of the accordion.
19
- */
20
- this.orientation = 'vertical';
21
- /**
22
- * Determines whether one or multiple items can be opened at the same time.
23
- */
24
- this.type = 'single';
25
- /**
26
- * @ignore
27
- */
28
- this.collapsible = true;
29
- this.onValueChange = new EventEmitter();
30
- this._defaultValue = [];
31
- }
32
- get isMultiple() {
33
- return this.type === 'multiple';
34
- }
35
- /**
36
- * The value of the item to expand when initially rendered and type is "single". Use when you do not need to control the state of the items.
37
- */
38
- set defaultValue(value) {
39
- if (value !== this._defaultValue) {
40
- this._defaultValue = Array.isArray(value) ? value : [value];
41
- }
42
- }
43
- get defaultValue() {
44
- return this.isMultiple ? this._defaultValue : this._defaultValue[0];
45
- }
46
- /**
47
- * The controlled value of the item to expand
48
- */
49
- set value(value) {
50
- if (value !== this._value) {
51
- this._value = Array.isArray(value) ? value : [value];
52
- this.selectionDispatcher.notify(this.value, this.id);
53
- }
54
- }
55
- get value() {
56
- if (this._value === undefined) {
57
- return this.defaultValue;
58
- }
59
- return this.isMultiple ? this._value : this._value[0];
60
- }
61
- /**
62
- * @ignore
63
- */
64
- ngAfterContentInit() {
65
- this.selectionDispatcher.notify((this._value ?? this._defaultValue), this.id);
66
- this.keyManager = new FocusKeyManager(this.items).withHomeAndEnd();
67
- if (this.orientation === 'horizontal') {
68
- this.keyManager.withHorizontalOrientation(this.dir?.value || 'ltr');
69
- }
70
- else {
71
- this.keyManager.withVerticalOrientation();
72
- }
73
- this.onValueChangeSubscription = merge(...this.items.map((item) => item.expandedChange)).subscribe(() => this.onValueChange.emit());
74
- }
75
- /**
76
- * @ignore
77
- */
78
- ngOnDestroy() {
79
- this.openCloseAllActions.complete();
80
- this.onValueChangeSubscription.unsubscribe();
81
- }
82
- /**
83
- * @ignore
84
- */
85
- handleKeydown(event) {
86
- if (!this.keyManager.activeItem) {
87
- this.keyManager.setFirstItemActive();
88
- }
89
- const activeItem = this.keyManager.activeItem;
90
- if ((event.keyCode === ENTER || event.keyCode === SPACE) &&
91
- !this.keyManager.isTyping() &&
92
- activeItem &&
93
- !activeItem.disabled) {
94
- event.preventDefault();
95
- activeItem.toggle();
96
- }
97
- else {
98
- this.keyManager.onKeydown(event);
99
- }
100
- }
101
- /** Opens all enabled accordion items in an accordion where multi is enabled.
102
- * @ignore
103
- */
104
- openAll() {
105
- if (this.isMultiple) {
106
- this.openCloseAllActions.next(true);
107
- }
108
- }
109
- /** Closes all enabled accordion items.
110
- * @ignore
111
- */
112
- closeAll() {
113
- this.openCloseAllActions.next(false);
114
- }
115
- /**
116
- * @ignore
117
- */
118
- setActiveItem(item) {
119
- this.keyManager.setActiveItem(item);
120
- }
121
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxAccordionRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
122
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.1", type: RdxAccordionRootDirective, isStandalone: true, selector: "[rdxAccordionRoot]", inputs: { disabled: ["disabled", "disabled", booleanAttribute], orientation: "orientation", defaultValue: "defaultValue", type: "type", collapsible: "collapsible", value: "value" }, outputs: { onValueChange: "onValueChange" }, host: { listeners: { "keydown": "handleKeydown($event)" }, properties: { "attr.data-orientation": "orientation" } }, providers: [
123
- { provide: RdxAccordionRootToken, useExisting: RdxAccordionRootDirective },
124
- { provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }
125
- ], queries: [{ propertyName: "items", predicate: i0.forwardRef(() => RdxAccordionItemDirective), descendants: true }], ngImport: i0 }); }
126
- }
127
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxAccordionRootDirective, decorators: [{
128
- type: Directive,
129
- args: [{
130
- selector: '[rdxAccordionRoot]',
131
- standalone: true,
132
- providers: [
133
- { provide: RdxAccordionRootToken, useExisting: RdxAccordionRootDirective },
134
- { provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }
135
- ],
136
- host: {
137
- '[attr.data-orientation]': 'orientation',
138
- '(keydown)': 'handleKeydown($event)'
139
- }
140
- }]
141
- }], propDecorators: { disabled: [{
142
- type: Input,
143
- args: [{ transform: booleanAttribute }]
144
- }], orientation: [{
145
- type: Input
146
- }], items: [{
147
- type: ContentChildren,
148
- args: [forwardRef(() => RdxAccordionItemDirective), { descendants: true }]
149
- }], defaultValue: [{
150
- type: Input
151
- }], type: [{
152
- type: Input
153
- }], collapsible: [{
154
- type: Input
155
- }], value: [{
156
- type: Input
157
- }], onValueChange: [{
158
- type: Output
159
- }] } });
160
-
161
- class RdxAccordionTriggerDirective {
162
- constructor() {
163
- this.nativeElement = inject(ElementRef).nativeElement;
164
- this.accordionRoot = inject(RdxAccordionRootDirective);
165
- this.item = inject(RdxAccordionItemDirective);
166
- }
167
- /**
168
- * Fires when trigger clicked
169
- */
170
- onClick() {
171
- if (!this.accordionRoot.collapsible && this.item.expanded)
172
- return;
173
- this.item.toggle();
174
- this.accordionRoot.setActiveItem(this.item);
175
- }
176
- focus() {
177
- this.nativeElement.focus();
178
- }
179
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxAccordionTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
180
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: RdxAccordionTriggerDirective, isStandalone: true, selector: "[rdxAccordionTrigger]", host: { listeners: { "click": "onClick()" }, properties: { "attr.role": "\"button\"", "attr.aria-expanded": "item.expanded", "attr.data-state": "item.dataState", "attr.data-disabled": "item.disabled", "attr.disabled": "item.disabled ? \"\" : null", "attr.data-orientation": "item.orientation" } }, ngImport: i0 }); }
181
- }
182
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxAccordionTriggerDirective, decorators: [{
183
- type: Directive,
184
- args: [{
185
- selector: '[rdxAccordionTrigger]',
186
- standalone: true,
187
- host: {
188
- '[attr.role]': '"button"',
189
- '[attr.aria-expanded]': 'item.expanded',
190
- '[attr.data-state]': 'item.dataState',
191
- '[attr.data-disabled]': 'item.disabled',
192
- '[attr.disabled]': 'item.disabled ? "" : null',
193
- '[attr.data-orientation]': 'item.orientation',
194
- '(click)': 'onClick()'
195
- }
196
- }]
197
- }] });
198
-
199
- let nextId = 0;
200
- class RdxAccordionItemDirective {
201
- get dataState() {
202
- return this.expanded ? 'open' : 'closed';
203
- }
204
- get orientation() {
205
- return this.accordion.orientation;
206
- }
207
- /** Whether the AccordionItem is expanded. */
208
- set expanded(expanded) {
209
- // Only emit events and update the internal value if the value changes.
210
- if (this._expanded !== expanded) {
211
- this._expanded = expanded;
212
- this.expandedChange.emit(expanded);
213
- if (expanded) {
214
- this.opened.emit();
215
- /**
216
- * In the unique selection dispatcher, the id parameter is the id of the CdkAccordionItem,
217
- * the name value is the id of the accordion.
218
- */
219
- const accordionId = this.accordion ? this.accordion.id : this.value;
220
- this.expansionDispatcher.notify(this.value, accordionId);
221
- }
222
- else {
223
- this.closed.emit();
224
- }
225
- // Ensures that the animation will run when the value is set outside of an `@Input`.
226
- // This includes cases like the open, close and toggle methods.
227
- this.changeDetectorRef.markForCheck();
228
- }
229
- }
230
- get expanded() {
231
- return this._expanded;
232
- }
233
- set value(value) {
234
- this._value = value;
235
- }
236
- get value() {
237
- return this._value || this.id;
238
- }
239
- /** Whether the AccordionItem is disabled. */
240
- set disabled(value) {
241
- this._disabled = value;
242
- }
243
- get disabled() {
244
- return this.accordion.disabled ?? this._disabled;
245
- }
246
- constructor() {
247
- this.accordion = inject(RdxAccordionRootToken, { skipSelf: true });
248
- this.changeDetectorRef = inject(ChangeDetectorRef);
249
- this.expansionDispatcher = inject(UniqueSelectionDispatcher);
250
- /**
251
- * The unique AccordionItem id.
252
- * @ignore
253
- */
254
- this.id = `rdx-accordion-item-${nextId++}`;
255
- this._expanded = false;
256
- this._disabled = false;
257
- /** Event emitted every time the AccordionItem is closed. */
258
- this.closed = new EventEmitter();
259
- /** Event emitted every time the AccordionItem is opened. */
260
- this.opened = new EventEmitter();
261
- /** Event emitted when the AccordionItem is destroyed. */
262
- this.destroyed = new EventEmitter();
263
- /**
264
- * Emits whenever the expanded state of the accordion changes.
265
- * Primarily used to facilitate two-way binding.
266
- * @docs-private
267
- */
268
- this.expandedChange = new EventEmitter();
269
- /** Subscription to openAll/closeAll events. */
270
- this.openCloseAllSubscription = Subscription.EMPTY;
271
- this.removeUniqueSelectionListener = this.expansionDispatcher.listen((id, accordionId) => {
272
- if (this.accordion.isMultiple) {
273
- if (this.accordion.id === accordionId && id.includes(this.value)) {
274
- this.expanded = true;
275
- }
276
- }
277
- else {
278
- this.expanded = this.accordion.id === accordionId && id.includes(this.value);
279
- }
280
- });
281
- // When an accordion item is hosted in an accordion, subscribe to open/close events.
282
- if (this.accordion) {
283
- this.openCloseAllSubscription = this.subscribeToOpenCloseAllActions();
284
- }
285
- }
286
- /** Emits an event for the accordion item being destroyed. */
287
- ngOnDestroy() {
288
- this.opened.complete();
289
- this.closed.complete();
290
- this.destroyed.emit();
291
- this.destroyed.complete();
292
- this.removeUniqueSelectionListener();
293
- this.openCloseAllSubscription.unsubscribe();
294
- }
295
- focus() {
296
- this.trigger.focus();
297
- }
298
- /** Toggles the expanded state of the accordion item. */
299
- toggle() {
300
- if (!this.disabled) {
301
- this.content.onToggle();
302
- this.expanded = !this.expanded;
303
- }
304
- }
305
- /** Sets the expanded state of the accordion item to false. */
306
- close() {
307
- if (!this.disabled) {
308
- this.expanded = false;
309
- }
310
- }
311
- /** Sets the expanded state of the accordion item to true. */
312
- open() {
313
- if (!this.disabled) {
314
- this.expanded = true;
315
- }
316
- }
317
- subscribeToOpenCloseAllActions() {
318
- return this.accordion.openCloseAllActions.subscribe((expanded) => {
319
- // Only change expanded state if item is enabled
320
- if (!this.disabled) {
321
- this.expanded = expanded;
322
- }
323
- });
324
- }
325
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxAccordionItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
326
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.1", type: RdxAccordionItemDirective, isStandalone: true, selector: "[rdxAccordionItem]", inputs: { expanded: ["expanded", "expanded", booleanAttribute], value: "value", disabled: ["disabled", "disabled", booleanAttribute] }, outputs: { closed: "closed", opened: "opened", expandedChange: "expandedChange" }, host: { properties: { "attr.data-state": "dataState", "attr.data-disabled": "disabled", "attr.data-orientation": "orientation" } }, providers: [
327
- { provide: RdxAccordionRootToken, useValue: undefined }
328
- ], queries: [{ propertyName: "trigger", first: true, predicate: RdxAccordionTriggerDirective, descendants: true }, { propertyName: "content", first: true, predicate: i0.forwardRef(() => RdxAccordionContentDirective), descendants: true }], exportAs: ["rdxAccordionItem"], ngImport: i0 }); }
329
- }
330
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxAccordionItemDirective, decorators: [{
331
- type: Directive,
332
- args: [{
333
- selector: '[rdxAccordionItem]',
334
- standalone: true,
335
- exportAs: 'rdxAccordionItem',
336
- host: {
337
- '[attr.data-state]': 'dataState',
338
- '[attr.data-disabled]': 'disabled',
339
- '[attr.data-orientation]': 'orientation'
340
- },
341
- providers: [
342
- { provide: RdxAccordionRootToken, useValue: undefined }
343
- ]
344
- }]
345
- }], ctorParameters: () => [], propDecorators: { trigger: [{
346
- type: ContentChild,
347
- args: [RdxAccordionTriggerDirective, { descendants: true }]
348
- }], content: [{
349
- type: ContentChild,
350
- args: [forwardRef(() => RdxAccordionContentDirective), { descendants: true }]
351
- }], expanded: [{
352
- type: Input,
353
- args: [{ transform: booleanAttribute }]
354
- }], value: [{
355
- type: Input
356
- }], disabled: [{
357
- type: Input,
358
- args: [{ transform: booleanAttribute }]
359
- }], closed: [{
360
- type: Output
361
- }], opened: [{
362
- type: Output
363
- }], expandedChange: [{
364
- type: Output
365
- }] } });
366
-
367
- class RdxAccordionContentDirective {
368
- constructor() {
369
- this.item = inject(RdxAccordionItemDirective);
370
- this.nativeElement = inject(ElementRef).nativeElement;
371
- this.hidden = false;
372
- }
373
- onAnimationEnd() {
374
- this.hidden = !this.item.expanded;
375
- const { height, width } = this.nativeElement.getBoundingClientRect();
376
- this.nativeElement.style.setProperty('--radix-collapsible-content-height', `${height}px`);
377
- this.nativeElement.style.setProperty('--radix-collapsible-content-width', `${width}px`);
378
- this.nativeElement.style.setProperty('--radix-accordion-content-height', 'var(--radix-collapsible-content-height)');
379
- this.nativeElement.style.setProperty('--radix-accordion-content-width', 'var(--radix-collapsible-content-width)');
380
- }
381
- onToggle() {
382
- if (!this.item.expanded) {
383
- this.hidden = false;
384
- }
385
- }
386
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxAccordionContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
387
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: RdxAccordionContentDirective, isStandalone: true, selector: "[rdxAccordionContent]", host: { listeners: { "animationend": "onAnimationEnd()" }, properties: { "attr.role": "\"region\"", "style.display": "hidden ? \"none\" : \"\"", "attr.data-state": "item.dataState", "attr.data-disabled": "item.disabled", "attr.data-orientation": "item.orientation" } }, exportAs: ["rdxAccordionContent"], ngImport: i0 }); }
388
- }
389
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxAccordionContentDirective, decorators: [{
390
- type: Directive,
391
- args: [{
392
- selector: '[rdxAccordionContent]',
393
- standalone: true,
394
- exportAs: 'rdxAccordionContent',
395
- host: {
396
- '[attr.role]': '"region"',
397
- '[style.display]': 'hidden ? "none" : ""',
398
- '[attr.data-state]': 'item.dataState',
399
- '[attr.data-disabled]': 'item.disabled',
400
- '[attr.data-orientation]': 'item.orientation',
401
- '(animationend)': 'onAnimationEnd()'
402
- }
403
- }]
404
- }] });
405
-
406
- class RdxAccordionHeaderDirective {
407
- constructor() {
408
- this.item = inject(RdxAccordionItemDirective);
409
- }
410
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxAccordionHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
411
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: RdxAccordionHeaderDirective, isStandalone: true, selector: "[rdxAccordionHeader]", host: { properties: { "attr.data-state": "item.dataState", "attr.data-disabled": "item.disabled", "attr.data-orientation": "item.orientation" } }, ngImport: i0 }); }
412
- }
413
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxAccordionHeaderDirective, decorators: [{
414
- type: Directive,
415
- args: [{
416
- selector: '[rdxAccordionHeader]',
417
- standalone: true,
418
- host: {
419
- '[attr.data-state]': 'item.dataState',
420
- '[attr.data-disabled]': 'item.disabled',
421
- '[attr.data-orientation]': 'item.orientation'
422
- }
423
- }]
424
- }] });
425
-
426
- /**
427
- * Generated bundle index. Do not edit.
428
- */
429
-
430
- export { RdxAccordionContentDirective, RdxAccordionHeaderDirective, RdxAccordionItemDirective, RdxAccordionRootDirective, RdxAccordionRootToken, RdxAccordionTriggerDirective };
431
- //# sourceMappingURL=radix-ng-primitives-accordion.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"radix-ng-primitives-accordion.mjs","sources":["../../../packages/primitives/accordion/src/accordion-root.directive.ts","../../../packages/primitives/accordion/src/accordion-trigger.directive.ts","../../../packages/primitives/accordion/src/accordion-item.directive.ts","../../../packages/primitives/accordion/src/accordion-content.directive.ts","../../../packages/primitives/accordion/src/accordion-header.directive.ts","../../../packages/primitives/accordion/radix-ng-primitives-accordion.ts"],"sourcesContent":["import { FocusKeyManager } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { UniqueSelectionDispatcher } from '@angular/cdk/collections';\nimport { ENTER, SPACE } from '@angular/cdk/keycodes';\nimport {\n AfterContentInit,\n booleanAttribute,\n ContentChildren,\n Directive,\n EventEmitter,\n forwardRef,\n inject,\n InjectionToken,\n Input,\n OnDestroy,\n Output,\n QueryList\n} from '@angular/core';\nimport { merge, Subject, Subscription } from 'rxjs';\nimport { RdxAccordionItemDirective } from './accordion-item.directive';\n\nexport type RdxAccordionType = 'single' | 'multiple';\nexport type RdxAccordionOrientation = 'horizontal' | 'vertical';\n\nexport const RdxAccordionRootToken = new InjectionToken<RdxAccordionRootDirective>('RdxAccordionRootDirective');\n\nlet nextId = 0;\n\n@Directive({\n selector: '[rdxAccordionRoot]',\n standalone: true,\n providers: [\n { provide: RdxAccordionRootToken, useExisting: RdxAccordionRootDirective },\n { provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }\n ],\n host: {\n '[attr.data-orientation]': 'orientation',\n '(keydown)': 'handleKeydown($event)'\n }\n})\nexport class RdxAccordionRootDirective implements AfterContentInit, OnDestroy {\n protected readonly selectionDispatcher = inject(UniqueSelectionDispatcher);\n protected readonly dir = inject(Directionality, { optional: true });\n\n protected keyManager: FocusKeyManager<RdxAccordionItemDirective>;\n\n readonly id: string = `rdx-accordion-${nextId++}`;\n\n readonly openCloseAllActions = new Subject<boolean>();\n\n get isMultiple(): boolean {\n return this.type === 'multiple';\n }\n\n /** Whether the Accordion is disabled. */\n @Input({ transform: booleanAttribute }) disabled: boolean;\n\n /**\n * The orientation of the accordion.\n */\n @Input() orientation: RdxAccordionOrientation = 'vertical';\n /**\n * @private\n * @ignore\n */\n @ContentChildren(forwardRef(() => RdxAccordionItemDirective), { descendants: true })\n items: QueryList<RdxAccordionItemDirective>;\n\n /**\n * The value of the item to expand when initially rendered and type is \"single\". Use when you do not need to control the state of the items.\n */\n @Input()\n set defaultValue(value: string[] | string) {\n if (value !== this._defaultValue) {\n this._defaultValue = Array.isArray(value) ? value : [value];\n }\n }\n\n get defaultValue(): string[] | string {\n return this.isMultiple ? this._defaultValue : this._defaultValue[0];\n }\n\n /**\n * Determines whether one or multiple items can be opened at the same time.\n */\n @Input() type: RdxAccordionType = 'single';\n /**\n * @ignore\n */\n @Input() collapsible = true;\n /**\n * The controlled value of the item to expand\n */\n @Input()\n set value(value: string[] | string) {\n if (value !== this._value) {\n this._value = Array.isArray(value) ? value : [value];\n\n this.selectionDispatcher.notify(this.value as unknown as string, this.id);\n }\n }\n\n get value(): string[] | string {\n if (this._value === undefined) {\n return this.defaultValue;\n }\n\n return this.isMultiple ? this._value : this._value[0];\n }\n\n @Output() readonly onValueChange: EventEmitter<void> = new EventEmitter<void>();\n\n private _value?: string[];\n private _defaultValue: string[] | string = [];\n\n private onValueChangeSubscription: Subscription;\n\n /**\n * @ignore\n */\n ngAfterContentInit(): void {\n this.selectionDispatcher.notify((this._value ?? this._defaultValue) as unknown as string, this.id);\n\n this.keyManager = new FocusKeyManager(this.items).withHomeAndEnd();\n\n if (this.orientation === 'horizontal') {\n this.keyManager.withHorizontalOrientation(this.dir?.value || 'ltr');\n } else {\n this.keyManager.withVerticalOrientation();\n }\n\n this.onValueChangeSubscription = merge(...this.items.map((item) => item.expandedChange)).subscribe(() =>\n this.onValueChange.emit()\n );\n }\n\n /**\n * @ignore\n */\n ngOnDestroy() {\n this.openCloseAllActions.complete();\n this.onValueChangeSubscription.unsubscribe();\n }\n\n /**\n * @ignore\n */\n handleKeydown(event: KeyboardEvent) {\n if (!this.keyManager.activeItem) {\n this.keyManager.setFirstItemActive();\n }\n\n const activeItem = this.keyManager.activeItem;\n\n if (\n (event.keyCode === ENTER || event.keyCode === SPACE) &&\n !this.keyManager.isTyping() &&\n activeItem &&\n !activeItem.disabled\n ) {\n event.preventDefault();\n activeItem.toggle();\n } else {\n this.keyManager.onKeydown(event);\n }\n }\n\n /** Opens all enabled accordion items in an accordion where multi is enabled.\n * @ignore\n */\n openAll(): void {\n if (this.isMultiple) {\n this.openCloseAllActions.next(true);\n }\n }\n\n /** Closes all enabled accordion items.\n * @ignore\n */\n closeAll(): void {\n this.openCloseAllActions.next(false);\n }\n\n /**\n * @ignore\n */\n setActiveItem(item: RdxAccordionItemDirective) {\n this.keyManager.setActiveItem(item);\n }\n}\n","import { Directive, ElementRef, inject } from '@angular/core';\nimport { RdxAccordionItemDirective } from './accordion-item.directive';\nimport { RdxAccordionRootDirective } from './accordion-root.directive';\n\n@Directive({\n selector: '[rdxAccordionTrigger]',\n standalone: true,\n host: {\n '[attr.role]': '\"button\"',\n '[attr.aria-expanded]': 'item.expanded',\n '[attr.data-state]': 'item.dataState',\n '[attr.data-disabled]': 'item.disabled',\n '[attr.disabled]': 'item.disabled ? \"\" : null',\n '[attr.data-orientation]': 'item.orientation',\n '(click)': 'onClick()'\n }\n})\nexport class RdxAccordionTriggerDirective {\n protected readonly nativeElement = inject(ElementRef).nativeElement;\n protected readonly accordionRoot = inject(RdxAccordionRootDirective);\n protected readonly item = inject(RdxAccordionItemDirective);\n\n /**\n * Fires when trigger clicked\n */\n onClick(): void {\n if (!this.accordionRoot.collapsible && this.item.expanded) return;\n\n this.item.toggle();\n\n this.accordionRoot.setActiveItem(this.item);\n }\n\n focus() {\n this.nativeElement.focus();\n }\n}\n","import { FocusableOption } from '@angular/cdk/a11y';\nimport { UniqueSelectionDispatcher } from '@angular/cdk/collections';\nimport {\n booleanAttribute,\n ChangeDetectorRef,\n ContentChild,\n Directive,\n EventEmitter,\n forwardRef,\n inject,\n Input,\n OnDestroy,\n Output\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { RdxAccordionContentDirective } from './accordion-content.directive';\nimport { RdxAccordionOrientation, RdxAccordionRootToken } from './accordion-root.directive';\nimport { RdxAccordionTriggerDirective } from './accordion-trigger.directive';\n\nexport type RdxAccordionItemState = 'open' | 'closed';\n\nlet nextId = 0;\n\n@Directive({\n selector: '[rdxAccordionItem]',\n standalone: true,\n exportAs: 'rdxAccordionItem',\n host: {\n '[attr.data-state]': 'dataState',\n '[attr.data-disabled]': 'disabled',\n '[attr.data-orientation]': 'orientation'\n },\n providers: [\n { provide: RdxAccordionRootToken, useValue: undefined }]\n})\nexport class RdxAccordionItemDirective implements FocusableOption, OnDestroy {\n protected readonly accordion = inject(RdxAccordionRootToken, { skipSelf: true });\n protected readonly changeDetectorRef = inject(ChangeDetectorRef);\n protected readonly expansionDispatcher = inject(UniqueSelectionDispatcher);\n\n @ContentChild(RdxAccordionTriggerDirective, { descendants: true }) trigger: RdxAccordionTriggerDirective;\n @ContentChild(forwardRef(() => RdxAccordionContentDirective), { descendants: true })\n content: RdxAccordionContentDirective;\n\n get dataState(): RdxAccordionItemState {\n return this.expanded ? 'open' : 'closed';\n }\n\n /**\n * The unique AccordionItem id.\n * @ignore\n */\n readonly id: string = `rdx-accordion-item-${nextId++}`;\n\n get orientation(): RdxAccordionOrientation {\n return this.accordion.orientation;\n }\n\n /** Whether the AccordionItem is expanded. */\n @Input({ transform: booleanAttribute })\n set expanded(expanded: boolean) {\n // Only emit events and update the internal value if the value changes.\n if (this._expanded !== expanded) {\n this._expanded = expanded;\n this.expandedChange.emit(expanded);\n\n if (expanded) {\n this.opened.emit();\n /**\n * In the unique selection dispatcher, the id parameter is the id of the CdkAccordionItem,\n * the name value is the id of the accordion.\n */\n const accordionId = this.accordion ? this.accordion.id : this.value;\n this.expansionDispatcher.notify(this.value, accordionId);\n } else {\n this.closed.emit();\n }\n\n // Ensures that the animation will run when the value is set outside of an `@Input`.\n // This includes cases like the open, close and toggle methods.\n this.changeDetectorRef.markForCheck();\n }\n }\n\n get expanded(): boolean {\n return this._expanded;\n }\n\n private _expanded = false;\n\n @Input()\n set value(value: string) {\n this._value = value;\n }\n\n get value(): string {\n return this._value || this.id;\n }\n\n private _value?: string;\n\n /** Whether the AccordionItem is disabled. */\n @Input({ transform: booleanAttribute })\n set disabled(value: boolean) {\n this._disabled = value;\n }\n\n get disabled(): boolean {\n return this.accordion.disabled ?? this._disabled;\n }\n\n private _disabled = false;\n\n /** Event emitted every time the AccordionItem is closed. */\n @Output() readonly closed: EventEmitter<void> = new EventEmitter<void>();\n /** Event emitted every time the AccordionItem is opened. */\n @Output() readonly opened: EventEmitter<void> = new EventEmitter<void>();\n\n /** Event emitted when the AccordionItem is destroyed. */\n readonly destroyed: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * Emits whenever the expanded state of the accordion changes.\n * Primarily used to facilitate two-way binding.\n * @docs-private\n */\n @Output() readonly expandedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** Unregister function for expansionDispatcher. */\n private removeUniqueSelectionListener: () => void;\n\n /** Subscription to openAll/closeAll events. */\n private openCloseAllSubscription = Subscription.EMPTY;\n\n constructor() {\n this.removeUniqueSelectionListener = this.expansionDispatcher.listen((id: string, accordionId: string) => {\n if (this.accordion.isMultiple) {\n if (this.accordion.id === accordionId && id.includes(this.value)) {\n this.expanded = true;\n }\n } else {\n this.expanded = this.accordion.id === accordionId && id.includes(this.value);\n }\n });\n\n // When an accordion item is hosted in an accordion, subscribe to open/close events.\n if (this.accordion) {\n this.openCloseAllSubscription = this.subscribeToOpenCloseAllActions();\n }\n }\n\n /** Emits an event for the accordion item being destroyed. */\n ngOnDestroy() {\n this.opened.complete();\n this.closed.complete();\n this.destroyed.emit();\n this.destroyed.complete();\n this.removeUniqueSelectionListener();\n this.openCloseAllSubscription.unsubscribe();\n }\n\n focus(): void {\n this.trigger.focus();\n }\n\n /** Toggles the expanded state of the accordion item. */\n toggle(): void {\n if (!this.disabled) {\n this.content.onToggle();\n\n this.expanded = !this.expanded;\n }\n }\n\n /** Sets the expanded state of the accordion item to false. */\n close(): void {\n if (!this.disabled) {\n this.expanded = false;\n }\n }\n\n /** Sets the expanded state of the accordion item to true. */\n open(): void {\n if (!this.disabled) {\n this.expanded = true;\n }\n }\n\n private subscribeToOpenCloseAllActions(): Subscription {\n return this.accordion.openCloseAllActions.subscribe((expanded) => {\n // Only change expanded state if item is enabled\n if (!this.disabled) {\n this.expanded = expanded;\n }\n });\n }\n}\n","import { Directive, ElementRef, inject } from '@angular/core';\nimport { RdxAccordionItemDirective } from './accordion-item.directive';\n\n@Directive({\n selector: '[rdxAccordionContent]',\n standalone: true,\n exportAs: 'rdxAccordionContent',\n host: {\n '[attr.role]': '\"region\"',\n '[style.display]': 'hidden ? \"none\" : \"\"',\n '[attr.data-state]': 'item.dataState',\n '[attr.data-disabled]': 'item.disabled',\n '[attr.data-orientation]': 'item.orientation',\n '(animationend)': 'onAnimationEnd()'\n }\n})\nexport class RdxAccordionContentDirective {\n protected readonly item = inject(RdxAccordionItemDirective);\n protected readonly nativeElement = inject(ElementRef).nativeElement;\n\n protected hidden = false;\n\n protected onAnimationEnd() {\n this.hidden = !this.item.expanded;\n\n const { height, width } = this.nativeElement.getBoundingClientRect();\n\n this.nativeElement.style.setProperty('--radix-collapsible-content-height', `${height}px`);\n this.nativeElement.style.setProperty('--radix-collapsible-content-width', `${width}px`);\n\n this.nativeElement.style.setProperty(\n '--radix-accordion-content-height',\n 'var(--radix-collapsible-content-height)'\n );\n this.nativeElement.style.setProperty(\n '--radix-accordion-content-width',\n 'var(--radix-collapsible-content-width)'\n );\n }\n\n onToggle() {\n if (!this.item.expanded) {\n this.hidden = false;\n }\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { RdxAccordionItemDirective } from './accordion-item.directive';\n\n@Directive({\n selector: '[rdxAccordionHeader]',\n standalone: true,\n host: {\n '[attr.data-state]': 'item.dataState',\n '[attr.data-disabled]': 'item.disabled',\n '[attr.data-orientation]': 'item.orientation'\n }\n})\nexport class RdxAccordionHeaderDirective {\n protected readonly item = inject(RdxAccordionItemDirective);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["nextId"],"mappings":";;;;;;;;MAwBa,qBAAqB,GAAG,IAAI,cAAc,CAA4B,2BAA2B,EAAE;AAEhH,IAAIA,QAAM,GAAG,CAAC,CAAC;MAcF,yBAAyB,CAAA;AAZtC,IAAA,WAAA,GAAA;AAauB,QAAA,IAA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qBAAA;AACJ,iBAAA,CAAA;;;MCHY,2BAA2B,CAAA;AATxC,IAAA,WAAA,GAAA;AAUuB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC;AAC/D,KAAA;8GAFY,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAA3B,2BAA2B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,oBAAA,EAAA,eAAA,EAAA,uBAAA,EAAA,kBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAA3B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBATvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACF,wBAAA,mBAAmB,EAAE,gBAAgB;AACrC,wBAAA,sBAAsB,EAAE,eAAe;AACvC,wBAAA,yBAAyB,EAAE,kBAAkB;AAChD,qBAAA;AACJ,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
@@ -1,161 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable, inject, Directive, Renderer2, ElementRef, Input, ViewContainerRef } from '@angular/core';
3
- import * as i1 from '@angular/cdk/overlay';
4
- import { TemplatePortal } from '@angular/cdk/portal';
5
- import * as i1$1 from '@angular/cdk/a11y';
6
- import { CdkTrapFocus } from '@angular/cdk/a11y';
7
-
8
- class AlertDialogService {
9
- constructor(overlay) {
10
- this.overlay = overlay;
11
- }
12
- // eslint-disable-next-line
13
- setDialogContent(viewContainerRef, template) {
14
- this.dialogContent = { viewContainerRef, template };
15
- }
16
- open() {
17
- if (!this.dialogContent) {
18
- throw new Error('Dialog content is not set');
19
- }
20
- this.overlayRef = this.overlay.create({
21
- hasBackdrop: true,
22
- backdropClass: 'cdk-overlay-dark-backdrop',
23
- positionStrategy: this.overlay.position().global().centerHorizontally().centerVertically()
24
- });
25
- const templatePortal = new TemplatePortal(this.dialogContent.template, this.dialogContent.viewContainerRef);
26
- this.overlayRef.attach(templatePortal);
27
- this.overlayRef.keydownEvents().subscribe((event) => {
28
- if (event.key === 'Escape' || event.code === 'Escape') {
29
- this.close();
30
- }
31
- });
32
- this.overlayRef.backdropClick().subscribe(() => this.close());
33
- }
34
- close() {
35
- if (this.overlayRef) {
36
- this.overlayRef.dispose();
37
- this.overlayRef = null;
38
- }
39
- }
40
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogService, deps: [{ token: i1.Overlay }], target: i0.ɵɵFactoryTarget.Injectable }); }
41
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogService, providedIn: 'root' }); }
42
- }
43
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogService, decorators: [{
44
- type: Injectable,
45
- args: [{
46
- providedIn: 'root'
47
- }]
48
- }], ctorParameters: () => [{ type: i1.Overlay }] });
49
-
50
- class AlertDialogCancelDirective {
51
- constructor() {
52
- this.alertDialogService = inject(AlertDialogService);
53
- }
54
- onClick() {
55
- this.alertDialogService.close();
56
- }
57
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogCancelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
58
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: AlertDialogCancelDirective, isStandalone: true, selector: "[rdxAlertDialogCancel]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
59
- }
60
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogCancelDirective, decorators: [{
61
- type: Directive,
62
- args: [{
63
- selector: '[rdxAlertDialogCancel]',
64
- standalone: true,
65
- host: {
66
- '(click)': 'onClick()'
67
- }
68
- }]
69
- }] });
70
-
71
- class AlertDialogContentDirective {
72
- constructor() {
73
- this.renderer = inject(Renderer2);
74
- this.elementRef = inject(ElementRef);
75
- }
76
- set maxWidth(value) {
77
- this.renderer.setStyle(this.elementRef.nativeElement, 'maxWidth', value);
78
- }
79
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
80
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: AlertDialogContentDirective, isStandalone: true, selector: "[rdxAlertDialogContent]", inputs: { maxWidth: "maxWidth" }, host: { properties: { "attr.data-state": "open", "attr.cdkTrapFocusAutoCapture": "true" } }, hostDirectives: [{ directive: i1$1.CdkTrapFocus }], ngImport: i0 }); }
81
- }
82
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogContentDirective, decorators: [{
83
- type: Directive,
84
- args: [{
85
- selector: '[rdxAlertDialogContent]',
86
- hostDirectives: [
87
- {
88
- directive: CdkTrapFocus
89
- }
90
- ],
91
- standalone: true,
92
- host: {
93
- '[attr.data-state]': 'open',
94
- '[attr.cdkTrapFocusAutoCapture]': 'true'
95
- }
96
- }]
97
- }], propDecorators: { maxWidth: [{
98
- type: Input
99
- }] } });
100
-
101
- class AlertDialogRootDirective {
102
- constructor() {
103
- this.viewContainerRef = inject(ViewContainerRef);
104
- this.alertDialogService = inject(AlertDialogService);
105
- }
106
- // eslint-disable-next-line
107
- set content(template) {
108
- this.alertDialogService.setDialogContent(this.viewContainerRef, template);
109
- }
110
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
111
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: AlertDialogRootDirective, isStandalone: true, selector: "[rdxAlertDialogRoot]", inputs: { content: "content" }, ngImport: i0 }); }
112
- }
113
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogRootDirective, decorators: [{
114
- type: Directive,
115
- args: [{
116
- selector: '[rdxAlertDialogRoot]',
117
- standalone: true
118
- }]
119
- }], propDecorators: { content: [{
120
- type: Input
121
- }] } });
122
-
123
- class AlertDialogTitleDirective {
124
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
125
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: AlertDialogTitleDirective, isStandalone: true, selector: "[rdxAlertDialogTitle]", ngImport: i0 }); }
126
- }
127
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogTitleDirective, decorators: [{
128
- type: Directive,
129
- args: [{
130
- selector: '[rdxAlertDialogTitle]',
131
- standalone: true
132
- }]
133
- }] });
134
-
135
- class AlertDialogTriggerDirective {
136
- constructor() {
137
- this.alertDialogService = inject(AlertDialogService);
138
- }
139
- handleClick() {
140
- this.alertDialogService.open();
141
- }
142
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
143
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: AlertDialogTriggerDirective, isStandalone: true, selector: "[rdxAlertDialogTrigger]", host: { listeners: { "click": "handleClick()" } }, ngImport: i0 }); }
144
- }
145
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogTriggerDirective, decorators: [{
146
- type: Directive,
147
- args: [{
148
- selector: '[rdxAlertDialogTrigger]',
149
- standalone: true,
150
- host: {
151
- '(click)': 'handleClick()'
152
- }
153
- }]
154
- }] });
155
-
156
- /**
157
- * Generated bundle index. Do not edit.
158
- */
159
-
160
- export { AlertDialogCancelDirective, AlertDialogContentDirective, AlertDialogRootDirective, AlertDialogService, AlertDialogTitleDirective, AlertDialogTriggerDirective };
161
- //# sourceMappingURL=radix-ng-primitives-alert-dialog.mjs.map