ng-primitives 0.89.0 → 0.91.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (389) hide show
  1. package/a11y/index.d.ts +98 -3
  2. package/accordion/index.d.ts +361 -7
  3. package/ai/index.d.ts +238 -16
  4. package/autofill/index.d.ts +62 -1
  5. package/avatar/index.d.ts +155 -5
  6. package/breadcrumbs/index.d.ts +200 -7
  7. package/button/index.d.ts +39 -3
  8. package/checkbox/index.d.ts +137 -2
  9. package/combobox/index.d.ts +414 -8
  10. package/common/index.d.ts +31 -4
  11. package/date-picker/index.d.ts +714 -18
  12. package/date-time/index.d.ts +289 -3
  13. package/date-time-luxon/index.d.ts +31 -1
  14. package/dialog/index.d.ts +253 -9
  15. package/fesm2022/ng-primitives-a11y.mjs +42 -58
  16. package/fesm2022/ng-primitives-a11y.mjs.map +1 -1
  17. package/fesm2022/ng-primitives-accordion.mjs +249 -225
  18. package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
  19. package/fesm2022/ng-primitives-ai.mjs +61 -58
  20. package/fesm2022/ng-primitives-ai.mjs.map +1 -1
  21. package/fesm2022/ng-primitives-autofill.mjs +55 -38
  22. package/fesm2022/ng-primitives-autofill.mjs.map +1 -1
  23. package/fesm2022/ng-primitives-avatar.mjs +105 -145
  24. package/fesm2022/ng-primitives-avatar.mjs.map +1 -1
  25. package/fesm2022/ng-primitives-breadcrumbs.mjs +106 -49
  26. package/fesm2022/ng-primitives-breadcrumbs.mjs.map +1 -1
  27. package/fesm2022/ng-primitives-button.mjs +20 -42
  28. package/fesm2022/ng-primitives-button.mjs.map +1 -1
  29. package/fesm2022/ng-primitives-checkbox.mjs +110 -84
  30. package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
  31. package/fesm2022/ng-primitives-combobox.mjs +82 -78
  32. package/fesm2022/ng-primitives-combobox.mjs.map +1 -1
  33. package/fesm2022/ng-primitives-common.mjs +5 -5
  34. package/fesm2022/ng-primitives-common.mjs.map +1 -1
  35. package/fesm2022/ng-primitives-date-picker.mjs +119 -112
  36. package/fesm2022/ng-primitives-date-picker.mjs.map +1 -1
  37. package/fesm2022/ng-primitives-dialog.mjs +48 -47
  38. package/fesm2022/ng-primitives-dialog.mjs.map +1 -1
  39. package/fesm2022/ng-primitives-file-upload.mjs +56 -48
  40. package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
  41. package/fesm2022/ng-primitives-focus-trap.mjs +9 -8
  42. package/fesm2022/ng-primitives-focus-trap.mjs.map +1 -1
  43. package/fesm2022/ng-primitives-form-field.mjs +97 -64
  44. package/fesm2022/ng-primitives-form-field.mjs.map +1 -1
  45. package/fesm2022/ng-primitives-input-otp.mjs +44 -43
  46. package/fesm2022/ng-primitives-input-otp.mjs.map +1 -1
  47. package/fesm2022/ng-primitives-input.mjs +38 -54
  48. package/fesm2022/ng-primitives-input.mjs.map +1 -1
  49. package/fesm2022/ng-primitives-interactions.mjs +59 -54
  50. package/fesm2022/ng-primitives-interactions.mjs.map +1 -1
  51. package/fesm2022/ng-primitives-internal.mjs +14 -14
  52. package/fesm2022/ng-primitives-internal.mjs.map +1 -1
  53. package/fesm2022/ng-primitives-listbox.mjs +52 -50
  54. package/fesm2022/ng-primitives-listbox.mjs.map +1 -1
  55. package/fesm2022/ng-primitives-menu.mjs +86 -72
  56. package/fesm2022/ng-primitives-menu.mjs.map +1 -1
  57. package/fesm2022/ng-primitives-meter.mjs +38 -35
  58. package/fesm2022/ng-primitives-meter.mjs.map +1 -1
  59. package/fesm2022/ng-primitives-pagination.mjs +83 -74
  60. package/fesm2022/ng-primitives-pagination.mjs.map +1 -1
  61. package/fesm2022/ng-primitives-popover.mjs +67 -60
  62. package/fesm2022/ng-primitives-popover.mjs.map +1 -1
  63. package/fesm2022/ng-primitives-portal.mjs +11 -12
  64. package/fesm2022/ng-primitives-portal.mjs.map +1 -1
  65. package/fesm2022/ng-primitives-progress.mjs +43 -40
  66. package/fesm2022/ng-primitives-progress.mjs.map +1 -1
  67. package/fesm2022/ng-primitives-radio.mjs +35 -33
  68. package/fesm2022/ng-primitives-radio.mjs.map +1 -1
  69. package/fesm2022/ng-primitives-resize.mjs +4 -4
  70. package/fesm2022/ng-primitives-resize.mjs.map +1 -1
  71. package/fesm2022/ng-primitives-roving-focus.mjs +264 -237
  72. package/fesm2022/ng-primitives-roving-focus.mjs.map +1 -1
  73. package/fesm2022/ng-primitives-search.mjs +9 -9
  74. package/fesm2022/ng-primitives-search.mjs.map +1 -1
  75. package/fesm2022/ng-primitives-select.mjs +73 -69
  76. package/fesm2022/ng-primitives-select.mjs.map +1 -1
  77. package/fesm2022/ng-primitives-separator.mjs +7 -7
  78. package/fesm2022/ng-primitives-separator.mjs.map +1 -1
  79. package/fesm2022/ng-primitives-slider.mjs +287 -253
  80. package/fesm2022/ng-primitives-slider.mjs.map +1 -1
  81. package/fesm2022/ng-primitives-state.mjs +173 -3
  82. package/fesm2022/ng-primitives-state.mjs.map +1 -1
  83. package/fesm2022/ng-primitives-switch.mjs +105 -101
  84. package/fesm2022/ng-primitives-switch.mjs.map +1 -1
  85. package/fesm2022/ng-primitives-tabs.mjs +48 -43
  86. package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
  87. package/fesm2022/ng-primitives-textarea.mjs +33 -41
  88. package/fesm2022/ng-primitives-textarea.mjs.map +1 -1
  89. package/fesm2022/ng-primitives-toast.mjs +19 -19
  90. package/fesm2022/ng-primitives-toast.mjs.map +1 -1
  91. package/fesm2022/ng-primitives-toggle-group.mjs +160 -159
  92. package/fesm2022/ng-primitives-toggle-group.mjs.map +1 -1
  93. package/fesm2022/ng-primitives-toggle.mjs +81 -68
  94. package/fesm2022/ng-primitives-toggle.mjs.map +1 -1
  95. package/fesm2022/ng-primitives-toolbar.mjs +31 -40
  96. package/fesm2022/ng-primitives-toolbar.mjs.map +1 -1
  97. package/fesm2022/ng-primitives-tooltip.mjs +68 -60
  98. package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
  99. package/fesm2022/ng-primitives-utils.mjs +50 -37
  100. package/fesm2022/ng-primitives-utils.mjs.map +1 -1
  101. package/file-upload/index.d.ts +148 -4
  102. package/focus-trap/index.d.ts +98 -2
  103. package/form-field/index.d.ts +266 -7
  104. package/index.d.ts +2 -2
  105. package/input/index.d.ts +84 -2
  106. package/input-otp/index.d.ts +247 -4
  107. package/interactions/index.d.ts +295 -16
  108. package/internal/index.d.ts +201 -10
  109. package/listbox/index.d.ts +209 -6
  110. package/menu/index.d.ts +297 -8
  111. package/meter/index.d.ts +67 -6
  112. package/package.json +28 -28
  113. package/pagination/index.d.ts +211 -7
  114. package/popover/index.d.ts +224 -5
  115. package/portal/index.d.ts +389 -6
  116. package/progress/index.d.ts +124 -6
  117. package/radio/index.d.ts +140 -5
  118. package/resize/index.d.ts +29 -1
  119. package/roving-focus/index.d.ts +154 -4
  120. package/schematics/ng-add/schema.d.ts +0 -1
  121. package/schematics/ng-generate/__snapshots__/index.spec.ts.snap +1 -1
  122. package/schematics/ng-generate/templates/checkbox/checkbox.__fileSuffix@dasherize__.ts.template +2 -2
  123. package/schematics/ng-generate/templates/slider/slider.__fileSuffix@dasherize__.ts.template +6 -3
  124. package/schematics/ng-generate/templates/switch/switch.__fileSuffix@dasherize__.ts.template +2 -2
  125. package/schematics/ng-generate/templates/toggle/toggle.__fileSuffix@dasherize__.ts.template +2 -2
  126. package/schematics/ng-generate/templates/toggle-group/toggle-group.__fileSuffix@dasherize__.ts.template +2 -2
  127. package/schematics/ng-generate/templates/toolbar/toolbar.__fileSuffix@dasherize__.ts.template +1 -1
  128. package/search/index.d.ts +66 -3
  129. package/select/index.d.ts +341 -8
  130. package/separator/index.d.ts +30 -2
  131. package/slider/index.d.ts +471 -10
  132. package/state/index.d.ts +68 -11
  133. package/switch/index.d.ts +151 -3
  134. package/tabs/index.d.ts +222 -7
  135. package/textarea/index.d.ts +87 -2
  136. package/toast/index.d.ts +219 -4
  137. package/toggle/index.d.ts +98 -2
  138. package/toggle-group/index.d.ts +168 -5
  139. package/toolbar/index.d.ts +43 -2
  140. package/tooltip/index.d.ts +214 -5
  141. package/utils/index.d.ts +170 -9
  142. package/a11y/active-descendant/active-descendant.d.ts +0 -42
  143. package/a11y/visually-hidden/visually-hidden-state.d.ts +0 -17
  144. package/a11y/visually-hidden/visually-hidden.d.ts +0 -50
  145. package/accordion/accordion/accordion-state.d.ts +0 -17
  146. package/accordion/accordion/accordion.d.ts +0 -50
  147. package/accordion/accordion-content/accordion-content.d.ts +0 -40
  148. package/accordion/accordion-item/accordion-item-state.d.ts +0 -17
  149. package/accordion/accordion-item/accordion-item.d.ts +0 -50
  150. package/accordion/accordion-trigger/accordion-trigger.d.ts +0 -31
  151. package/accordion/config/accordion-config.d.ts +0 -32
  152. package/ai/prompt-composer/prompt-composer-state.d.ts +0 -17
  153. package/ai/prompt-composer/prompt-composer.d.ts +0 -23
  154. package/ai/prompt-composer-dictation/prompt-composer-dictation-state.d.ts +0 -17
  155. package/ai/prompt-composer-dictation/prompt-composer-dictation.d.ts +0 -29
  156. package/ai/prompt-composer-input/prompt-composer-input-state.d.ts +0 -17
  157. package/ai/prompt-composer-input/prompt-composer-input.d.ts +0 -16
  158. package/ai/prompt-composer-submit/prompt-composer-submit-state.d.ts +0 -17
  159. package/ai/prompt-composer-submit/prompt-composer-submit.d.ts +0 -15
  160. package/ai/thread/thread-state.d.ts +0 -17
  161. package/ai/thread/thread.d.ts +0 -23
  162. package/ai/thread-message/thread-message-state.d.ts +0 -17
  163. package/ai/thread-message/thread-message.d.ts +0 -11
  164. package/ai/thread-suggestion/thread-suggestion-state.d.ts +0 -17
  165. package/ai/thread-suggestion/thread-suggestion.d.ts +0 -14
  166. package/ai/thread-viewport/thread-viewport-state.d.ts +0 -17
  167. package/ai/thread-viewport/thread-viewport.d.ts +0 -34
  168. package/autofill/autofill/autofill.d.ts +0 -19
  169. package/avatar/avatar/avatar-state.d.ts +0 -17
  170. package/avatar/avatar/avatar.d.ts +0 -29
  171. package/avatar/avatar-fallback/avatar-fallback.d.ts +0 -37
  172. package/avatar/avatar-image/avatar-image.d.ts +0 -27
  173. package/avatar/config/avatar-config.d.ts +0 -21
  174. package/breadcrumbs/breadcrumb-ellipsis/breadcrumb-ellipsis.d.ts +0 -8
  175. package/breadcrumbs/breadcrumb-item/breadcrumb-item.d.ts +0 -8
  176. package/breadcrumbs/breadcrumb-link/breadcrumb-link.d.ts +0 -9
  177. package/breadcrumbs/breadcrumb-list/breadcrumb-list.d.ts +0 -8
  178. package/breadcrumbs/breadcrumb-page/breadcrumb-page.d.ts +0 -8
  179. package/breadcrumbs/breadcrumb-separator/breadcrumb-separator.d.ts +0 -8
  180. package/breadcrumbs/breadcrumbs/breadcrumbs.d.ts +0 -8
  181. package/button/button/button-state.d.ts +0 -17
  182. package/button/button/button.d.ts +0 -15
  183. package/button/button/setup-button.d.ts +0 -15
  184. package/checkbox/checkbox/checkbox-state.d.ts +0 -17
  185. package/checkbox/checkbox/checkbox.d.ts +0 -45
  186. package/combobox/combobox/combobox-state.d.ts +0 -17
  187. package/combobox/combobox/combobox.d.ts +0 -222
  188. package/combobox/combobox-button/combobox-button.d.ts +0 -18
  189. package/combobox/combobox-dropdown/combobox-dropdown.d.ts +0 -21
  190. package/combobox/combobox-input/combobox-input.d.ts +0 -36
  191. package/combobox/combobox-option/combobox-option.d.ts +0 -51
  192. package/combobox/combobox-portal/combobox-portal.d.ts +0 -37
  193. package/combobox/config/combobox-config.d.ts +0 -28
  194. package/combobox/utils.d.ts +0 -9
  195. package/common/header/header-token.d.ts +0 -10
  196. package/common/header/header.d.ts +0 -13
  197. package/common/types/orientation.d.ts +0 -1
  198. package/common/types/selection.d.ts +0 -1
  199. package/date-picker/config/date-picker-config.d.ts +0 -22
  200. package/date-picker/date-picker/date-picker-first-day-of-week.d.ts +0 -29
  201. package/date-picker/date-picker/date-picker-state.d.ts +0 -9
  202. package/date-picker/date-picker/date-picker.d.ts +0 -129
  203. package/date-picker/date-picker-cell/date-picker-cell.d.ts +0 -20
  204. package/date-picker/date-picker-cell-render/date-picker-cell-render-token.d.ts +0 -12
  205. package/date-picker/date-picker-cell-render/date-picker-cell-render.d.ts +0 -39
  206. package/date-picker/date-picker-date-button/date-picker-date-button-token.d.ts +0 -7
  207. package/date-picker/date-picker-date-button/date-picker-date-button.d.ts +0 -114
  208. package/date-picker/date-picker-grid/date-picker-grid.d.ts +0 -16
  209. package/date-picker/date-picker-label/date-picker-label-token.d.ts +0 -7
  210. package/date-picker/date-picker-label/date-picker-label.d.ts +0 -20
  211. package/date-picker/date-picker-next-month/date-picker-next-month.d.ts +0 -34
  212. package/date-picker/date-picker-previous-month/date-picker-previous-month.d.ts +0 -34
  213. package/date-picker/date-picker-row-render/date-picker-row-render-token.d.ts +0 -12
  214. package/date-picker/date-picker-row-render/date-picker-row-render.d.ts +0 -65
  215. package/date-picker/date-range-picker/date-range-picker-state.d.ts +0 -19
  216. package/date-picker/date-range-picker/date-range-picker.d.ts +0 -149
  217. package/date-time/date-adapter/date-adapter-token.d.ts +0 -11
  218. package/date-time/date-adapter/date-adapter.d.ts +0 -169
  219. package/date-time/native-date-adapter/native-date-adapter.d.ts +0 -106
  220. package/date-time-luxon/luxon-date-adapter/luxon-date-adapter.d.ts +0 -28
  221. package/dialog/config/dialog-config.d.ts +0 -41
  222. package/dialog/dialog/dialog-ref.d.ts +0 -45
  223. package/dialog/dialog/dialog-state.d.ts +0 -17
  224. package/dialog/dialog/dialog.d.ts +0 -37
  225. package/dialog/dialog/dialog.service.d.ts +0 -69
  226. package/dialog/dialog-description/dialog-description.d.ts +0 -12
  227. package/dialog/dialog-overlay/dialog-overlay.d.ts +0 -16
  228. package/dialog/dialog-title/dialog-title.d.ts +0 -12
  229. package/dialog/dialog-trigger/dialog-trigger.d.ts +0 -26
  230. package/file-upload/file-dropzone/file-drop-filter.d.ts +0 -2
  231. package/file-upload/file-dropzone/file-dropzone-state.d.ts +0 -17
  232. package/file-upload/file-dropzone/file-dropzone.d.ts +0 -55
  233. package/file-upload/file-upload/file-upload-state.d.ts +0 -17
  234. package/file-upload/file-upload/file-upload.d.ts +0 -72
  235. package/focus-trap/focus-trap/focus-trap-state.d.ts +0 -17
  236. package/focus-trap/focus-trap/focus-trap.d.ts +0 -85
  237. package/form-field/description/description.d.ts +0 -17
  238. package/form-field/error/error.d.ts +0 -32
  239. package/form-field/form-control/form-control-state.d.ts +0 -17
  240. package/form-field/form-control/form-control.d.ts +0 -44
  241. package/form-field/form-field/form-field-state.d.ts +0 -17
  242. package/form-field/form-field/form-field.d.ts +0 -119
  243. package/form-field/label/label.d.ts +0 -30
  244. package/input/input/input-state.d.ts +0 -17
  245. package/input/input/input.d.ts +0 -34
  246. package/input-otp/input-otp/input-otp-state.d.ts +0 -17
  247. package/input-otp/input-otp/input-otp.d.ts +0 -133
  248. package/input-otp/input-otp-input/input-otp-input.d.ts +0 -57
  249. package/input-otp/input-otp-slot/input-otp-slot.d.ts +0 -45
  250. package/interactions/config/interactions-config.d.ts +0 -30
  251. package/interactions/focus/focus-interaction.d.ts +0 -14
  252. package/interactions/focus/focus.d.ts +0 -19
  253. package/interactions/focus-visible/focus-visible-interaction.d.ts +0 -12
  254. package/interactions/focus-visible/focus-visible.d.ts +0 -19
  255. package/interactions/hover/hover-interaction.d.ts +0 -17
  256. package/interactions/hover/hover.d.ts +0 -31
  257. package/interactions/interactions/interactions.d.ts +0 -20
  258. package/interactions/move/move.d.ts +0 -114
  259. package/interactions/press/press-interaction.d.ts +0 -14
  260. package/interactions/press/press.d.ts +0 -26
  261. package/internal/exit-animation/exit-animation-manager.d.ts +0 -17
  262. package/internal/exit-animation/exit-animation.d.ts +0 -26
  263. package/internal/signals/explicit-effect.d.ts +0 -19
  264. package/internal/style-injector/style-injector.d.ts +0 -44
  265. package/internal/utilities/dom-removal.d.ts +0 -6
  266. package/internal/utilities/element-ref.d.ts +0 -6
  267. package/internal/utilities/mutation-observer.d.ts +0 -39
  268. package/internal/utilities/overflow.d.ts +0 -13
  269. package/internal/utilities/resize.d.ts +0 -31
  270. package/internal/utilities/scrolling.d.ts +0 -1
  271. package/listbox/listbox/listbox-state.d.ts +0 -17
  272. package/listbox/listbox/listbox.d.ts +0 -101
  273. package/listbox/listbox-header/listbox-header.d.ts +0 -9
  274. package/listbox/listbox-option/listbox-option.d.ts +0 -68
  275. package/listbox/listbox-section/listbox-section.d.ts +0 -9
  276. package/listbox/listbox-trigger/listbox-trigger.d.ts +0 -13
  277. package/menu/config/menu-config.d.ts +0 -44
  278. package/menu/menu/menu-token.d.ts +0 -11
  279. package/menu/menu/menu.d.ts +0 -22
  280. package/menu/menu-item/menu-item.d.ts +0 -30
  281. package/menu/menu-trigger/menu-trigger-state.d.ts +0 -17
  282. package/menu/menu-trigger/menu-trigger.d.ts +0 -98
  283. package/menu/submenu-trigger/submenu-trigger-state.d.ts +0 -17
  284. package/menu/submenu-trigger/submenu-trigger.d.ts +0 -88
  285. package/meter/meter/meter-state.d.ts +0 -17
  286. package/meter/meter/meter.d.ts +0 -27
  287. package/meter/meter-indicator/meter-indicator.d.ts +0 -7
  288. package/meter/meter-label/meter-label.d.ts +0 -10
  289. package/meter/meter-track/meter-track.d.ts +0 -5
  290. package/meter/meter-value/meter-value.d.ts +0 -5
  291. package/pagination/pagination/pagination-state.d.ts +0 -17
  292. package/pagination/pagination/pagination.d.ts +0 -45
  293. package/pagination/pagination-button/pagination-button.d.ts +0 -39
  294. package/pagination/pagination-first/pagination-first.d.ts +0 -28
  295. package/pagination/pagination-last/pagination-last.d.ts +0 -28
  296. package/pagination/pagination-next/pagination-next.d.ts +0 -31
  297. package/pagination/pagination-previous/pagination-previous.d.ts +0 -31
  298. package/popover/config/popover-config.d.ts +0 -64
  299. package/popover/popover/popover.d.ts +0 -18
  300. package/popover/popover-arrow/popover-arrow.d.ts +0 -6
  301. package/popover/popover-trigger/popover-trigger-state.d.ts +0 -19
  302. package/popover/popover-trigger/popover-trigger.d.ts +0 -128
  303. package/portal/offset.d.ts +0 -39
  304. package/portal/overlay-arrow.d.ts +0 -1
  305. package/portal/overlay-token.d.ts +0 -12
  306. package/portal/overlay.d.ts +0 -214
  307. package/portal/portal.d.ts +0 -94
  308. package/portal/scroll-strategy.d.ts +0 -23
  309. package/progress/progress/progress-state.d.ts +0 -17
  310. package/progress/progress/progress.d.ts +0 -61
  311. package/progress/progress-indicator/progress-indicator.d.ts +0 -17
  312. package/progress/progress-label/progress-label.d.ts +0 -14
  313. package/progress/progress-track/progress-track.d.ts +0 -9
  314. package/progress/progress-value/progress-value.d.ts +0 -9
  315. package/radio/radio-group/radio-group-state.d.ts +0 -18
  316. package/radio/radio-group/radio-group.d.ts +0 -54
  317. package/radio/radio-indicator/radio-indicator.d.ts +0 -21
  318. package/radio/radio-item/radio-item-state.d.ts +0 -18
  319. package/radio/radio-item/radio-item.d.ts +0 -45
  320. package/resize/resize/resize.d.ts +0 -26
  321. package/roving-focus/roving-focus-group/roving-focus-group-state.d.ts +0 -17
  322. package/roving-focus/roving-focus-group/roving-focus-group-token.d.ts +0 -21
  323. package/roving-focus/roving-focus-group/roving-focus-group.d.ts +0 -94
  324. package/roving-focus/roving-focus-item/roving-focus-item.d.ts +0 -53
  325. package/search/search/search-state.d.ts +0 -17
  326. package/search/search/search.d.ts +0 -36
  327. package/search/search-clear/search-clear.d.ts +0 -16
  328. package/select/config/select-config.d.ts +0 -28
  329. package/select/native-select/native-select-state.d.ts +0 -17
  330. package/select/native-select/native-select.d.ts +0 -22
  331. package/select/select/select-state.d.ts +0 -17
  332. package/select/select/select.d.ts +0 -172
  333. package/select/select-dropdown/select-dropdown.d.ts +0 -17
  334. package/select/select-option/select-option.d.ts +0 -51
  335. package/select/select-portal/select-portal.d.ts +0 -37
  336. package/separator/config/separator-config.d.ts +0 -22
  337. package/separator/separator/separator.d.ts +0 -11
  338. package/slider/range-slider/range-slider/range-slider-state.d.ts +0 -17
  339. package/slider/range-slider/range-slider/range-slider.d.ts +0 -115
  340. package/slider/range-slider/range-slider-range/range-slider-range.d.ts +0 -12
  341. package/slider/range-slider/range-slider-thumb/range-slider-thumb.d.ts +0 -44
  342. package/slider/range-slider/range-slider-track/range-slider-track.d.ts +0 -22
  343. package/slider/slider/slider-state.d.ts +0 -17
  344. package/slider/slider/slider.d.ts +0 -58
  345. package/slider/slider-range/slider-range.d.ts +0 -12
  346. package/slider/slider-thumb/slider-thumb.d.ts +0 -29
  347. package/slider/slider-track/slider-track.d.ts +0 -22
  348. package/switch/switch/switch-state.d.ts +0 -17
  349. package/switch/switch/switch.d.ts +0 -49
  350. package/switch/switch-thumb/switch-thumb.d.ts +0 -13
  351. package/tabs/config/tabs-config.d.ts +0 -32
  352. package/tabs/tab-button/tab-button.d.ts +0 -59
  353. package/tabs/tab-list/tab-list.d.ts +0 -12
  354. package/tabs/tab-panel/tab-panel-token.d.ts +0 -8
  355. package/tabs/tab-panel/tab-panel.d.ts +0 -38
  356. package/tabs/tabset/tabset-state.d.ts +0 -17
  357. package/tabs/tabset/tabset.d.ts +0 -71
  358. package/textarea/textarea/textarea-state.d.ts +0 -17
  359. package/textarea/textarea/textarea.d.ts +0 -19
  360. package/toast/config/toast-config.d.ts +0 -70
  361. package/toast/toast/toast-context.d.ts +0 -3
  362. package/toast/toast/toast-manager.d.ts +0 -49
  363. package/toast/toast/toast-options.d.ts +0 -34
  364. package/toast/toast/toast-timer.d.ts +0 -14
  365. package/toast/toast/toast.d.ts +0 -72
  366. package/toggle/toggle/toggle-state.d.ts +0 -17
  367. package/toggle/toggle/toggle.d.ts +0 -44
  368. package/toggle-group/config/toggle-group-config.d.ts +0 -32
  369. package/toggle-group/toggle-group/toggle-group-state.d.ts +0 -17
  370. package/toggle-group/toggle-group/toggle-group.d.ts +0 -64
  371. package/toggle-group/toggle-group-item/toggle-group-item-state.d.ts +0 -17
  372. package/toggle-group/toggle-group-item/toggle-group-item.d.ts +0 -34
  373. package/toolbar/toolbar/toolbar-state.d.ts +0 -17
  374. package/toolbar/toolbar/toolbar.d.ts +0 -20
  375. package/tooltip/config/tooltip-config.d.ts +0 -59
  376. package/tooltip/tooltip/tooltip.d.ts +0 -17
  377. package/tooltip/tooltip-arrow/tooltip-arrow.d.ts +0 -6
  378. package/tooltip/tooltip-text-content/tooltip-text-content.component.d.ts +0 -14
  379. package/tooltip/tooltip-trigger/tooltip-trigger-state.d.ts +0 -17
  380. package/tooltip/tooltip-trigger/tooltip-trigger.d.ts +0 -126
  381. package/utils/forms/providers.d.ts +0 -6
  382. package/utils/forms/status.d.ts +0 -16
  383. package/utils/forms/types.d.ts +0 -8
  384. package/utils/helpers/attributes.d.ts +0 -2
  385. package/utils/helpers/disposables.d.ts +0 -40
  386. package/utils/helpers/unique-id.d.ts +0 -6
  387. package/utils/helpers/validators.d.ts +0 -51
  388. package/utils/observables/take-until-destroyed.d.ts +0 -10
  389. package/utils/signals/index.d.ts +0 -22
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-roving-focus.mjs","sources":["../../../../packages/ng-primitives/roving-focus/src/roving-focus-group/roving-focus-group-state.ts","../../../../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.ts","../../../../packages/ng-primitives/roving-focus/src/roving-focus-item/roving-focus-item.ts","../../../../packages/ng-primitives/roving-focus/src/ng-primitives-roving-focus.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpRovingFocusGroup } from './roving-focus-group';\n\n/**\n * The state token for the RovingFocusGroup primitive.\n */\nexport const NgpRovingFocusGroupStateToken =\n createStateToken<NgpRovingFocusGroup>('RovingFocusGroup');\n\n/**\n * Provides the RovingFocusGroup state.\n */\nexport const provideRovingFocusGroupState = createStateProvider(NgpRovingFocusGroupStateToken);\n\n/**\n * Injects the RovingFocusGroup state.\n */\nexport const injectRovingFocusGroupState = createStateInjector<NgpRovingFocusGroup>(\n NgpRovingFocusGroupStateToken,\n);\n\n/**\n * The RovingFocusGroup state registration function.\n */\nexport const rovingFocusGroupState = createState(NgpRovingFocusGroupStateToken);\n","import { FactoryProvider, InjectionToken, Type, inject } from '@angular/core';\nimport { NgpRovingFocusGroup } from './roving-focus-group';\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\nexport interface NgpRovingFocusGroupOptions {\n /**\n * Whether we should inherit the focus group from the parent\n * @default true\n */\n inherit?: boolean;\n}\n\n/**\n * Provide the RovingFocusGroup directive instance\n * @param type The RovingFocusGroup directive type\n * @returns The RovingFocusGroup token\n */\nexport function provideRovingFocusGroup(\n type: Type<NgpRovingFocusGroup>,\n { inherit = true }: NgpRovingFocusGroupOptions = {},\n): FactoryProvider {\n return {\n provide: NgpRovingFocusGroupToken,\n // Roving focus groups may be nested, in this case, the parent group should be used\n useFactory: () => {\n if (!inherit) {\n return inject(type, { self: true });\n }\n\n // If the parent group is not found, return the current group\n // This is useful for nested groups\n return (\n inject(NgpRovingFocusGroupToken, { skipSelf: true, optional: true }) ??\n inject(type, { self: true })\n );\n },\n };\n}\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, inject, input, signal } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { NgpRovingFocusItem } from '../roving-focus-item/roving-focus-item';\nimport { provideRovingFocusGroupState, rovingFocusGroupState } from './roving-focus-group-state';\nimport { provideRovingFocusGroup } from './roving-focus-group-token';\n\n/**\n * Apply the `ngpRovingFocusGroup` directive to an element to manage focus for a group of child elements.\n */\n@Directive({\n selector: '[ngpRovingFocusGroup]',\n exportAs: 'ngpRovingFocusGroup',\n providers: [provideRovingFocusGroup(NgpRovingFocusGroup), provideRovingFocusGroupState()],\n})\nexport class NgpRovingFocusGroup {\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 = input<NgpOrientation>('vertical', {\n alias: 'ngpRovingFocusGroupOrientation',\n });\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 * The state of the roving focus group.\n */\n readonly state = rovingFocusGroupState<NgpRovingFocusGroup>(this);\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.state.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.state.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.state.disabled()) {\n return;\n }\n\n switch (event.key) {\n case 'ArrowUp':\n if (this.state.orientation() === 'vertical') {\n event.preventDefault();\n this.activatePreviousItem('keyboard');\n }\n break;\n case 'ArrowDown':\n if (this.state.orientation() === 'vertical') {\n event.preventDefault();\n this.activateNextItem('keyboard');\n }\n break;\n case 'ArrowLeft':\n if (this.state.orientation() === '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.state.orientation() === '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.state.homeEnd()) {\n event.preventDefault();\n this.activateFirstItem('keyboard');\n }\n break;\n case 'End':\n if (this.state.homeEnd()) {\n event.preventDefault();\n this.activateLastItem('keyboard');\n }\n break;\n }\n }\n}\n","import { 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';\n\n/**\n * Apply the `ngpRovingFocusItem` directive to an element within a roving focus group to automatically manage focus.\n */\n@Directive({\n selector: '[ngpRovingFocusItem]',\n exportAs: '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 * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAQA;;AAEG;AACI,MAAM,6BAA6B,GACxC,gBAAgB,CAAsB,kBAAkB,CAAC;AAE3D;;AAEG;MACU,4BAA4B,GAAG,mBAAmB,CAAC,6BAA6B;AAE7F;;AAEG;MACU,2BAA2B,GAAG,mBAAmB,CAC5D,6BAA6B;AAG/B;;AAEG;AACI,MAAM,qBAAqB,GAAG,WAAW,CAAC,6BAA6B,CAAC;;MC1B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AA;QACvB,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC;IACrD;+GA5EW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,4BAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,SAAA,EAAA,mBAAA,EAAA,OAAA,EAAA,YAAA,EAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,YAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAP9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,IAAI,EAAE;AACJ,wBAAA,iBAAiB,EAAE,YAAY;AAChC,qBAAA;AACF,iBAAA;8BAmDW,SAAS,EAAA,CAAA;sBADlB,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;gBAazB,QAAQ,EAAA,CAAA;sBADjB,YAAY;uBAAC,OAAO;;;ACtFvB;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-primitives-roving-focus.mjs","sources":["../../../../packages/ng-primitives/roving-focus/src/roving-focus-group/roving-focus-group-state.ts","../../../../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.ts","../../../../packages/ng-primitives/roving-focus/src/roving-focus-item/roving-focus-item-state.ts","../../../../packages/ng-primitives/roving-focus/src/roving-focus-item/roving-focus-item.ts","../../../../packages/ng-primitives/roving-focus/src/ng-primitives-roving-focus.ts"],"sourcesContent":["import { FocusOrigin } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { inject, signal, Signal } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { controlled, createPrimitive, injectInheritedState } from 'ng-primitives/state';\nimport type { NgpRovingFocusItemState } from '../roving-focus-item/roving-focus-item-state';\n\nexport interface NgpRovingFocusGroupState {\n orientation: Signal<NgpOrientation>;\n wrap: Signal<boolean>;\n homeEnd: Signal<boolean>;\n disabled: Signal<boolean>;\n activeItem: Signal<string | null>;\n onKeydown(event: KeyboardEvent): void;\n setActiveItem(id: string | null, origin?: FocusOrigin): void;\n register(item: NgpRovingFocusItemState): void;\n unregister(item: NgpRovingFocusItemState): void;\n setOrientation(orientation: NgpOrientation): void;\n}\n\nexport interface NgpRovingFocusGroupProps {\n orientation?: Signal<NgpOrientation>;\n wrap?: Signal<boolean>;\n homeEnd?: Signal<boolean>;\n disabled?: Signal<boolean>;\n inherit?: boolean;\n}\n\nexport const [\n NgpRovingFocusGroupStateToken,\n ngpRovingFocusGroup,\n injectRovingFocusGroupState,\n provideRovingFocusGroupState,\n] = createPrimitive(\n 'NgpRovingFocusGroup',\n ({\n orientation: _orientation = signal('vertical'),\n wrap = signal(false),\n homeEnd = signal(true),\n disabled = signal(false),\n inherit = true,\n }: NgpRovingFocusGroupProps): NgpRovingFocusGroupState => {\n const parentGroup = inherit\n ? injectInheritedState(() => NgpRovingFocusGroupStateToken)?.()\n : null;\n\n if (parentGroup) {\n return parentGroup;\n }\n\n const directionality = inject(Directionality);\n const items = signal<NgpRovingFocusItemState[]>([]);\n const orientation = controlled(_orientation);\n\n /**\n * Get the items in the roving focus group sorted by order.\n */\n function getSortedItems() {\n return items().sort((a, b) => {\n // sort the items by their position in the document\n return a.element.nativeElement.compareDocumentPosition(b.element.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 */\n const activeItem = signal<string | null>(null);\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 function setActiveItem(id: string | null, origin: FocusOrigin = 'program'): void {\n activeItem.set(id);\n const item = items().find(i => i.id() === id) ?? null;\n\n if (item) {\n item.focus(origin);\n }\n }\n\n /**\n * Activate the first item in the roving focus group.\n * @param origin The origin of the focus change\n */\n function activateFirstItem(origin: FocusOrigin): void {\n // find the first item that is not disabled\n const item = getSortedItems().find(i => !i.disabled()) ?? null;\n\n // set the first item as the active item\n if (item) {\n setActiveItem(item.id(), origin);\n }\n }\n\n /**\n * Activate the last item in the roving focus group.\n * @param origin The origin of the focus change\n */\n function activateLastItem(origin: FocusOrigin): void {\n // find the last item that is not disabled\n const item = [...getSortedItems()].reverse().find(i => !i.disabled()) ?? null;\n\n // set the last item as the active item\n if (item) {\n setActiveItem(item.id(), origin);\n }\n }\n\n /**\n * Activate the next item in the roving focus group.\n * @param origin The origin of the focus change\n */\n function activateNextItem(origin: FocusOrigin): void {\n const currentActiveItem = activeItem();\n\n // if there is no active item, activate the first item\n if (!currentActiveItem) {\n activateFirstItem(origin);\n return;\n }\n\n // find the index of the active item\n const sortedItems = getSortedItems();\n const index = sortedItems.findIndex(i => i.id() === currentActiveItem);\n\n // find the next item that is not disabled\n const item = 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 && wrap()) {\n 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 setActiveItem(item.id(), 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 function activatePreviousItem(origin: FocusOrigin): void {\n const currentActiveItem = activeItem();\n\n // if there is no active item, activate the last item\n if (!currentActiveItem) {\n activateLastItem(origin);\n return;\n }\n\n // find the index of the active item\n const sortedItems = getSortedItems();\n const index = sortedItems.findIndex(i => i.id() === currentActiveItem);\n\n // find the previous item that is not disabled\n const item =\n 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 && wrap()) {\n 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 setActiveItem(item.id(), origin);\n }\n\n /**\n * Handle keyboard navigation for the roving focus group.\n * @param event The keyboard event\n */\n function onKeydown(event: KeyboardEvent): void {\n if (disabled()) {\n return;\n }\n\n switch (event.key) {\n case 'ArrowUp':\n if (orientation() === 'vertical') {\n event.preventDefault();\n activatePreviousItem('keyboard');\n }\n break;\n case 'ArrowDown':\n if (orientation() === 'vertical') {\n event.preventDefault();\n activateNextItem('keyboard');\n }\n break;\n case 'ArrowLeft':\n if (orientation() === 'horizontal') {\n event.preventDefault();\n\n if (directionality.value === 'ltr') {\n activatePreviousItem('keyboard');\n } else {\n activateNextItem('keyboard');\n }\n }\n break;\n case 'ArrowRight':\n if (orientation() === 'horizontal') {\n event.preventDefault();\n\n if (directionality.value === 'ltr') {\n activateNextItem('keyboard');\n } else {\n activatePreviousItem('keyboard');\n }\n }\n break;\n case 'Home':\n if (homeEnd()) {\n event.preventDefault();\n activateFirstItem('keyboard');\n }\n break;\n case 'End':\n if (homeEnd()) {\n event.preventDefault();\n activateLastItem('keyboard');\n }\n break;\n }\n }\n\n function register(item: NgpRovingFocusItemState): void {\n items.update(items => [...items, item]);\n\n // if there is no active item, make the first item the tabbable item\n if (!activeItem()) {\n activeItem.set(item.id());\n }\n }\n\n /**\n * Unregister an item with the roving focus group.\n * @param item The item to unregister\n * @internal\n */\n function unregister(item: NgpRovingFocusItemState): void {\n items.update(items => items.filter(i => i !== item));\n\n // check if the unregistered item is the active item\n if (activeItem() === item.id()) {\n // if the active item is unregistered, activate the first item\n activeItem.set(items()[0]?.id() ?? null);\n }\n }\n\n /**\n * Set the orientation of the roving focus group.\n * @param value The orientation value\n */\n function setOrientation(value: NgpOrientation): void {\n orientation.set(value);\n }\n\n return {\n orientation: orientation.asReadonly(),\n setOrientation,\n wrap,\n homeEnd,\n disabled,\n activeItem,\n setActiveItem,\n onKeydown,\n register,\n unregister,\n };\n },\n);\n","import { FactoryProvider, InjectionToken, Type, inject } from '@angular/core';\nimport { NgpRovingFocusGroup } from './roving-focus-group';\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\nexport interface NgpRovingFocusGroupOptions {\n /**\n * Whether we should inherit the focus group from the parent\n * @default true\n */\n inherit?: boolean;\n}\n\n/**\n * Provide the RovingFocusGroup directive instance\n * @param type The RovingFocusGroup directive type\n * @returns The RovingFocusGroup token\n */\nexport function provideRovingFocusGroup(\n type: Type<NgpRovingFocusGroup>,\n { inherit = true }: NgpRovingFocusGroupOptions = {},\n): FactoryProvider {\n return {\n provide: NgpRovingFocusGroupToken,\n // Roving focus groups may be nested, in this case, the parent group should be used\n useFactory: () => {\n if (!inherit) {\n return inject(type, { self: true });\n }\n\n // If the parent group is not found, return the current group\n // This is useful for nested groups\n return (\n inject(NgpRovingFocusGroupToken, { skipSelf: true, optional: true }) ??\n inject(type, { self: true })\n );\n },\n };\n}\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, signal } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { NgpRovingFocusItem } from '../roving-focus-item/roving-focus-item';\nimport { ngpRovingFocusGroup, provideRovingFocusGroupState } from './roving-focus-group-state';\nimport { provideRovingFocusGroup } from './roving-focus-group-token';\n\n/**\n * Apply the `ngpRovingFocusGroup` directive to an element to manage focus for a group of child elements.\n */\n@Directive({\n selector: '[ngpRovingFocusGroup]',\n exportAs: 'ngpRovingFocusGroup',\n providers: [\n provideRovingFocusGroup(NgpRovingFocusGroup),\n provideRovingFocusGroupState({ inherit: true }),\n ],\n})\nexport class NgpRovingFocusGroup {\n /**\n * Determine the orientation of the roving focus group.\n * @default 'vertical'\n */\n readonly orientation = input<NgpOrientation>('vertical', {\n alias: 'ngpRovingFocusGroupOrientation',\n });\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 active item in the roving focus group.\n * @internal\n */\n readonly activeItem = signal<NgpRovingFocusItem | null>(null);\n\n /**\n * The state of the roving focus group.\n */\n readonly state = ngpRovingFocusGroup({\n orientation: this.orientation,\n wrap: this.wrap,\n homeEnd: this.homeEnd,\n disabled: this.disabled,\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 if (item) {\n this.state.setActiveItem(item.id(), origin);\n }\n }\n}\n","import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { computed, ElementRef, inject, signal, Signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, createPrimitive, listener, onDestroy } from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectRovingFocusGroupState } from '../roving-focus-group/roving-focus-group-state';\n\n/**\n * The state interface for the RovingFocusItem pattern.\n */\nexport interface NgpRovingFocusItemState {\n readonly id: Signal<string>;\n readonly disabled: Signal<boolean>;\n readonly tabindex: Signal<number>;\n readonly element: ElementRef<HTMLElement>;\n focus(origin: FocusOrigin): void;\n}\n\n/**\n * The props interface for the RovingFocusItem pattern.\n */\nexport interface NgpRovingFocusItemProps {\n /**\n * Whether the item is disabled.\n */\n readonly disabled: Signal<boolean>;\n}\n\nexport const [\n NgpRovingFocusItemStateToken,\n ngpRovingFocusItem,\n injectRovingFocusItemState,\n provideRovingFocusItemState,\n] = createPrimitive(\n 'NgpRovingFocusItem',\n ({ disabled = signal(false) }: NgpRovingFocusItemProps) => {\n const element = injectElementRef();\n const group = injectRovingFocusGroupState();\n const focusMonitor = inject(FocusMonitor);\n\n // genertate a unique id for the roving focus item - this is not a DOM id but an internal identifier\n const id = uniqueId('ngp-roving-focus-item');\n\n /**\n * Derive the tabindex of the roving focus item.\n */\n const tabindex = computed(() =>\n !group()?.disabled() && group()?.activeItem() === id ? 0 : -1,\n );\n\n // Setup host attribute bindings\n attrBinding(element, 'tabindex', () => tabindex().toString());\n\n // Setup keyboard event listener\n listener(element, 'keydown', (event: KeyboardEvent) => {\n if (disabled()) {\n return;\n }\n group()?.onKeydown(event);\n });\n\n // Setup click event listener\n listener(element, 'click', () => {\n if (disabled()) {\n return;\n }\n group()?.setActiveItem(id, 'mouse');\n });\n\n function focus(origin: FocusOrigin): void {\n focusMonitor.focusVia(element, origin);\n }\n\n const state: NgpRovingFocusItemState = {\n id: signal(id),\n disabled,\n tabindex,\n focus,\n element,\n };\n\n // Register the item when created\n group()?.register(state);\n\n // Unregister the item when destroyed\n onDestroy(() => group()?.unregister(state));\n\n return state;\n },\n);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, computed, input } from '@angular/core';\nimport { ngpRovingFocusItem, provideRovingFocusItemState } from './roving-focus-item-state';\n\n/**\n * Apply the `ngpRovingFocusItem` directive to an element within a roving focus group to automatically manage focus.\n */\n@Directive({\n selector: '[ngpRovingFocusItem]',\n exportAs: 'ngpRovingFocusItem',\n providers: [provideRovingFocusItemState()],\n})\nexport class NgpRovingFocusItem {\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 private readonly state = ngpRovingFocusItem({ disabled: this.disabled });\n\n /**\n * Expose the internal id of the roving focus item.\n * @internal\n */\n readonly id = computed(() => this.state.id());\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AA4BO,MAAM,CACX,6BAA6B,EAC7B,mBAAmB,EACnB,2BAA2B,EAC3B,4BAA4B,EAC7B,GAAG,eAAe,CACjB,qBAAqB,EACrB,CAAC,EACC,WAAW,EAAE,YAAY,GAAG,MAAM,CAAC,UAAU,CAAC,EAC9C,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,EACpB,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,EACtB,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,EACxB,OAAO,GAAG,IAAI,GACW,KAA8B;IACvD,MAAM,WAAW,GAAG;UAChB,oBAAoB,CAAC,MAAM,6BAA6B,CAAC;UACzD,IAAI;IAER,IAAI,WAAW,EAAE;AACf,QAAA,OAAO,WAAW;IACpB;AAEA,IAAA,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AAC7C,IAAA,MAAM,KAAK,GAAG,MAAM,CAA4B,EAAE,iDAAC;AACnD,IAAA,MAAM,WAAW,GAAG,UAAU,CAAC,YAAY,CAAC;AAE5C;;AAEG;AACH,IAAA,SAAS,cAAc,GAAA;QACrB,OAAO,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAA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sBAAsB;AAChC,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,SAAS,EAAE,CAAC,2BAA2B,EAAE,CAAC;AAC3C,iBAAA;;;ACXD;;AAEG;;;;"}
@@ -37,10 +37,10 @@ class NgpSearchClear {
37
37
  clear() {
38
38
  this.search().clear();
39
39
  }
40
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpSearchClear, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
41
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: NgpSearchClear, isStandalone: true, selector: "[ngpSearchClear]", host: { listeners: { "click": "clear()" }, properties: { "tabindex": "-1", "attr.data-empty": "search().empty() ? \"\" : null" } }, exportAs: ["ngpSearchClear"], ngImport: i0 }); }
40
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpSearchClear, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
41
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: NgpSearchClear, isStandalone: true, selector: "[ngpSearchClear]", host: { listeners: { "click": "clear()" }, properties: { "tabindex": "-1", "attr.data-empty": "search().empty() ? \"\" : null" } }, exportAs: ["ngpSearchClear"], ngImport: i0 }); }
42
42
  }
