@sixbell-telco/sdk 1.1.0 → 1.2.0

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 (41) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/README.md +600 -166
  3. package/_index.css +34 -4
  4. package/components/badge/src/badge.component.d.ts +0 -4
  5. package/components/dialog/dialog-actions/dialog-actions.component.d.ts +8 -0
  6. package/components/dialog/dialog-content/dialog-content.component.d.ts +5 -0
  7. package/components/dialog/dialog-sub-title/dialog-sub-title.component.d.ts +5 -0
  8. package/components/dialog/dialog-title/dialog-title.component.d.ts +5 -0
  9. package/components/{modal → dialog}/index.d.ts +1 -1
  10. package/components/dialog/public-api.d.ts +5 -0
  11. package/components/dialog/src/dialog.component.d.ts +132 -0
  12. package/directives/auto-focus/src/autofocus.directive.d.ts +3 -3
  13. package/fesm2022/sixbell-telco-sdk-components-badge.mjs +1 -1
  14. package/fesm2022/sixbell-telco-sdk-components-badge.mjs.map +1 -1
  15. package/fesm2022/sixbell-telco-sdk-components-dialog.mjs +305 -0
  16. package/fesm2022/sixbell-telco-sdk-components-dialog.mjs.map +1 -0
  17. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +3 -0
  18. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
  19. package/fesm2022/sixbell-telco-sdk-components-toast.mjs +2 -2
  20. package/fesm2022/sixbell-telco-sdk-components-toast.mjs.map +1 -1
  21. package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs +3 -3
  22. package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs.map +1 -1
  23. package/fesm2022/sixbell-telco-sdk-utils-theme.mjs +221 -65
  24. package/fesm2022/sixbell-telco-sdk-utils-theme.mjs.map +1 -1
  25. package/fesm2022/sixbell-telco-sdk-utils-translation.mjs +211 -62
  26. package/fesm2022/sixbell-telco-sdk-utils-translation.mjs.map +1 -1
  27. package/package.json +13 -13
  28. package/sixbell-telco-sdk-1.2.0.tgz +0 -0
  29. package/utils/theme/README.md +185 -0
  30. package/utils/theme/src/theme.service.d.ts +168 -17
  31. package/utils/translation/README.md +274 -0
  32. package/utils/translation/public-api.d.ts +4 -0
  33. package/utils/translation/src/translation.service.d.ts +134 -49
  34. package/components/modal/modal-actions/modal-actions.component.d.ts +0 -8
  35. package/components/modal/modal-content/modal-content.component.d.ts +0 -5
  36. package/components/modal/modal-title/modal-title.component.d.ts +0 -5
  37. package/components/modal/public-api.d.ts +0 -4
  38. package/components/modal/src/modal.component.d.ts +0 -102
  39. package/fesm2022/sixbell-telco-sdk-components-modal.mjs +0 -202
  40. package/fesm2022/sixbell-telco-sdk-components-modal.mjs.map +0 -1
  41. package/sixbell-telco-sdk-1.1.0.tgz +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"sixbell-telco-sdk-components-forms-combobox.mjs","sources":["../../../projects/sdk/components/forms/combobox/src/combobox.component.ts","../../../projects/sdk/components/forms/combobox/src/combobox.component.html","../../../projects/sdk/components/forms/combobox/sixbell-telco-sdk-components-forms-combobox.ts"],"sourcesContent":["/**\n * @fileoverview Combobox Component\n *\n * A comprehensive combobox component with advanced features including:\n * - Single and multiple selection modes\n * - Real-time search with debouncing\n * - Keyboard navigation support (Arrow keys, Enter, Space)\n * - Form validation integration\n * - Accessibility compliance with CDK Listbox\n * - Customizable styling variants and sizes\n * - Animation states for smooth transitions\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n// ==============================================================================\n// IMPORTS\n// ==============================================================================\n\n// Angular CDK\nimport { CdkListbox, CdkOption } from '@angular/cdk/listbox';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { PortalModule } from '@angular/cdk/portal';\n\n// Angular Core\nimport {\n\tAfterViewInit,\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\teffect,\n\tElementRef,\n\tinject,\n\tinput,\n\tmodel,\n\toutput,\n\tsignal,\n\tviewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed, toObservable, toSignal } from '@angular/core/rxjs-interop';\n\n// Angular Forms\nimport { ControlValueAccessor, FormControl, FormGroup, FormsModule, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';\n\n// Third-party\nimport { TranslatePipe, TranslateService } from '@ngx-translate/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\n// Internal\nimport { BadgeComponent, BadgeSizeProps } from '@sixbell-telco/sdk/components/badge';\nimport { IconComponent } from '@sixbell-telco/sdk/components/icon';\nimport { matCheckOutline, matCloseOutline, matKeyboardArrowDownOutline, matSearchOutline } from '@sixbell-telco/sdk/components/icon/material/outline';\n\n// RxJS\nimport { debounceTime, distinctUntilChanged, startWith, Subject, switchMap } from 'rxjs';\n\n// ==============================================================================\n// TYPES AND INTERFACES\n// ==============================================================================\n\n/**\n * Available style variants for the combobox component\n */\nexport type ComboboxVariantProps = 'primary' | 'secondary' | 'tertiary' | 'accent' | 'info' | 'success' | 'error' | 'warning' | null | undefined;\n\n/**\n * Available size variants for the combobox component\n */\nexport type ComboboxSizeProps = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | null | undefined;\n\n/**\n * Props interface for the combobox component\n */\nexport type ComboboxProps = {\n\tvariant?: ComboboxVariantProps;\n\tsize?: ComboboxSizeProps;\n};\n\n/**\n * Animation states for the combobox overlay\n */\ntype AnimationState = 'closed' | 'opening' | 'open' | 'closing';\n\n/**\n * Selection type for the combobox\n */\ntype SelectionType = 'single' | 'multiple';\n\n/**\n * Event emitted when the search query changes\n */\nexport type ComboboxSearchQueryEvent = {\n\tquery: string;\n\tresults: any[];\n};\n\n// ==============================================================================\n// COMPONENT STYLES\n// ==============================================================================\n\n/**\n * Class variance authority configuration for combobox styling\n */\nconst comboboxComponent = cva(['w-full', 'min-w-fit', 'text-pretty', 'font-body', 'font-normal', 'select', 'leading-normal', 'bg-none'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tprimary: ['select-primary'],\n\t\t\tsecondary: ['select-secondary'],\n\t\t\ttertiary: ['select-tertiary'],\n\t\t\taccent: ['select-accent'],\n\t\t\tinfo: ['select-info'],\n\t\t\tsuccess: ['select-success'],\n\t\t\terror: ['select-error'],\n\t\t\twarning: ['select-warning'],\n\t\t},\n\t\tsize: {\n\t\t\txs: ['select-xs'],\n\t\t\tsm: ['select-sm'],\n\t\t\tmd: ['select-md'],\n\t\t\tlg: ['select-lg'],\n\t\t\txl: ['select-xl'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\tvariant: 'secondary',\n\t\tsize: 'md',\n\t},\n});\n\n// ==============================================================================\n// COMPONENT\n// ==============================================================================\n\n/**\n * A customizable combobox component with search functionality, multiple selection modes,\n * and keyboard navigation support. Implements Angular's ControlValueAccessor interface\n * for seamless integration with reactive forms.\n *\n * @example\n * ```html\n * <st-combobox\n * [(value)]=\"selectedValue\"\n * [options]=\"availableOptions\"\n * displayKey=\"name\"\n * valueKey=\"id\"\n * placeholder=\"Select an option\"\n * variant=\"primary\"\n * size=\"md\">\n * </st-combobox>\n * ```\n *\n * @example\n * ```typescript\n * // Multiple selection\n * <st-combobox\n * [(value)]=\"selectedValues\"\n * [options]=\"options\"\n * selectionType=\"multiple\"\n * [allowClear]=\"true\">\n * </st-combobox>\n * ```\n */\n@Component({\n\tselector: 'st-combobox',\n\timports: [FormsModule, ReactiveFormsModule, PortalModule, OverlayModule, CdkListbox, CdkOption, IconComponent, BadgeComponent, TranslatePipe],\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: ComboboxComponent,\n\t\t\tmulti: true,\n\t\t},\n\t],\n\ttemplateUrl: './combobox.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ComboboxComponent implements AfterViewInit, ControlValueAccessor {\n\t// ==============================================================================\n\t// SERVICES\n\t// ==============================================================================\n\n\t/**\n\t * Angular translation service for internationalization\n\t * @internal\n\t */\n\ttranslateService = inject(TranslateService);\n\n\t// ==============================================================================\n\t// INPUT PROPERTIES\n\t// ==============================================================================\n\n\t/**\n\t * The visual style variant of the combobox\n\t * @default 'secondary'\n\t */\n\tvariant = input<ComboboxVariantProps>('secondary');\n\n\t/**\n\t * The size variant of the combobox\n\t * @default 'md'\n\t */\n\tsize = input<ComboboxSizeProps>('md');\n\n\t/**\n\t * Whether to use ghost (transparent) styling\n\t * @default false\n\t */\n\tghost = input<boolean>(false);\n\n\t/**\n\t * The HTML name attribute for the underlying form control\n\t */\n\tname = input<string | null>(null);\n\n\t/**\n\t * Placeholder text displayed when no option is selected\n\t */\n\tplaceholder = input<string>('');\n\n\t/**\n\t * Whether the combobox is disabled\n\t * @default false\n\t */\n\tdisabled = model<boolean>(false);\n\n\t/**\n\t * Label text displayed above the combobox\n\t */\n\tlabel = input<string>('');\n\n\t/**\n\t * Parent form group for reactive forms integration\n\t */\n\tparentForm = input<FormGroup | null>(null);\n\n\t/**\n\t * The form control name when used within a reactive form\n\t */\n\tformControlName = input<string>('');\n\n\t/**\n\t * Whether to show a clear button next to the selected value(s) in the trigger\n\t * Works for both single and multiple selection modes\n\t * @default true\n\t */\n\tallowClear = input<boolean>(true);\n\n\t/**\n\t * Whether to show a \"Clear All\" button at the bottom of the dropdown for multiple selection\n\t * Only applies when selectionType is 'multiple'\n\t * @default true\n\t */\n\tallowClearAll = input<boolean>(true);\n\n\t/**\n\t * Placeholder text for the search input field\n\t * @default 'Search...'\n\t */\n\tsearchPlaceholder = input<string>('');\n\n\t/**\n\t * Text displayed when no search results are found\n\t * @default 'No results found'\n\t */\n\tnoResultsText = input<string>('');\n\n\t/**\n\t * The current selected value(s)\n\t * For single selection: any | null\n\t * For multiple selection: any[]\n\t */\n\tvalue = model<any>(null);\n\n\t/**\n\t * Array of available options to select from\n\t */\n\toptions = input<any[]>([]);\n\n\t/**\n\t * The object property to use for display text when options are objects\n\t * Falls back to common property names if not specified\n\t */\n\tdisplayKey = input<string>('');\n\n\t/**\n\t * The object property to use as the value when options are objects\n\t * Uses the entire object if not specified\n\t */\n\tvalueKey = input<string>('');\n\n\t/**\n\t * Selection mode: 'single' for single selection, 'multiple' for multi-select\n\t * @default 'single'\n\t */\n\tselectionType = input<SelectionType>('single');\n\n\t/**\n\t * Whether to enable debounced search functionality\n\t * @default false\n\t */\n\tsearchDebounced = input<boolean>(false);\n\n\t/**\n\t * Debounce time in milliseconds for search input\n\t * @default 300\n\t */\n\tsearchDebounceTime = input<number>(300);\n\n\t/**\n\t * Event emitted when combobox loses focus\n\t */\n\tblurred = output<unknown>();\n\n\t/**\n\t * Event emitted when selection changes\n\t */\n\tvalueUpdated = output<any>();\n\n\t/**\n\t * Event emitted when search query changes with filtered results\n\t */\n\tsearchQuery = output<ComboboxSearchQueryEvent>();\n\n\t// ==============================================================================\n\t// ICONS\n\t// ==============================================================================\n\n\t/** Search icon for the search input */\n\ticonSearch = matSearchOutline;\n\t/** Dropdown chevron icon */\n\ticonChevronDown = matKeyboardArrowDownOutline;\n\t/** Check icon for selected options */\n\ticonCheck = matCheckOutline;\n\t/** Close/clear icon */\n\ticonClose = matCloseOutline;\n\n\t// ==============================================================================\n\t// PRIVATE PROPERTIES\n\t// ==============================================================================\n\n\t/** Internal search input value */\n\tprivate readonly searchValue = signal<string>('');\n\t/** Processed search term after debouncing */\n\tprivate readonly searchTerm = signal<string>('');\n\t/** RxJS subject for search input handling */\n\tprivate readonly searchSubject = new Subject<string>();\n\t/** Current animation state of the overlay */\n\tprivate readonly animationState = signal<AnimationState>('closed');\n\t/** Trigger for blur events in form validation */\n\tprivate readonly blurTrigger = signal(0);\n\t/** Active option index for keyboard navigation */\n\tprivate readonly activeOptionIndex = signal<number>(-1);\n\n\t// ==============================================================================\n\t// VIEW CHILDREN\n\t// ==============================================================================\n\n\t/** Reference to the trigger button element */\n\ttriggerRef = viewChild<ElementRef<HTMLButtonElement>>('trigger');\n\n\t/** Reference to the search input element */\n\tsearchInputRef = viewChild<ElementRef<HTMLInputElement>>('searchInput');\n\n\t/** Reference to the options list container */\n\toptionsList = viewChild<ElementRef<HTMLDivElement>>('optionsList');\n\n\t/** Reference to the CDK listbox for keyboard navigation */\n\tlistbox = viewChild<CdkListbox>('listbox');\n\n\t// ==============================================================================\n\t// SIGNALS\n\t// ==============================================================================\n\n\t/** Width of the trigger button for overlay positioning */\n\ttriggerWidth = signal<number>(0);\n\n\t// ==============================================================================\n\t// FORM CONTROL INTEGRATION\n\t// ==============================================================================\n\n\t/** Form control reference for reactive forms */\n\tprivate readonly formControl = computed(() => this.parentForm()?.get(this.formControlName()) as FormControl | null);\n\t/** Observable stream of form control */\n\tprivate readonly formControl$ = toObservable(this.formControl);\n\t/** Stream of form control status changes */\n\tprivate readonly statusChanges$ = this.formControl$.pipe(switchMap((control) => control?.statusChanges.pipe(startWith(control.status)) || []));\n\t/** Stream of form control value changes */\n\tprivate readonly stateChanges$ = this.formControl$.pipe(switchMap((control) => control?.valueChanges.pipe(startWith(control.value)) || []));\n\t/** Signal for form control status */\n\tprivate readonly statusSignal = toSignal(this.statusChanges$);\n\t/** Signal for form control state */\n\tprivate readonly stateSignal = toSignal(this.stateChanges$);\n\n\t// ==============================================================================\n\t// CONTROL VALUE ACCESSOR\n\t// ==============================================================================\n\n\t/** Callback function for value changes */\n\tprivate onChange = (value: any) => {};\n\t/** Callback function for touch events */\n\tprivate onTouched = () => {};\n\n\t// ==============================================================================\n\t// CONSTRUCTOR\n\t// ==============================================================================\n\n\tconstructor() {\n\t\tthis.setupSearchHandling();\n\t\tthis.setupSearchQueryEmission();\n\t}\n\n\t// ==============================================================================\n\t// COMPUTED PROPERTIES\n\t// ==============================================================================\n\n\t/**\n\t * Filtered options based on current search term\n\t * @returns Array of options that match the search criteria\n\t */\n\tfilteredOptions = computed(() => {\n\t\tconst options = this.options();\n\t\tconst search = this.searchTerm().toLowerCase().trim();\n\n\t\tif (!search) return options;\n\n\t\treturn options.filter((option) => {\n\t\t\tconst displayValue = this.getDisplayValue(option).toLowerCase();\n\t\t\treturn displayValue.includes(search);\n\t\t});\n\t});\n\n\t/**\n\t * Whether the overlay is currently open or in the process of opening/closing\n\t * @returns True if overlay is visible or animating\n\t */\n\tisOpen = computed(() => {\n\t\tconst state = this.animationState();\n\t\treturn state === 'opening' || state === 'open' || state === 'closing';\n\t});\n\n\t/**\n\t * Whether the overlay is currently animating to open state\n\t * @returns True if overlay is opening or open\n\t */\n\tisAnimatingOpen = computed(() => {\n\t\tconst state = this.animationState();\n\t\treturn state === 'opening' || state === 'open';\n\t});\n\n\t/**\n\t * Current animation state for template binding\n\t * @returns Current animation state\n\t */\n\tdataState = computed(() => this.animationState());\n\n\t/**\n\t * Display value for the selected option(s)\n\t * @returns Formatted display string based on selection type and current value\n\t */\n\tdisplayValue = computed(() => {\n\t\tconst selectionType = this.selectionType();\n\t\tconst currentValue = this.value();\n\n\t\tif (selectionType === 'multiple') {\n\t\t\tconst selected = Array.isArray(currentValue) ? currentValue : [];\n\t\t\tif (selected.length === 0) return this.translatedPlaceholder();\n\n\t\t\t// Validate that all selected values exist in options\n\t\t\tconst validSelected = selected.filter((value) => this.isValidValue(value));\n\t\t\tif (validSelected.length === 0) return this.translatedPlaceholder();\n\t\t\tif (validSelected.length === 1) return this.getDisplayValue(validSelected[0]);\n\t\t\treturn `${validSelected.length} items selected`;\n\t\t} else {\n\t\t\t// For single selection, only show display value if it's valid\n\t\t\tif (!currentValue || !this.isValidValue(currentValue)) {\n\t\t\t\treturn this.translatedPlaceholder();\n\t\t\t}\n\t\t\treturn this.getDisplayValue(currentValue);\n\t\t}\n\t});\n\n\t/**\n\t * Display information for multiple selection showing first item and additional count\n\t * @returns Object with first item display and additional count, or null for single selection\n\t */\n\tmultipleDisplayInfo = computed(() => {\n\t\tconst selectionType = this.selectionType();\n\t\tconst currentValue = this.value();\n\n\t\tif (selectionType === 'multiple') {\n\t\t\tconst selected = Array.isArray(currentValue) ? currentValue : [];\n\t\t\tif (selected.length === 0) return null;\n\t\t\tif (selected.length === 1) return { firstItem: this.getDisplayValue(selected[0]), additionalCount: 0 };\n\t\t\treturn {\n\t\t\t\tfirstItem: this.getDisplayValue(selected[0]),\n\t\t\t\tadditionalCount: selected.length - 1,\n\t\t\t};\n\t\t}\n\t\treturn null;\n\t});\n\n\t/**\n\t * Whether the clear button should be shown\n\t * @returns True if there's a valid selected value and clear is allowed\n\t */\n\tshowClearButton = computed(() => {\n\t\tif (!this.allowClear() || this.disabled()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst currentValue = this.value();\n\t\tif (!currentValue) return false;\n\n\t\tif (this.selectionType() === 'multiple') {\n\t\t\t// For multiple selection, check if we have any valid values\n\t\t\tconst selected = Array.isArray(currentValue) ? currentValue : [];\n\t\t\treturn selected.some((value) => this.isValidValue(value));\n\t\t} else {\n\t\t\t// For single selection, check if the value is valid\n\t\t\treturn this.isValidValue(currentValue);\n\t\t}\n\t});\n\n\t/**\n\t * Base CSS classes for the combobox component\n\t * @internal\n\t */\n\tcomponentClass = computed(() => {\n\t\treturn cn(\n\t\t\tcomboboxComponent({\n\t\t\t\tvariant: this.variant(),\n\t\t\t\tsize: this.size(),\n\t\t\t}),\n\t\t\t{ 'select-ghost': this.ghost() },\n\t\t);\n\t});\n\n\t/**\n\t * Error state CSS classes\n\t * @internal\n\t */\n\terrorClass = computed(() => {\n\t\treturn cn(\n\t\t\tcomboboxComponent({\n\t\t\t\tvariant: 'error',\n\t\t\t\tsize: this.size(),\n\t\t\t}),\n\t\t\t{ 'select-ghost': this.ghost() },\n\t\t);\n\t});\n\n\t/**\n\t * Success state CSS classes\n\t * @internal\n\t */\n\tsuccessClass = computed(() => {\n\t\treturn cn(\n\t\t\tcomboboxComponent({\n\t\t\t\tvariant: 'success',\n\t\t\t\tsize: this.size(),\n\t\t\t}),\n\t\t\t{ 'select-ghost': this.ghost() },\n\t\t);\n\t});\n\n\t/**\n\t * Validation-aware CSS classes based on form control state\n\t * @internal\n\t */\n\tvalidationClass = computed(() => {\n\t\tconst control = this.formControl();\n\t\tconst trigger = this.blurTrigger();\n\n\t\tif (!control) return this.componentClass();\n\n\t\tconst isTouched = control.touched || trigger > 0;\n\t\tthis.statusSignal();\n\t\tthis.stateSignal();\n\n\t\tif (control.dirty || isTouched) {\n\t\t\tif (control.invalid) return this.errorClass();\n\t\t\tif (control.valid) return this.successClass();\n\t\t}\n\n\t\treturn this.componentClass();\n\t});\n\n\t/**\n\t * CSS classes for the search input field\n\t * @internal\n\t */\n\tsearchInputClass = computed(() => {\n\t\treturn cn('input bg-base-200 w-full border-transparent focus-within:outline-none focus:border-transparent focus:outline-none', {\n\t\t\t'input-xs': this.size() === 'xs',\n\t\t\t'input-sm': this.size() === 'sm',\n\t\t\t'input-md': this.size() === 'md',\n\t\t\t'input-lg': this.size() === 'lg',\n\t\t\t'input-xl': this.size() === 'xl',\n\t\t});\n\t});\n\n\t/**\n\t * CSS classes for the options menu\n\t * @internal\n\t */\n\tmenuClass = computed(() => {\n\t\treturn cn(\n\t\t\t'menu flex-nowrap max-h-72 overflow-y-auto overscroll-contain w-full p-0 focus-within:outline-none focus:outline-none focus-visible:outline-none',\n\t\t\t{\n\t\t\t\t'menu-xs': this.size() === 'xs',\n\t\t\t\t'menu-sm': this.size() === 'sm',\n\t\t\t\t'menu-md': this.size() === 'md',\n\t\t\t\t'menu-lg': this.size() === 'lg',\n\t\t\t\t'menu-xl': this.size() === 'xl',\n\t\t\t},\n\t\t);\n\t});\n\n\t/**\n\t * CSS classes for the badge\n\t * @internal\n\t */\n\tbadgeClass = computed<BadgeSizeProps>(() => {\n\t\tconst size = this.size();\n\n\t\tswitch (size) {\n\t\t\tcase 'xs':\n\t\t\tcase 'sm':\n\t\t\t\treturn 'xs';\n\t\t\tcase 'md':\n\t\t\t\treturn 'sm';\n\t\t\tcase 'lg':\n\t\t\t\treturn 'md';\n\t\t\tcase 'xl':\n\t\t\t\treturn 'lg';\n\t\t\tdefault:\n\t\t\t\treturn 'sm';\n\t\t}\n\t});\n\n\t/**\n\t * Translated search placeholder text\n\t * @returns Translated placeholder or input value\n\t */\n\ttranslatedSearchPlaceholder = computed(() => {\n\t\tconst customPlaceholder = this.searchPlaceholder();\n\t\treturn customPlaceholder || this.translateService.instant('sdk.combobox.searchPlaceholder');\n\t});\n\n\t/**\n\t * Translated main placeholder text\n\t * @returns Translated placeholder or input value\n\t */\n\ttranslatedPlaceholder = computed(() => {\n\t\tconst customPlaceholder = this.placeholder();\n\t\treturn customPlaceholder || this.translateService.instant('sdk.combobox.placeholder');\n\t});\n\n\t/**\n\t * Translated no results text\n\t * @returns Translated no results text or input value\n\t */\n\ttranslatedNoResultsText = computed(() => {\n\t\tconst customNoResults = this.noResultsText();\n\t\treturn customNoResults || this.translateService.instant('sdk.combobox.noResultsFound');\n\t});\n\n\t/**\n\t * Current search input value for template binding\n\t * @returns Current search value\n\t */\n\tget currentSearchValue(): string {\n\t\treturn this.searchValue();\n\t}\n\n\t// ==============================================================================\n\t// LIFECYCLE METHODS\n\t// ==============================================================================\n\n\t/**\n\t * Angular lifecycle hook called after view initialization\n\t * Updates the trigger width for proper overlay positioning\n\t */\n\tngAfterViewInit() {\n\t\tthis.updateTriggerWidth();\n\t}\n\n\t// ==============================================================================\n\t// CONTROL VALUE ACCESSOR IMPLEMENTATION\n\t// ==============================================================================\n\n\t/**\n\t * Writes a new value to the component\n\t * @param value - The new value to set\n\t */\n\twriteValue(value: any): void {\n\t\t// Only set the value if it's null/undefined or if it's valid\n\t\tif (!value) {\n\t\t\tthis.value.set(value);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.selectionType() === 'multiple') {\n\t\t\t// For multiple selection, filter out invalid values\n\t\t\tif (Array.isArray(value)) {\n\t\t\t\tconst validValues = value.filter((v) => this.isValidValue(v));\n\t\t\t\tthis.value.set(validValues.length > 0 ? validValues : []);\n\t\t\t} else {\n\t\t\t\tthis.value.set([]);\n\t\t\t}\n\t\t} else {\n\t\t\t// For single selection, only set if valid\n\t\t\tconst isValid = this.isValidValue(value);\n\t\t\tthis.value.set(isValid ? value : null);\n\t\t}\n\t}\n\n\t/**\n\t * Registers a callback function to be called when the value changes\n\t * @param fn - The callback function\n\t */\n\tregisterOnChange(fn: (value: any) => void): void {\n\t\tthis.onChange = fn;\n\t}\n\n\t/**\n\t * Registers a callback function to be called when the component is touched\n\t * @param fn - The callback function\n\t */\n\tregisterOnTouched(fn: () => void): void {\n\t\tthis.onTouched = fn;\n\t}\n\n\t// ==============================================================================\n\t// PUBLIC METHODS\n\t// ==============================================================================\n\n\t/**\n\t * Toggles the overlay open/closed state\n\t * Handles focus management and animation state transitions\n\t */\n\ttoggleOverlay() {\n\t\tconst currentState = this.animationState();\n\n\t\tif (currentState === 'closed') {\n\t\t\tthis.updateTriggerWidth();\n\t\t\tthis.animationState.set('opening');\n\t\t\t// Focus search input after opening\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.searchInputRef()?.nativeElement?.focus();\n\t\t\t\t// Set first option as active by default\n\t\t\t\tthis.setDefaultActiveOption();\n\t\t\t}, 100);\n\t\t} else if (currentState === 'open') {\n\t\t\tthis.animationState.set('closing');\n\t\t}\n\t}\n\n\t/**\n\t * Handles animation end events to update state\n\t * @param event - The animation event\n\t */\n\tonAnimationEnd(event: AnimationEvent) {\n\t\tif (event.animationName === 'fade-in-up') {\n\t\t\tthis.animationState.set('open');\n\t\t} else if (event.animationName === 'fade-out-down') {\n\t\t\tthis.animationState.set('closed');\n\t\t\tthis.clearSearch();\n\t\t\tthis.triggerBlur();\n\t\t\t// Return focus to trigger button for better keyboard navigation\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.triggerRef()?.nativeElement?.focus();\n\t\t\t}, 0);\n\t\t}\n\t}\n\n\t/**\n\t * Handles overlay detachment\n\t * Cleans up state and triggers blur\n\t */\n\thandleDetach() {\n\t\tthis.animationState.set('closed');\n\t\tthis.clearSearch();\n\t\tthis.triggerBlur();\n\t}\n\n\t/**\n\t * Handles clicks outside the component\n\t * @param event - The mouse event\n\t */\n\thandleClickOutside(event: MouseEvent) {\n\t\tif (this.animationState() === 'open') {\n\t\t\tthis.animationState.set('closing');\n\t\t}\n\t\tevent.stopPropagation();\n\t\tthis.triggerBlur();\n\t}\n\n\t/**\n\t * Handles search input changes\n\t * @param event - The input event\n\t */\n\thandleSearchInput(event: Event) {\n\t\tconst target = event.target as HTMLInputElement;\n\t\tconst searchValue = target.value;\n\t\tthis.searchValue.set(searchValue);\n\n\t\tif (this.searchDebounced()) {\n\t\t\tthis.searchSubject.next(searchValue);\n\t\t} else {\n\t\t\tthis.searchTerm.set(searchValue);\n\t\t\t// Set first option as active after search\n\t\t\tsetTimeout(() => this.setDefaultActiveOption(), 0);\n\t\t}\n\t}\n\n\t/**\n\t * Handles option selection\n\t * @param option - The selected option\n\t */\n\thandleOptionSelect(option: any) {\n\t\tconst selectionType = this.selectionType();\n\t\tconst currentValue = this.value();\n\n\t\tif (selectionType === 'multiple') {\n\t\t\tconst currentValues = Array.isArray(currentValue) ? currentValue : [];\n\t\t\tconst optionValue = this.getOptionValue(option);\n\t\t\tconst isSelected = this.isOptionSelected(option);\n\n\t\t\tlet newValues: any[];\n\t\t\tif (isSelected) {\n\t\t\t\tnewValues = currentValues.filter((value) => this.getOptionValue(value) !== optionValue);\n\t\t\t} else {\n\t\t\t\tnewValues = [...currentValues, option];\n\t\t\t}\n\n\t\t\tthis.value.set(newValues);\n\t\t\tthis.onChange(newValues);\n\t\t\tthis.valueUpdated.emit(newValues);\n\t\t} else {\n\t\t\tthis.value.set(option);\n\t\t\tthis.onChange(option);\n\t\t\tthis.valueUpdated.emit(option);\n\t\t\tthis.animationState.set('closing');\n\t\t}\n\n\t\tthis.onTouched();\n\t}\n\n\t/**\n\t * Handles CDK listbox selection changes\n\t * @param event - The selection change event\n\t */\n\thandleSelectionChange(event: any) {\n\t\tif (event.option) {\n\t\t\tthis.handleOptionSelect(event.option.value);\n\t\t}\n\t}\n\n\t/**\n\t * Handles keyboard events for option selection\n\t * @param event - The keyboard event\n\t */\n\thandleListboxKeydown(event: KeyboardEvent) {\n\t\tif (event.key === 'Enter' || event.key === ' ') {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\n\t\t\tconst focusedOption = this.optionsList()?.nativeElement.querySelector('.cdk-option-active');\n\t\t\tif (focusedOption) {\n\t\t\t\tconst optionIndex = parseInt(focusedOption.getAttribute('data-option-index') || '0');\n\t\t\t\tconst filteredOptions = this.filteredOptions();\n\t\t\t\tif (optionIndex >= 0 && optionIndex < filteredOptions.length) {\n\t\t\t\t\tthis.handleOptionSelect(filteredOptions[optionIndex]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Handles keyboard events on the search input for navigation and selection\n\t * @param event - The keyboard event\n\t */\n\thandleSearchKeydown(event: KeyboardEvent) {\n\t\tconst filteredOptions = this.filteredOptions();\n\t\tconst currentIndex = this.activeOptionIndex();\n\n\t\tswitch (event.key) {\n\t\t\tcase 'ArrowDown': {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tconst nextIndex = currentIndex < filteredOptions.length - 1 ? currentIndex + 1 : 0;\n\t\t\t\tthis.setActiveOption(nextIndex);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'ArrowUp': {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tconst prevIndex = currentIndex > 0 ? currentIndex - 1 : filteredOptions.length - 1;\n\t\t\t\tthis.setActiveOption(prevIndex);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'Enter':\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tif (currentIndex >= 0 && currentIndex < filteredOptions.length) {\n\t\t\t\t\tthis.handleOptionSelect(filteredOptions[currentIndex]);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'Tab': {\n\t\t\t\t// Allow Tab only to clear button in multiple selection mode\n\t\t\t\tconst isMultipleSelection = this.selectionType() === 'multiple';\n\t\t\t\tconst hasSelectedValues = this.value() && this.isArray(this.value()) && this.value().length > 0;\n\n\t\t\t\tif (isMultipleSelection && hasSelectedValues) {\n\t\t\t\t\t// Allow default Tab behavior to go to clear button\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\t// Prevent tabbing out of the search input\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'Escape':\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tthis.animationState.set('closing');\n\t\t\t\tthis.activeOptionIndex.set(-1);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t// For other keys (including space), set first option as active for typing\n\t\t\t\tsetTimeout(() => this.setDefaultActiveOption(), 0);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t/**\n\t * Handles keyboard events on the clear all button\n\t * @param event - The keyboard event\n\t */\n\thandleClearButtonKeydown(event: KeyboardEvent) {\n\t\tif (event.key === 'Tab') {\n\t\t\t// Prevent default Tab behavior and focus back to search input\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tthis.searchInputRef()?.nativeElement?.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Handles keyboard events on the trigger button\n\t * @param event - The keyboard event\n\t */\n\thandleTriggerKeydown(event: KeyboardEvent) {\n\t\tswitch (event.key) {\n\t\t\tcase 'ArrowDown':\n\t\t\tcase 'ArrowUp':\n\t\t\tcase 'Enter':\n\t\t\tcase ' ':\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tif (this.animationState() === 'closed') {\n\t\t\t\t\tthis.toggleOverlay();\n\t\t\t\t} else {\n\t\t\t\t\t// If already open, handle navigation\n\t\t\t\t\tthis.handleListboxKeydown(event);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'Escape':\n\t\t\t\tif (this.animationState() === 'open') {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tthis.animationState.set('closing');\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t/**\n\t * Clears the current selection\n\t */\n\tclearSelection() {\n\t\tif (this.selectionType() === 'multiple') {\n\t\t\tthis.value.set([]);\n\t\t\tthis.onChange([]);\n\t\t\tthis.valueUpdated.emit([]);\n\t\t} else {\n\t\t\tthis.value.set(null);\n\t\t\tthis.onChange(null);\n\t\t\tthis.valueUpdated.emit(null);\n\t\t}\n\t\tthis.onTouched();\n\n\t\t// Focus back to search input after clearing\n\t\tsetTimeout(() => {\n\t\t\tthis.searchInputRef()?.nativeElement?.focus();\n\t\t\t// Set first option as active by default after clearing\n\t\t\tthis.setDefaultActiveOption();\n\t\t}, 0);\n\t}\n\n\t/**\n\t * Handles clear selection button click\n\t * @param event - The click event\n\t */\n\thandleClearSelection(event: Event) {\n\t\tevent.stopPropagation();\n\t\tthis.clearSelection();\n\t}\n\n\t/**\n\t * Checks if an option is currently selected\n\t * @param option - The option to check\n\t * @returns True if the option is selected\n\t */\n\tisOptionSelected(option: any): boolean {\n\t\tconst selectionType = this.selectionType();\n\t\tconst currentValue = this.value();\n\t\tconst optionValue = this.getOptionValue(option);\n\n\t\tif (selectionType === 'multiple') {\n\t\t\tconst selected = Array.isArray(currentValue) ? currentValue : [];\n\t\t\treturn selected.some((value) => this.getOptionValue(value) === optionValue);\n\t\t} else {\n\t\t\treturn currentValue && this.getOptionValue(currentValue) === optionValue;\n\t\t}\n\t}\n\n\t/**\n\t * Checks if an option is currently active for keyboard navigation\n\t * @param index - The option index\n\t * @returns True if the option is active\n\t */\n\tisActiveOption(index: number): boolean {\n\t\treturn this.activeOptionIndex() === index;\n\t}\n\n\t/**\n\t * Gets the display value for an option\n\t * @param option - The option to get display value for\n\t * @returns The display string for the option\n\t */\n\tgetDisplayValue(option: any): string {\n\t\tif (!option) return '';\n\t\tconst displayKey = this.displayKey();\n\n\t\tif (displayKey && typeof option === 'object') {\n\t\t\treturn option[displayKey] || '';\n\t\t}\n\n\t\tif (typeof option === 'object') {\n\t\t\tconst commonKeys = ['name', 'label', 'text', 'title', 'displayName'];\n\t\t\tfor (const key of commonKeys) {\n\t\t\t\tif (option[key] !== undefined && option[key] !== null) {\n\t\t\t\t\treturn String(option[key]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst keys = Object.keys(option);\n\t\t\tfor (const key of keys) {\n\t\t\t\tconst value = option[key];\n\t\t\t\tif (typeof value === 'string' || typeof value === 'number') {\n\t\t\t\t\treturn String(value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn JSON.stringify(option);\n\t\t}\n\n\t\treturn String(option);\n\t}\n\n\t/**\n\t * Type guard to check if a value is an array\n\t * @param value - The value to check\n\t * @returns True if the value is an array\n\t */\n\tisArray(value: any): value is any[] {\n\t\treturn Array.isArray(value);\n\t}\n\n\t// ==============================================================================\n\t// PRIVATE METHODS\n\t// ==============================================================================\n\n\t/**\n\t * Updates the trigger button width for overlay positioning\n\t */\n\tprivate updateTriggerWidth() {\n\t\tif (this.triggerRef) {\n\t\t\tconst width = this.triggerRef()?.nativeElement.offsetWidth;\n\t\t\tif (!width) return;\n\t\t\tthis.triggerWidth.set(width);\n\t\t}\n\t}\n\n\t/**\n\t * Gets the value property from an option\n\t * @param option - The option to get value from\n\t * @returns The option value\n\t */\n\tprivate getOptionValue(option: any): any {\n\t\tif (!option) return option;\n\t\tconst valueKey = this.valueKey();\n\t\treturn valueKey && typeof option === 'object' ? option[valueKey] : option;\n\t}\n\n\t/**\n\t * Checks if a value is valid (exists in options)\n\t * @param value - The value to validate\n\t * @returns True if the value exists in the options array\n\t */\n\tprivate isValidValue(value: any): boolean {\n\t\tif (!value) return false;\n\n\t\tconst options = this.options();\n\t\treturn options.some((option) => {\n\t\t\tif (typeof option === 'string' && typeof value === 'string') {\n\t\t\t\treturn option === value;\n\t\t\t}\n\t\t\t// For objects, check if the value matches the option or its value property\n\t\t\tconst optionValue = this.getOptionValue(option);\n\t\t\tconst currentValue = this.getOptionValue(value);\n\t\t\treturn optionValue === currentValue || option === value;\n\t\t});\n\t}\n\n\t/**\n\t * Triggers blur event for form validation\n\t */\n\tprivate triggerBlur() {\n\t\tthis.blurTrigger.update((val) => val + 1);\n\t\tthis.onTouched();\n\t\tthis.blurred.emit(this.value());\n\t}\n\n\t/**\n\t * Clears the search input and term\n\t */\n\tprivate clearSearch() {\n\t\tthis.searchValue.set('');\n\t\tthis.searchTerm.set('');\n\t\tthis.activeOptionIndex.set(-1);\n\t}\n\n\t/**\n\t * Sets up reactive search handling with debouncing\n\t * The debounce time updates reactively when the input changes\n\t */\n\tprivate setupSearchHandling() {\n\t\tconst debounceTime$ = toObservable(this.searchDebounceTime);\n\n\t\tdebounceTime$\n\t\t\t.pipe(\n\t\t\t\tswitchMap((currentDebounceTime) => {\n\t\t\t\t\treturn this.searchSubject.pipe(debounceTime(currentDebounceTime), distinctUntilChanged());\n\t\t\t\t}),\n\t\t\t\ttakeUntilDestroyed(),\n\t\t\t)\n\t\t\t.subscribe((searchValue: string) => {\n\t\t\t\tthis.searchTerm.set(searchValue);\n\t\t\t\t// Set first option as active after debounced search\n\t\t\t\tsetTimeout(() => this.setDefaultActiveOption(), 0);\n\t\t\t});\n\t}\n\n\t/**\n\t * Sets the active option for keyboard navigation\n\t * @param index - The index of the option to make active\n\t */\n\tprivate setActiveOption(index: number) {\n\t\tthis.activeOptionIndex.set(index);\n\t\tthis.updateActiveOptionVisually();\n\t}\n\n\t/**\n\t * Sets the first option as active by default\n\t */\n\tprivate setDefaultActiveOption() {\n\t\tconst filteredOptions = this.filteredOptions();\n\t\tif (filteredOptions.length > 0) {\n\t\t\tthis.setActiveOption(0);\n\t\t}\n\t}\n\n\t/**\n\t * Updates the visual state of the active option\n\t */\n\tprivate updateActiveOptionVisually() {\n\t\tif (!this.optionsList()?.nativeElement) return;\n\n\t\t// Remove active class from all options\n\t\tconst allOptions = this.optionsList()?.nativeElement.querySelectorAll('[data-option-index]');\n\t\tif (!allOptions) return;\n\t\tallOptions.forEach((option) => {\n\t\t\toption.classList.remove('cdk-option-active');\n\t\t});\n\n\t\t// Add active class to current option\n\t\tconst currentIndex = this.activeOptionIndex();\n\t\tif (currentIndex >= 0) {\n\t\t\tconst activeOption = this.optionsList()?.nativeElement.querySelector(`[data-option-index=\"${currentIndex}\"]`);\n\t\t\tif (activeOption) {\n\t\t\t\tactiveOption.classList.add('cdk-option-active');\n\t\t\t\t// Scroll into view if needed\n\t\t\t\tactiveOption.scrollIntoView({ block: 'nearest' });\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Sets up the search query emission effect\n\t * Emits search results whenever the search term or options change\n\t */\n\tprivate setupSearchQueryEmission() {\n\t\teffect(() => {\n\t\t\tconst query = this.searchTerm();\n\t\t\tconst results = this.filteredOptions();\n\n\t\t\t// Emit the search query event with current query and filtered results\n\t\t\tthis.searchQuery.emit({ query, results });\n\t\t});\n\t}\n}\n","@let isOpen = this.isOpen(); @let isAnimatingOpen = this.isAnimatingOpen(); @let triggerWidth = this.triggerWidth();\n@let dataState = this.dataState(); @let filteredOptions = this.filteredOptions(); @let displayValue = this.displayValue();\n@let multipleDisplayInfo = this.multipleDisplayInfo(); @let label = this.label();\n\n<fieldset class=\"fieldset p-0\">\n\t@if (label) {\n\t\t<legend class=\"fieldset-legend font-body pt-0 text-pretty\">{{ label }}</legend>\n\t}\n\n\t<button\n\t\t#trigger\n\t\t[class]=\"validationClass()\"\n\t\t(click)=\"toggleOverlay()\"\n\t\t(keydown)=\"handleTriggerKeydown($event)\"\n\t\ttype=\"button\"\n\t\tcdkOverlayOrigin\n\t\taria-haspopup=\"true\"\n\t\trole=\"combobox\"\n\t\t[attr.aria-controls]=\"'combobox-list'\"\n\t\t[attr.aria-expanded]=\"isOpen\"\n\t\t[disabled]=\"disabled()\"\n\t>\n\t\t<span class=\"flex-1 truncate text-left\">\n\t\t\t@if (selectionType() === 'multiple' && multipleDisplayInfo) {\n\t\t\t\t<span class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t<span class=\"truncate\">{{ multipleDisplayInfo.firstItem }}</span>\n\t\t\t\t\t@if (multipleDisplayInfo.additionalCount > 0) {\n\t\t\t\t\t\t<st-badge [size]=\"badgeClass()\">+{{ multipleDisplayInfo.additionalCount }}</st-badge>\n\t\t\t\t\t}\n\t\t\t\t</span>\n\t\t\t} @else {\n\t\t\t\t{{ displayValue }}\n\t\t\t}\n\t\t</span>\n\t\t<div class=\"inline-flex items-center justify-items-end gap-2\">\n\t\t\t<!-- Clear button for both single and multiple selection -->\n\t\t\t@if (showClearButton()) {\n\t\t\t\t<div class=\"grid translate-x-full place-content-center\">\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclass=\"btn font-body btn-sm btn-secondary h-[1.5em] w-[1.5em] items-center p-0 align-top [font-size:inherit] leading-normal font-medium text-pretty\"\n\t\t\t\t\t\t(click)=\"handleClearSelection($event)\"\n\t\t\t\t\t\t(keydown.enter)=\"handleClearSelection($event)\"\n\t\t\t\t\t\t(keydown.space)=\"handleClearSelection($event)\"\n\t\t\t\t\t\t[attr.aria-label]=\"'sdk.combobox.clearSelection' | translate\"\n\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<st-icon [icon]=\"iconClose\"></st-icon>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t<st-icon\n\t\t\t\tclass=\"h-[1.5em] w-[1.5em] flex-0 translate-x-full transition-transform duration-200\"\n\t\t\t\t[class.rotate-180]=\"isAnimatingOpen\"\n\t\t\t\t[icon]=\"iconChevronDown\"\n\t\t\t></st-icon>\n\t\t</div>\n\t</button>\n\n\t<ng-template\n\t\tcdkConnectedOverlay\n\t\t[cdkConnectedOverlayOrigin]=\"trigger\"\n\t\t[cdkConnectedOverlayOpen]=\"isOpen\"\n\t\t[cdkConnectedOverlayWidth]=\"triggerWidth\"\n\t\t[cdkConnectedOverlayMinWidth]=\"triggerWidth\"\n\t\t(detach)=\"handleDetach()\"\n\t\t(overlayOutsideClick)=\"handleClickOutside($event)\"\n\t>\n\t\t<div\n\t\t\tclass=\"bg-base-200 rounded-box shadow-main border-neutral data-[state=closing]:animate-fade-out-down data-[state=opening]:animate-fade-in-up data-[state=open]:animate-fade-in-up data-[state=closing]:animate-duration-150 data-[state=opening]:animate-duration-150 data-[state=open]:animate-duration-150 mt-1 w-full overflow-hidden border border-solid\"\n\t\t\t(animationend)=\"onAnimationEnd($event)\"\n\t\t\t[attr.data-state]=\"dataState\"\n\t\t>\n\t\t\t<!-- Search Input -->\n\t\t\t<div class=\"border-neutral border-b\">\n\t\t\t\t@let searchInputClass = this.searchInputClass();\n\t\t\t\t<div [class]=\"searchInputClass\">\n\t\t\t\t\t<st-icon class=\"text-base-placeholder\" [icon]=\"iconSearch\"></st-icon>\n\t\t\t\t\t<input\n\t\t\t\t\t\t#searchInput\n\t\t\t\t\t\tclass=\"placeholder:text-base-placeholder w-full border-transparent py-0 focus-within:outline-none focus:border-transparent focus:outline-none\"\n\t\t\t\t\t\t[value]=\"currentSearchValue\"\n\t\t\t\t\t\t(input)=\"handleSearchInput($event)\"\n\t\t\t\t\t\t(keydown)=\"handleSearchKeydown($event)\"\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t[placeholder]=\"translatedSearchPlaceholder()\"\n\t\t\t\t\t\t[attr.aria-label]=\"'sdk.combobox.searchOptions' | translate\"\n\t\t\t\t\t\t[disabled]=\"!isOpen\"\n\t\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<!-- Options List -->\n\t\t\t@let menuClass = this.menuClass();\n\t\t\t<ul\n\t\t\t\t[class]=\"menuClass\"\n\t\t\t\tcdkListbox\n\t\t\t\tcdkListboxUseActiveDescendant\n\t\t\t\t[cdkListboxMultiple]=\"selectionType() === 'multiple'\"\n\t\t\t\taria-labelledby=\"Combobox options\"\n\t\t\t\trole=\"listbox\"\n\t\t\t\t#optionsList\n\t\t\t\t[tabindex]=\"-1\"\n\t\t\t\t(keydown)=\"handleListboxKeydown($event)\"\n\t\t\t\t(selectionChange)=\"handleSelectionChange($event)\"\n\t\t\t>\n\t\t\t\t@for (option of filteredOptions; track $index) {\n\t\t\t\t\t<li [cdkOption]=\"option\" class=\"group\" [attr.data-option-index]=\"$index\" [class.cdk-option-active]=\"isActiveOption($index)\">\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tclass=\"group-[.cdk-option-active]:bg-base-300 font-body flex w-full items-center justify-between rounded-none px-4 py-2 text-left leading-normal font-normal text-pretty transition-colors duration-150 ease-in-out\"\n\t\t\t\t\t\t\t(click)=\"handleOptionSelect(option)\"\n\t\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span class=\"flex-1 truncate\">{{ getDisplayValue(option) }}</span>\n\n\t\t\t\t\t\t\t@if (isOptionSelected(option)) {\n\t\t\t\t\t\t\t\t<st-icon class=\"h-4 w-4 shrink-0\" [icon]=\"iconCheck\"></st-icon>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\n\t\t\t\t<!-- Empty state -->\n\t\t\t\t@if (filteredOptions.length === 0) {\n\t\t\t\t\t<li class=\"text-base-content/60 px-4 py-2 text-center\">\n\t\t\t\t\t\t<span>{{ translatedNoResultsText() }}</span>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\t\t\t</ul>\n\n\t\t\t<!-- Clear All button for multiple selection -->\n\t\t\t@if (selectionType() === 'multiple' && allowClearAll() && value() && isArray(value()) && value().length > 0) {\n\t\t\t\t<div class=\"border-base-300 border-t p-2\">\n\t\t\t\t\t<button type=\"button\" class=\"btn btn-outline btn-sm w-full\" (click)=\"clearSelection()\" (keydown)=\"handleClearButtonKeydown($event)\">\n\t\t\t\t\t\t{{ 'sdk.combobox.clearAll' | translate }}\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t}\n\t\t</div>\n\t</ng-template>\n\n\t<!-- Hidden label for accessibility -->\n\t<label class=\"sr-only\" [for]=\"name()\">{{ label }}</label>\n\n\t<!-- Additional content -->\n\t<ng-content></ng-content>\n</fieldset>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;AAWG;AAEH;AAEA;AACA;AACA;AAEA;AA8EA;AACA;AACA;AAEA;;AAEG;AACH,MAAM,iBAAiB,GAAG,GAAG,CAAC,CAAC,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,CAAC,EAAE;AACxI,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;YACR,OAAO,EAAE,CAAC,gBAAgB,CAAC;YAC3B,SAAS,EAAE,CAAC,kBAAkB,CAAC;YAC/B,QAAQ,EAAE,CAAC,iBAAiB,CAAC;YAC7B,MAAM,EAAE,CAAC,eAAe,CAAC;YACzB,IAAI,EAAE,CAAC,aAAa,CAAC;YACrB,OAAO,EAAE,CAAC,gBAAgB,CAAC;YAC3B,KAAK,EAAE,CAAC,cAAc,CAAC;YACvB,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC3B,SAAA;AACD,QAAA,IAAI,EAAE;YACL,EAAE,EAAE,CAAC,WAAW,CAAC;YACjB,EAAE,EAAE,CAAC,WAAW,CAAC;YACjB,EAAE,EAAE,CAAC,WAAW,CAAC;YACjB,EAAE,EAAE,CAAC,WAAW,CAAC;YACjB,EAAE,EAAE,CAAC,WAAW,CAAC;AACjB,SAAA;AACD,KAAA;AACD,IAAA,gBAAgB,EAAE,EAAE;AACpB,IAAA,eAAe,E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,EAAA,yBAAA,EAAA,mBAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,aAAa,EAAE,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,MAAA,EAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,cAAc,yIAAE,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAWhI,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAb7B,SAAS;+BACC,aAAa,EAAA,OAAA,EACd,CAAC,WAAW,EAAE,mBAAmB,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,CAAC,EAClI,SAAA,EAAA;AACV,wBAAA;AACC,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAmB,iBAAA;AAC9B,4BAAA,KAAK,EAAE,IAAI;AACX,yBAAA;qBACD,EAEgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,ywMAAA,EAAA;;;AE/KhD;;AAEG;;;;"}
