@ucme-ui/angular 0.1.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.
Files changed (45) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +151 -0
  3. package/fesm2022/ucme-ui-angular.mjs +2628 -0
  4. package/fesm2022/ucme-ui-angular.mjs.map +1 -0
  5. package/index.d.ts +5 -0
  6. package/lib/alert/alert.component.d.ts +18 -0
  7. package/lib/avatar/avatar.component.d.ts +15 -0
  8. package/lib/badge/badge.component.d.ts +12 -0
  9. package/lib/breadcrumb/breadcrumb.component.d.ts +12 -0
  10. package/lib/button/button-group.component.d.ts +17 -0
  11. package/lib/button/button.component.d.ts +39 -0
  12. package/lib/calendar/calendar.component.d.ts +105 -0
  13. package/lib/calendar/date-picker.component.d.ts +87 -0
  14. package/lib/calendar/date-utils.d.ts +27 -0
  15. package/lib/card/card.component.d.ts +30 -0
  16. package/lib/checkbox/checkbox.component.d.ts +36 -0
  17. package/lib/core/media.d.ts +6 -0
  18. package/lib/core/theme.service.d.ts +21 -0
  19. package/lib/core/unique-id.d.ts +2 -0
  20. package/lib/dialog/dialog.component.d.ts +39 -0
  21. package/lib/form-field/form-field.component.d.ts +38 -0
  22. package/lib/form-field/form-field.tokens.d.ts +31 -0
  23. package/lib/form-field/input.directive.d.ts +28 -0
  24. package/lib/icon/icon.component.d.ts +16 -0
  25. package/lib/icon/icons.d.ts +11 -0
  26. package/lib/imports.d.ts +15 -0
  27. package/lib/layout/nav.types.d.ts +15 -0
  28. package/lib/layout/shell.component.d.ts +51 -0
  29. package/lib/layout/sidebar-nav.component.d.ts +19 -0
  30. package/lib/layout/theme-toggle.component.d.ts +9 -0
  31. package/lib/menu/menu.component.d.ts +38 -0
  32. package/lib/paginator/paginator.component.d.ts +21 -0
  33. package/lib/spinner/spinner.component.d.ts +9 -0
  34. package/lib/switch/switch.component.d.ts +24 -0
  35. package/lib/table/table.component.d.ts +57 -0
  36. package/lib/table/table.types.d.ts +18 -0
  37. package/lib/tabs/tabs.component.d.ts +33 -0
  38. package/lib/toast/toast.service.d.ts +32 -0
  39. package/lib/toast/toaster.component.d.ts +11 -0
  40. package/package.json +65 -0
  41. package/public-api.d.ts +34 -0
  42. package/styles/_base.scss +84 -0
  43. package/styles/_controls.scss +146 -0
  44. package/styles/_tokens.scss +203 -0
  45. package/styles/hu-ui.scss +5 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 HU UI contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,151 @@
1
+ # @ucme-ui/angular
2
+
3
+ Admin panelleri için Angular 19 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`.
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 19 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 `^19.2` (`@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
+ | Grup | |
73
+ | --- | --- |
74
+ | **Layout** | `hu-shell` (daraltılabilir sidebar, mobil çekmece, topbar), `hu-sidebar-nav`, `hu-breadcrumb`, `hu-theme-toggle` |
75
+ | **Form** | `hu-button`, `hu-button-group`, `huInput`, `hu-form-field`, `hu-checkbox`, `hu-switch`, `hu-date-picker` |
76
+ | **Tarih** | `hu-calendar`: tek gün/aralık seçimi, min/max, `dateFilter`, etkinlik işaretleri |
77
+ | **Veri** | `hu-table` (sıralama, özel hücreler), `hu-paginator`, `hu-tabs`, `hu-card`, `hu-menu` |
78
+ | **Geri bildirim** | `hu-alert`, `hu-dialog`, `HuToastService`, `hu-badge`, `hu-avatar`, `hu-spinner` |
79
+ | **Çekirdek** | `hu-icon` (+`provideHuIcons`), `HuThemeService`, `provideHuErrorMessages`, tarih yardımcıları |
80
+
81
+ Birlikte kullanılan parçalar için gruplu import'lar var: `HU_FORM_FIELD_IMPORTS`, `HU_TABLE_IMPORTS`,
82
+ `HU_DIALOG_IMPORTS`, `HU_MENU_IMPORTS`, `HU_TABS_IMPORTS`, `HU_CARD_IMPORTS`, `HU_SHELL_IMPORTS`.
83
+
84
+ ### Butonlar
85
+
86
+ Görünüm ve renk birbirinden bağımsızdır:
87
+
88
+ ```html
89
+ <button hu-button>Kaydet</button>
90
+ <button hu-button variant="soft" color="success">Onayla</button>
91
+ <button hu-button variant="outline" color="danger" size="sm">Sil</button>
92
+ <button hu-button variant="ghost" iconOnly aria-label="Düzenle"><hu-icon name="edit" /></button>
93
+ ```
94
+
95
+ `variant`: `solid` `soft` `outline` `ghost` `link`. `color`: `primary` `neutral` `success` `warning` `danger` `info`.
96
+ `size`: `xs` … `xl`.
97
+
98
+ ### Admin layout
99
+
100
+ ```html
101
+ <hu-shell [nav]="nav" brand="Yönetim Paneli">
102
+ <hu-breadcrumb huTopbarStart [items]="crumbs" />
103
+ <div huTopbarEnd><hu-theme-toggle /></div>
104
+ <router-outlet />
105
+ </hu-shell>
106
+ ```
107
+
108
+ ```ts
109
+ nav: HuNavGroup[] = [
110
+ { items: [{ label: 'Genel Bakış', icon: 'home', link: '/', exact: true }] },
111
+ { title: 'Yönetim', items: [
112
+ { label: 'Kullanıcılar', icon: 'users', link: '/kullanicilar', badge: 12 },
113
+ { label: 'Akademik', icon: 'graduation-cap', children: [
114
+ { label: 'Dersler', link: '/dersler' },
115
+ ]},
116
+ ]},
117
+ ];
118
+ ```
119
+
120
+ ### Form hataları
121
+
122
+ `hu-form-field`, reactive form hatalarını otomatik olarak Türkçe mesaja çevirir. Mesajları
123
+ değiştirmek ya da yeni validator'lara mesaj eklemek için:
124
+
125
+ ```ts
126
+ providers: [provideHuErrorMessages({ tckn: 'Geçerli bir T.C. kimlik numarası giriniz.' })]
127
+ ```
128
+
129
+ ## Tema
130
+
131
+ Token'ları kendi stil dosyanızda ezin:
132
+
133
+ ```scss
134
+ :root {
135
+ --hu-primary: #0b5cad;
136
+ --hu-primary-hover: #094a8c;
137
+ --hu-primary-soft: #e8f1fb;
138
+ --hu-radius-md: 8px;
139
+ }
140
+ ```
141
+
142
+ Koyu tema `<html data-theme="dark">` ile açılır. `HuThemeService.setMode('light' | 'dark' | 'system')`
143
+ tercihi yönetir ve saklar.
144
+
145
+ ## Tarayıcı desteği
146
+
147
+ Chrome/Edge 114+, Firefox 125+, Safari 17+. Kütüphane Popover API, `:has()` ve `color-mix()` kullanır.
148
+
149
+ ## Lisans
150
+
151
+ MIT