43
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpSearchClear, decorators: [{
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpSearchClear, decorators: [{
44
44
  type: Directive,
45
45
  args: [{
46
46
  selector: '[ngpSearchClear]',
@@ -67,16 +67,16 @@ class NgpSearch {
67
67
  /**
68
68
  * The input field.
69
69
  */
70
- this.input = signal(null);
70
+ this.input = signal(null, ...(ngDevMode ? [{ debugName: "input" }] : []));
71
71
  /**
72
72
  * The value of the input.
73
73
  */
74
- this.value = signal('');
74
+ this.value = signal('', ...(ngDevMode ? [{ debugName: "value" }] : []));
75
75
  /**
76
76
  * Whether the input field is empty.
77
77
  * @internal
78
78
  */
79
- this.empty = computed(() => this.value() === '');
79
+ this.empty = computed(() => this.value() === '', ...(ngDevMode ? [{ debugName: "empty" }] : []));
80
80
  /**
81
81
  * The search field state.
82
82
  */
@@ -102,10 +102,10 @@ class NgpSearch {
102
102
  .pipe(safeTakeUntilDestroyed(this.destroyRef))
103
103
  .subscribe(() => this.value.set(input.value));
104
104
  }
105
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpSearch, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
106
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: NgpSearch, isStandalone: true, selector: "[ngpSearch]", host: { listeners: { "keydown.escape": "clear()" }, properties: { "attr.data-empty": "empty() ? \"\" : null" } }, providers: [provideSearchState()], exportAs: ["ngpSearch"], ngImport: i0 }); }
105
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpSearch, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
106
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: NgpSearch, isStandalone: true, selector: "[ngpSearch]", host: { listeners: { "keydown.escape": "clear()" }, properties: { "attr.data-empty": "empty() ? \"\" : null" } }, providers: [provideSearchState()], exportAs: ["ngpSearch"], ngImport: i0 }); }
107
107
  }
