@ids-group-ltd/ids-design-system 1.0.3 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/CHANGELOG.md +423 -3
  2. package/agent/INDEX.md +12 -2
  3. package/agent/feedback/ds-alert.md +3 -2
  4. package/agent/feedback/ds-attachment.md +12 -0
  5. package/agent/feedback/ds-chat-attachment.md +10 -0
  6. package/agent/feedback/ds-chat-message.md +11 -0
  7. package/agent/feedback/ds-chat-step.md +10 -0
  8. package/agent/feedback/ds-chat-steps.md +10 -0
  9. package/agent/feedback/ds-chat-thread.md +11 -0
  10. package/agent/feedback/ds-timeline-item.md +3 -1
  11. package/agent/feedback/ds-timeline.md +9 -0
  12. package/agent/feedback/ds-toast.md +1 -1
  13. package/agent/feedback/ds-tree.md +3 -1
  14. package/agent/forms/ds-chat-input.md +16 -0
  15. package/agent/forms/ds-inline-edit.md +14 -0
  16. package/agent/foundations/tokens.md +3 -3
  17. package/agent/navigation/ds-splitter.md +14 -0
  18. package/agent/platform/toast-service.md +3 -2
  19. package/agent/tables/ds-table.md +1 -1
  20. package/components.md +110 -11
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +5 -3
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +2 -2
  24. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
  25. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +2 -2
  26. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
  27. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +2 -2
  28. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
  29. package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs +928 -0
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs.map +1 -0
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +2 -2
  32. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
  33. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +2 -2
  34. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
  35. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +2 -2
  36. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
  37. package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +2 -2
  38. package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -1
  39. package/fesm2022/ids-group-ltd-ids-design-system-components-inline-edit.mjs +107 -0
  40. package/fesm2022/ids-group-ltd-ids-design-system-components-inline-edit.mjs.map +1 -0
  41. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +2 -2
  42. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
  43. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +2 -2
  44. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -1
  45. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +2 -2
  46. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -1
  47. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +4 -4
  48. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
  49. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +2 -2
  50. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
  51. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +2 -2
  52. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
  53. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +2 -2
  54. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
  55. package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +16 -12
  56. package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -1
  57. package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +2 -2
  58. package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
  59. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +2 -2
  60. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
  61. package/fesm2022/ids-group-ltd-ids-design-system-components-splitter.mjs +465 -0
  62. package/fesm2022/ids-group-ltd-ids-design-system-components-splitter.mjs.map +1 -0
  63. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +2 -2
  64. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -1
  65. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
  66. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  67. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +4 -2
  68. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
  69. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +2 -2
  70. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
  71. package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs +74 -17
  72. package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs.map +1 -1
  73. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +163 -20
  74. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
  75. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +4 -19
  76. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
  77. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +182 -24
  78. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
  79. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +31 -4
  80. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  81. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +74 -0
  82. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  83. package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +4 -2
  84. package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -1
  85. package/fesm2022/ids-group-ltd-ids-design-system.mjs +4 -1
  86. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  87. package/migrations/0.11.2.json +1 -0
  88. package/migrations/1.0.1.json +4 -0
  89. package/migrations/1.0.2.json +37 -1
  90. package/migrations/1.1.0.json +208 -0
  91. package/migrations/1.1.1.json +190 -0
  92. package/migrations/README.md +6 -6
  93. package/package.json +25 -1
  94. package/schematics/check-overrides/surface.json +199 -6
  95. package/styles/_dropdown-overlay.scss +11 -6
  96. package/styles/_field-box.scss +2 -2
  97. package/styles/_step-marker.scss +51 -0
  98. package/styles/_tokens.scss +5 -3
  99. package/themes/README.md +2 -1
  100. package/themes/_semantic.scss +15 -0
  101. package/themes/dark/_palette.scss +1 -2
  102. package/themes/dark/_theme.scss +32 -3
  103. package/types/ids-group-ltd-ids-design-system-components-alert.d.ts +3 -1
  104. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +2 -2
  105. package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +1 -1
  106. package/types/ids-group-ltd-ids-design-system-components-chat.d.ts +377 -0
  107. package/types/ids-group-ltd-ids-design-system-components-inline-edit.d.ts +43 -0
  108. package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +1 -1
  109. package/types/ids-group-ltd-ids-design-system-components-splitter.d.ts +97 -0
  110. package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +2 -0
  111. package/types/ids-group-ltd-ids-design-system-components-timeline.d.ts +34 -5
  112. package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +53 -4
  113. package/types/ids-group-ltd-ids-design-system-components-tree.d.ts +87 -7
  114. package/types/ids-group-ltd-ids-design-system-components.d.ts +8 -4
  115. package/types/ids-group-ltd-ids-design-system-core.d.ts +126 -0
  116. package/types/ids-group-ltd-ids-design-system.d.ts +6 -3
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-otp-input.mjs","sources":["../../../src/lib/components/otp-input/otp-input.component.ts","../../../src/lib/components/otp-input/otp-input.component.html","../../../src/lib/components/otp-input/ids-group-ltd-ids-design-system-components-otp-input.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n forwardRef,\n inject,\n input,\n model,\n output,\n viewChildren,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport { DsControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport {\n FieldMessageComponent,\n FieldStatusComponent,\n} from '@ids-group-ltd/ids-design-system/components/field-message';\nimport {\n resolveFieldMessage,\n trimmedText,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\n\nexport type OtpMode = 'numeric' | 'alphanumeric';\n\n@Component({\n selector: 'ds-otp-input',\n standalone: true,\n imports: [FieldMessageComponent, FieldStatusComponent],\n templateUrl: './otp-input.component.html',\n styleUrl: './otp-input.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => OtpInputComponent),\n multi: true,\n },\n ],\n host: {\n '[attr.data-field-state]': 'controlState()',\n role: 'group',\n '[attr.aria-label]': 'ariaLabelResolved()',\n '[attr.aria-describedby]': 'hintId()',\n },\n})\nexport class OtpInputComponent extends DsControlValueAccessor<string> {\n protected readonly intl = inject(DS_INTL);\n /** Entered code, two-way bound. */\n readonly value = model<string>('');\n /** Number of character cells. */\n readonly length = input<number>(6);\n /** `numeric` restricts input and the mobile keyboard to digits; otherwise letters are allowed. */\n readonly mode = input<OtpMode>('numeric');\n /** Renders each cell as a password dot. */\n readonly mask = input(false, { transform: booleanAttribute });\n /** Disables all cells and blocks interaction. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Confirmation text, shown when there is no error or warning; also paints the success border. */\n readonly success = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** Accessible group label for the cell row. Unset falls back to `DS_INTL.otpInput.label`. */\n readonly ariaLabel = input<string | null>(null);\n readonly ariaLabelResolved = computed(\n () => this.ariaLabel() ?? this.intl().otpInput.label,\n );\n /** Fires once, with the full code, on the partial-to-complete transition. */\n readonly completed = output<string>();\n\n private readonly boxes = viewChildren<ElementRef<HTMLInputElement>>('box');\n private wasComplete = false;\n\n protected readonly uid = nextControlId('ds-otp-input');\n protected readonly hintId = computed(() =>\n this.message().text || this.changedShown() ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n pending: this.pending,\n dirty: this.dirty,\n showDirty: this.showDirtyResolved,\n disabled: () => this.isDisabled(),\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: this.invalid,\n success: this.success,\n touchedSelf: this.touchedSelf,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly pendingShown = this.fieldMessage.pending;\n protected readonly changedShown = this.fieldMessage.changed;\n protected readonly controlState = this.fieldMessage.controlState;\n protected readonly invalidResolved = this.fieldMessage.invalid;\n\n protected readonly isDisabled = computed(\n () => this.disabled() || this.formDisabled(),\n );\n\n protected readonly cells = computed<string[]>(() => {\n const value = this.value().slice(0, this.length());\n\n return Array.from({ length: this.length() }, (_, i) => value[i] ?? '');\n });\n\n protected onInput(event: Event, index: number): void {\n const element = event.target as HTMLInputElement;\n const cleaned = this.sanitize(element.value);\n if (!cleaned) {\n this.writeCell(index, '');\n element.value = '';\n\n return;\n }\n // Every branch writes element.value itself: Angular diffs `[value]` against what it last wrote, so an\n // unchanged cell signal skips the DOM write and the browser's own text stays on screen.\n if (cleaned.length === 1) {\n this.writeCell(index, cleaned);\n element.value = cleaned;\n this.focusBox(index + 1);\n } else {\n this.distribute(cleaned, index);\n element.value = cleaned[0];\n }\n }\n\n protected onKeydown(event: KeyboardEvent, index: number): void {\n switch (event.key) {\n case 'Backspace':\n if (!this.cells()[index]) {\n event.preventDefault();\n this.writeCell(index - 1, '');\n this.focusBox(index - 1);\n }\n break;\n case 'ArrowLeft':\n event.preventDefault();\n this.focusBox(index - 1);\n break;\n case 'ArrowRight':\n event.preventDefault();\n this.focusBox(index + 1);\n break;\n default:\n break;\n }\n }\n\n protected onPaste(event: ClipboardEvent, index: number): void {\n const text = event.clipboardData?.getData('text') ?? '';\n const cleaned = this.sanitize(text);\n if (!cleaned) {\n return;\n }\n event.preventDefault();\n this.distribute(cleaned, index);\n }\n\n protected onFocus(event: FocusEvent, index: number): void {\n (event.target as HTMLInputElement).select();\n // Left-packed: the flat value string cannot represent a gap, so focus goes to the first empty cell.\n const firstEmpty = this.firstEmptyIndex();\n if (firstEmpty >= 0 && index > firstEmpty) {\n this.focusBox(firstEmpty);\n }\n }\n\n protected cellLabel(index: number): string {\n const words = this.intl().otpInput;\n\n return this.mode() === 'numeric'\n ? words.digit(index + 1)\n : words.character(index + 1);\n }\n\n protected onBlur(): void {\n this.markTouched();\n }\n\n private writeCell(index: number, char: string): void {\n if (index < 0 || index >= this.length()) {\n return;\n }\n const next = this.cells().slice();\n next[index] = char;\n this.commit(next);\n }\n\n private distribute(text: string, startIndex: number): void {\n const next = this.cells().slice();\n let cursor = startIndex;\n for (const char of text) {\n if (cursor >= this.length()) {\n break;\n }\n next[cursor] = char;\n cursor++;\n }\n this.commit(next);\n this.focusBox(Math.min(cursor, this.length() - 1));\n }\n\n private commit(cells: string[]): void {\n const value = cells.join('').slice(0, this.length());\n this.value.set(value);\n // Only on partial-to-full; editing an already-complete code must not re-trigger consumers.\n const complete = value.length === this.length();\n if (complete && !this.wasComplete) {\n this.completed.emit(value);\n }\n this.wasComplete = complete;\n }\n\n private firstEmptyIndex(): number {\n return this.cells().findIndex((cell) => cell === '');\n }\n\n private focusBox(index: number): void {\n const box = this.boxes()[index]?.nativeElement;\n if (box) {\n box.focus();\n box.select();\n }\n }\n\n private sanitize(raw: string): string {\n const pattern = this.mode() === 'numeric' ? /[^0-9]/g : /[^0-9a-zA-Z]/g;\n\n return raw.replace(pattern, '');\n }\n}\n","<div class=\"cells\">\n @for (cell of cells(); track $index; let i = $index) {\n <input\n #box\n class=\"cell\"\n [type]=\"mask() ? 'password' : 'text'\"\n [attr.inputmode]=\"mode() === 'numeric' ? 'numeric' : 'text'\"\n [attr.autocomplete]=\"i === 0 ? 'one-time-code' : 'off'\"\n [attr.aria-label]=\"cellLabel(i)\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [value]=\"cell\"\n [disabled]=\"isDisabled()\"\n (input)=\"onInput($event, i)\"\n (keydown)=\"onKeydown($event, i)\"\n (paste)=\"onPaste($event, i)\"\n (focus)=\"onFocus($event, i)\"\n (blur)=\"onBlur()\" />\n }\n\n <ds-field-status\n [pending]=\"pendingShown()\"\n [changed]=\"changedShown()\" />\n</div>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n [changed]=\"changedShown()\" />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAiDM,MAAO,iBAAkB,SAAQ,sBAA8B,CAAA;AAChD,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;;AAEhC,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,IAAA,MAAM,GAAG,KAAK,CAAS,CAAC,6EAAC;;AAEzB,IAAA,IAAI,GAAG,KAAK,CAAU,SA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EAAA,SAAA,EAC9B;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,uBAAuB,CAAC;AAChD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;qBACF,EAAA,IAAA,EACK;AACJ,wBAAA,yBAAyB,EAAE,gBAAgB;AAC3C,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,mBAAmB,EAAE,qBAAqB;AAC1C,wBAAA,yBAAyB,EAAE,UAAU;AACtC,qBAAA,EAAA,QAAA,EAAA,u9BAAA,EAAA,MAAA,EAAA,CAAA,u7FAAA,CAAA,EAAA;+yBA0BmE,KAAK,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEzE3E;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-otp-input.mjs","sources":["../../../src/lib/components/otp-input/otp-input.component.ts","../../../src/lib/components/otp-input/otp-input.component.html","../../../src/lib/components/otp-input/ids-group-ltd-ids-design-system-components-otp-input.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n forwardRef,\n inject,\n input,\n model,\n output,\n viewChildren,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport { DsControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport {\n FieldMessageComponent,\n FieldStatusComponent,\n} from '@ids-group-ltd/ids-design-system/components/field-message';\nimport {\n resolveFieldMessage,\n trimmedText,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\n\nexport type OtpMode = 'numeric' | 'alphanumeric';\n\n@Component({\n selector: 'ds-otp-input',\n standalone: true,\n imports: [FieldMessageComponent, FieldStatusComponent],\n templateUrl: './otp-input.component.html',\n styleUrl: './otp-input.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => OtpInputComponent),\n multi: true,\n },\n ],\n host: {\n '[attr.data-field-state]': 'controlState()',\n role: 'group',\n '[attr.aria-label]': 'ariaLabelResolved()',\n '[attr.aria-describedby]': 'hintId()',\n },\n})\nexport class OtpInputComponent extends DsControlValueAccessor<string> {\n protected readonly intl = inject(DS_INTL);\n /** Entered code, two-way bound. */\n readonly value = model<string>('');\n /** Number of character cells. */\n readonly length = input<number>(6);\n /** `numeric` restricts input and the mobile keyboard to digits; otherwise letters are allowed. */\n readonly mode = input<OtpMode>('numeric');\n /** Renders each cell as a password dot. */\n readonly mask = input(false, { transform: booleanAttribute });\n /** Disables all cells and blocks interaction. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Confirmation text, shown when there is no error or warning; also paints the success border. */\n readonly success = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** Accessible group label for the cell row. Unset falls back to `DS_INTL.otpInput.label`. */\n readonly ariaLabel = input<string | null>(null);\n readonly ariaLabelResolved = computed(\n () => this.ariaLabel() ?? this.intl().otpInput.label,\n );\n /** Fires once, with the full code, on the partial-to-complete transition. */\n readonly completed = output<string>();\n\n private readonly boxes = viewChildren<ElementRef<HTMLInputElement>>('box');\n private wasComplete = false;\n\n protected readonly uid = nextControlId('ds-otp-input');\n protected readonly hintId = computed(() =>\n this.message().text || this.changedShown() ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n pending: this.pending,\n dirty: this.dirty,\n showDirty: this.showDirtyResolved,\n disabled: () => this.isDisabled(),\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: this.invalid,\n success: this.success,\n touchedSelf: this.touchedSelf,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly pendingShown = this.fieldMessage.pending;\n protected readonly changedShown = this.fieldMessage.changed;\n protected readonly controlState = this.fieldMessage.controlState;\n protected readonly invalidResolved = this.fieldMessage.invalid;\n\n protected readonly isDisabled = computed(\n () => this.disabled() || this.formDisabled(),\n );\n\n protected readonly cells = computed<string[]>(() => {\n const value = this.value().slice(0, this.length());\n\n return Array.from({ length: this.length() }, (_, i) => value[i] ?? '');\n });\n\n protected onInput(event: Event, index: number): void {\n const element = event.target as HTMLInputElement;\n const cleaned = this.sanitize(element.value);\n if (!cleaned) {\n this.writeCell(index, '');\n element.value = '';\n\n return;\n }\n // Every branch writes element.value itself: Angular diffs `[value]` against what it last wrote, so an\n // unchanged cell signal skips the DOM write and the browser's own text stays on screen.\n if (cleaned.length === 1) {\n this.writeCell(index, cleaned);\n element.value = cleaned;\n this.focusBox(index + 1);\n } else {\n this.distribute(cleaned, index);\n element.value = cleaned[0];\n }\n }\n\n protected onKeydown(event: KeyboardEvent, index: number): void {\n switch (event.key) {\n case 'Backspace':\n if (!this.cells()[index]) {\n event.preventDefault();\n this.writeCell(index - 1, '');\n this.focusBox(index - 1);\n }\n break;\n case 'ArrowLeft':\n event.preventDefault();\n this.focusBox(index - 1);\n break;\n case 'ArrowRight':\n event.preventDefault();\n this.focusBox(index + 1);\n break;\n default:\n break;\n }\n }\n\n protected onPaste(event: ClipboardEvent, index: number): void {\n const text = event.clipboardData?.getData('text') ?? '';\n const cleaned = this.sanitize(text);\n if (!cleaned) {\n return;\n }\n event.preventDefault();\n this.distribute(cleaned, index);\n }\n\n protected onFocus(event: FocusEvent, index: number): void {\n (event.target as HTMLInputElement).select();\n // Left-packed: the flat value string cannot represent a gap, so focus goes to the first empty cell.\n const firstEmpty = this.firstEmptyIndex();\n if (firstEmpty >= 0 && index > firstEmpty) {\n this.focusBox(firstEmpty);\n }\n }\n\n protected cellLabel(index: number): string {\n const words = this.intl().otpInput;\n\n return this.mode() === 'numeric'\n ? words.digit(index + 1)\n : words.character(index + 1);\n }\n\n protected onBlur(): void {\n this.markTouched();\n }\n\n private writeCell(index: number, char: string): void {\n if (index < 0 || index >= this.length()) {\n return;\n }\n const next = this.cells().slice();\n next[index] = char;\n this.commit(next);\n }\n\n private distribute(text: string, startIndex: number): void {\n const next = this.cells().slice();\n let cursor = startIndex;\n for (const char of text) {\n if (cursor >= this.length()) {\n break;\n }\n next[cursor] = char;\n cursor++;\n }\n this.commit(next);\n this.focusBox(Math.min(cursor, this.length() - 1));\n }\n\n private commit(cells: string[]): void {\n const value = cells.join('').slice(0, this.length());\n this.value.set(value);\n // Only on partial-to-full; editing an already-complete code must not re-trigger consumers.\n const complete = value.length === this.length();\n if (complete && !this.wasComplete) {\n this.completed.emit(value);\n }\n this.wasComplete = complete;\n }\n\n private firstEmptyIndex(): number {\n return this.cells().findIndex((cell) => cell === '');\n }\n\n private focusBox(index: number): void {\n const box = this.boxes()[index]?.nativeElement;\n if (box) {\n box.focus();\n box.select();\n }\n }\n\n private sanitize(raw: string): string {\n const pattern = this.mode() === 'numeric' ? /[^0-9]/g : /[^0-9a-zA-Z]/g;\n\n return raw.replace(pattern, '');\n }\n}\n","<div class=\"cells\">\n @for (cell of cells(); track $index; let i = $index) {\n <input\n #box\n class=\"cell\"\n [type]=\"mask() ? 'password' : 'text'\"\n [attr.inputmode]=\"mode() === 'numeric' ? 'numeric' : 'text'\"\n [attr.autocomplete]=\"i === 0 ? 'one-time-code' : 'off'\"\n [attr.aria-label]=\"cellLabel(i)\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [value]=\"cell\"\n [disabled]=\"isDisabled()\"\n (input)=\"onInput($event, i)\"\n (keydown)=\"onKeydown($event, i)\"\n (paste)=\"onPaste($event, i)\"\n (focus)=\"onFocus($event, i)\"\n (blur)=\"onBlur()\" />\n }\n\n <ds-field-status\n [pending]=\"pendingShown()\"\n [changed]=\"changedShown()\" />\n</div>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n [changed]=\"changedShown()\" />\n","/**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AAA,MAAA,EAAA,CAAA,SAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAkB1C,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBArB7B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,EAAA,UAAA,EACZ,IAAI,EAAA,OAAA,EACP,CAAC,qBAAqB,EAAE,oBAAoB,CAAC,EAAA,aAAA,EAGvC,iBAAiB,CAAC,QAAQ,EAAA,SAAA,EAC9B;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,uBAAuB,CAAC;AAChD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;qBACF,EAAA,IAAA,EACK;AACJ,wBAAA,yBAAyB,EAAE,gBAAgB;AAC3C,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,mBAAmB,EAAE,qBAAqB;AAC1C,wBAAA,yBAAyB,EAAE,UAAU;AACtC,qBAAA,EAAA,QAAA,EAAA,u9BAAA,EAAA,MAAA,EAAA,CAAA,q7FAAA,CAAA,EAAA;+yBA0BmE,KAAK,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEzE3E;;AAEG;;;;"}
@@ -3,7 +3,7 @@ import { inject, ViewContainerRef, ElementRef, viewChild, input, booleanAttribut
3
3
  import { Overlay } from '@angular/cdk/overlay';
4
4
  import { TemplatePortal } from '@angular/cdk/portal';
5
5
  import * as i1 from '@ids-group-ltd/ids-design-system/components';
6
- import { DsStaticPreview, overlayPlacementOf, prepareOverlayEnter, forwardOverlayTokens, closeOnOutsidePointer, closeOnScroll, clearOnDetach, focusIsInside, disposeWithLeave } from '@ids-group-ltd/ids-design-system/components';
6
+ import { DsStaticPreview, overlayPlacementOf, prepareOverlayEnter, forwardOverlayTokens, closeOnOutsidePointer, closeOnScroll, clearOnDetach, pointArrowAtHost, focusIsInside, disposeWithLeave } from '@ids-group-ltd/ids-design-system/components';
7
7
  import { CdkTrapFocus } from '@angular/cdk/a11y';
8
8
  import { NgTemplateOutlet } from '@angular/common';
9
9
  import { DsOverlayCloseRef } from '@ids-group-ltd/ids-design-system/overlay';
@@ -76,7 +76,7 @@ class PopoverComponent {
76
76
  .withPositions(buildPositions(placement, this.align(), arrowOffset))
77
77
  .withViewportMargin(8);
78
78
  positionStrategy.positionChanges.subscribe((change) => {
79
- this.resolvedPlacement.set(overlayPlacementOf(change.connectionPair.overlayY, change.connectionPair.overlayX));
79
+ this.resolvedPlacement.set(overlayPlacementOf(change.connectionPair));
80
80
  });
81
81
  const cfg = {
82
82
  positionStrategy,
@@ -105,6 +105,10 @@ class PopoverComponent {
105
105
  }
106
106
  });
107
107
  this.ref.attach(new TemplatePortal(this.panelTpl(), this.vcr));
108
+ const panel = this.ref.overlayElement.querySelector('.popover');
109
+ if (this.arrow() && panel) {
110
+ pointArrowAtHost(this.ref, panel, trigger);
111
+ }
108
112
  this.resolvedPlacement.set(placement);
109
113
  this.opened.set(true);
110
114
  // A menu is operated from inside (APG menu button), so it takes focus without a panelRole.
@@ -142,7 +146,7 @@ class PopoverComponent {
142
146
  provide: DsOverlayCloseRef,
143
147
  useExisting: forwardRef(() => PopoverComponent),
144
148
  },
145
- ], queries: [{ propertyName: "menu", first: true, predicate: MenuComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "panelTrap", first: true, predicate: CdkTrapFocus, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DsStaticPreview, inputs: ["staticPreview", "staticPreview"] }], ngImport: i0, template: "<!-- Projected content is captured once and stamped into the active render site; duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.id]=\"panelId\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:contents}.popover{--_popover-bg-color: var(--ds-popover-bg-color, var(--surface-overlay));--_popover-border-color: var(--ds-popover-border-color, var(--border-default));--_popover-radius: var(--ds-popover-radius, var(--ds-radius-panel));--_popover-shadow: var(--ds-popover-shadow, var(--ds-elevation-overlay));--_popover-padding: var(--ds-popover-padding, var(--space-3));--_popover-max-width: var(--ds-popover-max-width, var(--popover-maxw));--_popover-min-width: var(--ds-popover-min-width, auto);position:relative;background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);border-radius:var(--_popover-radius);box-shadow:var(--_popover-shadow);padding:var(--_popover-padding);z-index:var(--layer-popover);max-width:var(--_popover-max-width);min-width:var(--_popover-min-width)}.popover:has(ds-menu){padding:0;--ds-menu-clip-radius: calc( var(--_popover-radius) - var(--border-width-default) )}.arrow{--_popover-arrow-size: var(--ds-popover-arrow-size, 7px);position:absolute;width:calc(var(--_popover-arrow-size) * 2);height:calc(var(--_popover-arrow-size) * 2);overflow:hidden;pointer-events:none}.arrow:before{content:\"\";box-sizing:border-box;position:absolute;width:var(--_popover-arrow-size);height:var(--_popover-arrow-size);background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);transform:rotate(45deg);transform-origin:center}[data-placement=bottom] .arrow,[data-placement=bottom]>.arrow{top:calc(var(--_popover-arrow-size) * -1);left:var(--space-4)}[data-placement=bottom] .arrow:before,[data-placement=bottom]>.arrow:before{bottom:0;left:50%;translate:-50% 0;border-right:none;border-bottom:none}[data-placement=top] .arrow,[data-placement=top]>.arrow{bottom:calc(var(--_popover-arrow-size) * -1);left:var(--space-4)}[data-placement=top] .arrow:before,[data-placement=top]>.arrow:before{top:0;left:50%;translate:-50% 0;border-left:none;border-top:none}[data-placement=right] .arrow,[data-placement=right]>.arrow{left:calc(var(--_popover-arrow-size) * -1);top:var(--space-4)}[data-placement=right] .arrow:before,[data-placement=right]>.arrow:before{right:0;top:50%;translate:0 -50%;border-right:none;border-top:none}[data-placement=left] .arrow,[data-placement=left]>.arrow{right:calc(var(--_popover-arrow-size) * -1);top:var(--space-4)}[data-placement=left] .arrow:before,[data-placement=left]>.arrow:before{left:0;top:50%;translate:0 -50%;border-left:none;border-bottom:none}\n"], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
149
+ ], queries: [{ propertyName: "menu", first: true, predicate: MenuComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "panelTrap", first: true, predicate: CdkTrapFocus, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DsStaticPreview, inputs: ["staticPreview", "staticPreview"] }], ngImport: i0, template: "<!-- Projected content is captured once and stamped into the active render site; duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.id]=\"panelId\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:contents}.popover{--_popover-bg-color: var(--ds-popover-bg-color, var(--surface-overlay-raised));--_popover-border-color: var(--ds-popover-border-color, var(--border-overlay));--_popover-radius: var(--ds-popover-radius, var(--ds-radius-panel));--_popover-shadow: var(--ds-popover-shadow, var(--ds-elevation-overlay));--_popover-padding: var(--ds-popover-padding, var(--space-3));--_popover-max-width: var(--ds-popover-max-width, var(--popover-maxw));--_popover-min-width: var(--ds-popover-min-width, auto);--surface-secondary: var(--surface-overlay-raised-secondary);--surface-muted: var(--surface-overlay-raised-muted);--surface-tint: var(--surface-overlay-raised-tint);--accent-surface-tint: var(--surface-overlay-raised-tint);--accent-strong: var(--accent-strong-overlay);position:relative;background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);border-radius:var(--_popover-radius);box-shadow:var(--_popover-shadow);padding:var(--_popover-padding);z-index:var(--layer-popover);max-width:var(--_popover-max-width);min-width:var(--_popover-min-width)}.popover:has(ds-menu){padding:0;--ds-menu-clip-radius: calc( var(--_popover-radius) - var(--border-width-default) )}.arrow{--_popover-arrow-size: var(--ds-popover-arrow-size, 7px);--_popover-arrow-inset: calc(var(--_popover-radius) + var(--_popover-arrow-size));--_popover-arrow-offset: calc(var(--_popover-arrow-size) / -2 - var(--border-width-default));--_popover-arrow-left: clamp(min(var(--_popover-arrow-inset), 50%), var(--_overlay-arrow-x, 50%), max(100% - var(--_popover-arrow-inset), 50%));--_popover-arrow-top: clamp(min(var(--_popover-arrow-inset), 50%), var(--_overlay-arrow-y, 50%), max(100% - var(--_popover-arrow-inset), 50%));box-sizing:border-box;position:absolute;width:var(--_popover-arrow-size);height:var(--_popover-arrow-size);background:var(--_popover-bg-color);border:0 solid var(--_popover-border-color);transform:rotate(45deg);pointer-events:none}[data-placement=bottom]>.arrow{top:var(--_popover-arrow-offset);left:var(--_popover-arrow-left);margin-left:calc(var(--_popover-arrow-size) / -2);border-top-width:var(--border-width-default);border-left-width:var(--border-width-default)}[data-placement=top]>.arrow{bottom:var(--_popover-arrow-offset);left:var(--_popover-arrow-left);margin-left:calc(var(--_popover-arrow-size) / -2);border-bottom-width:var(--border-width-default);border-right-width:var(--border-width-default)}[data-placement=right]>.arrow{left:var(--_popover-arrow-offset);top:var(--_popover-arrow-top);margin-top:calc(var(--_popover-arrow-size) / -2);border-bottom-width:var(--border-width-default);border-left-width:var(--border-width-default)}[data-placement=left]>.arrow{right:var(--_popover-arrow-offset);top:var(--_popover-arrow-top);margin-top:calc(var(--_popover-arrow-size) / -2);border-top-width:var(--border-width-default);border-right-width:var(--border-width-default)}\n"], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
146
150
  }
