ng-primitives 0.120.4 → 0.121.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 (147) hide show
  1. package/example-theme/index.css +9 -0
  2. package/fesm2022/ng-primitives-a11y.mjs +5 -5
  3. package/fesm2022/ng-primitives-a11y.mjs.map +1 -1
  4. package/fesm2022/ng-primitives-accordion.mjs +34 -51
  5. package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
  6. package/fesm2022/ng-primitives-ai.mjs +39 -52
  7. package/fesm2022/ng-primitives-ai.mjs.map +1 -1
  8. package/fesm2022/ng-primitives-autofill.mjs +4 -4
  9. package/fesm2022/ng-primitives-autofill.mjs.map +1 -1
  10. package/fesm2022/ng-primitives-avatar.mjs +14 -17
  11. package/fesm2022/ng-primitives-avatar.mjs.map +1 -1
  12. package/fesm2022/ng-primitives-breadcrumbs.mjs +21 -21
  13. package/fesm2022/ng-primitives-breadcrumbs.mjs.map +1 -1
  14. package/fesm2022/ng-primitives-button.mjs +7 -9
  15. package/fesm2022/ng-primitives-button.mjs.map +1 -1
  16. package/fesm2022/ng-primitives-checkbox.mjs +15 -30
  17. package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
  18. package/fesm2022/ng-primitives-combobox.mjs +60 -92
  19. package/fesm2022/ng-primitives-combobox.mjs.map +1 -1
  20. package/fesm2022/ng-primitives-common.mjs +4 -4
  21. package/fesm2022/ng-primitives-common.mjs.map +1 -1
  22. package/fesm2022/ng-primitives-context-menu.mjs +68 -121
  23. package/fesm2022/ng-primitives-context-menu.mjs.map +1 -1
  24. package/fesm2022/ng-primitives-date-picker.mjs +91 -115
  25. package/fesm2022/ng-primitives-date-picker.mjs.map +1 -1
  26. package/fesm2022/ng-primitives-dialog.mjs +35 -51
  27. package/fesm2022/ng-primitives-dialog.mjs.map +1 -1
  28. package/fesm2022/ng-primitives-file-upload.mjs +26 -53
  29. package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
  30. package/fesm2022/ng-primitives-focus-trap.mjs +5 -8
  31. package/fesm2022/ng-primitives-focus-trap.mjs.map +1 -1
  32. package/fesm2022/ng-primitives-form-field.mjs +39 -44
  33. package/fesm2022/ng-primitives-form-field.mjs.map +1 -1
  34. package/fesm2022/ng-primitives-input-otp.mjs +30 -43
  35. package/fesm2022/ng-primitives-input-otp.mjs.map +1 -1
  36. package/fesm2022/ng-primitives-input.mjs +6 -8
  37. package/fesm2022/ng-primitives-input.mjs.map +1 -1
  38. package/fesm2022/ng-primitives-interactions.mjs +31 -48
  39. package/fesm2022/ng-primitives-interactions.mjs.map +1 -1
  40. package/fesm2022/ng-primitives-internal.mjs +39 -35
  41. package/fesm2022/ng-primitives-internal.mjs.map +1 -1
  42. package/fesm2022/ng-primitives-listbox.mjs +34 -48
  43. package/fesm2022/ng-primitives-listbox.mjs.map +1 -1
  44. package/fesm2022/ng-primitives-menu.mjs +85 -151
  45. package/fesm2022/ng-primitives-menu.mjs.map +1 -1
  46. package/fesm2022/ng-primitives-meter.mjs +25 -36
  47. package/fesm2022/ng-primitives-meter.mjs.map +1 -1
  48. package/fesm2022/ng-primitives-navigation-menu.mjs +60 -108
  49. package/fesm2022/ng-primitives-navigation-menu.mjs.map +1 -1
  50. package/fesm2022/ng-primitives-number-field.mjs +35 -59
  51. package/fesm2022/ng-primitives-number-field.mjs.map +1 -1
  52. package/fesm2022/ng-primitives-pagination.mjs +270 -297
  53. package/fesm2022/ng-primitives-pagination.mjs.map +1 -1
  54. package/fesm2022/ng-primitives-popover.mjs +209 -223
  55. package/fesm2022/ng-primitives-popover.mjs.map +1 -1
  56. package/fesm2022/ng-primitives-portal.mjs +88 -59
  57. package/fesm2022/ng-primitives-portal.mjs.map +1 -1
  58. package/fesm2022/ng-primitives-progress.mjs +30 -41
  59. package/fesm2022/ng-primitives-progress.mjs.map +1 -1
  60. package/fesm2022/ng-primitives-radio.mjs +20 -30
  61. package/fesm2022/ng-primitives-radio.mjs.map +1 -1
  62. package/fesm2022/ng-primitives-resize.mjs +3 -3
  63. package/fesm2022/ng-primitives-resize.mjs.map +1 -1
  64. package/fesm2022/ng-primitives-roving-focus.mjs +20 -34
  65. package/fesm2022/ng-primitives-roving-focus.mjs.map +1 -1
  66. package/fesm2022/ng-primitives-search.mjs +9 -9
  67. package/fesm2022/ng-primitives-search.mjs.map +1 -1
  68. package/fesm2022/ng-primitives-select.mjs +720 -620
  69. package/fesm2022/ng-primitives-select.mjs.map +1 -1
  70. package/fesm2022/ng-primitives-separator.mjs +4 -6
  71. package/fesm2022/ng-primitives-separator.mjs.map +1 -1
  72. package/fesm2022/ng-primitives-slider.mjs +63 -100
  73. package/fesm2022/ng-primitives-slider.mjs.map +1 -1
  74. package/fesm2022/ng-primitives-state.mjs +3 -3
  75. package/fesm2022/ng-primitives-state.mjs.map +1 -1
  76. package/fesm2022/ng-primitives-switch.mjs +15 -21
  77. package/fesm2022/ng-primitives-switch.mjs.map +1 -1
  78. package/fesm2022/ng-primitives-tabs.mjs +31 -41
  79. package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
  80. package/fesm2022/ng-primitives-textarea.mjs +5 -7
  81. package/fesm2022/ng-primitives-textarea.mjs.map +1 -1
  82. package/fesm2022/ng-primitives-toast.mjs +30 -23
  83. package/fesm2022/ng-primitives-toast.mjs.map +1 -1
  84. package/fesm2022/ng-primitives-toggle-group.mjs +20 -36
  85. package/fesm2022/ng-primitives-toggle-group.mjs.map +1 -1
  86. package/fesm2022/ng-primitives-toggle.mjs +10 -19
  87. package/fesm2022/ng-primitives-toggle.mjs.map +1 -1
  88. package/fesm2022/ng-primitives-toolbar.mjs +4 -6
  89. package/fesm2022/ng-primitives-toolbar.mjs.map +1 -1
  90. package/fesm2022/ng-primitives-tooltip.mjs +401 -402
  91. package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
  92. package/fesm2022/ng-primitives-utils.mjs +5 -4
  93. package/fesm2022/ng-primitives-utils.mjs.map +1 -1
  94. package/package.json +56 -55
  95. package/schematics/ng-generate/templates/select/select.__fileSuffix@dasherize__.ts.template +48 -48
  96. package/{a11y/index.d.ts → types/ng-primitives-a11y.d.ts} +18 -24
  97. package/{accordion/index.d.ts → types/ng-primitives-accordion.d.ts} +85 -98
  98. package/{autofill/index.d.ts → types/ng-primitives-autofill.d.ts} +3 -10
  99. package/{avatar/index.d.ts → types/ng-primitives-avatar.d.ts} +7 -30
  100. package/{breadcrumbs/index.d.ts → types/ng-primitives-breadcrumbs.d.ts} +15 -70
  101. package/{button/index.d.ts → types/ng-primitives-button.d.ts} +23 -29
  102. package/{checkbox/index.d.ts → types/ng-primitives-checkbox.d.ts} +68 -74
  103. package/{combobox/index.d.ts → types/ng-primitives-combobox.d.ts} +35 -35
  104. package/{context-menu/index.d.ts → types/ng-primitives-context-menu.d.ts} +2 -1
  105. package/{date-picker/index.d.ts → types/ng-primitives-date-picker.d.ts} +2 -2
  106. package/{dialog/index.d.ts → types/ng-primitives-dialog.d.ts} +7 -2
  107. package/{file-upload/index.d.ts → types/ng-primitives-file-upload.d.ts} +5 -20
  108. package/{focus-trap/index.d.ts → types/ng-primitives-focus-trap.d.ts} +3 -10
  109. package/{form-field/index.d.ts → types/ng-primitives-form-field.d.ts} +9 -40
  110. package/{input/index.d.ts → types/ng-primitives-input.d.ts} +3 -10
  111. package/{menu/index.d.ts → types/ng-primitives-menu.d.ts} +17 -63
  112. package/{navigation-menu/index.d.ts → types/ng-primitives-navigation-menu.d.ts} +15 -70
  113. package/{number-field/index.d.ts → types/ng-primitives-number-field.d.ts} +80 -110
  114. package/types/ng-primitives-pagination.d.ts +502 -0
  115. package/{popover/index.d.ts → types/ng-primitives-popover.d.ts} +244 -57
  116. package/{portal/index.d.ts → types/ng-primitives-portal.d.ts} +22 -13
  117. package/{progress/index.d.ts → types/ng-primitives-progress.d.ts} +3 -10
  118. package/{roving-focus/index.d.ts → types/ng-primitives-roving-focus.d.ts} +65 -79
  119. package/types/ng-primitives-select.d.ts +687 -0
  120. package/{separator/index.d.ts → types/ng-primitives-separator.d.ts} +3 -10
  121. package/{slider/index.d.ts → types/ng-primitives-slider.d.ts} +76 -138
  122. package/{state/index.d.ts → types/ng-primitives-state.d.ts} +26 -21
  123. package/{switch/index.d.ts → types/ng-primitives-switch.d.ts} +50 -64
  124. package/{tabs/index.d.ts → types/ng-primitives-tabs.d.ts} +9 -40
  125. package/{textarea/index.d.ts → types/ng-primitives-textarea.d.ts} +3 -10
  126. package/{toast/index.d.ts → types/ng-primitives-toast.d.ts} +13 -1
  127. package/{toggle-group/index.d.ts → types/ng-primitives-toggle-group.d.ts} +75 -89
  128. package/{toggle/index.d.ts → types/ng-primitives-toggle.d.ts} +50 -56
  129. package/{toolbar/index.d.ts → types/ng-primitives-toolbar.d.ts} +3 -10
  130. package/types/ng-primitives-tooltip.d.ts +691 -0
  131. package/pagination/index.d.ts +0 -211
  132. package/select/index.d.ts +0 -396
  133. package/tooltip/index.d.ts +0 -384
  134. /package/{ai/index.d.ts → types/ng-primitives-ai.d.ts} +0 -0
  135. /package/{common/index.d.ts → types/ng-primitives-common.d.ts} +0 -0
  136. /package/{date-time-luxon/index.d.ts → types/ng-primitives-date-time-luxon.d.ts} +0 -0
  137. /package/{date-time/index.d.ts → types/ng-primitives-date-time.d.ts} +0 -0
  138. /package/{input-otp/index.d.ts → types/ng-primitives-input-otp.d.ts} +0 -0
  139. /package/{interactions/index.d.ts → types/ng-primitives-interactions.d.ts} +0 -0
  140. /package/{internal/index.d.ts → types/ng-primitives-internal.d.ts} +0 -0
  141. /package/{listbox/index.d.ts → types/ng-primitives-listbox.d.ts} +0 -0
  142. /package/{meter/index.d.ts → types/ng-primitives-meter.d.ts} +0 -0
  143. /package/{radio/index.d.ts → types/ng-primitives-radio.d.ts} +0 -0
  144. /package/{resize/index.d.ts → types/ng-primitives-resize.d.ts} +0 -0
  145. /package/{search/index.d.ts → types/ng-primitives-search.d.ts} +0 -0
  146. /package/{utils/index.d.ts → types/ng-primitives-utils.d.ts} +0 -0
  147. /package/{index.d.ts → types/ng-primitives.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-input-otp.mjs","sources":["../../../../packages/ng-primitives/input-otp/src/input-otp/input-otp-state.ts","../../../../packages/ng-primitives/input-otp/src/input-otp-input/input-otp-input.ts","../../../../packages/ng-primitives/input-otp/src/input-otp-slot/input-otp-slot.ts","../../../../packages/ng-primitives/input-otp/src/input-otp/input-otp.ts","../../../../packages/ng-primitives/input-otp/src/ng-primitives-input-otp.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpInputOtp } from './input-otp';\n\n/**\n * The state token for the InputOtp primitive.\n */\nexport const NgpInputOtpStateToken = createStateToken<NgpInputOtp>('InputOtp');\n\n/**\n * Provides the InputOtp state.\n */\nexport const provideInputOtpState = createStateProvider(NgpInputOtpStateToken);\n\n/**\n * Injects the InputOtp state.\n */\nexport const injectInputOtpState = createStateInjector<NgpInputOtp>(NgpInputOtpStateToken);\n\n/**\n * The InputOtp state registration function.\n */\nexport const inputOtpState = createState(NgpInputOtpStateToken);\n","import { AfterViewInit, Directive, HostListener } from '@angular/core';\nimport { NgpVisuallyHidden } from 'ng-primitives/a11y';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { injectInputOtpState } from '../input-otp/input-otp-state';\n\n@Directive({\n selector: 'input[ngpInputOtpInput]',\n exportAs: 'ngpInputOtpInput',\n hostDirectives: [NgpVisuallyHidden],\n host: {\n autocomplete: 'one-time-code',\n '[attr.inputmode]': 'state().inputMode()',\n '[attr.maxlength]': 'state().maxLength()',\n '[attr.pattern]': 'state().pattern() || null',\n '[attr.disabled]': 'state().disabled() ? \"\" : null',\n },\n})\nexport class NgpInputOtpInput implements AfterViewInit {\n /**\n * Access the element reference.\n */\n readonly elementRef = injectElementRef<HTMLInputElement>();\n\n /**\n * Access the input-otp state.\n */\n protected readonly state = injectInputOtpState();\n\n constructor() {\n // Register this input with the parent\n this.state().registerInput(this);\n }\n\n ngAfterViewInit(): void {\n // Set initial value\n this.elementRef.nativeElement.value = this.state().value();\n }\n\n /**\n * Focus the input.\n * @internal\n */\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n /**\n * Set selection range.\n * @param start Start position\n * @param end End position\n * @internal\n */\n setSelectionRange(start: number, end: number): void {\n this.elementRef.nativeElement.setSelectionRange(start, end);\n }\n\n /**\n * Handle input events (typing).\n */\n @HostListener('input', ['$event'])\n protected onInput(event: Event): void {\n if (this.state().disabled()) {\n return;\n }\n\n const input = event.target as HTMLInputElement;\n let newValue = input.value;\n\n // Validate against pattern if provided\n const pattern = this.state().pattern();\n if (pattern) {\n const patternRegex = new RegExp(pattern);\n const filteredValue = newValue\n .split('')\n .filter(char => patternRegex.test(char))\n .join('');\n\n if (filteredValue !== newValue) {\n newValue = filteredValue;\n input.value = newValue;\n }\n }\n\n // Clamp to maxLength\n const maxLength = this.state().maxLength();\n if (newValue.length > maxLength) {\n newValue = newValue.substring(0, maxLength);\n input.value = newValue;\n }\n\n this.state().updateValue(newValue);\n this.updateSelection();\n }\n\n /**\n * Handle paste events.\n */\n @HostListener('paste', ['$event'])\n protected onPaste(event: ClipboardEvent): void {\n if (this.state().disabled()) {\n return;\n }\n\n event.preventDefault();\n\n const clipboardData = event.clipboardData?.getData('text') || '';\n let pastedText = clipboardData.trim();\n\n // Apply paste transformer if provided\n const transformer = this.state().pasteTransformer();\n if (transformer) {\n pastedText = transformer(pastedText);\n }\n\n // Validate against pattern if provided\n const pattern = this.state().pattern();\n if (pattern) {\n const patternRegex = new RegExp(pattern);\n pastedText = pastedText\n .split('')\n .filter(char => patternRegex.test(char))\n .join('');\n }\n\n // Clamp to maxLength\n const maxLength = this.state().maxLength();\n if (pastedText.length > maxLength) {\n pastedText = pastedText.substring(0, maxLength);\n }\n\n // Update the input value and state\n this.elementRef.nativeElement.value = pastedText;\n this.state().updateValue(pastedText);\n\n // Set caret to the end\n const endPosition = pastedText.length;\n this.setSelectionRange(endPosition, endPosition);\n this.updateSelection();\n }\n\n /**\n * Handle focus events.\n */\n @HostListener('focus')\n protected onFocus(): void {\n this.state().updateFocus(true);\n this.updateSelection();\n }\n\n /**\n * Handle blur events.\n */\n @HostListener('blur')\n protected onBlur(): void {\n this.state().updateFocus(false);\n }\n\n /**\n * Handle keyup events to update selection.\n */\n @HostListener('keyup')\n protected onKeyup(): void {\n this.updateSelection();\n }\n\n /**\n * Handle selection change events.\n */\n @HostListener('select')\n protected onSelect(): void {\n this.updateSelection();\n }\n\n /**\n * Update the selection state.\n */\n private updateSelection(): void {\n const input = this.elementRef.nativeElement;\n const maxLength = this.state().maxLength();\n\n // If input is at max length, set selection to last character\n if (input.value.length === maxLength) {\n input.setSelectionRange(input.value.length - 1, input.value.length);\n }\n\n // if the input is not at max length, set selection at the end\n if (input.value.length < maxLength) {\n input.setSelectionRange(input.value.length, input.value.length);\n }\n\n const start = input.selectionStart || 0;\n const end = input.selectionEnd || 0;\n this.state().updateSelection(start, end);\n }\n}\n","import { computed, Directive, OnDestroy } from '@angular/core';\nimport { injectInputOtpState } from '../input-otp/input-otp-state';\n\n@Directive({\n selector: '[ngpInputOtpSlot]',\n exportAs: 'ngpInputOtpSlot',\n host: {\n role: 'presentation',\n '[attr.data-slot-index]': 'index()',\n '[attr.data-active]': 'focused() ? \"\" : null',\n '[attr.data-filled]': 'filled() ? \"\" : null',\n '[attr.data-caret]': 'caret() ? \"\" : null',\n '[attr.data-placeholder]': 'showPlaceholder() ? \"\" : null',\n '[textContent]': 'displayChar()',\n '(click)': 'onClick($event)',\n },\n})\nexport class NgpInputOtpSlot implements OnDestroy {\n /**\n * Access the input-otp state.\n */\n protected readonly state = injectInputOtpState();\n\n /**\n * The computed index of this slot based on registration order.\n */\n readonly index = computed(() => this.state().getSlotIndex(this));\n\n /**\n * The character for this slot from the value string.\n */\n private readonly char = computed(() => {\n const value = this.state().value();\n const currentIndex = this.index();\n return currentIndex >= 0 && currentIndex < value.length ? value[currentIndex] : null;\n });\n\n /**\n * Whether this slot is focused (active).\n */\n protected readonly focused = computed(() => {\n const currentIndex = this.index();\n const isFocused = this.state().isFocused();\n const selectionStart = this.state().selectionStart();\n const value = this.state().value();\n const maxLength = this.state().maxLength();\n\n return (\n isFocused &&\n (currentIndex === selectionStart ||\n (value.length === maxLength && currentIndex === maxLength - 1))\n );\n });\n\n /**\n * Whether this slot should show the caret.\n */\n protected readonly caret = computed(() => {\n const currentIndex = this.index();\n const isFocused = this.state().isFocused();\n const selectionStart = this.state().selectionStart();\n const selectionEnd = this.state().selectionEnd();\n const value = this.state().value();\n const maxLength = this.state().maxLength();\n\n return (\n isFocused &&\n currentIndex === selectionStart &&\n selectionStart === selectionEnd &&\n value.length < maxLength\n );\n });\n\n /**\n * Whether this slot is filled with a character.\n */\n protected readonly filled = computed(() => this.char() !== null);\n\n /**\n * Whether to show placeholder for this slot.\n */\n protected readonly showPlaceholder = computed(() => {\n const placeholder = this.state().placeholder();\n return !this.filled() && !!placeholder;\n });\n\n /**\n * The display character for this slot (character or placeholder).\n */\n protected readonly displayChar = computed(() => {\n const char = this.char();\n if (char) return char;\n if (this.showPlaceholder()) return this.state().placeholder();\n return '';\n });\n\n constructor() {\n this.state().registerSlot(this);\n }\n\n ngOnDestroy(): void {\n // Unregister this slot when destroyed\n this.state().unregisterSlot(this);\n }\n\n /**\n * Handle click events on the slot.\n * @internal\n */\n protected onClick(event: Event): void {\n if (this.state().disabled()) return;\n\n const currentValue = this.state().value();\n const maxLength = this.state().maxLength();\n\n // Focus the first empty slot, or the last slot if all are filled\n const targetPosition = currentValue.length < maxLength ? currentValue.length : maxLength - 1;\n this.state().focusAtPosition(targetPosition);\n event.preventDefault();\n event.stopPropagation();\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, input, output, signal } from '@angular/core';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport type { NgpInputOtpInput } from '../input-otp-input/input-otp-input';\nimport type { NgpInputOtpSlot } from '../input-otp-slot/input-otp-slot';\nimport { inputOtpState, provideInputOtpState } from './input-otp-state';\n\nexport type NgpInputOtpInputMode =\n | 'numeric'\n | 'text'\n | 'decimal'\n | 'tel'\n | 'search'\n | 'email'\n | 'url';\n\n@Directive({\n selector: '[ngpInputOtp]',\n exportAs: 'ngpInputOtp',\n providers: [provideInputOtpState()],\n})\nexport class NgpInputOtp {\n /**\n * Access the element reference.\n */\n readonly elementRef = injectElementRef<HTMLElement>();\n\n /**\n * The id of the input-otp.\n */\n readonly id = input(uniqueId('ngp-input-otp'));\n\n /**\n * The current value of the OTP.\n */\n readonly value = input<string>('', {\n alias: 'ngpInputOtpValue',\n });\n\n /**\n * The regex pattern for allowed characters.\n */\n readonly pattern = input<string>('[0-9]', {\n alias: 'ngpInputOtpPattern',\n });\n\n /**\n * The input mode for the hidden input.\n */\n readonly inputMode = input<NgpInputOtpInputMode>('text', {\n alias: 'ngpInputOtpInputMode',\n });\n\n /**\n * Function to transform pasted text.\n */\n readonly pasteTransformer = input<(text: string) => string>(undefined, {\n alias: 'ngpInputOtpPasteTransformer',\n });\n\n /**\n * Whether the input-otp is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpInputOtpDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * The placeholder character to display when a slot is empty.\n */\n readonly placeholder = input<string>('', {\n alias: 'ngpInputOtpPlaceholder',\n });\n\n /**\n * Event emitted when the value changes.\n */\n readonly valueChange = output<string>({\n alias: 'ngpInputOtpValueChange',\n });\n\n /**\n * Event emitted when the OTP is complete (maxLength characters entered).\n */\n readonly complete = output<string>({\n alias: 'ngpInputOtpComplete',\n });\n\n /**\n * Store the input element reference.\n * @internal\n */\n private readonly inputElement = signal<NgpInputOtpInput | undefined>(undefined);\n\n /**\n * Store registered slots in order.\n * @internal\n */\n private readonly slots = signal<NgpInputOtpSlot[]>([]);\n\n /**\n * The number of characters in the OTP, derived from registered slots.\n */\n readonly maxLength = computed(() => this.slots().length);\n\n /**\n * The focus state of the input.\n * @internal\n */\n readonly isFocused = signal(false);\n\n /**\n * The selection start position.\n * @internal\n */\n readonly selectionStart = signal(0);\n\n /**\n * The selection end position.\n * @internal\n */\n readonly selectionEnd = signal(0);\n\n /**\n * The state of the input-otp.\n */\n protected readonly state = inputOtpState<NgpInputOtp>(this);\n\n constructor() {\n ngpInteractions({\n hover: true,\n press: true,\n focus: true,\n disabled: this.state.disabled,\n });\n }\n\n /**\n * Register an input element with the input-otp.\n * @param input The input element to register.\n * @internal\n */\n registerInput(input: NgpInputOtpInput): void {\n this.inputElement.set(input);\n }\n\n /**\n * Register a slot with the input-otp.\n * @param slot The slot to register.\n * @internal\n */\n registerSlot(slot: NgpInputOtpSlot): void {\n this.slots.update(currentSlots => [...currentSlots, slot]);\n }\n\n /**\n * Unregister a slot from the input-otp.\n * @param slot The slot to unregister.\n * @internal\n */\n unregisterSlot(slot: NgpInputOtpSlot): void {\n this.slots.update(currentSlots => currentSlots.filter(s => s !== slot));\n }\n\n /**\n * Get the index of a registered slot.\n * @param slot The slot to get the index for.\n * @returns The index of the slot, or -1 if not found.\n * @internal\n */\n getSlotIndex(slot: NgpInputOtpSlot): number {\n return this.slots().indexOf(slot);\n }\n\n /**\n * Update the value and emit change events.\n * @param newValue The new value.\n * @internal\n */\n updateValue(newValue: string): void {\n if (newValue === this.state.value()) {\n return;\n }\n\n this.state.value.set(newValue);\n this.valueChange.emit(newValue);\n\n // Emit complete event when the OTP is complete\n if (newValue.length === this.maxLength()) {\n this.complete.emit(newValue);\n }\n }\n\n /**\n * Update focus state.\n * @param focused Whether the input is focused.\n * @internal\n */\n updateFocus(focused: boolean): void {\n this.isFocused.set(focused);\n }\n\n /**\n * Update selection state.\n * @param start Selection start position.\n * @param end Selection end position.\n * @internal\n */\n updateSelection(start: number, end: number): void {\n this.selectionStart.set(start);\n this.selectionEnd.set(end);\n }\n\n /**\n * Focus the input and set caret to the specified position.\n * @param position The position to set the caret to.\n * @internal\n */\n focusAtPosition(position: number): void {\n const input = this.inputElement();\n if (!input) {\n return;\n }\n\n input.focus();\n input.setSelectionRange(position, position);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAQA;;AAEG;AACI,MAAM,qBAAqB,GAAG,gBAAgB,CAAc,UAAU,CAAC;AAE9E;;AAEG;MACU,oBAAoB,GAAG,mBAAmB,CAAC,qBAAqB;AAE7E;;AAEG;MACU,mBAAmB,GAAG,mBAAmB,CAAc,qBAAqB;AAEzF;;AAEG;AACI,MAAM,aAAa,GAAG,WAAW,CAAC,qBAAqB,CAAC;;MCTlD,gBAAgB,CAAA;AAW3B,IAAA,WAAA,GAAA;AAVA;;AAEG;QACM,IAAA,CAAA,UAAU,GAAG,gBAAgB,EAAoB;AAE1D;;AAEG;QACgB,IAAA,CAAA,KAAK,GAAG,mBAAmB,EAAE;;QAI9C,IAAI,CAAC,KAAK,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC;IAClC;IAEA,eAAe,GAAA;;AAEb,QAAA,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE;IAC5D;AAEA;;;AAGG;IACH,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,EAAE;IACvC;AAEA;;;;;AAKG;IACH,iBAAiB,CAAC,KAAa,EAAE,GAAW,EAAA;QAC1C,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,iBAAiB,CAAC,KAAK,EAAE,GAAG,CAAC;IAC7D;AAEA;;AAEG;AAEO,IAAA,OAAO,CAAC,KAAY,EAAA;QAC5B,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,EAAE;YAC3B;QACF;AAEA,QAAA,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B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,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,WAAA,EAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,UAAA,EAAA,wBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,WAAA,EAAA,wBAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,EAAA,SAAA,EAFX,CAAC,oBAAoB,EAAE,CAAC,EAAA,QAAA,EAAA,CAAA,aAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAExB,WAAW,EAAA,UAAA,EAAA,CAAA;kBALvB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,SAAS,EAAE,CAAC,oBAAoB,EAAE,CAAC;AACpC,iBAAA;;;ACtBD;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-primitives-input-otp.mjs","sources":["../../../../packages/ng-primitives/input-otp/src/input-otp/input-otp-state.ts","../../../../packages/ng-primitives/input-otp/src/input-otp-input/input-otp-input.ts","../../../../packages/ng-primitives/input-otp/src/input-otp-slot/input-otp-slot.ts","../../../../packages/ng-primitives/input-otp/src/input-otp/input-otp.ts","../../../../packages/ng-primitives/input-otp/src/ng-primitives-input-otp.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpInputOtp } from './input-otp';\n\n/**\n * The state token for the InputOtp primitive.\n */\nexport const NgpInputOtpStateToken = createStateToken<NgpInputOtp>('InputOtp');\n\n/**\n * Provides the InputOtp state.\n */\nexport const provideInputOtpState = createStateProvider(NgpInputOtpStateToken);\n\n/**\n * Injects the InputOtp state.\n */\nexport const injectInputOtpState = createStateInjector<NgpInputOtp>(NgpInputOtpStateToken);\n\n/**\n * The InputOtp state registration function.\n */\nexport const inputOtpState = createState(NgpInputOtpStateToken);\n","import { AfterViewInit, Directive, HostListener } from '@angular/core';\nimport { NgpVisuallyHidden } from 'ng-primitives/a11y';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { injectInputOtpState } from '../input-otp/input-otp-state';\n\n@Directive({\n selector: 'input[ngpInputOtpInput]',\n exportAs: 'ngpInputOtpInput',\n hostDirectives: [NgpVisuallyHidden],\n host: {\n autocomplete: 'one-time-code',\n '[attr.inputmode]': 'state().inputMode()',\n '[attr.maxlength]': 'state().maxLength()',\n '[attr.pattern]': 'state().pattern() || null',\n '[attr.disabled]': 'state().disabled() ? \"\" : null',\n },\n})\nexport class NgpInputOtpInput implements AfterViewInit {\n /**\n * Access the element reference.\n */\n readonly elementRef = injectElementRef<HTMLInputElement>();\n\n /**\n * Access the input-otp state.\n */\n protected readonly state = injectInputOtpState();\n\n constructor() {\n // Register this input with the parent\n this.state().registerInput(this);\n }\n\n ngAfterViewInit(): void {\n // Set initial value\n this.elementRef.nativeElement.value = this.state().value();\n }\n\n /**\n * Focus the input.\n * @internal\n */\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n /**\n * Set selection range.\n * @param start Start position\n * @param end End position\n * @internal\n */\n setSelectionRange(start: number, end: number): void {\n this.elementRef.nativeElement.setSelectionRange(start, end);\n }\n\n /**\n * Handle input events (typing).\n */\n @HostListener('input', ['$event'])\n protected onInput(event: Event): void {\n if (this.state().disabled()) {\n return;\n }\n\n const input = event.target as HTMLInputElement;\n let newValue = input.value;\n\n // Validate against pattern if provided\n const pattern = this.state().pattern();\n if (pattern) {\n const patternRegex = new RegExp(pattern);\n const filteredValue = newValue\n .split('')\n .filter(char => patternRegex.test(char))\n .join('');\n\n if (filteredValue !== newValue) {\n newValue = filteredValue;\n input.value = newValue;\n }\n }\n\n // Clamp to maxLength\n const maxLength = this.state().maxLength();\n if (newValue.length > maxLength) {\n newValue = newValue.substring(0, maxLength);\n input.value = newValue;\n }\n\n this.state().updateValue(newValue);\n this.updateSelection();\n }\n\n /**\n * Handle paste events.\n */\n @HostListener('paste', ['$event'])\n protected onPaste(event: ClipboardEvent): void {\n if (this.state().disabled()) {\n return;\n }\n\n event.preventDefault();\n\n const clipboardData = event.clipboardData?.getData('text') || '';\n let pastedText = clipboardData.trim();\n\n // Apply paste transformer if provided\n const transformer = this.state().pasteTransformer();\n if (transformer) {\n pastedText = transformer(pastedText);\n }\n\n // Validate against pattern if provided\n const pattern = this.state().pattern();\n if (pattern) {\n const patternRegex = new RegExp(pattern);\n pastedText = pastedText\n .split('')\n .filter(char => patternRegex.test(char))\n .join('');\n }\n\n // Clamp to maxLength\n const maxLength = this.state().maxLength();\n if (pastedText.length > maxLength) {\n pastedText = pastedText.substring(0, maxLength);\n }\n\n // Update the input value and state\n this.elementRef.nativeElement.value = pastedText;\n this.state().updateValue(pastedText);\n\n // Set caret to the end\n const endPosition = pastedText.length;\n this.setSelectionRange(endPosition, endPosition);\n this.updateSelection();\n }\n\n /**\n * Handle focus events.\n */\n @HostListener('focus')\n protected onFocus(): void {\n this.state().updateFocus(true);\n this.updateSelection();\n }\n\n /**\n * Handle blur events.\n */\n @HostListener('blur')\n protected onBlur(): void {\n this.state().updateFocus(false);\n }\n\n /**\n * Handle keyup events to update selection.\n */\n @HostListener('keyup')\n protected onKeyup(): void {\n this.updateSelection();\n }\n\n /**\n * Handle selection change events.\n */\n @HostListener('select')\n protected onSelect(): void {\n this.updateSelection();\n }\n\n /**\n * Update the selection state.\n */\n private updateSelection(): void {\n const input = this.elementRef.nativeElement;\n const maxLength = this.state().maxLength();\n\n // If input is at max length, set selection to last character\n if (input.value.length === maxLength) {\n input.setSelectionRange(input.value.length - 1, input.value.length);\n }\n\n // if the input is not at max length, set selection at the end\n if (input.value.length < maxLength) {\n input.setSelectionRange(input.value.length, input.value.length);\n }\n\n const start = input.selectionStart || 0;\n const end = input.selectionEnd || 0;\n this.state().updateSelection(start, end);\n }\n}\n","import { computed, Directive, OnDestroy } from '@angular/core';\nimport { injectInputOtpState } from '../input-otp/input-otp-state';\n\n@Directive({\n selector: '[ngpInputOtpSlot]',\n exportAs: 'ngpInputOtpSlot',\n host: {\n role: 'presentation',\n '[attr.data-slot-index]': 'index()',\n '[attr.data-active]': 'focused() ? \"\" : null',\n '[attr.data-filled]': 'filled() ? \"\" : null',\n '[attr.data-caret]': 'caret() ? \"\" : null',\n '[attr.data-placeholder]': 'showPlaceholder() ? \"\" : null',\n '[textContent]': 'displayChar()',\n '(click)': 'onClick($event)',\n },\n})\nexport class NgpInputOtpSlot implements OnDestroy {\n /**\n * Access the input-otp state.\n */\n protected readonly state = injectInputOtpState();\n\n /**\n * The computed index of this slot based on registration order.\n */\n readonly index = computed(() => this.state().getSlotIndex(this));\n\n /**\n * The character for this slot from the value string.\n */\n private readonly char = computed(() => {\n const value = this.state().value();\n const currentIndex = this.index();\n return currentIndex >= 0 && currentIndex < value.length ? value[currentIndex] : null;\n });\n\n /**\n * Whether this slot is focused (active).\n */\n protected readonly focused = computed(() => {\n const currentIndex = this.index();\n const isFocused = this.state().isFocused();\n const selectionStart = this.state().selectionStart();\n const value = this.state().value();\n const maxLength = this.state().maxLength();\n\n return (\n isFocused &&\n (currentIndex === selectionStart ||\n (value.length === maxLength && currentIndex === maxLength - 1))\n );\n });\n\n /**\n * Whether this slot should show the caret.\n */\n protected readonly caret = computed(() => {\n const currentIndex = this.index();\n const isFocused = this.state().isFocused();\n const selectionStart = this.state().selectionStart();\n const selectionEnd = this.state().selectionEnd();\n const value = this.state().value();\n const maxLength = this.state().maxLength();\n\n return (\n isFocused &&\n currentIndex === selectionStart &&\n selectionStart === selectionEnd &&\n value.length < maxLength\n );\n });\n\n /**\n * Whether this slot is filled with a character.\n */\n protected readonly filled = computed(() => this.char() !== null);\n\n /**\n * Whether to show placeholder for this slot.\n */\n protected readonly showPlaceholder = computed(() => {\n const placeholder = this.state().placeholder();\n return !this.filled() && !!placeholder;\n });\n\n /**\n * The display character for this slot (character or placeholder).\n */\n protected readonly displayChar = computed(() => {\n const char = this.char();\n if (char) return char;\n if (this.showPlaceholder()) return this.state().placeholder();\n return '';\n });\n\n constructor() {\n this.state().registerSlot(this);\n }\n\n ngOnDestroy(): void {\n // Unregister this slot when destroyed\n this.state().unregisterSlot(this);\n }\n\n /**\n * Handle click events on the slot.\n * @internal\n */\n protected onClick(event: Event): void {\n if (this.state().disabled()) return;\n\n const currentValue = this.state().value();\n const maxLength = this.state().maxLength();\n\n // Focus the first empty slot, or the last slot if all are filled\n const targetPosition = currentValue.length < maxLength ? currentValue.length : maxLength - 1;\n this.state().focusAtPosition(targetPosition);\n event.preventDefault();\n event.stopPropagation();\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, input, output, signal } from '@angular/core';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport type { NgpInputOtpInput } from '../input-otp-input/input-otp-input';\nimport type { NgpInputOtpSlot } from '../input-otp-slot/input-otp-slot';\nimport { inputOtpState, provideInputOtpState } from './input-otp-state';\n\nexport type NgpInputOtpInputMode =\n | 'numeric'\n | 'text'\n | 'decimal'\n | 'tel'\n | 'search'\n | 'email'\n | 'url';\n\n@Directive({\n selector: '[ngpInputOtp]',\n exportAs: 'ngpInputOtp',\n providers: [provideInputOtpState()],\n})\nexport class NgpInputOtp {\n /**\n * Access the element reference.\n */\n readonly elementRef = injectElementRef<HTMLElement>();\n\n /**\n * The id of the input-otp.\n */\n readonly id = input(uniqueId('ngp-input-otp'));\n\n /**\n * The current value of the OTP.\n */\n readonly value = input<string>('', {\n alias: 'ngpInputOtpValue',\n });\n\n /**\n * The regex pattern for allowed characters.\n */\n readonly pattern = input<string>('[0-9]', {\n alias: 'ngpInputOtpPattern',\n });\n\n /**\n * The input mode for the hidden input.\n */\n readonly inputMode = input<NgpInputOtpInputMode>('text', {\n alias: 'ngpInputOtpInputMode',\n });\n\n /**\n * Function to transform pasted text.\n */\n readonly pasteTransformer = input<(text: string) => string>(undefined, {\n alias: 'ngpInputOtpPasteTransformer',\n });\n\n /**\n * Whether the input-otp is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpInputOtpDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * The placeholder character to display when a slot is empty.\n */\n readonly placeholder = input<string>('', {\n alias: 'ngpInputOtpPlaceholder',\n });\n\n /**\n * Event emitted when the value changes.\n */\n readonly valueChange = output<string>({\n alias: 'ngpInputOtpValueChange',\n });\n\n /**\n * Event emitted when the OTP is complete (maxLength characters entered).\n */\n readonly complete = output<string>({\n alias: 'ngpInputOtpComplete',\n });\n\n /**\n * Store the input element reference.\n * @internal\n */\n private readonly inputElement = signal<NgpInputOtpInput | undefined>(undefined);\n\n /**\n * Store registered slots in order.\n * @internal\n */\n private readonly slots = signal<NgpInputOtpSlot[]>([]);\n\n /**\n * The number of characters in the OTP, derived from registered slots.\n */\n readonly maxLength = computed(() => this.slots().length);\n\n /**\n * The focus state of the input.\n * @internal\n */\n readonly isFocused = signal(false);\n\n /**\n * The selection start position.\n * @internal\n */\n readonly selectionStart = signal(0);\n\n /**\n * The selection end position.\n * @internal\n */\n readonly selectionEnd = signal(0);\n\n /**\n * The state of the input-otp.\n */\n protected readonly state = inputOtpState<NgpInputOtp>(this);\n\n constructor() {\n ngpInteractions({\n hover: true,\n press: true,\n focus: true,\n disabled: this.state.disabled,\n });\n }\n\n /**\n * Register an input element with the input-otp.\n * @param input The input element to register.\n * @internal\n */\n registerInput(input: NgpInputOtpInput): void {\n this.inputElement.set(input);\n }\n\n /**\n * Register a slot with the input-otp.\n * @param slot The slot to register.\n * @internal\n */\n registerSlot(slot: NgpInputOtpSlot): void {\n this.slots.update(currentSlots => [...currentSlots, slot]);\n }\n\n /**\n * Unregister a slot from the input-otp.\n * @param slot The slot to unregister.\n * @internal\n */\n unregisterSlot(slot: NgpInputOtpSlot): void {\n this.slots.update(currentSlots => currentSlots.filter(s => s !== slot));\n }\n\n /**\n * Get the index of a registered slot.\n * @param slot The slot to get the index for.\n * @returns The index of the slot, or -1 if not found.\n * @internal\n */\n getSlotIndex(slot: NgpInputOtpSlot): number {\n return this.slots().indexOf(slot);\n }\n\n /**\n * Update the value and emit change events.\n * @param newValue The new value.\n * @internal\n */\n updateValue(newValue: string): void {\n if (newValue === this.state.value()) {\n return;\n }\n\n this.state.value.set(newValue);\n this.valueChange.emit(newValue);\n\n // Emit complete event when the OTP is complete\n if (newValue.length === this.maxLength()) {\n this.complete.emit(newValue);\n }\n }\n\n /**\n * Update focus state.\n * @param focused Whether the input is focused.\n * @internal\n */\n updateFocus(focused: boolean): void {\n this.isFocused.set(focused);\n }\n\n /**\n * Update selection state.\n * @param start Selection start position.\n * @param end Selection end position.\n * @internal\n */\n updateSelection(start: number, end: number): void {\n this.selectionStart.set(start);\n this.selectionEnd.set(end);\n }\n\n /**\n * Focus the input and set caret to the specified position.\n * @param position The position to set the caret to.\n * @internal\n */\n focusAtPosition(position: number): void {\n const input = this.inputElement();\n if (!input) {\n return;\n }\n\n input.focus();\n input.setSelectionRange(position, position);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAQA;;AAEG;AACI,MAAM,qBAAqB,GAAG,gBAAgB,CAAc,UAAU,CAAC;AAE9E;;AAEG;MACU,oBAAoB,GAAG,mBAAmB,CAAC,qBAAqB;AAE7E;;AAEG;MACU,mBAAmB,GAAG,mBAAmB,CAAc,qBAAqB;AAEzF;;AAEG;AACI,MAAM,aAAa,GAAG,WAAW,CAAC,qBAAqB,CAAC;;MCTlD,gBAAgB,CAAA;AAW3B,IAAA,WAAA,GAAA;AAVA;;AAEG;QACM,IAAA,CAAA,UAAU,GAAG,gBAAgB,EAAoB;AAE1D;;AAEG;QACgB,IAAA,CAAA,KAAK,GAAG,mBAAmB,EAAE;;QAI9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,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,WAAA,EAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,UAAA,EAAA,wBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,WAAA,EAAA,wBAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,EAAA,SAAA,EAFX,CAAC,oBAAoB,EAAE,CAAC,EAAA,QAAA,EAAA,CAAA,aAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAExB,WAAW,EAAA,UAAA,EAAA,CAAA;kBALvB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,SAAS,EAAE,CAAC,oBAAoB,EAAE,CAAC;AACpC,iBAAA;;;ACtBD;;AAEG;;;;"}
@@ -16,7 +16,7 @@ const [NgpInputStateToken, ngpInput, injectInputState, provideInputState] = crea
16
16
  ngpAutofill({});
17
17
  // Setup interactions and form control bindings
18
18
  const status = ngpFormControl({ id, disabled });
19
- const isDisabled = computed(() => status().disabled ?? disabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
19
+ const isDisabled = computed(() => status().disabled ?? disabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
20
20
  ngpInteractions({ hover: true, press: true, focus: true, disabled: isDisabled });
21
21
  // Host bindings
22
22
  attrBinding(element, 'id', id);
@@ -42,13 +42,11 @@ class NgpInput {
42
42
  /**
43
43
  * The id of the input.
44
44
  */
45
- this.id = input(uniqueId('ngp-input'), ...(ngDevMode ? [{ debugName: "id" }] : []));
45
+ this.id = input(uniqueId('ngp-input'), ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
46
46
  /**
47
47
  * Whether the element is disabled.
48
48
  */
49
- this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{
50
- transform: booleanAttribute,
51
- }]));
49
+ this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
52
50
  /**
53
51
  * The input state.
54
52
  */
@@ -57,10 +55,10 @@ class NgpInput {
57
55
  disabled: this.disabled,
58
56
  });
59
57
  }
60
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
61
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpInput, isStandalone: true, selector: "input[ngpInput]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideInputState({ inherit: false })], exportAs: ["ngpInput"], ngImport: i0 }); }
58
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
59
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpInput, isStandalone: true, selector: "input[ngpInput]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideInputState({ inherit: false })], exportAs: ["ngpInput"], ngImport: i0 }); }
62
60
  }