108
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpSearch, decorators: [{
108
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpSearch, decorators: [{
109
109
  type: Directive,
110
110
  args: [{
111
111
  selector: '[ngpSearch]',
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-search.mjs","sources":["../../../../packages/ng-primitives/search/src/search/search-state.ts","../../../../packages/ng-primitives/search/src/search-clear/search-clear.ts","../../../../packages/ng-primitives/search/src/search/search.ts","../../../../packages/ng-primitives/search/src/ng-primitives-search.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpSearch } from './search';\n\n/**\n * The state token for the Search primitive.\n */\nexport const NgpSearchStateToken = createStateToken<NgpSearch>('Search');\n\n/**\n * Provides the Search state.\n */\nexport const provideSearchState = createStateProvider(NgpSearchStateToken);\n\n/**\n * Injects the Search state.\n */\nexport const injectSearchState = createStateInjector<NgpSearch>(NgpSearchStateToken);\n\n/**\n * The Search state registration function.\n */\nexport const searchState = createState(NgpSearchStateToken);\n","import { Directive, HostListener } from '@angular/core';\nimport { injectSearchState } from '../search/search-state';\n\n/**\n * The `NgpSearchClear` directive is can be added to a button to clear the search field on click.\n */\n@Directive({\n selector: '[ngpSearchClear]',\n exportAs: 'ngpSearchClear',\n host: {\n '[tabindex]': '-1',\n '[attr.data-empty]': 'search().empty() ? \"\" : null',\n },\n})\nexport class NgpSearchClear {\n /**\n * Access the Search instance.\n */\n protected readonly search = injectSearchState();\n\n /**\n * Clear the input field.\n */\n @HostListener('click')\n protected clear(): void {\n this.search().clear();\n }\n}\n","import { computed, DestroyRef, Directive, HostListener, inject, signal } from '@angular/core';\nimport { safeTakeUntilDestroyed } from 'ng-primitives/utils';\nimport { fromEvent } from 'rxjs';\nimport { provideSearchState, searchState } from './search-state';\n\n/**\n * The `NgpSearch` directive is a container for the search field components.\n */\n@Directive({\n selector: '[ngpSearch]',\n exportAs: 'ngpSearch',\n providers: [provideSearchState()],\n host: {\n '[attr.data-empty]': 'empty() ? \"\" : null',\n },\n})\nexport class NgpSearch {\n /**\n * The destroy reference.\n */\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * The input field.\n */\n private readonly input = signal<HTMLInputElement | null>(null);\n\n /**\n * The value of the input.\n */\n private readonly value = signal<string>('');\n\n /**\n * Whether the input field is empty.\n * @internal\n */\n protected readonly empty = computed(() => this.value() === '');\n\n /**\n * The search field state.\n */\n protected readonly state = searchState<NgpSearch>(this);\n\n @HostListener('keydown.escape')\n clear(): void {\n const input = this.input();\n\n if (!input) {\n return;\n }\n\n input.value = '';\n input.dispatchEvent(new Event('input', { bubbles: true }));\n }\n\n /**\n * Register the input field.\n * @param input The input field.\n * @internal\n */\n registerInput(input: HTMLInputElement): void {\n this.input.set(input);\n this.value.set(input.value);\n\n fromEvent(input, 'input')\n .pipe(safeTakeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.value.set(input.value));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAQA;;AAEG;AACI,MAAM,mBAAmB,GAAG,gBAAgB,CAAY,QAAQ,CAAC;AAExE;;AAEG;MACU,kBAAkB,GAAG,mBAAmB,CAAC,mBAAmB;AAEzE;;AAEG;MACU,iBAAiB,GAAG,mBAAmB,CAAY,mBAAmB;AAEnF;;AAEG;AACI,MAAM,WAAW,GAAG,WAAW,CAAC,mBAAmB,CAAC;;ACvB3D;;AAEG;MASU,cAAc,CAAA;AAR3B,IAAA,WAAA,GAAA;AASE;;AAEG;QACgB,IAAA,CAAA,MAAM,GAAG,iBAAiB,EAAE;AAShD,IAAA;AAPC;;AAEG;IAEO,KAAK,GAAA;AACb,QAAA,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;IACvB;+GAZW,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAA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A;sBADJ,YAAY;uBAAC,gBAAgB;;;AC3ChC;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-primitives-search.mjs","sources":["../../../../packages/ng-primitives/search/src/search/search-state.ts","../../../../packages/ng-primitives/search/src/search-clear/search-clear.ts","../../../../packages/ng-primitives/search/src/search/search.ts","../../../../packages/ng-primitives/search/src/ng-primitives-search.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpSearch } from './search';\n\n/**\n * The state token for the Search primitive.\n */\nexport const NgpSearchStateToken = createStateToken<NgpSearch>('Search');\n\n/**\n * Provides the Search state.\n */\nexport const provideSearchState = createStateProvider(NgpSearchStateToken);\n\n/**\n * Injects the Search state.\n */\nexport const injectSearchState = createStateInjector<NgpSearch>(NgpSearchStateToken);\n\n/**\n * The Search state registration function.\n */\nexport const searchState = createState(NgpSearchStateToken);\n","import { Directive, HostListener } from '@angular/core';\nimport { injectSearchState } from '../search/search-state';\n\n/**\n * The `NgpSearchClear` directive is can be added to a button to clear the search field on click.\n */\n@Directive({\n selector: '[ngpSearchClear]',\n exportAs: 'ngpSearchClear',\n host: {\n '[tabindex]': '-1',\n '[attr.data-empty]': 'search().empty() ? \"\" : null',\n },\n})\nexport class NgpSearchClear {\n /**\n * Access the Search instance.\n */\n protected readonly search = injectSearchState();\n\n /**\n * Clear the input field.\n */\n @HostListener('click')\n protected clear(): void {\n this.search().clear();\n }\n}\n","import { computed, DestroyRef, Directive, HostListener, inject, signal } from '@angular/core';\nimport { safeTakeUntilDestroyed } from 'ng-primitives/utils';\nimport { fromEvent } from 'rxjs';\nimport { provideSearchState, searchState } from './search-state';\n\n/**\n * The `NgpSearch` directive is a container for the search field components.\n */\n@Directive({\n selector: '[ngpSearch]',\n exportAs: 'ngpSearch',\n providers: [provideSearchState()],\n host: {\n '[attr.data-empty]': 'empty() ? \"\" : null',\n },\n})\nexport class NgpSearch {\n /**\n * The destroy reference.\n */\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * The input field.\n */\n private readonly input = signal<HTMLInputElement | null>(null);\n\n /**\n * The value of the input.\n */\n private readonly value = signal<string>('');\n\n /**\n * Whether the input field is empty.\n * @internal\n */\n readonly empty = computed(() => this.value() === '');\n\n /**\n * The search field state.\n */\n protected readonly state = searchState<NgpSearch>(this);\n\n @HostListener('keydown.escape')\n clear(): void {\n const input = this.input();\n\n if (!input) {\n return;\n }\n\n input.value = '';\n input.dispatchEvent(new Event('input', { bubbles: true }));\n }\n\n /**\n * Register the input field.\n * @param input The input field.\n * @internal\n */\n registerInput(input: HTMLInputElement): void {\n this.input.set(input);\n this.value.set(input.value);\n\n fromEvent(input, 'input')\n .pipe(safeTakeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.value.set(input.value));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAQA;;AAEG;AACI,MAAM,mBAAmB,GAAG,gBAAgB,CAAY,QAAQ,CAAC;AAExE;;AAEG;MACU,kBAAkB,GAAG,mBAAmB,CAAC,mBAAmB;AAEzE;;AAEG;MACU,iBAAiB,GAAG,mBAAmB,CAAY,mBAAmB;AAEnF;;AAEG;AACI,MAAM,WAAW,GAAG,WAAW,CAAC,mBAAmB,CAAC;;ACvB3D;;AAEG;MASU,cAAc,CAAA;AAR3B,IAAA,WAAA,GAAA;AASE;;AAEG;QACgB,IAAA,CAAA,MAAM,GAAG,iBAAiB,EAAE;AAShD,IAAA;AAPC;;AAEG;IAEO,KAAK,GAAA;AACb,QAAA,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;IACvB;8GAZW,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAA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;uBAAC,gBAAgB;;;AC3ChC;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { input, booleanAttribute, Directive, computed, HostListener, inject, ViewContainerRef, TemplateRef, Injector, signal, InjectionToken, output, afterRenderEffect } from '@angular/core';
3
- import { setupFormControl } from 'ng-primitives/form-field';
3
+ import { ngpFormControl } from 'ng-primitives/form-field';
4
4
  import { ngpInteractions } from 'ng-primitives/interactions';
5
5
  import { uniqueId } from 'ng-primitives/utils';
6
6
  import { createStateToken, createStateProvider, createStateInjector, createState } from 'ng-primitives/state';
@@ -33,14 +33,15 @@ class NgpNativeSelect {
33
33
  /**
34
34
  * The id of the select. If not provided, a unique id will be generated.
35
35
  */
36
- this.id = input(uniqueId('ngp-native-select'));
36
+ this.id = input(uniqueId('ngp-native-select'), ...(ngDevMode ? [{ debugName: "id" }] : []));
37
37
  /**
38
38
  * Whether the select is disabled.
39
39
  */
40
- this.disabled = input(false, {
41
- alias: 'ngpNativeSelectDisabled',
42
- transform: booleanAttribute,
43
- });
40
+ this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", alias: 'ngpNativeSelectDisabled',
41
+ transform: booleanAttribute }] : [{
42
+ alias: 'ngpNativeSelectDisabled',
43
+ transform: booleanAttribute,
44
+ }]));
44
45
  /**
45
46
  * The select state.
46
47
  */
@@ -52,12 +53,12 @@ class NgpNativeSelect {
52
53
  focusVisible: true,
53
54
  disabled: this.state.disabled,
54
55
  });
55
- setupFormControl({ id: this.state.id, disabled: this.state.disabled });
56
+ ngpFormControl({ id: this.state.id, disabled: this.state.disabled });
56
57
  }
57
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpNativeSelect, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
58
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.11", type: NgpNativeSelect, isStandalone: true, selector: "select[ngpNativeSelect]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpNativeSelectDisabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.disabled": "state.disabled() || null" } }, providers: [provideNativeSelectState()], exportAs: ["ngpNativeSelect"], ngImport: i0 }); }
58
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpNativeSelect, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
59
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpNativeSelect, isStandalone: true, selector: "select[ngpNativeSelect]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpNativeSelectDisabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.disabled": "state.disabled() || null" } }, providers: [provideNativeSelectState()], exportAs: ["ngpNativeSelect"], ngImport: i0 }); }
59
60
  }
