@lifecorner/angular-ui-kit 3.24.1 → 3.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/fesm2022/lifecorner-angular-ui-kit-code-block.mjs +2 -2
  2. package/fesm2022/lifecorner-angular-ui-kit-code-block.mjs.map +1 -1
  3. package/fesm2022/lifecorner-angular-ui-kit-combobox.mjs +2 -2
  4. package/fesm2022/lifecorner-angular-ui-kit-combobox.mjs.map +1 -1
  5. package/fesm2022/lifecorner-angular-ui-kit-dependency-viewer.mjs +7 -7
  6. package/fesm2022/lifecorner-angular-ui-kit-dependency-viewer.mjs.map +1 -1
  7. package/fesm2022/lifecorner-angular-ui-kit-description-list.mjs +12 -4
  8. package/fesm2022/lifecorner-angular-ui-kit-description-list.mjs.map +1 -1
  9. package/fesm2022/lifecorner-angular-ui-kit-log-viewer.mjs +2 -2
  10. package/fesm2022/lifecorner-angular-ui-kit-log-viewer.mjs.map +1 -1
  11. package/fesm2022/lifecorner-angular-ui-kit-notification-center.mjs +2 -2
  12. package/fesm2022/lifecorner-angular-ui-kit-notification-center.mjs.map +1 -1
  13. package/fesm2022/lifecorner-angular-ui-kit-number-input.mjs +2 -2
  14. package/fesm2022/lifecorner-angular-ui-kit-number-input.mjs.map +1 -1
  15. package/fesm2022/lifecorner-angular-ui-kit-password-input.mjs +2 -2
  16. package/fesm2022/lifecorner-angular-ui-kit-password-input.mjs.map +1 -1
  17. package/fesm2022/lifecorner-angular-ui-kit-progress-bar.mjs +2 -2
  18. package/fesm2022/lifecorner-angular-ui-kit-progress-bar.mjs.map +1 -1
  19. package/fesm2022/lifecorner-angular-ui-kit-select.mjs +2 -2
  20. package/fesm2022/lifecorner-angular-ui-kit-select.mjs.map +1 -1
  21. package/fesm2022/lifecorner-angular-ui-kit-slider.mjs +2 -2
  22. package/fesm2022/lifecorner-angular-ui-kit-slider.mjs.map +1 -1
  23. package/fesm2022/lifecorner-angular-ui-kit-textarea.mjs +2 -2
  24. package/fesm2022/lifecorner-angular-ui-kit-textarea.mjs.map +1 -1
  25. package/fesm2022/lifecorner-angular-ui-kit-tree-view.mjs +2 -2
  26. package/fesm2022/lifecorner-angular-ui-kit-tree-view.mjs.map +1 -1
  27. package/fesm2022/lifecorner-angular-ui-kit-verification-code-input.mjs +2 -2
  28. package/fesm2022/lifecorner-angular-ui-kit-verification-code-input.mjs.map +1 -1
  29. package/package.json +1 -1
  30. package/src/styles/theme-contrast.spec.ts +235 -7
  31. package/types/lifecorner-angular-ui-kit-description-list.d.ts +17 -5
