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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/CHANGELOG.md +114 -0
  2. package/agent/feedback/ds-empty-state.md +2 -1
  3. package/agent/feedback/ds-tree.md +3 -1
  4. package/agent/forms/ds-chat-input.md +3 -3
  5. package/agent/navigation/ds-splitter.md +1 -1
  6. package/components.md +9 -6
  7. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +2 -2
  8. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
  9. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +2 -2
  10. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
  11. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +2 -2
  12. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
  13. package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs +48 -6
  14. package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs.map +1 -1
  15. package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +2 -2
  16. package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
  17. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +14 -7
  18. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
  19. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +2 -2
  20. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +2 -2
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +9 -2
  24. package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -1
  25. package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +2 -2
  26. package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
  27. package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +2 -2
  28. package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
  29. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +2 -2
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs +2 -2
  32. package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs.map +1 -1
  33. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
  34. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  35. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +2 -2
  36. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
  37. package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs +2 -2
  38. package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs.map +1 -1
  39. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +47 -8
  40. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
  41. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +14 -1
  42. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  43. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  44. package/migrations/1.1.2.json +135 -0
  45. package/migrations/README.md +3 -1
  46. package/package.json +4 -1
  47. package/schematics/check-overrides/surface.json +10 -1
  48. package/stylelint/index.mjs +17 -3
  49. package/stylelint/known-tokens.mjs +139 -0
  50. package/stylelint/report.mjs +185 -0
  51. package/stylelint/tokens.mjs +160 -0
  52. package/stylelint/use-tokens.mjs +397 -0
  53. package/styles/_check-box.scss +2 -2
  54. package/styles/_tokens.scss +8 -0
  55. package/themes/_semantic.scss +9 -1
  56. package/themes/dark/_theme.scss +5 -1
  57. package/types/ids-group-ltd-ids-design-system-components-chat.d.ts +18 -2
  58. package/types/ids-group-ltd-ids-design-system-components-empty-state.d.ts +7 -2
  59. package/types/ids-group-ltd-ids-design-system-components-tree.d.ts +20 -2
  60. package/types/ids-group-ltd-ids-design-system-core.d.ts +19 -1
  61. package/types/ids-group-ltd-ids-design-system.d.ts +3 -3
@@ -215,7 +215,7 @@ class TextareaComponent extends DsControlValueAccessor {
215
215
  useExisting: forwardRef(() => TextareaComponent),
216
216
  multi: true,
217
217
  },
218
- ], viewQueries: [{ propertyName: "control", first: true, predicate: ["control"], descendants: true, isSignal: true }, { propertyName: "overflowMirror", first: true, predicate: ["overflowMirror"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"wrapperClasses()\">\n @if (label()) {\n <label\n class=\"label\"\n [attr.for]=\"uid\">\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\">\n {{ intl().field.optional }}\n </span>\n }\n </label>\n }\n\n <div\n class=\"control\"\n dsFieldClickFocus>\n @if (overLimitBy() > 0) {\n <div\n #overflowMirror\n class=\"overflow-mirror\"\n aria-hidden=\"true\">\n <span [textContent]=\"overflowParts().within\"></span>\n\n <mark [textContent]=\"overflowParts().over\"></mark>\n\n <span [textContent]=\"overflowParts().after\"></span>\n </div>\n }\n\n @if (placeholderLineShown()) {\n <div\n class=\"placeholder-line\"\n aria-hidden=\"true\"\n [class.wraps]=\"placeholderRows() > 1\"\n [style.--_placeholder-rows]=\"placeholderRows()\">\n {{ placeholder() }}\n </div>\n }\n\n <textarea\n #control\n [id]=\"uid\"\n [rows]=\"rows()\"\n [attr.name]=\"name()\"\n [attr.placeholder]=\"placeholder() || null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.maxlength]=\"nativeMaxLength()\"\n [attr.minlength]=\"minLength()\"\n [attr.pattern]=\"patternAttribute()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"isReadOnly()\"\n [required]=\"required()\"\n [style.resize]=\"effectiveResize()\"\n [style.min-height]=\"autosizeMinHeight()\"\n [style.max-height]=\"autosizeMaxHeight()\"\n [style.overflow-y]=\"autosize() && maxRows() ? 'auto' : null\"\n [(ngModel)]=\"value\"\n (blur)=\"markTouched()\"\n (scroll)=\"syncOverflowScroll()\">\n </textarea>\n\n <ds-field-status\n [pending]=\"pendingShown()\"\n [changed]=\"changedShown()\" />\n </div>\n\n @if (\n reserveMessageResolved() ||\n message().text ||\n changedShown() ||\n maxLength() !== null\n ) {\n <div class=\"field-footer\">\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n [changed]=\"changedShown()\" />\n\n @if (maxLength() !== null) {\n <span\n class=\"char-counter\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n [class.over-limit]=\"overLimitBy() > 0\"\n [id]=\"counterId()\">\n {{ currentLength() }}/{{ maxLength() }}\n @if (overLimitBy() > 0) {\n <span class=\"visually-hidden\">\n {{ intl().field.overLimit(overLimitBy()) }}\n </span>\n }\n </span>\n }\n </div>\n }\n</div>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_field-border-color: var(--ds-field-border-color, var(--border-field));--_field-border-color-hover: var(--ds-field-border-color-hover, var(--border-field-hover));--_field-border-color-focus: var(--ds-field-border-color-focus, var(--accent));--_field-text-color: var(--ds-field-text-color, var(--text-primary));--_field-placeholder-color: var(--ds-field-placeholder-color, var(--text-tertiary));--_field-font-size: var(--ds-field-font-size, var(--font-size-s));--_input-bg-color: var(--ds-input-bg-color, var(--surface-default));--_input-border: var(--ds-input-border, var(--_field-border-color));--_input-radius: var(--ds-input-radius, var(--ds-radius-control));--_input-padding-y: var(--ds-input-padding-y, var(--space-3));--_input-padding-x: var(--ds-input-padding-x, var(--field-pad-x));--_input-text-color: var(--ds-input-text-color, var(--_field-text-color));--_input-placeholder: var(--ds-input-placeholder, var(--_field-placeholder-color));--_input-border-hover: var(--ds-input-border-hover, var(--_field-border-color-hover));--_input-border-focus: var(--ds-input-border-focus, var(--_field-border-color-focus));--_input-focus-shadow: var(--ds-input-focus-shadow, var(--ds-field-focus-shadow));--_input-focus-shadow-error: var(--ds-input-focus-shadow-error, var(--ds-field-focus-shadow-error));--_input-bg-color-disabled: var(--ds-input-bg-color-disabled, var(--surface-disabled));--_input-bg-color-error: var(--ds-input-bg-color-error, var(--error-subtitle));--_input-border-error: var(--ds-input-border-error, var(--error));--_input-border-success: var(--ds-input-border-success, var(--success));--_input-font-size: var(--ds-input-font-size, var(--_field-font-size));--_textarea-font: var(--font-weight-regular) var(--_input-font-size) / var(--line-height-base) var(--font-sans);display:block}.field{display:flex;flex-direction:column;gap:var(--field-label-gap);width:100%}.field .label{--_field-label-font-size: var(--ds-field-label-font-size, var(--font-size-xs));--_field-label-font-weight: var(--ds-field-label-font-weight, var(--font-weight-bold));--_field-label-color: var(--ds-field-label-color, var(--text-secondary));--_field-label-text-transform: var(--ds-field-label-text-transform, none);--_field-label-letter-spacing: var(--ds-field-label-letter-spacing, normal);display:flex;align-items:center;gap:var(--field-gap-req);font:var(--_field-label-font-weight) var(--_field-label-font-size)/var(--line-height-base) var(--font-sans);color:var(--_field-label-color);text-transform:var(--_field-label-text-transform);letter-spacing:var(--_field-label-letter-spacing)}.field .label .req{color:var(--error);font-weight:var(--font-weight-semibold)}.field .label .optional-marker{color:var(--text-tertiary);font-weight:var(--font-weight-regular)}.field .control{display:flex;align-items:stretch;gap:var(--space-2);background-color:var(--_input-bg-color);border:var(--border-width-default) solid var(--_input-border);border-radius:var(--_input-radius);padding:0 var(--_input-padding-x);height:auto;transition:border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.field .control textarea{flex:1;min-width:0;appearance:none;border:0}@media not (forced-colors:active){.field .control textarea{outline:none}}.field .control textarea{background:transparent;font:var(--_textarea-font);color:var(--_input-text-color);min-height:var(--field-textarea-rows-min, 60px);padding:var(--_input-padding-y) 0}.field .control textarea::placeholder{color:var(--_input-placeholder)}.field .control:hover{border-color:var(--_input-border-hover)}.field .control:focus-within{border-color:var(--_input-border-focus);box-shadow:var(--_input-focus-shadow)}@media not (forced-colors:active){.field .control textarea:where(:focus-visible){outline:none}}.field.disabled .control{background-color:var(--_input-bg-color-disabled);border-color:var(--border-disabled)}.field.disabled textarea{color:var(--text-disabled)}.field.read-only .control{background:var(--surface-secondary)}.field.read-only .control textarea{cursor:default}.field.sm .control{padding:0 var(--space-2)}.field.lg .control{padding:0 var(--space-3)}.field.autosize .control{position:relative}.field.autosize .control textarea{field-sizing:content;box-sizing:content-box;overflow:hidden}.field.autosize .control textarea::placeholder{white-space:nowrap;color:transparent}.field .placeholder-line{overflow:clip visible;text-overflow:ellipsis;white-space:nowrap;position:absolute;inset:0;box-sizing:border-box;padding-inline:inherit;font:var(--_textarea-font);color:var(--_input-placeholder);pointer-events:none;-webkit-user-select:none;user-select:none}.field .placeholder-line.wraps{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--_placeholder-rows);overflow:clip;overflow-clip-margin:content-box;white-space:normal}.field .field-footer{display:flex;align-items:baseline;justify-content:space-between;gap:var(--space-2)}.field .char-counter{font-size:var(--font-size-xs);color:var(--text-tertiary);font-variant-numeric:tabular-nums;white-space:nowrap;flex-shrink:0;margin-left:auto}.field .char-counter.over-limit{position:relative;color:var(--error-text)}.field .char-counter .visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.field.soft-limit .control{position:relative}.field.soft-limit .control textarea{position:relative;scrollbar-gutter:stable}.field .overflow-mirror{position:absolute;inset:0;box-sizing:border-box;padding-inline:inherit;overflow:hidden;scrollbar-gutter:stable;font:var(--_textarea-font);letter-spacing:normal;word-spacing:normal;text-transform:none;text-indent:0;text-align:start;white-space:pre-wrap;overflow-wrap:break-word;color:transparent;pointer-events:none;-webkit-user-select:none;user-select:none}.field .overflow-mirror:after{content:\" \"}.field .overflow-mirror mark{color:transparent;background-color:var(--error-highlight);border-radius:var(--ds-radius-inner)}@media(forced-colors:active){.field .overflow-mirror mark{forced-color-adjust:none;background-color:transparent;text-decoration:underline wavy CanvasText;text-decoration-skip-ink:none}}.field .control :is(textarea,.overflow-mirror,.placeholder-line){padding-block:var(--_input-padding-y)}.field.sm .control :is(textarea,.overflow-mirror,.placeholder-line){padding-block:var(--space-2)}.field.lg .control :is(textarea,.overflow-mirror,.placeholder-line){padding-block:var(--space-4)}:host([data-field-state=error]:not(.in-group)) .control:not(.disabled):not(:disabled){border-color:var(--_input-border-error);background-color:var(--_input-bg-color-error)}:host([data-field-state=error]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-within,:host([data-field-state=error]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-visible{box-shadow:var(--_input-focus-shadow-error)}:host([data-field-state=warning]:not(.in-group)) .control:not(.disabled):not(:disabled){border-color:var(--warning-text)}:host([data-field-state=warning]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-within,:host([data-field-state=warning]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-visible{box-shadow:var(--ds-field-focus-shadow-warning)}:host([data-field-state=success]:not(.in-group)) .control:not(.disabled):not(:disabled){border-color:var(--_input-border-success)}:host([data-field-state=success]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-within,:host([data-field-state=success]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-visible{box-shadow:var(--ds-field-focus-shadow-success)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve", "changed"] }, { kind: "component", type: FieldStatusComponent, selector: "ds-field-status", inputs: ["pending", "changed"] }, { kind: "directive", type: FieldClickFocusDirective, selector: "[dsFieldClickFocus]" }] });
218
+ ], viewQueries: [{ propertyName: "control", first: true, predicate: ["control"], descendants: true, isSignal: true }, { propertyName: "overflowMirror", first: true, predicate: ["overflowMirror"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"wrapperClasses()\">\n @if (label()) {\n <label\n class=\"label\"\n [attr.for]=\"uid\">\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\">\n {{ intl().field.optional }}\n </span>\n }\n </label>\n }\n\n <div\n class=\"control\"\n dsFieldClickFocus>\n @if (overLimitBy() > 0) {\n <div\n #overflowMirror\n class=\"overflow-mirror\"\n aria-hidden=\"true\">\n <span [textContent]=\"overflowParts().within\"></span>\n\n <mark [textContent]=\"overflowParts().over\"></mark>\n\n <span [textContent]=\"overflowParts().after\"></span>\n </div>\n }\n\n @if (placeholderLineShown()) {\n <div\n class=\"placeholder-line\"\n aria-hidden=\"true\"\n [class.wraps]=\"placeholderRows() > 1\"\n [style.--_placeholder-rows]=\"placeholderRows()\">\n {{ placeholder() }}\n </div>\n }\n\n <textarea\n #control\n [id]=\"uid\"\n [rows]=\"rows()\"\n [attr.name]=\"name()\"\n [attr.placeholder]=\"placeholder() || null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.maxlength]=\"nativeMaxLength()\"\n [attr.minlength]=\"minLength()\"\n [attr.pattern]=\"patternAttribute()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"isReadOnly()\"\n [required]=\"required()\"\n [style.resize]=\"effectiveResize()\"\n [style.min-height]=\"autosizeMinHeight()\"\n [style.max-height]=\"autosizeMaxHeight()\"\n [style.overflow-y]=\"autosize() && maxRows() ? 'auto' : null\"\n [(ngModel)]=\"value\"\n (blur)=\"markTouched()\"\n (scroll)=\"syncOverflowScroll()\">\n </textarea>\n\n <ds-field-status\n [pending]=\"pendingShown()\"\n [changed]=\"changedShown()\" />\n </div>\n\n @if (\n reserveMessageResolved() ||\n message().text ||\n changedShown() ||\n maxLength() !== null\n ) {\n <div class=\"field-footer\">\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n [changed]=\"changedShown()\" />\n\n @if (maxLength() !== null) {\n <span\n class=\"char-counter\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n [class.over-limit]=\"overLimitBy() > 0\"\n [id]=\"counterId()\">\n {{ currentLength() }}/{{ maxLength() }}\n @if (overLimitBy() > 0) {\n <span class=\"visually-hidden\">\n {{ intl().field.overLimit(overLimitBy()) }}\n </span>\n }\n </span>\n }\n </div>\n }\n</div>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_field-border-color: var(--ds-field-border-color, var(--border-field));--_field-border-color-hover: var(--ds-field-border-color-hover, var(--border-field-hover));--_field-border-color-focus: var(--ds-field-border-color-focus, var(--accent));--_field-text-color: var(--ds-field-text-color, var(--text-primary));--_field-placeholder-color: var(--ds-field-placeholder-color, var(--text-tertiary));--_field-font-size: var(--ds-field-font-size, var(--font-size-s));--_input-bg-color: var(--ds-input-bg-color, var(--surface-default));--_input-border: var(--ds-input-border, var(--_field-border-color));--_input-radius: var(--ds-input-radius, var(--ds-radius-control));--_input-padding-y: var(--ds-input-padding-y, var(--space-3));--_input-padding-x: var(--ds-input-padding-x, var(--field-pad-x));--_input-text-color: var(--ds-input-text-color, var(--_field-text-color));--_input-placeholder: var(--ds-input-placeholder, var(--_field-placeholder-color));--_input-border-hover: var(--ds-input-border-hover, var(--_field-border-color-hover));--_input-border-focus: var(--ds-input-border-focus, var(--_field-border-color-focus));--_input-focus-shadow: var(--ds-input-focus-shadow, var(--ds-field-focus-shadow));--_input-focus-shadow-error: var(--ds-input-focus-shadow-error, var(--ds-field-focus-shadow-error));--_input-bg-color-disabled: var(--ds-input-bg-color-disabled, var(--surface-disabled));--_input-bg-color-error: var(--ds-input-bg-color-error, var(--error-subtitle));--_input-border-error: var(--ds-input-border-error, var(--error));--_input-border-success: var(--ds-input-border-success, var(--success));--_input-font-size: var(--ds-input-font-size, var(--_field-font-size));--_textarea-font: var(--font-weight-regular) var(--_input-font-size) / var(--line-height-base) var(--font-sans);display:block}.field{--_textarea-pad-x: var(--_input-padding-x);display:flex;flex-direction:column;gap:var(--field-label-gap);width:100%}.field .label{--_field-label-font-size: var(--ds-field-label-font-size, var(--font-size-xs));--_field-label-font-weight: var(--ds-field-label-font-weight, var(--font-weight-bold));--_field-label-color: var(--ds-field-label-color, var(--text-secondary));--_field-label-text-transform: var(--ds-field-label-text-transform, none);--_field-label-letter-spacing: var(--ds-field-label-letter-spacing, normal);display:flex;align-items:center;gap:var(--field-gap-req);font:var(--_field-label-font-weight) var(--_field-label-font-size)/var(--line-height-base) var(--font-sans);color:var(--_field-label-color);text-transform:var(--_field-label-text-transform);letter-spacing:var(--_field-label-letter-spacing)}.field .label .req{color:var(--error);font-weight:var(--font-weight-semibold)}.field .label .optional-marker{color:var(--text-tertiary);font-weight:var(--font-weight-regular)}.field .control{display:flex;align-items:stretch;gap:var(--space-2);background-color:var(--_input-bg-color);border:var(--border-width-default) solid var(--_input-border);border-radius:var(--_input-radius);padding:0;height:auto;transition:border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.field .control textarea{flex:1;min-width:0;appearance:none;border:0}@media not (forced-colors:active){.field .control textarea{outline:none}}.field .control textarea{background:transparent;font:var(--_textarea-font);color:var(--_input-text-color);min-height:var(--field-textarea-rows-min, 60px)}.field .control textarea::placeholder{color:var(--_input-placeholder)}.field .control ds-field-status{margin-inline-end:var(--_textarea-pad-x)}.field .control:hover{border-color:var(--_input-border-hover)}.field .control:focus-within{border-color:var(--_input-border-focus);box-shadow:var(--_input-focus-shadow)}@media not (forced-colors:active){.field .control textarea:where(:focus-visible){outline:none}}.field.disabled .control{background-color:var(--_input-bg-color-disabled);border-color:var(--border-disabled)}.field.disabled textarea{color:var(--text-disabled)}.field.read-only .control{background:var(--surface-secondary)}.field.read-only .control textarea{cursor:default}.field.sm{--_textarea-pad-x: var(--space-2)}.field.lg{--_textarea-pad-x: var(--space-3)}.field.autosize .control{position:relative}.field.autosize .control textarea{field-sizing:content;box-sizing:content-box;overflow:hidden}.field.autosize .control textarea::placeholder{white-space:nowrap;color:transparent}.field .placeholder-line{overflow:clip visible;text-overflow:ellipsis;white-space:nowrap;position:absolute;inset:0;box-sizing:border-box;font:var(--_textarea-font);color:var(--_input-placeholder);pointer-events:none;-webkit-user-select:none;user-select:none}.field .placeholder-line.wraps{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--_placeholder-rows);overflow:clip;overflow-clip-margin:content-box;white-space:normal}.field .field-footer{display:flex;align-items:baseline;justify-content:space-between;gap:var(--space-2)}.field .char-counter{font-size:var(--font-size-xs);color:var(--text-tertiary);font-variant-numeric:tabular-nums;white-space:nowrap;flex-shrink:0;margin-left:auto}.field .char-counter.over-limit{position:relative;color:var(--error-text)}.field .char-counter .visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.field.soft-limit .control{position:relative}.field.soft-limit .control textarea{position:relative;scrollbar-gutter:stable}.field .overflow-mirror{position:absolute;inset:0;box-sizing:border-box;overflow:hidden;scrollbar-gutter:stable;font:var(--_textarea-font);letter-spacing:normal;word-spacing:normal;text-transform:none;text-indent:0;text-align:start;white-space:pre-wrap;overflow-wrap:break-word;color:transparent;pointer-events:none;-webkit-user-select:none;user-select:none}.field .overflow-mirror:after{content:\" \"}.field .overflow-mirror mark{color:transparent;background-color:var(--error-highlight);border-radius:var(--ds-radius-inner)}@media(forced-colors:active){.field .overflow-mirror mark{forced-color-adjust:none;background-color:transparent;text-decoration:underline wavy CanvasText;text-decoration-skip-ink:none}}.field .control :is(textarea,.overflow-mirror,.placeholder-line){padding-block:var(--_input-padding-y);padding-inline:var(--_textarea-pad-x)}.field.sm .control :is(textarea,.overflow-mirror,.placeholder-line){padding-block:var(--space-2)}.field.lg .control :is(textarea,.overflow-mirror,.placeholder-line){padding-block:var(--space-4)}:host([data-field-state=error]:not(.in-group)) .control:not(.disabled):not(:disabled){border-color:var(--_input-border-error);background-color:var(--_input-bg-color-error)}:host([data-field-state=error]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-within,:host([data-field-state=error]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-visible{box-shadow:var(--_input-focus-shadow-error)}:host([data-field-state=warning]:not(.in-group)) .control:not(.disabled):not(:disabled){border-color:var(--warning-text)}:host([data-field-state=warning]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-within,:host([data-field-state=warning]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-visible{box-shadow:var(--ds-field-focus-shadow-warning)}:host([data-field-state=success]:not(.in-group)) .control:not(.disabled):not(:disabled){border-color:var(--_input-border-success)}:host([data-field-state=success]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-within,:host([data-field-state=success]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-visible{box-shadow:var(--ds-field-focus-shadow-success)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve", "changed"] }, { kind: "component", type: FieldStatusComponent, selector: "ds-field-status", inputs: ["pending", "changed"] }, { kind: "directive", type: FieldClickFocusDirective, selector: "[dsFieldClickFocus]" }] });
219
219
  }