60
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpNativeSelect, decorators: [{
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpNativeSelect, decorators: [{
61
62
  type: Directive,
62
63
  args: [{
63
64
  selector: 'select[ngpNativeSelect]',
@@ -67,7 +68,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
67
68
  '[attr.disabled]': 'state.disabled() || null',
68
69
  },
69
70
  }]
70
- }], ctorParameters: () => [] });
71
+ }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpNativeSelectDisabled", required: false }] }] } });
71
72
 
72
73
  /**
73
74
  * The state token for the Select primitive.
@@ -98,13 +99,13 @@ class NgpSelectDropdown {
98
99
  */
99
100
  this.elementRef = injectElementRef();
100
101
  /** The id of the dropdown. */
101
- this.id = input(uniqueId('ngp-select-dropdown'));
102
+ this.id = input(uniqueId('ngp-select-dropdown'), ...(ngDevMode ? [{ debugName: "id" }] : []));
102
103
  this.state().registerDropdown(this);
103
104
  }
104
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpSelectDropdown, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
105
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.11", type: NgpSelectDropdown, isStandalone: true, selector: "[ngpSelectDropdown]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "listbox" }, properties: { "id": "id()", "style.left.px": "state().overlay()?.position()?.x", "style.top.px": "state().overlay()?.position()?.y", "style.--ngp-select-transform-origin": "state().overlay()?.transformOrigin()", "style.--ngp-select-width.px": "selectDimensions().width" } }, exportAs: ["ngpSelectDropdown"], ngImport: i0 }); }
105
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpSelectDropdown, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
106
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpSelectDropdown, isStandalone: true, selector: "[ngpSelectDropdown]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "listbox" }, properties: { "id": "id()", "style.left.px": "state().overlay()?.position()?.x", "style.top.px": "state().overlay()?.position()?.y", "style.--ngp-select-transform-origin": "state().overlay()?.transformOrigin()", "style.--ngp-select-width.px": "selectDimensions().width" } }, exportAs: ["ngpSelectDropdown"], ngImport: i0 }); }
106
107
  }
