@forgeroute/ui 0.5.25 → 0.5.27

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 (77) hide show
  1. package/fesm2022/forgeroute-ui-card-list-item.mjs +30 -8
  2. package/fesm2022/forgeroute-ui-card-list-item.mjs.map +1 -1
  3. package/fesm2022/forgeroute-ui-checkbox.mjs +2 -2
  4. package/fesm2022/forgeroute-ui-checkbox.mjs.map +1 -1
  5. package/fesm2022/forgeroute-ui-color-input.mjs +40 -6
  6. package/fesm2022/forgeroute-ui-color-input.mjs.map +1 -1
  7. package/fesm2022/forgeroute-ui-combobox.mjs +2 -2
  8. package/fesm2022/forgeroute-ui-combobox.mjs.map +1 -1
  9. package/fesm2022/forgeroute-ui-contact-picker.mjs +4 -4
  10. package/fesm2022/forgeroute-ui-contact-picker.mjs.map +1 -1
  11. package/fesm2022/forgeroute-ui-conversations.mjs +2 -0
  12. package/fesm2022/forgeroute-ui-conversations.mjs.map +1 -1
  13. package/fesm2022/forgeroute-ui-data-table-core.mjs +2 -2
  14. package/fesm2022/forgeroute-ui-data-table-core.mjs.map +1 -1
  15. package/fesm2022/forgeroute-ui-date-input.mjs +2 -2
  16. package/fesm2022/forgeroute-ui-date-input.mjs.map +1 -1
  17. package/fesm2022/forgeroute-ui-datetime-input.mjs +2 -2
  18. package/fesm2022/forgeroute-ui-datetime-input.mjs.map +1 -1
  19. package/fesm2022/forgeroute-ui-detail-card.mjs +20 -4
  20. package/fesm2022/forgeroute-ui-detail-card.mjs.map +1 -1
  21. package/fesm2022/forgeroute-ui-dropdown.mjs +16 -2
  22. package/fesm2022/forgeroute-ui-dropdown.mjs.map +1 -1
  23. package/fesm2022/forgeroute-ui-file-input.mjs +7 -5
  24. package/fesm2022/forgeroute-ui-file-input.mjs.map +1 -1
  25. package/fesm2022/forgeroute-ui-icon-picker.mjs +2 -2
  26. package/fesm2022/forgeroute-ui-icon-picker.mjs.map +1 -1
  27. package/fesm2022/forgeroute-ui-media.mjs +67 -2
  28. package/fesm2022/forgeroute-ui-media.mjs.map +1 -1
  29. package/fesm2022/forgeroute-ui-messaging.mjs +3 -0
  30. package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
  31. package/fesm2022/forgeroute-ui-multi-select.mjs +2 -2
  32. package/fesm2022/forgeroute-ui-multi-select.mjs.map +1 -1
  33. package/fesm2022/forgeroute-ui-notes.mjs +1 -0
  34. package/fesm2022/forgeroute-ui-notes.mjs.map +1 -1
  35. package/fesm2022/forgeroute-ui-option-card.mjs +1 -0
  36. package/fesm2022/forgeroute-ui-option-card.mjs.map +1 -1
  37. package/fesm2022/forgeroute-ui-payments.mjs +3 -0
  38. package/fesm2022/forgeroute-ui-payments.mjs.map +1 -1
  39. package/fesm2022/forgeroute-ui-pdf.mjs +1 -0
  40. package/fesm2022/forgeroute-ui-pdf.mjs.map +1 -1
  41. package/fesm2022/forgeroute-ui-quickbooks.mjs +1 -0
  42. package/fesm2022/forgeroute-ui-quickbooks.mjs.map +1 -1
  43. package/fesm2022/forgeroute-ui-radio-matrix.mjs +2 -2
  44. package/fesm2022/forgeroute-ui-radio-matrix.mjs.map +1 -1
  45. package/fesm2022/forgeroute-ui-radio.mjs +2 -2
  46. package/fesm2022/forgeroute-ui-radio.mjs.map +1 -1
  47. package/fesm2022/forgeroute-ui-select.mjs +2 -2
  48. package/fesm2022/forgeroute-ui-select.mjs.map +1 -1
  49. package/fesm2022/forgeroute-ui-setup.mjs +1 -0
  50. package/fesm2022/forgeroute-ui-setup.mjs.map +1 -1
  51. package/fesm2022/forgeroute-ui-square.mjs +1 -0
  52. package/fesm2022/forgeroute-ui-square.mjs.map +1 -1
  53. package/fesm2022/forgeroute-ui-star-rating.mjs +2 -2
  54. package/fesm2022/forgeroute-ui-star-rating.mjs.map +1 -1
  55. package/fesm2022/forgeroute-ui-stripe.mjs +1 -0
  56. package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
  57. package/fesm2022/forgeroute-ui-swatch-picker.mjs +2 -2
  58. package/fesm2022/forgeroute-ui-swatch-picker.mjs.map +1 -1
  59. package/fesm2022/forgeroute-ui-table-toolbar.mjs +17 -5
  60. package/fesm2022/forgeroute-ui-table-toolbar.mjs.map +1 -1
  61. package/fesm2022/forgeroute-ui-text-input.mjs +2 -2
  62. package/fesm2022/forgeroute-ui-text-input.mjs.map +1 -1
  63. package/fesm2022/forgeroute-ui-textarea-input.mjs +23 -36
  64. package/fesm2022/forgeroute-ui-textarea-input.mjs.map +1 -1
  65. package/fesm2022/forgeroute-ui-time-input.mjs +2 -2
  66. package/fesm2022/forgeroute-ui-time-input.mjs.map +1 -1
  67. package/package.json +1 -1
  68. package/types/forgeroute-ui-card-list-item.d.ts +11 -3
  69. package/types/forgeroute-ui-color-input.d.ts +7 -0
  70. package/types/forgeroute-ui-detail-card.d.ts +7 -0
  71. package/types/forgeroute-ui-dropdown.d.ts +2 -0
  72. package/types/forgeroute-ui-media.d.ts +28 -0
  73. package/types/forgeroute-ui-messaging.d.ts +1 -1
  74. package/types/forgeroute-ui-quickbooks.d.ts +1 -1
  75. package/types/forgeroute-ui-square.d.ts +2 -2
  76. package/types/forgeroute-ui-stripe.d.ts +1 -1
  77. package/types/forgeroute-ui-textarea-input.d.ts +9 -9
@@ -263,7 +263,7 @@ var RadioMatrixComponent = class RadioMatrixComponent {
263
263
  </fieldset>
264
264
  `,
265
265
  isInline: true,
266
- styles: [":host{display:block}.rm-field{display:flex;flex-direction:column;gap:6px;border:0;margin:0;padding:0;min-width:0}.rm-label{padding:0;margin-bottom:6px;font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.rm-required{color:#dc2626;margin-left:2px}.rm-scroll{overflow-x:auto;border:1px solid #e2e8f0;border-radius:8px}.rm-table{width:100%;border-collapse:collapse;font-size:.875rem}.rm-table th,.rm-table td{padding:8px 12px;border-bottom:1px solid #f1f5f9;text-align:left}.rm-table tbody tr:last-child th,.rm-table tbody tr:last-child td{border-bottom:0}.rm-table thead th{position:sticky;top:0;background:#f8fafc;font-size:.75rem;font-weight:600;color:#475569;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}.rm-col,.rm-cell{text-align:center!important;width:1%;white-space:nowrap}.rm-cell ui-radio{display:inline-block}.rm-row-label{font-weight:500;color:#1e293b}.rm-row:hover{background:#f8fafc}.rm-row-missing .rm-row-label{color:#b91c1c}.rm-disabled .rm-scroll{opacity:.6}.rm-error .rm-scroll{border-color:#ef4444}.rm-desc{margin:0;font-size:.75rem;line-height:1.4;color:#64748b}.rm-desc-error{color:#dc2626}@media(max-width:480px){.rm-table th,.rm-table td{padding:6px 8px}.rm-table thead th{font-size:.6875rem}}\n"],
266
+ styles: [":host{display:block}.rm-field{display:flex;flex-direction:column;gap:6px;border:0;margin:0;padding:0;min-width:0}.rm-label{padding:0;margin-bottom:6px;font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.rm-required{color:#dc2626;margin-left:2px}.rm-scroll{overflow-x:auto;border:1px solid #e2e8f0;border-radius:8px}.rm-table{width:100%;border-collapse:collapse;font-size:.875rem}.rm-table th,.rm-table td{padding:8px 12px;border-bottom:1px solid #f1f5f9;text-align:left}.rm-table tbody tr:last-child th,.rm-table tbody tr:last-child td{border-bottom:0}.rm-table thead th{position:sticky;top:0;background:#f8fafc;font-size:.75rem;font-weight:600;color:#475569;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}.rm-col,.rm-cell{text-align:center!important;width:1%;white-space:nowrap}.rm-cell ui-radio{display:inline-block}.rm-row-label{font-weight:500;color:#1e293b}.rm-row:hover{background:#f8fafc}.rm-row-missing .rm-row-label{color:#b91c1c}.rm-disabled .rm-scroll{opacity:.6}.rm-error .rm-scroll{border-color:#ef4444}.rm-desc{margin:-6px 0 0;font-size:.75rem;line-height:1.4;color:#64748b}.rm-desc-error{color:#dc2626}@media(max-width:480px){.rm-table th,.rm-table td{padding:6px 8px}.rm-table thead th{font-size:.6875rem}}\n"],
267
267
  dependencies: [{
268
268
  kind: "component",
269
269
  type: RadioComponent,
@@ -375,7 +375,7 @@ i0.ɵɵngDeclareClassMetadata({
375
375
  }
376
376
  </fieldset>
377
377
  `,
378
- styles: [":host{display:block}.rm-field{display:flex;flex-direction:column;gap:6px;border:0;margin:0;padding:0;min-width:0}.rm-label{padding:0;margin-bottom:6px;font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.rm-required{color:#dc2626;margin-left:2px}.rm-scroll{overflow-x:auto;border:1px solid #e2e8f0;border-radius:8px}.rm-table{width:100%;border-collapse:collapse;font-size:.875rem}.rm-table th,.rm-table td{padding:8px 12px;border-bottom:1px solid #f1f5f9;text-align:left}.rm-table tbody tr:last-child th,.rm-table tbody tr:last-child td{border-bottom:0}.rm-table thead th{position:sticky;top:0;background:#f8fafc;font-size:.75rem;font-weight:600;color:#475569;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}.rm-col,.rm-cell{text-align:center!important;width:1%;white-space:nowrap}.rm-cell ui-radio{display:inline-block}.rm-row-label{font-weight:500;color:#1e293b}.rm-row:hover{background:#f8fafc}.rm-row-missing .rm-row-label{color:#b91c1c}.rm-disabled .rm-scroll{opacity:.6}.rm-error .rm-scroll{border-color:#ef4444}.rm-desc{margin:0;font-size:.75rem;line-height:1.4;color:#64748b}.rm-desc-error{color:#dc2626}@media(max-width:480px){.rm-table th,.rm-table td{padding:6px 8px}.rm-table thead th{font-size:.6875rem}}\n"]
378
+ styles: [":host{display:block}.rm-field{display:flex;flex-direction:column;gap:6px;border:0;margin:0;padding:0;min-width:0}.rm-label{padding:0;margin-bottom:6px;font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.rm-required{color:#dc2626;margin-left:2px}.rm-scroll{overflow-x:auto;border:1px solid #e2e8f0;border-radius:8px}.rm-table{width:100%;border-collapse:collapse;font-size:.875rem}.rm-table th,.rm-table td{padding:8px 12px;border-bottom:1px solid #f1f5f9;text-align:left}.rm-table tbody tr:last-child th,.rm-table tbody tr:last-child td{border-bottom:0}.rm-table thead th{position:sticky;top:0;background:#f8fafc;font-size:.75rem;font-weight:600;color:#475569;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}.rm-col,.rm-cell{text-align:center!important;width:1%;white-space:nowrap}.rm-cell ui-radio{display:inline-block}.rm-row-label{font-weight:500;color:#1e293b}.rm-row:hover{background:#f8fafc}.rm-row-missing .rm-row-label{color:#b91c1c}.rm-disabled .rm-scroll{opacity:.6}.rm-error .rm-scroll{border-color:#ef4444}.rm-desc{margin:-6px 0 0;font-size:.75rem;line-height:1.4;color:#64748b}.rm-desc-error{color:#dc2626}@media(max-width:480px){.rm-table th,.rm-table td{padding:6px 8px}.rm-table thead th{font-size:.6875rem}}\n"]
379
379
  }]
380
380
  }],
381
381
  ctorParameters: () => [],