63
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpInput, decorators: [{
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpInput, decorators: [{
64
62
  type: Directive,
65
63
  args: [{
66
64
  selector: 'input[ngpInput]',
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-input.mjs","sources":["../../../../packages/ng-primitives/input/src/input/input-state.ts","../../../../packages/ng-primitives/input/src/input/input.ts","../../../../packages/ng-primitives/input/src/ng-primitives-input.ts"],"sourcesContent":["import { computed, Signal, signal, WritableSignal } from '@angular/core';\nimport { ngpAutofill } from 'ng-primitives/autofill';\nimport { ngpFormControl } from 'ng-primitives/form-field';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { injectSearchState } from 'ng-primitives/search';\nimport { attrBinding, controlled, createPrimitive, deprecatedSetter } from 'ng-primitives/state';\nimport { NgpControlStatus, uniqueId } from 'ng-primitives/utils';\n\n/**\n * Public state surface for the Input primitive.\n */\nexport interface NgpInputState {\n /**\n * The id of the input.\n */\n readonly id: Signal<string>;\n\n /**\n * The form control state.\n */\n readonly status: Signal<NgpControlStatus>;\n\n /**\n * Whether the input is disabled.\n */\n readonly disabled: WritableSignal<boolean>;\n\n /**\n * Set the disabled state of the input.\n * @param value The disabled state.\n */\n setDisabled(value: boolean): void;\n}\n\n/**\n * Inputs for configuring the Input primitive.\n */\nexport interface NgpInputProps {\n /**\n * The id of the input.\n */\n readonly id?: Signal<string>;\n /**\n * Whether the input is disabled.\n */\n readonly disabled?: Signal<boolean>;\n}\n\nexport const [NgpInputStateToken, ngpInput, injectInputState, provideInputState] = createPrimitive(\n 'NgpInput',\n ({ id = signal(uniqueId('ngp-input')), disabled: _disabled = signal(false) }: NgpInputProps) => {\n const element = injectElementRef<HTMLInputElement>();\n const searchState = injectSearchState({ optional: true });\n const disabled = controlled(_disabled);\n\n // Setup autofill detection\n ngpAutofill({});\n\n // Setup interactions and form control bindings\n const status = ngpFormControl({ id, disabled });\n const isDisabled = computed(() => status().disabled ?? disabled());\n\n ngpInteractions({ hover: true, press: true, focus: true, disabled: isDisabled });\n\n // Host bindings\n attrBinding(element, 'id', id);\n attrBinding(element, 'disabled', () => (isDisabled() ? '' : null));\n\n // Register the input with an enclosing search field if present\n const search = searchState();\n\n if (search) {\n search.registerInput(element.nativeElement);\n }\n\n function setDisabled(value: boolean): void {\n disabled.set(value);\n }\n\n return {\n id,\n disabled: deprecatedSetter(disabled, 'setDisabled'),\n status,\n setDisabled,\n } satisfies NgpInputState;\n },\n);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpInput, provideInputState } from './input-state';\n\n@Directive({\n selector: 'input[ngpInput]',\n exportAs: 'ngpInput',\n providers: [provideInputState({ inherit: false })],\n})\nexport class NgpInput {\n /**\n * The id of the input.\n */\n readonly id = input(uniqueId('ngp-input'));\n\n /**\n * Whether the element is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute,\n });\n\n /**\n * The input state.\n */\n protected readonly state = ngpInput({\n id: this.id,\n disabled: this.disabled,\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAiDO,MAAM,CAAC,kBAAkB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,iBAAiB,CAAC,GAAG,eAAe,CAChG,UAAU,EACV,CAAC,EAAE,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,EAAE,QAAQ,EAAE,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,EAAiB,KAAI;AAC7F,IAAA,MAAM,OAAO,GAAG,gBAAgB,EAAoB;IACpD,MAAM,WAAW,GAAG,iBAAiB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC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;;AAEG;QACgB,IAAA,CAAA,KAAK,GAAG,QAAQ,CAAC;YAClC,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,QAAQ,EAAE,IAAI,CAAC,QAAQ;AACxB,SAAA,CAAC;AACH,IAAA;8GApBY,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAR,QAAQ,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,EAAA,EAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,SAAA,EAFR,CAAC,iBAAiB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAEvC,QAAQ,EAAA,UAAA,EAAA,CAAA;kBALpB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,QAAQ,EAAE,UAAU;oBACpB,SAAS,EAAE,CAAC,iBAAiB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;AACnD,iBAAA;;;ACTD;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-primitives-input.mjs","sources":["../../../../packages/ng-primitives/input/src/input/input-state.ts","../../../../packages/ng-primitives/input/src/input/input.ts","../../../../packages/ng-primitives/input/src/ng-primitives-input.ts"],"sourcesContent":["import { computed, Signal, signal, WritableSignal } from '@angular/core';\nimport { ngpAutofill } from 'ng-primitives/autofill';\nimport { ngpFormControl } from 'ng-primitives/form-field';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { injectSearchState } from 'ng-primitives/search';\nimport { attrBinding, controlled, createPrimitive, deprecatedSetter } from 'ng-primitives/state';\nimport { NgpControlStatus, uniqueId } from 'ng-primitives/utils';\n\n/**\n * Public state surface for the Input primitive.\n */\nexport interface NgpInputState {\n /**\n * The id of the input.\n */\n readonly id: Signal<string>;\n\n /**\n * The form control state.\n */\n readonly status: Signal<NgpControlStatus>;\n\n /**\n * Whether the input is disabled.\n */\n readonly disabled: WritableSignal<boolean>;\n\n /**\n * Set the disabled state of the input.\n * @param value The disabled state.\n */\n setDisabled(value: boolean): void;\n}\n\n/**\n * Inputs for configuring the Input primitive.\n */\nexport interface NgpInputProps {\n /**\n * The id of the input.\n */\n readonly id?: Signal<string>;\n /**\n * Whether the input is disabled.\n */\n readonly disabled?: Signal<boolean>;\n}\n\nexport const [NgpInputStateToken, ngpInput, injectInputState, provideInputState] = createPrimitive(\n 'NgpInput',\n ({ id = signal(uniqueId('ngp-input')), disabled: _disabled = signal(false) }: NgpInputProps) => {\n const element = injectElementRef<HTMLInputElement>();\n const searchState = injectSearchState({ optional: true });\n const disabled = controlled(_disabled);\n\n // Setup autofill detection\n ngpAutofill({});\n\n // Setup interactions and form control bindings\n const status = ngpFormControl({ id, disabled });\n const isDisabled = computed(() => status().disabled ?? disabled());\n\n ngpInteractions({ hover: true, press: true, focus: true, disabled: isDisabled });\n\n // Host bindings\n attrBinding(element, 'id', id);\n attrBinding(element, 'disabled', () => (isDisabled() ? '' : null));\n\n // Register the input with an enclosing search field if present\n const search = searchState();\n\n if (search) {\n search.registerInput(element.nativeElement);\n }\n\n function setDisabled(value: boolean): void {\n disabled.set(value);\n }\n\n return {\n id,\n disabled: deprecatedSetter(disabled, 'setDisabled'),\n status,\n setDisabled,\n } satisfies NgpInputState;\n },\n);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpInput, provideInputState } from './input-state';\n\n@Directive({\n selector: 'input[ngpInput]',\n exportAs: 'ngpInput',\n providers: [provideInputState({ inherit: false })],\n})\nexport class NgpInput {\n /**\n * The id of the input.\n */\n readonly id = input(uniqueId('ngp-input'));\n\n /**\n * Whether the element is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute,\n });\n\n /**\n * The input state.\n */\n protected readonly state = ngpInput({\n id: this.id,\n disabled: this.disabled,\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAiDO,MAAM,CAAC,kBAAkB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,iBAAiB,CAAC,GAAG,eAAe,CAChG,UAAU,EACV,CAAC,EAAE,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,EAAE,QAAQ,EAAE,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,EAAiB,KAAI;AAC7F,IAAA,MAAM,OAAO,GAAG,gBAAgB,EAAoB;IACpD,MAAM,WAAW,GAAG,iBAAiB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACzD,IAAA,MAAM,QAAQ,GAAG,UAAU,CAAC,SAAS,CAAC;;IAGtC,WAAW,CAAC,EAAE,CAAC;;IAGf,MAAM,MAAM,GAAG,cAAc,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC;AAC/C,IAAA,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,MAAM,EAAE,CAAC,QAAQ,IAAI,QAAQ,EAAE,iFAAC;AAElE,IAAA,eAAe,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAA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EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,SAAA,EAFR,CAAC,iBAAiB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAEvC,QAAQ,EAAA,UAAA,EAAA,CAAA;kBALpB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,QAAQ,EAAE,UAAU;oBACpB,SAAS,EAAE,CAAC,iBAAiB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;AACnD,iBAAA;;;ACTD;;AAEG;;;;"}
@@ -62,7 +62,7 @@ function ngpFocusVisible({ onFocusChange, disabled = signal(false), }) {
62
62
  const renderer = inject(Renderer2);
63
63
  const focusMonitor = inject(FocusMonitor);
64
64
  // Whether the element is currently focused.
65
- const isFocused = signal(false, ...(ngDevMode ? [{ debugName: "isFocused" }] : []));
65
+ const isFocused = signal(false, ...(ngDevMode ? [{ debugName: "isFocused" }] : /* istanbul ignore next */ []));
66
66
  // handle focus state
67
67
  focusMonitor
68
68
  .monitor(elementRef.nativeElement)
@@ -165,7 +165,7 @@ function ngpFocus({ onFocus, onBlur, focusWithin = false, disabled = signal(fals
165
165
  /**
166
166
  * Whether the element is currently focused.
167
167
  */
168
- const isFocused = signal(false, ...(ngDevMode ? [{ debugName: "isFocused" }] : []));
168
+ const isFocused = signal(false, ...(ngDevMode ? [{ debugName: "isFocused" }] : /* istanbul ignore next */ []));
169
169
  focusMonitor
170
170
  .monitor(elementRef, focusWithin)
171
171
  .pipe(safeTakeUntilDestroyed())
@@ -230,7 +230,7 @@ function ngpHover({ onHoverStart, onHoverEnd, disabled = signal(false), }) {
230
230
  /**
231
231
  * Store the current hover state.
232
232
  */
233
- const hovered = signal(false, ...(ngDevMode ? [{ debugName: "hovered" }] : []));
233
+ const hovered = signal(false, ...(ngDevMode ? [{ debugName: "hovered" }] : /* istanbul ignore next */ []));
234
234
  /**
235
235
  * Whether this element should ignore emulated mouse events.
236
236
  */
@@ -244,9 +244,7 @@ function ngpHover({ onHoverStart, onHoverEnd, disabled = signal(false), }) {
244
244
  listener(elementRef.nativeElement, 'mouseenter', onMouseEnter);
245
245
  listener(elementRef.nativeElement, 'mouseleave', onMouseLeave);
246
246
  // anytime the disabled state changes to true, we must reset the hover state
247
- if (disabled) {
248
- onBooleanChange(disabled, reset);
249
- }
247
+ onBooleanChange(disabled, reset);
250
248
  // if the element is removed from the dom, we want to reset the hover state
251
249
  onDomRemoval(elementRef.nativeElement, reset);
252
250
  // anytime the hover state changes we want to update the attribute
@@ -338,7 +336,7 @@ function ngpPress({ onPressStart, onPressEnd, disabled = signal(false), }) {
338
336
  /**
339
337
  * Whether the element is currently pressed.
340
338
  */
341
- const pressed = signal(false, ...(ngDevMode ? [{ debugName: "pressed" }] : []));
339
+ const pressed = signal(false, ...(ngDevMode ? [{ debugName: "pressed" }] : /* istanbul ignore next */ []));
342
340
  /**
343
341
  * Track which key started the press to prevent mismatched keyup from ending it.
344
342
  */
@@ -490,11 +488,8 @@ class NgpFocusVisible {
490
488
  /**
491
489
  * Whether focus events are listened to.
492
490
  */
493
- this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", alias: 'ngpFocusVisibleDisabled',
494
- transform: booleanAttribute }] : [{
495
- alias: 'ngpFocusVisibleDisabled',
496
- transform: booleanAttribute,
497
- }]));
491
+ this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), alias: 'ngpFocusVisibleDisabled',
492
+ transform: booleanAttribute });
498
493
  /**
499
494
  * Emit when the element is visually focused.
500
495
  */
@@ -507,10 +502,10 @@ class NgpFocusVisible {
507
502
  onFocusChange: value => this.focusChange.emit(value),
508
503
  });
509
504
  }
510
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpFocusVisible, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
511
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpFocusVisible, isStandalone: true, selector: "[ngpFocusVisible]", inputs: { disabled: { classPropertyName: "disabled", publicName: "ngpFocusVisibleDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { focusChange: "ngpFocusVisible" }, exportAs: ["ngpFocusVisible"], ngImport: i0 }); }
505
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpFocusVisible, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
506
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpFocusVisible, isStandalone: true, selector: "[ngpFocusVisible]", inputs: { disabled: { classPropertyName: "disabled", publicName: "ngpFocusVisibleDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { focusChange: "ngpFocusVisible" }, exportAs: ["ngpFocusVisible"], ngImport: i0 }); }
512
507
  }
513
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpFocusVisible, decorators: [{
508
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpFocusVisible, decorators: [{
514
509
  type: Directive,
515
510
  args: [{
516
511
  selector: '[ngpFocusVisible]',
@@ -527,11 +522,8 @@ class NgpFocus {
527
522
  /**
528
523
  * Whether listening for focus events is disabled.
529
524
  */
530
- this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", alias: 'ngpFocusDisabled',
531
- transform: booleanAttribute }] : [{
532
- alias: 'ngpFocusDisabled',
533
- transform: booleanAttribute,
534
- }]));
525
+ this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), alias: 'ngpFocusDisabled',
526
+ transform: booleanAttribute });
535
527
  /**
536
528
  * Emit when the focus state changes.
537
529
  */
@@ -543,10 +535,10 @@ class NgpFocus {
543
535
  onBlur: () => this.focus.emit(false),
544
536
  });
545
537
  }
546
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpFocus, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
547
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpFocus, isStandalone: true, selector: "[ngpFocus]", inputs: { disabled: { classPropertyName: "disabled", publicName: "ngpFocusDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { focus: "ngpFocus" }, exportAs: ["ngpFocus"], ngImport: i0 }); }
538
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpFocus, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
539
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpFocus, isStandalone: true, selector: "[ngpFocus]", inputs: { disabled: { classPropertyName: "disabled", publicName: "ngpFocusDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { focus: "ngpFocus" }, exportAs: ["ngpFocus"], ngImport: i0 }); }
548
540
  }
549
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpFocus, decorators: [{
541
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpFocus, decorators: [{
550
542
  type: Directive,
551
543
  args: [{
552
544
  selector: '[ngpFocus]',
@@ -568,11 +560,8 @@ class NgpHover {
568
560
  /**
569
561
  * Whether hoving should be disabled.
570
562
  */
571
- this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", alias: 'ngpHoverDisabled',
572
- transform: booleanAttribute }] : [{
573
- alias: 'ngpHoverDisabled',
574
- transform: booleanAttribute,
575
- }]));
563
+ this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), alias: 'ngpHoverDisabled',
564
+ transform: booleanAttribute });
576
565
  /**
577
566
  * Emit an event when hovering starts.
578
567
  */
@@ -598,10 +587,10 @@ class NgpHover {
598
587
  disabled: this.disabled,
599
588
  });
600
589
  }
601
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpHover, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
602
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpHover, isStandalone: true, selector: "[ngpHover]", inputs: { disabled: { classPropertyName: "disabled", publicName: "ngpHoverDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { hoverStart: "ngpHoverStart", hoverEnd: "ngpHoverEnd", hoverChange: "ngpHover" }, exportAs: ["ngpHover"], ngImport: i0 }); }
590
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpHover, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
591
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpHover, isStandalone: true, selector: "[ngpHover]", inputs: { disabled: { classPropertyName: "disabled", publicName: "ngpHoverDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { hoverStart: "ngpHoverStart", hoverEnd: "ngpHoverEnd", hoverChange: "ngpHover" }, exportAs: ["ngpHover"], ngImport: i0 }); }
603
592
  }
604
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpHover, decorators: [{
593
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpHover, decorators: [{
605
594
  type: Directive,
606
595
  args: [{
607
596
  selector: '[ngpHover]',
@@ -622,11 +611,8 @@ class NgpMove {
622
611
  /**
623
612
  * Whether movement is disabled.
624
613
  */
625
- this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", alias: 'ngpMoveDisabled',
626
- transform: booleanAttribute }] : [{
627
- alias: 'ngpMoveDisabled',
628
- transform: booleanAttribute,
629
- }]));
614
+ this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), alias: 'ngpMoveDisabled',
615
+ transform: booleanAttribute });
630
616
  /**
631
617
  * Emit when the move event begins.
632
618
  */
@@ -648,7 +634,7 @@ class NgpMove {
648
634
  /**
649
635
  * Whether the element is currently being moved.
650
636
  */
651
- this.isMoving = signal(false, ...(ngDevMode ? [{ debugName: "isMoving" }] : []));
637
+ this.isMoving = signal(false, ...(ngDevMode ? [{ debugName: "isMoving" }] : /* istanbul ignore next */ []));
652
638
  /**
653
639
  * Store the last x position of the element.
654
640
  */
@@ -786,10 +772,10 @@ class NgpMove {
786
772
  event.stopPropagation();
787
773
  this.triggerKeyboardMove(event, 1, 0);
788
774
  }
789
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpMove, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
790
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpMove, isStandalone: true, selector: "[ngpMove]", inputs: { disabled: { classPropertyName: "disabled", publicName: "ngpMoveDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { start: "ngpMoveStart", move: "ngpMove", end: "ngpMoveEnd" }, host: { listeners: { "pointerdown": "onPointerDown($event)", "keydown.ArrowUp": "onArrowUp($event)", "keydown.ArrowDown": "onArrowDown($event)", "keydown.ArrowLeft": "onArrowLeft($event)", "keydown.ArrowRight": "onArrowRight($event)" }, properties: { "attr.data-move": "isMoving() ? \"\" : null" } }, exportAs: ["ngpMove"], ngImport: i0 }); }
775
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpMove, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
776
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpMove, isStandalone: true, selector: "[ngpMove]", inputs: { disabled: { classPropertyName: "disabled", publicName: "ngpMoveDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { start: "ngpMoveStart", move: "ngpMove", end: "ngpMoveEnd" }, host: { listeners: { "pointerdown": "onPointerDown($event)", "keydown.ArrowUp": "onArrowUp($event)", "keydown.ArrowDown": "onArrowDown($event)", "keydown.ArrowLeft": "onArrowLeft($event)", "keydown.ArrowRight": "onArrowRight($event)" }, properties: { "attr.data-move": "isMoving() ? \"\" : null" } }, exportAs: ["ngpMove"], ngImport: i0 }); }
791
777
  }
792
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpMove, decorators: [{
778
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpMove, decorators: [{
793
779
  type: Directive,
794
780
  args: [{
795
781
  selector: '[ngpMove]',
@@ -824,11 +810,8 @@ class NgpPress {
824
810
  /**
825
811
  * Whether listening for press events is disabled.
826
812
  */
827
- this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", alias: 'ngpPressDisabled',
828
- transform: booleanAttribute }] : [{
829
- alias: 'ngpPressDisabled',
830
- transform: booleanAttribute,
831
- }]));
813
+ this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), alias: 'ngpPressDisabled',
814
+ transform: booleanAttribute });
832
815
  /**
833
816
  * Emit when the press begins.
834
817
  */
@@ -860,10 +843,10 @@ class NgpPress {
860
843
  disabled: this.disabled,
861
844
  });
862
845
  }
863
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpPress, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
864
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpPress, isStandalone: true, selector: "[ngpPress]", inputs: { disabled: { classPropertyName: "disabled", publicName: "ngpPressDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pressStart: "ngpPressStart", pressEnd: "ngpPressEnd", pressChange: "ngpPress" }, exportAs: ["ngpPress"], ngImport: i0 }); }
846
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpPress, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
847
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpPress, isStandalone: true, selector: "[ngpPress]", inputs: { disabled: { classPropertyName: "disabled", publicName: "ngpPressDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pressStart: "ngpPressStart", pressEnd: "ngpPressEnd", pressChange: "ngpPress" }, exportAs: ["ngpPress"], ngImport: i0 }); }
865
848
  }
866
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpPress, decorators: [{
849
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpPress, decorators: [{
867
850
  type: Directive,
868
851
  args: [{
869
852
  selector: '[ngpPress]',