107
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpSelectDropdown, decorators: [{
108
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpSelectDropdown, decorators: [{
108
109
  type: Directive,
109
110
  args: [{
110
111
  selector: '[ngpSelectDropdown]',
@@ -118,7 +119,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
118
119
  '[style.--ngp-select-width.px]': 'selectDimensions().width',
119
120
  },
120
121
  }]
121
- }], ctorParameters: () => [] });
122
+ }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }] } });
122
123
 
123
124
  class NgpSelectOption {
124
125
  constructor() {
@@ -130,21 +131,22 @@ class NgpSelectOption {
130
131
  */
131
132
  this.elementRef = injectElementRef();
132
133
  /** The id of the option. */
133
- this.id = input(uniqueId('ngp-select-option'));
134
+ this.id = input(uniqueId('ngp-select-option'), ...(ngDevMode ? [{ debugName: "id" }] : []));
134
135
  /** @required The value of the option. */
135
- this.value = input(undefined, {
136
- alias: 'ngpSelectOptionValue',
137
- });
136
+ this.value = input(undefined, ...(ngDevMode ? [{ debugName: "value", alias: 'ngpSelectOptionValue' }] : [{
137
+ alias: 'ngpSelectOptionValue',
138
+ }]));
138
139
  /** The disabled state of the option. */
139
- this.disabled = input(false, {
140
- alias: 'ngpSelectOptionDisabled',
141
- transform: booleanAttribute,
142
- });
140
+ this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", alias: 'ngpSelectOptionDisabled',
141
+ transform: booleanAttribute }] : [{
142
+ alias: 'ngpSelectOptionDisabled',
143
+ transform: booleanAttribute,
144
+ }]));
143
145
  /**
144
146
  * Whether this option is the active descendant.
145
147
  * @internal
146
148
  */