@@ -1 +1 @@
1
- {"version":3,"file":"forgeroute-ui-radio-matrix.mjs","names":[],"sources":["../../../projects/forgeroute-ui/radio-matrix/src/lib/radio-matrix/radio-matrix.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, input, output, signal, computed, effect, forwardRef } from '@angular/core';\nimport { AbstractControl, ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, ValidationErrors, Validator } from '@angular/forms';\nimport { FieldIssue, UiFieldValidity, createFieldReveal, issueToErrors } from '@forgeroute/ui/core';\nimport { RadioComponent } from '@forgeroute/ui/radio';\nimport { RadioOption } from '@forgeroute/ui/radio';\nimport { uiText } from '@forgeroute/ui/core';\n\n/** One row of a `ui-radio-matrix`: `value` is the key in the model, `label` the row header. */\nexport interface RadioMatrixRow {\n value: string;\n label: string;\n disabled?: boolean;\n}\n\n/**\n * Matrix of native radio buttons: one row per item, one column per choice, exactly one choice per row (e.g. a page-permission\n * grid: rows = pages, columns = Full Access / Read Only / Hidden). A ControlValueAccessor whose value is a record\n * `{ [row.value]: column.value }` (`''` / missing = nothing chosen for that row). Arrow keys move inside a row natively because the\n * radios of a row share one `name`. Every radio is named \"<row>: <column>\" for screen readers; rows are `<th scope=\"row\">`, columns\n * `<th scope=\"col\">`.\n *\n * Built-in validation: `required` -> every row needs a choice (\"Choose an option in every row.\" / \"<label>: choose an option in\n * every row.\"); a value that is not one of the `columns` -> \"Select a valid option.\"; a key that is not one of the `rows` is\n * ignored (and kept untouched in the model). Disabled matrices are never invalid.\n *\n * Validity API (same on every ui input): Angular `Validator`, signals `invalid` + `errorMessage`, `invalidChange` output,\n * provides `UiFieldValidity`. Messages (built-in and a host `[error]`) show only after the matrix lost focus; `[showErrors]=\"true\"` also reveals it on an untouched matrix.\n *\n * <ui-radio-matrix label=\"Page permissions\" rowHeader=\"Page\" [rows]=\"pages\" [columns]=\"levels\" [(ngModel)]=\"permissions\" />\n */\n@Component({\n selector: 'ui-radio-matrix',\n standalone: true,\n imports: [RadioComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RadioMatrixComponent),\n multi: true,\n }, {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => RadioMatrixComponent),\n multi: true,\n }, {\n provide: UiFieldValidity,\n useExisting: forwardRef(() => RadioMatrixComponent),\n }],\n template: `\n <fieldset\n class=\"rm-field\"\n [class.rm-error]=\"_activeError()\"\n [class.rm-disabled]=\"disabled()\"\n [disabled]=\"disabled()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"_activeError() ? 'true' : null\"\n [attr.aria-describedby]=\"(_activeError() || hint()) ? _descId : null\"\n (focusout)=\"onFocusOut($event)\">\n @if (label()) {\n <legend class=\"rm-label\">\n {{ label() }}\n @if (required()) { <span class=\"rm-required\" aria-hidden=\"true\">*</span> }\n </legend>\n }\n <div class=\"rm-scroll\">\n <table class=\"rm-table\">\n <thead>\n <tr>\n <th scope=\"col\" class=\"rm-corner\">{{ rowHeader() }}</th>\n @for (col of columns(); track col.value) {\n <th scope=\"col\" class=\"rm-col\">{{ col.label }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of rows(); track row.value) {\n <tr class=\"rm-row\" [class.rm-row-missing]=\"_rowInvalid(row)\">\n <th scope=\"row\" class=\"rm-row-label\">{{ row.label }}</th>\n @for (col of columns(); track col.value) {\n <td class=\"rm-cell\">\n <ui-radio\n [name]=\"_name + '-' + row.value\"\n [value]=\"col.value\"\n [ariaLabel]=\"row.label + ': ' + col.label\"\n [checked]=\"_value()[row.value] === col.value\"\n [disabled]=\"disabled() || !!row.disabled || !!col.disabled\"\n [invalid]=\"_rowInvalid(row)\"\n [describedBy]=\"(_activeError() || hint()) ? _descId : ''\"\n (selected)=\"onSelect(row.value, $event)\" />\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n @if (_activeError()) {\n <p class=\"rm-desc rm-desc-error\" [id]=\"_descId\" role=\"alert\">{{ _activeError() }}</p>\n } @else if (hint()) {\n <p class=\"rm-desc\" [id]=\"_descId\">{{ hint() }}</p>\n }\n </fieldset>\n `,\n styles: [`\n :host { display: block; }\n\n .rm-field { display: flex; flex-direction: column; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }\n .rm-label { padding: 0; margin-bottom: 6px; font-size: 0.8125rem; font-weight: 600; color: #374151; line-height: 1; }\n .rm-required { color: #dc2626; margin-left: 2px; }\n\n .rm-scroll { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 8px; }\n .rm-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }\n .rm-table th, .rm-table td { padding: 8px 12px; border-bottom: 1px solid #f1f5f9; text-align: left; }\n .rm-table tbody tr:last-child th, .rm-table tbody tr:last-child td { border-bottom: 0; }\n .rm-table thead th {\n position: sticky; top: 0; background: #f8fafc; font-size: 0.75rem; font-weight: 600; color: #475569;\n text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap;\n }\n .rm-col, .rm-cell { text-align: center !important; width: 1%; white-space: nowrap; }\n .rm-cell ui-radio { display: inline-block; }\n .rm-row-label { font-weight: 500; color: #1e293b; }\n .rm-row:hover { background: #f8fafc; }\n .rm-row-missing .rm-row-label { color: #b91c1c; }\n\n .rm-disabled .rm-scroll { opacity: 0.6; }\n .rm-error .rm-scroll { border-color: #ef4444; }\n\n .rm-desc { margin: 0; font-size: 0.75rem; line-height: 1.4; color: #64748b; }\n .rm-desc-error { color: #dc2626; }\n\n @media (max-width: 480px) {\n .rm-table th, .rm-table td { padding: 6px 8px; }\n .rm-table thead th { font-size: 0.6875rem; }\n }\n `],\n})\nexport class RadioMatrixComponent implements ControlValueAccessor, Validator, UiFieldValidity {\n readonly label = input('');\n /** Text of the top-left header cell (what the rows are, e.g. \"Page\"). */\n readonly rowHeader = input('');\n readonly rows = input<RadioMatrixRow[]>([]);\n /** The choices, one column each (same shape as `ui-radio-group` options; `description` is not shown). */\n readonly columns = input<RadioOption[]>([]);\n readonly required = input(false);\n readonly hint = input('');\n readonly error = input('');\n /** The host's \"tried to submit\" flag (e.g. after a failed Save click). `true` reveals the message of an untouched field at once (the field also shows it after the user left THIS field); switching it from true back to false forgets that the field was left. */\n readonly showErrors = input(false);\n /** Prefix of the native radio `name`s (one name per row); a unique one is generated when omitted. */\n readonly name = input('');\n\n readonly _disabledInput = input(false, { alias: 'disabled' });\n private readonly _cvaDisabled = signal(false);\n protected readonly disabled = computed(() => this._disabledInput() || this._cvaDisabled());\n\n private readonly _generatedName = `rm-${Math.random().toString(36).slice(2, 8)}`;\n protected get _name(): string { return this.name() || this._generatedName; }\n protected readonly _descId = `${this._generatedName}-desc`;\n protected readonly _value = signal<Record<string, string>>({});\n\n private readonly _reveal = createFieldReveal(this.showErrors);\n private readonly _issue = computed(() => this._check(this._value()));\n /** True while the value breaks a built-in rule or the host passed an `[error]`. */\n readonly invalid = computed(() => !!this.error() || !!this._issue());\n /** Message of the first broken built-in rule ('' when valid), shown or not. */\n readonly errorMessage = computed(() => this._issue()?.message ?? '');\n /** Emits whenever the field becomes invalid / valid. */\n readonly invalidChange = output<boolean>();\n protected readonly _activeError = computed(() => this._reveal.revealed() ? (this.error() || this.errorMessage()) : '');\n private _onValidatorChange = () => {};\n\n constructor() {\n effect(() => { this.invalidChange.emit(this.invalid()); });\n }\n\n /** Re-run the form control's validation when a rule input (required, rows, columns) changes. */\n ngOnChanges() { this._onValidatorChange(); }\n\n validate(control: AbstractControl): ValidationErrors | null {\n return issueToErrors(this._check(this._toRecord(control.value)));\n }\n registerOnValidatorChange(fn: () => void) { this._onValidatorChange = fn; }\n\n private _onChange = (_: Record<string, string>) => {};\n private _onTouched = () => {};\n\n writeValue(val: Record<string, string> | null) { this._value.set(this._toRecord(val)); }\n registerOnChange(fn: (v: Record<string, string>) => void) { this._onChange = fn; }\n registerOnTouched(fn: () => void) { this._onTouched = fn; }\n setDisabledState(d: boolean) { this._cvaDisabled.set(d); }\n\n protected onSelect(row: string, column: string) {\n const next = { ...this._value(), [row]: column };\n this._value.set(next);\n this._onChange(next);\n }\n\n /** True when a required matrix has no valid choice in this row (shown on the row header and the dots). */\n protected _rowInvalid(row: RadioMatrixRow): boolean {\n if (this.disabled() || row.disabled || !this._reveal.revealed()) return false;\n const v = this._value()[row.value] ?? '';\n return v ? !this.columns().some(c => c.value === v) : this.required();\n }\n\n /** Touched once focus leaves the whole matrix (moving between its radios does not count). */\n protected onFocusOut(event: FocusEvent) {\n const next = event.relatedTarget as Node | null;\n if (next && (event.currentTarget as HTMLElement).contains(next)) return;\n this._onTouched();\n this._reveal.touched.set(true);\n }\n\n private _toRecord(val: unknown): Record<string, string> {\n return val && typeof val === 'object' ? { ...(val as Record<string, string>) } : {};\n }\n\n private _check(value: Record<string, string>): FieldIssue | null {\n if (this.disabled()) return null;\n const cols = this.columns();\n const rows = this.rows().filter(r => !r.disabled);\n if (cols.length > 0 && rows.some(r => value[r.value] && !cols.some(c => c.value === value[r.value]))) {\n return { key: 'option', message: uiText('common.selectValidOption') };\n }\n if (this.required() && rows.some(r => !value[r.value])) {\n const label = this.label().trim();\n return { key: 'required', message: label ? uiText('radioMatrix.chooseEveryRowLabelled', { label }) : uiText('radioMatrix.chooseEveryRow') };\n }\n return null;\n }\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3,"file":"forgeroute-ui-radio-matrix.mjs","names":[],"sources":["../../../projects/forgeroute-ui/radio-matrix/src/lib/radio-matrix/radio-matrix.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, input, output, signal, computed, effect, forwardRef } from '@angular/core';\nimport { AbstractControl, ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, ValidationErrors, Validator } from '@angular/forms';\nimport { FieldIssue, UiFieldValidity, createFieldReveal, issueToErrors } from '@forgeroute/ui/core';\nimport { RadioComponent } from '@forgeroute/ui/radio';\nimport { RadioOption } from '@forgeroute/ui/radio';\nimport { uiText } from '@forgeroute/ui/core';\n\n/** One row of a `ui-radio-matrix`: `value` is the key in the model, `label` the row header. */\nexport interface RadioMatrixRow {\n value: string;\n label: string;\n disabled?: boolean;\n}\n\n/**\n * Matrix of native radio buttons: one row per item, one column per choice, exactly one choice per row (e.g. a page-permission\n * grid: rows = pages, columns = Full Access / Read Only / Hidden). A ControlValueAccessor whose value is a record\n * `{ [row.value]: column.value }` (`''` / missing = nothing chosen for that row). Arrow keys move inside a row natively because the\n * radios of a row share one `name`. Every radio is named \"<row>: <column>\" for screen readers; rows are `<th scope=\"row\">`, columns\n * `<th scope=\"col\">`.\n *\n * Built-in validation: `required` -> every row needs a choice (\"Choose an option in every row.\" / \"<label>: choose an option in\n * every row.\"); a value that is not one of the `columns` -> \"Select a valid option.\"; a key that is not one of the `rows` is\n * ignored (and kept untouched in the model). Disabled matrices are never invalid.\n *\n * Validity API (same on every ui input): Angular `Validator`, signals `invalid` + `errorMessage`, `invalidChange` output,\n * provides `UiFieldValidity`. Messages (built-in and a host `[error]`) show only after the matrix lost focus; `[showErrors]=\"true\"` also reveals it on an untouched matrix.\n *\n * <ui-radio-matrix label=\"Page permissions\" rowHeader=\"Page\" [rows]=\"pages\" [columns]=\"levels\" [(ngModel)]=\"permissions\" />\n */\n@Component({\n selector: 'ui-radio-matrix',\n standalone: true,\n imports: [RadioComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RadioMatrixComponent),\n multi: true,\n }, {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => RadioMatrixComponent),\n multi: true,\n }, {\n provide: UiFieldValidity,\n useExisting: forwardRef(() => RadioMatrixComponent),\n }],\n template: `\n <fieldset\n class=\"rm-field\"\n [class.rm-error]=\"_activeError()\"\n [class.rm-disabled]=\"disabled()\"\n [disabled]=\"disabled()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"_activeError() ? 'true' : null\"\n [attr.aria-describedby]=\"(_activeError() || hint()) ? _descId : null\"\n (focusout)=\"onFocusOut($event)\">\n @if (label()) {\n <legend class=\"rm-label\">\n {{ label() }}\n @if (required()) { <span class=\"rm-required\" aria-hidden=\"true\">*</span> }\n </legend>\n }\n <div class=\"rm-scroll\">\n <table class=\"rm-table\">\n <thead>\n <tr>\n <th scope=\"col\" class=\"rm-corner\">{{ rowHeader() }}</th>\n @for (col of columns(); track col.value) {\n <th scope=\"col\" class=\"rm-col\">{{ col.label }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of rows(); track row.value) {\n <tr class=\"rm-row\" [class.rm-row-missing]=\"_rowInvalid(row)\">\n <th scope=\"row\" class=\"rm-row-label\">{{ row.label }}</th>\n @for (col of columns(); track col.value) {\n <td class=\"rm-cell\">\n <ui-radio\n [name]=\"_name + '-' + row.value\"\n [value]=\"col.value\"\n [ariaLabel]=\"row.label + ': ' + col.label\"\n [checked]=\"_value()[row.value] === col.value\"\n [disabled]=\"disabled() || !!row.disabled || !!col.disabled\"\n [invalid]=\"_rowInvalid(row)\"\n [describedBy]=\"(_activeError() || hint()) ? _descId : ''\"\n (selected)=\"onSelect(row.value, $event)\" />\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n @if (_activeError()) {\n <p class=\"rm-desc rm-desc-error\" [id]=\"_descId\" role=\"alert\">{{ _activeError() }}</p>\n } @else if (hint()) {\n <p class=\"rm-desc\" [id]=\"_descId\">{{ hint() }}</p>\n }\n </fieldset>\n `,\n styles: [`\n :host { display: block; }\n\n .rm-field { display: flex; flex-direction: column; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }\n .rm-label { padding: 0; margin-bottom: 6px; font-size: 0.8125rem; font-weight: 600; color: #374151; line-height: 1; }\n .rm-required { color: #dc2626; margin-left: 2px; }\n\n .rm-scroll { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 8px; }\n .rm-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }\n .rm-table th, .rm-table td { padding: 8px 12px; border-bottom: 1px solid #f1f5f9; text-align: left; }\n .rm-table tbody tr:last-child th, .rm-table tbody tr:last-child td { border-bottom: 0; }\n .rm-table thead th {\n position: sticky; top: 0; background: #f8fafc; font-size: 0.75rem; font-weight: 600; color: #475569;\n text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap;\n }\n .rm-col, .rm-cell { text-align: center !important; width: 1%; white-space: nowrap; }\n .rm-cell ui-radio { display: inline-block; }\n .rm-row-label { font-weight: 500; color: #1e293b; }\n .rm-row:hover { background: #f8fafc; }\n .rm-row-missing .rm-row-label { color: #b91c1c; }\n\n .rm-disabled .rm-scroll { opacity: 0.6; }\n .rm-error .rm-scroll { border-color: #ef4444; }\n\n .rm-desc { margin: -6px 0 0; font-size: 0.75rem; line-height: 1.4; color: #64748b; }\n .rm-desc-error { color: #dc2626; }\n\n @media (max-width: 480px) {\n .rm-table th, .rm-table td { padding: 6px 8px; }\n .rm-table thead th { font-size: 0.6875rem; }\n }\n `],\n})\nexport class RadioMatrixComponent implements ControlValueAccessor, Validator, UiFieldValidity {\n readonly label = input('');\n /** Text of the top-left header cell (what the rows are, e.g. \"Page\"). */\n readonly rowHeader = input('');\n readonly rows = input<RadioMatrixRow[]>([]);\n /** The choices, one column each (same shape as `ui-radio-group` options; `description` is not shown). */\n readonly columns = input<RadioOption[]>([]);\n readonly required = input(false);\n readonly hint = input('');\n readonly error = input('');\n /** The host's \"tried to submit\" flag (e.g. after a failed Save click). `true` reveals the message of an untouched field at once (the field also shows it after the user left THIS field); switching it from true back to false forgets that the field was left. */\n readonly showErrors = input(false);\n /** Prefix of the native radio `name`s (one name per row); a unique one is generated when omitted. */\n readonly name = input('');\n\n readonly _disabledInput = input(false, { alias: 'disabled' });\n private readonly _cvaDisabled = signal(false);\n protected readonly disabled = computed(() => this._disabledInput() || this._cvaDisabled());\n\n private readonly _generatedName = `rm-${Math.random().toString(36).slice(2, 8)}`;\n protected get _name(): string { return this.name() || this._generatedName; }\n protected readonly _descId = `${this._generatedName}-desc`;\n protected readonly _value = signal<Record<string, string>>({});\n\n private readonly _reveal = createFieldReveal(this.showErrors);\n private readonly _issue = computed(() => this._check(this._value()));\n /** True while the value breaks a built-in rule or the host passed an `[error]`. */\n readonly invalid = computed(() => !!this.error() || !!this._issue());\n /** Message of the first broken built-in rule ('' when valid), shown or not. */\n readonly errorMessage = computed(() => this._issue()?.message ?? '');\n /** Emits whenever the field becomes invalid / valid. */\n readonly invalidChange = output<boolean>();\n protected readonly _activeError = computed(() => this._reveal.revealed() ? (this.error() || this.errorMessage()) : '');\n private _onValidatorChange = () => {};\n\n constructor() {\n effect(() => { this.invalidChange.emit(this.invalid()); });\n }\n\n /** Re-run the form control's validation when a rule input (required, rows, columns) changes. */\n ngOnChanges() { this._onValidatorChange(); }\n\n validate(control: AbstractControl): ValidationErrors | null {\n return issueToErrors(this._check(this._toRecord(control.value)));\n }\n registerOnValidatorChange(fn: () => void) { this._onValidatorChange = fn; }\n\n private _onChange = (_: Record<string, string>) => {};\n private _onTouched = () => {};\n\n writeValue(val: Record<string, string> | null) { this._value.set(this._toRecord(val)); }\n registerOnChange(fn: (v: Record<string, string>) => void) { this._onChange = fn; }\n registerOnTouched(fn: () => void) { this._onTouched = fn; }\n setDisabledState(d: boolean) { this._cvaDisabled.set(d); }\n\n protected onSelect(row: string, column: string) {\n const next = { ...this._value(), [row]: column };\n this._value.set(next);\n this._onChange(next);\n }\n\n /** True when a required matrix has no valid choice in this row (shown on the row header and the dots). */\n protected _rowInvalid(row: RadioMatrixRow): boolean {\n if (this.disabled() || row.disabled || !this._reveal.revealed()) return false;\n const v = this._value()[row.value] ?? '';\n return v ? !this.columns().some(c => c.value === v) : this.required();\n }\n\n /** Touched once focus leaves the whole matrix (moving between its radios does not count). */\n protected onFocusOut(event: FocusEvent) {\n const next = event.relatedTarget as Node | null;\n if (next && (event.currentTarget as HTMLElement).contains(next)) return;\n this._onTouched();\n this._reveal.touched.set(true);\n }\n\n private _toRecord(val: unknown): Record<string, string> {\n return val && typeof val === 'object' ? { ...(val as Record<string, string>) } : {};\n }\n\n private _check(value: Record<string, string>): FieldIssue | null {\n if (this.disabled()) return null;\n const cols = this.columns();\n const rows = this.rows().filter(r => !r.disabled);\n if (cols.length > 0 && rows.some(r => value[r.value] && !cols.some(c => c.value === value[r.value]))) {\n return { key: 'option', message: uiText('common.selectValidOption') };\n }\n if (this.required() && rows.some(r => !value[r.value])) {\n const label = this.label().trim();\n return { key: 'required', message: label ? uiText('radioMatrix.chooseEveryRowLabelled', { label }) : uiText('radioMatrix.chooseEveryRow') };\n }\n return null;\n }\n}\n"],"mappings":";;;;;AAuIA,IAAa,uBAAb,MAAa,qBAAoB;CAoB/B,IAAc,QAAK;EAAa,OAAO,KAAK,KAAI,KAAM,KAAK;CAAgB;CAe3E,cAAA;EAlCS,KAAA,QAAY,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAErB,KAAA,YAAY,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;EACrB,KAAA,OAAY,MAAwB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EAEvC,KAAA,UAAY,MAAqB,CAAA,GAAG,GAAA,YAAA,CAAA,E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AAA;GAAA,cAAA,CAAA;IAAA,MAAA;IAAA,MApES;IAAc,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;IAAA,SAAA,CAAA,UAAA;GAAA,CAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAsGb,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAoB,YAAA,CAAA;EAzGhC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAiB,YACf;GAAI,SACP,CAAC,cAAc;GAAC,iBACR,wBAAwB;GAAM,WACpC;IAAC;KACV,SAAS;KACT,aAAa,iBAAgB,oBAAqB;KAClD,OAAO;IACR;IAAE;KACD,SAAS;KACT,aAAa,iBAAgB,oBAAqB;KAClD,OAAO;IACR;IAAE;KACD,SAAS;KACT,aAAa,iBAAgB,oBAAqB;IACnD;GAAA;GAAC,UACQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDT,QAAA,CAAA,wuCAAA;EAAA,CAAA"}
@@ -705,7 +705,7 @@ var RadioGroupComponent = class RadioGroupComponent {
705
705
  </fieldset>
706
706
  `,
707
707
  isInline: true,
708
- styles: [":host{display:block}.rg-field{display:flex;flex-direction:column;gap:6px;border:0;margin:0;padding:0;min-width:0}.rg-label{padding:0;margin-bottom:6px;font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.rg-required{color:#dc2626;margin-left:2px}.rg-options{display:flex;flex-direction:column;gap:10px}.rg-options.rg-horizontal{flex-direction:row;flex-wrap:wrap;gap:8px 20px}.rg-nested{padding-left:29px;min-width:0}.rg-options.rg-horizontal .rg-nested{flex:1 0 100%}.rg-disabled{cursor:not-allowed}.rg-desc{margin:0;font-size:.75rem;line-height:1.4;color:#64748b}.rg-desc-error{color:#dc2626}@media(pointer:coarse),(max-width:480px){.rg-options{gap:0}.rg-options.rg-horizontal{gap:0 20px}}\n"],
708
+ styles: [":host{display:block}.rg-field{display:flex;flex-direction:column;gap:6px;border:0;margin:0;padding:0;min-width:0}.rg-label{padding:0;margin-bottom:6px;font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.rg-required{color:#dc2626;margin-left:2px}.rg-options{display:flex;flex-direction:column;gap:10px}.rg-options.rg-horizontal{flex-direction:row;flex-wrap:wrap;gap:8px 20px}.rg-nested{padding-left:29px;min-width:0}.rg-options.rg-horizontal .rg-nested{flex:1 0 100%}.rg-disabled{cursor:not-allowed}.rg-desc{margin:-6px 0 0;font-size:.75rem;line-height:1.4;color:#64748b}.rg-desc-error{color:#dc2626}@media(pointer:coarse),(max-width:480px){.rg-options{gap:0}.rg-options.rg-horizontal{gap:0 20px}}\n"],
709
709
  dependencies: [{
710
710
  kind: "component",
711
711
  type: RadioComponent,
@@ -819,7 +819,7 @@ i0.ɵɵngDeclareClassMetadata({
819
819
  }
820
820
  </fieldset>
821
821
  `,
822
- styles: [":host{display:block}.rg-field{display:flex;flex-direction:column;gap:6px;border:0;margin:0;padding:0;min-width:0}.rg-label{padding:0;margin-bottom:6px;font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.rg-required{color:#dc2626;margin-left:2px}.rg-options{display:flex;flex-direction:column;gap:10px}.rg-options.rg-horizontal{flex-direction:row;flex-wrap:wrap;gap:8px 20px}.rg-nested{padding-left:29px;min-width:0}.rg-options.rg-horizontal .rg-nested{flex:1 0 100%}.rg-disabled{cursor:not-allowed}.rg-desc{margin:0;font-size:.75rem;line-height:1.4;color:#64748b}.rg-desc-error{color:#dc2626}@media(pointer:coarse),(max-width:480px){.rg-options{gap:0}.rg-options.rg-horizontal{gap:0 20px}}\n"]
822
+ styles: [":host{display:block}.rg-field{display:flex;flex-direction:column;gap:6px;border:0;margin:0;padding:0;min-width:0}.rg-label{padding:0;margin-bottom:6px;font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.rg-required{color:#dc2626;margin-left:2px}.rg-options{display:flex;flex-direction:column;gap:10px}.rg-options.rg-horizontal{flex-direction:row;flex-wrap:wrap;gap:8px 20px}.rg-nested{padding-left:29px;min-width:0}.rg-options.rg-horizontal .rg-nested{flex:1 0 100%}.rg-disabled{cursor:not-allowed}.rg-desc{margin:-6px 0 0;font-size:.75rem;line-height:1.4;color:#64748b}.rg-desc-error{color:#dc2626}@media(pointer:coarse),(max-width:480px){.rg-options{gap:0}.rg-options.rg-horizontal{gap:0 20px}}\n"]
823
823
  }]
