@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ucme-ui/angular",
3
- "version": "0.8.3",
3
+ "version": "0.10.0",
4
4
  "description": "Angular 20–22 UI component kütüphanesi ve admin layout — signals, standalone, bağımlılıksız SCSS token'ları, açık/koyu tema.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -1577,6 +1577,200 @@ export declare class HuFileUpload implements ControlValueAccessor, HuFormFieldCo
1577
1577
  }
1578
1578
  /** `1536` → `"1,5 KB"` */
1579
1579
  export declare function formatFileSize(bytes: number): string;
1580
+ /**
1581
+ * Sunucuda zaten kayıtlı bir dosya (düzenleme ekranlarında). `url` verilirse
1582
+ * dosya adı indirme bağlantısı olur.
1583
+ */
1584
+ export interface HuStoredFile {
1585
+ name: string;
1586
+ size?: number;
1587
+ url?: string;
1588
+ }
1589
+ export type HuFileInputValue = File | HuStoredFile | null;
1590
+ /**
1591
+ * Tek dosyalık, satır biçiminde dosya alanı: etiket, seçilen dosya, "Dosya seç"
1592
+ * ve "Kaldır". Belge listeleri (başvuru evrakı vb.) için; satıra dosya
1593
+ * sürükleyip bırakmak da çalışır. Değer `File`, sunucudaki dosya için
1594
+ * `HuStoredFile` veya `null`'dır.
1595
+ *
1596
+ * @example
1597
+ * <!-- Kendi etiketiyle, liste satırı -->
1598
+ * <hu-file-input label="Başvuru formu" required accept=".pdf,.docx" formControlName="summary" />
1599
+ *
1600
+ * <!-- hu-form-field içinde, input gibi -->
1601
+ * <hu-form-field label="Destek mektubu">
1602
+ * <hu-file-input [(value)]="decision" />
1603
+ * </hu-form-field>
1604
+ */
1605
+ export declare class HuFileInput implements ControlValueAccessor, HuFormFieldControl, DoCheck {
1606
+ private readonly injector;
1607
+ protected readonly field: import("@ucme-ui/angular").HuFormFieldParent | null;
1608
+ /** Seçilen dosya; sunucudaki dosya için `HuStoredFile`. */
1609
+ readonly value: import("@angular/core").ModelSignal<HuFileInputValue>;
1610
+ /** Satırın kendi etiketi. hu-form-field içinde kullanırken vermeyin. */
1611
+ readonly label: import("@angular/core").InputSignal<string | undefined>;
1612
+ /** Etiketin yanında yıldız gösterir (doğrulama için `Validators.required` kullanın). */
1613
+ readonly required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
1614
+ /** Etiketin altındaki kısa bilgi. Verilmezse kabul edilen tür ve boyuttan üretilir. */
1615
+ readonly hint: import("@angular/core").InputSignal<string | undefined>;
1616
+ /** Dosya yokken görünen metin. */
1617
+ readonly placeholder: import("@angular/core").InputSignal<string>;
1618
+ /** Kabul edilen türler, `<input accept>` biçiminde: `'.pdf,.docx'`. */
1619
+ readonly accept: import("@angular/core").InputSignal<string>;
1620
+ /** En büyük boyut (bayt). */
1621
+ readonly maxFileSize: import("@angular/core").InputSignal<number | null>;
1622
+ /** Verilirse dosya seçilince hemen yüklenir; satırda ilerleme gösterilir. */
1623
+ readonly uploader: import("@angular/core").InputSignal<HuFileUploader | null>;
1624
+ /** Silme düğmesi. Kapatılırsa dosya yalnızca değiştirilebilir. */
1625
+ readonly removable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
1626
+ readonly browseLabel: import("@angular/core").InputSignal<string>;
1627
+ readonly changeLabel: import("@angular/core").InputSignal<string>;
1628
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
1629
+ readonly id: import("@angular/core").InputSignal<string>;
1630
+ /** Kurala uymayan dosya (tür, boyut). */
1631
+ readonly rejected: import("@angular/core").OutputEmitterRef<HuFileRejection>;
1632
+ /** `uploader` başarıyla bitince. */
1633
+ readonly uploaded: import("@angular/core").OutputEmitterRef<{
1634
+ file: File;
1635
+ result: unknown;
1636
+ }>;
1637
+ readonly uploadError: import("@angular/core").OutputEmitterRef<{
1638
+ file: File;
1639
+ error: unknown;
1640
+ }>;
1641
+ /** Kullanıcı dosyayı kaldırınca; kaldırılan değer gelir. */
1642
+ readonly removed: import("@angular/core").OutputEmitterRef<File | HuStoredFile>;
1643
+ protected readonly dragging: import("@angular/core").WritableSignal<boolean>;
1644
+ protected readonly message: import("@angular/core").WritableSignal<string | null>;
1645
+ protected readonly status: import("@angular/core").WritableSignal<HuFileStatus>;
1646
+ protected readonly progress: import("@angular/core").WritableSignal<number>;
1647
+ private readonly formDisabled;
1648
+ protected readonly isDisabled: import("@angular/core").Signal<boolean>;
1649
+ protected readonly labelId: import("@angular/core").Signal<string>;
1650
+ protected readonly hintId: import("@angular/core").Signal<string>;
1651
+ protected readonly messageId: import("@angular/core").Signal<string>;
1652
+ /** Ekranda gösterilecek dosya bilgisi. */
1653
+ protected readonly display: import("@angular/core").Signal<{
1654
+ name: string;
1655
+ size: number | null;
1656
+ url: string | null;
1657
+ icon: string;
1658
+ stored: boolean;
1659
+ } | null>;
1660
+ protected readonly hintText: import("@angular/core").Signal<string>;
1661
+ protected readonly describedBy: import("@angular/core").Signal<string | null>;
1662
+ protected readonly formatSize: typeof formatFileSize;
1663
+ private readonly input;
1664
+ private readonly browseButton;
1665
+ private dragDepth;
1666
+ /** Sürmekte olan yüklemeyi tanımak için; dosya değişince eski sonuç yok sayılır. */
1667
+ private uploading;
1668
+ private onChange;
1669
+ private onTouched;
1670
+ private ngControl;
1671
+ get hasControl(): boolean;
1672
+ readonly controlErrorVisible: import("@angular/core").WritableSignal<boolean>;
1673
+ readonly errors: import("@angular/core").WritableSignal<ValidationErrors | null>;
1674
+ protected readonly isInvalid: import("@angular/core").Signal<boolean>;
1675
+ ngDoCheck(): void;
1676
+ /** Dosya seçme penceresini açar. */
1677
+ browse(): void;
1678
+ /** Dosyayı kaldırır. */
1679
+ clear(): void;
1680
+ protected onInputChange(event: Event): void;
1681
+ protected onDragEnter(event: DragEvent): void;
1682
+ protected onDragOver(event: DragEvent): void;
1683
+ protected onDragLeave(): void;
1684
+ protected onDrop(event: DragEvent): void;
1685
+ protected remove(): void;
1686
+ protected retry(): void;
1687
+ /** Satırın boş yerine tıklamak da dosya seçtirir (düğme ve bağlantılar hariç). */
1688
+ protected onBoxClick(event: MouseEvent): void;
1689
+ protected onBlur(event: FocusEvent): void;
1690
+ writeValue(value: unknown): void;
1691
+ registerOnChange(fn: (value: HuFileInputValue) => void): void;
1692
+ registerOnTouched(fn: () => void): void;
1693
+ setDisabledState(disabled: boolean): void;
1694
+ private pick;
1695
+ private upload;
1696
+ private setValue;
1697
+ private resetStatus;
1698
+ private resolveControl;
1699
+ static ɵfac: i0.ɵɵFactoryDeclaration<HuFileInput, never>;
1700
+ static ɵcmp: i0.ɵɵComponentDeclaration<HuFileInput, "hu-file-input", never, {
1701
+ "value": {
1702
+ "alias": "value";
1703
+ "required": false;
1704
+ "isSignal": true;
1705
+ };
1706
+ "label": {
1707
+ "alias": "label";
1708
+ "required": false;
1709
+ "isSignal": true;
1710
+ };
1711
+ "required": {
1712
+ "alias": "required";
1713
+ "required": false;
1714
+ "isSignal": true;
1715
+ };
1716
+ "hint": {
1717
+ "alias": "hint";
1718
+ "required": false;
1719
+ "isSignal": true;
1720
+ };
1721
+ "placeholder": {
1722
+ "alias": "placeholder";
1723
+ "required": false;
1724
+ "isSignal": true;
1725
+ };
1726
+ "accept": {
1727
+ "alias": "accept";
1728
+ "required": false;
1729
+ "isSignal": true;
1730
+ };
1731
+ "maxFileSize": {
1732
+ "alias": "maxFileSize";
1733
+ "required": false;
1734
+ "isSignal": true;
1735
+ };
1736
+ "uploader": {
1737
+ "alias": "uploader";
1738
+ "required": false;
1739
+ "isSignal": true;
1740
+ };
1741
+ "removable": {
1742
+ "alias": "removable";
1743
+ "required": false;
1744
+ "isSignal": true;
1745
+ };
1746
+ "browseLabel": {
1747
+ "alias": "browseLabel";
1748
+ "required": false;
1749
+ "isSignal": true;
1750
+ };
1751
+ "changeLabel": {
1752
+ "alias": "changeLabel";
1753
+ "required": false;
1754
+ "isSignal": true;
1755
+ };
1756
+ "disabled": {
1757
+ "alias": "disabled";
1758
+ "required": false;
1759
+ "isSignal": true;
1760
+ };
1761
+ "id": {
1762
+ "alias": "id";
1763
+ "required": false;
1764
+ "isSignal": true;
1765
+ };
1766
+ }, {
1767
+ "value": "valueChange";
1768
+ "rejected": "rejected";
1769
+ "uploaded": "uploaded";
1770
+ "uploadError": "uploadError";
1771
+ "removed": "removed";
1772
+ }, never, never, true, never>;
1773
+ }
1580
1774
  export type HuInputNumberButtons = 'none' | 'stacked' | 'horizontal';