147
- this.active = computed(() => this.state().activeDescendantManager.activeDescendant() === this.id());
149
+ this.active = computed(() => this.state().activeDescendantManager.activeDescendant() === this.id(), ...(ngDevMode ? [{ debugName: "active" }] : []));
148
150
  /** Whether this option is selected. */
149
151
  this.selected = computed(() => {
150
152
  const value = this.value();
@@ -156,7 +158,7 @@ class NgpSelectOption {
156
158
  return (Array.isArray(selectValue) && selectValue.some(v => this.state().compareWith()(value, v)));
157
159
  }
158
160
  return this.state().compareWith()(value, this.state().value());
159
- });
161
+ }, ...(ngDevMode ? [{ debugName: "selected" }] : []));
160
162
  this.state().registerOption(this);
161
163
  ngpInteractions({
162
164
  hover: true,
@@ -203,10 +205,10 @@ class NgpSelectOption {
203
205
  onPointerLeave() {
204
206
  this.state().activeDescendantManager.activate(undefined);
205
207
  }
206
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpSelectOption, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
207
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.11", type: NgpSelectOption, isStandalone: true, selector: "[ngpSelectOption]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "ngpSelectOptionValue", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpSelectOptionDisabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "option" }, listeners: { "click": "select()", "pointerenter": "onPointerEnter()", "pointerleave": "onPointerLeave()" }, properties: { "id": "id()", "attr.tabindex": "-1", "attr.aria-selected": "selected() ? \"true\" : undefined", "attr.data-selected": "selected() ? \"\" : undefined", "attr.data-active": "active() ? \"\" : undefined", "attr.data-disabled": "disabled() ? \"\" : undefined" } }, exportAs: ["ngpSelectOption"], ngImport: i0 }); }
208
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpSelectOption, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
209
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpSelectOption, isStandalone: true, selector: "[ngpSelectOption]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "ngpSelectOptionValue", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpSelectOptionDisabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "option" }, listeners: { "click": "select()", "pointerenter": "onPointerEnter()", "pointerleave": "onPointerLeave()" }, properties: { "id": "id()", "attr.tabindex": "-1", "attr.aria-selected": "selected() ? \"true\" : undefined", "attr.data-selected": "selected() ? \"\" : undefined", "attr.data-active": "active() ? \"\" : undefined", "attr.data-disabled": "disabled() ? \"\" : undefined" } }, exportAs: ["ngpSelectOption"], ngImport: i0 }); }
208
210
  }