@@ -1 +1 @@
1
- {"version":3,"file":"lifecorner-angular-ui-kit-textarea.mjs","names":[],"sources":["../../../../libs/angular-ui-kit/src/lib/textarea/textarea.component.ts","../../../../libs/angular-ui-kit/src/lib/textarea/textarea.component.html"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n ElementRef,\n OutputRef,\n PLATFORM_ID,\n afterRenderEffect,\n computed,\n forwardRef,\n inject,\n input,\n model,\n signal,\n viewChild,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n/** Counter for generated ids: they follow creation order, so prerendered HTML is the same in every build. */\nlet nextUniqueId = 0;\n\n/**\n * Textarea component for multi-line text input.\n *\n * Features:\n * - Variant styles (outline, filled)\n * - Size presets (xs, sm, md, lg)\n * - Auto-resize with configurable min/max rows\n * - Character count display with maxLength\n * - Validation error message and helper text\n * - Disabled and readonly states\n * - ControlValueAccessor integration for reactive forms\n * - Plain form posts without JavaScript: `name`, and a `value` that is\n * prerendered into the native `<textarea>`\n *\n * @example\n * ```html\n * <lc-textarea placeholder=\"Enter message\" [autoResize]=\"true\" [(ngModel)]=\"message\" />\n * <lc-textarea label=\"Message\" name=\"message\" [required]=\"true\" [value]=\"draft\" />\n * ```\n */\n@Component({\n selector: 'lc-textarea',\n standalone: true,\n imports: [],\n templateUrl: './textarea.component.html',\n styleUrl: './textarea.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TextareaComponent),\n multi: true,\n },\n ],\n})\nexport class TextareaComponent implements ControlValueAccessor {\n private readonly textareaElement = viewChild<ElementRef<HTMLTextAreaElement>>('textarea');\n\n private readonly isServer = isPlatformServer(inject(PLATFORM_ID));\n\n /**\n * Visual variant of the textarea\n * @default 'outline'\n */\n readonly variant = input<'outline' | 'filled'>('outline');\n\n /**\n * Size of the textarea\n * @default 'md'\n */\n readonly size = input<'xs' | 'sm' | 'md' | 'lg'>('md');\n\n /**\n * Whether the textarea is disabled\n * @default false\n */\n readonly disabled = input<boolean>(false);\n\n /**\n * Whether the textarea is in error state\n * @default false\n */\n readonly error = input<boolean>(false);\n\n /**\n * Whether the textarea is required\n * @default false\n */\n readonly required = input<boolean>(false);\n\n /**\n * Show the `*` after the label of a `required` field. `false` keeps the\n * required semantics (`required`, `aria-required`) without the asterisk —\n * for forms where every field is required.\n * @default true\n */\n readonly requiredIndicator = input<boolean>(true);\n\n /**\n * Deprecated, no effect (it never had one in `lc-textarea`). The `*` is\n * decorative and hidden from assistive technology, because the native\n * `required` state is announced already, in the screen reader's language; a\n * name on the `*` would make the field say \"required\" twice. Kept so\n * existing bindings compile.\n * @deprecated No effect: the native `required` state is announced instead.\n * @default 'required'\n */\n readonly requiredAriaLabel = input<string>('required');\n\n /**\n * Id of the native `<textarea>`. The label's `for`, the error\n * (`<id>-error`), the helper text (`<id>-helper`) and `aria-describedby`\n * derive from it, so an error summary can link to the field\n * (`<a href=\"#contact-message\">`) and prerendered HTML is the same in every\n * build. Unique in the document, no spaces. Unset (or empty) = a generated\n * `lc-textarea-<n>`, which follows creation order (on the server it keeps\n * counting across prerendered routes): set it on prerendered pages.\n * @default generated (lc-textarea-<n>)\n */\n readonly controlId = input<string | undefined>(undefined);\n\n /**\n * Announce the error message the moment it appears (`role=\"alert\"` on the\n * message). Set `false` when an `lc-alert` error summary above the form\n * already announces the errors (a page re-rendered after a failed submit,\n * e.g. 422), so they aren't read twice. The message stays visible, stays\n * linked through `aria-describedby` (read with the field), and the control\n * keeps `aria-invalid`.\n * @default true\n */\n readonly announceError = input<boolean>(true);\n\n /**\n * Whether the textarea is readonly\n * @default false\n */\n readonly readonly = input<boolean>(false);\n\n /**\n * Placeholder text\n * @default ''\n */\n readonly placeholder = input<string>('');\n\n /**\n * Label text displayed above the textarea\n * @default ''\n */\n readonly label = input<string>('');\n\n /**\n * Helper text displayed below the textarea\n * @default ''\n */\n readonly helperText = input<string>('');\n\n /**\n * Error message displayed when error is true\n * @default ''\n */\n readonly errorMessage = input<string>('');\n\n /**\n * ARIA label for accessibility\n * @default undefined\n */\n readonly ariaLabel = input<string | undefined>(undefined);\n\n /**\n * Native `name` of the inner `<textarea>`, so a form posts the text without\n * JavaScript. Unset = no attribute. A `disabled` textarea is not posted\n * (HTML); use `readonly` to post a fixed text.\n * @default undefined\n */\n readonly name = input<string>();\n\n /**\n * Number of visible text rows\n * @default 3\n */\n readonly rows = input<number>(3);\n\n /**\n * Maximum number of characters allowed\n * @default undefined\n */\n readonly maxLength = input<number | undefined>(undefined);\n\n /**\n * Whether to show character count\n * @default false\n */\n readonly showCharacterCount = input<boolean>(false);\n\n /**\n * Whether to automatically resize based on content\n * @default false\n */\n readonly autoResize = input<boolean>(false);\n\n /**\n * Minimum number of rows for auto-resize\n * @default 3\n */\n readonly minRows = input<number>(3);\n\n /**\n * Maximum number of rows for auto-resize\n * @default undefined\n */\n readonly maxRows = input<number | undefined>(undefined);\n\n /**\n * Current text, two-way bindable (`[value]` / `[(value)]`). It pre-fills the\n * native textarea, in prerendered HTML too, so a server-rendered page can\n * keep a visitor's text. Emits `valueChange` whenever it changes: once per\n * keystroke that changes the text, and when a bound form control or code\n * sets a different text. With a form control, the control's value wins;\n * don't bind both.\n * @default ''\n */\n readonly value = model<string>('');\n\n /**\n * The model's change output as a class property, so code that subscribes to\n * it (`textarea.valueChange.subscribe(…)`, `outputToObservable(…)`) keeps\n * compiling as in 3.9. Template bindings `(valueChange)` use the model.\n */\n readonly valueChange: OutputRef<string> = this.value;\n\n /** Generated id, taken once per instance (also with `controlId`), so later ids don't shift. */\n private readonly generatedId = `lc-textarea-${nextUniqueId++}`;\n\n private readonly resolvedId = computed(() => this.controlId() || this.generatedId);\n\n /** Id of the native textarea: `controlId`, or the generated `lc-textarea-<n>`. Links label, error and helper text to it. */\n get textareaId(): string {\n return this.resolvedId();\n }\n\n /** Id of the error message: `<textareaId>-error`. */\n get errorId(): string {\n return `${this.resolvedId()}-error`;\n }\n\n /** Id of the helper text: `<textareaId>-helper`. */\n get helperId(): string {\n return `${this.resolvedId()}-helper`;\n }\n\n /**\n * The native textarea's value. On the server a leading line break gets one\n * extra `\\n`: the HTML parser drops the first line break after `<textarea>`,\n * and the server's DOM serialiser doesn't add the one the HTML\n * serialisation rules require, so the prerendered page would lose it.\n */\n protected readonly renderedValue = computed(() => {\n const value = this.value();\n return this.isServer && /^[\\r\\n]/.test(value) ? `\\n${value}` : value;\n });\n\n // Internal disabled state (for ControlValueAccessor)\n private readonly formDisabled = signal<boolean>(false);\n\n /**\n * Computed disabled state from both input and form control\n */\n readonly isDisabled = computed(() => this.disabled() || this.formDisabled());\n\n // Computed values\n readonly currentCharacterCount = computed(() => this.value().length);\n\n readonly characterCountText = computed(() => {\n const current = this.currentCharacterCount();\n const max = this.maxLength();\n return max !== undefined ? `${current} / ${max}` : `${current}`;\n });\n\n readonly isOverLimit = computed(() => {\n const max = this.maxLength();\n return max !== undefined && this.currentCharacterCount() > max;\n });\n\n /** Whether an error message is shown (drives aria-describedby) */\n readonly showsError = computed(() => this.error() && !!this.errorMessage());\n\n /** Whether the helper text is shown (error message takes precedence) */\n readonly showsHelper = computed(() => !this.showsError() && !!this.helperText());\n\n readonly describedBy = computed(() => {\n const ids: string[] = [];\n if (this.showsError()) ids.push(this.errorId);\n if (this.showsHelper()) ids.push(this.helperId);\n return ids.length ? ids.join(' ') : null;\n });\n\n /**\n * Computed classes for the textarea element\n */\n readonly textareaClasses = computed(() => {\n const classes = ['lc-textarea', `lc-textarea--${this.variant()}`, `lc-textarea--${this.size()}`];\n\n if (this.isDisabled()) {\n classes.push('lc-textarea--disabled');\n }\n\n if (this.error()) {\n classes.push('lc-textarea--error');\n }\n\n if (this.readonly()) {\n classes.push('lc-textarea--readonly');\n }\n\n if (this.autoResize()) {\n classes.push('lc-textarea--auto-resize');\n }\n\n return classes.join(' ');\n });\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onChange: (value: string) => void = () => {};\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onTouched: () => void = () => {};\n\n constructor() {\n // Re-measure after every render in which the value or the resize\n // constraints changed — this covers typing, form writes and input changes\n // without timers, and runs once the DOM already holds the new value.\n afterRenderEffect(() => {\n this.value();\n this.minRows();\n this.maxRows();\n if (this.autoResize()) {\n this.adjustHeight();\n }\n });\n }\n\n /**\n * Handle input changes\n */\n onInput(value: string): void {\n if (this.isDisabled() || this.readonly()) {\n return;\n }\n\n // model.set() emits `valueChange` exactly once per actual change\n this.value.set(value);\n this.onChange(value);\n }\n\n /**\n * Handle blur event\n */\n onBlur(): void {\n this.onTouched();\n }\n\n // ControlValueAccessor implementation\n writeValue(value: string | null | undefined): void {\n this.value.set(value || '');\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled);\n }\n\n // Private helper methods\n private adjustHeight(): void {\n const textarea = this.textareaElement()?.nativeElement;\n if (!textarea) {\n return;\n }\n\n // Reset height to get accurate scrollHeight\n textarea.style.height = 'auto';\n\n const minHeight = this.rowsToHeight(textarea, this.minRows());\n const maxHeight = this.rowsToHeight(textarea, this.maxRows());\n let newHeight = textarea.scrollHeight;\n\n // Apply constraints\n if (minHeight !== undefined) {\n newHeight = Math.max(newHeight, minHeight);\n }\n if (maxHeight !== undefined) {\n newHeight = Math.min(newHeight, maxHeight);\n }\n\n textarea.style.height = `${newHeight}px`;\n }\n\n /** Pixel height for `rows` lines incl. vertical padding; undefined when it cannot be measured. */\n private rowsToHeight(textarea: HTMLTextAreaElement, rows: number | undefined): number | undefined {\n if (rows === undefined) {\n return undefined;\n }\n\n const style = getComputedStyle(textarea);\n const lineHeight = parseFloat(style.lineHeight);\n const paddingTop = parseFloat(style.paddingTop) || 0;\n const paddingBottom = parseFloat(style.paddingBottom) || 0;\n\n // 'normal' / unmeasurable line-height (e.g. jsdom) → no constraint\n if (!Number.isFinite(lineHeight)) {\n return undefined;\n }\n\n return lineHeight * rows + paddingTop + paddingBottom;\n }\n\n protected getInputValue(event: Event): string {\n return (event.target as HTMLTextAreaElement).value;\n }\n}\n","<div class=\"lc-textarea-wrapper\">\n @if (label()) {\n <!-- No whitespace before the *: the gap is its margin, and it never wraps onto a line alone -->\n <label [for]=\"textareaId\" class=\"lc-textarea-label\">\n {{ label() }}@if (required() && requiredIndicator()) {<span class=\"lc-textarea-required-indicator\" aria-hidden=\"true\">*</span>}\n </label>\n }\n\n <div class=\"lc-textarea-input-wrapper\">\n <textarea\n #textarea\n [id]=\"textareaId\"\n [class]=\"textareaClasses()\"\n [value]=\"renderedValue()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() ?? null\"\n [attr.rows]=\"autoResize() ? null : rows()\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"error() || null\"\n [attr.aria-describedby]=\"describedBy()\"\n (input)=\"onInput(getInputValue($event))\"\n (blur)=\"onBlur()\"\n ></textarea>\n </div>\n\n <div class=\"lc-textarea-footer\">\n <div class=\"lc-textarea-messages\">\n @if (showsError()) {\n <span [id]=\"errorId\" class=\"lc-textarea-error-message\" [attr.role]=\"announceError() ? 'alert' : null\">{{ errorMessage() }}</span>\n } @else if (showsHelper()) {\n <span [id]=\"helperId\" class=\"lc-textarea-helper-text\">{{ helperText() }}</span>\n }\n </div>\n\n @if (showCharacterCount()) {\n <span\n class=\"lc-textarea-character-count\"\n [class.lc-textarea-character-count--over-limit]=\"isOverLimit()\"\n aria-live=\"polite\"\n >\n {{ characterCountText() }}\n </span>\n }\n </div>\n</div>\n"],"mappings":";;;;AAmBA,IAAI,eAAe;AAqCnB,IAAa,oBAAb,MAAa,kBAAiB;CACX,kBAAkB,UAA2C,YAAW,GAAA,YAAA,CAAA,EAAA,WAAA,kBAAA,CAAA,+BAAA,CAAA,CAAA;CAExE,WAAW,iBAAiB,OAAO,WAAW,CAAC;CAMvD,UAAU,MAA4B,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAMhD,OAAO,MAAiC,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAM7C,WAAW,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAMhC,QAAQ,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAM7B,WAAW,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAQhC,oBAAoB,MAAe,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,oBAAA,CAAA,+BAAA,CAAA,CAAA;CAWxC,oBAAoB,MAAc,YAAW,GAAA,YAAA,CAAA,EAAA,WAAA,oBAAA,CAAA,+BAAA,CAAA,CAAA;CAY7C,YAAY,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAWhD,gBAAgB,MAAe,MAAK,GAAA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;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,GAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,aAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"lifecorner-angular-ui-kit-textarea.mjs","names":[],"sources":["../../../../libs/angular-ui-kit/src/lib/textarea/textarea.component.ts","../../../../libs/angular-ui-kit/src/lib/textarea/textarea.component.html"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n ElementRef,\n OutputRef,\n PLATFORM_ID,\n afterRenderEffect,\n computed,\n forwardRef,\n inject,\n input,\n model,\n signal,\n viewChild,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n/** Counter for generated ids: they follow creation order, so prerendered HTML is the same in every build. */\nlet nextUniqueId = 0;\n\n/**\n * Textarea component for multi-line text input.\n *\n * Features:\n * - Variant styles (outline, filled)\n * - Size presets (xs, sm, md, lg)\n * - Auto-resize with configurable min/max rows\n * - Character count display with maxLength\n * - Validation error message and helper text\n * - Disabled and readonly states\n * - ControlValueAccessor integration for reactive forms\n * - Plain form posts without JavaScript: `name`, and a `value` that is\n * prerendered into the native `<textarea>`\n *\n * @example\n * ```html\n * <lc-textarea placeholder=\"Enter message\" [autoResize]=\"true\" [(ngModel)]=\"message\" />\n * <lc-textarea label=\"Message\" name=\"message\" [required]=\"true\" [value]=\"draft\" />\n * ```\n */\n@Component({\n selector: 'lc-textarea',\n standalone: true,\n imports: [],\n templateUrl: './textarea.component.html',\n styleUrl: './textarea.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TextareaComponent),\n multi: true,\n },\n ],\n})\nexport class TextareaComponent implements ControlValueAccessor {\n private readonly textareaElement = viewChild<ElementRef<HTMLTextAreaElement>>('textarea');\n\n private readonly isServer = isPlatformServer(inject(PLATFORM_ID));\n\n /**\n * Visual variant of the textarea\n * @default 'outline'\n */\n readonly variant = input<'outline' | 'filled'>('outline');\n\n /**\n * Size of the textarea\n * @default 'md'\n */\n readonly size = input<'xs' | 'sm' | 'md' | 'lg'>('md');\n\n /**\n * Whether the textarea is disabled\n * @default false\n */\n readonly disabled = input<boolean>(false);\n\n /**\n * Whether the textarea is in error state\n * @default false\n */\n readonly error = input<boolean>(false);\n\n /**\n * Whether the textarea is required\n * @default false\n */\n readonly required = input<boolean>(false);\n\n /**\n * Show the `*` after the label of a `required` field. `false` keeps the\n * required semantics (`required`, `aria-required`) without the asterisk —\n * for forms where every field is required.\n * @default true\n */\n readonly requiredIndicator = input<boolean>(true);\n\n /**\n * Deprecated, no effect (it never had one in `lc-textarea`). The `*` is\n * decorative and hidden from assistive technology, because the native\n * `required` state is announced already, in the screen reader's language; a\n * name on the `*` would make the field say \"required\" twice. Kept so\n * existing bindings compile.\n * @deprecated No effect: the native `required` state is announced instead.\n * @default 'required'\n */\n readonly requiredAriaLabel = input<string>('required');\n\n /**\n * Id of the native `<textarea>`. The label's `for`, the error\n * (`<id>-error`), the helper text (`<id>-helper`) and `aria-describedby`\n * derive from it, so an error summary can link to the field\n * (`<a href=\"#contact-message\">`) and prerendered HTML is the same in every\n * build. Unique in the document, no spaces. Unset (or empty) = a generated\n * `lc-textarea-<n>`, which follows creation order (on the server it keeps\n * counting across prerendered routes): set it on prerendered pages.\n * @default generated (lc-textarea-<n>)\n */\n readonly controlId = input<string | undefined>(undefined);\n\n /**\n * Announce the error message the moment it appears (`role=\"alert\"` on the\n * message). Set `false` when an `lc-alert` error summary above the form\n * already announces the errors (a page re-rendered after a failed submit,\n * e.g. 422), so they aren't read twice. The message stays visible, stays\n * linked through `aria-describedby` (read with the field), and the control\n * keeps `aria-invalid`.\n * @default true\n */\n readonly announceError = input<boolean>(true);\n\n /**\n * Whether the textarea is readonly\n * @default false\n */\n readonly readonly = input<boolean>(false);\n\n /**\n * Placeholder text\n * @default ''\n */\n readonly placeholder = input<string>('');\n\n /**\n * Label text displayed above the textarea\n * @default ''\n */\n readonly label = input<string>('');\n\n /**\n * Helper text displayed below the textarea\n * @default ''\n */\n readonly helperText = input<string>('');\n\n /**\n * Error message displayed when error is true\n * @default ''\n */\n readonly errorMessage = input<string>('');\n\n /**\n * ARIA label for accessibility\n * @default undefined\n */\n readonly ariaLabel = input<string | undefined>(undefined);\n\n /**\n * Native `name` of the inner `<textarea>`, so a form posts the text without\n * JavaScript. Unset = no attribute. A `disabled` textarea is not posted\n * (HTML); use `readonly` to post a fixed text.\n * @default undefined\n */\n readonly name = input<string>();\n\n /**\n * Number of visible text rows\n * @default 3\n */\n readonly rows = input<number>(3);\n\n /**\n * Maximum number of characters allowed\n * @default undefined\n */\n readonly maxLength = input<number | undefined>(undefined);\n\n /**\n * Whether to show character count\n * @default false\n */\n readonly showCharacterCount = input<boolean>(false);\n\n /**\n * Whether to automatically resize based on content\n * @default false\n */\n readonly autoResize = input<boolean>(false);\n\n /**\n * Minimum number of rows for auto-resize\n * @default 3\n */\n readonly minRows = input<number>(3);\n\n /**\n * Maximum number of rows for auto-resize\n * @default undefined\n */\n readonly maxRows = input<number | undefined>(undefined);\n\n /**\n * Current text, two-way bindable (`[value]` / `[(value)]`). It pre-fills the\n * native textarea, in prerendered HTML too, so a server-rendered page can\n * keep a visitor's text. Emits `valueChange` whenever it changes: once per\n * keystroke that changes the text, and when a bound form control or code\n * sets a different text. With a form control, the control's value wins;\n * don't bind both.\n * @default ''\n */\n readonly value = model<string>('');\n\n /**\n * The model's change output as a class property, so code that subscribes to\n * it (`textarea.valueChange.subscribe(…)`, `outputToObservable(…)`) keeps\n * compiling as in 3.9. Template bindings `(valueChange)` use the model.\n */\n readonly valueChange: OutputRef<string> = this.value;\n\n /** Generated id, taken once per instance (also with `controlId`), so later ids don't shift. */\n private readonly generatedId = `lc-textarea-${nextUniqueId++}`;\n\n private readonly resolvedId = computed(() => this.controlId() || this.generatedId);\n\n /** Id of the native textarea: `controlId`, or the generated `lc-textarea-<n>`. Links label, error and helper text to it. */\n get textareaId(): string {\n return this.resolvedId();\n }\n\n /** Id of the error message: `<textareaId>-error`. */\n get errorId(): string {\n return `${this.resolvedId()}-error`;\n }\n\n /** Id of the helper text: `<textareaId>-helper`. */\n get helperId(): string {\n return `${this.resolvedId()}-helper`;\n }\n\n /**\n * The native textarea's value. On the server a leading line break gets one\n * extra `\\n`: the HTML parser drops the first line break after `<textarea>`,\n * and the server's DOM serialiser doesn't add the one the HTML\n * serialisation rules require, so the prerendered page would lose it.\n */\n protected readonly renderedValue = computed(() => {\n const value = this.value();\n return this.isServer && /^[\\r\\n]/.test(value) ? `\\n${value}` : value;\n });\n\n // Internal disabled state (for ControlValueAccessor)\n private readonly formDisabled = signal<boolean>(false);\n\n /**\n * Computed disabled state from both input and form control\n */\n readonly isDisabled = computed(() => this.disabled() || this.formDisabled());\n\n // Computed values\n readonly currentCharacterCount = computed(() => this.value().length);\n\n readonly characterCountText = computed(() => {\n const current = this.currentCharacterCount();\n const max = this.maxLength();\n return max !== undefined ? `${current} / ${max}` : `${current}`;\n });\n\n readonly isOverLimit = computed(() => {\n const max = this.maxLength();\n return max !== undefined && this.currentCharacterCount() > max;\n });\n\n /** Whether an error message is shown (drives aria-describedby) */\n readonly showsError = computed(() => this.error() && !!this.errorMessage());\n\n /** Whether the helper text is shown (error message takes precedence) */\n readonly showsHelper = computed(() => !this.showsError() && !!this.helperText());\n\n readonly describedBy = computed(() => {\n const ids: string[] = [];\n if (this.showsError()) ids.push(this.errorId);\n if (this.showsHelper()) ids.push(this.helperId);\n return ids.length ? ids.join(' ') : null;\n });\n\n /**\n * Computed classes for the textarea element\n */\n readonly textareaClasses = computed(() => {\n const classes = ['lc-textarea', `lc-textarea--${this.variant()}`, `lc-textarea--${this.size()}`];\n\n if (this.isDisabled()) {\n classes.push('lc-textarea--disabled');\n }\n\n if (this.error()) {\n classes.push('lc-textarea--error');\n }\n\n if (this.readonly()) {\n classes.push('lc-textarea--readonly');\n }\n\n if (this.autoResize()) {\n classes.push('lc-textarea--auto-resize');\n }\n\n return classes.join(' ');\n });\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onChange: (value: string) => void = () => {};\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onTouched: () => void = () => {};\n\n constructor() {\n // Re-measure after every render in which the value or the resize\n // constraints changed — this covers typing, form writes and input changes\n // without timers, and runs once the DOM already holds the new value.\n afterRenderEffect(() => {\n this.value();\n this.minRows();\n this.maxRows();\n if (this.autoResize()) {\n this.adjustHeight();\n }\n });\n }\n\n /**\n * Handle input changes\n */\n onInput(value: string): void {\n if (this.isDisabled() || this.readonly()) {\n return;\n }\n\n // model.set() emits `valueChange` exactly once per actual change\n this.value.set(value);\n this.onChange(value);\n }\n\n /**\n * Handle blur event\n */\n onBlur(): void {\n this.onTouched();\n }\n\n // ControlValueAccessor implementation\n writeValue(value: string | null | undefined): void {\n this.value.set(value || '');\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled);\n }\n\n // Private helper methods\n private adjustHeight(): void {\n const textarea = this.textareaElement()?.nativeElement;\n if (!textarea) {\n return;\n }\n\n // Reset height to get accurate scrollHeight\n textarea.style.height = 'auto';\n\n const minHeight = this.rowsToHeight(textarea, this.minRows());\n const maxHeight = this.rowsToHeight(textarea, this.maxRows());\n let newHeight = textarea.scrollHeight;\n\n // Apply constraints\n if (minHeight !== undefined) {\n newHeight = Math.max(newHeight, minHeight);\n }\n if (maxHeight !== undefined) {\n newHeight = Math.min(newHeight, maxHeight);\n }\n\n textarea.style.height = `${newHeight}px`;\n }\n\n /** Pixel height for `rows` lines incl. vertical padding; undefined when it cannot be measured. */\n private rowsToHeight(textarea: HTMLTextAreaElement, rows: number | undefined): number | undefined {\n if (rows === undefined) {\n return undefined;\n }\n\n const style = getComputedStyle(textarea);\n const lineHeight = parseFloat(style.lineHeight);\n const paddingTop = parseFloat(style.paddingTop) || 0;\n const paddingBottom = parseFloat(style.paddingBottom) || 0;\n\n // 'normal' / unmeasurable line-height (e.g. jsdom) → no constraint\n if (!Number.isFinite(lineHeight)) {\n return undefined;\n }\n\n return lineHeight * rows + paddingTop + paddingBottom;\n }\n\n protected getInputValue(event: Event): string {\n return (event.target as HTMLTextAreaElement).value;\n }\n}\n","<div class=\"lc-textarea-wrapper\">\n @if (label()) {\n <!-- No whitespace before the *: the gap is its margin, and it never wraps onto a line alone -->\n <label [for]=\"textareaId\" class=\"lc-textarea-label\">\n {{ label() }}@if (required() && requiredIndicator()) {<span class=\"lc-textarea-required-indicator\" aria-hidden=\"true\">*</span>}\n </label>\n }\n\n <div class=\"lc-textarea-input-wrapper\">\n <textarea\n #textarea\n [id]=\"textareaId\"\n [class]=\"textareaClasses()\"\n [value]=\"renderedValue()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() ?? null\"\n [attr.rows]=\"autoResize() ? null : rows()\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"error() || null\"\n [attr.aria-describedby]=\"describedBy()\"\n (input)=\"onInput(getInputValue($event))\"\n (blur)=\"onBlur()\"\n ></textarea>\n </div>\n\n <div class=\"lc-textarea-footer\">\n <div class=\"lc-textarea-messages\">\n @if (showsError()) {\n <span [id]=\"errorId\" class=\"lc-textarea-error-message\" [attr.role]=\"announceError() ? 'alert' : null\">{{ errorMessage() }}</span>\n } @else if (showsHelper()) {\n <span [id]=\"helperId\" class=\"lc-textarea-helper-text\">{{ helperText() }}</span>\n }\n </div>\n\n @if (showCharacterCount()) {\n <span\n class=\"lc-textarea-character-count\"\n [class.lc-textarea-character-count--over-limit]=\"isOverLimit()\"\n aria-live=\"polite\"\n >\n {{ characterCountText() }}\n </span>\n }\n </div>\n</div>\n"],"mappings":";;;;AAmBA,IAAI,eAAe;AAqCnB,IAAa,oBAAb,MAAa,kBAAiB;CACX,kBAAkB,UAA2C,YAAW,GAAA,YAAA,CAAA,EAAA,WAAA,kBAAA,CAAA,+BAAA,CAAA,CAAA;CAExE,WAAW,iBAAiB,OAAO,WAAW,CAAC;CAMvD,UAAU,MAA4B,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAMhD,OAAO,MAAiC,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAM7C,WAAW,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAMhC,QAAQ,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAM7B,WAAW,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAQhC,oBAAoB,MAAe,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,oBAAA,CAAA,+BAAA,CAAA,CAAA;CAWxC,oBAAoB,MAAc,YAAW,GAAA,YAAA,CAAA,EAAA,WAAA,oBAAA,CAAA,+BAAA,CAAA,CAAA;CAY7C,YAAY,MAA0B,QAAU,GAAA,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A,CAAA;EAAA,CAAA;EAAA,YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,GAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,aAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
@@ -388,7 +388,7 @@ var TreeViewComponent = class TreeViewComponent {
388
388
  host: { classAttribute: "lc-tree-view" },
389
389
  ngImport: i0,
390
390
  template: "@if (showToolbar()) {\n <div class=\"lc-tree-view__toolbar\">\n <button type=\"button\" class=\"lc-tree-view__tool-btn\" (click)=\"expandAll()\" [attr.title]=\"expandAllLabel()\">\n <lc-icon name=\"fold-down\" size=\"xs\" [decorative]=\"true\" />\n <span>{{ expandAllLabel() }}</span>\n </button>\n <button type=\"button\" class=\"lc-tree-view__tool-btn\" (click)=\"collapseAll()\" [attr.title]=\"collapseAllLabel()\">\n <lc-icon name=\"fold-up\" size=\"xs\" [decorative]=\"true\" />\n <span>{{ collapseAllLabel() }}</span>\n </button>\n </div>\n}\n\n<ul class=\"lc-tree-view__list\" role=\"tree\">\n @for (node of visibleNodes(); track trackById($index, node)) {\n <li\n class=\"lc-tree-view__item\"\n [class.lc-tree-view__item--selected]=\"node.id === selectedId()\"\n [class.lc-tree-view__item--disabled]=\"node.disabled\"\n [class.lc-tree-view__item--folder]=\"node.type === 'folder'\"\n role=\"treeitem\"\n [attr.aria-level]=\"node.depth + 1\"\n [attr.aria-posinset]=\"node.posInSet\"\n [attr.aria-setsize]=\"node.setSize\"\n [attr.aria-expanded]=\"node.hasChildren ? node.expanded : null\"\n [attr.aria-selected]=\"node.id === selectedId()\"\n [attr.aria-disabled]=\"node.disabled ? true : null\"\n [attr.aria-busy]=\"node.status === 'busy' ? true : null\"\n [tabindex]=\"node.id === tabStopId() ? 0 : -1\"\n (focus)=\"onFocus(node)\"\n (click)=\"onNodeClick(node)\"\n (keydown)=\"onKeydown(node, $event)\"\n >\n <!-- indentation + guide lines -->\n @for (hasSibling of node.ancestorHasSibling; track $index) {\n <span\n class=\"lc-tree-view__indent\"\n [class.lc-tree-view__indent--guide]=\"showGuides() && hasSibling\"\n ></span>\n }\n\n <!-- expand / collapse chevron -->\n <span class=\"lc-tree-view__chevron\">\n @if (node.hasChildren) {\n <button\n type=\"button\"\n class=\"lc-tree-view__chevron-btn\"\n [class.lc-tree-view__chevron-btn--expanded]=\"node.expanded\"\n (click)=\"onToggleClick(node, $event)\"\n [attr.aria-label]=\"node.expanded ? collapseAriaLabel() : expandAriaLabel()\"\n tabindex=\"-1\"\n >\n <lc-icon name=\"chevron-right\" size=\"xs\" [decorative]=\"true\" />\n </button>\n }\n </span>\n\n <!-- type / file icon, or type dot for custom node types -->\n <span\n class=\"lc-tree-view__icon\"\n [style.color]=\"\n node.color ?? (node.status === 'default' ? null : badgeColor(node.status))\n \"\n >\n @if (node.icon; as icon) {\n <lc-icon [name]=\"icon\" [size]=\"iconSize()\" [decorative]=\"true\" />\n } @else {\n <span\n class=\"lc-tree-view__type-dot\"\n [style.background-color]=\"node.color ?? null\"\n ></span>\n }\n </span>\n\n <!-- label -->\n <span class=\"lc-tree-view__label\">{{ node.name }}</span>\n\n <!-- badge -->\n @if (node.badge) {\n <span\n class=\"lc-tree-view__badge\"\n [style.color]=\"badgeColor(node.status)\"\n [style.border-color]=\"badgeColor(node.status)\"\n >{{ node.badge }}</span\n >\n }\n\n <!-- status indicator -->\n @if (node.status === 'success') {\n <span class=\"lc-tree-view__status lc-tree-view__status--success\">\n <lc-icon name=\"check\" size=\"xs\" [decorative]=\"true\" />\n </span>\n } @else if (node.status === 'busy') {\n <span class=\"lc-tree-view__status lc-tree-view__status--busy\"></span>\n }\n </li>\n }\n</ul>\n",
391
- styles: [":host{display:block;border:1px solid var(--color-border);border-radius:8px;background:var(--color-surface);overflow:hidden;font-size:var(--lc-tree-view-font-size, 13px);color:var(--color-text-primary)}.lc-tree-view__toolbar{display:flex;align-items:center;gap:4px;padding:6px 8px;border-bottom:1px solid var(--color-divider);background:var(--color-surface-2);-webkit-user-select:none;user-select:none}.lc-tree-view__tool-btn{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;border:1px solid transparent;border-radius:4px;background:transparent;color:var(--color-text-secondary);font-size:var(--typography-font-size-xs, .75rem);cursor:pointer;line-height:1}.lc-tree-view__tool-btn:hover{background:var(--color-surface-hover);color:var(--color-text-primary)}.lc-tree-view__tool-btn:focus-visible{outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--color-primary-500) 20%,transparent)}.lc-tree-view__list{list-style:none;margin:0;padding:4px 0}.lc-tree-view__item{display:flex;align-items:center;height:var(--lc-tree-view-row-height, 26px);padding-right:8px;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;outline:none}.lc-tree-view__item:hover{background:var(--color-surface-hover)}.lc-tree-view__item:focus-visible{box-shadow:inset 0 0 0 2px var(--color-primary-400)}.lc-tree-view__item--selected{background:var(--color-primary-50)}.lc-tree-view__item--selected:hover{background:var(--color-primary-100, var(--color-primary-50))}.lc-tree-view__item--selected .lc-tree-view__label{color:var(--color-primary-700);font-weight:500}.lc-tree-view__item--disabled{opacity:.5;cursor:not-allowed}.lc-tree-view__item--disabled:hover{background:transparent}.lc-tree-view__indent{flex:0 0 18px;width:18px;height:100%;position:relative}.lc-tree-view__indent--guide:before{content:\"\";position:absolute;left:50%;top:0;bottom:0;width:1px;background:var(--color-divider)}.lc-tree-view__chevron{flex:0 0 18px;width:18px;display:flex;align-items:center;justify-content:center;color:var(--color-text-tertiary)}.lc-tree-view__chevron-btn{display:flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;background:transparent;color:inherit;cursor:pointer;border-radius:3px;transition:transform .12s ease}.lc-tree-view__chevron-btn:hover{background:var(--color-surface-sunken)}.lc-tree-view__chevron-btn--expanded{transform:rotate(90deg)}.lc-tree-view__icon{display:flex;align-items:center;margin-right:6px;color:var(--color-text-tertiary)}.lc-tree-view__item--folder .lc-tree-view__icon{color:var(--color-primary-500, #6366f1)}.lc-tree-view__label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-primary)}.lc-tree-view__badge{flex:0 0 auto;margin-left:8px;padding:1px 6px;border:1px solid;border-radius:10px;font-size:10px;line-height:1.4;font-weight:600;text-transform:uppercase;letter-spacing:.02em}.lc-tree-view__type-dot{display:block;width:8px;height:8px;border-radius:50%;background:var(--color-text-tertiary)}.lc-tree-view__status{flex:0 0 auto;display:inline-flex;align-items:center;margin-left:8px}.lc-tree-view__status--success{color:var(--color-success-default, #16a34a)}.lc-tree-view__status--busy{width:8px;height:8px;border-radius:50%;background:var(--color-primary-500, #6366f1);animation:lc-tree-view-pulse 1.2s ease-in-out infinite}@keyframes lc-tree-view-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.35;transform:scale(.75)}}@media(prefers-reduced-motion:reduce){.lc-tree-view__status--busy{animation:none}}\n"],
391
+ styles: [":host{display:block;border:1px solid var(--color-border);border-radius:8px;background:var(--color-surface);overflow:hidden;font-size:var(--lc-tree-view-font-size, 13px);color:var(--color-text-primary)}.lc-tree-view__toolbar{display:flex;align-items:center;gap:4px;padding:6px 8px;border-bottom:1px solid var(--color-divider);background:var(--color-surface-2);-webkit-user-select:none;user-select:none}.lc-tree-view__tool-btn{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;border:1px solid transparent;border-radius:4px;background:transparent;color:var(--color-text-secondary);font-size:var(--typography-font-size-xs, .75rem);cursor:pointer;line-height:1}.lc-tree-view__tool-btn:hover{background:var(--color-surface-hover);color:var(--color-text-primary)}.lc-tree-view__tool-btn:focus-visible{outline:2px solid var(--color-primary-500);outline-offset:2px}.lc-tree-view__list{list-style:none;margin:0;padding:4px 0}.lc-tree-view__item{display:flex;align-items:center;height:var(--lc-tree-view-row-height, 26px);padding-right:8px;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;outline:none}.lc-tree-view__item:hover{background:var(--color-surface-hover)}.lc-tree-view__item:focus-visible{outline:2px solid var(--color-primary-500);outline-offset:-2px}.lc-tree-view__item--selected{background:var(--color-primary-50)}.lc-tree-view__item--selected:hover{background:var(--color-primary-100, var(--color-primary-50))}.lc-tree-view__item--selected .lc-tree-view__label{color:var(--color-primary-700);font-weight:500}.lc-tree-view__item--disabled{opacity:.5;cursor:not-allowed}.lc-tree-view__item--disabled:hover{background:transparent}.lc-tree-view__indent{flex:0 0 18px;width:18px;height:100%;position:relative}.lc-tree-view__indent--guide:before{content:\"\";position:absolute;left:50%;top:0;bottom:0;width:1px;background:var(--color-divider)}.lc-tree-view__chevron{flex:0 0 18px;width:18px;display:flex;align-items:center;justify-content:center;color:var(--color-text-tertiary)}.lc-tree-view__chevron-btn{display:flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;background:transparent;color:inherit;cursor:pointer;border-radius:3px;transition:transform .12s ease}.lc-tree-view__chevron-btn:hover{background:var(--color-surface-sunken)}.lc-tree-view__chevron-btn--expanded{transform:rotate(90deg)}.lc-tree-view__icon{display:flex;align-items:center;margin-right:6px;color:var(--color-text-tertiary)}.lc-tree-view__item--folder .lc-tree-view__icon{color:var(--color-primary-500, #6366f1)}.lc-tree-view__label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-primary)}.lc-tree-view__badge{flex:0 0 auto;margin-left:8px;padding:1px 6px;border:1px solid;border-radius:10px;font-size:10px;line-height:1.4;font-weight:600;text-transform:uppercase;letter-spacing:.02em}.lc-tree-view__type-dot{display:block;width:8px;height:8px;border-radius:50%;background:var(--color-text-tertiary)}.lc-tree-view__status{flex:0 0 auto;display:inline-flex;align-items:center;margin-left:8px}.lc-tree-view__status--success{color:var(--color-success-default, #16a34a)}.lc-tree-view__status--busy{width:8px;height:8px;border-radius:50%;background:var(--color-primary-500, #6366f1);animation:lc-tree-view-pulse 1.2s ease-in-out infinite}@keyframes lc-tree-view-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.35;transform:scale(.75)}}@media(prefers-reduced-motion:reduce){.lc-tree-view__status--busy{animation:none}}@media(forced-colors:active){.lc-tree-view__tool-btn:focus-visible,.lc-tree-view__item:focus-visible{outline-color:Highlight}}\n"],
392
392
  dependencies: [{
393
393
  kind: "component",
394
394
  type: IconComponent,
@@ -438,7 +438,7 @@ i0.ɵɵngDeclareClassMetadata({
438
438
  changeDetection: ChangeDetectionStrategy.OnPush,
439
439
  host: { class: "lc-tree-view" },
440
440
  template: "@if (showToolbar()) {\n <div class=\"lc-tree-view__toolbar\">\n <button type=\"button\" class=\"lc-tree-view__tool-btn\" (click)=\"expandAll()\" [attr.title]=\"expandAllLabel()\">\n <lc-icon name=\"fold-down\" size=\"xs\" [decorative]=\"true\" />\n <span>{{ expandAllLabel() }}</span>\n </button>\n <button type=\"button\" class=\"lc-tree-view__tool-btn\" (click)=\"collapseAll()\" [attr.title]=\"collapseAllLabel()\">\n <lc-icon name=\"fold-up\" size=\"xs\" [decorative]=\"true\" />\n <span>{{ collapseAllLabel() }}</span>\n </button>\n </div>\n}\n\n<ul class=\"lc-tree-view__list\" role=\"tree\">\n @for (node of visibleNodes(); track trackById($index, node)) {\n <li\n class=\"lc-tree-view__item\"\n [class.lc-tree-view__item--selected]=\"node.id === selectedId()\"\n [class.lc-tree-view__item--disabled]=\"node.disabled\"\n [class.lc-tree-view__item--folder]=\"node.type === 'folder'\"\n role=\"treeitem\"\n [attr.aria-level]=\"node.depth + 1\"\n [attr.aria-posinset]=\"node.posInSet\"\n [attr.aria-setsize]=\"node.setSize\"\n [attr.aria-expanded]=\"node.hasChildren ? node.expanded : null\"\n [attr.aria-selected]=\"node.id === selectedId()\"\n [attr.aria-disabled]=\"node.disabled ? true : null\"\n [attr.aria-busy]=\"node.status === 'busy' ? true : null\"\n [tabindex]=\"node.id === tabStopId() ? 0 : -1\"\n (focus)=\"onFocus(node)\"\n (click)=\"onNodeClick(node)\"\n (keydown)=\"onKeydown(node, $event)\"\n >\n <!-- indentation + guide lines -->\n @for (hasSibling of node.ancestorHasSibling; track $index) {\n <span\n class=\"lc-tree-view__indent\"\n [class.lc-tree-view__indent--guide]=\"showGuides() && hasSibling\"\n ></span>\n }\n\n <!-- expand / collapse chevron -->\n <span class=\"lc-tree-view__chevron\">\n @if (node.hasChildren) {\n <button\n type=\"button\"\n class=\"lc-tree-view__chevron-btn\"\n [class.lc-tree-view__chevron-btn--expanded]=\"node.expanded\"\n (click)=\"onToggleClick(node, $event)\"\n [attr.aria-label]=\"node.expanded ? collapseAriaLabel() : expandAriaLabel()\"\n tabindex=\"-1\"\n >\n <lc-icon name=\"chevron-right\" size=\"xs\" [decorative]=\"true\" />\n </button>\n }\n </span>\n\n <!-- type / file icon, or type dot for custom node types -->\n <span\n class=\"lc-tree-view__icon\"\n [style.color]=\"\n node.color ?? (node.status === 'default' ? null : badgeColor(node.status))\n \"\n >\n @if (node.icon; as icon) {\n <lc-icon [name]=\"icon\" [size]=\"iconSize()\" [decorative]=\"true\" />\n } @else {\n <span\n class=\"lc-tree-view__type-dot\"\n [style.background-color]=\"node.color ?? null\"\n ></span>\n }\n </span>\n\n <!-- label -->\n <span class=\"lc-tree-view__label\">{{ node.name }}</span>\n\n <!-- badge -->\n @if (node.badge) {\n <span\n class=\"lc-tree-view__badge\"\n [style.color]=\"badgeColor(node.status)\"\n [style.border-color]=\"badgeColor(node.status)\"\n >{{ node.badge }}</span\n >\n }\n\n <!-- status indicator -->\n @if (node.status === 'success') {\n <span class=\"lc-tree-view__status lc-tree-view__status--success\">\n <lc-icon name=\"check\" size=\"xs\" [decorative]=\"true\" />\n </span>\n } @else if (node.status === 'busy') {\n <span class=\"lc-tree-view__status lc-tree-view__status--busy\"></span>\n }\n </li>\n }\n</ul>\n",
441
- styles: [":host{display:block;border:1px solid var(--color-border);border-radius:8px;background:var(--color-surface);overflow:hidden;font-size:var(--lc-tree-view-font-size, 13px);color:var(--color-text-primary)}.lc-tree-view__toolbar{display:flex;align-items:center;gap:4px;padding:6px 8px;border-bottom:1px solid var(--color-divider);background:var(--color-surface-2);-webkit-user-select:none;user-select:none}.lc-tree-view__tool-btn{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;border:1px solid transparent;border-radius:4px;background:transparent;color:var(--color-text-secondary);font-size:var(--typography-font-size-xs, .75rem);cursor:pointer;line-height:1}.lc-tree-view__tool-btn:hover{background:var(--color-surface-hover);color:var(--color-text-primary)}.lc-tree-view__tool-btn:focus-visible{outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--color-primary-500) 20%,transparent)}.lc-tree-view__list{list-style:none;margin:0;padding:4px 0}.lc-tree-view__item{display:flex;align-items:center;height:var(--lc-tree-view-row-height, 26px);padding-right:8px;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;outline:none}.lc-tree-view__item:hover{background:var(--color-surface-hover)}.lc-tree-view__item:focus-visible{box-shadow:inset 0 0 0 2px var(--color-primary-400)}.lc-tree-view__item--selected{background:var(--color-primary-50)}.lc-tree-view__item--selected:hover{background:var(--color-primary-100, var(--color-primary-50))}.lc-tree-view__item--selected .lc-tree-view__label{color:var(--color-primary-700);font-weight:500}.lc-tree-view__item--disabled{opacity:.5;cursor:not-allowed}.lc-tree-view__item--disabled:hover{background:transparent}.lc-tree-view__indent{flex:0 0 18px;width:18px;height:100%;position:relative}.lc-tree-view__indent--guide:before{content:\"\";position:absolute;left:50%;top:0;bottom:0;width:1px;background:var(--color-divider)}.lc-tree-view__chevron{flex:0 0 18px;width:18px;display:flex;align-items:center;justify-content:center;color:var(--color-text-tertiary)}.lc-tree-view__chevron-btn{display:flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;background:transparent;color:inherit;cursor:pointer;border-radius:3px;transition:transform .12s ease}.lc-tree-view__chevron-btn:hover{background:var(--color-surface-sunken)}.lc-tree-view__chevron-btn--expanded{transform:rotate(90deg)}.lc-tree-view__icon{display:flex;align-items:center;margin-right:6px;color:var(--color-text-tertiary)}.lc-tree-view__item--folder .lc-tree-view__icon{color:var(--color-primary-500, #6366f1)}.lc-tree-view__label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-primary)}.lc-tree-view__badge{flex:0 0 auto;margin-left:8px;padding:1px 6px;border:1px solid;border-radius:10px;font-size:10px;line-height:1.4;font-weight:600;text-transform:uppercase;letter-spacing:.02em}.lc-tree-view__type-dot{display:block;width:8px;height:8px;border-radius:50%;background:var(--color-text-tertiary)}.lc-tree-view__status{flex:0 0 auto;display:inline-flex;align-items:center;margin-left:8px}.lc-tree-view__status--success{color:var(--color-success-default, #16a34a)}.lc-tree-view__status--busy{width:8px;height:8px;border-radius:50%;background:var(--color-primary-500, #6366f1);animation:lc-tree-view-pulse 1.2s ease-in-out infinite}@keyframes lc-tree-view-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.35;transform:scale(.75)}}@media(prefers-reduced-motion:reduce){.lc-tree-view__status--busy{animation:none}}\n"]
441
+ styles: [":host{display:block;border:1px solid var(--color-border);border-radius:8px;background:var(--color-surface);overflow:hidden;font-size:var(--lc-tree-view-font-size, 13px);color:var(--color-text-primary)}.lc-tree-view__toolbar{display:flex;align-items:center;gap:4px;padding:6px 8px;border-bottom:1px solid var(--color-divider);background:var(--color-surface-2);-webkit-user-select:none;user-select:none}.lc-tree-view__tool-btn{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;border:1px solid transparent;border-radius:4px;background:transparent;color:var(--color-text-secondary);font-size:var(--typography-font-size-xs, .75rem);cursor:pointer;line-height:1}.lc-tree-view__tool-btn:hover{background:var(--color-surface-hover);color:var(--color-text-primary)}.lc-tree-view__tool-btn:focus-visible{outline:2px solid var(--color-primary-500);outline-offset:2px}.lc-tree-view__list{list-style:none;margin:0;padding:4px 0}.lc-tree-view__item{display:flex;align-items:center;height:var(--lc-tree-view-row-height, 26px);padding-right:8px;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;outline:none}.lc-tree-view__item:hover{background:var(--color-surface-hover)}.lc-tree-view__item:focus-visible{outline:2px solid var(--color-primary-500);outline-offset:-2px}.lc-tree-view__item--selected{background:var(--color-primary-50)}.lc-tree-view__item--selected:hover{background:var(--color-primary-100, var(--color-primary-50))}.lc-tree-view__item--selected .lc-tree-view__label{color:var(--color-primary-700);font-weight:500}.lc-tree-view__item--disabled{opacity:.5;cursor:not-allowed}.lc-tree-view__item--disabled:hover{background:transparent}.lc-tree-view__indent{flex:0 0 18px;width:18px;height:100%;position:relative}.lc-tree-view__indent--guide:before{content:\"\";position:absolute;left:50%;top:0;bottom:0;width:1px;background:var(--color-divider)}.lc-tree-view__chevron{flex:0 0 18px;width:18px;display:flex;align-items:center;justify-content:center;color:var(--color-text-tertiary)}.lc-tree-view__chevron-btn{display:flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;background:transparent;color:inherit;cursor:pointer;border-radius:3px;transition:transform .12s ease}.lc-tree-view__chevron-btn:hover{background:var(--color-surface-sunken)}.lc-tree-view__chevron-btn--expanded{transform:rotate(90deg)}.lc-tree-view__icon{display:flex;align-items:center;margin-right:6px;color:var(--color-text-tertiary)}.lc-tree-view__item--folder .lc-tree-view__icon{color:var(--color-primary-500, #6366f1)}.lc-tree-view__label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-primary)}.lc-tree-view__badge{flex:0 0 auto;margin-left:8px;padding:1px 6px;border:1px solid;border-radius:10px;font-size:10px;line-height:1.4;font-weight:600;text-transform:uppercase;letter-spacing:.02em}.lc-tree-view__type-dot{display:block;width:8px;height:8px;border-radius:50%;background:var(--color-text-tertiary)}.lc-tree-view__status{flex:0 0 auto;display:inline-flex;align-items:center;margin-left:8px}.lc-tree-view__status--success{color:var(--color-success-default, #16a34a)}.lc-tree-view__status--busy{width:8px;height:8px;border-radius:50%;background:var(--color-primary-500, #6366f1);animation:lc-tree-view-pulse 1.2s ease-in-out infinite}@keyframes lc-tree-view-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.35;transform:scale(.75)}}@media(prefers-reduced-motion:reduce){.lc-tree-view__status--busy{animation:none}}@media(forced-colors:active){.lc-tree-view__tool-btn:focus-visible,.lc-tree-view__item:focus-visible{outline-color:Highlight}}\n"]
442
442
  }]
443
443
  }],
444
444
  propDecorators: {
@@ -1 +1 @@
1
- {"version":3,"file":"lifecorner-angular-ui-kit-tree-view.mjs","names":[],"sources":["../../../../libs/angular-ui-kit/src/lib/tree-view/file-icons.ts","../../../../libs/angular-ui-kit/src/lib/tree-view/tree-view.component.ts","../../../../libs/angular-ui-kit/src/lib/tree-view/tree-view.component.html"],"sourcesContent":["/**\n * File-type → icon mapping for the TreeView component.\n *\n * Icon names refer to Tabler Icons (the design system's icon source).\n * Resolution order for a file node:\n * 1. explicit `node.icon`\n * 2. exact file name match (e.g. `package.json`, `Dockerfile`)\n * 3. file extension match (e.g. `.ts`, `.png`)\n * 4. generic file fallback\n */\n\n/** Icon used for collapsed folders. */\nexport const FOLDER_ICON = 'folder';\n/** Icon used for expanded (open) folders. */\nexport const FOLDER_OPEN_ICON = 'folder-open';\n/** Generic fallback icon for files with no specific match. */\nexport const FILE_FALLBACK_ICON = 'file';\n\n/** Map of well-known file names (lower-cased) to icons. */\nconst FILE_NAME_ICONS: Record<string, string> = {\n 'package.json': 'brand-npm',\n 'package-lock.json': 'brand-npm',\n 'yarn.lock': 'brand-yarn',\n 'pnpm-lock.yaml': 'brand-pnpm',\n 'dockerfile': 'brand-docker',\n 'docker-compose.yml': 'brand-docker',\n 'docker-compose.yaml': 'brand-docker',\n '.gitignore': 'brand-git',\n '.gitattributes': 'brand-git',\n '.gitmodules': 'brand-git',\n 'readme.md': 'book',\n 'license': 'license',\n 'license.md': 'license',\n '.env': 'key',\n '.env.local': 'key',\n '.editorconfig': 'settings',\n '.prettierrc': 'settings',\n '.eslintrc': 'settings',\n 'tsconfig.json': 'brand-typescript',\n 'angular.json': 'brand-angular',\n 'nx.json': 'settings',\n 'makefile': 'terminal',\n};\n\n/** Map of file extensions (without dot, lower-cased) to icons. */\nconst FILE_EXT_ICONS: Record<string, string> = {\n // Languages\n ts: 'brand-typescript',\n tsx: 'brand-typescript',\n js: 'brand-javascript',\n jsx: 'brand-javascript',\n mjs: 'brand-javascript',\n cjs: 'brand-javascript',\n html: 'brand-html5',\n htm: 'brand-html5',\n css: 'brand-css3',\n scss: 'brand-sass',\n sass: 'brand-sass',\n less: 'brand-css3',\n py: 'brand-python',\n rb: 'diamond',\n go: 'brand-golang',\n rs: 'brand-rust',\n java: 'coffee',\n kt: 'brand-kotlin',\n swift: 'brand-swift',\n c: 'file-code',\n h: 'file-code',\n cpp: 'brand-cpp',\n cs: 'brand-c-sharp',\n php: 'brand-php',\n dart: 'brand-flutter',\n sh: 'terminal-2',\n bash: 'terminal-2',\n zsh: 'terminal-2',\n sql: 'database',\n // Data / config\n json: 'braces',\n jsonc: 'braces',\n yml: 'file-code',\n yaml: 'file-code',\n toml: 'file-code',\n xml: 'file-code',\n ini: 'settings',\n env: 'key',\n // Docs\n md: 'markdown',\n mdx: 'markdown',\n txt: 'file-text',\n pdf: 'file-type-pdf',\n doc: 'file-text',\n docx: 'file-text',\n csv: 'file-spreadsheet',\n xls: 'file-spreadsheet',\n xlsx: 'file-spreadsheet',\n // Images\n png: 'photo',\n jpg: 'photo',\n jpeg: 'photo',\n gif: 'photo',\n webp: 'photo',\n svg: 'file-vector',\n ico: 'photo',\n bmp: 'photo',\n // Media\n mp3: 'music',\n wav: 'music',\n mp4: 'video',\n mov: 'video',\n webm: 'video',\n // Archives\n zip: 'file-zip',\n tar: 'file-zip',\n gz: 'file-zip',\n rar: 'file-zip',\n '7z': 'file-zip',\n // Fonts\n woff: 'typography',\n woff2: 'typography',\n ttf: 'typography',\n otf: 'typography',\n // Misc\n lock: 'lock',\n};\n\n/**\n * Resolve the icon name for a file based on its name.\n * Performs exact-name then extension lookup, falling back to a generic file icon.\n */\nexport function resolveFileIcon(fileName: string): string {\n const lower = fileName.toLowerCase();\n\n const byName = FILE_NAME_ICONS[lower];\n if (byName) return byName;\n\n const dotIndex = lower.lastIndexOf('.');\n if (dotIndex > 0 && dotIndex < lower.length - 1) {\n const ext = lower.slice(dotIndex + 1);\n const byExt = FILE_EXT_ICONS[ext];\n if (byExt) return byExt;\n }\n\n return FILE_FALLBACK_ICON;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n computed,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { IconComponent, ɵprovideKitIcons } from '@lifecorner/angular-ui-kit/icon';\nimport {\n ICON_CHECK,\n ICON_CHEVRON_RIGHT,\n ICON_FILE,\n ICON_FILE_TEXT,\n ICON_KEY,\n ICON_LOCK,\n ICON_SETTINGS,\n} from '@lifecorner/angular-ui-kit/icons';\nimport {\n FILE_FALLBACK_ICON,\n FOLDER_ICON,\n FOLDER_OPEN_ICON,\n resolveFileIcon,\n} from './file-icons';\n\n// ── Public types ─────────────────────────────────────────────────────────────\n\n/**\n * Node type. `'file'` and `'folder'` get the built-in file-tree treatment\n * (extension icons, folder open/close icons). Any other string marks a custom\n * domain type: such nodes render a colored type dot (or an explicit `icon`)\n * instead of file icons.\n */\nexport type TreeNodeType = 'file' | 'folder' | (string & {});\n\nexport type TreeNodeStatus =\n | 'default'\n | 'added'\n | 'modified'\n | 'removed'\n | 'muted'\n | 'success'\n | 'busy';\n\n/**\n * A node in the tree. Any node carrying `children` can expand — this covers\n * file trees (folders) as well as arbitrary domain hierarchies.\n */\nexport interface TreeNode {\n /** Display name, e.g. `app.component.ts` or `src`. */\n name: string;\n /**\n * Node type. Optional — inferred as `folder` when `children` is present,\n * otherwise `file`. May be any string for domain hierarchies.\n */\n type?: TreeNodeType;\n /**\n * Stable identifier. Optional — when omitted, the full path is used,\n * which is stable as long as names are unique among siblings.\n */\n id?: string;\n /** Child nodes. Any node with children can expand / collapse. */\n children?: TreeNode[];\n /**\n * Explicit Tabler icon name. Overrides automatic file-type / folder\n * icon resolution and the custom-type dot.\n */\n icon?: string;\n /**\n * Accent color for the node's icon / type dot. Any CSS color, including\n * `var(--…)` token references.\n */\n color?: string;\n /** Optional badge text shown to the right of the node (e.g. git status, count). */\n badge?: string;\n /**\n * Tone of the badge / node accent. `success` additionally renders a ✓\n * indicator, `busy` a pulsing dot (static under `prefers-reduced-motion`).\n */\n status?: TreeNodeStatus;\n /** Whether this node starts expanded. Ignored for nodes without children. */\n expanded?: boolean;\n /** Disable selection / interaction for this node. */\n disabled?: boolean;\n}\n\n// ── Internal flattened representation ─────────────────────────────────────────\n\ninterface FlatNode {\n id: string;\n name: string;\n type: TreeNodeType;\n depth: number;\n hasChildren: boolean;\n expanded: boolean;\n /** Resolved icon, or `null` for custom-type nodes that render a type dot. */\n icon: string | null;\n color?: string;\n badge?: string;\n status: TreeNodeStatus;\n disabled: boolean;\n /** Whether each ancestor level still has following siblings (for guide lines). */\n ancestorHasSibling: boolean[];\n /** Whether this node is the last among its siblings. */\n isLast: boolean;\n /** 1-based position among its siblings (aria-posinset). */\n posInSet: number;\n /** Number of siblings including itself (aria-setsize). */\n setSize: number;\n /** Id of the parent node, `null` for root nodes. */\n parentId: string | null;\n}\n\nconst BADGE_STATUS_COLOR: Record<TreeNodeStatus, string> = {\n default: 'var(--color-text-tertiary)',\n added: 'var(--color-success-default, #16a34a)',\n modified: 'var(--color-warning-default, #d97706)',\n removed: 'var(--color-error-default, #dc2626)',\n muted: 'var(--color-text-disabled)',\n success: 'var(--color-success-default, #16a34a)',\n busy: 'var(--color-primary-500, #6366f1)',\n};\n\nfunction nodeType(node: TreeNode): TreeNodeType {\n return node.type ?? (node.children ? 'folder' : 'file');\n}\n\nfunction isExpandable(node: TreeNode): boolean {\n return !!node.children?.length;\n}\n\n/**\n * Tree view component for visualizing hierarchies — file / folder trees as\n * well as arbitrary domain object trees with custom node types.\n *\n * Features:\n * - Recursive rendering from a single `nodes` input; any node with children\n * can expand / collapse\n * - Automatic file-type icons by extension and well-known file name,\n * with open / closed folder icons (for `file` / `folder` nodes)\n * - Custom node types: colored type dots or explicit icons via `type`,\n * `color`, `icon`\n * - Expand / collapse, with expand-all / collapse-all helpers\n * - Two-way bound selection and a `nodeClick` event\n * - Indentation guide lines for readability\n * - Optional per-node status badges (added / modified / removed) and status\n * indicators (`success` ✓, `busy` pulse)\n * - Keyboard accessible: roving tabindex (one tab stop), Arrow keys / Home /\n * End move focus, Enter / Space toggle or select, Left / Right collapse /\n * expand or move to parent / first child\n * - Dark / light theme support via design tokens\n *\n * @example\n * ```html\n * <lc-tree-view [nodes]=\"projectTree\" [(selectedId)]=\"selected\" />\n * ```\n */\n@Component({\n selector: 'lc-tree-view',\n standalone: true,\n imports: [IconComponent],\n // Its own glyphs and the inline ones of the built-in file-type map (file-icons.ts).\n viewProviders: [ɵprovideKitIcons([ICON_CHEVRON_RIGHT, ICON_CHECK, ICON_FILE, ICON_FILE_TEXT, ICON_KEY, ICON_LOCK, ICON_SETTINGS])],\n templateUrl: './tree-view.component.html',\n styleUrls: ['./tree-view.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'lc-tree-view' },\n})\nexport class TreeViewComponent {\n /** The root-level nodes of the tree. */\n readonly nodes = input.required<TreeNode[]>();\n\n /** Id (or path) of the currently selected node (two-way bindable). */\n readonly selectedId = model<string | null>(null);\n\n /** Show indentation guide lines. */\n readonly showGuides = input(true);\n\n /** Show the expand-all / collapse-all toolbar. */\n readonly showToolbar = input(true);\n\n /** Label of the toolbar's expand-all button. */\n readonly expandAllLabel = input('Expand all');\n\n /** Label of the toolbar's collapse-all button. */\n readonly collapseAllLabel = input('Collapse all');\n\n /** Icon size for node icons. */\n readonly iconSize = input<'xs' | 'sm' | 'md'>('sm');\n\n /** Accessible name of a folder's expand toggle. */\n readonly expandAriaLabel = input('Expand');\n\n /** Accessible name of a folder's collapse toggle. */\n readonly collapseAriaLabel = input('Collapse');\n\n /** Emitted when a node is clicked / activated. */\n readonly nodeClick = output<TreeNode>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** Set of node ids the user has explicitly expanded / collapsed. */\n private readonly expandOverrides = signal<Map<string, boolean>>(new Map());\n\n /** Id of the node that last had keyboard focus (roving tabindex). */\n private readonly focusedId = signal<string | null>(null);\n\n /** Flattened, render-ready list of visible nodes. */\n protected readonly visibleNodes = computed<FlatNode[]>(() => {\n const out: FlatNode[] = [];\n const overrides = this.expandOverrides();\n this.flatten(this.nodes(), 0, '', [], overrides, out, null);\n return out;\n });\n\n /**\n * The single tab stop of the tree: the last focused node if it is still\n * visible, else the selected node, else the first enabled node.\n */\n protected readonly tabStopId = computed<string | null>(() => {\n const nodes = this.visibleNodes();\n const focusable = (id: string | null) =>\n id !== null && nodes.some((n) => n.id === id && !n.disabled);\n const focused = this.focusedId();\n if (focusable(focused)) return focused;\n const selected = this.selectedId();\n if (focusable(selected)) return selected;\n return nodes.find((n) => !n.disabled)?.id ?? null;\n });\n\n protected badgeColor(status: TreeNodeStatus): string {\n return BADGE_STATUS_COLOR[status];\n }\n\n protected onNodeClick(flat: FlatNode): void {\n if (flat.disabled) return;\n if (flat.hasChildren) {\n this.toggle(flat);\n }\n this.selectedId.set(flat.id);\n const original = this.findNode(this.nodes(), '', flat.id);\n if (original) this.nodeClick.emit(original);\n }\n\n protected onToggleClick(flat: FlatNode, event: Event): void {\n event.stopPropagation();\n if (!flat.disabled) this.toggle(flat);\n }\n\n protected onFocus(flat: FlatNode): void {\n this.focusedId.set(flat.id);\n }\n\n protected onKeydown(flat: FlatNode, event: KeyboardEvent): void {\n if (flat.disabled) return;\n const nodes = this.visibleNodes();\n const index = nodes.findIndex((n) => n.id === flat.id);\n\n switch (event.key) {\n case 'Enter':\n case ' ':\n event.preventDefault();\n this.onNodeClick(flat);\n break;\n case 'ArrowRight':\n event.preventDefault();\n if (!flat.hasChildren) return;\n if (!flat.expanded) {\n this.setExpanded(flat.id, true);\n } else {\n // Expanded: move to the first child.\n this.focusIndex(index + 1);\n }\n break;\n case 'ArrowLeft':\n event.preventDefault();\n if (flat.hasChildren && flat.expanded) {\n this.setExpanded(flat.id, false);\n } else if (flat.parentId !== null) {\n // Leaf or collapsed node: move to the parent.\n this.focusIndex(nodes.findIndex((n) => n.id === flat.parentId));\n }\n break;\n case 'ArrowDown':\n event.preventDefault();\n this.focusIndex(this.nextEnabled(nodes, index, 1));\n break;\n case 'ArrowUp':\n event.preventDefault();\n this.focusIndex(this.nextEnabled(nodes, index, -1));\n break;\n case 'Home':\n event.preventDefault();\n this.focusIndex(this.nextEnabled(nodes, -1, 1));\n break;\n case 'End':\n event.preventDefault();\n this.focusIndex(this.nextEnabled(nodes, nodes.length, -1));\n break;\n }\n }\n\n /** Expand every folder in the tree. */\n expandAll(): void {\n this.setAll(true);\n }\n\n /** Collapse every folder in the tree. */\n collapseAll(): void {\n this.setAll(false);\n }\n\n protected trackById = (_: number, n: FlatNode): string => n.id;\n\n // ── internals ──────────────────────────────────────────────────────────────\n\n /** Index of the next enabled node from `from` in direction `dir`, or -1. */\n private nextEnabled(nodes: FlatNode[], from: number, dir: 1 | -1): number {\n for (let i = from + dir; i >= 0 && i < nodes.length; i += dir) {\n if (!nodes[i].disabled) return i;\n }\n return -1;\n }\n\n /**\n * Moves keyboard focus to the visible node at `index`. The rows are\n * rendered in `visibleNodes()` order, so the index maps 1:1 to the DOM.\n */\n private focusIndex(index: number): void {\n const nodes = this.visibleNodes();\n if (index < 0 || index >= nodes.length || nodes[index].disabled) return;\n this.focusedId.set(nodes[index].id);\n const items = this.host.nativeElement.querySelectorAll<HTMLElement>('.lc-tree-view__item');\n items[index]?.focus();\n }\n\n private toggle(flat: FlatNode): void {\n this.setExpanded(flat.id, !flat.expanded);\n }\n\n private setExpanded(id: string, value: boolean): void {\n this.expandOverrides.update((map) => {\n const next = new Map(map);\n next.set(id, value);\n return next;\n });\n }\n\n private setAll(value: boolean): void {\n const next = new Map<string, boolean>();\n const walk = (nodes: TreeNode[], parentPath: string): void => {\n for (const node of nodes) {\n const id = node.id ?? `${parentPath}/${node.name}`;\n if (node.children?.length) {\n next.set(id, value);\n walk(node.children, id);\n }\n }\n };\n walk(this.nodes(), '');\n this.expandOverrides.set(next);\n }\n\n private isExpanded(\n id: string,\n node: TreeNode,\n overrides: Map<string, boolean>,\n ): boolean {\n const override = overrides.get(id);\n if (override !== undefined) return override;\n return node.expanded ?? false;\n }\n\n private flatten(\n nodes: TreeNode[],\n depth: number,\n parentPath: string,\n ancestorHasSibling: boolean[],\n overrides: Map<string, boolean>,\n out: FlatNode[],\n parentId: string | null,\n ): void {\n nodes.forEach((node, index) => {\n const id = node.id ?? `${parentPath}/${node.name}`;\n const type = nodeType(node);\n const hasChildren = isExpandable(node);\n const expanded = hasChildren && this.isExpanded(id, node, overrides);\n const isLast = index === nodes.length - 1;\n\n out.push({\n id,\n name: node.name,\n type,\n depth,\n hasChildren,\n expanded,\n icon: this.resolveIcon(node, type, expanded),\n color: node.color,\n badge: node.badge,\n status: node.status ?? 'default',\n disabled: node.disabled ?? false,\n ancestorHasSibling,\n isLast,\n posInSet: index + 1,\n setSize: nodes.length,\n parentId,\n });\n\n if (expanded && node.children) {\n this.flatten(\n node.children,\n depth + 1,\n id,\n [...ancestorHasSibling, !isLast],\n overrides,\n out,\n id,\n );\n }\n });\n }\n\n private resolveIcon(\n node: TreeNode,\n type: TreeNodeType,\n expanded: boolean,\n ): string | null {\n if (node.icon) return node.icon;\n if (type === 'folder') return expanded ? FOLDER_OPEN_ICON : FOLDER_ICON;\n if (type === 'file') {\n return node.name ? resolveFileIcon(node.name) : FILE_FALLBACK_ICON;\n }\n // Custom domain type without explicit icon: render a colored type dot.\n return null;\n }\n\n private findNode(\n nodes: TreeNode[],\n parentPath: string,\n targetId: string,\n ): TreeNode | null {\n for (const node of nodes) {\n const id = node.id ?? `${parentPath}/${node.name}`;\n if (id === targetId) return node;\n if (node.children) {\n const found = this.findNode(node.children, id, targetId);\n if (found) return found;\n }\n }\n return null;\n }\n}\n","@if (showToolbar()) {\n <div class=\"lc-tree-view__toolbar\">\n <button type=\"button\" class=\"lc-tree-view__tool-btn\" (click)=\"expandAll()\" [attr.title]=\"expandAllLabel()\">\n <lc-icon name=\"fold-down\" size=\"xs\" [decorative]=\"true\" />\n <span>{{ expandAllLabel() }}</span>\n </button>\n <button type=\"button\" class=\"lc-tree-view__tool-btn\" (click)=\"collapseAll()\" [attr.title]=\"collapseAllLabel()\">\n <lc-icon name=\"fold-up\" size=\"xs\" [decorative]=\"true\" />\n <span>{{ collapseAllLabel() }}</span>\n </button>\n </div>\n}\n\n<ul class=\"lc-tree-view__list\" role=\"tree\">\n @for (node of visibleNodes(); track trackById($index, node)) {\n <li\n class=\"lc-tree-view__item\"\n [class.lc-tree-view__item--selected]=\"node.id === selectedId()\"\n [class.lc-tree-view__item--disabled]=\"node.disabled\"\n [class.lc-tree-view__item--folder]=\"node.type === 'folder'\"\n role=\"treeitem\"\n [attr.aria-level]=\"node.depth + 1\"\n [attr.aria-posinset]=\"node.posInSet\"\n [attr.aria-setsize]=\"node.setSize\"\n [attr.aria-expanded]=\"node.hasChildren ? node.expanded : null\"\n [attr.aria-selected]=\"node.id === selectedId()\"\n [attr.aria-disabled]=\"node.disabled ? true : null\"\n [attr.aria-busy]=\"node.status === 'busy' ? true : null\"\n [tabindex]=\"node.id === tabStopId() ? 0 : -1\"\n (focus)=\"onFocus(node)\"\n (click)=\"onNodeClick(node)\"\n (keydown)=\"onKeydown(node, $event)\"\n >\n <!-- indentation + guide lines -->\n @for (hasSibling of node.ancestorHasSibling; track $index) {\n <span\n class=\"lc-tree-view__indent\"\n [class.lc-tree-view__indent--guide]=\"showGuides() && hasSibling\"\n ></span>\n }\n\n <!-- expand / collapse chevron -->\n <span class=\"lc-tree-view__chevron\">\n @if (node.hasChildren) {\n <button\n type=\"button\"\n class=\"lc-tree-view__chevron-btn\"\n [class.lc-tree-view__chevron-btn--expanded]=\"node.expanded\"\n (click)=\"onToggleClick(node, $event)\"\n [attr.aria-label]=\"node.expanded ? collapseAriaLabel() : expandAriaLabel()\"\n tabindex=\"-1\"\n >\n <lc-icon name=\"chevron-right\" size=\"xs\" [decorative]=\"true\" />\n </button>\n }\n </span>\n\n <!-- type / file icon, or type dot for custom node types -->\n <span\n class=\"lc-tree-view__icon\"\n [style.color]=\"\n node.color ?? (node.status === 'default' ? null : badgeColor(node.status))\n \"\n >\n @if (node.icon; as icon) {\n <lc-icon [name]=\"icon\" [size]=\"iconSize()\" [decorative]=\"true\" />\n } @else {\n <span\n class=\"lc-tree-view__type-dot\"\n [style.background-color]=\"node.color ?? null\"\n ></span>\n }\n </span>\n\n <!-- label -->\n <span class=\"lc-tree-view__label\">{{ node.name }}</span>\n\n <!-- badge -->\n @if (node.badge) {\n <span\n class=\"lc-tree-view__badge\"\n [style.color]=\"badgeColor(node.status)\"\n [style.border-color]=\"badgeColor(node.status)\"\n >{{ node.badge }}</span\n >\n }\n\n <!-- status indicator -->\n @if (node.status === 'success') {\n <span class=\"lc-tree-view__status lc-tree-view__status--success\">\n <lc-icon name=\"check\" size=\"xs\" [decorative]=\"true\" />\n </span>\n } @else if (node.status === 'busy') {\n <span class=\"lc-tree-view__status lc-tree-view__status--busy\"></span>\n }\n </li>\n }\n</ul>\n"],"mappings":";;;;AAYA,MAAa,cAAc;AAE3B,MAAa,mBAAmB;AAEhC,MAAa,qBAAqB;AAGlC,MAAM,kBAA0C;CAC9C,gBAAgB;CAChB,qBAAqB;CACrB,aAAa;CACb,kBAAkB;CAClB,cAAc;CACd,sBAAsB;CACtB,uBAAuB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eAET,CAAC,iBAAiB;IAAC;IAAoB;IAAY;IAAW;IAAgB;IAAU;IAAW;GAAa,CAAC,CAAC;GAAC,iBAGjH,wBAAwB;GAAM,MACzC,EAAE,OAAO,eAAc;GAAE,UAAA;GAAA,QAAA,CAAA,29GAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"lifecorner-angular-ui-kit-tree-view.mjs","names":[],"sources":["../../../../libs/angular-ui-kit/src/lib/tree-view/file-icons.ts","../../../../libs/angular-ui-kit/src/lib/tree-view/tree-view.component.ts","../../../../libs/angular-ui-kit/src/lib/tree-view/tree-view.component.html"],"sourcesContent":["/**\n * File-type → icon mapping for the TreeView component.\n *\n * Icon names refer to Tabler Icons (the design system's icon source).\n * Resolution order for a file node:\n * 1. explicit `node.icon`\n * 2. exact file name match (e.g. `package.json`, `Dockerfile`)\n * 3. file extension match (e.g. `.ts`, `.png`)\n * 4. generic file fallback\n */\n\n/** Icon used for collapsed folders. */\nexport const FOLDER_ICON = 'folder';\n/** Icon used for expanded (open) folders. */\nexport const FOLDER_OPEN_ICON = 'folder-open';\n/** Generic fallback icon for files with no specific match. */\nexport const FILE_FALLBACK_ICON = 'file';\n\n/** Map of well-known file names (lower-cased) to icons. */\nconst FILE_NAME_ICONS: Record<string, string> = {\n 'package.json': 'brand-npm',\n 'package-lock.json': 'brand-npm',\n 'yarn.lock': 'brand-yarn',\n 'pnpm-lock.yaml': 'brand-pnpm',\n 'dockerfile': 'brand-docker',\n 'docker-compose.yml': 'brand-docker',\n 'docker-compose.yaml': 'brand-docker',\n '.gitignore': 'brand-git',\n '.gitattributes': 'brand-git',\n '.gitmodules': 'brand-git',\n 'readme.md': 'book',\n 'license': 'license',\n 'license.md': 'license',\n '.env': 'key',\n '.env.local': 'key',\n '.editorconfig': 'settings',\n '.prettierrc': 'settings',\n '.eslintrc': 'settings',\n 'tsconfig.json': 'brand-typescript',\n 'angular.json': 'brand-angular',\n 'nx.json': 'settings',\n 'makefile': 'terminal',\n};\n\n/** Map of file extensions (without dot, lower-cased) to icons. */\nconst FILE_EXT_ICONS: Record<string, string> = {\n // Languages\n ts: 'brand-typescript',\n tsx: 'brand-typescript',\n js: 'brand-javascript',\n jsx: 'brand-javascript',\n mjs: 'brand-javascript',\n cjs: 'brand-javascript',\n html: 'brand-html5',\n htm: 'brand-html5',\n css: 'brand-css3',\n scss: 'brand-sass',\n sass: 'brand-sass',\n less: 'brand-css3',\n py: 'brand-python',\n rb: 'diamond',\n go: 'brand-golang',\n rs: 'brand-rust',\n java: 'coffee',\n kt: 'brand-kotlin',\n swift: 'brand-swift',\n c: 'file-code',\n h: 'file-code',\n cpp: 'brand-cpp',\n cs: 'brand-c-sharp',\n php: 'brand-php',\n dart: 'brand-flutter',\n sh: 'terminal-2',\n bash: 'terminal-2',\n zsh: 'terminal-2',\n sql: 'database',\n // Data / config\n json: 'braces',\n jsonc: 'braces',\n yml: 'file-code',\n yaml: 'file-code',\n toml: 'file-code',\n xml: 'file-code',\n ini: 'settings',\n env: 'key',\n // Docs\n md: 'markdown',\n mdx: 'markdown',\n txt: 'file-text',\n pdf: 'file-type-pdf',\n doc: 'file-text',\n docx: 'file-text',\n csv: 'file-spreadsheet',\n xls: 'file-spreadsheet',\n xlsx: 'file-spreadsheet',\n // Images\n png: 'photo',\n jpg: 'photo',\n jpeg: 'photo',\n gif: 'photo',\n webp: 'photo',\n svg: 'file-vector',\n ico: 'photo',\n bmp: 'photo',\n // Media\n mp3: 'music',\n wav: 'music',\n mp4: 'video',\n mov: 'video',\n webm: 'video',\n // Archives\n zip: 'file-zip',\n tar: 'file-zip',\n gz: 'file-zip',\n rar: 'file-zip',\n '7z': 'file-zip',\n // Fonts\n woff: 'typography',\n woff2: 'typography',\n ttf: 'typography',\n otf: 'typography',\n // Misc\n lock: 'lock',\n};\n\n/**\n * Resolve the icon name for a file based on its name.\n * Performs exact-name then extension lookup, falling back to a generic file icon.\n */\nexport function resolveFileIcon(fileName: string): string {\n const lower = fileName.toLowerCase();\n\n const byName = FILE_NAME_ICONS[lower];\n if (byName) return byName;\n\n const dotIndex = lower.lastIndexOf('.');\n if (dotIndex > 0 && dotIndex < lower.length - 1) {\n const ext = lower.slice(dotIndex + 1);\n const byExt = FILE_EXT_ICONS[ext];\n if (byExt) return byExt;\n }\n\n return FILE_FALLBACK_ICON;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n computed,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { IconComponent, ɵprovideKitIcons } from '@lifecorner/angular-ui-kit/icon';\nimport {\n ICON_CHECK,\n ICON_CHEVRON_RIGHT,\n ICON_FILE,\n ICON_FILE_TEXT,\n ICON_KEY,\n ICON_LOCK,\n ICON_SETTINGS,\n} from '@lifecorner/angular-ui-kit/icons';\nimport {\n FILE_FALLBACK_ICON,\n FOLDER_ICON,\n FOLDER_OPEN_ICON,\n resolveFileIcon,\n} from './file-icons';\n\n// ── Public types ─────────────────────────────────────────────────────────────\n\n/**\n * Node type. `'file'` and `'folder'` get the built-in file-tree treatment\n * (extension icons, folder open/close icons). Any other string marks a custom\n * domain type: such nodes render a colored type dot (or an explicit `icon`)\n * instead of file icons.\n */\nexport type TreeNodeType = 'file' | 'folder' | (string & {});\n\nexport type TreeNodeStatus =\n | 'default'\n | 'added'\n | 'modified'\n | 'removed'\n | 'muted'\n | 'success'\n | 'busy';\n\n/**\n * A node in the tree. Any node carrying `children` can expand — this covers\n * file trees (folders) as well as arbitrary domain hierarchies.\n */\nexport interface TreeNode {\n /** Display name, e.g. `app.component.ts` or `src`. */\n name: string;\n /**\n * Node type. Optional — inferred as `folder` when `children` is present,\n * otherwise `file`. May be any string for domain hierarchies.\n */\n type?: TreeNodeType;\n /**\n * Stable identifier. Optional — when omitted, the full path is used,\n * which is stable as long as names are unique among siblings.\n */\n id?: string;\n /** Child nodes. Any node with children can expand / collapse. */\n children?: TreeNode[];\n /**\n * Explicit Tabler icon name. Overrides automatic file-type / folder\n * icon resolution and the custom-type dot.\n */\n icon?: string;\n /**\n * Accent color for the node's icon / type dot. Any CSS color, including\n * `var(--…)` token references.\n */\n color?: string;\n /** Optional badge text shown to the right of the node (e.g. git status, count). */\n badge?: string;\n /**\n * Tone of the badge / node accent. `success` additionally renders a ✓\n * indicator, `busy` a pulsing dot (static under `prefers-reduced-motion`).\n */\n status?: TreeNodeStatus;\n /** Whether this node starts expanded. Ignored for nodes without children. */\n expanded?: boolean;\n /** Disable selection / interaction for this node. */\n disabled?: boolean;\n}\n\n// ── Internal flattened representation ─────────────────────────────────────────\n\ninterface FlatNode {\n id: string;\n name: string;\n type: TreeNodeType;\n depth: number;\n hasChildren: boolean;\n expanded: boolean;\n /** Resolved icon, or `null` for custom-type nodes that render a type dot. */\n icon: string | null;\n color?: string;\n badge?: string;\n status: TreeNodeStatus;\n disabled: boolean;\n /** Whether each ancestor level still has following siblings (for guide lines). */\n ancestorHasSibling: boolean[];\n /** Whether this node is the last among its siblings. */\n isLast: boolean;\n /** 1-based position among its siblings (aria-posinset). */\n posInSet: number;\n /** Number of siblings including itself (aria-setsize). */\n setSize: number;\n /** Id of the parent node, `null` for root nodes. */\n parentId: string | null;\n}\n\nconst BADGE_STATUS_COLOR: Record<TreeNodeStatus, string> = {\n default: 'var(--color-text-tertiary)',\n added: 'var(--color-success-default, #16a34a)',\n modified: 'var(--color-warning-default, #d97706)',\n removed: 'var(--color-error-default, #dc2626)',\n muted: 'var(--color-text-disabled)',\n success: 'var(--color-success-default, #16a34a)',\n busy: 'var(--color-primary-500, #6366f1)',\n};\n\nfunction nodeType(node: TreeNode): TreeNodeType {\n return node.type ?? (node.children ? 'folder' : 'file');\n}\n\nfunction isExpandable(node: TreeNode): boolean {\n return !!node.children?.length;\n}\n\n/**\n * Tree view component for visualizing hierarchies — file / folder trees as\n * well as arbitrary domain object trees with custom node types.\n *\n * Features:\n * - Recursive rendering from a single `nodes` input; any node with children\n * can expand / collapse\n * - Automatic file-type icons by extension and well-known file name,\n * with open / closed folder icons (for `file` / `folder` nodes)\n * - Custom node types: colored type dots or explicit icons via `type`,\n * `color`, `icon`\n * - Expand / collapse, with expand-all / collapse-all helpers\n * - Two-way bound selection and a `nodeClick` event\n * - Indentation guide lines for readability\n * - Optional per-node status badges (added / modified / removed) and status\n * indicators (`success` ✓, `busy` pulse)\n * - Keyboard accessible: roving tabindex (one tab stop), Arrow keys / Home /\n * End move focus, Enter / Space toggle or select, Left / Right collapse /\n * expand or move to parent / first child\n * - Dark / light theme support via design tokens\n *\n * @example\n * ```html\n * <lc-tree-view [nodes]=\"projectTree\" [(selectedId)]=\"selected\" />\n * ```\n */\n@Component({\n selector: 'lc-tree-view',\n standalone: true,\n imports: [IconComponent],\n // Its own glyphs and the inline ones of the built-in file-type map (file-icons.ts).\n viewProviders: [ɵprovideKitIcons([ICON_CHEVRON_RIGHT, ICON_CHECK, ICON_FILE, ICON_FILE_TEXT, ICON_KEY, ICON_LOCK, ICON_SETTINGS])],\n templateUrl: './tree-view.component.html',\n styleUrls: ['./tree-view.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'lc-tree-view' },\n})\nexport class TreeViewComponent {\n /** The root-level nodes of the tree. */\n readonly nodes = input.required<TreeNode[]>();\n\n /** Id (or path) of the currently selected node (two-way bindable). */\n readonly selectedId = model<string | null>(null);\n\n /** Show indentation guide lines. */\n readonly showGuides = input(true);\n\n /** Show the expand-all / collapse-all toolbar. */\n readonly showToolbar = input(true);\n\n /** Label of the toolbar's expand-all button. */\n readonly expandAllLabel = input('Expand all');\n\n /** Label of the toolbar's collapse-all button. */\n readonly collapseAllLabel = input('Collapse all');\n\n /** Icon size for node icons. */\n readonly iconSize = input<'xs' | 'sm' | 'md'>('sm');\n\n /** Accessible name of a folder's expand toggle. */\n readonly expandAriaLabel = input('Expand');\n\n /** Accessible name of a folder's collapse toggle. */\n readonly collapseAriaLabel = input('Collapse');\n\n /** Emitted when a node is clicked / activated. */\n readonly nodeClick = output<TreeNode>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** Set of node ids the user has explicitly expanded / collapsed. */\n private readonly expandOverrides = signal<Map<string, boolean>>(new Map());\n\n /** Id of the node that last had keyboard focus (roving tabindex). */\n private readonly focusedId = signal<string | null>(null);\n\n /** Flattened, render-ready list of visible nodes. */\n protected readonly visibleNodes = computed<FlatNode[]>(() => {\n const out: FlatNode[] = [];\n const overrides = this.expandOverrides();\n this.flatten(this.nodes(), 0, '', [], overrides, out, null);\n return out;\n });\n\n /**\n * The single tab stop of the tree: the last focused node if it is still\n * visible, else the selected node, else the first enabled node.\n */\n protected readonly tabStopId = computed<string | null>(() => {\n const nodes = this.visibleNodes();\n const focusable = (id: string | null) =>\n id !== null && nodes.some((n) => n.id === id && !n.disabled);\n const focused = this.focusedId();\n if (focusable(focused)) return focused;\n const selected = this.selectedId();\n if (focusable(selected)) return selected;\n return nodes.find((n) => !n.disabled)?.id ?? null;\n });\n\n protected badgeColor(status: TreeNodeStatus): string {\n return BADGE_STATUS_COLOR[status];\n }\n\n protected onNodeClick(flat: FlatNode): void {\n if (flat.disabled) return;\n if (flat.hasChildren) {\n this.toggle(flat);\n }\n this.selectedId.set(flat.id);\n const original = this.findNode(this.nodes(), '', flat.id);\n if (original) this.nodeClick.emit(original);\n }\n\n protected onToggleClick(flat: FlatNode, event: Event): void {\n event.stopPropagation();\n if (!flat.disabled) this.toggle(flat);\n }\n\n protected onFocus(flat: FlatNode): void {\n this.focusedId.set(flat.id);\n }\n\n protected onKeydown(flat: FlatNode, event: KeyboardEvent): void {\n if (flat.disabled) return;\n const nodes = this.visibleNodes();\n const index = nodes.findIndex((n) => n.id === flat.id);\n\n switch (event.key) {\n case 'Enter':\n case ' ':\n event.preventDefault();\n this.onNodeClick(flat);\n break;\n case 'ArrowRight':\n event.preventDefault();\n if (!flat.hasChildren) return;\n if (!flat.expanded) {\n this.setExpanded(flat.id, true);\n } else {\n // Expanded: move to the first child.\n this.focusIndex(index + 1);\n }\n break;\n case 'ArrowLeft':\n event.preventDefault();\n if (flat.hasChildren && flat.expanded) {\n this.setExpanded(flat.id, false);\n } else if (flat.parentId !== null) {\n // Leaf or collapsed node: move to the parent.\n this.focusIndex(nodes.findIndex((n) => n.id === flat.parentId));\n }\n break;\n case 'ArrowDown':\n event.preventDefault();\n this.focusIndex(this.nextEnabled(nodes, index, 1));\n break;\n case 'ArrowUp':\n event.preventDefault();\n this.focusIndex(this.nextEnabled(nodes, index, -1));\n break;\n case 'Home':\n event.preventDefault();\n this.focusIndex(this.nextEnabled(nodes, -1, 1));\n break;\n case 'End':\n event.preventDefault();\n this.focusIndex(this.nextEnabled(nodes, nodes.length, -1));\n break;\n }\n }\n\n /** Expand every folder in the tree. */\n expandAll(): void {\n this.setAll(true);\n }\n\n /** Collapse every folder in the tree. */\n collapseAll(): void {\n this.setAll(false);\n }\n\n protected trackById = (_: number, n: FlatNode): string => n.id;\n\n // ── internals ──────────────────────────────────────────────────────────────\n\n /** Index of the next enabled node from `from` in direction `dir`, or -1. */\n private nextEnabled(nodes: FlatNode[], from: number, dir: 1 | -1): number {\n for (let i = from + dir; i >= 0 && i < nodes.length; i += dir) {\n if (!nodes[i].disabled) return i;\n }\n return -1;\n }\n\n /**\n * Moves keyboard focus to the visible node at `index`. The rows are\n * rendered in `visibleNodes()` order, so the index maps 1:1 to the DOM.\n */\n private focusIndex(index: number): void {\n const nodes = this.visibleNodes();\n if (index < 0 || index >= nodes.length || nodes[index].disabled) return;\n this.focusedId.set(nodes[index].id);\n const items = this.host.nativeElement.querySelectorAll<HTMLElement>('.lc-tree-view__item');\n items[index]?.focus();\n }\n\n private toggle(flat: FlatNode): void {\n this.setExpanded(flat.id, !flat.expanded);\n }\n\n private setExpanded(id: string, value: boolean): void {\n this.expandOverrides.update((map) => {\n const next = new Map(map);\n next.set(id, value);\n return next;\n });\n }\n\n private setAll(value: boolean): void {\n const next = new Map<string, boolean>();\n const walk = (nodes: TreeNode[], parentPath: string): void => {\n for (const node of nodes) {\n const id = node.id ?? `${parentPath}/${node.name}`;\n if (node.children?.length) {\n next.set(id, value);\n walk(node.children, id);\n }\n }\n };\n walk(this.nodes(), '');\n this.expandOverrides.set(next);\n }\n\n private isExpanded(\n id: string,\n node: TreeNode,\n overrides: Map<string, boolean>,\n ): boolean {\n const override = overrides.get(id);\n if (override !== undefined) return override;\n return node.expanded ?? false;\n }\n\n private flatten(\n nodes: TreeNode[],\n depth: number,\n parentPath: string,\n ancestorHasSibling: boolean[],\n overrides: Map<string, boolean>,\n out: FlatNode[],\n parentId: string | null,\n ): void {\n nodes.forEach((node, index) => {\n const id = node.id ?? `${parentPath}/${node.name}`;\n const type = nodeType(node);\n const hasChildren = isExpandable(node);\n const expanded = hasChildren && this.isExpanded(id, node, overrides);\n const isLast = index === nodes.length - 1;\n\n out.push({\n id,\n name: node.name,\n type,\n depth,\n hasChildren,\n expanded,\n icon: this.resolveIcon(node, type, expanded),\n color: node.color,\n badge: node.badge,\n status: node.status ?? 'default',\n disabled: node.disabled ?? false,\n ancestorHasSibling,\n isLast,\n posInSet: index + 1,\n setSize: nodes.length,\n parentId,\n });\n\n if (expanded && node.children) {\n this.flatten(\n node.children,\n depth + 1,\n id,\n [...ancestorHasSibling, !isLast],\n overrides,\n out,\n id,\n );\n }\n });\n }\n\n private resolveIcon(\n node: TreeNode,\n type: TreeNodeType,\n expanded: boolean,\n ): string | null {\n if (node.icon) return node.icon;\n if (type === 'folder') return expanded ? FOLDER_OPEN_ICON : FOLDER_ICON;\n if (type === 'file') {\n return node.name ? resolveFileIcon(node.name) : FILE_FALLBACK_ICON;\n }\n // Custom domain type without explicit icon: render a colored type dot.\n return null;\n }\n\n private findNode(\n nodes: TreeNode[],\n parentPath: string,\n targetId: string,\n ): TreeNode | null {\n for (const node of nodes) {\n const id = node.id ?? `${parentPath}/${node.name}`;\n if (id === targetId) return node;\n if (node.children) {\n const found = this.findNode(node.children, id, targetId);\n if (found) return found;\n }\n }\n return null;\n }\n}\n","@if (showToolbar()) {\n <div class=\"lc-tree-view__toolbar\">\n <button type=\"button\" class=\"lc-tree-view__tool-btn\" (click)=\"expandAll()\" [attr.title]=\"expandAllLabel()\">\n <lc-icon name=\"fold-down\" size=\"xs\" [decorative]=\"true\" />\n <span>{{ expandAllLabel() }}</span>\n </button>\n <button type=\"button\" class=\"lc-tree-view__tool-btn\" (click)=\"collapseAll()\" [attr.title]=\"collapseAllLabel()\">\n <lc-icon name=\"fold-up\" size=\"xs\" [decorative]=\"true\" />\n <span>{{ collapseAllLabel() }}</span>\n </button>\n </div>\n}\n\n<ul class=\"lc-tree-view__list\" role=\"tree\">\n @for (node of visibleNodes(); track trackById($index, node)) {\n <li\n class=\"lc-tree-view__item\"\n [class.lc-tree-view__item--selected]=\"node.id === selectedId()\"\n [class.lc-tree-view__item--disabled]=\"node.disabled\"\n [class.lc-tree-view__item--folder]=\"node.type === 'folder'\"\n role=\"treeitem\"\n [attr.aria-level]=\"node.depth + 1\"\n [attr.aria-posinset]=\"node.posInSet\"\n [attr.aria-setsize]=\"node.setSize\"\n [attr.aria-expanded]=\"node.hasChildren ? node.expanded : null\"\n [attr.aria-selected]=\"node.id === selectedId()\"\n [attr.aria-disabled]=\"node.disabled ? true : null\"\n [attr.aria-busy]=\"node.status === 'busy' ? true : null\"\n [tabindex]=\"node.id === tabStopId() ? 0 : -1\"\n (focus)=\"onFocus(node)\"\n (click)=\"onNodeClick(node)\"\n (keydown)=\"onKeydown(node, $event)\"\n >\n <!-- indentation + guide lines -->\n @for (hasSibling of node.ancestorHasSibling; track $index) {\n <span\n class=\"lc-tree-view__indent\"\n [class.lc-tree-view__indent--guide]=\"showGuides() && hasSibling\"\n ></span>\n }\n\n <!-- expand / collapse chevron -->\n <span class=\"lc-tree-view__chevron\">\n @if (node.hasChildren) {\n <button\n type=\"button\"\n class=\"lc-tree-view__chevron-btn\"\n [class.lc-tree-view__chevron-btn--expanded]=\"node.expanded\"\n (click)=\"onToggleClick(node, $event)\"\n [attr.aria-label]=\"node.expanded ? collapseAriaLabel() : expandAriaLabel()\"\n tabindex=\"-1\"\n >\n <lc-icon name=\"chevron-right\" size=\"xs\" [decorative]=\"true\" />\n </button>\n }\n </span>\n\n <!-- type / file icon, or type dot for custom node types -->\n <span\n class=\"lc-tree-view__icon\"\n [style.color]=\"\n node.color ?? (node.status === 'default' ? null : badgeColor(node.status))\n \"\n >\n @if (node.icon; as icon) {\n <lc-icon [name]=\"icon\" [size]=\"iconSize()\" [decorative]=\"true\" />\n } @else {\n <span\n class=\"lc-tree-view__type-dot\"\n [style.background-color]=\"node.color ?? null\"\n ></span>\n }\n </span>\n\n <!-- label -->\n <span class=\"lc-tree-view__label\">{{ node.name }}</span>\n\n <!-- badge -->\n @if (node.badge) {\n <span\n class=\"lc-tree-view__badge\"\n [style.color]=\"badgeColor(node.status)\"\n [style.border-color]=\"badgeColor(node.status)\"\n >{{ node.badge }}</span\n >\n }\n\n <!-- status indicator -->\n @if (node.status === 'success') {\n <span class=\"lc-tree-view__status lc-tree-view__status--success\">\n <lc-icon name=\"check\" size=\"xs\" [decorative]=\"true\" />\n </span>\n } @else if (node.status === 'busy') {\n <span class=\"lc-tree-view__status lc-tree-view__status--busy\"></span>\n }\n </li>\n }\n</ul>\n"],"mappings":";;;;AAYA,MAAa,cAAc;AAE3B,MAAa,mBAAmB;AAEhC,MAAa,qBAAqB;AAGlC,MAAM,kBAA0C;CAC9C,gBAAgB;CAChB,qBAAqB;CACrB,aAAa;CACb,kBAAkB;CAClB,cAAc;CACd,sBAAsB;CACtB,uBAAuB;CACvB,cAAc;CACd,kBAAkB;CAClB,eAAe;CACf,aAAa;CACb,WAAW;CACX,cAAc;CACd,QAAQ;CACR,cAAc;CACd,iBAAiB;CACjB,eAAe;CACf,aAAa;CACb,iBAAiB;CACjB,gBAAgB;CAChB,WAAW;CACX,YAAY;AACb;AAGD,MAAM,iBAAyC;CAE7C,IAAI;CACJ,KAAK;CACL,IAAI;CACJ,KAAK;CACL,KAAK;CACL,KAAK;CACL,MAAM;CACN,KAAK;CACL,KAAK;CACL,M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A;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,kBAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,UAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,iBAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,mBAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,SAAA;GAAA,YAAA;GAAA,WAAA;EAAA;EAAA,MAAA,EAAA,gBAAA,eAAA;EAAA,UAAA;EAAA,UC3K9B;EAkGA,QAAA,CAAA,okHAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MDiEY;GAAa,UAAA;GAAA,QAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;GAAA;EAAA,CAAA;EAAA,eAER,CAAC,iBAAiB;GAAC;GAAoB;GAAY;GAAW;GAAgB;GAAU;GAAW;EAAa,CAAC,CAAC;EAAC,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAMvH,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAiB,YAAA,CAAA;EAX7B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAc,YACZ;GAAI,SACP,CAAC,aAAa;GAAC,eAET,CAAC,iBAAiB;IAAC;IAAoB;IAAY;IAAW;IAAgB;IAAU;IAAW;GAAa,CAAC,CAAC;GAAC,iBAGjH,wBAAwB;GAAM,MACzC,EAAE,OAAO,eAAc;GAAE,UAAA;GAAA,QAAA,CAAA,okHAAA;EAAA,CAAA"}
@@ -235,7 +235,7 @@ var VerificationCodeInputComponent = class VerificationCodeInputComponent {
235
235
  }],
236
236
  ngImport: i0,
237
237
  template: "<div class=\"lc-verification-code-input\">\n <!-- The label names the whole group of digit inputs (aria-labelledby), not a single control -->\n @if (label()) {\n <span [id]=\"labelId\" class=\"lc-label\">\n {{ label() }}\n @if (required() && requiredIndicator()) {\n <span class=\"lc-required\" aria-hidden=\"true\">*</span>\n }\n </span>\n }\n\n <div\n [id]=\"groupId\"\n class=\"lc-digit-inputs\"\n [class.lc-digit-inputs--compact]=\"gap() === 'compact'\"\n role=\"group\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (paste)=\"onPaste($event)\"\n >\n @for (digit of digits(); track $index; let i = $index) {\n <input\n #digitInput\n type=\"text\"\n inputmode=\"numeric\"\n [attr.autocomplete]=\"i === 0 ? 'one-time-code' : 'off'\"\n [value]=\"digit\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.aria-label]=\"digitLabel(i)\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"error() ? 'true' : null\"\n [attr.aria-describedby]=\"error() ? errorId : null\"\n (input)=\"onDigitInput($event, i)\"\n (keydown)=\"onKeyDown($event, i)\"\n class=\"lc-digit-input\"\n [class.lc-digit-input-error]=\"error()\"\n [class.lc-digit-input-filled]=\"digit\"\n />\n }\n </div>\n\n @if (error()) {\n <div [id]=\"errorId\" class=\"lc-error\" role=\"alert\">\n {{ error() }}\n </div>\n }\n\n @if (hintText()) {\n <div [id]=\"hintId\" class=\"lc-hint\">\n {{ hintText() }}\n </div>\n }\n</div>\n",
238
- styles: ["@charset \"UTF-8\";.lc-verification-code-input{display:flex;flex-direction:column;gap:.75rem;width:100%}.lc-label{font-size:.875rem;font-weight:500;color:var(--color-text-primary);text-align:center}.lc-required{color:var(--color-text-error);margin-left:.25rem}.lc-digit-inputs{display:flex;justify-content:center;gap:.75rem}.lc-digit-inputs--compact{gap:.5rem}.lc-digit-input{width:3rem;height:3.5rem;font-size:1.5rem;font-weight:600;text-align:center;border:2px solid var(--color-field-border);border-radius:var(--border-radius-md);background-color:var(--color-surface);color:var(--color-text-primary);transition:all .2s ease}.lc-digit-input:focus{outline:none;border-color:var(--color-primary-500);box-shadow:0 0 0 4px color-mix(in srgb,var(--color-primary-500) 20%,transparent)}.lc-digit-input:disabled{background-color:var(--color-surface-muted);color:var(--color-text-disabled);cursor:not-allowed}.lc-digit-input.lc-digit-input-error{border-color:var(--color-error-600)}.lc-digit-input.lc-digit-input-error:focus{box-shadow:0 0 0 4px color-mix(in srgb,var(--color-error-600) 20%,transparent)}.lc-digit-input.lc-digit-input-filled{border-color:var(--color-primary-500);background-color:var(--color-primary-subtle)}.lc-error{font-size:.875rem;color:var(--color-text-error);text-align:center}.lc-hint{font-size:.875rem;color:var(--color-text-secondary);text-align:center}@media(max-width:480px){.lc-digit-inputs{gap:.5rem}.lc-digit-inputs--compact{gap:.25rem}.lc-digit-input{width:2.75rem;height:3rem;font-size:1.25rem}}\n"],
238
+ styles: ["@charset \"UTF-8\";.lc-verification-code-input{display:flex;flex-direction:column;gap:.75rem;width:100%}.lc-label{font-size:.875rem;font-weight:500;color:var(--color-text-primary);text-align:center}.lc-required{color:var(--color-text-error);margin-left:.25rem}.lc-digit-inputs{display:flex;justify-content:center;gap:.75rem}.lc-digit-inputs--compact{gap:.5rem}.lc-digit-input{width:3rem;height:3.5rem;font-size:1.5rem;font-weight:600;text-align:center;border:2px solid var(--color-field-border);border-radius:var(--border-radius-md);background-color:var(--color-surface);color:var(--color-text-primary);transition:all .2s ease}.lc-digit-input:focus{border-color:var(--color-primary-500);outline:2px solid var(--color-primary-500);outline-offset:0}.lc-digit-input:disabled{background-color:var(--color-surface-muted);color:var(--color-text-disabled);cursor:not-allowed}.lc-digit-input.lc-digit-input-error{border-color:var(--color-error-600)}.lc-digit-input.lc-digit-input-error:focus{outline-color:var(--color-error-600)}.lc-digit-input.lc-digit-input-filled{border-color:var(--color-primary-500);background-color:var(--color-primary-subtle)}.lc-error{font-size:.875rem;color:var(--color-text-error);text-align:center}.lc-hint{font-size:.875rem;color:var(--color-text-secondary);text-align:center}@media(max-width:480px){.lc-digit-inputs{gap:.5rem}.lc-digit-inputs--compact{gap:.25rem}.lc-digit-input{width:2.75rem;height:3rem;font-size:1.25rem}}@media(forced-colors:active){.lc-digit-input:focus,.lc-digit-input.lc-digit-input-error:focus{outline-color:Highlight}}\n"],
239
239
  changeDetection: i0.ChangeDetectionStrategy.OnPush
240
240
  });
241
241
  };
@@ -257,7 +257,7 @@ i0.ɵɵngDeclareClassMetadata({
257
257
  }],
258
258
  changeDetection: ChangeDetectionStrategy.OnPush,
259
259
  template: "<div class=\"lc-verification-code-input\">\n <!-- The label names the whole group of digit inputs (aria-labelledby), not a single control -->\n @if (label()) {\n <span [id]=\"labelId\" class=\"lc-label\">\n {{ label() }}\n @if (required() && requiredIndicator()) {\n <span class=\"lc-required\" aria-hidden=\"true\">*</span>\n }\n </span>\n }\n\n <div\n [id]=\"groupId\"\n class=\"lc-digit-inputs\"\n [class.lc-digit-inputs--compact]=\"gap() === 'compact'\"\n role=\"group\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (paste)=\"onPaste($event)\"\n >\n @for (digit of digits(); track $index; let i = $index) {\n <input\n #digitInput\n type=\"text\"\n inputmode=\"numeric\"\n [attr.autocomplete]=\"i === 0 ? 'one-time-code' : 'off'\"\n [value]=\"digit\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.aria-label]=\"digitLabel(i)\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"error() ? 'true' : null\"\n [attr.aria-describedby]=\"error() ? errorId : null\"\n (input)=\"onDigitInput($event, i)\"\n (keydown)=\"onKeyDown($event, i)\"\n class=\"lc-digit-input\"\n [class.lc-digit-input-error]=\"error()\"\n [class.lc-digit-input-filled]=\"digit\"\n />\n }\n </div>\n\n @if (error()) {\n <div [id]=\"errorId\" class=\"lc-error\" role=\"alert\">\n {{ error() }}\n </div>\n }\n\n @if (hintText()) {\n <div [id]=\"hintId\" class=\"lc-hint\">\n {{ hintText() }}\n </div>\n }\n</div>\n",
260
- styles: ["@charset \"UTF-8\";.lc-verification-code-input{display:flex;flex-direction:column;gap:.75rem;width:100%}.lc-label{font-size:.875rem;font-weight:500;color:var(--color-text-primary);text-align:center}.lc-required{color:var(--color-text-error);margin-left:.25rem}.lc-digit-inputs{display:flex;justify-content:center;gap:.75rem}.lc-digit-inputs--compact{gap:.5rem}.lc-digit-input{width:3rem;height:3.5rem;font-size:1.5rem;font-weight:600;text-align:center;border:2px solid var(--color-field-border);border-radius:var(--border-radius-md);background-color:var(--color-surface);color:var(--color-text-primary);transition:all .2s ease}.lc-digit-input:focus{outline:none;border-color:var(--color-primary-500);box-shadow:0 0 0 4px color-mix(in srgb,var(--color-primary-500) 20%,transparent)}.lc-digit-input:disabled{background-color:var(--color-surface-muted);color:var(--color-text-disabled);cursor:not-allowed}.lc-digit-input.lc-digit-input-error{border-color:var(--color-error-600)}.lc-digit-input.lc-digit-input-error:focus{box-shadow:0 0 0 4px color-mix(in srgb,var(--color-error-600) 20%,transparent)}.lc-digit-input.lc-digit-input-filled{border-color:var(--color-primary-500);background-color:var(--color-primary-subtle)}.lc-error{font-size:.875rem;color:var(--color-text-error);text-align:center}.lc-hint{font-size:.875rem;color:var(--color-text-secondary);text-align:center}@media(max-width:480px){.lc-digit-inputs{gap:.5rem}.lc-digit-inputs--compact{gap:.25rem}.lc-digit-input{width:2.75rem;height:3rem;font-size:1.25rem}}\n"]
260
+ styles: ["@charset \"UTF-8\";.lc-verification-code-input{display:flex;flex-direction:column;gap:.75rem;width:100%}.lc-label{font-size:.875rem;font-weight:500;color:var(--color-text-primary);text-align:center}.lc-required{color:var(--color-text-error);margin-left:.25rem}.lc-digit-inputs{display:flex;justify-content:center;gap:.75rem}.lc-digit-inputs--compact{gap:.5rem}.lc-digit-input{width:3rem;height:3.5rem;font-size:1.5rem;font-weight:600;text-align:center;border:2px solid var(--color-field-border);border-radius:var(--border-radius-md);background-color:var(--color-surface);color:var(--color-text-primary);transition:all .2s ease}.lc-digit-input:focus{border-color:var(--color-primary-500);outline:2px solid var(--color-primary-500);outline-offset:0}.lc-digit-input:disabled{background-color:var(--color-surface-muted);color:var(--color-text-disabled);cursor:not-allowed}.lc-digit-input.lc-digit-input-error{border-color:var(--color-error-600)}.lc-digit-input.lc-digit-input-error:focus{outline-color:var(--color-error-600)}.lc-digit-input.lc-digit-input-filled{border-color:var(--color-primary-500);background-color:var(--color-primary-subtle)}.lc-error{font-size:.875rem;color:var(--color-text-error);text-align:center}.lc-hint{font-size:.875rem;color:var(--color-text-secondary);text-align:center}@media(max-width:480px){.lc-digit-inputs{gap:.5rem}.lc-digit-inputs--compact{gap:.25rem}.lc-digit-input{width:2.75rem;height:3rem;font-size:1.25rem}}@media(forced-colors:active){.lc-digit-input:focus,.lc-digit-input.lc-digit-input-error:focus{outline-color:Highlight}}\n"]
261
261
  }]
