@ucme-ui/angular 0.8.3 → 0.10.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.
package/API.md CHANGED
@@ -15,7 +15,7 @@ yuvaları (slot). Kurulum ve genel kullanım için [README](README.md)'ye bakın
15
15
  ## İçindekiler
16
16
 
17
17
  - **Layout:** [hu-shell](#hu-shell) · [hu-breadcrumb](#hu-breadcrumb) · [hu-theme-toggle](#hu-theme-toggle) · [Grid](#grid)
18
- - **Form:** [hu-button](#hu-button) · [hu-button-group](#hu-button-group) · [huInput](#huinput) · [hu-form-field](#hu-form-field) · [hu-checkbox](#hu-checkbox) · [hu-switch](#hu-switch) · [hu-date-picker](#hu-date-picker) · [hu-editor](#hu-editor) · [hu-input-number](#hu-input-number) · [hu-multi-select](#hu-multi-select) · [hu-password](#hu-password) · [huMask](#humask-inputmask) · [hu-radio-group](#hu-radio-group--hu-radio) · [hu-rating](#hu-rating) · [hu-file-upload](#hu-file-upload)
18
+ - **Form:** [hu-button](#hu-button) · [hu-button-group](#hu-button-group) · [huInput](#huinput) · [hu-form-field](#hu-form-field) · [hu-checkbox](#hu-checkbox) · [hu-switch](#hu-switch) · [hu-date-picker](#hu-date-picker) · [hu-editor](#hu-editor) · [hu-input-number](#hu-input-number) · [hu-select](#hu-select) · [hu-multi-select](#hu-multi-select) · [hu-password](#hu-password) · [huMask](#humask-inputmask) · [hu-radio-group](#hu-radio-group--hu-radio) · [hu-rating](#hu-rating) · [hu-file-upload](#hu-file-upload) · [hu-file-input](#hu-file-input)
19
19
  - **Tarih:** [hu-agenda](#hu-agenda) · [hu-calendar](#hu-calendar) · [tarih yardımcıları](#tarih-yardımcıları)
20
20
  - **Veri:** [hu-table](#hu-table) · [hu-paginator](#hu-paginator) · [hu-tabs](#hu-tabs--hu-tab) · [hu-stepper](#hu-stepper--hu-step) · [ContextMenu](#contextmenu-hucontextmenu) · [hu-card](#hu-card) · [hu-dropdown](#hu-dropdown)
21
21
  - **Geri bildirim:** [hu-dialog](#hu-dialog) · [ConfirmPopup](#confirmpopup-huconfirm) · [huTooltip](#hutooltip) · [HuToastService + hu-toaster](#hutoastservice--hu-toaster) · [hu-alert](#hu-alert) · [hu-badge](#hu-badge) · [hu-avatar](#hu-avatar) · [hu-spinner](#hu-spinner)
@@ -456,6 +456,44 @@ verir (`HU_DEFAULT_ERROR_MESSAGES` ile Türkçe mesaj).
456
456
  <hu-input-number [(value)]="discount" suffix="%" [min]="0" [max]="100" />
457
457
  ```
458
458
 
459
+ ### hu-select
460
+
461
+ Tek seçimli açılır liste; native `<select huInput>`'un yerine. Panel tema renklerinde ve üst katmanda açılır
462
+ (dialog içinde kesilmez). Seçenek sayısı 7'yi aşınca panelde arama kutusu çıkar; arama Türkçe karakterleri yok
463
+ sayar. Klavye: ↑/↓, PageUp/PageDown, Home/End, Enter ile seç, Esc ile kapat. Kapalıyken yazmaya başlamak paneli
464
+ açıp aramaya yazar (aramasızken o harfle başlayan seçeneğe geçer).
465
+
466
+ | Input | Tip | Varsayılan | Açıklama |
467
+ | --- | --- | --- | --- |
468
+ | `options` | `HuSelectOption<T>[]` | `[]` | `{ label, value, description?, icon?, disabled?, group? }` |
469
+ | `placeholder` | `string` | `'Seçin'` | Seçim yokken |
470
+ | `filter` | `boolean \| 'auto'` | `'auto'` | Panelde arama kutusu; `auto`: seçenek sayısı `filterThreshold`'u aşınca |
471
+ | `filterThreshold` | `number` | `7` | |
472
+ | `filterPlaceholder` | `string` | `'Ara…'` | |
473
+ | `showClear` | `boolean` | `false` | Seçimi temizleyen ✕ |
474
+ | `compareWith` | `(a: T, b: T) => boolean` | `Object.is` | Nesne değerlerde eşitlik |
475
+ | `emptyMessage` | `string` | `'Sonuç bulunamadı'` | |
476
+ | `size`, `disabled`, `ariaLabel`, `id` | | | Diğer form kontrolleriyle aynı |
477
+
478
+ | Model | Tip | Varsayılan | Açıklama |
479
+ | --- | --- | --- | --- |
480
+ | `value` | `T \| null` | `null` | Seçilen değer |
481
+
482
+ | Output | Değer | Ne zaman |
483
+ | --- | --- | --- |
484
+ | `selectionChange` | `T \| null` | Kullanıcı seçince / temizleyince |
485
+ | `closed` | `void` | Panel kapanınca |
486
+
487
+ Panel zemini `--hu-select-panel-bg`, liste yüksekliği `--hu-select-max-height` ile değiştirilebilir.
488
+
489
+ ```html
490
+ <hu-form-field label="Fakülte" required>
491
+ <hu-select formControlName="faculty" [options]="faculties" placeholder="Fakülte seçin" />
492
+ </hu-form-field>
493
+
494
+ <hu-select [options]="departments" [(value)]="department" showClear [filter]="true" />
495
+ ```
496
+
459
497
  ### hu-multi-select
460
498
 
461
499
  Çoklu seçim kutusu. Değer seçilen `value`'ların dizisidir (`T[]`, seçenek sırasıyla). Arama Türkçe karakterleri
@@ -696,6 +734,61 @@ upload: HuFileUploader = (file, progress) =>
696
734
  <hu-file-upload multiple [uploader]="upload" (uploaded)="onUploaded($event.result)" />
697
735
  ```
698
736
 
737
+ ### hu-file-input
738
+
739
+ Tek dosyalık, satır biçiminde dosya alanı: etiket, seçilen dosya, "Dosya seç / Değiştir" ve "Kaldır".
740
+ Başvuru evrakı gibi belge listeleri için. Dosya satırın üzerine sürüklenebilir; satırın boş yerine
741
+ tıklamak da seçme penceresini açar. Değer `File`, sunucuda kayıtlı dosya için `HuStoredFile`
742
+ (`{ name, size?, url? }`) veya `null`'dır. `label` verilmezse huInput yüksekliğinde sade bir alana
743
+ dönüşür ve `hu-form-field` içinde kullanılır.
744
+
745
+ | Input | Tip | Varsayılan | Açıklama |
746
+ | --- | --- | --- | --- |
747
+ | `label` | `string` | — | Satırın etiketi. `hu-form-field` içinde vermeyin |
748
+ | `required` | `boolean` | `false` | Etikette yıldız (doğrulama için `Validators.required`) |
749
+ | `hint` | `string` | otomatik | Dosya yokken görünen bilgi; verilmezse `accept` ve boyuttan üretilir |
750
+ | `placeholder` | `string` | `'Dosya seçilmedi'` | Dosya yokken metin |
751
+ | `accept` | `string` | `''` | Kabul edilen türler: `'.pdf,.docx'` |
752
+ | `maxFileSize` | `number` (bayt) | `null` | En büyük boyut |
753
+ | `uploader` | `HuFileUploader` | `null` | Verilirse dosya seçilince yüklenir; alt kenarda ilerleme çubuğu, hata olursa "tekrar dene" |
754
+ | `removable` | `boolean` | `true` | Kaldır düğmesi |
755
+ | `browseLabel` / `changeLabel` | `string` | `'Dosya seç'` / `'Değiştir'` | Düğme metinleri |
756
+ | `disabled` | `boolean` | `false` | Devre dışı |
757
+
758
+ | Model | Tip | Varsayılan | Açıklama |
759
+ | --- | --- | --- | --- |
760
+ | `value` | `File \| HuStoredFile \| null` | `null` | Seçilen dosya (form kontrolü olarak da çalışır) |
761
+
762
+ | Output | Değer | Ne zaman |
763
+ | --- | --- | --- |
764
+ | `rejected` | `HuFileRejection` | Tür veya boyut kuralına uymayan dosya; mesaj satırın altında da gösterilir |
765
+ | `uploaded` | `{ file, result }` | `uploader` başarıyla bitince |
766
+ | `uploadError` | `{ file, error }` | `uploader` hata verince |
767
+ | `removed` | `File \| HuStoredFile` | Kullanıcı dosyayı kaldırınca |
768
+
769
+ Metotlar: `browse()`, `clear()`.
770
+
771
+ ```ts
772
+ form = this.fb.group({
773
+ // Düzenleme ekranında sunucudaki dosya; url verilirse ad indirme bağlantısı olur
774
+ summary: [{ name: 'basvuru-formu.pdf', size: 48640, url: '/files/12' } as HuFileInputValue, Validators.required],
775
+ decision: [null as HuFileInputValue],
776
+ });
777
+
778
+ // Gönderirken: File ise yeni seçildi, değilse sunucudaki dosya olduğu gibi kaldı
779
+ const { summary } = this.form.getRawValue();
780
+ if (summary instanceof File) body.append('summary', summary);
781
+ ```
782
+
783
+ ```html
784
+ <hu-file-input label="Proje başvuru formu" required accept=".pdf,.docx" formControlName="summary" />
785
+ <hu-file-input label="Destek mektubu" accept=".pdf" formControlName="decision" />
786
+
787
+ <hu-form-field label="Özgeçmiş">
788
+ <hu-file-input accept=".pdf" [(value)]="cv" />
789
+ </hu-form-field>
790
+ ```
791
+
699
792
  ---
700
793
 
701
794
  ## Tarih