209
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpSelectOption, decorators: [{
211
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpSelectOption, decorators: [{
210
212
  type: Directive,
211
213
  args: [{
212
214
  selector: '[ngpSelectOption]',
@@ -222,7 +224,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
222
224
  '(click)': 'select()',
223
225
  },
224
226
  }]
225
- }], ctorParameters: () => [], propDecorators: { onPointerEnter: [{
227
+ }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpSelectOptionValue", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpSelectOptionDisabled", required: false }] }], onPointerEnter: [{
226
228
  type: HostListener,
227
229
  args: ['pointerenter']
228
230
  }], onPointerLeave: [{
@@ -244,7 +246,7 @@ class NgpSelectPortal {
244
246
  * The overlay that manages the popover
245
247
  * @internal
246
248
  */
247
- this.overlay = signal(null);
249
+ this.overlay = signal(null, ...(ngDevMode ? [{ debugName: "overlay" }] : []));
248
250
  this.state().registerPortal(this);
249
251
  }
250
252
  /** Cleanup the portal. */
@@ -289,10 +291,10 @@ class NgpSelectPortal {
289
291
  };
290
292
  this.overlay.set(createOverlay(config));
291
293
  }
292
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpSelectPortal, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
293
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: NgpSelectPortal, isStandalone: true, selector: "[ngpSelectPortal]", exportAs: ["ngpSelectPortal"], ngImport: i0 }); }
294
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpSelectPortal, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
295
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: NgpSelectPortal, isStandalone: true, selector: "[ngpSelectPortal]", exportAs: ["ngpSelectPortal"], ngImport: i0 }); }
294
296
  }