262
262
  }],
263
263
  ctorParameters: () => [],
@@ -1 +1 @@
1
- {"version":3,"file":"lifecorner-angular-ui-kit-verification-code-input.mjs","names":[],"sources":["../../../../libs/angular-ui-kit/src/lib/verification-code-input/verification-code-input.component.ts","../../../../libs/angular-ui-kit/src/lib/verification-code-input/verification-code-input.component.html"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n ElementRef,\n afterNextRender,\n computed,\n forwardRef,\n input,\n linkedSignal,\n output,\n signal,\n viewChildren,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nlet nextUniqueId = 0;\n\n/** Space between the boxes: `default` 12 px (8 px below 480 px), `compact` 8 px (4 px below 480 px). */\nexport type VerificationCodeInputGap = 'default' | 'compact';\n\n/**\n * Verification Code Input Component with one input per digit\n *\n * Features:\n * - Configurable number of digit fields (`length`, default 6)\n * - Automatic focus advancement after entering a digit\n * - Backspace moves to the previous input, arrow keys navigate\n * - Paste / autofill support (splits the code across the inputs); no\n * `maxlength`, so iOS and Android can put the whole `one-time-code` into box 1\n * - `clear()` empties the boxes after a wrong code and focuses box 1\n * - Phones (below 480 px): 44 × 48 px boxes, 8 px apart (6 boxes = 304 px)\n * - Accessible ARIA attributes (labelled group, linked hint and error)\n * - Reactive Forms ControlValueAccessor implementation\n * - `complete` emits exactly once when all digits are entered\n *\n * Usage:\n * ```html\n * <lc-verification-code-input\n * [formControl]=\"codeControl\"\n * label=\"Verification Code\"\n * [length]=\"6\"\n * (complete)=\"onCodeComplete($event)\"\n * ></lc-verification-code-input>\n * ```\n */\n@Component({\n selector: 'lc-verification-code-input',\n standalone: true,\n imports: [],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => VerificationCodeInputComponent),\n multi: true,\n },\n ],\n templateUrl: './verification-code-input.component.html',\n styleUrls: ['./verification-code-input.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class VerificationCodeInputComponent implements ControlValueAccessor {\n /** Group label rendered above the digit inputs */\n readonly label = input<string>('Verification Code');\n\n /** Number of digits */\n readonly length = input<number>(6);\n\n /** Whether the inputs are disabled */\n readonly disabled = input<boolean>(false);\n\n /** Whether the code is required */\n readonly required = input<boolean>(false);\n\n /**\n * Show the `*` of a `required` code; `false` keeps `required` and\n * `aria-required` without the asterisk.\n * @default true\n */\n readonly requiredIndicator = input<boolean>(true);\n\n /** Space between the boxes: `default` (12 px, 8 px below 480 px) or `compact` (8 px, 4 px below 480 px). */\n readonly gap = input<VerificationCodeInputGap>('default');\n\n /** Error message displayed below the inputs (also sets aria-invalid) */\n readonly error = input<string | undefined>(undefined);\n\n /**\n * @deprecated `complete` always emits exactly once when the last digit is\n * entered — bind `(complete)` to auto-submit. Kept so existing bindings\n * keep compiling; it no longer changes behaviour.\n */\n readonly autoSubmit = input<boolean>(false);\n\n /**\n * Hint text below the inputs. Defaults to \"Enter the N-digit code\";\n * pass an empty string to hide the hint.\n */\n readonly hint = input<string | undefined>(undefined);\n\n /** Focus the first digit input once rendered (opt-in) */\n readonly autofocus = input<boolean>(false);\n\n /** Accessible name of each box; `{n}` and `{total}` are replaced. */\n readonly digitAriaLabel = input('Digit {n} of {total}');\n\n /** Accessible name of box `index` (zero-based). */\n protected digitLabel(index: number): string {\n return this.digitAriaLabel().replace('{n}', String(index + 1)).replace('{total}', String(this.length()));\n }\n\n /** Emitted once with the full code when all digits are entered */\n readonly complete = output<string>();\n\n /** Per-instance ids for the group label, hint and error linkage */\n readonly groupId = `lc-verification-code-${nextUniqueId++}`;\n readonly labelId = `${this.groupId}-label`;\n readonly hintId = `${this.groupId}-hint`;\n readonly errorId = `${this.groupId}-error`;\n\n private readonly digitInputs = viewChildren<ElementRef<HTMLInputElement>>('digitInput');\n\n /** One entry per digit; resets when `length` changes */\n readonly digits = linkedSignal<string[]>(() => Array<string>(this.length()).fill(''));\n\n // Internal disabled state (for ControlValueAccessor)\n private readonly formDisabled = signal<boolean>(false);\n\n /** Computed disabled state from both input and form control */\n readonly isDisabled = computed(() => this.disabled() || this.formDisabled());\n\n readonly code = computed(() => this.digits().join(''));\n\n readonly isComplete = computed(() => this.digits().every((digit) => digit !== ''));\n\n readonly hintText = computed(() => {\n const hint = this.hint();\n return hint === undefined ? `Enter the ${this.length()}-digit code` : hint;\n });\n\n readonly describedBy = computed(() => {\n const ids: string[] = [];\n if (this.error()) ids.push(this.errorId);\n if (this.hintText()) ids.push(this.hintId);\n return ids.length ? ids.join(' ') : null;\n });\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onChange: (value: string) => void = () => {};\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onTouched: () => void = () => {};\n\n constructor() {\n afterNextRender(() => {\n if (this.autofocus()) {\n this.focusInput(0);\n }\n });\n }\n\n /**\n * ControlValueAccessor: Write value from form control\n */\n writeValue(value: string | null | undefined): void {\n const chars = (value ?? '').replace(/\\D/g, '').slice(0, this.length()).split('');\n this.digits.set(Array.from({ length: this.length() }, (_, i) => chars[i] ?? ''));\n }\n\n /**\n * ControlValueAccessor: Register onChange callback\n */\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n /**\n * ControlValueAccessor: Register onTouched callback\n */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * ControlValueAccessor: Set disabled state\n */\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled);\n }\n\n /**\n * Empty every box (e.g. after a wrong code), report `''` to the form and\n * focus box 1. Writing `''` through the form control empties the boxes too,\n * without moving the focus.\n */\n clear(): void {\n this.digits.set(Array<string>(this.length()).fill(''));\n for (const box of this.digitInputs()) {\n box.nativeElement.value = '';\n }\n this.onChange('');\n this.focusInput(0);\n }\n\n /**\n * Handle digit input\n */\n onDigitInput(event: Event, index: number): void {\n const input = event.target as HTMLInputElement;\n const previous = this.digits()[index];\n\n if (input.value === '') {\n // Emptied without a Backspace keydown (some Android keyboards send none)\n if (previous) this.setDigit(index, '');\n return;\n }\n\n let typed = input.value.replace(/\\D/g, '');\n // The boxes have no maxlength (it would cut an autofilled code to one\n // digit), so typing into a filled box briefly holds two characters: keep\n // the new digit.\n if (previous && typed.length === 2 && typed.includes(previous)) {\n typed = typed.replace(previous, '');\n } else if (typed === previous) {\n typed = '';\n }\n\n if (!typed) {\n // Only non-digits were added: the signal is unchanged, so restore the DOM here\n input.value = previous;\n return;\n }\n\n // One digit, or several at once (autofill / IME): distribute from this position\n this.applyDigits(typed.split(''), index);\n // Keep this box at one digit even when the signal did not change\n input.value = this.digits()[index];\n }\n\n /**\n * Handle keydown events (backspace, arrow keys)\n */\n onKeyDown(event: KeyboardEvent, index: number): void {\n const input = event.target as HTMLInputElement;\n\n if (event.key === 'Backspace') {\n if (input.value) {\n this.setDigit(index, '');\n } else if (index > 0) {\n // Move to previous input and clear it\n this.setDigit(index - 1, '');\n this.focusInput(index - 1);\n }\n event.preventDefault();\n } else if (event.key === 'ArrowLeft' && index > 0) {\n this.focusInput(index - 1);\n event.preventDefault();\n } else if (event.key === 'ArrowRight' && index < this.length() - 1) {\n this.focusInput(index + 1);\n event.preventDefault();\n }\n }\n\n /**\n * Handle paste event (split the pasted code across the inputs)\n */\n onPaste(event: ClipboardEvent): void {\n event.preventDefault();\n if (this.isDisabled()) {\n return;\n }\n const pasted = (event.clipboardData?.getData('text') || '').replace(/\\D/g, '');\n if (pasted) {\n this.applyDigits(pasted.split(''), 0);\n }\n }\n\n /** Writes `chars` into consecutive slots from `start`, then advances focus and reports completion. */\n private applyDigits(chars: string[], start: number): void {\n const len = this.length();\n const next = [...this.digits()];\n const count = Math.min(chars.length, len - start);\n for (let i = 0; i < count; i++) {\n next[start + i] = chars[i];\n }\n this.digits.set(next);\n this.onChange(this.code());\n\n // Focus the slot after the last written digit (or stay on the last one)\n this.focusInput(Math.min(start + count, len - 1));\n\n if (this.isComplete()) {\n this.onTouched();\n this.complete.emit(this.code());\n }\n }\n\n private setDigit(index: number, digit: string): void {\n this.digits.update((digits) => digits.map((d, i) => (i === index ? digit : d)));\n this.onChange(this.code());\n }\n\n /**\n * Focus specific input by index\n */\n private focusInput(index: number): void {\n const input = this.digitInputs()[index]?.nativeElement;\n if (input) {\n input.focus();\n input.select();\n }\n }\n}\n","<div class=\"lc-verification-code-input\">\n <!-- The label names the whole group of digit inputs (aria-labelledby), not a single control -->\n @if (label()) {\n <span [id]=\"labelId\" class=\"lc-label\">\n {{ label() }}\n @if (required() && requiredIndicator()) {\n <span class=\"lc-required\" aria-hidden=\"true\">*</span>\n }\n </span>\n }\n\n <div\n [id]=\"groupId\"\n class=\"lc-digit-inputs\"\n [class.lc-digit-inputs--compact]=\"gap() === 'compact'\"\n role=\"group\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (paste)=\"onPaste($event)\"\n >\n @for (digit of digits(); track $index; let i = $index) {\n <input\n #digitInput\n type=\"text\"\n inputmode=\"numeric\"\n [attr.autocomplete]=\"i === 0 ? 'one-time-code' : 'off'\"\n [value]=\"digit\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.aria-label]=\"digitLabel(i)\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"error() ? 'true' : null\"\n [attr.aria-describedby]=\"error() ? errorId : null\"\n (input)=\"onDigitInput($event, i)\"\n (keydown)=\"onKeyDown($event, i)\"\n class=\"lc-digit-input\"\n [class.lc-digit-input-error]=\"error()\"\n [class.lc-digit-input-filled]=\"digit\"\n />\n }\n </div>\n\n @if (error()) {\n <div [id]=\"errorId\" class=\"lc-error\" role=\"alert\">\n {{ error() }}\n </div>\n }\n\n @if (hintText()) {\n <div [id]=\"hintId\" class=\"lc-hint\">\n {{ hintText() }}\n </div>\n }\n</div>\n"],"mappings":";;;AAeA,IAAI,eAAe;AA6CnB,IAAa,iCAAb,MAAa,+BAA8B;CAEhC,QAAQ,MAAc,qBAAoB,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAG1C,SAAS,MAAc,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAGzB,WAAW,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAGhC,WAAW,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAOhC,oBAAoB,MAAe,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,oBAAA,CAAA,+BAAA,CAAA,CAAA;CAGxC,MAAM,MAAgC,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,MAAA,CAAA,+BAAA,CAAA,CAAA;CAGhD,QAAQ,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAO5C,aAAa,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAMlC,OAAO,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,O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AA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,UAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,cAAY,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"lifecorner-angular-ui-kit-verification-code-input.mjs","names":[],"sources":["../../../../libs/angular-ui-kit/src/lib/verification-code-input/verification-code-input.component.ts","../../../../libs/angular-ui-kit/src/lib/verification-code-input/verification-code-input.component.html"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n ElementRef,\n afterNextRender,\n computed,\n forwardRef,\n input,\n linkedSignal,\n output,\n signal,\n viewChildren,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nlet nextUniqueId = 0;\n\n/** Space between the boxes: `default` 12 px (8 px below 480 px), `compact` 8 px (4 px below 480 px). */\nexport type VerificationCodeInputGap = 'default' | 'compact';\n\n/**\n * Verification Code Input Component with one input per digit\n *\n * Features:\n * - Configurable number of digit fields (`length`, default 6)\n * - Automatic focus advancement after entering a digit\n * - Backspace moves to the previous input, arrow keys navigate\n * - Paste / autofill support (splits the code across the inputs); no\n * `maxlength`, so iOS and Android can put the whole `one-time-code` into box 1\n * - `clear()` empties the boxes after a wrong code and focuses box 1\n * - Phones (below 480 px): 44 × 48 px boxes, 8 px apart (6 boxes = 304 px)\n * - Accessible ARIA attributes (labelled group, linked hint and error)\n * - Reactive Forms ControlValueAccessor implementation\n * - `complete` emits exactly once when all digits are entered\n *\n * Usage:\n * ```html\n * <lc-verification-code-input\n * [formControl]=\"codeControl\"\n * label=\"Verification Code\"\n * [length]=\"6\"\n * (complete)=\"onCodeComplete($event)\"\n * ></lc-verification-code-input>\n * ```\n */\n@Component({\n selector: 'lc-verification-code-input',\n standalone: true,\n imports: [],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => VerificationCodeInputComponent),\n multi: true,\n },\n ],\n templateUrl: './verification-code-input.component.html',\n styleUrls: ['./verification-code-input.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class VerificationCodeInputComponent implements ControlValueAccessor {\n /** Group label rendered above the digit inputs */\n readonly label = input<string>('Verification Code');\n\n /** Number of digits */\n readonly length = input<number>(6);\n\n /** Whether the inputs are disabled */\n readonly disabled = input<boolean>(false);\n\n /** Whether the code is required */\n readonly required = input<boolean>(false);\n\n /**\n * Show the `*` of a `required` code; `false` keeps `required` and\n * `aria-required` without the asterisk.\n * @default true\n */\n readonly requiredIndicator = input<boolean>(true);\n\n /** Space between the boxes: `default` (12 px, 8 px below 480 px) or `compact` (8 px, 4 px below 480 px). */\n readonly gap = input<VerificationCodeInputGap>('default');\n\n /** Error message displayed below the inputs (also sets aria-invalid) */\n readonly error = input<string | undefined>(undefined);\n\n /**\n * @deprecated `complete` always emits exactly once when the last digit is\n * entered — bind `(complete)` to auto-submit. Kept so existing bindings\n * keep compiling; it no longer changes behaviour.\n */\n readonly autoSubmit = input<boolean>(false);\n\n /**\n * Hint text below the inputs. Defaults to \"Enter the N-digit code\";\n * pass an empty string to hide the hint.\n */\n readonly hint = input<string | undefined>(undefined);\n\n /** Focus the first digit input once rendered (opt-in) */\n readonly autofocus = input<boolean>(false);\n\n /** Accessible name of each box; `{n}` and `{total}` are replaced. */\n readonly digitAriaLabel = input('Digit {n} of {total}');\n\n /** Accessible name of box `index` (zero-based). */\n protected digitLabel(index: number): string {\n return this.digitAriaLabel().replace('{n}', String(index + 1)).replace('{total}', String(this.length()));\n }\n\n /** Emitted once with the full code when all digits are entered */\n readonly complete = output<string>();\n\n /** Per-instance ids for the group label, hint and error linkage */\n readonly groupId = `lc-verification-code-${nextUniqueId++}`;\n readonly labelId = `${this.groupId}-label`;\n readonly hintId = `${this.groupId}-hint`;\n readonly errorId = `${this.groupId}-error`;\n\n private readonly digitInputs = viewChildren<ElementRef<HTMLInputElement>>('digitInput');\n\n /** One entry per digit; resets when `length` changes */\n readonly digits = linkedSignal<string[]>(() => Array<string>(this.length()).fill(''));\n\n // Internal disabled state (for ControlValueAccessor)\n private readonly formDisabled = signal<boolean>(false);\n\n /** Computed disabled state from both input and form control */\n readonly isDisabled = computed(() => this.disabled() || this.formDisabled());\n\n readonly code = computed(() => this.digits().join(''));\n\n readonly isComplete = computed(() => this.digits().every((digit) => digit !== ''));\n\n readonly hintText = computed(() => {\n const hint = this.hint();\n return hint === undefined ? `Enter the ${this.length()}-digit code` : hint;\n });\n\n readonly describedBy = computed(() => {\n const ids: string[] = [];\n if (this.error()) ids.push(this.errorId);\n if (this.hintText()) ids.push(this.hintId);\n return ids.length ? ids.join(' ') : null;\n });\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onChange: (value: string) => void = () => {};\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onTouched: () => void = () => {};\n\n constructor() {\n afterNextRender(() => {\n if (this.autofocus()) {\n this.focusInput(0);\n }\n });\n }\n\n /**\n * ControlValueAccessor: Write value from form control\n */\n writeValue(value: string | null | undefined): void {\n const chars = (value ?? '').replace(/\\D/g, '').slice(0, this.length()).split('');\n this.digits.set(Array.from({ length: this.length() }, (_, i) => chars[i] ?? ''));\n }\n\n /**\n * ControlValueAccessor: Register onChange callback\n */\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n /**\n * ControlValueAccessor: Register onTouched callback\n */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * ControlValueAccessor: Set disabled state\n */\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled);\n }\n\n /**\n * Empty every box (e.g. after a wrong code), report `''` to the form and\n * focus box 1. Writing `''` through the form control empties the boxes too,\n * without moving the focus.\n */\n clear(): void {\n this.digits.set(Array<string>(this.length()).fill(''));\n for (const box of this.digitInputs()) {\n box.nativeElement.value = '';\n }\n this.onChange('');\n this.focusInput(0);\n }\n\n /**\n * Handle digit input\n */\n onDigitInput(event: Event, index: number): void {\n const input = event.target as HTMLInputElement;\n const previous = this.digits()[index];\n\n if (input.value === '') {\n // Emptied without a Backspace keydown (some Android keyboards send none)\n if (previous) this.setDigit(index, '');\n return;\n }\n\n let typed = input.value.replace(/\\D/g, '');\n // The boxes have no maxlength (it would cut an autofilled code to one\n // digit), so typing into a filled box briefly holds two characters: keep\n // the new digit.\n if (previous && typed.length === 2 && typed.includes(previous)) {\n typed = typed.replace(previous, '');\n } else if (typed === previous) {\n typed = '';\n }\n\n if (!typed) {\n // Only non-digits were added: the signal is unchanged, so restore the DOM here\n input.value = previous;\n return;\n }\n\n // One digit, or several at once (autofill / IME): distribute from this position\n this.applyDigits(typed.split(''), index);\n // Keep this box at one digit even when the signal did not change\n input.value = this.digits()[index];\n }\n\n /**\n * Handle keydown events (backspace, arrow keys)\n */\n onKeyDown(event: KeyboardEvent, index: number): void {\n const input = event.target as HTMLInputElement;\n\n if (event.key === 'Backspace') {\n if (input.value) {\n this.setDigit(index, '');\n } else if (index > 0) {\n // Move to previous input and clear it\n this.setDigit(index - 1, '');\n this.focusInput(index - 1);\n }\n event.preventDefault();\n } else if (event.key === 'ArrowLeft' && index > 0) {\n this.focusInput(index - 1);\n event.preventDefault();\n } else if (event.key === 'ArrowRight' && index < this.length() - 1) {\n this.focusInput(index + 1);\n event.preventDefault();\n }\n }\n\n /**\n * Handle paste event (split the pasted code across the inputs)\n */\n onPaste(event: ClipboardEvent): void {\n event.preventDefault();\n if (this.isDisabled()) {\n return;\n }\n const pasted = (event.clipboardData?.getData('text') || '').replace(/\\D/g, '');\n if (pasted) {\n this.applyDigits(pasted.split(''), 0);\n }\n }\n\n /** Writes `chars` into consecutive slots from `start`, then advances focus and reports completion. */\n private applyDigits(chars: string[], start: number): void {\n const len = this.length();\n const next = [...this.digits()];\n const count = Math.min(chars.length, len - start);\n for (let i = 0; i < count; i++) {\n next[start + i] = chars[i];\n }\n this.digits.set(next);\n this.onChange(this.code());\n\n // Focus the slot after the last written digit (or stay on the last one)\n this.focusInput(Math.min(start + count, len - 1));\n\n if (this.isComplete()) {\n this.onTouched();\n this.complete.emit(this.code());\n }\n }\n\n private setDigit(index: number, digit: string): void {\n this.digits.update((digits) => digits.map((d, i) => (i === index ? digit : d)));\n this.onChange(this.code());\n }\n\n /**\n * Focus specific input by index\n */\n private focusInput(index: number): void {\n const input = this.digitInputs()[index]?.nativeElement;\n if (input) {\n input.focus();\n input.select();\n }\n }\n}\n","<div class=\"lc-verification-code-input\">\n <!-- The label names the whole group of digit inputs (aria-labelledby), not a single control -->\n @if (label()) {\n <span [id]=\"labelId\" class=\"lc-label\">\n {{ label() }}\n @if (required() && requiredIndicator()) {\n <span class=\"lc-required\" aria-hidden=\"true\">*</span>\n }\n </span>\n }\n\n <div\n [id]=\"groupId\"\n class=\"lc-digit-inputs\"\n [class.lc-digit-inputs--compact]=\"gap() === 'compact'\"\n role=\"group\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (paste)=\"onPaste($event)\"\n >\n @for (digit of digits(); track $index; let i = $index) {\n <input\n #digitInput\n type=\"text\"\n inputmode=\"numeric\"\n [attr.autocomplete]=\"i === 0 ? 'one-time-code' : 'off'\"\n [value]=\"digit\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.aria-label]=\"digitLabel(i)\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"error() ? 'true' : null\"\n [attr.aria-describedby]=\"error() ? errorId : null\"\n (input)=\"onDigitInput($event, i)\"\n (keydown)=\"onKeyDown($event, i)\"\n class=\"lc-digit-input\"\n [class.lc-digit-input-error]=\"error()\"\n [class.lc-digit-input-filled]=\"digit\"\n />\n }\n </div>\n\n @if (error()) {\n <div [id]=\"errorId\" class=\"lc-error\" role=\"alert\">\n {{ error() }}\n </div>\n }\n\n @if (hintText()) {\n <div [id]=\"hintId\" class=\"lc-hint\">\n {{ hintText() }}\n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A;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,mBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,KAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,YAAA,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,WAAA,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;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,UAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,cAAY,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifecorner/angular-ui-kit",
3
- "version": "3.24.1",
3
+ "version": "3.25.1",
4
4
  "description": "LifeCorner Design System – Angular UI component library",
5
5
  "license": "MIT",
6
6
  "repository": {