220
220
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TextareaComponent, decorators: [{
221
221
  type: Component,
@@ -232,7 +232,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
232
232
  useExisting: forwardRef(() => TextareaComponent),
233
233
  multi: true,
234
234
  },
235
- ], template: "<div [class]=\"wrapperClasses()\">\n @if (label()) {\n <label\n class=\"label\"\n [attr.for]=\"uid\">\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\">\n {{ intl().field.optional }}\n </span>\n }\n </label>\n }\n\n <div\n class=\"control\"\n dsFieldClickFocus>\n @if (overLimitBy() > 0) {\n <div\n #overflowMirror\n class=\"overflow-mirror\"\n aria-hidden=\"true\">\n <span [textContent]=\"overflowParts().within\"></span>\n\n <mark [textContent]=\"overflowParts().over\"></mark>\n\n <span [textContent]=\"overflowParts().after\"></span>\n </div>\n }\n\n @if (placeholderLineShown()) {\n <div\n class=\"placeholder-line\"\n aria-hidden=\"true\"\n [class.wraps]=\"placeholderRows() > 1\"\n [style.--_placeholder-rows]=\"placeholderRows()\">\n {{ placeholder() }}\n </div>\n }\n\n <textarea\n #control\n [id]=\"uid\"\n [rows]=\"rows()\"\n [attr.name]=\"name()\"\n [attr.placeholder]=\"placeholder() || null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.maxlength]=\"nativeMaxLength()\"\n [attr.minlength]=\"minLength()\"\n [attr.pattern]=\"patternAttribute()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"isReadOnly()\"\n [required]=\"required()\"\n [style.resize]=\"effectiveResize()\"\n [style.min-height]=\"autosizeMinHeight()\"\n [style.max-height]=\"autosizeMaxHeight()\"\n [style.overflow-y]=\"autosize() && maxRows() ? 'auto' : null\"\n [(ngModel)]=\"value\"\n (blur)=\"markTouched()\"\n (scroll)=\"syncOverflowScroll()\">\n </textarea>\n\n <ds-field-status\n [pending]=\"pendingShown()\"\n [changed]=\"changedShown()\" />\n </div>\n\n @if (\n reserveMessageResolved() ||\n message().text ||\n changedShown() ||\n maxLength() !== null\n ) {\n <div class=\"field-footer\">\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n [changed]=\"changedShown()\" />\n\n @if (maxLength() !== null) {\n <span\n class=\"char-counter\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n [class.over-limit]=\"overLimitBy() > 0\"\n [id]=\"counterId()\">\n {{ currentLength() }}/{{ maxLength() }}\n @if (overLimitBy() > 0) {\n <span class=\"visually-hidden\">\n {{ intl().field.overLimit(overLimitBy()) }}\n </span>\n }\n </span>\n }\n </div>\n }\n</div>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_field-border-color: var(--ds-field-border-color, var(--border-field));--_field-border-color-hover: var(--ds-field-border-color-hover, var(--border-field-hover));--_field-border-color-focus: var(--ds-field-border-color-focus, var(--accent));--_field-text-color: var(--ds-field-text-color, var(--text-primary));--_field-placeholder-color: var(--ds-field-placeholder-color, var(--text-tertiary));--_field-font-size: var(--ds-field-font-size, var(--font-size-s));--_input-bg-color: var(--ds-input-bg-color, var(--surface-default));--_input-border: var(--ds-input-border, var(--_field-border-color));--_input-radius: var(--ds-input-radius, var(--ds-radius-control));--_input-padding-y: var(--ds-input-padding-y, var(--space-3));--_input-padding-x: var(--ds-input-padding-x, var(--field-pad-x));--_input-text-color: var(--ds-input-text-color, var(--_field-text-color));--_input-placeholder: var(--ds-input-placeholder, var(--_field-placeholder-color));--_input-border-hover: var(--ds-input-border-hover, var(--_field-border-color-hover));--_input-border-focus: var(--ds-input-border-focus, var(--_field-border-color-focus));--_input-focus-shadow: var(--ds-input-focus-shadow, var(--ds-field-focus-shadow));--_input-focus-shadow-error: var(--ds-input-focus-shadow-error, var(--ds-field-focus-shadow-error));--_input-bg-color-disabled: var(--ds-input-bg-color-disabled, var(--surface-disabled));--_input-bg-color-error: var(--ds-input-bg-color-error, var(--error-subtitle));--_input-border-error: var(--ds-input-border-error, var(--error));--_input-border-success: var(--ds-input-border-success, var(--success));--_input-font-size: var(--ds-input-font-size, var(--_field-font-size));--_textarea-font: var(--font-weight-regular) var(--_input-font-size) / var(--line-height-base) var(--font-sans);display:block}.field{display:flex;flex-direction:column;gap:var(--field-label-gap);width:100%}.field .label{--_field-label-font-size: var(--ds-field-label-font-size, var(--font-size-xs));--_field-label-font-weight: var(--ds-field-label-font-weight, var(--font-weight-bold));--_field-label-color: var(--ds-field-label-color, var(--text-secondary));--_field-label-text-transform: var(--ds-field-label-text-transform, none);--_field-label-letter-spacing: var(--ds-field-label-letter-spacing, normal);display:flex;align-items:center;gap:var(--field-gap-req);font:var(--_field-label-font-weight) var(--_field-label-font-size)/var(--line-height-base) var(--font-sans);color:var(--_field-label-color);text-transform:var(--_field-label-text-transform);letter-spacing:var(--_field-label-letter-spacing)}.field .label .req{color:var(--error);font-weight:var(--font-weight-semibold)}.field .label .optional-marker{color:var(--text-tertiary);font-weight:var(--font-weight-regular)}.field .control{display:flex;align-items:stretch;gap:var(--space-2);background-color:var(--_input-bg-color);border:var(--border-width-default) solid var(--_input-border);border-radius:var(--_input-radius);padding:0 var(--_input-padding-x);height:auto;transition:border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.field .control textarea{flex:1;min-width:0;appearance:none;border:0}@media not (forced-colors:active){.field .control textarea{outline:none}}.field .control textarea{background:transparent;font:var(--_textarea-font);color:var(--_input-text-color);min-height:var(--field-textarea-rows-min, 60px);padding:var(--_input-padding-y) 0}.field .control textarea::placeholder{color:var(--_input-placeholder)}.field .control:hover{border-color:var(--_input-border-hover)}.field .control:focus-within{border-color:var(--_input-border-focus);box-shadow:var(--_input-focus-shadow)}@media not (forced-colors:active){.field .control textarea:where(:focus-visible){outline:none}}.field.disabled .control{background-color:var(--_input-bg-color-disabled);border-color:var(--border-disabled)}.field.disabled textarea{color:var(--text-disabled)}.field.read-only .control{background:var(--surface-secondary)}.field.read-only .control textarea{cursor:default}.field.sm .control{padding:0 var(--space-2)}.field.lg .control{padding:0 var(--space-3)}.field.autosize .control{position:relative}.field.autosize .control textarea{field-sizing:content;box-sizing:content-box;overflow:hidden}.field.autosize .control textarea::placeholder{white-space:nowrap;color:transparent}.field .placeholder-line{overflow:clip visible;text-overflow:ellipsis;white-space:nowrap;position:absolute;inset:0;box-sizing:border-box;padding-inline:inherit;font:var(--_textarea-font);color:var(--_input-placeholder);pointer-events:none;-webkit-user-select:none;user-select:none}.field .placeholder-line.wraps{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--_placeholder-rows);overflow:clip;overflow-clip-margin:content-box;white-space:normal}.field .field-footer{display:flex;align-items:baseline;justify-content:space-between;gap:var(--space-2)}.field .char-counter{font-size:var(--font-size-xs);color:var(--text-tertiary);font-variant-numeric:tabular-nums;white-space:nowrap;flex-shrink:0;margin-left:auto}.field .char-counter.over-limit{position:relative;color:var(--error-text)}.field .char-counter .visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.field.soft-limit .control{position:relative}.field.soft-limit .control textarea{position:relative;scrollbar-gutter:stable}.field .overflow-mirror{position:absolute;inset:0;box-sizing:border-box;padding-inline:inherit;overflow:hidden;scrollbar-gutter:stable;font:var(--_textarea-font);letter-spacing:normal;word-spacing:normal;text-transform:none;text-indent:0;text-align:start;white-space:pre-wrap;overflow-wrap:break-word;color:transparent;pointer-events:none;-webkit-user-select:none;user-select:none}.field .overflow-mirror:after{content:\" \"}.field .overflow-mirror mark{color:transparent;background-color:var(--error-highlight);border-radius:var(--ds-radius-inner)}@media(forced-colors:active){.field .overflow-mirror mark{forced-color-adjust:none;background-color:transparent;text-decoration:underline wavy CanvasText;text-decoration-skip-ink:none}}.field .control :is(textarea,.overflow-mirror,.placeholder-line){padding-block:var(--_input-padding-y)}.field.sm .control :is(textarea,.overflow-mirror,.placeholder-line){padding-block:var(--space-2)}.field.lg .control :is(textarea,.overflow-mirror,.placeholder-line){padding-block:var(--space-4)}:host([data-field-state=error]:not(.in-group)) .control:not(.disabled):not(:disabled){border-color:var(--_input-border-error);background-color:var(--_input-bg-color-error)}:host([data-field-state=error]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-within,:host([data-field-state=error]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-visible{box-shadow:var(--_input-focus-shadow-error)}:host([data-field-state=warning]:not(.in-group)) .control:not(.disabled):not(:disabled){border-color:var(--warning-text)}:host([data-field-state=warning]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-within,:host([data-field-state=warning]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-visible{box-shadow:var(--ds-field-focus-shadow-warning)}:host([data-field-state=success]:not(.in-group)) .control:not(.disabled):not(:disabled){border-color:var(--_input-border-success)}:host([data-field-state=success]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-within,:host([data-field-state=success]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-visible{box-shadow:var(--ds-field-focus-shadow-success)}\n"] }]
235
+ ], template: "<div [class]=\"wrapperClasses()\">\n @if (label()) {\n <label\n class=\"label\"\n [attr.for]=\"uid\">\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\">\n {{ intl().field.optional }}\n </span>\n }\n </label>\n }\n\n <div\n class=\"control\"\n dsFieldClickFocus>\n @if (overLimitBy() > 0) {\n <div\n #overflowMirror\n class=\"overflow-mirror\"\n aria-hidden=\"true\">\n <span [textContent]=\"overflowParts().within\"></span>\n\n <mark [textContent]=\"overflowParts().over\"></mark>\n\n <span [textContent]=\"overflowParts().after\"></span>\n </div>\n }\n\n @if (placeholderLineShown()) {\n <div\n class=\"placeholder-line\"\n aria-hidden=\"true\"\n [class.wraps]=\"placeholderRows() > 1\"\n [style.--_placeholder-rows]=\"placeholderRows()\">\n {{ placeholder() }}\n </div>\n }\n\n <textarea\n #control\n [id]=\"uid\"\n [rows]=\"rows()\"\n [attr.name]=\"name()\"\n [attr.placeholder]=\"placeholder() || null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.maxlength]=\"nativeMaxLength()\"\n [attr.minlength]=\"minLength()\"\n [attr.pattern]=\"patternAttribute()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"isReadOnly()\"\n [required]=\"required()\"\n [style.resize]=\"effectiveResize()\"\n [style.min-height]=\"autosizeMinHeight()\"\n [style.max-height]=\"autosizeMaxHeight()\"\n [style.overflow-y]=\"autosize() && maxRows() ? 'auto' : null\"\n [(ngModel)]=\"value\"\n (blur)=\"markTouched()\"\n (scroll)=\"syncOverflowScroll()\">\n </textarea>\n\n <ds-field-status\n [pending]=\"pendingShown()\"\n [changed]=\"changedShown()\" />\n </div>\n\n @if (\n reserveMessageResolved() ||\n message().text ||\n changedShown() ||\n maxLength() !== null\n ) {\n <div class=\"field-footer\">\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n [changed]=\"changedShown()\" />\n\n @if (maxLength() !== null) {\n <span\n class=\"char-counter\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n [class.over-limit]=\"overLimitBy() > 0\"\n [id]=\"counterId()\">\n {{ currentLength() }}/{{ maxLength() }}\n @if (overLimitBy() > 0) {\n <span class=\"visually-hidden\">\n {{ intl().field.overLimit(overLimitBy()) }}\n </span>\n }\n </span>\n }\n </div>\n }\n</div>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_field-border-color: var(--ds-field-border-color, var(--border-field));--_field-border-color-hover: var(--ds-field-border-color-hover, var(--border-field-hover));--_field-border-color-focus: var(--ds-field-border-color-focus, var(--accent));--_field-text-color: var(--ds-field-text-color, var(--text-primary));--_field-placeholder-color: var(--ds-field-placeholder-color, var(--text-tertiary));--_field-font-size: var(--ds-field-font-size, var(--font-size-s));--_input-bg-color: var(--ds-input-bg-color, var(--surface-default));--_input-border: var(--ds-input-border, var(--_field-border-color));--_input-radius: var(--ds-input-radius, var(--ds-radius-control));--_input-padding-y: var(--ds-input-padding-y, var(--space-3));--_input-padding-x: var(--ds-input-padding-x, var(--field-pad-x));--_input-text-color: var(--ds-input-text-color, var(--_field-text-color));--_input-placeholder: var(--ds-input-placeholder, var(--_field-placeholder-color));--_input-border-hover: var(--ds-input-border-hover, var(--_field-border-color-hover));--_input-border-focus: var(--ds-input-border-focus, var(--_field-border-color-focus));--_input-focus-shadow: var(--ds-input-focus-shadow, var(--ds-field-focus-shadow));--_input-focus-shadow-error: var(--ds-input-focus-shadow-error, var(--ds-field-focus-shadow-error));--_input-bg-color-disabled: var(--ds-input-bg-color-disabled, var(--surface-disabled));--_input-bg-color-error: var(--ds-input-bg-color-error, var(--error-subtitle));--_input-border-error: var(--ds-input-border-error, var(--error));--_input-border-success: var(--ds-input-border-success, var(--success));--_input-font-size: var(--ds-input-font-size, var(--_field-font-size));--_textarea-font: var(--font-weight-regular) var(--_input-font-size) / var(--line-height-base) var(--font-sans);display:block}.field{--_textarea-pad-x: var(--_input-padding-x);display:flex;flex-direction:column;gap:var(--field-label-gap);width:100%}.field .label{--_field-label-font-size: var(--ds-field-label-font-size, var(--font-size-xs));--_field-label-font-weight: var(--ds-field-label-font-weight, var(--font-weight-bold));--_field-label-color: var(--ds-field-label-color, var(--text-secondary));--_field-label-text-transform: var(--ds-field-label-text-transform, none);--_field-label-letter-spacing: var(--ds-field-label-letter-spacing, normal);display:flex;align-items:center;gap:var(--field-gap-req);font:var(--_field-label-font-weight) var(--_field-label-font-size)/var(--line-height-base) var(--font-sans);color:var(--_field-label-color);text-transform:var(--_field-label-text-transform);letter-spacing:var(--_field-label-letter-spacing)}.field .label .req{color:var(--error);font-weight:var(--font-weight-semibold)}.field .label .optional-marker{color:var(--text-tertiary);font-weight:var(--font-weight-regular)}.field .control{display:flex;align-items:stretch;gap:var(--space-2);background-color:var(--_input-bg-color);border:var(--border-width-default) solid var(--_input-border);border-radius:var(--_input-radius);padding:0;height:auto;transition:border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.field .control textarea{flex:1;min-width:0;appearance:none;border:0}@media not (forced-colors:active){.field .control textarea{outline:none}}.field .control textarea{background:transparent;font:var(--_textarea-font);color:var(--_input-text-color);min-height:var(--field-textarea-rows-min, 60px)}.field .control textarea::placeholder{color:var(--_input-placeholder)}.field .control ds-field-status{margin-inline-end:var(--_textarea-pad-x)}.field .control:hover{border-color:var(--_input-border-hover)}.field .control:focus-within{border-color:var(--_input-border-focus);box-shadow:var(--_input-focus-shadow)}@media not (forced-colors:active){.field .control textarea:where(:focus-visible){outline:none}}.field.disabled .control{background-color:var(--_input-bg-color-disabled);border-color:var(--border-disabled)}.field.disabled textarea{color:var(--text-disabled)}.field.read-only .control{background:var(--surface-secondary)}.field.read-only .control textarea{cursor:default}.field.sm{--_textarea-pad-x: var(--space-2)}.field.lg{--_textarea-pad-x: var(--space-3)}.field.autosize .control{position:relative}.field.autosize .control textarea{field-sizing:content;box-sizing:content-box;overflow:hidden}.field.autosize .control textarea::placeholder{white-space:nowrap;color:transparent}.field .placeholder-line{overflow:clip visible;text-overflow:ellipsis;white-space:nowrap;position:absolute;inset:0;box-sizing:border-box;font:var(--_textarea-font);color:var(--_input-placeholder);pointer-events:none;-webkit-user-select:none;user-select:none}.field .placeholder-line.wraps{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--_placeholder-rows);overflow:clip;overflow-clip-margin:content-box;white-space:normal}.field .field-footer{display:flex;align-items:baseline;justify-content:space-between;gap:var(--space-2)}.field .char-counter{font-size:var(--font-size-xs);color:var(--text-tertiary);font-variant-numeric:tabular-nums;white-space:nowrap;flex-shrink:0;margin-left:auto}.field .char-counter.over-limit{position:relative;color:var(--error-text)}.field .char-counter .visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.field.soft-limit .control{position:relative}.field.soft-limit .control textarea{position:relative;scrollbar-gutter:stable}.field .overflow-mirror{position:absolute;inset:0;box-sizing:border-box;overflow:hidden;scrollbar-gutter:stable;font:var(--_textarea-font);letter-spacing:normal;word-spacing:normal;text-transform:none;text-indent:0;text-align:start;white-space:pre-wrap;overflow-wrap:break-word;color:transparent;pointer-events:none;-webkit-user-select:none;user-select:none}.field .overflow-mirror:after{content:\" \"}.field .overflow-mirror mark{color:transparent;background-color:var(--error-highlight);border-radius:var(--ds-radius-inner)}@media(forced-colors:active){.field .overflow-mirror mark{forced-color-adjust:none;background-color:transparent;text-decoration:underline wavy CanvasText;text-decoration-skip-ink:none}}.field .control :is(textarea,.overflow-mirror,.placeholder-line){padding-block:var(--_input-padding-y);padding-inline:var(--_textarea-pad-x)}.field.sm .control :is(textarea,.overflow-mirror,.placeholder-line){padding-block:var(--space-2)}.field.lg .control :is(textarea,.overflow-mirror,.placeholder-line){padding-block:var(--space-4)}:host([data-field-state=error]:not(.in-group)) .control:not(.disabled):not(:disabled){border-color:var(--_input-border-error);background-color:var(--_input-bg-color-error)}:host([data-field-state=error]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-within,:host([data-field-state=error]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-visible{box-shadow:var(--_input-focus-shadow-error)}:host([data-field-state=warning]:not(.in-group)) .control:not(.disabled):not(:disabled){border-color:var(--warning-text)}:host([data-field-state=warning]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-within,:host([data-field-state=warning]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-visible{box-shadow:var(--ds-field-focus-shadow-warning)}:host([data-field-state=success]:not(.in-group)) .control:not(.disabled):not(:disabled){border-color:var(--_input-border-success)}:host([data-field-state=success]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-within,:host([data-field-state=success]:not(.in-group)) .control:not(.disabled):not(:disabled):focus-visible{box-shadow:var(--ds-field-focus-shadow-success)}\n"] }]
236
236
  }], ctorParameters: () => [], propDecorators: { control: [{ type: i0.ViewChild, args: ['control', { isSignal: true }] }], overflowMirror: [{ type: i0.ViewChild, args: ['overflowMirror', { isSignal: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], readonlyBinding: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], success: [{ type: i0.Input, args: [{ isSignal: true, alias: "success", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], optional: [{ type: i0.Input, args: [{ isSignal: true, alias: "optional", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], autosize: [{ type: i0.Input, args: [{ isSignal: true, alias: "autosize", required: false }] }], minRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "minRows", required: false }] }], maxRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxRows", required: false }] }], resize: [{ type: i0.Input, args: [{ isSignal: true, alias: "resize", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], maxLengthMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLengthMode", required: false }] }], countTrimmed: [{ type: i0.Input, args: [{ isSignal: true, alias: "countTrimmed", required: false }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }], pattern: [{ type: i0.Input, args: [{ isSignal: true, alias: "pattern", required: false }] }] } });
