@haloduck/ui 2.0.40 → 2.0.42

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.
@@ -351,6 +351,7 @@ class SelectDropdownComponent {
351
351
  _selectedOptionIds = [];
352
352
  manualInputValues = {};
353
353
  activeManualKey = null;
354
+ isComposing = false;
354
355
  selectedChange = new EventEmitter();
355
356
  closeDropdown = new EventEmitter();
356
357
  useFilter = false;
@@ -467,24 +468,55 @@ class SelectDropdownComponent {
467
468
  }
468
469
  }
469
470
  }
471
+ onEditManualInput(option) {
472
+ const key = this.getManualKey(option);
473
+ this.activeManualKey = key;
474
+ // focus input on next tick
475
+ setTimeout(() => {
476
+ const selector = `input[data-manual-key="${key}"]`;
477
+ const el = document.querySelector(selector);
478
+ el?.focus();
479
+ el?.select();
480
+ });
481
+ }
482
+ getManualInputDisplayValue(option) {
483
+ const key = this.getManualKey(option);
484
+ const prefix = option.manualPrefix || '';
485
+ // manualInputValues에 저장된 값 확인
486
+ const storedValue = this.manualInputValues[key];
487
+ if (storedValue && storedValue.trim() !== '') {
488
+ return storedValue;
489
+ }
490
+ // selectedOptionIds에서 prefix가 붙은 값 찾기
491
+ if (prefix) {
492
+ const found = this._selectedOptionIds.find((id) => typeof id === 'string' && id.startsWith(prefix) && id.length > prefix.length);
493
+ if (found) {
494
+ return found.substring(prefix.length);
495
+ }
496
+ }
497
+ return '';
498
+ }
470
499
  isOptionSelected(option) {
471
500
  const id = option.id || option.value;
472
501
  if (option.shouldManualInput) {
473
502
  const key = this.getManualKey(option);
474
503
  const prefix = option.manualPrefix;
504
+ const sentinel = option.id || option.value;
475
505
  // Check if this manual input option is currently active
476
506
  const isActive = this.activeManualKey === key;
507
+ // Check if sentinel is selected (means option is selected but no manual value)
508
+ const hasSentinel = this._selectedOptionIds.includes(sentinel);
477
509
  if (prefix) {
478
- // selected if there exists a value with more than prefix, OR if it's currently active
510
+ // selected if there exists a value with prefix OR sentinel is selected OR if it's currently active
479
511
  const hasValueWithPrefix = this._selectedOptionIds.some((selectedId) => typeof selectedId === 'string' &&
480
512
  selectedId.startsWith(prefix) &&
481
513
  selectedId.length > prefix.length);
482
- return hasValueWithPrefix || isActive;
514
+ return hasValueWithPrefix || hasSentinel || isActive;
483
515
  }
484
- // no prefix: consider selected if any selected id equals current typed value (non-empty) OR if it's active
516
+ // no prefix: consider selected if any selected id equals current typed value (non-empty) OR sentinel OR if it's active
485
517
  const typed = (this.manualInputValues[key] || '').trim();
486
518
  const hasTypedValue = typed !== '' && this._selectedOptionIds.includes(typed);
487
- return hasTypedValue || isActive;
519
+ return hasTypedValue || hasSentinel || isActive;
488
520
  }
489
521
  return this._selectedOptionIds.includes(id);
490
522
  }
@@ -502,7 +534,7 @@ class SelectDropdownComponent {
502
534
  return false;
503
535
  }
504
536
  getManualKey(option) {
505
- return option.manualPrefix || option.id || option.value;
537
+ return option.id || option.value;
506
538
  }
507
539
  seedManualInputs() {
508
540
  const manualOptions = this._options.filter((o) => o.shouldManualInput);
@@ -515,16 +547,20 @@ class SelectDropdownComponent {
515
547
  }
516
548
  }