147
151
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PopoverComponent, decorators: [{
148
152
  type: Component,
@@ -151,7 +155,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
151
155
  provide: DsOverlayCloseRef,
152
156
  useExisting: forwardRef(() => PopoverComponent),
153
157
  },
154
- ], template: "<!-- Projected content is captured once and stamped into the active render site; duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.id]=\"panelId\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:contents}.popover{--_popover-bg-color: var(--ds-popover-bg-color, var(--surface-overlay));--_popover-border-color: var(--ds-popover-border-color, var(--border-default));--_popover-radius: var(--ds-popover-radius, var(--ds-radius-panel));--_popover-shadow: var(--ds-popover-shadow, var(--ds-elevation-overlay));--_popover-padding: var(--ds-popover-padding, var(--space-3));--_popover-max-width: var(--ds-popover-max-width, var(--popover-maxw));--_popover-min-width: var(--ds-popover-min-width, auto);position:relative;background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);border-radius:var(--_popover-radius);box-shadow:var(--_popover-shadow);padding:var(--_popover-padding);z-index:var(--layer-popover);max-width:var(--_popover-max-width);min-width:var(--_popover-min-width)}.popover:has(ds-menu){padding:0;--ds-menu-clip-radius: calc( var(--_popover-radius) - var(--border-width-default) )}.arrow{--_popover-arrow-size: var(--ds-popover-arrow-size, 7px);position:absolute;width:calc(var(--_popover-arrow-size) * 2);height:calc(var(--_popover-arrow-size) * 2);overflow:hidden;pointer-events:none}.arrow:before{content:\"\";box-sizing:border-box;position:absolute;width:var(--_popover-arrow-size);height:var(--_popover-arrow-size);background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);transform:rotate(45deg);transform-origin:center}[data-placement=bottom] .arrow,[data-placement=bottom]>.arrow{top:calc(var(--_popover-arrow-size) * -1);left:var(--space-4)}[data-placement=bottom] .arrow:before,[data-placement=bottom]>.arrow:before{bottom:0;left:50%;translate:-50% 0;border-right:none;border-bottom:none}[data-placement=top] .arrow,[data-placement=top]>.arrow{bottom:calc(var(--_popover-arrow-size) * -1);left:var(--space-4)}[data-placement=top] .arrow:before,[data-placement=top]>.arrow:before{top:0;left:50%;translate:-50% 0;border-left:none;border-top:none}[data-placement=right] .arrow,[data-placement=right]>.arrow{left:calc(var(--_popover-arrow-size) * -1);top:var(--space-4)}[data-placement=right] .arrow:before,[data-placement=right]>.arrow:before{right:0;top:50%;translate:0 -50%;border-right:none;border-top:none}[data-placement=left] .arrow,[data-placement=left]>.arrow{right:calc(var(--_popover-arrow-size) * -1);top:var(--space-4)}[data-placement=left] .arrow:before,[data-placement=left]>.arrow:before{left:0;top:50%;translate:0 -50%;border-left:none;border-bottom:none}\n"] }]
158
+ ], template: "<!-- Projected content is captured once and stamped into the active render site; duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.id]=\"panelId\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:contents}.popover{--_popover-bg-color: var(--ds-popover-bg-color, var(--surface-overlay-raised));--_popover-border-color: var(--ds-popover-border-color, var(--border-overlay));--_popover-radius: var(--ds-popover-radius, var(--ds-radius-panel));--_popover-shadow: var(--ds-popover-shadow, var(--ds-elevation-overlay));--_popover-padding: var(--ds-popover-padding, var(--space-3));--_popover-max-width: var(--ds-popover-max-width, var(--popover-maxw));--_popover-min-width: var(--ds-popover-min-width, auto);--surface-secondary: var(--surface-overlay-raised-secondary);--surface-muted: var(--surface-overlay-raised-muted);--surface-tint: var(--surface-overlay-raised-tint);--accent-surface-tint: var(--surface-overlay-raised-tint);--accent-strong: var(--accent-strong-overlay);position:relative;background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);border-radius:var(--_popover-radius);box-shadow:var(--_popover-shadow);padding:var(--_popover-padding);z-index:var(--layer-popover);max-width:var(--_popover-max-width);min-width:var(--_popover-min-width)}.popover:has(ds-menu){padding:0;--ds-menu-clip-radius: calc( var(--_popover-radius) - var(--border-width-default) )}.arrow{--_popover-arrow-size: var(--ds-popover-arrow-size, 7px);--_popover-arrow-inset: calc(var(--_popover-radius) + var(--_popover-arrow-size));--_popover-arrow-offset: calc(var(--_popover-arrow-size) / -2 - var(--border-width-default));--_popover-arrow-left: clamp(min(var(--_popover-arrow-inset), 50%), var(--_overlay-arrow-x, 50%), max(100% - var(--_popover-arrow-inset), 50%));--_popover-arrow-top: clamp(min(var(--_popover-arrow-inset), 50%), var(--_overlay-arrow-y, 50%), max(100% - var(--_popover-arrow-inset), 50%));box-sizing:border-box;position:absolute;width:var(--_popover-arrow-size);height:var(--_popover-arrow-size);background:var(--_popover-bg-color);border:0 solid var(--_popover-border-color);transform:rotate(45deg);pointer-events:none}[data-placement=bottom]>.arrow{top:var(--_popover-arrow-offset);left:var(--_popover-arrow-left);margin-left:calc(var(--_popover-arrow-size) / -2);border-top-width:var(--border-width-default);border-left-width:var(--border-width-default)}[data-placement=top]>.arrow{bottom:var(--_popover-arrow-offset);left:var(--_popover-arrow-left);margin-left:calc(var(--_popover-arrow-size) / -2);border-bottom-width:var(--border-width-default);border-right-width:var(--border-width-default)}[data-placement=right]>.arrow{left:var(--_popover-arrow-offset);top:var(--_popover-arrow-top);margin-top:calc(var(--_popover-arrow-size) / -2);border-bottom-width:var(--border-width-default);border-left-width:var(--border-width-default)}[data-placement=left]>.arrow{right:var(--_popover-arrow-offset);top:var(--_popover-arrow-top);margin-top:calc(var(--_popover-arrow-size) / -2);border-top-width:var(--border-width-default);border-right-width:var(--border-width-default)}\n"] }]
155
159
  }], propDecorators: { panelTpl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], panelTrap: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkTrapFocus), { isSignal: true }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], arrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "arrow", required: false }] }], panelRole: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelRole", required: false }] }], panelLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelLabel", required: false }] }], menu: [{ type: i0.ContentChild, args: [i0.forwardRef(() => MenuComponent), { ...{ descendants: true }, isSignal: true }] }] } });