1
+ {"version":3,"file":"sixbell-telco-sdk-components-forms-combobox.mjs","sources":["../../../projects/sdk/components/forms/combobox/src/combobox.component.ts","../../../projects/sdk/components/forms/combobox/src/combobox.component.html","../../../projects/sdk/components/forms/combobox/sixbell-telco-sdk-components-forms-combobox.ts"],"sourcesContent":["/**\n * @fileoverview Combobox Component\n *\n * A comprehensive combobox component with advanced features including:\n * - Single and multiple selection modes\n * - Real-time search with debouncing\n * - Keyboard navigation support (Arrow keys, Enter, Space)\n * - Form validation integration\n * - Accessibility compliance with CDK Listbox\n * - Customizable styling variants and sizes\n * - Animation states for smooth transitions\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n// ==============================================================================\n// IMPORTS\n// ==============================================================================\n\n// Angular CDK\nimport { CdkListbox, CdkOption } from '@angular/cdk/listbox';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { PortalModule } from '@angular/cdk/portal';\n\n// Angular Core\nimport {\n\tAfterViewInit,\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\teffect,\n\tElementRef,\n\tinject,\n\tinput,\n\tmodel,\n\toutput,\n\tsignal,\n\tviewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed, toObservable, toSignal } from '@angular/core/rxjs-interop';\n\n// Angular Forms\nimport { ControlValueAccessor, FormControl, FormGroup, FormsModule, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';\n\n// Third-party\nimport { TranslatePipe, TranslateService } from '@ngx-translate/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\n// Internal\nimport { BadgeComponent, BadgeSizeProps } from '@sixbell-telco/sdk/components/badge';\nimport { IconComponent } from '@sixbell-telco/sdk/components/icon';\nimport { matCheckOutline, matCloseOutline, matKeyboardArrowDownOutline, matSearchOutline } from '@sixbell-telco/sdk/components/icon/material/outline';\n\n// RxJS\nimport { debounceTime, distinctUntilChanged, startWith, Subject, switchMap } from 'rxjs';\n\n// ==============================================================================\n// TYPES AND INTERFACES\n// ==============================================================================\n\n/**\n * Available style variants for the combobox component\n */\nexport type ComboboxVariantProps = 'primary' | 'secondary' | 'tertiary' | 'accent' | 'info' | 'success' | 'error' | 'warning' | null | undefined;\n\n/**\n * Available size variants for the combobox component\n */\nexport type ComboboxSizeProps = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | null | undefined;\n\n/**\n * Props interface for the combobox component\n */\nexport type ComboboxProps = {\n\tvariant?: ComboboxVariantProps;\n\tsize?: ComboboxSizeProps;\n};\n\n/**\n * Animation states for the combobox overlay\n */\ntype AnimationState = 'closed' | 'opening' | 'open' | 'closing';\n\n/**\n * Selection type for the combobox\n */\ntype SelectionType = 'single' | 'multiple';\n\n/**\n * Event emitted when the search query changes\n */\nexport type ComboboxSearchQueryEvent = {\n\tquery: string;\n\tresults: any[];\n};\n\n// ==============================================================================\n// COMPONENT STYLES\n// ==============================================================================\n\n/**\n * Class variance authority configuration for combobox styling\n */\nconst comboboxComponent = cva(['w-full', 'min-w-fit', 'text-pretty', 'font-body', 'font-normal', 'select', 'leading-normal', 'bg-none'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tprimary: ['select-primary'],\n\t\t\tsecondary: ['select-secondary'],\n\t\t\ttertiary: ['select-tertiary'],\n\t\t\taccent: ['select-accent'],\n\t\t\tinfo: ['select-info'],\n\t\t\tsuccess: ['select-success'],\n\t\t\terror: ['select-error'],\n\t\t\twarning: ['select-warning'],\n\t\t},\n\t\tsize: {\n\t\t\txs: ['select-xs'],\n\t\t\tsm: ['select-sm'],\n\t\t\tmd: ['select-md'],\n\t\t\tlg: ['select-lg'],\n\t\t\txl: ['select-xl'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\tvariant: 'secondary',\n\t\tsize: 'md',\n\t},\n});\n\n// ==============================================================================\n// COMPONENT\n// ==============================================================================\n\n/**\n * A customizable combobox component with search functionality, multiple selection modes,\n * and keyboard navigation support. Implements Angular's ControlValueAccessor interface\n * for seamless integration with reactive forms.\n *\n * @example\n * ```html\n * <st-combobox\n * [(value)]=\"selectedValue\"\n * [options]=\"availableOptions\"\n * displayKey=\"name\"\n * valueKey=\"id\"\n * placeholder=\"Select an option\"\n * variant=\"primary\"\n * size=\"md\">\n * </st-combobox>\n * ```\n *\n * @example\n * ```typescript\n * // Multiple selection\n * <st-combobox\n * [(value)]=\"selectedValues\"\n * [options]=\"options\"\n * selectionType=\"multiple\"\n * [allowClear]=\"true\">\n * </st-combobox>\n * ```\n */\n@Component({\n\tselector: 'st-combobox',\n\timports: [FormsModule, ReactiveFormsModule, PortalModule, OverlayModule, CdkListbox, CdkOption, IconComponent, BadgeComponent, TranslatePipe],\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: ComboboxComponent,\n\t\t\tmulti: true,\n\t\t},\n\t],\n\ttemplateUrl: './combobox.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ComboboxComponent implements AfterViewInit, ControlValueAccessor {\n\t// ==============================================================================\n\t// SERVICES\n\t// ==============================================================================\n\n\t/**\n\t * Angular translation service for internationalization\n\t * @internal\n\t */\n\ttranslateService = inject(TranslateService);\n\n\t// ==============================================================================\n\t// INPUT PROPERTIES\n\t// ==============================================================================\n\n\t/**\n\t * The visual style variant of the combobox\n\t * @default 'secondary'\n\t */\n\tvariant = input<ComboboxVariantProps>('secondary');\n\n\t/**\n\t * The size variant of the combobox\n\t * @default 'md'\n\t */\n\tsize = input<ComboboxSizeProps>('md');\n\n\t/**\n\t * Whether to use ghost (transparent) styling\n\t * @default false\n\t */\n\tghost = input<boolean>(false);\n\n\t/**\n\t * The HTML name attribute for the underlying form control\n\t */\n\tname = input<string | null>(null);\n\n\t/**\n\t * Placeholder text displayed when no option is selected\n\t */\n\tplaceholder = input<string>('');\n\n\t/**\n\t * Whether the combobox is disabled\n\t * @default false\n\t */\n\tdisabled = model<boolean>(false);\n\n\t/**\n\t * Label text displayed above the combobox\n\t */\n\tlabel = input<string>('');\n\n\t/**\n\t * Parent form group for reactive forms integration\n\t */\n\tparentForm = input<FormGroup | null>(null);\n\n\t/**\n\t * The form control name when used within a reactive form\n\t */\n\tformControlName = input<string>('');\n\n\t/**\n\t * Whether to show a clear button next to the selected value(s) in the trigger\n\t * Works for both single and multiple selection modes\n\t * @default true\n\t */\n\tallowClear = input<boolean>(true);\n\n\t/**\n\t * Whether to show a \"Clear All\" button at the bottom of the dropdown for multiple selection\n\t * Only applies when selectionType is 'multiple'\n\t * @default true\n\t */\n\tallowClearAll = input<boolean>(true);\n\n\t/**\n\t * Placeholder text for the search input field\n\t * @default 'Search...'\n\t */\n\tsearchPlaceholder = input<string>('');\n\n\t/**\n\t * Text displayed when no search results are found\n\t * @default 'No results found'\n\t */\n\tnoResultsText = input<string>('');\n\n\t/**\n\t * The current selected value(s)\n\t * For single selection: any | null\n\t * For multiple selection: any[]\n\t */\n\tvalue = model<any>(null);\n\n\t/**\n\t * Array of available options to select from\n\t */\n\toptions = input<any[]>([]);\n\n\t/**\n\t * The object property to use for display text when options are objects\n\t * Falls back to common property names if not specified\n\t */\n\tdisplayKey = input<string>('');\n\n\t/**\n\t * The object property to use as the value when options are objects\n\t * Uses the entire object if not specified\n\t */\n\tvalueKey = input<string>('');\n\n\t/**\n\t * Selection mode: 'single' for single selection, 'multiple' for multi-select\n\t * @default 'single'\n\t */\n\tselectionType = input<SelectionType>('single');\n\n\t/**\n\t * Whether to enable debounced search functionality\n\t * @default false\n\t */\n\tsearchDebounced = input<boolean>(false);\n\n\t/**\n\t * Debounce time in milliseconds for search input\n\t * @default 300\n\t */\n\tsearchDebounceTime = input<number>(300);\n\n\t/**\n\t * Event emitted when combobox loses focus\n\t */\n\tblurred = output<unknown>();\n\n\t/**\n\t * Event emitted when selection changes\n\t */\n\tvalueUpdated = output<any>();\n\n\t/**\n\t * Event emitted when search query changes with filtered results\n\t */\n\tsearchQuery = output<ComboboxSearchQueryEvent>();\n\n\t// ==============================================================================\n\t// ICONS\n\t// ==============================================================================\n\n\t/** Search icon for the search input */\n\ticonSearch = matSearchOutline;\n\t/** Dropdown chevron icon */\n\ticonChevronDown = matKeyboardArrowDownOutline;\n\t/** Check icon for selected options */\n\ticonCheck = matCheckOutline;\n\t/** Close/clear icon */\n\ticonClose = matCloseOutline;\n\n\t// ==============================================================================\n\t// PRIVATE PROPERTIES\n\t// ==============================================================================\n\n\t/** Internal search input value */\n\tprivate readonly searchValue = signal<string>('');\n\t/** Processed search term after debouncing */\n\tprivate readonly searchTerm = signal<string>('');\n\t/** RxJS subject for search input handling */\n\tprivate readonly searchSubject = new Subject<string>();\n\t/** Current animation state of the overlay */\n\tprivate readonly animationState = signal<AnimationState>('closed');\n\t/** Trigger for blur events in form validation */\n\tprivate readonly blurTrigger = signal(0);\n\t/** Active option index for keyboard navigation */\n\tprivate readonly activeOptionIndex = signal<number>(-1);\n\n\t// ==============================================================================\n\t// VIEW CHILDREN\n\t// ==============================================================================\n\n\t/** Reference to the trigger button element */\n\ttriggerRef = viewChild<ElementRef<HTMLButtonElement>>('trigger');\n\n\t/** Reference to the search input element */\n\tsearchInputRef = viewChild<ElementRef<HTMLInputElement>>('searchInput');\n\n\t/** Reference to the options list container */\n\toptionsList = viewChild<ElementRef<HTMLDivElement>>('optionsList');\n\n\t/** Reference to the CDK listbox for keyboard navigation */\n\tlistbox = viewChild<CdkListbox>('listbox');\n\n\t// ==============================================================================\n\t// SIGNALS\n\t// ==============================================================================\n\n\t/** Width of the trigger button for overlay positioning */\n\ttriggerWidth = signal<number>(0);\n\n\t// ==============================================================================\n\t// FORM CONTROL INTEGRATION\n\t// ==============================================================================\n\n\t/** Form control reference for reactive forms */\n\tprivate readonly formControl = computed(() => this.parentForm()?.get(this.formControlName()) as FormControl | null);\n\t/** Observable stream of form control */\n\tprivate readonly formControl$ = toObservable(this.formControl);\n\t/** Stream of form control status changes */\n\tprivate readonly statusChanges$ = this.formControl$.pipe(switchMap((control) => control?.statusChanges.pipe(startWith(control.status)) || []));\n\t/** Stream of form control value changes */\n\tprivate readonly stateChanges$ = this.formControl$.pipe(switchMap((control) => control?.valueChanges.pipe(startWith(control.value)) || []));\n\t/** Signal for form control status */\n\tprivate readonly statusSignal = toSignal(this.statusChanges$);\n\t/** Signal for form control state */\n\tprivate readonly stateSignal = toSignal(this.stateChanges$);\n\n\t// ==============================================================================\n\t// CONTROL VALUE ACCESSOR\n\t// ==============================================================================\n\n\t/** Callback function for value changes */\n\tprivate onChange = (value: any) => {};\n\t/** Callback function for touch events */\n\tprivate onTouched = () => {};\n\n\t// ==============================================================================\n\t// CONSTRUCTOR\n\t// ==============================================================================\n\n\tconstructor() {\n\t\tthis.setupSearchHandling();\n\t\tthis.setupSearchQueryEmission();\n\t}\n\n\t// ==============================================================================\n\t// COMPUTED PROPERTIES\n\t// ==============================================================================\n\n\t/**\n\t * Filtered options based on current search term\n\t * @returns Array of options that match the search criteria\n\t */\n\tfilteredOptions = computed(() => {\n\t\tconst options = this.options();\n\t\tconst search = this.searchTerm().toLowerCase().trim();\n\n\t\tif (!search) return options;\n\n\t\treturn options.filter((option) => {\n\t\t\tconst displayValue = this.getDisplayValue(option).toLowerCase();\n\t\t\treturn displayValue.includes(search);\n\t\t});\n\t});\n\n\t/**\n\t * Whether the overlay is currently open or in the process of opening/closing\n\t * @returns True if overlay is visible or animating\n\t */\n\tisOpen = computed(() => {\n\t\tconst state = this.animationState();\n\t\treturn state === 'opening' || state === 'open' || state === 'closing';\n\t});\n\n\t/**\n\t * Whether the overlay is currently animating to open state\n\t * @returns True if overlay is opening or open\n\t */\n\tisAnimatingOpen = computed(() => {\n\t\tconst state = this.animationState();\n\t\treturn state === 'opening' || state === 'open';\n\t});\n\n\t/**\n\t * Current animation state for template binding\n\t * @returns Current animation state\n\t */\n\tdataState = computed(() => this.animationState());\n\n\t/**\n\t * Display value for the selected option(s)\n\t * @returns Formatted display string based on selection type and current value\n\t */\n\tdisplayValue = computed(() => {\n\t\tconst selectionType = this.selectionType();\n\t\tconst currentValue = this.value();\n\n\t\tif (selectionType === 'multiple') {\n\t\t\tconst selected = Array.isArray(currentValue) ? currentValue : [];\n\t\t\tif (selected.length === 0) return this.translatedPlaceholder();\n\n\t\t\t// Validate that all selected values exist in options\n\t\t\tconst validSelected = selected.filter((value) => this.isValidValue(value));\n\t\t\tif (validSelected.length === 0) return this.translatedPlaceholder();\n\t\t\tif (validSelected.length === 1) return this.getDisplayValue(validSelected[0]);\n\t\t\treturn `${validSelected.length} items selected`;\n\t\t} else {\n\t\t\t// For single selection, only show display value if it's valid\n\t\t\tif (!currentValue || !this.isValidValue(currentValue)) {\n\t\t\t\treturn this.translatedPlaceholder();\n\t\t\t}\n\t\t\treturn this.getDisplayValue(currentValue);\n\t\t}\n\t});\n\n\t/**\n\t * Display information for multiple selection showing first item and additional count\n\t * @returns Object with first item display and additional count, or null for single selection\n\t */\n\tmultipleDisplayInfo = computed(() => {\n\t\tconst selectionType = this.selectionType();\n\t\tconst currentValue = this.value();\n\n\t\tif (selectionType === 'multiple') {\n\t\t\tconst selected = Array.isArray(currentValue) ? currentValue : [];\n\t\t\tif (selected.length === 0) return null;\n\t\t\tif (selected.length === 1) return { firstItem: this.getDisplayValue(selected[0]), additionalCount: 0 };\n\t\t\treturn {\n\t\t\t\tfirstItem: this.getDisplayValue(selected[0]),\n\t\t\t\tadditionalCount: selected.length - 1,\n\t\t\t};\n\t\t}\n\t\treturn null;\n\t});\n\n\t/**\n\t * Whether the clear button should be shown\n\t * @returns True if there's a valid selected value and clear is allowed\n\t */\n\tshowClearButton = computed(() => {\n\t\tif (!this.allowClear() || this.disabled()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst currentValue = this.value();\n\t\tif (!currentValue) return false;\n\n\t\tif (this.selectionType() === 'multiple') {\n\t\t\t// For multiple selection, check if we have any valid values\n\t\t\tconst selected = Array.isArray(currentValue) ? currentValue : [];\n\t\t\treturn selected.some((value) => this.isValidValue(value));\n\t\t} else {\n\t\t\t// For single selection, check if the value is valid\n\t\t\treturn this.isValidValue(currentValue);\n\t\t}\n\t});\n\n\t/**\n\t * Base CSS classes for the combobox component\n\t * @internal\n\t */\n\tcomponentClass = computed(() => {\n\t\treturn cn(\n\t\t\tcomboboxComponent({\n\t\t\t\tvariant: this.variant(),\n\t\t\t\tsize: this.size(),\n\t\t\t}),\n\t\t\t{ 'select-ghost': this.ghost() },\n\t\t);\n\t});\n\n\t/**\n\t * Error state CSS classes\n\t * @internal\n\t */\n\terrorClass = computed(() => {\n\t\treturn cn(\n\t\t\tcomboboxComponent({\n\t\t\t\tvariant: 'error',\n\t\t\t\tsize: this.size(),\n\t\t\t}),\n\t\t\t{ 'select-ghost': this.ghost() },\n\t\t);\n\t});\n\n\t/**\n\t * Success state CSS classes\n\t * @internal\n\t */\n\tsuccessClass = computed(() => {\n\t\treturn cn(\n\t\t\tcomboboxComponent({\n\t\t\t\tvariant: 'success',\n\t\t\t\tsize: this.size(),\n\t\t\t}),\n\t\t\t{ 'select-ghost': this.ghost() },\n\t\t);\n\t});\n\n\t/**\n\t * Validation-aware CSS classes based on form control state\n\t * @internal\n\t */\n\tvalidationClass = computed(() => {\n\t\tconst control = this.formControl();\n\t\tconst trigger = this.blurTrigger();\n\n\t\tif (!control) return this.componentClass();\n\n\t\tif (control.pristine && !control.touched) {\n\t\t\treturn this.componentClass();\n\t\t}\n\n\t\tconst isTouched = control.touched || trigger > 0;\n\t\tthis.statusSignal();\n\t\tthis.stateSignal();\n\n\t\tif (control.dirty || isTouched) {\n\t\t\tif (control.invalid) return this.errorClass();\n\t\t\tif (control.valid) return this.successClass();\n\t\t}\n\n\t\treturn this.componentClass();\n\t});\n\n\t/**\n\t * CSS classes for the search input field\n\t * @internal\n\t */\n\tsearchInputClass = computed(() => {\n\t\treturn cn('input bg-base-200 w-full border-transparent focus-within:outline-none focus:border-transparent focus:outline-none', {\n\t\t\t'input-xs': this.size() === 'xs',\n\t\t\t'input-sm': this.size() === 'sm',\n\t\t\t'input-md': this.size() === 'md',\n\t\t\t'input-lg': this.size() === 'lg',\n\t\t\t'input-xl': this.size() === 'xl',\n\t\t});\n\t});\n\n\t/**\n\t * CSS classes for the options menu\n\t * @internal\n\t */\n\tmenuClass = computed(() => {\n\t\treturn cn(\n\t\t\t'menu flex-nowrap max-h-72 overflow-y-auto overscroll-contain w-full p-0 focus-within:outline-none focus:outline-none focus-visible:outline-none',\n\t\t\t{\n\t\t\t\t'menu-xs': this.size() === 'xs',\n\t\t\t\t'menu-sm': this.size() === 'sm',\n\t\t\t\t'menu-md': this.size() === 'md',\n\t\t\t\t'menu-lg': this.size() === 'lg',\n\t\t\t\t'menu-xl': this.size() === 'xl',\n\t\t\t},\n\t\t);\n\t});\n\n\t/**\n\t * CSS classes for the badge\n\t * @internal\n\t */\n\tbadgeClass = computed<BadgeSizeProps>(() => {\n\t\tconst size = this.size();\n\n\t\tswitch (size) {\n\t\t\tcase 'xs':\n\t\t\tcase 'sm':\n\t\t\t\treturn 'xs';\n\t\t\tcase 'md':\n\t\t\t\treturn 'sm';\n\t\t\tcase 'lg':\n\t\t\t\treturn 'md';\n\t\t\tcase 'xl':\n\t\t\t\treturn 'lg';\n\t\t\tdefault:\n\t\t\t\treturn 'sm';\n\t\t}\n\t});\n\n\t/**\n\t * Translated search placeholder text\n\t * @returns Translated placeholder or input value\n\t */\n\ttranslatedSearchPlaceholder = computed(() => {\n\t\tconst customPlaceholder = this.searchPlaceholder();\n\t\treturn customPlaceholder || this.translateService.instant('sdk.combobox.searchPlaceholder');\n\t});\n\n\t/**\n\t * Translated main placeholder text\n\t * @returns Translated placeholder or input value\n\t */\n\ttranslatedPlaceholder = computed(() => {\n\t\tconst customPlaceholder = this.placeholder();\n\t\treturn customPlaceholder || this.translateService.instant('sdk.combobox.placeholder');\n\t});\n\n\t/**\n\t * Translated no results text\n\t * @returns Translated no results text or input value\n\t */\n\ttranslatedNoResultsText = computed(() => {\n\t\tconst customNoResults = this.noResultsText();\n\t\treturn customNoResults || this.translateService.instant('sdk.combobox.noResultsFound');\n\t});\n\n\t/**\n\t * Current search input value for template binding\n\t * @returns Current search value\n\t */\n\tget currentSearchValue(): string {\n\t\treturn this.searchValue();\n\t}\n\n\t// ==============================================================================\n\t// LIFECYCLE METHODS\n\t// ==============================================================================\n\n\t/**\n\t * Angular lifecycle hook called after view initialization\n\t * Updates the trigger width for proper overlay positioning\n\t */\n\tngAfterViewInit() {\n\t\tthis.updateTriggerWidth();\n\t}\n\n\t// ==============================================================================\n\t// CONTROL VALUE ACCESSOR IMPLEMENTATION\n\t// ==============================================================================\n\n\t/**\n\t * Writes a new value to the component\n\t * @param value - The new value to set\n\t */\n\twriteValue(value: any): void {\n\t\t// Only set the value if it's null/undefined or if it's valid\n\t\tif (!value) {\n\t\t\tthis.value.set(value);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.selectionType() === 'multiple') {\n\t\t\t// For multiple selection, filter out invalid values\n\t\t\tif (Array.isArray(value)) {\n\t\t\t\tconst validValues = value.filter((v) => this.isValidValue(v));\n\t\t\t\tthis.value.set(validValues.length > 0 ? validValues : []);\n\t\t\t} else {\n\t\t\t\tthis.value.set([]);\n\t\t\t}\n\t\t} else {\n\t\t\t// For single selection, only set if valid\n\t\t\tconst isValid = this.isValidValue(value);\n\t\t\tthis.value.set(isValid ? value : null);\n\t\t}\n\t}\n\n\t/**\n\t * Registers a callback function to be called when the value changes\n\t * @param fn - The callback function\n\t */\n\tregisterOnChange(fn: (value: any) => void): void {\n\t\tthis.onChange = fn;\n\t}\n\n\t/**\n\t * Registers a callback function to be called when the component is touched\n\t * @param fn - The callback function\n\t */\n\tregisterOnTouched(fn: () => void): void {\n\t\tthis.onTouched = fn;\n\t}\n\n\t// ==============================================================================\n\t// PUBLIC METHODS\n\t// ==============================================================================\n\n\t/**\n\t * Toggles the overlay open/closed state\n\t * Handles focus management and animation state transitions\n\t */\n\ttoggleOverlay() {\n\t\tconst currentState = this.animationState();\n\n\t\tif (currentState === 'closed') {\n\t\t\tthis.updateTriggerWidth();\n\t\t\tthis.animationState.set('opening');\n\t\t\t// Focus search input after opening\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.searchInputRef()?.nativeElement?.focus();\n\t\t\t\t// Set first option as active by default\n\t\t\t\tthis.setDefaultActiveOption();\n\t\t\t}, 100);\n\t\t} else if (currentState === 'open') {\n\t\t\tthis.animationState.set('closing');\n\t\t}\n\t}\n\n\t/**\n\t * Handles animation end events to update state\n\t * @param event - The animation event\n\t */\n\tonAnimationEnd(event: AnimationEvent) {\n\t\tif (event.animationName === 'fade-in-up') {\n\t\t\tthis.animationState.set('open');\n\t\t} else if (event.animationName === 'fade-out-down') {\n\t\t\tthis.animationState.set('closed');\n\t\t\tthis.clearSearch();\n\t\t\tthis.triggerBlur();\n\t\t\t// Return focus to trigger button for better keyboard navigation\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.triggerRef()?.nativeElement?.focus();\n\t\t\t}, 0);\n\t\t}\n\t}\n\n\t/**\n\t * Handles overlay detachment\n\t * Cleans up state and triggers blur\n\t */\n\thandleDetach() {\n\t\tthis.animationState.set('closed');\n\t\tthis.clearSearch();\n\t\tthis.triggerBlur();\n\t}\n\n\t/**\n\t * Handles clicks outside the component\n\t * @param event - The mouse event\n\t */\n\thandleClickOutside(event: MouseEvent) {\n\t\tif (this.animationState() === 'open') {\n\t\t\tthis.animationState.set('closing');\n\t\t}\n\t\tevent.stopPropagation();\n\t\tthis.triggerBlur();\n\t}\n\n\t/**\n\t * Handles search input changes\n\t * @param event - The input event\n\t */\n\thandleSearchInput(event: Event) {\n\t\tconst target = event.target as HTMLInputElement;\n\t\tconst searchValue = target.value;\n\t\tthis.searchValue.set(searchValue);\n\n\t\tif (this.searchDebounced()) {\n\t\t\tthis.searchSubject.next(searchValue);\n\t\t} else {\n\t\t\tthis.searchTerm.set(searchValue);\n\t\t\t// Set first option as active after search\n\t\t\tsetTimeout(() => this.setDefaultActiveOption(), 0);\n\t\t}\n\t}\n\n\t/**\n\t * Handles option selection\n\t * @param option - The selected option\n\t */\n\thandleOptionSelect(option: any) {\n\t\tconst selectionType = this.selectionType();\n\t\tconst currentValue = this.value();\n\n\t\tif (selectionType === 'multiple') {\n\t\t\tconst currentValues = Array.isArray(currentValue) ? currentValue : [];\n\t\t\tconst optionValue = this.getOptionValue(option);\n\t\t\tconst isSelected = this.isOptionSelected(option);\n\n\t\t\tlet newValues: any[];\n\t\t\tif (isSelected) {\n\t\t\t\tnewValues = currentValues.filter((value) => this.getOptionValue(value) !== optionValue);\n\t\t\t} else {\n\t\t\t\tnewValues = [...currentValues, option];\n\t\t\t}\n\n\t\t\tthis.value.set(newValues);\n\t\t\tthis.onChange(newValues);\n\t\t\tthis.valueUpdated.emit(newValues);\n\t\t} else {\n\t\t\tthis.value.set(option);\n\t\t\tthis.onChange(option);\n\t\t\tthis.valueUpdated.emit(option);\n\t\t\tthis.animationState.set('closing');\n\t\t}\n\n\t\tthis.onTouched();\n\t}\n\n\t/**\n\t * Handles CDK listbox selection changes\n\t * @param event - The selection change event\n\t */\n\thandleSelectionChange(event: any) {\n\t\tif (event.option) {\n\t\t\tthis.handleOptionSelect(event.option.value);\n\t\t}\n\t}\n\n\t/**\n\t * Handles keyboard events for option selection\n\t * @param event - The keyboard event\n\t */\n\thandleListboxKeydown(event: KeyboardEvent) {\n\t\tif (event.key === 'Enter' || event.key === ' ') {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\n\t\t\tconst focusedOption = this.optionsList()?.nativeElement.querySelector('.cdk-option-active');\n\t\t\tif (focusedOption) {\n\t\t\t\tconst optionIndex = parseInt(focusedOption.getAttribute('data-option-index') || '0');\n\t\t\t\tconst filteredOptions = this.filteredOptions();\n\t\t\t\tif (optionIndex >= 0 && optionIndex < filteredOptions.length) {\n\t\t\t\t\tthis.handleOptionSelect(filteredOptions[optionIndex]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Handles keyboard events on the search input for navigation and selection\n\t * @param event - The keyboard event\n\t */\n\thandleSearchKeydown(event: KeyboardEvent) {\n\t\tconst filteredOptions = this.filteredOptions();\n\t\tconst currentIndex = this.activeOptionIndex();\n\n\t\tswitch (event.key) {\n\t\t\tcase 'ArrowDown': {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tconst nextIndex = currentIndex < filteredOptions.length - 1 ? currentIndex + 1 : 0;\n\t\t\t\tthis.setActiveOption(nextIndex);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'ArrowUp': {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tconst prevIndex = currentIndex > 0 ? currentIndex - 1 : filteredOptions.length - 1;\n\t\t\t\tthis.setActiveOption(prevIndex);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'Enter':\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tif (currentIndex >= 0 && currentIndex < filteredOptions.length) {\n\t\t\t\t\tthis.handleOptionSelect(filteredOptions[currentIndex]);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'Tab': {\n\t\t\t\t// Allow Tab only to clear button in multiple selection mode\n\t\t\t\tconst isMultipleSelection = this.selectionType() === 'multiple';\n\t\t\t\tconst hasSelectedValues = this.value() && this.isArray(this.value()) && this.value().length > 0;\n\n\t\t\t\tif (isMultipleSelection && hasSelectedValues) {\n\t\t\t\t\t// Allow default Tab behavior to go to clear button\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\t// Prevent tabbing out of the search input\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'Escape':\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tthis.animationState.set('closing');\n\t\t\t\tthis.activeOptionIndex.set(-1);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t// For other keys (including space), set first option as active for typing\n\t\t\t\tsetTimeout(() => this.setDefaultActiveOption(), 0);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t/**\n\t * Handles keyboard events on the clear all button\n\t * @param event - The keyboard event\n\t */\n\thandleClearButtonKeydown(event: KeyboardEvent) {\n\t\tif (event.key === 'Tab') {\n\t\t\t// Prevent default Tab behavior and focus back to search input\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tthis.searchInputRef()?.nativeElement?.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Handles keyboard events on the trigger button\n\t * @param event - The keyboard event\n\t */\n\thandleTriggerKeydown(event: KeyboardEvent) {\n\t\tswitch (event.key) {\n\t\t\tcase 'ArrowDown':\n\t\t\tcase 'ArrowUp':\n\t\t\tcase 'Enter':\n\t\t\tcase ' ':\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tif (this.animationState() === 'closed') {\n\t\t\t\t\tthis.toggleOverlay();\n\t\t\t\t} else {\n\t\t\t\t\t// If already open, handle navigation\n\t\t\t\t\tthis.handleListboxKeydown(event);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'Escape':\n\t\t\t\tif (this.animationState() === 'open') {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tthis.animationState.set('closing');\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t/**\n\t * Clears the current selection\n\t */\n\tclearSelection() {\n\t\tif (this.selectionType() === 'multiple') {\n\t\t\tthis.value.set([]);\n\t\t\tthis.onChange([]);\n\t\t\tthis.valueUpdated.emit([]);\n\t\t} else {\n\t\t\tthis.value.set(null);\n\t\t\tthis.onChange(null);\n\t\t\tthis.valueUpdated.emit(null);\n\t\t}\n\t\tthis.onTouched();\n\n\t\t// Focus back to search input after clearing\n\t\tsetTimeout(() => {\n\t\t\tthis.searchInputRef()?.nativeElement?.focus();\n\t\t\t// Set first option as active by default after clearing\n\t\t\tthis.setDefaultActiveOption();\n\t\t}, 0);\n\t}\n\n\t/**\n\t * Handles clear selection button click\n\t * @param event - The click event\n\t */\n\thandleClearSelection(event: Event) {\n\t\tevent.stopPropagation();\n\t\tthis.clearSelection();\n\t}\n\n\t/**\n\t * Checks if an option is currently selected\n\t * @param option - The option to check\n\t * @returns True if the option is selected\n\t */\n\tisOptionSelected(option: any): boolean {\n\t\tconst selectionType = this.selectionType();\n\t\tconst currentValue = this.value();\n\t\tconst optionValue = this.getOptionValue(option);\n\n\t\tif (selectionType === 'multiple') {\n\t\t\tconst selected = Array.isArray(currentValue) ? currentValue : [];\n\t\t\treturn selected.some((value) => this.getOptionValue(value) === optionValue);\n\t\t} else {\n\t\t\treturn currentValue && this.getOptionValue(currentValue) === optionValue;\n\t\t}\n\t}\n\n\t/**\n\t * Checks if an option is currently active for keyboard navigation\n\t * @param index - The option index\n\t * @returns True if the option is active\n\t */\n\tisActiveOption(index: number): boolean {\n\t\treturn this.activeOptionIndex() === index;\n\t}\n\n\t/**\n\t * Gets the display value for an option\n\t * @param option - The option to get display value for\n\t * @returns The display string for the option\n\t */\n\tgetDisplayValue(option: any): string {\n\t\tif (!option) return '';\n\t\tconst displayKey = this.displayKey();\n\n\t\tif (displayKey && typeof option === 'object') {\n\t\t\treturn option[displayKey] || '';\n\t\t}\n\n\t\tif (typeof option === 'object') {\n\t\t\tconst commonKeys = ['name', 'label', 'text', 'title', 'displayName'];\n\t\t\tfor (const key of commonKeys) {\n\t\t\t\tif (option[key] !== undefined && option[key] !== null) {\n\t\t\t\t\treturn String(option[key]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst keys = Object.keys(option);\n\t\t\tfor (const key of keys) {\n\t\t\t\tconst value = option[key];\n\t\t\t\tif (typeof value === 'string' || typeof value === 'number') {\n\t\t\t\t\treturn String(value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn JSON.stringify(option);\n\t\t}\n\n\t\treturn String(option);\n\t}\n\n\t/**\n\t * Type guard to check if a value is an array\n\t * @param value - The value to check\n\t * @returns True if the value is an array\n\t */\n\tisArray(value: any): value is any[] {\n\t\treturn Array.isArray(value);\n\t}\n\n\t// ==============================================================================\n\t// PRIVATE METHODS\n\t// ==============================================================================\n\n\t/**\n\t * Updates the trigger button width for overlay positioning\n\t */\n\tprivate updateTriggerWidth() {\n\t\tif (this.triggerRef) {\n\t\t\tconst width = this.triggerRef()?.nativeElement.offsetWidth;\n\t\t\tif (!width) return;\n\t\t\tthis.triggerWidth.set(width);\n\t\t}\n\t}\n\n\t/**\n\t * Gets the value property from an option\n\t * @param option - The option to get value from\n\t * @returns The option value\n\t */\n\tprivate getOptionValue(option: any): any {\n\t\tif (!option) return option;\n\t\tconst valueKey = this.valueKey();\n\t\treturn valueKey && typeof option === 'object' ? option[valueKey] : option;\n\t}\n\n\t/**\n\t * Checks if a value is valid (exists in options)\n\t * @param value - The value to validate\n\t * @returns True if the value exists in the options array\n\t */\n\tprivate isValidValue(value: any): boolean {\n\t\tif (!value) return false;\n\n\t\tconst options = this.options();\n\t\treturn options.some((option) => {\n\t\t\tif (typeof option === 'string' && typeof value === 'string') {\n\t\t\t\treturn option === value;\n\t\t\t}\n\t\t\t// For objects, check if the value matches the option or its value property\n\t\t\tconst optionValue = this.getOptionValue(option);\n\t\t\tconst currentValue = this.getOptionValue(value);\n\t\t\treturn optionValue === currentValue || option === value;\n\t\t});\n\t}\n\n\t/**\n\t * Triggers blur event for form validation\n\t */\n\tprivate triggerBlur() {\n\t\tthis.blurTrigger.update((val) => val + 1);\n\t\tthis.onTouched();\n\t\tthis.blurred.emit(this.value());\n\t}\n\n\t/**\n\t * Clears the search input and term\n\t */\n\tprivate clearSearch() {\n\t\tthis.searchValue.set('');\n\t\tthis.searchTerm.set('');\n\t\tthis.activeOptionIndex.set(-1);\n\t}\n\n\t/**\n\t * Sets up reactive search handling with debouncing\n\t * The debounce time updates reactively when the input changes\n\t */\n\tprivate setupSearchHandling() {\n\t\tconst debounceTime$ = toObservable(this.searchDebounceTime);\n\n\t\tdebounceTime$\n\t\t\t.pipe(\n\t\t\t\tswitchMap((currentDebounceTime) => {\n\t\t\t\t\treturn this.searchSubject.pipe(debounceTime(currentDebounceTime), distinctUntilChanged());\n\t\t\t\t}),\n\t\t\t\ttakeUntilDestroyed(),\n\t\t\t)\n\t\t\t.subscribe((searchValue: string) => {\n\t\t\t\tthis.searchTerm.set(searchValue);\n\t\t\t\t// Set first option as active after debounced search\n\t\t\t\tsetTimeout(() => this.setDefaultActiveOption(), 0);\n\t\t\t});\n\t}\n\n\t/**\n\t * Sets the active option for keyboard navigation\n\t * @param index - The index of the option to make active\n\t */\n\tprivate setActiveOption(index: number) {\n\t\tthis.activeOptionIndex.set(index);\n\t\tthis.updateActiveOptionVisually();\n\t}\n\n\t/**\n\t * Sets the first option as active by default\n\t */\n\tprivate setDefaultActiveOption() {\n\t\tconst filteredOptions = this.filteredOptions();\n\t\tif (filteredOptions.length > 0) {\n\t\t\tthis.setActiveOption(0);\n\t\t}\n\t}\n\n\t/**\n\t * Updates the visual state of the active option\n\t */\n\tprivate updateActiveOptionVisually() {\n\t\tif (!this.optionsList()?.nativeElement) return;\n\n\t\t// Remove active class from all options\n\t\tconst allOptions = this.optionsList()?.nativeElement.querySelectorAll('[data-option-index]');\n\t\tif (!allOptions) return;\n\t\tallOptions.forEach((option) => {\n\t\t\toption.classList.remove('cdk-option-active');\n\t\t});\n\n\t\t// Add active class to current option\n\t\tconst currentIndex = this.activeOptionIndex();\n\t\tif (currentIndex >= 0) {\n\t\t\tconst activeOption = this.optionsList()?.nativeElement.querySelector(`[data-option-index=\"${currentIndex}\"]`);\n\t\t\tif (activeOption) {\n\t\t\t\tactiveOption.classList.add('cdk-option-active');\n\t\t\t\t// Scroll into view if needed\n\t\t\t\tactiveOption.scrollIntoView({ block: 'nearest' });\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Sets up the search query emission effect\n\t * Emits search results whenever the search term or options change\n\t */\n\tprivate setupSearchQueryEmission() {\n\t\teffect(() => {\n\t\t\tconst query = this.searchTerm();\n\t\t\tconst results = this.filteredOptions();\n\n\t\t\t// Emit the search query event with current query and filtered results\n\t\t\tthis.searchQuery.emit({ query, results });\n\t\t});\n\t}\n}\n","@let isOpen = this.isOpen(); @let isAnimatingOpen = this.isAnimatingOpen(); @let triggerWidth = this.triggerWidth();\n@let dataState = this.dataState(); @let filteredOptions = this.filteredOptions(); @let displayValue = this.displayValue();\n@let multipleDisplayInfo = this.multipleDisplayInfo(); @let label = this.label();\n\n<fieldset class=\"fieldset p-0\">\n\t@if (label) {\n\t\t<legend class=\"fieldset-legend font-body pt-0 text-pretty\">{{ label }}</legend>\n\t}\n\n\t<button\n\t\t#trigger\n\t\t[class]=\"validationClass()\"\n\t\t(click)=\"toggleOverlay()\"\n\t\t(keydown)=\"handleTriggerKeydown($event)\"\n\t\ttype=\"button\"\n\t\tcdkOverlayOrigin\n\t\taria-haspopup=\"true\"\n\t\trole=\"combobox\"\n\t\t[attr.aria-controls]=\"'combobox-list'\"\n\t\t[attr.aria-expanded]=\"isOpen\"\n\t\t[disabled]=\"disabled()\"\n\t>\n\t\t<span class=\"flex-1 truncate text-left\">\n\t\t\t@if (selectionType() === 'multiple' && multipleDisplayInfo) {\n\t\t\t\t<span class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t<span class=\"truncate\">{{ multipleDisplayInfo.firstItem }}</span>\n\t\t\t\t\t@if (multipleDisplayInfo.additionalCount > 0) {\n\t\t\t\t\t\t<st-badge [size]=\"badgeClass()\">+{{ multipleDisplayInfo.additionalCount }}</st-badge>\n\t\t\t\t\t}\n\t\t\t\t</span>\n\t\t\t} @else {\n\t\t\t\t{{ displayValue }}\n\t\t\t}\n\t\t</span>\n\t\t<div class=\"inline-flex items-center justify-items-end gap-2\">\n\t\t\t<!-- Clear button for both single and multiple selection -->\n\t\t\t@if (showClearButton()) {\n\t\t\t\t<div class=\"grid translate-x-full place-content-center\">\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclass=\"btn font-body btn-sm btn-secondary h-[1.5em] w-[1.5em] items-center p-0 align-top [font-size:inherit] leading-normal font-medium text-pretty\"\n\t\t\t\t\t\t(click)=\"handleClearSelection($event)\"\n\t\t\t\t\t\t(keydown.enter)=\"handleClearSelection($event)\"\n\t\t\t\t\t\t(keydown.space)=\"handleClearSelection($event)\"\n\t\t\t\t\t\t[attr.aria-label]=\"'sdk.combobox.clearSelection' | translate\"\n\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<st-icon [icon]=\"iconClose\"></st-icon>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t<st-icon\n\t\t\t\tclass=\"h-[1.5em] w-[1.5em] flex-0 translate-x-full transition-transform duration-200\"\n\t\t\t\t[class.rotate-180]=\"isAnimatingOpen\"\n\t\t\t\t[icon]=\"iconChevronDown\"\n\t\t\t></st-icon>\n\t\t</div>\n\t</button>\n\n\t<ng-template\n\t\tcdkConnectedOverlay\n\t\t[cdkConnectedOverlayOrigin]=\"trigger\"\n\t\t[cdkConnectedOverlayOpen]=\"isOpen\"\n\t\t[cdkConnectedOverlayWidth]=\"triggerWidth\"\n\t\t[cdkConnectedOverlayMinWidth]=\"triggerWidth\"\n\t\t(detach)=\"handleDetach()\"\n\t\t(overlayOutsideClick)=\"handleClickOutside($event)\"\n\t>\n\t\t<div\n\t\t\tclass=\"bg-base-200 rounded-box shadow-main border-neutral data-[state=closing]:animate-fade-out-down data-[state=opening]:animate-fade-in-up data-[state=open]:animate-fade-in-up data-[state=closing]:animate-duration-150 data-[state=opening]:animate-duration-150 data-[state=open]:animate-duration-150 mt-1 w-full overflow-hidden border border-solid\"\n\t\t\t(animationend)=\"onAnimationEnd($event)\"\n\t\t\t[attr.data-state]=\"dataState\"\n\t\t>\n\t\t\t<!-- Search Input -->\n\t\t\t<div class=\"border-neutral border-b\">\n\t\t\t\t@let searchInputClass = this.searchInputClass();\n\t\t\t\t<div [class]=\"searchInputClass\">\n\t\t\t\t\t<st-icon class=\"text-base-placeholder\" [icon]=\"iconSearch\"></st-icon>\n\t\t\t\t\t<input\n\t\t\t\t\t\t#searchInput\n\t\t\t\t\t\tclass=\"placeholder:text-base-placeholder w-full border-transparent py-0 focus-within:outline-none focus:border-transparent focus:outline-none\"\n\t\t\t\t\t\t[value]=\"currentSearchValue\"\n\t\t\t\t\t\t(input)=\"handleSearchInput($event)\"\n\t\t\t\t\t\t(keydown)=\"handleSearchKeydown($event)\"\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t[placeholder]=\"translatedSearchPlaceholder()\"\n\t\t\t\t\t\t[attr.aria-label]=\"'sdk.combobox.searchOptions' | translate\"\n\t\t\t\t\t\t[disabled]=\"!isOpen\"\n\t\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<!-- Options List -->\n\t\t\t@let menuClass = this.menuClass();\n\t\t\t<ul\n\t\t\t\t[class]=\"menuClass\"\n\t\t\t\tcdkListbox\n\t\t\t\tcdkListboxUseActiveDescendant\n\t\t\t\t[cdkListboxMultiple]=\"selectionType() === 'multiple'\"\n\t\t\t\taria-labelledby=\"Combobox options\"\n\t\t\t\trole=\"listbox\"\n\t\t\t\t#optionsList\n\t\t\t\t[tabindex]=\"-1\"\n\t\t\t\t(keydown)=\"handleListboxKeydown($event)\"\n\t\t\t\t(selectionChange)=\"handleSelectionChange($event)\"\n\t\t\t>\n\t\t\t\t@for (option of filteredOptions; track $index) {\n\t\t\t\t\t<li [cdkOption]=\"option\" class=\"group\" [attr.data-option-index]=\"$index\" [class.cdk-option-active]=\"isActiveOption($index)\">\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tclass=\"group-[.cdk-option-active]:bg-base-300 font-body flex w-full items-center justify-between rounded-none px-4 py-2 text-left leading-normal font-normal text-pretty transition-colors duration-150 ease-in-out\"\n\t\t\t\t\t\t\t(click)=\"handleOptionSelect(option)\"\n\t\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span class=\"flex-1 truncate\">{{ getDisplayValue(option) }}</span>\n\n\t\t\t\t\t\t\t@if (isOptionSelected(option)) {\n\t\t\t\t\t\t\t\t<st-icon class=\"h-4 w-4 shrink-0\" [icon]=\"iconCheck\"></st-icon>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\n\t\t\t\t<!-- Empty state -->\n\t\t\t\t@if (filteredOptions.length === 0) {\n\t\t\t\t\t<li class=\"text-base-content/60 px-4 py-2 text-center\">\n\t\t\t\t\t\t<span>{{ translatedNoResultsText() }}</span>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\t\t\t</ul>\n\n\t\t\t<!-- Clear All button for multiple selection -->\n\t\t\t@if (selectionType() === 'multiple' && allowClearAll() && value() && isArray(value()) && value().length > 0) {\n\t\t\t\t<div class=\"border-base-300 border-t p-2\">\n\t\t\t\t\t<button type=\"button\" class=\"btn btn-outline btn-sm w-full\" (click)=\"clearSelection()\" (keydown)=\"handleClearButtonKeydown($event)\">\n\t\t\t\t\t\t{{ 'sdk.combobox.clearAll' | translate }}\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t}\n\t\t</div>\n\t</ng-template>\n\n\t<!-- Hidden label for accessibility -->\n\t<label class=\"sr-only\" [for]=\"name()\">{{ label }}</label>\n\n\t<!-- Additional content -->\n\t<ng-content></ng-content>\n</fieldset>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;AAWG;AAEH;AAEA;AACA;AACA;AAEA;AA8EA;AACA;AACA;AAEA;;AAEG;AACH,MAAM,iBAAiB,GAAG,GAAG,CAAC,CAAC,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,CAAC,EAAE;AACxI,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;YACR,OAAO,EAAE,CAAC,gBAAgB,CAAC;YAC3B,SAAS,EAAE,CAAC,kBAAkB,CAAC;YAC/B,QAAQ,EAAE,CAAC,iBAAiB,CAAC;YAC7B,MAAM,EAAE,CAAC,eAAe,CAAC;YACzB,IAAI,EAAE,CAAC,aAAa,CAA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K,EAAE,IAAI;AACX,yBAAA;qBACD,EAEgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,ywMAAA,EAAA;;;AE/KhD;;AAEG;;;;"}
@@ -156,11 +156,11 @@ class ToastsContainerComponent {
156
156
  return this.toastService.toasts().findIndex((t) => t.id === toast.id);
157
157
  }
158
158
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: ToastsContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
159
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: ToastsContainerComponent, isStandalone: true, selector: "st-toasts-container", ngImport: i0, template: "<section class=\"fixed bottom-2 right-4 z-10\">\n\t<ol\n\t\tclass=\"toast-container group flex min-w-[400px] flex-col gap-2\"\n\t\t[ngClass]=\"containerClasses()\"\n\t\t[attr.aria-expanded]=\"toastService.expanded()\"\n\t\t(mouseenter)=\"handleExpand()\"\n\t\t(mouseleave)=\"handleCollapse()\"\n\t>\n\t\t@for (toast of toastService.toasts(); track toast.id) {\n\t\t\t<st-toast-message\n\t\t\t\t[toast]=\"toast\"\n\t\t\t\t[toastIndex]=\"getToastIndex(toast)\"\n\t\t\t\t[toastAmount]=\"toastService.toasts().length\"\n\t\t\t\t(clicked)=\"handleRemove($event)\"\n\t\t\t/>\n\t\t}\n\t</ol>\n</section>\n", dependencies: [{ kind: "component", type: ToastMessageComponent, selector: "st-toast-message", inputs: ["variant", "classes", "toast", "toastAmount", "toastIndex"], outputs: ["clicked"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
159
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: ToastsContainerComponent, isStandalone: true, selector: "st-toasts-container", ngImport: i0, template: "<section class=\"fixed right-4 bottom-2 z-[1001]\">\n\t<ol\n\t\tclass=\"toast-container group flex min-w-[400px] flex-col gap-2\"\n\t\t[ngClass]=\"containerClasses()\"\n\t\t[attr.aria-expanded]=\"toastService.expanded()\"\n\t\t(mouseenter)=\"handleExpand()\"\n\t\t(mouseleave)=\"handleCollapse()\"\n\t>\n\t\t@for (toast of toastService.toasts(); track toast.id) {\n\t\t\t<st-toast-message\n\t\t\t\t[toast]=\"toast\"\n\t\t\t\t[toastIndex]=\"getToastIndex(toast)\"\n\t\t\t\t[toastAmount]=\"toastService.toasts().length\"\n\t\t\t\t(clicked)=\"handleRemove($event)\"\n\t\t\t/>\n\t\t}\n\t</ol>\n</section>\n", dependencies: [{ kind: "component", type: ToastMessageComponent, selector: "st-toast-message", inputs: ["variant", "classes", "toast", "toastAmount", "toastIndex"], outputs: ["clicked"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
160
160
  }
161
161
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: ToastsContainerComponent, decorators: [{
162
162
  type: Component,
163
- args: [{ selector: 'st-toasts-container', imports: [ToastMessageComponent, NgClass], template: "<section class=\"fixed bottom-2 right-4 z-10\">\n\t<ol\n\t\tclass=\"toast-container group flex min-w-[400px] flex-col gap-2\"\n\t\t[ngClass]=\"containerClasses()\"\n\t\t[attr.aria-expanded]=\"toastService.expanded()\"\n\t\t(mouseenter)=\"handleExpand()\"\n\t\t(mouseleave)=\"handleCollapse()\"\n\t>\n\t\t@for (toast of toastService.toasts(); track toast.id) {\n\t\t\t<st-toast-message\n\t\t\t\t[toast]=\"toast\"\n\t\t\t\t[toastIndex]=\"getToastIndex(toast)\"\n\t\t\t\t[toastAmount]=\"toastService.toasts().length\"\n\t\t\t\t(clicked)=\"handleRemove($event)\"\n\t\t\t/>\n\t\t}\n\t</ol>\n</section>\n" }]
163
+ args: [{ selector: 'st-toasts-container', imports: [ToastMessageComponent, NgClass], template: "<section class=\"fixed right-4 bottom-2 z-[1001]\">\n\t<ol\n\t\tclass=\"toast-container group flex min-w-[400px] flex-col gap-2\"\n\t\t[ngClass]=\"containerClasses()\"\n\t\t[attr.aria-expanded]=\"toastService.expanded()\"\n\t\t(mouseenter)=\"handleExpand()\"\n\t\t(mouseleave)=\"handleCollapse()\"\n\t>\n\t\t@for (toast of toastService.toasts(); track toast.id) {\n\t\t\t<st-toast-message\n\t\t\t\t[toast]=\"toast\"\n\t\t\t\t[toastIndex]=\"getToastIndex(toast)\"\n\t\t\t\t[toastAmount]=\"toastService.toasts().length\"\n\t\t\t\t(clicked)=\"handleRemove($event)\"\n\t\t\t/>\n\t\t}\n\t</ol>\n</section>\n" }]
164
164
  }] });
165
165
 
166
166
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"sixbell-telco-sdk-components-toast.mjs","sources":["../../../projects/sdk/components/toast/services/toast.service.ts","../../../projects/sdk/components/toast/toast-message/toast-message.component.ts","../../../projects/sdk/components/toast/toast-message/toast-message.component.html","../../../projects/sdk/components/toast/toasts-container/toasts-container.component.ts","../../../projects/sdk/components/toast/toasts-container/toasts-container.component.html","../../../projects/sdk/components/toast/sixbell-telco-sdk-components-toast.ts"],"sourcesContent":["import { computed, Injectable, signal } from '@angular/core';\nimport { generateUniqueId } from '@sixbell-telco/sdk/utils/generators/uuid';\n\nexport enum ToastTypes {\n\tSUCCESS = 'toast-success',\n\tERROR = 'toast-error',\n\tINFO = 'toast-info',\n\tWARNING = 'toast-warning',\n}\n\nexport type Toast = {\n\tid: string;\n\ttype: ToastTypes;\n\tmessage: string;\n\ttitle: string;\n\tduration: number;\n\tanimate: 'enter' | 'leave';\n};\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class ToastService {\n\tprivate toastsSignal = signal<Toast[]>([]);\n\tprivate expandedSignal = signal(false);\n\n\t// Create computed signals for derived state\n\treadonly toasts = computed(() => this.toastsSignal());\n\treadonly expanded = computed(() => this.expandedSignal());\n\treadonly isEmpty = computed(() => this.toasts().length === 0);\n\n\tnotify(type: ToastTypes, message: string, title: string = '', duration: number = 10000) {\n\t\tconst toast: Toast = {\n\t\t\tid: generateUniqueId(),\n\t\t\ttype,\n\t\t\tmessage,\n\t\t\ttitle,\n\t\t\tduration,\n\t\t\tanimate: 'enter',\n\t\t};\n\n\t\t// Create a new array reference to ensure change detection\n\t\tthis.toastsSignal.update((toasts) => [toast, ...toasts]);\n\n\t\tthis.scheduleDismiss(toast);\n\t}\n\n\tscheduleDismiss(toast: Toast) {\n\t\tsetTimeout(() => {\n\t\t\tthis.remove(toast);\n\t\t}, toast.duration);\n\t}\n\n\tanimateRemoval(toast: Toast) {\n\t\tthis.toastsSignal.update((toasts) => toasts.map((t) => (t.id === toast.id ? { ...t, animate: 'leave' } : t)));\n\t}\n\n\tremove(toast: Toast) {\n\t\tthis.toastsSignal.update((toasts) => toasts.filter((t) => t.id !== toast.id));\n\n\t\tif (this.isEmpty()) {\n\t\t\tthis.collapse();\n\t\t}\n\t}\n\n\tclear() {\n\t\tthis.toastsSignal.set([]);\n\t\tthis.collapse();\n\t}\n\n\ttoggle() {\n\t\tthis.expandedSignal.update((expanded) => !expanded);\n\t}\n\n\tcollapse() {\n\t\tthis.expandedSignal.set(false);\n\t}\n\n\texpand() {\n\t\tthis.expandedSignal.set(true);\n\t}\n}\n","import { NgClass } from '@angular/common';\nimport { Component, computed, input, output } from '@angular/core';\nimport { IconComponent } from '@sixbell-telco/sdk/components/icon';\nimport { matCheckCircleOutline, matErrorOutline, matInfoOutline, matWarningOutline } from '@sixbell-telco/sdk/components/icon/material/outline';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\nimport { Toast, ToastTypes } from '../services/toast.service';\n\nexport const toastComponent = cva(\n\t[\n\t\t'toast-message relative mb-2 flex min-h-20 h-20 w-[400px] cursor-pointer items-center rounded-lg border-2 bg-base-200 p-2 transition-all duration-300 ease-ease-in-and-out-back',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tinfo: ['border-primary', 'text-primary'],\n\t\t\t\tsuccess: ['border-success', 'text-success'],\n\t\t\t\twarning: ['border-warning', 'text-warning'],\n\t\t\t\terror: ['border-error', 'text-error'],\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [],\n\t\tdefaultVariants: {\n\t\t\tvariant: 'info',\n\t\t},\n\t},\n);\n\nexport type ToastVariantProps = 'info' | 'success' | 'warning' | 'error' | null | undefined;\n\nexport type ToastProps = {\n\tvariant?: ToastVariantProps;\n};\n\n@Component({\n\tselector: 'st-toast-message',\n\timports: [TypographyDirective, IconComponent, NgClass],\n\ttemplateUrl: './toast-message.component.html',\n})\nexport class ToastMessageComponent {\n\tvariant = input<ToastVariantProps>();\n\tclasses = input<string>('');\n\ttypes = ToastTypes;\n\ttoast = input.required<Toast>();\n\ttoastAmount = input.required<number>();\n\ttoastIndex = input.required<number>();\n\tclicked = output<Toast>();\n\ticonCheckCircle = matCheckCircleOutline;\n\ticonWarning = matWarningOutline;\n\ticonError = matErrorOutline;\n\ticonInfo = matInfoOutline;\n\n\tcomponentClass = computed(() => {\n\t\tconst toast = this.toast();\n\t\tconst classes = this.classes();\n\n\t\tswitch (toast.type) {\n\t\t\tcase this.types.SUCCESS:\n\t\t\t\treturn cn(toastComponent({ variant: 'success', class: classes }));\n\t\t\tcase this.types.ERROR:\n\t\t\t\treturn cn(toastComponent({ variant: 'error', class: classes }));\n\t\t\tcase this.types.WARNING:\n\t\t\t\treturn cn(toastComponent({ variant: 'warning', class: classes }));\n\t\t\tcase this.types.INFO:\n\t\t\t\treturn cn(toastComponent({ variant: 'info', class: classes }));\n\t\t\tdefault:\n\t\t\t\treturn cn(toastComponent({ variant: 'info', class: classes }));\n\t\t}\n\t});\n\n\thandleClose() {\n\t\tthis.clicked.emit(this.toast());\n\t}\n}\n","<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<li\n\t[class]=\"componentClass()\"\n\t[ngClass]=\"{\n\t\t'animate-toast-slide-out bottom-0': toast().animate === 'leave' && toastAmount() > 1,\n\t\t'animate-slide-out': toast().animate === 'leave' && toastAmount() === 1,\n\t\t'animate-fade-out': toast().animate === 'leave' && toastAmount() > 1 && toastIndex() === 0,\n\t\t'animate-slide-in': toast().animate === 'enter',\n\t}\"\n\t(click)=\"handleClose()\"\n\trole=\"button\"\n\ttabindex=\"0\"\n>\n\t<div class=\"flex flex-1 items-center justify-center\">\n\t\t@if (this.toast().type === this.types.SUCCESS) {\n\t\t\t<st-icon [icon]=\"iconCheckCircle\" color=\"inherit\" size=\"md\"></st-icon>\n\t\t} @else if (this.toast().type === this.types.WARNING) {\n\t\t\t<st-icon [icon]=\"iconWarning\" color=\"inherit\" size=\"md\"></st-icon>\n\t\t} @else if (this.toast().type === this.types.ERROR) {\n\t\t\t<st-icon [icon]=\"iconError\" color=\"inherit\" size=\"md\"></st-icon>\n\t\t} @else if (this.toast().type === this.types.INFO) {\n\t\t\t<st-icon [icon]=\"iconInfo\" color=\"inherit\" size=\"md\"></st-icon>\n\t\t}\n\t</div>\n\t<div class=\"flex-4\">\n\t\t<div class=\"grid grid-rows-[min-content_1fr]\">\n\t\t\t<div typography [tyVariant]=\"'body-sm'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'semibold'\">{{ toast().title }}</div>\n\t\t\t<div typography [tyVariant]=\"'body-xs'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'normal'\">\n\t\t\t\t{{ toast().message }}\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</li>\n","import { NgClass } from '@angular/common';\nimport { Component, computed, inject } from '@angular/core';\nimport { Toast, ToastService } from '../services/toast.service';\nimport { ToastMessageComponent } from '../toast-message/toast-message.component';\n\n@Component({\n selector: 'st-toasts-container',\n imports: [ToastMessageComponent, NgClass],\n templateUrl: './toasts-container.component.html'\n})\nexport class ToastsContainerComponent {\n\ttoastService = inject(ToastService);\n\n\tprotected containerClasses = computed(() => {\n\t\tconst toastCount = this.toastService.toasts().length;\n\t\tconst isExpanded = this.toastService.expanded();\n\n\t\treturn {\n\t\t\t'min-h-64': toastCount === 3 && isExpanded,\n\t\t\t'min-h-48': toastCount === 2 && isExpanded,\n\t\t\t'h-24 min-h-24': toastCount === 1 && isExpanded,\n\t\t\t'h-28 min-h-28': toastCount > 0 && !isExpanded,\n\t\t\t'h-0 min-h-0': toastCount === 0 && !isExpanded,\n\t\t};\n\t});\n\n\thandleExpand(): void {\n\t\tthis.toastService.expand();\n\t}\n\n\thandleCollapse(): void {\n\t\tthis.toastService.collapse();\n\t}\n\n\thandleRemove(toast: Toast): void {\n\t\tthis.toastService.animateRemoval(toast);\n\t\tsetTimeout(() => {\n\t\t\tthis.toastService.remove(toast);\n\t\t}, 500);\n\t}\n\n\tgetToastIndex(toast: Toast): number {\n\t\treturn this.toastService.toasts().findIndex((t) => t.id === toast.id);\n\t}\n}\n","<section class=\"fixed bottom-2 right-4 z-10\">\n\t<ol\n\t\tclass=\"toast-container group flex min-w-[400px] flex-col gap-2\"\n\t\t[ngClass]=\"containerClasses()\"\n\t\t[attr.aria-expanded]=\"toastService.expanded()\"\n\t\t(mouseenter)=\"handleExpand()\"\n\t\t(mouseleave)=\"handleCollapse()\"\n\t>\n\t\t@for (toast of toastService.toasts(); track toast.id) {\n\t\t\t<st-toast-message\n\t\t\t\t[toast]=\"toast\"\n\t\t\t\t[toastIndex]=\"getToastIndex(toast)\"\n\t\t\t\t[toastAmount]=\"toastService.toasts().length\"\n\t\t\t\t(clicked)=\"handleRemove($event)\"\n\t\t\t/>\n\t\t}\n\t</ol>\n</section>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;IAGY;AAAZ,CAAA,UAAY,UAAU,EAAA;AACrB,IAAA,UAAA,CAAA,SAAA,CAAA,GAAA,eAAyB;AACzB,IAAA,UAAA,CAAA,OAAA,CAAA,GAAA,aAAqB;AACrB,IAAA,UAAA,CAAA,MAAA,CAAA,GAAA,YAAmB;AACnB,IAAA,UAAA,CAAA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AAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,ECVrC,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,wlBAkBA,EDXc,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,qBAAqB,yJAAE,OAAO,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAG/B,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBALpC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,EACtB,OAAA,EAAA,CAAC,qBAAqB,EAAE,OAAO,CAAC,EAAA,QAAA,EAAA,wlBAAA,EAAA;;;AEP7C;;AAEG;;;;"}
1
+ {"version":3,"file":"sixbell-telco-sdk-components-toast.mjs","sources":["../../../projects/sdk/components/toast/services/toast.service.ts","../../../projects/sdk/components/toast/toast-message/toast-message.component.ts","../../../projects/sdk/components/toast/toast-message/toast-message.component.html","../../../projects/sdk/components/toast/toasts-container/toasts-container.component.ts","../../../projects/sdk/components/toast/toasts-container/toasts-container.component.html","../../../projects/sdk/components/toast/sixbell-telco-sdk-components-toast.ts"],"sourcesContent":["import { computed, Injectable, signal } from '@angular/core';\nimport { generateUniqueId } from '@sixbell-telco/sdk/utils/generators/uuid';\n\nexport enum ToastTypes {\n\tSUCCESS = 'toast-success',\n\tERROR = 'toast-error',\n\tINFO = 'toast-info',\n\tWARNING = 'toast-warning',\n}\n\nexport type Toast = {\n\tid: string;\n\ttype: ToastTypes;\n\tmessage: string;\n\ttitle: string;\n\tduration: number;\n\tanimate: 'enter' | 'leave';\n};\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class ToastService {\n\tprivate toastsSignal = signal<Toast[]>([]);\n\tprivate expandedSignal = signal(false);\n\n\t// Create computed signals for derived state\n\treadonly toasts = computed(() => this.toastsSignal());\n\treadonly expanded = computed(() => this.expandedSignal());\n\treadonly isEmpty = computed(() => this.toasts().length === 0);\n\n\tnotify(type: ToastTypes, message: string, title: string = '', duration: number = 10000) {\n\t\tconst toast: Toast = {\n\t\t\tid: generateUniqueId(),\n\t\t\ttype,\n\t\t\tmessage,\n\t\t\ttitle,\n\t\t\tduration,\n\t\t\tanimate: 'enter',\n\t\t};\n\n\t\t// Create a new array reference to ensure change detection\n\t\tthis.toastsSignal.update((toasts) => [toast, ...toasts]);\n\n\t\tthis.scheduleDismiss(toast);\n\t}\n\n\tscheduleDismiss(toast: Toast) {\n\t\tsetTimeout(() => {\n\t\t\tthis.remove(toast);\n\t\t}, toast.duration);\n\t}\n\n\tanimateRemoval(toast: Toast) {\n\t\tthis.toastsSignal.update((toasts) => toasts.map((t) => (t.id === toast.id ? { ...t, animate: 'leave' } : t)));\n\t}\n\n\tremove(toast: Toast) {\n\t\tthis.toastsSignal.update((toasts) => toasts.filter((t) => t.id !== toast.id));\n\n\t\tif (this.isEmpty()) {\n\t\t\tthis.collapse();\n\t\t}\n\t}\n\n\tclear() {\n\t\tthis.toastsSignal.set([]);\n\t\tthis.collapse();\n\t}\n\n\ttoggle() {\n\t\tthis.expandedSignal.update((expanded) => !expanded);\n\t}\n\n\tcollapse() {\n\t\tthis.expandedSignal.set(false);\n\t}\n\n\texpand() {\n\t\tthis.expandedSignal.set(true);\n\t}\n}\n","import { NgClass } from '@angular/common';\nimport { Component, computed, input, output } from '@angular/core';\nimport { IconComponent } from '@sixbell-telco/sdk/components/icon';\nimport { matCheckCircleOutline, matErrorOutline, matInfoOutline, matWarningOutline } from '@sixbell-telco/sdk/components/icon/material/outline';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\nimport { Toast, ToastTypes } from '../services/toast.service';\n\nexport const toastComponent = cva(\n\t[\n\t\t'toast-message relative mb-2 flex min-h-20 h-20 w-[400px] cursor-pointer items-center rounded-lg border-2 bg-base-200 p-2 transition-all duration-300 ease-ease-in-and-out-back',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tinfo: ['border-primary', 'text-primary'],\n\t\t\t\tsuccess: ['border-success', 'text-success'],\n\t\t\t\twarning: ['border-warning', 'text-warning'],\n\t\t\t\terror: ['border-error', 'text-error'],\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [],\n\t\tdefaultVariants: {\n\t\t\tvariant: 'info',\n\t\t},\n\t},\n);\n\nexport type ToastVariantProps = 'info' | 'success' | 'warning' | 'error' | null | undefined;\n\nexport type ToastProps = {\n\tvariant?: ToastVariantProps;\n};\n\n@Component({\n\tselector: 'st-toast-message',\n\timports: [TypographyDirective, IconComponent, NgClass],\n\ttemplateUrl: './toast-message.component.html',\n})\nexport class ToastMessageComponent {\n\tvariant = input<ToastVariantProps>();\n\tclasses = input<string>('');\n\ttypes = ToastTypes;\n\ttoast = input.required<Toast>();\n\ttoastAmount = input.required<number>();\n\ttoastIndex = input.required<number>();\n\tclicked = output<Toast>();\n\ticonCheckCircle = matCheckCircleOutline;\n\ticonWarning = matWarningOutline;\n\ticonError = matErrorOutline;\n\ticonInfo = matInfoOutline;\n\n\tcomponentClass = computed(() => {\n\t\tconst toast = this.toast();\n\t\tconst classes = this.classes();\n\n\t\tswitch (toast.type) {\n\t\t\tcase this.types.SUCCESS:\n\t\t\t\treturn cn(toastComponent({ variant: 'success', class: classes }));\n\t\t\tcase this.types.ERROR:\n\t\t\t\treturn cn(toastComponent({ variant: 'error', class: classes }));\n\t\t\tcase this.types.WARNING:\n\t\t\t\treturn cn(toastComponent({ variant: 'warning', class: classes }));\n\t\t\tcase this.types.INFO:\n\t\t\t\treturn cn(toastComponent({ variant: 'info', class: classes }));\n\t\t\tdefault:\n\t\t\t\treturn cn(toastComponent({ variant: 'info', class: classes }));\n\t\t}\n\t});\n\n\thandleClose() {\n\t\tthis.clicked.emit(this.toast());\n\t}\n}\n","<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<li\n\t[class]=\"componentClass()\"\n\t[ngClass]=\"{\n\t\t'animate-toast-slide-out bottom-0': toast().animate === 'leave' && toastAmount() > 1,\n\t\t'animate-slide-out': toast().animate === 'leave' && toastAmount() === 1,\n\t\t'animate-fade-out': toast().animate === 'leave' && toastAmount() > 1 && toastIndex() === 0,\n\t\t'animate-slide-in': toast().animate === 'enter',\n\t}\"\n\t(click)=\"handleClose()\"\n\trole=\"button\"\n\ttabindex=\"0\"\n>\n\t<div class=\"flex flex-1 items-center justify-center\">\n\t\t@if (this.toast().type === this.types.SUCCESS) {\n\t\t\t<st-icon [icon]=\"iconCheckCircle\" color=\"inherit\" size=\"md\"></st-icon>\n\t\t} @else if (this.toast().type === this.types.WARNING) {\n\t\t\t<st-icon [icon]=\"iconWarning\" color=\"inherit\" size=\"md\"></st-icon>\n\t\t} @else if (this.toast().type === this.types.ERROR) {\n\t\t\t<st-icon [icon]=\"iconError\" color=\"inherit\" size=\"md\"></st-icon>\n\t\t} @else if (this.toast().type === this.types.INFO) {\n\t\t\t<st-icon [icon]=\"iconInfo\" color=\"inherit\" size=\"md\"></st-icon>\n\t\t}\n\t</div>\n\t<div class=\"flex-4\">\n\t\t<div class=\"grid grid-rows-[min-content_1fr]\">\n\t\t\t<div typography [tyVariant]=\"'body-sm'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'semibold'\">{{ toast().title }}</div>\n\t\t\t<div typography [tyVariant]=\"'body-xs'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'normal'\">\n\t\t\t\t{{ toast().message }}\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</li>\n","import { NgClass } from '@angular/common';\nimport { Component, computed, inject } from '@angular/core';\nimport { Toast, ToastService } from '../services/toast.service';\nimport { ToastMessageComponent } from '../toast-message/toast-message.component';\n\n@Component({\n selector: 'st-toasts-container',\n imports: [ToastMessageComponent, NgClass],\n templateUrl: './toasts-container.component.html'\n})\nexport class ToastsContainerComponent {\n\ttoastService = inject(ToastService);\n\n\tprotected containerClasses = computed(() => {\n\t\tconst toastCount = this.toastService.toasts().length;\n\t\tconst isExpanded = this.toastService.expanded();\n\n\t\treturn {\n\t\t\t'min-h-64': toastCount === 3 && isExpanded,\n\t\t\t'min-h-48': toastCount === 2 && isExpanded,\n\t\t\t'h-24 min-h-24': toastCount === 1 && isExpanded,\n\t\t\t'h-28 min-h-28': toastCount > 0 && !isExpanded,\n\t\t\t'h-0 min-h-0': toastCount === 0 && !isExpanded,\n\t\t};\n\t});\n\n\thandleExpand(): void {\n\t\tthis.toastService.expand();\n\t}\n\n\thandleCollapse(): void {\n\t\tthis.toastService.collapse();\n\t}\n\n\thandleRemove(toast: Toast): void {\n\t\tthis.toastService.animateRemoval(toast);\n\t\tsetTimeout(() => {\n\t\t\tthis.toastService.remove(toast);\n\t\t}, 500);\n\t}\n\n\tgetToastIndex(toast: Toast): number {\n\t\treturn this.toastService.toasts().findIndex((t) => t.id === toast.id);\n\t}\n}\n","<section class=\"fixed right-4 bottom-2 z-[1001]\">\n\t<ol\n\t\tclass=\"toast-container group flex min-w-[400px] flex-col gap-2\"\n\t\t[ngClass]=\"containerClasses()\"\n\t\t[attr.aria-expanded]=\"toastService.expanded()\"\n\t\t(mouseenter)=\"handleExpand()\"\n\t\t(mouseleave)=\"handleCollapse()\"\n\t>\n\t\t@for (toast of toastService.toasts(); track toast.id) {\n\t\t\t<st-toast-message\n\t\t\t\t[toast]=\"toast\"\n\t\t\t\t[toastIndex]=\"getToastIndex(toast)\"\n\t\t\t\t[toastAmount]=\"toastService.toasts().length\"\n\t\t\t\t(clicked)=\"handleRemove($event)\"\n\t\t\t/>\n\t\t}\n\t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,MAAK;AACf,YAAA,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC;SAC/B,EAAE,GAAG,CAAC;;AAGR,IAAA,aAAa,CAAC,KAAY,EAAA;QACzB,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE,CAAC;;uGAhC1D,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,ECVrC,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,4lBAkBA,EDXc,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,qBAAqB,yJAAE,OAAO,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAG/B,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBALpC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,EACtB,OAAA,EAAA,CAAC,qBAAqB,EAAE,OAAO,CAAC,EAAA,QAAA,EAAA,4lBAAA,EAAA;;;AEP7C;;AAEG;;;;"}
@@ -20,10 +20,10 @@ import { input, signal, effect, Directive } from '@angular/core';
20
20
  * <!-- Conditional autofocus -->
21
21
  * <input [stAutofocus]="shouldFocus" />
22
22
  *
23
- * <!-- In a form inside a modal -->
24
- * <st-modal>
23
+ * <!-- In a form inside a dialog -->
24
+ * <st-dialog>
25
25
  * <input [stAutofocus]="true" />
26
- * </st-modal>
26
+ * </st-dialog>
27
27
  * ```
28
28
  *
29
29
  * @usageNotes
@@ -1 +1 @@
1
- {"version":3,"file":"sixbell-telco-sdk-directives-auto-focus.mjs","sources":["../../../projects/sdk/directives/auto-focus/src/autofocus.directive.ts","../../../projects/sdk/directives/auto-focus/sixbell-telco-sdk-directives-auto-focus.ts"],"sourcesContent":["import { AfterViewInit, Directive, ElementRef, OnDestroy, effect, input, signal } from '@angular/core';\n\n/**\n * Directive that automatically focuses an element when it becomes visible.\n *\n * This directive uses multiple strategies to detect when an element becomes visible:\n * - IntersectionObserver to detect when the element enters the viewport\n * - MutationObserver to detect DOM changes that might affect visibility\n * - Polling at regular intervals as a fallback mechanism\n *\n * The directive works reliably with modals, dialogs, accordions, and other UI components\n * that dynamically show and hide content.\n *\n * @example\n * ```html\n * <!-- Basic usage -->\n * <input [stAutofocus]=\"true\" />\n *\n * <!-- Conditional autofocus -->\n * <input [stAutofocus]=\"shouldFocus\" />\n *\n * <!-- In a form inside a modal -->\n * <st-modal>\n * <input [stAutofocus]=\"true\" />\n * </st-modal>\n * ```\n *\n * @usageNotes\n * The directive takes a boolean input that determines whether autofocus should be applied.\n * When this value is true, the directive will attempt to focus the element once it becomes visible,\n * and will continue to monitor the element's visibility state in case it changes.\n *\n * This is particularly useful for:\n * - Elements in modals that need focus when opened\n * - Elements in accordions/collapsible sections that should receive focus when expanded\n * - Elements that are conditionally rendered and need focus when they appear\n *\n * @publicApi\n */\n@Directive({\n\tselector: '[stAutofocus]',\n})\nexport class AutofocusDirective implements AfterViewInit, OnDestroy {\n\t/**\n\t * Controls whether autofocus should be applied to the element.\n\t * Set to true to enable autofocus.\n\t */\n\tfocus = input<boolean>(false);\n\n\t/** Tracks the current visibility state of the element */\n\tprivate isVisible = signal(false);\n\n\t/** Forces effect to run when visibility changes, even to the same value */\n\tprivate changeTimestamp = signal(0);\n\n\t/** Collection of observers for cleanup */\n\tprivate observers: (IntersectionObserver | MutationObserver)[] = [];\n\n\t/** Interval used for polling visibility */\n\tprivate pollingInterval: number | null = null;\n\n\t/** Flag to prevent concurrent visibility checks */\n\tprivate checkingVisibility = false;\n\n\t/** Timeout reference for focus operation */\n\tprivate focusTimeout: number | null = null;\n\n\tconstructor(private elementRef: ElementRef) {\n\t\t// Effect that triggers focus when element becomes visible\n\t\teffect(() => {\n\t\t\tconst visible = this.isVisible();\n\t\t\tconst timestamp = this.changeTimestamp();\n\n\t\t\tif (this.focus() && visible) {\n\t\t\t\t// Clear any existing timeout first\n\t\t\t\tif (this.focusTimeout !== null) {\n\t\t\t\t\tclearTimeout(this.focusTimeout);\n\t\t\t\t}\n\n\t\t\t\t// Store the timeout reference\n\t\t\t\tthis.focusTimeout = window.setTimeout(() => {\n\t\t\t\t\tthis.elementRef.nativeElement.focus();\n\t\t\t\t}, 50);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Sets up visibility observers after the view is initialized\n\t */\n\tngAfterViewInit() {\n\t\tif (this.focus()) {\n\t\t\t// Set up both observer types\n\t\t\tthis.setupIntersectionObserver();\n\t\t\tthis.setupMutationObserver();\n\n\t\t\t// Lightweight polling (every 500ms) as fallback for edge cases\n\t\t\tthis.pollingInterval = window.setInterval(() => {\n\t\t\t\tthis.checkVisibility(true);\n\t\t\t}, 500);\n\n\t\t\t// Initial visibility check\n\t\t\tthis.checkVisibility(true);\n\t\t}\n\t}\n\n\t/**\n\t * Cleans up all observers and timers to prevent memory leaks\n\t */\n\tngOnDestroy() {\n\t\t// Cleanup all observers\n\t\tthis.observers.forEach((observer) => {\n\t\t\tif (observer) {\n\t\t\t\tobserver.disconnect();\n\t\t\t}\n\t\t});\n\t\tthis.observers = [];\n\n\t\t// Clear polling interval\n\t\tif (this.pollingInterval !== null) {\n\t\t\tclearInterval(this.pollingInterval);\n\t\t}\n\n\t\t// Clear focus timeout\n\t\tif (this.focusTimeout !== null) {\n\t\t\tclearTimeout(this.focusTimeout);\n\t\t\tthis.focusTimeout = null;\n\t\t}\n\t}\n\n\t/**\n\t * Sets up the IntersectionObserver to detect when the element enters or leaves the viewport\n\t * @private\n\t */\n\tprivate setupIntersectionObserver(): void {\n\t\tif ('IntersectionObserver' in window) {\n\t\t\tconst intersectionObserver = new IntersectionObserver(\n\t\t\t\t(entries) => {\n\t\t\t\t\tif (entries[0].isIntersecting) {\n\t\t\t\t\t\tthis.checkVisibility(true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.updateVisibility(false);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ threshold: 0.1 },\n\t\t\t);\n\n\t\t\tintersectionObserver.observe(this.elementRef.nativeElement);\n\t\t\tthis.observers.push(intersectionObserver);\n\t\t}\n\t}\n\n\t/**\n\t * Sets up MutationObserver to detect style/class changes that might affect visibility\n\t * Also monitors parent elements to detect when containers like modals appear/disappear\n\t * @private\n\t */\n\tprivate setupMutationObserver(): void {\n\t\tconst mutationObserver = new MutationObserver(() => {\n\t\t\tthis.checkVisibility(true);\n\t\t});\n\n\t\t// Watch this element\n\t\tmutationObserver.observe(this.elementRef.nativeElement, {\n\t\t\tattributes: true,\n\t\t\tattributeFilter: ['style', 'class'],\n\t\t});\n\n\t\t// Watch parent elements - important for modals, accordions, etc.\n\t\tlet parent = this.elementRef.nativeElement.parentElement;\n\t\tlet level = 0;\n\n\t\t// Watch up to 3 parent levels\n\t\twhile (parent && level < 3) {\n\t\t\tmutationObserver.observe(parent, {\n\t\t\t\tattributes: true,\n\t\t\t\tattributeFilter: ['style', 'class'],\n\t\t\t\tchildList: true,\n\t\t\t});\n\t\t\tparent = parent.parentElement;\n\t\t\tlevel++;\n\t\t}\n\n\t\tthis.observers.push(mutationObserver);\n\t}\n\n\t/**\n\t * Checks if the element is truly visible by examining computed style and dimensions\n\t * @param force Whether to force a check even if one is already in progress\n\t * @private\n\t */\n\tprivate checkVisibility(force = false): void {\n\t\tif (this.checkingVisibility && !force) return;\n\n\t\tthis.checkingVisibility = true;\n\t\tconst el = this.elementRef.nativeElement;\n\n\t\trequestAnimationFrame(() => {\n\t\t\tconst style = window.getComputedStyle(el);\n\t\t\tconst isNowVisible = el.offsetWidth > 0 && el.offsetHeight > 0 && style.visibility !== 'hidden' && style.display !== 'none';\n\n\t\t\tthis.updateVisibility(isNowVisible);\n\t\t\tthis.checkingVisibility = false;\n\t\t});\n\t}\n\n\t/**\n\t * Updates the visibility signal and triggers the effect by updating the timestamp\n\t * @param visible The new visibility state\n\t * @private\n\t */\n\tprivate updateVisibility(visible: boolean): void {\n\t\tif (this.isVisible() !== visible) {\n\t\t\tthis.isVisible.set(visible);\n\t\t\t// Always update timestamp to force the effect to run\n\t\t\tthis.changeTimestamp.set(Date.now());\n\t\t}\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCG;MAIU,kBAAkB,CAAA;AAyBV,IAAA,UAAA;AAxBpB;;;AAGG;AACH,IAAA,KAAK,GAAG,KAAK,CAAU,KAAK,CAAC;;AAGrB,IAAA,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC;;AAGzB,IAAA,eAAe,GAAG,MAAM,CAAC,CAAC,CAAC;;IAG3B,SAAS,GAAgD,EAAE;;IAG3D,eAAe,GAAkB,IAAI;;IAGrC,kBAAkB,GAAG,KAAK;;IAG1B,YAAY,GAAkB,IAAI;AAE1C,IAAA,WAAA,CAAoB,UAAsB,EAAA;QAAtB,IAAU,CAAA,UAAA,GAAV,UAAU;;QAE7B,MAAM,CAAC,MAAK;AACX,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,EAAE;AAChC,YAAA,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE;AAExC,YAAA,IAAI,IAAI,CAAC,KAAK,EAAE,IAAI,OAAO,EAAE;;AAE5B,gBAAA,IAAI,IAAI,CAAC,YAAY,KAAK,IAAI,EAAE;AAC/B,oBAAA,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC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;;AAEG;;;;"}
1
+ {"version":3,"file":"sixbell-telco-sdk-directives-auto-focus.mjs","sources":["../../../projects/sdk/directives/auto-focus/src/autofocus.directive.ts","../../../projects/sdk/directives/auto-focus/sixbell-telco-sdk-directives-auto-focus.ts"],"sourcesContent":["import { AfterViewInit, Directive, ElementRef, OnDestroy, effect, input, signal } from '@angular/core';\n\n/**\n * Directive that automatically focuses an element when it becomes visible.\n *\n * This directive uses multiple strategies to detect when an element becomes visible:\n * - IntersectionObserver to detect when the element enters the viewport\n * - MutationObserver to detect DOM changes that might affect visibility\n * - Polling at regular intervals as a fallback mechanism\n *\n * The directive works reliably with modals, dialogs, accordions, and other UI components\n * that dynamically show and hide content.\n *\n * @example\n * ```html\n * <!-- Basic usage -->\n * <input [stAutofocus]=\"true\" />\n *\n * <!-- Conditional autofocus -->\n * <input [stAutofocus]=\"shouldFocus\" />\n *\n * <!-- In a form inside a dialog -->\n * <st-dialog>\n * <input [stAutofocus]=\"true\" />\n * </st-dialog>\n * ```\n *\n * @usageNotes\n * The directive takes a boolean input that determines whether autofocus should be applied.\n * When this value is true, the directive will attempt to focus the element once it becomes visible,\n * and will continue to monitor the element's visibility state in case it changes.\n *\n * This is particularly useful for:\n * - Elements in modals that need focus when opened\n * - Elements in accordions/collapsible sections that should receive focus when expanded\n * - Elements that are conditionally rendered and need focus when they appear\n *\n * @publicApi\n */\n@Directive({\n\tselector: '[stAutofocus]',\n})\nexport class AutofocusDirective implements AfterViewInit, OnDestroy {\n\t/**\n\t * Controls whether autofocus should be applied to the element.\n\t * Set to true to enable autofocus.\n\t */\n\tfocus = input<boolean>(false);\n\n\t/** Tracks the current visibility state of the element */\n\tprivate isVisible = signal(false);\n\n\t/** Forces effect to run when visibility changes, even to the same value */\n\tprivate changeTimestamp = signal(0);\n\n\t/** Collection of observers for cleanup */\n\tprivate observers: (IntersectionObserver | MutationObserver)[] = [];\n\n\t/** Interval used for polling visibility */\n\tprivate pollingInterval: number | null = null;\n\n\t/** Flag to prevent concurrent visibility checks */\n\tprivate checkingVisibility = false;\n\n\t/** Timeout reference for focus operation */\n\tprivate focusTimeout: number | null = null;\n\n\tconstructor(private elementRef: ElementRef) {\n\t\t// Effect that triggers focus when element becomes visible\n\t\teffect(() => {\n\t\t\tconst visible = this.isVisible();\n\t\t\tconst timestamp = this.changeTimestamp();\n\n\t\t\tif (this.focus() && visible) {\n\t\t\t\t// Clear any existing timeout first\n\t\t\t\tif (this.focusTimeout !== null) {\n\t\t\t\t\tclearTimeout(this.focusTimeout);\n\t\t\t\t}\n\n\t\t\t\t// Store the timeout reference\n\t\t\t\tthis.focusTimeout = window.setTimeout(() => {\n\t\t\t\t\tthis.elementRef.nativeElement.focus();\n\t\t\t\t}, 50);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Sets up visibility observers after the view is initialized\n\t */\n\tngAfterViewInit() {\n\t\tif (this.focus()) {\n\t\t\t// Set up both observer types\n\t\t\tthis.setupIntersectionObserver();\n\t\t\tthis.setupMutationObserver();\n\n\t\t\t// Lightweight polling (every 500ms) as fallback for edge cases\n\t\t\tthis.pollingInterval = window.setInterval(() => {\n\t\t\t\tthis.checkVisibility(true);\n\t\t\t}, 500);\n\n\t\t\t// Initial visibility check\n\t\t\tthis.checkVisibility(true);\n\t\t}\n\t}\n\n\t/**\n\t * Cleans up all observers and timers to prevent memory leaks\n\t */\n\tngOnDestroy() {\n\t\t// Cleanup all observers\n\t\tthis.observers.forEach((observer) => {\n\t\t\tif (observer) {\n\t\t\t\tobserver.disconnect();\n\t\t\t}\n\t\t});\n\t\tthis.observers = [];\n\n\t\t// Clear polling interval\n\t\tif (this.pollingInterval !== null) {\n\t\t\tclearInterval(this.pollingInterval);\n\t\t}\n\n\t\t// Clear focus timeout\n\t\tif (this.focusTimeout !== null) {\n\t\t\tclearTimeout(this.focusTimeout);\n\t\t\tthis.focusTimeout = null;\n\t\t}\n\t}\n\n\t/**\n\t * Sets up the IntersectionObserver to detect when the element enters or leaves the viewport\n\t * @private\n\t */\n\tprivate setupIntersectionObserver(): void {\n\t\tif ('IntersectionObserver' in window) {\n\t\t\tconst intersectionObserver = new IntersectionObserver(\n\t\t\t\t(entries) => {\n\t\t\t\t\tif (entries[0].isIntersecting) {\n\t\t\t\t\t\tthis.checkVisibility(true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.updateVisibility(false);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ threshold: 0.1 },\n\t\t\t);\n\n\t\t\tintersectionObserver.observe(this.elementRef.nativeElement);\n\t\t\tthis.observers.push(intersectionObserver);\n\t\t}\n\t}\n\n\t/**\n\t * Sets up MutationObserver to detect style/class changes that might affect visibility\n\t * Also monitors parent elements to detect when containers like modals appear/disappear\n\t * @private\n\t */\n\tprivate setupMutationObserver(): void {\n\t\tconst mutationObserver = new MutationObserver(() => {\n\t\t\tthis.checkVisibility(true);\n\t\t});\n\n\t\t// Watch this element\n\t\tmutationObserver.observe(this.elementRef.nativeElement, {\n\t\t\tattributes: true,\n\t\t\tattributeFilter: ['style', 'class'],\n\t\t});\n\n\t\t// Watch parent elements - important for modals, accordions, etc.\n\t\tlet parent = this.elementRef.nativeElement.parentElement;\n\t\tlet level = 0;\n\n\t\t// Watch up to 3 parent levels\n\t\twhile (parent && level < 3) {\n\t\t\tmutationObserver.observe(parent, {\n\t\t\t\tattributes: true,\n\t\t\t\tattributeFilter: ['style', 'class'],\n\t\t\t\tchildList: true,\n\t\t\t});\n\t\t\tparent = parent.parentElement;\n\t\t\tlevel++;\n\t\t}\n\n\t\tthis.observers.push(mutationObserver);\n\t}\n\n\t/**\n\t * Checks if the element is truly visible by examining computed style and dimensions\n\t * @param force Whether to force a check even if one is already in progress\n\t * @private\n\t */\n\tprivate checkVisibility(force = false): void {\n\t\tif (this.checkingVisibility && !force) return;\n\n\t\tthis.checkingVisibility = true;\n\t\tconst el = this.elementRef.nativeElement;\n\n\t\trequestAnimationFrame(() => {\n\t\t\tconst style = window.getComputedStyle(el);\n\t\t\tconst isNowVisible = el.offsetWidth > 0 && el.offsetHeight > 0 && style.visibility !== 'hidden' && style.display !== 'none';\n\n\t\t\tthis.updateVisibility(isNowVisible);\n\t\t\tthis.checkingVisibility = false;\n\t\t});\n\t}\n\n\t/**\n\t * Updates the visibility signal and triggers the effect by updating the timestamp\n\t * @param visible The new visibility state\n\t * @private\n\t */\n\tprivate updateVisibility(visible: boolean): void {\n\t\tif (this.isVisible() !== visible) {\n\t\t\tthis.isVisible.set(visible);\n\t\t\t// Always update timestamp to force the effect to run\n\t\t\tthis.changeTimestamp.set(Date.now());\n\t\t}\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCG;MAIU,kBAAkB,CAAA;AAyBV,IAAA,UAAA;AAxBpB;;;AAGG;AACH,IAAA,KAAK,GAAG,KAAK,CAAU,KAAK,CAAC;;AAGrB,IAAA,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC;;AAGzB,IAAA,eAAe,GAAG,MAAM,CAAC,CAAC,CAAC;;IAG3B,SAAS,GAAgD,EAAE;;IAG3D,eAAe,GAAkB,IAAI;;IAGrC,kBAAkB,GAAG,KAAK;;IAG1B,YAAY,GAAkB,IAAI;AAE1C,IAAA,WAAA,CAAoB,UAAsB,EAAA;QAAtB,IAAU,CAAA,UAAA,GAAV,UAAU;;QAE7B,MAAM,CAAC,MAAK;AACX,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,EAAE;AAChC,YAAA,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE;AAExC,YAAA,IAAI,IAAI,CAAC,KAAK,EAAE,IAAI,OAAO,EAAE;;AAE5B,gBAAA,IAAI,IAAI,CAAC,YAAY,KAAK,IAAI,EAAE;AAC/B,oBAAA,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC;;;gBAIhC,IAAI,CAAC,YAAY,GAAG,MAA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