@radix-ng/primitives 0.11.0 → 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 (445) 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/README.md +1 -0
  81. package/dialog/__tests__/dialog-content.directive.spec.ts +77 -0
  82. package/dialog/__tests__/dialog-trigger.directive.spec.ts +85 -0
  83. package/dialog/index.ts +31 -0
  84. package/dialog/ng-package.json +5 -0
  85. package/dialog/src/dialog-close.directive.ts +18 -0
  86. package/dialog/src/dialog-content.directive.ts +45 -0
  87. package/dialog/src/dialog-description.directive.ts +7 -0
  88. package/dialog/src/dialog-dismiss.directive.ts +18 -0
  89. package/dialog/src/dialog-ref.ts +70 -0
  90. package/dialog/src/dialog-title.directive.ts +7 -0
  91. package/dialog/src/dialog-trigger.directive.ts +52 -0
  92. package/dialog/src/dialog.config.ts +55 -0
  93. package/dialog/src/dialog.injectors.ts +12 -0
  94. package/dialog/src/dialog.providers.ts +27 -0
  95. package/dialog/src/dialog.service.ts +94 -0
  96. package/dialog/stories/dialog.docs.mdx +32 -0
  97. package/dialog/stories/dialog.stories.ts +233 -0
  98. package/dropdown-menu/ng-package.json +5 -0
  99. package/dropdown-menu/src/dropdown-menu-content.directive.ts +47 -0
  100. package/dropdown-menu/src/dropdown-menu-item-checkbox.directive.ts +30 -0
  101. package/dropdown-menu/src/dropdown-menu-item-indicator.directive.ts +14 -0
  102. package/dropdown-menu/src/dropdown-menu-item-radio-group.directive.ts +31 -0
  103. package/dropdown-menu/src/dropdown-menu-item-radio.directive.ts +72 -0
  104. package/dropdown-menu/src/dropdown-menu-item-selectable.ts +18 -0
  105. package/dropdown-menu/src/dropdown-menu-item.directive.ts +66 -0
  106. package/dropdown-menu/src/dropdown-menu-label.directive.ts +7 -0
  107. package/dropdown-menu/src/dropdown-menu-separator.directive.ts +13 -0
  108. package/dropdown-menu/src/dropdown-menu-trigger.directive.ts +185 -0
  109. package/dropdown-menu/stories/dropdown-menu-item-checkbox.component.ts +104 -0
  110. package/dropdown-menu/stories/dropdown-menu-item-checkbox.styles.scss +106 -0
  111. package/dropdown-menu/stories/dropdown-menu-item-radio.component.ts +95 -0
  112. package/dropdown-menu/stories/dropdown-menu-item-radio.styles.scss +106 -0
  113. package/dropdown-menu/stories/dropdown.docs.mdx +27 -0
  114. package/dropdown-menu/stories/dropdown.stories.ts +212 -0
  115. package/form-field/index.ts +1 -0
  116. package/form-field/src/.gitkeep +0 -0
  117. package/jest.config.ts +21 -0
  118. package/label/__tests__/label-root.directive.spec.ts +99 -0
  119. package/label/ng-package.json +5 -0
  120. package/label/src/label.directive.ts +58 -0
  121. package/label/stories/label.docs.mdx +40 -0
  122. package/label/stories/label.stories.ts +76 -0
  123. package/menu/index.ts +29 -0
  124. package/menu/ng-package.json +5 -0
  125. package/menu/src/menu-content.directive.ts +9 -0
  126. package/menu/src/menu-directive.ts +10 -0
  127. package/menu/src/menu-group.directive.ts +12 -0
  128. package/menu/src/menu-item.directive.ts +44 -0
  129. package/menu/src/menu-label.directive.ts +7 -0
  130. package/menu/src/menu-separator.directive.ts +13 -0
  131. package/menubar/index.ts +38 -0
  132. package/menubar/ng-package.json +5 -0
  133. package/menubar/src/menubar-content.directive.ts +9 -0
  134. package/menubar/src/menubar-item-checkbox.directive.ts +32 -0
  135. package/menubar/src/menubar-item-indicator.directive.ts +10 -0
  136. package/menubar/src/menubar-item-radio.directive.ts +33 -0
  137. package/menubar/src/menubar-item.directive.ts +12 -0
  138. package/menubar/src/menubar-radio-group.directive.ts +9 -0
  139. package/menubar/src/menubar-root.directive.ts +15 -0
  140. package/menubar/src/menubar-separator.directive.ts +9 -0
  141. package/menubar/src/menubar-trigger.directive.ts +40 -0
  142. package/menubar/stories/menubar.stories.ts +229 -0
  143. package/ng-package.json +8 -0
  144. package/package.json +4 -112
  145. package/portal/stories/portal.docs.mdx +85 -0
  146. package/presence/__test__/presence-test.component.ts +51 -0
  147. package/presence/__test__/presence.spec.ts +50 -0
  148. package/presence/index.ts +4 -0
  149. package/presence/src/presence.ts +119 -0
  150. package/presence/src/transitions/transition.collapse.ts +99 -0
  151. package/presence/src/transitions/transition.toast.ts +27 -0
  152. package/presence/src/types.ts +20 -0
  153. package/presence/src/utils.ts +63 -0
  154. package/presence/stories/presence-story.componen.ts +69 -0
  155. package/presence/stories/presence.docs.mdx +40 -0
  156. package/presence/stories/presence.stories.ts +29 -0
  157. package/progress/__test__/progress.spec.ts +55 -0
  158. package/progress/{index.d.ts → index.ts} +1 -0
  159. package/progress/ng-package.json +5 -0
  160. package/progress/src/progress-indicator.directive.ts +26 -0
  161. package/progress/src/progress-root.directive.ts +134 -0
  162. package/progress/stories/progress.docs.mdx +65 -0
  163. package/progress/stories/progress.stories.ts +66 -0
  164. package/project.json +39 -0
  165. package/radio/{index.d.ts → index.ts} +1 -0
  166. package/radio/ng-package.json +5 -0
  167. package/radio/src/radio-indicator.directive.ts +17 -0
  168. package/radio/src/radio-item.directive.ts +68 -0
  169. package/radio/src/radio-root.directive.ts +207 -0
  170. package/radio/src/{radio-tokens.d.ts → radio-tokens.ts} +5 -1
  171. package/radio/stories/radio-group.component.ts +39 -0
  172. package/radio/stories/radio-group.styles.scss +70 -0
  173. package/radio/stories/radio.docs.mdx +68 -0
  174. package/radio/stories/radio.stories.ts +155 -0
  175. package/separator/__tests__/separator.directive.spec.ts +58 -0
  176. package/separator/ng-package.json +5 -0
  177. package/separator/src/separator.directive.ts +35 -0
  178. package/separator/stories/separator.docs.mdx +37 -0
  179. package/separator/stories/separator.stories.ts +82 -0
  180. package/slider/src/slider-input.directive.ts +0 -0
  181. package/slider/src/slider-thumb.directives.ts +60 -0
  182. package/slider/src/slider-track.directive.ts +11 -0
  183. package/slider/src/slider.directive.ts +59 -0
  184. package/slider/src/slider.types.ts +4 -0
  185. package/switch/index.ts +22 -0
  186. package/switch/ng-package.json +5 -0
  187. package/switch/src/switch-input.directive.ts +24 -0
  188. package/switch/src/switch-root.directive.ts +127 -0
  189. package/switch/src/switch-thumb.directive.ts +15 -0
  190. package/switch/stories/switch.docs.mdx +83 -0
  191. package/switch/stories/switch.stories.ts +149 -0
  192. package/tabs/__tests__/tabs-context.service.spec.ts +35 -0
  193. package/tabs/index.ts +26 -0
  194. package/tabs/ng-package.json +5 -0
  195. package/tabs/src/tabs-content.directive.ts +23 -0
  196. package/tabs/src/tabs-context.service.ts +43 -0
  197. package/tabs/src/tabs-list.directive.ts +21 -0
  198. package/tabs/src/tabs-root.directive.ts +70 -0
  199. package/tabs/src/tabs-trigger.directive.ts +55 -0
  200. package/tabs/stories/tabs.stories.ts +213 -0
  201. package/test-setup.ts +1 -0
  202. package/toggle/__tests__/toggle.directive.spec.ts +87 -0
  203. package/toggle/ng-package.json +5 -0
  204. package/toggle/src/toggle.directive.ts +49 -0
  205. package/toggle/stories/toggle.docs.mdx +60 -0
  206. package/toggle/stories/toggle.stories.ts +84 -0
  207. package/toggle-group/ng-package.json +5 -0
  208. package/toggle-group/src/toggle-group-button.directive.ts +73 -0
  209. package/toggle-group/src/toggle-group-button.token.ts +8 -0
  210. package/toggle-group/src/toggle-group-multi.directive.ts +158 -0
  211. package/toggle-group/src/toggle-group.directive.ts +148 -0
  212. package/toggle-group/src/toggle-group.token.ts +11 -0
  213. package/toggle-group/stories/toggle-group.docs.mdx +87 -0
  214. package/toggle-group/stories/toggle-group.stories.ts +95 -0
  215. package/tsconfig.doc.json +11 -0
  216. package/tsconfig.json +29 -0
  217. package/tsconfig.lib.json +19 -0
  218. package/tsconfig.lib.prod.json +12 -0
  219. package/tsconfig.spec.json +11 -0
  220. package/visually-hidden/README.md +3 -0
  221. package/visually-hidden/stories/visually-hidden.docs.mdx +36 -0
  222. package/accordion/src/accordion-content.directive.d.ts +0 -16
  223. package/accordion/src/accordion-header.directive.d.ts +0 -7
  224. package/accordion/src/accordion-item.directive.d.ts +0 -62
  225. package/accordion/src/accordion-root.directive.d.ts +0 -78
  226. package/accordion/src/accordion-trigger.directive.d.ts +0 -15
  227. package/alert-dialog/src/alert-dialog-cancel.directive.d.ts +0 -7
  228. package/alert-dialog/src/alert-dialog-content.directive.d.ts +0 -9
  229. package/alert-dialog/src/alert-dialog-root.directive.d.ts +0 -9
  230. package/alert-dialog/src/alert-dialog-title.directive.d.ts +0 -5
  231. package/alert-dialog/src/alert-dialog-trigger.directive.d.ts +0 -7
  232. package/alert-dialog/src/alert-dialog.service.d.ts +0 -14
  233. package/avatar/src/avatar-fallback.directive.d.ts +0 -27
  234. package/avatar/src/avatar-image.directive.d.ts +0 -16
  235. package/avatar/src/avatar-root.directive.d.ts +0 -21
  236. package/avatar/src/avatar.config.d.ts +0 -13
  237. package/checkbox/src/checkbox-button.directive.d.ts +0 -8
  238. package/checkbox/src/checkbox-indicator.directive.d.ts +0 -6
  239. package/checkbox/src/checkbox-input.directive.d.ts +0 -9
  240. package/checkbox/src/checkbox.directive.d.ts +0 -75
  241. package/checkbox/src/checkbox.token.d.ts +0 -4
  242. package/collapsible/src/collapsible-content.directive.d.ts +0 -17
  243. package/collapsible/src/collapsible-content.token.d.ts +0 -3
  244. package/collapsible/src/collapsible-root.directive.d.ts +0 -55
  245. package/collapsible/src/collapsible-trigger.directive.d.ts +0 -26
  246. package/compodoc/documentation.json +0 -11395
  247. package/dropdown-menu/src/dropdown-menu-content.directive.d.ts +0 -15
  248. package/dropdown-menu/src/dropdown-menu-item-checkbox.directive.d.ts +0 -9
  249. package/dropdown-menu/src/dropdown-menu-item-indicator.directive.d.ts +0 -7
  250. package/dropdown-menu/src/dropdown-menu-item-radio-group.directive.d.ts +0 -12
  251. package/dropdown-menu/src/dropdown-menu-item-radio.directive.d.ts +0 -19
  252. package/dropdown-menu/src/dropdown-menu-item-selectable.d.ts +0 -12
  253. package/dropdown-menu/src/dropdown-menu-item.directive.d.ts +0 -17
  254. package/dropdown-menu/src/dropdown-menu-label.directive.d.ts +0 -5
  255. package/dropdown-menu/src/dropdown-menu-separator.directive.d.ts +0 -6
  256. package/dropdown-menu/src/dropdown-menu-trigger.directive.d.ts +0 -43
  257. package/esm2022/accordion/index.mjs +0 -6
  258. package/esm2022/accordion/radix-ng-primitives-accordion.mjs +0 -5
  259. package/esm2022/accordion/src/accordion-content.directive.mjs +0 -36
  260. package/esm2022/accordion/src/accordion-header.directive.mjs +0 -23
  261. package/esm2022/accordion/src/accordion-item.directive.mjs +0 -170
  262. package/esm2022/accordion/src/accordion-root.directive.mjs +0 -157
  263. package/esm2022/accordion/src/accordion-trigger.directive.mjs +0 -42
  264. package/esm2022/alert-dialog/index.mjs +0 -7
  265. package/esm2022/alert-dialog/radix-ng-primitives-alert-dialog.mjs +0 -5
  266. package/esm2022/alert-dialog/src/alert-dialog-cancel.directive.mjs +0 -24
  267. package/esm2022/alert-dialog/src/alert-dialog-content.directive.mjs +0 -34
  268. package/esm2022/alert-dialog/src/alert-dialog-root.directive.mjs +0 -25
  269. package/esm2022/alert-dialog/src/alert-dialog-title.directive.mjs +0 -14
  270. package/esm2022/alert-dialog/src/alert-dialog-trigger.directive.mjs +0 -24
  271. package/esm2022/alert-dialog/src/alert-dialog.service.mjs +0 -47
  272. package/esm2022/avatar/index.mjs +0 -5
  273. package/esm2022/avatar/radix-ng-primitives-avatar.mjs +0 -5
  274. package/esm2022/avatar/src/avatar-fallback.directive.mjs +0 -54
  275. package/esm2022/avatar/src/avatar-image.directive.mjs +0 -48
  276. package/esm2022/avatar/src/avatar-root.directive.mjs +0 -38
  277. package/esm2022/avatar/src/avatar.config.mjs +0 -17
  278. package/esm2022/checkbox/index.mjs +0 -6
  279. package/esm2022/checkbox/radix-ng-primitives-checkbox.mjs +0 -5
  280. package/esm2022/checkbox/src/checkbox-button.directive.mjs +0 -33
  281. package/esm2022/checkbox/src/checkbox-indicator.directive.mjs +0 -24
  282. package/esm2022/checkbox/src/checkbox-input.directive.mjs +0 -41
  283. package/esm2022/checkbox/src/checkbox.directive.mjs +0 -141
  284. package/esm2022/checkbox/src/checkbox.token.mjs +0 -6
  285. package/esm2022/collapsible/index.mjs +0 -4
  286. package/esm2022/collapsible/radix-ng-primitives-collapsible.mjs +0 -5
  287. package/esm2022/collapsible/src/collapsible-content.directive.mjs +0 -45
  288. package/esm2022/collapsible/src/collapsible-content.token.mjs +0 -3
  289. package/esm2022/collapsible/src/collapsible-root.directive.mjs +0 -118
  290. package/esm2022/collapsible/src/collapsible-trigger.directive.mjs +0 -49
  291. package/esm2022/dropdown-menu/index.mjs +0 -11
  292. package/esm2022/dropdown-menu/radix-ng-primitives-dropdown-menu.mjs +0 -5
  293. package/esm2022/dropdown-menu/src/dropdown-menu-content.directive.mjs +0 -56
  294. package/esm2022/dropdown-menu/src/dropdown-menu-item-checkbox.directive.mjs +0 -36
  295. package/esm2022/dropdown-menu/src/dropdown-menu-item-indicator.directive.mjs +0 -22
  296. package/esm2022/dropdown-menu/src/dropdown-menu-item-radio-group.directive.mjs +0 -37
  297. package/esm2022/dropdown-menu/src/dropdown-menu-item-radio.directive.mjs +0 -64
  298. package/esm2022/dropdown-menu/src/dropdown-menu-item-selectable.mjs +0 -31
  299. package/esm2022/dropdown-menu/src/dropdown-menu-item.directive.mjs +0 -71
  300. package/esm2022/dropdown-menu/src/dropdown-menu-label.directive.mjs +0 -14
  301. package/esm2022/dropdown-menu/src/dropdown-menu-separator.directive.mjs +0 -21
  302. package/esm2022/dropdown-menu/src/dropdown-menu-trigger.directive.mjs +0 -176
  303. package/esm2022/index.mjs +0 -2
  304. package/esm2022/label/index.mjs +0 -2
  305. package/esm2022/label/radix-ng-primitives-label.mjs +0 -5
  306. package/esm2022/label/src/label.directive.mjs +0 -59
  307. package/esm2022/menu/index.mjs +0 -45
  308. package/esm2022/menu/radix-ng-primitives-menu.mjs +0 -5
  309. package/esm2022/menu/src/menu-content.directive.mjs +0 -17
  310. package/esm2022/menu/src/menu-directive.mjs +0 -18
  311. package/esm2022/menu/src/menu-group.directive.mjs +0 -20
  312. package/esm2022/menu/src/menu-item.directive.mjs +0 -46
  313. package/esm2022/menu/src/menu-label.directive.mjs +0 -14
  314. package/esm2022/menu/src/menu-separator.directive.mjs +0 -21
  315. package/esm2022/menubar/index.mjs +0 -60
  316. package/esm2022/menubar/radix-ng-primitives-menubar.mjs +0 -5
  317. package/esm2022/menubar/src/menubar-content.directive.mjs +0 -17
  318. package/esm2022/menubar/src/menubar-item-checkbox.directive.mjs +0 -34
  319. package/esm2022/menubar/src/menubar-item-indicator.directive.mjs +0 -17
  320. package/esm2022/menubar/src/menubar-item-radio.directive.mjs +0 -35
  321. package/esm2022/menubar/src/menubar-item.directive.mjs +0 -20
  322. package/esm2022/menubar/src/menubar-radio-group.directive.mjs +0 -17
  323. package/esm2022/menubar/src/menubar-root.directive.mjs +0 -24
  324. package/esm2022/menubar/src/menubar-separator.directive.mjs +0 -17
  325. package/esm2022/menubar/src/menubar-trigger.directive.mjs +0 -45
  326. package/esm2022/progress/index.mjs +0 -3
  327. package/esm2022/progress/radix-ng-primitives-progress.mjs +0 -5
  328. package/esm2022/progress/src/progress-indicator.directive.mjs +0 -34
  329. package/esm2022/progress/src/progress-root.directive.mjs +0 -127
  330. package/esm2022/radio/index.mjs +0 -4
  331. package/esm2022/radio/radix-ng-primitives-radio.mjs +0 -5
  332. package/esm2022/radio/src/radio-indicator.directive.mjs +0 -25
  333. package/esm2022/radio/src/radio-item.directive.mjs +0 -70
  334. package/esm2022/radio/src/radio-root.directive.mjs +0 -194
  335. package/esm2022/radio/src/radio-tokens.mjs +0 -3
  336. package/esm2022/radix-ng-primitives.mjs +0 -5
  337. package/esm2022/separator/index.mjs +0 -2
  338. package/esm2022/separator/radix-ng-primitives-separator.mjs +0 -5
  339. package/esm2022/separator/src/separator.directive.mjs +0 -31
  340. package/esm2022/switch/index.mjs +0 -30
  341. package/esm2022/switch/radix-ng-primitives-switch.mjs +0 -5
  342. package/esm2022/switch/src/switch-input.directive.mjs +0 -32
  343. package/esm2022/switch/src/switch-root.directive.mjs +0 -95
  344. package/esm2022/switch/src/switch-thumb.directive.mjs +0 -23
  345. package/esm2022/tabs/index.mjs +0 -38
  346. package/esm2022/tabs/radix-ng-primitives-tabs.mjs +0 -5
  347. package/esm2022/tabs/src/tabs-content.directive.mjs +0 -29
  348. package/esm2022/tabs/src/tabs-context.service.mjs +0 -43
  349. package/esm2022/tabs/src/tabs-list.directive.mjs +0 -23
  350. package/esm2022/tabs/src/tabs-root.directive.mjs +0 -54
  351. package/esm2022/tabs/src/tabs-trigger.directive.mjs +0 -52
  352. package/esm2022/toggle/index.mjs +0 -2
  353. package/esm2022/toggle/radix-ng-primitives-toggle.mjs +0 -5
  354. package/esm2022/toggle/src/toggle.directive.mjs +0 -39
  355. package/esm2022/toggle-group/index.mjs +0 -6
  356. package/esm2022/toggle-group/radix-ng-primitives-toggle-group.mjs +0 -5
  357. package/esm2022/toggle-group/src/toggle-group-button.directive.mjs +0 -75
  358. package/esm2022/toggle-group/src/toggle-group-button.token.mjs +0 -6
  359. package/esm2022/toggle-group/src/toggle-group-multi.directive.mjs +0 -143
  360. package/esm2022/toggle-group/src/toggle-group.directive.mjs +0 -134
  361. package/esm2022/toggle-group/src/toggle-group.token.mjs +0 -6
  362. package/fesm2022/radix-ng-primitives-accordion.mjs +0 -418
  363. package/fesm2022/radix-ng-primitives-accordion.mjs.map +0 -1
  364. package/fesm2022/radix-ng-primitives-alert-dialog.mjs +0 -161
  365. package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +0 -1
  366. package/fesm2022/radix-ng-primitives-avatar.mjs +0 -156
  367. package/fesm2022/radix-ng-primitives-avatar.mjs.map +0 -1
  368. package/fesm2022/radix-ng-primitives-checkbox.mjs +0 -241
  369. package/fesm2022/radix-ng-primitives-checkbox.mjs.map +0 -1
  370. package/fesm2022/radix-ng-primitives-collapsible.mjs +0 -213
  371. package/fesm2022/radix-ng-primitives-collapsible.mjs.map +0 -1
  372. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +0 -502
  373. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +0 -1
  374. package/fesm2022/radix-ng-primitives-label.mjs +0 -66
  375. package/fesm2022/radix-ng-primitives-label.mjs.map +0 -1
  376. package/fesm2022/radix-ng-primitives-menu.mjs +0 -158
  377. package/fesm2022/radix-ng-primitives-menu.mjs.map +0 -1
  378. package/fesm2022/radix-ng-primitives-menubar.mjs +0 -245
  379. package/fesm2022/radix-ng-primitives-menubar.mjs.map +0 -1
  380. package/fesm2022/radix-ng-primitives-progress.mjs +0 -165
  381. package/fesm2022/radix-ng-primitives-progress.mjs.map +0 -1
  382. package/fesm2022/radix-ng-primitives-radio.mjs +0 -289
  383. package/fesm2022/radix-ng-primitives-radio.mjs.map +0 -1
  384. package/fesm2022/radix-ng-primitives-separator.mjs +0 -38
  385. package/fesm2022/radix-ng-primitives-separator.mjs.map +0 -1
  386. package/fesm2022/radix-ng-primitives-switch.mjs +0 -173
  387. package/fesm2022/radix-ng-primitives-switch.mjs.map +0 -1
  388. package/fesm2022/radix-ng-primitives-tabs.mjs +0 -222
  389. package/fesm2022/radix-ng-primitives-tabs.mjs.map +0 -1
  390. package/fesm2022/radix-ng-primitives-toggle-group.mjs +0 -358
  391. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +0 -1
  392. package/fesm2022/radix-ng-primitives-toggle.mjs +0 -46
  393. package/fesm2022/radix-ng-primitives-toggle.mjs.map +0 -1
  394. package/fesm2022/radix-ng-primitives.mjs +0 -4
  395. package/fesm2022/radix-ng-primitives.mjs.map +0 -1
  396. package/label/src/label.directive.d.ts +0 -29
  397. package/menu/index.d.ts +0 -18
  398. package/menu/src/menu-content.directive.d.ts +0 -6
  399. package/menu/src/menu-directive.d.ts +0 -6
  400. package/menu/src/menu-group.directive.d.ts +0 -6
  401. package/menu/src/menu-item.directive.d.ts +0 -12
  402. package/menu/src/menu-label.directive.d.ts +0 -5
  403. package/menu/src/menu-separator.directive.d.ts +0 -6
  404. package/menubar/index.d.ts +0 -24
  405. package/menubar/src/menubar-content.directive.d.ts +0 -6
  406. package/menubar/src/menubar-item-checkbox.directive.d.ts +0 -14
  407. package/menubar/src/menubar-item-indicator.directive.d.ts +0 -5
  408. package/menubar/src/menubar-item-radio.directive.d.ts +0 -14
  409. package/menubar/src/menubar-item.directive.d.ts +0 -8
  410. package/menubar/src/menubar-radio-group.directive.d.ts +0 -6
  411. package/menubar/src/menubar-root.directive.d.ts +0 -7
  412. package/menubar/src/menubar-separator.directive.d.ts +0 -6
  413. package/menubar/src/menubar-trigger.directive.d.ts +0 -11
  414. package/progress/src/progress-indicator.directive.d.ts +0 -16
  415. package/progress/src/progress-root.directive.d.ts +0 -63
  416. package/radio/src/radio-indicator.directive.d.ts +0 -9
  417. package/radio/src/radio-item.directive.d.ts +0 -21
  418. package/radio/src/radio-root.directive.d.ts +0 -72
  419. package/separator/src/separator.directive.d.ts +0 -22
  420. package/switch/index.d.ts +0 -13
  421. package/switch/src/switch-input.directive.d.ts +0 -6
  422. package/switch/src/switch-root.directive.d.ts +0 -51
  423. package/switch/src/switch-thumb.directive.d.ts +0 -6
  424. package/tabs/index.d.ts +0 -15
  425. package/tabs/src/tabs-content.directive.d.ts +0 -8
  426. package/tabs/src/tabs-context.service.d.ts +0 -22
  427. package/tabs/src/tabs-list.directive.d.ts +0 -6
  428. package/tabs/src/tabs-root.directive.d.ts +0 -37
  429. package/tabs/src/tabs-trigger.directive.d.ts +0 -19
  430. package/toggle/src/toggle.directive.d.ts +0 -30
  431. package/toggle-group/src/toggle-group-button.directive.d.ts +0 -39
  432. package/toggle-group/src/toggle-group-button.token.d.ts +0 -4
  433. package/toggle-group/src/toggle-group-multi.directive.d.ts +0 -93
  434. package/toggle-group/src/toggle-group.directive.d.ts +0 -84
  435. package/toggle-group/src/toggle-group.token.d.ts +0 -5
  436. /package/accordion/{index.d.ts → index.ts} +0 -0
  437. /package/avatar/{index.d.ts → index.ts} +0 -0
  438. /package/checkbox/{index.d.ts → index.ts} +0 -0
  439. /package/collapsible/{index.d.ts → index.ts} +0 -0
  440. /package/dropdown-menu/{index.d.ts → index.ts} +0 -0
  441. /package/{index.d.ts → index.ts} +0 -0
  442. /package/label/{index.d.ts → index.ts} +0 -0
  443. /package/separator/{index.d.ts → index.ts} +0 -0
  444. /package/toggle/{index.d.ts → index.ts} +0 -0
  445. /package/toggle-group/{index.d.ts → index.ts} +0 -0