156
160
  function buildPositions(placement, align, offsetPx) {
157
161
  const crossStart = align === 'start' ? 'start' : 'end';
@@ -185,16 +189,16 @@ function buildPositions(placement, align, offsetPx) {
185
189
  return [
186
190
  {
187
191
  originX: 'start',
188
- originY: 'top',
192
+ originY: 'center',
189
193
  overlayX: 'end',
190
- overlayY: 'top',
194
+ overlayY: 'center',
191
195
  offsetX: -offsetPx,
192
196
  },
193
197
  {
194
198
  originX: 'end',
195
- originY: 'top',
199
+ originY: 'center',
196
200
  overlayX: 'start',
197
- overlayY: 'top',
201
+ overlayY: 'center',
198
202
  offsetX: offsetPx,
199
203
  },
200
204
  ];
@@ -202,16 +206,16 @@ function buildPositions(placement, align, offsetPx) {
202
206
  return [
203
207
  {
204
208
  originX: 'end',
205
- originY: 'top',
209
+ originY: 'center',
206
210
  overlayX: 'start',
207
- overlayY: 'top',
211
+ overlayY: 'center',
208
212
  offsetX: offsetPx,
209
213
  },
210
214
  {
211
215
  originX: 'start',
212
- originY: 'top',
216
+ originY: 'center',
213
217
  overlayX: 'end',
214
- overlayY: 'top',
218
+ overlayY: 'center',
215
219
  offsetX: -offsetPx,
216
220
  },
217
221
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-popover.mjs","sources":["../../../src/lib/components/popover/popover.component.ts","../../../src/lib/components/popover/popover.component.html","../../../src/lib/components/popover/popover-trigger.directive.ts","../../../src/lib/components/popover/ids-group-ltd-ids-design-system-components-popover.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n OnDestroy,\n TemplateRef,\n ViewContainerRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChild,\n forwardRef,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n ConnectedPosition,\n FlexibleConnectedPositionStrategy,\n Overlay,\n OverlayConfig,\n OverlayRef,\n} from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n clearOnDetach,\n closeOnOutsidePointer,\n closeOnScroll,\n disposeWithLeave,\n type DsOverlayCloseCause,\n focusIsInside,\n forwardOverlayTokens,\n overlayPlacementOf,\n prepareOverlayEnter,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { CdkTrapFocus } from '@angular/cdk/a11y';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { DsOverlayCloseRef } from '@ids-group-ltd/ids-design-system/overlay';\nimport { DsStaticPreview } from '@ids-group-ltd/ids-design-system/components';\nimport { MenuComponent } from '@ids-group-ltd/ids-design-system/components/menu';\n\nlet nextPanelId = 0;\n\nexport type PopoverAlign = 'start' | 'end';\nexport type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right';\n\n@Component({\n selector: 'ds-popover',\n standalone: true,\n imports: [CdkTrapFocus, NgTemplateOutlet],\n templateUrl: './popover.component.html',\n styleUrl: './popover.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n hostDirectives: [{ directive: DsStaticPreview, inputs: ['staticPreview'] }],\n providers: [\n {\n provide: DsOverlayCloseRef,\n useExisting: forwardRef(() => PopoverComponent),\n },\n ],\n})\nexport class PopoverComponent implements OnDestroy, DsOverlayCloseRef {\n private readonly overlay = inject(Overlay);\n private readonly vcr = inject(ViewContainerRef);\n private readonly host = inject(ElementRef<HTMLElement>);\n protected readonly preview = inject(DsStaticPreview);\n protected readonly panelTpl = viewChild<TemplateRef<unknown>>('panel');\n private readonly panelTrap = viewChild(CdkTrapFocus);\n private ref: OverlayRef | null = null;\n private triggerElement: HTMLElement | null = null;\n private focusTimer: ReturnType<typeof setTimeout> | null = null;\n /** Public panel tokens forwarded onto the portaled overlay pane on open, so a\n * consumer's `ds-popover { --ds-popover-panel-*: ... }` reaches it. */\n private readonly panelTokens = [\n '--ds-popover-bg-color',\n '--ds-popover-border-color',\n '--ds-popover-radius',\n '--ds-popover-shadow',\n '--ds-popover-padding',\n '--ds-popover-max-width',\n '--ds-popover-min-width',\n '--ds-popover-arrow-size',\n // A projected ds-menu is portaled into the pane, out of reach of a scoped width.\n '--ds-menu-min-width',\n '--ds-menu-max-width',\n ];\n\n /** Cross-axis alignment of the panel against the trigger. */\n readonly align = input<PopoverAlign>('start');\n /** Which side of the trigger the panel prefers to appear on. */\n readonly placement = input<PopoverPlacement>('bottom');\n /** Render a small caret pointing at the trigger. */\n readonly arrow = input(false, { transform: booleanAttribute });\n\n /** ARIA role for the panel (e.g. 'dialog'). When set, the panel traps focus and captures it\n * on open; Escape or an in-panel close returns focus to the trigger, an outside click or\n * scroll does not (non-modal). Leave null for plain text popovers. A panel holding a\n * `role=\"menu\"` (a `ds-menu`) captures focus on open without it, untrapped. */\n readonly panelRole = input<string | null>(null);\n /** Accessible name for the panel; pair with `panelRole`. */\n readonly panelLabel = input<string | null>(null);\n\n /** Open/closed state, for callers binding `aria-expanded` on the trigger. */\n readonly opened = signal(false);\n /** Id of the open panel, for `aria-controls` on the trigger. */\n readonly panelId = `ds-popover-${++nextPanelId}`;\n private readonly menu = contentChild(MenuComponent, { descendants: true });\n /** Whether the projected content holds a `ds-menu`, which makes the trigger `aria-haspopup=\"menu\"`. */\n readonly holdsMenu = computed(() => this.menu() !== undefined);\n /** Resolved placement after the overlay positions; drives the arrow direction. */\n readonly resolvedPlacement = signal<PopoverPlacement>('bottom');\n\n toggle(trigger: HTMLElement): void {\n if (this.preview.staticPreview()) {\n return;\n }\n // Clicking another trigger while open dismisses the overlay through the CDK's outside-pointer\n // listener FIRST, so `ref` is already gone here and this re-opens on the new trigger.\n if (this.ref) {\n this.close();\n\n return;\n }\n\n this.triggerElement = trigger;\n const placement = this.placement();\n const arrowOffset = this.arrow() ? 8 : 4;\n\n const positionStrategy: FlexibleConnectedPositionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(trigger)\n .withPositions(buildPositions(placement, this.align(), arrowOffset))\n .withViewportMargin(8);\n\n positionStrategy.positionChanges.subscribe((change) => {\n this.resolvedPlacement.set(\n overlayPlacementOf(\n change.connectionPair.overlayY,\n change.connectionPair.overlayX,\n ),\n );\n });\n\n const cfg: OverlayConfig = {\n positionStrategy,\n hasBackdrop: false,\n panelClass: 'ds-overlay-pane',\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n };\n this.ref = this.overlay.create(cfg);\n prepareOverlayEnter(this.ref, this.host.nativeElement, positionStrategy);\n forwardOverlayTokens(this.ref, this.host.nativeElement, this.panelTokens);\n closeOnOutsidePointer(\n this.ref,\n (target) => trigger.contains(target),\n () => this.close('dismiss'),\n );\n // CDK's scroll strategies miss a plain overflow container, so close on any outside scroll ourselves.\n const removeScrollClose = closeOnScroll(this.ref, () =>\n this.close('dismiss'),\n );\n clearOnDetach(this.ref, {\n current: () => this.ref,\n always: removeScrollClose,\n clear: () => {\n this.ref = null;\n this.opened.set(false);\n },\n });\n this.ref.keydownEvents().subscribe((event) => {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.close('dismiss');\n }\n });\n this.ref.attach(new TemplatePortal(this.panelTpl()!, this.vcr));\n this.resolvedPlacement.set(placement);\n this.opened.set(true);\n // A menu is operated from inside (APG menu button), so it takes focus without a panelRole.\n if (\n this.panelRole() ||\n this.ref.overlayElement.querySelector('[role=\"menu\"]')\n ) {\n // cdkTrapFocusAutoCapture without its destroy-time restore, which steals focus on an outside/scroll close.\n this.focusTimer = setTimeout(() => {\n this.focusTimer = null;\n void this.panelTrap()?.focusTrap?.focusInitialElementWhenReady();\n });\n }\n }\n\n close(cause: DsOverlayCloseCause = 'select'): void {\n if (!this.ref) {\n return;\n }\n clearTimeout(this.focusTimer ?? undefined);\n this.focusTimer = null;\n const focusWasInPanel = focusIsInside(this.ref);\n disposeWithLeave(this.ref, cause);\n this.ref = null;\n this.opened.set(false);\n if (focusWasInPanel) {\n this.triggerElement?.focus({ preventScroll: true });\n }\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.focusTimer ?? undefined);\n this.ref?.dispose();\n this.ref = null;\n }\n}\n\nfunction buildPositions(\n placement: PopoverPlacement,\n align: PopoverAlign,\n offsetPx: number,\n): ConnectedPosition[] {\n const crossStart = align === 'start' ? 'start' : 'end';\n const crossEnd: 'start' | 'end' = align === 'start' ? 'end' : 'start';\n\n switch (placement) {\n case 'top':\n return [\n {\n originX: crossStart,\n originY: 'top',\n overlayX: crossStart,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n {\n originX: crossStart,\n originY: 'bottom',\n overlayX: crossStart,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n {\n originX: crossEnd,\n originY: 'top',\n overlayX: crossEnd,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n ];\n case 'left':\n return [\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'top',\n offsetX: -offsetPx,\n },\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: offsetPx,\n },\n ];\n case 'right':\n return [\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: offsetPx,\n },\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'top',\n offsetX: -offsetPx,\n },\n ];\n default: // bottom\n return [\n {\n originX: crossStart,\n originY: 'bottom',\n overlayX: crossStart,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n {\n originX: crossStart,\n originY: 'top',\n overlayX: crossStart,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n {\n originX: crossEnd,\n originY: 'bottom',\n overlayX: crossEnd,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n ];\n }\n}\n","<!-- Projected content is captured once and stamped into the active render site; duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.id]=\"panelId\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n","import {\n Directive,\n ElementRef,\n afterRenderEffect,\n inject,\n input,\n} from '@angular/core';\nimport { PopoverComponent } from './popover.component';\n\n/**\n * Opens a `ds-popover` from the element it sits on and keeps the trigger's ARIA in step:\n * `aria-haspopup` (`menu` when the popover holds a `ds-menu`, `dialog` otherwise), `aria-expanded`\n * and, while open, `aria-controls`. On `ds-button` and `ds-icon-button` these land on the inner\n * `<button>`, the element a screen reader focuses; the overlay anchors to it too.\n *\n * Writes the attributes itself, so leave `ariaHasPopup`, `ariaExpanded` and `ariaControls` unbound\n * on the same button: a bound value would overwrite them on its next change.\n */\n@Directive({\n selector: '[dsPopoverTrigger]',\n standalone: true,\n host: { '(click)': 'toggle()' },\n})\nexport class DsPopoverTrigger {\n readonly popover = input.required<PopoverComponent>({\n alias: 'dsPopoverTrigger',\n });\n\n private readonly host: ElementRef<HTMLElement> = inject(ElementRef);\n\n constructor() {\n afterRenderEffect(() => {\n const popover = this.popover();\n const control = this.control();\n const opened = popover.opened();\n control.setAttribute(\n 'aria-haspopup',\n popover.holdsMenu() ? 'menu' : 'dialog',\n );\n control.setAttribute('aria-expanded', String(opened));\n if (opened) {\n control.setAttribute('aria-controls', popover.panelId);\n } else {\n control.removeAttribute('aria-controls');\n }\n });\n }\n\n protected toggle(): void {\n this.popover().toggle(this.control());\n }\n\n private control(): HTMLElement {\n const host = this.host.nativeElement;\n if (host.matches('button, a[href], [role=\"button\"]')) {\n return host;\n }\n\n return (\n host.querySelector<HTMLElement>('button, a[href], [role=\"button\"]') ??\n host\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAyCA,IAAI,WAAW,GAAG,CAAC;MAoBN,gBAAgB,CAAA;AACV,IAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACzB,IAAA,GAAG,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC9B,IAAA,IAAI,GAAG,MAAM,EAAC,UAAuB,EAA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O,EAAE,CAAC;IACvC;IAEQ,OAAO,GAAA;AACb,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa;AACpC,QAAA,IAAI,IAAI,CAAC,OAAO,CAAC,kCAAkC,CAAC,EAAE;AACpD,YAAA,OAAO,IAAI;QACb;AAEA,QAAA,QACE,IAAI,CAAC,aAAa,CAAc,kCAAkC,CAAC;AACnE,YAAA,IAAI;IAER;wGAvCW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,kBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,UAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;AAChC,iBAAA;;;ACtBD;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-popover.mjs","sources":["../../../src/lib/components/popover/popover.component.ts","../../../src/lib/components/popover/popover.component.html","../../../src/lib/components/popover/popover-trigger.directive.ts","../../../src/lib/components/popover/ids-group-ltd-ids-design-system-components-popover.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n OnDestroy,\n TemplateRef,\n ViewContainerRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChild,\n forwardRef,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n ConnectedPosition,\n FlexibleConnectedPositionStrategy,\n Overlay,\n OverlayConfig,\n OverlayRef,\n} from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n clearOnDetach,\n closeOnOutsidePointer,\n closeOnScroll,\n disposeWithLeave,\n type DsOverlayCloseCause,\n focusIsInside,\n forwardOverlayTokens,\n overlayPlacementOf,\n pointArrowAtHost,\n prepareOverlayEnter,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { CdkTrapFocus } from '@angular/cdk/a11y';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { DsOverlayCloseRef } from '@ids-group-ltd/ids-design-system/overlay';\nimport { DsStaticPreview } from '@ids-group-ltd/ids-design-system/components';\nimport { MenuComponent } from '@ids-group-ltd/ids-design-system/components/menu';\n\nlet nextPanelId = 0;\n\nexport type PopoverAlign = 'start' | 'end';\nexport type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right';\n\n@Component({\n selector: 'ds-popover',\n standalone: true,\n imports: [CdkTrapFocus, NgTemplateOutlet],\n templateUrl: './popover.component.html',\n styleUrl: './popover.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n hostDirectives: [{ directive: DsStaticPreview, inputs: ['staticPreview'] }],\n providers: [\n {\n provide: DsOverlayCloseRef,\n useExisting: forwardRef(() => PopoverComponent),\n },\n ],\n})\nexport class PopoverComponent implements OnDestroy, DsOverlayCloseRef {\n private readonly overlay = inject(Overlay);\n private readonly vcr = inject(ViewContainerRef);\n private readonly host = inject(ElementRef<HTMLElement>);\n protected readonly preview = inject(DsStaticPreview);\n protected readonly panelTpl = viewChild<TemplateRef<unknown>>('panel');\n private readonly panelTrap = viewChild(CdkTrapFocus);\n private ref: OverlayRef | null = null;\n private triggerElement: HTMLElement | null = null;\n private focusTimer: ReturnType<typeof setTimeout> | null = null;\n /** Public panel tokens forwarded onto the portaled overlay pane on open, so a\n * consumer's `ds-popover { --ds-popover-panel-*: ... }` reaches it. */\n private readonly panelTokens = [\n '--ds-popover-bg-color',\n '--ds-popover-border-color',\n '--ds-popover-radius',\n '--ds-popover-shadow',\n '--ds-popover-padding',\n '--ds-popover-max-width',\n '--ds-popover-min-width',\n '--ds-popover-arrow-size',\n // A projected ds-menu is portaled into the pane, out of reach of a scoped width.\n '--ds-menu-min-width',\n '--ds-menu-max-width',\n ];\n\n /** Cross-axis alignment of the panel against the trigger. */\n readonly align = input<PopoverAlign>('start');\n /** Which side of the trigger the panel prefers to appear on. */\n readonly placement = input<PopoverPlacement>('bottom');\n /** Render a small caret pointing at the trigger. */\n readonly arrow = input(false, { transform: booleanAttribute });\n\n /** ARIA role for the panel (e.g. 'dialog'). When set, the panel traps focus and captures it\n * on open; Escape or an in-panel close returns focus to the trigger, an outside click or\n * scroll does not (non-modal). Leave null for plain text popovers. A panel holding a\n * `role=\"menu\"` (a `ds-menu`) captures focus on open without it, untrapped. */\n readonly panelRole = input<string | null>(null);\n /** Accessible name for the panel; pair with `panelRole`. */\n readonly panelLabel = input<string | null>(null);\n\n /** Open/closed state, for callers binding `aria-expanded` on the trigger. */\n readonly opened = signal(false);\n /** Id of the open panel, for `aria-controls` on the trigger. */\n readonly panelId = `ds-popover-${++nextPanelId}`;\n private readonly menu = contentChild(MenuComponent, { descendants: true });\n /** Whether the projected content holds a `ds-menu`, which makes the trigger `aria-haspopup=\"menu\"`. */\n readonly holdsMenu = computed(() => this.menu() !== undefined);\n /** Resolved placement after the overlay positions; drives the arrow direction. */\n readonly resolvedPlacement = signal<PopoverPlacement>('bottom');\n\n toggle(trigger: HTMLElement): void {\n if (this.preview.staticPreview()) {\n return;\n }\n // Clicking another trigger while open dismisses the overlay through the CDK's outside-pointer\n // listener FIRST, so `ref` is already gone here and this re-opens on the new trigger.\n if (this.ref) {\n this.close();\n\n return;\n }\n\n this.triggerElement = trigger;\n const placement = this.placement();\n const arrowOffset = this.arrow() ? 8 : 4;\n\n const positionStrategy: FlexibleConnectedPositionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(trigger)\n .withPositions(buildPositions(placement, this.align(), arrowOffset))\n .withViewportMargin(8);\n\n positionStrategy.positionChanges.subscribe((change) => {\n this.resolvedPlacement.set(overlayPlacementOf(change.connectionPair));\n });\n\n const cfg: OverlayConfig = {\n positionStrategy,\n hasBackdrop: false,\n panelClass: 'ds-overlay-pane',\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n };\n this.ref = this.overlay.create(cfg);\n prepareOverlayEnter(this.ref, this.host.nativeElement, positionStrategy);\n forwardOverlayTokens(this.ref, this.host.nativeElement, this.panelTokens);\n closeOnOutsidePointer(\n this.ref,\n (target) => trigger.contains(target),\n () => this.close('dismiss'),\n );\n // CDK's scroll strategies miss a plain overflow container, so close on any outside scroll ourselves.\n const removeScrollClose = closeOnScroll(this.ref, () =>\n this.close('dismiss'),\n );\n clearOnDetach(this.ref, {\n current: () => this.ref,\n always: removeScrollClose,\n clear: () => {\n this.ref = null;\n this.opened.set(false);\n },\n });\n this.ref.keydownEvents().subscribe((event) => {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.close('dismiss');\n }\n });\n this.ref.attach(new TemplatePortal(this.panelTpl()!, this.vcr));\n const panel =\n this.ref.overlayElement.querySelector<HTMLElement>('.popover');\n if (this.arrow() && panel) {\n pointArrowAtHost(this.ref, panel, trigger);\n }\n this.resolvedPlacement.set(placement);\n this.opened.set(true);\n // A menu is operated from inside (APG menu button), so it takes focus without a panelRole.\n if (\n this.panelRole() ||\n this.ref.overlayElement.querySelector('[role=\"menu\"]')\n ) {\n // cdkTrapFocusAutoCapture without its destroy-time restore, which steals focus on an outside/scroll close.\n this.focusTimer = setTimeout(() => {\n this.focusTimer = null;\n void this.panelTrap()?.focusTrap?.focusInitialElementWhenReady();\n });\n }\n }\n\n close(cause: DsOverlayCloseCause = 'select'): void {\n if (!this.ref) {\n return;\n }\n clearTimeout(this.focusTimer ?? undefined);\n this.focusTimer = null;\n const focusWasInPanel = focusIsInside(this.ref);\n disposeWithLeave(this.ref, cause);\n this.ref = null;\n this.opened.set(false);\n if (focusWasInPanel) {\n this.triggerElement?.focus({ preventScroll: true });\n }\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.focusTimer ?? undefined);\n this.ref?.dispose();\n this.ref = null;\n }\n}\n\nfunction buildPositions(\n placement: PopoverPlacement,\n align: PopoverAlign,\n offsetPx: number,\n): ConnectedPosition[] {\n const crossStart = align === 'start' ? 'start' : 'end';\n const crossEnd: 'start' | 'end' = align === 'start' ? 'end' : 'start';\n\n switch (placement) {\n case 'top':\n return [\n {\n originX: crossStart,\n originY: 'top',\n overlayX: crossStart,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n {\n originX: crossStart,\n originY: 'bottom',\n overlayX: crossStart,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n {\n originX: crossEnd,\n originY: 'top',\n overlayX: crossEnd,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n ];\n case 'left':\n return [\n {\n originX: 'start',\n originY: 'center',\n overlayX: 'end',\n overlayY: 'center',\n offsetX: -offsetPx,\n },\n {\n originX: 'end',\n originY: 'center',\n overlayX: 'start',\n overlayY: 'center',\n offsetX: offsetPx,\n },\n ];\n case 'right':\n return [\n {\n originX: 'end',\n originY: 'center',\n overlayX: 'start',\n overlayY: 'center',\n offsetX: offsetPx,\n },\n {\n originX: 'start',\n originY: 'center',\n overlayX: 'end',\n overlayY: 'center',\n offsetX: -offsetPx,\n },\n ];\n default: // bottom\n return [\n {\n originX: crossStart,\n originY: 'bottom',\n overlayX: crossStart,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n {\n originX: crossStart,\n originY: 'top',\n overlayX: crossStart,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n {\n originX: crossEnd,\n originY: 'bottom',\n overlayX: crossEnd,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n ];\n }\n}\n","<!-- Projected content is captured once and stamped into the active render site; duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.id]=\"panelId\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n","import {\n Directive,\n ElementRef,\n afterRenderEffect,\n inject,\n input,\n} from '@angular/core';\nimport { PopoverComponent } from './popover.component';\n\n/**\n * Opens a `ds-popover` from the element it sits on and keeps the trigger's ARIA in step:\n * `aria-haspopup` (`menu` when the popover holds a `ds-menu`, `dialog` otherwise), `aria-expanded`\n * and, while open, `aria-controls`. On `ds-button` and `ds-icon-button` these land on the inner\n * `<button>`, the element a screen reader focuses; the overlay anchors to it too.\n *\n * Writes the attributes itself, so leave `ariaHasPopup`, `ariaExpanded` and `ariaControls` unbound\n * on the same button: a bound value would overwrite them on its next change.\n */\n@Directive({\n selector: '[dsPopoverTrigger]',\n standalone: true,\n host: { '(click)': 'toggle()' },\n})\nexport class DsPopoverTrigger {\n readonly popover = input.required<PopoverComponent>({\n alias: 'dsPopoverTrigger',\n });\n\n private readonly host: ElementRef<HTMLElement> = inject(ElementRef);\n\n constructor() {\n afterRenderEffect(() => {\n const popover = this.popover();\n const control = this.control();\n const opened = popover.opened();\n control.setAttribute(\n 'aria-haspopup',\n popover.holdsMenu() ? 'menu' : 'dialog',\n );\n control.setAttribute('aria-expanded', String(opened));\n if (opened) {\n control.setAttribute('aria-controls', popover.panelId);\n } else {\n control.removeAttribute('aria-controls');\n }\n });\n }\n\n protected toggle(): void {\n this.popover().toggle(this.control());\n }\n\n private control(): HTMLElement {\n const host = this.host.nativeElement;\n if (host.matches('button, a[href], [role=\"button\"]')) {\n return host;\n }\n\n return (\n host.querySelector<HTMLElement>('button, a[href], [role=\"button\"]') ??\n host\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AA0CA,IAAI,WAAW,GAAG,CAAC;MAoBN,gBAAgB,CAAA;AACV,IAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACzB,IAAA,GAAG,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC9B,IAAA,IAAI,GAAG,MAAM,EAAC,UAAuB,EAAC;AACpC,IAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC;AACjC,IAAA,QAAQ,GAAG,SAAS,CAAuB,OAAO,+EAAC;AACrD,IAAA,SAAS,GAAG,SAAS,CAAC,YAAY,gFAAC;IAC5C,GAAG,GAAsB,IAAI;IAC7B,cAAc,GAAuB,IAAI;IACzC,UAAU,GAAyC,IAAI;AAC/D;AACwE;AACvD,IAAA,WAAW,GAAG;QAC7B,uBAAuB;QACvB,2BAA2B;QAC3B,qBAAqB;QACrB,qBAAqB;QACrB,sBAAsB;QACtB,wBAAwB;QACxB,wBAAwB;QACxB,yBAAyB;;QAEzB,qBAAqB;QACrB,qBAAqB;KACtB;;AAGQ,IAAA,KAAK,GAAG,KAAK,CAAe,OAAO,4EAAC;;AAEpC,IAAA,SAAS,GAAG,KAAK,CAAmB,QAAQ,gFAAC;;IAE7C,KAAK,GAAG,KAAK,CAAC,KAAK,6EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE9D;;;AAGgF;AACvE,IAAA,SAAS,GAAG,KAAK,CAAgB,IAAI,gFAAC;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AA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,kBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,UAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;AAChC,iBAAA;;;ACtBD;;AAEG;;;;"}
@@ -133,7 +133,7 @@ class SearchComponent {
133
133
  useExisting: forwardRef(() => SearchComponent),
134
134
  multi: true,
135
135
  },
136
- ], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"search\"\n dsFieldClickFocus\n [class]=\"sizeResolved()\">\n @if (showIcon()) {\n <ds-icon\n name=\"search\"\n [size]=\"16\">\n </ds-icon>\n }\n\n <input\n #searchInput\n class=\"search-input\"\n [placeholder]=\"placeholderResolved()\"\n [attr.aria-label]=\"ariaLabel() || placeholderResolved() || null\"\n [ngModel]=\"text()\"\n [disabled]=\"isDisabled()\"\n (ngModelChange)=\"onText($event)\"\n (keydown.enter)=\"onSubmit()\"\n (blur)=\"markTouched()\" />\n\n @if (clearable() && text()) {\n <button\n type=\"button\"\n class=\"search-clear\"\n [attr.aria-label]=\"intl().search.clear\"\n [disabled]=\"isDisabled()\"\n (click)=\"clear()\">\n <ds-icon\n name=\"x\"\n [size]=\"14\">\n </ds-icon>\n </button>\n }\n\n @if (shortcut()) {\n <kbd class=\"kbd\">\n {{ shortcut() }}\n </kbd>\n }\n</div>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_field-border-color: var(--ds-field-border-color, var(--border-default));--_field-border-color-hover: var(--ds-field-border-color-hover, var(--border-strong));--_field-border-color-focus: var(--ds-field-border-color-focus, var(--accent));--_field-text-color: var(--ds-field-text-color, var(--text-primary));--_field-placeholder-color: var(--ds-field-placeholder-color, var(--text-tertiary));--_field-font-size: var(--ds-field-font-size, var(--font-size-s));--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-md)));--_search-bg-color: var(--ds-search-bg-color, var(--surface-default));--_search-border: var(--ds-search-border, var(--_field-border-color));--_search-radius: var(--ds-search-radius, var(--ds-radius-control));--_search-border-hover: var(--ds-search-border-hover, var(--_search-border));--_search-bg-color-focus: var(--ds-search-bg-color-focus, var(--surface-default));--_search-border-focus: var(--ds-search-border-focus, var(--_field-border-color-focus));--_search-focus-shadow: var(--ds-search-focus-shadow, var(--ds-field-focus-shadow));--_search-text-color: var(--ds-search-text-color, var(--_field-text-color));--_search-placeholder: var(--ds-search-placeholder, var(--_field-placeholder-color));--_search-max-width: var(--ds-search-max-width, none);--_search-font-size: var(--ds-search-font-size, var(--_field-font-size));display:block}.search{display:flex;align-items:center;gap:var(--space-2);background-color:var(--_search-bg-color);border:var(--border-width-default) solid var(--_search-border);border-radius:var(--_search-radius);padding:0 var(--space-3);height:var(--_search-height);width:100%;max-width:var(--_search-max-width);transition:border-color var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.search:hover{border-color:var(--_search-border-hover)}@media not (forced-colors:active){.search .search-input:where(:focus-visible){outline:none}}.search:focus-within{background-color:var(--_search-bg-color-focus);border-color:var(--_search-border-focus);box-shadow:var(--_search-focus-shadow)}.search:has(.search-input:disabled){background-color:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.search:has(.search-input:disabled) .search-input,.search:has(.search-input:disabled) .icon{color:var(--text-disabled)}.search .icon{width:var(--icon-md);height:var(--icon-md);color:var(--icon-default)}.search .search-input{flex:1;min-width:0;border:0}@media not (forced-colors:active){.search .search-input{outline:none}}.search .search-input{background:transparent;font:var(--font-weight-regular) var(--_search-font-size)/var(--line-height-flat) var(--font-sans);color:var(--_search-text-color)}.search .search-input::placeholder{color:var(--_search-placeholder)}.search .search-clear{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:var(--space-0-5);border:0;background:transparent;border-radius:var(--radius-pill, 999px);color:var(--icon-default);cursor:pointer;opacity:1;transition:opacity var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.search .search-clear .icon{width:var(--icon-sm);height:var(--icon-sm)}.search .search-clear:hover{opacity:1;background:var(--surface-muted, rgba(0, 0, 0, .06))}.search .search-clear:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.search .search-clear{position:relative}.search .search-clear:before{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--hit-xs));height:max(100%,var(--hit-xs));translate:-50% -50%;border-radius:inherit}.search .search-clear:focus-visible{outline-style:none}.search .search-clear:focus-visible:before{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:calc(var(--focus-ring-offset) - 2 * var(--focus-ring-width));animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.search .kbd{font:var(--font-weight-medium) var(--font-size-2xs)/var(--line-height-flat) var(--font-mono);padding:var(--space-px) var(--space-1-5);background:var(--surface-default);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--ds-radius-inner);color:var(--text-tertiary)}.search.sm{--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-sm)))}.search.md{--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-md)))}.search.lg{--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-lg)))}:host(.in-group){width:auto;display:flex}:host(.in-group) .label,:host(.in-group) ds-field-message{display:none}:host(.in-group) .search{border:0;border-radius:0;background:transparent;flex:1;height:auto}:host(.in-group) .search:hover,:host(.in-group) .search:focus,:host(.in-group) .search:focus-visible,:host(.in-group) .search:focus-within{border:0;box-shadow:none}@media not (forced-colors:active){:host(.in-group) .search:hover,:host(.in-group) .search:focus,:host(.in-group) .search:focus-visible,:host(.in-group) .search:focus-within{outline:none}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "directive", type: FieldClickFocusDirective, selector: "[dsFieldClickFocus]" }] });
136
+ ], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"search\"\n dsFieldClickFocus\n [class]=\"sizeResolved()\">\n @if (showIcon()) {\n <ds-icon\n name=\"search\"\n [size]=\"16\">\n </ds-icon>\n }\n\n <input\n #searchInput\n class=\"search-input\"\n [placeholder]=\"placeholderResolved()\"\n [attr.aria-label]=\"ariaLabel() || placeholderResolved() || null\"\n [ngModel]=\"text()\"\n [disabled]=\"isDisabled()\"\n (ngModelChange)=\"onText($event)\"\n (keydown.enter)=\"onSubmit()\"\n (blur)=\"markTouched()\" />\n\n @if (clearable() && text()) {\n <button\n type=\"button\"\n class=\"search-clear\"\n [attr.aria-label]=\"intl().search.clear\"\n [disabled]=\"isDisabled()\"\n (click)=\"clear()\">\n <ds-icon\n name=\"x\"\n [size]=\"14\">\n </ds-icon>\n </button>\n }\n\n @if (shortcut()) {\n <kbd class=\"kbd\">\n {{ shortcut() }}\n </kbd>\n }\n</div>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_field-border-color: var(--ds-field-border-color, var(--border-field));--_field-border-color-hover: var(--ds-field-border-color-hover, var(--border-field-hover));--_field-border-color-focus: var(--ds-field-border-color-focus, var(--accent));--_field-text-color: var(--ds-field-text-color, var(--text-primary));--_field-placeholder-color: var(--ds-field-placeholder-color, var(--text-tertiary));--_field-font-size: var(--ds-field-font-size, var(--font-size-s));--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-md)));--_search-bg-color: var(--ds-search-bg-color, var(--surface-default));--_search-border: var(--ds-search-border, var(--_field-border-color));--_search-radius: var(--ds-search-radius, var(--ds-radius-control));--_search-border-hover: var(--ds-search-border-hover, var(--_search-border));--_search-bg-color-focus: var(--ds-search-bg-color-focus, var(--surface-default));--_search-border-focus: var(--ds-search-border-focus, var(--_field-border-color-focus));--_search-focus-shadow: var(--ds-search-focus-shadow, var(--ds-field-focus-shadow));--_search-text-color: var(--ds-search-text-color, var(--_field-text-color));--_search-placeholder: var(--ds-search-placeholder, var(--_field-placeholder-color));--_search-max-width: var(--ds-search-max-width, none);--_search-font-size: var(--ds-search-font-size, var(--_field-font-size));display:block}.search{display:flex;align-items:center;gap:var(--space-2);background-color:var(--_search-bg-color);border:var(--border-width-default) solid var(--_search-border);border-radius:var(--_search-radius);padding:0 var(--space-3);height:var(--_search-height);width:100%;max-width:var(--_search-max-width);transition:border-color var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.search:hover{border-color:var(--_search-border-hover)}@media not (forced-colors:active){.search .search-input:where(:focus-visible){outline:none}}.search:focus-within{background-color:var(--_search-bg-color-focus);border-color:var(--_search-border-focus);box-shadow:var(--_search-focus-shadow)}.search:has(.search-input:disabled){background-color:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.search:has(.search-input:disabled) .search-input,.search:has(.search-input:disabled) .icon{color:var(--text-disabled)}.search .icon{width:var(--icon-md);height:var(--icon-md);color:var(--icon-default)}.search .search-input{flex:1;min-width:0;border:0}@media not (forced-colors:active){.search .search-input{outline:none}}.search .search-input{background:transparent;font:var(--font-weight-regular) var(--_search-font-size)/var(--line-height-flat) var(--font-sans);color:var(--_search-text-color)}.search .search-input::placeholder{color:var(--_search-placeholder)}.search .search-clear{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:var(--space-0-5);border:0;background:transparent;border-radius:var(--radius-pill, 999px);color:var(--icon-default);cursor:pointer;opacity:1;transition:opacity var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.search .search-clear .icon{width:var(--icon-sm);height:var(--icon-sm)}.search .search-clear:hover{opacity:1;background:var(--surface-muted, rgba(0, 0, 0, .06))}.search .search-clear:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.search .search-clear{position:relative}.search .search-clear:before{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--hit-xs));height:max(100%,var(--hit-xs));translate:-50% -50%;border-radius:inherit}.search .search-clear:focus-visible{outline-style:none}.search .search-clear:focus-visible:before{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:calc(var(--focus-ring-offset) - 2 * var(--focus-ring-width));animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.search .kbd{font:var(--font-weight-medium) var(--font-size-2xs)/var(--line-height-flat) var(--font-mono);padding:var(--space-px) var(--space-1-5);background:var(--surface-default);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--ds-radius-inner);color:var(--text-tertiary)}.search.sm{--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-sm)))}.search.md{--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-md)))}.search.lg{--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-lg)))}:host(.in-group){width:auto;display:flex}:host(.in-group) .label,:host(.in-group) ds-field-message{display:none}:host(.in-group) .search{border:0;border-radius:0;background:transparent;flex:1;height:auto}:host(.in-group) .search:hover,:host(.in-group) .search:focus,:host(.in-group) .search:focus-visible,:host(.in-group) .search:focus-within{border:0;box-shadow:none}@media not (forced-colors:active){:host(.in-group) .search:hover,:host(.in-group) .search:focus,:host(.in-group) .search:focus-visible,:host(.in-group) .search:focus-within{outline:none}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "directive", type: FieldClickFocusDirective, selector: "[dsFieldClickFocus]" }] });
137
137
  }