1581
1775
  export type HuInputNumberMode = 'decimal' | 'currency';
1582
1776
  /**
@@ -1772,7 +1966,7 @@ export interface HuSelectOption<T = string> {
1772
1966
  group?: string;
1773
1967
  }
1774
1968
  export type HuMultiSelectDisplay = 'chips' | 'text';
1775
- type Row$1<T> = {
1969
+ type Row$2<T> = {
1776
1970
  kind: 'group';
1777
1971
  label: string;
1778
1972
  } | {
@@ -1835,7 +2029,7 @@ export declare class HuMultiSelect<T = string> implements ControlValueAccessor,
1835
2029
  protected readonly isDisabled: import("@angular/core").Signal<boolean>;
1836
2030
  protected readonly selectedOptions: import("@angular/core").Signal<HuSelectOption<T>[]>;
1837
2031
  protected readonly visible: import("@angular/core").Signal<HuSelectOption<T>[]>;
1838
- protected readonly rows: import("@angular/core").Signal<Row$1<T>[]>;
2032
+ protected readonly rows: import("@angular/core").Signal<Row$2<T>[]>;
1839
2033
  protected readonly selectable: import("@angular/core").Signal<HuSelectOption<T>[]>;
1840
2034
  protected readonly allSelected: import("@angular/core").Signal<boolean>;
1841
2035
  protected readonly someSelected: import("@angular/core").Signal<boolean>;
@@ -1969,6 +2163,177 @@ export declare class HuMultiSelect<T = string> implements ControlValueAccessor,
1969
2163
  "closed": "closed";
1970
2164
  }, never, never, true, never>;
1971
2165
  }
2166
+ type Row$1<T> = {
2167
+ kind: 'group';
2168
+ label: string;
2169
+ } | {
2170
+ kind: 'option';
2171
+ option: HuSelectOption<T>;
2172
+ index: number;
2173
+ };
2174
+ /**
2175
+ * Tek seçimli açılır liste. Native `<select>`'in yerine: tema renklerinde panel,
2176
+ * arama (Türkçe karakterleri yok sayar: "ogr" → "Öğrenci"), gruplar, ikon ve
2177
+ * açıklamalı seçenekler. Formlarla veya `[(value)]` ile çalışır.
2178
+ *
2179
+ * @example
2180
+ * <hu-form-field label="Fakülte">
2181
+ * <hu-select formControlName="faculty" [options]="faculties" placeholder="Fakülte seçin" />
2182
+ * </hu-form-field>
2183
+ */
2184
+ export declare class HuSelect<T = string> implements ControlValueAccessor, HuFormFieldControl, DoCheck {
2185
+ private readonly injector;
2186
+ private readonly host;
2187
+ private readonly win;
2188
+ protected readonly field: import("@ucme-ui/angular").HuFormFieldParent | null;
2189
+ readonly options: import("@angular/core").InputSignal<readonly HuSelectOption<T>[]>;
2190
+ readonly value: import("@angular/core").ModelSignal<T | null>;
2191
+ readonly placeholder: import("@angular/core").InputSignal<string>;
2192
+ /**
2193
+ * Panelde arama kutusu. Varsayılan: seçenek sayısı `filterThreshold`'u
2194
+ * aşınca açılır; `true` / `false` ile zorlanabilir.
2195
+ */
2196
+ readonly filter: import("@angular/core").InputSignalWithTransform<boolean | "auto", unknown>;
2197
+ /** `filter="auto"` iken arama kutusunun çıktığı seçenek sayısı. */
2198
+ readonly filterThreshold: import("@angular/core").InputSignalWithTransform<number, unknown>;
2199
+ readonly filterPlaceholder: import("@angular/core").InputSignal<string>;
2200
+ /** Kutunun içindeki ✕ ile seçimi temizleme. */
2201
+ readonly showClear: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
2202
+ readonly emptyMessage: import("@angular/core").InputSignal<string>;
2203
+ readonly size: import("@angular/core").InputSignal<HuInputSize>;
2204
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
2205
+ readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
2206
+ readonly id: import("@angular/core").InputSignal<string>;
2207
+ /** Seçenekleri karşılaştırma (nesne değerlerde, örn. `(a, b) => a.id === b.id`). */
2208
+ readonly compareWith: import("@angular/core").InputSignal<(a: T, b: T) => boolean>;
2209
+ /** Kullanıcı bir seçenek seçince (veya temizleyince). */
2210
+ readonly selectionChange: import("@angular/core").OutputEmitterRef<T | null>;
2211
+ /** Panel kapandığında. */
2212
+ readonly closed: import("@angular/core").OutputEmitterRef<void>;
2213
+ protected readonly open: import("@angular/core").WritableSignal<boolean>;
2214
+ protected readonly query: import("@angular/core").WritableSignal<string>;
2215
+ /** Klavyeyle / fareyle üzerinde durulan seçenek (görünen listedeki sırası). */
2216
+ protected readonly activeIndex: import("@angular/core").WritableSignal<number>;
2217
+ protected readonly listId: string;
2218
+ private readonly formDisabled;
2219
+ protected readonly isDisabled: import("@angular/core").Signal<boolean>;
2220
+ protected readonly showFilter: import("@angular/core").Signal<boolean>;
2221
+ protected readonly selectedOption: import("@angular/core").Signal<HuSelectOption<T> | undefined>;
2222
+ protected readonly visible: import("@angular/core").Signal<HuSelectOption<T>[]>;
2223
+ protected readonly rows: import("@angular/core").Signal<Row$1<T>[]>;
2224
+ private ngControl;
2225
+ get hasControl(): boolean;
2226
+ readonly controlErrorVisible: import("@angular/core").WritableSignal<boolean>;
2227
+ readonly errors: import("@angular/core").WritableSignal<ValidationErrors | null>;
2228
+ protected readonly isInvalid: import("@angular/core").Signal<boolean>;
2229
+ private readonly trigger;
2230
+ private readonly panel;
2231
+ private readonly search;
2232
+ private readonly listbox;
2233
+ protected readonly supportsPopover: boolean;
2234
+ private pointerInside;
2235
+ private onChange;
2236
+ private onTouched;
2237
+ constructor();
2238
+ ngDoCheck(): void;
2239
+ toggle(): void;
2240
+ /** Paneli açar; `initialQuery` verilirse arama kutusuna yazılır (kapalıyken yazmaya başlama). */
2241
+ show(initialQuery?: string): void;
2242
+ close(restoreFocus?: boolean): void;
2243
+ protected isSelected(option: HuSelectOption<T>): boolean;
2244
+ protected choose(option: HuSelectOption<T>): void;
2245
+ protected clear(event: Event): void;
2246
+ protected onTriggerKeydown(event: KeyboardEvent): void;
2247
+ protected onPanelKeydown(event: KeyboardEvent): void;
2248
+ protected onQuery(value: string): void;
2249
+ protected onOptionHover(index: number, option: HuSelectOption<T>): void;
2250
+ protected optionId(index: number): string;
2251
+ protected onFocusOut(event: FocusEvent): void;
2252
+ protected onDocumentPointer(event: MouseEvent): void;
2253
+ writeValue(value: unknown): void;
2254
+ registerOnChange(fn: (value: T | null) => void): void;
2255
+ registerOnTouched(fn: () => void): void;
2256
+ setDisabledState(disabled: boolean): void;
2257
+ private commit;
2258
+ /** Aramasız listede harfe basınca o harfle başlayan sonraki seçeneğe git. */
2259
+ private jumpTo;
2260
+ private nextEnabled;
2261
+ private scrollActiveIntoView;
2262
+ private positionPanel;
2263
+ private resolveControl;
2264
+ static ɵfac: i0.ɵɵFactoryDeclaration<HuSelect<any>, never>;
2265
+ static ɵcmp: i0.ɵɵComponentDeclaration<HuSelect<any>, "hu-select", never, {
2266
+ "options": {
2267
+ "alias": "options";
2268
+ "required": false;
2269
+ "isSignal": true;
2270
+ };
2271
+ "value": {
2272
+ "alias": "value";
2273
+ "required": false;
2274
+ "isSignal": true;
2275
+ };
2276
+ "placeholder": {
2277
+ "alias": "placeholder";
2278
+ "required": false;
2279
+ "isSignal": true;
2280
+ };
2281
+ "filter": {
2282
+ "alias": "filter";
2283
+ "required": false;
2284
+ "isSignal": true;
2285
+ };
2286
+ "filterThreshold": {
2287
+ "alias": "filterThreshold";
2288
+ "required": false;
2289
+ "isSignal": true;
2290
+ };
2291
+ "filterPlaceholder": {
2292
+ "alias": "filterPlaceholder";
2293
+ "required": false;
2294
+ "isSignal": true;
2295
+ };
2296
+ "showClear": {
2297
+ "alias": "showClear";
2298
+ "required": false;
2299
+ "isSignal": true;
2300
+ };
2301
+ "emptyMessage": {
2302
+ "alias": "emptyMessage";
2303
+ "required": false;
2304
+ "isSignal": true;
2305
+ };
2306
+ "size": {
2307
+ "alias": "size";
2308
+ "required": false;
2309
+ "isSignal": true;
2310
+ };
2311
+ "disabled": {
2312
+ "alias": "disabled";
2313
+ "required": false;
2314
+ "isSignal": true;
2315
+ };
2316
+ "ariaLabel": {
2317
+ "alias": "ariaLabel";
2318
+ "required": false;
2319
+ "isSignal": true;
2320
+ };
2321
+ "id": {
2322
+ "alias": "id";
2323
+ "required": false;
2324
+ "isSignal": true;
2325
+ };
2326
+ "compareWith": {
2327
+ "alias": "compareWith";
2328
+ "required": false;
2329
+ "isSignal": true;
2330
+ };
2331
+ }, {
2332
+ "value": "valueChange";
2333
+ "selectionChange": "selectionChange";
2334
+ "closed": "closed";
2335
+ }, never, never, true, never>;
2336
+ }
1972
2337
  /**
1973
2338
  * Hazır maskeler. Maske karakterleri: `9` rakam, `a` harf, `*` harf veya rakam;
1974
2339
  * diğer karakterler sabittir (`\9` ile kaçış).