sagittarius-admin-template 0.0.0-stage → 0.2.1

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 (25) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +174 -2
  3. package/ng-package.json +11 -0
  4. package/package.json +48 -4
  5. package/src/lib/sagittarius-admin/drawer-component/drawer-component.html +1 -0
  6. package/src/lib/sagittarius-admin/drawer-component/drawer-component.scss +0 -0
  7. package/src/lib/sagittarius-admin/drawer-component/drawer-component.spec.ts +54 -0
  8. package/src/lib/sagittarius-admin/drawer-component/drawer-component.ts +123 -0
  9. package/src/lib/sagittarius-admin/drawer-component/drawer-content/drawer-content.html +23 -0
  10. package/src/lib/sagittarius-admin/drawer-component/drawer-content/drawer-content.scss +103 -0
  11. package/src/lib/sagittarius-admin/drawer-component/drawer-content/drawer-content.spec.ts +63 -0
  12. package/src/lib/sagittarius-admin/drawer-component/drawer-content/drawer-content.ts +67 -0
  13. package/src/lib/sagittarius-admin/drawer-ref.ts +26 -0
  14. package/src/lib/sagittarius-admin/drawer-service.ts +58 -0
  15. package/src/lib/sagittarius-admin/sagittarius-admin.html +150 -0
  16. package/src/lib/sagittarius-admin/sagittarius-admin.labels.ts +63 -0
  17. package/src/lib/sagittarius-admin/sagittarius-admin.models.ts +60 -0
  18. package/src/lib/sagittarius-admin/sagittarius-admin.scss +592 -0
  19. package/src/lib/sagittarius-admin/sagittarius-admin.spec.ts +45 -0
  20. package/src/lib/sagittarius-admin/sagittarius-admin.ts +159 -0
  21. package/src/public-api.ts +9 -0
  22. package/styles/sagittarius-admin.scss +496 -0
  23. package/tsconfig.lib.json +18 -0
  24. package/tsconfig.lib.prod.json +11 -0
  25. package/tsconfig.spec.json +14 -0