@@ -1,502 +0,0 @@
1
- import { CdkMenuTrigger, MENU_TRIGGER, PARENT_OR_NEW_MENU_STACK_PROVIDER, CdkMenu, CdkMenuItem, CDK_MENU } from '@angular/cdk/menu';
2
- import * as i0 from '@angular/core';
3
- import { input, booleanAttribute, numberAttribute, Directive, Input, inject, ElementRef, EventEmitter, Output } from '@angular/core';
4
- import { Subject, startWith, pairwise } from 'rxjs';
5
- import { outputFromObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
- import { UniqueSelectionDispatcher } from '@angular/cdk/collections';
7
- import * as i1 from '@radix-ng/primitives/separator';
8
- import { RdxSeparatorRootDirective } from '@radix-ng/primitives/separator';
9
-
10
- var DropdownSide;
11
- (function (DropdownSide) {
12
- DropdownSide["Top"] = "top";
13
- DropdownSide["Right"] = "right";
14
- DropdownSide["Bottom"] = "bottom";
15
- DropdownSide["Left"] = "left";
16
- })(DropdownSide || (DropdownSide = {}));
17
- var DropdownAlign;
18
- (function (DropdownAlign) {
19
- DropdownAlign["Start"] = "start";
20
- DropdownAlign["Center"] = "center";
21
- DropdownAlign["End"] = "end";
22
- })(DropdownAlign || (DropdownAlign = {}));
23
- const mapRdxAlignToCdkPosition = {
24
- start: 'top',
25
- center: 'center',
26
- end: 'bottom'
27
- };
28
- const dropdownPositions = {
29
- top: {
30
- originX: 'start',
31
- originY: 'top',
32
- overlayX: 'start',
33
- overlayY: 'bottom',
34
- offsetX: 0,
35
- offsetY: 0
36
- },
37
- right: {
38
- originX: 'end',
39
- originY: 'top',
40
- overlayX: 'start',
41
- overlayY: 'top',
42
- offsetX: 0,
43
- offsetY: 0
44
- },
45
- bottom: {
46
- originX: 'start',
47
- originY: 'bottom',
48
- overlayX: 'start',
49
- overlayY: 'top',
50
- offsetX: 0,
51
- offsetY: 0
52
- },
53
- left: {
54
- originX: 'start',
55
- originY: 'top',
56
- overlayX: 'end',
57
- overlayY: 'top',
58
- offsetX: 0,
59
- offsetY: 0
60
- }
61
- };
62
- class RdxDropdownMenuTriggerDirective extends CdkMenuTrigger {
63
- set rdxDropdownMenuTrigger(value) {
64
- this.menuTemplateRef = value;
65
- }
66
- set side(value) {
67
- if (!Object.values(DropdownSide).includes(value)) {
68
- throw new Error(`Unknown side: ${value}`);
69
- }
70
- this._side = value;
71
- this.menuPosition[0] = dropdownPositions[value];
72
- }
73
- get side() {
74
- return this._side;
75
- }
76
- set align(value) {
77
- if (!Object.values(DropdownAlign).includes(value)) {
78
- throw new Error(`Unknown align: ${value}`);
79
- }
80
- this._align = value;
81
- if (this.isVertical) {
82
- this.defaultPosition.overlayX = this.defaultPosition.originX = value;
83
- }
84
- else {
85
- this.defaultPosition.overlayY = this.defaultPosition.originY = mapRdxAlignToCdkPosition[value];
86
- }
87
- }
88
- get align() {
89
- return this._align;
90
- }
91
- set sideOffset(value) {
92
- // todo need invert value for top and left
93
- if (this.isVertical) {
94
- this.defaultPosition.offsetY = value;
95
- }
96
- else {
97
- this.defaultPosition.offsetX = value;
98
- }
99
- }
100
- set alignOffset(value) {
101
- // todo need invert value for top and left
102
- if (this.isVertical) {
103
- this.defaultPosition.offsetX = value;
104
- }
105
- else {
106
- this.defaultPosition.offsetY = value;
107
- }
108
- }
109
- get isVertical() {
110
- return this._side === DropdownSide.Top || this._side === DropdownSide.Bottom;
111
- }
112
- get defaultPosition() {
113
- return this.menuPosition[0];
114
- }
115
- constructor() {
116
- super();
117
- this.disabled = input(false, {
118
- transform: booleanAttribute
119
- });
120
- this._side = DropdownSide.Bottom;
121
- this._align = DropdownAlign.Start;
122
- this.onOpenChange = outputFromObservable(this.opened);
123
- // todo priority
124
- this.menuPosition = [{ ...dropdownPositions[DropdownSide.Bottom] }];
125
- }
126
- onPointerDown($event) {
127
- // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)
128
- // but not when the control key is pressed (avoiding MacOS right click)
129
- if (!this.disabled() && $event.button === 0 && !$event.ctrlKey) {
130
- /* empty */
131
- if (!this.isOpen()) {
132
- // prevent trigger focusing when opening
133
- // this allows the content to be given focus without competition
134
- $event.preventDefault();
135
- }
136
- }
137
- }
138
- getOverlayRef() {
139
- return this.overlayRef;
140
- }
141
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxDropdownMenuTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
142
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.1", type: RdxDropdownMenuTriggerDirective, isStandalone: true, selector: "[rdxDropdownMenuTrigger]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, rdxDropdownMenuTrigger: { classPropertyName: "rdxDropdownMenuTrigger", publicName: "rdxDropdownMenuTrigger", isSignal: false, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: false, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: false, isRequired: false, transformFunction: null }, sideOffset: { classPropertyName: "sideOffset", publicName: "sideOffset", isSignal: false, isRequired: false, transformFunction: numberAttribute }, alignOffset: { classPropertyName: "alignOffset", publicName: "alignOffset", isSignal: false, isRequired: false, transformFunction: numberAttribute } }, outputs: { onOpenChange: "onOpenChange" }, host: { attributes: { "type": "button" }, listeners: { "pointerdown": "onPointerDown($event)" }, properties: { "attr.aria-haspopup": "'menu'", "attr.aria-expanded": "isOpen()", "attr.data-state": "isOpen() ? 'open': 'closed'", "attr.data-disabled": "disabled() ? '' : undefined", "disabled": "disabled()" } }, providers: [
143
- { provide: CdkMenuTrigger, useExisting: RdxDropdownMenuTriggerDirective },
144
- { provide: MENU_TRIGGER, useExisting: CdkMenuTrigger },
145
- PARENT_OR_NEW_MENU_STACK_PROVIDER
146
- ], usesInheritance: true, ngImport: i0 }); }
147
- }
148
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxDropdownMenuTriggerDirective, decorators: [{
149
- type: Directive,
150
- args: [{
151
- selector: '[rdxDropdownMenuTrigger]',
152
- standalone: true,
153
- host: {
154
- type: 'button',
155
- '[attr.aria-haspopup]': "'menu'",
156
- '[attr.aria-expanded]': 'isOpen()',
157
- '[attr.data-state]': "isOpen() ? 'open': 'closed'",
158
- '[attr.data-disabled]': "disabled() ? '' : undefined",
159
- '[disabled]': 'disabled()',
160
- '(pointerdown)': 'onPointerDown($event)'
161
- },
162
- providers: [
163
- { provide: CdkMenuTrigger, useExisting: RdxDropdownMenuTriggerDirective },
164
- { provide: MENU_TRIGGER, useExisting: CdkMenuTrigger },
165
- PARENT_OR_NEW_MENU_STACK_PROVIDER
166
- ]
167
- }]
168
- }], ctorParameters: () => [], propDecorators: { rdxDropdownMenuTrigger: [{
169
- type: Input
170
- }], side: [{
171
- type: Input
172
- }], align: [{
173
- type: Input
174
- }], sideOffset: [{
175
- type: Input,
176
- args: [{ transform: numberAttribute }]
177
- }], alignOffset: [{
178
- type: Input,
179
- args: [{ transform: numberAttribute }]
180
- }] } });
181
-
182
- class RdxDropdownMenuContentDirective extends CdkMenu {
183
- constructor() {
184
- super();
185
- this.highlighted = new Subject();
186
- this.menuTrigger = inject(RdxDropdownMenuTriggerDirective, { optional: true });
187
- this.onEscapeKeyDown = () => undefined;
188
- this.closeOnEscape = true;
189
- this.highlighted.pipe(startWith(null), pairwise()).subscribe(([prev, item]) => {
190
- if (prev) {
191
- prev.highlighted = false;
192
- }
193
- if (item) {
194
- item.highlighted = true;
195
- }
196
- });
197
- }
198
- updateActiveItem(item) {
199
- this.keyManager.updateActiveItem(item);
200
- }
201
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxDropdownMenuContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
202
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: RdxDropdownMenuContentDirective, isStandalone: true, selector: "[rdxDropdownMenuContent]", inputs: { onEscapeKeyDown: "onEscapeKeyDown", closeOnEscape: "closeOnEscape" }, host: { properties: { "attr.data-state": "menuTrigger.isOpen() ? 'open': 'closed'", "attr.data-align": "menuTrigger!.align", "attr.data-side": "menuTrigger!.side", "attr.data-orientation": "orientation" } }, providers: [
203
- {
204
- provide: CdkMenu,
205
- useExisting: RdxDropdownMenuContentDirective
206
- }
207
- ], usesInheritance: true, ngImport: i0 }); }
208
- }
209
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxDropdownMenuContentDirective, decorators: [{
210
- type: Directive,
211
- args: [{
212
- selector: '[rdxDropdownMenuContent]',
213
- standalone: true,
214
- host: {
215
- '[attr.data-state]': "menuTrigger.isOpen() ? 'open': 'closed'",
216
- '[attr.data-align]': 'menuTrigger!.align',
217
- '[attr.data-side]': 'menuTrigger!.side',
218
- '[attr.data-orientation]': 'orientation'
219
- },
220
- providers: [
221
- {
222
- provide: CdkMenu,
223
- useExisting: RdxDropdownMenuContentDirective
224
- }
225
- ]
226
- }]
227
- }], ctorParameters: () => [], propDecorators: { onEscapeKeyDown: [{
228
- type: Input
229
- }], closeOnEscape: [{
230
- type: Input
231
- }] } });
232
-
233
- class RdxDropdownMenuItemDirective extends CdkMenuItem {
234
- constructor() {
235
- super();
236
- this.menu = inject(RdxDropdownMenuContentDirective);
237
- this.nativeElement = inject(ElementRef).nativeElement;
238
- this.highlighted = false;
239
- this.disabled = false;
240
- this.onSelect = new EventEmitter();
241
- this.menu.highlighted.pipe(takeUntilDestroyed()).subscribe((value) => {
242
- if (value !== this) {
243
- this.highlighted = false;
244
- }
245
- });
246
- this.triggered.subscribe(this.onSelect);
247
- }
248
- onPointerMove() {
249
- this.nativeElement.focus({ preventScroll: true });
250
- this.menu.updateActiveItem(this);
251
- }
252
- onKeydown(event) {
253
- if (this.nativeElement.tagName !== 'BUTTON' && ['Enter', ' '].includes(event.key)) {
254
- event.preventDefault();
255
- }
256
- if (event.key === 'Escape') {
257
- if (!this.menu.closeOnEscape) {
258
- event.stopPropagation();
259
- }
260
- else {
261
- this.menu.onEscapeKeyDown(event);
262
- }
263
- }
264
- }
265
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxDropdownMenuItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
266
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.1", type: RdxDropdownMenuItemDirective, isStandalone: true, selector: "[rdxDropdownMenuItem]", inputs: { disabled: ["disabled", "disabled", booleanAttribute] }, outputs: { onSelect: "onSelect" }, host: { attributes: { "type": "button" }, listeners: { "pointermove": "onPointerMove()", "focus": "menu.highlighted.next(this)", "keydown": "onKeydown($event)" }, properties: { "attr.data-orientation": "\"vertical\"", "attr.data-highlighted": "highlighted ? \"\" : null", "attr.data-disabled": "disabled ? \"\" : null", "attr.disabled": "disabled ? \"\" : null" } }, providers: [
267
- { provide: CdkMenuItem, useExisting: RdxDropdownMenuItemDirective },
268
- { provide: CDK_MENU, useExisting: RdxDropdownMenuContentDirective }
269
- ], usesInheritance: true, ngImport: i0 }); }
270
- }
271
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxDropdownMenuItemDirective, decorators: [{
272
- type: Directive,
273
- args: [{
274
- selector: '[rdxDropdownMenuItem]',
275
- standalone: true,
276
- host: {
277
- type: 'button',
278
- // todo horizontal ?
279
- '[attr.data-orientation]': '"vertical"',
280
- '[attr.data-highlighted]': 'highlighted ? "" : null',
281
- '[attr.data-disabled]': 'disabled ? "" : null',
282
- '[attr.disabled]': 'disabled ? "" : null',
283
- '(pointermove)': 'onPointerMove()',
284
- '(focus)': 'menu.highlighted.next(this)',
285
- '(keydown)': 'onKeydown($event)'
286
- },
287
- providers: [
288
- { provide: CdkMenuItem, useExisting: RdxDropdownMenuItemDirective },
289
- { provide: CDK_MENU, useExisting: RdxDropdownMenuContentDirective }
290
- ]
291
- }]
292
- }], ctorParameters: () => [], propDecorators: { disabled: [{
293
- type: Input,
294
- args: [{ transform: booleanAttribute }]
295
- }], onSelect: [{
296
- type: Output
297
- }] } });
298
-
299
- /** Base class providing checked state for selectable DropdownMenuItems. */
300
- class RdxDropdownMenuSelectable extends RdxDropdownMenuItemDirective {
301
- constructor() {
302
- super(...arguments);
303
- /** Whether the element is checked */
304
- this.checked = false;
305
- this.checkedChange = new EventEmitter();
306
- }
307
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxDropdownMenuSelectable, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
308
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.1", type: RdxDropdownMenuSelectable, isStandalone: true, inputs: { checked: ["checked", "checked", booleanAttribute] }, outputs: { checkedChange: "checkedChange" }, host: { properties: { "attr.aria-checked": "!!checked", "attr.aria-disabled": "disabled || null", "attr.data-state": "checked ? \"checked\" : \"unchecked\"" } }, usesInheritance: true, ngImport: i0 }); }
309
- }
310
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxDropdownMenuSelectable, decorators: [{
311
- type: Directive,
312
- args: [{
313
- standalone: true,
314
- host: {
315
- '[attr.aria-checked]': '!!checked',
316
- '[attr.aria-disabled]': 'disabled || null',
317
- '[attr.data-state]': 'checked ? "checked" : "unchecked"'
318
- }
319
- }]
320
- }], propDecorators: { checked: [{
321
- type: Input,
322
- args: [{ transform: booleanAttribute }]
323
- }], checkedChange: [{
324
- type: Output
325
- }] } });
326
-
327
- class RdxDropdownMenuItemCheckboxDirective extends RdxDropdownMenuSelectable {
328
- trigger(options) {
329
- if (!this.disabled) {
330
- this.checked = !this.checked;
331
- this.checkedChange.emit(this.checked);
332
- }
333
- super.trigger(options);
334
- }
335
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxDropdownMenuItemCheckboxDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
336
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: RdxDropdownMenuItemCheckboxDirective, isStandalone: true, selector: "[rdxDropdownMenuItemCheckbox]", host: { attributes: { "role": "menuitemcheckbox" } }, providers: [
337
- { provide: RdxDropdownMenuSelectable, useExisting: RdxDropdownMenuItemCheckboxDirective },
338
- { provide: RdxDropdownMenuItemDirective, useExisting: RdxDropdownMenuSelectable },
339
- { provide: CdkMenuItem, useExisting: RdxDropdownMenuItemDirective }
340
- ], usesInheritance: true, ngImport: i0 }); }
341
- }
342
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxDropdownMenuItemCheckboxDirective, decorators: [{
343
- type: Directive,
344
- args: [{
345
- selector: '[rdxDropdownMenuItemCheckbox]',
346
- standalone: true,
347
- host: {
348
- role: 'menuitemcheckbox'
349
- },
350
- providers: [
351
- { provide: RdxDropdownMenuSelectable, useExisting: RdxDropdownMenuItemCheckboxDirective },
352
- { provide: RdxDropdownMenuItemDirective, useExisting: RdxDropdownMenuSelectable },
353
- { provide: CdkMenuItem, useExisting: RdxDropdownMenuItemDirective }
354
- ]
355
- }]
356
- }] });
357
-
358
- class RdxDropdownMenuItemIndicatorDirective {
359
- constructor() {
360
- this.item = inject(RdxDropdownMenuSelectable);
361
- }
362
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxDropdownMenuItemIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
363
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: RdxDropdownMenuItemIndicatorDirective, isStandalone: true, selector: "[rdxDropdownMenuItemIndicator]", host: { properties: { "style.display": "item.checked ? 'block' : 'none'", "attr.data-state": "item.checked ? 'checked' : 'unchecked'" } }, ngImport: i0 }); }
364
- }
365
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxDropdownMenuItemIndicatorDirective, decorators: [{
366
- type: Directive,
367
- args: [{
368
- selector: '[rdxDropdownMenuItemIndicator]',
369
- standalone: true,
370
- host: {
371
- '[style.display]': "item.checked ? 'block' : 'none'",
372
- '[attr.data-state]': "item.checked ? 'checked' : 'unchecked'"
373
- }
374
- }]
375
- }] });
376
-
377
- class RdxDropdownMenuItemRadioGroupDirective {
378
- constructor() {
379
- this.selectionDispatcher = inject(UniqueSelectionDispatcher);
380
- this._value = null;
381
- this.valueChange = new EventEmitter();
382
- }
383
- set value(id) {
384
- this._value = id;
385
- }
386
- get value() {
387
- return this._value;
388
- }
389
- ngAfterContentInit() {
390
- this.selectionDispatcher.notify(this.value, '');
391
- }
392
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxDropdownMenuItemRadioGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
393
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: RdxDropdownMenuItemRadioGroupDirective, isStandalone: true, selector: "[rdxDropdownMenuItemRadioGroup]", inputs: { value: "value" }, outputs: { valueChange: "valueChange" }, host: { attributes: { "role": "group" } }, providers: [{ provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }], ngImport: i0 }); }
394
- }
395
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxDropdownMenuItemRadioGroupDirective, decorators: [{
396
- type: Directive,
397
- args: [{
398
- selector: '[rdxDropdownMenuItemRadioGroup]',
399
- standalone: true,
400
- host: {
401
- role: 'group'
402
- },
403
- providers: [{ provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }]
404
- }]
405
- }], propDecorators: { value: [{
406
- type: Input
407
- }], valueChange: [{
408
- type: Output
409
- }] } });
410
-
411
- /** Counter used to set a unique id and name for a selectable item */
412
- let nextId = 0;
413
- class RdxDropdownMenuItemRadioDirective extends RdxDropdownMenuSelectable {
414
- get value() {
415
- return this._value || this.id;
416
- }
417
- set value(value) {
418
- this._value = value;
419
- }
420
- constructor() {
421
- super();
422
- /** The unique selection dispatcher for this radio's `RdxDropdownMenuItemRadioGroupDirective`. */
423
- this.selectionDispatcher = inject(UniqueSelectionDispatcher);
424
- this.group = inject(RdxDropdownMenuItemRadioGroupDirective);
425
- /** An ID to identify this radio item to the `UniqueSelectionDispatcher`. */
426
- this.id = `${nextId++}`;
427
- this.triggered.subscribe(() => {
428
- if (!this.disabled) {
429
- this.selectionDispatcher.notify(this.value, '');
430
- this.group.valueChange.emit(this.value);
431
- }
432
- });
433
- }
434
- ngAfterContentInit() {
435
- this.removeDispatcherListener = this.selectionDispatcher.listen((id) => {
436
- this.checked = this.value === id;
437
- });
438
- }
439
- ngOnDestroy() {
440
- super.ngOnDestroy();
441
- this.removeDispatcherListener();
442
- }
443
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxDropdownMenuItemRadioDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
444
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: RdxDropdownMenuItemRadioDirective, isStandalone: true, selector: "[rdxDropdownMenuItemRadio]", inputs: { value: "value" }, host: { attributes: { "role": "menuitemradio" } }, providers: [
445
- { provide: RdxDropdownMenuSelectable, useExisting: RdxDropdownMenuItemRadioDirective },
446
- { provide: RdxDropdownMenuItemDirective, useExisting: RdxDropdownMenuSelectable },
447
- { provide: CdkMenuItem, useExisting: RdxDropdownMenuItemDirective }
448
- ], usesInheritance: true, ngImport: i0 }); }
449
- }
450
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxDropdownMenuItemRadioDirective, decorators: [{
451
- type: Directive,
452
- args: [{
453
- selector: '[rdxDropdownMenuItemRadio]',
454
- standalone: true,
455
- host: {
456
- role: 'menuitemradio'
457
- },
458
- providers: [
459
- { provide: RdxDropdownMenuSelectable, useExisting: RdxDropdownMenuItemRadioDirective },
460
- { provide: RdxDropdownMenuItemDirective, useExisting: RdxDropdownMenuSelectable },
461
- { provide: CdkMenuItem, useExisting: RdxDropdownMenuItemDirective }
462
- ]
463
- }]
464
- }], ctorParameters: () => [], propDecorators: { value: [{
465
- type: Input
466
- }] } });
467
-
468
- class RdxDropdownMenuLabelDirective {
469
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxDropdownMenuLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
470
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: RdxDropdownMenuLabelDirective, isStandalone: true, selector: "[rdxDropdownMenuLabel]", ngImport: i0 }); }
471
- }
472
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxDropdownMenuLabelDirective, decorators: [{
473
- type: Directive,
474
- args: [{
475
- selector: '[rdxDropdownMenuLabel]',
476
- standalone: true
477
- }]
478
- }] });
479
-
480
- class RdxDropdownMenuSeparatorDirective {
481
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxDropdownMenuSeparatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
482
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: RdxDropdownMenuSeparatorDirective, isStandalone: true, selector: "[rdxDropdownMenuSeparator]", host: { attributes: { "role": "separator" }, properties: { "attr.aria-orientation": "'horizontal'" } }, hostDirectives: [{ directive: i1.RdxSeparatorRootDirective }], ngImport: i0 }); }
483
- }
484
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxDropdownMenuSeparatorDirective, decorators: [{
485
- type: Directive,
486
- args: [{
487
- selector: '[rdxDropdownMenuSeparator]',
488
- standalone: true,
489
- hostDirectives: [RdxSeparatorRootDirective],
490
- host: {
491
- role: 'separator',
492
- '[attr.aria-orientation]': "'horizontal'"
493
- }
494
- }]
495
- }] });
496
-
497
- /**
498
- * Generated bundle index. Do not edit.
499
- */
500
-
501
- export { DropdownAlign, DropdownSide, RdxDropdownMenuContentDirective, RdxDropdownMenuItemCheckboxDirective, RdxDropdownMenuItemDirective, RdxDropdownMenuItemIndicatorDirective, RdxDropdownMenuItemRadioDirective, RdxDropdownMenuItemRadioGroupDirective, RdxDropdownMenuLabelDirective, RdxDropdownMenuSelectable, RdxDropdownMenuSeparatorDirective, RdxDropdownMenuTriggerDirective, mapRdxAlignToCdkPosition };
502
- //# sourceMappingURL=radix-ng-primitives-dropdown-menu.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"radix-ng-primitives-dropdown-menu.mjs","sources":["../../../packages/primitives/dropdown-menu/src/dropdown-menu-trigger.directive.ts","../../../packages/primitives/dropdown-menu/src/dropdown-menu-content.directive.ts","../../../packages/primitives/dropdown-menu/src/dropdown-menu-item.directive.ts","../../../packages/primitives/dropdown-menu/src/dropdown-menu-item-selectable.ts","../../../packages/primitives/dropdown-menu/src/dropdown-menu-item-checkbox.directive.ts","../../../packages/primitives/dropdown-menu/src/dropdown-menu-item-indicator.directive.ts","../../../packages/primitives/dropdown-menu/src/dropdown-menu-item-radio-group.directive.ts","../../../packages/primitives/dropdown-menu/src/dropdown-menu-item-radio.directive.ts","../../../packages/primitives/dropdown-menu/src/dropdown-menu-label.directive.ts","../../../packages/primitives/dropdown-menu/src/dropdown-menu-separator.directive.ts","../../../packages/primitives/dropdown-menu/radix-ng-primitives-dropdown-menu.ts"],"sourcesContent":["import { BooleanInput } from '@angular/cdk/coercion';\nimport { CdkMenuTrigger, MENU_TRIGGER, PARENT_OR_NEW_MENU_STACK_PROVIDER } from '@angular/cdk/menu';\nimport { ConnectedPosition, OverlayRef, VerticalConnectionPos } from '@angular/cdk/overlay';\nimport { booleanAttribute, Directive, Input, input, numberAttribute, TemplateRef } from '@angular/core';\nimport { outputFromObservable } from '@angular/core/rxjs-interop';\n\nexport enum DropdownSide {\n Top = 'top',\n Right = 'right',\n Bottom = 'bottom',\n Left = 'left'\n}\n\nexport enum DropdownAlign {\n Start = 'start',\n Center = 'center',\n End = 'end'\n}\n\nexport const mapRdxAlignToCdkPosition = {\n start: 'top',\n center: 'center',\n end: 'bottom'\n};\n\nconst dropdownPositions: Record<DropdownSide, ConnectedPosition> = {\n top: {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n offsetX: 0,\n offsetY: 0\n },\n right: {\n originX: 'end',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: 0,\n offsetY: 0\n },\n bottom: {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: 0,\n offsetY: 0\n },\n left: {\n originX: 'start',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'top',\n offsetX: 0,\n offsetY: 0\n }\n};\n\n@Directive({\n selector: '[rdxDropdownMenuTrigger]',\n standalone: true,\n host: {\n type: 'button',\n '[attr.aria-haspopup]': \"'menu'\",\n '[attr.aria-expanded]': 'isOpen()',\n '[attr.data-state]': \"isOpen() ? 'open': 'closed'\",\n '[attr.data-disabled]': \"disabled() ? '' : undefined\",\n '[disabled]': 'disabled()',\n\n '(pointerdown)': 'onPointerDown($event)'\n },\n providers: [\n { provide: CdkMenuTrigger, useExisting: RdxDropdownMenuTriggerDirective },\n { provide: MENU_TRIGGER, useExisting: CdkMenuTrigger },\n PARENT_OR_NEW_MENU_STACK_PROVIDER\n ]\n})\nexport class RdxDropdownMenuTriggerDirective extends CdkMenuTrigger {\n readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute\n });\n\n @Input()\n set rdxDropdownMenuTrigger(value: TemplateRef<unknown> | null) {\n this.menuTemplateRef = value;\n }\n\n @Input()\n set side(value: DropdownSide) {\n if (!Object.values(DropdownSide).includes(value)) {\n throw new Error(`Unknown side: ${value}`);\n }\n\n this._side = value;\n\n this.menuPosition[0] = dropdownPositions[value];\n }\n\n get side() {\n return this._side;\n }\n\n private _side: DropdownSide = DropdownSide.Bottom;\n\n @Input()\n set align(value: DropdownAlign) {\n if (!Object.values(DropdownAlign).includes(value)) {\n throw new Error(`Unknown align: ${value}`);\n }\n\n this._align = value;\n\n if (this.isVertical) {\n this.defaultPosition.overlayX = this.defaultPosition.originX = value;\n } else {\n this.defaultPosition.overlayY = this.defaultPosition.originY = mapRdxAlignToCdkPosition[\n value\n ] as VerticalConnectionPos;\n }\n }\n\n get align() {\n return this._align;\n }\n\n private _align: DropdownAlign = DropdownAlign.Start;\n\n @Input({ transform: numberAttribute })\n set sideOffset(value: number) {\n // todo need invert value for top and left\n if (this.isVertical) {\n this.defaultPosition.offsetY = value;\n } else {\n this.defaultPosition.offsetX = value;\n }\n }\n\n @Input({ transform: numberAttribute })\n set alignOffset(value: number) {\n // todo need invert value for top and left\n if (this.isVertical) {\n this.defaultPosition.offsetX = value;\n } else {\n this.defaultPosition.offsetY = value;\n }\n }\n\n onOpenChange = outputFromObservable(this.opened);\n\n get isVertical(): boolean {\n return this._side === DropdownSide.Top || this._side === DropdownSide.Bottom;\n }\n\n get defaultPosition(): ConnectedPosition {\n return this.menuPosition[0];\n }\n\n constructor() {\n super();\n // todo priority\n this.menuPosition = [{ ...dropdownPositions[DropdownSide.Bottom] }];\n }\n\n onPointerDown($event: MouseEvent) {\n // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n // but not when the control key is pressed (avoiding MacOS right click)\n if (!this.disabled() && $event.button === 0 && !$event.ctrlKey) {\n /* empty */\n if (!this.isOpen()) {\n // prevent trigger focusing when opening\n // this allows the content to be given focus without competition\n $event.preventDefault();\n }\n }\n }\n\n getOverlayRef(): OverlayRef | null {\n return this.overlayRef;\n }\n}\n","import { CdkMenu, CdkMenuItem } from '@angular/cdk/menu';\nimport { Directive, inject, Input } from '@angular/core';\nimport { pairwise, startWith, Subject } from 'rxjs';\nimport { RdxDropdownMenuItemDirective } from './dropdown-menu-item.directive';\nimport { RdxDropdownMenuTriggerDirective } from './dropdown-menu-trigger.directive';\n\n@Directive({\n selector: '[rdxDropdownMenuContent]',\n standalone: true,\n host: {\n '[attr.data-state]': \"menuTrigger.isOpen() ? 'open': 'closed'\",\n '[attr.data-align]': 'menuTrigger!.align',\n '[attr.data-side]': 'menuTrigger!.side',\n '[attr.data-orientation]': 'orientation'\n },\n providers: [\n {\n provide: CdkMenu,\n useExisting: RdxDropdownMenuContentDirective\n }\n ]\n})\nexport class RdxDropdownMenuContentDirective extends CdkMenu {\n readonly highlighted = new Subject<RdxDropdownMenuItemDirective>();\n readonly menuTrigger = inject(RdxDropdownMenuTriggerDirective, { optional: true });\n\n @Input() onEscapeKeyDown: (event?: Event) => void = () => undefined;\n @Input() closeOnEscape: boolean = true;\n\n constructor() {\n super();\n\n this.highlighted.pipe(startWith(null), pairwise()).subscribe(([prev, item]) => {\n if (prev) {\n prev.highlighted = false;\n }\n\n if (item) {\n item.highlighted = true;\n }\n });\n }\n\n updateActiveItem(item: CdkMenuItem) {\n this.keyManager.updateActiveItem(item);\n }\n}\n","import { CDK_MENU, CdkMenuItem } from '@angular/cdk/menu';\nimport { booleanAttribute, Directive, ElementRef, EventEmitter, inject, Input, Output } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { RdxDropdownMenuContentDirective } from './dropdown-menu-content.directive';\n\n@Directive({\n selector: '[rdxDropdownMenuItem]',\n standalone: true,\n host: {\n type: 'button',\n // todo horizontal ?\n '[attr.data-orientation]': '\"vertical\"',\n '[attr.data-highlighted]': 'highlighted ? \"\" : null',\n '[attr.data-disabled]': 'disabled ? \"\" : null',\n '[attr.disabled]': 'disabled ? \"\" : null',\n '(pointermove)': 'onPointerMove()',\n '(focus)': 'menu.highlighted.next(this)',\n '(keydown)': 'onKeydown($event)'\n },\n providers: [\n { provide: CdkMenuItem, useExisting: RdxDropdownMenuItemDirective },\n { provide: CDK_MENU, useExisting: RdxDropdownMenuContentDirective }\n ]\n})\nexport class RdxDropdownMenuItemDirective extends CdkMenuItem {\n protected readonly menu = inject(RdxDropdownMenuContentDirective);\n protected readonly nativeElement = inject(ElementRef).nativeElement;\n\n highlighted = false;\n\n @Input({ transform: booleanAttribute }) override disabled: boolean = false;\n\n @Output() readonly onSelect = new EventEmitter<void>();\n\n constructor() {\n super();\n\n this.menu.highlighted.pipe(takeUntilDestroyed()).subscribe((value) => {\n if (value !== this) {\n this.highlighted = false;\n }\n });\n\n this.triggered.subscribe(this.onSelect);\n }\n\n protected onPointerMove() {\n this.nativeElement.focus({ preventScroll: true });\n this.menu.updateActiveItem(this);\n }\n\n protected onKeydown(event: KeyboardEvent) {\n if (this.nativeElement.tagName !== 'BUTTON' && ['Enter', ' '].includes(event.key)) {\n event.preventDefault();\n }\n\n if (event.key === 'Escape') {\n if (!this.menu.closeOnEscape) {\n event.stopPropagation();\n } else {\n this.menu.onEscapeKeyDown(event);\n }\n }\n }\n}\n","import { booleanAttribute, Directive, EventEmitter, Input, Output } from '@angular/core';\nimport { RdxDropdownMenuItemDirective } from './dropdown-menu-item.directive';\n\n/** Base class providing checked state for selectable DropdownMenuItems. */\n@Directive({\n standalone: true,\n host: {\n '[attr.aria-checked]': '!!checked',\n '[attr.aria-disabled]': 'disabled || null',\n '[attr.data-state]': 'checked ? \"checked\" : \"unchecked\"'\n }\n})\nexport class RdxDropdownMenuSelectable extends RdxDropdownMenuItemDirective {\n /** Whether the element is checked */\n @Input({ transform: booleanAttribute }) checked: boolean = false;\n\n @Output() readonly checkedChange = new EventEmitter<boolean>();\n}\n","import { CdkMenuItem } from '@angular/cdk/menu';\nimport { Directive } from '@angular/core';\nimport { RdxDropdownMenuSelectable } from './dropdown-menu-item-selectable';\nimport { RdxDropdownMenuItemDirective } from './dropdown-menu-item.directive';\n\n@Directive({\n selector: '[rdxDropdownMenuItemCheckbox]',\n standalone: true,\n host: {\n role: 'menuitemcheckbox'\n },\n providers: [\n { provide: RdxDropdownMenuSelectable, useExisting: RdxDropdownMenuItemCheckboxDirective },\n { provide: RdxDropdownMenuItemDirective, useExisting: RdxDropdownMenuSelectable },\n { provide: CdkMenuItem, useExisting: RdxDropdownMenuItemDirective }\n ]\n})\nexport class RdxDropdownMenuItemCheckboxDirective extends RdxDropdownMenuSelectable {\n override trigger(options?: { keepOpen: boolean }) {\n if (!this.disabled) {\n this.checked = !this.checked;\n\n this.checkedChange.emit(this.checked);\n }\n\n super.trigger(options);\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { RdxDropdownMenuSelectable } from './dropdown-menu-item-selectable';\n\n@Directive({\n selector: '[rdxDropdownMenuItemIndicator]',\n standalone: true,\n host: {\n '[style.display]': \"item.checked ? 'block' : 'none'\",\n '[attr.data-state]': \"item.checked ? 'checked' : 'unchecked'\"\n }\n})\nexport class RdxDropdownMenuItemIndicatorDirective {\n item = inject(RdxDropdownMenuSelectable);\n}\n","import { UniqueSelectionDispatcher } from '@angular/cdk/collections';\nimport { AfterContentInit, Directive, EventEmitter, inject, Input, Output } from '@angular/core';\n\n@Directive({\n selector: '[rdxDropdownMenuItemRadioGroup]',\n standalone: true,\n host: {\n role: 'group'\n },\n providers: [{ provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }]\n})\nexport class RdxDropdownMenuItemRadioGroupDirective<T> implements AfterContentInit {\n private readonly selectionDispatcher = inject(UniqueSelectionDispatcher);\n\n @Input()\n set value(id: T | null) {\n this._value = id;\n }\n\n get value(): T | null {\n return this._value;\n }\n\n private _value: T | null = null;\n\n @Output() readonly valueChange = new EventEmitter();\n\n ngAfterContentInit(): void {\n this.selectionDispatcher.notify(this.value as string, '');\n }\n}\n","import { UniqueSelectionDispatcher } from '@angular/cdk/collections';\nimport { CdkMenuItem } from '@angular/cdk/menu';\nimport { AfterContentInit, Directive, inject, Input, OnDestroy } from '@angular/core';\nimport { RdxDropdownMenuItemRadioGroupDirective } from './dropdown-menu-item-radio-group.directive';\nimport { RdxDropdownMenuSelectable } from './dropdown-menu-item-selectable';\nimport { RdxDropdownMenuItemDirective } from './dropdown-menu-item.directive';\n\n/** Counter used to set a unique id and name for a selectable item */\nlet nextId = 0;\n\n@Directive({\n selector: '[rdxDropdownMenuItemRadio]',\n standalone: true,\n host: {\n role: 'menuitemradio'\n },\n providers: [\n { provide: RdxDropdownMenuSelectable, useExisting: RdxDropdownMenuItemRadioDirective },\n { provide: RdxDropdownMenuItemDirective, useExisting: RdxDropdownMenuSelectable },\n { provide: CdkMenuItem, useExisting: RdxDropdownMenuItemDirective }\n ]\n})\nexport class RdxDropdownMenuItemRadioDirective\n extends RdxDropdownMenuSelectable\n implements AfterContentInit, OnDestroy\n{\n /** The unique selection dispatcher for this radio's `RdxDropdownMenuItemRadioGroupDirective`. */\n private readonly selectionDispatcher = inject(UniqueSelectionDispatcher);\n\n private readonly group = inject(RdxDropdownMenuItemRadioGroupDirective);\n\n @Input()\n get value() {\n return this._value || this.id;\n }\n\n set value(value: string) {\n this._value = value;\n }\n\n private _value: string | undefined;\n\n /** An ID to identify this radio item to the `UniqueSelectionDispatcher`. */\n private id = `${nextId++}`;\n\n private removeDispatcherListener!: () => void;\n\n constructor() {\n super();\n\n this.triggered.subscribe(() => {\n if (!this.disabled) {\n this.selectionDispatcher.notify(this.value, '');\n\n this.group.valueChange.emit(this.value);\n }\n });\n }\n\n ngAfterContentInit() {\n this.removeDispatcherListener = this.selectionDispatcher.listen((id: string) => {\n this.checked = this.value === id;\n });\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n this.removeDispatcherListener();\n }\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[rdxDropdownMenuLabel]',\n standalone: true\n})\nexport class RdxDropdownMenuLabelDirective {}\n","import { Directive } from '@angular/core';\nimport { RdxSeparatorRootDirective } from '@radix-ng/primitives/separator';\n\n@Directive({\n selector: '[rdxDropdownMenuSeparator]',\n standalone: true,\n hostDirectives: [RdxSeparatorRootDirective],\n host: {\n role: 'separator',\n '[attr.aria-orientation]': \"'horizontal'\"\n }\n})\nexport class RdxDropdownMenuSeparatorDirective {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;IAMY,aAKX;AALD,CAAA,UAAY,YAAY,EAAA;AACpB,IAAA,YAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACX,IAAA,YAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACf,IAAA,YAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,YAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACjB,CAAC,EALW,YAAY,KAAZ,YAAY,GAKvB,EAAA,CAAA,CAAA,CAAA;IAEW,cAIX;AAJD,CAAA,UAAY,aAAa,EAAA;AACrB,IAAA,aAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CA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AAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAAjC,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBAT7C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,4BAA4B;AACtC,oBAAA,UAAU,EAAE,IAAI;oBAChB,cAAc,EAAE,CAAC,yBAAyB,CAAC;AAC3C,oBAAA,IAAI,EAAE;AACF,wBAAA,IAAI,EAAE,WAAW;AACjB,wBAAA,yBAAyB,EAAE,cAAc;AAC5C,qBAAA;AACJ,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
@@ -1,66 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { input, computed, inject, ElementRef, Directive } from '@angular/core';
3
-
4
- let idIterator = 0;
5
- class RdxLabelDirective {
6
- constructor() {
7
- /**
8
- * @type string
9
- * @default 'rdx-label-{idIterator}'
10
- */
11
- this.id = input(`rdx-label-${idIterator++}`);
12
- /**
13
- * @ignore
14
- */
15
- this.elementId = computed(() => (this.id() ? this.id() : null));
16
- /**
17
- * The id of the element the label is associated with.
18
- * @type string
19
- * @default false
20
- */
21
- this.htmlFor = input('');
22
- /**
23
- * @ignore
24
- */
25
- this.elementRef = inject((ElementRef));
26
- }
27
- // prevent text selection when double-clicking label
28
- // The main problem with double-clicks in a web app is that
29
- // you will have to create special code to handle this on touch enabled devices.
30
- /**
31
- * @ignore
32
- */
33
- onMouseDown(event) {
34
- const target = event.target;
35
- // only prevent text selection if clicking inside the label itself
36
- if (['BUTTON', 'INPUT', 'SELECT', 'TEXTAREA'].includes(target.tagName)) {
37
- return;
38
- }
39
- // prevent text selection when double-clicking label
40
- if (this.elementRef.nativeElement.contains(target) && !event.defaultPrevented && event.detail > 1) {
41
- event.preventDefault();
42
- }
43
- }
44
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
45
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.1", type: RdxLabelDirective, isStandalone: true, selector: "label[rdxLabel]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, htmlFor: { classPropertyName: "htmlFor", publicName: "htmlFor", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mousedown": "onMouseDown($event)" }, properties: { "attr.id": "this.elementId()", "attr.for": "htmlFor ? htmlFor() : null" } }, exportAs: ["rdxLabel"], ngImport: i0 }); }
46
- }
47
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxLabelDirective, decorators: [{
48
- type: Directive,
49
- args: [{
50
- selector: 'label[rdxLabel]',
51
- exportAs: 'rdxLabel',
52
- standalone: true,
53
- host: {
54
- '[attr.id]': 'this.elementId()',
55
- '[attr.for]': 'htmlFor ? htmlFor() : null',
56
- '(mousedown)': 'onMouseDown($event)'
57
- }
58
- }]
59
- }] });
60
-
61
- /**
62
- * Generated bundle index. Do not edit.
63
- */
64
-
65
- export { RdxLabelDirective };
66
- //# sourceMappingURL=radix-ng-primitives-label.mjs.map