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-roving-focus.mjs","sources":["../../../../packages/ng-primitives/roving-focus/src/roving-focus-group/roving-focus-group.token.ts","../../../../packages/ng-primitives/roving-focus/src/roving-focus-group/roving-focus-group.directive.ts","../../../../packages/ng-primitives/roving-focus/src/roving-focus-item/roving-focus-item.token.ts","../../../../packages/ng-primitives/roving-focus/src/roving-focus-item/roving-focus-item.directive.ts","../../../../packages/ng-primitives/roving-focus/src/index.ts","../../../../packages/ng-primitives/roving-focus/src/ng-primitives-roving-focus.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 { NgpRovingFocusGroup } from './roving-focus-group.directive';\n\nexport const NgpRovingFocusGroupToken = new InjectionToken<NgpRovingFocusGroup>(\n 'NgpRovingFocusGroupToken',\n);\n\n/**\n * Inject the RovingFocusGroup directive instance\n * @returns The RovingFocusGroup directive instance\n */\nexport function injectRovingFocusGroup(): NgpRovingFocusGroup {\n return inject(NgpRovingFocusGroupToken);\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 { Directionality } from '@angular/cdk/bidi';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, inject, input, model, signal } from '@angular/core';\nimport { injectOrientation, NgpCanOrientate, NgpOrientation } from 'ng-primitives/internal';\nimport { NgpRovingFocusItem } from '../roving-focus-item/roving-focus-item.directive';\nimport { NgpRovingFocusGroupToken } from './roving-focus-group.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpRovingFocusGroup]',\n exportAs: 'ngpRovingFocusGroup',\n providers: [{ provide: NgpRovingFocusGroupToken, useExisting: NgpRovingFocusGroup }],\n})\nexport class NgpRovingFocusGroup implements NgpCanOrientate {\n /**\n * Access the directionality service.\n */\n private readonly directionality = inject(Directionality);\n\n /**\n * Determine the orientation of the roving focus group.\n * @default 'vertical'\n */\n readonly orientation = model<NgpOrientation>('vertical', {\n alias: 'ngpRovingFocusGroupOrientation',\n });\n\n /**\n * Determine the orientation of the roving focus group.\n */\n readonly groupOrientation = injectOrientation(this.orientation);\n\n /**\n * Determine if focus should wrap when the end or beginning is reached.\n */\n readonly wrap = input<boolean, BooleanInput>(true, {\n alias: 'ngpRovingFocusGroupWrap',\n transform: booleanAttribute,\n });\n\n /**\n * Determine if the home and end keys should navigate to the first and last items.\n */\n readonly homeEnd = input<boolean, BooleanInput>(true, {\n alias: 'ngpRovingFocusGroupHomeEnd',\n transform: booleanAttribute,\n });\n\n /**\n * Determine if the roving focus group is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpRovingFocusGroupDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Store the items in the roving focus group.\n */\n private readonly items = signal<NgpRovingFocusItem[]>([]);\n\n /**\n * Get the items in the roving focus group sorted by order.\n */\n private get sortedItems() {\n return this.items().sort((a, b) => {\n // sort the items by their position in the document\n return a.elementRef.nativeElement.compareDocumentPosition(b.elementRef.nativeElement) &\n Node.DOCUMENT_POSITION_FOLLOWING\n ? -1\n : 1;\n });\n }\n\n /**\n * Store the active item in the roving focus group.\n * @internal\n */\n readonly activeItem = signal<NgpRovingFocusItem | null>(null);\n\n /**\n * Register an item with the roving focus group.\n * @param item The item to register\n * @internal\n */\n register(item: NgpRovingFocusItem): void {\n this.items.update(items => [...items, item]);\n\n // if there is no active item, make the first item the tabbable item\n if (!this.activeItem()) {\n this.activeItem.set(item);\n }\n }\n\n /**\n * Unregister an item with the roving focus group.\n * @param item The item to unregister\n * @internal\n */\n unregister(item: NgpRovingFocusItem): void {\n this.items.update(items => items.filter(i => i !== item));\n\n // check if the unregistered item is the active item\n if (this.activeItem() === item) {\n // if the active item is unregistered, activate the first item\n this.activeItem.set(this.items()[0] ?? null);\n }\n }\n\n /**\n * Activate an item in the roving focus group.\n * @param item The item to activate\n * @param origin The origin of the focus change\n */\n setActiveItem(item: NgpRovingFocusItem | null, origin: FocusOrigin = 'program'): void {\n this.activeItem.set(item);\n item?.focus(origin);\n }\n\n /**\n * Activate the first item in the roving focus group.\n * @param origin The origin of the focus change\n */\n private activateFirstItem(origin: FocusOrigin): void {\n // find the first item that is not disabled\n const item = this.sortedItems.find(i => !i.disabled()) ?? null;\n\n // set the first item as the active item\n this.setActiveItem(item, origin);\n }\n\n /**\n * Activate the last item in the roving focus group.\n * @param origin The origin of the focus change\n */\n private activateLastItem(origin: FocusOrigin): void {\n // find the last item that is not disabled\n const item = [...this.sortedItems].reverse().find(i => !i.disabled()) ?? null;\n\n // set the last item as the active item\n this.setActiveItem(item, origin);\n }\n\n /**\n * Activate the next item in the roving focus group.\n * @param origin The origin of the focus change\n */\n private activateNextItem(origin: FocusOrigin): void {\n const activeItem = this.activeItem();\n\n // if there is no active item, activate the first item\n if (!activeItem) {\n this.activateFirstItem(origin);\n return;\n }\n\n // find the index of the active item\n const index = this.sortedItems.indexOf(activeItem);\n\n // find the next item that is not disabled\n const item = this.sortedItems.slice(index + 1).find(i => !i.disabled()) ?? null;\n\n // if we are at the end of the list, wrap to the beginning\n if (!item && this.wrap()) {\n this.activateFirstItem(origin);\n return;\n }\n\n // if there is no next item, do nothing\n if (!item) {\n return;\n }\n\n // set the next item as the active item\n this.setActiveItem(item, origin);\n }\n\n /**\n * Activate the previous item in the roving focus group.\n * @param origin The origin of the focus change\n */\n private activatePreviousItem(origin: FocusOrigin): void {\n const activeItem = this.activeItem();\n\n // if there is no active item, activate the last item\n if (!activeItem) {\n this.activateLastItem(origin);\n return;\n }\n\n // find the index of the active item\n const index = this.sortedItems.indexOf(activeItem);\n\n // find the previous item that is not disabled\n const item =\n this.sortedItems\n .slice(0, index)\n .reverse()\n .find(i => !i.disabled()) ?? null;\n\n // if we are at the beginning of the list, wrap to the end\n if (!item && this.wrap()) {\n this.activateLastItem(origin);\n return;\n }\n\n // if there is no previous item, do nothing\n if (!item) {\n return;\n }\n\n // set the previous item as the active item\n this.setActiveItem(item, origin);\n }\n\n /**\n * Handle keyboard navigation for the roving focus group.\n * @param event The keyboard event\n * @internal\n */\n onKeydown(event: KeyboardEvent): void {\n if (this.disabled()) {\n return;\n }\n\n switch (event.key) {\n case 'ArrowUp':\n if (this.groupOrientation() === 'vertical') {\n event.preventDefault();\n this.activatePreviousItem('keyboard');\n }\n break;\n case 'ArrowDown':\n if (this.groupOrientation() === 'vertical') {\n event.preventDefault();\n this.activateNextItem('keyboard');\n }\n break;\n case 'ArrowLeft':\n if (this.groupOrientation() === 'horizontal') {\n event.preventDefault();\n\n if (this.directionality.value === 'ltr') {\n this.activatePreviousItem('keyboard');\n } else {\n this.activateNextItem('keyboard');\n }\n }\n break;\n case 'ArrowRight':\n if (this.groupOrientation() === 'horizontal') {\n event.preventDefault();\n\n if (this.directionality.value === 'ltr') {\n this.activateNextItem('keyboard');\n } else {\n this.activatePreviousItem('keyboard');\n }\n }\n break;\n case 'Home':\n if (this.homeEnd()) {\n event.preventDefault();\n this.activateFirstItem('keyboard');\n }\n break;\n case 'End':\n if (this.homeEnd()) {\n event.preventDefault();\n this.activateLastItem('keyboard');\n }\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 */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpRovingFocusItem } from './roving-focus-item.directive';\n\nexport const NgpRovingFocusItemToken = new InjectionToken<NgpRovingFocusItem>(\n 'NgpRovingFocusItemToken',\n);\n\n/**\n * Inject the RovingFocusItem directive instance\n * @returns The RovingFocusItem directive instance\n */\nexport function injectRovingFocusItem(): NgpRovingFocusItem {\n return inject(NgpRovingFocusItemToken);\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 { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport {\n Directive,\n ElementRef,\n HostListener,\n OnDestroy,\n OnInit,\n booleanAttribute,\n computed,\n inject,\n input,\n} from '@angular/core';\nimport { injectRovingFocusGroup } from '../roving-focus-group/roving-focus-group.token';\nimport { NgpRovingFocusItemToken } from './roving-focus-item.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpRovingFocusItem]',\n exportAs: 'ngpRovingFocusItem',\n providers: [{ provide: NgpRovingFocusItemToken, useExisting: NgpRovingFocusItem }],\n host: {\n '[attr.tabindex]': 'tabindex()',\n },\n})\nexport class NgpRovingFocusItem implements OnInit, OnDestroy {\n /**\n * Access the group the roving focus item belongs to.\n */\n private readonly group = injectRovingFocusGroup();\n\n /**\n * Access the focus monitor service.\n */\n private readonly focusMonitor = inject(FocusMonitor);\n\n /**\n * Access the element the roving focus item is attached to.\n */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Define if the item is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpRovingFocusItemDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Derive the tabindex of the roving focus item.\n */\n readonly tabindex = computed(() =>\n !this.group.disabled() && this.group.activeItem() === this ? 0 : -1,\n );\n\n /**\n * Initialize the roving focus item.\n */\n ngOnInit(): void {\n this.group.register(this);\n }\n\n /**\n * Clean up the roving focus item.\n */\n ngOnDestroy(): void {\n this.group.unregister(this);\n }\n\n /**\n * Forward the keydown event to the roving focus group.\n * @param event The keyboard event\n */\n @HostListener('keydown', ['$event'])\n protected onKeydown(event: KeyboardEvent): void {\n if (this.disabled()) {\n return;\n }\n\n this.group.onKeydown(event);\n }\n\n /**\n * Activate the roving focus item on click.\n */\n @HostListener('click')\n protected activate(): void {\n if (this.disabled()) {\n return;\n }\n\n this.group.setActiveItem(this, 'mouse');\n }\n\n /**\n * Focus the roving focus item.\n * @param origin The origin of the focus\n */\n focus(origin: FocusOrigin): void {\n this.focusMonitor.focusVia(this.elementRef, origin);\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 { NgpRovingFocusGroup } from './roving-focus-group/roving-focus-group.directive';\nexport {\n NgpRovingFocusGroupToken,\n injectRovingFocusGroup,\n} from './roving-focus-group/roving-focus-group.token';\nexport { NgpRovingFocusItem } from './roving-focus-item/roving-focus-item.directive';\nexport { NgpRovingFocusItemToken } from './roving-focus-item/roving-focus-item.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;;AAMG;MAIU,wBA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IAAI,EAAE;AACJ,wBAAA,iBAAiB,EAAE,YAAY;AAChC,qBAAA;AACF,iBAAA,CAAA;8BAmDW,SAAS,EAAA,CAAA;sBADlB,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC,CAAA;gBAazB,QAAQ,EAAA,CAAA;sBADjB,YAAY;uBAAC,OAAO,CAAA;;;AC7FvB;;;;;;AAMG;;ACNH;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-primitives-roving-focus.mjs","sources":["../../../../packages/ng-primitives/roving-focus/src/roving-focus-group/roving-focus-group.token.ts","../../../../packages/ng-primitives/roving-focus/src/roving-focus-group/roving-focus-group.directive.ts","../../../../packages/ng-primitives/roving-focus/src/roving-focus-item/roving-focus-item.token.ts","../../../../packages/ng-primitives/roving-focus/src/roving-focus-item/roving-focus-item.directive.ts","../../../../packages/ng-primitives/roving-focus/src/index.ts","../../../../packages/ng-primitives/roving-focus/src/ng-primitives-roving-focus.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 { NgpRovingFocusGroup } from './roving-focus-group.directive';\n\nexport const NgpRovingFocusGroupToken = new InjectionToken<NgpRovingFocusGroup>(\n 'NgpRovingFocusGroupToken',\n);\n\n/**\n * Inject the RovingFocusGroup directive instance\n * @returns The RovingFocusGroup directive instance\n */\nexport function injectRovingFocusGroup(): NgpRovingFocusGroup {\n return inject(NgpRovingFocusGroupToken);\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 { Directionality } from '@angular/cdk/bidi';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, inject, input, model, signal } from '@angular/core';\nimport { injectOrientation, NgpCanOrientate, NgpOrientation } from 'ng-primitives/internal';\nimport { NgpRovingFocusItem } from '../roving-focus-item/roving-focus-item.directive';\nimport { NgpRovingFocusGroupToken } from './roving-focus-group.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpRovingFocusGroup]',\n exportAs: 'ngpRovingFocusGroup',\n providers: [{ provide: NgpRovingFocusGroupToken, useExisting: NgpRovingFocusGroup }],\n})\nexport class NgpRovingFocusGroup implements NgpCanOrientate {\n /**\n * Access the directionality service.\n */\n private readonly directionality = inject(Directionality);\n\n /**\n * Determine the orientation of the roving focus group.\n * @default 'vertical'\n */\n readonly orientation = model<NgpOrientation>('vertical', {\n alias: 'ngpRovingFocusGroupOrientation',\n });\n\n /**\n * Determine the orientation of the roving focus group.\n */\n readonly groupOrientation = injectOrientation(this.orientation);\n\n /**\n * Determine if focus should wrap when the end or beginning is reached.\n */\n readonly wrap = input<boolean, BooleanInput>(true, {\n alias: 'ngpRovingFocusGroupWrap',\n transform: booleanAttribute,\n });\n\n /**\n * Determine if the home and end keys should navigate to the first and last items.\n */\n readonly homeEnd = input<boolean, BooleanInput>(true, {\n alias: 'ngpRovingFocusGroupHomeEnd',\n transform: booleanAttribute,\n });\n\n /**\n * Determine if the roving focus group is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpRovingFocusGroupDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Store the items in the roving focus group.\n */\n private readonly items = signal<NgpRovingFocusItem[]>([]);\n\n /**\n * Get the items in the roving focus group sorted by order.\n */\n private get sortedItems() {\n return this.items().sort((a, b) => {\n // sort the items by their position in the document\n return a.elementRef.nativeElement.compareDocumentPosition(b.elementRef.nativeElement) &\n Node.DOCUMENT_POSITION_FOLLOWING\n ? -1\n : 1;\n });\n }\n\n /**\n * Store the active item in the roving focus group.\n * @internal\n */\n readonly activeItem = signal<NgpRovingFocusItem | null>(null);\n\n /**\n * Register an item with the roving focus group.\n * @param item The item to register\n * @internal\n */\n register(item: NgpRovingFocusItem): void {\n this.items.update(items => [...items, item]);\n\n // if there is no active item, make the first item the tabbable item\n if (!this.activeItem()) {\n this.activeItem.set(item);\n }\n }\n\n /**\n * Unregister an item with the roving focus group.\n * @param item The item to unregister\n * @internal\n */\n unregister(item: NgpRovingFocusItem): void {\n this.items.update(items => items.filter(i => i !== item));\n\n // check if the unregistered item is the active item\n if (this.activeItem() === item) {\n // if the active item is unregistered, activate the first item\n this.activeItem.set(this.items()[0] ?? null);\n }\n }\n\n /**\n * Activate an item in the roving focus group.\n * @param item The item to activate\n * @param origin The origin of the focus change\n */\n setActiveItem(item: NgpRovingFocusItem | null, origin: FocusOrigin = 'program'): void {\n this.activeItem.set(item);\n item?.focus(origin);\n }\n\n /**\n * Activate the first item in the roving focus group.\n * @param origin The origin of the focus change\n */\n private activateFirstItem(origin: FocusOrigin): void {\n // find the first item that is not disabled\n const item = this.sortedItems.find(i => !i.disabled()) ?? null;\n\n // set the first item as the active item\n this.setActiveItem(item, origin);\n }\n\n /**\n * Activate the last item in the roving focus group.\n * @param origin The origin of the focus change\n */\n private activateLastItem(origin: FocusOrigin): void {\n // find the last item that is not disabled\n const item = [...this.sortedItems].reverse().find(i => !i.disabled()) ?? null;\n\n // set the last item as the active item\n this.setActiveItem(item, origin);\n }\n\n /**\n * Activate the next item in the roving focus group.\n * @param origin The origin of the focus change\n */\n private activateNextItem(origin: FocusOrigin): void {\n const activeItem = this.activeItem();\n\n // if there is no active item, activate the first item\n if (!activeItem) {\n this.activateFirstItem(origin);\n return;\n }\n\n // find the index of the active item\n const index = this.sortedItems.indexOf(activeItem);\n\n // find the next item that is not disabled\n const item = this.sortedItems.slice(index + 1).find(i => !i.disabled()) ?? null;\n\n // if we are at the end of the list, wrap to the beginning\n if (!item && this.wrap()) {\n this.activateFirstItem(origin);\n return;\n }\n\n // if there is no next item, do nothing\n if (!item) {\n return;\n }\n\n // set the next item as the active item\n this.setActiveItem(item, origin);\n }\n\n /**\n * Activate the previous item in the roving focus group.\n * @param origin The origin of the focus change\n */\n private activatePreviousItem(origin: FocusOrigin): void {\n const activeItem = this.activeItem();\n\n // if there is no active item, activate the last item\n if (!activeItem) {\n this.activateLastItem(origin);\n return;\n }\n\n // find the index of the active item\n const index = this.sortedItems.indexOf(activeItem);\n\n // find the previous item that is not disabled\n const item =\n this.sortedItems\n .slice(0, index)\n .reverse()\n .find(i => !i.disabled()) ?? null;\n\n // if we are at the beginning of the list, wrap to the end\n if (!item && this.wrap()) {\n this.activateLastItem(origin);\n return;\n }\n\n // if there is no previous item, do nothing\n if (!item) {\n return;\n }\n\n // set the previous item as the active item\n this.setActiveItem(item, origin);\n }\n\n /**\n * Handle keyboard navigation for the roving focus group.\n * @param event The keyboard event\n * @internal\n */\n onKeydown(event: KeyboardEvent): void {\n if (this.disabled()) {\n return;\n }\n\n switch (event.key) {\n case 'ArrowUp':\n if (this.groupOrientation() === 'vertical') {\n event.preventDefault();\n this.activatePreviousItem('keyboard');\n }\n break;\n case 'ArrowDown':\n if (this.groupOrientation() === 'vertical') {\n event.preventDefault();\n this.activateNextItem('keyboard');\n }\n break;\n case 'ArrowLeft':\n if (this.groupOrientation() === 'horizontal') {\n event.preventDefault();\n\n if (this.directionality.value === 'ltr') {\n this.activatePreviousItem('keyboard');\n } else {\n this.activateNextItem('keyboard');\n }\n }\n break;\n case 'ArrowRight':\n if (this.groupOrientation() === 'horizontal') {\n event.preventDefault();\n\n if (this.directionality.value === 'ltr') {\n this.activateNextItem('keyboard');\n } else {\n this.activatePreviousItem('keyboard');\n }\n }\n break;\n case 'Home':\n if (this.homeEnd()) {\n event.preventDefault();\n this.activateFirstItem('keyboard');\n }\n break;\n case 'End':\n if (this.homeEnd()) {\n event.preventDefault();\n this.activateLastItem('keyboard');\n }\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 */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpRovingFocusItem } from './roving-focus-item.directive';\n\nexport const NgpRovingFocusItemToken = new InjectionToken<NgpRovingFocusItem>(\n 'NgpRovingFocusItemToken',\n);\n\n/**\n * Inject the RovingFocusItem directive instance\n * @returns The RovingFocusItem directive instance\n */\nexport function injectRovingFocusItem(): NgpRovingFocusItem {\n return inject(NgpRovingFocusItemToken);\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 { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport {\n Directive,\n ElementRef,\n HostListener,\n OnDestroy,\n OnInit,\n booleanAttribute,\n computed,\n inject,\n input,\n} from '@angular/core';\nimport { injectRovingFocusGroup } from '../roving-focus-group/roving-focus-group.token';\nimport { NgpRovingFocusItemToken } from './roving-focus-item.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpRovingFocusItem]',\n exportAs: 'ngpRovingFocusItem',\n providers: [{ provide: NgpRovingFocusItemToken, useExisting: NgpRovingFocusItem }],\n host: {\n '[attr.tabindex]': 'tabindex()',\n },\n})\nexport class NgpRovingFocusItem implements OnInit, OnDestroy {\n /**\n * Access the group the roving focus item belongs to.\n */\n private readonly group = injectRovingFocusGroup();\n\n /**\n * Access the focus monitor service.\n */\n private readonly focusMonitor = inject(FocusMonitor);\n\n /**\n * Access the element the roving focus item is attached to.\n */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Define if the item is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpRovingFocusItemDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Derive the tabindex of the roving focus item.\n */\n readonly tabindex = computed(() =>\n !this.group.disabled() && this.group.activeItem() === this ? 0 : -1,\n );\n\n /**\n * Initialize the roving focus item.\n */\n ngOnInit(): void {\n this.group.register(this);\n }\n\n /**\n * Clean up the roving focus item.\n */\n ngOnDestroy(): void {\n this.group.unregister(this);\n }\n\n /**\n * Forward the keydown event to the roving focus group.\n * @param event The keyboard event\n */\n @HostListener('keydown', ['$event'])\n protected onKeydown(event: KeyboardEvent): void {\n if (this.disabled()) {\n return;\n }\n\n this.group.onKeydown(event);\n }\n\n /**\n * Activate the roving focus item on click.\n */\n @HostListener('click')\n protected activate(): void {\n if (this.disabled()) {\n return;\n }\n\n this.group.setActiveItem(this, 'mouse');\n }\n\n /**\n * Focus the roving focus item.\n * @param origin The origin of the focus\n */\n focus(origin: FocusOrigin): void {\n this.focusMonitor.focusVia(this.elementRef, origin);\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 { NgpRovingFocusGroup } from './roving-focus-group/roving-focus-group.directive';\nexport {\n NgpRovingFocusGroupToken,\n injectRovingFocusGroup,\n} from './roving-focus-group/roving-focus-group.token';\nexport { NgpRovingFocusItem } from './roving-focus-item/roving-focus-item.directive';\nexport { NgpRovingFocusItemToken } from './roving-focus-item/roving-focus-item.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;;AAMG;MAIU,wBAAwB,GAAG,IAAI,cAAc,CACxD,0BAA0B,EAC1B;AAEF;;;AAGG;SACa,sBAAsB,GAAA;AACpC,IAAA,OAAO,MAAM,CAAC,wBAAwB,CAAC,CAAC;AAC1C;;MCCa,mBAAmB,CAAA;AANhC,IAAA,WAAA,GAAA;AAOE;;AAEG;AACc,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AAEzD;;;AAGG;AACM,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAiB,UAAU,EAAE;AACvD,YAAA,KAAK,E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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 NgpSearchFieldToken = new InjectionToken('NgpSearchFieldToken');
@@ -23,7 +23,7 @@ function injectSearchField() {
23
23
  * Copyright © 2024 Angular Primitives.
24
24
  * https://github.com/ng-primitives/ng-primitives
25
25
  *
26
- * This source code is licensed under the CC BY-ND 4.0 license found in the
26
+ * This source code is licensed under the Apache 2.0 license found in the
27
27
  * LICENSE file in the root directory of this source tree.
28
28
  */
29
29
  class NgpSearchField {
@@ -64,7 +64,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
64
64
  * Copyright © 2024 Angular Primitives.
65
65
  * https://github.com/ng-primitives/ng-primitives
66
66
  *
67
- * This source code is licensed under the CC BY-ND 4.0 license found in the
67
+ * This source code is licensed under the Apache 2.0 license found in the
68
68
  * LICENSE file in the root directory of this source tree.
69
69
  */
70
70
 
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-search.mjs","sources":["../../../../packages/ng-primitives/search/src/search-field/search-field.token.ts","../../../../packages/ng-primitives/search/src/search-field/search-field.directive.ts","../../../../packages/ng-primitives/search/src/index.ts","../../../../packages/ng-primitives/search/src/ng-primitives-search.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 { NgpSearchField } from './search-field.directive';\n\nexport const NgpSearchFieldToken = new InjectionToken<NgpSearchField>('NgpSearchFieldToken');\n\n/**\n * Inject the SearchField directive instance\n */\nexport function injectSearchField(): NgpSearchField {\n return inject(NgpSearchFieldToken);\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 { computed, contentChild, Directive, HostListener } from '@angular/core';\nimport { NgpFormField } from 'ng-primitives/form-field';\nimport { NgpInputToken } from 'ng-primitives/input';\nimport { NgpSearchFieldToken } from './search-field.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpSearchField]',\n exportAs: 'ngpSearchField',\n providers: [{ provide: NgpSearchFieldToken, useExisting: NgpSearchField }],\n hostDirectives: [NgpFormField],\n host: {\n '[attr.data-empty]': 'empty()',\n },\n})\nexport class NgpSearchField {\n /**\n * Access the child input field.\n */\n protected readonly input = contentChild.required(NgpInputToken, { descendants: true });\n\n /**\n * Whether the input field is empty.\n */\n protected readonly empty = computed(() => this.input().value() === '');\n\n @HostListener('keydown.escape')\n protected clear(): void {\n this.input().element.nativeElement.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 { NgpSearchField } from './search-field/search-field.directive';\nexport { NgpSearchFieldToken } from './search-field/search-field.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;;AAMG;MAIU,mBAAmB,GAAG,IAAI,cAAc,CAAiB,qBAAqB,EAAE;AAE7F;;AAEG;SACa,iBAAiB,GAAA;AAC/B,IAAA,OAAO,MAAM,CAAC,mBAAmB,CAAC,CAAC;AACrC;;ACjBA;;;;;;AAMG;MAgBU,cAAc,CAAA;AAV3B,IAAA,WAAA,GAAA;AAWE;;AAEG;AACgB,QAAA,IAAA,CAAA,KAAK,GAAG,YAAY,CAAC,QAAQ,CAAC,aAAa,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;AAEvF;;AAEG;AACgB,QAAA,IAAA,CAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,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C;AAC9B,oBAAA,IAAI,EAAE;AACJ,wBAAA,mBAAmB,EAAE,SAAS;AAC/B,qBAAA;AACF,iBAAA,CAAA;8BAaW,KAAK,EAAA,CAAA;sBADd,YAAY;uBAAC,gBAAgB,CAAA;;;ACjChC;;;;;;AAMG;;ACNH;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-primitives-search.mjs","sources":["../../../../packages/ng-primitives/search/src/search-field/search-field.token.ts","../../../../packages/ng-primitives/search/src/search-field/search-field.directive.ts","../../../../packages/ng-primitives/search/src/index.ts","../../../../packages/ng-primitives/search/src/ng-primitives-search.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 { NgpSearchField } from './search-field.directive';\n\nexport const NgpSearchFieldToken = new InjectionToken<NgpSearchField>('NgpSearchFieldToken');\n\n/**\n * Inject the SearchField directive instance\n */\nexport function injectSearchField(): NgpSearchField {\n return inject(NgpSearchFieldToken);\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 { computed, contentChild, Directive, HostListener } from '@angular/core';\nimport { NgpFormField } from 'ng-primitives/form-field';\nimport { NgpInputToken } from 'ng-primitives/input';\nimport { NgpSearchFieldToken } from './search-field.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpSearchField]',\n exportAs: 'ngpSearchField',\n providers: [{ provide: NgpSearchFieldToken, useExisting: NgpSearchField }],\n hostDirectives: [NgpFormField],\n host: {\n '[attr.data-empty]': 'empty()',\n },\n})\nexport class NgpSearchField {\n /**\n * Access the child input field.\n */\n protected readonly input = contentChild.required(NgpInputToken, { descendants: true });\n\n /**\n * Whether the input field is empty.\n */\n protected readonly empty = computed(() => this.input().value() === '');\n\n @HostListener('keydown.escape')\n protected clear(): void {\n this.input().element.nativeElement.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 { NgpSearchField } from './search-field/search-field.directive';\nexport { NgpSearchFieldToken } from './search-field/search-field.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;;AAMG;MAIU,mBAAmB,GAAG,IAAI,cAAc,CAAiB,qBAAqB,EAAE;AAE7F;;AAEG;SACa,iBAAiB,GAAA;AAC/B,IAAA,OAAO,MAAM,CAAC,mBAAmB,CAAC,CAAC;AACrC;;ACjBA;;;;;;AAMG;MAgBU,cAAc,CAAA;AAV3B,IAAA,WAAA,GAAA;AAWE;;AAEG;AACgB,QAAA,IAAA,CAAA,KAAK,GAAG,YAAY,CAAC,QAAQ,CAAC,aAAa,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;AAEvF;;AAEG;AACgB,QAAA,IAAA,CAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;AAMxE,KAAA;IAHW,KAAK,GAAA;QACb,IAAI,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,GAAG,EAAE,CAAC;KAC/C;8GAdU,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,cAAc,EANd,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,gBAAA,EAAA,SAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,EAAA,EAAA,SAAA,EAAA,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,6DAUzB,aAAa,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAJnD,cAAc,EAAA,UAAA,EAAA,CAAA;kBAV1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,QAAQ,EAAE,gBAAgB;oBAC1B,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAgB,cAAA,EAAE,CAAC;oBAC1E,cAAc,EAAE,CAAC,YAAY,CAAC;AAC9B,oBAAA,IAAI,EAAE;AACJ,wBAAA,mBAAmB,EAAE,SAAS;AAC/B,qBAAA;AACF,iBAAA,CAAA;8BAaW,KAAK,EAAA,CAAA;sBADd,YAAY;uBAAC,gBAAgB,CAAA;;;ACjChC;;;;;;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 NgpSelectToken = new InjectionToken('NgpSelectToken');
@@ -58,7 +58,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
58
58
  * Copyright © 2024 Angular Primitives.
59
59
  * https://github.com/ng-primitives/ng-primitives
60
60
  *
61
- * This source code is licensed under the CC BY-ND 4.0 license found in the
61
+ * This source code is licensed under the Apache 2.0 license found in the
62
62
  * LICENSE file in the root directory of this source tree.
63
63
  */
64
64
 
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-select.mjs","sources":["../../../../packages/ng-primitives/select/src/select/select.token.ts","../../../../packages/ng-primitives/select/src/select/select.directive.ts","../../../../packages/ng-primitives/select/src/index.ts","../../../../packages/ng-primitives/select/src/ng-primitives-select.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 { NgpSelect } from './select.directive';\n\nexport const NgpSelectToken = new InjectionToken<NgpSelect>('NgpSelectToken');\n\n/**\n * Inject the Select directive instance\n */\nexport function injectSelect(): NgpSelect {\n return inject(NgpSelectToken);\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 { NgpFocusVisible, NgpHover, NgpPress } from 'ng-primitives/interactions';\nimport { NgpCanDisable, NgpDisabledToken } from 'ng-primitives/internal';\nimport { NgpSelectToken } from './select.token';\n\n@Directive({\n standalone: true,\n selector: 'select[ngpSelect]',\n exportAs: 'ngpSelect',\n providers: [\n { provide: NgpSelectToken, useExisting: NgpSelect },\n { provide: NgpDisabledToken, useExisting: NgpSelect },\n ],\n hostDirectives: [NgpFormControl, NgpFocusVisible, NgpHover, NgpPress],\n host: {\n '[attr.disabled]': 'disabled() || null',\n },\n})\nexport class NgpSelect implements NgpCanDisable {\n /**\n * Whether the select is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpSelectDisabled',\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 { NgpSelect } from './select/select.directive';\nexport { NgpSelectToken } from './select/select.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;AAMG;MAIU,cAAc,GAAG,IAAI,cAAc,CAAY,gBAAgB,EAAE;AAE9E;;AAEG;SACa,YAAY,GAAA;AAC1B,IAAA,OAAO,MAAM,CAAC,cAAc,CAAC,CAAC;AAChC;;MCUa,SAAS,CAAA;AAbtB,IAAA,WAAA,GAAA;AAcE;;AAEG;AACM,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,KAAK,EAAE;AACtD,YAAA,KAAK,EAAE,mBAAmB;AAC1B,YAAA,SAAS,EAAE,gBAAgB;AAC5B,SAAA,CAAC,CAAC;AACJ,KAAA;8GARY,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAT,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,SAAS,EATT,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,oBAAA,EAAA,EAAA,EAAA,SAAA,EAAA;AACT,YAAA,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE;AACnD,YAAA,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,SAAS,EAAE;AACtD,SAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,cAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,eAAA,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;;2FAMU,SAAS,EAAA,UAAA,EAAA,CAAA;kBAbrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,WAAW,EAAE;AACnD,wBAAA,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,WAAW,EAAE;AACtD,qBAAA;oBACD,cAAc,EAAE,CAAC,cAAc,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,CAAC;AACrE,oBAAA,IAAI,EAAE;AACJ,wBAAA,iBAAiB,EAAE,oBAAoB;AACxC,qBAAA;AACF,iBAAA,CAAA;;;AC1BD;;;;;;AAMG;;ACNH;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-primitives-select.mjs","sources":["../../../../packages/ng-primitives/select/src/select/select.token.ts","../../../../packages/ng-primitives/select/src/select/select.directive.ts","../../../../packages/ng-primitives/select/src/index.ts","../../../../packages/ng-primitives/select/src/ng-primitives-select.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 { NgpSelect } from './select.directive';\n\nexport const NgpSelectToken = new InjectionToken<NgpSelect>('NgpSelectToken');\n\n/**\n * Inject the Select directive instance\n */\nexport function injectSelect(): NgpSelect {\n return inject(NgpSelectToken);\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 { NgpFocusVisible, NgpHover, NgpPress } from 'ng-primitives/interactions';\nimport { NgpCanDisable, NgpDisabledToken } from 'ng-primitives/internal';\nimport { NgpSelectToken } from './select.token';\n\n@Directive({\n standalone: true,\n selector: 'select[ngpSelect]',\n exportAs: 'ngpSelect',\n providers: [\n { provide: NgpSelectToken, useExisting: NgpSelect },\n { provide: NgpDisabledToken, useExisting: NgpSelect },\n ],\n hostDirectives: [NgpFormControl, NgpFocusVisible, NgpHover, NgpPress],\n host: {\n '[attr.disabled]': 'disabled() || null',\n },\n})\nexport class NgpSelect implements NgpCanDisable {\n /**\n * Whether the select is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpSelectDisabled',\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 { NgpSelect } from './select/select.directive';\nexport { NgpSelectToken } from './select/select.token';\n","/**\n * Generated bundle index. Do not edit.\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,EAAA,SAAA,EAAA,EAAA,CAAA,eAAA,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;;2FAMU,SAAS,EAAA,UAAA,EAAA,CAAA;kBAbrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,WAAW,EAAE;AACnD,wBAAA,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,WAAW,EAAE;AACtD,qBAAA;oBACD,cAAc,EAAE,CAAC,cAAc,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,CAAC;AACrE,oBAAA,IAAI,EAAE;AACJ,wBAAA,iBAAiB,EAAE,oBAAoB;AACxC,qBAAA;AACF,iBAAA,CAAA;;;AC1BD;;;;;;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 NgpSliderToken = new InjectionToken('NgpSliderToken');
@@ -25,7 +25,7 @@ function injectSlider() {
25
25
  * Copyright © 2024 Angular Primitives.
26
26
  * https://github.com/ng-primitives/ng-primitives
27
27
  *
28
- * This source code is licensed under the CC BY-ND 4.0 license found in the
28
+ * This source code is licensed under the Apache 2.0 license found in the
29
29
  * LICENSE file in the root directory of this source tree.
30
30
  */
31
31
  const NgpSliderRangeToken = new InjectionToken('NgpSliderRangeToken');
@@ -40,7 +40,7 @@ function injectSliderRange() {
40
40
  * Copyright © 2024 Angular Primitives.
41
41
  * https://github.com/ng-primitives/ng-primitives
42
42
  *
43
- * This source code is licensed under the CC BY-ND 4.0 license found in the
43
+ * This source code is licensed under the Apache 2.0 license found in the
44
44
  * LICENSE file in the root directory of this source tree.
45
45
  */
46
46
  class NgpSliderRange {
@@ -73,7 +73,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
73
73
  * Copyright © 2024 Angular Primitives.
74
74
  * https://github.com/ng-primitives/ng-primitives
75
75
  *
76
- * This source code is licensed under the CC BY-ND 4.0 license found in the
76
+ * This source code is licensed under the Apache 2.0 license found in the
77
77
  * LICENSE file in the root directory of this source tree.
78
78
  */
79
79
  const NgpSliderThumbToken = new InjectionToken('NgpSliderThumbToken');
@@ -88,7 +88,7 @@ function injectSliderThumb() {
88
88
  * Copyright © 2024 Angular Primitives.
89
89
  * https://github.com/ng-primitives/ng-primitives
90
90
  *
91
- * This source code is licensed under the CC BY-ND 4.0 license found in the
91
+ * This source code is licensed under the Apache 2.0 license found in the
92
92
  * LICENSE file in the root directory of this source tree.
93
93
  */
94
94
  class NgpSliderThumb {
@@ -194,7 +194,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
194
194
  * Copyright © 2024 Angular Primitives.
195
195
  * https://github.com/ng-primitives/ng-primitives
196
196
  *
197
- * This source code is licensed under the CC BY-ND 4.0 license found in the
197
+ * This source code is licensed under the Apache 2.0 license found in the
198
198
  * LICENSE file in the root directory of this source tree.
199
199
  */
200
200
  const NgpSliderTrackToken = new InjectionToken('NgpSliderTrackToken');
@@ -209,7 +209,7 @@ function injectSliderTrack() {
209
209
  * Copyright © 2024 Angular Primitives.
210
210
  * https://github.com/ng-primitives/ng-primitives
211
211
  *
212
- * This source code is licensed under the CC BY-ND 4.0 license found in the
212
+ * This source code is licensed under the Apache 2.0 license found in the
213
213
  * LICENSE file in the root directory of this source tree.
214
214
  */
215
215
  class NgpSliderTrack {
@@ -337,7 +337,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
337
337
  * Copyright © 2024 Angular Primitives.
338
338
  * https://github.com/ng-primitives/ng-primitives
339
339
  *
340
- * This source code is licensed under the CC BY-ND 4.0 license found in the
340
+ * This source code is licensed under the Apache 2.0 license found in the
341
341
  * LICENSE file in the root directory of this source tree.
342
342
  */
343
343
 
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-slider.mjs","sources":["../../../../packages/ng-primitives/slider/src/slider/slider.token.ts","../../../../packages/ng-primitives/slider/src/slider-range/slider-range.token.ts","../../../../packages/ng-primitives/slider/src/slider-range/slider-range.directive.ts","../../../../packages/ng-primitives/slider/src/slider-thumb/slider-thumb.token.ts","../../../../packages/ng-primitives/slider/src/slider-thumb/slider-thumb.directive.ts","../../../../packages/ng-primitives/slider/src/slider-track/slider-track.token.ts","../../../../packages/ng-primitives/slider/src/slider-track/slider-track.directive.ts","../../../../packages/ng-primitives/slider/src/slider/slider.directive.ts","../../../../packages/ng-primitives/slider/src/index.ts","../../../../packages/ng-primitives/slider/src/ng-primitives-slider.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 { NgpSlider } from './slider.directive';\n\nexport const NgpSliderToken = new InjectionToken<NgpSlider>('NgpSliderToken');\n\n/**\n * Inject the Slider directive instance\n */\nexport function injectSlider(): NgpSlider {\n return inject(NgpSliderToken);\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 { NgpSliderRange } from './slider-range.directive';\n\nexport const NgpSliderRangeToken = new InjectionToken<NgpSliderRange>('NgpSliderRangeToken');\n\n/**\n * Inject the SliderRange directive instance\n */\nexport function injectSliderRange(): NgpSliderRange {\n return inject(NgpSliderRangeToken);\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 { injectSlider } from '../slider/slider.token';\nimport { NgpSliderRangeToken } from './slider-range.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpSliderRange]',\n exportAs: 'ngpSliderRange',\n providers: [{ provide: NgpSliderRangeToken, useExisting: NgpSliderRange }],\n host: {\n '[attr.data-orientation]': 'slider.orientation()',\n '[attr.data-disabled]': 'slider.disabled()',\n '[style.width.%]': 'slider.orientation() === \"horizontal\" ? slider.percentage() : undefined',\n '[style.height.%]': 'slider.orientation() === \"vertical\" ? slider.percentage() : undefined',\n },\n})\nexport class NgpSliderRange {\n /**\n * Access the slider.\n */\n protected readonly slider = injectSlider();\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 { NgpSliderThumb } from './slider-thumb.directive';\n\nexport const NgpSliderThumbToken = new InjectionToken<NgpSliderThumb>('NgpSliderThumbToken');\n\n/**\n * Inject the SliderThumb directive instance\n */\nexport function injectSliderThumb(): NgpSliderThumb {\n return inject(NgpSliderThumbToken);\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, HostListener } from '@angular/core';\nimport { NgpFocusVisible, NgpHover, NgpPress } from 'ng-primitives/interactions';\nimport { injectSlider } from '../slider/slider.token';\nimport { NgpSliderThumbToken } from './slider-thumb.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpSliderThumb]',\n exportAs: 'ngpSliderThumb',\n providers: [{ provide: NgpSliderThumbToken, useExisting: NgpSliderThumb }],\n host: {\n role: 'slider',\n '[attr.aria-valuemin]': 'slider.min()',\n '[attr.aria-valuemax]': 'slider.max()',\n '[attr.aria-valuenow]': 'slider.value()',\n '[attr.aria-orientation]': 'slider.orientation()',\n '[tabindex]': 'slider.disabled() ? -1 : 0',\n '[attr.data-orientation]': 'slider.orientation()',\n '[attr.data-disabled]': 'slider.disabled()',\n '[style.inset-inline-start.%]':\n 'slider.orientation() === \"horizontal\" ? slider.percentage() : undefined',\n '[style.inset-block-start.%]':\n 'slider.orientation() === \"vertical\" ? slider.percentage() : undefined',\n },\n hostDirectives: [NgpHover, NgpFocusVisible, NgpPress],\n})\nexport class NgpSliderThumb {\n /**\n * Access the slider.\n */\n protected readonly slider = injectSlider();\n\n /**\n * Store the dragging state.\n */\n protected dragging = false;\n\n @HostListener('pointerdown', ['$event'])\n protected handlePointerDown(event: PointerEvent): void {\n event.preventDefault();\n\n if (this.slider.disabled()) {\n return;\n }\n\n this.dragging = true;\n }\n\n @HostListener('document:pointerup')\n protected handlePointerUp(): void {\n if (this.slider.disabled()) {\n return;\n }\n\n this.dragging = false;\n }\n\n @HostListener('document:pointermove', ['$event'])\n protected handlePointerMove(event: PointerEvent): void {\n if (this.slider.disabled() || !this.dragging) {\n return;\n }\n\n const rect = this.slider.track()?.element.nativeElement.getBoundingClientRect();\n\n if (!rect) {\n return;\n }\n\n const percentage =\n this.slider.orientation() === 'horizontal'\n ? (event.clientX - rect.left) / rect.width\n : 1 - (event.clientY - rect.top) / rect.height;\n\n this.slider.value.set(\n this.slider.min() +\n (this.slider.max() - this.slider.min()) * Math.max(0, Math.min(1, percentage)),\n );\n }\n\n /**\n * Handle keyboard events.\n * @param event\n */\n @HostListener('keydown', ['$event'])\n protected handleKeydown(event: KeyboardEvent): void {\n const multiplier = event.shiftKey ? 10 : 1;\n\n switch (event.key) {\n case 'ArrowLeft':\n case 'ArrowDown':\n this.slider.value.update(value =>\n Math.max(value - this.slider.step() * multiplier, this.slider.min()),\n );\n break;\n case 'ArrowRight':\n case 'ArrowUp':\n this.slider.value.update(value =>\n Math.min(value + this.slider.step() * multiplier, this.slider.max()),\n );\n break;\n case 'Home':\n this.slider.value.set(this.slider.min());\n break;\n case 'End':\n this.slider.value.set(this.slider.max());\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 */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpSliderTrack } from './slider-track.directive';\n\nexport const NgpSliderTrackToken = new InjectionToken<NgpSliderTrack>('NgpSliderTrackToken');\n\n/**\n * Inject the SliderTrack directive instance\n */\nexport function injectSliderTrack(): NgpSliderTrack {\n return inject(NgpSliderTrackToken);\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, HostListener, inject } from '@angular/core';\nimport { injectSlider } from '../slider/slider.token';\nimport { NgpSliderTrackToken } from './slider-track.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpSliderTrack]',\n exportAs: 'ngpSliderTrack',\n providers: [{ provide: NgpSliderTrackToken, useExisting: NgpSliderTrack }],\n host: {\n '[attr.data-orientation]': 'slider.orientation()',\n '[attr.data-disabled]': 'slider.disabled()',\n },\n})\nexport class NgpSliderTrack {\n /**\n * Access the slider.\n */\n protected readonly slider = injectSlider();\n\n /**\n * The element that represents the slider track.\n */\n readonly element = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * When the slider track is clicked, update the value.\n * @param event The click event.\n */\n @HostListener('pointerdown', ['$event'])\n protected handlePointerDown(event: PointerEvent): void {\n if (this.slider.disabled()) {\n return;\n }\n\n // get the position the click occurred within the slider track\n const position = this.slider.orientation() === 'horizontal' ? event.clientX : event.clientY;\n const rect = this.element.nativeElement.getBoundingClientRect();\n const percentage =\n (position - (this.slider.orientation() === 'horizontal' ? rect.left : rect.top)) /\n (this.slider.orientation() === 'horizontal' ? rect.width : rect.height);\n\n // update the value based on the position\n this.slider.value.set(this.slider.min() + (this.slider.max() - this.slider.min()) * percentage);\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 { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n Directive,\n booleanAttribute,\n computed,\n contentChild,\n input,\n model,\n numberAttribute,\n} from '@angular/core';\nimport { NgpFormControl } from 'ng-primitives/form-field';\nimport { NgpCanDisable, NgpDisabledToken } from 'ng-primitives/internal';\nimport { NgpSliderTrackToken } from '../slider-track/slider-track.token';\nimport { NgpSliderToken } from './slider.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpSlider]',\n exportAs: 'ngpSlider',\n providers: [\n { provide: NgpSliderToken, useExisting: NgpSlider },\n { provide: NgpDisabledToken, useExisting: NgpSlider },\n ],\n hostDirectives: [NgpFormControl],\n host: {\n '[attr.data-orientation]': 'orientation()',\n },\n})\nexport class NgpSlider implements NgpCanDisable {\n /**\n * The value of the slider.\n */\n readonly value = model<number>(0, {\n alias: 'ngpSliderValue',\n });\n\n /**\n * The minimum value of the slider.\n */\n readonly min = input<number, NumberInput>(0, {\n alias: 'ngpSliderMin',\n transform: numberAttribute,\n });\n\n /**\n * The maximum value of the slider.\n */\n readonly max = input<number, NumberInput>(100, {\n alias: 'ngpSliderMax',\n transform: numberAttribute,\n });\n\n /**\n * The step value of the slider.\n */\n readonly step = input<number, NumberInput>(1, {\n alias: 'ngpSliderStep',\n transform: numberAttribute,\n });\n\n /**\n * The orientation of the slider.\n */\n readonly orientation = input<'horizontal' | 'vertical'>('horizontal', {\n alias: 'ngpSliderOrientation',\n });\n\n /**\n * The disabled state of the slider.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpSliderDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Access the slider track.\n */\n readonly track = contentChild(NgpSliderTrackToken);\n\n /**\n * The value as a percentage based on the min and max values.\n */\n protected readonly percentage = computed(\n () => ((this.value() - this.min()) / (this.max() - this.min())) * 100,\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 { NgpSliderRange } from './slider-range/slider-range.directive';\nexport { NgpSliderRangeToken } from './slider-range/slider-range.token';\nexport { NgpSliderThumb } from './slider-thumb/slider-thumb.directive';\nexport { NgpSliderThumbToken } from './slider-thumb/slider-thumb.token';\nexport { NgpSliderTrack } from './slider-track/slider-track.directive';\nexport { NgpSliderTrackToken } from './slider-track/slider-track.token';\nexport { NgpSlider } from './slider/slider.directive';\nexport { NgpSliderToken } from './slider/slider.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;AAAA;;;;;;AAMG;MAIU,cAAc,GAAG,IAAI,cAAc,CAAY,gBAAgB,EAAE;AAE9E;;AAEG;SACa,YAAY,GAAA;AAC1B,IAAA,OAAO,MAAM,CAAC,cAAc,CAAC,CAAC;AAChC;;ACjBA;;;;;;AAMG;MAIU,mBAAmB,GAAG,IAAI,cAAc,CAAiB,qBAAqB,EAAE;AAE7F;;AAEG;SACa,iBAAiB,GAAA;AAC/B,IAAA,OAAO,MAAM,CAAC,mBAAmB,CAAC,CAAC;AACrC;;ACjBA;;;;;;AAMG;MAiBU,cAAc,CAAA;AAZ3B,IAAA,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kBAbrB,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,gBAAgB,EAAE,WAAW,WAAW,EAAE;AACtD,qBAAA;oBACD,cAAc,EAAE,CAAC,cAAc,CAAC;AAChC,oBAAA,IAAI,EAAE;AACJ,wBAAA,yBAAyB,EAAE,eAAe;AAC3C,qBAAA;AACF,iBAAA,CAAA;;;AClCD;;;;;;AAMG;;ACNH;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-primitives-slider.mjs","sources":["../../../../packages/ng-primitives/slider/src/slider/slider.token.ts","../../../../packages/ng-primitives/slider/src/slider-range/slider-range.token.ts","../../../../packages/ng-primitives/slider/src/slider-range/slider-range.directive.ts","../../../../packages/ng-primitives/slider/src/slider-thumb/slider-thumb.token.ts","../../../../packages/ng-primitives/slider/src/slider-thumb/slider-thumb.directive.ts","../../../../packages/ng-primitives/slider/src/slider-track/slider-track.token.ts","../../../../packages/ng-primitives/slider/src/slider-track/slider-track.directive.ts","../../../../packages/ng-primitives/slider/src/slider/slider.directive.ts","../../../../packages/ng-primitives/slider/src/index.ts","../../../../packages/ng-primitives/slider/src/ng-primitives-slider.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 { NgpSlider } from './slider.directive';\n\nexport const NgpSliderToken = new InjectionToken<NgpSlider>('NgpSliderToken');\n\n/**\n * Inject the Slider directive instance\n */\nexport function injectSlider(): NgpSlider {\n return inject(NgpSliderToken);\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 { NgpSliderRange } from './slider-range.directive';\n\nexport const NgpSliderRangeToken = new InjectionToken<NgpSliderRange>('NgpSliderRangeToken');\n\n/**\n * Inject the SliderRange directive instance\n */\nexport function injectSliderRange(): NgpSliderRange {\n return inject(NgpSliderRangeToken);\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 { injectSlider } from '../slider/slider.token';\nimport { NgpSliderRangeToken } from './slider-range.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpSliderRange]',\n exportAs: 'ngpSliderRange',\n providers: [{ provide: NgpSliderRangeToken, useExisting: NgpSliderRange }],\n host: {\n '[attr.data-orientation]': 'slider.orientation()',\n '[attr.data-disabled]': 'slider.disabled()',\n '[style.width.%]': 'slider.orientation() === \"horizontal\" ? slider.percentage() : undefined',\n '[style.height.%]': 'slider.orientation() === \"vertical\" ? slider.percentage() : undefined',\n },\n})\nexport class NgpSliderRange {\n /**\n * Access the slider.\n */\n protected readonly slider = injectSlider();\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 { NgpSliderThumb } from './slider-thumb.directive';\n\nexport const NgpSliderThumbToken = new InjectionToken<NgpSliderThumb>('NgpSliderThumbToken');\n\n/**\n * Inject the SliderThumb directive instance\n */\nexport function injectSliderThumb(): NgpSliderThumb {\n return inject(NgpSliderThumbToken);\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, HostListener } from '@angular/core';\nimport { NgpFocusVisible, NgpHover, NgpPress } from 'ng-primitives/interactions';\nimport { injectSlider } from '../slider/slider.token';\nimport { NgpSliderThumbToken } from './slider-thumb.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpSliderThumb]',\n exportAs: 'ngpSliderThumb',\n providers: [{ provide: NgpSliderThumbToken, useExisting: NgpSliderThumb }],\n host: {\n role: 'slider',\n '[attr.aria-valuemin]': 'slider.min()',\n '[attr.aria-valuemax]': 'slider.max()',\n '[attr.aria-valuenow]': 'slider.value()',\n '[attr.aria-orientation]': 'slider.orientation()',\n '[tabindex]': 'slider.disabled() ? -1 : 0',\n '[attr.data-orientation]': 'slider.orientation()',\n '[attr.data-disabled]': 'slider.disabled()',\n '[style.inset-inline-start.%]':\n 'slider.orientation() === \"horizontal\" ? slider.percentage() : undefined',\n '[style.inset-block-start.%]':\n 'slider.orientation() === \"vertical\" ? slider.percentage() : undefined',\n },\n hostDirectives: [NgpHover, NgpFocusVisible, NgpPress],\n})\nexport class NgpSliderThumb {\n /**\n * Access the slider.\n */\n protected readonly slider = injectSlider();\n\n /**\n * Store the dragging state.\n */\n protected dragging = false;\n\n @HostListener('pointerdown', ['$event'])\n protected handlePointerDown(event: PointerEvent): void {\n event.preventDefault();\n\n if (this.slider.disabled()) {\n return;\n }\n\n this.dragging = true;\n }\n\n @HostListener('document:pointerup')\n protected handlePointerUp(): void {\n if (this.slider.disabled()) {\n return;\n }\n\n this.dragging = false;\n }\n\n @HostListener('document:pointermove', ['$event'])\n protected handlePointerMove(event: PointerEvent): void {\n if (this.slider.disabled() || !this.dragging) {\n return;\n }\n\n const rect = this.slider.track()?.element.nativeElement.getBoundingClientRect();\n\n if (!rect) {\n return;\n }\n\n const percentage =\n this.slider.orientation() === 'horizontal'\n ? (event.clientX - rect.left) / rect.width\n : 1 - (event.clientY - rect.top) / rect.height;\n\n this.slider.value.set(\n this.slider.min() +\n (this.slider.max() - this.slider.min()) * Math.max(0, Math.min(1, percentage)),\n );\n }\n\n /**\n * Handle keyboard events.\n * @param event\n */\n @HostListener('keydown', ['$event'])\n protected handleKeydown(event: KeyboardEvent): void {\n const multiplier = event.shiftKey ? 10 : 1;\n\n switch (event.key) {\n case 'ArrowLeft':\n case 'ArrowDown':\n this.slider.value.update(value =>\n Math.max(value - this.slider.step() * multiplier, this.slider.min()),\n );\n break;\n case 'ArrowRight':\n case 'ArrowUp':\n this.slider.value.update(value =>\n Math.min(value + this.slider.step() * multiplier, this.slider.max()),\n );\n break;\n case 'Home':\n this.slider.value.set(this.slider.min());\n break;\n case 'End':\n this.slider.value.set(this.slider.max());\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 */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpSliderTrack } from './slider-track.directive';\n\nexport const NgpSliderTrackToken = new InjectionToken<NgpSliderTrack>('NgpSliderTrackToken');\n\n/**\n * Inject the SliderTrack directive instance\n */\nexport function injectSliderTrack(): NgpSliderTrack {\n return inject(NgpSliderTrackToken);\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, HostListener, inject } from '@angular/core';\nimport { injectSlider } from '../slider/slider.token';\nimport { NgpSliderTrackToken } from './slider-track.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpSliderTrack]',\n exportAs: 'ngpSliderTrack',\n providers: [{ provide: NgpSliderTrackToken, useExisting: NgpSliderTrack }],\n host: {\n '[attr.data-orientation]': 'slider.orientation()',\n '[attr.data-disabled]': 'slider.disabled()',\n },\n})\nexport class NgpSliderTrack {\n /**\n * Access the slider.\n */\n protected readonly slider = injectSlider();\n\n /**\n * The element that represents the slider track.\n */\n readonly element = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * When the slider track is clicked, update the value.\n * @param event The click event.\n */\n @HostListener('pointerdown', ['$event'])\n protected handlePointerDown(event: PointerEvent): void {\n if (this.slider.disabled()) {\n return;\n }\n\n // get the position the click occurred within the slider track\n const position = this.slider.orientation() === 'horizontal' ? event.clientX : event.clientY;\n const rect = this.element.nativeElement.getBoundingClientRect();\n const percentage =\n (position - (this.slider.orientation() === 'horizontal' ? rect.left : rect.top)) /\n (this.slider.orientation() === 'horizontal' ? rect.width : rect.height);\n\n // update the value based on the position\n this.slider.value.set(this.slider.min() + (this.slider.max() - this.slider.min()) * percentage);\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 { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n Directive,\n booleanAttribute,\n computed,\n contentChild,\n input,\n model,\n numberAttribute,\n} from '@angular/core';\nimport { NgpFormControl } from 'ng-primitives/form-field';\nimport { NgpCanDisable, NgpDisabledToken } from 'ng-primitives/internal';\nimport { NgpSliderTrackToken } from '../slider-track/slider-track.token';\nimport { NgpSliderToken } from './slider.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpSlider]',\n exportAs: 'ngpSlider',\n providers: [\n { provide: NgpSliderToken, useExisting: NgpSlider },\n { provide: NgpDisabledToken, useExisting: NgpSlider },\n ],\n hostDirectives: [NgpFormControl],\n host: {\n '[attr.data-orientation]': 'orientation()',\n },\n})\nexport class NgpSlider implements NgpCanDisable {\n /**\n * The value of the slider.\n */\n readonly value = model<number>(0, {\n alias: 'ngpSliderValue',\n });\n\n /**\n * The minimum value of the slider.\n */\n readonly min = input<number, NumberInput>(0, {\n alias: 'ngpSliderMin',\n transform: numberAttribute,\n });\n\n /**\n * The maximum value of the slider.\n */\n readonly max = input<number, NumberInput>(100, {\n alias: 'ngpSliderMax',\n transform: numberAttribute,\n });\n\n /**\n * The step value of the slider.\n */\n readonly step = input<number, NumberInput>(1, {\n alias: 'ngpSliderStep',\n transform: numberAttribute,\n });\n\n /**\n * The orientation of the slider.\n */\n readonly orientation = input<'horizontal' | 'vertical'>('horizontal', {\n alias: 'ngpSliderOrientation',\n });\n\n /**\n * The disabled state of the slider.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpSliderDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Access the slider track.\n */\n readonly track = contentChild(NgpSliderTrackToken);\n\n /**\n * The value as a percentage based on the min and max values.\n */\n protected readonly percentage = computed(\n () => ((this.value() - this.min()) / (this.max() - this.min())) * 100,\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 { NgpSliderRange } from './slider-range/slider-range.directive';\nexport { NgpSliderRangeToken } from './slider-range/slider-range.token';\nexport { NgpSliderThumb } from './slider-thumb/slider-thumb.directive';\nexport { NgpSliderThumbToken } from './slider-thumb/slider-thumb.token';\nexport { NgpSliderTrack } from './slider-track/slider-track.directive';\nexport { NgpSliderTrackToken } from './slider-track/slider-track.token';\nexport { NgpSlider } from './slider/slider.directive';\nexport { NgpSliderToken } from './slider/slider.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;AAAA;;;;;;AAMG;MAIU,cAAc,GAAG,IAAI,cAAc,CAAY,gBAAgB,EAAE;AAE9E;;AAEG;SACa,YAAY,GAAA;AAC1B,IAAA,OAAO,MAAM,CAAC,cAAc,CAAC,CAAC;AAChC;;ACjBA;;;;;;AAMG;MAIU,mBAAmB,GAAG,IAAI,cAAc,CAAiB,qBAAqB,EAAE;AAE7F;;AAEG;SACa,iBAAiB,GAAA;AAC/B,IAAA,OAAO,MAAM,CAAC,mBAA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AAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAlDtC,SAAS,EAAA,UAAA,EAAA,CAAA;kBAbrB,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,gBAAgB,EAAE,WAAW,WAAW,EAAE;AACtD,qBAAA;oBACD,cAAc,EAAE,CAAC,cAAc,CAAC;AAChC,oBAAA,IAAI,EAAE;AACJ,wBAAA,yBAAyB,EAAE,eAAe;AAC3C,qBAAA;AACF,iBAAA,CAAA;;;AClCD;;;;;;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 NgpSwitchToken = new InjectionToken('NgpSwitchToken');
@@ -26,7 +26,7 @@ function injectSwitch() {
26
26
  * Copyright © 2024 Angular Primitives.
27
27
  * https://github.com/ng-primitives/ng-primitives
28
28
  *
29
- * This source code is licensed under the CC BY-ND 4.0 license found in the
29
+ * This source code is licensed under the Apache 2.0 license found in the
30
30
  * LICENSE file in the root directory of this source tree.
31
31
  */
32
32
  class NgpSwitchThumb {
@@ -134,7 +134,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
134
134
  * Copyright © 2024 Angular Primitives.
135
135
  * https://github.com/ng-primitives/ng-primitives
136
136
  *
137
- * This source code is licensed under the CC BY-ND 4.0 license found in the
137
+ * This source code is licensed under the Apache 2.0 license found in the
138
138
  * LICENSE file in the root directory of this source tree.
139
139
  */
140
140
 
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-switch.mjs","sources":["../../../../packages/ng-primitives/switch/src/switch/switch.token.ts","../../../../packages/ng-primitives/switch/src/switch-thumb/switch-thumb.directive.ts","../../../../packages/ng-primitives/switch/src/switch/switch.directive.ts","../../../../packages/ng-primitives/switch/src/index.ts","../../../../packages/ng-primitives/switch/src/ng-primitives-switch.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 { NgpSwitch } from './switch.directive';\n\nexport const NgpSwitchToken = new InjectionToken<NgpSwitch>('NgpSwitchToken');\n\n/**\n * Inject the Switch directive instance\n * @returns The switch directive instance\n */\nexport function injectSwitch(): NgpSwitch {\n return inject(NgpSwitchToken);\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 { NgpFocusVisible, NgpHover, NgpPress } from 'ng-primitives/interactions';\nimport { injectSwitch } from '../switch/switch.token';\n\n@Directive({\n selector: '[ngpSwitchThumb]',\n standalone: true,\n host: {\n '[attr.data-checked]': 'switch.checked()',\n '[attr.data-disabled]': 'switch.disabled() ? \"true\" : null',\n },\n hostDirectives: [NgpHover, NgpFocusVisible, NgpPress],\n})\nexport class NgpSwitchThumb {\n /**\n * Access the switch directive.\n */\n protected readonly switch = injectSwitch();\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 ElementRef,\n HostListener,\n booleanAttribute,\n inject,\n input,\n model,\n} from '@angular/core';\nimport { NgpFormControl } from 'ng-primitives/form-field';\nimport { NgpFocusVisible, NgpHover, NgpPress } from 'ng-primitives/interactions';\nimport { NgpCanDisable, NgpDisabledToken } from 'ng-primitives/internal';\nimport { NgpSwitchToken } from './switch.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpSwitch]',\n exportAs: 'ngpSwitch',\n providers: [\n { provide: NgpSwitchToken, useExisting: NgpSwitch },\n { provide: NgpDisabledToken, useExisting: NgpSwitch },\n ],\n hostDirectives: [NgpFormControl, NgpHover, NgpPress, NgpFocusVisible],\n host: {\n role: 'switch',\n '[attr.type]': 'isButton ? \"button\" : null',\n '[attr.aria-checked]': 'checked()',\n '[attr.data-checked]': 'checked()',\n '[attr.disabled]': 'isButton && disabled() ? disabled() : null',\n },\n})\nexport class NgpSwitch implements NgpCanDisable {\n /**\n * Access the element ref.\n */\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Determine if the switch is a button\n */\n protected isButton = this.elementRef.nativeElement.tagName === 'BUTTON';\n\n /**\n * Determine if the switch is checked.\n * @default false\n */\n readonly checked = model<boolean>(false, {\n alias: 'ngpSwitchChecked',\n });\n\n /**\n * Determine if the switch is disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpSwitchDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Toggle the checked state.\n */\n @HostListener('click')\n toggle(): void {\n if (this.disabled()) {\n return;\n }\n\n this.checked.update(checked => !checked);\n }\n\n /**\n * Handle the keydown event.\n */\n @HostListener('keydown.space')\n protected onKeyDown(): void {\n // If the switch is not a button then the space key will not toggle the checked state automatically,\n // so we need to do it manually.\n if (!this.isButton) {\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 { NgpSwitchThumb } from './switch-thumb/switch-thumb.directive';\nexport { NgpSwitch } from './switch/switch.directive';\nexport { NgpSwitchToken } from './switch/switch.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;AAAA;;;;;;AAMG;MAIU,cAAc,GAAG,IAAI,cAAc,CAAY,gBAAgB,EAAE;AAE9E;;;AAGG;SACa,YAAY,GAAA;AAC1B,IAAA,OAAO,MAAM,CAAC,cAAc,CAAC,CAAC;AAChC;;AClBA;;;;;;AAMG;MAcU,cAAc,CAAA;AAT3B,IAAA,WAAA,GAAA;AAUE;;AAEG;QACgB,IAAM,CAAA,MAAA,GAAG,YAAY,EAAE,CAAC;AAC5C,KAAA;8GALY,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,mBAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,qCAAA,EAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,QAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,eAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,QAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAT1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACJ,wBAAA,qBAAqB,EAAE,kBAAkB;AACzC,wBAAA,sBAAsB,EAAE,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A;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,gBAAgB,EAAE,WAAW,WAAW,EAAE;AACtD,qBAAA;oBACD,cAAc,EAAE,CAAC,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,CAAC;AACrE,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,aAAa,EAAE,4BAA4B;AAC3C,wBAAA,qBAAqB,EAAE,WAAW;AAClC,wBAAA,qBAAqB,EAAE,WAAW;AAClC,wBAAA,iBAAiB,EAAE,4CAA4C;AAChE,qBAAA;AACF,iBAAA,CAAA;8BAiCC,MAAM,EAAA,CAAA;sBADL,YAAY;uBAAC,OAAO,CAAA;gBAaX,SAAS,EAAA,CAAA;sBADlB,YAAY;uBAAC,eAAe,CAAA;;;AClF/B;;;;;;AAMG;;ACNH;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-primitives-switch.mjs","sources":["../../../../packages/ng-primitives/switch/src/switch/switch.token.ts","../../../../packages/ng-primitives/switch/src/switch-thumb/switch-thumb.directive.ts","../../../../packages/ng-primitives/switch/src/switch/switch.directive.ts","../../../../packages/ng-primitives/switch/src/index.ts","../../../../packages/ng-primitives/switch/src/ng-primitives-switch.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 { NgpSwitch } from './switch.directive';\n\nexport const NgpSwitchToken = new InjectionToken<NgpSwitch>('NgpSwitchToken');\n\n/**\n * Inject the Switch directive instance\n * @returns The switch directive instance\n */\nexport function injectSwitch(): NgpSwitch {\n return inject(NgpSwitchToken);\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 { NgpFocusVisible, NgpHover, NgpPress } from 'ng-primitives/interactions';\nimport { injectSwitch } from '../switch/switch.token';\n\n@Directive({\n selector: '[ngpSwitchThumb]',\n standalone: true,\n host: {\n '[attr.data-checked]': 'switch.checked()',\n '[attr.data-disabled]': 'switch.disabled() ? \"true\" : null',\n },\n hostDirectives: [NgpHover, NgpFocusVisible, NgpPress],\n})\nexport class NgpSwitchThumb {\n /**\n * Access the switch directive.\n */\n protected readonly switch = injectSwitch();\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 ElementRef,\n HostListener,\n booleanAttribute,\n inject,\n input,\n model,\n} from '@angular/core';\nimport { NgpFormControl } from 'ng-primitives/form-field';\nimport { NgpFocusVisible, NgpHover, NgpPress } from 'ng-primitives/interactions';\nimport { NgpCanDisable, NgpDisabledToken } from 'ng-primitives/internal';\nimport { NgpSwitchToken } from './switch.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpSwitch]',\n exportAs: 'ngpSwitch',\n providers: [\n { provide: NgpSwitchToken, useExisting: NgpSwitch },\n { provide: NgpDisabledToken, useExisting: NgpSwitch },\n ],\n hostDirectives: [NgpFormControl, NgpHover, NgpPress, NgpFocusVisible],\n host: {\n role: 'switch',\n '[attr.type]': 'isButton ? \"button\" : null',\n '[attr.aria-checked]': 'checked()',\n '[attr.data-checked]': 'checked()',\n '[attr.disabled]': 'isButton && disabled() ? disabled() : null',\n },\n})\nexport class NgpSwitch implements NgpCanDisable {\n /**\n * Access the element ref.\n */\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Determine if the switch is a button\n */\n protected isButton = this.elementRef.nativeElement.tagName === 'BUTTON';\n\n /**\n * Determine if the switch is checked.\n * @default false\n */\n readonly checked = model<boolean>(false, {\n alias: 'ngpSwitchChecked',\n });\n\n /**\n * Determine if the switch is disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpSwitchDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Toggle the checked state.\n */\n @HostListener('click')\n toggle(): void {\n if (this.disabled()) {\n return;\n }\n\n this.checked.update(checked => !checked);\n }\n\n /**\n * Handle the keydown event.\n */\n @HostListener('keydown.space')\n protected onKeyDown(): void {\n // If the switch is not a button then the space key will not toggle the checked state automatically,\n // so we need to do it manually.\n if (!this.isButton) {\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 { NgpSwitchThumb } from './switch-thumb/switch-thumb.directive';\nexport { NgpSwitch } from './switch/switch.directive';\nexport { NgpSwitchToken } from './switch/switch.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;AAAA;;;;;;AAMG;MAIU,cAAc,GAAG,IAAI,cAAc,CAAY,gBAAgB,EAAE;AAE9E;;;AAGG;SACa,YAAY,GAAA;AAC1B,IAAA,OAAO,MAAM,CAAC,cAAc,CAAC,CAAC;AAChC;;AClBA;;;;;;AAMG;MAcU,cAAc,CAAA;AAT3B,IAAA,WAAA,GAAA;AAUE;;AAEG;QACgB,IAAM,CAAA,MAAA,GAAG,YAAY,EAAE,CAAC;AAC5C,KAAA;8GALY,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;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AAA;gBAaX,SAAS,EAAA,CAAA;sBADlB,YAAY;uBAAC,eAAe,CAAA;;;AClF/B;;;;;;AAMG;;ACNH;;AAEG;;;;"}
@@ -11,7 +11,7 @@ import { uniqueId } from 'ng-primitives/utils';
11
11
  * Copyright © 2024 Angular Primitives.
12
12
  * https://github.com/ng-primitives/ng-primitives
13
13
  *
14
- * This source code is licensed under the CC BY-ND 4.0 license found in the
14
+ * This source code is licensed under the Apache 2.0 license found in the
15
15
  * LICENSE file in the root directory of this source tree.
16
16
  */
17
17
  const defaultTabsConfig = {
@@ -45,7 +45,7 @@ function injectTabsConfig() {
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 NgpTabsetToken = new InjectionToken('NgpTabsetToken');
@@ -140,7 +140,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
140
140
  * Copyright © 2024 Angular Primitives.
141
141
  * https://github.com/ng-primitives/ng-primitives
142
142
  *
143
- * This source code is licensed under the CC BY-ND 4.0 license found in the
143
+ * This source code is licensed under the Apache 2.0 license found in the
144
144
  * LICENSE file in the root directory of this source tree.
145
145
  */
146
146
  class NgpTabList {
@@ -171,7 +171,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
171
171
  * Copyright © 2024 Angular Primitives.
172
172
  * https://github.com/ng-primitives/ng-primitives
173
173
  *
174
- * This source code is licensed under the CC BY-ND 4.0 license found in the
174
+ * This source code is licensed under the Apache 2.0 license found in the
175
175
  * LICENSE file in the root directory of this source tree.
176
176
  */
177
177
  const NgpTabPanelToken = new InjectionToken('NgpTabPanelToken');
@@ -187,7 +187,7 @@ function injectTabPanel() {
187
187
  * Copyright © 2024 Angular Primitives.
188
188
  * https://github.com/ng-primitives/ng-primitives
189
189
  *
190
- * This source code is licensed under the CC BY-ND 4.0 license found in the
190
+ * This source code is licensed under the Apache 2.0 license found in the
191
191
  * LICENSE file in the root directory of this source tree.
192
192
  */
193
193
  class NgpTabPanel {
@@ -322,7 +322,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
322
322
  * Copyright © 2024 Angular Primitives.
323
323
  * https://github.com/ng-primitives/ng-primitives
324
324
  *
325
- * This source code is licensed under the CC BY-ND 4.0 license found in the
325
+ * This source code is licensed under the Apache 2.0 license found in the
326
326
  * LICENSE file in the root directory of this source tree.
327
327
  */
328
328