@@ -0,0 +1,159 @@
1
+ import { AfterViewInit, Component, HostListener, OnInit, ViewChild, computed, inject, input, output, signal } from '@angular/core';
2
+ import { MatButtonModule } from '@angular/material/button';
3
+ import { MatIconModule } from '@angular/material/icon';
4
+ import { MatMenuModule } from '@angular/material/menu';
5
+ import { RouterModule } from '@angular/router';
6
+ import { DrawerComponent } from './drawer-component/drawer-component';
7
+ import { DrawerService } from './drawer-service';
8
+ import { SG_ADMIN_LABELS } from './sagittarius-admin.labels';
9
+ import { SgMenuItem, SgUser, SgUserMenuItem } from './sagittarius-admin.models';
10
+
11
+ const MOBILE_BREAKPOINT = 800;
12
+ const COLLAPSED_STORAGE_KEY = 'sg-admin-sidebar-collapsed';
13
+
14
+ @Component({
15
+ selector: 'lib-sagittarius-admin',
16
+ imports: [
17
+ RouterModule,
18
+ MatIconModule,
19
+ MatButtonModule,
20
+ MatMenuModule,
21
+ DrawerComponent,
22
+ ],
23
+ templateUrl: './sagittarius-admin.html',
24
+ styleUrl: './sagittarius-admin.scss'
25
+ })
26
+ export class SagittariusAdmin implements OnInit, AfterViewInit {
27
+ /** Názov aplikácie v hlavičke sidebaru. */
28
+ readonly appTitle = input('Sagittarius');
29
+ /** Skratka zobrazená v zbalenom sidebare (default: iniciály z `appTitle`). */
30
+ readonly appShortTitle = input<string>();
31
+ /** URL loga; bez neho sa zobrazí farebný štvorec so skratkou. */
32
+ readonly logoUrl = input<string>();
33
+ /** Routa, kam vedie klik na logo. */
34
+ readonly homeRoute = input<string | any[]>('/');
35
+ readonly menuItems = input<SgMenuItem[]>([]);
36
+ readonly user = input<SgUser | null>(null);
37
+ readonly userMenuItems = input<SgUserMenuItem[]>([]);
38
+ /** Pamätať si zbalenie sidebaru v localStorage. */
39
+ readonly persistSidebarState = input(true);
40
+
41
+ /** Emituje sa pri kliknutí na položku user menu (popri jej `action`). */
42
+ readonly userMenuItemClick = output<SgUserMenuItem>();
43
+
44
+ /** Texty layoutu (`provideSgAdminLabels`). */
45
+ protected readonly labels = inject(SG_ADMIN_LABELS);
46
+
47
+ readonly isHandset = signal(false);
48
+ readonly sidebarOpen = signal(false);
49
+ readonly sidebarCollapsed = signal(false);
50
+ readonly hovered = signal(false);
51
+ readonly drawerOpen = signal(false);
52
+ private noHover = false;
53
+
54
+ /** Zbalenie platí len na desktope, na mobile je sidebar vždy v plnej šírke. */
55
+ readonly collapsed = computed(() => this.sidebarCollapsed() && !this.isHandset());
56
+
57
+ readonly shortTitle = computed(() => this.appShortTitle() ?? initials(this.appTitle()));
58
+ readonly userInitials = computed(() => {
59
+ const user = this.user();
60
+ return user ? user.initials ?? initials(user.name) : '';
61
+ });
62
+
63
+ @ViewChild(DrawerComponent) drawerComponent!: DrawerComponent;
64
+
65
+ constructor(private drawerService: DrawerService) { }
66
+
67
+ ngOnInit(): void {
68
+ if (this.persistSidebarState()) {
69
+ this.sidebarCollapsed.set(readStorage(COLLAPSED_STORAGE_KEY) === 'true');
70
+ }
71
+ this.calculateWidth();
72
+ }
73
+
74
+ ngAfterViewInit(): void {
75
+ this.drawerService.setHost(this.drawerComponent, this);
76
+ }
77
+
78
+ @HostListener('window:resize')
79
+ onResize() {
80
+ this.calculateWidth();
81
+ }
82
+
83
+ openSidebar() {
84
+ this.sidebarOpen.set(true);
85
+ }
86
+
87
+ closeSidebar() {
88
+ this.sidebarOpen.set(false);
89
+ }
90
+
91
+ toggleSidebar() {
92
+ this.sidebarCollapsed.update(v => !v);
93
+ if (this.persistSidebarState()) {
94
+ writeStorage(COLLAPSED_STORAGE_KEY, String(this.sidebarCollapsed()));
95
+ }
96
+ // Po prepnutí krátko ignorujeme hover, aby sa sidebar hneď znova nerozbalil
97
+ this.noHover = true;
98
+ this.hovered.set(false);
99
+ setTimeout(() => this.noHover = false, 300);
100
+ }
101
+
102
+ setHovered(value: boolean) {
103
+ if (!this.noHover) {
104
+ this.hovered.set(value);
105
+ }
106
+ }
107
+
108
+ onNavigate() {
109
+ if (this.isHandset()) {
110
+ this.closeSidebar();
111
+ }
112
+ }
113
+
114
+ onUserMenuItem(item: SgUserMenuItem) {
115
+ item.action?.();
116
+ this.userMenuItemClick.emit(item);
117
+ }
118
+
119
+ openDrawer() {
120
+ this.drawerOpen.set(true);
121
+ }
122
+
123
+ closeDrawer() {
124
+ this.drawerOpen.set(false);
125
+ }
126
+
127
+ private calculateWidth() {
128
+ const handset = window.innerWidth <= MOBILE_BREAKPOINT;
129
+ this.isHandset.set(handset);
130
+ if (!handset) {
131
+ this.sidebarOpen.set(false);
132
+ }
133
+ }
134
+ }
135
+
136
+ function initials(text: string): string {
137
+ return text
138
+ .split(/\s+/)
139
+ .filter(Boolean)
140
+ .slice(0, 2)
141
+ .map(w => w[0]!.toUpperCase())
142
+ .join('');
143
+ }
144
+
145
+ function readStorage(key: string): string | null {
146
+ try {
147
+ return localStorage.getItem(key);
148
+ } catch {
149
+ return null;
150
+ }
151
+ }
152
+
153
+ function writeStorage(key: string, value: string) {
154
+ try {
155
+ localStorage.setItem(key, value);
156
+ } catch {
157
+ // localStorage nemusí byť dostupný (privátny režim, SSR)
158
+ }
159
+ }
@@ -0,0 +1,9 @@
1
+ /*
2
+ * Public API Surface of sagittarius-admin-template
3
+ */
4
+
5
+ export * from './lib/sagittarius-admin/sagittarius-admin';
6
+ export * from './lib/sagittarius-admin/sagittarius-admin.models';
7
+ export * from './lib/sagittarius-admin/sagittarius-admin.labels';
8
+ export * from './lib/sagittarius-admin/drawer-service';
9
+ export * from './lib/sagittarius-admin/drawer-ref';
@@ -0,0 +1,496 @@
1
+ // ═══════════════════════════════════════════════════════════════════════════
2
+ // Sagittarius Admin Template – globálne štýly
3
+ //
4
+ // Načítanie v aplikácii (angular.json → projects.<app>.architect.build.options.styles):
5
+ // "node_modules/sagittarius-admin-template/styles/sagittarius-admin.scss"
6
+ //
7
+ // Obsahuje:
8
+ // 1. design tokeny (CSS premenné --sg-*) – svetlá aj tmavá téma cez light-dark()
9
+ // 2. štýly pre overlay časti layoutu (user menu)
10
+ // 3. pomocné triedy pre obsah stránok (.sg-page, .sg-card, .sg-stat, .sg-badge…)
11
+ //
12
+ // Tmavá téma: nastavte `color-scheme: dark` na <html> (napr. triedou).
13
+ // Prispôsobenie: prepíšte ľubovoľnú premennú v :root vo vlastných štýloch.
14
+ // ═══════════════════════════════════════════════════════════════════════════
15
+
16
+ // ─── 1. Tokeny ─────────────────────────────────────────────────────────────
17
+ :root {
18
+ // Typografia
19
+ --sg-font: var(--mat-sys-body-medium-font, Roboto, 'Helvetica Neue', Arial, sans-serif);
20
+
21
+ // Rozmery layoutu
22
+ --sg-header-height: 56px;
23
+ --sg-footer-height: 40px;
24
+ --sg-drawer-header-height: 52px;
25
+ --sg-sidebar-width: 260px;
26
+ --sg-sidebar-collapsed-width: 64px;
27
+ --sg-page-padding: 24px;
28
+ --sg-page-max-width: 1440px;
29
+ --sg-gap: 16px;
30
+
31
+ // Zaoblenia a tiene
32
+ --sg-radius-sm: 8px;
33
+ --sg-radius: 12px;
34
+ --sg-shadow-sm: 0 1px 2px rgb(16 24 40 / 0.06);
35
+ --sg-shadow: 0 1px 3px rgb(16 24 40 / 0.08), 0 1px 2px rgb(16 24 40 / 0.04);
36
+ --sg-shadow-lg: 0 12px 32px -8px rgb(16 24 40 / 0.35);
37
+
38
+ // Primárna farba – preberá sa z Angular Material témy
39
+ --sg-primary: var(--mat-sys-primary, #1f5fd6);
40
+ --sg-on-primary: var(--mat-sys-on-primary, #ffffff);
41
+ --sg-primary-soft: color-mix(in srgb, var(--sg-primary) 12%, transparent);
42
+
43
+ // Neutrálne plochy (svetlá, tmavá)
44
+ --sg-bg: light-dark(#f3f5f9, #0e1117);
45
+ --sg-surface: light-dark(#ffffff, #161a22);
46
+ --sg-surface-2: light-dark(#f8f9fc, #1c212b);
47
+ --sg-header-bg: var(--sg-surface);
48
+ --sg-border: light-dark(#e3e7ee, #272d39);
49
+ --sg-hover: light-dark(rgb(16 24 40 / 0.05), rgb(255 255 255 / 0.06));
50
+ --sg-scrollbar: light-dark(rgb(16 24 40 / 0.25), rgb(255 255 255 / 0.2));
51
+
52
+ // Text
53
+ --sg-text: light-dark(#1b2230, #e5e8ef);
54
+ --sg-text-muted: light-dark(#667085, #98a1b3);
55
+
56
+ // Sidebar – tmavý v oboch témach
57
+ --sg-sidebar-bg: #111a2e;
58
+ --sg-sidebar-border: rgb(255 255 255 / 0.07);
59
+ --sg-sidebar-text: #b8c1d3;
60
+ --sg-sidebar-text-strong: #ffffff;
61
+ --sg-sidebar-text-muted: #7482a0;
62
+ --sg-sidebar-hover: rgb(255 255 255 / 0.06);
63
+ --sg-sidebar-active-bg: rgb(255 255 255 / 0.09);
64
+ --sg-sidebar-accent: #5b9bff;
65
+ --sg-sidebar-accent-2: #8b6cff;
66
+ --sg-sidebar-accent-contrast: #0b1224;
67
+ --sg-sidebar-scrollbar: rgb(255 255 255 / 0.18);
68
+
69
+ // Stavové farby (text / pozadie)
70
+ --sg-success: light-dark(#0f7b4f, #4fd39a);
71
+ --sg-success-soft: light-dark(#e3f6ec, rgb(79 211 154 / 0.14));
72
+ --sg-warning: light-dark(#a15c00, #f5b74e);
73
+ --sg-warning-soft: light-dark(#fdf1dc, rgb(245 183 78 / 0.14));
74
+ --sg-danger: light-dark(#c0292b, #ff7a7a);
75
+ --sg-danger-soft: light-dark(#fde6e6, rgb(255 122 122 / 0.14));
76
+ --sg-info: light-dark(#1f5fd6, #7fb0ff);
77
+ --sg-info-soft: light-dark(#e3edfd, rgb(127 176 255 / 0.14));
78
+ --sg-neutral: var(--sg-text-muted);
79
+ --sg-neutral-soft: light-dark(#eef1f5, rgb(255 255 255 / 0.07));
80
+ }
81
+
82
+ // ─── 2. Overlay časti layoutu ──────────────────────────────────────────────
83
+ .sg-admin-user-menu {
84
+ min-width: 220px !important;
85
+
86
+ .sg-admin-user-menu-header {
87
+ padding: 12px 16px 10px;
88
+ border-bottom: 1px solid var(--sg-border);
89
+ margin-bottom: 4px;
90
+ }
91
+
92
+ .sg-admin-user-menu-name {
93
+ font-weight: 600;
94
+ color: var(--sg-text);
95
+ }
96
+
97
+ .sg-admin-user-menu-subtitle {
98
+ font-size: 12px;
99
+ color: var(--sg-text-muted);
100
+ }
101
+
102
+ .sg-admin-user-menu-divider {
103
+ height: 1px;
104
+ margin: 4px 0;
105
+ background: var(--sg-border);
106
+ }
107
+ }
108
+
109
+ // ─── 3. Obsah stránok ──────────────────────────────────────────────────────
110
+
111
+ // Obsah stránok a drawerov počíta rozmery vrátane paddingu
112
+ :where(.sg-page, .sg-drawer-page),
113
+ :where(.sg-page, .sg-drawer-page) * {
114
+ box-sizing: border-box;
115
+ }
116
+
117
+ // Stránka: <div class="sg-page"> … </div>
118
+ .sg-page {
119
+ display: flex;
120
+ flex-direction: column;
121
+ gap: var(--sg-gap);
122
+ width: 100%;
123
+ max-width: var(--sg-page-max-width);
124
+ margin: 0 auto;
125
+ padding: var(--sg-page-padding);
126
+ }
127
+
128
+ .sg-page-header {
129
+ display: flex;
130
+ flex-wrap: wrap;
131
+ align-items: flex-end;
132
+ justify-content: space-between;
133
+ gap: 12px 24px;
134
+ margin-bottom: 4px;
135
+
136
+ .sg-page-title {
137
+ margin: 0;
138
+ font-size: 24px;
139
+ line-height: 32px;
140
+ font-weight: 600;
141
+ color: var(--sg-text);
142
+ }
143
+
144
+ .sg-page-subtitle {
145
+ margin: 2px 0 0;
146
+ color: var(--sg-text-muted);
147
+ }
148
+
149
+ .sg-page-actions {
150
+ display: flex;
151
+ flex-wrap: wrap;
152
+ align-items: center;
153
+ gap: 8px;
154
+ }
155
+ }
156
+
157
+ .sg-breadcrumbs {
158
+ display: flex;
159
+ flex-wrap: wrap;
160
+ align-items: center;
161
+ gap: 6px;
162
+ margin-bottom: 4px;
163
+ font-size: 12px;
164
+ color: var(--sg-text-muted);
165
+
166
+ a {
167
+ color: inherit;
168
+ text-decoration: none;
169
+
170
+ &:hover {
171
+ color: var(--sg-primary);
172
+ }
173
+ }
174
+
175
+ > :not(:last-child)::after {
176
+ content: '/';
177
+ margin-left: 6px;
178
+ opacity: 0.6;
179
+ }
180
+ }
181
+
182
+ // Karta
183
+ .sg-card {
184
+ display: flex;
185
+ flex-direction: column;
186
+ min-width: 0;
187
+ background: var(--sg-surface);
188
+ border: 1px solid var(--sg-border);
189
+ border-radius: var(--sg-radius);
190
+ box-shadow: var(--sg-shadow-sm);
191
+ color: var(--sg-text);
192
+ // Material tabuľka a paginator v karte preberajú pozadie karty
193
+ --mat-table-background-color: transparent;
194
+ --mat-paginator-container-background-color: transparent;
195
+
196
+ .sg-card-header {
197
+ display: flex;
198
+ align-items: center;
199
+ justify-content: space-between;
200
+ gap: 12px;
201
+ min-height: 56px;
202
+ padding: 12px 20px;
203
+ border-bottom: 1px solid var(--sg-border);
204
+ }
205
+
206
+ .sg-card-title {
207
+ margin: 0;
208
+ font-size: 15px;
209
+ font-weight: 600;
210
+ }
211
+
212
+ .sg-card-subtitle {
213
+ margin: 0;
214
+ font-size: 12px;
215
+ color: var(--sg-text-muted);
216
+ }
217
+
218
+ .sg-card-body {
219
+ padding: 20px;
220
+ flex-grow: 1;
221
+ }
222
+
223
+ .sg-card-body-flush {
224
+ flex-grow: 1;
225
+ overflow-x: auto;
226
+ }
227
+
228
+ .sg-card-footer {
229
+ display: flex;
230
+ align-items: center;
231
+ justify-content: flex-end;
232
+ gap: 8px;
233
+ padding: 12px 20px;
234
+ border-top: 1px solid var(--sg-border);
235
+ background: var(--sg-surface-2);
236
+ border-radius: 0 0 var(--sg-radius) var(--sg-radius);
237
+ }
238
+ }
239
+
240
+ // Mriežka – automaticky sa zalamuje; .sg-grid-2/3/4 = max. počet stĺpcov
241
+ .sg-grid {
242
+ display: grid;
243
+ gap: var(--sg-gap);
244
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
245
+
246
+ &.sg-grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(320px, calc((100% - var(--sg-gap)) / 2))), 1fr)); }
247
+ &.sg-grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(260px, calc((100% - 2 * var(--sg-gap)) / 3))), 1fr)); }
248
+ &.sg-grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(200px, calc((100% - 3 * var(--sg-gap)) / 4))), 1fr)); }
249
+
250
+ .sg-span-2 { grid-column: span 2; }
251
+
252
+ @media (max-width: 1100px) {
253
+ .sg-span-2 { grid-column: auto; }
254
+ }
255
+ }
256
+
257
+ // KPI dlaždica
258
+ .sg-stat {
259
+ display: flex;
260
+ flex-direction: column;
261
+ gap: 6px;
262
+ padding: 18px 20px;
263
+
264
+ .sg-stat-head {
265
+ display: flex;
266
+ align-items: center;
267
+ justify-content: space-between;
268
+ }
269
+
270
+ .sg-stat-label {
271
+ font-size: 13px;
272
+ color: var(--sg-text-muted);
273
+ }
274
+
275
+ .sg-stat-icon {
276
+ display: flex;
277
+ align-items: center;
278
+ justify-content: center;
279
+ width: 36px;
280
+ height: 36px;
281
+ border-radius: var(--sg-radius-sm);
282
+ background: var(--sg-primary-soft);
283
+ color: var(--sg-primary);
284
+ }
285
+
286
+ .sg-stat-value {
287
+ font-size: 28px;
288
+ line-height: 34px;
289
+ font-weight: 600;
290
+ font-variant-numeric: tabular-nums;
291
+ }
292
+
293
+ .sg-stat-delta {
294
+ font-size: 12px;
295
+ color: var(--sg-text-muted);
296
+
297
+ .up { color: var(--sg-success); font-weight: 600; }
298
+ .down { color: var(--sg-danger); font-weight: 600; }
299
+ }
300
+ }
301
+
302
+ // Odznak / stav: <span class="sg-badge sg-badge-success">Aktívny</span>
303
+ .sg-badge {
304
+ display: inline-flex;
305
+ align-items: center;
306
+ gap: 6px;
307
+ height: 22px;
308
+ padding: 0 8px;
309
+ border-radius: 11px;
310
+ font-size: 12px;
311
+ font-weight: 500;
312
+ white-space: nowrap;
313
+ color: var(--sg-neutral);
314
+ background: var(--sg-neutral-soft);
315
+
316
+ &::before {
317
+ content: '';
318
+ width: 6px;
319
+ height: 6px;
320
+ border-radius: 50%;
321
+ background: currentColor;
322
+ }
323
+
324
+ &.sg-badge-plain::before { display: none; }
325
+ &.sg-badge-success { color: var(--sg-success); background: var(--sg-success-soft); }
326
+ &.sg-badge-warning { color: var(--sg-warning); background: var(--sg-warning-soft); }
327
+ &.sg-badge-danger { color: var(--sg-danger); background: var(--sg-danger-soft); }
328
+ &.sg-badge-info { color: var(--sg-info); background: var(--sg-info-soft); }
329
+ }
330
+
331
+ // Avatar s iniciálami
332
+ .sg-avatar {
333
+ display: inline-flex;
334
+ align-items: center;
335
+ justify-content: center;
336
+ flex-shrink: 0;
337
+ width: 32px;
338
+ height: 32px;
339
+ border-radius: 50%;
340
+ font-size: 12px;
341
+ font-weight: 600;
342
+ color: var(--sg-primary);
343
+ background: var(--sg-primary-soft);
344
+
345
+ &.sg-avatar-lg {
346
+ width: 64px;
347
+ height: 64px;
348
+ font-size: 22px;
349
+ }
350
+ }
351
+
352
+ // Riadok filtrov nad tabuľkou
353
+ .sg-toolbar {
354
+ display: flex;
355
+ flex-wrap: wrap;
356
+ align-items: center;
357
+ gap: 12px;
358
+ padding: 12px 20px;
359
+ border-bottom: 1px solid var(--sg-border);
360
+
361
+ .sg-toolbar-spacer {
362
+ flex: 1 1 auto;
363
+ }
364
+
365
+ // kompaktné Material form fieldy bez rezervy na hint
366
+ .mat-mdc-form-field {
367
+ --mat-form-field-container-height: 40px;
368
+ --mat-form-field-container-vertical-padding: 8px;
369
+ --mat-form-field-filled-with-label-container-padding-top: 8px;
370
+ --mat-form-field-filled-with-label-container-padding-bottom: 8px;
371
+ }
372
+
373
+ .mat-mdc-form-field-subscript-wrapper {
374
+ display: none;
375
+ }
376
+ }
377
+
378
+ // Klikateľné riadky tabuľky
379
+ .sg-table-clickable .mat-mdc-row {
380
+ cursor: pointer;
381
+ transition: background-color 120ms;
382
+
383
+ &:hover {
384
+ background: var(--sg-hover);
385
+ }
386
+ }
387
+
388
+ // Formulár v mriežke; .sg-col-full = cez celú šírku
389
+ .sg-form-grid {
390
+ display: grid;
391
+ grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
392
+ gap: 4px 16px;
393
+
394
+ .sg-col-full {
395
+ grid-column: 1 / -1;
396
+ }
397
+ }
398
+
399
+ .sg-form-section-title {
400
+ margin: 8px 0 12px;
401
+ font-size: 13px;
402
+ font-weight: 600;
403
+ letter-spacing: 0.04em;
404
+ text-transform: uppercase;
405
+ color: var(--sg-text-muted);
406
+ }
407
+
408
+ // Zoznam kľúč–hodnota pre detail
409
+ .sg-kv {
410
+ display: grid;
411
+ grid-template-columns: minmax(120px, max-content) 1fr;
412
+ gap: 10px 24px;
413
+ margin: 0;
414
+
415
+ dt {
416
+ color: var(--sg-text-muted);
417
+ }
418
+
419
+ dd {
420
+ margin: 0;
421
+ color: var(--sg-text);
422
+ min-width: 0;
423
+ overflow-wrap: anywhere;
424
+ }
425
+ }
426
+
427
+ // Prázdny stav
428
+ .sg-empty-state {
429
+ display: flex;
430
+ flex-direction: column;
431
+ align-items: center;
432
+ justify-content: center;
433
+ gap: 8px;
434
+ padding: 48px 24px;
435
+ text-align: center;
436
+ color: var(--sg-text-muted);
437
+
438
+ .mat-icon {
439
+ width: 48px;
440
+ height: 48px;
441
+ font-size: 48px;
442
+ opacity: 0.5;
443
+ }
444
+
445
+ h3 {
446
+ margin: 8px 0 0;
447
+ font-size: 16px;
448
+ font-weight: 600;
449
+ color: var(--sg-text);
450
+ }
451
+
452
+ p {
453
+ margin: 0;
454
+ max-width: 420px;
455
+ }
456
+ }
457
+
458
+ // Obsah v draweri: <div class="sg-drawer-page"> … </div>
459
+ .sg-drawer-page {
460
+ display: flex;
461
+ flex-direction: column;
462
+ gap: var(--sg-gap);
463
+ width: 100%;
464
+ max-width: 960px;
465
+ margin: 0 auto;
466
+ padding: var(--sg-page-padding);
467
+ }
468
+
469
+ .sg-page.sg-page-narrow,
470
+ .sg-drawer-page.sg-page-narrow {
471
+ max-width: 880px;
472
+ }
473
+
474
+ .sg-muted {
475
+ color: var(--sg-text-muted);
476
+ }
477
+
478
+ .sg-text-right {
479
+ text-align: right;
480
+ }
481
+
482
+ .sg-nowrap {
483
+ white-space: nowrap;
484
+ }
485
+
486
+ @media (max-width: 800px) {
487
+ :root {
488
+ --sg-page-padding: 16px;
489
+ --sg-gap: 12px;
490
+ }
491
+
492
+ .sg-page-header .sg-page-title {
493
+ font-size: 20px;
494
+ line-height: 28px;
495
+ }
496
+ }
@@ -0,0 +1,18 @@
1
+ /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
2
+ /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
3
+ {
4
+ "extends": "../../tsconfig.json",
5
+ "compilerOptions": {
6
+ "outDir": "../../out-tsc/lib",
7
+ "declaration": true,
8
+ "declarationMap": true,
9
+ "inlineSources": true,
10
+ "types": []
11
+ },
12
+ "include": [
13
+ "src/**/*.ts"
14
+ ],
15
+ "exclude": [
16
+ "**/*.spec.ts"
17
+ ]
18
+ }
@@ -0,0 +1,11 @@
1
+ /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
2
+ /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
3
+ {
4
+ "extends": "./tsconfig.lib.json",
5
+ "compilerOptions": {
6
+ "declarationMap": false
7
+ },
8
+ "angularCompilerOptions": {
9
+ "compilationMode": "partial"
10
+ }
11
+ }
@@ -0,0 +1,14 @@
1
+ /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
2
+ /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
3
+ {
4
+ "extends": "../../tsconfig.json",
5
+ "compilerOptions": {
6
+ "outDir": "../../out-tsc/spec",
7
+ "types": [
8
+ "jasmine"
9
+ ]
10
+ },
11
+ "include": [
12
+ "src/**/*.ts"
13
+ ]
14
+ }