824
824
  }],
825
825
  ctorParameters: () => [],
@@ -1 +1 @@
1
- {"version":3,"file":"forgeroute-ui-radio.mjs","names":[],"sources":["../../../projects/forgeroute-ui/radio/src/lib/radio/radio.component.ts","../../../projects/forgeroute-ui/radio/src/lib/radio/radio-option-content.directive.ts","../../../projects/forgeroute-ui/radio/src/lib/radio/radio-group.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, input, output, computed, inject } from '@angular/core';\nimport { iconPath } from '@forgeroute/ui/icon';\nimport { opensInNewTab, safeLinkHref } from '@forgeroute/ui/utils';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\n/**\n * Single native radio button (visual tokens of `ui-checkbox`). Normally rendered by `ui-radio-group`; usable standalone\n * when the host manages the shared `name` and the `checked` state itself.\n */\n@Component({\n selector: 'ui-radio',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <label class=\"rd-wrap\" [class.rd-disabled]=\"disabled()\">\n <span class=\"rd-dot\" [class.rd-checked]=\"checked()\" [class.rd-invalid]=\"invalid()\" [class.rd-disabled]=\"disabled()\">\n @if (checked()) { <span class=\"rd-core\"></span> }\n </span>\n <input\n type=\"radio\"\n class=\"rd-hidden\"\n [name]=\"name()\"\n [value]=\"value()\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [attr.data-testid]=\"testId() || null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"_labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"_describedByIds()\"\n [attr.aria-controls]=\"controls() || null\"\n (change)=\"onChange($event)\"\n />\n @if (_iconD(); as d) {\n <!-- Optional icon in front of the label (library source 2026-11-04): decorative, so the radio's accessible name is unchanged. -->\n <svg class=\"rd-icon\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path [attr.d]=\"d\" /></svg>\n }\n <span class=\"rd-text\">\n @if (label()) { <span class=\"rd-label\" [id]=\"_labelId()\">{{ label() }}</span> }\n @if (description()) { <span class=\"rd-description\" [id]=\"_descriptionId\">{{ description() }}</span> }\n @if (_linkHref(); as href) {\n <!-- Optional link after the description (library source 2026-11-05): a real anchor, so it is its own tab stop; clicking it follows the link and never selects the radio. -->\n <a class=\"rd-link\" [attr.href]=\"href\" [attr.target]=\"_linkNewTab() ? '_blank' : null\" [attr.rel]=\"_linkNewTab() ? 'noopener noreferrer' : null\" [attr.data-testid]=\"linkTestId() || null\">{{ linkLabel() }}@if (_linkNewTab()) { <span class=\"rd-sr\">{{ labels.t('dataTable.opensInNewTab') }}</span> }</a>\n }\n <ng-content />\n </span>\n </label>\n `,\n styles: [`\n :host { display: block; }\n\n .rd-wrap {\n position: relative; /* contains the absolutely positioned hidden input, so it can never extend a scroll container or the page */\n display: inline-flex; align-items: flex-start; gap: 9px;\n vertical-align: top; /* an inline-flex box sits on the text baseline; the dot's baseline changes when it is selected, which moved the row 4px */\n cursor: pointer; user-select: none;\n &.rd-disabled { cursor: not-allowed; opacity: 0.5; }\n }\n\n .rd-hidden {\n position: absolute; width: 1px; height: 1px;\n margin: -1px; padding: 0; overflow: hidden;\n clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;\n }\n\n .rd-wrap:has(.rd-hidden:focus-visible) .rd-dot {\n outline: 2px solid #3b82f6;\n outline-offset: 2px;\n }\n\n /* Touch targets: the real input becomes a transparent 44px square centred on the 20px dot (desktop unchanged). */\n @media (pointer: coarse), (max-width: 480px) {\n .rd-wrap { position: relative; }\n .rd-hidden {\n width: 44px; height: 44px; margin: 0; clip: auto; overflow: visible;\n left: -12px; top: 0;\n opacity: 0; cursor: pointer; z-index: 1;\n }\n .rd-wrap.rd-disabled .rd-hidden { cursor: not-allowed; }\n /* The whole label row is the target: >= 44px high. The 12px padding keeps the 20px dot level with the first text line (a multi-line label just grows). */\n .rd-wrap { box-sizing: border-box; min-height: 44px; padding: 12px 0; }\n }\n\n .rd-dot {\n flex-shrink: 0; width: 20px; height: 20px; box-sizing: border-box;\n border: 2px solid #7c8ba1; border-radius: 50%; background: #fff;\n display: flex; align-items: center; justify-content: center;\n transition: background 0.12s, border-color 0.12s;\n\n &.rd-checked { background: #3b82f6; border-color: #3b82f6; }\n &.rd-invalid:not(.rd-checked) { border-color: #ef4444; }\n &:not(.rd-checked):not(.rd-disabled) {\n .rd-wrap:hover & { border-color: #3b82f6; }\n }\n }\n .rd-core { width: 8px; height: 8px; border-radius: 50%; background: #fff; }\n\n @media (max-width: 640px), (pointer: coarse) {\n .rd-dot { position: relative; }\n .rd-dot::after { content: ''; position: absolute; inset: -12px; }\n }\n\n /* Optional icon in front of the label: aligned with the first text line (0.875rem x 1.4), never shrinks, dimmed with a disabled option by the wrap's opacity. */\n .rd-icon { flex-shrink: 0; margin-top: 1px; color: #64748b; }\n .rd-text { display: flex; flex-direction: column; gap: 2px; }\n .rd-label { font-size: 0.875rem; color: #334155; line-height: 1.4; }\n .rd-description { font-size: 0.75rem; color: #64748b; line-height: 1.4; }\n /* Target size (WCAG 2.5.8 >= 24px; 44px on touch / phones): a min-height with an equal negative margin on both sides, so the hit area grows without moving the layout. Only rendered with a link. */\n .rd-link { font-size: 0.75rem; line-height: 1.4; color: #2563eb; text-decoration: underline; align-self: flex-start; cursor: pointer; display: inline-flex; align-items: center; min-height: 24px; box-sizing: border-box; padding: 0; margin: -3.6px 0; } /* (24px - 16.8px line) / 2 per side: the box is 24px tall but takes up one text line of layout */\n @media (pointer: coarse), (max-width: 480px) { .rd-link { min-height: 44px; margin: -13.6px 0; } } /* (44px - 16.8px line) / 2 per side */\n .rd-link:hover { color: #1d4ed8; }\n .rd-link:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; border-radius: 2px; }\n .rd-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }\n `],\n})\nexport class RadioComponent {\n protected readonly labels = inject(UiLabelsService);\n readonly label = input('');\n readonly description = input('');\n /**\n * Library source 2026-11-05, not yet published. Optional link shown after the description: `linkLabel` is its text, `linkUrl` its address. Only `http:`, `https:`,\n * `mailto:` and `tel:` addresses and in-app paths (`/...`, `#...`) are linked; anything else (`javascript:`, `data:`, empty) draws nothing. An absolute http(s)\n * address opens in a new tab (`noopener noreferrer`, with \"(opens in a new tab)\" for screen readers); the others follow in the same tab. The radio's\n * accessible name stays the label only.\n */\n readonly linkLabel = input('');\n readonly linkUrl = input('');\n /** `data-testid` of the link; none when empty. */\n readonly linkTestId = input('');\n /**\n * Library source 2026-11-04, not yet published. Optional icon drawn in front of the label: a `<ui-icon>` key (`cup`, `wrench`, `card`, ...) or a raw 24x24\n * stroke SVG path (`M12 5v14 M5 12h14`). Decorative (`aria-hidden`), so the accessible name stays the label. Empty (default), an unknown key or\n * text that is not a path = nothing is drawn and the DOM is unchanged.\n */\n readonly icon = input('');\n /** Accessible name when there is no visible `label`. */\n readonly ariaLabel = input('');\n /** `data-testid` of the native radio input; none when empty. */\n readonly testId = input('');\n readonly value = input('');\n /** Radios with the same `name` form one keyboard (arrow key) group. */\n readonly name = input('');\n readonly checked = input(false);\n readonly invalid = input(false);\n /** Id(s) of the element(s) describing the group (hint / error). */\n readonly describedBy = input('');\n /** Id of an element this radio reveals while selected (`aria-controls`); no attribute when empty. */\n readonly controls = input('');\n /** Public so a host template can bind `[disabled]` (a protected input fails strict template type-checking). */\n readonly _disabledInput = input(false, { alias: 'disabled' });\n protected readonly disabled = this._disabledInput;\n\n /** Path of the icon: a known icon key, else the text itself when it looks like an SVG path (drawing commands and numbers only), else none. */\n protected readonly _iconD = computed((): string | null => {\n const v = this.icon().trim();\n if (!v) return null;\n return iconPath(v) ?? (/^[Mm][\\d\\s.,\\-MmLlHhVvCcSsQqTtAaZz]+$/.test(v) ? v : null);\n });\n\n /** The address to link, or null when the link is not drawn (no label, empty or unsafe address: see [safeLinkHref]). */\n protected readonly _linkHref = computed((): string | null => (this.linkLabel().trim() ? safeLinkHref(this.linkUrl()) : null));\n protected readonly _linkNewTab = computed(() => opensInNewTab(this._linkHref()));\n\n /** Id of the visible label text. Optional: a host (e.g. `ui-radio-group`) can set it to point another element at the label with `aria-labelledby`; a unique id is generated when empty. */\n readonly labelId = input('');\n private readonly _generatedLabelId = `rd-${Math.random().toString(36).slice(2, 8)}-label`;\n protected readonly _labelId = computed(() => this.labelId() || this._generatedLabelId);\n /** With a description or link inside the <label>, the accessible name would read \"Email We send a message\": name the input by the label text only. */\n protected readonly _labelledBy = computed(() => (this.label() && (this.description() || this._linkHref()) && !this.ariaLabel() ? this._labelId() : null));\n protected readonly _descriptionId = `rd-${Math.random().toString(36).slice(2, 8)}-desc`;\n /** Group hint/error id plus the option's own description (kept out of the label so the accessible name is label-only). */\n protected readonly _describedByIds = computed(() => {\n const ids = [this.describedBy(), this.description() ? this._descriptionId : ''].filter(Boolean).join(' ');\n return ids || null;\n });\n\n /** Emits the radio's `value` when the user selects it. */\n readonly selected = output<string>();\n\n protected onChange(event: Event) {\n if ((event.target as HTMLInputElement).checked) this.selected.emit(this.value());\n }\n}\n","import { Directive, TemplateRef, inject, input } from '@angular/core';\n\n/**\n * Content shown directly under ONE option of a `ui-radio-group`, only while that option is selected (e.g. an address form under\n * \"Ship to an alternate address\"). Put an `<ng-template>` inside the group and name the option's value:\n *\n * <ui-radio-group label=\"Delivery\" [options]=\"opts\" [(ngModel)]=\"method\">\n * <ng-template uiRadioOptionContent=\"SHIP\">\n * <ui-text-input label=\"Street\" ... />\n * </ng-template>\n * </ui-radio-group>\n *\n * Groups without such a template render exactly as before. The content is indented under the option's label; in a horizontal group it\n * takes a full row below the options. It lives inside the group's fieldset, so moving focus into it does not count as leaving the group.\n */\n@Directive({\n selector: 'ng-template[uiRadioOptionContent]',\n standalone: true,\n})\nexport class RadioOptionContentDirective {\n /** The `value` of the option this content belongs to. */\n readonly value = input.required<string>({ alias: 'uiRadioOptionContent' });\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import { Component, ChangeDetectionStrategy, contentChildren, input, output, signal, computed, effect, forwardRef, TemplateRef, inject } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { AbstractControl, ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, ValidationErrors, Validator } from '@angular/forms';\nimport { FieldIssue, UiFieldValidity, createFieldReveal, issueToErrors, requiredIssue } from '@forgeroute/ui/core';\nimport { RadioComponent } from './radio.component';\nimport { RadioOptionContentDirective } from './radio-option-content.directive';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\nexport interface RadioOption {\n value: string;\n label: string;\n description?: string;\n disabled?: boolean;\n /** `data-testid` of this option's native radio input (e.g. for end-to-end tests); none when omitted. */\n testId?: string;\n /**\n * Library source 2026-11-04, not yet published. Icon drawn in front of the option's label: a `<ui-icon>` key (`cup`, `wrench`, ...) or a raw SVG\n * path. Decorative (`aria-hidden`); none when omitted.\n */\n icon?: string;\n /**\n * Library source 2026-11-05, not yet published. Link shown after the option's description (e.g. \"Read the terms\"): only http(s), mailto, tel and\n * in-app paths are linked, an absolute http(s) address opens in a new tab. `testId` is the link's `data-testid`. None when omitted.\n */\n descriptionLink?: { label: string; url: string; testId?: string };\n}\n\n/**\n * Group of native radio buttons inside a `<fieldset>` (+ `<legend>` = `label`), a ControlValueAccessor (string value, `''`\n * = nothing selected). Arrow keys move and select natively because all radios share one `name`.\n * Built-in validation: `required` -> \"<label> is required.\"; a non-empty value that is not one of the `options` ->\n * \"Select a valid option.\" (not checked while `options` is empty). Disabled groups are never invalid.\n *\n * Option content (`<ng-template uiRadioOptionContent=\"value\">`) is rendered right under its option, inside the fieldset, so the layout and\n * keyboard flow stay as they are. Because it is not a radio, it is exposed as its own `role=\"group\"` named by that option's label\n * (`aria-labelledby` = the radio's label id, e.g. \"Deliver, group\") instead of being read as part of the radio group. Groups without\n * templates render no extra attributes or ids.\n *\n * Validity API (same on every ui input): Angular `Validator`, signals `invalid` + `errorMessage`, `invalidChange` output,\n * provides `UiFieldValidity`. Messages (built-in and a host `[error]`) show only after the group lost focus; `[showErrors]=\"true\"` also reveals it on an untouched group.\n */\n@Component({\n selector: 'ui-radio-group',\n standalone: true,\n imports: [RadioComponent, NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RadioGroupComponent),\n multi: true,\n }, {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => RadioGroupComponent),\n multi: true,\n }, {\n provide: UiFieldValidity,\n useExisting: forwardRef(() => RadioGroupComponent),\n }],\n template: `\n <fieldset\n class=\"rg-field\"\n role=\"radiogroup\"\n [class.rg-error]=\"_activeError()\"\n [class.rg-disabled]=\"disabled()\"\n [disabled]=\"disabled()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"_activeError() ? 'true' : null\"\n [attr.aria-describedby]=\"(_activeError() || hint()) ? _descId : null\"\n (focusout)=\"onFocusOut($event)\">\n @if (label()) {\n <legend class=\"rg-label\">\n {{ label() }}\n @if (required()) { <span class=\"rg-required\" aria-hidden=\"true\">*</span> }\n </legend>\n }\n <div class=\"rg-options\" [class.rg-horizontal]=\"orientation() === 'horizontal'\">\n @for (opt of options(); track opt.value) {\n <ui-radio\n [name]=\"_name\"\n [value]=\"opt.value\"\n [label]=\"opt.label\"\n [description]=\"opt.description ?? ''\"\n [icon]=\"opt.icon ?? ''\"\n [linkLabel]=\"opt.descriptionLink?.label ?? ''\"\n [linkUrl]=\"opt.descriptionLink?.url ?? ''\"\n [linkTestId]=\"opt.descriptionLink?.testId ?? ''\"\n [checked]=\"_value() === opt.value\"\n [disabled]=\"disabled() || !!opt.disabled\"\n [invalid]=\"!!_activeError()\"\n [describedBy]=\"(_activeError() || hint()) ? _descId : ''\"\n [controls]=\"(_value() === opt.value && _nestedContent().has(opt.value)) ? _nestedId : ''\"\n [labelId]=\"_nestedContent().has(opt.value) ? _optionLabelId($index) : ''\"\n [testId]=\"opt.testId ?? ''\"\n (selected)=\"onSelect($event)\" />\n @if (_value() === opt.value && _nestedContent().get(opt.value); as nested) {\n <div class=\"rg-nested\" role=\"group\" [id]=\"_nestedId\" [attr.aria-labelledby]=\"opt.label ? _optionLabelId($index) : null\"><ng-container [ngTemplateOutlet]=\"nested\" /></div>\n }\n }\n </div>\n @if (_activeError()) {\n <p class=\"rg-desc rg-desc-error\" [id]=\"_descId\" role=\"alert\">{{ _activeError() }}</p>\n } @else if (hint()) {\n <p class=\"rg-desc\" [id]=\"_descId\">{{ hint() }}</p>\n }\n </fieldset>\n `,\n styles: [`\n :host { display: block; }\n\n .rg-field { display: flex; flex-direction: column; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }\n .rg-label { padding: 0; margin-bottom: 6px; font-size: 0.8125rem; font-weight: 600; color: #374151; line-height: 1; }\n .rg-required { color: #dc2626; margin-left: 2px; }\n\n .rg-options { display: flex; flex-direction: column; gap: 10px; }\n .rg-options.rg-horizontal { flex-direction: row; flex-wrap: wrap; gap: 8px 20px; }\n\n /* Content under the selected option (uiRadioOptionContent): indented under the label (20px dot + 9px gap), a full row when horizontal. */\n .rg-nested { padding-left: 29px; min-width: 0; }\n .rg-options.rg-horizontal .rg-nested { flex: 1 0 100%; }\n\n .rg-disabled { cursor: not-allowed; }\n\n .rg-desc { margin: 0; font-size: 0.75rem; line-height: 1.4; color: #64748b; }\n .rg-desc-error { color: #dc2626; }\n\n @media (pointer: coarse), (max-width: 480px) { .rg-options { gap: 0; } .rg-options.rg-horizontal { gap: 0 20px; } } /* each radio row is now 44px high, so the rows touch; no gap between them */\n `],\n})\nexport class RadioGroupComponent implements ControlValueAccessor, Validator, UiFieldValidity {\n private readonly _labels = inject(UiLabelsService);\n readonly label = input('');\n readonly options = input<RadioOption[]>([]);\n readonly required = input(false);\n readonly hint = input('');\n readonly error = input('');\n /** The host's \"tried to submit\" flag (e.g. after a failed Save click). `true` reveals the message of an untouched field at once (the field also shows it after the user left THIS field); switching it from true back to false forgets that the field was left. */\n readonly showErrors = input(false);\n readonly orientation = input<'vertical' | 'horizontal'>('vertical');\n /** Native `name` shared by the radios; a unique one is generated when omitted. */\n readonly name = input('');\n\n /** `<ng-template uiRadioOptionContent=\"value\">` children: content shown under that option while it is selected. */\n private readonly _optionContent = contentChildren(RadioOptionContentDirective);\n protected readonly _nestedContent = computed(() => {\n const byValue = new Map<string, TemplateRef<unknown>>();\n for (const content of this._optionContent()) byValue.set(content.value(), content.template);\n return byValue;\n });\n\n readonly _disabledInput = input(false, { alias: 'disabled' });\n private readonly _cvaDisabled = signal(false);\n protected readonly disabled = computed(() => this._disabledInput() || this._cvaDisabled());\n\n private readonly _generatedName = `rg-${Math.random().toString(36).slice(2, 8)}`;\n protected get _name(): string { return this.name() || this._generatedName; }\n protected readonly _descId = `${this._generatedName}-desc`;\n /** Id of the content block under the selected option; that radio points at it with aria-controls. */\n protected readonly _nestedId = `${this._generatedName}-nested`;\n /** Id of an option's label text (set on the radio only for options that have nested content); the nested group is named by it. */\n protected _optionLabelId(index: number): string { return `${this._generatedName}-opt-${index}-label`; }\n protected readonly _value = signal('');\n\n private readonly _reveal = createFieldReveal(this.showErrors);\n private readonly _issue = computed(() => this._check(this._value()));\n /** True while the value breaks a built-in rule or the host passed an `[error]`. */\n readonly invalid = computed(() => !!this.error() || !!this._issue());\n /** Message of the first broken built-in rule ('' when valid), shown or not. */\n readonly errorMessage = computed(() => this._issue()?.message ?? '');\n /** Emits whenever the field becomes invalid / valid. */\n readonly invalidChange = output<boolean>();\n protected readonly _activeError = computed(() => this._reveal.revealed() ? (this.error() || this.errorMessage()) : '');\n private _onValidatorChange = () => {};\n\n constructor() {\n effect(() => { this.invalidChange.emit(this.invalid()); });\n }\n\n /** Re-run the form control's validation when a rule input (required, options) changes. */\n ngOnChanges() { this._onValidatorChange(); }\n\n validate(control: AbstractControl): ValidationErrors | null {\n const v = control.value;\n return issueToErrors(this._check(v == null ? '' : String(v)));\n }\n registerOnValidatorChange(fn: () => void) { this._onValidatorChange = fn; }\n\n private _onChange = (_: string) => {};\n private _onTouched = () => {};\n\n writeValue(val: string) { this._value.set(val ?? ''); }\n registerOnChange(fn: (v: string) => void) { this._onChange = fn; }\n registerOnTouched(fn: () => void) { this._onTouched = fn; }\n setDisabledState(d: boolean) { this._cvaDisabled.set(d); }\n\n protected onSelect(value: string) {\n this._value.set(value);\n this._onChange(value);\n }\n\n /** Touched once focus leaves the whole group (moving between its radios does not count). */\n protected onFocusOut(event: FocusEvent) {\n const next = event.relatedTarget as Node | null;\n if (next && (event.currentTarget as HTMLElement).contains(next)) return;\n this._onTouched();\n this._reveal.touched.set(true);\n }\n\n private _check(value: string): FieldIssue | null {\n if (this.disabled()) return null;\n if (!value) return this.required() ? requiredIssue(this.label()) : null;\n const opts = this.options();\n if (opts.length > 0 && !opts.some(o => o.value === value)) return { key: 'option', message: this._labels.t('common.selectValidOption') };\n return null;\n }\n}\n"],"mappings":";;;;;;;AAmHA,IAAa,iBAAb,MAAa,eAAc;CA1G3B,cAAA;EA2GqB,KAAA,SAAS,OAAO,eAAe;EACzC,KAAA,QAAQ,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EACjB,KAAA,cAAc,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA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A,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,gBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,2BAA2B,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,gBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,eAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,eAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"forgeroute-ui-radio.mjs","names":[],"sources":["../../../projects/forgeroute-ui/radio/src/lib/radio/radio.component.ts","../../../projects/forgeroute-ui/radio/src/lib/radio/radio-option-content.directive.ts","../../../projects/forgeroute-ui/radio/src/lib/radio/radio-group.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, input, output, computed, inject } from '@angular/core';\nimport { iconPath } from '@forgeroute/ui/icon';\nimport { opensInNewTab, safeLinkHref } from '@forgeroute/ui/utils';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\n/**\n * Single native radio button (visual tokens of `ui-checkbox`). Normally rendered by `ui-radio-group`; usable standalone\n * when the host manages the shared `name` and the `checked` state itself.\n */\n@Component({\n selector: 'ui-radio',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <label class=\"rd-wrap\" [class.rd-disabled]=\"disabled()\">\n <span class=\"rd-dot\" [class.rd-checked]=\"checked()\" [class.rd-invalid]=\"invalid()\" [class.rd-disabled]=\"disabled()\">\n @if (checked()) { <span class=\"rd-core\"></span> }\n </span>\n <input\n type=\"radio\"\n class=\"rd-hidden\"\n [name]=\"name()\"\n [value]=\"value()\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [attr.data-testid]=\"testId() || null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"_labelledBy()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"_describedByIds()\"\n [attr.aria-controls]=\"controls() || null\"\n (change)=\"onChange($event)\"\n />\n @if (_iconD(); as d) {\n <!-- Optional icon in front of the label (library source 2026-11-04): decorative, so the radio's accessible name is unchanged. -->\n <svg class=\"rd-icon\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path [attr.d]=\"d\" /></svg>\n }\n <span class=\"rd-text\">\n @if (label()) { <span class=\"rd-label\" [id]=\"_labelId()\">{{ label() }}</span> }\n @if (description()) { <span class=\"rd-description\" [id]=\"_descriptionId\">{{ description() }}</span> }\n @if (_linkHref(); as href) {\n <!-- Optional link after the description (library source 2026-11-05): a real anchor, so it is its own tab stop; clicking it follows the link and never selects the radio. -->\n <a class=\"rd-link\" [attr.href]=\"href\" [attr.target]=\"_linkNewTab() ? '_blank' : null\" [attr.rel]=\"_linkNewTab() ? 'noopener noreferrer' : null\" [attr.data-testid]=\"linkTestId() || null\">{{ linkLabel() }}@if (_linkNewTab()) { <span class=\"rd-sr\">{{ labels.t('dataTable.opensInNewTab') }}</span> }</a>\n }\n <ng-content />\n </span>\n </label>\n `,\n styles: [`\n :host { display: block; }\n\n .rd-wrap {\n position: relative; /* contains the absolutely positioned hidden input, so it can never extend a scroll container or the page */\n display: inline-flex; align-items: flex-start; gap: 9px;\n vertical-align: top; /* an inline-flex box sits on the text baseline; the dot's baseline changes when it is selected, which moved the row 4px */\n cursor: pointer; user-select: none;\n &.rd-disabled { cursor: not-allowed; opacity: 0.5; }\n }\n\n .rd-hidden {\n position: absolute; width: 1px; height: 1px;\n margin: -1px; padding: 0; overflow: hidden;\n clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;\n }\n\n .rd-wrap:has(.rd-hidden:focus-visible) .rd-dot {\n outline: 2px solid #3b82f6;\n outline-offset: 2px;\n }\n\n /* Touch targets: the real input becomes a transparent 44px square centred on the 20px dot (desktop unchanged). */\n @media (pointer: coarse), (max-width: 480px) {\n .rd-wrap { position: relative; }\n .rd-hidden {\n width: 44px; height: 44px; margin: 0; clip: auto; overflow: visible;\n left: -12px; top: 0;\n opacity: 0; cursor: pointer; z-index: 1;\n }\n .rd-wrap.rd-disabled .rd-hidden { cursor: not-allowed; }\n /* The whole label row is the target: >= 44px high. The 12px padding keeps the 20px dot level with the first text line (a multi-line label just grows). */\n .rd-wrap { box-sizing: border-box; min-height: 44px; padding: 12px 0; }\n }\n\n .rd-dot {\n flex-shrink: 0; width: 20px; height: 20px; box-sizing: border-box;\n border: 2px solid #7c8ba1; border-radius: 50%; background: #fff;\n display: flex; align-items: center; justify-content: center;\n transition: background 0.12s, border-color 0.12s;\n\n &.rd-checked { background: #3b82f6; border-color: #3b82f6; }\n &.rd-invalid:not(.rd-checked) { border-color: #ef4444; }\n &:not(.rd-checked):not(.rd-disabled) {\n .rd-wrap:hover & { border-color: #3b82f6; }\n }\n }\n .rd-core { width: 8px; height: 8px; border-radius: 50%; background: #fff; }\n\n @media (max-width: 640px), (pointer: coarse) {\n .rd-dot { position: relative; }\n .rd-dot::after { content: ''; position: absolute; inset: -12px; }\n }\n\n /* Optional icon in front of the label: aligned with the first text line (0.875rem x 1.4), never shrinks, dimmed with a disabled option by the wrap's opacity. */\n .rd-icon { flex-shrink: 0; margin-top: 1px; color: #64748b; }\n .rd-text { display: flex; flex-direction: column; gap: 2px; }\n .rd-label { font-size: 0.875rem; color: #334155; line-height: 1.4; }\n .rd-description { font-size: 0.75rem; color: #64748b; line-height: 1.4; }\n /* Target size (WCAG 2.5.8 >= 24px; 44px on touch / phones): a min-height with an equal negative margin on both sides, so the hit area grows without moving the layout. Only rendered with a link. */\n .rd-link { font-size: 0.75rem; line-height: 1.4; color: #2563eb; text-decoration: underline; align-self: flex-start; cursor: pointer; display: inline-flex; align-items: center; min-height: 24px; box-sizing: border-box; padding: 0; margin: -3.6px 0; } /* (24px - 16.8px line) / 2 per side: the box is 24px tall but takes up one text line of layout */\n @media (pointer: coarse), (max-width: 480px) { .rd-link { min-height: 44px; margin: -13.6px 0; } } /* (44px - 16.8px line) / 2 per side */\n .rd-link:hover { color: #1d4ed8; }\n .rd-link:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; border-radius: 2px; }\n .rd-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }\n `],\n})\nexport class RadioComponent {\n protected readonly labels = inject(UiLabelsService);\n readonly label = input('');\n readonly description = input('');\n /**\n * Library source 2026-11-05, not yet published. Optional link shown after the description: `linkLabel` is its text, `linkUrl` its address. Only `http:`, `https:`,\n * `mailto:` and `tel:` addresses and in-app paths (`/...`, `#...`) are linked; anything else (`javascript:`, `data:`, empty) draws nothing. An absolute http(s)\n * address opens in a new tab (`noopener noreferrer`, with \"(opens in a new tab)\" for screen readers); the others follow in the same tab. The radio's\n * accessible name stays the label only.\n */\n readonly linkLabel = input('');\n readonly linkUrl = input('');\n /** `data-testid` of the link; none when empty. */\n readonly linkTestId = input('');\n /**\n * Library source 2026-11-04, not yet published. Optional icon drawn in front of the label: a `<ui-icon>` key (`cup`, `wrench`, `card`, ...) or a raw 24x24\n * stroke SVG path (`M12 5v14 M5 12h14`). Decorative (`aria-hidden`), so the accessible name stays the label. Empty (default), an unknown key or\n * text that is not a path = nothing is drawn and the DOM is unchanged.\n */\n readonly icon = input('');\n /** Accessible name when there is no visible `label`. */\n readonly ariaLabel = input('');\n /** `data-testid` of the native radio input; none when empty. */\n readonly testId = input('');\n readonly value = input('');\n /** Radios with the same `name` form one keyboard (arrow key) group. */\n readonly name = input('');\n readonly checked = input(false);\n readonly invalid = input(false);\n /** Id(s) of the element(s) describing the group (hint / error). */\n readonly describedBy = input('');\n /** Id of an element this radio reveals while selected (`aria-controls`); no attribute when empty. */\n readonly controls = input('');\n /** Public so a host template can bind `[disabled]` (a protected input fails strict template type-checking). */\n readonly _disabledInput = input(false, { alias: 'disabled' });\n protected readonly disabled = this._disabledInput;\n\n /** Path of the icon: a known icon key, else the text itself when it looks like an SVG path (drawing commands and numbers only), else none. */\n protected readonly _iconD = computed((): string | null => {\n const v = this.icon().trim();\n if (!v) return null;\n return iconPath(v) ?? (/^[Mm][\\d\\s.,\\-MmLlHhVvCcSsQqTtAaZz]+$/.test(v) ? v : null);\n });\n\n /** The address to link, or null when the link is not drawn (no label, empty or unsafe address: see [safeLinkHref]). */\n protected readonly _linkHref = computed((): string | null => (this.linkLabel().trim() ? safeLinkHref(this.linkUrl()) : null));\n protected readonly _linkNewTab = computed(() => opensInNewTab(this._linkHref()));\n\n /** Id of the visible label text. Optional: a host (e.g. `ui-radio-group`) can set it to point another element at the label with `aria-labelledby`; a unique id is generated when empty. */\n readonly labelId = input('');\n private readonly _generatedLabelId = `rd-${Math.random().toString(36).slice(2, 8)}-label`;\n protected readonly _labelId = computed(() => this.labelId() || this._generatedLabelId);\n /** With a description or link inside the <label>, the accessible name would read \"Email We send a message\": name the input by the label text only. */\n protected readonly _labelledBy = computed(() => (this.label() && (this.description() || this._linkHref()) && !this.ariaLabel() ? this._labelId() : null));\n protected readonly _descriptionId = `rd-${Math.random().toString(36).slice(2, 8)}-desc`;\n /** Group hint/error id plus the option's own description (kept out of the label so the accessible name is label-only). */\n protected readonly _describedByIds = computed(() => {\n const ids = [this.describedBy(), this.description() ? this._descriptionId : ''].filter(Boolean).join(' ');\n return ids || null;\n });\n\n /** Emits the radio's `value` when the user selects it. */\n readonly selected = output<string>();\n\n protected onChange(event: Event) {\n if ((event.target as HTMLInputElement).checked) this.selected.emit(this.value());\n }\n}\n","import { Directive, TemplateRef, inject, input } from '@angular/core';\n\n/**\n * Content shown directly under ONE option of a `ui-radio-group`, only while that option is selected (e.g. an address form under\n * \"Ship to an alternate address\"). Put an `<ng-template>` inside the group and name the option's value:\n *\n * <ui-radio-group label=\"Delivery\" [options]=\"opts\" [(ngModel)]=\"method\">\n * <ng-template uiRadioOptionContent=\"SHIP\">\n * <ui-text-input label=\"Street\" ... />\n * </ng-template>\n * </ui-radio-group>\n *\n * Groups without such a template render exactly as before. The content is indented under the option's label; in a horizontal group it\n * takes a full row below the options. It lives inside the group's fieldset, so moving focus into it does not count as leaving the group.\n */\n@Directive({\n selector: 'ng-template[uiRadioOptionContent]',\n standalone: true,\n})\nexport class RadioOptionContentDirective {\n /** The `value` of the option this content belongs to. */\n readonly value = input.required<string>({ alias: 'uiRadioOptionContent' });\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import { Component, ChangeDetectionStrategy, contentChildren, input, output, signal, computed, effect, forwardRef, TemplateRef, inject } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { AbstractControl, ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, ValidationErrors, Validator } from '@angular/forms';\nimport { FieldIssue, UiFieldValidity, createFieldReveal, issueToErrors, requiredIssue } from '@forgeroute/ui/core';\nimport { RadioComponent } from './radio.component';\nimport { RadioOptionContentDirective } from './radio-option-content.directive';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\nexport interface RadioOption {\n value: string;\n label: string;\n description?: string;\n disabled?: boolean;\n /** `data-testid` of this option's native radio input (e.g. for end-to-end tests); none when omitted. */\n testId?: string;\n /**\n * Library source 2026-11-04, not yet published. Icon drawn in front of the option's label: a `<ui-icon>` key (`cup`, `wrench`, ...) or a raw SVG\n * path. Decorative (`aria-hidden`); none when omitted.\n */\n icon?: string;\n /**\n * Library source 2026-11-05, not yet published. Link shown after the option's description (e.g. \"Read the terms\"): only http(s), mailto, tel and\n * in-app paths are linked, an absolute http(s) address opens in a new tab. `testId` is the link's `data-testid`. None when omitted.\n */\n descriptionLink?: { label: string; url: string; testId?: string };\n}\n\n/**\n * Group of native radio buttons inside a `<fieldset>` (+ `<legend>` = `label`), a ControlValueAccessor (string value, `''`\n * = nothing selected). Arrow keys move and select natively because all radios share one `name`.\n * Built-in validation: `required` -> \"<label> is required.\"; a non-empty value that is not one of the `options` ->\n * \"Select a valid option.\" (not checked while `options` is empty). Disabled groups are never invalid.\n *\n * Option content (`<ng-template uiRadioOptionContent=\"value\">`) is rendered right under its option, inside the fieldset, so the layout and\n * keyboard flow stay as they are. Because it is not a radio, it is exposed as its own `role=\"group\"` named by that option's label\n * (`aria-labelledby` = the radio's label id, e.g. \"Deliver, group\") instead of being read as part of the radio group. Groups without\n * templates render no extra attributes or ids.\n *\n * Validity API (same on every ui input): Angular `Validator`, signals `invalid` + `errorMessage`, `invalidChange` output,\n * provides `UiFieldValidity`. Messages (built-in and a host `[error]`) show only after the group lost focus; `[showErrors]=\"true\"` also reveals it on an untouched group.\n */\n@Component({\n selector: 'ui-radio-group',\n standalone: true,\n imports: [RadioComponent, NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RadioGroupComponent),\n multi: true,\n }, {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => RadioGroupComponent),\n multi: true,\n }, {\n provide: UiFieldValidity,\n useExisting: forwardRef(() => RadioGroupComponent),\n }],\n template: `\n <fieldset\n class=\"rg-field\"\n role=\"radiogroup\"\n [class.rg-error]=\"_activeError()\"\n [class.rg-disabled]=\"disabled()\"\n [disabled]=\"disabled()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"_activeError() ? 'true' : null\"\n [attr.aria-describedby]=\"(_activeError() || hint()) ? _descId : null\"\n (focusout)=\"onFocusOut($event)\">\n @if (label()) {\n <legend class=\"rg-label\">\n {{ label() }}\n @if (required()) { <span class=\"rg-required\" aria-hidden=\"true\">*</span> }\n </legend>\n }\n <div class=\"rg-options\" [class.rg-horizontal]=\"orientation() === 'horizontal'\">\n @for (opt of options(); track opt.value) {\n <ui-radio\n [name]=\"_name\"\n [value]=\"opt.value\"\n [label]=\"opt.label\"\n [description]=\"opt.description ?? ''\"\n [icon]=\"opt.icon ?? ''\"\n [linkLabel]=\"opt.descriptionLink?.label ?? ''\"\n [linkUrl]=\"opt.descriptionLink?.url ?? ''\"\n [linkTestId]=\"opt.descriptionLink?.testId ?? ''\"\n [checked]=\"_value() === opt.value\"\n [disabled]=\"disabled() || !!opt.disabled\"\n [invalid]=\"!!_activeError()\"\n [describedBy]=\"(_activeError() || hint()) ? _descId : ''\"\n [controls]=\"(_value() === opt.value && _nestedContent().has(opt.value)) ? _nestedId : ''\"\n [labelId]=\"_nestedContent().has(opt.value) ? _optionLabelId($index) : ''\"\n [testId]=\"opt.testId ?? ''\"\n (selected)=\"onSelect($event)\" />\n @if (_value() === opt.value && _nestedContent().get(opt.value); as nested) {\n <div class=\"rg-nested\" role=\"group\" [id]=\"_nestedId\" [attr.aria-labelledby]=\"opt.label ? _optionLabelId($index) : null\"><ng-container [ngTemplateOutlet]=\"nested\" /></div>\n }\n }\n </div>\n @if (_activeError()) {\n <p class=\"rg-desc rg-desc-error\" [id]=\"_descId\" role=\"alert\">{{ _activeError() }}</p>\n } @else if (hint()) {\n <p class=\"rg-desc\" [id]=\"_descId\">{{ hint() }}</p>\n }\n </fieldset>\n `,\n styles: [`\n :host { display: block; }\n\n .rg-field { display: flex; flex-direction: column; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }\n .rg-label { padding: 0; margin-bottom: 6px; font-size: 0.8125rem; font-weight: 600; color: #374151; line-height: 1; }\n .rg-required { color: #dc2626; margin-left: 2px; }\n\n .rg-options { display: flex; flex-direction: column; gap: 10px; }\n .rg-options.rg-horizontal { flex-direction: row; flex-wrap: wrap; gap: 8px 20px; }\n\n /* Content under the selected option (uiRadioOptionContent): indented under the label (20px dot + 9px gap), a full row when horizontal. */\n .rg-nested { padding-left: 29px; min-width: 0; }\n .rg-options.rg-horizontal .rg-nested { flex: 1 0 100%; }\n\n .rg-disabled { cursor: not-allowed; }\n\n .rg-desc { margin: -6px 0 0; font-size: 0.75rem; line-height: 1.4; color: #64748b; }\n .rg-desc-error { color: #dc2626; }\n\n @media (pointer: coarse), (max-width: 480px) { .rg-options { gap: 0; } .rg-options.rg-horizontal { gap: 0 20px; } } /* each radio row is now 44px high, so the rows touch; no gap between them */\n `],\n})\nexport class RadioGroupComponent implements ControlValueAccessor, Validator, UiFieldValidity {\n private readonly _labels = inject(UiLabelsService);\n readonly label = input('');\n readonly options = input<RadioOption[]>([]);\n readonly required = input(false);\n readonly hint = input('');\n readonly error = input('');\n /** The host's \"tried to submit\" flag (e.g. after a failed Save click). `true` reveals the message of an untouched field at once (the field also shows it after the user left THIS field); switching it from true back to false forgets that the field was left. */\n readonly showErrors = input(false);\n readonly orientation = input<'vertical' | 'horizontal'>('vertical');\n /** Native `name` shared by the radios; a unique one is generated when omitted. */\n readonly name = input('');\n\n /** `<ng-template uiRadioOptionContent=\"value\">` children: content shown under that option while it is selected. */\n private readonly _optionContent = contentChildren(RadioOptionContentDirective);\n protected readonly _nestedContent = computed(() => {\n const byValue = new Map<string, TemplateRef<unknown>>();\n for (const content of this._optionContent()) byValue.set(content.value(), content.template);\n return byValue;\n });\n\n readonly _disabledInput = input(false, { alias: 'disabled' });\n private readonly _cvaDisabled = signal(false);\n protected readonly disabled = computed(() => this._disabledInput() || this._cvaDisabled());\n\n private readonly _generatedName = `rg-${Math.random().toString(36).slice(2, 8)}`;\n protected get _name(): string { return this.name() || this._generatedName; }\n protected readonly _descId = `${this._generatedName}-desc`;\n /** Id of the content block under the selected option; that radio points at it with aria-controls. */\n protected readonly _nestedId = `${this._generatedName}-nested`;\n /** Id of an option's label text (set on the radio only for options that have nested content); the nested group is named by it. */\n protected _optionLabelId(index: number): string { return `${this._generatedName}-opt-${index}-label`; }\n protected readonly _value = signal('');\n\n private readonly _reveal = createFieldReveal(this.showErrors);\n private readonly _issue = computed(() => this._check(this._value()));\n /** True while the value breaks a built-in rule or the host passed an `[error]`. */\n readonly invalid = computed(() => !!this.error() || !!this._issue());\n /** Message of the first broken built-in rule ('' when valid), shown or not. */\n readonly errorMessage = computed(() => this._issue()?.message ?? '');\n /** Emits whenever the field becomes invalid / valid. */\n readonly invalidChange = output<boolean>();\n protected readonly _activeError = computed(() => this._reveal.revealed() ? (this.error() || this.errorMessage()) : '');\n private _onValidatorChange = () => {};\n\n constructor() {\n effect(() => { this.invalidChange.emit(this.invalid()); });\n }\n\n /** Re-run the form control's validation when a rule input (required, options) changes. */\n ngOnChanges() { this._onValidatorChange(); }\n\n validate(control: AbstractControl): ValidationErrors | null {\n const v = control.value;\n return issueToErrors(this._check(v == null ? '' : String(v)));\n }\n registerOnValidatorChange(fn: () => void) { this._onValidatorChange = fn; }\n\n private _onChange = (_: string) => {};\n private _onTouched = () => {};\n\n writeValue(val: string) { this._value.set(val ?? ''); }\n registerOnChange(fn: (v: string) => void) { this._onChange = fn; }\n registerOnTouched(fn: () => void) { this._onTouched = fn; }\n setDisabledState(d: boolean) { this._cvaDisabled.set(d); }\n\n protected onSelect(value: string) {\n this._value.set(value);\n this._onChange(value);\n }\n\n /** Touched once focus leaves the whole group (moving between its radios does not count). */\n protected onFocusOut(event: FocusEvent) {\n const next = event.relatedTarget as Node | null;\n if (next && (event.currentTarget as HTMLElement).contains(next)) return;\n this._onTouched();\n this._reveal.touched.set(true);\n }\n\n private _check(value: string): FieldIssue | null {\n if (this.disabled()) return null;\n if (!value) return this.required() ? requiredIssue(this.label()) : null;\n const opts = this.options();\n if (opts.length > 0 && !opts.some(o => o.value === value)) return { key: 'option', message: this._labels.t('common.selectValidOption') };\n return null;\n }\n}\n"],"mappings":";;;;;;;AAmHA,IAAa,iBAAb,MAAa,eAAc;CA1G3B,cAAA;EA2GqB,KAAA,SAAS,OAAO,eAAe;EACzC,KAAA,QAAQ,MAAM,IA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A;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,gBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,2BAA2B,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,gBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,eAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,eAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
@@ -295,7 +295,7 @@ var SelectComponent = class SelectComponent {
295
295
  </div>
296
296
  `,
297
297
  isInline: true,
298
- styles: [":host{display:block}.sl-field{display:flex;flex-direction:column;gap:6px}.sl-label{font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.sl-required{color:#dc2626;margin-left:2px}.sl-wrap{position:relative;display:flex;align-items:center}.sl-select{width:100%;box-sizing:border-box;padding:9px 32px 9px 12px;font-size:.875rem;font-family:inherit;color:#1e293b;background:#fff;border:1px solid #7c8ba1;border-radius:8px;outline:none;appearance:none;cursor:pointer;transition:border-color .15s,box-shadow .15s}.sl-select:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.sl-error .sl-select{border-color:#ef4444}.sl-error .sl-select:focus{box-shadow:0 0 0 3px #ef44441f}.sl-disabled .sl-select{opacity:.5;cursor:not-allowed}.sl-select-sm{padding:6px 32px 6px 12px;font-size:.8125rem;border-radius:6px}.sl-chevron{position:absolute;right:10px;pointer-events:none;color:#64748b;flex-shrink:0}.sl-desc{margin:0;font-size:.75rem;line-height:1.4;color:#64748b}.sl-desc-error{color:#dc2626}@media(pointer:coarse),(max-width:480px){.sl-select{font-size:1rem}}@media(pointer:coarse),(max-width:480px){.sl-select,.sl-select-sm{min-height:44px}}\n"],
298
+ styles: [":host{display:block}.sl-field{display:flex;flex-direction:column;gap:6px}.sl-label{font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.sl-required{color:#dc2626;margin-left:2px}.sl-wrap{position:relative;display:flex;align-items:center}.sl-select{width:100%;box-sizing:border-box;padding:9px 32px 9px 12px;font-size:.875rem;font-family:inherit;color:#1e293b;background:#fff;border:1px solid #7c8ba1;border-radius:8px;outline:none;appearance:none;cursor:pointer;transition:border-color .15s,box-shadow .15s}.sl-select:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.sl-error .sl-select{border-color:#ef4444}.sl-error .sl-select:focus{box-shadow:0 0 0 3px #ef44441f}.sl-disabled .sl-select{opacity:.5;cursor:not-allowed}.sl-select-sm{padding:6px 32px 6px 12px;font-size:.8125rem;border-radius:6px}.sl-chevron{position:absolute;right:10px;pointer-events:none;color:#64748b;flex-shrink:0}.sl-desc{margin:-6px 0 0;font-size:.75rem;line-height:1.4;color:#64748b}.sl-desc-error{color:#dc2626}@media(pointer:coarse),(max-width:480px){.sl-select{font-size:1rem}}@media(pointer:coarse),(max-width:480px){.sl-select,.sl-select-sm{min-height:44px}}\n"],
299
299
  changeDetection: i0.ChangeDetectionStrategy.OnPush
300
300
  });
301
301
  }
@@ -366,7 +366,7 @@ i0.ɵɵngDeclareClassMetadata({
366
366
  }
367
367
  </div>
368
368
  `,
369
- styles: [":host{display:block}.sl-field{display:flex;flex-direction:column;gap:6px}.sl-label{font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.sl-required{color:#dc2626;margin-left:2px}.sl-wrap{position:relative;display:flex;align-items:center}.sl-select{width:100%;box-sizing:border-box;padding:9px 32px 9px 12px;font-size:.875rem;font-family:inherit;color:#1e293b;background:#fff;border:1px solid #7c8ba1;border-radius:8px;outline:none;appearance:none;cursor:pointer;transition:border-color .15s,box-shadow .15s}.sl-select:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.sl-error .sl-select{border-color:#ef4444}.sl-error .sl-select:focus{box-shadow:0 0 0 3px #ef44441f}.sl-disabled .sl-select{opacity:.5;cursor:not-allowed}.sl-select-sm{padding:6px 32px 6px 12px;font-size:.8125rem;border-radius:6px}.sl-chevron{position:absolute;right:10px;pointer-events:none;color:#64748b;flex-shrink:0}.sl-desc{margin:0;font-size:.75rem;line-height:1.4;color:#64748b}.sl-desc-error{color:#dc2626}@media(pointer:coarse),(max-width:480px){.sl-select{font-size:1rem}}@media(pointer:coarse),(max-width:480px){.sl-select,.sl-select-sm{min-height:44px}}\n"]
369
+ styles: [":host{display:block}.sl-field{display:flex;flex-direction:column;gap:6px}.sl-label{font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.sl-required{color:#dc2626;margin-left:2px}.sl-wrap{position:relative;display:flex;align-items:center}.sl-select{width:100%;box-sizing:border-box;padding:9px 32px 9px 12px;font-size:.875rem;font-family:inherit;color:#1e293b;background:#fff;border:1px solid #7c8ba1;border-radius:8px;outline:none;appearance:none;cursor:pointer;transition:border-color .15s,box-shadow .15s}.sl-select:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.sl-error .sl-select{border-color:#ef4444}.sl-error .sl-select:focus{box-shadow:0 0 0 3px #ef44441f}.sl-disabled .sl-select{opacity:.5;cursor:not-allowed}.sl-select-sm{padding:6px 32px 6px 12px;font-size:.8125rem;border-radius:6px}.sl-chevron{position:absolute;right:10px;pointer-events:none;color:#64748b;flex-shrink:0}.sl-desc{margin:-6px 0 0;font-size:.75rem;line-height:1.4;color:#64748b}.sl-desc-error{color:#dc2626}@media(pointer:coarse),(max-width:480px){.sl-select{font-size:1rem}}@media(pointer:coarse),(max-width:480px){.sl-select,.sl-select-sm{min-height:44px}}\n"]
370
370
  }]
