@ucme-ui/angular 0.8.2 → 0.9.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.
@@ -2901,6 +2901,9 @@ var HuDialog = class HuDialog {
2901
2901
  onCancel(event) {
2902
2902
  if (!this.closeOnEsc()) event.preventDefault();
2903
2903
  }
2904
+ onMouseDown(event) {
2905
+ this.pointerDownOnBackdrop = event.target === this.dialogRef().nativeElement;
2906
+ }
2904
2907
  onClick(event) {
2905
2908
  if (this.closeOnBackdrop() && this.pointerDownOnBackdrop && event.target === this.dialogRef().nativeElement) this.close();
2906
2909
  this.pointerDownOnBackdrop = false;
@@ -2984,7 +2987,7 @@ var HuDialog = class HuDialog {
2984
2987
  [attr.aria-labelledby]="titleId"
2985
2988
  (close)="onNativeClose()"
2986
2989
  (cancel)="onCancel($event)"
2987
- (mousedown)="pointerDownOnBackdrop = $event.target === dialog"
2990
+ (mousedown)="onMouseDown($event)"
2988
2991
  (click)="onClick($event)"
2989
2992
  >
2990
2993
  <div class="hu-dialog__panel">
@@ -3039,7 +3042,7 @@ i0.ɵɵngDeclareClassMetadata({
3039
3042
  [attr.aria-labelledby]="titleId"
3040
3043
  (close)="onNativeClose()"
3041
3044
  (cancel)="onCancel($event)"
3042
- (mousedown)="pointerDownOnBackdrop = $event.target === dialog"
3045
+ (mousedown)="onMouseDown($event)"
3043
3046
  (click)="onClick($event)"
3044
3047
  >
3045
3048
  <div class="hu-dialog__panel">
@@ -7622,7 +7625,7 @@ var HuMultiSelect = class HuMultiSelect {
7622
7625
  ],
7623
7626
  ngImport: i0,
7624
7627
  template: "<div\r\n #trigger\r\n class=\"hu-multi-select__trigger\"\r\n role=\"combobox\"\r\n aria-haspopup=\"listbox\"\r\n [id]=\"id()\"\r\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\r\n [attr.aria-expanded]=\"open()\"\r\n [attr.aria-controls]=\"listId\"\r\n [attr.aria-disabled]=\"isDisabled() || null\"\r\n [attr.aria-invalid]=\"isInvalid() || null\"\r\n [attr.aria-describedby]=\"field?.describedBy() ?? null\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n [class.hu-multi-select__trigger--invalid]=\"isInvalid()\"\r\n (click)=\"toggle()\"\r\n (keydown)=\"onTriggerKeydown($event)\"\r\n>\r\n <div class=\"hu-multi-select__values\">\r\n @if (!selectedOptions().length) {\r\n <span class=\"hu-multi-select__placeholder\">{{ placeholder() }}</span>\r\n } @else if (showChips()) {\r\n @for (o of selectedOptions(); track o.value) {\r\n <span class=\"hu-multi-select__chip\">\r\n {{ o.label }}\r\n @if (!isDisabled()) {\r\n <button\r\n type=\"button\"\r\n class=\"hu-multi-select__chip-remove\"\r\n tabindex=\"-1\"\r\n [attr.aria-label]=\"o.label + ' kaldır'\"\r\n (click)=\"remove(o, $event)\"\r\n >\r\n <hu-icon name=\"x\" [size]=\"12\" />\r\n </button>\r\n }\r\n </span>\r\n }\r\n } @else {\r\n <span class=\"hu-multi-select__text\">{{ summary() }}</span>\r\n }\r\n </div>\r\n @if (showClear() && selectedOptions().length && !isDisabled()) {\r\n <button type=\"button\" class=\"hu-multi-select__icon-btn\" tabindex=\"-1\" aria-label=\"Seçimi temizle\" (click)=\"clearAll($event)\">\r\n <hu-icon name=\"x\" [size]=\"14\" />\r\n </button>\r\n }\r\n <hu-icon class=\"hu-multi-select__caret\" name=\"chevron-down\" [size]=\"16\" />\r\n</div>\r\n\r\n<div\r\n #panel\r\n popover=\"manual\"\r\n class=\"hu-multi-select__panel\"\r\n [class.hu-multi-select__panel--inline]=\"!supportsPopover\"\r\n [attr.hidden]=\"!supportsPopover && !open() ? '' : null\"\r\n (keydown)=\"onPanelKeydown($event)\"\r\n>\r\n @if (open()) {\r\n @if (filter() || showSelectAll()) {\r\n <div class=\"hu-multi-select__header\">\r\n @if (showSelectAll() && selectionLimit() == null) {\r\n <button\r\n type=\"button\"\r\n class=\"hu-multi-select__all\"\r\n tabindex=\"-1\"\r\n [attr.aria-label]=\"allSelected() ? 'Seçimi kaldır' : 'Tümünü seç'\"\r\n [disabled]=\"!selectable().length\"\r\n (click)=\"toggleAll()\"\r\n >\r\n <span\r\n class=\"hu-multi-select__box\"\r\n [class.hu-multi-select__box--checked]=\"allSelected()\"\r\n [class.hu-multi-select__box--partial]=\"someSelected()\"\r\n aria-hidden=\"true\"\r\n >\r\n @if (allSelected()) {\r\n <hu-icon name=\"check\" [size]=\"12\" />\r\n } @else if (someSelected()) {\r\n <hu-icon name=\"minus\" [size]=\"12\" />\r\n }\r\n </span>\r\n </button>\r\n }\r\n @if (filter()) {\r\n <div class=\"hu-multi-select__search\">\r\n <hu-icon name=\"search\" [size]=\"14\" />\r\n <input\r\n #search\r\n type=\"text\"\r\n class=\"hu-input\"\r\n data-size=\"sm\"\r\n role=\"searchbox\"\r\n autocomplete=\"off\"\r\n [attr.aria-label]=\"filterPlaceholder()\"\r\n [attr.aria-controls]=\"listId\"\r\n [attr.aria-activedescendant]=\"activeIndex() >= 0 ? optionId(activeIndex()) : null\"\r\n [placeholder]=\"filterPlaceholder()\"\r\n [value]=\"query()\"\r\n (input)=\"onQuery($any($event.target).value)\"\r\n />\r\n </div>\r\n } @else if (showSelectAll() && selectionLimit() == null) {\r\n <span class=\"hu-multi-select__all-label\" (click)=\"toggleAll()\">Tümünü seç</span>\r\n }\r\n </div>\r\n }\r\n\r\n <ul\r\n #listbox\r\n class=\"hu-multi-select__list\"\r\n role=\"listbox\"\r\n aria-multiselectable=\"true\"\r\n [id]=\"listId\"\r\n [attr.tabindex]=\"filter() ? -1 : 0\"\r\n [attr.aria-label]=\"ariaLabel() || placeholder()\"\r\n [attr.aria-activedescendant]=\"!filter() && activeIndex() >= 0 ? optionId(activeIndex()) : null\"\r\n >\r\n @for (row of rows(); track $index) {\r\n @if (row.kind === 'group') {\r\n <li class=\"hu-multi-select__group\" role=\"presentation\">{{ row.label }}</li>\r\n } @else {\r\n @let o = row.option;\r\n @let selected = isSelected(o);\r\n @let blocked = !selected && limitReached();\r\n <li\r\n class=\"hu-multi-select__option\"\r\n role=\"option\"\r\n [id]=\"optionId(row.index)\"\r\n [attr.aria-selected]=\"selected\"\r\n [attr.aria-disabled]=\"o.disabled || blocked || null\"\r\n [class.hu-multi-select__option--active]=\"row.index === activeIndex()\"\r\n [class.hu-multi-select__option--disabled]=\"o.disabled || blocked\"\r\n (mousedown)=\"$event.preventDefault()\"\r\n (mousemove)=\"!o.disabled && activeIndex() !== row.index && activeIndex.set(row.index)\"\r\n (click)=\"toggleOption(o)\"\r\n >\r\n <span class=\"hu-multi-select__box\" [class.hu-multi-select__box--checked]=\"selected\" aria-hidden=\"true\">\r\n @if (selected) {\r\n <hu-icon name=\"check\" [size]=\"12\" />\r\n }\r\n </span>\r\n @if (o.icon) {\r\n <hu-icon class=\"hu-multi-select__option-icon\" [name]=\"o.icon\" [size]=\"16\" />\r\n }\r\n <span class=\"hu-multi-select__option-text\">\r\n <span>{{ o.label }}</span>\r\n @if (o.description) {\r\n <span class=\"hu-multi-select__option-desc\">{{ o.description }}</span>\r\n }\r\n </span>\r\n </li>\r\n }\r\n } @empty {\r\n <li class=\"hu-multi-select__empty\" role=\"presentation\">{{ emptyMessage() }}</li>\r\n }\r\n </ul>\r\n\r\n @if (selectionLimit() != null || values().length) {\r\n <div class=\"hu-multi-select__footer\" aria-live=\"polite\">\r\n {{ values().length }}{{ selectionLimit() != null ? ' / ' + selectionLimit() : '' }} seçildi\r\n @if (limitReached()) {\r\n · sınıra ulaşıldı\r\n }\r\n </div>\r\n }\r\n }\r\n</div>\r\n",
7625
- styles: [".hu-multi-select{position:relative;display:block;width:100%;min-width:0}.hu-multi-select__trigger{display:flex;align-items:center;gap:var(--hu-space-1);min-height:var(--hu-control-md);padding:3px var(--hu-space-2) 3px var(--hu-space-3);font-size:var(--hu-text-sm);color:var(--hu-text);background:var(--hu-surface);border:1px solid var(--hu-border-strong);border-radius:var(--hu-radius-md);box-shadow:var(--hu-shadow-sm);cursor:pointer;transition:border-color var(--hu-transition),box-shadow var(--hu-transition)}.hu-multi-select__trigger:hover:not([aria-disabled=true]):not(:focus){border-color:var(--hu-gray-400)}.hu-multi-select__trigger:focus,.hu-multi-select--open .hu-multi-select__trigger{outline:none;border-color:var(--hu-primary);box-shadow:var(--hu-ring)}.hu-multi-select__trigger--invalid,.hu-multi-select__trigger--invalid:hover:not(:focus){border-color:var(--hu-danger)}.hu-multi-select__trigger--invalid:focus{box-shadow:var(--hu-ring-danger)}.hu-multi-select--disabled .hu-multi-select__trigger{color:var(--hu-text-subtle);background:var(--hu-surface-3);box-shadow:none;cursor:not-allowed}[data-size=sm] .hu-multi-select__trigger{min-height:var(--hu-control-sm);padding-left:var(--hu-space-2);font-size:.8125rem}[data-size=lg] .hu-multi-select__trigger{min-height:var(--hu-control-lg);padding-left:var(--hu-space-4);font-size:var(--hu-text-md)}.hu-multi-select__values{display:flex;flex:1;flex-wrap:wrap;align-items:center;gap:4px;min-width:0}.hu-multi-select__placeholder{color:var(--hu-text-subtle)}.hu-multi-select__text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hu-multi-select__chip{display:inline-flex;align-items:center;gap:2px;max-width:100%;height:1.5rem;padding:0 2px 0 var(--hu-space-2);overflow:hidden;font-size:var(--hu-text-xs);font-weight:500;color:var(--hu-primary-soft-fg);white-space:nowrap;text-overflow:ellipsis;background:var(--hu-primary-soft);border-radius:var(--hu-radius-sm)}.hu-multi-select__chip-remove,.hu-multi-select__icon-btn{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:0;color:inherit;background:none;border:0;border-radius:var(--hu-radius-sm);cursor:pointer;opacity:.7}.hu-multi-select__chip-remove:hover:not(:disabled),.hu-multi-select__icon-btn:hover:not(:disabled){opacity:1;background:#00000014}.hu-multi-select__chip-remove{width:1.125rem;height:1.125rem}.hu-multi-select__icon-btn{width:1.5rem;height:1.5rem;color:var(--hu-text-subtle)}.hu-multi-select__caret{flex-shrink:0;color:var(--hu-text-subtle);transition:transform var(--hu-transition)}.hu-multi-select--open .hu-multi-select__caret{transform:rotate(180deg)}.hu-multi-select__panel{position:fixed;inset:auto;flex-direction:column;min-width:14rem;max-width:calc(100vw - 1rem);margin:0;padding:0;overflow:hidden;color:var(--hu-text);background:var(--hu-surface);border:1px solid var(--hu-border);border-radius:var(--hu-radius-lg);box-shadow:var(--hu-shadow-lg)}.hu-multi-select__panel:popover-open{display:flex;animation:hu-multi-select-in .12s ease-out}.hu-multi-select__panel--inline{position:absolute;top:calc(100% + 4px);left:0;z-index:1000;display:flex;width:100%}.hu-multi-select__panel--inline[hidden]{display:none}.hu-multi-select__header{display:flex;align-items:center;gap:var(--hu-space-2);padding:var(--hu-space-2) var(--hu-space-3);border-bottom:1px solid var(--hu-border)}.hu-multi-select__all{display:inline-flex;padding:2px;background:none;border:0;border-radius:var(--hu-radius-sm);cursor:pointer}.hu-multi-select__all:disabled{opacity:.5;cursor:not-allowed}.hu-multi-select__all-label{font-size:var(--hu-text-sm);cursor:pointer}.hu-multi-select__search{position:relative;display:flex;flex:1;align-items:center;min-width:0}.hu-multi-select__search>hu-icon{position:absolute;left:var(--hu-space-2);color:var(--hu-text-subtle);pointer-events:none}.hu-multi-select__search>.hu-input{padding-left:1.75rem;box-shadow:none}.hu-multi-select__list{max-height:var(--hu-multi-select-max-height, 16rem);margin:0;padding:var(--hu-space-1);overflow-y:auto;list-style:none;outline:none}.hu-multi-select__group{padding:var(--hu-space-2) var(--hu-space-2) var(--hu-space-1);font-size:var(--hu-text-xs);font-weight:600;color:var(--hu-text-subtle)}.hu-multi-select__option{display:flex;align-items:flex-start;gap:var(--hu-space-2);padding:var(--hu-space-2);font-size:var(--hu-text-sm);line-height:1.35;border-radius:var(--hu-radius-sm);cursor:pointer;-webkit-user-select:none;user-select:none}.hu-multi-select__option--active{background:var(--hu-surface-3)}.hu-multi-select__option[aria-selected=true]{font-weight:500}.hu-multi-select__option--disabled{opacity:.5;cursor:not-allowed}.hu-multi-select__option-icon{color:var(--hu-text-subtle)}.hu-multi-select__option-text{display:flex;flex-direction:column;min-width:0}.hu-multi-select__option-desc{font-size:var(--hu-text-xs);font-weight:400;color:var(--hu-text-subtle)}.hu-multi-select__box{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:1rem;height:1rem;margin-top:1px;color:var(--hu-primary-fg);background:var(--hu-surface);border:1.5px solid var(--hu-border-strong);border-radius:4px;transition:background-color var(--hu-transition),border-color var(--hu-transition)}.hu-multi-select__box--checked,.hu-multi-select__box--partial{background:var(--hu-primary);border-color:var(--hu-primary)}.hu-multi-select__empty{padding:var(--hu-space-4) var(--hu-space-2);font-size:var(--hu-text-sm);color:var(--hu-text-subtle);text-align:center}.hu-multi-select__footer{padding:var(--hu-space-2) var(--hu-space-3);font-size:var(--hu-text-xs);color:var(--hu-text-muted);border-top:1px solid var(--hu-border)}@keyframes hu-multi-select-in{0%{opacity:0;transform:translateY(-4px)}}\n"],
7628
+ styles: [".hu-multi-select{position:relative;display:block;width:100%;min-width:0}.hu-multi-select__trigger{display:flex;align-items:center;gap:var(--hu-space-1);min-height:var(--hu-control-md);padding:3px var(--hu-space-2) 3px var(--hu-space-3);font-size:var(--hu-text-sm);color:var(--hu-text);background:var(--hu-surface);border:1px solid var(--hu-border-strong);border-radius:var(--hu-radius-md);box-shadow:var(--hu-shadow-sm);cursor:pointer;transition:border-color var(--hu-transition),box-shadow var(--hu-transition)}.hu-multi-select__trigger:hover:not([aria-disabled=true]):not(:focus){border-color:var(--hu-gray-400)}.hu-multi-select__trigger:focus,.hu-multi-select--open .hu-multi-select__trigger{outline:none;border-color:var(--hu-primary);box-shadow:var(--hu-ring);transition:none}.hu-multi-select__trigger--invalid,.hu-multi-select__trigger--invalid:hover:not(:focus){border-color:var(--hu-danger)}.hu-multi-select__trigger--invalid:focus{box-shadow:var(--hu-ring-danger)}.hu-multi-select--disabled .hu-multi-select__trigger{color:var(--hu-text-subtle);background:var(--hu-surface-3);box-shadow:none;cursor:not-allowed}[data-size=sm] .hu-multi-select__trigger{min-height:var(--hu-control-sm);padding-left:var(--hu-space-2);font-size:.8125rem}[data-size=lg] .hu-multi-select__trigger{min-height:var(--hu-control-lg);padding-left:var(--hu-space-4);font-size:var(--hu-text-md)}.hu-multi-select__values{display:flex;flex:1;flex-wrap:wrap;align-items:center;gap:4px;min-width:0}.hu-multi-select__placeholder{color:var(--hu-text-subtle)}.hu-multi-select__text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hu-multi-select__chip{display:inline-flex;align-items:center;gap:2px;max-width:100%;height:1.5rem;padding:0 2px 0 var(--hu-space-2);overflow:hidden;font-size:var(--hu-text-xs);font-weight:500;color:var(--hu-primary-soft-fg);white-space:nowrap;text-overflow:ellipsis;background:var(--hu-primary-soft);border-radius:var(--hu-radius-sm)}.hu-multi-select__chip-remove,.hu-multi-select__icon-btn{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:0;color:inherit;background:none;border:0;border-radius:var(--hu-radius-sm);cursor:pointer;opacity:.7}.hu-multi-select__chip-remove:hover:not(:disabled),.hu-multi-select__icon-btn:hover:not(:disabled){opacity:1;background:#00000014}.hu-multi-select__chip-remove{width:1.125rem;height:1.125rem}.hu-multi-select__icon-btn{width:1.5rem;height:1.5rem;color:var(--hu-text-subtle)}.hu-multi-select__caret{flex-shrink:0;color:var(--hu-text-subtle);transition:transform var(--hu-transition)}.hu-multi-select--open .hu-multi-select__caret{transform:rotate(180deg)}.hu-multi-select__panel{position:fixed;inset:auto;flex-direction:column;min-width:14rem;max-width:calc(100vw - 1rem);margin:0;padding:0;overflow:hidden;color:var(--hu-text);background:var(--hu-surface);border:1px solid var(--hu-border);border-radius:var(--hu-radius-lg);box-shadow:var(--hu-shadow-lg)}.hu-multi-select__panel:popover-open{display:flex;animation:hu-multi-select-in .12s ease-out}.hu-multi-select__panel--inline{position:absolute;top:calc(100% + 4px);left:0;z-index:1000;display:flex;width:100%}.hu-multi-select__panel--inline[hidden]{display:none}.hu-multi-select__header{display:flex;align-items:center;gap:var(--hu-space-2);padding:var(--hu-space-2) var(--hu-space-3);border-bottom:1px solid var(--hu-border)}.hu-multi-select__all{display:inline-flex;padding:2px;background:none;border:0;border-radius:var(--hu-radius-sm);cursor:pointer}.hu-multi-select__all:disabled{opacity:.5;cursor:not-allowed}.hu-multi-select__all-label{font-size:var(--hu-text-sm);cursor:pointer}.hu-multi-select__search{position:relative;display:flex;flex:1;align-items:center;min-width:0}.hu-multi-select__search>hu-icon{position:absolute;left:var(--hu-space-2);color:var(--hu-text-subtle);pointer-events:none}.hu-multi-select__search>.hu-input{padding-left:1.75rem;box-shadow:none}.hu-multi-select__list{max-height:var(--hu-multi-select-max-height, 16rem);margin:0;padding:var(--hu-space-1);overflow-y:auto;list-style:none;outline:none}.hu-multi-select__group{padding:var(--hu-space-2) var(--hu-space-2) var(--hu-space-1);font-size:var(--hu-text-xs);font-weight:600;color:var(--hu-text-subtle)}.hu-multi-select__option{display:flex;align-items:flex-start;gap:var(--hu-space-2);padding:var(--hu-space-2);font-size:var(--hu-text-sm);line-height:1.35;border-radius:var(--hu-radius-sm);cursor:pointer;-webkit-user-select:none;user-select:none}.hu-multi-select__option--active{background:var(--hu-surface-3)}.hu-multi-select__option[aria-selected=true]{font-weight:500}.hu-multi-select__option--disabled{opacity:.5;cursor:not-allowed}.hu-multi-select__option-icon{color:var(--hu-text-subtle)}.hu-multi-select__option-text{display:flex;flex-direction:column;min-width:0}.hu-multi-select__option-desc{font-size:var(--hu-text-xs);font-weight:400;color:var(--hu-text-subtle)}.hu-multi-select__box{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:1rem;height:1rem;margin-top:1px;color:var(--hu-primary-fg);background:var(--hu-surface);border:1.5px solid var(--hu-border-strong);border-radius:4px;transition:background-color var(--hu-transition),border-color var(--hu-transition)}.hu-multi-select__box--checked,.hu-multi-select__box--partial{background:var(--hu-primary);border-color:var(--hu-primary)}.hu-multi-select__empty{padding:var(--hu-space-4) var(--hu-space-2);font-size:var(--hu-text-sm);color:var(--hu-text-subtle);text-align:center}.hu-multi-select__footer{padding:var(--hu-space-2) var(--hu-space-3);font-size:var(--hu-text-xs);color:var(--hu-text-muted);border-top:1px solid var(--hu-border)}@keyframes hu-multi-select-in{0%{opacity:0;transform:translateY(-4px)}}\n"],
7626
7629
  dependencies: [{
7627
7630
  kind: "component",
7628
7631
  type: HuIcon,
@@ -7667,7 +7670,7 @@ i0.ɵɵngDeclareClassMetadata({
7667
7670
  encapsulation: ViewEncapsulation.None,
7668
7671
  changeDetection: ChangeDetectionStrategy.OnPush,
7669
7672
  template: "<div\r\n #trigger\r\n class=\"hu-multi-select__trigger\"\r\n role=\"combobox\"\r\n aria-haspopup=\"listbox\"\r\n [id]=\"id()\"\r\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\r\n [attr.aria-expanded]=\"open()\"\r\n [attr.aria-controls]=\"listId\"\r\n [attr.aria-disabled]=\"isDisabled() || null\"\r\n [attr.aria-invalid]=\"isInvalid() || null\"\r\n [attr.aria-describedby]=\"field?.describedBy() ?? null\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n [class.hu-multi-select__trigger--invalid]=\"isInvalid()\"\r\n (click)=\"toggle()\"\r\n (keydown)=\"onTriggerKeydown($event)\"\r\n>\r\n <div class=\"hu-multi-select__values\">\r\n @if (!selectedOptions().length) {\r\n <span class=\"hu-multi-select__placeholder\">{{ placeholder() }}</span>\r\n } @else if (showChips()) {\r\n @for (o of selectedOptions(); track o.value) {\r\n <span class=\"hu-multi-select__chip\">\r\n {{ o.label }}\r\n @if (!isDisabled()) {\r\n <button\r\n type=\"button\"\r\n class=\"hu-multi-select__chip-remove\"\r\n tabindex=\"-1\"\r\n [attr.aria-label]=\"o.label + ' kaldır'\"\r\n (click)=\"remove(o, $event)\"\r\n >\r\n <hu-icon name=\"x\" [size]=\"12\" />\r\n </button>\r\n }\r\n </span>\r\n }\r\n } @else {\r\n <span class=\"hu-multi-select__text\">{{ summary() }}</span>\r\n }\r\n </div>\r\n @if (showClear() && selectedOptions().length && !isDisabled()) {\r\n <button type=\"button\" class=\"hu-multi-select__icon-btn\" tabindex=\"-1\" aria-label=\"Seçimi temizle\" (click)=\"clearAll($event)\">\r\n <hu-icon name=\"x\" [size]=\"14\" />\r\n </button>\r\n }\r\n <hu-icon class=\"hu-multi-select__caret\" name=\"chevron-down\" [size]=\"16\" />\r\n</div>\r\n\r\n<div\r\n #panel\r\n popover=\"manual\"\r\n class=\"hu-multi-select__panel\"\r\n [class.hu-multi-select__panel--inline]=\"!supportsPopover\"\r\n [attr.hidden]=\"!supportsPopover && !open() ? '' : null\"\r\n (keydown)=\"onPanelKeydown($event)\"\r\n>\r\n @if (open()) {\r\n @if (filter() || showSelectAll()) {\r\n <div class=\"hu-multi-select__header\">\r\n @if (showSelectAll() && selectionLimit() == null) {\r\n <button\r\n type=\"button\"\r\n class=\"hu-multi-select__all\"\r\n tabindex=\"-1\"\r\n [attr.aria-label]=\"allSelected() ? 'Seçimi kaldır' : 'Tümünü seç'\"\r\n [disabled]=\"!selectable().length\"\r\n (click)=\"toggleAll()\"\r\n >\r\n <span\r\n class=\"hu-multi-select__box\"\r\n [class.hu-multi-select__box--checked]=\"allSelected()\"\r\n [class.hu-multi-select__box--partial]=\"someSelected()\"\r\n aria-hidden=\"true\"\r\n >\r\n @if (allSelected()) {\r\n <hu-icon name=\"check\" [size]=\"12\" />\r\n } @else if (someSelected()) {\r\n <hu-icon name=\"minus\" [size]=\"12\" />\r\n }\r\n </span>\r\n </button>\r\n }\r\n @if (filter()) {\r\n <div class=\"hu-multi-select__search\">\r\n <hu-icon name=\"search\" [size]=\"14\" />\r\n <input\r\n #search\r\n type=\"text\"\r\n class=\"hu-input\"\r\n data-size=\"sm\"\r\n role=\"searchbox\"\r\n autocomplete=\"off\"\r\n [attr.aria-label]=\"filterPlaceholder()\"\r\n [attr.aria-controls]=\"listId\"\r\n [attr.aria-activedescendant]=\"activeIndex() >= 0 ? optionId(activeIndex()) : null\"\r\n [placeholder]=\"filterPlaceholder()\"\r\n [value]=\"query()\"\r\n (input)=\"onQuery($any($event.target).value)\"\r\n />\r\n </div>\r\n } @else if (showSelectAll() && selectionLimit() == null) {\r\n <span class=\"hu-multi-select__all-label\" (click)=\"toggleAll()\">Tümünü seç</span>\r\n }\r\n </div>\r\n }\r\n\r\n <ul\r\n #listbox\r\n class=\"hu-multi-select__list\"\r\n role=\"listbox\"\r\n aria-multiselectable=\"true\"\r\n [id]=\"listId\"\r\n [attr.tabindex]=\"filter() ? -1 : 0\"\r\n [attr.aria-label]=\"ariaLabel() || placeholder()\"\r\n [attr.aria-activedescendant]=\"!filter() && activeIndex() >= 0 ? optionId(activeIndex()) : null\"\r\n >\r\n @for (row of rows(); track $index) {\r\n @if (row.kind === 'group') {\r\n <li class=\"hu-multi-select__group\" role=\"presentation\">{{ row.label }}</li>\r\n } @else {\r\n @let o = row.option;\r\n @let selected = isSelected(o);\r\n @let blocked = !selected && limitReached();\r\n <li\r\n class=\"hu-multi-select__option\"\r\n role=\"option\"\r\n [id]=\"optionId(row.index)\"\r\n [attr.aria-selected]=\"selected\"\r\n [attr.aria-disabled]=\"o.disabled || blocked || null\"\r\n [class.hu-multi-select__option--active]=\"row.index === activeIndex()\"\r\n [class.hu-multi-select__option--disabled]=\"o.disabled || blocked\"\r\n (mousedown)=\"$event.preventDefault()\"\r\n (mousemove)=\"!o.disabled && activeIndex() !== row.index && activeIndex.set(row.index)\"\r\n (click)=\"toggleOption(o)\"\r\n >\r\n <span class=\"hu-multi-select__box\" [class.hu-multi-select__box--checked]=\"selected\" aria-hidden=\"true\">\r\n @if (selected) {\r\n <hu-icon name=\"check\" [size]=\"12\" />\r\n }\r\n </span>\r\n @if (o.icon) {\r\n <hu-icon class=\"hu-multi-select__option-icon\" [name]=\"o.icon\" [size]=\"16\" />\r\n }\r\n <span class=\"hu-multi-select__option-text\">\r\n <span>{{ o.label }}</span>\r\n @if (o.description) {\r\n <span class=\"hu-multi-select__option-desc\">{{ o.description }}</span>\r\n }\r\n </span>\r\n </li>\r\n }\r\n } @empty {\r\n <li class=\"hu-multi-select__empty\" role=\"presentation\">{{ emptyMessage() }}</li>\r\n }\r\n </ul>\r\n\r\n @if (selectionLimit() != null || values().length) {\r\n <div class=\"hu-multi-select__footer\" aria-live=\"polite\">\r\n {{ values().length }}{{ selectionLimit() != null ? ' / ' + selectionLimit() : '' }} seçildi\r\n @if (limitReached()) {\r\n · sınıra ulaşıldı\r\n }\r\n </div>\r\n }\r\n }\r\n</div>\r\n",
7670
- styles: [".hu-multi-select{position:relative;display:block;width:100%;min-width:0}.hu-multi-select__trigger{display:flex;align-items:center;gap:var(--hu-space-1);min-height:var(--hu-control-md);padding:3px var(--hu-space-2) 3px var(--hu-space-3);font-size:var(--hu-text-sm);color:var(--hu-text);background:var(--hu-surface);border:1px solid var(--hu-border-strong);border-radius:var(--hu-radius-md);box-shadow:var(--hu-shadow-sm);cursor:pointer;transition:border-color var(--hu-transition),box-shadow var(--hu-transition)}.hu-multi-select__trigger:hover:not([aria-disabled=true]):not(:focus){border-color:var(--hu-gray-400)}.hu-multi-select__trigger:focus,.hu-multi-select--open .hu-multi-select__trigger{outline:none;border-color:var(--hu-primary);box-shadow:var(--hu-ring)}.hu-multi-select__trigger--invalid,.hu-multi-select__trigger--invalid:hover:not(:focus){border-color:var(--hu-danger)}.hu-multi-select__trigger--invalid:focus{box-shadow:var(--hu-ring-danger)}.hu-multi-select--disabled .hu-multi-select__trigger{color:var(--hu-text-subtle);background:var(--hu-surface-3);box-shadow:none;cursor:not-allowed}[data-size=sm] .hu-multi-select__trigger{min-height:var(--hu-control-sm);padding-left:var(--hu-space-2);font-size:.8125rem}[data-size=lg] .hu-multi-select__trigger{min-height:var(--hu-control-lg);padding-left:var(--hu-space-4);font-size:var(--hu-text-md)}.hu-multi-select__values{display:flex;flex:1;flex-wrap:wrap;align-items:center;gap:4px;min-width:0}.hu-multi-select__placeholder{color:var(--hu-text-subtle)}.hu-multi-select__text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hu-multi-select__chip{display:inline-flex;align-items:center;gap:2px;max-width:100%;height:1.5rem;padding:0 2px 0 var(--hu-space-2);overflow:hidden;font-size:var(--hu-text-xs);font-weight:500;color:var(--hu-primary-soft-fg);white-space:nowrap;text-overflow:ellipsis;background:var(--hu-primary-soft);border-radius:var(--hu-radius-sm)}.hu-multi-select__chip-remove,.hu-multi-select__icon-btn{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:0;color:inherit;background:none;border:0;border-radius:var(--hu-radius-sm);cursor:pointer;opacity:.7}.hu-multi-select__chip-remove:hover:not(:disabled),.hu-multi-select__icon-btn:hover:not(:disabled){opacity:1;background:#00000014}.hu-multi-select__chip-remove{width:1.125rem;height:1.125rem}.hu-multi-select__icon-btn{width:1.5rem;height:1.5rem;color:var(--hu-text-subtle)}.hu-multi-select__caret{flex-shrink:0;color:var(--hu-text-subtle);transition:transform var(--hu-transition)}.hu-multi-select--open .hu-multi-select__caret{transform:rotate(180deg)}.hu-multi-select__panel{position:fixed;inset:auto;flex-direction:column;min-width:14rem;max-width:calc(100vw - 1rem);margin:0;padding:0;overflow:hidden;color:var(--hu-text);background:var(--hu-surface);border:1px solid var(--hu-border);border-radius:var(--hu-radius-lg);box-shadow:var(--hu-shadow-lg)}.hu-multi-select__panel:popover-open{display:flex;animation:hu-multi-select-in .12s ease-out}.hu-multi-select__panel--inline{position:absolute;top:calc(100% + 4px);left:0;z-index:1000;display:flex;width:100%}.hu-multi-select__panel--inline[hidden]{display:none}.hu-multi-select__header{display:flex;align-items:center;gap:var(--hu-space-2);padding:var(--hu-space-2) var(--hu-space-3);border-bottom:1px solid var(--hu-border)}.hu-multi-select__all{display:inline-flex;padding:2px;background:none;border:0;border-radius:var(--hu-radius-sm);cursor:pointer}.hu-multi-select__all:disabled{opacity:.5;cursor:not-allowed}.hu-multi-select__all-label{font-size:var(--hu-text-sm);cursor:pointer}.hu-multi-select__search{position:relative;display:flex;flex:1;align-items:center;min-width:0}.hu-multi-select__search>hu-icon{position:absolute;left:var(--hu-space-2);color:var(--hu-text-subtle);pointer-events:none}.hu-multi-select__search>.hu-input{padding-left:1.75rem;box-shadow:none}.hu-multi-select__list{max-height:var(--hu-multi-select-max-height, 16rem);margin:0;padding:var(--hu-space-1);overflow-y:auto;list-style:none;outline:none}.hu-multi-select__group{padding:var(--hu-space-2) var(--hu-space-2) var(--hu-space-1);font-size:var(--hu-text-xs);font-weight:600;color:var(--hu-text-subtle)}.hu-multi-select__option{display:flex;align-items:flex-start;gap:var(--hu-space-2);padding:var(--hu-space-2);font-size:var(--hu-text-sm);line-height:1.35;border-radius:var(--hu-radius-sm);cursor:pointer;-webkit-user-select:none;user-select:none}.hu-multi-select__option--active{background:var(--hu-surface-3)}.hu-multi-select__option[aria-selected=true]{font-weight:500}.hu-multi-select__option--disabled{opacity:.5;cursor:not-allowed}.hu-multi-select__option-icon{color:var(--hu-text-subtle)}.hu-multi-select__option-text{display:flex;flex-direction:column;min-width:0}.hu-multi-select__option-desc{font-size:var(--hu-text-xs);font-weight:400;color:var(--hu-text-subtle)}.hu-multi-select__box{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:1rem;height:1rem;margin-top:1px;color:var(--hu-primary-fg);background:var(--hu-surface);border:1.5px solid var(--hu-border-strong);border-radius:4px;transition:background-color var(--hu-transition),border-color var(--hu-transition)}.hu-multi-select__box--checked,.hu-multi-select__box--partial{background:var(--hu-primary);border-color:var(--hu-primary)}.hu-multi-select__empty{padding:var(--hu-space-4) var(--hu-space-2);font-size:var(--hu-text-sm);color:var(--hu-text-subtle);text-align:center}.hu-multi-select__footer{padding:var(--hu-space-2) var(--hu-space-3);font-size:var(--hu-text-xs);color:var(--hu-text-muted);border-top:1px solid var(--hu-border)}@keyframes hu-multi-select-in{0%{opacity:0;transform:translateY(-4px)}}\n"]
7673
+ styles: [".hu-multi-select{position:relative;display:block;width:100%;min-width:0}.hu-multi-select__trigger{display:flex;align-items:center;gap:var(--hu-space-1);min-height:var(--hu-control-md);padding:3px var(--hu-space-2) 3px var(--hu-space-3);font-size:var(--hu-text-sm);color:var(--hu-text);background:var(--hu-surface);border:1px solid var(--hu-border-strong);border-radius:var(--hu-radius-md);box-shadow:var(--hu-shadow-sm);cursor:pointer;transition:border-color var(--hu-transition),box-shadow var(--hu-transition)}.hu-multi-select__trigger:hover:not([aria-disabled=true]):not(:focus){border-color:var(--hu-gray-400)}.hu-multi-select__trigger:focus,.hu-multi-select--open .hu-multi-select__trigger{outline:none;border-color:var(--hu-primary);box-shadow:var(--hu-ring);transition:none}.hu-multi-select__trigger--invalid,.hu-multi-select__trigger--invalid:hover:not(:focus){border-color:var(--hu-danger)}.hu-multi-select__trigger--invalid:focus{box-shadow:var(--hu-ring-danger)}.hu-multi-select--disabled .hu-multi-select__trigger{color:var(--hu-text-subtle);background:var(--hu-surface-3);box-shadow:none;cursor:not-allowed}[data-size=sm] .hu-multi-select__trigger{min-height:var(--hu-control-sm);padding-left:var(--hu-space-2);font-size:.8125rem}[data-size=lg] .hu-multi-select__trigger{min-height:var(--hu-control-lg);padding-left:var(--hu-space-4);font-size:var(--hu-text-md)}.hu-multi-select__values{display:flex;flex:1;flex-wrap:wrap;align-items:center;gap:4px;min-width:0}.hu-multi-select__placeholder{color:var(--hu-text-subtle)}.hu-multi-select__text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hu-multi-select__chip{display:inline-flex;align-items:center;gap:2px;max-width:100%;height:1.5rem;padding:0 2px 0 var(--hu-space-2);overflow:hidden;font-size:var(--hu-text-xs);font-weight:500;color:var(--hu-primary-soft-fg);white-space:nowrap;text-overflow:ellipsis;background:var(--hu-primary-soft);border-radius:var(--hu-radius-sm)}.hu-multi-select__chip-remove,.hu-multi-select__icon-btn{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:0;color:inherit;background:none;border:0;border-radius:var(--hu-radius-sm);cursor:pointer;opacity:.7}.hu-multi-select__chip-remove:hover:not(:disabled),.hu-multi-select__icon-btn:hover:not(:disabled){opacity:1;background:#00000014}.hu-multi-select__chip-remove{width:1.125rem;height:1.125rem}.hu-multi-select__icon-btn{width:1.5rem;height:1.5rem;color:var(--hu-text-subtle)}.hu-multi-select__caret{flex-shrink:0;color:var(--hu-text-subtle);transition:transform var(--hu-transition)}.hu-multi-select--open .hu-multi-select__caret{transform:rotate(180deg)}.hu-multi-select__panel{position:fixed;inset:auto;flex-direction:column;min-width:14rem;max-width:calc(100vw - 1rem);margin:0;padding:0;overflow:hidden;color:var(--hu-text);background:var(--hu-surface);border:1px solid var(--hu-border);border-radius:var(--hu-radius-lg);box-shadow:var(--hu-shadow-lg)}.hu-multi-select__panel:popover-open{display:flex;animation:hu-multi-select-in .12s ease-out}.hu-multi-select__panel--inline{position:absolute;top:calc(100% + 4px);left:0;z-index:1000;display:flex;width:100%}.hu-multi-select__panel--inline[hidden]{display:none}.hu-multi-select__header{display:flex;align-items:center;gap:var(--hu-space-2);padding:var(--hu-space-2) var(--hu-space-3);border-bottom:1px solid var(--hu-border)}.hu-multi-select__all{display:inline-flex;padding:2px;background:none;border:0;border-radius:var(--hu-radius-sm);cursor:pointer}.hu-multi-select__all:disabled{opacity:.5;cursor:not-allowed}.hu-multi-select__all-label{font-size:var(--hu-text-sm);cursor:pointer}.hu-multi-select__search{position:relative;display:flex;flex:1;align-items:center;min-width:0}.hu-multi-select__search>hu-icon{position:absolute;left:var(--hu-space-2);color:var(--hu-text-subtle);pointer-events:none}.hu-multi-select__search>.hu-input{padding-left:1.75rem;box-shadow:none}.hu-multi-select__list{max-height:var(--hu-multi-select-max-height, 16rem);margin:0;padding:var(--hu-space-1);overflow-y:auto;list-style:none;outline:none}.hu-multi-select__group{padding:var(--hu-space-2) var(--hu-space-2) var(--hu-space-1);font-size:var(--hu-text-xs);font-weight:600;color:var(--hu-text-subtle)}.hu-multi-select__option{display:flex;align-items:flex-start;gap:var(--hu-space-2);padding:var(--hu-space-2);font-size:var(--hu-text-sm);line-height:1.35;border-radius:var(--hu-radius-sm);cursor:pointer;-webkit-user-select:none;user-select:none}.hu-multi-select__option--active{background:var(--hu-surface-3)}.hu-multi-select__option[aria-selected=true]{font-weight:500}.hu-multi-select__option--disabled{opacity:.5;cursor:not-allowed}.hu-multi-select__option-icon{color:var(--hu-text-subtle)}.hu-multi-select__option-text{display:flex;flex-direction:column;min-width:0}.hu-multi-select__option-desc{font-size:var(--hu-text-xs);font-weight:400;color:var(--hu-text-subtle)}.hu-multi-select__box{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:1rem;height:1rem;margin-top:1px;color:var(--hu-primary-fg);background:var(--hu-surface);border:1.5px solid var(--hu-border-strong);border-radius:4px;transition:background-color var(--hu-transition),border-color var(--hu-transition)}.hu-multi-select__box--checked,.hu-multi-select__box--partial{background:var(--hu-primary);border-color:var(--hu-primary)}.hu-multi-select__empty{padding:var(--hu-space-4) var(--hu-space-2);font-size:var(--hu-text-sm);color:var(--hu-text-subtle);text-align:center}.hu-multi-select__footer{padding:var(--hu-space-2) var(--hu-space-3);font-size:var(--hu-text-xs);color:var(--hu-text-muted);border-top:1px solid var(--hu-border)}@keyframes hu-multi-select-in{0%{opacity:0;transform:translateY(-4px)}}\n"]
7671
7674
  }]
7672
7675
  }],
7673
7676
  ctorParameters: () => [],
@@ -7825,6 +7828,651 @@ i0.ɵɵngDeclareClassMetadata({
7825
7828
  }]
7826
7829
  }
7827
7830
  });
7831
+ var HuSelect = class HuSelect {
7832
+ injector = inject(Injector);
7833
+ host = inject(ElementRef);
7834
+ win = inject(DOCUMENT).defaultView;
7835
+ field = inject(HU_FORM_FIELD, {
7836
+ optional: true,
7837
+ host: true
7838
+ });
7839
+ options = input([], ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
7840
+ value = model(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
7841
+ placeholder = input("Seçin", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
7842
+ filter = input("auto", {
7843
+ ...ngDevMode ? { debugName: "filter" } : /* istanbul ignore next */ {},
7844
+ transform: (v) => v === "auto" ? "auto" : booleanAttribute(v)
7845
+ });
7846
+ filterThreshold = input(7, {
7847
+ ...ngDevMode ? { debugName: "filterThreshold" } : /* istanbul ignore next */ {},
7848
+ transform: numberAttribute
7849
+ });
7850
+ filterPlaceholder = input("Ara…", ...ngDevMode ? [{ debugName: "filterPlaceholder" }] : /* istanbul ignore next */ []);
7851
+ showClear = input(false, {
7852
+ ...ngDevMode ? { debugName: "showClear" } : /* istanbul ignore next */ {},
7853
+ transform: booleanAttribute
7854
+ });
7855
+ emptyMessage = input("Sonuç bulunamadı", ...ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []);
7856
+ size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
7857
+ disabled = input(false, {
7858
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
7859
+ transform: booleanAttribute
7860
+ });
7861
+ ariaLabel = input(...ngDevMode ? [void 0, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
7862
+ id = input(huUniqueId("hu-select"), ...ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []);
7863
+ compareWith = input(Object.is, ...ngDevMode ? [{ debugName: "compareWith" }] : /* istanbul ignore next */ []);
7864
+ selectionChange = output();
7865
+ closed = output();
7866
+ open = signal(false, ...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
7867
+ query = signal("", ...ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []);
7868
+ activeIndex = signal(-1, ...ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []);
7869
+ listId = huUniqueId("hu-select-list");
7870
+ formDisabled = signal(false, ...ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []);
7871
+ isDisabled = computed(() => this.disabled() || this.formDisabled(), ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
7872
+ showFilter = computed(() => {
7873
+ const f = this.filter();
7874
+ return f === "auto" ? this.options().length > this.filterThreshold() : f;
7875
+ }, ...ngDevMode ? [{ debugName: "showFilter" }] : /* istanbul ignore next */ []);
7876
+ selectedOption = computed(() => {
7877
+ const value = this.value();
7878
+ if (value == null) return void 0;
7879
+ const cmp = this.compareWith();
7880
+ return this.options().find((o) => cmp(o.value, value));
7881
+ }, ...ngDevMode ? [{ debugName: "selectedOption" }] : /* istanbul ignore next */ []);
7882
+ visible = computed(() => {
7883
+ const q = huFold(this.query().trim());
7884
+ return q ? this.options().filter((o) => huFold(o.label).includes(q) || huFold(o.description ?? "").includes(q)) : [...this.options()];
7885
+ }, ...ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []);
7886
+ rows = computed(() => {
7887
+ const rows = [];
7888
+ let group;
7889
+ this.visible().forEach((option, index) => {
7890
+ if (option.group && option.group !== group) rows.push({
7891
+ kind: "group",
7892
+ label: option.group
7893
+ });
7894
+ group = option.group;
7895
+ rows.push({
7896
+ kind: "option",
7897
+ option,
7898
+ index
7899
+ });
7900
+ });
7901
+ return rows;
7902
+ }, ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
7903
+ ngControl;
7904
+ get hasControl() {
7905
+ return !!this.resolveControl();
7906
+ }
7907
+ controlErrorVisible = signal(false, ...ngDevMode ? [{ debugName: "controlErrorVisible" }] : /* istanbul ignore next */ []);
7908
+ errors = signal(null, ...ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []);
7909
+ isInvalid = computed(() => this.controlErrorVisible() || (this.field?.showError() ?? false), ...ngDevMode ? [{ debugName: "isInvalid" }] : /* istanbul ignore next */ []);
7910
+ trigger = viewChild.required("trigger", ...ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []);
7911
+ panel = viewChild.required("panel", ...ngDevMode ? [{ debugName: "panel" }] : /* istanbul ignore next */ []);
7912
+ search = viewChild("search", ...ngDevMode ? [{ debugName: "search" }] : /* istanbul ignore next */ []);
7913
+ listbox = viewChild("listbox", ...ngDevMode ? [{ debugName: "listbox" }] : /* istanbul ignore next */ []);
7914
+ supportsPopover = typeof HTMLElement !== "undefined" && "showPopover" in HTMLElement.prototype;
7915
+ pointerInside = false;
7916
+ onChange = () => {};
7917
+ onTouched = () => {};
7918
+ constructor() {
7919
+ const reposition = () => this.open() && this.positionPanel();
7920
+ this.win?.addEventListener("resize", reposition);
7921
+ this.win?.addEventListener("scroll", reposition, true);
7922
+ inject(DestroyRef).onDestroy(() => {
7923
+ this.win?.removeEventListener("resize", reposition);
7924
+ this.win?.removeEventListener("scroll", reposition, true);
7925
+ });
7926
+ }
7927
+ ngDoCheck() {
7928
+ const c = this.resolveControl();
7929
+ if (!c) return;
7930
+ this.controlErrorVisible.set(!!c.invalid && !!(c.touched || c.dirty));
7931
+ this.errors.set(c.errors);
7932
+ }
7933
+ toggle() {
7934
+ if (this.open()) this.close(true);
7935
+ else this.show();
7936
+ }
7937
+ show(initialQuery = "") {
7938
+ if (this.isDisabled() || this.open()) return;
7939
+ this.query.set(initialQuery);
7940
+ this.open.set(true);
7941
+ const selected = this.visible().findIndex((o) => this.isSelected(o));
7942
+ this.activeIndex.set(!initialQuery && selected >= 0 ? selected : this.nextEnabled(-1, 1));
7943
+ afterNextRender(() => {
7944
+ if (!this.open()) return;
7945
+ if (this.supportsPopover) this.panel().nativeElement.showPopover();
7946
+ this.positionPanel();
7947
+ (this.search() ?? this.listbox())?.nativeElement.focus({ preventScroll: true });
7948
+ this.scrollActiveIntoView("center");
7949
+ }, { injector: this.injector });
7950
+ }
7951
+ close(restoreFocus = false) {
7952
+ if (!this.open()) return;
7953
+ this.open.set(false);
7954
+ const panel = this.panel().nativeElement;
7955
+ if (this.supportsPopover && panel.matches(":popover-open")) panel.hidePopover();
7956
+ if (restoreFocus) this.trigger().nativeElement.focus();
7957
+ this.closed.emit();
7958
+ }
7959
+ isSelected(option) {
7960
+ const value = this.value();
7961
+ return value != null && this.compareWith()(option.value, value);
7962
+ }
7963
+ choose(option) {
7964
+ if (option.disabled || this.isDisabled()) return;
7965
+ if (!this.isSelected(option)) this.commit(option.value);
7966
+ this.close(true);
7967
+ }
7968
+ clear(event) {
7969
+ event.stopPropagation();
7970
+ if (this.isDisabled()) return;
7971
+ this.commit(null);
7972
+ this.trigger().nativeElement.focus();
7973
+ }
7974
+ onTriggerKeydown(event) {
7975
+ if ([
7976
+ "Enter",
7977
+ " ",
7978
+ "ArrowDown",
7979
+ "ArrowUp",
7980
+ "F4"
7981
+ ].includes(event.key) || event.altKey && event.key === "ArrowDown") {
7982
+ event.preventDefault();
7983
+ this.show();
7984
+ } else if (event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey) {
7985
+ event.preventDefault();
7986
+ if (this.showFilter()) this.show(event.key);
7987
+ else this.jumpTo(event.key);
7988
+ } else if ((event.key === "Delete" || event.key === "Backspace") && this.showClear() && this.value() != null) {
7989
+ event.preventDefault();
7990
+ this.commit(null);
7991
+ }
7992
+ }
7993
+ onPanelKeydown(event) {
7994
+ const visible = this.visible();
7995
+ const inSearch = event.target === this.search()?.nativeElement;
7996
+ switch (event.key) {
7997
+ case "ArrowDown":
7998
+ event.preventDefault();
7999
+ this.activeIndex.set(this.nextEnabled(this.activeIndex(), 1));
8000
+ break;
8001
+ case "ArrowUp":
8002
+ event.preventDefault();
8003
+ this.activeIndex.set(this.nextEnabled(this.activeIndex(), -1));
8004
+ break;
8005
+ case "Home":
8006
+ if (inSearch) return;
8007
+ event.preventDefault();
8008
+ this.activeIndex.set(this.nextEnabled(-1, 1));
8009
+ break;
8010
+ case "End":
8011
+ if (inSearch) return;
8012
+ event.preventDefault();
8013
+ this.activeIndex.set(this.nextEnabled(visible.length, -1));
8014
+ break;
8015
+ case "PageDown":
8016
+ case "PageUp": {
8017
+ event.preventDefault();
8018
+ const step = event.key === "PageDown" ? 1 : -1;
8019
+ let i = this.activeIndex();
8020
+ for (let n = 0; n < 8; n++) i = this.nextEnabled(i, step);
8021
+ this.activeIndex.set(i);
8022
+ break;
8023
+ }
8024
+ case "Enter":
8025
+ event.preventDefault();
8026
+ if (visible[this.activeIndex()]) this.choose(visible[this.activeIndex()]);
8027
+ return;
8028
+ case " ":
8029
+ if (inSearch) return;
8030
+ event.preventDefault();
8031
+ if (visible[this.activeIndex()]) this.choose(visible[this.activeIndex()]);
8032
+ return;
8033
+ case "Escape":
8034
+ event.preventDefault();
8035
+ event.stopPropagation();
8036
+ this.close(true);
8037
+ return;
8038
+ case "Tab":
8039
+ this.close();
8040
+ return;
8041
+ default:
8042
+ if (!inSearch && event.key.length === 1 && !event.ctrlKey && !event.metaKey) this.jumpTo(event.key);
8043
+ return;
8044
+ }
8045
+ this.scrollActiveIntoView();
8046
+ }
8047
+ onQuery(value) {
8048
+ this.query.set(value);
8049
+ this.activeIndex.set(this.nextEnabled(-1, 1));
8050
+ this.scrollActiveIntoView();
8051
+ }
8052
+ onOptionHover(index, option) {
8053
+ if (!option.disabled && this.activeIndex() !== index) this.activeIndex.set(index);
8054
+ }
8055
+ optionId(index) {
8056
+ return `${this.listId}-${index}`;
8057
+ }
8058
+ onFocusOut(event) {
8059
+ const next = event.relatedTarget;
8060
+ if (next && this.host.nativeElement.contains(next)) return;
8061
+ if (!next && this.pointerInside && this.open()) return;
8062
+ this.close();
8063
+ this.onTouched();
8064
+ }
8065
+ onDocumentPointer(event) {
8066
+ this.pointerInside = this.host.nativeElement.contains(event.target);
8067
+ if (this.open() && !this.pointerInside) this.close();
8068
+ }
8069
+ writeValue(value) {
8070
+ this.value.set(value ?? null);
8071
+ }
8072
+ registerOnChange(fn) {
8073
+ this.onChange = fn;
8074
+ }
8075
+ registerOnTouched(fn) {
8076
+ this.onTouched = fn;
8077
+ }
8078
+ setDisabledState(disabled) {
8079
+ this.formDisabled.set(disabled);
8080
+ if (disabled) this.close();
8081
+ }
8082
+ commit(value) {
8083
+ this.value.set(value);
8084
+ this.onChange(value);
8085
+ this.selectionChange.emit(value);
8086
+ }
8087
+ jumpTo(char) {
8088
+ const list = this.visible();
8089
+ const c = huFold(char);
8090
+ const start = this.open() ? this.activeIndex() : list.findIndex((o) => this.isSelected(o));
8091
+ for (let n = 1; n <= list.length; n++) {
8092
+ const i = (start + n + list.length) % list.length;
8093
+ if (!list[i].disabled && huFold(list[i].label).startsWith(c)) {
8094
+ if (this.open()) {
8095
+ this.activeIndex.set(i);
8096
+ this.scrollActiveIntoView();
8097
+ } else this.commit(list[i].value);
8098
+ return;
8099
+ }
8100
+ }
8101
+ }
8102
+ nextEnabled(from, direction) {
8103
+ const list = this.visible();
8104
+ for (let i = from + direction; i >= 0 && i < list.length; i += direction) if (!list[i].disabled) return i;
8105
+ return from >= 0 && from < list.length ? from : -1;
8106
+ }
8107
+ scrollActiveIntoView(block = "nearest") {
8108
+ afterNextRender(() => this.panel().nativeElement.querySelector(".hu-select__option--active")?.scrollIntoView({ block }), { injector: this.injector });
8109
+ }
8110
+ positionPanel() {
8111
+ const panel = this.panel().nativeElement;
8112
+ if (!this.supportsPopover || !this.win) return;
8113
+ const anchor = this.trigger().nativeElement.getBoundingClientRect();
8114
+ panel.style.minWidth = `${anchor.width}px`;
8115
+ const { offsetWidth: width, offsetHeight: height } = panel;
8116
+ const gap = 6;
8117
+ const top = this.win.innerHeight - anchor.bottom < height + gap && anchor.top > height + gap ? anchor.top - height - gap : anchor.bottom + gap;
8118
+ const left = Math.max(8, Math.min(anchor.left, this.win.innerWidth - width - 8));
8119
+ panel.style.top = `${top}px`;
8120
+ panel.style.left = `${left}px`;
8121
+ }
8122
+ resolveControl() {
8123
+ if (this.ngControl === void 0) this.ngControl = this.injector.get(NgControl, null, {
8124
+ self: true,
8125
+ optional: true
8126
+ });
8127
+ return this.ngControl;
8128
+ }
8129
+ static ɵfac = i0.ɵɵngDeclareFactory({
8130
+ minVersion: "12.0.0",
8131
+ version: "22.2.0",
8132
+ ngImport: i0,
8133
+ type: HuSelect,
8134
+ deps: [],
8135
+ target: i0.ɵɵFactoryTarget.Component
8136
+ });
8137
+ static ɵcmp = i0.ɵɵngDeclareComponent({
8138
+ minVersion: "17.0.0",
8139
+ version: "22.2.0",
8140
+ type: HuSelect,
8141
+ isStandalone: true,
8142
+ selector: "hu-select",
8143
+ inputs: {
8144
+ options: {
8145
+ classPropertyName: "options",
8146
+ publicName: "options",
8147
+ isSignal: true,
8148
+ isRequired: false,
8149
+ transformFunction: null
8150
+ },
8151
+ value: {
8152
+ classPropertyName: "value",
8153
+ publicName: "value",
8154
+ isSignal: true,
8155
+ isRequired: false,
8156
+ transformFunction: null
8157
+ },
8158
+ placeholder: {
8159
+ classPropertyName: "placeholder",
8160
+ publicName: "placeholder",
8161
+ isSignal: true,
8162
+ isRequired: false,
8163
+ transformFunction: null
8164
+ },
8165
+ filter: {
8166
+ classPropertyName: "filter",
8167
+ publicName: "filter",
8168
+ isSignal: true,
8169
+ isRequired: false,
8170
+ transformFunction: null
8171
+ },
8172
+ filterThreshold: {
8173
+ classPropertyName: "filterThreshold",
8174
+ publicName: "filterThreshold",
8175
+ isSignal: true,
8176
+ isRequired: false,
8177
+ transformFunction: null
8178
+ },
8179
+ filterPlaceholder: {
8180
+ classPropertyName: "filterPlaceholder",
8181
+ publicName: "filterPlaceholder",
8182
+ isSignal: true,
8183
+ isRequired: false,
8184
+ transformFunction: null
8185
+ },
8186
+ showClear: {
8187
+ classPropertyName: "showClear",
8188
+ publicName: "showClear",
8189
+ isSignal: true,
8190
+ isRequired: false,
8191
+ transformFunction: null
8192
+ },
8193
+ emptyMessage: {
8194
+ classPropertyName: "emptyMessage",
8195
+ publicName: "emptyMessage",
8196
+ isSignal: true,
8197
+ isRequired: false,
8198
+ transformFunction: null
8199
+ },
8200
+ size: {
8201
+ classPropertyName: "size",
8202
+ publicName: "size",
8203
+ isSignal: true,
8204
+ isRequired: false,
8205
+ transformFunction: null
8206
+ },
8207
+ disabled: {
8208
+ classPropertyName: "disabled",
8209
+ publicName: "disabled",
8210
+ isSignal: true,
8211
+ isRequired: false,
8212
+ transformFunction: null
8213
+ },
8214
+ ariaLabel: {
8215
+ classPropertyName: "ariaLabel",
8216
+ publicName: "ariaLabel",
8217
+ isSignal: true,
8218
+ isRequired: false,
8219
+ transformFunction: null
8220
+ },
8221
+ id: {
8222
+ classPropertyName: "id",
8223
+ publicName: "id",
8224
+ isSignal: true,
8225
+ isRequired: false,
8226
+ transformFunction: null
8227
+ },
8228
+ compareWith: {
8229
+ classPropertyName: "compareWith",
8230
+ publicName: "compareWith",
8231
+ isSignal: true,
8232
+ isRequired: false,
8233
+ transformFunction: null
8234
+ }
8235
+ },
8236
+ outputs: {
8237
+ value: "valueChange",
8238
+ selectionChange: "selectionChange",
8239
+ closed: "closed"
8240
+ },
8241
+ host: {
8242
+ listeners: {
8243
+ "focusout": "onFocusOut($event)",
8244
+ "document:mousedown": "onDocumentPointer($event)"
8245
+ },
8246
+ properties: {
8247
+ "class.hu-select--open": "open()",
8248
+ "class.hu-select--disabled": "isDisabled()",
8249
+ "attr.data-size": "size()"
8250
+ },
8251
+ classAttribute: "hu-select"
8252
+ },
8253
+ providers: [{
8254
+ provide: NG_VALUE_ACCESSOR,
8255
+ useExisting: forwardRef(() => HuSelect),
8256
+ multi: true
8257
+ }, {
8258
+ provide: HuFormFieldControl,
8259
+ useExisting: forwardRef(() => HuSelect)
8260
+ }],
8261
+ viewQueries: [
8262
+ {
8263
+ propertyName: "trigger",
8264
+ first: true,
8265
+ predicate: ["trigger"],
8266
+ descendants: true,
8267
+ isSignal: true
8268
+ },
8269
+ {
8270
+ propertyName: "panel",
8271
+ first: true,
8272
+ predicate: ["panel"],
8273
+ descendants: true,
8274
+ isSignal: true
8275
+ },
8276
+ {
8277
+ propertyName: "search",
8278
+ first: true,
8279
+ predicate: ["search"],
8280
+ descendants: true,
8281
+ isSignal: true
8282
+ },
8283
+ {
8284
+ propertyName: "listbox",
8285
+ first: true,
8286
+ predicate: ["listbox"],
8287
+ descendants: true,
8288
+ isSignal: true
8289
+ }
8290
+ ],
8291
+ ngImport: i0,
8292
+ template: "<div\n #trigger\n class=\"hu-select__trigger\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [id]=\"id()\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-describedby]=\"field?.describedBy() ?? null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [class.hu-select__trigger--invalid]=\"isInvalid()\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\"\n>\n @if (selectedOption(); as s) {\n @if (s.icon) {\n <hu-icon class=\"hu-select__value-icon\" [name]=\"s.icon\" [size]=\"16\" />\n }\n <span class=\"hu-select__value\">{{ s.label }}</span>\n } @else {\n <span class=\"hu-select__placeholder\">{{ placeholder() }}</span>\n }\n @if (showClear() && selectedOption() && !isDisabled()) {\n <button type=\"button\" class=\"hu-select__clear\" tabindex=\"-1\" aria-label=\"Seçimi temizle\" (click)=\"clear($event)\">\n <hu-icon name=\"x\" [size]=\"14\" />\n </button>\n }\n <hu-icon class=\"hu-select__caret\" name=\"chevron-down\" [size]=\"16\" />\n</div>\n\n<div\n #panel\n popover=\"manual\"\n class=\"hu-select__panel\"\n [class.hu-select__panel--inline]=\"!supportsPopover\"\n [attr.hidden]=\"!supportsPopover && !open() ? '' : null\"\n (keydown)=\"onPanelKeydown($event)\"\n>\n @if (open()) {\n @if (showFilter()) {\n <div class=\"hu-select__search\">\n <hu-icon name=\"search\" [size]=\"15\" />\n <input\n #search\n type=\"text\"\n role=\"searchbox\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [attr.aria-label]=\"filterPlaceholder()\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-activedescendant]=\"activeIndex() >= 0 ? optionId(activeIndex()) : null\"\n [placeholder]=\"filterPlaceholder()\"\n [value]=\"query()\"\n (input)=\"onQuery($any($event.target).value)\"\n />\n </div>\n }\n\n <ul\n #listbox\n class=\"hu-select__list\"\n role=\"listbox\"\n [id]=\"listId\"\n [attr.tabindex]=\"showFilter() ? -1 : 0\"\n [attr.aria-label]=\"ariaLabel() || placeholder()\"\n [attr.aria-activedescendant]=\"!showFilter() && activeIndex() >= 0 ? optionId(activeIndex()) : null\"\n >\n @for (row of rows(); track $index) {\n @if (row.kind === 'group') {\n <li class=\"hu-select__group\" role=\"presentation\">{{ row.label }}</li>\n } @else {\n @let o = row.option;\n @let selected = isSelected(o);\n <li\n class=\"hu-select__option\"\n role=\"option\"\n [id]=\"optionId(row.index)\"\n [attr.aria-selected]=\"selected\"\n [attr.aria-disabled]=\"o.disabled || null\"\n [class.hu-select__option--active]=\"row.index === activeIndex()\"\n [class.hu-select__option--selected]=\"selected\"\n [class.hu-select__option--disabled]=\"o.disabled\"\n (mousedown)=\"$event.preventDefault()\"\n (mousemove)=\"onOptionHover(row.index, o)\"\n (click)=\"choose(o)\"\n >\n @if (o.icon) {\n <hu-icon class=\"hu-select__option-icon\" [name]=\"o.icon\" [size]=\"16\" />\n }\n <span class=\"hu-select__option-text\">\n <span class=\"hu-select__option-label\">{{ o.label }}</span>\n @if (o.description) {\n <span class=\"hu-select__option-desc\">{{ o.description }}</span>\n }\n </span>\n @if (selected) {\n <hu-icon class=\"hu-select__check\" name=\"check\" [size]=\"16\" />\n }\n </li>\n }\n } @empty {\n <li class=\"hu-select__empty\" role=\"presentation\">\n <hu-icon name=\"search\" [size]=\"18\" />\n {{ emptyMessage() }}\n </li>\n }\n </ul>\n }\n</div>\n",
8293
+ styles: [".hu-select{position:relative;display:block;width:100%;min-width:0}.hu-select__trigger{display:flex;align-items:center;gap:var(--hu-space-2);height:var(--hu-control-md);padding:0 var(--hu-space-2) 0 var(--hu-space-3);font-size:var(--hu-text-sm);color:var(--hu-text);background:var(--hu-surface);border:1px solid var(--hu-border-strong);border-radius:var(--hu-radius-md);box-shadow:var(--hu-shadow-sm);cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color var(--hu-transition),box-shadow var(--hu-transition)}.hu-select__trigger:hover:not([aria-disabled=true]):not(:focus){border-color:var(--hu-gray-400)}.hu-select__trigger:focus,.hu-select--open .hu-select__trigger{outline:none;border-color:var(--hu-primary);box-shadow:var(--hu-ring);transition:none}.hu-select__trigger--invalid,.hu-select__trigger--invalid:hover:not(:focus){border-color:var(--hu-danger)}.hu-select__trigger--invalid:focus{box-shadow:var(--hu-ring-danger)}.hu-select--disabled .hu-select__trigger{color:var(--hu-text-subtle);background:var(--hu-surface-3);box-shadow:none;cursor:not-allowed}[data-size=sm] .hu-select__trigger{height:var(--hu-control-sm);padding-left:var(--hu-space-2);font-size:.8125rem}[data-size=lg] .hu-select__trigger{height:var(--hu-control-lg);padding-left:var(--hu-space-4);font-size:var(--hu-text-md)}.hu-select__value,.hu-select__placeholder{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hu-select__placeholder{color:var(--hu-text-subtle)}.hu-select__value-icon{flex-shrink:0;color:var(--hu-text-muted)}.hu-select__clear{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;padding:0;color:var(--hu-text-subtle);background:none;border:0;border-radius:var(--hu-radius-sm);cursor:pointer}.hu-select__clear:hover{color:var(--hu-text);background:var(--hu-surface-3)}.hu-select__caret{flex-shrink:0;color:var(--hu-text-subtle);transition:transform var(--hu-transition)}.hu-select--open .hu-select__caret{color:var(--hu-primary);transform:rotate(180deg)}.hu-select__panel{--_panel-bg: var(--hu-select-panel-bg, var(--hu-surface));position:fixed;inset:auto;flex-direction:column;min-width:12rem;max-width:min(32rem,100vw - 1rem);margin:0;padding:0;overflow:hidden;color:var(--hu-text);background:var(--_panel-bg);border:1px solid var(--hu-border);border-radius:var(--hu-radius-lg);box-shadow:var(--hu-shadow-lg)}:root[data-theme=dark] .hu-select__panel{--_panel-bg: var(--hu-select-panel-bg, var(--hu-surface-2));border-color:var(--hu-border-strong)}.hu-select__panel:popover-open{display:flex;animation:hu-select-in .14s cubic-bezier(.2,.9,.3,1)}.hu-select__panel--inline{position:absolute;top:calc(100% + 6px);left:0;z-index:1000;display:flex;width:100%}.hu-select__panel--inline[hidden]{display:none}.hu-select__search{display:flex;flex-shrink:0;align-items:center;gap:var(--hu-space-2);margin:var(--hu-space-2) var(--hu-space-2) 0;padding:0 var(--hu-space-3);height:2.25rem;color:var(--hu-text-subtle);background:var(--hu-surface-2);border:1px solid transparent;border-radius:var(--hu-radius-md);transition:border-color var(--hu-transition),background-color var(--hu-transition)}:root[data-theme=dark] .hu-select__search{background:var(--hu-surface-3)}.hu-select__search:focus-within{color:var(--hu-primary);background:var(--_panel-bg);border-color:color-mix(in srgb,var(--hu-primary) 45%,transparent)}.hu-select__search>hu-icon{flex-shrink:0}.hu-select__search>input{flex:1;min-width:0;height:100%;padding:0;font:inherit;font-size:var(--hu-text-sm);color:var(--hu-text);background:none;border:0;outline:none}.hu-select__search>input::placeholder{color:var(--hu-text-subtle)}.hu-select__list{max-height:var(--hu-select-max-height, 17rem);margin:0;padding:var(--hu-space-1-5, 6px);overflow-y:auto;list-style:none;outline:none;scrollbar-width:thin}.hu-select__group{padding:var(--hu-space-3) var(--hu-space-2) var(--hu-space-1);font-size:.6875rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--hu-text-subtle)}.hu-select__group:first-child{padding-top:var(--hu-space-1)}.hu-select__option{position:relative;display:flex;align-items:center;gap:var(--hu-space-2);min-height:2.25rem;padding:var(--hu-space-2) var(--hu-space-2) var(--hu-space-2) var(--hu-space-3);font-size:var(--hu-text-sm);line-height:1.35;border-radius:var(--hu-radius-md);cursor:pointer;-webkit-user-select:none;user-select:none}.hu-select__option--active{background:var(--hu-surface-3)}.hu-select__option--selected{font-weight:500;color:var(--hu-primary-soft-fg);background:var(--hu-primary-soft)}.hu-select__option--selected .hu-select__option-icon{color:var(--hu-primary)}.hu-select__option--selected.hu-select__option--active{background:var(--hu-primary-soft-hover)}.hu-select__option--disabled{opacity:.45;cursor:not-allowed}.hu-select__option-icon{flex-shrink:0;color:var(--hu-text-subtle)}.hu-select__option-text{display:flex;flex:1;flex-direction:column;min-width:0}.hu-select__option-desc{font-size:var(--hu-text-xs);font-weight:400;color:var(--hu-text-subtle)}.hu-select__check{flex-shrink:0;color:var(--hu-primary)}.hu-select__empty{display:flex;flex-direction:column;align-items:center;gap:var(--hu-space-2);padding:var(--hu-space-5) var(--hu-space-2);font-size:var(--hu-text-sm);color:var(--hu-text-subtle);text-align:center}@keyframes hu-select-in{0%{opacity:0;transform:translateY(-6px) scale(.98)}}\n"],
8294
+ dependencies: [{
8295
+ kind: "component",
8296
+ type: HuIcon,
8297
+ selector: "hu-icon",
8298
+ inputs: [
8299
+ "name",
8300
+ "size",
8301
+ "strokeWidth",
8302
+ "label"
8303
+ ]
8304
+ }],
8305
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
8306
+ encapsulation: i0.ViewEncapsulation.None
8307
+ });
8308
+ };
8309
+ i0.ɵɵngDeclareClassMetadata({
8310
+ minVersion: "12.0.0",
8311
+ version: "22.2.0",
8312
+ ngImport: i0,
8313
+ type: HuSelect,
8314
+ decorators: [{
8315
+ type: Component,
8316
+ args: [{
8317
+ selector: "hu-select",
8318
+ imports: [HuIcon],
8319
+ providers: [{
8320
+ provide: NG_VALUE_ACCESSOR,
8321
+ useExisting: forwardRef(() => HuSelect),
8322
+ multi: true
8323
+ }, {
8324
+ provide: HuFormFieldControl,
8325
+ useExisting: forwardRef(() => HuSelect)
8326
+ }],
8327
+ host: {
8328
+ class: "hu-select",
8329
+ "[class.hu-select--open]": "open()",
8330
+ "[class.hu-select--disabled]": "isDisabled()",
8331
+ "[attr.data-size]": "size()",
8332
+ "(focusout)": "onFocusOut($event)",
8333
+ "(document:mousedown)": "onDocumentPointer($event)"
8334
+ },
8335
+ encapsulation: ViewEncapsulation.None,
8336
+ changeDetection: ChangeDetectionStrategy.OnPush,
8337
+ template: "<div\n #trigger\n class=\"hu-select__trigger\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [id]=\"id()\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-describedby]=\"field?.describedBy() ?? null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [class.hu-select__trigger--invalid]=\"isInvalid()\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\"\n>\n @if (selectedOption(); as s) {\n @if (s.icon) {\n <hu-icon class=\"hu-select__value-icon\" [name]=\"s.icon\" [size]=\"16\" />\n }\n <span class=\"hu-select__value\">{{ s.label }}</span>\n } @else {\n <span class=\"hu-select__placeholder\">{{ placeholder() }}</span>\n }\n @if (showClear() && selectedOption() && !isDisabled()) {\n <button type=\"button\" class=\"hu-select__clear\" tabindex=\"-1\" aria-label=\"Seçimi temizle\" (click)=\"clear($event)\">\n <hu-icon name=\"x\" [size]=\"14\" />\n </button>\n }\n <hu-icon class=\"hu-select__caret\" name=\"chevron-down\" [size]=\"16\" />\n</div>\n\n<div\n #panel\n popover=\"manual\"\n class=\"hu-select__panel\"\n [class.hu-select__panel--inline]=\"!supportsPopover\"\n [attr.hidden]=\"!supportsPopover && !open() ? '' : null\"\n (keydown)=\"onPanelKeydown($event)\"\n>\n @if (open()) {\n @if (showFilter()) {\n <div class=\"hu-select__search\">\n <hu-icon name=\"search\" [size]=\"15\" />\n <input\n #search\n type=\"text\"\n role=\"searchbox\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [attr.aria-label]=\"filterPlaceholder()\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-activedescendant]=\"activeIndex() >= 0 ? optionId(activeIndex()) : null\"\n [placeholder]=\"filterPlaceholder()\"\n [value]=\"query()\"\n (input)=\"onQuery($any($event.target).value)\"\n />\n </div>\n }\n\n <ul\n #listbox\n class=\"hu-select__list\"\n role=\"listbox\"\n [id]=\"listId\"\n [attr.tabindex]=\"showFilter() ? -1 : 0\"\n [attr.aria-label]=\"ariaLabel() || placeholder()\"\n [attr.aria-activedescendant]=\"!showFilter() && activeIndex() >= 0 ? optionId(activeIndex()) : null\"\n >\n @for (row of rows(); track $index) {\n @if (row.kind === 'group') {\n <li class=\"hu-select__group\" role=\"presentation\">{{ row.label }}</li>\n } @else {\n @let o = row.option;\n @let selected = isSelected(o);\n <li\n class=\"hu-select__option\"\n role=\"option\"\n [id]=\"optionId(row.index)\"\n [attr.aria-selected]=\"selected\"\n [attr.aria-disabled]=\"o.disabled || null\"\n [class.hu-select__option--active]=\"row.index === activeIndex()\"\n [class.hu-select__option--selected]=\"selected\"\n [class.hu-select__option--disabled]=\"o.disabled\"\n (mousedown)=\"$event.preventDefault()\"\n (mousemove)=\"onOptionHover(row.index, o)\"\n (click)=\"choose(o)\"\n >\n @if (o.icon) {\n <hu-icon class=\"hu-select__option-icon\" [name]=\"o.icon\" [size]=\"16\" />\n }\n <span class=\"hu-select__option-text\">\n <span class=\"hu-select__option-label\">{{ o.label }}</span>\n @if (o.description) {\n <span class=\"hu-select__option-desc\">{{ o.description }}</span>\n }\n </span>\n @if (selected) {\n <hu-icon class=\"hu-select__check\" name=\"check\" [size]=\"16\" />\n }\n </li>\n }\n } @empty {\n <li class=\"hu-select__empty\" role=\"presentation\">\n <hu-icon name=\"search\" [size]=\"18\" />\n {{ emptyMessage() }}\n </li>\n }\n </ul>\n }\n</div>\n",
8338
+ styles: [".hu-select{position:relative;display:block;width:100%;min-width:0}.hu-select__trigger{display:flex;align-items:center;gap:var(--hu-space-2);height:var(--hu-control-md);padding:0 var(--hu-space-2) 0 var(--hu-space-3);font-size:var(--hu-text-sm);color:var(--hu-text);background:var(--hu-surface);border:1px solid var(--hu-border-strong);border-radius:var(--hu-radius-md);box-shadow:var(--hu-shadow-sm);cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color var(--hu-transition),box-shadow var(--hu-transition)}.hu-select__trigger:hover:not([aria-disabled=true]):not(:focus){border-color:var(--hu-gray-400)}.hu-select__trigger:focus,.hu-select--open .hu-select__trigger{outline:none;border-color:var(--hu-primary);box-shadow:var(--hu-ring);transition:none}.hu-select__trigger--invalid,.hu-select__trigger--invalid:hover:not(:focus){border-color:var(--hu-danger)}.hu-select__trigger--invalid:focus{box-shadow:var(--hu-ring-danger)}.hu-select--disabled .hu-select__trigger{color:var(--hu-text-subtle);background:var(--hu-surface-3);box-shadow:none;cursor:not-allowed}[data-size=sm] .hu-select__trigger{height:var(--hu-control-sm);padding-left:var(--hu-space-2);font-size:.8125rem}[data-size=lg] .hu-select__trigger{height:var(--hu-control-lg);padding-left:var(--hu-space-4);font-size:var(--hu-text-md)}.hu-select__value,.hu-select__placeholder{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hu-select__placeholder{color:var(--hu-text-subtle)}.hu-select__value-icon{flex-shrink:0;color:var(--hu-text-muted)}.hu-select__clear{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;padding:0;color:var(--hu-text-subtle);background:none;border:0;border-radius:var(--hu-radius-sm);cursor:pointer}.hu-select__clear:hover{color:var(--hu-text);background:var(--hu-surface-3)}.hu-select__caret{flex-shrink:0;color:var(--hu-text-subtle);transition:transform var(--hu-transition)}.hu-select--open .hu-select__caret{color:var(--hu-primary);transform:rotate(180deg)}.hu-select__panel{--_panel-bg: var(--hu-select-panel-bg, var(--hu-surface));position:fixed;inset:auto;flex-direction:column;min-width:12rem;max-width:min(32rem,100vw - 1rem);margin:0;padding:0;overflow:hidden;color:var(--hu-text);background:var(--_panel-bg);border:1px solid var(--hu-border);border-radius:var(--hu-radius-lg);box-shadow:var(--hu-shadow-lg)}:root[data-theme=dark] .hu-select__panel{--_panel-bg: var(--hu-select-panel-bg, var(--hu-surface-2));border-color:var(--hu-border-strong)}.hu-select__panel:popover-open{display:flex;animation:hu-select-in .14s cubic-bezier(.2,.9,.3,1)}.hu-select__panel--inline{position:absolute;top:calc(100% + 6px);left:0;z-index:1000;display:flex;width:100%}.hu-select__panel--inline[hidden]{display:none}.hu-select__search{display:flex;flex-shrink:0;align-items:center;gap:var(--hu-space-2);margin:var(--hu-space-2) var(--hu-space-2) 0;padding:0 var(--hu-space-3);height:2.25rem;color:var(--hu-text-subtle);background:var(--hu-surface-2);border:1px solid transparent;border-radius:var(--hu-radius-md);transition:border-color var(--hu-transition),background-color var(--hu-transition)}:root[data-theme=dark] .hu-select__search{background:var(--hu-surface-3)}.hu-select__search:focus-within{color:var(--hu-primary);background:var(--_panel-bg);border-color:color-mix(in srgb,var(--hu-primary) 45%,transparent)}.hu-select__search>hu-icon{flex-shrink:0}.hu-select__search>input{flex:1;min-width:0;height:100%;padding:0;font:inherit;font-size:var(--hu-text-sm);color:var(--hu-text);background:none;border:0;outline:none}.hu-select__search>input::placeholder{color:var(--hu-text-subtle)}.hu-select__list{max-height:var(--hu-select-max-height, 17rem);margin:0;padding:var(--hu-space-1-5, 6px);overflow-y:auto;list-style:none;outline:none;scrollbar-width:thin}.hu-select__group{padding:var(--hu-space-3) var(--hu-space-2) var(--hu-space-1);font-size:.6875rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--hu-text-subtle)}.hu-select__group:first-child{padding-top:var(--hu-space-1)}.hu-select__option{position:relative;display:flex;align-items:center;gap:var(--hu-space-2);min-height:2.25rem;padding:var(--hu-space-2) var(--hu-space-2) var(--hu-space-2) var(--hu-space-3);font-size:var(--hu-text-sm);line-height:1.35;border-radius:var(--hu-radius-md);cursor:pointer;-webkit-user-select:none;user-select:none}.hu-select__option--active{background:var(--hu-surface-3)}.hu-select__option--selected{font-weight:500;color:var(--hu-primary-soft-fg);background:var(--hu-primary-soft)}.hu-select__option--selected .hu-select__option-icon{color:var(--hu-primary)}.hu-select__option--selected.hu-select__option--active{background:var(--hu-primary-soft-hover)}.hu-select__option--disabled{opacity:.45;cursor:not-allowed}.hu-select__option-icon{flex-shrink:0;color:var(--hu-text-subtle)}.hu-select__option-text{display:flex;flex:1;flex-direction:column;min-width:0}.hu-select__option-desc{font-size:var(--hu-text-xs);font-weight:400;color:var(--hu-text-subtle)}.hu-select__check{flex-shrink:0;color:var(--hu-primary)}.hu-select__empty{display:flex;flex-direction:column;align-items:center;gap:var(--hu-space-2);padding:var(--hu-space-5) var(--hu-space-2);font-size:var(--hu-text-sm);color:var(--hu-text-subtle);text-align:center}@keyframes hu-select-in{0%{opacity:0;transform:translateY(-6px) scale(.98)}}\n"]
8339
+ }]
8340
+ }],
8341
+ ctorParameters: () => [],
8342
+ propDecorators: {
8343
+ options: [{
8344
+ type: i0.Input,
8345
+ args: [{
8346
+ isSignal: true,
8347
+ alias: "options",
8348
+ required: false
8349
+ }]
8350
+ }],
8351
+ value: [{
8352
+ type: i0.Input,
8353
+ args: [{
8354
+ isSignal: true,
8355
+ alias: "value",
8356
+ required: false
8357
+ }]
8358
+ }, {
8359
+ type: i0.Output,
8360
+ args: ["valueChange"]
8361
+ }],
8362
+ placeholder: [{
8363
+ type: i0.Input,
8364
+ args: [{
8365
+ isSignal: true,
8366
+ alias: "placeholder",
8367
+ required: false
8368
+ }]
8369
+ }],
8370
+ filter: [{
8371
+ type: i0.Input,
8372
+ args: [{
8373
+ isSignal: true,
8374
+ alias: "filter",
8375
+ required: false
8376
+ }]
8377
+ }],
8378
+ filterThreshold: [{
8379
+ type: i0.Input,
8380
+ args: [{
8381
+ isSignal: true,
8382
+ alias: "filterThreshold",
8383
+ required: false
8384
+ }]
8385
+ }],
8386
+ filterPlaceholder: [{
8387
+ type: i0.Input,
8388
+ args: [{
8389
+ isSignal: true,
8390
+ alias: "filterPlaceholder",
8391
+ required: false
8392
+ }]
8393
+ }],
8394
+ showClear: [{
8395
+ type: i0.Input,
8396
+ args: [{
8397
+ isSignal: true,
8398
+ alias: "showClear",
8399
+ required: false
8400
+ }]
8401
+ }],
8402
+ emptyMessage: [{
8403
+ type: i0.Input,
8404
+ args: [{
8405
+ isSignal: true,
8406
+ alias: "emptyMessage",
8407
+ required: false
8408
+ }]
8409
+ }],
8410
+ size: [{
8411
+ type: i0.Input,
8412
+ args: [{
8413
+ isSignal: true,
8414
+ alias: "size",
8415
+ required: false
8416
+ }]
8417
+ }],
8418
+ disabled: [{
8419
+ type: i0.Input,
8420
+ args: [{
8421
+ isSignal: true,
8422
+ alias: "disabled",
8423
+ required: false
8424
+ }]
8425
+ }],
8426
+ ariaLabel: [{
8427
+ type: i0.Input,
8428
+ args: [{
8429
+ isSignal: true,
8430
+ alias: "ariaLabel",
8431
+ required: false
8432
+ }]
8433
+ }],
8434
+ id: [{
8435
+ type: i0.Input,
8436
+ args: [{
8437
+ isSignal: true,
8438
+ alias: "id",
8439
+ required: false
8440
+ }]
8441
+ }],
8442
+ compareWith: [{
8443
+ type: i0.Input,
8444
+ args: [{
8445
+ isSignal: true,
8446
+ alias: "compareWith",
8447
+ required: false
8448
+ }]
8449
+ }],
8450
+ selectionChange: [{
8451
+ type: i0.Output,
8452
+ args: ["selectionChange"]
8453
+ }],
8454
+ closed: [{
8455
+ type: i0.Output,
8456
+ args: ["closed"]
8457
+ }],
8458
+ trigger: [{
8459
+ type: i0.ViewChild,
8460
+ args: ["trigger", { isSignal: true }]
8461
+ }],
8462
+ panel: [{
8463
+ type: i0.ViewChild,
8464
+ args: ["panel", { isSignal: true }]
8465
+ }],
8466
+ search: [{
8467
+ type: i0.ViewChild,
8468
+ args: ["search", { isSignal: true }]
8469
+ }],
8470
+ listbox: [{
8471
+ type: i0.ViewChild,
8472
+ args: ["listbox", { isSignal: true }]
8473
+ }]
8474
+ }
8475
+ });
7828
8476
  const HU_MASKS = {
7829
8477
  phone: "(999) 999 99 99",
7830
8478
  mobile: "0(999) 999 99 99",
@@ -16162,7 +16810,7 @@ var HuTreeSelect = class HuTreeSelect {
16162
16810
  ],
16163
16811
  ngImport: i0,
16164
16812
  template: "<div\r\n #trigger\r\n class=\"hu-tree-select__trigger\"\r\n role=\"combobox\"\r\n aria-haspopup=\"tree\"\r\n [id]=\"id()\"\r\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\r\n [attr.aria-expanded]=\"open()\"\r\n [attr.aria-controls]=\"panelId\"\r\n [attr.aria-disabled]=\"isDisabled() || null\"\r\n [attr.aria-invalid]=\"isInvalid() || null\"\r\n [attr.aria-describedby]=\"field?.describedBy() ?? null\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n [class.hu-tree-select__trigger--invalid]=\"isInvalid()\"\r\n (click)=\"toggle()\"\r\n (keydown)=\"onTriggerKeydown($event)\"\r\n>\r\n <div class=\"hu-tree-select__values\">\r\n @if (!selectedNodes().length) {\r\n <span class=\"hu-tree-select__placeholder\">{{ placeholder() }}</span>\r\n } @else if (showChips()) {\r\n @for (n of selectedNodes(); track n.key) {\r\n <span class=\"hu-tree-select__chip\">\r\n @if (n.icon) {\r\n <hu-icon [name]=\"n.icon\" [size]=\"12\" />\r\n }\r\n <span class=\"hu-tree-select__chip-text\">{{ n.label }}</span>\r\n @if (!isDisabled()) {\r\n <button type=\"button\" class=\"hu-tree-select__chip-remove\" tabindex=\"-1\" [attr.aria-label]=\"n.label + ' kaldır'\" (click)=\"remove(n, $event)\">\r\n <hu-icon name=\"x\" [size]=\"12\" />\r\n </button>\r\n }\r\n </span>\r\n }\r\n } @else {\r\n @if (selectionMode() === 'single' && selectedNodes()[0].icon) {\r\n <hu-icon class=\"hu-tree-select__value-icon\" [name]=\"selectedNodes()[0].icon!\" [size]=\"16\" />\r\n }\r\n <span class=\"hu-tree-select__text\">{{ summary() }}</span>\r\n }\r\n </div>\r\n @if (showClear() && selectedNodes().length && !isDisabled()) {\r\n <button type=\"button\" class=\"hu-tree-select__icon-btn\" tabindex=\"-1\" aria-label=\"Seçimi temizle\" (click)=\"clearAll($event)\">\r\n <hu-icon name=\"x\" [size]=\"14\" />\r\n </button>\r\n }\r\n <hu-icon class=\"hu-tree-select__caret\" name=\"chevron-down\" [size]=\"16\" />\r\n</div>\r\n\r\n<div\r\n #panel\r\n popover=\"manual\"\r\n class=\"hu-tree-select__panel\"\r\n [id]=\"panelId\"\r\n [class.hu-tree-select__panel--inline]=\"!supportsPopover\"\r\n [attr.hidden]=\"!supportsPopover && !open() ? '' : null\"\r\n [style.--hu-tree-select-height]=\"panelHeight()\"\r\n (keydown)=\"onPanelKeydown($event)\"\r\n>\r\n <hu-tree\r\n [nodes]=\"nodes()\"\r\n [selectionMode]=\"selectionMode()\"\r\n [selection]=\"keys()\"\r\n (selectionChange)=\"onTreeSelection($event)\"\r\n [(expanded)]=\"expanded\"\r\n [filter]=\"filter()\"\r\n [filterPlaceholder]=\"filterPlaceholder()\"\r\n [propagate]=\"propagate()\"\r\n [loadChildren]=\"loadChildren()\"\r\n [emptyMessage]=\"emptyMessage()\"\r\n [ariaLabel]=\"ariaLabel() || placeholder()\"\r\n (nodeSelect)=\"onNodeSelect($event)\"\r\n (nodeUnselect)=\"onNodeUnselect($event)\"\r\n />\r\n</div>\r\n",
16165
- styles: [".hu-tree-select{position:relative;display:block;width:100%;min-width:0}.hu-tree-select__trigger{display:flex;align-items:center;gap:var(--hu-space-1);min-height:var(--hu-control-md);padding:3px var(--hu-space-2) 3px var(--hu-space-3);font-size:var(--hu-text-sm);color:var(--hu-text);background:var(--hu-surface);border:1px solid var(--hu-border-strong);border-radius:var(--hu-radius-md);box-shadow:var(--hu-shadow-sm);cursor:pointer;transition:border-color var(--hu-transition),box-shadow var(--hu-transition)}.hu-tree-select__trigger:hover:not([aria-disabled=true]):not(:focus){border-color:var(--hu-gray-400)}.hu-tree-select__trigger:focus,.hu-tree-select--open .hu-tree-select__trigger{outline:none;border-color:var(--hu-primary);box-shadow:var(--hu-ring)}.hu-tree-select__trigger--invalid,.hu-tree-select__trigger--invalid:hover:not(:focus){border-color:var(--hu-danger)}.hu-tree-select__trigger--invalid:focus{box-shadow:var(--hu-ring-danger)}.hu-tree-select--disabled .hu-tree-select__trigger{color:var(--hu-text-subtle);background:var(--hu-surface-3);box-shadow:none;cursor:not-allowed}[data-size=sm] .hu-tree-select__trigger{min-height:var(--hu-control-sm);padding-left:var(--hu-space-2);font-size:.8125rem}[data-size=lg] .hu-tree-select__trigger{min-height:var(--hu-control-lg);padding-left:var(--hu-space-4);font-size:var(--hu-text-md)}.hu-tree-select__values{display:flex;flex:1;flex-wrap:wrap;align-items:center;gap:4px;min-width:0}.hu-tree-select__placeholder{color:var(--hu-text-subtle)}.hu-tree-select__value-icon{flex-shrink:0;color:var(--hu-text-muted)}.hu-tree-select__text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hu-tree-select__chip{display:inline-flex;align-items:center;gap:4px;max-width:100%;height:1.5rem;padding:0 2px 0 var(--hu-space-2);font-size:var(--hu-text-xs);font-weight:500;color:var(--hu-primary-soft-fg);white-space:nowrap;background:var(--hu-primary-soft);border-radius:var(--hu-radius-sm)}.hu-tree-select__chip-text{overflow:hidden;text-overflow:ellipsis}.hu-tree-select__chip-remove,.hu-tree-select__icon-btn{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:0;color:inherit;background:none;border:0;border-radius:var(--hu-radius-sm);cursor:pointer;opacity:.7}.hu-tree-select__chip-remove:hover,.hu-tree-select__icon-btn:hover{opacity:1;background:#00000014}.hu-tree-select__chip-remove{width:1.125rem;height:1.125rem}.hu-tree-select__icon-btn{width:1.5rem;height:1.5rem;color:var(--hu-text-subtle)}.hu-tree-select__caret{flex-shrink:0;color:var(--hu-text-subtle);transition:transform var(--hu-transition)}.hu-tree-select--open .hu-tree-select__caret{transform:rotate(180deg)}.hu-tree-select__panel{position:fixed;inset:auto;flex-direction:column;min-width:14rem;max-width:calc(100vw - 1rem);margin:0;padding:var(--hu-space-2);color:var(--hu-text);background:var(--hu-surface);border:1px solid var(--hu-border);border-radius:var(--hu-radius-lg);box-shadow:var(--hu-shadow-lg)}.hu-tree-select__panel:popover-open{display:flex;animation:hu-tree-select-in .12s ease-out}.hu-tree-select__panel--inline{position:absolute;top:calc(100% + 4px);left:0;z-index:1000;display:flex;width:100%}.hu-tree-select__panel--inline[hidden]{display:none}.hu-tree-select__panel .hu-tree{min-height:0}.hu-tree-select__panel .hu-tree__list{max-height:var(--hu-tree-select-height, 18rem);overflow-y:auto}@keyframes hu-tree-select-in{0%{opacity:0;transform:translateY(-4px)}}@media(prefers-reduced-motion:reduce){.hu-tree-select__panel:popover-open{animation:none}}\n"],
16813
+ styles: [".hu-tree-select{position:relative;display:block;width:100%;min-width:0}.hu-tree-select__trigger{display:flex;align-items:center;gap:var(--hu-space-1);min-height:var(--hu-control-md);padding:3px var(--hu-space-2) 3px var(--hu-space-3);font-size:var(--hu-text-sm);color:var(--hu-text);background:var(--hu-surface);border:1px solid var(--hu-border-strong);border-radius:var(--hu-radius-md);box-shadow:var(--hu-shadow-sm);cursor:pointer;transition:border-color var(--hu-transition),box-shadow var(--hu-transition)}.hu-tree-select__trigger:hover:not([aria-disabled=true]):not(:focus){border-color:var(--hu-gray-400)}.hu-tree-select__trigger:focus,.hu-tree-select--open .hu-tree-select__trigger{outline:none;border-color:var(--hu-primary);box-shadow:var(--hu-ring);transition:none}.hu-tree-select__trigger--invalid,.hu-tree-select__trigger--invalid:hover:not(:focus){border-color:var(--hu-danger)}.hu-tree-select__trigger--invalid:focus{box-shadow:var(--hu-ring-danger)}.hu-tree-select--disabled .hu-tree-select__trigger{color:var(--hu-text-subtle);background:var(--hu-surface-3);box-shadow:none;cursor:not-allowed}[data-size=sm] .hu-tree-select__trigger{min-height:var(--hu-control-sm);padding-left:var(--hu-space-2);font-size:.8125rem}[data-size=lg] .hu-tree-select__trigger{min-height:var(--hu-control-lg);padding-left:var(--hu-space-4);font-size:var(--hu-text-md)}.hu-tree-select__values{display:flex;flex:1;flex-wrap:wrap;align-items:center;gap:4px;min-width:0}.hu-tree-select__placeholder{color:var(--hu-text-subtle)}.hu-tree-select__value-icon{flex-shrink:0;color:var(--hu-text-muted)}.hu-tree-select__text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hu-tree-select__chip{display:inline-flex;align-items:center;gap:4px;max-width:100%;height:1.5rem;padding:0 2px 0 var(--hu-space-2);font-size:var(--hu-text-xs);font-weight:500;color:var(--hu-primary-soft-fg);white-space:nowrap;background:var(--hu-primary-soft);border-radius:var(--hu-radius-sm)}.hu-tree-select__chip-text{overflow:hidden;text-overflow:ellipsis}.hu-tree-select__chip-remove,.hu-tree-select__icon-btn{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:0;color:inherit;background:none;border:0;border-radius:var(--hu-radius-sm);cursor:pointer;opacity:.7}.hu-tree-select__chip-remove:hover,.hu-tree-select__icon-btn:hover{opacity:1;background:#00000014}.hu-tree-select__chip-remove{width:1.125rem;height:1.125rem}.hu-tree-select__icon-btn{width:1.5rem;height:1.5rem;color:var(--hu-text-subtle)}.hu-tree-select__caret{flex-shrink:0;color:var(--hu-text-subtle);transition:transform var(--hu-transition)}.hu-tree-select--open .hu-tree-select__caret{transform:rotate(180deg)}.hu-tree-select__panel{position:fixed;inset:auto;flex-direction:column;min-width:14rem;max-width:calc(100vw - 1rem);margin:0;padding:var(--hu-space-2);color:var(--hu-text);background:var(--hu-surface);border:1px solid var(--hu-border);border-radius:var(--hu-radius-lg);box-shadow:var(--hu-shadow-lg)}.hu-tree-select__panel:popover-open{display:flex;animation:hu-tree-select-in .12s ease-out}.hu-tree-select__panel--inline{position:absolute;top:calc(100% + 4px);left:0;z-index:1000;display:flex;width:100%}.hu-tree-select__panel--inline[hidden]{display:none}.hu-tree-select__panel .hu-tree{min-height:0}.hu-tree-select__panel .hu-tree__list{max-height:var(--hu-tree-select-height, 18rem);overflow-y:auto}@keyframes hu-tree-select-in{0%{opacity:0;transform:translateY(-4px)}}@media(prefers-reduced-motion:reduce){.hu-tree-select__panel:popover-open{animation:none}}\n"],
16166
16814
  dependencies: [{
16167
16815
  kind: "component",
16168
16816
  type: HuIcon,
@@ -16231,7 +16879,7 @@ i0.ɵɵngDeclareClassMetadata({
16231
16879
  encapsulation: ViewEncapsulation.None,
16232
16880
  changeDetection: ChangeDetectionStrategy.OnPush,
16233
16881
  template: "<div\r\n #trigger\r\n class=\"hu-tree-select__trigger\"\r\n role=\"combobox\"\r\n aria-haspopup=\"tree\"\r\n [id]=\"id()\"\r\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\r\n [attr.aria-expanded]=\"open()\"\r\n [attr.aria-controls]=\"panelId\"\r\n [attr.aria-disabled]=\"isDisabled() || null\"\r\n [attr.aria-invalid]=\"isInvalid() || null\"\r\n [attr.aria-describedby]=\"field?.describedBy() ?? null\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n [class.hu-tree-select__trigger--invalid]=\"isInvalid()\"\r\n (click)=\"toggle()\"\r\n (keydown)=\"onTriggerKeydown($event)\"\r\n>\r\n <div class=\"hu-tree-select__values\">\r\n @if (!selectedNodes().length) {\r\n <span class=\"hu-tree-select__placeholder\">{{ placeholder() }}</span>\r\n } @else if (showChips()) {\r\n @for (n of selectedNodes(); track n.key) {\r\n <span class=\"hu-tree-select__chip\">\r\n @if (n.icon) {\r\n <hu-icon [name]=\"n.icon\" [size]=\"12\" />\r\n }\r\n <span class=\"hu-tree-select__chip-text\">{{ n.label }}</span>\r\n @if (!isDisabled()) {\r\n <button type=\"button\" class=\"hu-tree-select__chip-remove\" tabindex=\"-1\" [attr.aria-label]=\"n.label + ' kaldır'\" (click)=\"remove(n, $event)\">\r\n <hu-icon name=\"x\" [size]=\"12\" />\r\n </button>\r\n }\r\n </span>\r\n }\r\n } @else {\r\n @if (selectionMode() === 'single' && selectedNodes()[0].icon) {\r\n <hu-icon class=\"hu-tree-select__value-icon\" [name]=\"selectedNodes()[0].icon!\" [size]=\"16\" />\r\n }\r\n <span class=\"hu-tree-select__text\">{{ summary() }}</span>\r\n }\r\n </div>\r\n @if (showClear() && selectedNodes().length && !isDisabled()) {\r\n <button type=\"button\" class=\"hu-tree-select__icon-btn\" tabindex=\"-1\" aria-label=\"Seçimi temizle\" (click)=\"clearAll($event)\">\r\n <hu-icon name=\"x\" [size]=\"14\" />\r\n </button>\r\n }\r\n <hu-icon class=\"hu-tree-select__caret\" name=\"chevron-down\" [size]=\"16\" />\r\n</div>\r\n\r\n<div\r\n #panel\r\n popover=\"manual\"\r\n class=\"hu-tree-select__panel\"\r\n [id]=\"panelId\"\r\n [class.hu-tree-select__panel--inline]=\"!supportsPopover\"\r\n [attr.hidden]=\"!supportsPopover && !open() ? '' : null\"\r\n [style.--hu-tree-select-height]=\"panelHeight()\"\r\n (keydown)=\"onPanelKeydown($event)\"\r\n>\r\n <hu-tree\r\n [nodes]=\"nodes()\"\r\n [selectionMode]=\"selectionMode()\"\r\n [selection]=\"keys()\"\r\n (selectionChange)=\"onTreeSelection($event)\"\r\n [(expanded)]=\"expanded\"\r\n [filter]=\"filter()\"\r\n [filterPlaceholder]=\"filterPlaceholder()\"\r\n [propagate]=\"propagate()\"\r\n [loadChildren]=\"loadChildren()\"\r\n [emptyMessage]=\"emptyMessage()\"\r\n [ariaLabel]=\"ariaLabel() || placeholder()\"\r\n (nodeSelect)=\"onNodeSelect($event)\"\r\n (nodeUnselect)=\"onNodeUnselect($event)\"\r\n />\r\n</div>\r\n",
16234
- styles: [".hu-tree-select{position:relative;display:block;width:100%;min-width:0}.hu-tree-select__trigger{display:flex;align-items:center;gap:var(--hu-space-1);min-height:var(--hu-control-md);padding:3px var(--hu-space-2) 3px var(--hu-space-3);font-size:var(--hu-text-sm);color:var(--hu-text);background:var(--hu-surface);border:1px solid var(--hu-border-strong);border-radius:var(--hu-radius-md);box-shadow:var(--hu-shadow-sm);cursor:pointer;transition:border-color var(--hu-transition),box-shadow var(--hu-transition)}.hu-tree-select__trigger:hover:not([aria-disabled=true]):not(:focus){border-color:var(--hu-gray-400)}.hu-tree-select__trigger:focus,.hu-tree-select--open .hu-tree-select__trigger{outline:none;border-color:var(--hu-primary);box-shadow:var(--hu-ring)}.hu-tree-select__trigger--invalid,.hu-tree-select__trigger--invalid:hover:not(:focus){border-color:var(--hu-danger)}.hu-tree-select__trigger--invalid:focus{box-shadow:var(--hu-ring-danger)}.hu-tree-select--disabled .hu-tree-select__trigger{color:var(--hu-text-subtle);background:var(--hu-surface-3);box-shadow:none;cursor:not-allowed}[data-size=sm] .hu-tree-select__trigger{min-height:var(--hu-control-sm);padding-left:var(--hu-space-2);font-size:.8125rem}[data-size=lg] .hu-tree-select__trigger{min-height:var(--hu-control-lg);padding-left:var(--hu-space-4);font-size:var(--hu-text-md)}.hu-tree-select__values{display:flex;flex:1;flex-wrap:wrap;align-items:center;gap:4px;min-width:0}.hu-tree-select__placeholder{color:var(--hu-text-subtle)}.hu-tree-select__value-icon{flex-shrink:0;color:var(--hu-text-muted)}.hu-tree-select__text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hu-tree-select__chip{display:inline-flex;align-items:center;gap:4px;max-width:100%;height:1.5rem;padding:0 2px 0 var(--hu-space-2);font-size:var(--hu-text-xs);font-weight:500;color:var(--hu-primary-soft-fg);white-space:nowrap;background:var(--hu-primary-soft);border-radius:var(--hu-radius-sm)}.hu-tree-select__chip-text{overflow:hidden;text-overflow:ellipsis}.hu-tree-select__chip-remove,.hu-tree-select__icon-btn{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:0;color:inherit;background:none;border:0;border-radius:var(--hu-radius-sm);cursor:pointer;opacity:.7}.hu-tree-select__chip-remove:hover,.hu-tree-select__icon-btn:hover{opacity:1;background:#00000014}.hu-tree-select__chip-remove{width:1.125rem;height:1.125rem}.hu-tree-select__icon-btn{width:1.5rem;height:1.5rem;color:var(--hu-text-subtle)}.hu-tree-select__caret{flex-shrink:0;color:var(--hu-text-subtle);transition:transform var(--hu-transition)}.hu-tree-select--open .hu-tree-select__caret{transform:rotate(180deg)}.hu-tree-select__panel{position:fixed;inset:auto;flex-direction:column;min-width:14rem;max-width:calc(100vw - 1rem);margin:0;padding:var(--hu-space-2);color:var(--hu-text);background:var(--hu-surface);border:1px solid var(--hu-border);border-radius:var(--hu-radius-lg);box-shadow:var(--hu-shadow-lg)}.hu-tree-select__panel:popover-open{display:flex;animation:hu-tree-select-in .12s ease-out}.hu-tree-select__panel--inline{position:absolute;top:calc(100% + 4px);left:0;z-index:1000;display:flex;width:100%}.hu-tree-select__panel--inline[hidden]{display:none}.hu-tree-select__panel .hu-tree{min-height:0}.hu-tree-select__panel .hu-tree__list{max-height:var(--hu-tree-select-height, 18rem);overflow-y:auto}@keyframes hu-tree-select-in{0%{opacity:0;transform:translateY(-4px)}}@media(prefers-reduced-motion:reduce){.hu-tree-select__panel:popover-open{animation:none}}\n"]
16882
+ styles: [".hu-tree-select{position:relative;display:block;width:100%;min-width:0}.hu-tree-select__trigger{display:flex;align-items:center;gap:var(--hu-space-1);min-height:var(--hu-control-md);padding:3px var(--hu-space-2) 3px var(--hu-space-3);font-size:var(--hu-text-sm);color:var(--hu-text);background:var(--hu-surface);border:1px solid var(--hu-border-strong);border-radius:var(--hu-radius-md);box-shadow:var(--hu-shadow-sm);cursor:pointer;transition:border-color var(--hu-transition),box-shadow var(--hu-transition)}.hu-tree-select__trigger:hover:not([aria-disabled=true]):not(:focus){border-color:var(--hu-gray-400)}.hu-tree-select__trigger:focus,.hu-tree-select--open .hu-tree-select__trigger{outline:none;border-color:var(--hu-primary);box-shadow:var(--hu-ring);transition:none}.hu-tree-select__trigger--invalid,.hu-tree-select__trigger--invalid:hover:not(:focus){border-color:var(--hu-danger)}.hu-tree-select__trigger--invalid:focus{box-shadow:var(--hu-ring-danger)}.hu-tree-select--disabled .hu-tree-select__trigger{color:var(--hu-text-subtle);background:var(--hu-surface-3);box-shadow:none;cursor:not-allowed}[data-size=sm] .hu-tree-select__trigger{min-height:var(--hu-control-sm);padding-left:var(--hu-space-2);font-size:.8125rem}[data-size=lg] .hu-tree-select__trigger{min-height:var(--hu-control-lg);padding-left:var(--hu-space-4);font-size:var(--hu-text-md)}.hu-tree-select__values{display:flex;flex:1;flex-wrap:wrap;align-items:center;gap:4px;min-width:0}.hu-tree-select__placeholder{color:var(--hu-text-subtle)}.hu-tree-select__value-icon{flex-shrink:0;color:var(--hu-text-muted)}.hu-tree-select__text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hu-tree-select__chip{display:inline-flex;align-items:center;gap:4px;max-width:100%;height:1.5rem;padding:0 2px 0 var(--hu-space-2);font-size:var(--hu-text-xs);font-weight:500;color:var(--hu-primary-soft-fg);white-space:nowrap;background:var(--hu-primary-soft);border-radius:var(--hu-radius-sm)}.hu-tree-select__chip-text{overflow:hidden;text-overflow:ellipsis}.hu-tree-select__chip-remove,.hu-tree-select__icon-btn{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:0;color:inherit;background:none;border:0;border-radius:var(--hu-radius-sm);cursor:pointer;opacity:.7}.hu-tree-select__chip-remove:hover,.hu-tree-select__icon-btn:hover{opacity:1;background:#00000014}.hu-tree-select__chip-remove{width:1.125rem;height:1.125rem}.hu-tree-select__icon-btn{width:1.5rem;height:1.5rem;color:var(--hu-text-subtle)}.hu-tree-select__caret{flex-shrink:0;color:var(--hu-text-subtle);transition:transform var(--hu-transition)}.hu-tree-select--open .hu-tree-select__caret{transform:rotate(180deg)}.hu-tree-select__panel{position:fixed;inset:auto;flex-direction:column;min-width:14rem;max-width:calc(100vw - 1rem);margin:0;padding:var(--hu-space-2);color:var(--hu-text);background:var(--hu-surface);border:1px solid var(--hu-border);border-radius:var(--hu-radius-lg);box-shadow:var(--hu-shadow-lg)}.hu-tree-select__panel:popover-open{display:flex;animation:hu-tree-select-in .12s ease-out}.hu-tree-select__panel--inline{position:absolute;top:calc(100% + 4px);left:0;z-index:1000;display:flex;width:100%}.hu-tree-select__panel--inline[hidden]{display:none}.hu-tree-select__panel .hu-tree{min-height:0}.hu-tree-select__panel .hu-tree__list{max-height:var(--hu-tree-select-height, 18rem);overflow-y:auto}@keyframes hu-tree-select-in{0%{opacity:0;transform:translateY(-4px)}}@media(prefers-reduced-motion:reduce){.hu-tree-select__panel:popover-open{animation:none}}\n"]
16235
16883
  }]
16236
16884
  }],
16237
16885
  ctorParameters: () => [],
@@ -20962,6 +21610,6 @@ const HU_TREE_IMPORTS = [HuTree, HuTreeNodeDef];
20962
21610
  const HU_PICKLIST_IMPORTS = [HuPickList, HuPickListItem];
20963
21611
  const HU_ORG_CHART_IMPORTS = [HuOrgChart, HuOrgChartNodeDef];
20964
21612
  const HU_CAROUSEL_IMPORTS = [HuCarousel, HuCarouselItem];
20965
- export { HU_ACCORDION_IMPORTS, HU_AGENDA_DEFAULT_CATEGORIES, HU_BUILTIN_ICONS, HU_CARD_IMPORTS, HU_CAROUSEL_IMPORTS, HU_DEFAULT_ERROR_MESSAGES, HU_DIALOG_IMPORTS, HU_DROPDOWN_IMPORTS, HU_EDITOR_BLOCKS, HU_EDITOR_BUTTONS, HU_EDITOR_DEFAULT_TOOLBAR, HU_EDITOR_HIGHLIGHT_COLORS, HU_EDITOR_MINIMAL_TOOLBAR, HU_EDITOR_TEXT_COLORS, HU_ERROR_MESSAGES, HU_FORM_FIELD, HU_FORM_FIELD_IMPORTS, HU_ICON_SETS, HU_MASKS, HU_ORG_CHART_IMPORTS, HU_PASSWORD_RULES, HU_PICKLIST_IMPORTS, HU_RADIO_IMPORTS, HU_SHELL_IMPORTS, HU_STATUS_ICONS, HU_STEPPER_IMPORTS, HU_TABLE_IMPORTS, HU_TABS_IMPORTS, HU_TIMELINE_IMPORTS, HU_TREE_IMPORTS, HuAccordion, HuAccordionPanel, HuAgenda, HuAgendaEditor, HuAlert, HuAvatar, HuBadge, HuBreadcrumb, HuButton, HuButtonGroup, HuCalendar, HuCard, HuCardActions, HuCardFooter, HuCardMedia, HuCarousel, HuCarouselItem, HuCellDef, HuCheckbox, HuConfirm, HuConfirmPopup, HuConfirmPopupService, HuContextMenu, HuContextMenuPanel, HuContextMenuService, HuDatePicker, HuDialog, HuDialogFooter, HuDivider, HuDropdown, HuDropdownHeaderSlot, HuDropdownTrigger, HuEditor, HuFieldset, HuFileUpload, HuFormField, HuFormFieldControl, HuGallery, HuIcon, HuImage, HuInput, HuInputMask, HuInputNumber, HuLightbox, HuMultiSelect, HuOrgChart, HuOrgChartNodeDef, HuPaginator, HuPassword, HuPickList, HuPickListItem, HuPrefix, HuRadio, HuRadioGroup, HuRating, HuRowDetail, HuShell, HuShellLogo, HuSidebarFooter, HuSidebarNav, HuSpinner, HuStep, HuStepper, HuStepperNext, HuStepperPrevious, HuSuffix, HuSwitch, HuTab, HuTable, HuTableBulkActions, HuTableToolbar, HuTabs, HuThemeService, HuThemeToggle, HuTimeline, HuTimelineContent, HuTimelineMarker, HuTimelineOpposite, HuToastService, HuToaster, HuTooltip, HuTopbarEnd, HuTopbarStart, HuTree, HuTreeNodeDef, HuTreeSelect, addDays, addMonths, clampDate, compareDays, daysInMonth, formatDate, formatFileSize, formatRange, huFold, huIsSafeImageSrc, huIsSafeUrl, huMediaQuery, huPasswordStrength, huSanitizeHtml, huUniqueId, isDropdownDivider, isDropdownHeader, isSameDay, isSameMonth, isValidDate, parseDate, parseRange, provideHuErrorMessages, provideHuIcons, startOfDay, startOfWeek };
21613
+ export { HU_ACCORDION_IMPORTS, HU_AGENDA_DEFAULT_CATEGORIES, HU_BUILTIN_ICONS, HU_CARD_IMPORTS, HU_CAROUSEL_IMPORTS, HU_DEFAULT_ERROR_MESSAGES, HU_DIALOG_IMPORTS, HU_DROPDOWN_IMPORTS, HU_EDITOR_BLOCKS, HU_EDITOR_BUTTONS, HU_EDITOR_DEFAULT_TOOLBAR, HU_EDITOR_HIGHLIGHT_COLORS, HU_EDITOR_MINIMAL_TOOLBAR, HU_EDITOR_TEXT_COLORS, HU_ERROR_MESSAGES, HU_FORM_FIELD, HU_FORM_FIELD_IMPORTS, HU_ICON_SETS, HU_MASKS, HU_ORG_CHART_IMPORTS, HU_PASSWORD_RULES, HU_PICKLIST_IMPORTS, HU_RADIO_IMPORTS, HU_SHELL_IMPORTS, HU_STATUS_ICONS, HU_STEPPER_IMPORTS, HU_TABLE_IMPORTS, HU_TABS_IMPORTS, HU_TIMELINE_IMPORTS, HU_TREE_IMPORTS, HuAccordion, HuAccordionPanel, HuAgenda, HuAgendaEditor, HuAlert, HuAvatar, HuBadge, HuBreadcrumb, HuButton, HuButtonGroup, HuCalendar, HuCard, HuCardActions, HuCardFooter, HuCardMedia, HuCarousel, HuCarouselItem, HuCellDef, HuCheckbox, HuConfirm, HuConfirmPopup, HuConfirmPopupService, HuContextMenu, HuContextMenuPanel, HuContextMenuService, HuDatePicker, HuDialog, HuDialogFooter, HuDivider, HuDropdown, HuDropdownHeaderSlot, HuDropdownTrigger, HuEditor, HuFieldset, HuFileUpload, HuFormField, HuFormFieldControl, HuGallery, HuIcon, HuImage, HuInput, HuInputMask, HuInputNumber, HuLightbox, HuMultiSelect, HuOrgChart, HuOrgChartNodeDef, HuPaginator, HuPassword, HuPickList, HuPickListItem, HuPrefix, HuRadio, HuRadioGroup, HuRating, HuRowDetail, HuSelect, HuShell, HuShellLogo, HuSidebarFooter, HuSidebarNav, HuSpinner, HuStep, HuStepper, HuStepperNext, HuStepperPrevious, HuSuffix, HuSwitch, HuTab, HuTable, HuTableBulkActions, HuTableToolbar, HuTabs, HuThemeService, HuThemeToggle, HuTimeline, HuTimelineContent, HuTimelineMarker, HuTimelineOpposite, HuToastService, HuToaster, HuTooltip, HuTopbarEnd, HuTopbarStart, HuTree, HuTreeNodeDef, HuTreeSelect, addDays, addMonths, clampDate, compareDays, daysInMonth, formatDate, formatFileSize, formatRange, huFold, huIsSafeImageSrc, huIsSafeUrl, huMediaQuery, huPasswordStrength, huSanitizeHtml, huUniqueId, isDropdownDivider, isDropdownHeader, isSameDay, isSameMonth, isValidDate, parseDate, parseRange, provideHuErrorMessages, provideHuIcons, startOfDay, startOfWeek };
20966
21614
 
20967
21615
  //# sourceMappingURL=ucme-ui-angular.mjs.map