138
138
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SearchComponent, decorators: [{
139
139
  type: Component,
@@ -146,7 +146,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
146
146
  useExisting: forwardRef(() => SearchComponent),
147
147
  multi: true,
148
148
  },
149
- ], template: "<div\n class=\"search\"\n dsFieldClickFocus\n [class]=\"sizeResolved()\">\n @if (showIcon()) {\n <ds-icon\n name=\"search\"\n [size]=\"16\">\n </ds-icon>\n }\n\n <input\n #searchInput\n class=\"search-input\"\n [placeholder]=\"placeholderResolved()\"\n [attr.aria-label]=\"ariaLabel() || placeholderResolved() || null\"\n [ngModel]=\"text()\"\n [disabled]=\"isDisabled()\"\n (ngModelChange)=\"onText($event)\"\n (keydown.enter)=\"onSubmit()\"\n (blur)=\"markTouched()\" />\n\n @if (clearable() && text()) {\n <button\n type=\"button\"\n class=\"search-clear\"\n [attr.aria-label]=\"intl().search.clear\"\n [disabled]=\"isDisabled()\"\n (click)=\"clear()\">\n <ds-icon\n name=\"x\"\n [size]=\"14\">\n </ds-icon>\n </button>\n }\n\n @if (shortcut()) {\n <kbd class=\"kbd\">\n {{ shortcut() }}\n </kbd>\n }\n</div>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_field-border-color: var(--ds-field-border-color, var(--border-default));--_field-border-color-hover: var(--ds-field-border-color-hover, var(--border-strong));--_field-border-color-focus: var(--ds-field-border-color-focus, var(--accent));--_field-text-color: var(--ds-field-text-color, var(--text-primary));--_field-placeholder-color: var(--ds-field-placeholder-color, var(--text-tertiary));--_field-font-size: var(--ds-field-font-size, var(--font-size-s));--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-md)));--_search-bg-color: var(--ds-search-bg-color, var(--surface-default));--_search-border: var(--ds-search-border, var(--_field-border-color));--_search-radius: var(--ds-search-radius, var(--ds-radius-control));--_search-border-hover: var(--ds-search-border-hover, var(--_search-border));--_search-bg-color-focus: var(--ds-search-bg-color-focus, var(--surface-default));--_search-border-focus: var(--ds-search-border-focus, var(--_field-border-color-focus));--_search-focus-shadow: var(--ds-search-focus-shadow, var(--ds-field-focus-shadow));--_search-text-color: var(--ds-search-text-color, var(--_field-text-color));--_search-placeholder: var(--ds-search-placeholder, var(--_field-placeholder-color));--_search-max-width: var(--ds-search-max-width, none);--_search-font-size: var(--ds-search-font-size, var(--_field-font-size));display:block}.search{display:flex;align-items:center;gap:var(--space-2);background-color:var(--_search-bg-color);border:var(--border-width-default) solid var(--_search-border);border-radius:var(--_search-radius);padding:0 var(--space-3);height:var(--_search-height);width:100%;max-width:var(--_search-max-width);transition:border-color var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.search:hover{border-color:var(--_search-border-hover)}@media not (forced-colors:active){.search .search-input:where(:focus-visible){outline:none}}.search:focus-within{background-color:var(--_search-bg-color-focus);border-color:var(--_search-border-focus);box-shadow:var(--_search-focus-shadow)}.search:has(.search-input:disabled){background-color:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.search:has(.search-input:disabled) .search-input,.search:has(.search-input:disabled) .icon{color:var(--text-disabled)}.search .icon{width:var(--icon-md);height:var(--icon-md);color:var(--icon-default)}.search .search-input{flex:1;min-width:0;border:0}@media not (forced-colors:active){.search .search-input{outline:none}}.search .search-input{background:transparent;font:var(--font-weight-regular) var(--_search-font-size)/var(--line-height-flat) var(--font-sans);color:var(--_search-text-color)}.search .search-input::placeholder{color:var(--_search-placeholder)}.search .search-clear{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:var(--space-0-5);border:0;background:transparent;border-radius:var(--radius-pill, 999px);color:var(--icon-default);cursor:pointer;opacity:1;transition:opacity var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.search .search-clear .icon{width:var(--icon-sm);height:var(--icon-sm)}.search .search-clear:hover{opacity:1;background:var(--surface-muted, rgba(0, 0, 0, .06))}.search .search-clear:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.search .search-clear{position:relative}.search .search-clear:before{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--hit-xs));height:max(100%,var(--hit-xs));translate:-50% -50%;border-radius:inherit}.search .search-clear:focus-visible{outline-style:none}.search .search-clear:focus-visible:before{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:calc(var(--focus-ring-offset) - 2 * var(--focus-ring-width));animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.search .kbd{font:var(--font-weight-medium) var(--font-size-2xs)/var(--line-height-flat) var(--font-mono);padding:var(--space-px) var(--space-1-5);background:var(--surface-default);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--ds-radius-inner);color:var(--text-tertiary)}.search.sm{--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-sm)))}.search.md{--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-md)))}.search.lg{--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-lg)))}:host(.in-group){width:auto;display:flex}:host(.in-group) .label,:host(.in-group) ds-field-message{display:none}:host(.in-group) .search{border:0;border-radius:0;background:transparent;flex:1;height:auto}:host(.in-group) .search:hover,:host(.in-group) .search:focus,:host(.in-group) .search:focus-visible,:host(.in-group) .search:focus-within{border:0;box-shadow:none}@media not (forced-colors:active){:host(.in-group) .search:hover,:host(.in-group) .search:focus,:host(.in-group) .search:focus-visible,:host(.in-group) .search:focus-within{outline:none}}\n"] }]
149
+ ], template: "<div\n class=\"search\"\n dsFieldClickFocus\n [class]=\"sizeResolved()\">\n @if (showIcon()) {\n <ds-icon\n name=\"search\"\n [size]=\"16\">\n </ds-icon>\n }\n\n <input\n #searchInput\n class=\"search-input\"\n [placeholder]=\"placeholderResolved()\"\n [attr.aria-label]=\"ariaLabel() || placeholderResolved() || null\"\n [ngModel]=\"text()\"\n [disabled]=\"isDisabled()\"\n (ngModelChange)=\"onText($event)\"\n (keydown.enter)=\"onSubmit()\"\n (blur)=\"markTouched()\" />\n\n @if (clearable() && text()) {\n <button\n type=\"button\"\n class=\"search-clear\"\n [attr.aria-label]=\"intl().search.clear\"\n [disabled]=\"isDisabled()\"\n (click)=\"clear()\">\n <ds-icon\n name=\"x\"\n [size]=\"14\">\n </ds-icon>\n </button>\n }\n\n @if (shortcut()) {\n <kbd class=\"kbd\">\n {{ shortcut() }}\n </kbd>\n }\n</div>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_field-border-color: var(--ds-field-border-color, var(--border-field));--_field-border-color-hover: var(--ds-field-border-color-hover, var(--border-field-hover));--_field-border-color-focus: var(--ds-field-border-color-focus, var(--accent));--_field-text-color: var(--ds-field-text-color, var(--text-primary));--_field-placeholder-color: var(--ds-field-placeholder-color, var(--text-tertiary));--_field-font-size: var(--ds-field-font-size, var(--font-size-s));--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-md)));--_search-bg-color: var(--ds-search-bg-color, var(--surface-default));--_search-border: var(--ds-search-border, var(--_field-border-color));--_search-radius: var(--ds-search-radius, var(--ds-radius-control));--_search-border-hover: var(--ds-search-border-hover, var(--_search-border));--_search-bg-color-focus: var(--ds-search-bg-color-focus, var(--surface-default));--_search-border-focus: var(--ds-search-border-focus, var(--_field-border-color-focus));--_search-focus-shadow: var(--ds-search-focus-shadow, var(--ds-field-focus-shadow));--_search-text-color: var(--ds-search-text-color, var(--_field-text-color));--_search-placeholder: var(--ds-search-placeholder, var(--_field-placeholder-color));--_search-max-width: var(--ds-search-max-width, none);--_search-font-size: var(--ds-search-font-size, var(--_field-font-size));display:block}.search{display:flex;align-items:center;gap:var(--space-2);background-color:var(--_search-bg-color);border:var(--border-width-default) solid var(--_search-border);border-radius:var(--_search-radius);padding:0 var(--space-3);height:var(--_search-height);width:100%;max-width:var(--_search-max-width);transition:border-color var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.search:hover{border-color:var(--_search-border-hover)}@media not (forced-colors:active){.search .search-input:where(:focus-visible){outline:none}}.search:focus-within{background-color:var(--_search-bg-color-focus);border-color:var(--_search-border-focus);box-shadow:var(--_search-focus-shadow)}.search:has(.search-input:disabled){background-color:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.search:has(.search-input:disabled) .search-input,.search:has(.search-input:disabled) .icon{color:var(--text-disabled)}.search .icon{width:var(--icon-md);height:var(--icon-md);color:var(--icon-default)}.search .search-input{flex:1;min-width:0;border:0}@media not (forced-colors:active){.search .search-input{outline:none}}.search .search-input{background:transparent;font:var(--font-weight-regular) var(--_search-font-size)/var(--line-height-flat) var(--font-sans);color:var(--_search-text-color)}.search .search-input::placeholder{color:var(--_search-placeholder)}.search .search-clear{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:var(--space-0-5);border:0;background:transparent;border-radius:var(--radius-pill, 999px);color:var(--icon-default);cursor:pointer;opacity:1;transition:opacity var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.search .search-clear .icon{width:var(--icon-sm);height:var(--icon-sm)}.search .search-clear:hover{opacity:1;background:var(--surface-muted, rgba(0, 0, 0, .06))}.search .search-clear:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.search .search-clear{position:relative}.search .search-clear:before{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--hit-xs));height:max(100%,var(--hit-xs));translate:-50% -50%;border-radius:inherit}.search .search-clear:focus-visible{outline-style:none}.search .search-clear:focus-visible:before{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:calc(var(--focus-ring-offset) - 2 * var(--focus-ring-width));animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.search .kbd{font:var(--font-weight-medium) var(--font-size-2xs)/var(--line-height-flat) var(--font-mono);padding:var(--space-px) var(--space-1-5);background:var(--surface-default);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--ds-radius-inner);color:var(--text-tertiary)}.search.sm{--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-sm)))}.search.md{--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-md)))}.search.lg{--_search-height: var(--ds-search-height, var(--ds-field-height, var(--field-h-lg)))}:host(.in-group){width:auto;display:flex}:host(.in-group) .label,:host(.in-group) ds-field-message{display:none}:host(.in-group) .search{border:0;border-radius:0;background:transparent;flex:1;height:auto}:host(.in-group) .search:hover,:host(.in-group) .search:focus,:host(.in-group) .search:focus-visible,:host(.in-group) .search:focus-within{border:0;box-shadow:none}@media not (forced-colors:active){:host(.in-group) .search:hover,:host(.in-group) .search:focus,:host(.in-group) .search:focus-visible,:host(.in-group) .search:focus-within{outline:none}}\n"] }]
150
150
  }], ctorParameters: () => [], propDecorators: { hidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "hidden", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], shortcut: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcut", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], submitted: [{ type: i0.Output, args: ["submitted"] }], debounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounce", required: false }] }], inputEl: [{ type: i0.ViewChild, args: ['searchInput', { isSignal: true }] }] } });
