@ids-group-ltd/ids-design-system 1.1.0 → 1.1.2

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 (119) hide show
  1. package/CHANGELOG.md +289 -0
  2. package/agent/INDEX.md +1 -1
  3. package/agent/feedback/ds-alert.md +3 -2
  4. package/agent/feedback/ds-chat-message.md +3 -3
  5. package/agent/feedback/ds-chat-step.md +1 -1
  6. package/agent/feedback/ds-chat-steps.md +1 -1
  7. package/agent/feedback/ds-chat-thread.md +2 -2
  8. package/agent/feedback/ds-empty-state.md +2 -1
  9. package/agent/feedback/ds-tree.md +4 -2
  10. package/agent/forms/ds-chat-input.md +3 -3
  11. package/agent/foundations/tokens.md +2 -2
  12. package/agent/navigation/ds-splitter.md +1 -1
  13. package/components.md +22 -18
  14. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +5 -3
  15. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
  16. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +2 -2
  17. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
  18. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +2 -2
  19. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
  20. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +2 -2
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +2 -2
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
  24. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +2 -2
  25. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
  26. package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs +184 -72
  27. package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs.map +1 -1
  28. package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +2 -2
  29. package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +2 -2
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
  32. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +2 -2
  33. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
  34. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +2 -2
  35. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
  36. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +14 -7
  37. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
  38. package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +2 -2
  39. package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -1
  40. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +2 -2
  41. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
  42. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +4 -4
  43. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
  44. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +2 -2
  45. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
  46. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +2 -2
  47. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
  48. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +2 -2
  49. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
  50. package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +23 -12
  51. package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -1
  52. package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +2 -2
  53. package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
  54. package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +2 -2
  55. package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
  56. package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +2 -2
  57. package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
  58. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +2 -2
  59. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
  60. package/fesm2022/ids-group-ltd-ids-design-system-components-splitter.mjs +116 -10
  61. package/fesm2022/ids-group-ltd-ids-design-system-components-splitter.mjs.map +1 -1
  62. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +2 -2
  63. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -1
  64. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +2 -2
  65. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
  66. package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs +2 -2
  67. package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs.map +1 -1
  68. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
  69. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  70. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +4 -2
  71. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
  72. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +2 -2
  73. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
  74. package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs +2 -2
  75. package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs.map +1 -1
  76. package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs +2 -2
  77. package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs.map +1 -1
  78. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +4 -19
  79. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
  80. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +84 -9
  81. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
  82. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +31 -4
  83. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  84. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +33 -0
  85. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  86. package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +4 -2
  87. package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -1
  88. package/fesm2022/ids-group-ltd-ids-design-system.mjs +1 -1
  89. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  90. package/migrations/0.11.2.json +1 -0
  91. package/migrations/1.0.1.json +4 -0
  92. package/migrations/1.0.2.json +9 -1
  93. package/migrations/1.1.0.json +25 -0
  94. package/migrations/1.1.1.json +190 -0
  95. package/migrations/1.1.2.json +135 -0
  96. package/migrations/README.md +9 -7
  97. package/package.json +4 -1
  98. package/schematics/check-overrides/surface.json +29 -3
  99. package/stylelint/index.mjs +17 -3
  100. package/stylelint/known-tokens.mjs +139 -0
  101. package/stylelint/report.mjs +185 -0
  102. package/stylelint/tokens.mjs +160 -0
  103. package/stylelint/use-tokens.mjs +397 -0
  104. package/styles/_check-box.scss +2 -2
  105. package/styles/_dropdown-overlay.scss +5 -2
  106. package/styles/_field-box.scss +2 -2
  107. package/styles/_tokens.scss +8 -0
  108. package/themes/README.md +1 -1
  109. package/themes/_semantic.scss +13 -0
  110. package/themes/dark/_theme.scss +15 -3
  111. package/types/ids-group-ltd-ids-design-system-components-alert.d.ts +3 -1
  112. package/types/ids-group-ltd-ids-design-system-components-chat.d.ts +58 -5
  113. package/types/ids-group-ltd-ids-design-system-components-empty-state.d.ts +7 -2
  114. package/types/ids-group-ltd-ids-design-system-components-splitter.d.ts +15 -1
  115. package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +2 -0
  116. package/types/ids-group-ltd-ids-design-system-components-tree.d.ts +57 -3
  117. package/types/ids-group-ltd-ids-design-system-components.d.ts +8 -4
  118. package/types/ids-group-ltd-ids-design-system-core.d.ts +40 -0
  119. package/types/ids-group-ltd-ids-design-system.d.ts +3 -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,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kB1C,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,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","/**\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,SAAS,2EAAC;;IAEhC,IAAI,GAAG,KAAK,CAAC,KAAK,4EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAEpD,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAExD,OAAO,GAAG,KAAK,CAAoC,EAAE,+EAC5D,SAAS,EAAE,WAAW,EAAA,CACtB;;AAEO,IAAA,SAAS,GAAG,KAAK,CAAgB,IAAI,gFAAC;IACtC,iBAAiB,GAAG,QAAQ,CACnC,MAAM,IAAI,CAAC,SAAS,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,KAAK,wFACrD;;IAEQ,SAAS,GAAG,MAAM,EAAU;AAEpB,IAAA,KAAK,GAAG,YAAY,CAA+B,KAAK,4EAAC;IAClE,WAAW,GAAG,KAAK;AAER,IAAA,GAAG,GAAG,aAAa,CAAC,cAAc,CAAC;AACnC,IAAA,MAAM,GAAG,QAAQ,CAAC,MACnC,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY,EAAE,GAAG,CAAA,EAAG,IAAI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AY,qBAAqB,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,EAAA,WAAA,EAAA,MAAA,EAAA,SAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,oBAAoB,EAAA,QAAA,EAAA,iBAAA,EAAA,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,
@@ -87,6 +87,13 @@ class PopoverComponent {
87
87
  this.ref = this.overlay.create(cfg);
88
88
  prepareOverlayEnter(this.ref, this.host.nativeElement, positionStrategy);
89
89
  forwardOverlayTokens(this.ref, this.host.nativeElement, this.panelTokens);
90
+ // The pane is portaled to body, out of reach of the screen's [data-density].
91
+ const density = this.host.nativeElement
92
+ .closest('[data-density]')
93
+ ?.getAttribute('data-density');
94
+ if (density) {
95
+ this.ref.overlayElement.setAttribute('data-density', density);
96
+ }
90
97
  closeOnOutsidePointer(this.ref, (target) => trigger.contains(target), () => this.close('dismiss'));
91
98
  // CDK's scroll strategies miss a plain overflow container, so close on any outside scroll ourselves.
92
99
  const removeScrollClose = closeOnScroll(this.ref, () => this.close('dismiss'));
@@ -105,6 +112,10 @@ class PopoverComponent {
105
112
  }
106
113
  });
107
114
  this.ref.attach(new TemplatePortal(this.panelTpl(), this.vcr));
115
+ const panel = this.ref.overlayElement.querySelector('.popover');
116
+ if (this.arrow() && panel) {
117
+ pointArrowAtHost(this.ref, panel, trigger);
118
+ }
108
119
  this.resolvedPlacement.set(placement);
109
120
  this.opened.set(true);
110
121
  // A menu is operated from inside (APG menu button), so it takes focus without a panelRole.
@@ -142,7 +153,7 @@ class PopoverComponent {
142
153
  provide: DsOverlayCloseRef,
143
154
  useExisting: forwardRef(() => PopoverComponent),
144
155
  },
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-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);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"] }] });
156
+ ], 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(--popover-pad));--_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
157
  }
147
158
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PopoverComponent, decorators: [{
148
159
  type: Component,
@@ -151,7 +162,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
151
162
  provide: DsOverlayCloseRef,
152
163
  useExisting: forwardRef(() => PopoverComponent),
153
164
  },
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-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);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"] }]
165
+ ], 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(--popover-pad));--_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
166
  }], 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
167
  function buildPositions(placement, align, offsetPx) {
157
168
  const crossStart = align === 'start' ? 'start' : 'end';
@@ -185,16 +196,16 @@ function buildPositions(placement, align, offsetPx) {
185
196
  return [
186
197
  {
187
198
  originX: 'start',
188
- originY: 'top',
199
+ originY: 'center',
189
200
  overlayX: 'end',
190
- overlayY: 'top',
201
+ overlayY: 'center',
191
202
  offsetX: -offsetPx,
192
203
  },
193
204
  {
194
205
  originX: 'end',
195
- originY: 'top',
206
+ originY: 'center',
196
207
  overlayX: 'start',
197
- overlayY: 'top',
208
+ overlayY: 'center',
198
209
  offsetX: offsetPx,
199
210
  },
200
211
  ];
@@ -202,16 +213,16 @@ function buildPositions(placement, align, offsetPx) {
202
213
  return [
203
214
  {
204
215
  originX: 'end',
205
- originY: 'top',
216
+ originY: 'center',
206
217
  overlayX: 'start',
207
- overlayY: 'top',
218
+ overlayY: 'center',
208
219
  offsetX: offsetPx,
209
220
  },
210
221
  {
211
222
  originX: 'start',
212
- originY: 'top',
223
+ originY: 'center',
213
224
  overlayX: 'end',
214
- overlayY: 'top',
225
+ overlayY: 'center',
215
226
  offsetX: -offsetPx,
216
227
  },
217
228
  ];
@@ -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,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;KAC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AA,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 // The pane is portaled to body, out of reach of the screen's [data-density].\n const density = this.host.nativeElement\n .closest('[data-density]')\n ?.getAttribute('data-density');\n if (density) {\n this.ref.overlayElement.setAttribute('data-density', density);\n }\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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AAA,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;;;;"}
@@ -84,11 +84,11 @@ class RadioComponent extends DsFieldBase {
84
84
  }
85
85
  }
86
86
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
87
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RadioComponent, isStandalone: true, selector: "ds-radio", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, deselectable: { classPropertyName: "deselectable", publicName: "deselectable", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputRef"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"effectiveDisabled()\">\n <input\n #inputRef\n type=\"radio\"\n class=\"radio\"\n [checked]=\"isChecked()\"\n [disabled]=\"effectiveDisabled()\"\n [attr.name]=\"effectiveName() || null\"\n [attr.value]=\"value() ?? null\"\n [attr.id]=\"controlId()\"\n [attr.tabindex]=\"tabIndexAttr\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onSelect()\"\n (click)=\"onClick()\" />\n\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\">\n @if (label()) {\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n }\n } @else {\n <ng-content></ng-content>\n }\n </label>\n </span>\n\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\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{--_radio-accent-color: var(--ds-radio-accent-color, var(--accent));--_radio-bg-color: var(--ds-radio-bg-color, var(--surface-default));--_radio-border-color: var(--ds-radio-border-color, var(--border-strong));--_radio-label-color: var(--ds-radio-label-color, var(--text-primary));--_radio-glyph: var(--check-size);--_radio-label-fs: var(--font-size-s);display:inline-flex}.radio-field{display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap)}.radio-field.size-sm{--_radio-glyph: var(--radio-glyph-sm);--_radio-label-fs: var(--font-size-xs)}.radio-field.size-lg{--_radio-glyph: var(--radio-glyph-lg);--_radio-label-fs: var(--font-size-m)}.control-line:has(: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)}@media not (forced-colors:active){.control-line .radio:where(:focus-visible){outline:none}}.control-line{border-radius:var(--focus-ring-radius)}.control-line:has(.control-text:empty){--focus-ring-offset: var(--space-1-5)}.control-line{display:inline-flex;align-items:center}.control-line .control-text{padding-inline-start:var(--space-2);padding-block:var(--space-1);margin-block:calc(var(--space-1) * -1);font:var(--font-weight-regular) var(--ds-radio-label-font-size, var(--_radio-label-fs))/var(--line-height-base) var(--font-sans);color:var(--_radio-label-color);cursor:pointer;-webkit-user-select:none;user-select:none}.control-line .control-text:empty{display:none}.control-line .control-text .req{color:var(--error);font-weight:var(--font-weight-semibold);margin-inline-start:var(--space-1)}.control-line.is-disabled .control-text{color:var(--text-disabled);cursor:not-allowed}.radio{appearance:none;width:var(--_radio-glyph);height:var(--_radio-glyph);border:var(--check-bw) solid var(--_radio-border-color);background:var(--_radio-bg-color);cursor:pointer;display:inline-grid;place-items:center;flex-shrink:0;margin:0;border-radius:var(--radius-pill);transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),border-width var(--duration-fast) var(--ease-standard)}.radio:hover:not(:disabled){border-color:var(--accent)}.radio:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.radio:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.radio:after{content:\"\";transform:scale(0);opacity:0;transform-origin:center;transition:transform var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.radio:checked{border-color:var(--_radio-accent-color);border-width:var(--radio-bw-checked)}.radio:checked:after{content:\"\";width:var(--radio-dot-size);height:var(--radio-dot-size);border-radius:var(--radius-pill);background:var(--_radio-accent-color);transform:scale(1);opacity:1}\n"], dependencies: [{ kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve", "changed"] }] });
87
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: RadioComponent, isStandalone: true, selector: "ds-radio", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, deselectable: { classPropertyName: "deselectable", publicName: "deselectable", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputRef"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"effectiveDisabled()\">\n <input\n #inputRef\n type=\"radio\"\n class=\"radio\"\n [checked]=\"isChecked()\"\n [disabled]=\"effectiveDisabled()\"\n [attr.name]=\"effectiveName() || null\"\n [attr.value]=\"value() ?? null\"\n [attr.id]=\"controlId()\"\n [attr.tabindex]=\"tabIndexAttr\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onSelect()\"\n (click)=\"onClick()\" />\n\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\">\n @if (label()) {\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n }\n } @else {\n <ng-content></ng-content>\n }\n </label>\n </span>\n\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\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{--_radio-accent-color: var(--ds-radio-accent-color, var(--accent));--_radio-bg-color: var(--ds-radio-bg-color, var(--surface-default));--_radio-border-color: var(--ds-radio-border-color, var(--border-field));--_radio-label-color: var(--ds-radio-label-color, var(--text-primary));--_radio-glyph: var(--check-size);--_radio-label-fs: var(--font-size-s);display:inline-flex}.radio-field{display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap)}.radio-field.size-sm{--_radio-glyph: var(--radio-glyph-sm);--_radio-label-fs: var(--font-size-xs)}.radio-field.size-lg{--_radio-glyph: var(--radio-glyph-lg);--_radio-label-fs: var(--font-size-m)}.control-line:has(: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)}@media not (forced-colors:active){.control-line .radio:where(:focus-visible){outline:none}}.control-line{border-radius:var(--focus-ring-radius)}.control-line:has(.control-text:empty){--focus-ring-offset: var(--space-1-5)}.control-line{display:inline-flex;align-items:center}.control-line .control-text{padding-inline-start:var(--space-2);padding-block:var(--space-1);margin-block:calc(var(--space-1) * -1);font:var(--font-weight-regular) var(--ds-radio-label-font-size, var(--_radio-label-fs))/var(--line-height-base) var(--font-sans);color:var(--_radio-label-color);cursor:pointer;-webkit-user-select:none;user-select:none}.control-line .control-text:empty{display:none}.control-line .control-text .req{color:var(--error);font-weight:var(--font-weight-semibold);margin-inline-start:var(--space-1)}.control-line.is-disabled .control-text{color:var(--text-disabled);cursor:not-allowed}.radio{appearance:none;width:var(--_radio-glyph);height:var(--_radio-glyph);border:var(--check-bw) solid var(--_radio-border-color);background:var(--_radio-bg-color);cursor:pointer;display:inline-grid;place-items:center;flex-shrink:0;margin:0;border-radius:var(--radius-pill);transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),border-width var(--duration-fast) var(--ease-standard)}.radio:hover:not(:disabled){border-color:var(--accent)}.radio:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.radio:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.radio:after{content:\"\";transform:scale(0);opacity:0;transform-origin:center;transition:transform var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.radio:checked{border-color:var(--_radio-accent-color);border-width:var(--radio-bw-checked)}.radio:checked:after{content:\"\";width:var(--radio-dot-size);height:var(--radio-dot-size);border-radius:var(--radius-pill);background:var(--_radio-accent-color);transform:scale(1);opacity:1}\n"], dependencies: [{ kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve", "changed"] }] });
88
88
  }
89
89
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: RadioComponent, decorators: [{
90
90
  type: Component,
91
- args: [{ selector: 'ds-radio', standalone: true, imports: [FieldMessageComponent], encapsulation: ViewEncapsulation.Emulated, template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"effectiveDisabled()\">\n <input\n #inputRef\n type=\"radio\"\n class=\"radio\"\n [checked]=\"isChecked()\"\n [disabled]=\"effectiveDisabled()\"\n [attr.name]=\"effectiveName() || null\"\n [attr.value]=\"value() ?? null\"\n [attr.id]=\"controlId()\"\n [attr.tabindex]=\"tabIndexAttr\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onSelect()\"\n (click)=\"onClick()\" />\n\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\">\n @if (label()) {\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n }\n } @else {\n <ng-content></ng-content>\n }\n </label>\n </span>\n\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\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{--_radio-accent-color: var(--ds-radio-accent-color, var(--accent));--_radio-bg-color: var(--ds-radio-bg-color, var(--surface-default));--_radio-border-color: var(--ds-radio-border-color, var(--border-strong));--_radio-label-color: var(--ds-radio-label-color, var(--text-primary));--_radio-glyph: var(--check-size);--_radio-label-fs: var(--font-size-s);display:inline-flex}.radio-field{display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap)}.radio-field.size-sm{--_radio-glyph: var(--radio-glyph-sm);--_radio-label-fs: var(--font-size-xs)}.radio-field.size-lg{--_radio-glyph: var(--radio-glyph-lg);--_radio-label-fs: var(--font-size-m)}.control-line:has(: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)}@media not (forced-colors:active){.control-line .radio:where(:focus-visible){outline:none}}.control-line{border-radius:var(--focus-ring-radius)}.control-line:has(.control-text:empty){--focus-ring-offset: var(--space-1-5)}.control-line{display:inline-flex;align-items:center}.control-line .control-text{padding-inline-start:var(--space-2);padding-block:var(--space-1);margin-block:calc(var(--space-1) * -1);font:var(--font-weight-regular) var(--ds-radio-label-font-size, var(--_radio-label-fs))/var(--line-height-base) var(--font-sans);color:var(--_radio-label-color);cursor:pointer;-webkit-user-select:none;user-select:none}.control-line .control-text:empty{display:none}.control-line .control-text .req{color:var(--error);font-weight:var(--font-weight-semibold);margin-inline-start:var(--space-1)}.control-line.is-disabled .control-text{color:var(--text-disabled);cursor:not-allowed}.radio{appearance:none;width:var(--_radio-glyph);height:var(--_radio-glyph);border:var(--check-bw) solid var(--_radio-border-color);background:var(--_radio-bg-color);cursor:pointer;display:inline-grid;place-items:center;flex-shrink:0;margin:0;border-radius:var(--radius-pill);transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),border-width var(--duration-fast) var(--ease-standard)}.radio:hover:not(:disabled){border-color:var(--accent)}.radio:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.radio:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.radio:after{content:\"\";transform:scale(0);opacity:0;transform-origin:center;transition:transform var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.radio:checked{border-color:var(--_radio-accent-color);border-width:var(--radio-bw-checked)}.radio:checked:after{content:\"\";width:var(--radio-dot-size);height:var(--radio-dot-size);border-radius:var(--radius-pill);background:var(--_radio-accent-color);transform:scale(1);opacity:1}\n"] }]
91
+ args: [{ selector: 'ds-radio', standalone: true, imports: [FieldMessageComponent], encapsulation: ViewEncapsulation.Emulated, template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"effectiveDisabled()\">\n <input\n #inputRef\n type=\"radio\"\n class=\"radio\"\n [checked]=\"isChecked()\"\n [disabled]=\"effectiveDisabled()\"\n [attr.name]=\"effectiveName() || null\"\n [attr.value]=\"value() ?? null\"\n [attr.id]=\"controlId()\"\n [attr.tabindex]=\"tabIndexAttr\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onSelect()\"\n (click)=\"onClick()\" />\n\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\">\n @if (label()) {\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n }\n } @else {\n <ng-content></ng-content>\n }\n </label>\n </span>\n\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\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{--_radio-accent-color: var(--ds-radio-accent-color, var(--accent));--_radio-bg-color: var(--ds-radio-bg-color, var(--surface-default));--_radio-border-color: var(--ds-radio-border-color, var(--border-field));--_radio-label-color: var(--ds-radio-label-color, var(--text-primary));--_radio-glyph: var(--check-size);--_radio-label-fs: var(--font-size-s);display:inline-flex}.radio-field{display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap)}.radio-field.size-sm{--_radio-glyph: var(--radio-glyph-sm);--_radio-label-fs: var(--font-size-xs)}.radio-field.size-lg{--_radio-glyph: var(--radio-glyph-lg);--_radio-label-fs: var(--font-size-m)}.control-line:has(: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)}@media not (forced-colors:active){.control-line .radio:where(:focus-visible){outline:none}}.control-line{border-radius:var(--focus-ring-radius)}.control-line:has(.control-text:empty){--focus-ring-offset: var(--space-1-5)}.control-line{display:inline-flex;align-items:center}.control-line .control-text{padding-inline-start:var(--space-2);padding-block:var(--space-1);margin-block:calc(var(--space-1) * -1);font:var(--font-weight-regular) var(--ds-radio-label-font-size, var(--_radio-label-fs))/var(--line-height-base) var(--font-sans);color:var(--_radio-label-color);cursor:pointer;-webkit-user-select:none;user-select:none}.control-line .control-text:empty{display:none}.control-line .control-text .req{color:var(--error);font-weight:var(--font-weight-semibold);margin-inline-start:var(--space-1)}.control-line.is-disabled .control-text{color:var(--text-disabled);cursor:not-allowed}.radio{appearance:none;width:var(--_radio-glyph);height:var(--_radio-glyph);border:var(--check-bw) solid var(--_radio-border-color);background:var(--_radio-bg-color);cursor:pointer;display:inline-grid;place-items:center;flex-shrink:0;margin:0;border-radius:var(--radius-pill);transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),border-width var(--duration-fast) var(--ease-standard)}.radio:hover:not(:disabled){border-color:var(--accent)}.radio:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.radio:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.radio:after{content:\"\";transform:scale(0);opacity:0;transform-origin:center;transition:transform var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.radio:checked{border-color:var(--_radio-accent-color);border-width:var(--radio-bw-checked)}.radio:checked:after{content:\"\";width:var(--radio-dot-size);height:var(--radio-dot-size);border-radius:var(--radius-pill);background:var(--_radio-accent-color);transform:scale(1);opacity:1}\n"] }]
92
92
  }], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], deselectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "deselectable", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], inputElement: [{ type: i0.ViewChild, args: ['inputRef', { isSignal: true }] }] } });
93
93
 
94
94
  class RadioGroupComponent extends DsControlValueAccessor {
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-radio-group.mjs","sources":["../../../src/lib/components/radio-group/radio-group.token.ts","../../../src/lib/components/radio-group/radio/radio.component.ts","../../../src/lib/components/radio-group/radio/radio.component.html","../../../src/lib/components/radio-group/radio-group.component.ts","../../../src/lib/components/radio-group/radio-group.component.html","../../../src/lib/components/radio-group/ids-group-ltd-ids-design-system-components-radio-group.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n/** Contract ds-radio reads from its parent ds-radio-group; a token avoids the circular import. */\nexport interface RadioGroupContract {\n readonly value: () => unknown;\n readonly groupName: () => string;\n readonly isDisabled: () => boolean;\n isTabbable(radio: RadioGroupChild): boolean;\n select(value: unknown): void;\n}\n\nexport interface RadioGroupChild {\n readonly value: () => unknown;\n readonly effectiveDisabled: () => boolean;\n focus(): void;\n}\n\nexport const RADIO_GROUP = new InjectionToken<RadioGroupContract>(\n 'RADIO_GROUP',\n);\n","import {\n Component,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n viewChild,\n} from '@angular/core';\nimport { DsFieldBase } from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport { RADIO_GROUP } from '../../radio-group/radio-group.token';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport { resolveFieldMessage } from '@ids-group-ltd/ids-design-system/components';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-radio',\n standalone: true,\n imports: [FieldMessageComponent],\n templateUrl: './radio.component.html',\n styleUrl: './radio.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class RadioComponent extends DsFieldBase {\n /** The only way to drive a lone radio: it is not a `ControlValueAccessor`, so `[formControl]`\n * and `ngModel` do not bind to it (inside `ds-radio-group` the group is the form control).\n * Not read inside a group. */\n readonly checked = model<boolean>(false);\n /** Lets a checked standalone radio be cleared by clicking it again. Ignored inside\n * `ds-radio-group`, which cannot see that gesture. */\n readonly deselectable = input(false, { transform: booleanAttribute });\n /** A disabled parent `ds-radio-group` also disables it, whatever this is set to. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Native `name`; the group's name overrides it inside `ds-radio-group`. */\n readonly name = input<string>('');\n /** Value compared against the group's selection when inside `ds-radio-group`. */\n readonly value = input<unknown>('');\n /** Overrides the generated id of the input and its label's `for`. */\n readonly inputId = input<string | null>(null);\n /** Unset 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 /** Shows an asterisk on the label and sets `aria-required`. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Label beside the dot, wired via for/id. Omit to bring your own <label>. */\n readonly label = input<string>('');\n /** Accessible name for a control with no visible label; overrides `label` when both are set. */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly uid = nextControlId('ds-radio');\n protected readonly controlId = computed(() => this.inputId() ?? this.uid);\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n disabled: () => this.effectiveDisabled(),\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: this.invalid,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly resolvedAriaLabel = computed(() =>\n this.label() ? null : this.ariaLabel() || null,\n );\n protected readonly invalidResolved = this.fieldMessage.invalid;\n\n protected readonly group = inject(RADIO_GROUP, { optional: true });\n\n readonly effectiveDisabled = computed(\n () => this.group?.isDisabled() || this.disabled(),\n );\n protected readonly effectiveName = computed(\n () => this.group?.groupName() ?? this.name(),\n );\n protected readonly isChecked = computed(() =>\n this.group ? this.group.value() === this.value() : this.checked(),\n );\n\n protected readonly fieldClass = computed(\n () => `radio-field size-${this.sizeResolved()}`,\n );\n\n readonly inputElement = viewChild<ElementRef<HTMLInputElement>>('inputRef');\n\n protected get tabIndexAttr(): 0 | -1 {\n if (!this.group) {\n return 0;\n }\n\n return this.group.isTabbable(this) ? 0 : -1;\n }\n\n focus(): void {\n this.inputElement()?.nativeElement.focus();\n }\n\n // A radio fires no `change` when an already-checked one is clicked, so the clear cannot ride on\n // onSelect. Click runs before change, and on an unchecked radio isChecked() is still false here.\n protected onClick(): void {\n if (this.effectiveDisabled() || this.group || !this.deselectable()) {\n return;\n }\n if (this.isChecked()) {\n this.checked.set(false);\n }\n }\n\n protected onSelect(): void {\n if (this.effectiveDisabled()) {\n return;\n }\n if (this.group) {\n this.group.select(this.value());\n } else {\n this.checked.set(true);\n }\n }\n}\n","<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"effectiveDisabled()\">\n <input\n #inputRef\n type=\"radio\"\n class=\"radio\"\n [checked]=\"isChecked()\"\n [disabled]=\"effectiveDisabled()\"\n [attr.name]=\"effectiveName() || null\"\n [attr.value]=\"value() ?? null\"\n [attr.id]=\"controlId()\"\n [attr.tabindex]=\"tabIndexAttr\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onSelect()\"\n (click)=\"onClick()\" />\n\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\">\n @if (label()) {\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n }\n } @else {\n <ng-content></ng-content>\n }\n </label>\n </span>\n\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n</div>\n","import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChildren,\n forwardRef,\n input,\n model,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\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 { resolveFieldMessage } from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport { RadioComponent } from './radio/radio.component';\nimport {\n RADIO_GROUP,\n type RadioGroupChild,\n type RadioGroupContract,\n} from './radio-group.token';\nimport { isTextEntryTarget } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-radio-group',\n standalone: true,\n imports: [FieldMessageComponent, FieldStatusComponent],\n templateUrl: './radio-group.component.html',\n styleUrl: './radio-group.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n role: 'radiogroup',\n '[attr.aria-label]': 'ariaLabel() || label() || null',\n '[attr.aria-describedby]': 'hintId()',\n '[attr.aria-invalid]': \"invalidResolved() ? 'true' : null\",\n '[attr.data-field-state]': 'controlState()',\n '(keydown)': 'onKeydown($event)',\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RadioGroupComponent),\n multi: true,\n },\n {\n provide: RADIO_GROUP,\n useExisting: forwardRef(() => RadioGroupComponent),\n },\n ],\n})\nexport class RadioGroupComponent\n extends DsControlValueAccessor<unknown>\n implements RadioGroupContract\n{\n /** Value of the selected radio. */\n readonly value = model<unknown>(null);\n /** Native `name` shared by every radio. */\n readonly name = input<string | null>(null);\n /** Disables the whole group. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Accessible name when there is no visible `label`. */\n readonly ariaLabel = input<string | null>(null);\n /** Visible group label; omit to supply your own. */\n readonly label = input<string>('');\n\n readonly isDisabled = computed(() => this.disabled() || this.formDisabled());\n\n protected readonly uid = nextControlId('ds-radio-group');\n readonly groupName = computed(() => this.name() ?? this.uid);\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 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 invalidResolved = this.fieldMessage.invalid;\n protected readonly controlState = this.fieldMessage.controlState;\n\n private readonly radios = contentChildren(RadioComponent);\n\n private get enabledRadios(): RadioGroupChild[] {\n return (this.radios() as unknown as RadioGroupChild[]).filter(\n (radio) => !radio.effectiveDisabled(),\n );\n }\n\n isTabbable(radio: RadioGroupChild): boolean {\n const currentValue = this.value();\n const allRadios = this.radios() as unknown as RadioGroupChild[];\n\n if (currentValue !== null && currentValue !== undefined) {\n const matchIndex = allRadios.findIndex((r) => r.value() === currentValue);\n if (matchIndex !== -1) {\n return allRadios[matchIndex] === radio;\n }\n }\n\n const firstEnabled = allRadios.find((r) => !r.effectiveDisabled());\n\n return firstEnabled === radio;\n }\n\n select(value: unknown): void {\n this.value.set(value);\n this.markTouched();\n\n const selected = (this.radios() as unknown as RadioGroupChild[]).find(\n (radio) => radio.value() === value,\n );\n selected?.focus();\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const key = event.key;\n // Enter is deliberately absent: swallowing it would remove the form's keyboard submit.\n if (\n !['ArrowDown', 'ArrowRight', 'ArrowUp', 'ArrowLeft', ' '].includes(key)\n ) {\n return;\n }\n // A text field beside the radios (an \"Other\" row) types its own keys.\n if (isTextEntryTarget(event)) {\n return;\n }\n\n const enabled = this.enabledRadios;\n if (!enabled.length) {\n return;\n }\n\n event.preventDefault();\n\n if (key === ' ') {\n const allRadios = this.radios() as unknown as RadioGroupChild[];\n const focused = allRadios.find((radio) => {\n const component = radio as unknown as RadioComponent;\n\n return (\n component.inputElement()?.nativeElement === document.activeElement\n );\n });\n if (focused) {\n this.select(focused.value());\n }\n\n return;\n }\n\n const forward = key === 'ArrowDown' || key === 'ArrowRight';\n const currentValue = this.value();\n\n let currentIndex = enabled.findIndex((radio) => {\n const component = radio as unknown as RadioComponent;\n\n return component.inputElement()?.nativeElement === document.activeElement;\n });\n\n if (currentIndex === -1) {\n currentIndex = enabled.findIndex(\n (radio) => radio.value() === currentValue,\n );\n }\n\n let nextIndex: number;\n if (currentIndex === -1) {\n nextIndex = forward ? 0 : enabled.length - 1;\n } else {\n nextIndex = forward\n ? (currentIndex + 1) % enabled.length\n : (currentIndex - 1 + enabled.length) % enabled.length;\n }\n\n const target = enabled[nextIndex];\n this.select(target.value());\n }\n}\n","@if (label()) {\n <span class=\"label\">\n {{ label() }}\n <ds-field-status\n [pending]=\"pendingShown()\"\n [changed]=\"changedShown()\" />\n </span>\n}\n\n<div class=\"radios\">\n <ng-content />\n</div>\n\n@if (!label()) {\n <ds-field-status\n [pending]=\"pendingShown()\"\n [changed]=\"changedShown()\" />\n}\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":";;;;;;;MAiBa,WAAW,GAAG,IAAI,cAAc,CAC3C,aAAa;;ACST,MAAO,cAAe,SAAQ,WAAW,CAAA;AAC7C;;AAE+B;AACtB,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,8EAAC;AACxC;AACuD;IAC9C,YAAY,GAAG,KAAK,CAAC,KAAK,o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AA,IAAI,EAAE,YAAY;AAClB,wBAAA,mBAAmB,EAAE,gCAAgC;AACrD,wBAAA,yBAAyB,EAAE,UAAU;AACrC,wBAAA,qBAAqB,EAAE,mCAAmC;AAC1D,wBAAA,yBAAyB,EAAE,gBAAgB;AAC3C,wBAAA,WAAW,EAAE,mBAAmB;qBACjC,EAAA,SAAA,EACU;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,yBAAyB,CAAC;AAClD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACD,wBAAA;AACE,4BAAA,OAAO,EAAE,WAAW;AACpB,4BAAA,WAAW,EAAE,UAAU,CAAC,yBAAyB,CAAC;AACnD,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,2iBAAA,EAAA,MAAA,EAAA,CAAA,qiDAAA,CAAA,EAAA;wlBA2CyC,cAAc,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE9F1D;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-radio-group.mjs","sources":["../../../src/lib/components/radio-group/radio-group.token.ts","../../../src/lib/components/radio-group/radio/radio.component.ts","../../../src/lib/components/radio-group/radio/radio.component.html","../../../src/lib/components/radio-group/radio-group.component.ts","../../../src/lib/components/radio-group/radio-group.component.html","../../../src/lib/components/radio-group/ids-group-ltd-ids-design-system-components-radio-group.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n/** Contract ds-radio reads from its parent ds-radio-group; a token avoids the circular import. */\nexport interface RadioGroupContract {\n readonly value: () => unknown;\n readonly groupName: () => string;\n readonly isDisabled: () => boolean;\n isTabbable(radio: RadioGroupChild): boolean;\n select(value: unknown): void;\n}\n\nexport interface RadioGroupChild {\n readonly value: () => unknown;\n readonly effectiveDisabled: () => boolean;\n focus(): void;\n}\n\nexport const RADIO_GROUP = new InjectionToken<RadioGroupContract>(\n 'RADIO_GROUP',\n);\n","import {\n Component,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n viewChild,\n} from '@angular/core';\nimport { DsFieldBase } from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport { RADIO_GROUP } from '../../radio-group/radio-group.token';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport { resolveFieldMessage } from '@ids-group-ltd/ids-design-system/components';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-radio',\n standalone: true,\n imports: [FieldMessageComponent],\n templateUrl: './radio.component.html',\n styleUrl: './radio.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class RadioComponent extends DsFieldBase {\n /** The only way to drive a lone radio: it is not a `ControlValueAccessor`, so `[formControl]`\n * and `ngModel` do not bind to it (inside `ds-radio-group` the group is the form control).\n * Not read inside a group. */\n readonly checked = model<boolean>(false);\n /** Lets a checked standalone radio be cleared by clicking it again. Ignored inside\n * `ds-radio-group`, which cannot see that gesture. */\n readonly deselectable = input(false, { transform: booleanAttribute });\n /** A disabled parent `ds-radio-group` also disables it, whatever this is set to. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Native `name`; the group's name overrides it inside `ds-radio-group`. */\n readonly name = input<string>('');\n /** Value compared against the group's selection when inside `ds-radio-group`. */\n readonly value = input<unknown>('');\n /** Overrides the generated id of the input and its label's `for`. */\n readonly inputId = input<string | null>(null);\n /** Unset 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 /** Shows an asterisk on the label and sets `aria-required`. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Label beside the dot, wired via for/id. Omit to bring your own <label>. */\n readonly label = input<string>('');\n /** Accessible name for a control with no visible label; overrides `label` when both are set. */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly uid = nextControlId('ds-radio');\n protected readonly controlId = computed(() => this.inputId() ?? this.uid);\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n disabled: () => this.effectiveDisabled(),\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: this.invalid,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly resolvedAriaLabel = computed(() =>\n this.label() ? null : this.ariaLabel() || null,\n );\n protected readonly invalidResolved = this.fieldMessage.invalid;\n\n protected readonly group = inject(RADIO_GROUP, { optional: true });\n\n readonly effectiveDisabled = computed(\n () => this.group?.isDisabled() || this.disabled(),\n );\n protected readonly effectiveName = computed(\n () => this.group?.groupName() ?? this.name(),\n );\n protected readonly isChecked = computed(() =>\n this.group ? this.group.value() === this.value() : this.checked(),\n );\n\n protected readonly fieldClass = computed(\n () => `radio-field size-${this.sizeResolved()}`,\n );\n\n readonly inputElement = viewChild<ElementRef<HTMLInputElement>>('inputRef');\n\n protected get tabIndexAttr(): 0 | -1 {\n if (!this.group) {\n return 0;\n }\n\n return this.group.isTabbable(this) ? 0 : -1;\n }\n\n focus(): void {\n this.inputElement()?.nativeElement.focus();\n }\n\n // A radio fires no `change` when an already-checked one is clicked, so the clear cannot ride on\n // onSelect. Click runs before change, and on an unchecked radio isChecked() is still false here.\n protected onClick(): void {\n if (this.effectiveDisabled() || this.group || !this.deselectable()) {\n return;\n }\n if (this.isChecked()) {\n this.checked.set(false);\n }\n }\n\n protected onSelect(): void {\n if (this.effectiveDisabled()) {\n return;\n }\n if (this.group) {\n this.group.select(this.value());\n } else {\n this.checked.set(true);\n }\n }\n}\n","<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"effectiveDisabled()\">\n <input\n #inputRef\n type=\"radio\"\n class=\"radio\"\n [checked]=\"isChecked()\"\n [disabled]=\"effectiveDisabled()\"\n [attr.name]=\"effectiveName() || null\"\n [attr.value]=\"value() ?? null\"\n [attr.id]=\"controlId()\"\n [attr.tabindex]=\"tabIndexAttr\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onSelect()\"\n (click)=\"onClick()\" />\n\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\">\n @if (label()) {\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n }\n } @else {\n <ng-content></ng-content>\n }\n </label>\n </span>\n\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n</div>\n","import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChildren,\n forwardRef,\n input,\n model,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\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 { resolveFieldMessage } from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport { RadioComponent } from './radio/radio.component';\nimport {\n RADIO_GROUP,\n type RadioGroupChild,\n type RadioGroupContract,\n} from './radio-group.token';\nimport { isTextEntryTarget } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-radio-group',\n standalone: true,\n imports: [FieldMessageComponent, FieldStatusComponent],\n templateUrl: './radio-group.component.html',\n styleUrl: './radio-group.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n role: 'radiogroup',\n '[attr.aria-label]': 'ariaLabel() || label() || null',\n '[attr.aria-describedby]': 'hintId()',\n '[attr.aria-invalid]': \"invalidResolved() ? 'true' : null\",\n '[attr.data-field-state]': 'controlState()',\n '(keydown)': 'onKeydown($event)',\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RadioGroupComponent),\n multi: true,\n },\n {\n provide: RADIO_GROUP,\n useExisting: forwardRef(() => RadioGroupComponent),\n },\n ],\n})\nexport class RadioGroupComponent\n extends DsControlValueAccessor<unknown>\n implements RadioGroupContract\n{\n /** Value of the selected radio. */\n readonly value = model<unknown>(null);\n /** Native `name` shared by every radio. */\n readonly name = input<string | null>(null);\n /** Disables the whole group. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Accessible name when there is no visible `label`. */\n readonly ariaLabel = input<string | null>(null);\n /** Visible group label; omit to supply your own. */\n readonly label = input<string>('');\n\n readonly isDisabled = computed(() => this.disabled() || this.formDisabled());\n\n protected readonly uid = nextControlId('ds-radio-group');\n readonly groupName = computed(() => this.name() ?? this.uid);\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 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 invalidResolved = this.fieldMessage.invalid;\n protected readonly controlState = this.fieldMessage.controlState;\n\n private readonly radios = contentChildren(RadioComponent);\n\n private get enabledRadios(): RadioGroupChild[] {\n return (this.radios() as unknown as RadioGroupChild[]).filter(\n (radio) => !radio.effectiveDisabled(),\n );\n }\n\n isTabbable(radio: RadioGroupChild): boolean {\n const currentValue = this.value();\n const allRadios = this.radios() as unknown as RadioGroupChild[];\n\n if (currentValue !== null && currentValue !== undefined) {\n const matchIndex = allRadios.findIndex((r) => r.value() === currentValue);\n if (matchIndex !== -1) {\n return allRadios[matchIndex] === radio;\n }\n }\n\n const firstEnabled = allRadios.find((r) => !r.effectiveDisabled());\n\n return firstEnabled === radio;\n }\n\n select(value: unknown): void {\n this.value.set(value);\n this.markTouched();\n\n const selected = (this.radios() as unknown as RadioGroupChild[]).find(\n (radio) => radio.value() === value,\n );\n selected?.focus();\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const key = event.key;\n // Enter is deliberately absent: swallowing it would remove the form's keyboard submit.\n if (\n !['ArrowDown', 'ArrowRight', 'ArrowUp', 'ArrowLeft', ' '].includes(key)\n ) {\n return;\n }\n // A text field beside the radios (an \"Other\" row) types its own keys.\n if (isTextEntryTarget(event)) {\n return;\n }\n\n const enabled = this.enabledRadios;\n if (!enabled.length) {\n return;\n }\n\n event.preventDefault();\n\n if (key === ' ') {\n const allRadios = this.radios() as unknown as RadioGroupChild[];\n const focused = allRadios.find((radio) => {\n const component = radio as unknown as RadioComponent;\n\n return (\n component.inputElement()?.nativeElement === document.activeElement\n );\n });\n if (focused) {\n this.select(focused.value());\n }\n\n return;\n }\n\n const forward = key === 'ArrowDown' || key === 'ArrowRight';\n const currentValue = this.value();\n\n let currentIndex = enabled.findIndex((radio) => {\n const component = radio as unknown as RadioComponent;\n\n return component.inputElement()?.nativeElement === document.activeElement;\n });\n\n if (currentIndex === -1) {\n currentIndex = enabled.findIndex(\n (radio) => radio.value() === currentValue,\n );\n }\n\n let nextIndex: number;\n if (currentIndex === -1) {\n nextIndex = forward ? 0 : enabled.length - 1;\n } else {\n nextIndex = forward\n ? (currentIndex + 1) % enabled.length\n : (currentIndex - 1 + enabled.length) % enabled.length;\n }\n\n const target = enabled[nextIndex];\n this.select(target.value());\n }\n}\n","@if (label()) {\n <span class=\"label\">\n {{ label() }}\n <ds-field-status\n [pending]=\"pendingShown()\"\n [changed]=\"changedShown()\" />\n </span>\n}\n\n<div class=\"radios\">\n <ng-content />\n</div>\n\n@if (!label()) {\n <ds-field-status\n [pending]=\"pendingShown()\"\n [changed]=\"changedShown()\" />\n}\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":";;;;;;;MAiBa,WAAW,GAAG,IAAI,cAAc,CAC3C,aAAa;;ACST,MAAO,cAAe,SAAQ,WAAW,CAAA;AAC7C;;AAE+B;AACtB,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,8EAAC;AACxC;AACuD;IAC9C,YAAY,GAAG,KAAK,CAAC,KAAK,oFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAE5D,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAExD,IAAA,IAAI,GAAG,KAAK,CAAS,EAAE,2EAAC;;AAExB,IAAA,KAAK,GAAG,KAAK,CAAU,EAAE,4EAAC;;AAE1B,IAAA,OAAO,GAAG,KAAK,CAAgB,IAAI,8EAAC;;AAEpC,IAAA,IAAI,GAAG,KAAK,CAAgB,IAAI,2EAAC;IACjC,YAAY,GAAG,iBAAiB,CACvC,IAAI,CAAC,IAAI,EACT,CAAC,MAAM,KAAK,MAAM,CAAC,OAAO,EAAE,IAAI,EAChC,IAAc,CACf;;IAEQ,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAExD,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,IAAA,SAAS,GAAG,KAAK,CAAgB,IAAI,gFAAC;AAE5B,IAAA,GAAG,GAAG,aAAa,CAAC,UAAU,CAAC;AAC/B,IAAA,SAAS,GAAG,QAAQ,CAAC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