@ids-group-ltd/ids-design-system 0.14.2 → 0.14.3

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 (57) hide show
  1. package/CHANGELOG.md +93 -0
  2. package/components.md +15 -15
  3. package/docs/agent/forms/ds-color-picker.md +1 -1
  4. package/docs/agent/forms/ds-date-picker.md +1 -1
  5. package/docs/agent/forms/ds-select.md +1 -1
  6. package/docs/agent/forms/ds-textarea.md +1 -1
  7. package/docs/agent/forms/ds-time-picker.md +1 -1
  8. package/docs/agent/forms/the-picker-family-ds-select-ds-multi-select-ds-autocomplete.md +1 -1
  9. package/docs/agent/foundations/tokens.md +1 -1
  10. package/docs/agent/navigation/ds-tabs.md +1 -1
  11. package/docs/agent/overlays/ds-bottom-sheet.md +1 -1
  12. package/docs/agent/overlays/ds-drawer.md +1 -1
  13. package/docs/agent/overlays/ds-modal.md +1 -1
  14. package/docs/agent/overlays/ds-popover.md +1 -1
  15. package/docs/agent/overlays/ds-tooltip.md +3 -3
  16. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +2 -2
  17. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
  18. package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs +16 -4
  19. package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -1
  20. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +25 -10
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +28 -11
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
  24. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +13 -4
  25. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
  26. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +3 -3
  27. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
  28. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +3 -4
  29. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +1 -1
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -1
  32. package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +1 -1
  33. package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -1
  34. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
  35. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  36. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +2 -2
  37. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -1
  38. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +31 -9
  39. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
  40. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +16 -5
  41. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
  42. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +74 -18
  43. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
  44. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +2 -2
  45. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  46. package/migrations/0.14.3.json +71 -0
  47. package/package.json +1 -1
  48. package/schematics/check-overrides/surface.json +6 -1
  49. package/themes/_semantic.scss +1 -0
  50. package/themes/dark/_theme.scss +1 -0
  51. package/types/ids-group-ltd-ids-design-system-components-bottom-sheet.d.ts +4 -1
  52. package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +4 -2
  53. package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +4 -2
  54. package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +4 -1
  55. package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +11 -3
  56. package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +3 -2
  57. package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +10 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-autocomplete.mjs","sources":["../../../src/lib/components/autocomplete/autocomplete.component.ts","../../../src/lib/components/autocomplete/autocomplete.component.html","../../../src/lib/components/autocomplete/ids-group-ltd-ids-design-system-components-autocomplete.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ElementRef,\n type OnDestroy,\n TemplateRef,\n ViewContainerRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n forwardRef,\n inject,\n input,\n model,\n numberAttribute,\n output,\n signal,\n contentChild,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n clearOnDetach,\n closeOnOutsidePointer,\n closeOnScroll,\n disposeWithLeave,\n type DsOverlayCloseCause,\n forwardOverlayTokens,\n dropdownOverlay,\n panelClassesOf,\n prepareOverlayEnter,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { chipFit } from '@ids-group-ltd/ids-design-system/components';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { SpinnerComponent } from '@ids-group-ltd/ids-design-system/components/spinner';\nimport { TagComponent } from '@ids-group-ltd/ids-design-system/components/tag';\nimport { DsControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport { TooltipDirective } from '@ids-group-ltd/ids-design-system/components/tooltip';\nimport {\n resolveFieldMessage,\n trimmedText,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type {\n AutocompleteItem,\n AutocompleteOption,\n AutocompleteOptionGroup,\n AutocompleteValueOverflow,\n AutocompleteWidth,\n} from './autocomplete.types';\nimport {\n flattenDsOptions,\n isDsOptionGroup,\n} from '@ids-group-ltd/ids-design-system/core';\nimport {\n firstEnabledIndex as firstEnabledOf,\n lastEnabledIndex as lastEnabledOf,\n nextEnabledIndex,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { scrollActiveOptionIntoView } from '@ids-group-ltd/ids-design-system/components';\nimport { announceOptionCount } from '@ids-group-ltd/ids-design-system/components';\nimport { DsOptionTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsChipTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsPickerTriggerDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsEmptyTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsPanelHeaderTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsPanelFooterTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsGroupLabelTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsCreateTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport {\n describedByIds,\n groupInvalid,\n groupMessageId,\n inFieldGroup,\n} from '@ids-group-ltd/ids-design-system/components/field-group';\nimport {\n DS_INTL,\n resolveWithConfig,\n} from '@ids-group-ltd/ids-design-system/core';\n\nlet nextId = 0;\n\n@Component({\n selector: 'ds-autocomplete',\n standalone: true,\n imports: [\n IconComponent,\n SpinnerComponent,\n TagComponent,\n FieldMessageComponent,\n NgTemplateOutlet,\n TooltipDirective,\n ],\n templateUrl: './autocomplete.component.html',\n styleUrl: './autocomplete.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[attr.data-field-state]': 'controlState()',\n '[class.in-group]': 'inGroup',\n '[class.content-width]': \"width() === 'content'\",\n '[class.value-wraps]': \"valueOverflow() === 'wrap'\",\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AutocompleteComponent),\n multi: true,\n },\n ],\n})\nexport class AutocompleteComponent<T = unknown>\n extends DsControlValueAccessor<T | readonly T[] | null>\n implements OnDestroy\n{\n /** Segment of a ds-field-group: the group owns the border, radius and focus\n * ring, so .in-group strips this control back to its bare contents. */\n protected readonly inGroup = inFieldGroup();\n\n private readonly overlay = inject(Overlay);\n private readonly vcr = inject(ViewContainerRef);\n private readonly host = inject(ElementRef<HTMLElement>);\n protected readonly intl = inject(DS_INTL);\n /** Public panel tokens forwarded onto the portaled overlay pane on open, so a consumer's\n * `ds-autocomplete { --ds-autocomplete-panel-bg-color | -radius | -maxh: … }` reaches it.\n * Not the whole set: `prepareOverlayEnter` also forwards `DROPDOWN_PANEL_TOKENS`\n * (overlay-motion.ts) onto every pane, the `--ds-option-*` family among them. */\n private readonly panelTokens = [\n '--ds-dropdown-panel-bg-color',\n '--ds-dropdown-panel-min-width',\n '--ds-dropdown-panel-max-width',\n '--ds-option-selected-bg-color',\n '--ds-option-selected-label-color',\n '--ds-option-selected-bg-color-hover',\n '--ds-option-check-color',\n ];\n\n /** Options, groups, or both mixed — rendered in the order given. */\n readonly options = input<readonly AutocompleteItem<T>[]>([]);\n /** Selected value, or an array of values when `multiple`. */\n readonly value = model<T | readonly T[] | null>(null);\n /** Allows selecting more than one option, shown as removable tags. */\n readonly multiple = input(false, { transform: booleanAttribute });\n /** Draws the trailing chevron. Turn it off for a search field, where an arrow\n * invites a click that would list everything instead of searching. */\n readonly showChevron = input(true, { transform: booleanAttribute });\n /** How the chips collapse when they outgrow one line. `\"fit\"` (the default)\n * measures and shows as many as the trigger is wide, the rest behind \"+N more\".\n * A NUMBER is a CEILING, not a promise: the row still measures, so you get at\n * most that many and fewer when the trigger is narrow. `\"all\"` shows every chip and\n * lets the trigger grow a line per selection.\n *\n * Unset (`null`) means \"not deciding\", as it does on every other input in the\n * library — it resolves to `\"fit\"`. It does NOT mean \"show all\": that is\n * `\"all\"`, which is the loudest of the three modes and has to be asked for. */\n readonly maxVisibleChips = input<number | 'fit' | 'all' | null>(null, {\n transform: (raw: unknown) => {\n if (raw === 'fit' || raw === 'all') {\n return raw;\n }\n\n return raw == null ? null : numberAttribute(raw);\n },\n });\n /** Trigger height — sm/md/lg.\n * Unset falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** Trigger width — `fill` stretches to the container, `content` hugs the value. */\n readonly width = input<AutocompleteWidth>('fill');\n /** What a settled single value does when it is wider than the trigger. Defaults to\n * `ellipsis`; `wrap` lets the value break onto a second line and pushes the chevron\n * down. Multi mode is unaffected — its chips have their own measured cap. */\n readonly valueOverflow = input<AutocompleteValueOverflow>('ellipsis');\n /** Placeholder shown in the input when empty.\n * Unset falls back to `DS_INTL.picker.placeholder`. */\n readonly placeholder = input<string | null>(null);\n readonly placeholderResolved = computed(\n () => this.placeholder() ?? this.intl().picker.placeholder,\n );\n /** Disables the trigger and blocks all interaction. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Confirmation text, shown when there is no error or warning — and it paints\n * the field's success border. A string like `warning`: the text IS the state. */\n readonly success = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** Shows a \"Create «text»\" row when the typed text matches no option. */\n readonly allowCreate = input(false, { transform: booleanAttribute });\n /** Field label above the control — the same meaning it has on the other two pickers. */\n readonly label = input<string>('');\n /** How two values are decided to be the same one. The default is `===`, which\n * is reference identity — so with object values a re-fetch that returns equal\n * data as NEW objects loses the selection. Pass a comparator keyed on whatever\n * identifies the value: `(a, b) => a?.id === b?.id`. */\n readonly compareWith = input<(a: T | null, b: T | null) => boolean>(\n (a, b) => a === b,\n );\n\n /** Native `name` attribute forwarded to the trigger. */\n readonly name = input<string | null>(null);\n /** Extra classes for the portaled panel, beside `ds-dropdown-panel`,\n * `ds-overlay-pane` and this component's own `ds-autocomplete-panel`. The panel\n * is portaled out of the host, so a class on the pane is the only way a consumer\n * stylesheet reaches ONE instance of it. */\n readonly panelClass = input<string | readonly string[]>([]);\n /** Prevents opening the panel while still allowing focus. */\n readonly readOnly = input(false, { transform: booleanAttribute });\n /**\n * The contract spelling of `readOnly`: signal forms binds by NAME, so a\n * `readonly()` rule reaches nothing without it.\n */\n readonly readonlyBinding = input(false, {\n // eslint-disable-next-line @angular-eslint/no-input-rename\n alias: 'readonly',\n transform: booleanAttribute,\n });\n /** Shows a clear affordance once there is something to clear. */\n readonly clearable = input(false, { transform: booleanAttribute });\n /** Placeholder while the field is being typed in, when a value is already\n * settled — `placeholder` is the empty-field caption and cannot be both.\n * Empty (the default) keeps `placeholder` doing both jobs. */\n readonly searchPlaceholder = input<string>('');\n\n /** How the typed query narrows the list.\n *\n * The default matches a case-insensitive substring of `label`. Pass a predicate\n * to match on anything else — a second field, ignoring diacritics, a fuzzy score.\n * Pass `'none'` when the list arrives already filtered, which is what a\n * server-side search needs: the query is reported through `filterChange` and\n * every option given is rendered.\n */\n readonly filterWith = input<\n ((option: AutocompleteOption<T>, query: string) => boolean) | 'none'\n >((option, query) => option.label.toLowerCase().includes(query));\n /** The query the user typed, on every change. The input for a server-side search;\n * pair it with `filterWith=\"none\"` so the list is not narrowed twice. */\n readonly filterChange = output<string>();\n /** Options are still being fetched. The panel shows a spinner instead of the\n * empty row — which would otherwise claim there are no matches — and the list\n * reports `aria-busy`. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** The panel opened. The moment to fetch options for a picker whose list is\n * loaded on demand. */\n readonly opened = output<void>();\n /** The panel closed, for any reason — a pick, Escape, an outside click, a scroll. */\n readonly closed = output<void>();\n /** Scrolls the keyboard cursor's row into view. On by default: a list longer\n * than the panel otherwise walks the cursor out of sight. Set `false` only if\n * you are driving the scroll position yourself. */\n readonly scrollActiveIntoView = input(true, { transform: booleanAttribute });\n /** Marks the field required: a `*` beside the label and `aria-required` on the input. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Marks the field optional in words, for a form where most fields are required. */\n readonly optional = input(false, { transform: booleanAttribute });\n /** Accessible name for the input. */\n readonly ariaLabel = input<string | null>(null);\n\n /** Fires with the typed text when the user picks the create-new option. */\n readonly create = output<string>();\n\n protected readonly isDisabled = computed(\n () => this.disabled() || this.formDisabled(),\n );\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n disabled: () => this.isDisabled(),\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: this.invalid,\n success: this.success,\n touchedSelf: this.touchedSelf,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly controlState = this.fieldMessage.controlState;\n protected readonly groupMessage = groupMessageId();\n protected readonly describedByIds = describedByIds;\n protected readonly invalidResolved = groupInvalid(this.fieldMessage.invalid);\n\n protected readonly optionTemplate = contentChild(DsOptionTemplateDirective, {\n read: TemplateRef,\n });\n protected readonly chipTemplate = contentChild(DsChipTemplateDirective, {\n read: TemplateRef,\n });\n protected readonly pickerTrigger = contentChild(DsPickerTriggerDirective, {\n read: TemplateRef,\n });\n protected readonly panelHeaderTemplate = contentChild(\n DsPanelHeaderTemplateDirective,\n { read: TemplateRef },\n );\n protected readonly panelFooterTemplate = contentChild(\n DsPanelFooterTemplateDirective,\n { read: TemplateRef },\n );\n protected readonly groupLabelTemplate = contentChild(\n DsGroupLabelTemplateDirective,\n { read: TemplateRef },\n );\n protected readonly emptyTemplate = contentChild(DsEmptyTemplateDirective, {\n read: TemplateRef,\n });\n protected readonly createTemplate = contentChild(DsCreateTemplateDirective, {\n read: TemplateRef,\n });\n\n protected readonly query = signal('');\n protected readonly isOpen = signal(false);\n protected readonly activeIndex = signal(-1);\n protected readonly trigger =\n viewChild.required<ElementRef<HTMLElement>>('trigger');\n protected readonly filterInput =\n viewChild.required<ElementRef<HTMLInputElement>>('filter');\n protected readonly panelTpl =\n viewChild.required<TemplateRef<unknown>>('panel');\n private readonly chipRow = viewChild<ElementRef<HTMLElement>>('chipRow');\n private overlayRef: OverlayRef | null = null;\n\n protected readonly uid = `ds-autocomplete-${++nextId}`;\n protected readonly listboxId = `${this.uid}-listbox`;\n protected readonly labelId = `${this.uid}-label`;\n protected optionId(index: number): string {\n return `${this.uid}-opt-${index}`;\n }\n protected readonly activeDescendant = computed(() => {\n const index = this.activeIndex();\n\n return this.isOpen() && index >= 0 ? this.optionId(index) : null;\n });\n\n protected readonly allOptions = computed<readonly AutocompleteOption<T>[]>(\n () => flattenDsOptions(this.options()),\n );\n\n protected readonly filteredItems = computed<AutocompleteItem<T>[]>(() => {\n const query = this.query().toLowerCase().trim();\n const filter = this.filterWith();\n const matches = (option: AutocompleteOption<T>): boolean =>\n !query || filter === 'none' || filter(option, query);\n\n const kept: AutocompleteItem<T>[] = [];\n for (const item of this.options()) {\n if (!isDsOptionGroup(item)) {\n if (matches(item)) {\n kept.push(item);\n }\n continue;\n }\n // A disabled group disables its options HERE, not only in the flattened\n // list: the template renders these objects, so a group left to inherit\n // later would paint enabled rows that refuse to be picked.\n const options = item.options\n .filter(matches)\n .map((option) =>\n item.disabled ? { ...option, disabled: true } : option,\n );\n if (options.length > 0) {\n kept.push({ ...item, options });\n }\n }\n\n return kept;\n });\n\n protected readonly filteredOptions = computed<\n readonly AutocompleteOption<T>[]\n >(() => flattenDsOptions(this.filteredItems()));\n\n protected isGroup(\n item: AutocompleteItem<T>,\n ): item is AutocompleteOptionGroup<T> {\n return isDsOptionGroup(item);\n }\n\n protected readonly showCreateRow = computed<boolean>(() => {\n if (!this.allowCreate()) {\n return false;\n }\n const text = this.query().trim();\n if (!text) {\n return false;\n }\n const lowerText = text.toLowerCase();\n\n return !this.allOptions().some(\n (option) => option.label.toLowerCase() === lowerText,\n );\n });\n\n protected readonly visibleOptions = computed<\n readonly AutocompleteOption<T>[]\n >(() => this.filteredOptions());\n\n /** The visible label wins the accessible name when there is one — otherwise the\n * placeholder would announce over it, and `placeholder` always carries a default. */\n protected readonly resolvedAriaLabel = computed(() =>\n this.label()\n ? null\n : this.ariaLabel() || this.placeholderResolved() || null,\n );\n\n protected readonly selectedTags = computed(() => {\n if (!this.multiple()) {\n return [];\n }\n const selectedValues = (this.value() as readonly T[] | null) ?? [];\n const same = this.compareWith();\n\n return this.allOptions().filter((option) =>\n selectedValues.some((selected) => same(selected, option.value)),\n );\n });\n\n private readonly chipsMode = computed(() => this.maxVisibleChips() ?? 'fit');\n private readonly showsEveryChip = computed(() => this.chipsMode() === 'all');\n /** True for a number as well as `'fit'`: a number is a ceiling, not a promise,\n * so the row still measures. */\n protected readonly fitsChipsToWidth = computed(() => !this.showsEveryChip());\n /** How many chips the row is ASKED to render before measuring. It has to be the\n * ceiling and not the selection: the measurement caches chip widths from a\n * render that holds them all, so with a numeric cap that render never happens,\n * the cache never fills, and the fit silently falls back to showing them all. */\n private readonly chipBudget = computed(() => {\n const max = this.chipsMode();\n const total = this.selectedTags().length;\n\n return typeof max === 'number' ? Math.min(Math.max(max, 0), total) : total;\n });\n private readonly chipsThatFit = chipFit(\n this.chipBudget,\n this.chipRow,\n this.fitsChipsToWidth,\n computed(() => this.selectedTags().length),\n );\n\n /** What the trigger renders. Separate from `selectedTags`, which stays the\n * full selection: Backspace removes the last SELECTED chip, and capping the\n * list it reads would silently make it remove the last VISIBLE one instead. */\n protected readonly visibleTags = computed(() => {\n const tags = this.selectedTags();\n\n return this.showsEveryChip() ? tags : tags.slice(0, this.chipsThatFit());\n });\n\n protected readonly overflowCount = computed<number>(\n () => this.selectedTags().length - this.visibleTags().length,\n );\n\n protected readonly selectedOption = computed<AutocompleteOption<T> | null>(\n () => {\n if (this.multiple()) {\n return null;\n }\n const currentValue = this.value() as T | null;\n if (currentValue === null) {\n return null;\n }\n\n return (\n this.allOptions().find((option) =>\n this.compareWith()(option.value, currentValue),\n ) ?? null\n );\n },\n );\n\n protected readonly displayLabel = computed(\n () => this.selectedOption()?.label ?? '',\n );\n protected readonly hasSingleValue = computed(\n () => this.selectedOption() !== null,\n );\n\n protected readonly triggerSelection = computed(() =>\n this.multiple() ? this.selectedTags() : this.selectedOption(),\n );\n\n protected readonly placeholderText = computed(() => {\n if (this.multiple()) {\n return '';\n }\n if (this.displayLabel()) {\n return this.searchPlaceholder();\n }\n\n return this.placeholderResolved();\n });\n\n protected isSelected(option: AutocompleteOption<T>): boolean {\n if (this.multiple()) {\n const selectedValues = (this.value() as readonly T[] | null) ?? [];\n\n const same = this.compareWith();\n\n return selectedValues.some((selected) => same(selected, option.value));\n }\n\n return this.compareWith()(this.value() as T | null, option.value);\n }\n\n protected optionClass(option: AutocompleteOption<T>): string {\n const parts = ['option'];\n if (this.multiple()) {\n parts.push('multi');\n }\n if (option.disabled) {\n parts.push('is-disabled');\n }\n // The shared panel partial paints the selected row off this class, not off\n // `aria-selected`, so setting the attribute alone leaves the row unpainted.\n if (this.isSelected(option)) {\n parts.push('is-selected');\n }\n\n return parts.join(' ');\n }\n\n /** -1 when nothing is pickable and there is no create row to fall back on. */\n private firstEnabledIndex(): number {\n const index = this.visibleOptions().findIndex((option) => !option.disabled);\n if (index >= 0) {\n return index;\n }\n\n // With nothing pickable the create row IS the list; a -1 cursor would leave\n // Enter doing nothing after typing a new name, until an ArrowDown nobody knows\n // to press.\n return this.showCreateRow() ? this.visibleOptions().length : -1;\n }\n\n /** Steps OVER a disabled option rather than landing on it. `step` is +1/-1; the\n * create row (past the last option) is always reachable, and -1 comes back when\n * every option is disabled. */\n private nextEnabledIndex(from: number, step: number, slots: number): number {\n if (!slots) {\n return -1;\n }\n const options = this.visibleOptions();\n for (let hop = 1; hop <= slots; hop++) {\n const candidate = (from + step * hop + slots * hop) % slots;\n const option = options[candidate];\n if (!option || !option.disabled) {\n return candidate;\n }\n }\n\n return -1;\n }\n\n protected flatIndexOf(option: AutocompleteOption<T>): number {\n return this.visibleOptions().findIndex((opt) => opt === option);\n }\n\n constructor() {\n super();\n scrollActiveOptionIntoView(\n this.activeDescendant,\n this.scrollActiveIntoView,\n this.cursorFromKeyboard,\n );\n announceOptionCount(\n computed(() => this.filteredOptions().length),\n this.isOpen,\n );\n }\n\n private setOpen(next: boolean): void {\n if (this.isOpen() === next) {\n return;\n }\n this.isOpen.set(next);\n (next ? this.opened : this.closed).emit();\n }\n\n protected readonly isReadOnly = computed(\n () => this.readOnly() || this.readonlyBinding(),\n );\n\n protected readonly cursorFromKeyboard = signal(false);\n\n /** How far PageUp and PageDown move. Ten rows is the native `<select>` step and\n * the APG listbox example's — a fixed number rather than a measured screenful,\n * so the jump is the same wherever the panel happens to be clipped. */\n private static readonly pageStep = 10;\n\n private cursorList() {\n const options = this.visibleOptions();\n\n return {\n length: options.length,\n isEnabled: (index: number) => !options[index].disabled,\n };\n }\n\n protected onTriggerClick(): void {\n if (this.isDisabled()) {\n return;\n }\n this.filterInput().nativeElement.focus();\n if (!this.overlayRef) {\n this.openPanel();\n }\n }\n\n protected togglePanel(event: MouseEvent): void {\n if (this.isDisabled()) {\n return;\n }\n event.stopPropagation();\n if (this.overlayRef) {\n this.close();\n } else {\n this.filterInput().nativeElement.focus();\n this.openPanel();\n }\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n this.cursorFromKeyboard.set(true);\n if (this.isDisabled()) {\n return;\n }\n const visibleCount = this.visibleOptions().length;\n const totalSlots = visibleCount + (this.showCreateRow() ? 1 : 0);\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n if (!this.overlayRef) {\n this.openPanel();\n\n return;\n }\n this.activeIndex.set(\n this.nextEnabledIndex(this.activeIndex(), 1, totalSlots),\n );\n break;\n case 'ArrowUp':\n event.preventDefault();\n if (!this.overlayRef) {\n this.openPanel();\n\n return;\n }\n this.activeIndex.set(\n this.nextEnabledIndex(this.activeIndex(), -1, totalSlots),\n );\n break;\n case 'Enter': {\n const index = this.activeIndex();\n if (this.showCreateRow() && index === visibleCount) {\n event.preventDefault();\n this.onCreateNew();\n break;\n }\n const opt = this.visibleOptions()[index];\n if (opt) {\n event.preventDefault();\n this.onPick(opt);\n }\n break;\n }\n case 'PageDown':\n event.preventDefault();\n this.activeIndex.set(\n nextEnabledIndex(\n this.cursorList(),\n this.activeIndex(),\n AutocompleteComponent.pageStep,\n ),\n );\n break;\n case 'PageUp':\n event.preventDefault();\n this.activeIndex.set(\n nextEnabledIndex(\n this.cursorList(),\n this.activeIndex(),\n -AutocompleteComponent.pageStep,\n ),\n );\n break;\n case 'Home':\n event.preventDefault();\n this.activeIndex.set(firstEnabledOf(this.cursorList()));\n break;\n case 'End':\n event.preventDefault();\n this.activeIndex.set(lastEnabledOf(this.cursorList()));\n break;\n case 'Escape':\n if (this.overlayRef) {\n event.preventDefault();\n this.close('dismiss');\n }\n break;\n case 'Tab':\n // Close the panel but let Tab move focus naturally (no preventDefault),\n // else the open overlay panel lingers behind the moved focus.\n if (this.overlayRef) {\n this.close();\n }\n break;\n case 'Backspace':\n if (this.multiple() && !this.query()) {\n const tags = this.selectedTags();\n const last = tags[tags.length - 1];\n if (last) {\n this.remove(last.value);\n }\n }\n break;\n }\n }\n\n protected openPanel(): void {\n if (this.isReadOnly()) {\n return;\n }\n if (this.overlayRef) {\n return;\n }\n const triggerElement = this.trigger().nativeElement;\n const { positionStrategy, config: overlayConfig } = dropdownOverlay(\n this.overlay,\n triggerElement,\n ['ds-autocomplete-panel', ...panelClassesOf(this.panelClass())],\n );\n const triggerWidth = triggerElement.getBoundingClientRect().width;\n if (this.width() === 'content') {\n overlayConfig.minWidth = triggerWidth;\n } else {\n overlayConfig.width = triggerWidth;\n }\n this.overlayRef = this.overlay.create(overlayConfig);\n prepareOverlayEnter(\n this.overlayRef,\n this.host.nativeElement,\n positionStrategy,\n );\n forwardOverlayTokens(\n this.overlayRef,\n this.host.nativeElement,\n this.panelTokens,\n );\n closeOnOutsidePointer(\n this.overlayRef,\n (target) => this.trigger().nativeElement.contains(target),\n () => this.close('dismiss'),\n );\n const removeScrollClose = closeOnScroll(this.overlayRef, () =>\n this.close('dismiss'),\n );\n clearOnDetach(this.overlayRef, {\n current: () => this.overlayRef,\n always: removeScrollClose,\n clear: () => {\n this.overlayRef = null;\n this.setOpen(false);\n },\n });\n this.overlayRef.attach(new TemplatePortal(this.panelTpl(), this.vcr));\n this.setOpen(true);\n this.activeIndex.set(this.firstEnabledIndex());\n }\n\n protected close(cause: DsOverlayCloseCause = 'select'): void {\n disposeWithLeave(this.overlayRef, cause);\n this.overlayRef = null;\n this.setOpen(false);\n this.activeIndex.set(-1);\n // The input collapses to zero width whenever a label is on display, so\n // anything left in `query` goes INVISIBLE while it still narrows the next\n // open. Never in multi mode, where the input keeps its width and the text\n // stays honest.\n if (this.displayLabel()) {\n this.query.set('');\n }\n this.markTouched();\n }\n\n protected clearValue(event: MouseEvent): void {\n event.stopPropagation();\n this.clear();\n this.markTouched();\n }\n\n /**\n * Empties the field — both the selected value and the text the user typed.\n *\n * `value.set(null)` alone is not enough from outside: the typed query is\n * component state with no input bound to it, so the text stays on screen after\n * the value goes.\n *\n * Deliberately does NOT move focus — the caller may be navigating away, and\n * stealing focus back into a field they just left is worse than leaving it.\n */\n clear(): void {\n this.value.set(this.multiple() ? [] : null);\n this.query.set('');\n if (this.isOpen()) {\n this.close('dismiss');\n }\n }\n\n ngOnDestroy(): void {\n this.overlayRef?.dispose();\n this.overlayRef = null;\n }\n\n protected onFilter(event: Event): void {\n const typed = (event.target as HTMLInputElement).value;\n this.query.set(typed);\n this.filterChange.emit(typed);\n this.activeIndex.set(this.firstEnabledIndex());\n }\n\n protected onPick(option: AutocompleteOption<T>): void {\n if (option.disabled) {\n return;\n }\n if (this.multiple()) {\n const current = (this.value() as readonly T[] | null) ?? [];\n const same = this.compareWith();\n const next = current.some((entry) => same(entry, option.value))\n ? current.filter((existing) => existing !== option.value)\n : [...current, option.value];\n this.value.set(next);\n } else {\n this.value.set(option.value);\n this.close();\n }\n }\n\n protected onCreateNew(): void {\n const text = this.query().trim();\n if (!text) {\n return;\n }\n this.create.emit(text);\n this.query.set('');\n this.close();\n }\n\n protected remove(target: T): void {\n if (!this.multiple()) {\n return;\n }\n const current = (this.value() as readonly T[] | null) ?? [];\n this.value.set(current.filter((existing) => existing !== target));\n }\n}\n","@if (label()) {\n <span\n class=\"label\"\n [id]=\"labelId\">\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 </span>\n}\n\n<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- click opens/focuses; keyboard runs through the inner <input role=\"combobox\"> (type/arrows/Enter/Esc) -->\n<div\n #trigger\n class=\"autocomplete-trigger\"\n [class]=\"sizeResolved()\"\n [class.disabled]=\"isDisabled()\"\n (click)=\"onTriggerClick()\">\n <span class=\"addon-slot prefix\">\n <ng-content select=\"[dsAutocompletePrefix]\"></ng-content>\n </span>\n\n @if (pickerTrigger(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: triggerSelection(),\n selected: triggerSelection(),\n count: multiple() ? selectedTags().length : hasSingleValue() ? 1 : 0,\n open: isOpen(),\n disabled: isDisabled(),\n }\" />\n } @else if (multiple()) {\n <span\n #chipRow\n class=\"chip-row\"\n [class.fit]=\"fitsChipsToWidth()\">\n @for (selectedOption of visibleTags(); track selectedOption.value) {\n <ds-tag\n data-chip\n [closable]=\"true\"\n [closeLabel]=\"intl().picker.removeChip(selectedOption.label)\"\n (closed)=\"remove(selectedOption.value)\">\n @if (chipTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: selectedOption,\n option: selectedOption,\n }\" />\n } @else {\n {{ selectedOption.label }}\n }\n </ds-tag>\n }\n\n @if (overflowCount() > 0) {\n <span\n class=\"overflow\"\n data-chip-overflow>\n {{ intl().picker.moreChips(overflowCount()) }}\n </span>\n }\n </span>\n } @else if (displayLabel()) {\n <span\n class=\"autocomplete-value\"\n [attr.title]=\"valueOverflow() === 'ellipsis' ? displayLabel() : null\">\n {{ displayLabel() }}\n </span>\n }\n\n <input\n #filter\n type=\"text\"\n class=\"autocomplete-input\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [class.collapsed]=\"displayLabel() && !isOpen()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-readonly]=\"isReadOnly() ? 'true' : null\"\n [attr.name]=\"name()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"describedByIds(hintId(), groupMessage())\"\n [disabled]=\"isDisabled()\"\n [value]=\"query()\"\n [placeholder]=\"placeholderText()\"\n (input)=\"onFilter($event)\"\n (focus)=\"openPanel()\"\n (blur)=\"markTouched()\"\n (keydown)=\"onKeydown($event)\" />\n\n <span class=\"addon-slot suffix\">\n <ng-content select=\"[dsAutocompleteSuffix]\"></ng-content>\n </span>\n\n @if (\n clearable() &&\n hasSingleValue() &&\n !isDisabled() &&\n !isReadOnly()\n ) {\n <button\n type=\"button\"\n class=\"clear-btn\"\n [attr.aria-label]=\"intl().picker.clearSelection\"\n (click)=\"clearValue($event)\">\n <ds-icon\n name=\"x\"\n [size]=\"14\" />\n </button>\n }\n\n @if (showChevron()) {\n <ds-icon\n name=\"chevronDown\"\n class=\"autocomplete-chevron\"\n aria-hidden=\"true\"\n [size]=\"16\"\n (click)=\"togglePanel($event)\" />\n }\n</div>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n\n<ng-template #panel>\n <div class=\"dropdown-panel\">\n @if (panelHeaderTemplate(); as tpl) {\n <div class=\"panel-header\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n count: filteredOptions().length,\n total: allOptions().length,\n query: query(),\n }\" />\n </div>\n }\n\n <ul\n class=\"dropdown-list\"\n role=\"listbox\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [id]=\"listboxId\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\">\n @for (item of filteredItems(); track $index; let itemIdx = $index) {\n @if (isGroup(item)) {\n <li\n class=\"optgroup\"\n role=\"group\"\n [attr.aria-label]=\"item.label\">\n <span\n class=\"optgroup-label\"\n [class.is-first]=\"itemIdx === 0\">\n @if (groupLabelTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: item,\n group: item,\n count: item.options.length,\n }\" />\n } @else {\n {{ item.label }}\n }\n </span>\n\n @for (option of item.options; track option.value) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- listbox option; activated via the combobox input + aria-activedescendant, options aren't individually focusable -->\n <div\n role=\"option\"\n [class]=\"optionClass(option)\"\n [id]=\"optionId(flatIndexOf(option))\"\n [class.is-active]=\"flatIndexOf(option) === activeIndex()\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"option.disabled ? 'true' : null\"\n (click)=\"onPick(option)\"\n (mouseenter)=\"\n cursorFromKeyboard.set(false);\n option.disabled || activeIndex.set(flatIndexOf(option))\n \">\n @if (multiple()) {\n <span\n class=\"check-box\"\n [class.checked]=\"isSelected(option)\">\n <span class=\"tick\"></span>\n </span>\n }\n\n @if (option.icon) {\n <ds-icon\n class=\"option-icon\"\n [name]=\"option.icon\"\n [size]=\"16\" />\n }\n\n <span\n class=\"option-label\"\n dsTooltip\n dsTooltipWhenClipped>\n @if (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: option,\n option: option,\n }\" />\n } @else {\n {{ option.label }}\n }\n </span>\n\n @if (!multiple()) {\n <span\n class=\"option-check\"\n [class.is-shown]=\"isSelected(option)\">\n </span>\n }\n </div>\n }\n </li>\n } @else {\n @let option = item;\n\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- listbox option; activated via the combobox input + aria-activedescendant, options aren't individually focusable -->\n <li\n role=\"option\"\n [class]=\"optionClass(option)\"\n [id]=\"optionId(flatIndexOf(option))\"\n [class.is-active]=\"flatIndexOf(option) === activeIndex()\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"option.disabled ? 'true' : null\"\n (click)=\"onPick(option)\"\n (mouseenter)=\"\n cursorFromKeyboard.set(false);\n option.disabled || activeIndex.set(flatIndexOf(option))\n \">\n @if (multiple()) {\n <span\n class=\"check-box\"\n [class.checked]=\"isSelected(option)\">\n <span class=\"tick\"></span>\n </span>\n }\n\n @if (option.icon) {\n <ds-icon\n class=\"option-icon\"\n [name]=\"option.icon\"\n [size]=\"16\" />\n }\n\n <span\n class=\"option-label\"\n dsTooltip\n dsTooltipWhenClipped>\n @if (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: option,\n option: option,\n }\" />\n } @else {\n {{ option.label }}\n }\n </span>\n\n @if (!multiple()) {\n <span\n class=\"option-check\"\n [class.is-shown]=\"isSelected(option)\">\n </span>\n }\n </li>\n }\n }\n\n @if (loading()) {\n <li\n class=\"empty t-s\"\n role=\"presentation\">\n <ds-spinner size=\"sm\" />\n </li>\n } @else if (filteredOptions().length === 0 && !showCreateRow()) {\n <li\n class=\"empty t-s\"\n role=\"presentation\">\n @if (emptyTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: query(),\n query: query(),\n }\" />\n } @else {\n {{ intl().picker.noMatches }}\n }\n </li>\n }\n\n @if (showCreateRow()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- listbox option; activated via the combobox input + aria-activedescendant, options aren't individually focusable -->\n <li\n class=\"option create-row\"\n role=\"option\"\n [id]=\"optionId(visibleOptions().length)\"\n [class.is-active]=\"activeIndex() === visibleOptions().length\"\n [attr.aria-selected]=\"false\"\n (click)=\"onCreateNew()\"\n (mouseenter)=\"\n cursorFromKeyboard.set(false);\n activeIndex.set(visibleOptions().length)\n \">\n <ds-icon\n name=\"plus\"\n class=\"create-icon\"\n [size]=\"16\" />\n\n <span\n class=\"option-label\"\n dsTooltip\n dsTooltipWhenClipped>\n @if (createTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: query().trim(),\n query: query().trim(),\n }\" />\n } @else {\n {{ intl().picker.create(query().trim()) }}\n }\n </span>\n </li>\n }\n </ul>\n\n @if (panelFooterTemplate(); as tpl) {\n <div class=\"panel-footer\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n count: filteredOptions().length,\n total: allOptions().length,\n query: query(),\n }\" />\n </div>\n }\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["firstEnabledOf","lastEnabledOf"],"mappings":";;;;;;;;;;;;;;;AAmFA,IAAI,MAAM,GAAG,CAAC;AA8BR,MAAO,qBACX,SAAQ,sBAA+C,CAAA;AAGvD;AACwE;IACrD,OAAO,GAAG,YAAY,EAAE;AAE1B,IAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACzB,IAAA,GAAG,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC9B,IAAA,IAAI,GAAG,MAAM,EAAC,UAAuB,EA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../src/lib/components/autocomplete/autocomplete.component.html","../../../src/lib/components/autocomplete/ids-group-ltd-ids-design-system-components-autocomplete.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ElementRef,\n type OnDestroy,\n TemplateRef,\n ViewContainerRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n forwardRef,\n inject,\n input,\n model,\n numberAttribute,\n output,\n signal,\n contentChild,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n clearOnDetach,\n closeOnOutsidePointer,\n closeOnScroll,\n disposeWithLeave,\n type DsOverlayCloseCause,\n forwardOverlayTokens,\n dropdownOverlay,\n panelClassesOf,\n prepareOverlayEnter,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { chipFit } from '@ids-group-ltd/ids-design-system/components';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { SpinnerComponent } from '@ids-group-ltd/ids-design-system/components/spinner';\nimport { TagComponent } from '@ids-group-ltd/ids-design-system/components/tag';\nimport { DsControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport { TooltipDirective } from '@ids-group-ltd/ids-design-system/components/tooltip';\nimport {\n resolveFieldMessage,\n trimmedText,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type {\n AutocompleteItem,\n AutocompleteOption,\n AutocompleteOptionGroup,\n AutocompleteValueOverflow,\n AutocompleteWidth,\n} from './autocomplete.types';\nimport {\n flattenDsOptions,\n isDsOptionGroup,\n} from '@ids-group-ltd/ids-design-system/core';\nimport {\n firstEnabledIndex as firstEnabledOf,\n lastEnabledIndex as lastEnabledOf,\n nextEnabledIndex,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { scrollActiveOptionIntoView } from '@ids-group-ltd/ids-design-system/components';\nimport { announceOptionCount } from '@ids-group-ltd/ids-design-system/components';\nimport { DsOptionTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsChipTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsPickerTriggerDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsEmptyTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsPanelHeaderTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsPanelFooterTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsGroupLabelTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsCreateTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport {\n describedByIds,\n groupInvalid,\n groupMessageId,\n inFieldGroup,\n} from '@ids-group-ltd/ids-design-system/components/field-group';\nimport {\n DS_INTL,\n resolveWithConfig,\n} from '@ids-group-ltd/ids-design-system/core';\n\nlet nextId = 0;\n\n@Component({\n selector: 'ds-autocomplete',\n standalone: true,\n imports: [\n IconComponent,\n SpinnerComponent,\n TagComponent,\n FieldMessageComponent,\n NgTemplateOutlet,\n TooltipDirective,\n ],\n templateUrl: './autocomplete.component.html',\n styleUrl: './autocomplete.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[attr.data-field-state]': 'controlState()',\n '[class.in-group]': 'inGroup',\n '[class.content-width]': \"width() === 'content'\",\n '[class.value-wraps]': \"valueOverflow() === 'wrap'\",\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AutocompleteComponent),\n multi: true,\n },\n ],\n})\nexport class AutocompleteComponent<T = unknown>\n extends DsControlValueAccessor<T | readonly T[] | null>\n implements OnDestroy\n{\n /** Segment of a ds-field-group: the group owns the border, radius and focus\n * ring, so .in-group strips this control back to its bare contents. */\n protected readonly inGroup = inFieldGroup();\n\n private readonly overlay = inject(Overlay);\n private readonly vcr = inject(ViewContainerRef);\n private readonly host = inject(ElementRef<HTMLElement>);\n protected readonly intl = inject(DS_INTL);\n /** Public panel tokens forwarded onto the portaled overlay pane on open, so a consumer's\n * `ds-autocomplete { --ds-autocomplete-panel-bg-color | -radius | -maxh: … }` reaches it.\n * Not the whole set: `prepareOverlayEnter` also forwards `DROPDOWN_PANEL_TOKENS`\n * (overlay-motion.ts) onto every pane, the `--ds-option-*` family among them. */\n private readonly panelTokens = [\n '--ds-dropdown-panel-bg-color',\n '--ds-dropdown-panel-min-width',\n '--ds-dropdown-panel-max-width',\n '--ds-option-selected-bg-color',\n '--ds-option-selected-label-color',\n '--ds-option-selected-bg-color-hover',\n '--ds-option-check-color',\n ];\n\n /** Options, groups, or both mixed — rendered in the order given. */\n readonly options = input<readonly AutocompleteItem<T>[]>([]);\n /** Selected value, or an array of values when `multiple`. */\n readonly value = model<T | readonly T[] | null>(null);\n /** Allows selecting more than one option, shown as removable tags. */\n readonly multiple = input(false, { transform: booleanAttribute });\n /** Draws the trailing chevron. Turn it off for a search field, where an arrow\n * invites a click that would list everything instead of searching. */\n readonly showChevron = input(true, { transform: booleanAttribute });\n /** How the chips collapse when they outgrow one line. `\"fit\"` (the default)\n * measures and shows as many as the trigger is wide, the rest behind \"+N more\".\n * A NUMBER is a CEILING, not a promise: the row still measures, so you get at\n * most that many and fewer when the trigger is narrow. `\"all\"` shows every chip and\n * lets the trigger grow a line per selection.\n *\n * Unset (`null`) means \"not deciding\", as it does on every other input in the\n * library — it resolves to `\"fit\"`. It does NOT mean \"show all\": that is\n * `\"all\"`, which is the loudest of the three modes and has to be asked for. */\n readonly maxVisibleChips = input<number | 'fit' | 'all' | null>(null, {\n transform: (raw: unknown) => {\n if (raw === 'fit' || raw === 'all') {\n return raw;\n }\n\n return raw == null ? null : numberAttribute(raw);\n },\n });\n /** Trigger height — sm/md/lg.\n * Unset falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** Trigger width — `fill` stretches to the container, `content` hugs the value. */\n readonly width = input<AutocompleteWidth>('fill');\n /** What a settled single value does when it is wider than the trigger. Defaults to\n * `ellipsis`; `wrap` lets the value break onto a second line and pushes the chevron\n * down. Multi mode is unaffected — its chips have their own measured cap. */\n readonly valueOverflow = input<AutocompleteValueOverflow>('ellipsis');\n /** Placeholder shown in the input when empty.\n * Unset falls back to `DS_INTL.picker.placeholder`. */\n readonly placeholder = input<string | null>(null);\n readonly placeholderResolved = computed(\n () => this.placeholder() ?? this.intl().picker.placeholder,\n );\n /** Disables the trigger and blocks all interaction. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Confirmation text, shown when there is no error or warning — and it paints\n * the field's success border. A string like `warning`: the text IS the state. */\n readonly success = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** Shows a \"Create «text»\" row when the typed text matches no option. */\n readonly allowCreate = input(false, { transform: booleanAttribute });\n /** Field label above the control — the same meaning it has on the other two pickers. */\n readonly label = input<string>('');\n /** How two values are decided to be the same one. The default is `===`, which\n * is reference identity — so with object values a re-fetch that returns equal\n * data as NEW objects loses the selection. Pass a comparator keyed on whatever\n * identifies the value: `(a, b) => a?.id === b?.id`. */\n readonly compareWith = input<(a: T | null, b: T | null) => boolean>(\n (a, b) => a === b,\n );\n\n /** Native `name` attribute forwarded to the trigger. */\n readonly name = input<string | null>(null);\n /** Extra classes for the portaled panel, beside `ds-dropdown-panel`,\n * `ds-overlay-pane` and this component's own `ds-autocomplete-panel`. The panel\n * is portaled out of the host, so a class on the pane is the only way a consumer\n * stylesheet reaches ONE instance of it. */\n readonly panelClass = input<string | readonly string[]>([]);\n /** Prevents opening the panel while still allowing focus. */\n readonly readOnly = input(false, { transform: booleanAttribute });\n /**\n * The contract spelling of `readOnly`: signal forms binds by NAME, so a\n * `readonly()` rule reaches nothing without it.\n */\n readonly readonlyBinding = input(false, {\n // eslint-disable-next-line @angular-eslint/no-input-rename\n alias: 'readonly',\n transform: booleanAttribute,\n });\n /** Shows a clear affordance once there is something to clear. */\n readonly clearable = input(false, { transform: booleanAttribute });\n /** Placeholder while the field is being typed in, when a value is already\n * settled — `placeholder` is the empty-field caption and cannot be both.\n * Empty (the default) keeps `placeholder` doing both jobs. */\n readonly searchPlaceholder = input<string>('');\n\n /** How the typed query narrows the list.\n *\n * The default matches a case-insensitive substring of `label`. Pass a predicate\n * to match on anything else — a second field, ignoring diacritics, a fuzzy score.\n * Pass `'none'` when the list arrives already filtered, which is what a\n * server-side search needs: the query is reported through `filterChange` and\n * every option given is rendered.\n */\n readonly filterWith = input<\n ((option: AutocompleteOption<T>, query: string) => boolean) | 'none'\n >((option, query) => option.label.toLowerCase().includes(query));\n /** The query the user typed, on every change. The input for a server-side search;\n * pair it with `filterWith=\"none\"` so the list is not narrowed twice. */\n readonly filterChange = output<string>();\n /** Options are still being fetched. The panel shows a spinner instead of the\n * empty row — which would otherwise claim there are no matches — and the list\n * reports `aria-busy`. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** The panel opened. The moment to fetch options for a picker whose list is\n * loaded on demand. */\n readonly opened = output<void>();\n /** The panel closed, for any reason — a pick, Escape, an outside click, a scroll. */\n readonly closed = output<void>();\n /** Scrolls the keyboard cursor's row into view. On by default: a list longer\n * than the panel otherwise walks the cursor out of sight. Set `false` only if\n * you are driving the scroll position yourself. */\n readonly scrollActiveIntoView = input(true, { transform: booleanAttribute });\n /** Marks the field required: a `*` beside the label and `aria-required` on the input. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Marks the field optional in words, for a form where most fields are required. */\n readonly optional = input(false, { transform: booleanAttribute });\n /** Accessible name for the input. */\n readonly ariaLabel = input<string | null>(null);\n\n /** Fires with the typed text when the user picks the create-new option. */\n readonly create = output<string>();\n\n protected readonly isDisabled = computed(\n () => this.disabled() || this.formDisabled(),\n );\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n disabled: () => this.isDisabled(),\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: this.invalid,\n success: this.success,\n touchedSelf: this.touchedSelf,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly controlState = this.fieldMessage.controlState;\n protected readonly groupMessage = groupMessageId();\n protected readonly describedByIds = describedByIds;\n protected readonly invalidResolved = groupInvalid(this.fieldMessage.invalid);\n\n protected readonly optionTemplate = contentChild(DsOptionTemplateDirective, {\n read: TemplateRef,\n });\n protected readonly chipTemplate = contentChild(DsChipTemplateDirective, {\n read: TemplateRef,\n });\n protected readonly pickerTrigger = contentChild(DsPickerTriggerDirective, {\n read: TemplateRef,\n });\n protected readonly panelHeaderTemplate = contentChild(\n DsPanelHeaderTemplateDirective,\n { read: TemplateRef },\n );\n protected readonly panelFooterTemplate = contentChild(\n DsPanelFooterTemplateDirective,\n { read: TemplateRef },\n );\n protected readonly groupLabelTemplate = contentChild(\n DsGroupLabelTemplateDirective,\n { read: TemplateRef },\n );\n protected readonly emptyTemplate = contentChild(DsEmptyTemplateDirective, {\n read: TemplateRef,\n });\n protected readonly createTemplate = contentChild(DsCreateTemplateDirective, {\n read: TemplateRef,\n });\n\n protected readonly query = signal('');\n protected readonly isOpen = signal(false);\n protected readonly activeIndex = signal(-1);\n protected readonly trigger =\n viewChild.required<ElementRef<HTMLElement>>('trigger');\n protected readonly filterInput =\n viewChild.required<ElementRef<HTMLInputElement>>('filter');\n protected readonly panelTpl =\n viewChild.required<TemplateRef<unknown>>('panel');\n private readonly chipRow = viewChild<ElementRef<HTMLElement>>('chipRow');\n private overlayRef: OverlayRef | null = null;\n\n protected readonly uid = `ds-autocomplete-${++nextId}`;\n protected readonly listboxId = `${this.uid}-listbox`;\n protected readonly labelId = `${this.uid}-label`;\n protected optionId(index: number): string {\n return `${this.uid}-opt-${index}`;\n }\n protected readonly activeDescendant = computed(() => {\n const index = this.activeIndex();\n\n return this.isOpen() && index >= 0 ? this.optionId(index) : null;\n });\n\n protected readonly allOptions = computed<readonly AutocompleteOption<T>[]>(\n () => flattenDsOptions(this.options()),\n );\n\n protected readonly filteredItems = computed<AutocompleteItem<T>[]>(() => {\n const query = this.query().toLowerCase().trim();\n const filter = this.filterWith();\n const matches = (option: AutocompleteOption<T>): boolean =>\n !query || filter === 'none' || filter(option, query);\n\n const kept: AutocompleteItem<T>[] = [];\n for (const item of this.options()) {\n if (!isDsOptionGroup(item)) {\n if (matches(item)) {\n kept.push(item);\n }\n continue;\n }\n // A disabled group disables its options HERE, not only in the flattened\n // list: the template renders these objects, so a group left to inherit\n // later would paint enabled rows that refuse to be picked.\n const options = item.options\n .filter(matches)\n .map((option) =>\n item.disabled ? { ...option, disabled: true } : option,\n );\n if (options.length > 0) {\n kept.push({ ...item, options });\n }\n }\n\n return kept;\n });\n\n protected readonly filteredOptions = computed<\n readonly AutocompleteOption<T>[]\n >(() => flattenDsOptions(this.filteredItems()));\n\n protected isGroup(\n item: AutocompleteItem<T>,\n ): item is AutocompleteOptionGroup<T> {\n return isDsOptionGroup(item);\n }\n\n protected readonly showCreateRow = computed<boolean>(() => {\n if (!this.allowCreate()) {\n return false;\n }\n const text = this.query().trim();\n if (!text) {\n return false;\n }\n const lowerText = text.toLowerCase();\n\n return !this.allOptions().some(\n (option) => option.label.toLowerCase() === lowerText,\n );\n });\n\n protected readonly visibleOptions = computed<\n readonly AutocompleteOption<T>[]\n >(() => this.filteredOptions());\n\n /** The visible label wins the accessible name when there is one — otherwise the\n * placeholder would announce over it, and `placeholder` always carries a default. */\n protected readonly resolvedAriaLabel = computed(() =>\n this.label()\n ? null\n : this.ariaLabel() || this.placeholderResolved() || null,\n );\n\n protected readonly selectedTags = computed(() => {\n if (!this.multiple()) {\n return [];\n }\n const selectedValues = (this.value() as readonly T[] | null) ?? [];\n const same = this.compareWith();\n\n return this.allOptions().filter((option) =>\n selectedValues.some((selected) => same(selected, option.value)),\n );\n });\n\n private readonly chipsMode = computed(() => this.maxVisibleChips() ?? 'fit');\n private readonly showsEveryChip = computed(() => this.chipsMode() === 'all');\n /** True for a number as well as `'fit'`: a number is a ceiling, not a promise,\n * so the row still measures. */\n protected readonly fitsChipsToWidth = computed(() => !this.showsEveryChip());\n /** How many chips the row is ASKED to render before measuring. It has to be the\n * ceiling and not the selection: the measurement caches chip widths from a\n * render that holds them all, so with a numeric cap that render never happens,\n * the cache never fills, and the fit silently falls back to showing them all. */\n private readonly chipBudget = computed(() => {\n const max = this.chipsMode();\n const total = this.selectedTags().length;\n\n return typeof max === 'number' ? Math.min(Math.max(max, 0), total) : total;\n });\n private readonly chipsThatFit = chipFit(\n this.chipBudget,\n this.chipRow,\n this.fitsChipsToWidth,\n computed(() => this.selectedTags().length),\n );\n\n /** What the trigger renders. Separate from `selectedTags`, which stays the\n * full selection: Backspace removes the last SELECTED chip, and capping the\n * list it reads would silently make it remove the last VISIBLE one instead. */\n protected readonly visibleTags = computed(() => {\n const tags = this.selectedTags();\n\n return this.showsEveryChip() ? tags : tags.slice(0, this.chipsThatFit());\n });\n\n protected readonly overflowCount = computed<number>(\n () => this.selectedTags().length - this.visibleTags().length,\n );\n\n protected readonly selectedOption = computed<AutocompleteOption<T> | null>(\n () => {\n if (this.multiple()) {\n return null;\n }\n const currentValue = this.value() as T | null;\n if (currentValue === null) {\n return null;\n }\n\n return (\n this.allOptions().find((option) =>\n this.compareWith()(option.value, currentValue),\n ) ?? null\n );\n },\n );\n\n protected readonly displayLabel = computed(\n () => this.selectedOption()?.label ?? '',\n );\n protected readonly hasSingleValue = computed(\n () => this.selectedOption() !== null,\n );\n\n protected readonly triggerSelection = computed(() =>\n this.multiple() ? this.selectedTags() : this.selectedOption(),\n );\n\n protected readonly placeholderText = computed(() => {\n if (this.multiple()) {\n return '';\n }\n if (this.displayLabel()) {\n return this.searchPlaceholder();\n }\n\n return this.placeholderResolved();\n });\n\n protected isSelected(option: AutocompleteOption<T>): boolean {\n if (this.multiple()) {\n const selectedValues = (this.value() as readonly T[] | null) ?? [];\n\n const same = this.compareWith();\n\n return selectedValues.some((selected) => same(selected, option.value));\n }\n\n return this.compareWith()(this.value() as T | null, option.value);\n }\n\n protected optionClass(option: AutocompleteOption<T>): string {\n const parts = ['option'];\n if (this.multiple()) {\n parts.push('multi');\n }\n if (option.disabled) {\n parts.push('is-disabled');\n }\n // The shared panel partial paints the selected row off this class, not off\n // `aria-selected`, so setting the attribute alone leaves the row unpainted.\n if (this.isSelected(option)) {\n parts.push('is-selected');\n }\n\n return parts.join(' ');\n }\n\n /** -1 when nothing is pickable and there is no create row to fall back on. */\n private firstEnabledIndex(): number {\n const index = this.visibleOptions().findIndex((option) => !option.disabled);\n if (index >= 0) {\n return index;\n }\n\n // With nothing pickable the create row IS the list; a -1 cursor would leave\n // Enter doing nothing after typing a new name, until an ArrowDown nobody knows\n // to press.\n return this.showCreateRow() ? this.visibleOptions().length : -1;\n }\n\n /** Steps OVER a disabled option rather than landing on it. `step` is +1/-1; the\n * create row (past the last option) is always reachable, and -1 comes back when\n * every option is disabled. */\n private nextEnabledIndex(from: number, step: number, slots: number): number {\n if (!slots) {\n return -1;\n }\n const options = this.visibleOptions();\n for (let hop = 1; hop <= slots; hop++) {\n const candidate = (from + step * hop + slots * hop) % slots;\n const option = options[candidate];\n if (!option || !option.disabled) {\n return candidate;\n }\n }\n\n return -1;\n }\n\n protected flatIndexOf(option: AutocompleteOption<T>): number {\n return this.visibleOptions().findIndex((opt) => opt === option);\n }\n\n constructor() {\n super();\n scrollActiveOptionIntoView(\n this.activeDescendant,\n this.scrollActiveIntoView,\n this.cursorFromKeyboard,\n );\n announceOptionCount(\n computed(() => this.filteredOptions().length),\n this.isOpen,\n );\n }\n\n private setOpen(next: boolean): void {\n if (this.isOpen() === next) {\n return;\n }\n this.isOpen.set(next);\n (next ? this.opened : this.closed).emit();\n }\n\n protected readonly isReadOnly = computed(\n () => this.readOnly() || this.readonlyBinding(),\n );\n\n protected readonly cursorFromKeyboard = signal(false);\n\n /** How far PageUp and PageDown move. Ten rows is the native `<select>` step and\n * the APG listbox example's — a fixed number rather than a measured screenful,\n * so the jump is the same wherever the panel happens to be clipped. */\n private static readonly pageStep = 10;\n\n private cursorList() {\n const options = this.visibleOptions();\n\n return {\n length: options.length,\n isEnabled: (index: number) => !options[index].disabled,\n };\n }\n\n protected onTriggerClick(): void {\n if (this.isDisabled()) {\n return;\n }\n this.filterInput().nativeElement.focus();\n if (!this.overlayRef) {\n this.openPanel();\n }\n }\n\n protected togglePanel(event: MouseEvent): void {\n if (this.isDisabled()) {\n return;\n }\n event.stopPropagation();\n if (this.overlayRef) {\n this.close();\n } else {\n this.filterInput().nativeElement.focus();\n this.openPanel();\n }\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n this.cursorFromKeyboard.set(true);\n if (this.isDisabled()) {\n return;\n }\n const visibleCount = this.visibleOptions().length;\n const totalSlots = visibleCount + (this.showCreateRow() ? 1 : 0);\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n if (!this.overlayRef) {\n this.openPanel();\n\n return;\n }\n this.activeIndex.set(\n this.nextEnabledIndex(this.activeIndex(), 1, totalSlots),\n );\n break;\n case 'ArrowUp':\n event.preventDefault();\n if (!this.overlayRef) {\n this.openPanel();\n\n return;\n }\n this.activeIndex.set(\n this.nextEnabledIndex(this.activeIndex(), -1, totalSlots),\n );\n break;\n case 'Enter': {\n const index = this.activeIndex();\n if (this.showCreateRow() && index === visibleCount) {\n event.preventDefault();\n this.onCreateNew();\n break;\n }\n const opt = this.visibleOptions()[index];\n if (opt) {\n event.preventDefault();\n this.onPick(opt);\n }\n break;\n }\n case 'PageDown':\n event.preventDefault();\n this.activeIndex.set(\n nextEnabledIndex(\n this.cursorList(),\n this.activeIndex(),\n AutocompleteComponent.pageStep,\n ),\n );\n break;\n case 'PageUp':\n event.preventDefault();\n this.activeIndex.set(\n nextEnabledIndex(\n this.cursorList(),\n this.activeIndex(),\n -AutocompleteComponent.pageStep,\n ),\n );\n break;\n case 'Home':\n event.preventDefault();\n this.activeIndex.set(firstEnabledOf(this.cursorList()));\n break;\n case 'End':\n event.preventDefault();\n this.activeIndex.set(lastEnabledOf(this.cursorList()));\n break;\n case 'Escape':\n if (this.overlayRef) {\n event.preventDefault();\n this.close('dismiss');\n }\n break;\n case 'Tab':\n // Close the panel but let Tab move focus naturally (no preventDefault),\n // else the open overlay panel lingers behind the moved focus.\n if (this.overlayRef) {\n this.close();\n }\n break;\n case 'Backspace':\n if (this.multiple() && !this.query()) {\n const tags = this.selectedTags();\n const last = tags[tags.length - 1];\n if (last) {\n this.remove(last.value);\n }\n }\n break;\n }\n }\n\n protected openPanel(): void {\n if (this.isReadOnly()) {\n return;\n }\n if (this.overlayRef) {\n return;\n }\n const triggerElement = this.trigger().nativeElement;\n const { positionStrategy, config: overlayConfig } = dropdownOverlay(\n this.overlay,\n triggerElement,\n ['ds-autocomplete-panel', ...panelClassesOf(this.panelClass())],\n );\n const triggerWidth = triggerElement.getBoundingClientRect().width;\n if (this.width() === 'content') {\n overlayConfig.minWidth = triggerWidth;\n } else {\n overlayConfig.width = triggerWidth;\n }\n this.overlayRef = this.overlay.create(overlayConfig);\n prepareOverlayEnter(\n this.overlayRef,\n this.host.nativeElement,\n positionStrategy,\n );\n forwardOverlayTokens(\n this.overlayRef,\n this.host.nativeElement,\n this.panelTokens,\n );\n closeOnOutsidePointer(\n this.overlayRef,\n (target) => this.trigger().nativeElement.contains(target),\n () => this.close('dismiss'),\n );\n const removeScrollClose = closeOnScroll(this.overlayRef, () =>\n this.close('dismiss'),\n );\n clearOnDetach(this.overlayRef, {\n current: () => this.overlayRef,\n always: removeScrollClose,\n clear: () => {\n this.overlayRef = null;\n this.setOpen(false);\n },\n });\n this.overlayRef.attach(new TemplatePortal(this.panelTpl(), this.vcr));\n this.setOpen(true);\n this.activeIndex.set(this.firstEnabledIndex());\n }\n\n protected close(cause: DsOverlayCloseCause = 'select'): void {\n disposeWithLeave(this.overlayRef, cause);\n this.overlayRef = null;\n this.setOpen(false);\n this.activeIndex.set(-1);\n // The input collapses to zero width whenever a label is on display, so\n // anything left in `query` goes INVISIBLE while it still narrows the next\n // open. Never in multi mode, where the input keeps its width and the text\n // stays honest.\n if (this.displayLabel()) {\n this.query.set('');\n }\n this.markTouched();\n }\n\n protected clearValue(event: MouseEvent): void {\n event.stopPropagation();\n this.clear();\n this.markTouched();\n }\n\n /**\n * Empties the field — both the selected value and the text the user typed.\n *\n * `value.set(null)` alone is not enough from outside: the typed query is\n * component state with no input bound to it, so the text stays on screen after\n * the value goes.\n *\n * Deliberately does NOT move focus — the caller may be navigating away, and\n * stealing focus back into a field they just left is worse than leaving it.\n */\n clear(): void {\n this.value.set(this.multiple() ? [] : null);\n this.query.set('');\n if (this.isOpen()) {\n this.close('dismiss');\n }\n }\n\n ngOnDestroy(): void {\n this.overlayRef?.dispose();\n this.overlayRef = null;\n }\n\n protected onFilter(event: Event): void {\n const typed = (event.target as HTMLInputElement).value;\n this.query.set(typed);\n this.filterChange.emit(typed);\n this.activeIndex.set(this.firstEnabledIndex());\n }\n\n protected onPick(option: AutocompleteOption<T>): void {\n if (option.disabled) {\n return;\n }\n if (this.multiple()) {\n const current = (this.value() as readonly T[] | null) ?? [];\n const same = this.compareWith();\n const next = current.some((entry) => same(entry, option.value))\n ? current.filter((existing) => existing !== option.value)\n : [...current, option.value];\n this.value.set(next);\n } else {\n this.value.set(option.value);\n this.close();\n }\n }\n\n protected onCreateNew(): void {\n const text = this.query().trim();\n if (!text) {\n return;\n }\n this.create.emit(text);\n this.query.set('');\n this.close();\n }\n\n protected remove(target: T): void {\n if (!this.multiple()) {\n return;\n }\n const current = (this.value() as readonly T[] | null) ?? [];\n this.value.set(current.filter((existing) => existing !== target));\n }\n}\n","@if (label()) {\n <span\n class=\"label\"\n [id]=\"labelId\">\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 </span>\n}\n\n<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- click opens/focuses; keyboard runs through the inner <input role=\"combobox\"> (type/arrows/Enter/Esc) -->\n<div\n #trigger\n class=\"autocomplete-trigger\"\n [class]=\"sizeResolved()\"\n [class.disabled]=\"isDisabled()\"\n (click)=\"onTriggerClick()\">\n <span class=\"addon-slot prefix\">\n <ng-content select=\"[dsAutocompletePrefix]\"></ng-content>\n </span>\n\n @if (pickerTrigger(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: triggerSelection(),\n selected: triggerSelection(),\n count: multiple() ? selectedTags().length : hasSingleValue() ? 1 : 0,\n open: isOpen(),\n disabled: isDisabled(),\n }\" />\n } @else if (multiple()) {\n <span\n #chipRow\n class=\"chip-row\"\n [class.fit]=\"fitsChipsToWidth()\">\n @for (selectedOption of visibleTags(); track selectedOption.value) {\n <ds-tag\n data-chip\n [closable]=\"true\"\n [closeLabel]=\"intl().picker.removeChip(selectedOption.label)\"\n (closed)=\"remove(selectedOption.value)\">\n @if (chipTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: selectedOption,\n option: selectedOption,\n }\" />\n } @else {\n {{ selectedOption.label }}\n }\n </ds-tag>\n }\n\n @if (overflowCount() > 0) {\n <span\n class=\"overflow\"\n data-chip-overflow>\n {{ intl().picker.moreChips(overflowCount()) }}\n </span>\n }\n </span>\n } @else if (displayLabel()) {\n <span\n class=\"autocomplete-value\"\n [attr.title]=\"valueOverflow() === 'ellipsis' ? displayLabel() : null\">\n {{ displayLabel() }}\n </span>\n }\n\n <input\n #filter\n type=\"text\"\n class=\"autocomplete-input\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [class.collapsed]=\"displayLabel() && !isOpen()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-readonly]=\"isReadOnly() ? 'true' : null\"\n [attr.name]=\"name()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"describedByIds(hintId(), groupMessage())\"\n [disabled]=\"isDisabled()\"\n [value]=\"query()\"\n [placeholder]=\"placeholderText()\"\n (input)=\"onFilter($event)\"\n (focus)=\"openPanel()\"\n (blur)=\"markTouched()\"\n (keydown)=\"onKeydown($event)\" />\n\n <span class=\"addon-slot suffix\">\n <ng-content select=\"[dsAutocompleteSuffix]\"></ng-content>\n </span>\n\n @if (\n clearable() &&\n hasSingleValue() &&\n !isDisabled() &&\n !isReadOnly()\n ) {\n <button\n type=\"button\"\n class=\"clear-btn\"\n [attr.aria-label]=\"intl().picker.clearSelection\"\n (click)=\"clearValue($event)\">\n <ds-icon\n name=\"x\"\n [size]=\"14\" />\n </button>\n }\n\n @if (showChevron()) {\n <ds-icon\n name=\"chevronDown\"\n class=\"autocomplete-chevron\"\n aria-hidden=\"true\"\n [size]=\"16\"\n (click)=\"togglePanel($event)\" />\n }\n</div>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n\n<ng-template #panel>\n <div class=\"dropdown-panel\">\n @if (panelHeaderTemplate(); as tpl) {\n <div class=\"panel-header\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n count: filteredOptions().length,\n total: allOptions().length,\n query: query(),\n }\" />\n </div>\n }\n\n <ul\n class=\"dropdown-list\"\n role=\"listbox\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [id]=\"listboxId\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\">\n @for (item of filteredItems(); track $index; let itemIdx = $index) {\n @if (isGroup(item)) {\n <li\n class=\"optgroup\"\n role=\"group\"\n [attr.aria-label]=\"item.label\">\n <span\n class=\"optgroup-label\"\n [class.is-first]=\"itemIdx === 0\">\n @if (groupLabelTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: item,\n group: item,\n count: item.options.length,\n }\" />\n } @else {\n {{ item.label }}\n }\n </span>\n\n @for (option of item.options; track option.value) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- listbox option; activated via the combobox input + aria-activedescendant, options aren't individually focusable -->\n <div\n role=\"option\"\n dsTooltip\n dsTooltipWhenClipped\n dsTooltipTextSelector=\".option-label\"\n [class]=\"optionClass(option)\"\n [id]=\"optionId(flatIndexOf(option))\"\n [class.is-active]=\"flatIndexOf(option) === activeIndex()\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"option.disabled ? 'true' : null\"\n (click)=\"onPick(option)\"\n (mouseenter)=\"\n cursorFromKeyboard.set(false);\n option.disabled || activeIndex.set(flatIndexOf(option))\n \">\n @if (multiple()) {\n <span\n class=\"check-box\"\n [class.checked]=\"isSelected(option)\">\n <span class=\"tick\"></span>\n </span>\n }\n\n @if (option.icon) {\n <ds-icon\n class=\"option-icon\"\n [name]=\"option.icon\"\n [size]=\"16\" />\n }\n\n <span\n class=\"option-label\">\n @if (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: option,\n option: option,\n }\" />\n } @else {\n {{ option.label }}\n }\n </span>\n\n @if (!multiple()) {\n <span\n class=\"option-check\"\n [class.is-shown]=\"isSelected(option)\">\n </span>\n }\n </div>\n }\n </li>\n } @else {\n @let option = item;\n\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- listbox option; activated via the combobox input + aria-activedescendant, options aren't individually focusable -->\n <li\n role=\"option\"\n dsTooltip\n dsTooltipWhenClipped\n dsTooltipTextSelector=\".option-label\"\n [class]=\"optionClass(option)\"\n [id]=\"optionId(flatIndexOf(option))\"\n [class.is-active]=\"flatIndexOf(option) === activeIndex()\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"option.disabled ? 'true' : null\"\n (click)=\"onPick(option)\"\n (mouseenter)=\"\n cursorFromKeyboard.set(false);\n option.disabled || activeIndex.set(flatIndexOf(option))\n \">\n @if (multiple()) {\n <span\n class=\"check-box\"\n [class.checked]=\"isSelected(option)\">\n <span class=\"tick\"></span>\n </span>\n }\n\n @if (option.icon) {\n <ds-icon\n class=\"option-icon\"\n [name]=\"option.icon\"\n [size]=\"16\" />\n }\n\n <span\n class=\"option-label\">\n @if (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: option,\n option: option,\n }\" />\n } @else {\n {{ option.label }}\n }\n </span>\n\n @if (!multiple()) {\n <span\n class=\"option-check\"\n [class.is-shown]=\"isSelected(option)\">\n </span>\n }\n </li>\n }\n }\n\n @if (loading()) {\n <li\n class=\"empty t-s\"\n role=\"presentation\">\n <ds-spinner size=\"sm\" />\n </li>\n } @else if (filteredOptions().length === 0 && !showCreateRow()) {\n <li\n class=\"empty t-s\"\n role=\"presentation\">\n @if (emptyTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: query(),\n query: query(),\n }\" />\n } @else {\n {{ intl().picker.noMatches }}\n }\n </li>\n }\n\n @if (showCreateRow()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- listbox option; activated via the combobox input + aria-activedescendant, options aren't individually focusable -->\n <li\n class=\"option create-row\"\n role=\"option\"\n dsTooltip\n dsTooltipWhenClipped\n dsTooltipTextSelector=\".option-label\"\n [id]=\"optionId(visibleOptions().length)\"\n [class.is-active]=\"activeIndex() === visibleOptions().length\"\n [attr.aria-selected]=\"false\"\n (click)=\"onCreateNew()\"\n (mouseenter)=\"\n cursorFromKeyboard.set(false);\n activeIndex.set(visibleOptions().length)\n \">\n <ds-icon\n name=\"plus\"\n class=\"create-icon\"\n [size]=\"16\" />\n\n <span\n class=\"option-label\">\n @if (createTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: query().trim(),\n query: query().trim(),\n }\" />\n } @else {\n {{ intl().picker.create(query().trim()) }}\n }\n </span>\n </li>\n }\n </ul>\n\n @if (panelFooterTemplate(); as tpl) {\n <div class=\"panel-footer\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n count: filteredOptions().length,\n total: allOptions().length,\n query: query(),\n }\" />\n </div>\n }\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["firstEnabledOf","lastEnabledOf"],"mappings":";;;;;;;;;;;;;;;AAmFA,IAAI,MAAM,GAAG,CAAC;AA8BR,MAAO,qBACX,SAAQ,sBAA+C,CAAA;AAGvD;AACwE;IACrD,OAAO,GAAG,YAAY,EAAE;AAE1B,IAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACzB,IAAA,GAAG,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC9B,IAAA,IAAI,GAAG,MAAM,EAAC,UAAuB,EAAC;AACpC,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;AACzC;;;AAGkF;AACjE,IAAA,WAAW,GAAG;QAC7B,8BAA8B;QAC9B,+BAA+B;QAC/B,+BAA+B;QAC/B,+BAA+B;QAC/B,kCAAkC;QAClC,qCAAqC;QACrC,yBAAyB;KAC1B;;AAGQ,IAAA,OAAO,GAAG,KAAK,C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AAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAEyB,wBAAwB,CAAA,EAAA,EAAA,GAAE;AACxE,4BAAA,IAAI,EAAE,WAAW;AAClB,yBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MACgD,yBAAyB,CAAA,EAAA,EAAA,GAAE;AAC1E,4BAAA,IAAI,EAAE,WAAW;AAClB,yBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAM6C,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAEJ,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAEhB,OAAO,iEACY,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEvUzE;;AAEG;;;;"}
@@ -1,9 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { model, input, output, inject, DOCUMENT, viewChild, signal, computed, effect, ViewEncapsulation, Component } from '@angular/core';
3
- import * as i1 from '@angular/cdk/a11y';
3
+ import * as i2 from '@angular/cdk/a11y';
4
4
  import { A11yModule } from '@angular/cdk/a11y';
5
5
  import { BodyScrollLockService } from '@ids-group-ltd/ids-design-system/overlay';
6
6
  import { backdropDismiss } from '@ids-group-ltd/ids-design-system/core';
7
+ import * as i1 from '@ids-group-ltd/ids-design-system/components';
8
+ import { DsStaticPreview } from '@ids-group-ltd/ids-design-system/components';
7
9
 
8
10
  let nextId = 0;
9
11
  /** Bottom-anchored sheet — the mobile sibling of ds-drawer. Closes on scrim
@@ -29,6 +31,7 @@ class BottomSheetComponent {
29
31
  snapPoints = input([], ...(ngDevMode ? [{ debugName: "snapPoints" }] : /* istanbul ignore next */ []));
30
32
  doc = inject(DOCUMENT);
31
33
  scrollLock = inject(BodyScrollLockService);
34
+ preview = inject(DsStaticPreview);
32
35
  sheetRef = viewChild('sheet', ...(ngDevMode ? [{ debugName: "sheetRef" }] : /* istanbul ignore next */ []));
33
36
  dragOffset = signal(null, ...(ngDevMode ? [{ debugName: "dragOffset" }] : /* istanbul ignore next */ []));
34
37
  /** Sheet is in the DOM (kept true through the leave animation). */
@@ -57,6 +60,9 @@ class BottomSheetComponent {
57
60
  // sheet mounted and flips `closing` so the leave animation can play
58
61
  // (teardown in onLeaveEnd, or the timer below).
59
62
  effect(() => {
63
+ if (this.preview.staticPreview()) {
64
+ return;
65
+ }
60
66
  const isOpen = this.open();
61
67
  if (isOpen) {
62
68
  this.closing.set(false);
@@ -81,7 +87,7 @@ class BottomSheetComponent {
81
87
  // overlays don't unlock each other. The cleanup fires on the rendered→false
82
88
  // transition and on destroy, keeping lock/unlock paired.
83
89
  effect((onCleanup) => {
84
- if (!this.rendered()) {
90
+ if (this.preview.staticPreview() || !this.rendered()) {
85
91
  return;
86
92
  }
87
93
  this.scrollLock.lock();
@@ -93,6 +99,9 @@ class BottomSheetComponent {
93
99
  this.closeFallbackTimer = null;
94
100
  }
95
101
  close() {
102
+ if (this.preview.staticPreview()) {
103
+ return;
104
+ }
96
105
  this.dragOffset.set(null);
97
106
  this.open.set(false);
98
107
  }
@@ -127,6 +136,9 @@ class BottomSheetComponent {
127
136
  }
128
137
  }
129
138
  onGrabStart(event) {
139
+ if (this.preview.staticPreview()) {
140
+ return;
141
+ }
130
142
  event.target.setPointerCapture(event.pointerId);
131
143
  this.dragStartY = event.clientY;
132
144
  this.lastMoveY = event.clientY;
@@ -190,11 +202,11 @@ class BottomSheetComponent {
190
202
  this.activeSnapIndex.set(nearestIndex);
191
203
  }
192
204
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: BottomSheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
193
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: BottomSheetComponent, isStandalone: true, selector: "ds-bottom-sheet", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, snapPoints: { classPropertyName: "snapPoints", publicName: "snapPoints", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", closed: "closed" }, host: { properties: { "attr.title": "null" } }, viewQueries: [{ propertyName: "sheetRef", first: true, predicate: ["sheet"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (rendered()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) on this element, a backdrop isn't a tabbable control -->\n <div\n class=\"sheet-overlay\"\n [class.closing]=\"closing()\"\n (pointerdown)=\"backdropPress.down($event)\"\n (pointerup)=\"onBackdropRelease($event)\"\n (keydown.escape)=\"onEscape()\">\n <div\n #sheet\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n class=\"sheet\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n [class.dragging]=\"dragOffset() !== null\"\n [class.closing]=\"closing()\"\n [class.snapping]=\"snapPoints().length > 0 && dragOffset() === null\"\n [style.transform]=\"\n dragOffset() ? 'translateY(' + dragOffset() + 'px)' : null\n \"\n [style.height]=\"snapHeight()\"\n [style.maxHeight]=\"snapHeight() ? snapHeight() : null\"\n (animationend)=\"onLeaveEnd($event)\">\n <div\n class=\"grab\"\n (pointerdown)=\"onGrabStart($event)\"\n (pointermove)=\"onGrabMove($event)\"\n (pointerup)=\"onGrabEnd()\"\n (pointercancel)=\"onGrabEnd()\">\n <div class=\"sheet-handle\"></div>\n </div>\n\n @if (title()) {\n <h3\n class=\"sheet-title\"\n [id]=\"titleId\">\n {{ title() }}\n </h3>\n }\n\n <div class=\"sheet-body\">\n <ng-content />\n </div>\n\n <div class=\"sheet-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n </div>\n}\n", styles: [":host{--_bottom-sheet-max-width: var(--ds-bottom-sheet-max-width, 480px);--_bottom-sheet-max-height: var(--ds-bottom-sheet-max-height, 80%);--_bottom-sheet-radius: var(--ds-bottom-sheet-radius, var(--ds-radius-panel));--_bottom-sheet-bg-color: var(--ds-bottom-sheet-bg-color, var(--surface-default));--_bottom-sheet-scrim-color: var(--ds-bottom-sheet-scrim-color, var(--surface-scrim));--_bottom-sheet-title-text-color: var(--ds-bottom-sheet-title-text-color, var(--text-primary));--_bottom-sheet-enter-keyframes: var(--ds-bottom-sheet-enter-keyframes, ds-slide-edge-in);--_bottom-sheet-leave-keyframes: var(--ds-bottom-sheet-leave-keyframes, ds-slide-edge-out);--_bottom-sheet-enter-duration: var(--ds-bottom-sheet-enter-duration, var(--ds-motion-enter-surface-duration));--_bottom-sheet-enter-easing: var(--ds-bottom-sheet-enter-easing, var(--ds-motion-enter-surface-easing));--_bottom-sheet-leave-duration: var(--ds-bottom-sheet-leave-duration, var(--ds-motion-exit-large-duration));--_bottom-sheet-leave-easing: var(--ds-bottom-sheet-leave-easing, var(--ds-motion-exit-large-easing));--_bottom-sheet-scrim-enter-duration: var(--ds-bottom-sheet-enter-duration, var(--ds-motion-enter-panel-duration));--_bottom-sheet-scrim-leave-duration: var(--ds-bottom-sheet-leave-duration, var(--ds-motion-exit-duration));--_ds-enter-scale: var(--ds-bottom-sheet-enter-scale, .96);display:contents}@media(prefers-reduced-motion:reduce){:host{--_bottom-sheet-enter-duration: 0ms;--_bottom-sheet-leave-duration: 0ms;--_bottom-sheet-scrim-enter-duration: 0ms;--_bottom-sheet-scrim-leave-duration: 0ms}}.sheet-overlay{position:fixed;inset:0;z-index:var(--layer-modal);background:var(--_bottom-sheet-scrim-color);display:flex;flex-direction:column;justify-content:flex-end;overflow:clip;animation-name:ds-fade-in;animation-duration:var(--_bottom-sheet-scrim-enter-duration);animation-timing-function:var(--_bottom-sheet-enter-easing)}.sheet-overlay.closing{animation-name:ds-fade-out;animation-duration:var(--_bottom-sheet-scrim-leave-duration);animation-timing-function:var(--_bottom-sheet-leave-easing);animation-fill-mode:forwards;pointer-events:none}.sheet{--_ds-enter-y: 100%;position:relative;width:min(100%,var(--_bottom-sheet-max-width));margin-inline:auto;background:var(--_bottom-sheet-bg-color);border-radius:var(--_bottom-sheet-radius) var(--_bottom-sheet-radius) 0 0;padding:0 var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom,0px));animation-name:var(--_bottom-sheet-enter-keyframes);animation-duration:var(--_bottom-sheet-enter-duration);animation-timing-function:var(--_bottom-sheet-enter-easing);max-height:var(--_bottom-sheet-max-height);display:flex;flex-direction:column;transition:transform var(--duration-base) var(--ease-decelerate)}.sheet.dragging{transition:none}.sheet.snapping{transition:transform var(--duration-base) var(--ease-decelerate),height var(--duration-base) var(--ease-decelerate)}@media(prefers-reduced-motion:reduce){.sheet.snapping{transition:none}}.sheet.closing{animation-name:var(--_bottom-sheet-leave-keyframes);animation-duration:var(--_bottom-sheet-leave-duration);animation-timing-function:var(--_bottom-sheet-leave-easing);animation-fill-mode:forwards}.grab{padding:var(--space-3) 0;margin:0 calc(var(--space-4) * -1);cursor:grab;touch-action:none}.sheet-handle{width:var(--bottom-sheet-handle-w);height:var(--bottom-sheet-handle-h);background:var(--border-strong);border-radius:var(--radius-pill);margin:0 auto}.sheet-title{font:var(--font-weight-semibold) var(--font-size-l)/var(--line-height-snug) var(--font-sans);color:var(--_bottom-sheet-title-text-color);margin:0 0 var(--space-3)}.sheet-body{display:flex;flex-direction:column;gap:var(--space-2);overflow-y:auto;min-height:0;padding:var(--space-1);margin:calc(var(--space-1) * -1)}.sheet-actions{display:flex;flex-direction:column;gap:var(--space-2)}.sheet-actions:not(:empty){margin-top:var(--space-3)}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] });
205
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: BottomSheetComponent, isStandalone: true, selector: "ds-bottom-sheet", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, snapPoints: { classPropertyName: "snapPoints", publicName: "snapPoints", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", closed: "closed" }, host: { properties: { "attr.title": "null" } }, viewQueries: [{ propertyName: "sheetRef", first: true, predicate: ["sheet"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DsStaticPreview, inputs: ["staticPreview", "staticPreview"] }], ngImport: i0, template: "@if (rendered() || preview.staticPreview()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) on this element, a backdrop isn't a tabbable control -->\n <div\n [class]=\"preview.staticPreview() ? 'sheet-static' : 'sheet-overlay'\"\n [class.closing]=\"closing()\"\n (pointerdown)=\"backdropPress.down($event)\"\n (pointerup)=\"onBackdropRelease($event)\"\n (keydown.escape)=\"onEscape()\">\n <div\n #sheet\n class=\"sheet\"\n role=\"dialog\"\n [cdkTrapFocus]=\"!preview.staticPreview()\"\n [cdkTrapFocusAutoCapture]=\"!preview.staticPreview()\"\n [attr.aria-modal]=\"preview.staticPreview() ? null : 'true'\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n [class.dragging]=\"dragOffset() !== null\"\n [class.closing]=\"closing()\"\n [class.snapping]=\"snapPoints().length > 0 && dragOffset() === null\"\n [style.transform]=\"\n dragOffset() ? 'translateY(' + dragOffset() + 'px)' : null\n \"\n [style.height]=\"snapHeight()\"\n [style.maxHeight]=\"snapHeight() ? snapHeight() : null\"\n (animationend)=\"onLeaveEnd($event)\">\n <div\n class=\"grab\"\n (pointerdown)=\"onGrabStart($event)\"\n (pointermove)=\"onGrabMove($event)\"\n (pointerup)=\"onGrabEnd()\"\n (pointercancel)=\"onGrabEnd()\">\n <div class=\"sheet-handle\"></div>\n </div>\n\n @if (title()) {\n <h3\n class=\"sheet-title\"\n [id]=\"titleId\">\n {{ title() }}\n </h3>\n }\n\n <div class=\"sheet-body\">\n <ng-content />\n </div>\n\n <div class=\"sheet-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n </div>\n}\n", styles: [":host{--_bottom-sheet-max-width: var(--ds-bottom-sheet-max-width, 480px);--_bottom-sheet-max-height: var(--ds-bottom-sheet-max-height, 80%);--_bottom-sheet-radius: var(--ds-bottom-sheet-radius, var(--ds-radius-panel));--_bottom-sheet-bg-color: var(--ds-bottom-sheet-bg-color, var(--surface-default));--_bottom-sheet-scrim-color: var(--ds-bottom-sheet-scrim-color, var(--surface-scrim));--_bottom-sheet-title-text-color: var(--ds-bottom-sheet-title-text-color, var(--text-primary));--_bottom-sheet-enter-keyframes: var(--ds-bottom-sheet-enter-keyframes, ds-slide-edge-in);--_bottom-sheet-leave-keyframes: var(--ds-bottom-sheet-leave-keyframes, ds-slide-edge-out);--_bottom-sheet-enter-duration: var(--ds-bottom-sheet-enter-duration, var(--ds-motion-enter-surface-duration));--_bottom-sheet-enter-easing: var(--ds-bottom-sheet-enter-easing, var(--ds-motion-enter-surface-easing));--_bottom-sheet-leave-duration: var(--ds-bottom-sheet-leave-duration, var(--ds-motion-exit-large-duration));--_bottom-sheet-leave-easing: var(--ds-bottom-sheet-leave-easing, var(--ds-motion-exit-large-easing));--_bottom-sheet-scrim-enter-duration: var(--ds-bottom-sheet-enter-duration, var(--ds-motion-enter-panel-duration));--_bottom-sheet-scrim-leave-duration: var(--ds-bottom-sheet-leave-duration, var(--ds-motion-exit-duration));--_ds-enter-scale: var(--ds-bottom-sheet-enter-scale, .96);display:contents}@media(prefers-reduced-motion:reduce){:host{--_bottom-sheet-enter-duration: 0ms;--_bottom-sheet-leave-duration: 0ms;--_bottom-sheet-scrim-enter-duration: 0ms;--_bottom-sheet-scrim-leave-duration: 0ms}}.sheet-overlay{position:fixed;inset:0;z-index:var(--layer-modal);background:var(--_bottom-sheet-scrim-color);display:flex;flex-direction:column;justify-content:flex-end;overflow:clip;animation-name:ds-fade-in;animation-duration:var(--_bottom-sheet-scrim-enter-duration);animation-timing-function:var(--_bottom-sheet-enter-easing)}.sheet-overlay.closing{animation-name:ds-fade-out;animation-duration:var(--_bottom-sheet-scrim-leave-duration);animation-timing-function:var(--_bottom-sheet-leave-easing);animation-fill-mode:forwards;pointer-events:none}.sheet-static{display:contents}.sheet-static .sheet{animation:none}.sheet{--_ds-enter-y: 100%;position:relative;width:min(100%,var(--_bottom-sheet-max-width));margin-inline:auto;background:var(--_bottom-sheet-bg-color);border-radius:var(--_bottom-sheet-radius) var(--_bottom-sheet-radius) 0 0;padding:0 var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom,0px));animation-name:var(--_bottom-sheet-enter-keyframes);animation-duration:var(--_bottom-sheet-enter-duration);animation-timing-function:var(--_bottom-sheet-enter-easing);max-height:var(--_bottom-sheet-max-height);display:flex;flex-direction:column;transition:transform var(--duration-base) var(--ease-decelerate)}.sheet.dragging{transition:none}.sheet.snapping{transition:transform var(--duration-base) var(--ease-decelerate),height var(--duration-base) var(--ease-decelerate)}@media(prefers-reduced-motion:reduce){.sheet.snapping{transition:none}}.sheet.closing{animation-name:var(--_bottom-sheet-leave-keyframes);animation-duration:var(--_bottom-sheet-leave-duration);animation-timing-function:var(--_bottom-sheet-leave-easing);animation-fill-mode:forwards}.grab{padding:var(--space-3) 0;margin:0 calc(var(--space-4) * -1);cursor:grab;touch-action:none}.sheet-handle{width:var(--bottom-sheet-handle-w);height:var(--bottom-sheet-handle-h);background:var(--border-strong);border-radius:var(--radius-pill);margin:0 auto}.sheet-title{font:var(--font-weight-semibold) var(--font-size-l)/var(--line-height-snug) var(--font-sans);color:var(--_bottom-sheet-title-text-color);margin:0 0 var(--space-3)}.sheet-body{display:flex;flex-direction:column;gap:var(--space-2);overflow-y:auto;min-height:0;padding:var(--space-1);margin:calc(var(--space-1) * -1)}.sheet-actions{display:flex;flex-direction:column;gap:var(--space-2)}.sheet-actions:not(:empty){margin-top:var(--space-3)}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] });
194
206
  }
195
207
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: BottomSheetComponent, decorators: [{
196
208
  type: Component,
197
- args: [{ selector: 'ds-bottom-sheet', standalone: true, imports: [A11yModule], host: { '[attr.title]': 'null' }, encapsulation: ViewEncapsulation.Emulated, template: "@if (rendered()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) on this element, a backdrop isn't a tabbable control -->\n <div\n class=\"sheet-overlay\"\n [class.closing]=\"closing()\"\n (pointerdown)=\"backdropPress.down($event)\"\n (pointerup)=\"onBackdropRelease($event)\"\n (keydown.escape)=\"onEscape()\">\n <div\n #sheet\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n class=\"sheet\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n [class.dragging]=\"dragOffset() !== null\"\n [class.closing]=\"closing()\"\n [class.snapping]=\"snapPoints().length > 0 && dragOffset() === null\"\n [style.transform]=\"\n dragOffset() ? 'translateY(' + dragOffset() + 'px)' : null\n \"\n [style.height]=\"snapHeight()\"\n [style.maxHeight]=\"snapHeight() ? snapHeight() : null\"\n (animationend)=\"onLeaveEnd($event)\">\n <div\n class=\"grab\"\n (pointerdown)=\"onGrabStart($event)\"\n (pointermove)=\"onGrabMove($event)\"\n (pointerup)=\"onGrabEnd()\"\n (pointercancel)=\"onGrabEnd()\">\n <div class=\"sheet-handle\"></div>\n </div>\n\n @if (title()) {\n <h3\n class=\"sheet-title\"\n [id]=\"titleId\">\n {{ title() }}\n </h3>\n }\n\n <div class=\"sheet-body\">\n <ng-content />\n </div>\n\n <div class=\"sheet-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n </div>\n}\n", styles: [":host{--_bottom-sheet-max-width: var(--ds-bottom-sheet-max-width, 480px);--_bottom-sheet-max-height: var(--ds-bottom-sheet-max-height, 80%);--_bottom-sheet-radius: var(--ds-bottom-sheet-radius, var(--ds-radius-panel));--_bottom-sheet-bg-color: var(--ds-bottom-sheet-bg-color, var(--surface-default));--_bottom-sheet-scrim-color: var(--ds-bottom-sheet-scrim-color, var(--surface-scrim));--_bottom-sheet-title-text-color: var(--ds-bottom-sheet-title-text-color, var(--text-primary));--_bottom-sheet-enter-keyframes: var(--ds-bottom-sheet-enter-keyframes, ds-slide-edge-in);--_bottom-sheet-leave-keyframes: var(--ds-bottom-sheet-leave-keyframes, ds-slide-edge-out);--_bottom-sheet-enter-duration: var(--ds-bottom-sheet-enter-duration, var(--ds-motion-enter-surface-duration));--_bottom-sheet-enter-easing: var(--ds-bottom-sheet-enter-easing, var(--ds-motion-enter-surface-easing));--_bottom-sheet-leave-duration: var(--ds-bottom-sheet-leave-duration, var(--ds-motion-exit-large-duration));--_bottom-sheet-leave-easing: var(--ds-bottom-sheet-leave-easing, var(--ds-motion-exit-large-easing));--_bottom-sheet-scrim-enter-duration: var(--ds-bottom-sheet-enter-duration, var(--ds-motion-enter-panel-duration));--_bottom-sheet-scrim-leave-duration: var(--ds-bottom-sheet-leave-duration, var(--ds-motion-exit-duration));--_ds-enter-scale: var(--ds-bottom-sheet-enter-scale, .96);display:contents}@media(prefers-reduced-motion:reduce){:host{--_bottom-sheet-enter-duration: 0ms;--_bottom-sheet-leave-duration: 0ms;--_bottom-sheet-scrim-enter-duration: 0ms;--_bottom-sheet-scrim-leave-duration: 0ms}}.sheet-overlay{position:fixed;inset:0;z-index:var(--layer-modal);background:var(--_bottom-sheet-scrim-color);display:flex;flex-direction:column;justify-content:flex-end;overflow:clip;animation-name:ds-fade-in;animation-duration:var(--_bottom-sheet-scrim-enter-duration);animation-timing-function:var(--_bottom-sheet-enter-easing)}.sheet-overlay.closing{animation-name:ds-fade-out;animation-duration:var(--_bottom-sheet-scrim-leave-duration);animation-timing-function:var(--_bottom-sheet-leave-easing);animation-fill-mode:forwards;pointer-events:none}.sheet{--_ds-enter-y: 100%;position:relative;width:min(100%,var(--_bottom-sheet-max-width));margin-inline:auto;background:var(--_bottom-sheet-bg-color);border-radius:var(--_bottom-sheet-radius) var(--_bottom-sheet-radius) 0 0;padding:0 var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom,0px));animation-name:var(--_bottom-sheet-enter-keyframes);animation-duration:var(--_bottom-sheet-enter-duration);animation-timing-function:var(--_bottom-sheet-enter-easing);max-height:var(--_bottom-sheet-max-height);display:flex;flex-direction:column;transition:transform var(--duration-base) var(--ease-decelerate)}.sheet.dragging{transition:none}.sheet.snapping{transition:transform var(--duration-base) var(--ease-decelerate),height var(--duration-base) var(--ease-decelerate)}@media(prefers-reduced-motion:reduce){.sheet.snapping{transition:none}}.sheet.closing{animation-name:var(--_bottom-sheet-leave-keyframes);animation-duration:var(--_bottom-sheet-leave-duration);animation-timing-function:var(--_bottom-sheet-leave-easing);animation-fill-mode:forwards}.grab{padding:var(--space-3) 0;margin:0 calc(var(--space-4) * -1);cursor:grab;touch-action:none}.sheet-handle{width:var(--bottom-sheet-handle-w);height:var(--bottom-sheet-handle-h);background:var(--border-strong);border-radius:var(--radius-pill);margin:0 auto}.sheet-title{font:var(--font-weight-semibold) var(--font-size-l)/var(--line-height-snug) var(--font-sans);color:var(--_bottom-sheet-title-text-color);margin:0 0 var(--space-3)}.sheet-body{display:flex;flex-direction:column;gap:var(--space-2);overflow-y:auto;min-height:0;padding:var(--space-1);margin:calc(var(--space-1) * -1)}.sheet-actions{display:flex;flex-direction:column;gap:var(--space-2)}.sheet-actions:not(:empty){margin-top:var(--space-3)}\n"] }]
209
+ args: [{ selector: 'ds-bottom-sheet', standalone: true, imports: [A11yModule], host: { '[attr.title]': 'null' }, encapsulation: ViewEncapsulation.Emulated, hostDirectives: [{ directive: DsStaticPreview, inputs: ['staticPreview'] }], template: "@if (rendered() || preview.staticPreview()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) on this element, a backdrop isn't a tabbable control -->\n <div\n [class]=\"preview.staticPreview() ? 'sheet-static' : 'sheet-overlay'\"\n [class.closing]=\"closing()\"\n (pointerdown)=\"backdropPress.down($event)\"\n (pointerup)=\"onBackdropRelease($event)\"\n (keydown.escape)=\"onEscape()\">\n <div\n #sheet\n class=\"sheet\"\n role=\"dialog\"\n [cdkTrapFocus]=\"!preview.staticPreview()\"\n [cdkTrapFocusAutoCapture]=\"!preview.staticPreview()\"\n [attr.aria-modal]=\"preview.staticPreview() ? null : 'true'\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n [class.dragging]=\"dragOffset() !== null\"\n [class.closing]=\"closing()\"\n [class.snapping]=\"snapPoints().length > 0 && dragOffset() === null\"\n [style.transform]=\"\n dragOffset() ? 'translateY(' + dragOffset() + 'px)' : null\n \"\n [style.height]=\"snapHeight()\"\n [style.maxHeight]=\"snapHeight() ? snapHeight() : null\"\n (animationend)=\"onLeaveEnd($event)\">\n <div\n class=\"grab\"\n (pointerdown)=\"onGrabStart($event)\"\n (pointermove)=\"onGrabMove($event)\"\n (pointerup)=\"onGrabEnd()\"\n (pointercancel)=\"onGrabEnd()\">\n <div class=\"sheet-handle\"></div>\n </div>\n\n @if (title()) {\n <h3\n class=\"sheet-title\"\n [id]=\"titleId\">\n {{ title() }}\n </h3>\n }\n\n <div class=\"sheet-body\">\n <ng-content />\n </div>\n\n <div class=\"sheet-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n </div>\n}\n", styles: [":host{--_bottom-sheet-max-width: var(--ds-bottom-sheet-max-width, 480px);--_bottom-sheet-max-height: var(--ds-bottom-sheet-max-height, 80%);--_bottom-sheet-radius: var(--ds-bottom-sheet-radius, var(--ds-radius-panel));--_bottom-sheet-bg-color: var(--ds-bottom-sheet-bg-color, var(--surface-default));--_bottom-sheet-scrim-color: var(--ds-bottom-sheet-scrim-color, var(--surface-scrim));--_bottom-sheet-title-text-color: var(--ds-bottom-sheet-title-text-color, var(--text-primary));--_bottom-sheet-enter-keyframes: var(--ds-bottom-sheet-enter-keyframes, ds-slide-edge-in);--_bottom-sheet-leave-keyframes: var(--ds-bottom-sheet-leave-keyframes, ds-slide-edge-out);--_bottom-sheet-enter-duration: var(--ds-bottom-sheet-enter-duration, var(--ds-motion-enter-surface-duration));--_bottom-sheet-enter-easing: var(--ds-bottom-sheet-enter-easing, var(--ds-motion-enter-surface-easing));--_bottom-sheet-leave-duration: var(--ds-bottom-sheet-leave-duration, var(--ds-motion-exit-large-duration));--_bottom-sheet-leave-easing: var(--ds-bottom-sheet-leave-easing, var(--ds-motion-exit-large-easing));--_bottom-sheet-scrim-enter-duration: var(--ds-bottom-sheet-enter-duration, var(--ds-motion-enter-panel-duration));--_bottom-sheet-scrim-leave-duration: var(--ds-bottom-sheet-leave-duration, var(--ds-motion-exit-duration));--_ds-enter-scale: var(--ds-bottom-sheet-enter-scale, .96);display:contents}@media(prefers-reduced-motion:reduce){:host{--_bottom-sheet-enter-duration: 0ms;--_bottom-sheet-leave-duration: 0ms;--_bottom-sheet-scrim-enter-duration: 0ms;--_bottom-sheet-scrim-leave-duration: 0ms}}.sheet-overlay{position:fixed;inset:0;z-index:var(--layer-modal);background:var(--_bottom-sheet-scrim-color);display:flex;flex-direction:column;justify-content:flex-end;overflow:clip;animation-name:ds-fade-in;animation-duration:var(--_bottom-sheet-scrim-enter-duration);animation-timing-function:var(--_bottom-sheet-enter-easing)}.sheet-overlay.closing{animation-name:ds-fade-out;animation-duration:var(--_bottom-sheet-scrim-leave-duration);animation-timing-function:var(--_bottom-sheet-leave-easing);animation-fill-mode:forwards;pointer-events:none}.sheet-static{display:contents}.sheet-static .sheet{animation:none}.sheet{--_ds-enter-y: 100%;position:relative;width:min(100%,var(--_bottom-sheet-max-width));margin-inline:auto;background:var(--_bottom-sheet-bg-color);border-radius:var(--_bottom-sheet-radius) var(--_bottom-sheet-radius) 0 0;padding:0 var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom,0px));animation-name:var(--_bottom-sheet-enter-keyframes);animation-duration:var(--_bottom-sheet-enter-duration);animation-timing-function:var(--_bottom-sheet-enter-easing);max-height:var(--_bottom-sheet-max-height);display:flex;flex-direction:column;transition:transform var(--duration-base) var(--ease-decelerate)}.sheet.dragging{transition:none}.sheet.snapping{transition:transform var(--duration-base) var(--ease-decelerate),height var(--duration-base) var(--ease-decelerate)}@media(prefers-reduced-motion:reduce){.sheet.snapping{transition:none}}.sheet.closing{animation-name:var(--_bottom-sheet-leave-keyframes);animation-duration:var(--_bottom-sheet-leave-duration);animation-timing-function:var(--_bottom-sheet-leave-easing);animation-fill-mode:forwards}.grab{padding:var(--space-3) 0;margin:0 calc(var(--space-4) * -1);cursor:grab;touch-action:none}.sheet-handle{width:var(--bottom-sheet-handle-w);height:var(--bottom-sheet-handle-h);background:var(--border-strong);border-radius:var(--radius-pill);margin:0 auto}.sheet-title{font:var(--font-weight-semibold) var(--font-size-l)/var(--line-height-snug) var(--font-sans);color:var(--_bottom-sheet-title-text-color);margin:0 0 var(--space-3)}.sheet-body{display:flex;flex-direction:column;gap:var(--space-2);overflow-y:auto;min-height:0;padding:var(--space-1);margin:calc(var(--space-1) * -1)}.sheet-actions{display:flex;flex-direction:column;gap:var(--space-2)}.sheet-actions:not(:empty){margin-top:var(--space-3)}\n"] }]
198
210
  }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], closed: [{ type: i0.Output, args: ["closed"] }], snapPoints: [{ type: i0.Input, args: [{ isSignal: true, alias: "snapPoints", required: false }] }], sheetRef: [{ type: i0.ViewChild, args: ['sheet', { isSignal: true }] }] } });
199
211
 
200
212
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-bottom-sheet.mjs","sources":["../../../src/lib/components/bottom-sheet/bottom-sheet.component.ts","../../../src/lib/components/bottom-sheet/bottom-sheet.component.html","../../../src/lib/components/bottom-sheet/ids-group-ltd-ids-design-system-components-bottom-sheet.ts"],"sourcesContent":["import {\n Component,\n DOCUMENT,\n ElementRef,\n type OnDestroy,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { BodyScrollLockService } from '@ids-group-ltd/ids-design-system/overlay';\nimport { backdropDismiss } from '@ids-group-ltd/ids-design-system/core';\n\nlet nextId = 0;\n\n/** Bottom-anchored sheet — the mobile sibling of ds-drawer. Closes on scrim\n * tap, Escape, or a downward drag on the grab strip. While open it locks\n * body scroll. On wide viewports the panel is capped by\n * --ds-bottom-sheet-max-width and centred; prefer ds-modal / ds-drawer for\n * desktop-first layouts. position: fixed resolves against the nearest\n * ancestor containing block, so framed hosts contain the sheet. */\n@Component({\n selector: 'ds-bottom-sheet',\n standalone: true,\n imports: [A11yModule],\n templateUrl: './bottom-sheet.component.html',\n styleUrl: './bottom-sheet.component.scss',\n // A static `title=\"…\"` feeding the input below ALSO stays in the DOM as the global attribute,\n // which makes the host a native browser tooltip over everything inside it.\n host: { '[attr.title]': 'null' },\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class BottomSheetComponent implements OnDestroy {\n /** Open state, two-way bound. */\n readonly open = model<boolean>(false);\n /** Sheet title, shown in the header and used for `aria-labelledby`. */\n readonly title = input.required<string>();\n /** Fires once the close (leave) animation finishes. */\n readonly closed = output<void>();\n\n protected readonly titleId = `ds-bottom-sheet-title-${++nextId}`;\n /**\n * Snap-point heights as fractions of viewport height (0–1), ascending.\n * e.g. [0.4, 0.9]. When provided the sheet opens at the first snap point;\n * dragging snaps to the nearest point; dragging below the lowest closes.\n * When empty (default) the original single-height behavior is preserved.\n */\n readonly snapPoints = input<readonly number[]>([]);\n\n private readonly doc = inject(DOCUMENT);\n private readonly scrollLock = inject(BodyScrollLockService);\n private readonly sheetRef = viewChild<ElementRef<HTMLElement>>('sheet');\n\n protected readonly dragOffset = signal<number | null>(null);\n /** Sheet is in the DOM (kept true through the leave animation). */\n protected readonly rendered = signal(false);\n /** Playing the slide-down + scrim-fade leave animation. */\n protected readonly closing = signal(false);\n /** Index of the currently active snap point (only used when snapPoints is non-empty). */\n protected readonly activeSnapIndex = signal(0);\n\n /** CSS height string derived from the active snap point, or null when snapPoints is empty. */\n protected readonly snapHeight = computed(() => {\n const points = this.snapPoints();\n if (points.length === 0) {\n return null;\n }\n const index = Math.min(this.activeSnapIndex(), points.length - 1);\n\n return `${points[index] * 100}vh`;\n });\n\n private dragStartY = 0;\n private lastMoveY = 0;\n private lastMoveTime = 0;\n private velocity = 0;\n private wasOpen = false;\n private closeFallbackTimer: ReturnType<typeof setTimeout> | null = null;\n\n constructor() {\n // open → DOM lifecycle. Opening renders immediately; closing keeps the\n // sheet mounted and flips `closing` so the leave animation can play\n // (teardown in onLeaveEnd, or the timer below).\n effect(() => {\n const isOpen = this.open();\n if (isOpen) {\n this.closing.set(false);\n this.rendered.set(true);\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = null;\n if (this.snapPoints().length > 0) {\n this.activeSnapIndex.set(0);\n }\n } else if (this.wasOpen) {\n this.closing.set(true);\n // Two cases never deliver animationend: Chrome freezes CSS animations on a\n // backgrounded tab, and a 0s reduced-motion leave finishes before a listener\n // hears it. This timer is the teardown guarantee, not belt-and-braces.\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = setTimeout(() => this.finishClose(), 300);\n }\n this.wasOpen = isOpen;\n });\n\n // Ref-counted body-scroll lock, shared with modal/drawer so stacked\n // overlays don't unlock each other. The cleanup fires on the rendered→false\n // transition and on destroy, keeping lock/unlock paired.\n effect((onCleanup) => {\n if (!this.rendered()) {\n return;\n }\n this.scrollLock.lock();\n onCleanup(() => this.scrollLock.unlock());\n });\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = null;\n }\n\n protected close(): void {\n this.dragOffset.set(null);\n this.open.set(false);\n }\n\n protected onLeaveEnd(event: AnimationEvent): void {\n // The animated element is the one with the handler, so its OWN animationend is\n // the signal; anything bubbling from inside is not. This replaces matching the\n // keyframes NAME, which is what made the exit un-overridable.\n if (event.target !== event.currentTarget) {\n return;\n }\n this.finishClose();\n }\n\n private finishClose(): void {\n if (!this.closing()) {\n return;\n }\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = null;\n this.closing.set(false);\n this.rendered.set(false);\n this.closed.emit();\n }\n\n protected onEscape(): void {\n if (this.open()) {\n this.close();\n }\n }\n\n protected readonly backdropPress = backdropDismiss();\n\n protected onBackdropRelease(event: PointerEvent): void {\n if (this.backdropPress.shouldDismiss(event)) {\n this.close();\n }\n }\n\n protected onGrabStart(event: PointerEvent): void {\n (event.target as HTMLElement).setPointerCapture(event.pointerId);\n this.dragStartY = event.clientY;\n this.lastMoveY = event.clientY;\n this.lastMoveTime = event.timeStamp;\n this.velocity = 0;\n this.dragOffset.set(0);\n }\n\n protected onGrabMove(event: PointerEvent): void {\n if (this.dragOffset() === null) {\n return;\n }\n const deltaTime = event.timeStamp - this.lastMoveTime;\n if (deltaTime > 0) {\n this.velocity = (event.clientY - this.lastMoveY) / deltaTime;\n }\n this.lastMoveY = event.clientY;\n this.lastMoveTime = event.timeStamp;\n this.dragOffset.set(Math.max(0, event.clientY - this.dragStartY));\n }\n\n protected onGrabEnd(): void {\n const offset = this.dragOffset();\n if (offset === null) {\n return;\n }\n\n const points = this.snapPoints();\n\n if (points.length === 0) {\n // Original single-height behavior.\n const sheetHeight = this.sheetRef()?.nativeElement.offsetHeight ?? 0;\n const pastThreshold = sheetHeight > 0 && offset > sheetHeight * 0.3;\n const flicked = this.velocity > 0.5;\n if (pastThreshold || flicked) {\n this.close();\n } else {\n this.dragOffset.set(null);\n }\n\n return;\n }\n\n // Snap-point behavior: determine which snap point to land on.\n const viewportHeight =\n this.doc.defaultView?.innerHeight ?? window.innerHeight;\n const currentIndex = this.activeSnapIndex();\n const currentHeightPx = points[currentIndex] * viewportHeight;\n // Positive offset = dragged downward.\n const targetHeightPx = currentHeightPx - offset;\n const flicked = this.velocity > 0.5;\n\n if (flicked || targetHeightPx < points[0] * viewportHeight * 0.7) {\n // Dragged below lowest snap point or flicked down → close.\n this.close();\n\n return;\n }\n\n let nearestIndex = 0;\n let smallestDelta = Infinity;\n for (let pointIndex = 0; pointIndex < points.length; pointIndex++) {\n const delta = Math.abs(\n points[pointIndex] * viewportHeight - targetHeightPx,\n );\n if (delta < smallestDelta) {\n smallestDelta = delta;\n nearestIndex = pointIndex;\n }\n }\n\n this.dragOffset.set(null);\n this.activeSnapIndex.set(nearestIndex);\n }\n}\n","@if (rendered()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) on this element, a backdrop isn't a tabbable control -->\n <div\n class=\"sheet-overlay\"\n [class.closing]=\"closing()\"\n (pointerdown)=\"backdropPress.down($event)\"\n (pointerup)=\"onBackdropRelease($event)\"\n (keydown.escape)=\"onEscape()\">\n <div\n #sheet\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n class=\"sheet\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n [class.dragging]=\"dragOffset() !== null\"\n [class.closing]=\"closing()\"\n [class.snapping]=\"snapPoints().length > 0 && dragOffset() === null\"\n [style.transform]=\"\n dragOffset() ? 'translateY(' + dragOffset() + 'px)' : null\n \"\n [style.height]=\"snapHeight()\"\n [style.maxHeight]=\"snapHeight() ? snapHeight() : null\"\n (animationend)=\"onLeaveEnd($event)\">\n <div\n class=\"grab\"\n (pointerdown)=\"onGrabStart($event)\"\n (pointermove)=\"onGrabMove($event)\"\n (pointerup)=\"onGrabEnd()\"\n (pointercancel)=\"onGrabEnd()\">\n <div class=\"sheet-handle\"></div>\n </div>\n\n @if (title()) {\n <h3\n class=\"sheet-title\"\n [id]=\"titleId\">\n {{ title() }}\n </h3>\n }\n\n <div class=\"sheet-body\">\n <ng-content />\n </div>\n\n <div class=\"sheet-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAmBA,IAAI,MAAM,GAAG,CAAC;AAEd;;;;;AAKmE;MAYtD,oBAAoB,CAAA;;AAEtB,IAAA,IAAI,GAAG,KAAK,CAAU,KAAK,2EAAC;;AAE5B,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAU;;IAEhC,MAAM,GAAG,MAAM,EAAQ;AAEb,IAAA,OAAO,GAAG,CAAA,sBAAA,EAAyB,EAAE,MAAM,EAAE;AAChE;;;;;AAKG;AACM,IAAA,UAAU,GAAG,KAAK,CAAoB,EAAE,iFAAC;AAEjC,IAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;AACtB,IAAA,UAAU,GAAG,MAAM,CAAC,qBAAqB,CAAC;AAC1C,IAAA,QAAQ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AA,EAAA,IAAA,EAAA,YAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,UAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,OAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECtCjC,6nDAoDA,EAAA,MAAA,EAAA,CAAA,y0HAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDtBY,UAAU,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,cAAA,EAAA,yBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAQT,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAXhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,OAAA,EACP,CAAC,UAAU,CAAC,EAAA,IAAA,EAKf,EAAE,cAAc,EAAE,MAAM,EAAE,EAAA,aAAA,EACjB,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,6nDAAA,EAAA,MAAA,EAAA,CAAA,y0HAAA,CAAA,EAAA;idAqBsB,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEzDxE;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-bottom-sheet.mjs","sources":["../../../src/lib/components/bottom-sheet/bottom-sheet.component.ts","../../../src/lib/components/bottom-sheet/bottom-sheet.component.html","../../../src/lib/components/bottom-sheet/ids-group-ltd-ids-design-system-components-bottom-sheet.ts"],"sourcesContent":["import {\n Component,\n DOCUMENT,\n ElementRef,\n type OnDestroy,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { BodyScrollLockService } from '@ids-group-ltd/ids-design-system/overlay';\nimport { backdropDismiss } from '@ids-group-ltd/ids-design-system/core';\nimport { DsStaticPreview } from '@ids-group-ltd/ids-design-system/components';\n\nlet nextId = 0;\n\n/** Bottom-anchored sheet — the mobile sibling of ds-drawer. Closes on scrim\n * tap, Escape, or a downward drag on the grab strip. While open it locks\n * body scroll. On wide viewports the panel is capped by\n * --ds-bottom-sheet-max-width and centred; prefer ds-modal / ds-drawer for\n * desktop-first layouts. position: fixed resolves against the nearest\n * ancestor containing block, so framed hosts contain the sheet. */\n@Component({\n selector: 'ds-bottom-sheet',\n standalone: true,\n imports: [A11yModule],\n templateUrl: './bottom-sheet.component.html',\n styleUrl: './bottom-sheet.component.scss',\n // A static `title=\"…\"` feeding the input below ALSO stays in the DOM as the global attribute,\n // which makes the host a native browser tooltip over everything inside it.\n host: { '[attr.title]': 'null' },\n encapsulation: ViewEncapsulation.Emulated,\n hostDirectives: [{ directive: DsStaticPreview, inputs: ['staticPreview'] }],\n})\nexport class BottomSheetComponent implements OnDestroy {\n /** Open state, two-way bound. */\n readonly open = model<boolean>(false);\n /** Sheet title, shown in the header and used for `aria-labelledby`. */\n readonly title = input.required<string>();\n /** Fires once the close (leave) animation finishes. */\n readonly closed = output<void>();\n\n protected readonly titleId = `ds-bottom-sheet-title-${++nextId}`;\n /**\n * Snap-point heights as fractions of viewport height (0–1), ascending.\n * e.g. [0.4, 0.9]. When provided the sheet opens at the first snap point;\n * dragging snaps to the nearest point; dragging below the lowest closes.\n * When empty (default) the original single-height behavior is preserved.\n */\n readonly snapPoints = input<readonly number[]>([]);\n\n private readonly doc = inject(DOCUMENT);\n private readonly scrollLock = inject(BodyScrollLockService);\n protected readonly preview = inject(DsStaticPreview);\n private readonly sheetRef = viewChild<ElementRef<HTMLElement>>('sheet');\n\n protected readonly dragOffset = signal<number | null>(null);\n /** Sheet is in the DOM (kept true through the leave animation). */\n protected readonly rendered = signal(false);\n /** Playing the slide-down + scrim-fade leave animation. */\n protected readonly closing = signal(false);\n /** Index of the currently active snap point (only used when snapPoints is non-empty). */\n protected readonly activeSnapIndex = signal(0);\n\n /** CSS height string derived from the active snap point, or null when snapPoints is empty. */\n protected readonly snapHeight = computed(() => {\n const points = this.snapPoints();\n if (points.length === 0) {\n return null;\n }\n const index = Math.min(this.activeSnapIndex(), points.length - 1);\n\n return `${points[index] * 100}vh`;\n });\n\n private dragStartY = 0;\n private lastMoveY = 0;\n private lastMoveTime = 0;\n private velocity = 0;\n private wasOpen = false;\n private closeFallbackTimer: ReturnType<typeof setTimeout> | null = null;\n\n constructor() {\n // open → DOM lifecycle. Opening renders immediately; closing keeps the\n // sheet mounted and flips `closing` so the leave animation can play\n // (teardown in onLeaveEnd, or the timer below).\n effect(() => {\n if (this.preview.staticPreview()) {\n return;\n }\n const isOpen = this.open();\n if (isOpen) {\n this.closing.set(false);\n this.rendered.set(true);\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = null;\n if (this.snapPoints().length > 0) {\n this.activeSnapIndex.set(0);\n }\n } else if (this.wasOpen) {\n this.closing.set(true);\n // Two cases never deliver animationend: Chrome freezes CSS animations on a\n // backgrounded tab, and a 0s reduced-motion leave finishes before a listener\n // hears it. This timer is the teardown guarantee, not belt-and-braces.\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = setTimeout(() => this.finishClose(), 300);\n }\n this.wasOpen = isOpen;\n });\n\n // Ref-counted body-scroll lock, shared with modal/drawer so stacked\n // overlays don't unlock each other. The cleanup fires on the rendered→false\n // transition and on destroy, keeping lock/unlock paired.\n effect((onCleanup) => {\n if (this.preview.staticPreview() || !this.rendered()) {\n return;\n }\n this.scrollLock.lock();\n onCleanup(() => this.scrollLock.unlock());\n });\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = null;\n }\n\n protected close(): void {\n if (this.preview.staticPreview()) {\n return;\n }\n this.dragOffset.set(null);\n this.open.set(false);\n }\n\n protected onLeaveEnd(event: AnimationEvent): void {\n // The animated element is the one with the handler, so its OWN animationend is\n // the signal; anything bubbling from inside is not. This replaces matching the\n // keyframes NAME, which is what made the exit un-overridable.\n if (event.target !== event.currentTarget) {\n return;\n }\n this.finishClose();\n }\n\n private finishClose(): void {\n if (!this.closing()) {\n return;\n }\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = null;\n this.closing.set(false);\n this.rendered.set(false);\n this.closed.emit();\n }\n\n protected onEscape(): void {\n if (this.open()) {\n this.close();\n }\n }\n\n protected readonly backdropPress = backdropDismiss();\n\n protected onBackdropRelease(event: PointerEvent): void {\n if (this.backdropPress.shouldDismiss(event)) {\n this.close();\n }\n }\n\n protected onGrabStart(event: PointerEvent): void {\n if (this.preview.staticPreview()) {\n return;\n }\n (event.target as HTMLElement).setPointerCapture(event.pointerId);\n this.dragStartY = event.clientY;\n this.lastMoveY = event.clientY;\n this.lastMoveTime = event.timeStamp;\n this.velocity = 0;\n this.dragOffset.set(0);\n }\n\n protected onGrabMove(event: PointerEvent): void {\n if (this.dragOffset() === null) {\n return;\n }\n const deltaTime = event.timeStamp - this.lastMoveTime;\n if (deltaTime > 0) {\n this.velocity = (event.clientY - this.lastMoveY) / deltaTime;\n }\n this.lastMoveY = event.clientY;\n this.lastMoveTime = event.timeStamp;\n this.dragOffset.set(Math.max(0, event.clientY - this.dragStartY));\n }\n\n protected onGrabEnd(): void {\n const offset = this.dragOffset();\n if (offset === null) {\n return;\n }\n\n const points = this.snapPoints();\n\n if (points.length === 0) {\n // Original single-height behavior.\n const sheetHeight = this.sheetRef()?.nativeElement.offsetHeight ?? 0;\n const pastThreshold = sheetHeight > 0 && offset > sheetHeight * 0.3;\n const flicked = this.velocity > 0.5;\n if (pastThreshold || flicked) {\n this.close();\n } else {\n this.dragOffset.set(null);\n }\n\n return;\n }\n\n // Snap-point behavior: determine which snap point to land on.\n const viewportHeight =\n this.doc.defaultView?.innerHeight ?? window.innerHeight;\n const currentIndex = this.activeSnapIndex();\n const currentHeightPx = points[currentIndex] * viewportHeight;\n // Positive offset = dragged downward.\n const targetHeightPx = currentHeightPx - offset;\n const flicked = this.velocity > 0.5;\n\n if (flicked || targetHeightPx < points[0] * viewportHeight * 0.7) {\n // Dragged below lowest snap point or flicked down → close.\n this.close();\n\n return;\n }\n\n let nearestIndex = 0;\n let smallestDelta = Infinity;\n for (let pointIndex = 0; pointIndex < points.length; pointIndex++) {\n const delta = Math.abs(\n points[pointIndex] * viewportHeight - targetHeightPx,\n );\n if (delta < smallestDelta) {\n smallestDelta = delta;\n nearestIndex = pointIndex;\n }\n }\n\n this.dragOffset.set(null);\n this.activeSnapIndex.set(nearestIndex);\n }\n}\n","@if (rendered() || preview.staticPreview()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) on this element, a backdrop isn't a tabbable control -->\n <div\n [class]=\"preview.staticPreview() ? 'sheet-static' : 'sheet-overlay'\"\n [class.closing]=\"closing()\"\n (pointerdown)=\"backdropPress.down($event)\"\n (pointerup)=\"onBackdropRelease($event)\"\n (keydown.escape)=\"onEscape()\">\n <div\n #sheet\n class=\"sheet\"\n role=\"dialog\"\n [cdkTrapFocus]=\"!preview.staticPreview()\"\n [cdkTrapFocusAutoCapture]=\"!preview.staticPreview()\"\n [attr.aria-modal]=\"preview.staticPreview() ? null : 'true'\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n [class.dragging]=\"dragOffset() !== null\"\n [class.closing]=\"closing()\"\n [class.snapping]=\"snapPoints().length > 0 && dragOffset() === null\"\n [style.transform]=\"\n dragOffset() ? 'translateY(' + dragOffset() + 'px)' : null\n \"\n [style.height]=\"snapHeight()\"\n [style.maxHeight]=\"snapHeight() ? snapHeight() : null\"\n (animationend)=\"onLeaveEnd($event)\">\n <div\n class=\"grab\"\n (pointerdown)=\"onGrabStart($event)\"\n (pointermove)=\"onGrabMove($event)\"\n (pointerup)=\"onGrabEnd()\"\n (pointercancel)=\"onGrabEnd()\">\n <div class=\"sheet-handle\"></div>\n </div>\n\n @if (title()) {\n <h3\n class=\"sheet-title\"\n [id]=\"titleId\">\n {{ title() }}\n </h3>\n }\n\n <div class=\"sheet-body\">\n <ng-content />\n </div>\n\n <div class=\"sheet-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAoBA,IAAI,MAAM,GAAG,CAAC;AAEd;;;;;AAKmE;MAatD,oBAAoB,CAAA;;AAEtB,IAAA,IAAI,GAAG,KAAK,CAAU,KAAK,2EAAC;;AAE5B,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAU;;IAEhC,MAAM,GAAG,MAAM,EAAQ;AAEb,IAAA,OAAO,GAAG,CAAA,sBAAA,EAAyB,EAAE,MAAM,EAAE;AAChE;;;;;AAKG;AACM,IAAA,UAAU,GAAG,KAAK,CAAoB,EAAE,iFAAC;AAEjC,IAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;AACtB,IAAA,UAAU,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACxC,IAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC;AACnC,IAAA,QAAQ,GAAG,SAAS,CAA0B,OAAO,+EAAC;AAEpD,IAAA,UAAU,GAAG,MAAM,CAAgB,IAAI,iFAAC;;AAExC,IAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,+EAAC;;AAExB,IAAA,OAAO,GAAG,MAAM,CAAC,KAAK,8EAAC;;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