517
549
  onManualInputChange(option, value) {
550
+ // IME 조합 중이면 업데이트하지 않음
551
+ if (this.isComposing) {
552
+ return;
553
+ }
518
554
  const key = this.getManualKey(option);
519
555
  this.manualInputValues[key] = value;
520
- // Dynamically reflect selection as user types
556
+ // 타이핑 중에는 실시간으로 선택 상태 업데이트
521
557
  const prefix = option.manualPrefix || '';
522
558
  const sentinel = option.id || option.value;
523
559
  const trimmed = (value || '').trim();
524
560
  if (this.multiselect) {
525
561
  if (option.isExclusive) {
526
562
  if (trimmed === '') {
527
- // Keep the sentinel selected to maintain the manual input option as "active"
563
+ // 값일 때는 sentinel 유지 (선택은 유지하되 값은 없음)
528
564
  this.setSelected([sentinel]);
529
565
  }
530
566
  else {
@@ -533,19 +569,21 @@ class SelectDropdownComponent {
533
569
  }
534
570
  else {
535
571
  let next = this._selectedOptionIds.filter((id) => !this.isIdExclusive(id));
536
- // remove same prefix or sentinel
537
- next = next.filter((id) => (prefix ? !id.startsWith(prefix) : id !== sentinel));
572
+ // sentinel과 prefix 시작하는 값 모두 제거
573
+ next = next.filter((id) => {
574
+ if (id === sentinel)
575
+ return false;
576
+ if (prefix && id.startsWith(prefix))
577
+ return false;
578
+ return true;
579
+ });
538
580
  if (trimmed !== '') {
539
581
  const toAdd = `${prefix}${trimmed}`;
540
- if (!next.includes(toAdd)) {
541
- next = [toAdd, ...next];
542
- }
582
+ next = [toAdd, ...next];
543
583
  }
544
584
  else {
545
- // Keep the sentinel to maintain selection state when text is empty
546
- if (!next.includes(sentinel)) {
547
- next = [sentinel, ...next];
548
- }
585
+ // 값일 때는 sentinel 추가
586
+ next = [sentinel, ...next];
549
587
  }
550
588
  this.setSelected(next);
551
589
  }
@@ -553,7 +591,7 @@ class SelectDropdownComponent {
553
591
  else {
554
592
  // single select
555
593
  if (trimmed === '') {
556
- // Keep the sentinel selected to maintain the manual input option as "active"
594
+ // 값일 때는 sentinel 유지 (선택은 유지하되 값은 없음)
557
595
  this.setSelected([sentinel]);
558
596
  }
559
597
  else {
@@ -561,11 +599,56 @@ class SelectDropdownComponent {
561
599
  }
562
600
  }
563
601
  }
602
+ onCompositionStart() {
603
+ this.isComposing = true;
604
+ }
605
+ onCompositionEnd(option, event) {
606
+ this.isComposing = false;
607
+ const target = event.target;
608
+ this.onManualInputChange(option, target.value);
609
+ }
610
+ onManualInputKeydown(option, event) {
611
+ if (event.key === 'Enter') {
612
+ // IME 조합 중이면 아무것도 하지 않음
613
+ if (this.isComposing) {
614
+ return;
615
+ }
616
+ event.preventDefault();
617
+ // 약간의 지연을 두어 compositionend 이벤트가 먼저 처리되도록 함
618
+ setTimeout(() => {
619
+ this.onManualInputConfirm(option);
620
+ }, 10);
621
+ }
622
+ }
564
623
  onManualInputConfirm(option) {
565
624
  const key = this.getManualKey(option);
566
625
  const raw = (this.manualInputValues[key] || '').trim();
567
- // Use same logic as onManualInputChange
568
- this.onManualInputChange(option, raw);
626
+ // 입력값이 비어있으면 선택 해제
627
+ if (raw === '') {
628
+ this.activeManualKey = null;
629
+ const prefix = option.manualPrefix || '';
630
+ const sentinel = option.id || option.value;
631
+ if (this.multiselect) {
632
+ let next = [...this._selectedOptionIds];
633
+ next = next.filter((id) => {
634
+ if (id === sentinel)
635
+ return false;
636
+ if (prefix && id.startsWith(prefix))
637
+ return false;
638
+ return true;
639
+ });
640
+ this.setSelected(next);
641
+ }
642
+ else {
643
+ this.setSelected([]);
644
+ }
645
+ }
646
+ else {
647
+ // 입력값이 있으면 정상 처리
648
+ this.onManualInputChange(option, raw);
649
+ // 입력창 닫기
650
+ this.activeManualKey = null;
651
+ }
569
652
  // Close dropdown in single select mode after confirming input
570
653
  if (!this.multiselect) {
571
654
  this.closeDropdown.emit();
@@ -574,15 +657,13 @@ class SelectDropdownComponent {
574
657
  onManualInputBlur(option) {
575
658
  const key = this.getManualKey(option);
576
659
  const raw = (this.manualInputValues[key] || '').trim();
660
+ // 입력값이 비어있으면 선택 해제
577
661
  if (raw === '') {
578
- // hide input on blur when empty
579
662
  this.activeManualKey = null;
580
- // Also deselect the manual input option completely
581
663
  const prefix = option.manualPrefix || '';
582
664
  const sentinel = option.id || option.value;
583
665
  if (this.multiselect) {
584
666
  let next = [...this._selectedOptionIds];
585
- // Remove sentinel and any values with the prefix
586
667
  next = next.filter((id) => {
587
668
  if (id === sentinel)
588
669
  return false;
@@ -593,10 +674,10 @@ class SelectDropdownComponent {
593
674
  this.setSelected(next);
594
675
  }
595
676
  else {
596
- // Single select: deselect completely
597
677
  this.setSelected([]);
598
678
  }
599
679
  }
680
+ // 입력값이 있으면 아무것도 하지 않음 (이미 onManualInputChange에서 처리됨)
600
681
  }
601
682
  emitSelectedChange() {
602
683
  const payload = [...this._selectedOptionIds];
@@ -604,17 +685,15 @@ class SelectDropdownComponent {
604
685
  }
605
686
  setSelected(next) {
606
687
  const sanitized = next.filter((id) => id != null);
607
- setTimeout(() => {
608
- this._selectedOptionIds = sanitized;
609
- this.emitSelectedChange();
610
- });
688
+ this._selectedOptionIds = sanitized;
689
+ this.emitSelectedChange();
611
690
  }
612
691
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: SelectDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
613
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: SelectDropdownComponent, isStandalone: true, selector: "haloduck-select-dropdown", inputs: { useFilter: "useFilter", multiselect: "multiselect", atLeastOne: "atLeastOne", asButton: "asButton", options: "options", selectedOptionIds: "selectedOptionIds" }, outputs: { selectedChange: "selectedChange", closeDropdown: "closeDropdown" }, providers: [provideTranslocoScope('haloduck')], ngImport: i0, template: "<div\n id=\"dropdown\"\n class=\"max-w-full mt-2 absolute z-40 bg-light-background dark:bg-dark-background text-light-on-background dark:text-dark-on-background border border-light-inactive dark:border-dark-inactive rounded max-h-60 flex flex-col gap-2\"\n>\n @if (useFilter && _options.length >= 5) {\n <input\n #inputFilter\n id=\"inputFilter\"\n type=\"text\"\n [placeholder]=\"'haloduck.ui.select.Keyword...' | transloco\"\n (input)=\"onFilterInput($event)\"\n class=\"text-light-inactive dark:text-dark-inactive rounded-md outline -outline-offset-1 outline-light-inactive dark:outline-dark-inactive focus:outline-2 focus:outline-offset-2 focus:outline-light-primary dark:focus:outline-dark-primary px-3 py-1.5 text-sm/6 bg-light-control dark:bg-dark-control m-2\"\n />\n }\n <div class=\"overflow-y-auto\">\n @for (option of _filteredOptions(); track option.id ? option.id : option.value) {\n <div\n class=\"px-3 py-2 text-sm/6 hover:bg-light-secondary/60 dark:hover:bg-dark-secondary/60 flex items-center justify-start whitespace-nowrap\"\n [class.cursor-pointer]=\"!option.shouldManualInput\"\n (click)=\"onToggleOption(option)\"\n >\n @if (!asButton) {\n @if (isOptionSelected(option)) {\n <svg\n class=\"w-4 h-4 text-light-primary dark:text-dark-primary inline-block mr-2\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M16.707 5.293a1 1 0 00-1.414 0L8 12.586 4.707 9.293a1 1 0 00-1.414 1.414l4 4a1 1 0 001.414 0l8-8a1 1 0 000-1.414z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n } @else {\n <div class=\"w-4 h-4 inline-block mr-2\"></div>\n }\n }\n @if (\n option.shouldManualInput &&\n (isOptionSelected(option) ||\n activeManualKey ===\n (option.manualPrefix ? option.manualPrefix : option.id || option.value))\n ) {\n <input\n type=\"text\"\n [(ngModel)]=\"\n manualInputValues[\n option.manualPrefix ? option.manualPrefix : option.id || option.value\n ]\n \"\n [attr.data-manual-key]=\"\n option.manualPrefix ? option.manualPrefix : option.id || option.value\n \"\n (ngModelChange)=\"onManualInputChange(option, $event)\"\n (click)=\"$event.stopPropagation()\"\n (blur)=\"onManualInputBlur(option)\"\n (keydown.enter)=\"onManualInputConfirm(option)\"\n class=\"text-light-on-control dark:text-dark-on-control rounded-md outline -outline-offset-1 outline-light-inactive dark:outline-dark-inactive focus:outline-2 focus:outline-offset-2 focus:outline-light-primary dark:focus:outline-dark-primary px-2 py-1 text-sm/6 bg-light-control dark:bg-dark-control w-full\"\n />\n } @else {\n {{ option.value }}\n }\n </div>\n }\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslocoModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i2$1.TranslocoPipe, name: "transloco" }] });
692
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: SelectDropdownComponent, isStandalone: true, selector: "haloduck-select-dropdown", inputs: { useFilter: "useFilter", multiselect: "multiselect", atLeastOne: "atLeastOne", asButton: "asButton", options: "options", selectedOptionIds: "selectedOptionIds" }, outputs: { selectedChange: "selectedChange", closeDropdown: "closeDropdown" }, providers: [provideTranslocoScope('haloduck')], ngImport: i0, template: "<div\n id=\"dropdown\"\n class=\"max-w-full mt-2 absolute z-40 bg-light-background dark:bg-dark-background text-light-on-background dark:text-dark-on-background border border-light-inactive dark:border-dark-inactive rounded max-h-60 flex flex-col gap-2\"\n>\n @if (useFilter && _options.length >= 5) {\n <input\n #inputFilter\n id=\"inputFilter\"\n type=\"text\"\n [placeholder]=\"'haloduck.ui.select.Keyword...' | transloco\"\n (input)=\"onFilterInput($event)\"\n class=\"text-light-inactive dark:text-dark-inactive rounded-md outline -outline-offset-1 outline-light-inactive dark:outline-dark-inactive focus:outline-2 focus:outline-offset-2 focus:outline-light-primary dark:focus:outline-dark-primary px-3 py-1.5 text-sm/6 bg-light-control dark:bg-dark-control m-2\"\n />\n }\n <div class=\"overflow-y-auto\">\n @for (option of _filteredOptions(); track option.id ? option.id : option.value) {\n <div\n class=\"px-3 py-2 text-sm/6 hover:bg-light-secondary/60 dark:hover:bg-dark-secondary/60 flex items-center justify-start whitespace-nowrap\"\n [class.cursor-pointer]=\"!option.shouldManualInput\"\n (click)=\"!option.shouldManualInput && onToggleOption(option)\"\n >\n @if (!asButton) {\n @if (isOptionSelected(option)) {\n <svg\n class=\"w-4 h-4 text-light-primary dark:text-dark-primary inline-block mr-2 cursor-pointer\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n (click)=\"\n option.shouldManualInput && $event.stopPropagation();\n option.shouldManualInput && onToggleOption(option)\n \"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M16.707 5.293a1 1 0 00-1.414 0L8 12.586 4.707 9.293a1 1 0 00-1.414 1.414l4 4a1 1 0 001.414 0l8-8a1 1 0 000-1.414z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n } @else {\n <div class=\"w-4 h-4 inline-block mr-2\"></div>\n }\n }\n @if (option.shouldManualInput && activeManualKey === (option.id || option.value)) {\n <input\n type=\"text\"\n [(ngModel)]=\"manualInputValues[option.id || option.value]\"\n [attr.data-manual-key]=\"option.id || option.value\"\n (ngModelChange)=\"onManualInputChange(option, $event)\"\n (compositionstart)=\"onCompositionStart()\"\n (compositionend)=\"onCompositionEnd(option, $event)\"\n (click)=\"$event.stopPropagation()\"\n (blur)=\"onManualInputBlur(option)\"\n (keydown)=\"onManualInputKeydown(option, $event)\"\n class=\"text-light-on-control dark:text-dark-on-control rounded-md outline -outline-offset-1 outline-light-inactive dark:outline-dark-inactive focus:outline-2 focus:outline-offset-2 focus:outline-light-primary dark:focus:outline-dark-primary px-2 py-1 text-sm/6 bg-light-control dark:bg-dark-control w-full\"\n />\n } @else if (option.shouldManualInput) {\n <span\n class=\"cursor-pointer flex-1\"\n (click)=\"$event.stopPropagation(); onEditManualInput(option)\"\n >\n {{ getManualInputDisplayValue(option) || option.value }}\n </span>\n } @else {\n {{ option.value }}\n }\n </div>\n }\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslocoModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i2$1.TranslocoPipe, name: "transloco" }] });
614
693
  }
615
694
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: SelectDropdownComponent, decorators: [{
616
695
  type: Component,
617
- args: [{ selector: 'haloduck-select-dropdown', imports: [TranslocoModule, FormsModule], providers: [provideTranslocoScope('haloduck')], template: "<div\n id=\"dropdown\"\n class=\"max-w-full mt-2 absolute z-40 bg-light-background dark:bg-dark-background text-light-on-background dark:text-dark-on-background border border-light-inactive dark:border-dark-inactive rounded max-h-60 flex flex-col gap-2\"\n>\n @if (useFilter && _options.length >= 5) {\n <input\n #inputFilter\n id=\"inputFilter\"\n type=\"text\"\n [placeholder]=\"'haloduck.ui.select.Keyword...' | transloco\"\n (input)=\"onFilterInput($event)\"\n class=\"text-light-inactive dark:text-dark-inactive rounded-md outline -outline-offset-1 outline-light-inactive dark:outline-dark-inactive focus:outline-2 focus:outline-offset-2 focus:outline-light-primary dark:focus:outline-dark-primary px-3 py-1.5 text-sm/6 bg-light-control dark:bg-dark-control m-2\"\n />\n }\n <div class=\"overflow-y-auto\">\n @for (option of _filteredOptions(); track option.id ? option.id : option.value) {\n <div\n class=\"px-3 py-2 text-sm/6 hover:bg-light-secondary/60 dark:hover:bg-dark-secondary/60 flex items-center justify-start whitespace-nowrap\"\n [class.cursor-pointer]=\"!option.shouldManualInput\"\n (click)=\"onToggleOption(option)\"\n >\n @if (!asButton) {\n @if (isOptionSelected(option)) {\n <svg\n class=\"w-4 h-4 text-light-primary dark:text-dark-primary inline-block mr-2\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M16.707 5.293a1 1 0 00-1.414 0L8 12.586 4.707 9.293a1 1 0 00-1.414 1.414l4 4a1 1 0 001.414 0l8-8a1 1 0 000-1.414z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n } @else {\n <div class=\"w-4 h-4 inline-block mr-2\"></div>\n }\n }\n @if (\n option.shouldManualInput &&\n (isOptionSelected(option) ||\n activeManualKey ===\n (option.manualPrefix ? option.manualPrefix : option.id || option.value))\n ) {\n <input\n type=\"text\"\n [(ngModel)]=\"\n manualInputValues[\n option.manualPrefix ? option.manualPrefix : option.id || option.value\n ]\n \"\n [attr.data-manual-key]=\"\n option.manualPrefix ? option.manualPrefix : option.id || option.value\n \"\n (ngModelChange)=\"onManualInputChange(option, $event)\"\n (click)=\"$event.stopPropagation()\"\n (blur)=\"onManualInputBlur(option)\"\n (keydown.enter)=\"onManualInputConfirm(option)\"\n class=\"text-light-on-control dark:text-dark-on-control rounded-md outline -outline-offset-1 outline-light-inactive dark:outline-dark-inactive focus:outline-2 focus:outline-offset-2 focus:outline-light-primary dark:focus:outline-dark-primary px-2 py-1 text-sm/6 bg-light-control dark:bg-dark-control w-full\"\n />\n } @else {\n {{ option.value }}\n }\n </div>\n }\n </div>\n</div>\n" }]
696
+ args: [{ selector: 'haloduck-select-dropdown', imports: [TranslocoModule, FormsModule], providers: [provideTranslocoScope('haloduck')], template: "<div\n id=\"dropdown\"\n class=\"max-w-full mt-2 absolute z-40 bg-light-background dark:bg-dark-background text-light-on-background dark:text-dark-on-background border border-light-inactive dark:border-dark-inactive rounded max-h-60 flex flex-col gap-2\"\n>\n @if (useFilter && _options.length >= 5) {\n <input\n #inputFilter\n id=\"inputFilter\"\n type=\"text\"\n [placeholder]=\"'haloduck.ui.select.Keyword...' | transloco\"\n (input)=\"onFilterInput($event)\"\n class=\"text-light-inactive dark:text-dark-inactive rounded-md outline -outline-offset-1 outline-light-inactive dark:outline-dark-inactive focus:outline-2 focus:outline-offset-2 focus:outline-light-primary dark:focus:outline-dark-primary px-3 py-1.5 text-sm/6 bg-light-control dark:bg-dark-control m-2\"\n />\n }\n <div class=\"overflow-y-auto\">\n @for (option of _filteredOptions(); track option.id ? option.id : option.value) {\n <div\n class=\"px-3 py-2 text-sm/6 hover:bg-light-secondary/60 dark:hover:bg-dark-secondary/60 flex items-center justify-start whitespace-nowrap\"\n [class.cursor-pointer]=\"!option.shouldManualInput\"\n (click)=\"!option.shouldManualInput && onToggleOption(option)\"\n >\n @if (!asButton) {\n @if (isOptionSelected(option)) {\n <svg\n class=\"w-4 h-4 text-light-primary dark:text-dark-primary inline-block mr-2 cursor-pointer\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n (click)=\"\n option.shouldManualInput && $event.stopPropagation();\n option.shouldManualInput && onToggleOption(option)\n \"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M16.707 5.293a1 1 0 00-1.414 0L8 12.586 4.707 9.293a1 1 0 00-1.414 1.414l4 4a1 1 0 001.414 0l8-8a1 1 0 000-1.414z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n } @else {\n <div class=\"w-4 h-4 inline-block mr-2\"></div>\n }\n }\n @if (option.shouldManualInput && activeManualKey === (option.id || option.value)) {\n <input\n type=\"text\"\n [(ngModel)]=\"manualInputValues[option.id || option.value]\"\n [attr.data-manual-key]=\"option.id || option.value\"\n (ngModelChange)=\"onManualInputChange(option, $event)\"\n (compositionstart)=\"onCompositionStart()\"\n (compositionend)=\"onCompositionEnd(option, $event)\"\n (click)=\"$event.stopPropagation()\"\n (blur)=\"onManualInputBlur(option)\"\n (keydown)=\"onManualInputKeydown(option, $event)\"\n class=\"text-light-on-control dark:text-dark-on-control rounded-md outline -outline-offset-1 outline-light-inactive dark:outline-dark-inactive focus:outline-2 focus:outline-offset-2 focus:outline-light-primary dark:focus:outline-dark-primary px-2 py-1 text-sm/6 bg-light-control dark:bg-dark-control w-full\"\n />\n } @else if (option.shouldManualInput) {\n <span\n class=\"cursor-pointer flex-1\"\n (click)=\"$event.stopPropagation(); onEditManualInput(option)\"\n >\n {{ getManualInputDisplayValue(option) || option.value }}\n </span>\n } @else {\n {{ option.value }}\n }\n </div>\n }\n </div>\n</div>\n" }]
618
697
  }], propDecorators: { selectedChange: [{
619
698
  type: Output
620
699
  }], closeDropdown: [{
@@ -1198,6 +1277,19 @@ class SelectComponent {
1198
1277
  const target = event.target;
1199
1278
  this.onManualInputChange(option, target.value);
1200
1279
  }
1280
+ onManualInputKeydown(option, event) {
1281
+ if (event.key === 'Enter') {
1282
+ // IME 조합 중이면 아무것도 하지 않음 (compositionend가 처리)
1283
+ if (this.isComposing) {
1284
+ return;
1285
+ }
1286
+ event.preventDefault();
1287
+ // 약간의 지연을 두어 compositionend 이벤트가 먼저 처리되도록 함
1288
+ setTimeout(() => {
1289
+ this.onManualInputBlur(option);
1290
+ }, 10);
1291
+ }
1292
+ }
1201
1293
  onManualInputBlur(option) {
1202
1294
  const key = this.getManualKey(option);
1203
1295
  const raw = (this.manualInputValues[key] || '').trim();
@@ -1236,7 +1328,7 @@ class SelectComponent {
1236
1328
  multi: true,
1237
1329
  },
1238
1330
  provideTranslocoScope('haloduck'),
1239
- ], viewQueries: [{ propertyName: "origin", first: true, predicate: ["origin"], descendants: true }, { propertyName: "label", first: true, predicate: ["label"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"flex gap-2 items-center w-full\"\n [ngClass]=\"{ 'flex-col items-start': layout === 'vertical' }\"\n>\n <label\n #label\n class=\"block text-sm/6 font-medium text-light-on-control dark:text-dark-on-control {{\n labelWidth\n }}\"\n [ngClass]=\"{ 'w-full': layout === 'vertical' }\"\n >\n <!-- <ng-content select=\"[slot=label]\"></ng-content> -->\n <ng-content></ng-content>\n </label>\n\n @if (showAllItems) {\n <!-- Inline options display -->\n <div class=\"w-full flex-1\">\n @if (loading) {\n <div class=\"flex-1 flex items-center gap-2 w-full h-3\">\n <div class=\"animate-pulse bg-light-inactive dark:bg-dark-inactive rounded-md h-5 w-full\">\n &nbsp;\n </div>\n </div>\n } @else {\n <div class=\"flex flex-col gap-2\">\n @for (option of options; track option.id || option.value) {\n <label\n class=\"flex items-center gap-2 text-sm/6 text-light-on-control dark:text-dark-on-control cursor-pointer\"\n [ngClass]=\"{\n 'opacity-60 cursor-not-allowed': disabled,\n }\"\n >\n @if (multiselect) {\n <!-- Checkbox for multiselect -->\n <input\n type=\"checkbox\"\n [checked]=\"isOptionSelected(option)\"\n [disabled]=\"disabled\"\n (click)=\"!disabled && onToggleOption(option)\"\n class=\"appearance-none w-5 h-5 rounded bg-light-control dark:bg-dark-control border-2 border-light-inactive dark:border-dark-inactive cursor-pointer disabled:cursor-not-allowed checked:bg-light-primary checked:dark:bg-dark-primary checked:border-light-primary checked:dark:border-dark-primary relative before:content-[''] before:absolute before:inset-0 before:bg-[url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOSIgdmlld0JveD0iMCAwIDEyIDkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEgNEw0LjUgNy41TDExIDEiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+')] before:bg-center before:bg-no-repeat before:opacity-0 checked:before:opacity-100\"\n />\n } @else {\n <!-- Radio button for single select -->\n <input\n type=\"radio\"\n [checked]=\"isOptionSelected(option)\"\n [disabled]=\"disabled\"\n (click)=\"!disabled && onToggleOption(option)\"\n name=\"radio-group\"\n class=\"appearance-none w-5 h-5 rounded-full bg-light-control dark:bg-dark-control border-2 border-light-inactive dark:border-dark-inactive cursor-pointer disabled:cursor-not-allowed checked:bg-light-primary checked:dark:bg-dark-primary checked:border-light-primary checked:dark:border-dark-primary relative before:content-[''] before:absolute before:inset-[4px] before:rounded-full before:bg-light-on-primary before:dark:bg-dark-on-primary before:opacity-0 checked:before:opacity-100\"\n />\n }\n @if (\n option.shouldManualInput &&\n (isOptionSelected(option) || activeManualKey === (option.id || option.value))\n ) {\n <input\n type=\"text\"\n [(ngModel)]=\"manualInputValues[option.id || option.value]\"\n [attr.data-manual-key]=\"option.id || option.value\"\n (ngModelChange)=\"onManualInputChange(option, $event)\"\n (compositionstart)=\"onCompositionStart()\"\n (compositionend)=\"onCompositionEnd(option, $event)\"\n (click)=\"$event.stopPropagation()\"\n (blur)=\"onManualInputBlur(option)\"\n (keydown.enter)=\"$event.preventDefault(); onManualInputBlur(option)\"\n [disabled]=\"!!disabled\"\n class=\"flex-1 text-light-on-control dark:text-dark-on-control rounded-md outline -outline-offset-1 outline-light-inactive dark:outline-dark-inactive focus:outline-2 focus:outline-offset-2 focus:outline-light-primary dark:focus:outline-dark-primary px-2 py-1 text-sm/6 bg-light-control dark:bg-dark-control\"\n />\n } @else {\n <span (click)=\"!disabled && onToggleOption(option)\">{{ option.value }}</span>\n }\n </label>\n }\n </div>\n }\n </div>\n } @else {\n <!-- Original dropdown display -->\n <div\n #origin\n class=\"w-full flex-1 relative overflow-visible rounded-md outline outline-light-inactive dark:outline-dark-inactive text-sm/6\"\n [ngClass]=\"{\n 'bg-light-control dark:bg-dark-control focus:outline-2 focus:outline-offset-2 focus:outline-light-primary focus:dark:outline-dark-primary':\n !disabled,\n 'bg-light-primary dark:bg-dark-primary text-light-on-primary dark:text-dark-on-primary':\n variant === 'primary' && !disabled,\n 'bg-light-secondary dark:bg-dark-secondary text-light-on-secondary dark:text-dark-on-secondary':\n variant === 'secondary' && !disabled,\n 'bg-light-danger dark:bg-dark-danger text-light-on-danger dark:text-dark-on-danger':\n variant === 'danger' && !disabled,\n 'bg-light-control/60 dark:bg-dark-control/60 text-light-on-control/60 dark:text-dark-on-control/60':\n disabled,\n }\"\n [tabindex]=\"disabled ? -1 : 0\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeyDown($event)\"\n >\n <div\n class=\"px-3 py-1.5 text-sm/6 cursor-pointer flex flex-nowrap items-center justify-between overflow-hidden\"\n >\n @if (loading) {\n <div class=\"flex-1 flex items-center gap-2 w-full h-3\">\n <div\n class=\"animate-pulse bg-light-inactive dark:bg-dark-inactive rounded-md h-5 w-full\"\n >\n &nbsp;\n </div>\n </div>\n } @else {\n <div class=\"flex-1\">\n @if (!asButton && displayedSelectedOptions && displayedSelectedOptions.length > 0) {\n @if (multiselect) {\n <div class=\"flex flex-wrap gap-x-2 gap-y-1 items-start\">\n @for (option of displayedSelectedOptions; track option; let i = $index) {\n @if (showAll || i === 0) {\n <span\n class=\"bg-light-secondary dark:bg-dark-secondary rounded-md flex items-center text-xs/6 text-light-on-secondary dark:text-dark-on-secondary\"\n [ngClass]=\"{ 'w-full h-full px-4': !multiselect, 'px-1': multiselect }\"\n >\n {{ option.value }}\n @if (showAll || i === 0) {\n <div\n (click)=\"onDeselectOption($event, option)\"\n class=\"ml-2 text-light-danger dark:text-dark-danger hover:cursor-pointer\"\n >\n <svg\n class=\"w-3 h-3\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M10 8.586l-2.293-2.293a1 1 0 00-1.414 1.414L8.586 10l-2.293 2.293a1 1 0 001.414 1.414L10 11.414l2.293 2.293a1 1 0 001.414-1.414L11.414 10l2.293-2.293a1 1 0 00-1.414-1.414L10 8.586z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </div>\n }\n </span>\n @if (!showAll && displayedSelectedOptions.length > 1) {\n <span\n class=\"text-light-on-control/80 dark:text-dark-on-control/80 text-xs/6\"\n >\n +{{ displayedSelectedOptions.length - 1 }}\n </span>\n }\n }\n }\n </div>\n } @else {\n <span\n class=\"text-light-on-control dark:text-dark-on-control overflow-hidden overflow-ellipsis\"\n [ngClass]=\"{\n 'text-light-on-control/60 dark:text-dark-on-control/60': disabled,\n 'text-light-on-primary dark:text-dark-on-primary':\n variant === 'primary' && !disabled,\n 'text-light-on-secondary dark:text-dark-on-secondary':\n variant === 'secondary' && !disabled,\n 'text-light-on-danger dark:text-dark-on-danger':\n variant === 'danger' && !disabled,\n }\"\n >{{ displayedSelectedOptions[0].value }}</span\n >\n }\n } @else {\n <span\n class=\"text-light-inactive dark:text-dark-inactive overflow-hidden overflow-ellipsis\"\n [ngClass]=\"{\n 'text-light-on-control/60 dark:text-dark-on-control/60': disabled,\n 'text-light-on-primary/80 dark:text-dark-on-primary/80':\n variant === 'primary' && !disabled,\n 'text-light-on-secondary/80 dark:text-dark-on-secondary/80':\n variant === 'secondary' && !disabled,\n 'text-light-on-danger/80 dark:text-dark-on-danger/80':\n variant === 'danger' && !disabled,\n }\"\n >\n @if (useIcon) {\n <ng-content select=\"buttonIcon\"></ng-content>\n } @else {\n {{ placeholder }}\n }\n </span>\n }\n </div>\n }\n <div\n class=\"text-light-on-control dark:text-dark-on-control\"\n [ngClass]=\"{\n 'text-light-on-control/60 dark:text-dark-on-control/60': disabled,\n 'text-light-on-primary/80 dark:text-dark-on-primary/80':\n variant === 'primary' && !disabled,\n 'text-light-on-secondary/80 dark:text-dark-on-secondary/80':\n variant === 'secondary' && !disabled,\n 'text-light-on-danger/80 dark:text-dark-on-danger/80':\n variant === 'danger' && !disabled,\n }\"\n >\n @if (isDropdownOpen()) {\n <svg\n class=\"w-4 h-4 ml-2 inline-block\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n } @else {\n <svg\n class=\"w-4 h-4 ml-2 inline-block\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 011.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n }\n </div>\n </div>\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
1331
+ ], viewQueries: [{ propertyName: "origin", first: true, predicate: ["origin"], descendants: true }, { propertyName: "label", first: true, predicate: ["label"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"flex gap-2 items-center w-full\"\n [ngClass]=\"{ 'flex-col items-start': layout === 'vertical' }\"\n>\n <label\n #label\n class=\"block text-sm/6 font-medium text-light-on-control dark:text-dark-on-control {{\n labelWidth\n }}\"\n [ngClass]=\"{ 'w-full': layout === 'vertical' }\"\n >\n <!-- <ng-content select=\"[slot=label]\"></ng-content> -->\n <ng-content></ng-content>\n </label>\n\n @if (showAllItems) {\n <!-- Inline options display -->\n <div class=\"w-full flex-1\">\n @if (loading) {\n <div class=\"flex-1 flex items-center gap-2 w-full h-3\">\n <div class=\"animate-pulse bg-light-inactive dark:bg-dark-inactive rounded-md h-5 w-full\">\n &nbsp;\n </div>\n </div>\n } @else {\n <div class=\"flex flex-col gap-2\">\n @for (option of options; track option.id || option.value) {\n <label\n class=\"flex items-center gap-2 text-sm/6 text-light-on-control dark:text-dark-on-control cursor-pointer\"\n [ngClass]=\"{\n 'opacity-60 cursor-not-allowed': disabled,\n }\"\n (click)=\"$event.preventDefault()\"\n >\n @if (multiselect) {\n <!-- Checkbox for multiselect -->\n <input\n type=\"checkbox\"\n [checked]=\"isOptionSelected(option)\"\n [disabled]=\"disabled\"\n (click)=\"!disabled && onToggleOption(option)\"\n class=\"appearance-none w-5 h-5 rounded bg-light-control dark:bg-dark-control border-2 border-light-inactive dark:border-dark-inactive cursor-pointer disabled:cursor-not-allowed checked:bg-light-primary checked:dark:bg-dark-primary checked:border-light-primary checked:dark:border-dark-primary relative before:content-[''] before:absolute before:inset-0 before:bg-[url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOSIgdmlld0JveD0iMCAwIDEyIDkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEgNEw0LjUgNy41TDExIDEiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+')] before:bg-center before:bg-no-repeat before:opacity-0 checked:before:opacity-100\"\n />\n } @else {\n <!-- Radio button for single select -->\n <input\n type=\"radio\"\n [checked]=\"isOptionSelected(option)\"\n [disabled]=\"disabled\"\n (click)=\"!disabled && onToggleOption(option)\"\n name=\"radio-group\"\n class=\"appearance-none w-5 h-5 rounded-full bg-light-control dark:bg-dark-control border-2 border-light-inactive dark:border-dark-inactive cursor-pointer disabled:cursor-not-allowed checked:bg-light-primary checked:dark:bg-dark-primary checked:border-light-primary checked:dark:border-dark-primary relative before:content-[''] before:absolute before:inset-[4px] before:rounded-full before:bg-light-on-primary before:dark:bg-dark-on-primary before:opacity-0 checked:before:opacity-100\"\n />\n }\n @if (\n option.shouldManualInput &&\n (isOptionSelected(option) || activeManualKey === (option.id || option.value))\n ) {\n <input\n type=\"text\"\n [(ngModel)]=\"manualInputValues[option.id || option.value]\"\n [attr.data-manual-key]=\"option.id || option.value\"\n (ngModelChange)=\"onManualInputChange(option, $event)\"\n (compositionstart)=\"onCompositionStart()\"\n (compositionend)=\"onCompositionEnd(option, $event)\"\n (click)=\"$event.stopPropagation()\"\n (blur)=\"onManualInputBlur(option)\"\n (keydown)=\"onManualInputKeydown(option, $event)\"\n [disabled]=\"!!disabled\"\n class=\"flex-1 text-light-on-control dark:text-dark-on-control rounded-md outline -outline-offset-1 outline-light-inactive dark:outline-dark-inactive focus:outline-2 focus:outline-offset-2 focus:outline-light-primary dark:focus:outline-dark-primary px-2 py-1 text-sm/6 bg-light-control dark:bg-dark-control\"\n />\n } @else {\n <span (click)=\"!disabled && onToggleOption(option)\">{{ option.value }}</span>\n }\n </label>\n }\n </div>\n }\n </div>\n } @else {\n <!-- Original dropdown display -->\n <div\n #origin\n class=\"w-full flex-1 relative overflow-visible rounded-md outline outline-light-inactive dark:outline-dark-inactive text-sm/6\"\n [ngClass]=\"{\n 'bg-light-control dark:bg-dark-control focus:outline-2 focus:outline-offset-2 focus:outline-light-primary focus:dark:outline-dark-primary':\n !disabled,\n 'bg-light-primary dark:bg-dark-primary text-light-on-primary dark:text-dark-on-primary':\n variant === 'primary' && !disabled,\n 'bg-light-secondary dark:bg-dark-secondary text-light-on-secondary dark:text-dark-on-secondary':\n variant === 'secondary' && !disabled,\n 'bg-light-danger dark:bg-dark-danger text-light-on-danger dark:text-dark-on-danger':\n variant === 'danger' && !disabled,\n 'bg-light-control/60 dark:bg-dark-control/60 text-light-on-control/60 dark:text-dark-on-control/60':\n disabled,\n }\"\n [tabindex]=\"disabled ? -1 : 0\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeyDown($event)\"\n >\n <div\n class=\"px-3 py-1.5 text-sm/6 cursor-pointer flex flex-nowrap items-center justify-between overflow-hidden\"\n >\n @if (loading) {\n <div class=\"flex-1 flex items-center gap-2 w-full h-3\">\n <div\n class=\"animate-pulse bg-light-inactive dark:bg-dark-inactive rounded-md h-5 w-full\"\n >\n &nbsp;\n </div>\n </div>\n } @else {\n <div class=\"flex-1\">\n @if (!asButton && displayedSelectedOptions && displayedSelectedOptions.length > 0) {\n @if (multiselect) {\n <div class=\"flex flex-wrap gap-x-2 gap-y-1 items-start\">\n @for (option of displayedSelectedOptions; track option; let i = $index) {\n @if (showAll || i === 0) {\n <span\n class=\"bg-light-secondary dark:bg-dark-secondary rounded-md flex items-center text-xs/6 text-light-on-secondary dark:text-dark-on-secondary\"\n [ngClass]=\"{ 'w-full h-full px-4': !multiselect, 'px-1': multiselect }\"\n >\n {{ option.value }}\n @if (showAll || i === 0) {\n <div\n (click)=\"onDeselectOption($event, option)\"\n class=\"ml-2 text-light-danger dark:text-dark-danger hover:cursor-pointer\"\n >\n <svg\n class=\"w-3 h-3\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M10 8.586l-2.293-2.293a1 1 0 00-1.414 1.414L8.586 10l-2.293 2.293a1 1 0 001.414 1.414L10 11.414l2.293 2.293a1 1 0 001.414-1.414L11.414 10l2.293-2.293a1 1 0 00-1.414-1.414L10 8.586z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </div>\n }\n </span>\n @if (!showAll && displayedSelectedOptions.length > 1) {\n <span\n class=\"text-light-on-control/80 dark:text-dark-on-control/80 text-xs/6\"\n >\n +{{ displayedSelectedOptions.length - 1 }}\n </span>\n }\n }\n }\n </div>\n } @else {\n <span\n class=\"text-light-on-control dark:text-dark-on-control overflow-hidden overflow-ellipsis\"\n [ngClass]=\"{\n 'text-light-on-control/60 dark:text-dark-on-control/60': disabled,\n 'text-light-on-primary dark:text-dark-on-primary':\n variant === 'primary' && !disabled,\n 'text-light-on-secondary dark:text-dark-on-secondary':\n variant === 'secondary' && !disabled,\n 'text-light-on-danger dark:text-dark-on-danger':\n variant === 'danger' && !disabled,\n }\"\n >{{ displayedSelectedOptions[0].value }}</span\n >\n }\n } @else {\n <span\n class=\"text-light-inactive dark:text-dark-inactive overflow-hidden overflow-ellipsis\"\n [ngClass]=\"{\n 'text-light-on-control/60 dark:text-dark-on-control/60': disabled,\n 'text-light-on-primary/80 dark:text-dark-on-primary/80':\n variant === 'primary' && !disabled,\n 'text-light-on-secondary/80 dark:text-dark-on-secondary/80':\n variant === 'secondary' && !disabled,\n 'text-light-on-danger/80 dark:text-dark-on-danger/80':\n variant === 'danger' && !disabled,\n }\"\n >\n @if (useIcon) {\n <ng-content select=\"buttonIcon\"></ng-content>\n } @else {\n {{ placeholder }}\n }\n </span>\n }\n </div>\n }\n <div\n class=\"text-light-on-control dark:text-dark-on-control\"\n [ngClass]=\"{\n 'text-light-on-control/60 dark:text-dark-on-control/60': disabled,\n 'text-light-on-primary/80 dark:text-dark-on-primary/80':\n variant === 'primary' && !disabled,\n 'text-light-on-secondary/80 dark:text-dark-on-secondary/80':\n variant === 'secondary' && !disabled,\n 'text-light-on-danger/80 dark:text-dark-on-danger/80':\n variant === 'danger' && !disabled,\n }\"\n >\n @if (isDropdownOpen()) {\n <svg\n class=\"w-4 h-4 ml-2 inline-block\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n } @else {\n <svg\n class=\"w-4 h-4 ml-2 inline-block\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 011.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n }\n </div>\n </div>\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
1240
1332
  }
1241
1333
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: SelectComponent, decorators: [{
1242
1334
  type: Component,
@@ -1247,7 +1339,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
1247
1339
  multi: true,
1248
1340
  },
1249
1341
  provideTranslocoScope('haloduck'),
1250
- ], template: "<div\n class=\"flex gap-2 items-center w-full\"\n [ngClass]=\"{ 'flex-col items-start': layout === 'vertical' }\"\n>\n <label\n #label\n class=\"block text-sm/6 font-medium text-light-on-control dark:text-dark-on-control {{\n labelWidth\n }}\"\n [ngClass]=\"{ 'w-full': layout === 'vertical' }\"\n >\n <!-- <ng-content select=\"[slot=label]\"></ng-content> -->\n <ng-content></ng-content>\n </label>\n\n @if (showAllItems) {\n <!-- Inline options display -->\n <div class=\"w-full flex-1\">\n @if (loading) {\n <div class=\"flex-1 flex items-center gap-2 w-full h-3\">\n <div class=\"animate-pulse bg-light-inactive dark:bg-dark-inactive rounded-md h-5 w-full\">\n &nbsp;\n </div>\n </div>\n } @else {\n <div class=\"flex flex-col gap-2\">\n @for (option of options; track option.id || option.value) {\n <label\n class=\"flex items-center gap-2 text-sm/6 text-light-on-control dark:text-dark-on-control cursor-pointer\"\n [ngClass]=\"{\n 'opacity-60 cursor-not-allowed': disabled,\n }\"\n >\n @if (multiselect) {\n <!-- Checkbox for multiselect -->\n <input\n type=\"checkbox\"\n [checked]=\"isOptionSelected(option)\"\n [disabled]=\"disabled\"\n (click)=\"!disabled && onToggleOption(option)\"\n class=\"appearance-none w-5 h-5 rounded bg-light-control dark:bg-dark-control border-2 border-light-inactive dark:border-dark-inactive cursor-pointer disabled:cursor-not-allowed checked:bg-light-primary checked:dark:bg-dark-primary checked:border-light-primary checked:dark:border-dark-primary relative before:content-[''] before:absolute before:inset-0 before:bg-[url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOSIgdmlld0JveD0iMCAwIDEyIDkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEgNEw0LjUgNy41TDExIDEiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+')] before:bg-center before:bg-no-repeat before:opacity-0 checked:before:opacity-100\"\n />\n } @else {\n <!-- Radio button for single select -->\n <input\n type=\"radio\"\n [checked]=\"isOptionSelected(option)\"\n [disabled]=\"disabled\"\n (click)=\"!disabled && onToggleOption(option)\"\n name=\"radio-group\"\n class=\"appearance-none w-5 h-5 rounded-full bg-light-control dark:bg-dark-control border-2 border-light-inactive dark:border-dark-inactive cursor-pointer disabled:cursor-not-allowed checked:bg-light-primary checked:dark:bg-dark-primary checked:border-light-primary checked:dark:border-dark-primary relative before:content-[''] before:absolute before:inset-[4px] before:rounded-full before:bg-light-on-primary before:dark:bg-dark-on-primary before:opacity-0 checked:before:opacity-100\"\n />\n }\n @if (\n option.shouldManualInput &&\n (isOptionSelected(option) || activeManualKey === (option.id || option.value))\n ) {\n <input\n type=\"text\"\n [(ngModel)]=\"manualInputValues[option.id || option.value]\"\n [attr.data-manual-key]=\"option.id || option.value\"\n (ngModelChange)=\"onManualInputChange(option, $event)\"\n (compositionstart)=\"onCompositionStart()\"\n (compositionend)=\"onCompositionEnd(option, $event)\"\n (click)=\"$event.stopPropagation()\"\n (blur)=\"onManualInputBlur(option)\"\n (keydown.enter)=\"$event.preventDefault(); onManualInputBlur(option)\"\n [disabled]=\"!!disabled\"\n class=\"flex-1 text-light-on-control dark:text-dark-on-control rounded-md outline -outline-offset-1 outline-light-inactive dark:outline-dark-inactive focus:outline-2 focus:outline-offset-2 focus:outline-light-primary dark:focus:outline-dark-primary px-2 py-1 text-sm/6 bg-light-control dark:bg-dark-control\"\n />\n } @else {\n <span (click)=\"!disabled && onToggleOption(option)\">{{ option.value }}</span>\n }\n </label>\n }\n </div>\n }\n </div>\n } @else {\n <!-- Original dropdown display -->\n <div\n #origin\n class=\"w-full flex-1 relative overflow-visible rounded-md outline outline-light-inactive dark:outline-dark-inactive text-sm/6\"\n [ngClass]=\"{\n 'bg-light-control dark:bg-dark-control focus:outline-2 focus:outline-offset-2 focus:outline-light-primary focus:dark:outline-dark-primary':\n !disabled,\n 'bg-light-primary dark:bg-dark-primary text-light-on-primary dark:text-dark-on-primary':\n variant === 'primary' && !disabled,\n 'bg-light-secondary dark:bg-dark-secondary text-light-on-secondary dark:text-dark-on-secondary':\n variant === 'secondary' && !disabled,\n 'bg-light-danger dark:bg-dark-danger text-light-on-danger dark:text-dark-on-danger':\n variant === 'danger' && !disabled,\n 'bg-light-control/60 dark:bg-dark-control/60 text-light-on-control/60 dark:text-dark-on-control/60':\n disabled,\n }\"\n [tabindex]=\"disabled ? -1 : 0\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeyDown($event)\"\n >\n <div\n class=\"px-3 py-1.5 text-sm/6 cursor-pointer flex flex-nowrap items-center justify-between overflow-hidden\"\n >\n @if (loading) {\n <div class=\"flex-1 flex items-center gap-2 w-full h-3\">\n <div\n class=\"animate-pulse bg-light-inactive dark:bg-dark-inactive rounded-md h-5 w-full\"\n >\n &nbsp;\n </div>\n </div>\n } @else {\n <div class=\"flex-1\">\n @if (!asButton && displayedSelectedOptions && displayedSelectedOptions.length > 0) {\n @if (multiselect) {\n <div class=\"flex flex-wrap gap-x-2 gap-y-1 items-start\">\n @for (option of displayedSelectedOptions; track option; let i = $index) {\n @if (showAll || i === 0) {\n <span\n class=\"bg-light-secondary dark:bg-dark-secondary rounded-md flex items-center text-xs/6 text-light-on-secondary dark:text-dark-on-secondary\"\n [ngClass]=\"{ 'w-full h-full px-4': !multiselect, 'px-1': multiselect }\"\n >\n {{ option.value }}\n @if (showAll || i === 0) {\n <div\n (click)=\"onDeselectOption($event, option)\"\n class=\"ml-2 text-light-danger dark:text-dark-danger hover:cursor-pointer\"\n >\n <svg\n class=\"w-3 h-3\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M10 8.586l-2.293-2.293a1 1 0 00-1.414 1.414L8.586 10l-2.293 2.293a1 1 0 001.414 1.414L10 11.414l2.293 2.293a1 1 0 001.414-1.414L11.414 10l2.293-2.293a1 1 0 00-1.414-1.414L10 8.586z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </div>\n }\n </span>\n @if (!showAll && displayedSelectedOptions.length > 1) {\n <span\n class=\"text-light-on-control/80 dark:text-dark-on-control/80 text-xs/6\"\n >\n +{{ displayedSelectedOptions.length - 1 }}\n </span>\n }\n }\n }\n </div>\n } @else {\n <span\n class=\"text-light-on-control dark:text-dark-on-control overflow-hidden overflow-ellipsis\"\n [ngClass]=\"{\n 'text-light-on-control/60 dark:text-dark-on-control/60': disabled,\n 'text-light-on-primary dark:text-dark-on-primary':\n variant === 'primary' && !disabled,\n 'text-light-on-secondary dark:text-dark-on-secondary':\n variant === 'secondary' && !disabled,\n 'text-light-on-danger dark:text-dark-on-danger':\n variant === 'danger' && !disabled,\n }\"\n >{{ displayedSelectedOptions[0].value }}</span\n >\n }\n } @else {\n <span\n class=\"text-light-inactive dark:text-dark-inactive overflow-hidden overflow-ellipsis\"\n [ngClass]=\"{\n 'text-light-on-control/60 dark:text-dark-on-control/60': disabled,\n 'text-light-on-primary/80 dark:text-dark-on-primary/80':\n variant === 'primary' && !disabled,\n 'text-light-on-secondary/80 dark:text-dark-on-secondary/80':\n variant === 'secondary' && !disabled,\n 'text-light-on-danger/80 dark:text-dark-on-danger/80':\n variant === 'danger' && !disabled,\n }\"\n >\n @if (useIcon) {\n <ng-content select=\"buttonIcon\"></ng-content>\n } @else {\n {{ placeholder }}\n }\n </span>\n }\n </div>\n }\n <div\n class=\"text-light-on-control dark:text-dark-on-control\"\n [ngClass]=\"{\n 'text-light-on-control/60 dark:text-dark-on-control/60': disabled,\n 'text-light-on-primary/80 dark:text-dark-on-primary/80':\n variant === 'primary' && !disabled,\n 'text-light-on-secondary/80 dark:text-dark-on-secondary/80':\n variant === 'secondary' && !disabled,\n 'text-light-on-danger/80 dark:text-dark-on-danger/80':\n variant === 'danger' && !disabled,\n }\"\n >\n @if (isDropdownOpen()) {\n <svg\n class=\"w-4 h-4 ml-2 inline-block\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n } @else {\n <svg\n class=\"w-4 h-4 ml-2 inline-block\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 011.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n }\n </div>\n </div>\n </div>\n }\n</div>\n" }]
1342
+ ], template: "<div\n class=\"flex gap-2 items-center w-full\"\n [ngClass]=\"{ 'flex-col items-start': layout === 'vertical' }\"\n>\n <label\n #label\n class=\"block text-sm/6 font-medium text-light-on-control dark:text-dark-on-control {{\n labelWidth\n }}\"\n [ngClass]=\"{ 'w-full': layout === 'vertical' }\"\n >\n <!-- <ng-content select=\"[slot=label]\"></ng-content> -->\n <ng-content></ng-content>\n </label>\n\n @if (showAllItems) {\n <!-- Inline options display -->\n <div class=\"w-full flex-1\">\n @if (loading) {\n <div class=\"flex-1 flex items-center gap-2 w-full h-3\">\n <div class=\"animate-pulse bg-light-inactive dark:bg-dark-inactive rounded-md h-5 w-full\">\n &nbsp;\n </div>\n </div>\n } @else {\n <div class=\"flex flex-col gap-2\">\n @for (option of options; track option.id || option.value) {\n <label\n class=\"flex items-center gap-2 text-sm/6 text-light-on-control dark:text-dark-on-control cursor-pointer\"\n [ngClass]=\"{\n 'opacity-60 cursor-not-allowed': disabled,\n }\"\n (click)=\"$event.preventDefault()\"\n >\n @if (multiselect) {\n <!-- Checkbox for multiselect -->\n <input\n type=\"checkbox\"\n [checked]=\"isOptionSelected(option)\"\n [disabled]=\"disabled\"\n (click)=\"!disabled && onToggleOption(option)\"\n class=\"appearance-none w-5 h-5 rounded bg-light-control dark:bg-dark-control border-2 border-light-inactive dark:border-dark-inactive cursor-pointer disabled:cursor-not-allowed checked:bg-light-primary checked:dark:bg-dark-primary checked:border-light-primary checked:dark:border-dark-primary relative before:content-[''] before:absolute before:inset-0 before:bg-[url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOSIgdmlld0JveD0iMCAwIDEyIDkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEgNEw0LjUgNy41TDExIDEiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+')] before:bg-center before:bg-no-repeat before:opacity-0 checked:before:opacity-100\"\n />\n } @else {\n <!-- Radio button for single select -->\n <input\n type=\"radio\"\n [checked]=\"isOptionSelected(option)\"\n [disabled]=\"disabled\"\n (click)=\"!disabled && onToggleOption(option)\"\n name=\"radio-group\"\n class=\"appearance-none w-5 h-5 rounded-full bg-light-control dark:bg-dark-control border-2 border-light-inactive dark:border-dark-inactive cursor-pointer disabled:cursor-not-allowed checked:bg-light-primary checked:dark:bg-dark-primary checked:border-light-primary checked:dark:border-dark-primary relative before:content-[''] before:absolute before:inset-[4px] before:rounded-full before:bg-light-on-primary before:dark:bg-dark-on-primary before:opacity-0 checked:before:opacity-100\"\n />\n }\n @if (\n option.shouldManualInput &&\n (isOptionSelected(option) || activeManualKey === (option.id || option.value))\n ) {\n <input\n type=\"text\"\n [(ngModel)]=\"manualInputValues[option.id || option.value]\"\n [attr.data-manual-key]=\"option.id || option.value\"\n (ngModelChange)=\"onManualInputChange(option, $event)\"\n (compositionstart)=\"onCompositionStart()\"\n (compositionend)=\"onCompositionEnd(option, $event)\"\n (click)=\"$event.stopPropagation()\"\n (blur)=\"onManualInputBlur(option)\"\n (keydown)=\"onManualInputKeydown(option, $event)\"\n [disabled]=\"!!disabled\"\n class=\"flex-1 text-light-on-control dark:text-dark-on-control rounded-md outline -outline-offset-1 outline-light-inactive dark:outline-dark-inactive focus:outline-2 focus:outline-offset-2 focus:outline-light-primary dark:focus:outline-dark-primary px-2 py-1 text-sm/6 bg-light-control dark:bg-dark-control\"\n />\n } @else {\n <span (click)=\"!disabled && onToggleOption(option)\">{{ option.value }}</span>\n }\n </label>\n }\n </div>\n }\n </div>\n } @else {\n <!-- Original dropdown display -->\n <div\n #origin\n class=\"w-full flex-1 relative overflow-visible rounded-md outline outline-light-inactive dark:outline-dark-inactive text-sm/6\"\n [ngClass]=\"{\n 'bg-light-control dark:bg-dark-control focus:outline-2 focus:outline-offset-2 focus:outline-light-primary focus:dark:outline-dark-primary':\n !disabled,\n 'bg-light-primary dark:bg-dark-primary text-light-on-primary dark:text-dark-on-primary':\n variant === 'primary' && !disabled,\n 'bg-light-secondary dark:bg-dark-secondary text-light-on-secondary dark:text-dark-on-secondary':\n variant === 'secondary' && !disabled,\n 'bg-light-danger dark:bg-dark-danger text-light-on-danger dark:text-dark-on-danger':\n variant === 'danger' && !disabled,\n 'bg-light-control/60 dark:bg-dark-control/60 text-light-on-control/60 dark:text-dark-on-control/60':\n disabled,\n }\"\n [tabindex]=\"disabled ? -1 : 0\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeyDown($event)\"\n >\n <div\n class=\"px-3 py-1.5 text-sm/6 cursor-pointer flex flex-nowrap items-center justify-between overflow-hidden\"\n >\n @if (loading) {\n <div class=\"flex-1 flex items-center gap-2 w-full h-3\">\n <div\n class=\"animate-pulse bg-light-inactive dark:bg-dark-inactive rounded-md h-5 w-full\"\n >\n &nbsp;\n </div>\n </div>\n } @else {\n <div class=\"flex-1\">\n @if (!asButton && displayedSelectedOptions && displayedSelectedOptions.length > 0) {\n @if (multiselect) {\n <div class=\"flex flex-wrap gap-x-2 gap-y-1 items-start\">\n @for (option of displayedSelectedOptions; track option; let i = $index) {\n @if (showAll || i === 0) {\n <span\n class=\"bg-light-secondary dark:bg-dark-secondary rounded-md flex items-center text-xs/6 text-light-on-secondary dark:text-dark-on-secondary\"\n [ngClass]=\"{ 'w-full h-full px-4': !multiselect, 'px-1': multiselect }\"\n >\n {{ option.value }}\n @if (showAll || i === 0) {\n <div\n (click)=\"onDeselectOption($event, option)\"\n class=\"ml-2 text-light-danger dark:text-dark-danger hover:cursor-pointer\"\n >\n <svg\n class=\"w-3 h-3\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M10 8.586l-2.293-2.293a1 1 0 00-1.414 1.414L8.586 10l-2.293 2.293a1 1 0 001.414 1.414L10 11.414l2.293 2.293a1 1 0 001.414-1.414L11.414 10l2.293-2.293a1 1 0 00-1.414-1.414L10 8.586z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </div>\n }\n </span>\n @if (!showAll && displayedSelectedOptions.length > 1) {\n <span\n class=\"text-light-on-control/80 dark:text-dark-on-control/80 text-xs/6\"\n >\n +{{ displayedSelectedOptions.length - 1 }}\n </span>\n }\n }\n }\n </div>\n } @else {\n <span\n class=\"text-light-on-control dark:text-dark-on-control overflow-hidden overflow-ellipsis\"\n [ngClass]=\"{\n 'text-light-on-control/60 dark:text-dark-on-control/60': disabled,\n 'text-light-on-primary dark:text-dark-on-primary':\n variant === 'primary' && !disabled,\n 'text-light-on-secondary dark:text-dark-on-secondary':\n variant === 'secondary' && !disabled,\n 'text-light-on-danger dark:text-dark-on-danger':\n variant === 'danger' && !disabled,\n }\"\n >{{ displayedSelectedOptions[0].value }}</span\n >\n }\n } @else {\n <span\n class=\"text-light-inactive dark:text-dark-inactive overflow-hidden overflow-ellipsis\"\n [ngClass]=\"{\n 'text-light-on-control/60 dark:text-dark-on-control/60': disabled,\n 'text-light-on-primary/80 dark:text-dark-on-primary/80':\n variant === 'primary' && !disabled,\n 'text-light-on-secondary/80 dark:text-dark-on-secondary/80':\n variant === 'secondary' && !disabled,\n 'text-light-on-danger/80 dark:text-dark-on-danger/80':\n variant === 'danger' && !disabled,\n }\"\n >\n @if (useIcon) {\n <ng-content select=\"buttonIcon\"></ng-content>\n } @else {\n {{ placeholder }}\n }\n </span>\n }\n </div>\n }\n <div\n class=\"text-light-on-control dark:text-dark-on-control\"\n [ngClass]=\"{\n 'text-light-on-control/60 dark:text-dark-on-control/60': disabled,\n 'text-light-on-primary/80 dark:text-dark-on-primary/80':\n variant === 'primary' && !disabled,\n 'text-light-on-secondary/80 dark:text-dark-on-secondary/80':\n variant === 'secondary' && !disabled,\n 'text-light-on-danger/80 dark:text-dark-on-danger/80':\n variant === 'danger' && !disabled,\n }\"\n >\n @if (isDropdownOpen()) {\n <svg\n class=\"w-4 h-4 ml-2 inline-block\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n } @else {\n <svg\n class=\"w-4 h-4 ml-2 inline-block\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 011.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n }\n </div>\n </div>\n </div>\n }\n</div>\n" }]
1251
1343
  }], ctorParameters: () => [], propDecorators: { selectedChange: [{
1252
1344
  type: Output
1253
1345
  }], disabled: [{