371
371
  }],
372
372
  ctorParameters: () => [],
@@ -1 +1 @@
1
- {"version":3,"file":"forgeroute-ui-select.mjs","names":[],"sources":["../../../projects/forgeroute-ui/select/src/lib/select/select.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ElementRef, inject, input, output, signal, computed, effect, forwardRef, isDevMode } from '@angular/core';\nimport { AbstractControl, ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, ValidationErrors, Validator } from '@angular/forms';\nimport { FieldIssue, UiFieldValidity, createFieldReveal, mergeDescribedBy, issueToErrors, requiredIssue } from '@forgeroute/ui/core';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\n/**\n * One choice. `V` defaults to `string`, so existing `SelectOption[]` code is unchanged; `ui-select` itself accepts\n * `SelectOption<string | number>[]` (numeric values for `valueType=\"number\"`).\n */\nexport interface SelectOption<V extends string | number = string> {\n value: V;\n label: string;\n /**\n * Optional longer explanation of this choice. The select shows the SELECTED option's description under the field (linked with\n * `aria-describedby`) and sets it as the option's `title` tooltip where the browser shows one. Options without it are unchanged.\n */\n description?: string;\n /**\n * Optional short tag shown after the label, e.g. `{ label: 'Pro plan', badge: 'Partner: Acme' }` is listed as \"Pro plan — Partner: Acme\".\n * A native `<option>` can only hold text (no elements, no colours), so the badge is a TEXT suffix joined by \" —\" (space, em dash,\n * space); screen readers read it as part of the option. The selected value, search-by-typing and the description are unaffected.\n * Options without it are unchanged.\n */\n badge?: string;\n /**\n * Optional: list the choice but make it unselectable (native `<option disabled>`). Use it for an entry that must stay visible because it is the\n * CURRENT value (e.g. an owner who is no longer active) but must not be picked. A disabled option that equals the current value is still shown as\n * selected and still counts as a valid value; the user just cannot choose it again after picking another option. Options without it are unchanged.\n */\n disabled?: boolean;\n}\n\n@Component({\n selector: 'ui-select',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectComponent),\n multi: true,\n }, {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => SelectComponent),\n multi: true,\n }, {\n provide: UiFieldValidity,\n useExisting: forwardRef(() => SelectComponent),\n }],\n template: `\n <div class=\"sl-field\" [class.sl-error]=\"_activeError()\" [class.sl-disabled]=\"disabled()\">\n @if (label() && !labelHidden()) {\n <label class=\"sl-label\" [for]=\"_selectId\">\n {{ label() }}\n @if (required()) { <span class=\"sl-required\" aria-hidden=\"true\">*</span> }\n </label>\n }\n <div class=\"sl-wrap\">\n <select\n [class]=\"'sl-select' + (size() === 'sm' ? ' sl-select-sm' : '')\"\n [id]=\"_selectId\"\n [attr.name]=\"inputName() || null\"\n [disabled]=\"disabled()\"\n [attr.required]=\"required() || null\"\n [attr.aria-label]=\"ariaLabel() || (labelHidden() ? label() : '') || null\"\n [attr.aria-invalid]=\"_activeError() ? 'true' : null\"\n [attr.aria-describedby]=\"_describedBy() || null\"\n (change)=\"onChange($event)\"\n (blur)=\"onBlur()\">\n @if (placeholder()) {\n <option value=\"\" [disabled]=\"true\" [selected]=\"_value() === ''\">{{ placeholder() }}</option>\n }\n @for (opt of options(); track opt.value; let i = $index) {\n <option [value]=\"_key(opt)\" [selected]=\"i === _selectedIndex()\" [disabled]=\"!!opt.disabled\" [attr.title]=\"opt.description || null\">{{ opt.badge ? opt.label + ' — ' + opt.badge : opt.label }}</option>\n }\n </select>\n <svg class=\"sl-chevron\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" aria-hidden=\"true\"><polyline points=\"6 9 12 15 18 9\"/></svg>\n </div>\n @if (_activeError()) {\n <p class=\"sl-desc sl-desc-error\" [id]=\"_selectId + '-desc'\" role=\"alert\">{{ _activeError() }}</p>\n } @else if (hint()) {\n <p class=\"sl-desc\" [id]=\"_selectId + '-desc'\">{{ hint() }}</p>\n }\n @if (_selectedDescription() && !_activeError()) {\n <p class=\"sl-desc sl-opt-desc\" [id]=\"_selectId + '-opt-desc'\">{{ _selectedDescription() }}</p>\n }\n </div>\n `,\n styles: [`\n :host { display: block; }\n\n .sl-field { display: flex; flex-direction: column; gap: 6px; }\n\n .sl-label {\n font-size: 0.8125rem; font-weight: 600; color: #374151; line-height: 1;\n }\n .sl-required { color: #dc2626; margin-left: 2px; }\n\n .sl-wrap { position: relative; display: flex; align-items: center; }\n\n .sl-select {\n width: 100%; box-sizing: border-box;\n padding: 9px 32px 9px 12px; font-size: 0.875rem; font-family: inherit;\n color: #1e293b; background: #fff;\n border: 1px solid #7c8ba1; border-radius: 8px;\n outline: none; appearance: none; cursor: pointer;\n transition: border-color 0.15s, box-shadow 0.15s;\n &:focus {\n border-color: #3b82f6;\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);\n }\n }\n\n .sl-error .sl-select {\n border-color: #ef4444;\n &:focus { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12); }\n }\n\n .sl-disabled .sl-select { opacity: 0.5; cursor: not-allowed; }\n\n .sl-select-sm { padding: 6px 32px 6px 12px; font-size: 0.8125rem; border-radius: 6px; }\n\n .sl-chevron {\n position: absolute; right: 10px; pointer-events: none;\n color: #64748b; flex-shrink: 0;\n }\n\n .sl-desc { margin: 0; font-size: 0.75rem; line-height: 1.4; color: #64748b; }\n .sl-desc-error { color: #dc2626; }\n\n @media (pointer: coarse), (max-width: 480px) { .sl-select { font-size: 1rem; } }\n /* Touch targets: 44px tall on touch devices and phones (the sm size too); desktop unchanged. */\n @media (pointer: coarse), (max-width: 480px) { .sl-select, .sl-select-sm { min-height: 44px; } }\n `],\n})\n/**\n * Native select (ControlValueAccessor).\n * Built-in validation: `required` -> \"<label> is required.\" when empty; a non-empty bound value that is not one of the\n * `options` values -> \"Select a valid option.\" (not checked while `options` is empty, so asynchronously loaded options\n * never flag a value early). Disabled selects are never invalid.\n *\n * Validity API (same on every ui input): the component is an Angular `Validator` (`ngModel` / `FormControl` report\n * `.invalid` / `.errors`), exposes the signals `invalid` + `errorMessage` and the `invalidChange` output, and provides\n * `UiFieldValidity` so a host can use `viewChildren(UiFieldValidity)`. Messages (built-in and a host `[error]`) are displayed only after the user left THIS field (blur); `[showErrors]=\"true\"` reveals the message of an untouched field at once, and setting it back to false clears the touched state.\n *\n * Numeric values (opt-in): option values may be numbers. By default (`valueType=\"string\"`) the control value is a STRING:\n * a numeric option value is coerced with `String()` (`{ value: 21 }` emits '21'; writing 21 or '21' selects it).\n * With `valueType=\"number\"` the control value is `number | null`: a selection emits the option's number, the placeholder /\n * nothing selected is `null`, and `writeValue` accepts a number or numeric string (null / undefined / NaN select the\n * placeholder). 0 is a real value (satisfies `required`). Matching compares `String()` forms in string mode and NUMBERS in\n * number mode (so `writeValue('21.0')` and `writeValue(' 21 ')` select the option 21). An option whose value\n * is not numeric (including blank text and 'Infinity') emits `null` and logs one dev-mode warning.\n * If two options match the same value (e.g. `1` and `'1'`) the FIRST one is shown as selected.\n * Example: `<ui-select valueType=\"number\" [options]=\"[{ value: 21, label: 'Net 21' }]\" [(ngModel)]=\"days\" />`.\n */\nexport class SelectComponent implements ControlValueAccessor, Validator, UiFieldValidity {\n readonly label = input('');\n /** Accessible name for a select with no visible label (e.g. an inline row or table-cell select). */\n readonly ariaLabel = input('');\n /**\n * Compact, label-less look for a filter above KPI cards or in a toolbar (library source 2026-11-04, not yet published). `true` renders NO visible\n * label row (no gap above the field; the `*` marker goes with it) while `label` stays the select's accessible name through `aria-label` and still\n * words the built-in \"<label> is required.\" message. An explicit `ariaLabel` wins over `label`. Default `false` = unchanged. Combine with\n * `size=\"sm\"`. (`ariaLabel` alone, with no `label`, was already the way to name a label-less select in a table cell.)\n */\n readonly labelHidden = input(false);\n /** Native `name` attribute placed on the inner `<select>` (e2e `[name=x]` selectors, autofill). None when empty. */\n readonly inputName = input('');\n readonly placeholder = input('');\n readonly options = input<SelectOption<string | number>[]>([]);\n /** What the control value is: `'string'` (default, numeric option values become strings) or `'number'` (`number | null`). */\n readonly valueType = input<'string' | 'number'>('string');\n readonly required = input(false);\n readonly hint = input('');\n /** Id(s) of an external element that also describes this control (e.g. one shared error text for a group of fields). Space separated; MERGED after the control's own hint / error id in `aria-describedby`, never replacing it. Empty = unchanged. */\n readonly ariaDescribedBy = input('');\n readonly error = input('');\n /** The host's \"tried to submit\" flag (e.g. after a failed Save click). `true` reveals the message of an untouched field at once (the field also shows it after the user left THIS field); switching it from true back to false forgets that the field was left. */\n readonly showErrors = input(false);\n readonly size = input<'default' | 'sm'>('default');\n\n readonly _disabledInput = input(false, { alias: 'disabled' });\n private readonly _cvaDisabled = signal(false);\n protected readonly disabled = computed(() => this._disabledInput() || this._cvaDisabled());\n\n protected readonly _value = signal('');\n /** Index of the first option matching the written / chosen value, or -1 (so only ONE option is selected even with duplicate keys). */\n protected readonly _selectedIndex = computed(() => {\n const v = this._norm(this._value());\n return this.options().findIndex(o => this._norm(String(o.value)) === v);\n });\n /** The selected option's `description` ('' when none is selected or it has none); hidden while an error shows. */\n protected readonly _selectedDescription = computed(() => this.options()[this._selectedIndex()]?.description ?? '');\n /** ids of the texts that describe the select: the error / hint, then the selected option's description. */\n protected readonly _describedBy = computed(() => mergeDescribedBy([\n (this._activeError() || this.hint()) ? this._selectId + '-desc' : '',\n (!this._activeError() && this._selectedDescription()) ? this._selectId + '-opt-desc' : '',\n ].filter(Boolean).join(' '), this.ariaDescribedBy()));\n\n private readonly _reveal = createFieldReveal(this.showErrors);\n private readonly _issue = computed(() => this._check(this._value()));\n /** True while the value breaks a built-in rule or the host passed an `[error]`. */\n readonly invalid = computed(() => !!this.error() || !!this._issue());\n /** Message of the first broken built-in rule ('' when valid), shown or not. */\n readonly errorMessage = computed(() => this._issue()?.message ?? '');\n /** Emits whenever the field becomes invalid / valid. */\n readonly invalidChange = output<boolean>();\n /** Emits the chosen value when the USER picks an option (the same value the form control receives; null for the blank option in number mode). Not emitted for values the host writes. */\n readonly valueChange = output<string | number | null>();\n protected readonly _activeError = computed(() => this._reveal.revealed() ? (this.error() || this.errorMessage()) : '');\n private _onValidatorChange = () => {};\n\n constructor() {\n effect(() => { this.invalidChange.emit(this.invalid()); });\n }\n\n /** Re-run the form control's validation when a rule input (required, maxlength, min, options, ...) changes. */\n ngOnChanges() { this._onValidatorChange(); }\n\n validate(control: AbstractControl): ValidationErrors | null {\n return issueToErrors(this._check(SelectComponent._toKey(control.value)));\n }\n registerOnValidatorChange(fn: () => void) { this._onValidatorChange = fn; }\n\n protected readonly _selectId = `sl-${Math.random().toString(36).slice(2, 8)}`;\n\n private readonly _labels = inject(UiLabelsService);\n private readonly _hostEl = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Library source 2026-11-04, not yet published. Puts the keyboard focus on the inner native `<select>` (`ref.focus()` via `viewChild`).\n * Same options as the DOM method (`{ preventScroll: true }`). Safe at any time: before the view exists, or on a disabled field, it does\n * nothing and never throws.\n */\n focus(options?: FocusOptions): void {\n this._hostEl.nativeElement.querySelector<HTMLElement>('select')?.focus(options);\n }\n\n private _onChange = (_: string | number | null) => {};\n private _warned = false;\n\n /** The comparison form of a key: in number mode a numeric text ('21.0', ' 21 ') becomes the canonical number text ('21'). */\n private _norm(key: string): string {\n if (this.valueType() !== 'number') return key;\n const t = key.trim();\n const n = t === '' ? NaN : Number(t);\n return Number.isFinite(n) ? String(n) : key;\n }\n\n protected _key(opt: SelectOption<string | number>): string { return String(opt.value); }\n private static _toKey(v: unknown): string {\n return v == null || (typeof v === 'number' && Number.isNaN(v)) ? '' : String(v);\n }\n private _onTouched = () => {};\n\n writeValue(val: string | number | null | undefined) { this._value.set(SelectComponent._toKey(val)); }\n registerOnChange(fn: (v: string | number | null) => void) { this._onChange = fn; }\n registerOnTouched(fn: () => void) { this._onTouched = fn; }\n setDisabledState(d: boolean) { this._cvaDisabled.set(d); }\n\n protected onChange(event: Event) {\n const val = (event.target as HTMLSelectElement).value;\n this._value.set(val);\n const emitted = this._emitted(val);\n this._onChange(emitted);\n this.valueChange.emit(emitted);\n }\n\n /** The control value for the chosen native option value. */\n private _emitted(key: string): string | number | null {\n if (this.valueType() !== 'number') return key;\n if (key === '') return null;\n const n = key.trim() === '' ? NaN : Number(key);\n if (Number.isFinite(n)) return n;\n if (!this._warned && isDevMode()) {\n this._warned = true;\n console.warn(`ui-select: valueType=\"number\" but option value \"${key}\" is not numeric`);\n }\n return null;\n }\n\n protected onBlur() { this._onTouched(); this._reveal.touched.set(true); }\n\n private _check(value: string): FieldIssue | null {\n if (this.disabled()) return null;\n if (value === '') return this.required() ? requiredIssue(this.label()) : null;\n const opts = this.options();\n if (opts.length > 0 && !opts.some(o => this._norm(String(o.value)) === this._norm(value))) return { key: 'option', message: this._labels.t('common.selectValidOption') };\n return null;\n }\n}\n"],"mappings":";;;;AA0JA,IAAa,kBAAb,MAAa,gBAAe;CAyD1B,cAAA;EAxDS,KAAA,QAAc,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAEvB,KAAA,YAAc,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;EAOvB,KAAA,cAAc,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;EAE1B,KAAA,YAAc,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;EACvB,KAAA,cAAc,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;EACvB,KAAA,UAAc,MAAuC,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;EAExD,KAAA,YAAc,MAA2B,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;EAClD,KAAA,WAAc,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;EAC1B,K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,CAAA;CAAA;;AAoEU,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAe,YAAA,CAAA;EA1H3B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAW,YACT;GAAI,iBACC,wBAAwB;GAAM,WACpC;IAAC;KACV,SAAS;KACT,aAAa,iBAAgB,eAAgB;KAC7C,OAAO;IACR;IAAE;KACD,SAAS;KACT,aAAa,iBAAgB,eAAgB;KAC7C,OAAO;IACR;IAAE;KACD,SAAS;KACT,aAAa,iBAAgB,eAAgB;IAC9C;GAAA;GAAC,UACQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCT,QAAA,CAAA,ooCAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"forgeroute-ui-select.mjs","names":[],"sources":["../../../projects/forgeroute-ui/select/src/lib/select/select.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ElementRef, inject, input, output, signal, computed, effect, forwardRef, isDevMode } from '@angular/core';\nimport { AbstractControl, ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, ValidationErrors, Validator } from '@angular/forms';\nimport { FieldIssue, UiFieldValidity, createFieldReveal, mergeDescribedBy, issueToErrors, requiredIssue } from '@forgeroute/ui/core';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\n/**\n * One choice. `V` defaults to `string`, so existing `SelectOption[]` code is unchanged; `ui-select` itself accepts\n * `SelectOption<string | number>[]` (numeric values for `valueType=\"number\"`).\n */\nexport interface SelectOption<V extends string | number = string> {\n value: V;\n label: string;\n /**\n * Optional longer explanation of this choice. The select shows the SELECTED option's description under the field (linked with\n * `aria-describedby`) and sets it as the option's `title` tooltip where the browser shows one. Options without it are unchanged.\n */\n description?: string;\n /**\n * Optional short tag shown after the label, e.g. `{ label: 'Pro plan', badge: 'Partner: Acme' }` is listed as \"Pro plan — Partner: Acme\".\n * A native `<option>` can only hold text (no elements, no colours), so the badge is a TEXT suffix joined by \" —\" (space, em dash,\n * space); screen readers read it as part of the option. The selected value, search-by-typing and the description are unaffected.\n * Options without it are unchanged.\n */\n badge?: string;\n /**\n * Optional: list the choice but make it unselectable (native `<option disabled>`). Use it for an entry that must stay visible because it is the\n * CURRENT value (e.g. an owner who is no longer active) but must not be picked. A disabled option that equals the current value is still shown as\n * selected and still counts as a valid value; the user just cannot choose it again after picking another option. Options without it are unchanged.\n */\n disabled?: boolean;\n}\n\n@Component({\n selector: 'ui-select',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectComponent),\n multi: true,\n }, {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => SelectComponent),\n multi: true,\n }, {\n provide: UiFieldValidity,\n useExisting: forwardRef(() => SelectComponent),\n }],\n template: `\n <div class=\"sl-field\" [class.sl-error]=\"_activeError()\" [class.sl-disabled]=\"disabled()\">\n @if (label() && !labelHidden()) {\n <label class=\"sl-label\" [for]=\"_selectId\">\n {{ label() }}\n @if (required()) { <span class=\"sl-required\" aria-hidden=\"true\">*</span> }\n </label>\n }\n <div class=\"sl-wrap\">\n <select\n [class]=\"'sl-select' + (size() === 'sm' ? ' sl-select-sm' : '')\"\n [id]=\"_selectId\"\n [attr.name]=\"inputName() || null\"\n [disabled]=\"disabled()\"\n [attr.required]=\"required() || null\"\n [attr.aria-label]=\"ariaLabel() || (labelHidden() ? label() : '') || null\"\n [attr.aria-invalid]=\"_activeError() ? 'true' : null\"\n [attr.aria-describedby]=\"_describedBy() || null\"\n (change)=\"onChange($event)\"\n (blur)=\"onBlur()\">\n @if (placeholder()) {\n <option value=\"\" [disabled]=\"true\" [selected]=\"_value() === ''\">{{ placeholder() }}</option>\n }\n @for (opt of options(); track opt.value; let i = $index) {\n <option [value]=\"_key(opt)\" [selected]=\"i === _selectedIndex()\" [disabled]=\"!!opt.disabled\" [attr.title]=\"opt.description || null\">{{ opt.badge ? opt.label + ' — ' + opt.badge : opt.label }}</option>\n }\n </select>\n <svg class=\"sl-chevron\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" aria-hidden=\"true\"><polyline points=\"6 9 12 15 18 9\"/></svg>\n </div>\n @if (_activeError()) {\n <p class=\"sl-desc sl-desc-error\" [id]=\"_selectId + '-desc'\" role=\"alert\">{{ _activeError() }}</p>\n } @else if (hint()) {\n <p class=\"sl-desc\" [id]=\"_selectId + '-desc'\">{{ hint() }}</p>\n }\n @if (_selectedDescription() && !_activeError()) {\n <p class=\"sl-desc sl-opt-desc\" [id]=\"_selectId + '-opt-desc'\">{{ _selectedDescription() }}</p>\n }\n </div>\n `,\n styles: [`\n :host { display: block; }\n\n .sl-field { display: flex; flex-direction: column; gap: 6px; }\n\n .sl-label {\n font-size: 0.8125rem; font-weight: 600; color: #374151; line-height: 1;\n }\n .sl-required { color: #dc2626; margin-left: 2px; }\n\n .sl-wrap { position: relative; display: flex; align-items: center; }\n\n .sl-select {\n width: 100%; box-sizing: border-box;\n padding: 9px 32px 9px 12px; font-size: 0.875rem; font-family: inherit;\n color: #1e293b; background: #fff;\n border: 1px solid #7c8ba1; border-radius: 8px;\n outline: none; appearance: none; cursor: pointer;\n transition: border-color 0.15s, box-shadow 0.15s;\n &:focus {\n border-color: #3b82f6;\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);\n }\n }\n\n .sl-error .sl-select {\n border-color: #ef4444;\n &:focus { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12); }\n }\n\n .sl-disabled .sl-select { opacity: 0.5; cursor: not-allowed; }\n\n .sl-select-sm { padding: 6px 32px 6px 12px; font-size: 0.8125rem; border-radius: 6px; }\n\n .sl-chevron {\n position: absolute; right: 10px; pointer-events: none;\n color: #64748b; flex-shrink: 0;\n }\n\n .sl-desc { margin: -6px 0 0; font-size: 0.75rem; line-height: 1.4; color: #64748b; }\n .sl-desc-error { color: #dc2626; }\n\n @media (pointer: coarse), (max-width: 480px) { .sl-select { font-size: 1rem; } }\n /* Touch targets: 44px tall on touch devices and phones (the sm size too); desktop unchanged. */\n @media (pointer: coarse), (max-width: 480px) { .sl-select, .sl-select-sm { min-height: 44px; } }\n `],\n})\n/**\n * Native select (ControlValueAccessor).\n * Built-in validation: `required` -> \"<label> is required.\" when empty; a non-empty bound value that is not one of the\n * `options` values -> \"Select a valid option.\" (not checked while `options` is empty, so asynchronously loaded options\n * never flag a value early). Disabled selects are never invalid.\n *\n * Validity API (same on every ui input): the component is an Angular `Validator` (`ngModel` / `FormControl` report\n * `.invalid` / `.errors`), exposes the signals `invalid` + `errorMessage` and the `invalidChange` output, and provides\n * `UiFieldValidity` so a host can use `viewChildren(UiFieldValidity)`. Messages (built-in and a host `[error]`) are displayed only after the user left THIS field (blur); `[showErrors]=\"true\"` reveals the message of an untouched field at once, and setting it back to false clears the touched state.\n *\n * Numeric values (opt-in): option values may be numbers. By default (`valueType=\"string\"`) the control value is a STRING:\n * a numeric option value is coerced with `String()` (`{ value: 21 }` emits '21'; writing 21 or '21' selects it).\n * With `valueType=\"number\"` the control value is `number | null`: a selection emits the option's number, the placeholder /\n * nothing selected is `null`, and `writeValue` accepts a number or numeric string (null / undefined / NaN select the\n * placeholder). 0 is a real value (satisfies `required`). Matching compares `String()` forms in string mode and NUMBERS in\n * number mode (so `writeValue('21.0')` and `writeValue(' 21 ')` select the option 21). An option whose value\n * is not numeric (including blank text and 'Infinity') emits `null` and logs one dev-mode warning.\n * If two options match the same value (e.g. `1` and `'1'`) the FIRST one is shown as selected.\n * Example: `<ui-select valueType=\"number\" [options]=\"[{ value: 21, label: 'Net 21' }]\" [(ngModel)]=\"days\" />`.\n */\nexport class SelectComponent implements ControlValueAccessor, Validator, UiFieldValidity {\n readonly label = input('');\n /** Accessible name for a select with no visible label (e.g. an inline row or table-cell select). */\n readonly ariaLabel = input('');\n /**\n * Compact, label-less look for a filter above KPI cards or in a toolbar (library source 2026-11-04, not yet published). `true` renders NO visible\n * label row (no gap above the field; the `*` marker goes with it) while `label` stays the select's accessible name through `aria-label` and still\n * words the built-in \"<label> is required.\" message. An explicit `ariaLabel` wins over `label`. Default `false` = unchanged. Combine with\n * `size=\"sm\"`. (`ariaLabel` alone, with no `label`, was already the way to name a label-less select in a table cell.)\n */\n readonly labelHidden = input(false);\n /** Native `name` attribute placed on the inner `<select>` (e2e `[name=x]` selectors, autofill). None when empty. */\n readonly inputName = input('');\n readonly placeholder = input('');\n readonly options = input<SelectOption<string | number>[]>([]);\n /** What the control value is: `'string'` (default, numeric option values become strings) or `'number'` (`number | null`). */\n readonly valueType = input<'string' | 'number'>('string');\n readonly required = input(false);\n readonly hint = input('');\n /** Id(s) of an external element that also describes this control (e.g. one shared error text for a group of fields). Space separated; MERGED after the control's own hint / error id in `aria-describedby`, never replacing it. Empty = unchanged. */\n readonly ariaDescribedBy = input('');\n readonly error = input('');\n /** The host's \"tried to submit\" flag (e.g. after a failed Save click). `true` reveals the message of an untouched field at once (the field also shows it after the user left THIS field); switching it from true back to false forgets that the field was left. */\n readonly showErrors = input(false);\n readonly size = input<'default' | 'sm'>('default');\n\n readonly _disabledInput = input(false, { alias: 'disabled' });\n private readonly _cvaDisabled = signal(false);\n protected readonly disabled = computed(() => this._disabledInput() || this._cvaDisabled());\n\n protected readonly _value = signal('');\n /** Index of the first option matching the written / chosen value, or -1 (so only ONE option is selected even with duplicate keys). */\n protected readonly _selectedIndex = computed(() => {\n const v = this._norm(this._value());\n return this.options().findIndex(o => this._norm(String(o.value)) === v);\n });\n /** The selected option's `description` ('' when none is selected or it has none); hidden while an error shows. */\n protected readonly _selectedDescription = computed(() => this.options()[this._selectedIndex()]?.description ?? '');\n /** ids of the texts that describe the select: the error / hint, then the selected option's description. */\n protected readonly _describedBy = computed(() => mergeDescribedBy([\n (this._activeError() || this.hint()) ? this._selectId + '-desc' : '',\n (!this._activeError() && this._selectedDescription()) ? this._selectId + '-opt-desc' : '',\n ].filter(Boolean).join(' '), this.ariaDescribedBy()));\n\n private readonly _reveal = createFieldReveal(this.showErrors);\n private readonly _issue = computed(() => this._check(this._value()));\n /** True while the value breaks a built-in rule or the host passed an `[error]`. */\n readonly invalid = computed(() => !!this.error() || !!this._issue());\n /** Message of the first broken built-in rule ('' when valid), shown or not. */\n readonly errorMessage = computed(() => this._issue()?.message ?? '');\n /** Emits whenever the field becomes invalid / valid. */\n readonly invalidChange = output<boolean>();\n /** Emits the chosen value when the USER picks an option (the same value the form control receives; null for the blank option in number mode). Not emitted for values the host writes. */\n readonly valueChange = output<string | number | null>();\n protected readonly _activeError = computed(() => this._reveal.revealed() ? (this.error() || this.errorMessage()) : '');\n private _onValidatorChange = () => {};\n\n constructor() {\n effect(() => { this.invalidChange.emit(this.invalid()); });\n }\n\n /** Re-run the form control's validation when a rule input (required, maxlength, min, options, ...) changes. */\n ngOnChanges() { this._onValidatorChange(); }\n\n validate(control: AbstractControl): ValidationErrors | null {\n return issueToErrors(this._check(SelectComponent._toKey(control.value)));\n }\n registerOnValidatorChange(fn: () => void) { this._onValidatorChange = fn; }\n\n protected readonly _selectId = `sl-${Math.random().toString(36).slice(2, 8)}`;\n\n private readonly _labels = inject(UiLabelsService);\n private readonly _hostEl = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Library source 2026-11-04, not yet published. Puts the keyboard focus on the inner native `<select>` (`ref.focus()` via `viewChild`).\n * Same options as the DOM method (`{ preventScroll: true }`). Safe at any time: before the view exists, or on a disabled field, it does\n * nothing and never throws.\n */\n focus(options?: FocusOptions): void {\n this._hostEl.nativeElement.querySelector<HTMLElement>('select')?.focus(options);\n }\n\n private _onChange = (_: string | number | null) => {};\n private _warned = false;\n\n /** The comparison form of a key: in number mode a numeric text ('21.0', ' 21 ') becomes the canonical number text ('21'). */\n private _norm(key: string): string {\n if (this.valueType() !== 'number') return key;\n const t = key.trim();\n const n = t === '' ? NaN : Number(t);\n return Number.isFinite(n) ? String(n) : key;\n }\n\n protected _key(opt: SelectOption<string | number>): string { return String(opt.value); }\n private static _toKey(v: unknown): string {\n return v == null || (typeof v === 'number' && Number.isNaN(v)) ? '' : String(v);\n }\n private _onTouched = () => {};\n\n writeValue(val: string | number | null | undefined) { this._value.set(SelectComponent._toKey(val)); }\n registerOnChange(fn: (v: string | number | null) => void) { this._onChange = fn; }\n registerOnTouched(fn: () => void) { this._onTouched = fn; }\n setDisabledState(d: boolean) { this._cvaDisabled.set(d); }\n\n protected onChange(event: Event) {\n const val = (event.target as HTMLSelectElement).value;\n this._value.set(val);\n const emitted = this._emitted(val);\n this._onChange(emitted);\n this.valueChange.emit(emitted);\n }\n\n /** The control value for the chosen native option value. */\n private _emitted(key: string): string | number | null {\n if (this.valueType() !== 'number') return key;\n if (key === '') return null;\n const n = key.trim() === '' ? NaN : Number(key);\n if (Number.isFinite(n)) return n;\n if (!this._warned && isDevMode()) {\n this._warned = true;\n console.warn(`ui-select: valueType=\"number\" but option value \"${key}\" is not numeric`);\n }\n return null;\n }\n\n protected onBlur() { this._onTouched(); this._reveal.touched.set(true); }\n\n private _check(value: string): FieldIssue | null {\n if (this.disabled()) return null;\n if (value === '') return this.required() ? requiredIssue(this.label()) : null;\n const opts = this.options();\n if (opts.length > 0 && !opts.some(o => this._norm(String(o.value)) === this._norm(value))) return { key: 'option', message: this._labels.t('common.selectValidOption') };\n return null;\n }\n}\n"],"mappings":";;;;AA0JA,IAAa,kBAAb,MAAa,gBAAe;CAyD1B,cAAA;EAxDS,KAAA,QAAc,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAEvB,KAAA,YAAc,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;EAOvB,KAAA,cAAc,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;EAE1B,KAAA,YAAc,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,W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AA,YAAA;KAAA,mBAAA;IAAA;GAAA;GAAA,SAAA;IAAA,eAAA;IAAA,aAAA;GAAA;GAAA,WAtHf;IAAC;KACV,SAAS;KACT,aAAa,iBAAiB,eAAe;KAC7C,OAAO;IACR;IAAE;KACD,SAAS;KACT,aAAa,iBAAiB,eAAe;KAC7C,OAAO;IACR;IAAE;KACD,SAAS;KACT,aAAa,iBAAiB,eAAe;IAC9C;GAAA;GAAC,eAAA;GAAA,UAAA;GAAA,UACQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCT,UAAA;GAAA,QAAA,CAAA,2oCAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAoEU,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAe,YAAA,CAAA;EA1H3B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAW,YACT;GAAI,iBACC,wBAAwB;GAAM,WACpC;IAAC;KACV,SAAS;KACT,aAAa,iBAAgB,eAAgB;KAC7C,OAAO;IACR;IAAE;KACD,SAAS;KACT,aAAa,iBAAgB,eAAgB;KAC7C,OAAO;IACR;IAAE;KACD,SAAS;KACT,aAAa,iBAAgB,eAAgB;IAC9C;GAAA;GAAC,UACQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCT,QAAA,CAAA,2oCAAA;EAAA,CAAA"}
@@ -4153,6 +4153,7 @@ var SetupWizardComponent = class SetupWizardComponent {
4153
4153
  "fill",
4154
4154
  "noPadding",
4155
4155
  "maxBodyHeight",
4156
+ "overflowVisible",
4156
4157
  "selectable",
4157
4158
  "selected",
4158
4159
  "selectedColor",