@ucme-ui/angular 0.5.0 → 0.7.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 +1682 -1678
- package/README.md +196 -196
- package/fesm2022/ucme-ui-angular.mjs +109 -28
- package/fesm2022/ucme-ui-angular.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/_controls.scss +173 -173
- package/styles/_grid.scss +87 -87
- package/styles/hu-ui.scss +6 -6
- package/types/ucme-ui-angular.d.ts +42 -2
package/README.md
CHANGED
|
@@ -1,196 +1,196 @@
|
|
|
1
|
-
# @ucme-ui/angular
|
|
2
|
-
|
|
3
|
-
Admin panelleri için Angular 20–22 component kütüphanesi. Hazır bir admin layout, form, tablo,
|
|
4
|
-
takvim ve geri bildirim componentleri içerir.
|
|
5
|
-
|
|
6
|
-
- **Bağımlılıksız:** Angular dışında hiçbir paket gerektirmez; stiller düz SCSS ve CSS değişkenleri.
|
|
7
|
-
- **Modern Angular:** standalone componentler, signals (`input()`, `model()`), `OnPush`; zone.js'li ve zoneless uygulamalarda çalışır.
|
|
8
|
-
- **Tema:** tüm renk ve ölçüler `--hu-*` token'larıdır. Açık/koyu tema hazır, marka rengi tek satırla değişir.
|
|
9
|
-
- **Erişilebilir:** native `<button>`, `<input>`, `<dialog>` üzerine kurulu. Tam klavye desteği ve ARIA.
|
|
10
|
-
- **Türkçe:** metinler, tarih biçimi (`gg.aa.yyyy`), sıralama ve baş harf kuralları `tr-TR`.
|
|
11
|
-
|
|
12
|
-
> *English:* Angular 20–22 UI kit & admin layout. Standalone, signal-based, zero dependencies,
|
|
13
|
-
> themeable via CSS custom properties. UI texts default to Turkish.
|
|
14
|
-
|
|
15
|
-
## Kurulum
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm install @ucme-ui/angular
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Gereksinim: Angular **20, 21 veya 22** (`@angular/common`, `core`, `forms`, `router`).
|
|
22
|
-
|
|
23
|
-
**1. Stiller** (`src/styles.scss`)
|
|
24
|
-
|
|
25
|
-
```scss
|
|
26
|
-
@use '@ucme-ui/angular/styles';
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
**2. Font** (`index.html`, isteğe bağlı). Tasarım Inter ile yapıldı; eklenmezse sistem fontu kullanılır.
|
|
30
|
-
|
|
31
|
-
```html
|
|
32
|
-
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
**3. Kullanım**
|
|
36
|
-
|
|
37
|
-
```ts
|
|
38
|
-
import { Component, inject } from '@angular/core';
|
|
39
|
-
import { ReactiveFormsModule, FormControl, Validators } from '@angular/forms';
|
|
40
|
-
import { HuButton, HU_FORM_FIELD_IMPORTS, HuDatePicker, HuToastService } from '@ucme-ui/angular';
|
|
41
|
-
|
|
42
|
-
@Component({
|
|
43
|
-
selector: 'app-example',
|
|
44
|
-
imports: [ReactiveFormsModule, HuButton, HU_FORM_FIELD_IMPORTS, HuDatePicker],
|
|
45
|
-
template: `
|
|
46
|
-
<hu-form-field label="E-posta" required>
|
|
47
|
-
<input huInput type="email" [formControl]="email" />
|
|
48
|
-
</hu-form-field>
|
|
49
|
-
|
|
50
|
-
<hu-form-field label="Başlangıç tarihi">
|
|
51
|
-
<hu-date-picker [formControl]="start" />
|
|
52
|
-
</hu-form-field>
|
|
53
|
-
|
|
54
|
-
<button hu-button (click)="save()">Kaydet</button>
|
|
55
|
-
`,
|
|
56
|
-
})
|
|
57
|
-
export class ExampleComponent {
|
|
58
|
-
private readonly toast = inject(HuToastService);
|
|
59
|
-
readonly email = new FormControl('', [Validators.required, Validators.email]);
|
|
60
|
-
readonly start = new FormControl<Date | null>(null);
|
|
61
|
-
|
|
62
|
-
save() {
|
|
63
|
-
this.toast.success('Kaydedildi.');
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Toast'ların görünmesi için kök componente bir kez `<hu-toaster />` ekleyin.
|
|
69
|
-
|
|
70
|
-
## Componentler
|
|
71
|
-
|
|
72
|
-
> Her component'in bütün input, output ve seçenekleri:
|
|
73
|
-
> **[API referansı](https://github.com/kadir3m/hu-ui/blob/main/projects/hu-ui/API.md)**.
|
|
74
|
-
> Aynı dosya pakette de `node_modules/@ucme-ui/angular/API.md` olarak bulunur.
|
|
75
|
-
|
|
76
|
-
| Grup | |
|
|
77
|
-
| --- | --- |
|
|
78
|
-
| **Layout** | `hu-shell` (daraltılabilir sidebar, mobil çekmece, topbar), `hu-sidebar-nav`, `hu-breadcrumb`, `hu-theme-toggle` |
|
|
79
|
-
| **Form** | `hu-button`, `hu-button-group`, `huInput`, `hu-form-field`, `hu-checkbox`, `hu-switch`, `hu-date-picker`, `hu-editor` (zengin metin) |
|
|
80
|
-
| **Tarih** | `hu-calendar`: tek gün/aralık seçimi, min/max, `dateFilter`, etkinlik işaretleri |
|
|
81
|
-
| **Veri** | `hu-table` (sıralama, özel hücreler), `hu-paginator`, `hu-tabs`, `hu-card`, `hu-dropdown` |
|
|
82
|
-
| **Geri bildirim** | `hu-alert`, `hu-dialog`, `HuToastService`, `hu-badge`, `hu-avatar`, `hu-spinner` |
|
|
83
|
-
| **Çekirdek** | `hu-icon` (+`provideHuIcons`), `HuThemeService`, `provideHuErrorMessages`, tarih yardımcıları |
|
|
84
|
-
|
|
85
|
-
Birlikte kullanılan parçalar için gruplu import'lar var: `HU_FORM_FIELD_IMPORTS`, `HU_TABLE_IMPORTS`,
|
|
86
|
-
`HU_DIALOG_IMPORTS`, `HU_DROPDOWN_IMPORTS`, `HU_TABS_IMPORTS`, `HU_CARD_IMPORTS`, `HU_SHELL_IMPORTS`.
|
|
87
|
-
|
|
88
|
-
### Butonlar
|
|
89
|
-
|
|
90
|
-
Görünüm ve renk birbirinden bağımsızdır:
|
|
91
|
-
|
|
92
|
-
```html
|
|
93
|
-
<button hu-button>Kaydet</button>
|
|
94
|
-
<button hu-button variant="soft" color="success">Onayla</button>
|
|
95
|
-
<button hu-button variant="outline" color="danger" size="sm">Sil</button>
|
|
96
|
-
<button hu-button variant="ghost" iconOnly aria-label="Düzenle"><hu-icon name="edit" /></button>
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
`variant`: `solid` `soft` `outline` `ghost` `link`. `color`: `primary` `neutral` `success` `warning` `danger` `info`.
|
|
100
|
-
`size`: `xs` … `xl`.
|
|
101
|
-
|
|
102
|
-
### Dropdown
|
|
103
|
-
|
|
104
|
-
Öğeleri bir dizi olarak verin; seçilen öğe `(selected)` ile döner:
|
|
105
|
-
|
|
106
|
-
```html
|
|
107
|
-
<hu-dropdown label="İşlemler" [options]="actions" (selected)="run($event.value)" />
|
|
108
|
-
|
|
109
|
-
<!-- Yalnızca ikonlu tetikleyici -->
|
|
110
|
-
<hu-dropdown icon="more-vertical" variant="ghost" ariaLabel="Satır işlemleri" [options]="actions" />
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
```ts
|
|
114
|
-
actions: HuDropdownEntry[] = [
|
|
115
|
-
{ header: 'Kayıt' }, // grup başlığı
|
|
116
|
-
{ label: 'Düzenle', value: 'edit', icon: 'edit' },
|
|
117
|
-
{ label: 'Dışa aktar', value: 'export', description: 'Excel dosyası' },
|
|
118
|
-
{ label: 'Ayarlar', icon: 'settings', link: '/ayarlar' }, // router linki
|
|
119
|
-
{ label: 'Arşivle', value: 'archive', disabled: true },
|
|
120
|
-
{ divider: true }, // ayraç
|
|
121
|
-
{ label: 'Sil', value: 'delete', icon: 'trash', danger: true },
|
|
122
|
-
];
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
| Input | Açıklama |
|
|
126
|
-
| --- | --- |
|
|
127
|
-
| `options` | Öğeler: seçenek, `{ divider: true }` veya `{ header: '…' }` |
|
|
128
|
-
| `label`, `icon`, `variant`, `color`, `size` | Hazır tetikleyici buton (`variant` varsayılanı `outline`) |
|
|
129
|
-
| `ariaLabel` | Yalnızca ikonlu tetikleyicide ekran okuyucu etiketi |
|
|
130
|
-
| `align` | Panelin hizası: `start` veya `end` |
|
|
131
|
-
| `caret`, `disabled` | Aşağı ok gösterimi; tetikleyiciyi devre dışı bırakma |
|
|
132
|
-
| `[(open)]` | Açık/kapalı durumu (iki yönlü) |
|
|
133
|
-
|
|
134
|
-
| Output | Açıklama |
|
|
135
|
-
| --- | --- |
|
|
136
|
-
| `(selected)` | Seçilen `HuDropdownOption`; `value` verilmemişse `label` döner |
|
|
137
|
-
| `(openChange)` | Panel açıldığında veya kapandığında |
|
|
138
|
-
|
|
139
|
-
Kendi tetikleyicinizi kullanmak için (avatar vb.) içine `huDropdownTrigger` özniteliği olan bir element koyun.
|
|
140
|
-
Panelin üstüne serbest içerik eklemek için `huDropdownHeader` kullanın. Klavye desteği hazır gelir: oklar, Home/End,
|
|
141
|
-
harfle atlama, Enter ve Esc.
|
|
142
|
-
|
|
143
|
-
### Admin layout
|
|
144
|
-
|
|
145
|
-
```html
|
|
146
|
-
<hu-shell [nav]="nav" brand="Yönetim Paneli">
|
|
147
|
-
<hu-breadcrumb huTopbarStart [items]="crumbs" />
|
|
148
|
-
<div huTopbarEnd><hu-theme-toggle /></div>
|
|
149
|
-
<router-outlet />
|
|
150
|
-
</hu-shell>
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
```ts
|
|
154
|
-
nav: HuNavGroup[] = [
|
|
155
|
-
{ items: [{ label: 'Genel Bakış', icon: 'home', link: '/', exact: true }] },
|
|
156
|
-
{ title: 'Yönetim', items: [
|
|
157
|
-
{ label: 'Kullanıcılar', icon: 'users', link: '/kullanicilar', badge: 12 },
|
|
158
|
-
{ label: 'Akademik', icon: 'graduation-cap', children: [
|
|
159
|
-
{ label: 'Dersler', link: '/dersler' },
|
|
160
|
-
]},
|
|
161
|
-
]},
|
|
162
|
-
];
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
### Form hataları
|
|
166
|
-
|
|
167
|
-
`hu-form-field`, reactive form hatalarını otomatik olarak Türkçe mesaja çevirir. Mesajları
|
|
168
|
-
değiştirmek ya da yeni validator'lara mesaj eklemek için:
|
|
169
|
-
|
|
170
|
-
```ts
|
|
171
|
-
providers: [provideHuErrorMessages({ tckn: 'Geçerli bir T.C. kimlik numarası giriniz.' })]
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
## Tema
|
|
175
|
-
|
|
176
|
-
Token'ları kendi stil dosyanızda ezin:
|
|
177
|
-
|
|
178
|
-
```scss
|
|
179
|
-
:root {
|
|
180
|
-
--hu-primary: #0b5cad;
|
|
181
|
-
--hu-primary-hover: #094a8c;
|
|
182
|
-
--hu-primary-soft: #e8f1fb;
|
|
183
|
-
--hu-radius-md: 8px;
|
|
184
|
-
}
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
Koyu tema `<html data-theme="dark">` ile açılır. `HuThemeService.setMode('light' | 'dark' | 'system')`
|
|
188
|
-
tercihi yönetir ve saklar.
|
|
189
|
-
|
|
190
|
-
## Tarayıcı desteği
|
|
191
|
-
|
|
192
|
-
Chrome/Edge 114+, Firefox 125+, Safari 17+. Kütüphane Popover API, `:has()` ve `color-mix()` kullanır.
|
|
193
|
-
|
|
194
|
-
## Lisans
|
|
195
|
-
|
|
196
|
-
MIT
|
|
1
|
+
# @ucme-ui/angular
|
|
2
|
+
|
|
3
|
+
Admin panelleri için Angular 20–22 component kütüphanesi. Hazır bir admin layout, form, tablo,
|
|
4
|
+
takvim ve geri bildirim componentleri içerir.
|
|
5
|
+
|
|
6
|
+
- **Bağımlılıksız:** Angular dışında hiçbir paket gerektirmez; stiller düz SCSS ve CSS değişkenleri.
|
|
7
|
+
- **Modern Angular:** standalone componentler, signals (`input()`, `model()`), `OnPush`; zone.js'li ve zoneless uygulamalarda çalışır.
|
|
8
|
+
- **Tema:** tüm renk ve ölçüler `--hu-*` token'larıdır. Açık/koyu tema hazır, marka rengi tek satırla değişir.
|
|
9
|
+
- **Erişilebilir:** native `<button>`, `<input>`, `<dialog>` üzerine kurulu. Tam klavye desteği ve ARIA.
|
|
10
|
+
- **Türkçe:** metinler, tarih biçimi (`gg.aa.yyyy`), sıralama ve baş harf kuralları `tr-TR`.
|
|
11
|
+
|
|
12
|
+
> *English:* Angular 20–22 UI kit & admin layout. Standalone, signal-based, zero dependencies,
|
|
13
|
+
> themeable via CSS custom properties. UI texts default to Turkish.
|
|
14
|
+
|
|
15
|
+
## Kurulum
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @ucme-ui/angular
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Gereksinim: Angular **20, 21 veya 22** (`@angular/common`, `core`, `forms`, `router`).
|
|
22
|
+
|
|
23
|
+
**1. Stiller** (`src/styles.scss`)
|
|
24
|
+
|
|
25
|
+
```scss
|
|
26
|
+
@use '@ucme-ui/angular/styles';
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**2. Font** (`index.html`, isteğe bağlı). Tasarım Inter ile yapıldı; eklenmezse sistem fontu kullanılır.
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**3. Kullanım**
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
import { Component, inject } from '@angular/core';
|
|
39
|
+
import { ReactiveFormsModule, FormControl, Validators } from '@angular/forms';
|
|
40
|
+
import { HuButton, HU_FORM_FIELD_IMPORTS, HuDatePicker, HuToastService } from '@ucme-ui/angular';
|
|
41
|
+
|
|
42
|
+
@Component({
|
|
43
|
+
selector: 'app-example',
|
|
44
|
+
imports: [ReactiveFormsModule, HuButton, HU_FORM_FIELD_IMPORTS, HuDatePicker],
|
|
45
|
+
template: `
|
|
46
|
+
<hu-form-field label="E-posta" required>
|
|
47
|
+
<input huInput type="email" [formControl]="email" />
|
|
48
|
+
</hu-form-field>
|
|
49
|
+
|
|
50
|
+
<hu-form-field label="Başlangıç tarihi">
|
|
51
|
+
<hu-date-picker [formControl]="start" />
|
|
52
|
+
</hu-form-field>
|
|
53
|
+
|
|
54
|
+
<button hu-button (click)="save()">Kaydet</button>
|
|
55
|
+
`,
|
|
56
|
+
})
|
|
57
|
+
export class ExampleComponent {
|
|
58
|
+
private readonly toast = inject(HuToastService);
|
|
59
|
+
readonly email = new FormControl('', [Validators.required, Validators.email]);
|
|
60
|
+
readonly start = new FormControl<Date | null>(null);
|
|
61
|
+
|
|
62
|
+
save() {
|
|
63
|
+
this.toast.success('Kaydedildi.');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Toast'ların görünmesi için kök componente bir kez `<hu-toaster />` ekleyin.
|
|
69
|
+
|
|
70
|
+
## Componentler
|
|
71
|
+
|
|
72
|
+
> Her component'in bütün input, output ve seçenekleri:
|
|
73
|
+
> **[API referansı](https://github.com/kadir3m/hu-ui/blob/main/projects/hu-ui/API.md)**.
|
|
74
|
+
> Aynı dosya pakette de `node_modules/@ucme-ui/angular/API.md` olarak bulunur.
|
|
75
|
+
|
|
76
|
+
| Grup | |
|
|
77
|
+
| --- | --- |
|
|
78
|
+
| **Layout** | `hu-shell` (daraltılabilir sidebar, mobil çekmece, topbar), `hu-sidebar-nav`, `hu-breadcrumb`, `hu-theme-toggle` |
|
|
79
|
+
| **Form** | `hu-button`, `hu-button-group`, `huInput`, `hu-form-field`, `hu-checkbox`, `hu-switch`, `hu-date-picker`, `hu-editor` (zengin metin) |
|
|
80
|
+
| **Tarih** | `hu-calendar`: tek gün/aralık seçimi, min/max, `dateFilter`, etkinlik işaretleri |
|
|
81
|
+
| **Veri** | `hu-table` (sıralama, özel hücreler), `hu-paginator`, `hu-tabs`, `hu-card`, `hu-dropdown` |
|
|
82
|
+
| **Geri bildirim** | `hu-alert`, `hu-dialog`, `HuToastService`, `hu-badge`, `hu-avatar`, `hu-spinner` |
|
|
83
|
+
| **Çekirdek** | `hu-icon` (+`provideHuIcons`), `HuThemeService`, `provideHuErrorMessages`, tarih yardımcıları |
|
|
84
|
+
|
|
85
|
+
Birlikte kullanılan parçalar için gruplu import'lar var: `HU_FORM_FIELD_IMPORTS`, `HU_TABLE_IMPORTS`,
|
|
86
|
+
`HU_DIALOG_IMPORTS`, `HU_DROPDOWN_IMPORTS`, `HU_TABS_IMPORTS`, `HU_CARD_IMPORTS`, `HU_SHELL_IMPORTS`.
|
|
87
|
+
|
|
88
|
+
### Butonlar
|
|
89
|
+
|
|
90
|
+
Görünüm ve renk birbirinden bağımsızdır:
|
|
91
|
+
|
|
92
|
+
```html
|
|
93
|
+
<button hu-button>Kaydet</button>
|
|
94
|
+
<button hu-button variant="soft" color="success">Onayla</button>
|
|
95
|
+
<button hu-button variant="outline" color="danger" size="sm">Sil</button>
|
|
96
|
+
<button hu-button variant="ghost" iconOnly aria-label="Düzenle"><hu-icon name="edit" /></button>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
`variant`: `solid` `soft` `outline` `ghost` `link`. `color`: `primary` `neutral` `success` `warning` `danger` `info`.
|
|
100
|
+
`size`: `xs` … `xl`.
|
|
101
|
+
|
|
102
|
+
### Dropdown
|
|
103
|
+
|
|
104
|
+
Öğeleri bir dizi olarak verin; seçilen öğe `(selected)` ile döner:
|
|
105
|
+
|
|
106
|
+
```html
|
|
107
|
+
<hu-dropdown label="İşlemler" [options]="actions" (selected)="run($event.value)" />
|
|
108
|
+
|
|
109
|
+
<!-- Yalnızca ikonlu tetikleyici -->
|
|
110
|
+
<hu-dropdown icon="more-vertical" variant="ghost" ariaLabel="Satır işlemleri" [options]="actions" />
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
```ts
|
|
114
|
+
actions: HuDropdownEntry[] = [
|
|
115
|
+
{ header: 'Kayıt' }, // grup başlığı
|
|
116
|
+
{ label: 'Düzenle', value: 'edit', icon: 'edit' },
|
|
117
|
+
{ label: 'Dışa aktar', value: 'export', description: 'Excel dosyası' },
|
|
118
|
+
{ label: 'Ayarlar', icon: 'settings', link: '/ayarlar' }, // router linki
|
|
119
|
+
{ label: 'Arşivle', value: 'archive', disabled: true },
|
|
120
|
+
{ divider: true }, // ayraç
|
|
121
|
+
{ label: 'Sil', value: 'delete', icon: 'trash', danger: true },
|
|
122
|
+
];
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
| Input | Açıklama |
|
|
126
|
+
| --- | --- |
|
|
127
|
+
| `options` | Öğeler: seçenek, `{ divider: true }` veya `{ header: '…' }` |
|
|
128
|
+
| `label`, `icon`, `variant`, `color`, `size` | Hazır tetikleyici buton (`variant` varsayılanı `outline`) |
|
|
129
|
+
| `ariaLabel` | Yalnızca ikonlu tetikleyicide ekran okuyucu etiketi |
|
|
130
|
+
| `align` | Panelin hizası: `start` veya `end` |
|
|
131
|
+
| `caret`, `disabled` | Aşağı ok gösterimi; tetikleyiciyi devre dışı bırakma |
|
|
132
|
+
| `[(open)]` | Açık/kapalı durumu (iki yönlü) |
|
|
133
|
+
|
|
134
|
+
| Output | Açıklama |
|
|
135
|
+
| --- | --- |
|
|
136
|
+
| `(selected)` | Seçilen `HuDropdownOption`; `value` verilmemişse `label` döner |
|
|
137
|
+
| `(openChange)` | Panel açıldığında veya kapandığında |
|
|
138
|
+
|
|
139
|
+
Kendi tetikleyicinizi kullanmak için (avatar vb.) içine `huDropdownTrigger` özniteliği olan bir element koyun.
|
|
140
|
+
Panelin üstüne serbest içerik eklemek için `huDropdownHeader` kullanın. Klavye desteği hazır gelir: oklar, Home/End,
|
|
141
|
+
harfle atlama, Enter ve Esc.
|
|
142
|
+
|
|
143
|
+
### Admin layout
|
|
144
|
+
|
|
145
|
+
```html
|
|
146
|
+
<hu-shell [nav]="nav" brand="Yönetim Paneli">
|
|
147
|
+
<hu-breadcrumb huTopbarStart [items]="crumbs" />
|
|
148
|
+
<div huTopbarEnd><hu-theme-toggle /></div>
|
|
149
|
+
<router-outlet />
|
|
150
|
+
</hu-shell>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
```ts
|
|
154
|
+
nav: HuNavGroup[] = [
|
|
155
|
+
{ items: [{ label: 'Genel Bakış', icon: 'home', link: '/', exact: true }] },
|
|
156
|
+
{ title: 'Yönetim', items: [
|
|
157
|
+
{ label: 'Kullanıcılar', icon: 'users', link: '/kullanicilar', badge: 12 },
|
|
158
|
+
{ label: 'Akademik', icon: 'graduation-cap', children: [
|
|
159
|
+
{ label: 'Dersler', link: '/dersler' },
|
|
160
|
+
]},
|
|
161
|
+
]},
|
|
162
|
+
];
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Form hataları
|
|
166
|
+
|
|
167
|
+
`hu-form-field`, reactive form hatalarını otomatik olarak Türkçe mesaja çevirir. Mesajları
|
|
168
|
+
değiştirmek ya da yeni validator'lara mesaj eklemek için:
|
|
169
|
+
|
|
170
|
+
```ts
|
|
171
|
+
providers: [provideHuErrorMessages({ tckn: 'Geçerli bir T.C. kimlik numarası giriniz.' })]
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Tema
|
|
175
|
+
|
|
176
|
+
Token'ları kendi stil dosyanızda ezin:
|
|
177
|
+
|
|
178
|
+
```scss
|
|
179
|
+
:root {
|
|
180
|
+
--hu-primary: #0b5cad;
|
|
181
|
+
--hu-primary-hover: #094a8c;
|
|
182
|
+
--hu-primary-soft: #e8f1fb;
|
|
183
|
+
--hu-radius-md: 8px;
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Koyu tema `<html data-theme="dark">` ile açılır. `HuThemeService.setMode('light' | 'dark' | 'system')`
|
|
188
|
+
tercihi yönetir ve saklar.
|
|
189
|
+
|
|
190
|
+
## Tarayıcı desteği
|
|
191
|
+
|
|
192
|
+
Chrome/Edge 114+, Firefox 125+, Safari 17+. Kütüphane Popover API, `:has()` ve `color-mix()` kullanır.
|
|
193
|
+
|
|
194
|
+
## Lisans
|
|
195
|
+
|
|
196
|
+
MIT
|