295
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpSelectPortal, decorators: [{
297
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpSelectPortal, decorators: [{
296
298
  type: Directive,
297
299
  args: [{
298
300
  selector: '[ngpSelectPortal]',
@@ -335,66 +337,68 @@ class NgpSelect {
335
337
  /** Access the injector. */
336
338
  this.injector = inject(Injector);
337
339
  /** The unique id of the select. */
338
- this.id = input(uniqueId('ngp-select'));
340
+ this.id = input(uniqueId('ngp-select'), ...(ngDevMode ? [{ debugName: "id" }] : []));
339
341
  /** The value of the select. */
340
- this.value = input(undefined, {
341
- alias: 'ngpSelectValue',
342
- });
342
+ this.value = input(undefined, ...(ngDevMode ? [{ debugName: "value", alias: 'ngpSelectValue' }] : [{
343
+ alias: 'ngpSelectValue',
344
+ }]));
343
345
  /** Event emitted when the value changes. */
344
346
  this.valueChange = output({
345
347
  alias: 'ngpSelectValueChange',
346
348
  });
347
349
  /** Whether the select is multiple selection. */
348
- this.multiple = input(false, {
349
- alias: 'ngpSelectMultiple',
350
- transform: booleanAttribute,
351
- });
350
+ this.multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple", alias: 'ngpSelectMultiple',
351
+ transform: booleanAttribute }] : [{
352
+ alias: 'ngpSelectMultiple',
353
+ transform: booleanAttribute,
354
+ }]));
352
355
  /** Whether the select is disabled. */
353
- this.disabled = input(false, {
354
- alias: 'ngpSelectDisabled',
355
- transform: booleanAttribute,
356
- });
356
+ this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", alias: 'ngpSelectDisabled',
357
+ transform: booleanAttribute }] : [{
358
+ alias: 'ngpSelectDisabled',
359
+ transform: booleanAttribute,
360
+ }]));
357
361
  /** Emit when the dropdown open state changes. */
358
362
  this.openChange = output({
359
363
  alias: 'ngpSelectOpenChange',
360
364
  });
361
365
  /** The comparator function used to compare options. */
362
- this.compareWith = input(Object.is, {
363
- alias: 'ngpSelectCompareWith',
364
- });
366
+ this.compareWith = input(Object.is, ...(ngDevMode ? [{ debugName: "compareWith", alias: 'ngpSelectCompareWith' }] : [{
367
+ alias: 'ngpSelectCompareWith',
368
+ }]));
365
369
  /** The position of the dropdown. */
366
- this.placement = input(this.config.placement, {
367
- alias: 'ngpSelectDropdownPlacement',
368
- });
370
+ this.placement = input(this.config.placement, ...(ngDevMode ? [{ debugName: "placement", alias: 'ngpSelectDropdownPlacement' }] : [{
371
+ alias: 'ngpSelectDropdownPlacement',
372
+ }]));
369
373
  /** The container for the dropdown. */
370
- this.container = input(this.config.container, {
371
- alias: 'ngpSelectDropdownContainer',
372
- });
374
+ this.container = input(this.config.container, ...(ngDevMode ? [{ debugName: "container", alias: 'ngpSelectDropdownContainer' }] : [{
375
+ alias: 'ngpSelectDropdownContainer',
376
+ }]));
373
377
  /**
374
378
  * Store the select portal.
375
379
  * @internal
376
380
  */
377
- this.portal = signal(undefined);
381
+ this.portal = signal(undefined, ...(ngDevMode ? [{ debugName: "portal" }] : []));
378
382
  /**
379
383
  * Store the select dropdown.
380
384
  * @internal
381
385
  */
382
- this.dropdown = signal(undefined);
386
+ this.dropdown = signal(undefined, ...(ngDevMode ? [{ debugName: "dropdown" }] : []));
383
387
  /**
384
388
  * Store the select options.
385
389
  * @internal
386
390
  */
387
- this.options = signal([]);
391
+ this.options = signal([], ...(ngDevMode ? [{ debugName: "options" }] : []));
388
392
  /**
389
393
  * Access the overlay
390
394
  * @internal
391
395
  */
392
- this.overlay = computed(() => this.portal()?.overlay());
396
+ this.overlay = computed(() => this.portal()?.overlay(), ...(ngDevMode ? [{ debugName: "overlay" }] : []));
393
397
  /**
394
398
  * The open state of the select.
395
399
  * @internal
396
400
  */
397
- this.open = computed(() => this.overlay()?.isOpen() ?? false);
401
+ this.open = computed(() => this.overlay()?.isOpen() ?? false, ...(ngDevMode ? [{ debugName: "open" }] : []));
398
402
  /**
399
403
  * The active key descendant manager.
400
404
  * @internal
@@ -413,7 +417,7 @@ class NgpSelect {
413
417
  press: true,
414
418
  disabled: this.state.disabled,
415
419
  });
416
- setupFormControl({ id: this.state.id, disabled: this.state.disabled });
420
+ ngpFormControl({ id: this.state.id, disabled: this.state.disabled });
417
421
  // any time the active descendant changes, ensure we scroll it into view
418
422
  // perform after next render to ensure the DOM is updated
419
423
  // e.g. the dropdown is open before the option is scrolled into view
@@ -709,10 +713,10 @@ class NgpSelect {
709
713
  this.closeDropdown();
710
714
  event.preventDefault();
711
715
  }
712
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpSelect, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
713
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.11", type: NgpSelect, isStandalone: true, selector: "[ngpSelect]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "ngpSelectValue", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "ngpSelectMultiple", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpSelectDisabled", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "ngpSelectCompareWith", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "ngpSelectDropdownPlacement", isSignal: true, isRequired: false, transformFunction: null }, container: { classPropertyName: "container", publicName: "ngpSelectDropdownContainer", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "ngpSelectValueChange", openChange: "ngpSelectOpenChange" }, host: { attributes: { "role": "combobox" }, listeners: { "click": "toggleDropdown()", "keydown": "handleKeydown($event)", "blur": "onBlur($event)" }, properties: { "id": "state.id()", "attr.aria-expanded": "state.open()", "attr.aria-controls": "state.open() ? state.dropdown()?.id() : undefined", "attr.aria-activedescendant": "state.open() ? activeDescendantManager.activeDescendant() : undefined", "attr.tabindex": "state.disabled() ? -1 : 0", "attr.data-open": "state.open() ? \"\" : undefined", "attr.data-disabled": "state.disabled() ? \"\" : undefined", "attr.data-multiple": "state.multiple() ? \"\" : undefined" } }, providers: [provideSelectState()], exportAs: ["ngpSelect"], ngImport: i0 }); }
716
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpSelect, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
717
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpSelect, isStandalone: true, selector: "[ngpSelect]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "ngpSelectValue", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "ngpSelectMultiple", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpSelectDisabled", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "ngpSelectCompareWith", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "ngpSelectDropdownPlacement", isSignal: true, isRequired: false, transformFunction: null }, container: { classPropertyName: "container", publicName: "ngpSelectDropdownContainer", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "ngpSelectValueChange", openChange: "ngpSelectOpenChange" }, host: { attributes: { "role": "combobox" }, listeners: { "click": "toggleDropdown()", "keydown": "handleKeydown($event)", "blur": "onBlur($event)" }, properties: { "id": "state.id()", "attr.aria-expanded": "open()", "attr.aria-controls": "open() ? dropdown()?.id() : undefined", "attr.aria-activedescendant": "open() ? activeDescendantManager.activeDescendant() : undefined", "attr.tabindex": "state.disabled() ? -1 : 0", "attr.data-open": "open() ? \"\" : undefined", "attr.data-disabled": "state.disabled() ? \"\" : undefined", "attr.data-multiple": "state.multiple() ? \"\" : undefined" } }, providers: [provideSelectState()], exportAs: ["ngpSelect"], ngImport: i0 }); }
714
718
  }
715
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpSelect, decorators: [{
719
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpSelect, decorators: [{
716
720
  type: Directive,
717
721
  args: [{
718
722
  selector: '[ngpSelect]',
@@ -721,16 +725,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
721
725
  host: {
722
726
  role: 'combobox',
723
727
  '[id]': 'state.id()',
724
- '[attr.aria-expanded]': 'state.open()',
725
- '[attr.aria-controls]': 'state.open() ? state.dropdown()?.id() : undefined',
726
- '[attr.aria-activedescendant]': 'state.open() ? activeDescendantManager.activeDescendant() : undefined',
728
+ '[attr.aria-expanded]': 'open()',
729
+ '[attr.aria-controls]': 'open() ? dropdown()?.id() : undefined',
730
+ '[attr.aria-activedescendant]': 'open() ? activeDescendantManager.activeDescendant() : undefined',
727
731
  '[attr.tabindex]': 'state.disabled() ? -1 : 0',
728
- '[attr.data-open]': 'state.open() ? "" : undefined',
732
+ '[attr.data-open]': 'open() ? "" : undefined',
729
733
  '[attr.data-disabled]': 'state.disabled() ? "" : undefined',
730
734
  '[attr.data-multiple]': 'state.multiple() ? "" : undefined',
731
735
  },
732
736
  }]
733
- }], ctorParameters: () => [], propDecorators: { toggleDropdown: [{
737
+ }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpSelectValue", required: false }] }], valueChange: [{ type: i0.Output, args: ["ngpSelectValueChange"] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpSelectMultiple", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpSelectDisabled", required: false }] }], openChange: [{ type: i0.Output, args: ["ngpSelectOpenChange"] }], compareWith: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpSelectCompareWith", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpSelectDropdownPlacement", required: false }] }], container: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpSelectDropdownContainer", required: false }] }], toggleDropdown: [{
734
738
  type: HostListener,
735
739
  args: ['click']
736
740
  }], handleKeydown: [{