ng-primitives 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. package/a11y/index.d.ts +1 -1
  2. package/a11y/visually-hidden/visually-hidden.token.d.ts +1 -1
  3. package/accordion/accordion/accordion.directive.d.ts +2 -2
  4. package/accordion/accordion/accordion.token.d.ts +1 -1
  5. package/accordion/accordion-content/accordion-content.token.d.ts +1 -1
  6. package/accordion/accordion-item/accordion-item.directive.d.ts +1 -1
  7. package/accordion/accordion-item/accordion-item.token.d.ts +1 -1
  8. package/accordion/accordion-trigger/accordion-trigger.token.d.ts +1 -1
  9. package/accordion/config/accordion.config.d.ts +1 -1
  10. package/accordion/index.d.ts +1 -1
  11. package/autofill/autofill/autofill.token.d.ts +1 -1
  12. package/autofill/index.d.ts +1 -1
  13. package/avatar/avatar/avatar.token.d.ts +1 -1
  14. package/avatar/avatar-fallback/avatar-fallback.directive.d.ts +1 -1
  15. package/avatar/avatar-image/avatar-image.directive.d.ts +1 -1
  16. package/avatar/config/avatar.config.d.ts +1 -1
  17. package/avatar/index.d.ts +1 -1
  18. package/button/button/button.directive.d.ts +1 -1
  19. package/button/button/button.token.d.ts +1 -1
  20. package/button/index.d.ts +1 -1
  21. package/checkbox/checkbox/checkbox.directive.d.ts +1 -1
  22. package/checkbox/checkbox/checkbox.token.d.ts +1 -1
  23. package/checkbox/index.d.ts +1 -1
  24. package/esm2022/a11y/index.mjs +2 -2
  25. package/esm2022/a11y/visually-hidden/visually-hidden.directive.mjs +2 -2
  26. package/esm2022/a11y/visually-hidden/visually-hidden.token.mjs +2 -2
  27. package/esm2022/accordion/accordion/accordion.directive.mjs +1 -1
  28. package/esm2022/accordion/accordion/accordion.token.mjs +2 -2
  29. package/esm2022/accordion/accordion-content/accordion-content.directive.mjs +2 -2
  30. package/esm2022/accordion/accordion-content/accordion-content.token.mjs +2 -2
  31. package/esm2022/accordion/accordion-item/accordion-item.directive.mjs +1 -1
  32. package/esm2022/accordion/accordion-item/accordion-item.token.mjs +2 -2
  33. package/esm2022/accordion/accordion-trigger/accordion-trigger.directive.mjs +2 -2
  34. package/esm2022/accordion/accordion-trigger/accordion-trigger.token.mjs +2 -2
  35. package/esm2022/accordion/config/accordion.config.mjs +2 -2
  36. package/esm2022/accordion/index.mjs +2 -2
  37. package/esm2022/autofill/autofill/autofill.directive.mjs +2 -2
  38. package/esm2022/autofill/autofill/autofill.token.mjs +2 -2
  39. package/esm2022/autofill/index.mjs +2 -2
  40. package/esm2022/avatar/avatar/avatar.directive.mjs +2 -2
  41. package/esm2022/avatar/avatar/avatar.token.mjs +2 -2
  42. package/esm2022/avatar/avatar-fallback/avatar-fallback.directive.mjs +1 -1
  43. package/esm2022/avatar/avatar-image/avatar-image.directive.mjs +2 -2
  44. package/esm2022/avatar/config/avatar.config.mjs +2 -2
  45. package/esm2022/avatar/index.mjs +2 -2
  46. package/esm2022/button/button/button.directive.mjs +1 -1
  47. package/esm2022/button/button/button.token.mjs +2 -2
  48. package/esm2022/button/index.mjs +2 -2
  49. package/esm2022/checkbox/checkbox/checkbox.directive.mjs +1 -1
  50. package/esm2022/checkbox/checkbox/checkbox.token.mjs +2 -2
  51. package/esm2022/checkbox/index.mjs +2 -2
  52. package/esm2022/file-upload/file-upload/file-upload.directive.mjs +2 -2
  53. package/esm2022/file-upload/file-upload/file-upload.token.mjs +2 -2
  54. package/esm2022/file-upload/index.mjs +2 -2
  55. package/esm2022/focus-trap/focus-trap/focus-trap.directive.mjs +2 -2
  56. package/esm2022/focus-trap/focus-trap/focus-trap.token.mjs +2 -2
  57. package/esm2022/focus-trap/index.mjs +2 -2
  58. package/esm2022/form-field/description/description.directive.mjs +2 -2
  59. package/esm2022/form-field/description/description.token.mjs +2 -2
  60. package/esm2022/form-field/error/error.directive.mjs +2 -2
  61. package/esm2022/form-field/error/error.token.mjs +2 -2
  62. package/esm2022/form-field/form-control/form-control.directive.mjs +2 -2
  63. package/esm2022/form-field/form-control/form-control.token.mjs +2 -2
  64. package/esm2022/form-field/form-field/form-field.directive.mjs +2 -2
  65. package/esm2022/form-field/form-field/form-field.token.mjs +2 -2
  66. package/esm2022/form-field/index.mjs +2 -2
  67. package/esm2022/form-field/label/label.directive.mjs +2 -2
  68. package/esm2022/form-field/label/label.token.mjs +2 -2
  69. package/esm2022/index.mjs +2 -2
  70. package/esm2022/input/index.mjs +2 -2
  71. package/esm2022/input/input/input.directive.mjs +1 -1
  72. package/esm2022/input/input/input.token.mjs +2 -2
  73. package/esm2022/interactions/focus/focus.directive.mjs +1 -1
  74. package/esm2022/interactions/focus/focus.token.mjs +2 -2
  75. package/esm2022/interactions/focus-visible/focus-visible.directive.mjs +2 -2
  76. package/esm2022/interactions/focus-visible/focus-visible.token.mjs +2 -2
  77. package/esm2022/interactions/hover/hover.directive.mjs +1 -1
  78. package/esm2022/interactions/hover/hover.token.mjs +2 -2
  79. package/esm2022/interactions/index.mjs +2 -2
  80. package/esm2022/interactions/move/move.directive.mjs +1 -1
  81. package/esm2022/interactions/move/move.token.mjs +2 -2
  82. package/esm2022/interactions/press/press.directive.mjs +1 -1
  83. package/esm2022/interactions/press/press.token.mjs +2 -2
  84. package/esm2022/internal/disabled/disabled.mjs +2 -2
  85. package/esm2022/internal/index.mjs +2 -2
  86. package/esm2022/internal/orientation/orientation.mjs +2 -2
  87. package/esm2022/internal/style-injector/style-injector.mjs +2 -2
  88. package/esm2022/progress/index.mjs +2 -2
  89. package/esm2022/progress/progress/progress.directive.mjs +1 -1
  90. package/esm2022/progress/progress/progress.token.mjs +2 -2
  91. package/esm2022/progress/progress-indicator/progress-indicator.directive.mjs +2 -2
  92. package/esm2022/radio/index.mjs +2 -2
  93. package/esm2022/radio/radio-group/radio-group.directive.mjs +1 -1
  94. package/esm2022/radio/radio-group/radio-group.token.mjs +2 -2
  95. package/esm2022/radio/radio-indicator/radio-indicator.directive.mjs +2 -2
  96. package/esm2022/radio/radio-item/radio-item.directive.mjs +1 -1
  97. package/esm2022/radio/radio-item/radio-item.token.mjs +2 -2
  98. package/esm2022/resize/index.mjs +2 -2
  99. package/esm2022/resize/resize/resize.directive.mjs +2 -2
  100. package/esm2022/resize/utils/resize.mjs +2 -2
  101. package/esm2022/roving-focus/index.mjs +2 -2
  102. package/esm2022/roving-focus/roving-focus-group/roving-focus-group.directive.mjs +1 -1
  103. package/esm2022/roving-focus/roving-focus-group/roving-focus-group.token.mjs +2 -2
  104. package/esm2022/roving-focus/roving-focus-item/roving-focus-item.directive.mjs +2 -2
  105. package/esm2022/roving-focus/roving-focus-item/roving-focus-item.token.mjs +2 -2
  106. package/esm2022/search/index.mjs +2 -2
  107. package/esm2022/search/search-field/search-field.directive.mjs +2 -2
  108. package/esm2022/search/search-field/search-field.token.mjs +2 -2
  109. package/esm2022/select/index.mjs +2 -2
  110. package/esm2022/select/select/select.directive.mjs +1 -1
  111. package/esm2022/select/select/select.token.mjs +2 -2
  112. package/esm2022/slider/index.mjs +2 -2
  113. package/esm2022/slider/slider/slider.directive.mjs +1 -1
  114. package/esm2022/slider/slider/slider.token.mjs +2 -2
  115. package/esm2022/slider/slider-range/slider-range.directive.mjs +2 -2
  116. package/esm2022/slider/slider-range/slider-range.token.mjs +2 -2
  117. package/esm2022/slider/slider-thumb/slider-thumb.directive.mjs +2 -2
  118. package/esm2022/slider/slider-thumb/slider-thumb.token.mjs +2 -2
  119. package/esm2022/slider/slider-track/slider-track.directive.mjs +2 -2
  120. package/esm2022/slider/slider-track/slider-track.token.mjs +2 -2
  121. package/esm2022/switch/index.mjs +2 -2
  122. package/esm2022/switch/switch/switch.directive.mjs +1 -1
  123. package/esm2022/switch/switch/switch.token.mjs +2 -2
  124. package/esm2022/switch/switch-thumb/switch-thumb.directive.mjs +2 -2
  125. package/esm2022/tabs/config/tabs.config.mjs +2 -2
  126. package/esm2022/tabs/index.mjs +2 -2
  127. package/esm2022/tabs/tab-button/tab-button.directive.mjs +1 -1
  128. package/esm2022/tabs/tab-list/tab-list.directive.mjs +2 -2
  129. package/esm2022/tabs/tab-panel/tab-panel.directive.mjs +2 -2
  130. package/esm2022/tabs/tab-panel/tab-panel.token.mjs +2 -2
  131. package/esm2022/tabs/tabset/tabset.directive.mjs +1 -1
  132. package/esm2022/tabs/tabset/tabset.token.mjs +2 -2
  133. package/esm2022/textarea/index.mjs +2 -2
  134. package/esm2022/textarea/textarea/textarea.directive.mjs +1 -1
  135. package/esm2022/textarea/textarea/textarea.token.mjs +2 -2
  136. package/esm2022/toggle/index.mjs +2 -2
  137. package/esm2022/toggle/toggle/toggle.directive.mjs +1 -1
  138. package/esm2022/tooltip/config/tooltip.config.mjs +2 -2
  139. package/esm2022/tooltip/index.mjs +2 -2
  140. package/esm2022/tooltip/tooltip/tooltip.directive.mjs +2 -2
  141. package/esm2022/tooltip/tooltip/tooltip.token.mjs +2 -2
  142. package/esm2022/tooltip/tooltip-trigger/tooltip-trigger.directive.mjs +1 -1
  143. package/esm2022/tooltip/tooltip-trigger/tooltip-trigger.token.mjs +2 -2
  144. package/esm2022/utils/helpers/disposables.mjs +2 -2
  145. package/esm2022/utils/helpers/focus-manager.mjs +1 -1
  146. package/esm2022/utils/helpers/unique-id.mjs +2 -2
  147. package/esm2022/utils/index.mjs +2 -2
  148. package/esm2022/utils/signals/async.mjs +2 -2
  149. package/esm2022/utils/ui/dimensions.mjs +2 -2
  150. package/fesm2022/ng-primitives-a11y.mjs +3 -3
  151. package/fesm2022/ng-primitives-a11y.mjs.map +1 -1
  152. package/fesm2022/ng-primitives-accordion.mjs +8 -8
  153. package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
  154. package/fesm2022/ng-primitives-autofill.mjs +3 -3
  155. package/fesm2022/ng-primitives-autofill.mjs.map +1 -1
  156. package/fesm2022/ng-primitives-avatar.mjs +5 -5
  157. package/fesm2022/ng-primitives-avatar.mjs.map +1 -1
  158. package/fesm2022/ng-primitives-button.mjs +2 -2
  159. package/fesm2022/ng-primitives-button.mjs.map +1 -1
  160. package/fesm2022/ng-primitives-checkbox.mjs +2 -2
  161. package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
  162. package/fesm2022/ng-primitives-file-upload.mjs +3 -3
  163. package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
  164. package/fesm2022/ng-primitives-focus-trap.mjs +3 -3
  165. package/fesm2022/ng-primitives-focus-trap.mjs.map +1 -1
  166. package/fesm2022/ng-primitives-form-field.mjs +11 -11
  167. package/fesm2022/ng-primitives-form-field.mjs.map +1 -1
  168. package/fesm2022/ng-primitives-input.mjs +2 -2
  169. package/fesm2022/ng-primitives-input.mjs.map +1 -1
  170. package/fesm2022/ng-primitives-interactions.mjs +7 -7
  171. package/fesm2022/ng-primitives-interactions.mjs.map +1 -1
  172. package/fesm2022/ng-primitives-internal.mjs +4 -4
  173. package/fesm2022/ng-primitives-internal.mjs.map +1 -1
  174. package/fesm2022/ng-primitives-progress.mjs +3 -3
  175. package/fesm2022/ng-primitives-progress.mjs.map +1 -1
  176. package/fesm2022/ng-primitives-radio.mjs +4 -4
  177. package/fesm2022/ng-primitives-radio.mjs.map +1 -1
  178. package/fesm2022/ng-primitives-resize.mjs +3 -3
  179. package/fesm2022/ng-primitives-resize.mjs.map +1 -1
  180. package/fesm2022/ng-primitives-roving-focus.mjs +4 -4
  181. package/fesm2022/ng-primitives-roving-focus.mjs.map +1 -1
  182. package/fesm2022/ng-primitives-search.mjs +3 -3
  183. package/fesm2022/ng-primitives-search.mjs.map +1 -1
  184. package/fesm2022/ng-primitives-select.mjs +2 -2
  185. package/fesm2022/ng-primitives-select.mjs.map +1 -1
  186. package/fesm2022/ng-primitives-slider.mjs +8 -8
  187. package/fesm2022/ng-primitives-slider.mjs.map +1 -1
  188. package/fesm2022/ng-primitives-switch.mjs +3 -3
  189. package/fesm2022/ng-primitives-switch.mjs.map +1 -1
  190. package/fesm2022/ng-primitives-tabs.mjs +6 -6
  191. package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
  192. package/fesm2022/ng-primitives-textarea.mjs +2 -2
  193. package/fesm2022/ng-primitives-textarea.mjs.map +1 -1
  194. package/fesm2022/ng-primitives-toggle.mjs +1 -1
  195. package/fesm2022/ng-primitives-toggle.mjs.map +1 -1
  196. package/fesm2022/ng-primitives-tooltip.mjs +5 -5
  197. package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
  198. package/fesm2022/ng-primitives-utils.mjs +5 -5
  199. package/fesm2022/ng-primitives-utils.mjs.map +1 -1
  200. package/fesm2022/ng-primitives.mjs +1 -1
  201. package/fesm2022/ng-primitives.mjs.map +1 -1
  202. package/file-upload/file-upload/file-upload.directive.d.ts +1 -1
  203. package/file-upload/file-upload/file-upload.token.d.ts +1 -1
  204. package/file-upload/index.d.ts +1 -1
  205. package/focus-trap/focus-trap/focus-trap.token.d.ts +1 -1
  206. package/focus-trap/index.d.ts +1 -1
  207. package/form-field/description/description.token.d.ts +1 -1
  208. package/form-field/error/error.directive.d.ts +1 -1
  209. package/form-field/error/error.token.d.ts +1 -1
  210. package/form-field/form-control/form-control.token.d.ts +1 -1
  211. package/form-field/form-field/form-field.directive.d.ts +1 -1
  212. package/form-field/form-field/form-field.token.d.ts +1 -1
  213. package/form-field/index.d.ts +1 -1
  214. package/form-field/label/label.token.d.ts +1 -1
  215. package/index.d.ts +1 -1
  216. package/input/index.d.ts +1 -1
  217. package/input/input/input.directive.d.ts +1 -1
  218. package/input/input/input.token.d.ts +1 -1
  219. package/interactions/focus/focus.directive.d.ts +1 -1
  220. package/interactions/focus/focus.token.d.ts +1 -1
  221. package/interactions/focus-visible/focus-visible.token.d.ts +1 -1
  222. package/interactions/hover/hover.directive.d.ts +1 -1
  223. package/interactions/hover/hover.token.d.ts +1 -1
  224. package/interactions/index.d.ts +1 -1
  225. package/interactions/move/move.directive.d.ts +1 -1
  226. package/interactions/move/move.token.d.ts +1 -1
  227. package/interactions/press/press.directive.d.ts +1 -1
  228. package/interactions/press/press.token.d.ts +1 -1
  229. package/internal/disabled/disabled.d.ts +1 -1
  230. package/internal/index.d.ts +1 -1
  231. package/internal/orientation/orientation.d.ts +1 -1
  232. package/package.json +19 -19
  233. package/progress/index.d.ts +1 -1
  234. package/progress/progress/progress.directive.d.ts +1 -1
  235. package/progress/progress/progress.token.d.ts +1 -1
  236. package/radio/index.d.ts +1 -1
  237. package/radio/radio-group/radio-group.directive.d.ts +1 -1
  238. package/radio/radio-group/radio-group.token.d.ts +1 -1
  239. package/radio/radio-item/radio-item.directive.d.ts +1 -1
  240. package/radio/radio-item/radio-item.token.d.ts +1 -1
  241. package/resize/index.d.ts +1 -1
  242. package/resize/resize/resize.directive.d.ts +1 -1
  243. package/resize/utils/resize.d.ts +1 -1
  244. package/roving-focus/index.d.ts +1 -1
  245. package/roving-focus/roving-focus-group/roving-focus-group.directive.d.ts +1 -1
  246. package/roving-focus/roving-focus-group/roving-focus-group.token.d.ts +1 -1
  247. package/roving-focus/roving-focus-item/roving-focus-item.directive.d.ts +1 -1
  248. package/roving-focus/roving-focus-item/roving-focus-item.token.d.ts +1 -1
  249. package/search/index.d.ts +1 -1
  250. package/search/search-field/search-field.token.d.ts +1 -1
  251. package/select/index.d.ts +1 -1
  252. package/select/select/select.directive.d.ts +1 -1
  253. package/select/select/select.token.d.ts +1 -1
  254. package/slider/index.d.ts +1 -1
  255. package/slider/slider/slider.directive.d.ts +1 -1
  256. package/slider/slider/slider.token.d.ts +1 -1
  257. package/slider/slider-range/slider-range.token.d.ts +1 -1
  258. package/slider/slider-thumb/slider-thumb.token.d.ts +1 -1
  259. package/slider/slider-track/slider-track.directive.d.ts +1 -1
  260. package/slider/slider-track/slider-track.token.d.ts +1 -1
  261. package/switch/index.d.ts +1 -1
  262. package/switch/switch/switch.directive.d.ts +1 -1
  263. package/switch/switch/switch.token.d.ts +1 -1
  264. package/tabs/config/tabs.config.d.ts +1 -1
  265. package/tabs/index.d.ts +1 -1
  266. package/tabs/tab-button/tab-button.directive.d.ts +1 -1
  267. package/tabs/tab-panel/tab-panel.token.d.ts +1 -1
  268. package/tabs/tabset/tabset.directive.d.ts +1 -1
  269. package/tabs/tabset/tabset.token.d.ts +1 -1
  270. package/textarea/index.d.ts +1 -1
  271. package/textarea/textarea/textarea.directive.d.ts +1 -1
  272. package/textarea/textarea/textarea.token.d.ts +1 -1
  273. package/toggle/index.d.ts +1 -1
  274. package/toggle/toggle/toggle.directive.d.ts +1 -1
  275. package/tooltip/config/tooltip.config.d.ts +1 -1
  276. package/tooltip/index.d.ts +1 -1
  277. package/tooltip/tooltip/tooltip.directive.d.ts +1 -1
  278. package/tooltip/tooltip/tooltip.token.d.ts +1 -1
  279. package/tooltip/tooltip-trigger/tooltip-trigger.directive.d.ts +1 -1
  280. package/tooltip/tooltip-trigger/tooltip-trigger.token.d.ts +1 -1
  281. package/utils/helpers/focus-manager.d.ts +1 -1
  282. package/utils/helpers/unique-id.d.ts +1 -1
  283. package/utils/index.d.ts +1 -1
  284. package/utils/signals/async.d.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-tabs.mjs","sources":["../../../../packages/ng-primitives/tabs/src/config/tabs.config.ts","../../../../packages/ng-primitives/tabs/src/tabset/tabset.token.ts","../../../../packages/ng-primitives/tabs/src/tab-button/tab-button.directive.ts","../../../../packages/ng-primitives/tabs/src/tab-list/tab-list.directive.ts","../../../../packages/ng-primitives/tabs/src/tab-panel/tab-panel.token.ts","../../../../packages/ng-primitives/tabs/src/tab-panel/tab-panel.directive.ts","../../../../packages/ng-primitives/tabs/src/tabset/tabset.directive.ts","../../../../packages/ng-primitives/tabs/src/index.ts","../../../../packages/ng-primitives/tabs/src/ng-primitives-tabs.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, Provider, inject } from '@angular/core';\n\nexport interface NgpTabsConfig {\n /**\n * The orientation of the tabset\n * @default 'horizontal'\n */\n orientation: 'horizontal' | 'vertical';\n\n /**\n * Whether tabs should activate on focus\n * @default true\n */\n activateOnFocus: boolean;\n\n /**\n * Whether focus should wrap within the tab list when using the keyboard.\n * @default true\n */\n wrap: boolean;\n}\n\nexport const defaultTabsConfig: NgpTabsConfig = {\n orientation: 'horizontal',\n activateOnFocus: true,\n wrap: true,\n};\n\nexport const NgpTabsConfigToken = new InjectionToken<NgpTabsConfig>('NgpTabsConfigToken');\n\n/**\n * Provide the default Tabs configuration\n * @param config The Tabs configuration\n * @returns The provider\n */\nexport function provideTabsConfig(config: Partial<NgpTabsConfig>): Provider[] {\n return [\n {\n provide: NgpTabsConfigToken,\n useValue: { ...defaultTabsConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Tabs configuration\n * @returns The global Tabs configuration\n */\nexport function injectTabsConfig(): NgpTabsConfig {\n return inject(NgpTabsConfigToken, { optional: true }) ?? defaultTabsConfig;\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpTabset } from './tabset.directive';\n\nexport const NgpTabsetToken = new InjectionToken<NgpTabset>('NgpTabsetToken');\n\n/**\n * Inject the Tabset directive instance\n * @returns The Tabset directive instance\n */\nexport function injectTabset(): NgpTabset {\n return inject(NgpTabsetToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, HostListener, booleanAttribute, computed, input } from '@angular/core';\nimport { NgpFocusVisible, NgpHover, NgpPress } from 'ng-primitives/interactions';\nimport { NgpRovingFocusItem } from 'ng-primitives/roving-focus';\nimport { injectTabset } from '../tabset/tabset.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpTabButton]',\n exportAs: 'ngpTabButton',\n host: {\n role: 'tab',\n '[attr.id]': 'id() ?? defaultId()',\n '[attr.aria-controls]': 'ariaControls()',\n '[attr.data-active]': 'active()',\n '[attr.data-disabled]': 'disabled()',\n '[attr.data-orientation]': 'tabset.orientation()',\n },\n hostDirectives: [NgpRovingFocusItem, NgpHover, NgpFocusVisible, NgpPress],\n})\nexport class NgpTabButton {\n /**\n * Access the tabset\n */\n protected readonly tabset = injectTabset();\n\n /**\n * The value of the tab this trigger controls\n */\n readonly value = input.required<string>({ alias: 'ngpTabButtonValue' });\n\n /**\n * Whether the tab is disabled\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpTabButtonDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Determine the id of the tab button\n * @internal\n */\n readonly id = input<string>();\n\n /**\n * Determine a unique id for the tab button if not provided\n * @internal\n */\n readonly defaultId = computed(() => `${this.tabset.id()}-button-${this.value()}`);\n\n /**\n * Determine the aria-controls of the tab button\n * @internal\n */\n readonly ariaControls = computed(() => `${this.tabset.id()}-panel-${this.value()}`);\n\n /**\n * Whether the tab is active\n */\n readonly active = computed(() => this.tabset.value() === this.value());\n\n /**\n * Select the tab this trigger controls\n */\n @HostListener('click')\n select(): void {\n this.tabset.select(this.value());\n }\n\n /**\n * On focus select the tab this trigger controls if activateOnFocus is true\n */\n @HostListener('focus')\n protected activateOnFocus(): void {\n if (this.tabset.activateOnFocus()) {\n this.select();\n }\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Directive } from '@angular/core';\nimport { injectTabset } from '../tabset/tabset.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpTabList]',\n exportAs: 'ngpTabList',\n host: {\n role: 'tablist',\n '[attr.aria-orientation]': 'tabset.orientation()',\n '[attr.data-orientation]': 'tabset.orientation()',\n },\n})\nexport class NgpTabList {\n /**\n * Access the tabset\n */\n protected readonly tabset = injectTabset();\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpTabPanel } from './tab-panel.directive';\n\nexport const NgpTabPanelToken = new InjectionToken<NgpTabPanel>('NgpTabPanelToken');\n\n/**\n * Inject the TabPanel directive instance\n * @returns The TabPanel directive instance\n */\nexport function injectTabPanel(): NgpTabPanel {\n return inject(NgpTabPanelToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Directive, computed, input } from '@angular/core';\nimport { injectTabset } from '../tabset/tabset.token';\nimport { NgpTabPanelToken } from './tab-panel.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpTabPanel]',\n exportAs: 'ngpTabPanel',\n providers: [{ provide: NgpTabPanelToken, useExisting: NgpTabPanel }],\n host: {\n role: 'tabpanel',\n tabIndex: '0',\n '[attr.aria-labelledby]': 'labelledBy()',\n '[attr.data-active]': 'active()',\n '[attr.data-orientation]': 'tabset.orientation()',\n },\n})\nexport class NgpTabPanel {\n /**\n * Access the tabset\n */\n protected readonly tabset = injectTabset();\n\n /**\n * The value of the tab\n */\n readonly value = input.required<string>({ alias: 'ngpTabPanelValue' });\n\n /**\n * Determine the id of the tab panel\n * @internal\n */\n readonly id = input<string>();\n\n /**\n * Determine a unique id for the tab panel if not provided\n * @internal\n */\n readonly defaultId = computed(() => `${this.tabset.id()}-panel-${this.value()}`);\n\n /**\n * Determine the aria-labelledby of the tab panel\n * @internal\n */\n readonly labelledBy = computed(() => `${this.tabset.id()}-button-${this.value()}`);\n\n /**\n * Whether the tab is active\n */\n readonly active = computed(() => this.tabset.selectedTab() === this.value());\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport {\n Directive,\n booleanAttribute,\n computed,\n contentChildren,\n input,\n model,\n} from '@angular/core';\nimport { NgpCanOrientate, NgpOrientation, NgpOrientationToken } from 'ng-primitives/internal';\nimport { NgpRovingFocusGroup } from 'ng-primitives/roving-focus';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectTabsConfig } from '../config/tabs.config';\nimport { NgpTabPanelToken } from '../tab-panel/tab-panel.token';\nimport { NgpTabsetToken } from './tabset.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpTabset]',\n exportAs: 'ngpTabset',\n providers: [\n { provide: NgpTabsetToken, useExisting: NgpTabset },\n { provide: NgpOrientationToken, useExisting: NgpTabset },\n ],\n hostDirectives: [NgpRovingFocusGroup],\n host: {\n '[attr.id]': 'id()',\n '[attr.data-orientation]': 'orientation()',\n },\n})\nexport class NgpTabset implements NgpCanOrientate {\n /**\n * Access the global tabset configuration\n */\n private readonly config = injectTabsConfig();\n\n /**\n * Define the id for the tabset\n */\n readonly id = input<string>(uniqueId('ngp-tabset'));\n\n /**\n * Define the active tab\n */\n readonly value = model<string | null>(null, {\n alias: 'ngpTabsetValue',\n });\n\n /**\n * The orientation of the tabset\n * @default 'horizontal'\n */\n readonly orientation = input<NgpOrientation>(this.config.orientation, {\n alias: 'ngpTabsetOrientation',\n });\n\n /**\n * Whether tabs should activate on focus\n */\n readonly activateOnFocus = input<boolean, BooleanInput>(this.config.activateOnFocus, {\n alias: 'ngpTabsetActivateOnFocus',\n transform: booleanAttribute,\n });\n\n /**\n * Access the tabs within the tabset\n */\n readonly panels = contentChildren(NgpTabPanelToken, { descendants: true });\n\n /**\n * Get the id of the selected tab\n */\n readonly selectedTab = computed(() => {\n const panels = this.panels();\n\n // if there is a value set and a tab with that value exists, return the value\n if (panels.some(panel => panel.value() === this.value())) {\n return this.value();\n }\n\n // otherwise return the first tab\n return panels[0]?.value();\n });\n\n /**\n * Select a tab by its value\n * @param value The value of the tab to select\n */\n select(value: string): void {\n this.value.set(value);\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport { NgpTabsConfig, provideTabsConfig } from './config/tabs.config';\nexport { NgpTabButton } from './tab-button/tab-button.directive';\nexport { NgpTabList } from './tab-list/tab-list.directive';\nexport { NgpTabPanel } from './tab-panel/tab-panel.directive';\nexport { NgpTabPanelToken } from './tab-panel/tab-panel.token';\nexport { NgpTabset } from './tabset/tabset.directive';\nexport { NgpTabsetToken } from './tabset/tabset.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;AAMG;AAuBI,MAAM,iBAAiB,GAAkB;AAC9C,IAAA,WAAW,EAAE,YAAY;AACzB,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,IAAI,EAAE,IAAI;CACX,CAAC;AAEK,MAAM,kBAAkB,GAAG,IAAI,cAAc,CAAgB,oBAAoB,CAAC,CAAC;AAE1F;;;;AAIG;AACG,SAAU,iBAAiB,CAAC,MAA8B,EAAA;IAC9D,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,kBAAkB;AAC3B,YAAA,QAAQ,EAAE,EAAE,GAAG,iBAAiB,EAAE,GAAG,MAAM,EAAE;AAC9C,SAAA;KACF,CAAC;AACJ,CAAC;AAED;;;AAGG;SACa,gBAAgB,GAAA;AAC9B,IAAA,OAAO,MAAM,CAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,iBAAiB,CAAC;AAC7E;;ACzDA;;;;;;AAMG;MAIU,cAAc,GAAG,IAAI,cAAc,CAA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A,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,uBAAA,EAAA,eAAA,EAAA,EAAA,EAAA,SAAA,EAAA;AACT,YAAA,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE;AACnD,YAAA,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,SAAS,EAAE;AACzD,SAAA,EAAA,OAAA,EAAA,CAAA,EAAA,YAAA,EAAA,QAAA,EAAA,SAAA,EA4CiC,gBAAgB,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FArCvC,SAAS,EAAA,UAAA,EAAA,CAAA;kBAdrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,WAAW,EAAE;AACnD,wBAAA,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,WAAW,EAAE;AACzD,qBAAA;oBACD,cAAc,EAAE,CAAC,mBAAmB,CAAC;AACrC,oBAAA,IAAI,EAAE;AACJ,wBAAA,WAAW,EAAE,MAAM;AACnB,wBAAA,yBAAyB,EAAE,eAAe;AAC3C,qBAAA;AACF,iBAAA,CAAA;;;ACpCD;;;;;;AAMG;;ACNH;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-primitives-tabs.mjs","sources":["../../../../packages/ng-primitives/tabs/src/config/tabs.config.ts","../../../../packages/ng-primitives/tabs/src/tabset/tabset.token.ts","../../../../packages/ng-primitives/tabs/src/tab-button/tab-button.directive.ts","../../../../packages/ng-primitives/tabs/src/tab-list/tab-list.directive.ts","../../../../packages/ng-primitives/tabs/src/tab-panel/tab-panel.token.ts","../../../../packages/ng-primitives/tabs/src/tab-panel/tab-panel.directive.ts","../../../../packages/ng-primitives/tabs/src/tabset/tabset.directive.ts","../../../../packages/ng-primitives/tabs/src/index.ts","../../../../packages/ng-primitives/tabs/src/ng-primitives-tabs.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, Provider, inject } from '@angular/core';\n\nexport interface NgpTabsConfig {\n /**\n * The orientation of the tabset\n * @default 'horizontal'\n */\n orientation: 'horizontal' | 'vertical';\n\n /**\n * Whether tabs should activate on focus\n * @default true\n */\n activateOnFocus: boolean;\n\n /**\n * Whether focus should wrap within the tab list when using the keyboard.\n * @default true\n */\n wrap: boolean;\n}\n\nexport const defaultTabsConfig: NgpTabsConfig = {\n orientation: 'horizontal',\n activateOnFocus: true,\n wrap: true,\n};\n\nexport const NgpTabsConfigToken = new InjectionToken<NgpTabsConfig>('NgpTabsConfigToken');\n\n/**\n * Provide the default Tabs configuration\n * @param config The Tabs configuration\n * @returns The provider\n */\nexport function provideTabsConfig(config: Partial<NgpTabsConfig>): Provider[] {\n return [\n {\n provide: NgpTabsConfigToken,\n useValue: { ...defaultTabsConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Tabs configuration\n * @returns The global Tabs configuration\n */\nexport function injectTabsConfig(): NgpTabsConfig {\n return inject(NgpTabsConfigToken, { optional: true }) ?? defaultTabsConfig;\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpTabset } from './tabset.directive';\n\nexport const NgpTabsetToken = new InjectionToken<NgpTabset>('NgpTabsetToken');\n\n/**\n * Inject the Tabset directive instance\n * @returns The Tabset directive instance\n */\nexport function injectTabset(): NgpTabset {\n return inject(NgpTabsetToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, HostListener, booleanAttribute, computed, input } from '@angular/core';\nimport { NgpFocusVisible, NgpHover, NgpPress } from 'ng-primitives/interactions';\nimport { NgpRovingFocusItem } from 'ng-primitives/roving-focus';\nimport { injectTabset } from '../tabset/tabset.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpTabButton]',\n exportAs: 'ngpTabButton',\n host: {\n role: 'tab',\n '[attr.id]': 'id() ?? defaultId()',\n '[attr.aria-controls]': 'ariaControls()',\n '[attr.data-active]': 'active()',\n '[attr.data-disabled]': 'disabled()',\n '[attr.data-orientation]': 'tabset.orientation()',\n },\n hostDirectives: [NgpRovingFocusItem, NgpHover, NgpFocusVisible, NgpPress],\n})\nexport class NgpTabButton {\n /**\n * Access the tabset\n */\n protected readonly tabset = injectTabset();\n\n /**\n * The value of the tab this trigger controls\n */\n readonly value = input.required<string>({ alias: 'ngpTabButtonValue' });\n\n /**\n * Whether the tab is disabled\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpTabButtonDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Determine the id of the tab button\n * @internal\n */\n readonly id = input<string>();\n\n /**\n * Determine a unique id for the tab button if not provided\n * @internal\n */\n readonly defaultId = computed(() => `${this.tabset.id()}-button-${this.value()}`);\n\n /**\n * Determine the aria-controls of the tab button\n * @internal\n */\n readonly ariaControls = computed(() => `${this.tabset.id()}-panel-${this.value()}`);\n\n /**\n * Whether the tab is active\n */\n readonly active = computed(() => this.tabset.value() === this.value());\n\n /**\n * Select the tab this trigger controls\n */\n @HostListener('click')\n select(): void {\n this.tabset.select(this.value());\n }\n\n /**\n * On focus select the tab this trigger controls if activateOnFocus is true\n */\n @HostListener('focus')\n protected activateOnFocus(): void {\n if (this.tabset.activateOnFocus()) {\n this.select();\n }\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Directive } from '@angular/core';\nimport { injectTabset } from '../tabset/tabset.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpTabList]',\n exportAs: 'ngpTabList',\n host: {\n role: 'tablist',\n '[attr.aria-orientation]': 'tabset.orientation()',\n '[attr.data-orientation]': 'tabset.orientation()',\n },\n})\nexport class NgpTabList {\n /**\n * Access the tabset\n */\n protected readonly tabset = injectTabset();\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpTabPanel } from './tab-panel.directive';\n\nexport const NgpTabPanelToken = new InjectionToken<NgpTabPanel>('NgpTabPanelToken');\n\n/**\n * Inject the TabPanel directive instance\n * @returns The TabPanel directive instance\n */\nexport function injectTabPanel(): NgpTabPanel {\n return inject(NgpTabPanelToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Directive, computed, input } from '@angular/core';\nimport { injectTabset } from '../tabset/tabset.token';\nimport { NgpTabPanelToken } from './tab-panel.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpTabPanel]',\n exportAs: 'ngpTabPanel',\n providers: [{ provide: NgpTabPanelToken, useExisting: NgpTabPanel }],\n host: {\n role: 'tabpanel',\n tabIndex: '0',\n '[attr.aria-labelledby]': 'labelledBy()',\n '[attr.data-active]': 'active()',\n '[attr.data-orientation]': 'tabset.orientation()',\n },\n})\nexport class NgpTabPanel {\n /**\n * Access the tabset\n */\n protected readonly tabset = injectTabset();\n\n /**\n * The value of the tab\n */\n readonly value = input.required<string>({ alias: 'ngpTabPanelValue' });\n\n /**\n * Determine the id of the tab panel\n * @internal\n */\n readonly id = input<string>();\n\n /**\n * Determine a unique id for the tab panel if not provided\n * @internal\n */\n readonly defaultId = computed(() => `${this.tabset.id()}-panel-${this.value()}`);\n\n /**\n * Determine the aria-labelledby of the tab panel\n * @internal\n */\n readonly labelledBy = computed(() => `${this.tabset.id()}-button-${this.value()}`);\n\n /**\n * Whether the tab is active\n */\n readonly active = computed(() => this.tabset.selectedTab() === this.value());\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport {\n Directive,\n booleanAttribute,\n computed,\n contentChildren,\n input,\n model,\n} from '@angular/core';\nimport { NgpCanOrientate, NgpOrientation, NgpOrientationToken } from 'ng-primitives/internal';\nimport { NgpRovingFocusGroup } from 'ng-primitives/roving-focus';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectTabsConfig } from '../config/tabs.config';\nimport { NgpTabPanelToken } from '../tab-panel/tab-panel.token';\nimport { NgpTabsetToken } from './tabset.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpTabset]',\n exportAs: 'ngpTabset',\n providers: [\n { provide: NgpTabsetToken, useExisting: NgpTabset },\n { provide: NgpOrientationToken, useExisting: NgpTabset },\n ],\n hostDirectives: [NgpRovingFocusGroup],\n host: {\n '[attr.id]': 'id()',\n '[attr.data-orientation]': 'orientation()',\n },\n})\nexport class NgpTabset implements NgpCanOrientate {\n /**\n * Access the global tabset configuration\n */\n private readonly config = injectTabsConfig();\n\n /**\n * Define the id for the tabset\n */\n readonly id = input<string>(uniqueId('ngp-tabset'));\n\n /**\n * Define the active tab\n */\n readonly value = model<string | null>(null, {\n alias: 'ngpTabsetValue',\n });\n\n /**\n * The orientation of the tabset\n * @default 'horizontal'\n */\n readonly orientation = input<NgpOrientation>(this.config.orientation, {\n alias: 'ngpTabsetOrientation',\n });\n\n /**\n * Whether tabs should activate on focus\n */\n readonly activateOnFocus = input<boolean, BooleanInput>(this.config.activateOnFocus, {\n alias: 'ngpTabsetActivateOnFocus',\n transform: booleanAttribute,\n });\n\n /**\n * Access the tabs within the tabset\n */\n readonly panels = contentChildren(NgpTabPanelToken, { descendants: true });\n\n /**\n * Get the id of the selected tab\n */\n readonly selectedTab = computed(() => {\n const panels = this.panels();\n\n // if there is a value set and a tab with that value exists, return the value\n if (panels.some(panel => panel.value() === this.value())) {\n return this.value();\n }\n\n // otherwise return the first tab\n return panels[0]?.value();\n });\n\n /**\n * Select a tab by its value\n * @param value The value of the tab to select\n */\n select(value: string): void {\n this.value.set(value);\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport { NgpTabsConfig, provideTabsConfig } from './config/tabs.config';\nexport { NgpTabButton } from './tab-button/tab-button.directive';\nexport { NgpTabList } from './tab-list/tab-list.directive';\nexport { NgpTabPanel } from './tab-panel/tab-panel.directive';\nexport { NgpTabPanelToken } from './tab-panel/tab-panel.token';\nexport { NgpTabset } from './tabset/tabset.directive';\nexport { NgpTabsetToken } from './tabset/tabset.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;AAMG;AAuBI,MAAM,iBAAiB,GAAkB;AAC9C,IAAA,WAAW,EAAE,YAAY;AACzB,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,IAAI,EAAE,IAAI;CACX,CAAC;AAEK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,SAAS,EAAE;AACT,wBAAA,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,WAAW,EAAE;AACnD,wBAAA,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,WAAW,EAAE;AACzD,qBAAA;oBACD,cAAc,EAAE,CAAC,mBAAmB,CAAC;AACrC,oBAAA,IAAI,EAAE;AACJ,wBAAA,WAAW,EAAE,MAAM;AACnB,wBAAA,yBAAyB,EAAE,eAAe;AAC3C,qBAAA;AACF,iBAAA,CAAA;;;ACpCD;;;;;;AAMG;;ACNH;;AAEG;;;;"}
@@ -10,7 +10,7 @@ import { NgpDisabledToken } from 'ng-primitives/internal';
10
10
  * Copyright © 2024 Angular Primitives.
11
11
  * https://github.com/ng-primitives/ng-primitives
12
12
  *
13
- * This source code is licensed under the CC BY-ND 4.0 license found in the
13
+ * This source code is licensed under the Apache 2.0 license found in the
14
14
  * LICENSE file in the root directory of this source tree.
15
15
  */
16
16
  const NgpTextareaToken = new InjectionToken('NgpTextareaToken');
@@ -54,7 +54,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
54
54
  * Copyright © 2024 Angular Primitives.
55
55
  * https://github.com/ng-primitives/ng-primitives
56
56
  *
57
- * This source code is licensed under the CC BY-ND 4.0 license found in the
57
+ * This source code is licensed under the Apache 2.0 license found in the
58
58
  * LICENSE file in the root directory of this source tree.
59
59
  */
60
60
 
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-textarea.mjs","sources":["../../../../packages/ng-primitives/textarea/src/textarea/textarea.token.ts","../../../../packages/ng-primitives/textarea/src/textarea/textarea.directive.ts","../../../../packages/ng-primitives/textarea/src/index.ts","../../../../packages/ng-primitives/textarea/src/ng-primitives-textarea.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpTextarea } from './textarea.directive';\n\nexport const NgpTextareaToken = new InjectionToken<NgpTextarea>('NgpTextareaToken');\n\n/**\n * Inject the Textarea directive instance\n */\nexport function injectTextarea(): NgpTextarea {\n return inject(NgpTextareaToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input } from '@angular/core';\nimport { NgpFormControl } from 'ng-primitives/form-field';\nimport { NgpFocus, NgpHover, NgpPress } from 'ng-primitives/interactions';\nimport { NgpCanDisable, NgpDisabledToken } from 'ng-primitives/internal';\nimport { NgpTextareaToken } from './textarea.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpTextarea]',\n exportAs: 'ngpTextarea',\n providers: [\n { provide: NgpTextareaToken, useExisting: NgpTextarea },\n { provide: NgpDisabledToken, useExisting: NgpTextarea },\n ],\n hostDirectives: [NgpFormControl, NgpHover, NgpFocus, NgpPress],\n})\nexport class NgpTextarea implements NgpCanDisable {\n /**\n * Whether the element is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute,\n });\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport { NgpTextarea } from './textarea/textarea.directive';\nexport { NgpTextareaToken } from './textarea/textarea.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;AAMG;MAIU,gBAAgB,GAAG,IAAI,cAAc,CAAc,kBAAkB,EAAE;AAEpF;;AAEG;SACa,cAAc,GAAA;AAC5B,IAAA,OAAO,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAClC;;MCOa,WAAW,C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A,QAAQ,EAAE,eAAe;AACzB,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,aAAa,EAAE;AACvD,wBAAA,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,aAAa,EAAE;AACxD,qBAAA;oBACD,cAAc,EAAE,CAAC,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC;AAC/D,iBAAA,CAAA;;;ACvBD;;;;;;AAMG;;ACNH;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-primitives-textarea.mjs","sources":["../../../../packages/ng-primitives/textarea/src/textarea/textarea.token.ts","../../../../packages/ng-primitives/textarea/src/textarea/textarea.directive.ts","../../../../packages/ng-primitives/textarea/src/index.ts","../../../../packages/ng-primitives/textarea/src/ng-primitives-textarea.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpTextarea } from './textarea.directive';\n\nexport const NgpTextareaToken = new InjectionToken<NgpTextarea>('NgpTextareaToken');\n\n/**\n * Inject the Textarea directive instance\n */\nexport function injectTextarea(): NgpTextarea {\n return inject(NgpTextareaToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input } from '@angular/core';\nimport { NgpFormControl } from 'ng-primitives/form-field';\nimport { NgpFocus, NgpHover, NgpPress } from 'ng-primitives/interactions';\nimport { NgpCanDisable, NgpDisabledToken } from 'ng-primitives/internal';\nimport { NgpTextareaToken } from './textarea.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpTextarea]',\n exportAs: 'ngpTextarea',\n providers: [\n { provide: NgpTextareaToken, useExisting: NgpTextarea },\n { provide: NgpDisabledToken, useExisting: NgpTextarea },\n ],\n hostDirectives: [NgpFormControl, NgpHover, NgpFocus, NgpPress],\n})\nexport class NgpTextarea implements NgpCanDisable {\n /**\n * Whether the element is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute,\n });\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport { NgpTextarea } from './textarea/textarea.directive';\nexport { NgpTextareaToken } from './textarea/textarea.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;AAMG;MAIU,gBAAgB,GAAG,IAAI,cAAc,CAAc,kBAAkB,EAAE;AAEpF;;AAEG;SACa,cAAc,GAAA;AAC5B,IAAA,OAAO,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAClC;;MCOa,WAAW,CAAA;AAVxB,IAAA,WAAA,GAAA;AAWE;;AAEG;AACM,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,KAAK,EAAE;AACtD,YAAA,SAAS,EAAE,gBAAgB;AAC5B,SAAA,CAAC,CAAC;AACJ,KAAA;8GAPY,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAX,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,WAAW,EANX,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,SAAA,EAAA;AACT,YAAA,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE;AACvD,YAAA,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE;AACxD,SAAA,EAAA,QAAA,EAAA,CAAA,aAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,cAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,QAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,QAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,QAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAGU,WAAW,EAAA,UAAA,EAAA,CAAA;kBAVvB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,aAAa,EAAE;AACvD,wBAAA,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,aAAa,EAAE;AACxD,qBAAA;oBACD,cAAc,EAAE,CAAC,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC;AAC/D,iBAAA,CAAA;;;ACvBD;;;;;;AAMG;;ACNH;;AAEG;;;;"}
@@ -71,7 +71,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
71
71
  * Copyright © 2024 Angular Primitives.
72
72
  * https://github.com/ng-primitives/ng-primitives
73
73
  *
74
- * This source code is licensed under the CC BY-ND 4.0 license found in the
74
+ * This source code is licensed under the Apache 2.0 license found in the
75
75
  * LICENSE file in the root directory of this source tree.
76
76
  */
77
77
 
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-toggle.mjs","sources":["../../../../packages/ng-primitives/toggle/src/toggle/toggle.directive.ts","../../../../packages/ng-primitives/toggle/src/index.ts","../../../../packages/ng-primitives/toggle/src/ng-primitives-toggle.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport {\n Directive,\n ElementRef,\n HostListener,\n booleanAttribute,\n inject,\n input,\n model,\n} from '@angular/core';\n\n@Directive({\n selector: '[ngpToggle]',\n exportAs: 'ngpToggle',\n standalone: true,\n host: {\n '[attr.type]': 'isButton ? \"button\" : null',\n '[attr.aria-pressed]': 'selected()',\n '[attr.data-selected]': 'selected()',\n '[attr.data-disabled]': 'disabled()',\n },\n})\nexport class NgpToggle {\n /**\n * Access the element.\n */\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Whether the toggle is selected.\n * @default false\n */\n readonly selected = model<boolean>(false, { alias: 'ngpToggleSelected' });\n\n /**\n * Whether the toggle is disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpToggleDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Determine if the element is a button.\n */\n protected isButton = this.element.nativeElement.tagName === 'BUTTON';\n\n /**\n * Toggle the selected state.\n */\n @HostListener('click')\n toggle(): void {\n if (this.disabled()) {\n return;\n }\n\n this.selected.update(selected => !selected);\n }\n\n /**\n * If the element is not a button or a link the space key should toggle the selected state.\n */\n @HostListener('keydown.space', ['$event'])\n protected onKeyDown(event: KeyboardEvent): void {\n if (!this.isButton && this.element.nativeElement.tagName !== 'A') {\n event.preventDefault();\n this.toggle();\n }\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport { NgpToggle } from './toggle/toggle.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MA6Ba,SAAS,CAAA;AAXtB,IAAA,WAAA,GAAA;AAYE;;AAEG;AACc,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC;AAEvE;;;AAGG;QACM,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAU,KAAK,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC,CAAC;AAE1E;;;AAGG;AACM,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,KAAK,EAAE;AACtD,YAAA,KAAK,EAAE,mBAAmB;AAC1B,YAAA,SAAS,EAAE,gBAAgB;AAC5B,SAAA,CAAC,CAAC;AAEH;;AAEG;QACO,IAAQ,CAAA,QAAA,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,KAAK,QAAQ,CAAC;AAwBtE,KAAA;AAtBC;;AAEG;IAEH,MAAM,GAAA;AACJ,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YACnB,OAAO;SACR;AAED,QAAA,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,CAAC;KAC7C;AAED;;AAEG;AAEO,IAAA,SAAS,CAAC,KAAoB,EAAA;AACtC,QAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,KAAK,GAAG,EAAE;YAChE,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,IAAI,CAAC,MAAM,EAAE,CAAC;SACf;KACF;8GA/CU,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,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;sBADlB,YAAY;uBAAC,eAAe,EAAE,CAAC,QAAQ,CAAC,CAAA;;;ACtE3C;;;;;;AAMG;;ACNH;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-primitives-toggle.mjs","sources":["../../../../packages/ng-primitives/toggle/src/toggle/toggle.directive.ts","../../../../packages/ng-primitives/toggle/src/index.ts","../../../../packages/ng-primitives/toggle/src/ng-primitives-toggle.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport {\n Directive,\n ElementRef,\n HostListener,\n booleanAttribute,\n inject,\n input,\n model,\n} from '@angular/core';\n\n@Directive({\n selector: '[ngpToggle]',\n exportAs: 'ngpToggle',\n standalone: true,\n host: {\n '[attr.type]': 'isButton ? \"button\" : null',\n '[attr.aria-pressed]': 'selected()',\n '[attr.data-selected]': 'selected()',\n '[attr.data-disabled]': 'disabled()',\n },\n})\nexport class NgpToggle {\n /**\n * Access the element.\n */\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Whether the toggle is selected.\n * @default false\n */\n readonly selected = model<boolean>(false, { alias: 'ngpToggleSelected' });\n\n /**\n * Whether the toggle is disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpToggleDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Determine if the element is a button.\n */\n protected isButton = this.element.nativeElement.tagName === 'BUTTON';\n\n /**\n * Toggle the selected state.\n */\n @HostListener('click')\n toggle(): void {\n if (this.disabled()) {\n return;\n }\n\n this.selected.update(selected => !selected);\n }\n\n /**\n * If the element is not a button or a link the space key should toggle the selected state.\n */\n @HostListener('keydown.space', ['$event'])\n protected onKeyDown(event: KeyboardEvent): void {\n if (!this.isButton && this.element.nativeElement.tagName !== 'A') {\n event.preventDefault();\n this.toggle();\n }\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport { NgpToggle } from './toggle/toggle.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MA6Ba,SAAS,CAAA;AAXtB,IAAA,WAAA,GAAA;AAYE;;AAEG;AACc,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC;AAEvE;;;AAGG;QACM,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAU,KAAK,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC,CAAC;AAE1E;;;AAGG;AACM,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,KAAK,EAAE;AACtD,YAAA,KAAK,EAAE,mBAAmB;AAC1B,YAAA,SAAS,EAAE,gBAAgB;AAC5B,SAAA,CAAC,CAAC;AAEH;;AAEG;QACO,IAAQ,CAAA,QAAA,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,KAAK,QAAQ,CAAC;AAwBtE,KAAA;AAtBC;;AAEG;IAEH,MAAM,GAAA;AACJ,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YACnB,OAAO;SACR;AAED,QAAA,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,CAAC;KAC7C;AAED;;AAEG;AAEO,IAAA,SAAS,CAAC,KAAoB,EAAA;AACtC,QAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,KAAK,GAAG,EAAE;YAChE,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,IAAI,CAAC,MAAM,EAAE,CAAC;SACf;KACF;8GA/CU,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA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S,EAAA,CAAA;sBADlB,YAAY;uBAAC,eAAe,EAAE,CAAC,QAAQ,CAAC,CAAA;;;ACtE3C;;;;;;AAMG;;ACNH;;AAEG;;;;"}
@@ -8,7 +8,7 @@ import { injectDisposables, onBooleanChange } from 'ng-primitives/utils';
8
8
  * Copyright © 2024 Angular Primitives.
9
9
  * https://github.com/ng-primitives/ng-primitives
10
10
  *
11
- * This source code is licensed under the CC BY-ND 4.0 license found in the
11
+ * This source code is licensed under the Apache 2.0 license found in the
12
12
  * LICENSE file in the root directory of this source tree.
13
13
  */
14
14
  const defaultTooltipConfig = {
@@ -45,7 +45,7 @@ function injectTooltipConfig() {
45
45
  * Copyright © 2024 Angular Primitives.
46
46
  * https://github.com/ng-primitives/ng-primitives
47
47
  *
48
- * This source code is licensed under the CC BY-ND 4.0 license found in the
48
+ * This source code is licensed under the Apache 2.0 license found in the
49
49
  * LICENSE file in the root directory of this source tree.
50
50
  */
51
51
  const NgpTooltipTriggerToken = new InjectionToken('NgpTooltipTriggerToken');
@@ -250,7 +250,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
250
250
  * Copyright © 2024 Angular Primitives.
251
251
  * https://github.com/ng-primitives/ng-primitives
252
252
  *
253
- * This source code is licensed under the CC BY-ND 4.0 license found in the
253
+ * This source code is licensed under the Apache 2.0 license found in the
254
254
  * LICENSE file in the root directory of this source tree.
255
255
  */
256
256
  const NgpTooltipToken = new InjectionToken('NgpTooltipToken');
@@ -265,7 +265,7 @@ function injectTooltip() {
265
265
  * Copyright © 2024 Angular Primitives.
266
266
  * https://github.com/ng-primitives/ng-primitives
267
267
  *
268
- * This source code is licensed under the CC BY-ND 4.0 license found in the
268
+ * This source code is licensed under the Apache 2.0 license found in the
269
269
  * LICENSE file in the root directory of this source tree.
270
270
  */
271
271
  class NgpTooltip {
@@ -318,7 +318,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
318
318
  * Copyright © 2024 Angular Primitives.
319
319
  * https://github.com/ng-primitives/ng-primitives
320
320
  *
321
- * This source code is licensed under the CC BY-ND 4.0 license found in the
321
+ * This source code is licensed under the Apache 2.0 license found in the
322
322
  * LICENSE file in the root directory of this source tree.
323
323
  */
324
324
 
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-tooltip.mjs","sources":["../../../../packages/ng-primitives/tooltip/src/config/tooltip.config.ts","../../../../packages/ng-primitives/tooltip/src/tooltip-trigger/tooltip-trigger.token.ts","../../../../packages/ng-primitives/tooltip/src/tooltip-trigger/tooltip-trigger.directive.ts","../../../../packages/ng-primitives/tooltip/src/tooltip/tooltip.token.ts","../../../../packages/ng-primitives/tooltip/src/tooltip/tooltip.directive.ts","../../../../packages/ng-primitives/tooltip/src/index.ts","../../../../packages/ng-primitives/tooltip/src/ng-primitives-tooltip.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, Provider, inject } from '@angular/core';\nimport { type Placement } from '@floating-ui/dom';\n\nexport interface NgpTooltipConfig {\n /**\n * Define the offset of the tooltip relative to the trigger.\n * @default 4\n */\n offset: number;\n\n /**\n * Define the placement of the tooltip relative to the trigger.\n * @default 'top'\n */\n placement: Placement;\n\n /**\n * Define the delay before the tooltip is shown.\n * @default 0\n */\n showDelay: number;\n\n /**\n * Define the delay before the tooltip is hidden.\n * @default 0\n */\n hideDelay: number;\n\n /**\n * Define whether the tooltip should flip when there is not enough space for the tooltip.\n * @default true\n */\n flip: boolean;\n\n /**\n * Define the container in to which the tooltip should be attached.\n * @default document.body\n */\n container: HTMLElement;\n}\n\nexport const defaultTooltipConfig: NgpTooltipConfig = {\n offset: 4,\n placement: 'top',\n showDelay: 0,\n hideDelay: 0,\n flip: true,\n container: document.body,\n};\n\nexport const NgpTooltipConfigToken = new InjectionToken<NgpTooltipConfig>('NgpTooltipConfigToken');\n\n/**\n * Provide the default Tooltip configuration\n * @param config The Tooltip configuration\n * @returns The provider\n */\nexport function provideTooltipConfig(config: Partial<NgpTooltipConfig>): Provider[] {\n return [\n {\n provide: NgpTooltipConfigToken,\n useValue: { ...defaultTooltipConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Tooltip configuration\n * @returns The global Tooltip configuration\n */\nexport function injectTooltipConfig(): NgpTooltipConfig {\n return inject(NgpTooltipConfigToken, { optional: true }) ?? defaultTooltipConfig;\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpTooltipTrigger } from './tooltip-trigger.directive';\n\nexport const NgpTooltipTriggerToken = new InjectionToken<NgpTooltipTrigger>(\n 'NgpTooltipTriggerToken',\n);\n\n/**\n * Inject the TooltipTrigger directive instance\n */\nexport function injectTooltipTrigger(): NgpTooltipTrigger {\n return inject(NgpTooltipTriggerToken);\n}\n\n/**\n * Provides the TooltipTrigger directive instance\n * @param trigger\n */\nexport function provideTooltipTrigger(trigger: NgpTooltipTrigger) {\n return { provide: NgpTooltipTriggerToken, useValue: trigger };\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { DomPortalOutlet, TemplatePortal } from '@angular/cdk/portal';\nimport {\n Directive,\n ElementRef,\n EmbeddedViewRef,\n Injector,\n OnDestroy,\n TemplateRef,\n ViewContainerRef,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n numberAttribute,\n signal,\n} from '@angular/core';\nimport {\n Middleware,\n Placement,\n autoUpdate,\n computePosition,\n flip,\n offset,\n shift,\n} from '@floating-ui/dom';\nimport { injectDisposables, onBooleanChange } from 'ng-primitives/utils';\nimport { injectTooltipConfig } from '../config/tooltip.config';\nimport { NgpTooltipTriggerToken, provideTooltipTrigger } from './tooltip-trigger.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpTooltipTrigger]',\n exportAs: 'ngpTooltipTrigger',\n providers: [{ provide: NgpTooltipTriggerToken, useExisting: NgpTooltipTrigger }],\n host: {\n '[attr.data-state]': 'state()',\n '[attr.data-disabled]': 'disabled()',\n '(mouseenter)': 'open.set(true)',\n '(mouseleave)': 'open.set(false)',\n '(focus)': 'open.set(true)',\n '(blur)': 'open.set(false)',\n },\n})\nexport class NgpTooltipTrigger implements OnDestroy {\n /**\n * Access the trigger element\n */\n private readonly trigger = inject(ElementRef<HTMLElement>);\n\n /**\n * Access the view container ref.\n */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /**\n * Access the injector.\n */\n private readonly injector = inject(Injector);\n\n /**\n * Access the global tooltip configuration.\n */\n private readonly config = injectTooltipConfig();\n\n /**\n * Access the disposable utilities\n */\n private readonly disposables = injectDisposables();\n\n /**\n * Access the tooltip template ref.\n */\n readonly tooltip = input.required<TemplateRef<void>>({\n alias: 'ngpTooltipTrigger',\n });\n\n /**\n * The open state of the tooltip.\n * @default false\n */\n readonly open = model<boolean>(false, {\n alias: 'ngpTooltipTriggerOpen',\n });\n\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpTooltipTriggerDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Define the placement of the tooltip relative to the trigger.\n * @default 'top'\n */\n readonly placement = input<Placement>(this.config.placement, {\n alias: 'ngpTooltipTriggerPlacement',\n });\n\n /**\n * Define the offset of the tooltip relative to the trigger.\n * @default 0\n */\n readonly offset = input<number, NumberInput>(this.config.offset, {\n alias: 'ngpTooltipTriggerOffset',\n transform: numberAttribute,\n });\n\n /**\n * Define the delay before the tooltip is displayed.\n * @default 0\n */\n readonly showDelay = input<number, NumberInput>(this.config.showDelay, {\n alias: 'ngpTooltipTriggerShowDelay',\n transform: numberAttribute,\n });\n\n /**\n * Define the delay before the tooltip is hidden.\n * @default 0\n */\n readonly hideDelay = input<number, NumberInput>(this.config.hideDelay, {\n alias: 'ngpTooltipTriggerHideDelay',\n transform: numberAttribute,\n });\n\n /**\n * Define whether the tooltip should flip when there is not enough space for the tooltip.\n * @default true\n */\n readonly flip = input<boolean, BooleanInput>(this.config.flip, {\n alias: 'ngpTooltipTriggerFlip',\n transform: booleanAttribute,\n });\n\n /**\n * Define the container in which the tooltip should be attached.\n * @default document.body\n */\n readonly container = input<HTMLElement>(this.config.container, {\n alias: 'ngpTooltipTriggerContainer',\n });\n\n /**\n * Store the tooltip view ref.\n */\n private viewRef: EmbeddedViewRef<void> | null = null;\n\n /**\n * Derive the tooltip middleware from the provided configuration.\n */\n private readonly middleware = computed(() => {\n const middleware: Middleware[] = [offset(this.offset()), shift()];\n\n if (this.flip()) {\n middleware.push(flip());\n }\n\n return middleware;\n });\n\n /**\n * Store the computed position of the tooltip.\n * @internal\n */\n readonly position = signal<{ x: number; y: number }>({\n x: 0,\n y: 0,\n });\n\n /**\n * Store the state of the tooltip.\n * @internal\n */\n readonly state = signal<TooltipState>('closed');\n\n /**\n * The dispose function to stop computing the position of the tooltip.\n */\n private dispose?: () => void;\n\n constructor() {\n // any time the open state changes then show or hide the tooltip\n onBooleanChange(this.open, this.show.bind(this), this.hide.bind(this));\n }\n\n ngOnDestroy(): void {\n this.destroyTooltip();\n }\n\n private show(): void {\n // if the trigger is disabled or the tooltip is already open then do not show the tooltip\n if (this.disabled() || this.state() === 'open' || this.state() === 'opening') {\n return;\n }\n\n this.state.set('opening');\n this.disposables.setTimeout(() => this.createTooltip(), this.showDelay());\n }\n\n private hide(): void {\n // if the trigger is disabled or the tooltip is already closed then do not hide the tooltip\n if (this.disabled() || this.state() === 'closed' || this.state() === 'closing') {\n return;\n }\n\n this.state.set('closing');\n this.disposables.setTimeout(() => this.destroyTooltip(), this.hideDelay());\n }\n\n private createTooltip(): void {\n const portal = new TemplatePortal(\n this.tooltip(),\n this.viewContainerRef,\n undefined,\n this.injector,\n );\n\n const domOutlet = new DomPortalOutlet(\n this.container(),\n undefined,\n undefined,\n Injector.create({\n parent: this.injector,\n providers: [provideTooltipTrigger(this)],\n }),\n );\n\n this.viewRef = domOutlet.attach(portal);\n this.viewRef.detectChanges();\n\n const outletElement = this.viewRef.rootNodes[0];\n\n this.dispose = autoUpdate(this.trigger.nativeElement, outletElement, async () => {\n const position = await computePosition(this.trigger.nativeElement, outletElement, {\n placement: this.placement(),\n middleware: this.middleware(),\n });\n\n this.position.set({ x: position.x, y: position.y });\n });\n\n this.state.set('open');\n }\n\n private destroyTooltip(): void {\n this.viewRef?.destroy();\n this.viewRef = null;\n this.dispose?.();\n this.state.set('closed');\n }\n}\n\nexport type TooltipState = 'closed' | 'opening' | 'open' | 'closing';\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpTooltip } from './tooltip.directive';\n\nexport const NgpTooltipToken = new InjectionToken<NgpTooltip>('NgpTooltipToken');\n\n/**\n * Inject the Tooltip directive instance\n */\nexport function injectTooltip(): NgpTooltip {\n return inject(NgpTooltipToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Directive, ElementRef, OnInit, computed, inject, isDevMode } from '@angular/core';\nimport { injectTooltipTrigger } from '../tooltip-trigger/tooltip-trigger.token';\nimport { NgpTooltipToken } from './tooltip.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpTooltip]',\n exportAs: 'ngpTooltip',\n providers: [{ provide: NgpTooltipToken, useExisting: NgpTooltip }],\n host: {\n role: 'tooltip',\n '[style.left.px]': 'x()',\n '[style.top.px]': 'y()',\n },\n})\nexport class NgpTooltip implements OnInit {\n /**\n * Access the tooltip element.\n */\n private readonly tooltip = inject(ElementRef<HTMLElement>);\n\n /**\n * Access the trigger instance.\n */\n private readonly trigger = injectTooltipTrigger();\n\n /**\n * Compute the x position of the tooltip.\n */\n protected readonly x = computed(() => this.trigger.position().x);\n\n /**\n * Compute the y position of the tooltip.\n */\n protected readonly y = computed(() => this.trigger.position().y);\n\n ngOnInit(): void {\n // if the element does not have a fixed position then throw a warning in dev mode\n if (isDevMode()) {\n const { position } = getComputedStyle(this.tooltip.nativeElement);\n\n if (position !== 'absolute') {\n console.warn(\n `The tooltip element must have an absolute position. The current position is ${position}.`,\n );\n }\n }\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport { NgpTooltipConfig, provideTooltipConfig } from './config/tooltip.config';\nexport { NgpTooltipTrigger } from './tooltip-trigger/tooltip-trigger.directive';\nexport { NgpTooltipTriggerToken } from './tooltip-trigger/tooltip-trigger.token';\nexport { NgpTooltip } from './tooltip/tooltip.directive';\nexport { NgpTooltipToken } from './tooltip/tooltip.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;;AAMG;AA0CI,MAAM,oBAAoB,GAAqB;AACpD,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,SAAS,EAAE,KAAK;AAChB,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,QAAQ,CAAC,IAAI;CACzB,CAAC;AAEK,MAAM,qBAAqB,GAAG,IAAI,cAAc,CAAmB,uBAAuB,CAAC,CAAC;AAEnG;;;;AAIG;AAC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;AACF,iBAAA,CAAA;;;ACrBD;;;;;;AAMG;;ACNH;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-primitives-tooltip.mjs","sources":["../../../../packages/ng-primitives/tooltip/src/config/tooltip.config.ts","../../../../packages/ng-primitives/tooltip/src/tooltip-trigger/tooltip-trigger.token.ts","../../../../packages/ng-primitives/tooltip/src/tooltip-trigger/tooltip-trigger.directive.ts","../../../../packages/ng-primitives/tooltip/src/tooltip/tooltip.token.ts","../../../../packages/ng-primitives/tooltip/src/tooltip/tooltip.directive.ts","../../../../packages/ng-primitives/tooltip/src/index.ts","../../../../packages/ng-primitives/tooltip/src/ng-primitives-tooltip.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, Provider, inject } from '@angular/core';\nimport { type Placement } from '@floating-ui/dom';\n\nexport interface NgpTooltipConfig {\n /**\n * Define the offset of the tooltip relative to the trigger.\n * @default 4\n */\n offset: number;\n\n /**\n * Define the placement of the tooltip relative to the trigger.\n * @default 'top'\n */\n placement: Placement;\n\n /**\n * Define the delay before the tooltip is shown.\n * @default 0\n */\n showDelay: number;\n\n /**\n * Define the delay before the tooltip is hidden.\n * @default 0\n */\n hideDelay: number;\n\n /**\n * Define whether the tooltip should flip when there is not enough space for the tooltip.\n * @default true\n */\n flip: boolean;\n\n /**\n * Define the container in to which the tooltip should be attached.\n * @default document.body\n */\n container: HTMLElement;\n}\n\nexport const defaultTooltipConfig: NgpTooltipConfig = {\n offset: 4,\n placement: 'top',\n showDelay: 0,\n hideDelay: 0,\n flip: true,\n container: document.body,\n};\n\nexport const NgpTooltipConfigToken = new InjectionToken<NgpTooltipConfig>('NgpTooltipConfigToken');\n\n/**\n * Provide the default Tooltip configuration\n * @param config The Tooltip configuration\n * @returns The provider\n */\nexport function provideTooltipConfig(config: Partial<NgpTooltipConfig>): Provider[] {\n return [\n {\n provide: NgpTooltipConfigToken,\n useValue: { ...defaultTooltipConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Tooltip configuration\n * @returns The global Tooltip configuration\n */\nexport function injectTooltipConfig(): NgpTooltipConfig {\n return inject(NgpTooltipConfigToken, { optional: true }) ?? defaultTooltipConfig;\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpTooltipTrigger } from './tooltip-trigger.directive';\n\nexport const NgpTooltipTriggerToken = new InjectionToken<NgpTooltipTrigger>(\n 'NgpTooltipTriggerToken',\n);\n\n/**\n * Inject the TooltipTrigger directive instance\n */\nexport function injectTooltipTrigger(): NgpTooltipTrigger {\n return inject(NgpTooltipTriggerToken);\n}\n\n/**\n * Provides the TooltipTrigger directive instance\n * @param trigger\n */\nexport function provideTooltipTrigger(trigger: NgpTooltipTrigger) {\n return { provide: NgpTooltipTriggerToken, useValue: trigger };\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { DomPortalOutlet, TemplatePortal } from '@angular/cdk/portal';\nimport {\n Directive,\n ElementRef,\n EmbeddedViewRef,\n Injector,\n OnDestroy,\n TemplateRef,\n ViewContainerRef,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n numberAttribute,\n signal,\n} from '@angular/core';\nimport {\n Middleware,\n Placement,\n autoUpdate,\n computePosition,\n flip,\n offset,\n shift,\n} from '@floating-ui/dom';\nimport { injectDisposables, onBooleanChange } from 'ng-primitives/utils';\nimport { injectTooltipConfig } from '../config/tooltip.config';\nimport { NgpTooltipTriggerToken, provideTooltipTrigger } from './tooltip-trigger.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpTooltipTrigger]',\n exportAs: 'ngpTooltipTrigger',\n providers: [{ provide: NgpTooltipTriggerToken, useExisting: NgpTooltipTrigger }],\n host: {\n '[attr.data-state]': 'state()',\n '[attr.data-disabled]': 'disabled()',\n '(mouseenter)': 'open.set(true)',\n '(mouseleave)': 'open.set(false)',\n '(focus)': 'open.set(true)',\n '(blur)': 'open.set(false)',\n },\n})\nexport class NgpTooltipTrigger implements OnDestroy {\n /**\n * Access the trigger element\n */\n private readonly trigger = inject(ElementRef<HTMLElement>);\n\n /**\n * Access the view container ref.\n */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /**\n * Access the injector.\n */\n private readonly injector = inject(Injector);\n\n /**\n * Access the global tooltip configuration.\n */\n private readonly config = injectTooltipConfig();\n\n /**\n * Access the disposable utilities\n */\n private readonly disposables = injectDisposables();\n\n /**\n * Access the tooltip template ref.\n */\n readonly tooltip = input.required<TemplateRef<void>>({\n alias: 'ngpTooltipTrigger',\n });\n\n /**\n * The open state of the tooltip.\n * @default false\n */\n readonly open = model<boolean>(false, {\n alias: 'ngpTooltipTriggerOpen',\n });\n\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpTooltipTriggerDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Define the placement of the tooltip relative to the trigger.\n * @default 'top'\n */\n readonly placement = input<Placement>(this.config.placement, {\n alias: 'ngpTooltipTriggerPlacement',\n });\n\n /**\n * Define the offset of the tooltip relative to the trigger.\n * @default 0\n */\n readonly offset = input<number, NumberInput>(this.config.offset, {\n alias: 'ngpTooltipTriggerOffset',\n transform: numberAttribute,\n });\n\n /**\n * Define the delay before the tooltip is displayed.\n * @default 0\n */\n readonly showDelay = input<number, NumberInput>(this.config.showDelay, {\n alias: 'ngpTooltipTriggerShowDelay',\n transform: numberAttribute,\n });\n\n /**\n * Define the delay before the tooltip is hidden.\n * @default 0\n */\n readonly hideDelay = input<number, NumberInput>(this.config.hideDelay, {\n alias: 'ngpTooltipTriggerHideDelay',\n transform: numberAttribute,\n });\n\n /**\n * Define whether the tooltip should flip when there is not enough space for the tooltip.\n * @default true\n */\n readonly flip = input<boolean, BooleanInput>(this.config.flip, {\n alias: 'ngpTooltipTriggerFlip',\n transform: booleanAttribute,\n });\n\n /**\n * Define the container in which the tooltip should be attached.\n * @default document.body\n */\n readonly container = input<HTMLElement>(this.config.container, {\n alias: 'ngpTooltipTriggerContainer',\n });\n\n /**\n * Store the tooltip view ref.\n */\n private viewRef: EmbeddedViewRef<void> | null = null;\n\n /**\n * Derive the tooltip middleware from the provided configuration.\n */\n private readonly middleware = computed(() => {\n const middleware: Middleware[] = [offset(this.offset()), shift()];\n\n if (this.flip()) {\n middleware.push(flip());\n }\n\n return middleware;\n });\n\n /**\n * Store the computed position of the tooltip.\n * @internal\n */\n readonly position = signal<{ x: number; y: number }>({\n x: 0,\n y: 0,\n });\n\n /**\n * Store the state of the tooltip.\n * @internal\n */\n readonly state = signal<TooltipState>('closed');\n\n /**\n * The dispose function to stop computing the position of the tooltip.\n */\n private dispose?: () => void;\n\n constructor() {\n // any time the open state changes then show or hide the tooltip\n onBooleanChange(this.open, this.show.bind(this), this.hide.bind(this));\n }\n\n ngOnDestroy(): void {\n this.destroyTooltip();\n }\n\n private show(): void {\n // if the trigger is disabled or the tooltip is already open then do not show the tooltip\n if (this.disabled() || this.state() === 'open' || this.state() === 'opening') {\n return;\n }\n\n this.state.set('opening');\n this.disposables.setTimeout(() => this.createTooltip(), this.showDelay());\n }\n\n private hide(): void {\n // if the trigger is disabled or the tooltip is already closed then do not hide the tooltip\n if (this.disabled() || this.state() === 'closed' || this.state() === 'closing') {\n return;\n }\n\n this.state.set('closing');\n this.disposables.setTimeout(() => this.destroyTooltip(), this.hideDelay());\n }\n\n private createTooltip(): void {\n const portal = new TemplatePortal(\n this.tooltip(),\n this.viewContainerRef,\n undefined,\n this.injector,\n );\n\n const domOutlet = new DomPortalOutlet(\n this.container(),\n undefined,\n undefined,\n Injector.create({\n parent: this.injector,\n providers: [provideTooltipTrigger(this)],\n }),\n );\n\n this.viewRef = domOutlet.attach(portal);\n this.viewRef.detectChanges();\n\n const outletElement = this.viewRef.rootNodes[0];\n\n this.dispose = autoUpdate(this.trigger.nativeElement, outletElement, async () => {\n const position = await computePosition(this.trigger.nativeElement, outletElement, {\n placement: this.placement(),\n middleware: this.middleware(),\n });\n\n this.position.set({ x: position.x, y: position.y });\n });\n\n this.state.set('open');\n }\n\n private destroyTooltip(): void {\n this.viewRef?.destroy();\n this.viewRef = null;\n this.dispose?.();\n this.state.set('closed');\n }\n}\n\nexport type TooltipState = 'closed' | 'opening' | 'open' | 'closing';\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpTooltip } from './tooltip.directive';\n\nexport const NgpTooltipToken = new InjectionToken<NgpTooltip>('NgpTooltipToken');\n\n/**\n * Inject the Tooltip directive instance\n */\nexport function injectTooltip(): NgpTooltip {\n return inject(NgpTooltipToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Directive, ElementRef, OnInit, computed, inject, isDevMode } from '@angular/core';\nimport { injectTooltipTrigger } from '../tooltip-trigger/tooltip-trigger.token';\nimport { NgpTooltipToken } from './tooltip.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpTooltip]',\n exportAs: 'ngpTooltip',\n providers: [{ provide: NgpTooltipToken, useExisting: NgpTooltip }],\n host: {\n role: 'tooltip',\n '[style.left.px]': 'x()',\n '[style.top.px]': 'y()',\n },\n})\nexport class NgpTooltip implements OnInit {\n /**\n * Access the tooltip element.\n */\n private readonly tooltip = inject(ElementRef<HTMLElement>);\n\n /**\n * Access the trigger instance.\n */\n private readonly trigger = injectTooltipTrigger();\n\n /**\n * Compute the x position of the tooltip.\n */\n protected readonly x = computed(() => this.trigger.position().x);\n\n /**\n * Compute the y position of the tooltip.\n */\n protected readonly y = computed(() => this.trigger.position().y);\n\n ngOnInit(): void {\n // if the element does not have a fixed position then throw a warning in dev mode\n if (isDevMode()) {\n const { position } = getComputedStyle(this.tooltip.nativeElement);\n\n if (position !== 'absolute') {\n console.warn(\n `The tooltip element must have an absolute position. The current position is ${position}.`,\n );\n }\n }\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport { NgpTooltipConfig, provideTooltipConfig } from './config/tooltip.config';\nexport { NgpTooltipTrigger } from './tooltip-trigger/tooltip-trigger.directive';\nexport { NgpTooltipTriggerToken } from './tooltip-trigger/tooltip-trigger.token';\nexport { NgpTooltip } from './tooltip/tooltip.directive';\nexport { NgpTooltipToken } from './tooltip/tooltip.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;;AAMG;AA0CI,MAAM,oBAAoB,GAAqB;AACpD,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,SAAS,EAAE,KAAK;AAChB,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,QAAQ,CAAC,IAAI;CACzB,CAAC;AAEK,MAAM,qBAAqB,GAAG,IAAI,cAAc,CAAmB,uBAAuB,CAAC,CAAC;AAEnG;;;;AAIG;AACG,SAAU,oBAAoB,CAAC,MAAiC,EAAA;IACpE,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,qBAAqB;AAC9B,YAAA,QAAQ,EAAE,EAAE,GAAG,oBAAoB,EAAE,GAAG,MAAM,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-primitives/ng-primitives
8
8
  *
9
- * This source code is licensed under the CC BY-ND 4.0 license found in the
9
+ * This source code is licensed under the Apache 2.0 license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
12
  /**
@@ -102,7 +102,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
102
102
  * Copyright © 2024 Angular Primitives.
103
103
  * https://github.com/ng-primitives/ng-primitives
104
104
  *
105
- * This source code is licensed under the CC BY-ND 4.0 license found in the
105
+ * This source code is licensed under the Apache 2.0 license found in the
106
106
  * LICENSE file in the root directory of this source tree.
107
107
  */
108
108
  /**
@@ -124,7 +124,7 @@ function uniqueId(prefix) {
124
124
  * Copyright © 2024 Angular Primitives.
125
125
  * https://github.com/ng-primitives/ng-primitives
126
126
  *
127
- * This source code is licensed under the CC BY-ND 4.0 license found in the
127
+ * This source code is licensed under the Apache 2.0 license found in the
128
128
  * LICENSE file in the root directory of this source tree.
129
129
  */
130
130
  /**
@@ -160,7 +160,7 @@ function onBooleanChange(source, onTrue, onFalse, options) {
160
160
  * Copyright © 2024 Angular Primitives.
161
161
  * https://github.com/ng-primitives/ng-primitives
162
162
  *
163
- * This source code is licensed under the CC BY-ND 4.0 license found in the
163
+ * This source code is licensed under the Apache 2.0 license found in the
164
164
  * LICENSE file in the root directory of this source tree.
165
165
  */
166
166
  /**
@@ -199,7 +199,7 @@ function injectDimensions() {
199
199
  * Copyright © 2024 Angular Primitives.
200
200
  * https://github.com/ng-primitives/ng-primitives
201
201
  *
202
- * This source code is licensed under the CC BY-ND 4.0 license found in the
202
+ * This source code is licensed under the Apache 2.0 license found in the
203
203
  * LICENSE file in the root directory of this source tree.
204
204
  */
205
205
 
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-utils.mjs","sources":["../../../../packages/ng-primitives/utils/src/helpers/disposables.ts","../../../../packages/ng-primitives/utils/src/helpers/focus-manager.ts","../../../../packages/ng-primitives/utils/src/helpers/unique-id.ts","../../../../packages/ng-primitives/utils/src/signals/async.ts","../../../../packages/ng-primitives/utils/src/ui/dimensions.ts","../../../../packages/ng-primitives/utils/src/index.ts","../../../../packages/ng-primitives/utils/src/ng-primitives-utils.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { DestroyRef, inject } from '@angular/core';\n\n/**\n * Disposable functions are a way to manage timers, intervals, and event listeners\n * that should be cleared when a component is destroyed.\n *\n * This is heavily inspired by Headless UI disposables:\n * https://github.com/tailwindlabs/headlessui/blob/main/packages/%40headlessui-react/src/utils/disposables.ts\n */\nexport function injectDisposables() {\n const destroyRef = inject(DestroyRef);\n\n return {\n /**\n * Set a timeout that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @param delay The delay before the callback is executed\n * @returns A function to clear the timeout\n */\n setTimeout: (callback: () => void, delay: number) => {\n const id = setTimeout(callback, delay);\n const cleanup = () => clearTimeout(id);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n /**\n * Set an interval that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @param delay The delay before the callback is executed\n * @param target\n * @param type\n * @param listener\n * @param options\n * @returns A function to clear the interval\n */\n addEventListener: (\n target: EventTarget,\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) => {\n target.addEventListener(type, listener, options);\n const cleanup = () => target.removeEventListener(type, listener, options);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n /**\n * Set an interval that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @param delay The delay before the callback is executed\n * @returns A function to clear the interval\n */\n setInterval: (callback: () => void, delay: number) => {\n const id = setInterval(callback, delay);\n const cleanup = () => clearInterval(id);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n /**\n * Set a requestAnimationFrame that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @returns A function to clear the requestAnimationFrame\n */\n requestAnimationFrame: (callback: FrameRequestCallback) => {\n const id = requestAnimationFrame(callback);\n const cleanup = () => cancelAnimationFrame(id);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n };\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { FocusOrigin } from '@angular/cdk/a11y';\nimport { coerceElement } from '@angular/cdk/coercion';\nimport { ElementRef, Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FocusManager {\n /**\n * Focus an element with an optional origin.\n */\n focus(element: ElementRef<HTMLElement>, origin?: FocusOrigin): void;\n focus(element: HTMLElement, origin?: FocusOrigin): void;\n focus(element: ElementRef<HTMLElement> | HTMLElement, origin: FocusOrigin = 'program'): void {\n element = coerceElement(element);\n\n switch (origin) {\n case 'keyboard':\n // trigger the focus-visible state for keyboard users\n element.contentEditable = 'true';\n element.focus({ preventScroll: true });\n element.contentEditable = 'false';\n break;\n default:\n element.focus();\n break;\n }\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/**\n * Store a map of unique ids for elements so that there are no collisions.\n */\nconst uniqueIdMap = new Map<string, number>();\n\n/**\n * Generate a unique id for an element\n * @param prefix - The prefix to use for the id\n * @returns The generated id\n */\nexport function uniqueId(prefix: string): string {\n const id = uniqueIdMap.get(prefix) ?? 0;\n uniqueIdMap.set(prefix, id + 1);\n return `${prefix}-${id}`;\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Injector, Signal, effect, signal } from '@angular/core';\n\n/**\n * Listen for changes to a signal and call a function when the signal changes.\n * @param source\n * @param fn\n * @param options\n * @param options.injector\n * @internal\n */\nexport function onChange<T>(\n source: Signal<T | null | undefined>,\n fn: (value: T | null | undefined, previousValue: T | null | undefined) => void,\n options?: { injector: Injector },\n): void {\n const previousValue = signal(source());\n\n effect(\n () => {\n const value = source();\n if (value !== previousValue()) {\n fn(value, previousValue());\n previousValue.set(value);\n }\n },\n { allowSignalWrites: true, injector: options?.injector },\n );\n}\n\n/**\n * Listen for changes to a boolean signal and call one of two functions when the signal changes.\n * @param source\n * @param onTrue\n * @param onFalse\n * @param options\n */\nexport function onBooleanChange(\n source: Signal<boolean>,\n onTrue: () => void,\n onFalse: () => void,\n options?: { injector: Injector },\n): void {\n onChange(source, value => (value ? onTrue() : onFalse()), options);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport {\n AfterRenderPhase,\n ElementRef,\n Renderer2,\n afterNextRender,\n inject,\n signal,\n} from '@angular/core';\n\n/**\n * Injects the dimensions of the element\n * @returns The dimensions of the element\n */\nexport function injectDimensions() {\n const renderer = inject(Renderer2);\n const element = inject<ElementRef<HTMLElement>>(ElementRef);\n const size = signal<{ width: number; height: number; mounted: boolean }>({\n width: 0,\n height: 0,\n mounted: false,\n });\n let transitionDuration: string | undefined, animationName: string | undefined;\n\n afterNextRender(\n () => {\n transitionDuration = element.nativeElement.style.transitionDuration;\n animationName = element.nativeElement.style.animationName;\n },\n { phase: AfterRenderPhase.EarlyRead },\n );\n\n afterNextRender(\n () => {\n // block any animations/transitions so the element renders at its full dimensions\n renderer.setStyle(element.nativeElement, 'transitionDuration', '0s');\n renderer.setStyle(element.nativeElement, 'animationName', 'none');\n },\n { phase: AfterRenderPhase.Write },\n );\n\n afterNextRender(\n () => {\n const { width, height } = element.nativeElement.getBoundingClientRect();\n size.set({ width, height, mounted: true });\n\n // restore the original transition duration and animation name\n renderer.setStyle(element.nativeElement, 'transitionDuration', transitionDuration);\n renderer.setStyle(element.nativeElement, 'animationName', animationName);\n },\n { phase: AfterRenderPhase.Read },\n );\n\n return size;\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport { injectDisposables } from './helpers/disposables';\nexport { FocusManager } from './helpers/focus-manager';\nexport { uniqueId } from './helpers/unique-id';\nexport { onBooleanChange, onChange } from './signals/async';\nexport { injectDimensions } from './ui/dimensions';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;;;;;AAMG;AAGH;;;;;;AAMG;SACa,iBAAiB,GAAA;AAC/B,IAAA,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IAEtC,OAAO;AACL;;;;;AAKG;AACH,QAAA,UAAU,EAAE,CAAC,QAAoB,EAAE,KAAa,KAAI;YAClD,MAAM,EAAE,GAAG,UAAU,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YACvC,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC,EAAE,CAAC,CAAC;AACvC,YAAA,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AAC9B,YAAA,OAAO,OAAO,CAAC;SAChB;AACD;;;;;;;;;AASG;QACH,gBAAgB,EAAE,CAChB,MAAmB,EACnB,IAAY,EACZ,QAA4C,EAC5C,OAA2C,KACzC;YACF,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AACjD,YAAA,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC1E,YAAA,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AAC9B,YAAA,OAAO,OA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CAAC,OAAO,CAAC,aAAa,EAAE,oBAAoB,EAAE,kBAAkB,CAAC,CAAC;QACnF,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;KAC1E,EACD,EAAE,KAAK,EAAE,gBAAgB,CAAC,IAAI,EAAE,CACjC,CAAC;AAEF,IAAA,OAAO,IAAI,CAAC;AACd;;AC5DA;;;;;;AAMG;;ACNH;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-primitives-utils.mjs","sources":["../../../../packages/ng-primitives/utils/src/helpers/disposables.ts","../../../../packages/ng-primitives/utils/src/helpers/focus-manager.ts","../../../../packages/ng-primitives/utils/src/helpers/unique-id.ts","../../../../packages/ng-primitives/utils/src/signals/async.ts","../../../../packages/ng-primitives/utils/src/ui/dimensions.ts","../../../../packages/ng-primitives/utils/src/index.ts","../../../../packages/ng-primitives/utils/src/ng-primitives-utils.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { DestroyRef, inject } from '@angular/core';\n\n/**\n * Disposable functions are a way to manage timers, intervals, and event listeners\n * that should be cleared when a component is destroyed.\n *\n * This is heavily inspired by Headless UI disposables:\n * https://github.com/tailwindlabs/headlessui/blob/main/packages/%40headlessui-react/src/utils/disposables.ts\n */\nexport function injectDisposables() {\n const destroyRef = inject(DestroyRef);\n\n return {\n /**\n * Set a timeout that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @param delay The delay before the callback is executed\n * @returns A function to clear the timeout\n */\n setTimeout: (callback: () => void, delay: number) => {\n const id = setTimeout(callback, delay);\n const cleanup = () => clearTimeout(id);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n /**\n * Set an interval that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @param delay The delay before the callback is executed\n * @param target\n * @param type\n * @param listener\n * @param options\n * @returns A function to clear the interval\n */\n addEventListener: (\n target: EventTarget,\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) => {\n target.addEventListener(type, listener, options);\n const cleanup = () => target.removeEventListener(type, listener, options);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n /**\n * Set an interval that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @param delay The delay before the callback is executed\n * @returns A function to clear the interval\n */\n setInterval: (callback: () => void, delay: number) => {\n const id = setInterval(callback, delay);\n const cleanup = () => clearInterval(id);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n /**\n * Set a requestAnimationFrame that will be cleared when the component is destroyed.\n * @param callback The callback to execute\n * @returns A function to clear the requestAnimationFrame\n */\n requestAnimationFrame: (callback: FrameRequestCallback) => {\n const id = requestAnimationFrame(callback);\n const cleanup = () => cancelAnimationFrame(id);\n destroyRef.onDestroy(cleanup);\n return cleanup;\n },\n };\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { FocusOrigin } from '@angular/cdk/a11y';\nimport { coerceElement } from '@angular/cdk/coercion';\nimport { ElementRef, Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FocusManager {\n /**\n * Focus an element with an optional origin.\n */\n focus(element: ElementRef<HTMLElement>, origin?: FocusOrigin): void;\n focus(element: HTMLElement, origin?: FocusOrigin): void;\n focus(element: ElementRef<HTMLElement> | HTMLElement, origin: FocusOrigin = 'program'): void {\n element = coerceElement(element);\n\n switch (origin) {\n case 'keyboard':\n // trigger the focus-visible state for keyboard users\n element.contentEditable = 'true';\n element.focus({ preventScroll: true });\n element.contentEditable = 'false';\n break;\n default:\n element.focus();\n break;\n }\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/**\n * Store a map of unique ids for elements so that there are no collisions.\n */\nconst uniqueIdMap = new Map<string, number>();\n\n/**\n * Generate a unique id for an element\n * @param prefix - The prefix to use for the id\n * @returns The generated id\n */\nexport function uniqueId(prefix: string): string {\n const id = uniqueIdMap.get(prefix) ?? 0;\n uniqueIdMap.set(prefix, id + 1);\n return `${prefix}-${id}`;\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Injector, Signal, effect, signal } from '@angular/core';\n\n/**\n * Listen for changes to a signal and call a function when the signal changes.\n * @param source\n * @param fn\n * @param options\n * @param options.injector\n * @internal\n */\nexport function onChange<T>(\n source: Signal<T | null | undefined>,\n fn: (value: T | null | undefined, previousValue: T | null | undefined) => void,\n options?: { injector: Injector },\n): void {\n const previousValue = signal(source());\n\n effect(\n () => {\n const value = source();\n if (value !== previousValue()) {\n fn(value, previousValue());\n previousValue.set(value);\n }\n },\n { allowSignalWrites: true, injector: options?.injector },\n );\n}\n\n/**\n * Listen for changes to a boolean signal and call one of two functions when the signal changes.\n * @param source\n * @param onTrue\n * @param onFalse\n * @param options\n */\nexport function onBooleanChange(\n source: Signal<boolean>,\n onTrue: () => void,\n onFalse: () => void,\n options?: { injector: Injector },\n): void {\n onChange(source, value => (value ? onTrue() : onFalse()), options);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport {\n AfterRenderPhase,\n ElementRef,\n Renderer2,\n afterNextRender,\n inject,\n signal,\n} from '@angular/core';\n\n/**\n * Injects the dimensions of the element\n * @returns The dimensions of the element\n */\nexport function injectDimensions() {\n const renderer = inject(Renderer2);\n const element = inject<ElementRef<HTMLElement>>(ElementRef);\n const size = signal<{ width: number; height: number; mounted: boolean }>({\n width: 0,\n height: 0,\n mounted: false,\n });\n let transitionDuration: string | undefined, animationName: string | undefined;\n\n afterNextRender(\n () => {\n transitionDuration = element.nativeElement.style.transitionDuration;\n animationName = element.nativeElement.style.animationName;\n },\n { phase: AfterRenderPhase.EarlyRead },\n );\n\n afterNextRender(\n () => {\n // block any animations/transitions so the element renders at its full dimensions\n renderer.setStyle(element.nativeElement, 'transitionDuration', '0s');\n renderer.setStyle(element.nativeElement, 'animationName', 'none');\n },\n { phase: AfterRenderPhase.Write },\n );\n\n afterNextRender(\n () => {\n const { width, height } = element.nativeElement.getBoundingClientRect();\n size.set({ width, height, mounted: true });\n\n // restore the original transition duration and animation name\n renderer.setStyle(element.nativeElement, 'transitionDuration', transitionDuration);\n renderer.setStyle(element.nativeElement, 'animationName', animationName);\n },\n { phase: AfterRenderPhase.Read },\n );\n\n return size;\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport { injectDisposables } from './helpers/disposables';\nexport { FocusManager } from './helpers/focus-manager';\nexport { uniqueId } from './helpers/unique-id';\nexport { onBooleanChange, onChange } from './signals/async';\nexport { injectDimensions } from './ui/dimensions';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;;;;;AAMG;AAGH;;;;;;AAMG;SACa,iBAAiB,GAAA;AAC/B,IAAA,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IAEtC,OAAO;AACL;;;;;AAKG;AACH,QAAA,UAAU,EAAE,CAAC,QAAoB,EAAE,KAAa,KAAI;YAClD,MAAM,EAAE,GAAG,UAAU,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YACvC,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC,EAAE,CAAC,CAAC;AACvC,YAAA,UAAU,CAAC,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AAI,CAAC,CAAC;QACrE,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,EAAE,eAAe,EAAE,MAAM,CAAC,CAAC;KACnE,EACD,EAAE,KAAK,EAAE,gBAAgB,CAAC,KAAK,EAAE,CAClC,CAAC;IAEF,eAAe,CACb,MAAK;AACH,QAAA,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,qBAAqB,EAAE,CAAC;AACxE,QAAA,IAAI,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;;QAG3C,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,EAAE,oBAAoB,EAAE,kBAAkB,CAAC,CAAC;QACnF,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;KAC1E,EACD,EAAE,KAAK,EAAE,gBAAgB,CAAC,IAAI,EAAE,CACjC,CAAC;AAEF,IAAA,OAAO,IAAI,CAAC;AACd;;AC5DA;;;;;;AAMG;;ACNH;;AAEG;;;;"}
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Angular Primitives.
3
3
  * https://github.com/ng-primitives/ng-primitives
4
4
  *
5
- * This source code is licensed under the CC BY-ND 4.0 license found in the
5
+ * This source code is licensed under the Apache 2.0 license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  // this is required for the build to work
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives.mjs","sources":["../../../../packages/ng-primitives/src/index.ts","../../../../packages/ng-primitives/src/ng-primitives.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the CC BY-ND 4.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n// this is required for the build to work\nexport default null;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;;;;;AAMG;AAEH;AACA,YAAe,IAAI;;ACTnB;;AAEG"}
1
+ {"version":3,"file":"ng-primitives.mjs","sources":["../../../../packages/ng-primitives/src/index.ts","../../../../packages/ng-primitives/src/ng-primitives.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n// this is required for the build to work\nexport default null;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;;;;;AAMG;AAEH;AACA,YAAe,IAAI;;ACTnB;;AAEG"}
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Angular Primitives.
3
3
  * https://github.com/ng-primitives/ng-primitives
4
4
  *
5
- * This source code is licensed under the CC BY-ND 4.0 license found in the
5
+ * This source code is licensed under the Apache 2.0 license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  import { BooleanInput } from '@angular/cdk/coercion';
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Angular Primitives.
3
3
  * https://github.com/ng-primitives/ng-primitives
4
4
  *
5
- * This source code is licensed under the CC BY-ND 4.0 license found in the
5
+ * This source code is licensed under the Apache 2.0 license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  import { InjectionToken } from '@angular/core';
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Angular Primitives.
3
3
  * https://github.com/ng-primitives/ng-primitives
4
4
  *
5
- * This source code is licensed under the CC BY-ND 4.0 license found in the
5
+ * This source code is licensed under the Apache 2.0 license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  export { NgpFileUpload } from './file-upload/file-upload.directive';
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Angular Primitives.
3
3
  * https://github.com/ng-primitives/ng-primitives
4
4
  *
5
- * This source code is licensed under the CC BY-ND 4.0 license found in the
5
+ * This source code is licensed under the Apache 2.0 license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  import { InjectionToken } from '@angular/core';
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Angular Primitives.
3
3
  * https://github.com/ng-primitives/ng-primitives
4
4
  *
5
- * This source code is licensed under the CC BY-ND 4.0 license found in the
5
+ * This source code is licensed under the Apache 2.0 license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  export { NgpFocusTrap } from './focus-trap/focus-trap.directive';
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Angular Primitives.
3
3
  * https://github.com/ng-primitives/ng-primitives
4
4
  *
5
- * This source code is licensed under the CC BY-ND 4.0 license found in the
5
+ * This source code is licensed under the Apache 2.0 license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  import { InjectionToken } from '@angular/core';
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Angular Primitives.
3
3
  * https://github.com/ng-primitives/ng-primitives
4
4
  *
5
- * This source code is licensed under the CC BY-ND 4.0 license found in the
5
+ * This source code is licensed under the Apache 2.0 license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  import { OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Angular Primitives.
3
3
  * https://github.com/ng-primitives/ng-primitives
4
4
  *
5
- * This source code is licensed under the CC BY-ND 4.0 license found in the
5
+ * This source code is licensed under the Apache 2.0 license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  import { InjectionToken } from '@angular/core';
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Angular Primitives.
3
3
  * https://github.com/ng-primitives/ng-primitives
4
4
  *
5
- * This source code is licensed under the CC BY-ND 4.0 license found in the
5
+ * This source code is licensed under the Apache 2.0 license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  import { InjectionToken } from '@angular/core';
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Angular Primitives.
3
3
  * https://github.com/ng-primitives/ng-primitives
4
4
  *
5
- * This source code is licensed under the CC BY-ND 4.0 license found in the
5
+ * This source code is licensed under the Apache 2.0 license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  import { OnDestroy } from '@angular/core';
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Angular Primitives.
3
3
  * https://github.com/ng-primitives/ng-primitives
4
4
  *
5
- * This source code is licensed under the CC BY-ND 4.0 license found in the
5
+ * This source code is licensed under the Apache 2.0 license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  import { InjectionToken } from '@angular/core';
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Angular Primitives.
3
3
  * https://github.com/ng-primitives/ng-primitives
4
4
  *
5
- * This source code is licensed under the CC BY-ND 4.0 license found in the
5
+ * This source code is licensed under the Apache 2.0 license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  export { NgpFormField } from './form-field/form-field.directive';