237
237
 
238
238
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-textarea.mjs","sources":["../../../src/lib/components/textarea/textarea.component.ts","../../../src/lib/components/textarea/textarea.component.html","../../../src/lib/components/textarea/ids-group-ltd-ids-design-system-components-textarea.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n ViewEncapsulation,\n afterRenderEffect,\n booleanAttribute,\n computed,\n forwardRef,\n inject,\n input,\n model,\n viewChild,\n} from '@angular/core';\nimport { DS_INTL, optionalBound } from '@ids-group-ltd/ids-design-system/core';\nimport { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DsControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport type { TextareaMaxLengthMode, TextareaResize } from './textarea.types';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport {\n FieldMessageComponent,\n FieldStatusComponent,\n} from '@ids-group-ltd/ids-design-system/components/field-message';\nimport {\n resolveFieldMessage,\n trimmedText,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport { FieldClickFocusDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-textarea',\n standalone: true,\n imports: [\n FormsModule,\n FieldMessageComponent,\n FieldStatusComponent,\n FieldClickFocusDirective,\n ],\n templateUrl: './textarea.component.html',\n styleUrl: './textarea.component.scss',\n host: {\n '[attr.data-field-state]': 'controlState()',\n },\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TextareaComponent),\n multi: true,\n },\n ],\n})\nexport class TextareaComponent extends DsControlValueAccessor<string> {\n protected readonly intl = inject(DS_INTL);\n private readonly control =\n viewChild<ElementRef<HTMLTextAreaElement>>('control');\n private readonly overflowMirror =\n viewChild<ElementRef<HTMLDivElement>>('overflowMirror');\n\n /** Text value, two-way bound. */\n readonly value = model<string>('');\n /** Field height; falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** Label shown above the field. */\n readonly label = input<string>('');\n /** Placeholder shown when empty. */\n readonly placeholder = input<string>('');\n /** Disables the field and blocks all interaction. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Prevents editing while still allowing focus and selection. */\n readonly readOnly = input(false, { transform: booleanAttribute });\n /** The contract spelling of `readOnly`: signal forms binds by NAME, so a `readonly()` rule reaches nothing without it. */\n readonly readonlyBinding = input(false, {\n // eslint-disable-next-line @angular-eslint/no-input-rename\n alias: 'readonly',\n transform: booleanAttribute,\n });\n protected readonly isReadOnly = computed(\n () => this.readOnly() || this.readonlyBinding(),\n );\n /** Confirmation text, shown when there is no error or warning; paints the success border. */\n readonly success = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** Marks the field required - shows an asterisk and sets `aria-required`. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Shows an \"(optional)\" marker next to the label (ignored when `required`). */\n readonly optional = input(false, { transform: booleanAttribute });\n /** Native `rows` attribute - visible line count. */\n readonly rows = input<number>(3);\n /** Native `name` attribute. */\n readonly name = input<string | null>(null);\n /** Grows the field with content instead of scrolling; forces `resize` to none. */\n readonly autosize = input(false, { transform: booleanAttribute });\n /** Minimum height in lines when `autosize`. */\n readonly minRows = input<number | null>(null);\n /** Maximum height in lines when `autosize`, beyond which it scrolls. */\n readonly maxRows = input<number | null>(null);\n /** Native CSS `resize` behaviour - ignored when `autosize`. */\n readonly resize = input<TextareaResize>('vertical');\n /** Accessible name when no visible `label` is provided. */\n readonly ariaLabel = input<string | null>(null);\n /** Character limit with a live \"{current}/{max}\" counter; `maxLengthMode` decides what happens at the limit.\n * Counts `value.length` (UTF-16 units, as native `maxlength` does) unless `countTrimmed` is set. */\n readonly maxLength = input<number | null, number | null | undefined>(null, {\n transform: optionalBound,\n });\n /** `'hard'` applies the native maxlength attribute. `'soft'` lets the text run past it: the counter turns red, the excess is\n * highlighted and the field reports invalid (`aria-invalid`). */\n readonly maxLengthMode = input<TextareaMaxLengthMode>('hard');\n /** Leaves leading and trailing whitespace out of the counter, soft-limit state and highlight.\n * The native `maxlength` of `maxLengthMode=\"hard\"` counts every character regardless. */\n readonly countTrimmed = input(false, { transform: booleanAttribute });\n private readonly countedRange = computed(() => {\n const value = this.value();\n if (!this.countTrimmed()) {\n return { start: 0, end: value.length };\n }\n const start = value.length - value.trimStart().length;\n\n return { start, end: Math.max(start, value.trimEnd().length) };\n });\n protected readonly currentLength = computed(() => {\n const { start, end } = this.countedRange();\n\n return end - start;\n });\n protected readonly overLimitBy = computed(() => {\n const limit = this.maxLength();\n\n return this.maxLengthMode() === 'soft' && limit !== null\n ? Math.max(0, this.currentLength() - limit)\n : 0;\n });\n protected readonly overflowParts = computed(() => {\n const value = this.value();\n const { end } = this.countedRange();\n let splitAt = end - this.overLimitBy();\n // A limit inside a surrogate pair marks the whole pair: half a pair renders at another width and shifts every mirrored line after it.\n // A limit inside an emoji ZWJ sequence still shifts them; Intl.Segmenter graphemes would not (Firefox 125+).\n const previous = value.charCodeAt(splitAt - 1);\n if (previous >= 0xd800 && previous <= 0xdbff) {\n splitAt -= 1;\n }\n\n return {\n within: value.slice(0, splitAt),\n over: value.slice(splitAt, end),\n after: value.slice(end),\n };\n });\n\n // Signal forms binds these by name; without them the native element advertises no rule.\n /** Native `minlength` attribute. */\n readonly minLength = input<number | null, number | null | undefined>(null, {\n transform: optionalBound,\n });\n /** Native `pattern` attribute - signal forms sends the schema's RegExp list. */\n readonly pattern = input<\n readonly RegExp[],\n readonly RegExp[] | string | undefined\n >([], {\n transform: (value) =>\n value === undefined\n ? []\n : typeof value === 'string'\n ? [new RegExp(value)]\n : value,\n });\n /** A native `pattern` takes one expression; several are ANDed with lookaheads. */\n protected readonly patternAttribute = computed(() => {\n const expressions = this.pattern();\n if (!expressions.length) {\n return null;\n }\n\n return (\n expressions.map((expression) => `(?=${expression.source})`).join('') +\n '.*'\n );\n });\n protected readonly uid = nextControlId('ds-textarea');\n protected readonly hintId = computed(() =>\n this.message().text || this.changedShown() ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n pending: this.pending,\n dirty: this.dirty,\n showDirty: this.showDirtyResolved,\n disabled: () => this.isDisabled(),\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: computed(() => this.invalid() || this.overLimitBy() > 0),\n success: this.success,\n touchedSelf: this.touchedSelf,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly pendingShown = this.fieldMessage.pending;\n protected readonly changedShown = this.fieldMessage.changed;\n protected readonly controlState = this.fieldMessage.controlState;\n protected readonly invalidResolved = this.fieldMessage.invalid;\n protected readonly resolvedAriaLabel = computed(() =>\n this.label() ? null : this.ariaLabel() || this.placeholder() || null,\n );\n\n protected readonly isDisabled = computed(\n () => this.disabled() || this.formDisabled(),\n );\n\n protected readonly counterId = computed(() =>\n this.maxLength() !== null ? `${this.uid}-counter` : null,\n );\n protected readonly describedBy = computed(\n () =>\n [this.hintId(), this.overLimitBy() > 0 ? this.counterId() : null]\n .filter(Boolean)\n .join(' ') || null,\n );\n protected readonly nativeMaxLength = computed(() =>\n this.maxLengthMode() === 'hard' ? this.maxLength() : null,\n );\n\n protected readonly wrapperClasses = computed(() => {\n const parts = ['field'];\n if (this.sizeResolved() === 'sm') {\n parts.push('sm');\n }\n if (this.sizeResolved() === 'lg') {\n parts.push('lg');\n }\n if (this.invalidResolved()) {\n parts.push('error');\n }\n if (this.isDisabled()) {\n parts.push('disabled');\n }\n if (this.isReadOnly()) {\n parts.push('read-only');\n }\n if (this.autosize()) {\n parts.push('autosize');\n }\n if (this.maxLengthMode() === 'soft' && this.maxLength() !== null) {\n parts.push('soft-limit');\n }\n\n return parts.join(' ');\n });\n\n protected readonly autosizeMinHeight = computed(() =>\n this.autosize() && this.minRows() ? `${this.minRows()}lh` : null,\n );\n protected readonly autosizeMaxHeight = computed(() =>\n this.autosize() && this.maxRows() ? `${this.maxRows()}lh` : null,\n );\n\n protected readonly placeholderLineShown = computed(\n () => this.autosize() && this.placeholder() !== '' && !this.value(),\n );\n protected readonly placeholderRows = computed(() =>\n Math.max(1, this.minRows() ?? 1),\n );\n\n protected readonly effectiveResize = computed<TextareaResize>(() =>\n this.autosize() ? 'none' : this.resize(),\n );\n\n constructor() {\n super();\n afterRenderEffect({\n write: () => {\n // The textarea scrolls on input before the mirror re-renders, so the `(scroll)` sync alone leaves the mirror behind.\n this.overflowParts();\n this.syncOverflowScroll();\n },\n });\n }\n\n protected syncOverflowScroll(): void {\n const mirror = this.overflowMirror()?.nativeElement;\n const control = this.control()?.nativeElement;\n if (mirror && control) {\n mirror.scrollTop = control.scrollTop;\n }\n }\n\n /** Moves keyboard focus to the native textarea. */\n override focus(options?: FocusOptions): void {\n this.control()?.nativeElement.focus(options);\n }\n\n /** Index of the first selected character of the native textarea; 0 before the view exists. */\n get selectionStart(): number {\n return this.control()?.nativeElement.selectionStart ?? 0;\n }\n\n /** Index after the last selected character of the native textarea; 0 before the view exists. */\n get selectionEnd(): number {\n return this.control()?.nativeElement.selectionEnd ?? 0;\n }\n\n /**\n * Mirrors `HTMLTextAreaElement.setSelectionRange`; does not move focus. A value written through `value` reaches the\n * element a microtask later and drops the caret to the end, so after `value.set(...)` set the range from a `setTimeout`.\n */\n setSelectionRange(\n start: number,\n end: number,\n direction?: 'forward' | 'backward' | 'none',\n ): void {\n this.control()?.nativeElement.setSelectionRange(start, end, direction);\n }\n\n /** Selects the whole text, as `HTMLTextAreaElement.select()` does. */\n select(): void {\n this.control()?.nativeElement.select();\n }\n}\n","<div [class]=\"wrapperClasses()\">\n @if (label()) {\n <label\n class=\"label\"\n [attr.for]=\"uid\">\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\">\n {{ intl().field.optional }}\n </span>\n }\n </label>\n }\n\n <div\n class=\"control\"\n dsFieldClickFocus>\n @if (overLimitBy() > 0) {\n <div\n #overflowMirror\n class=\"overflow-mirror\"\n aria-hidden=\"true\">\n <span [textContent]=\"overflowParts().within\"></span>\n\n <mark [textContent]=\"overflowParts().over\"></mark>\n\n <span [textContent]=\"overflowParts().after\"></span>\n </div>\n }\n\n @if (placeholderLineShown()) {\n <div\n class=\"placeholder-line\"\n aria-hidden=\"true\"\n [class.wraps]=\"placeholderRows() > 1\"\n [style.--_placeholder-rows]=\"placeholderRows()\">\n {{ placeholder() }}\n </div>\n }\n\n <textarea\n #control\n [id]=\"uid\"\n [rows]=\"rows()\"\n [attr.name]=\"name()\"\n [attr.placeholder]=\"placeholder() || null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.maxlength]=\"nativeMaxLength()\"\n [attr.minlength]=\"minLength()\"\n [attr.pattern]=\"patternAttribute()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"isReadOnly()\"\n [required]=\"required()\"\n [style.resize]=\"effectiveResize()\"\n [style.min-height]=\"autosizeMinHeight()\"\n [style.max-height]=\"autosizeMaxHeight()\"\n [style.overflow-y]=\"autosize() && maxRows() ? 'auto' : null\"\n [(ngModel)]=\"value\"\n (blur)=\"markTouched()\"\n (scroll)=\"syncOverflowScroll()\">\n </textarea>\n\n <ds-field-status\n [pending]=\"pendingShown()\"\n [changed]=\"changedShown()\" />\n </div>\n\n @if (\n reserveMessageResolved() ||\n message().text ||\n changedShown() ||\n maxLength() !== null\n ) {\n <div class=\"field-footer\">\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n [changed]=\"changedShown()\" />\n\n @if (maxLength() !== null) {\n <span\n class=\"char-counter\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n [class.over-limit]=\"overLimitBy() > 0\"\n [id]=\"counterId()\">\n {{ currentLength() }}/{{ maxLength() }}\n @if (overLimitBy() > 0) {\n <span class=\"visually-hidden\">\n {{ intl().field.overLimit(overLimitBy()) }}\n </span>\n }\n </span>\n }\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAqDM,MAAO,iBAAkB,SAAQ,sBAA8B,CAAA;AAChD,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;AACxB,IAAA,OAAO,GACtB,SAAS,CAAkC,SAAS,8EAAC;AACtC,IAAA,cAAc,GAC7B,SAAS,CAA6B,gBAAgB,qFAAC;;AAGhD,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,IAAA,IAAI,GAAG,KAAK,CAAgB,IAAI,2EAAC;IACjC,YAAY,GAAG,iBAAiB,CACvC,IAAI,CAAC,IAAI,EACT,CAAC,MAAM,KAAK,MAAM,CAAC,OAAO,EAAE,IAAI,EAChC,IAAc,CACf;;AAEQ,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,IAAA,WAAW,GAAG,KAAK,CAAS,EAAE,kFAAC;;IAE/B,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAExD,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAExD,eAAe,GAAG,KAAK,CAAC,KAAK,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,iBAAA,EAA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EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,eAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,cAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE1D1D;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-textarea.mjs","sources":["../../../src/lib/components/textarea/textarea.component.ts","../../../src/lib/components/textarea/textarea.component.html","../../../src/lib/components/textarea/ids-group-ltd-ids-design-system-components-textarea.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n ViewEncapsulation,\n afterRenderEffect,\n booleanAttribute,\n computed,\n forwardRef,\n inject,\n input,\n model,\n viewChild,\n} from '@angular/core';\nimport { DS_INTL, optionalBound } from '@ids-group-ltd/ids-design-system/core';\nimport { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DsControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport type { TextareaMaxLengthMode, TextareaResize } from './textarea.types';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport {\n FieldMessageComponent,\n FieldStatusComponent,\n} from '@ids-group-ltd/ids-design-system/components/field-message';\nimport {\n resolveFieldMessage,\n trimmedText,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport { FieldClickFocusDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-textarea',\n standalone: true,\n imports: [\n FormsModule,\n FieldMessageComponent,\n FieldStatusComponent,\n FieldClickFocusDirective,\n ],\n templateUrl: './textarea.component.html',\n styleUrl: './textarea.component.scss',\n host: {\n '[attr.data-field-state]': 'controlState()',\n },\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TextareaComponent),\n multi: true,\n },\n ],\n})\nexport class TextareaComponent extends DsControlValueAccessor<string> {\n protected readonly intl = inject(DS_INTL);\n private readonly control =\n viewChild<ElementRef<HTMLTextAreaElement>>('control');\n private readonly overflowMirror =\n viewChild<ElementRef<HTMLDivElement>>('overflowMirror');\n\n /** Text value, two-way bound. */\n readonly value = model<string>('');\n /** Field height; falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** Label shown above the field. */\n readonly label = input<string>('');\n /** Placeholder shown when empty. */\n readonly placeholder = input<string>('');\n /** Disables the field and blocks all interaction. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Prevents editing while still allowing focus and selection. */\n readonly readOnly = input(false, { transform: booleanAttribute });\n /** The contract spelling of `readOnly`: signal forms binds by NAME, so a `readonly()` rule reaches nothing without it. */\n readonly readonlyBinding = input(false, {\n // eslint-disable-next-line @angular-eslint/no-input-rename\n alias: 'readonly',\n transform: booleanAttribute,\n });\n protected readonly isReadOnly = computed(\n () => this.readOnly() || this.readonlyBinding(),\n );\n /** Confirmation text, shown when there is no error or warning; paints the success border. */\n readonly success = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** Marks the field required - shows an asterisk and sets `aria-required`. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Shows an \"(optional)\" marker next to the label (ignored when `required`). */\n readonly optional = input(false, { transform: booleanAttribute });\n /** Native `rows` attribute - visible line count. */\n readonly rows = input<number>(3);\n /** Native `name` attribute. */\n readonly name = input<string | null>(null);\n /** Grows the field with content instead of scrolling; forces `resize` to none. */\n readonly autosize = input(false, { transform: booleanAttribute });\n /** Minimum height in lines when `autosize`. */\n readonly minRows = input<number | null>(null);\n /** Maximum height in lines when `autosize`, beyond which it scrolls. */\n readonly maxRows = input<number | null>(null);\n /** Native CSS `resize` behaviour - ignored when `autosize`. */\n readonly resize = input<TextareaResize>('vertical');\n /** Accessible name when no visible `label` is provided. */\n readonly ariaLabel = input<string | null>(null);\n /** Character limit with a live \"{current}/{max}\" counter; `maxLengthMode` decides what happens at the limit.\n * Counts `value.length` (UTF-16 units, as native `maxlength` does) unless `countTrimmed` is set. */\n readonly maxLength = input<number | null, number | null | undefined>(null, {\n transform: optionalBound,\n });\n /** `'hard'` applies the native maxlength attribute. `'soft'` lets the text run past it: the counter turns red, the excess is\n * highlighted and the field reports invalid (`aria-invalid`). */\n readonly maxLengthMode = input<TextareaMaxLengthMode>('hard');\n /** Leaves leading and trailing whitespace out of the counter, soft-limit state and highlight.\n * The native `maxlength` of `maxLengthMode=\"hard\"` counts every character regardless. */\n readonly countTrimmed = input(false, { transform: booleanAttribute });\n private readonly countedRange = computed(() => {\n const value = this.value();\n if (!this.countTrimmed()) {\n return { start: 0, end: value.length };\n }\n const start = value.length - value.trimStart().length;\n\n return { start, end: Math.max(start, value.trimEnd().length) };\n });\n protected readonly currentLength = computed(() => {\n const { start, end } = this.countedRange();\n\n return end - start;\n });\n protected readonly overLimitBy = computed(() => {\n const limit = this.maxLength();\n\n return this.maxLengthMode() === 'soft' && limit !== null\n ? Math.max(0, this.currentLength() - limit)\n : 0;\n });\n protected readonly overflowParts = computed(() => {\n const value = this.value();\n const { end } = this.countedRange();\n let splitAt = end - this.overLimitBy();\n // A limit inside a surrogate pair marks the whole pair: half a pair renders at another width and shifts every mirrored line after it.\n // A limit inside an emoji ZWJ sequence still shifts them; Intl.Segmenter graphemes would not (Firefox 125+).\n const previous = value.charCodeAt(splitAt - 1);\n if (previous >= 0xd800 && previous <= 0xdbff) {\n splitAt -= 1;\n }\n\n return {\n within: value.slice(0, splitAt),\n over: value.slice(splitAt, end),\n after: value.slice(end),\n };\n });\n\n // Signal forms binds these by name; without them the native element advertises no rule.\n /** Native `minlength` attribute. */\n readonly minLength = input<number | null, number | null | undefined>(null, {\n transform: optionalBound,\n });\n /** Native `pattern` attribute - signal forms sends the schema's RegExp list. */\n readonly pattern = input<\n readonly RegExp[],\n readonly RegExp[] | string | undefined\n >([], {\n transform: (value) =>\n value === undefined\n ? []\n : typeof value === 'string'\n ? [new RegExp(value)]\n : value,\n });\n /** A native `pattern` takes one expression; several are ANDed with lookaheads. */\n protected readonly patternAttribute = computed(() => {\n const expressions = this.pattern();\n if (!expressions.length) {\n return null;\n }\n\n return (\n expressions.map((expression) => `(?=${expression.source})`).join('') +\n '.*'\n );\n });\n protected readonly uid = nextControlId('ds-textarea');\n protected readonly hintId = computed(() =>\n this.message().text || this.changedShown() ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n pending: this.pending,\n dirty: this.dirty,\n showDirty: this.showDirtyResolved,\n disabled: () => this.isDisabled(),\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: computed(() => this.invalid() || this.overLimitBy() > 0),\n success: this.success,\n touchedSelf: this.touchedSelf,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly pendingShown = this.fieldMessage.pending;\n protected readonly changedShown = this.fieldMessage.changed;\n protected readonly controlState = this.fieldMessage.controlState;\n protected readonly invalidResolved = this.fieldMessage.invalid;\n protected readonly resolvedAriaLabel = computed(() =>\n this.label() ? null : this.ariaLabel() || this.placeholder() || null,\n );\n\n protected readonly isDisabled = computed(\n () => this.disabled() || this.formDisabled(),\n );\n\n protected readonly counterId = computed(() =>\n this.maxLength() !== null ? `${this.uid}-counter` : null,\n );\n protected readonly describedBy = computed(\n () =>\n [this.hintId(), this.overLimitBy() > 0 ? this.counterId() : null]\n .filter(Boolean)\n .join(' ') || null,\n );\n protected readonly nativeMaxLength = computed(() =>\n this.maxLengthMode() === 'hard' ? this.maxLength() : null,\n );\n\n protected readonly wrapperClasses = computed(() => {\n const parts = ['field'];\n if (this.sizeResolved() === 'sm') {\n parts.push('sm');\n }\n if (this.sizeResolved() === 'lg') {\n parts.push('lg');\n }\n if (this.invalidResolved()) {\n parts.push('error');\n }\n if (this.isDisabled()) {\n parts.push('disabled');\n }\n if (this.isReadOnly()) {\n parts.push('read-only');\n }\n if (this.autosize()) {\n parts.push('autosize');\n }\n if (this.maxLengthMode() === 'soft' && this.maxLength() !== null) {\n parts.push('soft-limit');\n }\n\n return parts.join(' ');\n });\n\n protected readonly autosizeMinHeight = computed(() =>\n this.autosize() && this.minRows() ? `${this.minRows()}lh` : null,\n );\n protected readonly autosizeMaxHeight = computed(() =>\n this.autosize() && this.maxRows() ? `${this.maxRows()}lh` : null,\n );\n\n protected readonly placeholderLineShown = computed(\n () => this.autosize() && this.placeholder() !== '' && !this.value(),\n );\n protected readonly placeholderRows = computed(() =>\n Math.max(1, this.minRows() ?? 1),\n );\n\n protected readonly effectiveResize = computed<TextareaResize>(() =>\n this.autosize() ? 'none' : this.resize(),\n );\n\n constructor() {\n super();\n afterRenderEffect({\n write: () => {\n // The textarea scrolls on input before the mirror re-renders, so the `(scroll)` sync alone leaves the mirror behind.\n this.overflowParts();\n this.syncOverflowScroll();\n },\n });\n }\n\n protected syncOverflowScroll(): void {\n const mirror = this.overflowMirror()?.nativeElement;\n const control = this.control()?.nativeElement;\n if (mirror && control) {\n mirror.scrollTop = control.scrollTop;\n }\n }\n\n /** Moves keyboard focus to the native textarea. */\n override focus(options?: FocusOptions): void {\n this.control()?.nativeElement.focus(options);\n }\n\n /** Index of the first selected character of the native textarea; 0 before the view exists. */\n get selectionStart(): number {\n return this.control()?.nativeElement.selectionStart ?? 0;\n }\n\n /** Index after the last selected character of the native textarea; 0 before the view exists. */\n get selectionEnd(): number {\n return this.control()?.nativeElement.selectionEnd ?? 0;\n }\n\n /**\n * Mirrors `HTMLTextAreaElement.setSelectionRange`; does not move focus. A value written through `value` reaches the\n * element a microtask later and drops the caret to the end, so after `value.set(...)` set the range from a `setTimeout`.\n */\n setSelectionRange(\n start: number,\n end: number,\n direction?: 'forward' | 'backward' | 'none',\n ): void {\n this.control()?.nativeElement.setSelectionRange(start, end, direction);\n }\n\n /** Selects the whole text, as `HTMLTextAreaElement.select()` does. */\n select(): void {\n this.control()?.nativeElement.select();\n }\n}\n","<div [class]=\"wrapperClasses()\">\n @if (label()) {\n <label\n class=\"label\"\n [attr.for]=\"uid\">\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\">\n {{ intl().field.optional }}\n </span>\n }\n </label>\n }\n\n <div\n class=\"control\"\n dsFieldClickFocus>\n @if (overLimitBy() > 0) {\n <div\n #overflowMirror\n class=\"overflow-mirror\"\n aria-hidden=\"true\">\n <span [textContent]=\"overflowParts().within\"></span>\n\n <mark [textContent]=\"overflowParts().over\"></mark>\n\n <span [textContent]=\"overflowParts().after\"></span>\n </div>\n }\n\n @if (placeholderLineShown()) {\n <div\n class=\"placeholder-line\"\n aria-hidden=\"true\"\n [class.wraps]=\"placeholderRows() > 1\"\n [style.--_placeholder-rows]=\"placeholderRows()\">\n {{ placeholder() }}\n </div>\n }\n\n <textarea\n #control\n [id]=\"uid\"\n [rows]=\"rows()\"\n [attr.name]=\"name()\"\n [attr.placeholder]=\"placeholder() || null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.maxlength]=\"nativeMaxLength()\"\n [attr.minlength]=\"minLength()\"\n [attr.pattern]=\"patternAttribute()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"isReadOnly()\"\n [required]=\"required()\"\n [style.resize]=\"effectiveResize()\"\n [style.min-height]=\"autosizeMinHeight()\"\n [style.max-height]=\"autosizeMaxHeight()\"\n [style.overflow-y]=\"autosize() && maxRows() ? 'auto' : null\"\n [(ngModel)]=\"value\"\n (blur)=\"markTouched()\"\n (scroll)=\"syncOverflowScroll()\">\n </textarea>\n\n <ds-field-status\n [pending]=\"pendingShown()\"\n [changed]=\"changedShown()\" />\n </div>\n\n @if (\n reserveMessageResolved() ||\n message().text ||\n changedShown() ||\n maxLength() !== null\n ) {\n <div class=\"field-footer\">\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n [changed]=\"changedShown()\" />\n\n @if (maxLength() !== null) {\n <span\n class=\"char-counter\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n [class.over-limit]=\"overLimitBy() > 0\"\n [id]=\"counterId()\">\n {{ currentLength() }}/{{ maxLength() }}\n @if (overLimitBy() > 0) {\n <span class=\"visually-hidden\">\n {{ intl().field.overLimit(overLimitBy()) }}\n </span>\n }\n </span>\n }\n </div>\n }\n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CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,cAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE1D1D;;AAEG;;;;"}
@@ -18,11 +18,11 @@ class ToggleButtonComponent {
18
18
  this.pressed.update((value) => !value);
19
19
  }
20
20
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ToggleButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
21
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ToggleButtonComponent, isStandalone: true, selector: "ds-toggle-button", inputs: { pressed: { classPropertyName: "pressed", publicName: "pressed", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pressed: "pressedChange" }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"button-toggle\"\n [attr.aria-pressed]=\"pressed()\"\n [disabled]=\"disabled()\"\n (click)=\"toggle()\">\n @if (icon(); as name) {\n <ds-icon\n [name]=\"name\"\n [size]=\"14\" />\n }\n\n <ng-content></ng-content>\n</button>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:inline-flex;--_toggle-button-bg-color: var(--ds-toggle-button-bg-color, var(--surface-default));--_toggle-button-border-color: var(--ds-toggle-button-border-color, var(--border-default));--_toggle-button-color: var(--ds-toggle-button-color, var(--text-secondary));--_toggle-button-selected-bg-color: var(--ds-toggle-button-selected-bg-color, var(--accent-subtitle));--_toggle-button-selected-border-color: var(--ds-toggle-button-selected-border-color, var(--accent));--_toggle-button-selected-color: var(--ds-toggle-button-selected-color, var(--accent-strong))}.button-toggle{display:inline-flex;align-items:center;gap:var(--space-2);height:var(--hit-min);padding:0 var(--space-3);border:var(--border-width-default) solid var(--_toggle-button-border-color);border-radius:var(--radius-md);background:var(--_toggle-button-bg-color);color:var(--_toggle-button-color);font:var(--font-weight-semibold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);cursor:pointer;transition:background var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard)}.button-toggle:hover{background:var(--surface-secondary);color:var(--text-primary)}.button-toggle[aria-pressed=true]{background:var(--_toggle-button-selected-bg-color);border-color:var(--_toggle-button-selected-border-color);color:var(--_toggle-button-selected-color)}.button-toggle:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.button-toggle:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.button-toggle:disabled{cursor:not-allowed;opacity:var(--opacity-disabled)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
21
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ToggleButtonComponent, isStandalone: true, selector: "ds-toggle-button", inputs: { pressed: { classPropertyName: "pressed", publicName: "pressed", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pressed: "pressedChange" }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"button-toggle\"\n [attr.aria-pressed]=\"pressed()\"\n [disabled]=\"disabled()\"\n (click)=\"toggle()\">\n @if (icon(); as name) {\n <ds-icon\n [name]=\"name\"\n [size]=\"14\" />\n }\n\n <ng-content></ng-content>\n</button>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:inline-flex;--_toggle-button-bg-color: var(--ds-toggle-button-bg-color, var(--surface-default));--_toggle-button-border-color: var(--ds-toggle-button-border-color, var(--border-field));--_toggle-button-color: var(--ds-toggle-button-color, var(--text-secondary));--_toggle-button-selected-bg-color: var(--ds-toggle-button-selected-bg-color, var(--accent-subtitle));--_toggle-button-selected-border-color: var(--ds-toggle-button-selected-border-color, var(--accent));--_toggle-button-selected-color: var(--ds-toggle-button-selected-color, var(--accent-strong))}.button-toggle{display:inline-flex;align-items:center;gap:var(--space-2);height:var(--hit-min);padding:0 var(--space-3);border:var(--border-width-default) solid var(--_toggle-button-border-color);border-radius:var(--radius-md);background:var(--_toggle-button-bg-color);color:var(--_toggle-button-color);font:var(--font-weight-semibold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);cursor:pointer;transition:background var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard)}.button-toggle:hover{background:var(--surface-secondary);border-color:var(--border-field-hover);color:var(--text-primary)}.button-toggle[aria-pressed=true]{background:var(--_toggle-button-selected-bg-color);border-color:var(--_toggle-button-selected-border-color);color:var(--_toggle-button-selected-color)}.button-toggle:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.button-toggle:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.button-toggle:disabled{cursor:not-allowed;opacity:var(--opacity-disabled)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
22
22
  }
23
23
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ToggleButtonComponent, decorators: [{
24
24
  type: Component,
25
- args: [{ selector: 'ds-toggle-button', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, template: "<button\n type=\"button\"\n class=\"button-toggle\"\n [attr.aria-pressed]=\"pressed()\"\n [disabled]=\"disabled()\"\n (click)=\"toggle()\">\n @if (icon(); as name) {\n <ds-icon\n [name]=\"name\"\n [size]=\"14\" />\n }\n\n <ng-content></ng-content>\n</button>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:inline-flex;--_toggle-button-bg-color: var(--ds-toggle-button-bg-color, var(--surface-default));--_toggle-button-border-color: var(--ds-toggle-button-border-color, var(--border-default));--_toggle-button-color: var(--ds-toggle-button-color, var(--text-secondary));--_toggle-button-selected-bg-color: var(--ds-toggle-button-selected-bg-color, var(--accent-subtitle));--_toggle-button-selected-border-color: var(--ds-toggle-button-selected-border-color, var(--accent));--_toggle-button-selected-color: var(--ds-toggle-button-selected-color, var(--accent-strong))}.button-toggle{display:inline-flex;align-items:center;gap:var(--space-2);height:var(--hit-min);padding:0 var(--space-3);border:var(--border-width-default) solid var(--_toggle-button-border-color);border-radius:var(--radius-md);background:var(--_toggle-button-bg-color);color:var(--_toggle-button-color);font:var(--font-weight-semibold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);cursor:pointer;transition:background var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard)}.button-toggle:hover{background:var(--surface-secondary);color:var(--text-primary)}.button-toggle[aria-pressed=true]{background:var(--_toggle-button-selected-bg-color);border-color:var(--_toggle-button-selected-border-color);color:var(--_toggle-button-selected-color)}.button-toggle:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.button-toggle:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.button-toggle:disabled{cursor:not-allowed;opacity:var(--opacity-disabled)}\n"] }]
25
+ args: [{ selector: 'ds-toggle-button', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, template: "<button\n type=\"button\"\n class=\"button-toggle\"\n [attr.aria-pressed]=\"pressed()\"\n [disabled]=\"disabled()\"\n (click)=\"toggle()\">\n @if (icon(); as name) {\n <ds-icon\n [name]=\"name\"\n [size]=\"14\" />\n }\n\n <ng-content></ng-content>\n</button>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:inline-flex;--_toggle-button-bg-color: var(--ds-toggle-button-bg-color, var(--surface-default));--_toggle-button-border-color: var(--ds-toggle-button-border-color, var(--border-field));--_toggle-button-color: var(--ds-toggle-button-color, var(--text-secondary));--_toggle-button-selected-bg-color: var(--ds-toggle-button-selected-bg-color, var(--accent-subtitle));--_toggle-button-selected-border-color: var(--ds-toggle-button-selected-border-color, var(--accent));--_toggle-button-selected-color: var(--ds-toggle-button-selected-color, var(--accent-strong))}.button-toggle{display:inline-flex;align-items:center;gap:var(--space-2);height:var(--hit-min);padding:0 var(--space-3);border:var(--border-width-default) solid var(--_toggle-button-border-color);border-radius:var(--radius-md);background:var(--_toggle-button-bg-color);color:var(--_toggle-button-color);font:var(--font-weight-semibold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);cursor:pointer;transition:background var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard)}.button-toggle:hover{background:var(--surface-secondary);border-color:var(--border-field-hover);color:var(--text-primary)}.button-toggle[aria-pressed=true]{background:var(--_toggle-button-selected-bg-color);border-color:var(--_toggle-button-selected-border-color);color:var(--_toggle-button-selected-color)}.button-toggle:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.button-toggle:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.button-toggle:disabled{cursor:not-allowed;opacity:var(--opacity-disabled)}\n"] }]
26
26
  }], propDecorators: { pressed: [{ type: i0.Input, args: [{ isSignal: true, alias: "pressed", required: false }] }, { type: i0.Output, args: ["pressedChange"] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
27
27
 
28
28
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-toggle-button.mjs","sources":["../../../src/lib/components/toggle-button/toggle-button.component.ts","../../../src/lib/components/toggle-button/toggle-button.component.html","../../../src/lib/components/toggle-button/ids-group-ltd-ids-design-system-components-toggle-button.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n input,\n model,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\n\n/** A standalone on/off toggle button with an optional leading icon and a projected label.\n * For a one-of-many choice use `ds-segmented`. */\n@Component({\n selector: 'ds-toggle-button',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './toggle-button.component.html',\n styleUrl: './toggle-button.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class ToggleButtonComponent {\n /** Pressed (on/off) state; two-way bound. */\n readonly pressed = model<boolean>(false);\n /** Optional leading icon name. */\n readonly icon = input<string>('');\n /** Disables the toggle. */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n protected toggle(): void {\n if (this.disabled()) {\n return;\n }\n this.pressed.update((value) => !value);\n }\n}\n","<button\n type=\"button\"\n class=\"button-toggle\"\n [attr.aria-pressed]=\"pressed()\"\n [disabled]=\"disabled()\"\n (click)=\"toggle()\">\n @if (icon(); as name) {\n <ds-icon\n [name]=\"name\"\n [size]=\"14\" />\n }\n\n <ng-content></ng-content>\n</button>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AASA;AACmD;MAStC,qBAAqB,CAAA;;AAEvB,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,8EAAC;;AAE/B,IAAA,IAAI,GAAG,KAAK,CAAS,EAAE,2EAAC;;IAExB,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IAEvD,MAAM,GAAA;AACd,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YACnB;QACF;AACA,QAAA,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,KAAK,CAAC,KAAK,CAAC;IACxC;wGAbW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,OAAA,EAAA,eAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECnBlC,2RAcA,EAAA,MAAA,EAAA,CAAA,i8EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDAY,aAAa,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAKZ,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBARjC,SAAS;+BACE,kBAAkB,EAAA,UAAA,EAChB,IAAI,EAAA,OAAA,EACP,CAAC,aAAa,CAAC,EAAA,aAAA,EAGT,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,2RAAA,EAAA,MAAA,EAAA,CAAA,i8EAAA,CAAA,EAAA;;;AEjB3C;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-toggle-button.mjs","sources":["../../../src/lib/components/toggle-button/toggle-button.component.ts","../../../src/lib/components/toggle-button/toggle-button.component.html","../../../src/lib/components/toggle-button/ids-group-ltd-ids-design-system-components-toggle-button.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n input,\n model,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\n\n/** A standalone on/off toggle button with an optional leading icon and a projected label.\n * For a one-of-many choice use `ds-segmented`. */\n@Component({\n selector: 'ds-toggle-button',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './toggle-button.component.html',\n styleUrl: './toggle-button.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class ToggleButtonComponent {\n /** Pressed (on/off) state; two-way bound. */\n readonly pressed = model<boolean>(false);\n /** Optional leading icon name. */\n readonly icon = input<string>('');\n /** Disables the toggle. */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n protected toggle(): void {\n if (this.disabled()) {\n return;\n }\n this.pressed.update((value) => !value);\n }\n}\n","<button\n type=\"button\"\n class=\"button-toggle\"\n [attr.aria-pressed]=\"pressed()\"\n [disabled]=\"disabled()\"\n (click)=\"toggle()\">\n @if (icon(); as name) {\n <ds-icon\n [name]=\"name\"\n [size]=\"14\" />\n }\n\n <ng-content></ng-content>\n</button>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AASA;AACmD;MAStC,qBAAqB,CAAA;;AAEvB,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,8EAAC;;AAE/B,IAAA,IAAI,GAAG,KAAK,CAAS,EAAE,2EAAC;;IAExB,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IAEvD,MAAM,GAAA;AACd,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YACnB;QACF;AACA,QAAA,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,KAAK,CAAC,KAAK,CAAC;IACxC;wGAbW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,OAAA,EAAA,eAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECnBlC,2RAcA,EAAA,MAAA,EAAA,CAAA,s+EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDAY,aAAa,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAKZ,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBARjC,SAAS;+BACE,kBAAkB,EAAA,UAAA,EAChB,IAAI,EAAA,OAAA,EACP,CAAC,aAAa,CAAC,EAAA,aAAA,EAGT,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,2RAAA,EAAA,MAAA,EAAA,CAAA,s+EAAA,CAAA,EAAA;;;AEjB3C;;AAEG;;;;"}
@@ -1,7 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, TemplateRef, Directive, ElementRef, input, model, output, contentChild, signal, computed, afterEveryRender, ViewEncapsulation, Component } from '@angular/core';
2
+ import { inject, TemplateRef, Directive, ElementRef, input, model, booleanAttribute, output, contentChild, signal, computed, afterEveryRender, afterNextRender, ViewEncapsulation, Component } from '@angular/core';
3
3
  import { NgTemplateOutlet } from '@angular/common';
4
4
  import { IconComponent } from '@ids-group-ltd/ids-design-system/icons';
5
+ import { DS_INTL, DS_INTL_DEFAULTS } from '@ids-group-ltd/ids-design-system/core';
5
6
 
6
7
  /**
7
8
  * Content drawn in place of a `ds-tree` row's label, for a label of more than one line or one
@@ -74,6 +75,7 @@ const PARKED_TABINDEX = 'data-ds-tree-tabindex';
74
75
  let nextId = 0;
75
76
  class TreeComponent {
76
77
  host = inject(ElementRef);
78
+ intl = inject(DS_INTL);
77
79
  /** Root-level nodes; nest via `children`. */
78
80
  nodes = input([], ...(ngDevMode ? [{ debugName: "nodes" }] : /* istanbul ignore next */ []));
79
81
  /** Ids of the expanded nodes. */
@@ -84,6 +86,14 @@ class TreeComponent {
84
86
  selectedId = model(null, ...(ngDevMode ? [{ debugName: "selectedId" }] : /* istanbul ignore next */ []));
85
87
  /** Ids of the selected nodes, in `'multiple'` selection. */
86
88
  selectedIds = model([], ...(ngDevMode ? [{ debugName: "selectedIds" }] : /* istanbul ignore next */ []));
89
+ /** What expands and collapses a parent. `'row'`: activating the row (click, Enter, Space) selects
90
+ * it and toggles it. `'caret'`: activating the row only selects it, and the chevron is a button of
91
+ * its own that toggles. `'doubleClick'`: a click selects, a double click toggles. In every mode
92
+ * ArrowRight expands and ArrowLeft collapses the focused row. */
93
+ toggleOn = input('row', ...(ngDevMode ? [{ debugName: "toggleOn" }] : /* istanbul ignore next */ []));
94
+ /** Rows slide open and shut and the chevron turns when a parent expands or collapses. Off under
95
+ * `prefers-reduced-motion: reduce`. */
96
+ animate = input(true, { ...(ngDevMode ? { debugName: "animate" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
87
97
  /** Fires with the node when a row is selected (click or Enter/Space), not when one is deselected. */
88
98
  nodeSelected = output();
89
99
  /** Fires with the node under the pointer or newly focused, and `null` when the pointer leaves the tree. */
@@ -93,7 +103,14 @@ class TreeComponent {
93
103
  idPrefix = `ds-tree-${++nextId}`;
94
104
  activeId = signal(null, ...(ngDevMode ? [{ debugName: "activeId" }] : /* istanbul ignore next */ []));
95
105
  hoveredId = null;
106
+ // The rows of the first render are not revealed by a toggle, so they appear without motion.
107
+ rendered = signal(false, ...(ngDevMode ? [{ debugName: "rendered" }] : /* istanbul ignore next */ []));
108
+ motion = computed(() => this.animate() && this.rendered(), ...(ngDevMode ? [{ debugName: "motion" }] : /* istanbul ignore next */ []));
96
109
  multiple = computed(() => this.selection() === 'multiple', ...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
110
+ labels = computed(() => ({
111
+ ...DS_INTL_DEFAULTS.tree,
112
+ ...this.intl().tree,
113
+ }), ...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
97
114
  visibleNodes = computed(() => {
98
115
  const out = [];
99
116
  const walk = (list, level) => {
@@ -114,6 +131,7 @@ class TreeComponent {
114
131
  // Content inside a trailing template can change without a signal of the tree changing,
115
132
  // so its tab stops are re-parked after every render.
116
133
  afterEveryRender({ write: () => this.parkTrailingTabStops() });
134
+ afterNextRender(() => this.rendered.set(true));
117
135
  }
118
136
  isExpanded(id) {
119
137
  return this.expandedIds().has(id);
@@ -127,11 +145,31 @@ class TreeComponent {
127
145
  return this.effectiveActiveId() === id;
128
146
  }
129
147
  onRowClick(entry, event) {
130
- if (this.fromTrailing(event)) {
148
+ // The second click of a double click belongs to the toggle, not to a second selection.
149
+ if (this.fromTrailing(event) ||
150
+ (this.toggleOn() === 'doubleClick' && event.detail > 1)) {
131
151
  return;
132
152
  }
133
153
  this.activate(entry, event.shiftKey || event.ctrlKey || event.metaKey);
134
154
  }
155
+ onRowDoubleClick(entry, event) {
156
+ if (this.toggleOn() !== 'doubleClick' ||
157
+ this.fromTrailing(event) ||
158
+ event.shiftKey ||
159
+ event.ctrlKey ||
160
+ event.metaKey) {
161
+ return;
162
+ }
163
+ this.toggle(entry.node);
164
+ }
165
+ onCaretClick(entry, event) {
166
+ event.stopPropagation();
167
+ if (entry.node.disabled) {
168
+ return;
169
+ }
170
+ this.focusNode(entry.node.id);
171
+ this.toggle(entry.node);
172
+ }
135
173
  onRowFocus(entry) {
136
174
  this.activeId.set(entry.node.id);
137
175
  this.hover(entry.node);
@@ -195,7 +233,7 @@ class TreeComponent {
195
233
  event.preventDefault();
196
234
  }
197
235
  // A modified activation in multiple selection only adds or removes the node; every other
198
- // activation selects the node alone and toggles a parent.
236
+ // activation selects the node alone, and toggles a parent when the row is the toggle.
199
237
  activate(entry, modified) {
200
238
  const node = entry.node;
201
239
  if (node.disabled) {
@@ -220,7 +258,7 @@ class TreeComponent {
220
258
  this.selectedId.set(node.id);
221
259
  }
222
260
  this.nodeSelected.emit(node);
223
- if (entry.hasChildren) {
261
+ if (entry.hasChildren && this.toggleOn() === 'row') {
224
262
  this.toggle(node);
225
263
  }
226
264
  }
@@ -256,7 +294,7 @@ class TreeComponent {
256
294
  focusNode(id) {
257
295
  this.activeId.set(id);
258
296
  this.host.nativeElement
259
- .querySelector(`[data-node-id="${CSS.escape(id)}"]`)
297
+ .querySelector(`.row-shell:not(.is-leaving) > [data-node-id="${CSS.escape(id)}"]`)
260
298
  ?.focus();
261
299
  }
262
300
  fromTrailing(event) {
@@ -289,17 +327,18 @@ class TreeComponent {
289
327
  }
290
328
  }
291
329
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
292
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: TreeComponent, isStandalone: true, selector: "ds-tree", inputs: { nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: true, isRequired: false, transformFunction: null }, expandedIds: { classPropertyName: "expandedIds", publicName: "expandedIds", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, selectedId: { classPropertyName: "selectedId", publicName: "selectedId", isSignal: true, isRequired: false, transformFunction: null }, selectedIds: { classPropertyName: "selectedIds", publicName: "selectedIds", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expandedIds: "expandedIdsChange", selectedId: "selectedIdChange", selectedIds: "selectedIdsChange", nodeSelected: "nodeSelected", nodeHover: "nodeHover" }, host: { attributes: { "role": "tree" }, listeners: { "keydown": "onKeydown($event)", "pointerleave": "hover(null)" }, properties: { "attr.aria-multiselectable": "multiple() ? 'true' : null" } }, queries: [{ propertyName: "label", first: true, predicate: TreeLabelDirective, descendants: true, isSignal: true }, { propertyName: "trailing", first: true, predicate: TreeTrailingDirective, descendants: true, isSignal: true }], ngImport: i0, template: "@for (entry of visibleNodes(); track entry.node.id; let index = $index) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -- Enter and Space reach the host keydown handler, which activates the focused row -->\n <div\n class=\"row\"\n role=\"treeitem\"\n [attr.data-node-id]=\"entry.node.id\"\n [attr.aria-level]=\"entry.level + 1\"\n [attr.aria-expanded]=\"entry.hasChildren ? entry.expanded : null\"\n [attr.aria-selected]=\"isSelected(entry.node.id)\"\n [attr.aria-disabled]=\"entry.node.disabled ? 'true' : null\"\n [attr.aria-labelledby]=\"idPrefix + '-' + index\"\n [attr.aria-describedby]=\"\n trailing() ? idPrefix + '-' + index + '-trailing' : null\n \"\n [attr.tabindex]=\"isActive(entry.node.id) ? 0 : -1\"\n [class.selected]=\"isSelected(entry.node.id)\"\n [style.--_level]=\"entry.level\"\n (click)=\"onRowClick(entry, $event)\"\n (focus)=\"onRowFocus(entry)\"\n (pointerenter)=\"hover(entry.node)\">\n @if (entry.hasChildren) {\n <ds-icon\n class=\"caret\"\n [name]=\"entry.expanded ? 'chevronDown' : 'chevronRight'\"\n [size]=\"16\" />\n } @else if (!entry.node.icon) {\n <span class=\"caret-spacer\"></span>\n }\n\n @if (entry.node.icon; as icon) {\n <ds-icon\n class=\"node-icon\"\n [name]=\"icon\"\n [size]=\"16\" />\n }\n\n @if (label(); as label) {\n <span\n class=\"custom-label\"\n [id]=\"idPrefix + '-' + index\">\n <ng-container\n *ngTemplateOutlet=\"\n label.template;\n context: {\n $implicit: entry.node,\n node: entry.node,\n level: entry.level,\n selected: isSelected(entry.node.id),\n disabled: !!entry.node.disabled,\n }\n \" />\n </span>\n } @else {\n <span\n class=\"label\"\n [id]=\"idPrefix + '-' + index\">\n {{ entry.node.label }}\n </span>\n }\n\n @if (trailing(); as trailing) {\n <span\n class=\"trailing\"\n [id]=\"idPrefix + '-' + index + '-trailing'\">\n <ng-container\n *ngTemplateOutlet=\"\n trailing.template;\n context: { $implicit: entry.node, node: entry.node }\n \" />\n </span>\n }\n </div>\n}\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_tree-indent: var(--ds-tree-indent, var(--tree-indent));--_tree-row-padding-y: var(--ds-tree-row-padding-y, var(--tree-row-pad-y));--_tree-row-padding-x: var(--ds-tree-row-padding-x, var(--tree-row-pad-x));--_tree-row-hover-bg-color: var(--ds-tree-row-hover-bg-color, var(--surface-secondary));--_tree-row-selected-bg-color: var(--ds-tree-row-selected-bg-color, var(--accent-surface-tint));--_tree-row-selected-text-color: var(--ds-tree-row-selected-text-color, var(--accent-strong));--_tree-row-selected-icon-color: var(--ds-tree-row-selected-icon-color, var(--_tree-row-selected-text-color));--_tree-row-text-color: var(--ds-tree-row-text-color, var(--text-primary));--_tree-caret-icon-color: var(--ds-tree-caret-icon-color, var(--text-tertiary));display:flex;flex-direction:column}.row{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:var(--_tree-row-padding-y) var(--_tree-row-padding-x) var(--_tree-row-padding-y) calc(var(--_tree-row-padding-x) + var(--_level, 0) * var(--_tree-indent));border:0;background:transparent;border-radius:var(--focus-ring-radius);color:var(--_tree-row-text-color);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);text-align:left;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--duration-fast) var(--ease-standard)}.row:hover{background-color:var(--_tree-row-hover-bg-color)}.row:active:not([aria-disabled=true],:has(.trailing:active)){background-color:var(--surface-muted)}.row:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:calc(-1 * var(--focus-ring-width));animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.row[aria-disabled=true]{color:var(--text-disabled);cursor:not-allowed}.row.selected{background-color:var(--_tree-row-selected-bg-color);color:var(--_tree-row-selected-text-color);font-weight:var(--font-weight-semibold)}.caret{flex:none;color:var(--_tree-caret-icon-color)}.caret-spacer{flex:none;width:var(--space-4)}.node-icon{flex:none;color:var(--icon-default, var(--text-secondary))}.row.selected .node-icon{color:var(--_tree-row-selected-icon-color)}.label{min-width:0;overflow:clip visible;text-overflow:ellipsis;white-space:nowrap}.custom-label{flex:1;min-width:0}.trailing{display:flex;flex:none;align-items:center;gap:var(--space-1);margin-block:calc(-1 * var(--_tree-row-padding-y));margin-inline-start:auto;font-weight:var(--font-weight-regular);cursor:default}.trailing:focus-within{position:relative;z-index:1}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
330
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: TreeComponent, isStandalone: true, selector: "ds-tree", inputs: { nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: true, isRequired: false, transformFunction: null }, expandedIds: { classPropertyName: "expandedIds", publicName: "expandedIds", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, selectedId: { classPropertyName: "selectedId", publicName: "selectedId", isSignal: true, isRequired: false, transformFunction: null }, selectedIds: { classPropertyName: "selectedIds", publicName: "selectedIds", isSignal: true, isRequired: false, transformFunction: null }, toggleOn: { classPropertyName: "toggleOn", publicName: "toggleOn", isSignal: true, isRequired: false, transformFunction: null }, animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expandedIds: "expandedIdsChange", selectedId: "selectedIdChange", selectedIds: "selectedIdsChange", nodeSelected: "nodeSelected", nodeHover: "nodeHover" }, host: { attributes: { "role": "tree" }, listeners: { "keydown": "onKeydown($event)", "pointerleave": "hover(null)" }, properties: { "attr.aria-multiselectable": "multiple() ? 'true' : null", "class.is-animated": "animate()" } }, queries: [{ propertyName: "label", first: true, predicate: TreeLabelDirective, descendants: true, isSignal: true }, { propertyName: "trailing", first: true, predicate: TreeTrailingDirective, descendants: true, isSignal: true }], ngImport: i0, template: "@for (entry of visibleNodes(); track entry.node.id; let index = $index) {\n <div\n class=\"row-shell\"\n role=\"none\"\n [animate.enter]=\"motion() ? 'is-entering' : ''\"\n [animate.leave]=\"motion() ? 'is-leaving' : ''\">\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -- Enter and Space reach the host keydown handler, which activates the focused row -->\n <div\n class=\"row\"\n role=\"treeitem\"\n [attr.data-node-id]=\"entry.node.id\"\n [attr.aria-level]=\"entry.level + 1\"\n [attr.aria-expanded]=\"entry.hasChildren ? entry.expanded : null\"\n [attr.aria-selected]=\"isSelected(entry.node.id)\"\n [attr.aria-disabled]=\"entry.node.disabled ? 'true' : null\"\n [attr.aria-labelledby]=\"idPrefix + '-' + index\"\n [attr.aria-describedby]=\"\n trailing() ? idPrefix + '-' + index + '-trailing' : null\n \"\n [attr.tabindex]=\"isActive(entry.node.id) ? 0 : -1\"\n [class.selected]=\"isSelected(entry.node.id)\"\n [style.--_level]=\"entry.level\"\n (click)=\"onRowClick(entry, $event)\"\n (dblclick)=\"onRowDoubleClick(entry, $event)\"\n (focus)=\"onRowFocus(entry)\"\n (pointerenter)=\"hover(entry.node)\">\n @if (entry.hasChildren && toggleOn() === 'caret') {\n <!-- The row keeps the focus and the tree its one tab stop: ArrowRight and ArrowLeft on the row are the keyboard toggle. -->\n <button\n type=\"button\"\n class=\"caret-button\"\n tabindex=\"-1\"\n [attr.aria-label]=\"\n entry.expanded\n ? labels().collapse(entry.node.label)\n : labels().expand(entry.node.label)\n \"\n [disabled]=\"entry.node.disabled\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onCaretClick(entry, $event)\">\n <ds-icon\n class=\"caret\"\n name=\"chevronRight\"\n [class.expanded]=\"entry.expanded\"\n [size]=\"16\" />\n </button>\n } @else if (entry.hasChildren) {\n <ds-icon\n class=\"caret\"\n name=\"chevronRight\"\n [class.expanded]=\"entry.expanded\"\n [size]=\"16\" />\n } @else if (!entry.node.icon) {\n <span class=\"caret-spacer\"></span>\n }\n\n @if (entry.node.icon; as icon) {\n <ds-icon\n class=\"node-icon\"\n [name]=\"icon\"\n [size]=\"16\" />\n }\n\n @if (label(); as label) {\n <span\n class=\"custom-label\"\n [id]=\"idPrefix + '-' + index\">\n <ng-container\n *ngTemplateOutlet=\"\n label.template;\n context: {\n $implicit: entry.node,\n node: entry.node,\n level: entry.level,\n selected: isSelected(entry.node.id),\n disabled: !!entry.node.disabled,\n }\n \" />\n </span>\n } @else {\n <span\n class=\"label\"\n [id]=\"idPrefix + '-' + index\">\n {{ entry.node.label }}\n </span>\n }\n\n @if (trailing(); as trailing) {\n <span\n class=\"trailing\"\n [id]=\"idPrefix + '-' + index + '-trailing'\">\n <ng-container\n *ngTemplateOutlet=\"\n trailing.template;\n context: { $implicit: entry.node, node: entry.node }\n \" />\n </span>\n }\n </div>\n </div>\n}\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_tree-indent: var(--ds-tree-indent, var(--tree-indent));--_tree-row-padding-y: var(--ds-tree-row-padding-y, var(--tree-row-pad-y));--_tree-row-padding-x: var(--ds-tree-row-padding-x, var(--tree-row-pad-x));--_tree-row-hover-bg-color: var(--ds-tree-row-hover-bg-color, var(--surface-secondary));--_tree-row-selected-bg-color: var(--ds-tree-row-selected-bg-color, var(--accent-surface-tint));--_tree-row-selected-text-color: var(--ds-tree-row-selected-text-color, var(--accent-strong));--_tree-row-selected-icon-color: var(--ds-tree-row-selected-icon-color, var(--_tree-row-selected-text-color));--_tree-row-text-color: var(--ds-tree-row-text-color, var(--text-primary));--_tree-caret-icon-color: var(--ds-tree-caret-icon-color, var(--text-tertiary));display:flex;flex-direction:column}.row-shell{display:grid;grid-template-rows:1fr}.row-shell.is-entering{animation:ds-tree-row-expand var(--duration-base) var(--ease-standard)}.row-shell.is-entering>.row{overflow:hidden;min-height:0;animation:ds-tree-row-padding-in var(--duration-base) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.row-shell.is-entering,.row-shell.is-entering>.row{animation:none}}.row-shell.is-leaving{contain:inline-size;pointer-events:none;animation:ds-tree-row-collapse max(var(--duration-base),1ms) var(--ease-standard) both}.row-shell.is-leaving>.row{overflow:hidden;min-height:0;animation:ds-tree-row-padding-out max(var(--duration-base),1ms) var(--ease-standard) both}@keyframes ds-tree-row-expand{0%{grid-template-rows:0fr;opacity:0}}@keyframes ds-tree-row-collapse{to{grid-template-rows:0fr;opacity:0}}@keyframes ds-tree-row-padding-in{0%{padding-block:0}}@keyframes ds-tree-row-padding-out{to{padding-block:0}}.row{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:var(--_tree-row-padding-y) var(--_tree-row-padding-x) var(--_tree-row-padding-y) calc(var(--_tree-row-padding-x) + var(--_level, 0) * var(--_tree-indent));border:0;background:transparent;border-radius:var(--focus-ring-radius);color:var(--_tree-row-text-color);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);text-align:left;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--duration-fast) var(--ease-standard)}.row:hover{background-color:var(--_tree-row-hover-bg-color)}.row:active:not([aria-disabled=true],:has(.trailing:active)){background-color:var(--surface-muted)}.row:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:calc(-1 * var(--focus-ring-width));animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.row[aria-disabled=true]{color:var(--text-disabled);cursor:not-allowed}.row.selected{background-color:var(--_tree-row-selected-bg-color);color:var(--_tree-row-selected-text-color);font-weight:var(--font-weight-semibold)}.caret{flex:none;color:var(--_tree-caret-icon-color)}.caret.expanded{transform:rotate(90deg)}:host(.is-animated) .caret{transition:transform var(--duration-base) var(--ease-standard)}.caret-button{display:grid;flex:none;place-items:center;padding:0;border:0;border-radius:var(--radius-sm);background:transparent;color:inherit;cursor:pointer}.caret-button:disabled{cursor:not-allowed}.caret-button{position:relative}.caret-button:before{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--hit-xs));height:max(100%,var(--hit-xs));translate:-50% -50%;border-radius:inherit}.caret-button:focus-visible{outline-style:none}.caret-button:focus-visible:before{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:calc(var(--focus-ring-offset) - 2 * var(--focus-ring-width));animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.caret-spacer{flex:none;width:var(--space-4)}.node-icon{flex:none;color:var(--icon-default, var(--text-secondary))}.row.selected .node-icon{color:var(--_tree-row-selected-icon-color)}.label{min-width:0;overflow:clip visible;text-overflow:ellipsis;white-space:nowrap}.custom-label{flex:1;min-width:0}.trailing{display:flex;flex:none;align-items:center;gap:var(--space-1);margin-block:calc(-1 * var(--_tree-row-padding-y));margin-inline-start:auto;font-weight:var(--font-weight-regular);cursor:default}.trailing:focus-within{position:relative;z-index:1}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
293
331
  }
294
332
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TreeComponent, decorators: [{
295
333
  type: Component,
296
334
  args: [{ selector: 'ds-tree', standalone: true, imports: [IconComponent, NgTemplateOutlet], encapsulation: ViewEncapsulation.Emulated, host: {
297
335
  role: 'tree',
298
336
  '[attr.aria-multiselectable]': "multiple() ? 'true' : null",
337
+ '[class.is-animated]': 'animate()',
299
338
  '(keydown)': 'onKeydown($event)',
300
339
  '(pointerleave)': 'hover(null)',
301
- }, template: "@for (entry of visibleNodes(); track entry.node.id; let index = $index) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -- Enter and Space reach the host keydown handler, which activates the focused row -->\n <div\n class=\"row\"\n role=\"treeitem\"\n [attr.data-node-id]=\"entry.node.id\"\n [attr.aria-level]=\"entry.level + 1\"\n [attr.aria-expanded]=\"entry.hasChildren ? entry.expanded : null\"\n [attr.aria-selected]=\"isSelected(entry.node.id)\"\n [attr.aria-disabled]=\"entry.node.disabled ? 'true' : null\"\n [attr.aria-labelledby]=\"idPrefix + '-' + index\"\n [attr.aria-describedby]=\"\n trailing() ? idPrefix + '-' + index + '-trailing' : null\n \"\n [attr.tabindex]=\"isActive(entry.node.id) ? 0 : -1\"\n [class.selected]=\"isSelected(entry.node.id)\"\n [style.--_level]=\"entry.level\"\n (click)=\"onRowClick(entry, $event)\"\n (focus)=\"onRowFocus(entry)\"\n (pointerenter)=\"hover(entry.node)\">\n @if (entry.hasChildren) {\n <ds-icon\n class=\"caret\"\n [name]=\"entry.expanded ? 'chevronDown' : 'chevronRight'\"\n [size]=\"16\" />\n } @else if (!entry.node.icon) {\n <span class=\"caret-spacer\"></span>\n }\n\n @if (entry.node.icon; as icon) {\n <ds-icon\n class=\"node-icon\"\n [name]=\"icon\"\n [size]=\"16\" />\n }\n\n @if (label(); as label) {\n <span\n class=\"custom-label\"\n [id]=\"idPrefix + '-' + index\">\n <ng-container\n *ngTemplateOutlet=\"\n label.template;\n context: {\n $implicit: entry.node,\n node: entry.node,\n level: entry.level,\n selected: isSelected(entry.node.id),\n disabled: !!entry.node.disabled,\n }\n \" />\n </span>\n } @else {\n <span\n class=\"label\"\n [id]=\"idPrefix + '-' + index\">\n {{ entry.node.label }}\n </span>\n }\n\n @if (trailing(); as trailing) {\n <span\n class=\"trailing\"\n [id]=\"idPrefix + '-' + index + '-trailing'\">\n <ng-container\n *ngTemplateOutlet=\"\n trailing.template;\n context: { $implicit: entry.node, node: entry.node }\n \" />\n </span>\n }\n </div>\n}\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_tree-indent: var(--ds-tree-indent, var(--tree-indent));--_tree-row-padding-y: var(--ds-tree-row-padding-y, var(--tree-row-pad-y));--_tree-row-padding-x: var(--ds-tree-row-padding-x, var(--tree-row-pad-x));--_tree-row-hover-bg-color: var(--ds-tree-row-hover-bg-color, var(--surface-secondary));--_tree-row-selected-bg-color: var(--ds-tree-row-selected-bg-color, var(--accent-surface-tint));--_tree-row-selected-text-color: var(--ds-tree-row-selected-text-color, var(--accent-strong));--_tree-row-selected-icon-color: var(--ds-tree-row-selected-icon-color, var(--_tree-row-selected-text-color));--_tree-row-text-color: var(--ds-tree-row-text-color, var(--text-primary));--_tree-caret-icon-color: var(--ds-tree-caret-icon-color, var(--text-tertiary));display:flex;flex-direction:column}.row{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:var(--_tree-row-padding-y) var(--_tree-row-padding-x) var(--_tree-row-padding-y) calc(var(--_tree-row-padding-x) + var(--_level, 0) * var(--_tree-indent));border:0;background:transparent;border-radius:var(--focus-ring-radius);color:var(--_tree-row-text-color);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);text-align:left;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--duration-fast) var(--ease-standard)}.row:hover{background-color:var(--_tree-row-hover-bg-color)}.row:active:not([aria-disabled=true],:has(.trailing:active)){background-color:var(--surface-muted)}.row:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:calc(-1 * var(--focus-ring-width));animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.row[aria-disabled=true]{color:var(--text-disabled);cursor:not-allowed}.row.selected{background-color:var(--_tree-row-selected-bg-color);color:var(--_tree-row-selected-text-color);font-weight:var(--font-weight-semibold)}.caret{flex:none;color:var(--_tree-caret-icon-color)}.caret-spacer{flex:none;width:var(--space-4)}.node-icon{flex:none;color:var(--icon-default, var(--text-secondary))}.row.selected .node-icon{color:var(--_tree-row-selected-icon-color)}.label{min-width:0;overflow:clip visible;text-overflow:ellipsis;white-space:nowrap}.custom-label{flex:1;min-width:0}.trailing{display:flex;flex:none;align-items:center;gap:var(--space-1);margin-block:calc(-1 * var(--_tree-row-padding-y));margin-inline-start:auto;font-weight:var(--font-weight-regular);cursor:default}.trailing:focus-within{position:relative;z-index:1}\n"] }]
302
- }], ctorParameters: () => [], propDecorators: { nodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodes", required: false }] }], expandedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedIds", required: false }] }, { type: i0.Output, args: ["expandedIdsChange"] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }], selectedId: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedId", required: false }] }, { type: i0.Output, args: ["selectedIdChange"] }], selectedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedIds", required: false }] }, { type: i0.Output, args: ["selectedIdsChange"] }], nodeSelected: [{ type: i0.Output, args: ["nodeSelected"] }], nodeHover: [{ type: i0.Output, args: ["nodeHover"] }], label: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TreeLabelDirective), { isSignal: true }] }], trailing: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TreeTrailingDirective), { isSignal: true }] }] } });
340
+ }, template: "@for (entry of visibleNodes(); track entry.node.id; let index = $index) {\n <div\n class=\"row-shell\"\n role=\"none\"\n [animate.enter]=\"motion() ? 'is-entering' : ''\"\n [animate.leave]=\"motion() ? 'is-leaving' : ''\">\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -- Enter and Space reach the host keydown handler, which activates the focused row -->\n <div\n class=\"row\"\n role=\"treeitem\"\n [attr.data-node-id]=\"entry.node.id\"\n [attr.aria-level]=\"entry.level + 1\"\n [attr.aria-expanded]=\"entry.hasChildren ? entry.expanded : null\"\n [attr.aria-selected]=\"isSelected(entry.node.id)\"\n [attr.aria-disabled]=\"entry.node.disabled ? 'true' : null\"\n [attr.aria-labelledby]=\"idPrefix + '-' + index\"\n [attr.aria-describedby]=\"\n trailing() ? idPrefix + '-' + index + '-trailing' : null\n \"\n [attr.tabindex]=\"isActive(entry.node.id) ? 0 : -1\"\n [class.selected]=\"isSelected(entry.node.id)\"\n [style.--_level]=\"entry.level\"\n (click)=\"onRowClick(entry, $event)\"\n (dblclick)=\"onRowDoubleClick(entry, $event)\"\n (focus)=\"onRowFocus(entry)\"\n (pointerenter)=\"hover(entry.node)\">\n @if (entry.hasChildren && toggleOn() === 'caret') {\n <!-- The row keeps the focus and the tree its one tab stop: ArrowRight and ArrowLeft on the row are the keyboard toggle. -->\n <button\n type=\"button\"\n class=\"caret-button\"\n tabindex=\"-1\"\n [attr.aria-label]=\"\n entry.expanded\n ? labels().collapse(entry.node.label)\n : labels().expand(entry.node.label)\n \"\n [disabled]=\"entry.node.disabled\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onCaretClick(entry, $event)\">\n <ds-icon\n class=\"caret\"\n name=\"chevronRight\"\n [class.expanded]=\"entry.expanded\"\n [size]=\"16\" />\n </button>\n } @else if (entry.hasChildren) {\n <ds-icon\n class=\"caret\"\n name=\"chevronRight\"\n [class.expanded]=\"entry.expanded\"\n [size]=\"16\" />\n } @else if (!entry.node.icon) {\n <span class=\"caret-spacer\"></span>\n }\n\n @if (entry.node.icon; as icon) {\n <ds-icon\n class=\"node-icon\"\n [name]=\"icon\"\n [size]=\"16\" />\n }\n\n @if (label(); as label) {\n <span\n class=\"custom-label\"\n [id]=\"idPrefix + '-' + index\">\n <ng-container\n *ngTemplateOutlet=\"\n label.template;\n context: {\n $implicit: entry.node,\n node: entry.node,\n level: entry.level,\n selected: isSelected(entry.node.id),\n disabled: !!entry.node.disabled,\n }\n \" />\n </span>\n } @else {\n <span\n class=\"label\"\n [id]=\"idPrefix + '-' + index\">\n {{ entry.node.label }}\n </span>\n }\n\n @if (trailing(); as trailing) {\n <span\n class=\"trailing\"\n [id]=\"idPrefix + '-' + index + '-trailing'\">\n <ng-container\n *ngTemplateOutlet=\"\n trailing.template;\n context: { $implicit: entry.node, node: entry.node }\n \" />\n </span>\n }\n </div>\n </div>\n}\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_tree-indent: var(--ds-tree-indent, var(--tree-indent));--_tree-row-padding-y: var(--ds-tree-row-padding-y, var(--tree-row-pad-y));--_tree-row-padding-x: var(--ds-tree-row-padding-x, var(--tree-row-pad-x));--_tree-row-hover-bg-color: var(--ds-tree-row-hover-bg-color, var(--surface-secondary));--_tree-row-selected-bg-color: var(--ds-tree-row-selected-bg-color, var(--accent-surface-tint));--_tree-row-selected-text-color: var(--ds-tree-row-selected-text-color, var(--accent-strong));--_tree-row-selected-icon-color: var(--ds-tree-row-selected-icon-color, var(--_tree-row-selected-text-color));--_tree-row-text-color: var(--ds-tree-row-text-color, var(--text-primary));--_tree-caret-icon-color: var(--ds-tree-caret-icon-color, var(--text-tertiary));display:flex;flex-direction:column}.row-shell{display:grid;grid-template-rows:1fr}.row-shell.is-entering{animation:ds-tree-row-expand var(--duration-base) var(--ease-standard)}.row-shell.is-entering>.row{overflow:hidden;min-height:0;animation:ds-tree-row-padding-in var(--duration-base) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.row-shell.is-entering,.row-shell.is-entering>.row{animation:none}}.row-shell.is-leaving{contain:inline-size;pointer-events:none;animation:ds-tree-row-collapse max(var(--duration-base),1ms) var(--ease-standard) both}.row-shell.is-leaving>.row{overflow:hidden;min-height:0;animation:ds-tree-row-padding-out max(var(--duration-base),1ms) var(--ease-standard) both}@keyframes ds-tree-row-expand{0%{grid-template-rows:0fr;opacity:0}}@keyframes ds-tree-row-collapse{to{grid-template-rows:0fr;opacity:0}}@keyframes ds-tree-row-padding-in{0%{padding-block:0}}@keyframes ds-tree-row-padding-out{to{padding-block:0}}.row{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:var(--_tree-row-padding-y) var(--_tree-row-padding-x) var(--_tree-row-padding-y) calc(var(--_tree-row-padding-x) + var(--_level, 0) * var(--_tree-indent));border:0;background:transparent;border-radius:var(--focus-ring-radius);color:var(--_tree-row-text-color);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);text-align:left;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--duration-fast) var(--ease-standard)}.row:hover{background-color:var(--_tree-row-hover-bg-color)}.row:active:not([aria-disabled=true],:has(.trailing:active)){background-color:var(--surface-muted)}.row:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:calc(-1 * var(--focus-ring-width));animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.row[aria-disabled=true]{color:var(--text-disabled);cursor:not-allowed}.row.selected{background-color:var(--_tree-row-selected-bg-color);color:var(--_tree-row-selected-text-color);font-weight:var(--font-weight-semibold)}.caret{flex:none;color:var(--_tree-caret-icon-color)}.caret.expanded{transform:rotate(90deg)}:host(.is-animated) .caret{transition:transform var(--duration-base) var(--ease-standard)}.caret-button{display:grid;flex:none;place-items:center;padding:0;border:0;border-radius:var(--radius-sm);background:transparent;color:inherit;cursor:pointer}.caret-button:disabled{cursor:not-allowed}.caret-button{position:relative}.caret-button:before{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--hit-xs));height:max(100%,var(--hit-xs));translate:-50% -50%;border-radius:inherit}.caret-button:focus-visible{outline-style:none}.caret-button:focus-visible:before{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:calc(var(--focus-ring-offset) - 2 * var(--focus-ring-width));animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.caret-spacer{flex:none;width:var(--space-4)}.node-icon{flex:none;color:var(--icon-default, var(--text-secondary))}.row.selected .node-icon{color:var(--_tree-row-selected-icon-color)}.label{min-width:0;overflow:clip visible;text-overflow:ellipsis;white-space:nowrap}.custom-label{flex:1;min-width:0}.trailing{display:flex;flex:none;align-items:center;gap:var(--space-1);margin-block:calc(-1 * var(--_tree-row-padding-y));margin-inline-start:auto;font-weight:var(--font-weight-regular);cursor:default}.trailing:focus-within{position:relative;z-index:1}\n"] }]
341
+ }], ctorParameters: () => [], propDecorators: { nodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodes", required: false }] }], expandedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedIds", required: false }] }, { type: i0.Output, args: ["expandedIdsChange"] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }], selectedId: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedId", required: false }] }, { type: i0.Output, args: ["selectedIdChange"] }], selectedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedIds", required: false }] }, { type: i0.Output, args: ["selectedIdsChange"] }], toggleOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleOn", required: false }] }], animate: [{ type: i0.Input, args: [{ isSignal: true, alias: "animate", required: false }] }], nodeSelected: [{ type: i0.Output, args: ["nodeSelected"] }], nodeHover: [{ type: i0.Output, args: ["nodeHover"] }], label: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TreeLabelDirective), { isSignal: true }] }], trailing: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TreeTrailingDirective), { isSignal: true }] }] } });
303
342
 
304
343
  /**
305
344
  * Generated bundle index. Do not edit.