151
151
 
152
152
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-search.mjs","sources":["../../../src/lib/components/search/search.component.ts","../../../src/lib/components/search/search.component.html","../../../src/lib/components/search/ids-group-ltd-ids-design-system-components-search.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n effect,\n forwardRef,\n inject,\n input,\n model,\n numberAttribute,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n FormsModule,\n NG_VALUE_ACCESSOR,\n type ControlValueAccessor,\n} from '@angular/forms';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { valueControlBridge } from '@ids-group-ltd/ids-design-system/components';\nimport { FieldClickFocusDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { inFieldGroup } from '@ids-group-ltd/ids-design-system/components/field-group';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-search',\n standalone: true,\n imports: [FormsModule, IconComponent, FieldClickFocusDirective],\n host: {\n '[class.in-group]': 'inGroup',\n '[style.display]': 'hidden() ? \"none\" : null',\n },\n templateUrl: './search.component.html',\n styleUrl: './search.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SearchComponent),\n multi: true,\n },\n ],\n})\n/**\n * A toolbar filter with no message row; where a label or error line is needed, use `ds-input`.\n */\nexport class SearchComponent implements ControlValueAccessor {\n protected readonly intl = inject(DS_INTL);\n protected readonly inGroup = inFieldGroup();\n\n private readonly bridge = valueControlBridge<string>(() => this.value);\n\n /** Inline `display`, not the attribute: the host sets its own `display`, which beats the UA `[hidden]` rule. */\n readonly hidden = input(false, { transform: booleanAttribute });\n\n /** Driven by the forms API, OR'd into `isDisabled`. */\n protected readonly formDisabled = this.bridge.formDisabled;\n\n /** Search text, two-way bound. */\n readonly value = model<string>('');\n /** Placeholder when empty; falls back to `DS_INTL.search.placeholder`. */\n readonly placeholder = input<string | null>(null);\n readonly placeholderResolved = computed(\n () => this.placeholder() ?? this.intl().search.placeholder,\n );\n /** Keyboard shortcut hint rendered in a trailing `<kbd>` badge. */\n readonly shortcut = input<string>('');\n /** Shows the leading search icon. */\n readonly showIcon = input(true, { transform: booleanAttribute });\n /** Show an inline clear (×) button on the right when there's a value. */\n readonly clearable = input(false, { transform: booleanAttribute });\n /** Accessible name for the input (placeholder is not a reliable label). */\n readonly ariaLabel = input<string>('');\n /** Disables the input and the clear button. */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n readonly isDisabled = computed(() => this.disabled() || this.formDisabled());\n /** Control height; falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** Fires with the current value on Enter. */\n readonly submitted = output<string>();\n /** Milliseconds to hold each keystroke back before `value` updates; 0 (default) writes on every keystroke.\n * Clearing bypasses the delay and Enter flushes; the displayed text is never delayed. */\n readonly debounce = input(0, { transform: numberAttribute });\n\n private readonly inputEl =\n viewChild<ElementRef<HTMLInputElement>>('searchInput');\n\n /** What the input shows. Separate from `value` so typing never waits on the timer. */\n protected readonly text = signal(this.value());\n\n private pending: ReturnType<typeof setTimeout> | null = null;\n /** The last text pushed into `value`, to tell a host update from the component's own echo: a host reset mid-typing must win. */\n private pushed = this.value();\n\n constructor() {\n // focusBoundControl() calls focus() on the host; see DsControlValueAccessor.\n inject<ElementRef<HTMLElement>>(ElementRef).nativeElement.focus = (\n options?: FocusOptions,\n ) => this.focus(options);\n effect(() => {\n const incoming = this.value();\n if (incoming !== this.pushed) {\n this.cancel();\n this.pushed = incoming;\n this.text.set(incoming);\n }\n });\n }\n\n /** Moves focus to the search input. */\n focus(options?: FocusOptions): void {\n this.inputEl()?.nativeElement.focus(options);\n }\n\n /** Drops focus from the search input. */\n blur(): void {\n this.inputEl()?.nativeElement.blur();\n }\n\n protected onText(next: string): void {\n this.text.set(next);\n if (this.debounce() > 0 && next !== '') {\n this.cancel();\n this.pending = setTimeout(() => {\n this.pending = null;\n this.push(next);\n }, this.debounce());\n\n return;\n }\n this.cancel();\n this.push(next);\n }\n\n protected onSubmit(): void {\n this.flush();\n this.submitted.emit(this.value());\n }\n\n /** Empties the field, drops any armed keystroke and publishes '' immediately.\n * Writing `''` into `value` is not equivalent: the timer is cancelled only when the text differs from the last pushed value. */\n clear(): void {\n this.text.set('');\n this.cancel();\n this.push('');\n // The × is removed once empty, so focus would fall to <body>.\n this.inputEl()?.nativeElement.focus();\n }\n\n private flush(): void {\n if (this.pending) {\n this.cancel();\n this.push(this.text());\n }\n }\n\n private push(next: string): void {\n this.pushed = next;\n this.value.set(next);\n }\n\n writeValue(next: string): void {\n this.bridge.writeValue(next);\n }\n\n registerOnChange(fn: (next: string) => void): void {\n this.bridge.registerOnChange(fn);\n }\n\n registerOnTouched(fn: () => void): void {\n this.bridge.registerOnTouched(fn);\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.bridge.setDisabledState(isDisabled);\n }\n\n /** Reported to the forms API on blur, so a search inside a form goes `ng-touched`. */\n protected markTouched(): void {\n this.bridge.markTouched();\n }\n\n private cancel(): void {\n if (this.pending) {\n clearTimeout(this.pending);\n this.pending = null;\n }\n }\n}\n","<div\n class=\"search\"\n dsFieldClickFocus\n [class]=\"sizeResolved()\">\n @if (showIcon()) {\n <ds-icon\n name=\"search\"\n [size]=\"16\">\n </ds-icon>\n }\n\n <input\n #searchInput\n class=\"search-input\"\n [placeholder]=\"placeholderResolved()\"\n [attr.aria-label]=\"ariaLabel() || placeholderResolved() || null\"\n [ngModel]=\"text()\"\n [disabled]=\"isDisabled()\"\n (ngModelChange)=\"onText($event)\"\n (keydown.enter)=\"onSubmit()\"\n (blur)=\"markTouched()\" />\n\n @if (clearable() && text()) {\n <button\n type=\"button\"\n class=\"search-clear\"\n [attr.aria-label]=\"intl().search.clear\"\n [disabled]=\"isDisabled()\"\n (click)=\"clear()\">\n <ds-icon\n name=\"x\"\n [size]=\"14\">\n </ds-icon>\n </button>\n }\n\n @if (shortcut()) {\n <kbd class=\"kbd\">\n {{ shortcut() }}\n </kbd>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAgDA;;AAEG;MACU,eAAe,CAAA;AACP,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;IACtB,OAAO,GAAG,YAAY,EAAE;IAE1B,MAAM,GAAG,kBAAkB,CAAS,MAAM,IAAI,CAAC,KAAK,CAAC;;IAG7D,MAAM,GAAG,KAAK,CAAC,KAAK,8EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAG5C,IAAA,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,YAAY;;AAGjD,IAAA,KAAK,GAAG,KAAK,CAAS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MAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,qDAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,gBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,aAAa,qGAAE,wBAAwB,EAAA,QAAA,EAAA,qBAAA,EAAA,CAAA,EAAA,CAAA;;4FAmBnD,eAAe,EAAA,UAAA,EAAA,CAAA;kBAtB3B,SAAS;+BACE,WAAW,EAAA,UAAA,EACT,IAAI,EAAA,OAAA,EACP,CAAC,WAAW,EAAE,aAAa,EAAE,wBAAwB,CAAC,EAAA,IAAA,EACzD;AACJ,wBAAA,kBAAkB,EAAE,SAAS;AAC7B,wBAAA,iBAAiB,EAAE,0BAA0B;qBAC9C,EAAA,aAAA,EAGc,iBAAiB,CAAC,QAAQ,EAAA,SAAA,EAC9B;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,qBAAqB,CAAC;AAC9C,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,s6BAAA,EAAA,MAAA,EAAA,CAAA,8qLAAA,CAAA,EAAA;0nCAkDyC,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEhGzD;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-search.mjs","sources":["../../../src/lib/components/search/search.component.ts","../../../src/lib/components/search/search.component.html","../../../src/lib/components/search/ids-group-ltd-ids-design-system-components-search.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n effect,\n forwardRef,\n inject,\n input,\n model,\n numberAttribute,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n FormsModule,\n NG_VALUE_ACCESSOR,\n type ControlValueAccessor,\n} from '@angular/forms';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { valueControlBridge } from '@ids-group-ltd/ids-design-system/components';\nimport { FieldClickFocusDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { inFieldGroup } from '@ids-group-ltd/ids-design-system/components/field-group';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-search',\n standalone: true,\n imports: [FormsModule, IconComponent, FieldClickFocusDirective],\n host: {\n '[class.in-group]': 'inGroup',\n '[style.display]': 'hidden() ? \"none\" : null',\n },\n templateUrl: './search.component.html',\n styleUrl: './search.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SearchComponent),\n multi: true,\n },\n ],\n})\n/**\n * A toolbar filter with no message row; where a label or error line is needed, use `ds-input`.\n */\nexport class SearchComponent implements ControlValueAccessor {\n protected readonly intl = inject(DS_INTL);\n protected readonly inGroup = inFieldGroup();\n\n private readonly bridge = valueControlBridge<string>(() => this.value);\n\n /** Inline `display`, not the attribute: the host sets its own `display`, which beats the UA `[hidden]` rule. */\n readonly hidden = input(false, { transform: booleanAttribute });\n\n /** Driven by the forms API, OR'd into `isDisabled`. */\n protected readonly formDisabled = this.bridge.formDisabled;\n\n /** Search text, two-way bound. */\n readonly value = model<string>('');\n /** Placeholder when empty; falls back to `DS_INTL.search.placeholder`. */\n readonly placeholder = input<string | null>(null);\n readonly placeholderResolved = computed(\n () => this.placeholder() ?? this.intl().search.placeholder,\n );\n /** Keyboard shortcut hint rendered in a trailing `<kbd>` badge. */\n readonly shortcut = input<string>('');\n /** Shows the leading search icon. */\n readonly showIcon = input(true, { transform: booleanAttribute });\n /** Show an inline clear (×) button on the right when there's a value. */\n readonly clearable = input(false, { transform: booleanAttribute });\n /** Accessible name for the input (placeholder is not a reliable label). */\n readonly ariaLabel = input<string>('');\n /** Disables the input and the clear button. */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n readonly isDisabled = computed(() => this.disabled() || this.formDisabled());\n /** Control height; falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** Fires with the current value on Enter. */\n readonly submitted = output<string>();\n /** Milliseconds to hold each keystroke back before `value` updates; 0 (default) writes on every keystroke.\n * Clearing bypasses the delay and Enter flushes; the displayed text is never delayed. */\n readonly debounce = input(0, { transform: numberAttribute });\n\n private readonly inputEl =\n viewChild<ElementRef<HTMLInputElement>>('searchInput');\n\n /** What the input shows. Separate from `value` so typing never waits on the timer. */\n protected readonly text = signal(this.value());\n\n private pending: ReturnType<typeof setTimeout> | null = null;\n /** The last text pushed into `value`, to tell a host update from the component's own echo: a host reset mid-typing must win. */\n private pushed = this.value();\n\n constructor() {\n // focusBoundControl() calls focus() on the host; see DsControlValueAccessor.\n inject<ElementRef<HTMLElement>>(ElementRef).nativeElement.focus = (\n options?: FocusOptions,\n ) => this.focus(options);\n effect(() => {\n const incoming = this.value();\n if (incoming !== this.pushed) {\n this.cancel();\n this.pushed = incoming;\n this.text.set(incoming);\n }\n });\n }\n\n /** Moves focus to the search input. */\n focus(options?: FocusOptions): void {\n this.inputEl()?.nativeElement.focus(options);\n }\n\n /** Drops focus from the search input. */\n blur(): void {\n this.inputEl()?.nativeElement.blur();\n }\n\n protected onText(next: string): void {\n this.text.set(next);\n if (this.debounce() > 0 && next !== '') {\n this.cancel();\n this.pending = setTimeout(() => {\n this.pending = null;\n this.push(next);\n }, this.debounce());\n\n return;\n }\n this.cancel();\n this.push(next);\n }\n\n protected onSubmit(): void {\n this.flush();\n this.submitted.emit(this.value());\n }\n\n /** Empties the field, drops any armed keystroke and publishes '' immediately.\n * Writing `''` into `value` is not equivalent: the timer is cancelled only when the text differs from the last pushed value. */\n clear(): void {\n this.text.set('');\n this.cancel();\n this.push('');\n // The × is removed once empty, so focus would fall to <body>.\n this.inputEl()?.nativeElement.focus();\n }\n\n private flush(): void {\n if (this.pending) {\n this.cancel();\n this.push(this.text());\n }\n }\n\n private push(next: string): void {\n this.pushed = next;\n this.value.set(next);\n }\n\n writeValue(next: string): void {\n this.bridge.writeValue(next);\n }\n\n registerOnChange(fn: (next: string) => void): void {\n this.bridge.registerOnChange(fn);\n }\n\n registerOnTouched(fn: () => void): void {\n this.bridge.registerOnTouched(fn);\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.bridge.setDisabledState(isDisabled);\n }\n\n /** Reported to the forms API on blur, so a search inside a form goes `ng-touched`. */\n protected markTouched(): void {\n this.bridge.markTouched();\n }\n\n private cancel(): void {\n if (this.pending) {\n clearTimeout(this.pending);\n this.pending = null;\n }\n }\n}\n","<div\n class=\"search\"\n dsFieldClickFocus\n [class]=\"sizeResolved()\">\n @if (showIcon()) {\n <ds-icon\n name=\"search\"\n [size]=\"16\">\n </ds-icon>\n }\n\n <input\n #searchInput\n class=\"search-input\"\n [placeholder]=\"placeholderResolved()\"\n [attr.aria-label]=\"ariaLabel() || placeholderResolved() || null\"\n [ngModel]=\"text()\"\n [disabled]=\"isDisabled()\"\n (ngModelChange)=\"onText($event)\"\n (keydown.enter)=\"onSubmit()\"\n (blur)=\"markTouched()\" />\n\n @if (clearable() && text()) {\n <button\n type=\"button\"\n class=\"search-clear\"\n [attr.aria-label]=\"intl().search.clear\"\n [disabled]=\"isDisabled()\"\n (click)=\"clear()\">\n <ds-icon\n name=\"x\"\n [size]=\"14\">\n </ds-icon>\n </button>\n }\n\n @if (shortcut()) {\n <kbd class=\"kbd\">\n {{ shortcut() }}\n </kbd>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAgDA;;AAEG;MACU,eAAe,CAAA;AACP,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;IACtB,OAAO,GAAG,YAAY,EAAE;IAE1B,MAAM,GAAG,kBAAkB,CAAS,MAAM,IAAI,CAAC,KAAK,CAAC;;IAG7D,MAAM,GAAG,KAAK,CAAC,KAAK,8EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAG5C,IAAA,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,YAAY;;AAGjD,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,IAAA,WAAW,GAAG,KAAK,CAAgB,IAAI,kFAAC;IACxC,mBAAmB,GAAG,QAAQ,CACrC,MAAM,IAAI,CAAC,WAAW,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,WAAW,0FAC3D;;AAEQ,IAAA,QAAQ,GAAG,KAAK,CAAS,EAAE,+EAAC;;IAE5B,QAAQ,GAAG,KAAK,CAAC,IAAI,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAEvD,SAAS,GAAG,KAAK,CAAC,KAAK,iFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAEzD,IAAA,SAAS,GAAG,KAAK,CAAS,EAAE,gFAAC;;IAE7B,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAExD,IAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,YAAY,EAAE,iFAAC;;AAEnE,IAAA,IAAI,GAAG,KAAK,CAAgB,IAAI,2EAAC;IACjC,YAAY,GAAG,iBAAiB,CACvC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