@konce-pt/angular 0.7.0 → 0.7.5
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/CHANGELOG.md +317 -1
- package/fesm2022/konce-pt-angular-map.mjs +4568 -0
- package/fesm2022/konce-pt-angular-map.mjs.map +1 -0
- package/fesm2022/konce-pt-angular.mjs +515 -77
- package/fesm2022/konce-pt-angular.mjs.map +1 -1
- package/map/src/lib/llms.txt +741 -0
- package/package.json +17 -4
- package/src/lib/app-shell/llms.txt +70 -10
- package/src/lib/breakpoint/llms.txt +45 -0
- package/src/lib/datepicker/llms.txt +3 -0
- package/src/lib/dialog/llms.txt +62 -21
- package/src/lib/form-field/llms.txt +19 -1
- package/src/lib/icon/llms.txt +2 -1
- package/src/lib/input/llms.txt +1 -1
- package/src/lib/select/llms.txt +9 -0
- package/src/lib/sidenav/llms.txt +29 -20
- package/src/lib/toolbar/llms.txt +31 -23
- package/types/konce-pt-angular-map.d.ts +1585 -0
- package/types/konce-pt-angular-map.d.ts.map +1 -0
- package/types/konce-pt-angular.d.ts +304 -20
- package/types/konce-pt-angular.d.ts.map +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, booleanAttribute, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, model, output, InjectionToken, signal, inject, Injectable, ElementRef, effect, makeEnvironmentProviders, afterNextRender, numberAttribute, viewChild, Directive,
|
|
3
|
-
import { CdkOverlayOrigin, CdkConnectedOverlay } from '@angular/cdk/overlay';
|
|
4
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
2
|
+
import { input, booleanAttribute, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, model, output, InjectionToken, signal, inject, Injectable, ElementRef, effect, PLATFORM_ID, DestroyRef, makeEnvironmentProviders, contentChild, afterNextRender, forwardRef, numberAttribute, viewChild, Directive, TemplateRef, contentChildren, viewChildren, afterRenderEffect, linkedSignal } from '@angular/core';
|
|
3
|
+
import { CdkOverlayOrigin, CdkConnectedOverlay, OverlayContainer } from '@angular/cdk/overlay';
|
|
4
|
+
import { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';
|
|
5
5
|
|
|
6
6
|
const _c0$D = ["*"];
|
|
7
7
|
function KptButton_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -305,6 +305,75 @@ const KPT_MESSAGES_EN = {
|
|
|
305
305
|
expandGroup: 'Expand group',
|
|
306
306
|
collapseGroup: 'Collapse group',
|
|
307
307
|
},
|
|
308
|
+
map: {
|
|
309
|
+
addLocation: 'Add location',
|
|
310
|
+
chooseCategory: 'Choose a category',
|
|
311
|
+
myLocation: 'My location',
|
|
312
|
+
locateMe: 'Centre on my location',
|
|
313
|
+
locationDenied: 'Location access denied',
|
|
314
|
+
locationUnavailable: 'Location unavailable',
|
|
315
|
+
zoomIn: 'Zoom in',
|
|
316
|
+
zoomOut: 'Zoom out',
|
|
317
|
+
legend: 'Legend',
|
|
318
|
+
showCategory: 'Show {category}',
|
|
319
|
+
hideCategory: 'Hide {category}',
|
|
320
|
+
cluster: 'Group of {count} locations',
|
|
321
|
+
clusterItems: 'Locations in this group',
|
|
322
|
+
fieldRequired: '{label} is required',
|
|
323
|
+
lookingUpAddress: 'Looking up the address…',
|
|
324
|
+
addressNotFound: 'No address found for this point',
|
|
325
|
+
latitude: 'Latitude',
|
|
326
|
+
longitude: 'Longitude',
|
|
327
|
+
empty: 'No locations',
|
|
328
|
+
save: 'Save',
|
|
329
|
+
cancel: 'Cancel',
|
|
330
|
+
poi: {
|
|
331
|
+
distanceAway: '{distance} away',
|
|
332
|
+
openNow: 'Open',
|
|
333
|
+
closedNow: 'Closed',
|
|
334
|
+
opensAt: 'opens at {time}',
|
|
335
|
+
closesAt: 'closes at {time}',
|
|
336
|
+
alwaysOpen: 'Open 24/7',
|
|
337
|
+
openingHours: 'Opening hours',
|
|
338
|
+
closedDay: 'Closed',
|
|
339
|
+
call: 'Call',
|
|
340
|
+
sendEmail: 'Send an e-mail',
|
|
341
|
+
openWebsite: 'Open the website',
|
|
342
|
+
coordinates: 'Coordinates',
|
|
343
|
+
copy: 'Copy',
|
|
344
|
+
copied: 'Copied',
|
|
345
|
+
share: 'Share',
|
|
346
|
+
addFavourite: 'Add to favourites',
|
|
347
|
+
removeFavourite: 'Remove from favourites',
|
|
348
|
+
noPhoto: 'No photo',
|
|
349
|
+
},
|
|
350
|
+
search: {
|
|
351
|
+
placeholder: 'Search for an address…',
|
|
352
|
+
label: 'Search for an address',
|
|
353
|
+
results: 'Address suggestions',
|
|
354
|
+
clear: 'Clear the search',
|
|
355
|
+
noResults: 'No matching places',
|
|
356
|
+
minLength: 'Type at least {count} characters',
|
|
357
|
+
searching: 'Searching…',
|
|
358
|
+
found: '{count} suggestions',
|
|
359
|
+
},
|
|
360
|
+
field: {
|
|
361
|
+
invalidEmail: 'Enter a valid e-mail address',
|
|
362
|
+
invalidUrl: 'Enter an address starting with http:// or https://',
|
|
363
|
+
imageTooLarge: 'The picture must be no larger than {max}',
|
|
364
|
+
pickImage: 'Pick a picture',
|
|
365
|
+
orPasteUrl: 'or paste a picture address',
|
|
366
|
+
removeImage: 'Remove the picture',
|
|
367
|
+
imagePreview: 'Picture preview',
|
|
368
|
+
hoursClosed: 'Closed',
|
|
369
|
+
hoursFrom: 'From',
|
|
370
|
+
hoursTo: 'To',
|
|
371
|
+
hoursSameAllWeek: 'Same all week',
|
|
372
|
+
hoursAddRange: 'Add a second range',
|
|
373
|
+
hoursRemoveRange: 'Remove the range',
|
|
374
|
+
hoursIncomplete: 'Set both times for {day} or mark the day as closed',
|
|
375
|
+
},
|
|
376
|
+
},
|
|
308
377
|
dataTable: {
|
|
309
378
|
search: 'Search…',
|
|
310
379
|
exportCsv: 'Export CSV',
|
|
@@ -387,6 +456,10 @@ const KPT_MESSAGES_EN = {
|
|
|
387
456
|
panel: {
|
|
388
457
|
toggle: 'Collapse / expand',
|
|
389
458
|
},
|
|
459
|
+
appShell: {
|
|
460
|
+
toggleNavigation: 'Toggle navigation',
|
|
461
|
+
navigation: 'Main navigation',
|
|
462
|
+
},
|
|
390
463
|
breadcrumb: {
|
|
391
464
|
label: 'breadcrumb',
|
|
392
465
|
},
|
|
@@ -493,6 +566,75 @@ const KPT_MESSAGES_PL = {
|
|
|
493
566
|
expandGroup: 'Rozwiń grupę',
|
|
494
567
|
collapseGroup: 'Zwiń grupę',
|
|
495
568
|
},
|
|
569
|
+
map: {
|
|
570
|
+
addLocation: 'Dodaj lokalizację',
|
|
571
|
+
chooseCategory: 'Wybierz kategorię',
|
|
572
|
+
myLocation: 'Moje położenie',
|
|
573
|
+
locateMe: 'Wyśrodkuj na moim położeniu',
|
|
574
|
+
locationDenied: 'Brak zgody na dostęp do lokalizacji',
|
|
575
|
+
locationUnavailable: 'Położenie niedostępne',
|
|
576
|
+
zoomIn: 'Przybliż',
|
|
577
|
+
zoomOut: 'Oddal',
|
|
578
|
+
legend: 'Legenda',
|
|
579
|
+
showCategory: 'Pokaż: {category}',
|
|
580
|
+
hideCategory: 'Ukryj: {category}',
|
|
581
|
+
cluster: 'Grupa {count} lokalizacji',
|
|
582
|
+
clusterItems: 'Lokalizacje w tej grupie',
|
|
583
|
+
fieldRequired: 'Pole „{label}" jest wymagane',
|
|
584
|
+
lookingUpAddress: 'Szukam adresu…',
|
|
585
|
+
addressNotFound: 'Nie znaleziono adresu dla tego punktu',
|
|
586
|
+
latitude: 'Szerokość',
|
|
587
|
+
longitude: 'Długość',
|
|
588
|
+
empty: 'Brak lokalizacji',
|
|
589
|
+
save: 'Zapisz',
|
|
590
|
+
cancel: 'Anuluj',
|
|
591
|
+
poi: {
|
|
592
|
+
distanceAway: '{distance} od Ciebie',
|
|
593
|
+
openNow: 'Otwarte',
|
|
594
|
+
closedNow: 'Zamknięte',
|
|
595
|
+
opensAt: 'otwarcie o {time}',
|
|
596
|
+
closesAt: 'zamknięcie o {time}',
|
|
597
|
+
alwaysOpen: 'Czynne całą dobę',
|
|
598
|
+
openingHours: 'Godziny otwarcia',
|
|
599
|
+
closedDay: 'Zamknięte',
|
|
600
|
+
call: 'Zadzwoń',
|
|
601
|
+
sendEmail: 'Napisz wiadomość',
|
|
602
|
+
openWebsite: 'Otwórz stronę',
|
|
603
|
+
coordinates: 'Współrzędne',
|
|
604
|
+
copy: 'Kopiuj',
|
|
605
|
+
copied: 'Skopiowano',
|
|
606
|
+
share: 'Udostępnij',
|
|
607
|
+
addFavourite: 'Dodaj do ulubionych',
|
|
608
|
+
removeFavourite: 'Usuń z ulubionych',
|
|
609
|
+
noPhoto: 'Brak zdjęcia',
|
|
610
|
+
},
|
|
611
|
+
search: {
|
|
612
|
+
placeholder: 'Szukaj adresu…',
|
|
613
|
+
label: 'Szukaj adresu',
|
|
614
|
+
results: 'Podpowiedzi adresów',
|
|
615
|
+
clear: 'Wyczyść wyszukiwanie',
|
|
616
|
+
noResults: 'Brak pasujących miejsc',
|
|
617
|
+
minLength: 'Wpisz więcej znaków (minimum: {count})',
|
|
618
|
+
searching: 'Szukam…',
|
|
619
|
+
found: 'Podpowiedzi: {count}',
|
|
620
|
+
},
|
|
621
|
+
field: {
|
|
622
|
+
invalidEmail: 'Podaj poprawny adres e-mail',
|
|
623
|
+
invalidUrl: 'Podaj adres zaczynający się od http:// albo https://',
|
|
624
|
+
imageTooLarge: 'Zdjęcie może mieć najwyżej {max}',
|
|
625
|
+
pickImage: 'Wybierz zdjęcie',
|
|
626
|
+
orPasteUrl: 'albo wklej adres zdjęcia',
|
|
627
|
+
removeImage: 'Usuń zdjęcie',
|
|
628
|
+
imagePreview: 'Podgląd zdjęcia',
|
|
629
|
+
hoursClosed: 'Zamknięte',
|
|
630
|
+
hoursFrom: 'Od',
|
|
631
|
+
hoursTo: 'Do',
|
|
632
|
+
hoursSameAllWeek: 'Tak samo przez cały tydzień',
|
|
633
|
+
hoursAddRange: 'Dodaj drugi przedział',
|
|
634
|
+
hoursRemoveRange: 'Usuń przedział',
|
|
635
|
+
hoursIncomplete: 'Podaj obie godziny dla dnia {day} albo oznacz go jako zamknięty',
|
|
636
|
+
},
|
|
637
|
+
},
|
|
496
638
|
dataTable: {
|
|
497
639
|
search: 'Szukaj…',
|
|
498
640
|
exportCsv: 'Eksport CSV',
|
|
@@ -575,6 +717,10 @@ const KPT_MESSAGES_PL = {
|
|
|
575
717
|
panel: {
|
|
576
718
|
toggle: 'Zwiń / rozwiń',
|
|
577
719
|
},
|
|
720
|
+
appShell: {
|
|
721
|
+
toggleNavigation: 'Przełącz nawigację',
|
|
722
|
+
navigation: 'Nawigacja główna',
|
|
723
|
+
},
|
|
578
724
|
breadcrumb: {
|
|
579
725
|
label: 'breadcrumb',
|
|
580
726
|
},
|
|
@@ -782,6 +928,10 @@ const KPT_ICONS = {
|
|
|
782
928
|
'clipboard': '<path d="M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2" /> <path d="M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z" />',
|
|
783
929
|
'clipboard-text': '<path d="M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2" /> <path d="M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z" /> <path d="M9 12h6" /> <path d="M9 16h6" />',
|
|
784
930
|
'table': '<path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" /> <path d="M3 10h18" /> <path d="M10 3v18" />',
|
|
931
|
+
'mail': '<path d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z" /> <path d="M3 7l9 6l9 -6" />',
|
|
932
|
+
'share': '<path d="M6 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M18 6m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M8.7 10.7l6.6 -3.4" /> <path d="M8.7 13.3l6.6 3.4" />',
|
|
933
|
+
'external-link': '<path d="M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6" /> <path d="M11 13l9 -9" /> <path d="M15 4h5v5" />',
|
|
934
|
+
'crosshair': '<path d="M4 12h4" /> <path d="M16 12h4" /> <path d="M12 4v4" /> <path d="M12 16v4" /> <path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" />',
|
|
785
935
|
};
|
|
786
936
|
|
|
787
937
|
/**
|
|
@@ -818,6 +968,21 @@ class KptIconRegistry {
|
|
|
818
968
|
type: Injectable,
|
|
819
969
|
args: [{ providedIn: 'root' }]
|
|
820
970
|
}], null, null); })();
|
|
971
|
+
/**
|
|
972
|
+
* Składa pełny znacznik `<svg>` z wewnętrznego SVG z rejestru.
|
|
973
|
+
*
|
|
974
|
+
* Wydzielone z `kpt-icon`, bo tego samego stringa potrzebują znaczniki mapy —
|
|
975
|
+
* ich HTML powstaje poza Angularem, w DOM zarządzanym przez silnik mapy.
|
|
976
|
+
* Pusty `inner` daje pusty string, żeby wołający nie musiał tego sprawdzać.
|
|
977
|
+
*/
|
|
978
|
+
function renderKptIconSvg(inner, cssClass = 'kpt-icon') {
|
|
979
|
+
if (!inner)
|
|
980
|
+
return '';
|
|
981
|
+
return (`<svg class="${cssClass}" viewBox="0 0 24 24" fill="none" stroke="currentColor"` +
|
|
982
|
+
' stroke-width="2" stroke-linecap="round" stroke-linejoin="round">' +
|
|
983
|
+
inner +
|
|
984
|
+
'</svg>');
|
|
985
|
+
}
|
|
821
986
|
|
|
822
987
|
/**
|
|
823
988
|
* Ikona Koncept UI (inline SVG, zestaw Tabler Icons — MIT). Rozmiar dziedziczy z `font-size`
|
|
@@ -841,14 +1006,8 @@ class KptIcon {
|
|
|
841
1006
|
this.registry = inject(KptIconRegistry);
|
|
842
1007
|
effect(() => {
|
|
843
1008
|
this.registry.version(); // reaguj na późną rejestrację ikon
|
|
844
|
-
const inner = this.registry.get(this.name()) ?? '';
|
|
845
1009
|
// Treść pochodzi z zaufanego rejestru — bezpośredni innerHTML bez sanitizera.
|
|
846
|
-
this.host.nativeElement.innerHTML =
|
|
847
|
-
? '<svg class="kpt-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"' +
|
|
848
|
-
' stroke-width="2" stroke-linecap="round" stroke-linejoin="round">' +
|
|
849
|
-
inner +
|
|
850
|
-
'</svg>'
|
|
851
|
-
: '';
|
|
1010
|
+
this.host.nativeElement.innerHTML = renderKptIconSvg(this.registry.get(this.name()));
|
|
852
1011
|
});
|
|
853
1012
|
}
|
|
854
1013
|
static { this.ɵfac = function KptIcon_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptIcon)(); }; }
|
|
@@ -1013,6 +1172,76 @@ class KptSplitButton {
|
|
|
1013
1172
|
}], null, { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], primaryClick: [{ type: i0.Output, args: ["primaryClick"] }], select: [{ type: i0.Output, args: ["select"] }] }); })();
|
|
1014
1173
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptSplitButton, { className: "KptSplitButton", filePath: "lib/split-button/split-button.component.ts", lineNumber: 68 }); })();
|
|
1015
1174
|
|
|
1175
|
+
// Do not edit directly — generated by scripts/gen-tokens.mjs
|
|
1176
|
+
// from @konce-pt/tokens (tokens/primitives/breakpoint.json).
|
|
1177
|
+
/** Progi breakpointów w pikselach — te same wartości, z których korzystają `@media` biblioteki. */
|
|
1178
|
+
const KPT_BREAKPOINTS = {
|
|
1179
|
+
'sm': 640,
|
|
1180
|
+
'md': 768,
|
|
1181
|
+
'lg': 1024,
|
|
1182
|
+
'xl': 1280,
|
|
1183
|
+
'2xl': 1536,
|
|
1184
|
+
};
|
|
1185
|
+
|
|
1186
|
+
/**
|
|
1187
|
+
* Obserwator breakpointów oparty na `matchMedia`, spięty z tokenami `--kpt-breakpoint-*`.
|
|
1188
|
+
* Zwraca sygnały, więc czyta się go tak samo w `computed`, w szablonie i w `effect`.
|
|
1189
|
+
*
|
|
1190
|
+
* Zapytania są memoizowane per string: `up('lg')` wywołane w wielu komponentach dzieli
|
|
1191
|
+
* jeden `MediaQueryList` i jeden nasłuch.
|
|
1192
|
+
*
|
|
1193
|
+
* Poza przeglądarką (SSR, prerender) każdy sygnał to stałe `false`. Dlatego **układ**
|
|
1194
|
+
* komponentów biblioteki nigdy nie zależy od tego serwisu — o tym, jak wygląda strona,
|
|
1195
|
+
* decyduje CSS, żeby nic nie migotało przed hydracją. Serwis odpowiada za zachowania,
|
|
1196
|
+
* których CSS nie wyrazi (np. w którą stronę ma zadziałać przycisk).
|
|
1197
|
+
*
|
|
1198
|
+
* @example
|
|
1199
|
+
* private readonly breakpoints = inject(KptBreakpointObserver);
|
|
1200
|
+
* readonly isDesktop = this.breakpoints.up('lg');
|
|
1201
|
+
*/
|
|
1202
|
+
class KptBreakpointObserver {
|
|
1203
|
+
constructor() {
|
|
1204
|
+
this.isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
1205
|
+
this.destroyRef = inject(DestroyRef);
|
|
1206
|
+
this.cache = new Map();
|
|
1207
|
+
}
|
|
1208
|
+
/** Dowolne media query jako sygnał. */
|
|
1209
|
+
matches(query) {
|
|
1210
|
+
const cached = this.cache.get(query);
|
|
1211
|
+
if (cached)
|
|
1212
|
+
return cached;
|
|
1213
|
+
const result = this.isBrowser ? this.observe(query) : signal(false).asReadonly();
|
|
1214
|
+
this.cache.set(query, result);
|
|
1215
|
+
return result;
|
|
1216
|
+
}
|
|
1217
|
+
/** Czy viewport ma szerokość co najmniej danego breakpointa (mobile-first). */
|
|
1218
|
+
up(breakpoint) {
|
|
1219
|
+
return this.matches(`(min-width: ${KPT_BREAKPOINTS[breakpoint]}px)`);
|
|
1220
|
+
}
|
|
1221
|
+
/**
|
|
1222
|
+
* Czy viewport jest węższy niż dany breakpoint. Próg schodzi o 0.02px, żeby pasma
|
|
1223
|
+
* `up`/`down` nie nakładały się na ułamkowych szerokościach okna (zoom, DPI).
|
|
1224
|
+
*/
|
|
1225
|
+
down(breakpoint) {
|
|
1226
|
+
return this.matches(`(max-width: ${KPT_BREAKPOINTS[breakpoint] - 0.02}px)`);
|
|
1227
|
+
}
|
|
1228
|
+
observe(query) {
|
|
1229
|
+
const list = window.matchMedia(query);
|
|
1230
|
+
const state = signal(list.matches, /* @ts-ignore */
|
|
1231
|
+
...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
|
|
1232
|
+
const onChange = (event) => state.set(event.matches);
|
|
1233
|
+
list.addEventListener('change', onChange);
|
|
1234
|
+
this.destroyRef.onDestroy(() => list.removeEventListener('change', onChange));
|
|
1235
|
+
return state.asReadonly();
|
|
1236
|
+
}
|
|
1237
|
+
static { this.ɵfac = function KptBreakpointObserver_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptBreakpointObserver)(); }; }
|
|
1238
|
+
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: KptBreakpointObserver, factory: KptBreakpointObserver.ɵfac, providedIn: 'root' }); }
|
|
1239
|
+
}
|
|
1240
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptBreakpointObserver, [{
|
|
1241
|
+
type: Injectable,
|
|
1242
|
+
args: [{ providedIn: 'root' }]
|
|
1243
|
+
}], null, null); })();
|
|
1244
|
+
|
|
1016
1245
|
/**
|
|
1017
1246
|
* Konfiguruje i18n Koncept UI. Ustawia język początkowy i rejestruje/nadpisuje
|
|
1018
1247
|
* słowniki. Języki bazowe (EN, PL) są dostępne bez konfiguracji.
|
|
@@ -1415,6 +1644,9 @@ class KptSkeleton {
|
|
|
1415
1644
|
}], null, { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], lines: [{ type: i0.Input, args: [{ isSignal: true, alias: "lines", required: false }] }] }); })();
|
|
1416
1645
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptSkeleton, { className: "KptSkeleton", filePath: "lib/skeleton/skeleton.component.ts", lineNumber: 29 }); })();
|
|
1417
1646
|
|
|
1647
|
+
/** Token DI, przez który kontrolka zgłasza `kpt-form-field` swój stan wypełnienia. */
|
|
1648
|
+
const KPT_FORM_FIELD_CONTROL = new InjectionToken('KPT_FORM_FIELD_CONTROL');
|
|
1649
|
+
|
|
1418
1650
|
const _c0$x = ["*"];
|
|
1419
1651
|
function KptFormField_Conditional_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
1420
1652
|
i0.ɵɵdomElementStart(0, "span", 6);
|
|
@@ -1461,7 +1693,8 @@ function KptFormField_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
|
1461
1693
|
* unoszącej się etykiety (Float Label) z animowanym przejściem: `over` (nad obramowaniem),
|
|
1462
1694
|
* `in` (u góry wewnątrz pola) i `on` (na obramowaniu, notch). Uniesienie następuje przy focusie
|
|
1463
1695
|
* (CSS `:focus-within`) lub gdy pole jest wypełnione (wykrywane po zdarzeniach `input`/`change`
|
|
1464
|
-
* oraz wartości początkowej) — bez wymogu placeholdera na kontrolce.
|
|
1696
|
+
* oraz wartości początkowej) — bez wymogu placeholdera na kontrolce. Kontrolki bez natywnego
|
|
1697
|
+
* `input`/`textarea` (np. `kpt-select`) zgłaszają wypełnienie tokenem `KPT_FORM_FIELD_CONTROL`.
|
|
1465
1698
|
*
|
|
1466
1699
|
* @example
|
|
1467
1700
|
* <kpt-form-field label="E-mail" [error]="emailError()" hint="Firmowy adres">
|
|
@@ -1497,8 +1730,16 @@ class KptFormField {
|
|
|
1497
1730
|
this.labelType = input('fixed', /* @ts-ignore */
|
|
1498
1731
|
...(ngDevMode ? [{ debugName: "labelType" }] : /* istanbul ignore next */ []));
|
|
1499
1732
|
this.host = inject(ElementRef);
|
|
1733
|
+
/**
|
|
1734
|
+
* Kontrolka bez natywnego `input`/`textarea` (np. `kpt-select`) zgłasza wypełnienie sama,
|
|
1735
|
+
* przez token `KPT_FORM_FIELD_CONTROL` — jej wartość nie da się odczytać z DOM.
|
|
1736
|
+
*/
|
|
1737
|
+
this.control = contentChild(KPT_FORM_FIELD_CONTROL, { ...(ngDevMode ? { debugName: "control" } : /* istanbul ignore next */ {}), descendants: true });
|
|
1738
|
+
/** Wypełnienie odczytane z natywnej kontrolki (zdarzenia `input`/`change` + wartość początkowa). */
|
|
1739
|
+
this.nativeFilled = signal(false, /* @ts-ignore */
|
|
1740
|
+
...(ngDevMode ? [{ debugName: "nativeFilled" }] : /* istanbul ignore next */ []));
|
|
1500
1741
|
/** Czy projektowana kontrolka ma wartość — steruje uniesieniem etykiety w wariantach float. */
|
|
1501
|
-
this.filled =
|
|
1742
|
+
this.filled = computed(() => this.control()?.filled() ?? this.nativeFilled(), /* @ts-ignore */
|
|
1502
1743
|
...(ngDevMode ? [{ debugName: "filled" }] : /* istanbul ignore next */ []));
|
|
1503
1744
|
// Wartość początkowa (np. pole prefill) — po pierwszym renderze projekcji.
|
|
1504
1745
|
afterNextRender(() => this.updateFilled());
|
|
@@ -1506,10 +1747,14 @@ class KptFormField {
|
|
|
1506
1747
|
/** Odczytuje wartość projektowanego `input`/`textarea` i aktualizuje stan `filled`. */
|
|
1507
1748
|
updateFilled() {
|
|
1508
1749
|
const el = this.host.nativeElement.querySelector('.kpt-form-field__control input, .kpt-form-field__control textarea');
|
|
1509
|
-
this.
|
|
1750
|
+
this.nativeFilled.set(!!el && el.value !== '');
|
|
1510
1751
|
}
|
|
1511
1752
|
static { this.ɵfac = function KptFormField_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptFormField)(); }; }
|
|
1512
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptFormField, selectors: [["kpt-form-field"]],
|
|
1753
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptFormField, selectors: [["kpt-form-field"]], contentQueries: function KptFormField_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
|
|
1754
|
+
i0.ɵɵcontentQuerySignal(dirIndex, ctx.control, KPT_FORM_FIELD_CONTROL, 5);
|
|
1755
|
+
} if (rf & 2) {
|
|
1756
|
+
i0.ɵɵqueryAdvance();
|
|
1757
|
+
} }, hostAttrs: [1, "kpt-form-field-host"], hostBindings: function KptFormField_HostBindings(rf, ctx) { if (rf & 1) {
|
|
1513
1758
|
i0.ɵɵlistener("input", function KptFormField_input_HostBindingHandler() { return ctx.updateFilled(); })("change", function KptFormField_change_HostBindingHandler() { return ctx.updateFilled(); });
|
|
1514
1759
|
} }, inputs: { label: [1, "label"], hint: [1, "hint"], error: [1, "error"], required: [1, "required"], controlId: [1, "controlId"], labelType: [1, "labelType"] }, ngContentSelectors: _c0$x, decls: 7, vars: 10, consts: [[1, "kpt-form-field"], [1, "kpt-form-field__box"], [1, "kpt-form-field__label"], [1, "kpt-form-field__control"], ["role", "alert", 1, "kpt-form-field__message", "kpt-form-field__message--error"], [1, "kpt-form-field__message", "kpt-form-field__message--hint"], ["aria-hidden", "true", 1, "kpt-form-field__required"]], template: function KptFormField_Template(rf, ctx) { if (rf & 1) {
|
|
1515
1760
|
i0.ɵɵprojectionDef();
|
|
@@ -1529,7 +1774,7 @@ class KptFormField {
|
|
|
1529
1774
|
i0.ɵɵconditional(ctx.label() ? 2 : -1);
|
|
1530
1775
|
i0.ɵɵadvance(3);
|
|
1531
1776
|
i0.ɵɵconditional(ctx.error() ? 5 : ctx.hint() ? 6 : -1);
|
|
1532
|
-
} }, styles: ["@layer kpt.components{.kpt-form-field,.kpt-form-field__box{display:flex;flex-direction:column;gap:var(--%NS%kpt-space-1, .25rem)}.kpt-form-field__label{font-size:var(--%NS%kpt-font-size-sm, .875rem);font-weight:var(--%NS%kpt-font-weight-medium, 500);color:var(--%NS%kpt-form-field-label)}.kpt-form-field__required{color:var(--%NS%kpt-color-danger);margin-inline-start:.125rem}.kpt-form-field__message{font-size:var(--%NS%kpt-font-size-xs, .75rem);line-height:var(--%NS%kpt-font-line-height-normal, 1.5)}.kpt-form-field__message--hint{color:var(--%NS%kpt-form-field-hint)}.kpt-form-field__message--error{color:var(--%NS%kpt-form-field-error)}.kpt-form-field--float .kpt-form-field__box{position:relative;display:block}.kpt-form-field--float .kpt-form-field__label{position:absolute;top:50%;left:var(--%NS%kpt-space-3, .75rem);margin:0;max-width:calc(100% - 2 * var(--%NS%kpt-space-3, .75rem));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1;transform:translateY(-50%);transform-origin:left center;pointer-events:none;font-weight:var(--%NS%kpt-font-weight-normal, 400);color:var(--%NS%kpt-form-field-placeholder);transition:transform var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard),color var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard)}.kpt-form-field--float .kpt-form-field__box:focus-within .kpt-form-field__label{color:var(--%NS%kpt-form-field-border-focus)}.kpt-form-field--float.kpt-form-field--invalid .kpt-form-field__box:is(:focus-within,.is-filled) .kpt-form-field__label,.kpt-form-field--float.kpt-form-field--invalid .kpt-form-field__box:focus-within .kpt-form-field__label{color:var(--%NS%kpt-form-field-border-error)}.kpt-form-field--over .kpt-form-field__box{margin-top:1.1rem}.kpt-form-field--over .kpt-form-field__box:is(:focus-within,.is-filled) .kpt-form-field__label{left:0;transform:translateY(calc(-50% - 1.87rem)) scale(.85)}.kpt-form-field--in .kpt-form-field__control :is(input,textarea){height:3.25rem;padding-top:1.15rem}.kpt-form-field--in .kpt-form-field__box:is(:focus-within,.is-filled) .kpt-form-field__label{transform:translateY(calc(-50% - .95rem)) scale(.85)}.kpt-form-field--on .kpt-form-field__box:is(:focus-within,.is-filled) .kpt-form-field__label{left:calc(var(--%NS%kpt-space-3, .75rem) - .25rem);padding-inline:.25rem;background:var(--%NS%kpt-form-field-bg);transform:translateY(calc(-50% - 1.25rem)) scale(.85)}@media(prefers-reduced-motion:reduce){.kpt-form-field--float .kpt-form-field__label{transition:none}}}\n"], encapsulation: 2 }); }
|
|
1777
|
+
} }, styles: ["@layer kpt.components{.kpt-form-field,.kpt-form-field__box{display:flex;flex-direction:column;gap:var(--%NS%kpt-space-1, .25rem)}.kpt-form-field__label{font-size:var(--%NS%kpt-font-size-sm, .875rem);font-weight:var(--%NS%kpt-font-weight-medium, 500);color:var(--%NS%kpt-form-field-label)}.kpt-form-field__required{color:var(--%NS%kpt-color-danger);margin-inline-start:.125rem}.kpt-form-field__message{font-size:var(--%NS%kpt-font-size-xs, .75rem);line-height:var(--%NS%kpt-font-line-height-normal, 1.5)}.kpt-form-field__message--hint{color:var(--%NS%kpt-form-field-hint)}.kpt-form-field__message--error{color:var(--%NS%kpt-form-field-error)}.kpt-form-field--float .kpt-form-field__box{position:relative;display:block}.kpt-form-field--float .kpt-form-field__label{position:absolute;top:50%;left:var(--%NS%kpt-space-3, .75rem);margin:0;max-width:calc(100% - 2 * var(--%NS%kpt-space-3, .75rem));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1;transform:translateY(-50%);transform-origin:left center;pointer-events:none;font-weight:var(--%NS%kpt-font-weight-normal, 400);color:var(--%NS%kpt-form-field-placeholder);transition:transform var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard),color var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard)}.kpt-form-field--float .kpt-form-field__box:focus-within .kpt-form-field__label{color:var(--%NS%kpt-form-field-border-focus)}.kpt-form-field--float.kpt-form-field--invalid .kpt-form-field__box:is(:focus-within,.is-filled) .kpt-form-field__label,.kpt-form-field--float.kpt-form-field--invalid .kpt-form-field__box:focus-within .kpt-form-field__label{color:var(--%NS%kpt-form-field-border-error)}.kpt-form-field--over .kpt-form-field__box{margin-top:1.1rem}.kpt-form-field--over .kpt-form-field__box:is(:focus-within,.is-filled) .kpt-form-field__label{left:0;transform:translateY(calc(-50% - 1.87rem)) scale(.85)}.kpt-form-field--in .kpt-form-field__control :is(input,textarea){height:3.25rem;padding-top:1.15rem}.kpt-form-field--in .kpt-form-field__control .kpt-select{min-height:3.25rem;padding-top:1.15rem}.kpt-form-field--in .kpt-form-field__box:is(:focus-within,.is-filled) .kpt-form-field__label{transform:translateY(calc(-50% - .95rem)) scale(.85)}.kpt-form-field--on .kpt-form-field__box:is(:focus-within,.is-filled) .kpt-form-field__label{left:calc(var(--%NS%kpt-space-3, .75rem) - .25rem);padding-inline:.25rem;background:var(--%NS%kpt-form-field-bg);transform:translateY(calc(-50% - 1.25rem)) scale(.85)}@media(prefers-reduced-motion:reduce){.kpt-form-field--float .kpt-form-field__label{transition:none}}}\n"], encapsulation: 2 }); }
|
|
1533
1778
|
}
|
|
1534
1779
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptFormField, [{
|
|
1535
1780
|
type: Component,
|
|
@@ -1537,9 +1782,9 @@ class KptFormField {
|
|
|
1537
1782
|
class: 'kpt-form-field-host',
|
|
1538
1783
|
'(input)': 'updateFilled()',
|
|
1539
1784
|
'(change)': 'updateFilled()',
|
|
1540
|
-
}, template: "<div\n class=\"kpt-form-field\"\n [class]=\"'kpt-form-field--' + labelType()\"\n [class.kpt-form-field--float]=\"labelType() !== 'fixed'\"\n [class.kpt-form-field--invalid]=\"!!error()\"\n>\n <div class=\"kpt-form-field__box\" [class.is-filled]=\"filled()\">\n @if (label()) {\n <label class=\"kpt-form-field__label\" [attr.for]=\"controlId() || null\">\n {{ label() }}\n @if (required()) {\n <span class=\"kpt-form-field__required\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n <div class=\"kpt-form-field__control\">\n <ng-content />\n </div>\n </div>\n\n @if (error()) {\n <p class=\"kpt-form-field__message kpt-form-field__message--error\" role=\"alert\">{{ error() }}</p>\n } @else if (hint()) {\n <p class=\"kpt-form-field__message kpt-form-field__message--hint\">{{ hint() }}</p>\n }\n</div>\n", styles: ["@layer kpt.components{.kpt-form-field,.kpt-form-field__box{display:flex;flex-direction:column;gap:var(--kpt-space-1, .25rem)}.kpt-form-field__label{font-size:var(--kpt-font-size-sm, .875rem);font-weight:var(--kpt-font-weight-medium, 500);color:var(--kpt-form-field-label)}.kpt-form-field__required{color:var(--kpt-color-danger);margin-inline-start:.125rem}.kpt-form-field__message{font-size:var(--kpt-font-size-xs, .75rem);line-height:var(--kpt-font-line-height-normal, 1.5)}.kpt-form-field__message--hint{color:var(--kpt-form-field-hint)}.kpt-form-field__message--error{color:var(--kpt-form-field-error)}.kpt-form-field--float .kpt-form-field__box{position:relative;display:block}.kpt-form-field--float .kpt-form-field__label{position:absolute;top:50%;left:var(--kpt-space-3, .75rem);margin:0;max-width:calc(100% - 2 * var(--kpt-space-3, .75rem));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1;transform:translateY(-50%);transform-origin:left center;pointer-events:none;font-weight:var(--kpt-font-weight-normal, 400);color:var(--kpt-form-field-placeholder);transition:transform var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard),color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-form-field--float .kpt-form-field__box:focus-within .kpt-form-field__label{color:var(--kpt-form-field-border-focus)}.kpt-form-field--float.kpt-form-field--invalid .kpt-form-field__box:is(:focus-within,.is-filled) .kpt-form-field__label,.kpt-form-field--float.kpt-form-field--invalid .kpt-form-field__box:focus-within .kpt-form-field__label{color:var(--kpt-form-field-border-error)}.kpt-form-field--over .kpt-form-field__box{margin-top:1.1rem}.kpt-form-field--over .kpt-form-field__box:is(:focus-within,.is-filled) .kpt-form-field__label{left:0;transform:translateY(calc(-50% - 1.87rem)) scale(.85)}.kpt-form-field--in .kpt-form-field__control :is(input,textarea){height:3.25rem;padding-top:1.15rem}.kpt-form-field--in .kpt-form-field__box:is(:focus-within,.is-filled) .kpt-form-field__label{transform:translateY(calc(-50% - .95rem)) scale(.85)}.kpt-form-field--on .kpt-form-field__box:is(:focus-within,.is-filled) .kpt-form-field__label{left:calc(var(--kpt-space-3, .75rem) - .25rem);padding-inline:.25rem;background:var(--kpt-form-field-bg);transform:translateY(calc(-50% - 1.25rem)) scale(.85)}@media(prefers-reduced-motion:reduce){.kpt-form-field--float .kpt-form-field__label{transition:none}}}\n"] }]
|
|
1541
|
-
}], () => [], { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], controlId: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlId", required: false }] }], labelType: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelType", required: false }] }] }); })();
|
|
1542
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptFormField, { className: "KptFormField", filePath: "lib/form-field/form-field.component.ts", lineNumber:
|
|
1785
|
+
}, template: "<div\n class=\"kpt-form-field\"\n [class]=\"'kpt-form-field--' + labelType()\"\n [class.kpt-form-field--float]=\"labelType() !== 'fixed'\"\n [class.kpt-form-field--invalid]=\"!!error()\"\n>\n <div class=\"kpt-form-field__box\" [class.is-filled]=\"filled()\">\n @if (label()) {\n <label class=\"kpt-form-field__label\" [attr.for]=\"controlId() || null\">\n {{ label() }}\n @if (required()) {\n <span class=\"kpt-form-field__required\" aria-hidden=\"true\">*</span>\n }\n </label>\n }\n\n <div class=\"kpt-form-field__control\">\n <ng-content />\n </div>\n </div>\n\n @if (error()) {\n <p class=\"kpt-form-field__message kpt-form-field__message--error\" role=\"alert\">{{ error() }}</p>\n } @else if (hint()) {\n <p class=\"kpt-form-field__message kpt-form-field__message--hint\">{{ hint() }}</p>\n }\n</div>\n", styles: ["@layer kpt.components{.kpt-form-field,.kpt-form-field__box{display:flex;flex-direction:column;gap:var(--kpt-space-1, .25rem)}.kpt-form-field__label{font-size:var(--kpt-font-size-sm, .875rem);font-weight:var(--kpt-font-weight-medium, 500);color:var(--kpt-form-field-label)}.kpt-form-field__required{color:var(--kpt-color-danger);margin-inline-start:.125rem}.kpt-form-field__message{font-size:var(--kpt-font-size-xs, .75rem);line-height:var(--kpt-font-line-height-normal, 1.5)}.kpt-form-field__message--hint{color:var(--kpt-form-field-hint)}.kpt-form-field__message--error{color:var(--kpt-form-field-error)}.kpt-form-field--float .kpt-form-field__box{position:relative;display:block}.kpt-form-field--float .kpt-form-field__label{position:absolute;top:50%;left:var(--kpt-space-3, .75rem);margin:0;max-width:calc(100% - 2 * var(--kpt-space-3, .75rem));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1;transform:translateY(-50%);transform-origin:left center;pointer-events:none;font-weight:var(--kpt-font-weight-normal, 400);color:var(--kpt-form-field-placeholder);transition:transform var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard),color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-form-field--float .kpt-form-field__box:focus-within .kpt-form-field__label{color:var(--kpt-form-field-border-focus)}.kpt-form-field--float.kpt-form-field--invalid .kpt-form-field__box:is(:focus-within,.is-filled) .kpt-form-field__label,.kpt-form-field--float.kpt-form-field--invalid .kpt-form-field__box:focus-within .kpt-form-field__label{color:var(--kpt-form-field-border-error)}.kpt-form-field--over .kpt-form-field__box{margin-top:1.1rem}.kpt-form-field--over .kpt-form-field__box:is(:focus-within,.is-filled) .kpt-form-field__label{left:0;transform:translateY(calc(-50% - 1.87rem)) scale(.85)}.kpt-form-field--in .kpt-form-field__control :is(input,textarea){height:3.25rem;padding-top:1.15rem}.kpt-form-field--in .kpt-form-field__control .kpt-select{min-height:3.25rem;padding-top:1.15rem}.kpt-form-field--in .kpt-form-field__box:is(:focus-within,.is-filled) .kpt-form-field__label{transform:translateY(calc(-50% - .95rem)) scale(.85)}.kpt-form-field--on .kpt-form-field__box:is(:focus-within,.is-filled) .kpt-form-field__label{left:calc(var(--kpt-space-3, .75rem) - .25rem);padding-inline:.25rem;background:var(--kpt-form-field-bg);transform:translateY(calc(-50% - 1.25rem)) scale(.85)}@media(prefers-reduced-motion:reduce){.kpt-form-field--float .kpt-form-field__label{transition:none}}}\n"] }]
|
|
1786
|
+
}], () => [], { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], controlId: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlId", required: false }] }], labelType: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelType", required: false }] }], control: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KPT_FORM_FIELD_CONTROL), { ...{ descendants: true }, isSignal: true }] }] }); })();
|
|
1787
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptFormField, { className: "KptFormField", filePath: "lib/form-field/form-field.component.ts", lineNumber: 50 }); })();
|
|
1543
1788
|
|
|
1544
1789
|
let nextUniqueId = 0;
|
|
1545
1790
|
/**
|
|
@@ -1607,7 +1852,7 @@ class KptInput {
|
|
|
1607
1852
|
'[attr.id]': 'null',
|
|
1608
1853
|
}, template: "<input\n class=\"kpt-input__field\"\n [id]=\"id()\"\n [type]=\"type()\"\n [value]=\"value()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-invalid]=\"showInvalid() ? 'true' : null\"\n (input)=\"onInput($event)\"\n (blur)=\"touch.emit()\"\n/>\n", styles: ["@layer kpt.components{.kpt-input-host{display:block}.kpt-input__field{display:block;width:100%;box-sizing:border-box;height:2.5rem;padding-inline:var(--kpt-space-3, .75rem);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);font-family:inherit;font-size:var(--kpt-font-size-sm, .875rem);color:var(--kpt-form-field-text);background-color:var(--kpt-form-field-bg);transition:border-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard),box-shadow var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-input__field::placeholder{color:var(--kpt-form-field-placeholder)}.kpt-input__field:hover:not(:disabled):not([aria-invalid=true]){border-color:var(--kpt-form-field-border-hover)}.kpt-input__field:focus-visible{outline:none;border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-input__field[aria-invalid=true]{border-color:var(--kpt-form-field-border-error)}.kpt-input__field[aria-invalid=true]:focus-visible{box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-error) 30%,transparent)}.kpt-input__field:disabled{cursor:not-allowed;opacity:.6;background-color:var(--kpt-color-surface-variant)}}\n"] }]
|
|
1609
1854
|
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] }); })();
|
|
1610
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptInput, { className: "KptInput", filePath: "lib/input/input.component.ts", lineNumber:
|
|
1855
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptInput, { className: "KptInput", filePath: "lib/input/input.component.ts", lineNumber: 49 }); })();
|
|
1611
1856
|
|
|
1612
1857
|
const _c0$w = ["*"];
|
|
1613
1858
|
function KptCheckbox_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -1660,7 +1905,7 @@ class KptCheckbox {
|
|
|
1660
1905
|
i0.ɵɵattribute("aria-invalid", ctx.showInvalid() ? "true" : null);
|
|
1661
1906
|
i0.ɵɵadvance(4);
|
|
1662
1907
|
i0.ɵɵconditional(ctx.label() ? 5 : -1);
|
|
1663
|
-
} }, styles: ["@layer kpt.components{.kpt-checkbox{display:inline-flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);cursor:pointer;font-size:var(--%NS%kpt-font-size-sm, .875rem);color:var(--%NS%kpt-color-on-surface)}.kpt-checkbox--disabled{cursor:not-allowed;opacity:.55}.kpt-checkbox__input{position:absolute;opacity:0;width:1px;height:1px}.kpt-checkbox__box{display:inline-flex;align-items:center;justify-content:center;width:1.15rem;height:1.15rem;flex-shrink:0;border:var(--%NS%kpt-border-width-medium, 2px) solid var(--%NS%kpt-form-field-border);border-radius:var(--%NS%kpt-radius-sm, .25rem);background:var(--%NS%kpt-form-field-bg);transition:background-color var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard),border-color var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard)}.kpt-checkbox__check{width:.9rem;height:.9rem;fill:none;stroke:var(--%NS%kpt-color-on-primary);stroke-width:2.25;stroke-linecap:round;stroke-linejoin:round;opacity:0;transition:opacity var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard)}.kpt-checkbox__input:checked+.kpt-checkbox__box{background:var(--%NS%kpt-color-primary);border-color:var(--%NS%kpt-color-primary)}.kpt-checkbox__input:checked+.kpt-checkbox__box .kpt-checkbox__check{opacity:1}.kpt-checkbox__input:focus-visible+.kpt-checkbox__box{outline:var(--%NS%kpt-border-width-medium, 2px) solid var(--%NS%kpt-color-focus-ring);outline-offset:2px}.kpt-checkbox__input[aria-invalid=true]+.kpt-checkbox__box{border-color:var(--%NS%kpt-form-field-border-error)}}\n"], encapsulation: 2 }); }
|
|
1908
|
+
} }, styles: ["@layer kpt.components{.kpt-checkbox{display:inline-flex;position:relative;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);cursor:pointer;font-size:var(--%NS%kpt-font-size-sm, .875rem);color:var(--%NS%kpt-color-on-surface)}.kpt-checkbox--disabled{cursor:not-allowed;opacity:.55}.kpt-checkbox__input{position:absolute;opacity:0;width:1px;height:1px}.kpt-checkbox__box{display:inline-flex;align-items:center;justify-content:center;width:1.15rem;height:1.15rem;flex-shrink:0;border:var(--%NS%kpt-border-width-medium, 2px) solid var(--%NS%kpt-form-field-border);border-radius:var(--%NS%kpt-radius-sm, .25rem);background:var(--%NS%kpt-form-field-bg);transition:background-color var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard),border-color var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard)}.kpt-checkbox__check{width:.9rem;height:.9rem;fill:none;stroke:var(--%NS%kpt-color-on-primary);stroke-width:2.25;stroke-linecap:round;stroke-linejoin:round;opacity:0;transition:opacity var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard)}.kpt-checkbox__input:checked+.kpt-checkbox__box{background:var(--%NS%kpt-color-primary);border-color:var(--%NS%kpt-color-primary)}.kpt-checkbox__input:checked+.kpt-checkbox__box .kpt-checkbox__check{opacity:1}.kpt-checkbox__input:focus-visible+.kpt-checkbox__box{outline:var(--%NS%kpt-border-width-medium, 2px) solid var(--%NS%kpt-color-focus-ring);outline-offset:2px}.kpt-checkbox__input[aria-invalid=true]+.kpt-checkbox__box{border-color:var(--%NS%kpt-form-field-border-error)}}\n"], encapsulation: 2 }); }
|
|
1664
1909
|
}
|
|
1665
1910
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptCheckbox, [{
|
|
1666
1911
|
type: Component,
|
|
@@ -1683,7 +1928,7 @@ class KptCheckbox {
|
|
|
1683
1928
|
}
|
|
1684
1929
|
<ng-content />
|
|
1685
1930
|
</label>
|
|
1686
|
-
`, host: { class: 'kpt-checkbox-host' }, styles: ["@layer kpt.components{.kpt-checkbox{display:inline-flex;align-items:center;gap:var(--kpt-space-2, .5rem);cursor:pointer;font-size:var(--kpt-font-size-sm, .875rem);color:var(--kpt-color-on-surface)}.kpt-checkbox--disabled{cursor:not-allowed;opacity:.55}.kpt-checkbox__input{position:absolute;opacity:0;width:1px;height:1px}.kpt-checkbox__box{display:inline-flex;align-items:center;justify-content:center;width:1.15rem;height:1.15rem;flex-shrink:0;border:var(--kpt-border-width-medium, 2px) solid var(--kpt-form-field-border);border-radius:var(--kpt-radius-sm, .25rem);background:var(--kpt-form-field-bg);transition:background-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard),border-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-checkbox__check{width:.9rem;height:.9rem;fill:none;stroke:var(--kpt-color-on-primary);stroke-width:2.25;stroke-linecap:round;stroke-linejoin:round;opacity:0;transition:opacity var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-checkbox__input:checked+.kpt-checkbox__box{background:var(--kpt-color-primary);border-color:var(--kpt-color-primary)}.kpt-checkbox__input:checked+.kpt-checkbox__box .kpt-checkbox__check{opacity:1}.kpt-checkbox__input:focus-visible+.kpt-checkbox__box{outline:var(--kpt-border-width-medium, 2px) solid var(--kpt-color-focus-ring);outline-offset:2px}.kpt-checkbox__input[aria-invalid=true]+.kpt-checkbox__box{border-color:var(--kpt-form-field-border-error)}}\n"] }]
|
|
1931
|
+
`, host: { class: 'kpt-checkbox-host' }, styles: ["@layer kpt.components{.kpt-checkbox{display:inline-flex;position:relative;align-items:center;gap:var(--kpt-space-2, .5rem);cursor:pointer;font-size:var(--kpt-font-size-sm, .875rem);color:var(--kpt-color-on-surface)}.kpt-checkbox--disabled{cursor:not-allowed;opacity:.55}.kpt-checkbox__input{position:absolute;opacity:0;width:1px;height:1px}.kpt-checkbox__box{display:inline-flex;align-items:center;justify-content:center;width:1.15rem;height:1.15rem;flex-shrink:0;border:var(--kpt-border-width-medium, 2px) solid var(--kpt-form-field-border);border-radius:var(--kpt-radius-sm, .25rem);background:var(--kpt-form-field-bg);transition:background-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard),border-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-checkbox__check{width:.9rem;height:.9rem;fill:none;stroke:var(--kpt-color-on-primary);stroke-width:2.25;stroke-linecap:round;stroke-linejoin:round;opacity:0;transition:opacity var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-checkbox__input:checked+.kpt-checkbox__box{background:var(--kpt-color-primary);border-color:var(--kpt-color-primary)}.kpt-checkbox__input:checked+.kpt-checkbox__box .kpt-checkbox__check{opacity:1}.kpt-checkbox__input:focus-visible+.kpt-checkbox__box{outline:var(--kpt-border-width-medium, 2px) solid var(--kpt-color-focus-ring);outline-offset:2px}.kpt-checkbox__input[aria-invalid=true]+.kpt-checkbox__box{border-color:var(--kpt-form-field-border-error)}}\n"] }]
|
|
1687
1932
|
}], null, { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }] }); })();
|
|
1688
1933
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptCheckbox, { className: "KptCheckbox", filePath: "lib/checkbox/checkbox.component.ts", lineNumber: 44 }); })();
|
|
1689
1934
|
|
|
@@ -1778,7 +2023,7 @@ class KptSwitch {
|
|
|
1778
2023
|
i0.ɵɵconditional(ctx.label() && ctx.labelPosition() === "end" ? 5 : -1);
|
|
1779
2024
|
i0.ɵɵadvance();
|
|
1780
2025
|
i0.ɵɵconditional(ctx.hasStateLabels() ? 6 : -1);
|
|
1781
|
-
} }, styles: ["@layer kpt.components{.kpt-switch{display:inline-flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);cursor:pointer;font-size:var(--%NS%kpt-font-size-sm, .875rem);color:var(--%NS%kpt-color-on-surface)}.kpt-switch--disabled{cursor:not-allowed;opacity:.55}.kpt-switch__input{position:absolute;opacity:0;width:1px;height:1px}.kpt-switch__track{position:relative;display:inline-block;width:2.25rem;height:1.25rem;flex-shrink:0;border-radius:var(--%NS%kpt-radius-full, 9999px);background:var(--%NS%kpt-color-border-strong);transition:background-color var(--%NS%kpt-motion-duration-base, .2s) var(--%NS%kpt-motion-easing-standard)}.kpt-switch__thumb{position:absolute;top:.15rem;left:.15rem;width:.95rem;height:.95rem;border-radius:50%;background:var(--%NS%kpt-color-surface);box-shadow:var(--%NS%kpt-elevation-1);transition:transform var(--%NS%kpt-motion-duration-base, .2s) var(--%NS%kpt-motion-easing-standard)}.kpt-switch__state{font-size:var(--%NS%kpt-font-size-sm, .875rem);font-weight:var(--%NS%kpt-font-weight-medium, 500);font-variant-numeric:tabular-nums;color:var(--%NS%kpt-color-on-surface-muted);transition:color var(--%NS%kpt-motion-duration-base, .2s) var(--%NS%kpt-motion-easing-standard)}.kpt-switch__state--on{color:var(--%NS%kpt-color-primary)}.kpt-switch__input:checked+.kpt-switch__track{background:var(--%NS%kpt-color-primary)}.kpt-switch__input:checked+.kpt-switch__track .kpt-switch__thumb{transform:translate(1rem)}.kpt-switch__input:focus-visible+.kpt-switch__track{outline:var(--%NS%kpt-border-width-medium, 2px) solid var(--%NS%kpt-color-focus-ring);outline-offset:2px}@media(prefers-reduced-motion:reduce){.kpt-switch__thumb,.kpt-switch__track{transition:none}}}\n"], encapsulation: 2 }); }
|
|
2026
|
+
} }, styles: ["@layer kpt.components{.kpt-switch{display:inline-flex;position:relative;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);cursor:pointer;font-size:var(--%NS%kpt-font-size-sm, .875rem);color:var(--%NS%kpt-color-on-surface)}.kpt-switch--disabled{cursor:not-allowed;opacity:.55}.kpt-switch__input{position:absolute;opacity:0;width:1px;height:1px}.kpt-switch__track{position:relative;display:inline-block;width:2.25rem;height:1.25rem;flex-shrink:0;border-radius:var(--%NS%kpt-radius-full, 9999px);background:var(--%NS%kpt-color-border-strong);transition:background-color var(--%NS%kpt-motion-duration-base, .2s) var(--%NS%kpt-motion-easing-standard)}.kpt-switch__thumb{position:absolute;top:.15rem;left:.15rem;width:.95rem;height:.95rem;border-radius:50%;background:var(--%NS%kpt-color-surface);box-shadow:var(--%NS%kpt-elevation-1);transition:transform var(--%NS%kpt-motion-duration-base, .2s) var(--%NS%kpt-motion-easing-standard)}.kpt-switch__state{font-size:var(--%NS%kpt-font-size-sm, .875rem);font-weight:var(--%NS%kpt-font-weight-medium, 500);font-variant-numeric:tabular-nums;color:var(--%NS%kpt-color-on-surface-muted);transition:color var(--%NS%kpt-motion-duration-base, .2s) var(--%NS%kpt-motion-easing-standard)}.kpt-switch__state--on{color:var(--%NS%kpt-color-primary)}.kpt-switch__input:checked+.kpt-switch__track{background:var(--%NS%kpt-color-primary)}.kpt-switch__input:checked+.kpt-switch__track .kpt-switch__thumb{transform:translate(1rem)}.kpt-switch__input:focus-visible+.kpt-switch__track{outline:var(--%NS%kpt-border-width-medium, 2px) solid var(--%NS%kpt-color-focus-ring);outline-offset:2px}@media(prefers-reduced-motion:reduce){.kpt-switch__thumb,.kpt-switch__track{transition:none}}}\n"], encapsulation: 2 }); }
|
|
1782
2027
|
}
|
|
1783
2028
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptSwitch, [{
|
|
1784
2029
|
type: Component,
|
|
@@ -1806,7 +2051,7 @@ class KptSwitch {
|
|
|
1806
2051
|
}
|
|
1807
2052
|
<ng-content />
|
|
1808
2053
|
</label>
|
|
1809
|
-
`, host: { class: 'kpt-switch-host' }, styles: ["@layer kpt.components{.kpt-switch{display:inline-flex;align-items:center;gap:var(--kpt-space-2, .5rem);cursor:pointer;font-size:var(--kpt-font-size-sm, .875rem);color:var(--kpt-color-on-surface)}.kpt-switch--disabled{cursor:not-allowed;opacity:.55}.kpt-switch__input{position:absolute;opacity:0;width:1px;height:1px}.kpt-switch__track{position:relative;display:inline-block;width:2.25rem;height:1.25rem;flex-shrink:0;border-radius:var(--kpt-radius-full, 9999px);background:var(--kpt-color-border-strong);transition:background-color var(--kpt-motion-duration-base, .2s) var(--kpt-motion-easing-standard)}.kpt-switch__thumb{position:absolute;top:.15rem;left:.15rem;width:.95rem;height:.95rem;border-radius:50%;background:var(--kpt-color-surface);box-shadow:var(--kpt-elevation-1);transition:transform var(--kpt-motion-duration-base, .2s) var(--kpt-motion-easing-standard)}.kpt-switch__state{font-size:var(--kpt-font-size-sm, .875rem);font-weight:var(--kpt-font-weight-medium, 500);font-variant-numeric:tabular-nums;color:var(--kpt-color-on-surface-muted);transition:color var(--kpt-motion-duration-base, .2s) var(--kpt-motion-easing-standard)}.kpt-switch__state--on{color:var(--kpt-color-primary)}.kpt-switch__input:checked+.kpt-switch__track{background:var(--kpt-color-primary)}.kpt-switch__input:checked+.kpt-switch__track .kpt-switch__thumb{transform:translate(1rem)}.kpt-switch__input:focus-visible+.kpt-switch__track{outline:var(--kpt-border-width-medium, 2px) solid var(--kpt-color-focus-ring);outline-offset:2px}@media(prefers-reduced-motion:reduce){.kpt-switch__thumb,.kpt-switch__track{transition:none}}}\n"] }]
|
|
2054
|
+
`, host: { class: 'kpt-switch-host' }, styles: ["@layer kpt.components{.kpt-switch{display:inline-flex;position:relative;align-items:center;gap:var(--kpt-space-2, .5rem);cursor:pointer;font-size:var(--kpt-font-size-sm, .875rem);color:var(--kpt-color-on-surface)}.kpt-switch--disabled{cursor:not-allowed;opacity:.55}.kpt-switch__input{position:absolute;opacity:0;width:1px;height:1px}.kpt-switch__track{position:relative;display:inline-block;width:2.25rem;height:1.25rem;flex-shrink:0;border-radius:var(--kpt-radius-full, 9999px);background:var(--kpt-color-border-strong);transition:background-color var(--kpt-motion-duration-base, .2s) var(--kpt-motion-easing-standard)}.kpt-switch__thumb{position:absolute;top:.15rem;left:.15rem;width:.95rem;height:.95rem;border-radius:50%;background:var(--kpt-color-surface);box-shadow:var(--kpt-elevation-1);transition:transform var(--kpt-motion-duration-base, .2s) var(--kpt-motion-easing-standard)}.kpt-switch__state{font-size:var(--kpt-font-size-sm, .875rem);font-weight:var(--kpt-font-weight-medium, 500);font-variant-numeric:tabular-nums;color:var(--kpt-color-on-surface-muted);transition:color var(--kpt-motion-duration-base, .2s) var(--kpt-motion-easing-standard)}.kpt-switch__state--on{color:var(--kpt-color-primary)}.kpt-switch__input:checked+.kpt-switch__track{background:var(--kpt-color-primary)}.kpt-switch__input:checked+.kpt-switch__track .kpt-switch__thumb{transform:translate(1rem)}.kpt-switch__input:focus-visible+.kpt-switch__track{outline:var(--kpt-border-width-medium, 2px) solid var(--kpt-color-focus-ring);outline-offset:2px}@media(prefers-reduced-motion:reduce){.kpt-switch__thumb,.kpt-switch__track{transition:none}}}\n"] }]
|
|
1810
2055
|
}], null, { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], onLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "onLabel", required: false }] }], offLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "offLabel", required: false }] }] }); })();
|
|
1811
2056
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptSwitch, { className: "KptSwitch", filePath: "lib/switch/switch.component.ts", lineNumber: 53 }); })();
|
|
1812
2057
|
|
|
@@ -1980,7 +2225,7 @@ class KptRadioGroup {
|
|
|
1980
2225
|
i0.ɵɵattribute("aria-invalid", ctx.showInvalid() ? "true" : null);
|
|
1981
2226
|
i0.ɵɵadvance();
|
|
1982
2227
|
i0.ɵɵrepeater(ctx.options());
|
|
1983
|
-
} }, styles: ["@layer kpt.components{.kpt-radio-group{display:flex;flex-direction:column;gap:var(--%NS%kpt-space-2, .5rem)}.kpt-radio{display:inline-flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);cursor:pointer;font-size:var(--%NS%kpt-font-size-sm, .875rem);color:var(--%NS%kpt-color-on-surface)}.kpt-radio--disabled{cursor:not-allowed;opacity:.55}.kpt-radio__input{position:absolute;opacity:0;width:1px;height:1px}.kpt-radio__dot{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:1.15rem;height:1.15rem;flex-shrink:0;border:var(--%NS%kpt-border-width-medium, 2px) solid var(--%NS%kpt-form-field-border);border-radius:50%;background:var(--%NS%kpt-form-field-bg);transition:border-color var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard)}.kpt-radio__dot:after{content:\"\";width:.5rem;height:.5rem;border-radius:50%;background:var(--%NS%kpt-color-primary);transform:scale(0);transition:transform var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard)}.kpt-radio__input:checked+.kpt-radio__dot{border-color:var(--%NS%kpt-color-primary)}.kpt-radio__input:checked+.kpt-radio__dot:after{transform:scale(1)}.kpt-radio__input:focus-visible+.kpt-radio__dot{outline:var(--%NS%kpt-border-width-medium, 2px) solid var(--%NS%kpt-color-focus-ring);outline-offset:2px}}\n"], encapsulation: 2 }); }
|
|
2228
|
+
} }, styles: ["@layer kpt.components{.kpt-radio-group{display:flex;flex-direction:column;gap:var(--%NS%kpt-space-2, .5rem)}.kpt-radio{display:inline-flex;position:relative;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);cursor:pointer;font-size:var(--%NS%kpt-font-size-sm, .875rem);color:var(--%NS%kpt-color-on-surface)}.kpt-radio--disabled{cursor:not-allowed;opacity:.55}.kpt-radio__input{position:absolute;opacity:0;width:1px;height:1px}.kpt-radio__dot{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:1.15rem;height:1.15rem;flex-shrink:0;border:var(--%NS%kpt-border-width-medium, 2px) solid var(--%NS%kpt-form-field-border);border-radius:50%;background:var(--%NS%kpt-form-field-bg);transition:border-color var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard)}.kpt-radio__dot:after{content:\"\";width:.5rem;height:.5rem;border-radius:50%;background:var(--%NS%kpt-color-primary);transform:scale(0);transition:transform var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard)}.kpt-radio__input:checked+.kpt-radio__dot{border-color:var(--%NS%kpt-color-primary)}.kpt-radio__input:checked+.kpt-radio__dot:after{transform:scale(1)}.kpt-radio__input:focus-visible+.kpt-radio__dot{outline:var(--%NS%kpt-border-width-medium, 2px) solid var(--%NS%kpt-color-focus-ring);outline-offset:2px}}\n"], encapsulation: 2 }); }
|
|
1984
2229
|
}
|
|
1985
2230
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptRadioGroup, [{
|
|
1986
2231
|
type: Component,
|
|
@@ -2002,7 +2247,7 @@ class KptRadioGroup {
|
|
|
2002
2247
|
</label>
|
|
2003
2248
|
}
|
|
2004
2249
|
</div>
|
|
2005
|
-
`, host: { class: 'kpt-radio-group-host' }, styles: ["@layer kpt.components{.kpt-radio-group{display:flex;flex-direction:column;gap:var(--kpt-space-2, .5rem)}.kpt-radio{display:inline-flex;align-items:center;gap:var(--kpt-space-2, .5rem);cursor:pointer;font-size:var(--kpt-font-size-sm, .875rem);color:var(--kpt-color-on-surface)}.kpt-radio--disabled{cursor:not-allowed;opacity:.55}.kpt-radio__input{position:absolute;opacity:0;width:1px;height:1px}.kpt-radio__dot{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:1.15rem;height:1.15rem;flex-shrink:0;border:var(--kpt-border-width-medium, 2px) solid var(--kpt-form-field-border);border-radius:50%;background:var(--kpt-form-field-bg);transition:border-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-radio__dot:after{content:\"\";width:.5rem;height:.5rem;border-radius:50%;background:var(--kpt-color-primary);transform:scale(0);transition:transform var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-radio__input:checked+.kpt-radio__dot{border-color:var(--kpt-color-primary)}.kpt-radio__input:checked+.kpt-radio__dot:after{transform:scale(1)}.kpt-radio__input:focus-visible+.kpt-radio__dot{outline:var(--kpt-border-width-medium, 2px) solid var(--kpt-color-focus-ring);outline-offset:2px}}\n"] }]
|
|
2250
|
+
`, host: { class: 'kpt-radio-group-host' }, styles: ["@layer kpt.components{.kpt-radio-group{display:flex;flex-direction:column;gap:var(--kpt-space-2, .5rem)}.kpt-radio{display:inline-flex;position:relative;align-items:center;gap:var(--kpt-space-2, .5rem);cursor:pointer;font-size:var(--kpt-font-size-sm, .875rem);color:var(--kpt-color-on-surface)}.kpt-radio--disabled{cursor:not-allowed;opacity:.55}.kpt-radio__input{position:absolute;opacity:0;width:1px;height:1px}.kpt-radio__dot{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:1.15rem;height:1.15rem;flex-shrink:0;border:var(--kpt-border-width-medium, 2px) solid var(--kpt-form-field-border);border-radius:50%;background:var(--kpt-form-field-bg);transition:border-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-radio__dot:after{content:\"\";width:.5rem;height:.5rem;border-radius:50%;background:var(--kpt-color-primary);transform:scale(0);transition:transform var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-radio__input:checked+.kpt-radio__dot{border-color:var(--kpt-color-primary)}.kpt-radio__input:checked+.kpt-radio__dot:after{transform:scale(1)}.kpt-radio__input:focus-visible+.kpt-radio__dot{outline:var(--kpt-border-width-medium, 2px) solid var(--kpt-color-focus-ring);outline-offset:2px}}\n"] }]
|
|
2006
2251
|
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }] }); })();
|
|
2007
2252
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptRadioGroup, { className: "KptRadioGroup", filePath: "lib/radio-group/radio-group.component.ts", lineNumber: 46 }); })();
|
|
2008
2253
|
|
|
@@ -2179,8 +2424,12 @@ class KptSelect {
|
|
|
2179
2424
|
return this.multiple() ? '' : (sel[0]?.label ?? '');
|
|
2180
2425
|
}, /* @ts-ignore */
|
|
2181
2426
|
...(ngDevMode ? [{ debugName: "singleLabel" }] : /* istanbul ignore next */ []));
|
|
2182
|
-
|
|
2183
|
-
|
|
2427
|
+
/**
|
|
2428
|
+
* Czy wybrano jakąkolwiek opcję. Publiczne — `kpt-form-field` czyta to przez
|
|
2429
|
+
* `KPT_FORM_FIELD_CONTROL`, żeby unieść etykietę Float Label nad wybraną wartość.
|
|
2430
|
+
*/
|
|
2431
|
+
this.filled = computed(() => this.selectedOptions().length > 0, /* @ts-ignore */
|
|
2432
|
+
...(ngDevMode ? [{ debugName: "filled" }] : /* istanbul ignore next */ []));
|
|
2184
2433
|
}
|
|
2185
2434
|
isSelected(opt) {
|
|
2186
2435
|
return this.selectedValues().includes(opt.value);
|
|
@@ -2255,7 +2504,7 @@ class KptSelect {
|
|
|
2255
2504
|
}
|
|
2256
2505
|
}
|
|
2257
2506
|
static { this.ɵfac = function KptSelect_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptSelect)(); }; }
|
|
2258
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptSelect, selectors: [["kpt-select"]], hostAttrs: [1, "kpt-select-host"], inputs: { options: [1, "options"], placeholder: [1, "placeholder"], multiple: [1, "multiple"], filter: [1, "filter"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], value: [1, "value"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 8, vars: 14, consts: [["trigger", "cdkOverlayOrigin"], ["cdkOverlayOrigin", "", "role", "combobox", "tabindex", "0", 1, "kpt-select", 3, "click", "keydown", "blur"], [1, "kpt-select__value"], [1, "kpt-select__single"], [1, "kpt-select__placeholder"], ["name", "chevron-down", 1, "kpt-select__chevron"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "cdk-overlay-transparent-backdrop", 3, "backdropClick", "detach", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayPositions", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayWidth"], [1, "kpt-select__chip"], ["type", "button", 1, "kpt-select__chip-remove", 3, "click"], ["name", "x"], [1, "kpt-select__panel", 3, "keydown"], [1, "kpt-select__search"], ["role", "listbox", 1, "kpt-select__list"], ["role", "option", 1, "kpt-select__option", 3, "kpt-select__option--selected", "kpt-select__option--active", "kpt-select__option--disabled"], [1, "kpt-select__empty"], ["name", "search"], ["type", "text", 1, "kpt-select__search-input", 3, "input", "value"], ["role", "option", 1, "kpt-select__option", 3, "click", "mouseenter"], [1, "kpt-select__check", 3, "is-on"], [1, "kpt-select__option-label"], ["name", "check", 1, "kpt-select__option-tick"], [1, "kpt-select__check"], ["name", "check"]], template: function KptSelect_Template(rf, ctx) { if (rf & 1) {
|
|
2507
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptSelect, selectors: [["kpt-select"]], hostAttrs: [1, "kpt-select-host"], inputs: { options: [1, "options"], placeholder: [1, "placeholder"], multiple: [1, "multiple"], filter: [1, "filter"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], value: [1, "value"] }, outputs: { value: "valueChange", touch: "touch" }, features: [i0.ɵɵProvidersFeature([{ provide: KPT_FORM_FIELD_CONTROL, useExisting: forwardRef(() => KptSelect) }])], decls: 8, vars: 14, consts: [["trigger", "cdkOverlayOrigin"], ["cdkOverlayOrigin", "", "role", "combobox", "tabindex", "0", 1, "kpt-select", 3, "click", "keydown", "blur"], [1, "kpt-select__value"], [1, "kpt-select__single"], [1, "kpt-select__placeholder"], ["name", "chevron-down", 1, "kpt-select__chevron"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "cdk-overlay-transparent-backdrop", 3, "backdropClick", "detach", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayPositions", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayWidth"], [1, "kpt-select__chip"], ["type", "button", 1, "kpt-select__chip-remove", 3, "click"], ["name", "x"], [1, "kpt-select__panel", 3, "keydown"], [1, "kpt-select__search"], ["role", "listbox", 1, "kpt-select__list"], ["role", "option", 1, "kpt-select__option", 3, "kpt-select__option--selected", "kpt-select__option--active", "kpt-select__option--disabled"], [1, "kpt-select__empty"], ["name", "search"], ["type", "text", 1, "kpt-select__search-input", 3, "input", "value"], ["role", "option", 1, "kpt-select__option", 3, "click", "mouseenter"], [1, "kpt-select__check", 3, "is-on"], [1, "kpt-select__option-label"], ["name", "check", 1, "kpt-select__option-tick"], [1, "kpt-select__check"], ["name", "check"]], template: function KptSelect_Template(rf, ctx) { if (rf & 1) {
|
|
2259
2508
|
i0.ɵɵelementStart(0, "div", 1, 0);
|
|
2260
2509
|
i0.ɵɵlistener("click", function KptSelect_Template_div_click_0_listener() { return ctx.toggleOpen(); })("keydown", function KptSelect_Template_div_keydown_0_listener($event) { return ctx.onTriggerKeydown($event); })("blur", function KptSelect_Template_div_blur_0_listener() { return ctx.touch.emit(); });
|
|
2261
2510
|
i0.ɵɵelementStart(2, "div", 2);
|
|
@@ -2270,16 +2519,16 @@ class KptSelect {
|
|
|
2270
2519
|
i0.ɵɵclassProp("kpt-select--open", ctx.open())("kpt-select--disabled", ctx.disabled())("kpt-select--invalid", ctx.showInvalid());
|
|
2271
2520
|
i0.ɵɵattribute("aria-expanded", ctx.open())("aria-disabled", ctx.disabled() || null);
|
|
2272
2521
|
i0.ɵɵadvance(3);
|
|
2273
|
-
i0.ɵɵconditional(ctx.multiple() && ctx.selectedOptions().length ? 3 : !ctx.multiple() && ctx.
|
|
2522
|
+
i0.ɵɵconditional(ctx.multiple() && ctx.selectedOptions().length ? 3 : !ctx.multiple() && ctx.filled() ? 4 : 5);
|
|
2274
2523
|
i0.ɵɵadvance(4);
|
|
2275
2524
|
i0.ɵɵproperty("cdkConnectedOverlayOrigin", trigger_r9)("cdkConnectedOverlayOpen", ctx.open())("cdkConnectedOverlayPositions", ctx.positions)("cdkConnectedOverlayHasBackdrop", true)("cdkConnectedOverlayWidth", trigger_r9.elementRef.nativeElement.offsetWidth);
|
|
2276
2525
|
} }, dependencies: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon], styles: ["@layer kpt.components{.kpt-select-host{display:block}.kpt-select{display:flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);min-height:2.5rem;padding:.35rem var(--%NS%kpt-space-3, .75rem);box-sizing:border-box;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-form-field-border);border-radius:var(--%NS%kpt-form-field-radius, .5rem);background:var(--%NS%kpt-form-field-bg);color:var(--%NS%kpt-form-field-text);font-size:var(--%NS%kpt-font-size-sm, .875rem);cursor:pointer;transition:border-color var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard)}.kpt-select:hover:not(.kpt-select--disabled){border-color:var(--%NS%kpt-form-field-border-hover)}.kpt-select:focus-visible,.kpt-select.kpt-select--open{outline:none;border-color:var(--%NS%kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--%NS%kpt-form-field-border-focus) 30%,transparent)}.kpt-select.kpt-select--invalid{border-color:var(--%NS%kpt-form-field-border-error)}.kpt-select.kpt-select--disabled{cursor:not-allowed;opacity:.6;background:var(--%NS%kpt-color-surface-variant)}.kpt-select__value{flex:1;min-width:0;display:flex;flex-wrap:wrap;gap:.35rem;align-items:center}.kpt-select__placeholder{color:var(--%NS%kpt-form-field-placeholder)}.kpt-select__single{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kpt-select__chip{display:inline-flex;align-items:center;gap:.25rem;padding:.1rem .25rem .1rem .5rem;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:var(--%NS%kpt-color-muted);color:var(--%NS%kpt-color-on-muted);font-size:var(--%NS%kpt-font-size-xs, .75rem)}.kpt-select__chip-remove{display:inline-flex;border:0;background:none;cursor:pointer;color:inherit;padding:0;opacity:.7}.kpt-select__chip-remove:hover{opacity:1}.kpt-select__chevron{color:var(--%NS%kpt-color-on-surface-muted);transition:transform var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard)}.kpt-select.kpt-select--open .kpt-select__chevron{transform:rotate(180deg)}.kpt-select__panel{background:var(--%NS%kpt-color-surface-raised);border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);box-shadow:var(--%NS%kpt-elevation-3);overflow:hidden;font-size:var(--%NS%kpt-font-size-sm, .875rem);color:var(--%NS%kpt-color-on-surface)}.kpt-select__search{display:flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);padding:var(--%NS%kpt-space-2, .5rem) var(--%NS%kpt-space-3, .75rem);border-bottom:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);color:var(--%NS%kpt-color-on-surface-muted)}.kpt-select__search-input{flex:1;min-width:0;border:0;background:none;outline:none;color:var(--%NS%kpt-color-on-surface);font:inherit}.kpt-select__search-input::placeholder{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-select__list{list-style:none;margin:0;padding:.25rem;max-height:15rem;overflow-y:auto}.kpt-select__option{display:flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);padding:.45rem .6rem;border-radius:var(--%NS%kpt-radius-sm, .25rem);cursor:pointer}.kpt-select__option--active{background:var(--%NS%kpt-color-surface-variant)}.kpt-select__option--selected{color:var(--%NS%kpt-color-on-surface);font-weight:var(--%NS%kpt-font-weight-medium, 500)}.kpt-select__option--disabled{opacity:.45;cursor:not-allowed}.kpt-select__option-label{flex:1;min-width:0}.kpt-select__option-tick{color:var(--%NS%kpt-color-primary)}.kpt-select__check{display:inline-flex;align-items:center;justify-content:center;width:1.05rem;height:1.05rem;flex-shrink:0;border:var(--%NS%kpt-border-width-medium, 2px) solid var(--%NS%kpt-form-field-border);border-radius:var(--%NS%kpt-radius-sm, .25rem);color:var(--%NS%kpt-color-on-primary);font-size:.7rem}.kpt-select__check kpt-icon{opacity:0}.kpt-select__check.is-on{background:var(--%NS%kpt-color-primary);border-color:var(--%NS%kpt-color-primary)}.kpt-select__check.is-on kpt-icon{opacity:1}.kpt-select__empty{list-style:none;padding:.75rem .6rem;color:var(--%NS%kpt-color-on-surface-muted);text-align:center}}\n"], encapsulation: 2 }); }
|
|
2277
2526
|
}
|
|
2278
2527
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptSelect, [{
|
|
2279
2528
|
type: Component,
|
|
2280
|
-
args: [{ selector: 'kpt-select', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon], host: { class: 'kpt-select-host' }, template: "<div\n class=\"kpt-select\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n role=\"combobox\"\n tabindex=\"0\"\n [class.kpt-select--open]=\"open()\"\n [class.kpt-select--disabled]=\"disabled()\"\n [class.kpt-select--invalid]=\"showInvalid()\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-disabled]=\"disabled() || null\"\n (click)=\"toggleOpen()\"\n (keydown)=\"onTriggerKeydown($event)\"\n (blur)=\"touch.emit()\"\n>\n <div class=\"kpt-select__value\">\n @if (multiple() && selectedOptions().length) {\n @for (opt of selectedOptions(); track opt.value) {\n <span class=\"kpt-select__chip\">\n {{ opt.label }}\n <button type=\"button\" class=\"kpt-select__chip-remove\" (click)=\"removeChip(opt, $event)\" [attr.aria-label]=\"i18n.t('select.removeChip')\">\n <kpt-icon name=\"x\" />\n </button>\n </span>\n }\n } @else if (!multiple() &&
|
|
2529
|
+
args: [{ selector: 'kpt-select', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon], host: { class: 'kpt-select-host' }, providers: [{ provide: KPT_FORM_FIELD_CONTROL, useExisting: forwardRef(() => KptSelect) }], template: "<div\n class=\"kpt-select\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n role=\"combobox\"\n tabindex=\"0\"\n [class.kpt-select--open]=\"open()\"\n [class.kpt-select--disabled]=\"disabled()\"\n [class.kpt-select--invalid]=\"showInvalid()\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-disabled]=\"disabled() || null\"\n (click)=\"toggleOpen()\"\n (keydown)=\"onTriggerKeydown($event)\"\n (blur)=\"touch.emit()\"\n>\n <div class=\"kpt-select__value\">\n @if (multiple() && selectedOptions().length) {\n @for (opt of selectedOptions(); track opt.value) {\n <span class=\"kpt-select__chip\">\n {{ opt.label }}\n <button type=\"button\" class=\"kpt-select__chip-remove\" (click)=\"removeChip(opt, $event)\" [attr.aria-label]=\"i18n.t('select.removeChip')\">\n <kpt-icon name=\"x\" />\n </button>\n </span>\n }\n } @else if (!multiple() && filled()) {\n <span class=\"kpt-select__single\">{{ singleLabel() }}</span>\n } @else {\n <span class=\"kpt-select__placeholder\">{{ placeholder() }}</span>\n }\n </div>\n <kpt-icon class=\"kpt-select__chevron\" name=\"chevron-down\" />\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayWidth]=\"trigger.elementRef.nativeElement.offsetWidth\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div class=\"kpt-select__panel\" (keydown)=\"onPanelKeydown($event)\">\n @if (filter()) {\n <div class=\"kpt-select__search\">\n <kpt-icon name=\"search\" />\n <input\n type=\"text\"\n class=\"kpt-select__search-input\"\n [value]=\"filterText()\"\n (input)=\"onFilterInput($event)\"\n [attr.placeholder]=\"i18n.t('select.search')\"\n />\n </div>\n }\n <ul class=\"kpt-select__list\" role=\"listbox\" [attr.aria-multiselectable]=\"multiple()\">\n @for (opt of filteredOptions(); track opt.value; let i = $index) {\n <li\n class=\"kpt-select__option\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(opt)\"\n [class.kpt-select__option--selected]=\"isSelected(opt)\"\n [class.kpt-select__option--active]=\"i === activeIndex()\"\n [class.kpt-select__option--disabled]=\"opt.disabled\"\n (click)=\"pick(opt)\"\n (mouseenter)=\"activeIndex.set(i)\"\n >\n @if (multiple()) {\n <span class=\"kpt-select__check\" [class.is-on]=\"isSelected(opt)\"><kpt-icon name=\"check\" /></span>\n }\n <span class=\"kpt-select__option-label\">{{ opt.label }}</span>\n @if (!multiple() && isSelected(opt)) {\n <kpt-icon class=\"kpt-select__option-tick\" name=\"check\" />\n }\n </li>\n } @empty {\n <li class=\"kpt-select__empty\">{{ i18n.t('select.noResults') }}</li>\n }\n </ul>\n </div>\n</ng-template>\n", styles: ["@layer kpt.components{.kpt-select-host{display:block}.kpt-select{display:flex;align-items:center;gap:var(--kpt-space-2, .5rem);min-height:2.5rem;padding:.35rem var(--kpt-space-3, .75rem);box-sizing:border-box;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);background:var(--kpt-form-field-bg);color:var(--kpt-form-field-text);font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer;transition:border-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-select:hover:not(.kpt-select--disabled){border-color:var(--kpt-form-field-border-hover)}.kpt-select:focus-visible,.kpt-select.kpt-select--open{outline:none;border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-select.kpt-select--invalid{border-color:var(--kpt-form-field-border-error)}.kpt-select.kpt-select--disabled{cursor:not-allowed;opacity:.6;background:var(--kpt-color-surface-variant)}.kpt-select__value{flex:1;min-width:0;display:flex;flex-wrap:wrap;gap:.35rem;align-items:center}.kpt-select__placeholder{color:var(--kpt-form-field-placeholder)}.kpt-select__single{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kpt-select__chip{display:inline-flex;align-items:center;gap:.25rem;padding:.1rem .25rem .1rem .5rem;border-radius:var(--kpt-radius-sm, .25rem);background:var(--kpt-color-muted);color:var(--kpt-color-on-muted);font-size:var(--kpt-font-size-xs, .75rem)}.kpt-select__chip-remove{display:inline-flex;border:0;background:none;cursor:pointer;color:inherit;padding:0;opacity:.7}.kpt-select__chip-remove:hover{opacity:1}.kpt-select__chevron{color:var(--kpt-color-on-surface-muted);transition:transform var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-select.kpt-select--open .kpt-select__chevron{transform:rotate(180deg)}.kpt-select__panel{background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3);overflow:hidden;font-size:var(--kpt-font-size-sm, .875rem);color:var(--kpt-color-on-surface)}.kpt-select__search{display:flex;align-items:center;gap:var(--kpt-space-2, .5rem);padding:var(--kpt-space-2, .5rem) var(--kpt-space-3, .75rem);border-bottom:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);color:var(--kpt-color-on-surface-muted)}.kpt-select__search-input{flex:1;min-width:0;border:0;background:none;outline:none;color:var(--kpt-color-on-surface);font:inherit}.kpt-select__search-input::placeholder{color:var(--kpt-color-on-surface-muted)}.kpt-select__list{list-style:none;margin:0;padding:.25rem;max-height:15rem;overflow-y:auto}.kpt-select__option{display:flex;align-items:center;gap:var(--kpt-space-2, .5rem);padding:.45rem .6rem;border-radius:var(--kpt-radius-sm, .25rem);cursor:pointer}.kpt-select__option--active{background:var(--kpt-color-surface-variant)}.kpt-select__option--selected{color:var(--kpt-color-on-surface);font-weight:var(--kpt-font-weight-medium, 500)}.kpt-select__option--disabled{opacity:.45;cursor:not-allowed}.kpt-select__option-label{flex:1;min-width:0}.kpt-select__option-tick{color:var(--kpt-color-primary)}.kpt-select__check{display:inline-flex;align-items:center;justify-content:center;width:1.05rem;height:1.05rem;flex-shrink:0;border:var(--kpt-border-width-medium, 2px) solid var(--kpt-form-field-border);border-radius:var(--kpt-radius-sm, .25rem);color:var(--kpt-color-on-primary);font-size:.7rem}.kpt-select__check kpt-icon{opacity:0}.kpt-select__check.is-on{background:var(--kpt-color-primary);border-color:var(--kpt-color-primary)}.kpt-select__check.is-on kpt-icon{opacity:1}.kpt-select__empty{list-style:none;padding:.75rem .6rem;color:var(--kpt-color-on-surface-muted);text-align:center}}\n"] }]
|
|
2281
2530
|
}], null, { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], touch: [{ type: i0.Output, args: ["touch"] }] }); })();
|
|
2282
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptSelect, { className: "KptSelect", filePath: "lib/select/select.component.ts", lineNumber:
|
|
2531
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptSelect, { className: "KptSelect", filePath: "lib/select/select.component.ts", lineNumber: 40 }); })();
|
|
2283
2532
|
|
|
2284
2533
|
/*
|
|
2285
2534
|
* Pomocniki nazw dni/miesięcy wyliczane z `Intl` — sterowane bieżącym locale i18n.
|
|
@@ -2981,6 +3230,9 @@ class KptDatepicker {
|
|
|
2981
3230
|
this.touch = output();
|
|
2982
3231
|
this.placeholder = input('', /* @ts-ignore */
|
|
2983
3232
|
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
3233
|
+
/** Nazwa dostępna, gdy pola nie opisuje `<label for>` (np. dwa pola w jednym wierszu). */
|
|
3234
|
+
this.ariaLabel = input(null, /* @ts-ignore */
|
|
3235
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
2984
3236
|
this.displayFormat = input('pl', /* @ts-ignore */
|
|
2985
3237
|
...(ngDevMode ? [{ debugName: "displayFormat" }] : /* istanbul ignore next */ []));
|
|
2986
3238
|
/** Granulacja wyboru. */
|
|
@@ -3309,7 +3561,7 @@ class KptDatepicker {
|
|
|
3309
3561
|
this.pendingDate.set('');
|
|
3310
3562
|
}
|
|
3311
3563
|
static { this.ɵfac = function KptDatepicker_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptDatepicker)(); }; }
|
|
3312
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptDatepicker, selectors: [["kpt-datepicker"]], hostAttrs: [1, "kpt-datepicker-host"], inputs: { value: [1, "value"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], placeholder: [1, "placeholder"], displayFormat: [1, "displayFormat"], selectionMode: [1, "selectionMode"], monthDisplay: [1, "monthDisplay"], hourFormat: [1, "hourFormat"], minuteStep: [1, "minuteStep"], minDate: [1, "minDate"], maxDate: [1, "maxDate"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 8, vars:
|
|
3564
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptDatepicker, selectors: [["kpt-datepicker"]], hostAttrs: [1, "kpt-datepicker-host"], inputs: { value: [1, "value"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], placeholder: [1, "placeholder"], ariaLabel: [1, "ariaLabel"], displayFormat: [1, "displayFormat"], selectionMode: [1, "selectionMode"], monthDisplay: [1, "monthDisplay"], hourFormat: [1, "hourFormat"], minuteStep: [1, "minuteStep"], minDate: [1, "minDate"], maxDate: [1, "maxDate"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 8, vars: 15, consts: [["trigger", "cdkOverlayOrigin"], ["cdkOverlayOrigin", "", "role", "button", "tabindex", "0", 1, "kpt-datepicker", 3, "click", "keydown.enter", "blur"], [1, "kpt-datepicker__value"], [1, "kpt-datepicker__placeholder"], [1, "kpt-datepicker__spacer"], ["type", "button", 1, "kpt-datepicker__clear"], [1, "kpt-datepicker__icon", 3, "name"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "cdk-overlay-transparent-backdrop", 3, "backdropClick", "detach", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayPositions", "cdkConnectedOverlayHasBackdrop"], ["type", "button", 1, "kpt-datepicker__clear", 3, "click"], ["name", "x"], [1, "kpt-calendar", 3, "keydown.escape"], [3, "valueChange", "value", "hourFormat", "minuteStep"], [1, "kpt-calendar__footer"], ["size", "sm", 3, "click"], [1, "kpt-calendar__header"], ["type", "button", 1, "kpt-calendar__nav", 3, "click"], ["name", "chevron-left"], [1, "kpt-calendar__title"], ["name", "chevron-right"], [1, "kpt-calendar__weekdays"], [1, "kpt-calendar__weekday"], [1, "kpt-calendar__grid"], ["type", "button", 1, "kpt-calendar__timebar", 3, "click"], ["name", "clock"], ["type", "button", 1, "kpt-calendar__day", 3, "kpt-calendar__day--muted", "kpt-calendar__day--today", "kpt-calendar__day--selected", "disabled"], ["type", "button", 1, "kpt-calendar__day", 3, "click", "disabled"], [1, "kpt-calendar__grid", "kpt-calendar__grid--cells"], ["type", "button", 1, "kpt-calendar__cell", 3, "kpt-calendar__cell--selected", "disabled"], ["type", "button", 1, "kpt-calendar__cell", 3, "click", "disabled"], ["type", "button", 1, "kpt-calendar__cell", 3, "kpt-calendar__cell--selected"], ["type", "button", 1, "kpt-calendar__cell", 3, "click"]], template: function KptDatepicker_Template(rf, ctx) { if (rf & 1) {
|
|
3313
3565
|
i0.ɵɵelementStart(0, "div", 1, 0);
|
|
3314
3566
|
i0.ɵɵlistener("click", function KptDatepicker_Template_div_click_0_listener() { return ctx.toggleOpen(); })("keydown.enter", function KptDatepicker_Template_div_keydown_enter_0_listener() { return ctx.toggleOpen(); })("blur", function KptDatepicker_Template_div_blur_0_listener() { return ctx.touch.emit(); });
|
|
3315
3567
|
i0.ɵɵconditionalCreate(2, KptDatepicker_Conditional_2_Template, 2, 1, "span", 2)(3, KptDatepicker_Conditional_3_Template, 2, 1, "span", 3);
|
|
@@ -3322,19 +3574,21 @@ class KptDatepicker {
|
|
|
3322
3574
|
} if (rf & 2) {
|
|
3323
3575
|
const trigger_r25 = i0.ɵɵreference(1);
|
|
3324
3576
|
i0.ɵɵclassProp("kpt-datepicker--open", ctx.open())("kpt-datepicker--disabled", ctx.disabled())("kpt-datepicker--invalid", ctx.showInvalid());
|
|
3325
|
-
i0.ɵɵattribute("aria-disabled", ctx.disabled() || null);
|
|
3577
|
+
i0.ɵɵattribute("aria-disabled", ctx.disabled() || null)("aria-label", ctx.ariaLabel());
|
|
3326
3578
|
i0.ɵɵadvance(2);
|
|
3327
3579
|
i0.ɵɵconditional(ctx.display() ? 2 : 3);
|
|
3328
3580
|
i0.ɵɵadvance(3);
|
|
3329
3581
|
i0.ɵɵconditional(ctx.display() ? 5 : -1);
|
|
3330
|
-
i0.ɵɵadvance(
|
|
3582
|
+
i0.ɵɵadvance();
|
|
3583
|
+
i0.ɵɵproperty("name", ctx.selectionMode() === "time" ? "clock" : "calendar");
|
|
3584
|
+
i0.ɵɵadvance();
|
|
3331
3585
|
i0.ɵɵproperty("cdkConnectedOverlayOrigin", trigger_r25)("cdkConnectedOverlayOpen", ctx.open())("cdkConnectedOverlayPositions", ctx.positions)("cdkConnectedOverlayHasBackdrop", true);
|
|
3332
3586
|
} }, dependencies: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon, KptButton, KptClock], styles: ["@layer kpt.components{.kpt-datepicker-host{display:block}.kpt-datepicker{display:flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);height:2.5rem;padding-inline:var(--%NS%kpt-space-3, .75rem);box-sizing:border-box;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-form-field-border);border-radius:var(--%NS%kpt-form-field-radius, .5rem);background:var(--%NS%kpt-form-field-bg);color:var(--%NS%kpt-form-field-text);font-size:var(--%NS%kpt-font-size-sm, .875rem);cursor:pointer}.kpt-datepicker:hover:not(.kpt-datepicker--disabled){border-color:var(--%NS%kpt-form-field-border-hover)}.kpt-datepicker:focus-visible,.kpt-datepicker.kpt-datepicker--open{outline:none;border-color:var(--%NS%kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--%NS%kpt-form-field-border-focus) 30%,transparent)}.kpt-datepicker.kpt-datepicker--invalid{border-color:var(--%NS%kpt-form-field-border-error)}.kpt-datepicker.kpt-datepicker--disabled{cursor:not-allowed;opacity:.6;background:var(--%NS%kpt-color-surface-variant)}.kpt-datepicker__placeholder{color:var(--%NS%kpt-form-field-placeholder)}.kpt-datepicker__spacer{flex:1}.kpt-datepicker__icon{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-datepicker__clear{display:inline-flex;border:0;background:none;cursor:pointer;color:var(--%NS%kpt-color-on-surface-muted);padding:0}.kpt-datepicker__clear:hover{color:var(--%NS%kpt-color-on-surface)}.kpt-calendar{width:17rem;padding:var(--%NS%kpt-space-3, .75rem);background:var(--%NS%kpt-color-surface-raised);border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);box-shadow:var(--%NS%kpt-elevation-3);color:var(--%NS%kpt-color-on-surface);font-size:var(--%NS%kpt-font-size-sm, .875rem)}.kpt-calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--%NS%kpt-space-2, .5rem)}.kpt-calendar__title{font-weight:var(--%NS%kpt-font-weight-semibold, 600);text-transform:capitalize}.kpt-calendar__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--%NS%kpt-radius-md, .5rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer}.kpt-calendar__nav:hover{background:var(--%NS%kpt-color-muted)}.kpt-calendar__weekdays,.kpt-calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.kpt-calendar__weekday{text-align:center;font-size:var(--%NS%kpt-font-size-xs, .75rem);color:var(--%NS%kpt-color-on-surface-muted);padding:.25rem 0}.kpt-calendar__day{aspect-ratio:1;border:0;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer;font:inherit}.kpt-calendar__day:hover:not(:disabled){background:var(--%NS%kpt-color-muted)}.kpt-calendar__day--muted{color:var(--%NS%kpt-color-on-surface-muted);opacity:.5}.kpt-calendar__day--today{box-shadow:inset 0 0 0 1px var(--%NS%kpt-color-border-strong)}.kpt-calendar__day--selected{background:var(--%NS%kpt-color-primary)!important;color:var(--%NS%kpt-color-on-primary)}.kpt-calendar__day:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__grid--cells{grid-template-columns:repeat(3,1fr);gap:4px}.kpt-calendar__cell{padding:.6rem .25rem;border:0;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer;font:inherit;text-transform:capitalize}.kpt-calendar__cell:hover:not(:disabled){background:var(--%NS%kpt-color-muted)}.kpt-calendar__cell--selected{background:var(--%NS%kpt-color-primary)!important;color:var(--%NS%kpt-color-on-primary)}.kpt-calendar__cell:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__timebar{display:flex;align-items:center;justify-content:center;gap:var(--%NS%kpt-space-2, .5rem);width:100%;margin-top:var(--%NS%kpt-space-2, .5rem);padding:var(--%NS%kpt-space-2, .5rem);border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);background:none;color:var(--%NS%kpt-color-on-surface);font:inherit;font-variant-numeric:tabular-nums;cursor:pointer}.kpt-calendar__timebar:hover{background:var(--%NS%kpt-color-muted)}.kpt-calendar__timebar kpt-icon{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-calendar__footer{display:flex;justify-content:flex-end;margin-top:var(--%NS%kpt-space-3, .75rem)}.kpt-calendar--clock{width:16rem}}\n"], encapsulation: 2 }); }
|
|
3333
3587
|
}
|
|
3334
3588
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptDatepicker, [{
|
|
3335
3589
|
type: Component,
|
|
3336
|
-
args: [{ selector: 'kpt-datepicker', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon, KptButton, KptClock], host: { class: 'kpt-datepicker-host' }, template: "<div\n class=\"kpt-datepicker\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n role=\"button\"\n tabindex=\"0\"\n [class.kpt-datepicker--open]=\"open()\"\n [class.kpt-datepicker--disabled]=\"disabled()\"\n [class.kpt-datepicker--invalid]=\"showInvalid()\"\n [attr.aria-disabled]=\"disabled() || null\"\n (click)=\"toggleOpen()\"\n (keydown.enter)=\"toggleOpen()\"\n (blur)=\"touch.emit()\"\n>\n @if (display()) {\n <span class=\"kpt-datepicker__value\">{{ display() }}</span>\n } @else {\n <span class=\"kpt-datepicker__placeholder\">{{ effectivePlaceholder() }}</span>\n }\n <span class=\"kpt-datepicker__spacer\"></span>\n @if (display()) {\n <button type=\"button\" class=\"kpt-datepicker__clear\" (click)=\"clear($event)\" [attr.aria-label]=\"i18n.t('common.clear')\"><kpt-icon name=\"x\" /></button>\n }\n <kpt-icon class=\"kpt-datepicker__icon\" name=\"calendar\" />\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div class=\"kpt-calendar\" [class.kpt-calendar--clock]=\"selectionMode() === 'time' || (selectionMode() === 'datetime' && dtView() === 'clock')\" (keydown.escape)=\"close()\">\n @switch (selectionMode()) {\n @case ('time') {\n <kpt-clock [(value)]=\"timeStr\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n <div class=\"kpt-calendar__footer\">\n <kpt-button size=\"sm\" (click)=\"commit()\">{{ i18n.t('common.done') }}</kpt-button>\n </div>\n }\n @case ('datetime') {\n @if (dtView() === 'calendar') {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"prevMonth()\" [attr.aria-label]=\"i18n.t('datepicker.prevMonth')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ monthLabel() }}</span>\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"nextMonth()\" [attr.aria-label]=\"i18n.t('datepicker.nextMonth')\"><kpt-icon name=\"chevron-right\" /></button>\n </div>\n <div class=\"kpt-calendar__weekdays\">\n @for (wd of weekdays(); track wd) {\n <span class=\"kpt-calendar__weekday\">{{ wd }}</span>\n }\n </div>\n <div class=\"kpt-calendar__grid\">\n @for (week of weeks(); track $index) {\n @for (cell of week; track cell.iso) {\n <button\n type=\"button\"\n class=\"kpt-calendar__day\"\n [class.kpt-calendar__day--muted]=\"!cell.inMonth\"\n [class.kpt-calendar__day--today]=\"cell.today\"\n [class.kpt-calendar__day--selected]=\"cell.selected\"\n [disabled]=\"cell.disabled\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectDay(cell)\"\n >{{ cell.day }}</button>\n }\n }\n </div>\n <button type=\"button\" class=\"kpt-calendar__timebar\" (click)=\"openClock()\">\n <kpt-icon name=\"clock\" />\n <span>{{ timeBarLabel() }}</span>\n </button>\n } @else {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"backToCalendar()\" [attr.aria-label]=\"i18n.t('datepicker.calendar')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ i18n.t('datepicker.time') }}</span>\n </div>\n <kpt-clock [(value)]=\"timeStr\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n }\n <div class=\"kpt-calendar__footer\">\n <kpt-button size=\"sm\" (click)=\"commit()\">{{ i18n.t('common.done') }}</kpt-button>\n </div>\n }\n @case ('monthYear') {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"prevYear()\" [attr.aria-label]=\"i18n.t('datepicker.prevYear')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ viewYear() }}</span>\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"nextYear()\" [attr.aria-label]=\"i18n.t('datepicker.nextYear')\"><kpt-icon name=\"chevron-right\" /></button>\n </div>\n <div class=\"kpt-calendar__grid kpt-calendar__grid--cells\">\n @for (cell of monthCells(); track cell.value) {\n <button\n type=\"button\"\n class=\"kpt-calendar__cell\"\n [class.kpt-calendar__cell--selected]=\"cell.selected\"\n [disabled]=\"cell.disabled\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectCell(cell)\"\n >{{ cell.label }}</button>\n }\n </div>\n }\n @case ('year') {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"prevYearPage()\" [attr.aria-label]=\"i18n.t('datepicker.prevYears')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ yearRangeLabel() }}</span>\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"nextYearPage()\" [attr.aria-label]=\"i18n.t('datepicker.nextYears')\"><kpt-icon name=\"chevron-right\" /></button>\n </div>\n <div class=\"kpt-calendar__grid kpt-calendar__grid--cells\">\n @for (cell of yearCells(); track cell.value) {\n <button\n type=\"button\"\n class=\"kpt-calendar__cell\"\n [class.kpt-calendar__cell--selected]=\"cell.selected\"\n [disabled]=\"cell.disabled\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectCell(cell)\"\n >{{ cell.label }}</button>\n }\n </div>\n }\n @case ('month') {\n <div class=\"kpt-calendar__header\">\n <span class=\"kpt-calendar__title\">{{ i18n.t('datepicker.month') }}</span>\n </div>\n <div class=\"kpt-calendar__grid kpt-calendar__grid--cells\">\n @for (cell of monthCells(); track cell.value) {\n <button\n type=\"button\"\n class=\"kpt-calendar__cell\"\n [class.kpt-calendar__cell--selected]=\"cell.selected\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectCell(cell)\"\n >{{ cell.label }}</button>\n }\n </div>\n }\n @default {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"prevMonth()\" [attr.aria-label]=\"i18n.t('datepicker.prevMonth')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ monthLabel() }}</span>\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"nextMonth()\" [attr.aria-label]=\"i18n.t('datepicker.nextMonth')\"><kpt-icon name=\"chevron-right\" /></button>\n </div>\n <div class=\"kpt-calendar__weekdays\">\n @for (wd of weekdays(); track wd) {\n <span class=\"kpt-calendar__weekday\">{{ wd }}</span>\n }\n </div>\n <div class=\"kpt-calendar__grid\">\n @for (week of weeks(); track $index) {\n @for (cell of week; track cell.iso) {\n <button\n type=\"button\"\n class=\"kpt-calendar__day\"\n [class.kpt-calendar__day--muted]=\"!cell.inMonth\"\n [class.kpt-calendar__day--today]=\"cell.today\"\n [class.kpt-calendar__day--selected]=\"cell.selected\"\n [disabled]=\"cell.disabled\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectDay(cell)\"\n >{{ cell.day }}</button>\n }\n }\n </div>\n }\n }\n </div>\n</ng-template>\n", styles: ["@layer kpt.components{.kpt-datepicker-host{display:block}.kpt-datepicker{display:flex;align-items:center;gap:var(--kpt-space-2, .5rem);height:2.5rem;padding-inline:var(--kpt-space-3, .75rem);box-sizing:border-box;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);background:var(--kpt-form-field-bg);color:var(--kpt-form-field-text);font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer}.kpt-datepicker:hover:not(.kpt-datepicker--disabled){border-color:var(--kpt-form-field-border-hover)}.kpt-datepicker:focus-visible,.kpt-datepicker.kpt-datepicker--open{outline:none;border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-datepicker.kpt-datepicker--invalid{border-color:var(--kpt-form-field-border-error)}.kpt-datepicker.kpt-datepicker--disabled{cursor:not-allowed;opacity:.6;background:var(--kpt-color-surface-variant)}.kpt-datepicker__placeholder{color:var(--kpt-form-field-placeholder)}.kpt-datepicker__spacer{flex:1}.kpt-datepicker__icon{color:var(--kpt-color-on-surface-muted)}.kpt-datepicker__clear{display:inline-flex;border:0;background:none;cursor:pointer;color:var(--kpt-color-on-surface-muted);padding:0}.kpt-datepicker__clear:hover{color:var(--kpt-color-on-surface)}.kpt-calendar{width:17rem;padding:var(--kpt-space-3, .75rem);background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3);color:var(--kpt-color-on-surface);font-size:var(--kpt-font-size-sm, .875rem)}.kpt-calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--kpt-space-2, .5rem)}.kpt-calendar__title{font-weight:var(--kpt-font-weight-semibold, 600);text-transform:capitalize}.kpt-calendar__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--kpt-radius-md, .5rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer}.kpt-calendar__nav:hover{background:var(--kpt-color-muted)}.kpt-calendar__weekdays,.kpt-calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.kpt-calendar__weekday{text-align:center;font-size:var(--kpt-font-size-xs, .75rem);color:var(--kpt-color-on-surface-muted);padding:.25rem 0}.kpt-calendar__day{aspect-ratio:1;border:0;border-radius:var(--kpt-radius-sm, .25rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer;font:inherit}.kpt-calendar__day:hover:not(:disabled){background:var(--kpt-color-muted)}.kpt-calendar__day--muted{color:var(--kpt-color-on-surface-muted);opacity:.5}.kpt-calendar__day--today{box-shadow:inset 0 0 0 1px var(--kpt-color-border-strong)}.kpt-calendar__day--selected{background:var(--kpt-color-primary)!important;color:var(--kpt-color-on-primary)}.kpt-calendar__day:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__grid--cells{grid-template-columns:repeat(3,1fr);gap:4px}.kpt-calendar__cell{padding:.6rem .25rem;border:0;border-radius:var(--kpt-radius-sm, .25rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer;font:inherit;text-transform:capitalize}.kpt-calendar__cell:hover:not(:disabled){background:var(--kpt-color-muted)}.kpt-calendar__cell--selected{background:var(--kpt-color-primary)!important;color:var(--kpt-color-on-primary)}.kpt-calendar__cell:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__timebar{display:flex;align-items:center;justify-content:center;gap:var(--kpt-space-2, .5rem);width:100%;margin-top:var(--kpt-space-2, .5rem);padding:var(--kpt-space-2, .5rem);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);background:none;color:var(--kpt-color-on-surface);font:inherit;font-variant-numeric:tabular-nums;cursor:pointer}.kpt-calendar__timebar:hover{background:var(--kpt-color-muted)}.kpt-calendar__timebar kpt-icon{color:var(--kpt-color-on-surface-muted)}.kpt-calendar__footer{display:flex;justify-content:flex-end;margin-top:var(--kpt-space-3, .75rem)}.kpt-calendar--clock{width:16rem}}\n"] }]
|
|
3337
|
-
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], displayFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayFormat", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], monthDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "monthDisplay", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], minuteStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteStep", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }] }); })();
|
|
3590
|
+
args: [{ selector: 'kpt-datepicker', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon, KptButton, KptClock], host: { class: 'kpt-datepicker-host' }, template: "<div\n class=\"kpt-datepicker\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n role=\"button\"\n tabindex=\"0\"\n [class.kpt-datepicker--open]=\"open()\"\n [class.kpt-datepicker--disabled]=\"disabled()\"\n [class.kpt-datepicker--invalid]=\"showInvalid()\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"toggleOpen()\"\n (keydown.enter)=\"toggleOpen()\"\n (blur)=\"touch.emit()\"\n>\n @if (display()) {\n <span class=\"kpt-datepicker__value\">{{ display() }}</span>\n } @else {\n <span class=\"kpt-datepicker__placeholder\">{{ effectivePlaceholder() }}</span>\n }\n <span class=\"kpt-datepicker__spacer\"></span>\n @if (display()) {\n <button type=\"button\" class=\"kpt-datepicker__clear\" (click)=\"clear($event)\" [attr.aria-label]=\"i18n.t('common.clear')\"><kpt-icon name=\"x\" /></button>\n }\n <kpt-icon\n class=\"kpt-datepicker__icon\"\n [name]=\"selectionMode() === 'time' ? 'clock' : 'calendar'\"\n />\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div class=\"kpt-calendar\" [class.kpt-calendar--clock]=\"selectionMode() === 'time' || (selectionMode() === 'datetime' && dtView() === 'clock')\" (keydown.escape)=\"close()\">\n @switch (selectionMode()) {\n @case ('time') {\n <kpt-clock [(value)]=\"timeStr\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n <div class=\"kpt-calendar__footer\">\n <kpt-button size=\"sm\" (click)=\"commit()\">{{ i18n.t('common.done') }}</kpt-button>\n </div>\n }\n @case ('datetime') {\n @if (dtView() === 'calendar') {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"prevMonth()\" [attr.aria-label]=\"i18n.t('datepicker.prevMonth')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ monthLabel() }}</span>\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"nextMonth()\" [attr.aria-label]=\"i18n.t('datepicker.nextMonth')\"><kpt-icon name=\"chevron-right\" /></button>\n </div>\n <div class=\"kpt-calendar__weekdays\">\n @for (wd of weekdays(); track wd) {\n <span class=\"kpt-calendar__weekday\">{{ wd }}</span>\n }\n </div>\n <div class=\"kpt-calendar__grid\">\n @for (week of weeks(); track $index) {\n @for (cell of week; track cell.iso) {\n <button\n type=\"button\"\n class=\"kpt-calendar__day\"\n [class.kpt-calendar__day--muted]=\"!cell.inMonth\"\n [class.kpt-calendar__day--today]=\"cell.today\"\n [class.kpt-calendar__day--selected]=\"cell.selected\"\n [disabled]=\"cell.disabled\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectDay(cell)\"\n >{{ cell.day }}</button>\n }\n }\n </div>\n <button type=\"button\" class=\"kpt-calendar__timebar\" (click)=\"openClock()\">\n <kpt-icon name=\"clock\" />\n <span>{{ timeBarLabel() }}</span>\n </button>\n } @else {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"backToCalendar()\" [attr.aria-label]=\"i18n.t('datepicker.calendar')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ i18n.t('datepicker.time') }}</span>\n </div>\n <kpt-clock [(value)]=\"timeStr\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n }\n <div class=\"kpt-calendar__footer\">\n <kpt-button size=\"sm\" (click)=\"commit()\">{{ i18n.t('common.done') }}</kpt-button>\n </div>\n }\n @case ('monthYear') {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"prevYear()\" [attr.aria-label]=\"i18n.t('datepicker.prevYear')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ viewYear() }}</span>\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"nextYear()\" [attr.aria-label]=\"i18n.t('datepicker.nextYear')\"><kpt-icon name=\"chevron-right\" /></button>\n </div>\n <div class=\"kpt-calendar__grid kpt-calendar__grid--cells\">\n @for (cell of monthCells(); track cell.value) {\n <button\n type=\"button\"\n class=\"kpt-calendar__cell\"\n [class.kpt-calendar__cell--selected]=\"cell.selected\"\n [disabled]=\"cell.disabled\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectCell(cell)\"\n >{{ cell.label }}</button>\n }\n </div>\n }\n @case ('year') {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"prevYearPage()\" [attr.aria-label]=\"i18n.t('datepicker.prevYears')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ yearRangeLabel() }}</span>\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"nextYearPage()\" [attr.aria-label]=\"i18n.t('datepicker.nextYears')\"><kpt-icon name=\"chevron-right\" /></button>\n </div>\n <div class=\"kpt-calendar__grid kpt-calendar__grid--cells\">\n @for (cell of yearCells(); track cell.value) {\n <button\n type=\"button\"\n class=\"kpt-calendar__cell\"\n [class.kpt-calendar__cell--selected]=\"cell.selected\"\n [disabled]=\"cell.disabled\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectCell(cell)\"\n >{{ cell.label }}</button>\n }\n </div>\n }\n @case ('month') {\n <div class=\"kpt-calendar__header\">\n <span class=\"kpt-calendar__title\">{{ i18n.t('datepicker.month') }}</span>\n </div>\n <div class=\"kpt-calendar__grid kpt-calendar__grid--cells\">\n @for (cell of monthCells(); track cell.value) {\n <button\n type=\"button\"\n class=\"kpt-calendar__cell\"\n [class.kpt-calendar__cell--selected]=\"cell.selected\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectCell(cell)\"\n >{{ cell.label }}</button>\n }\n </div>\n }\n @default {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"prevMonth()\" [attr.aria-label]=\"i18n.t('datepicker.prevMonth')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ monthLabel() }}</span>\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"nextMonth()\" [attr.aria-label]=\"i18n.t('datepicker.nextMonth')\"><kpt-icon name=\"chevron-right\" /></button>\n </div>\n <div class=\"kpt-calendar__weekdays\">\n @for (wd of weekdays(); track wd) {\n <span class=\"kpt-calendar__weekday\">{{ wd }}</span>\n }\n </div>\n <div class=\"kpt-calendar__grid\">\n @for (week of weeks(); track $index) {\n @for (cell of week; track cell.iso) {\n <button\n type=\"button\"\n class=\"kpt-calendar__day\"\n [class.kpt-calendar__day--muted]=\"!cell.inMonth\"\n [class.kpt-calendar__day--today]=\"cell.today\"\n [class.kpt-calendar__day--selected]=\"cell.selected\"\n [disabled]=\"cell.disabled\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectDay(cell)\"\n >{{ cell.day }}</button>\n }\n }\n </div>\n }\n }\n </div>\n</ng-template>\n", styles: ["@layer kpt.components{.kpt-datepicker-host{display:block}.kpt-datepicker{display:flex;align-items:center;gap:var(--kpt-space-2, .5rem);height:2.5rem;padding-inline:var(--kpt-space-3, .75rem);box-sizing:border-box;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);background:var(--kpt-form-field-bg);color:var(--kpt-form-field-text);font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer}.kpt-datepicker:hover:not(.kpt-datepicker--disabled){border-color:var(--kpt-form-field-border-hover)}.kpt-datepicker:focus-visible,.kpt-datepicker.kpt-datepicker--open{outline:none;border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-datepicker.kpt-datepicker--invalid{border-color:var(--kpt-form-field-border-error)}.kpt-datepicker.kpt-datepicker--disabled{cursor:not-allowed;opacity:.6;background:var(--kpt-color-surface-variant)}.kpt-datepicker__placeholder{color:var(--kpt-form-field-placeholder)}.kpt-datepicker__spacer{flex:1}.kpt-datepicker__icon{color:var(--kpt-color-on-surface-muted)}.kpt-datepicker__clear{display:inline-flex;border:0;background:none;cursor:pointer;color:var(--kpt-color-on-surface-muted);padding:0}.kpt-datepicker__clear:hover{color:var(--kpt-color-on-surface)}.kpt-calendar{width:17rem;padding:var(--kpt-space-3, .75rem);background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3);color:var(--kpt-color-on-surface);font-size:var(--kpt-font-size-sm, .875rem)}.kpt-calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--kpt-space-2, .5rem)}.kpt-calendar__title{font-weight:var(--kpt-font-weight-semibold, 600);text-transform:capitalize}.kpt-calendar__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--kpt-radius-md, .5rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer}.kpt-calendar__nav:hover{background:var(--kpt-color-muted)}.kpt-calendar__weekdays,.kpt-calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.kpt-calendar__weekday{text-align:center;font-size:var(--kpt-font-size-xs, .75rem);color:var(--kpt-color-on-surface-muted);padding:.25rem 0}.kpt-calendar__day{aspect-ratio:1;border:0;border-radius:var(--kpt-radius-sm, .25rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer;font:inherit}.kpt-calendar__day:hover:not(:disabled){background:var(--kpt-color-muted)}.kpt-calendar__day--muted{color:var(--kpt-color-on-surface-muted);opacity:.5}.kpt-calendar__day--today{box-shadow:inset 0 0 0 1px var(--kpt-color-border-strong)}.kpt-calendar__day--selected{background:var(--kpt-color-primary)!important;color:var(--kpt-color-on-primary)}.kpt-calendar__day:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__grid--cells{grid-template-columns:repeat(3,1fr);gap:4px}.kpt-calendar__cell{padding:.6rem .25rem;border:0;border-radius:var(--kpt-radius-sm, .25rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer;font:inherit;text-transform:capitalize}.kpt-calendar__cell:hover:not(:disabled){background:var(--kpt-color-muted)}.kpt-calendar__cell--selected{background:var(--kpt-color-primary)!important;color:var(--kpt-color-on-primary)}.kpt-calendar__cell:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__timebar{display:flex;align-items:center;justify-content:center;gap:var(--kpt-space-2, .5rem);width:100%;margin-top:var(--kpt-space-2, .5rem);padding:var(--kpt-space-2, .5rem);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);background:none;color:var(--kpt-color-on-surface);font:inherit;font-variant-numeric:tabular-nums;cursor:pointer}.kpt-calendar__timebar:hover{background:var(--kpt-color-muted)}.kpt-calendar__timebar kpt-icon{color:var(--kpt-color-on-surface-muted)}.kpt-calendar__footer{display:flex;justify-content:flex-end;margin-top:var(--kpt-space-3, .75rem)}.kpt-calendar--clock{width:16rem}}\n"] }]
|
|
3591
|
+
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], displayFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayFormat", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], monthDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "monthDisplay", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], minuteStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteStep", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }] }); })();
|
|
3338
3592
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDatepicker, { className: "KptDatepicker", filePath: "lib/datepicker/datepicker.component.ts", lineNumber: 66 }); })();
|
|
3339
3593
|
|
|
3340
3594
|
const _c0$u = ["ta"];
|
|
@@ -6830,6 +7084,7 @@ const _c0$q = ["*"];
|
|
|
6830
7084
|
/**
|
|
6831
7085
|
* Górny pasek (toolbar) — pozioma belka na treść aplikacji (logo, akcje).
|
|
6832
7086
|
* Elementowi z atrybutem `kptToolbarSpacer` nadaj elastyczny odstęp, aby rozepchnąć zawartość.
|
|
7087
|
+
* Poniżej breakpointa `sm` pasek sam zbiega się do niższej wysokości i węższych marginesów.
|
|
6833
7088
|
*
|
|
6834
7089
|
* @example
|
|
6835
7090
|
* <kpt-toolbar elevated>
|
|
@@ -6842,23 +7097,31 @@ class KptToolbar {
|
|
|
6842
7097
|
constructor() {
|
|
6843
7098
|
/** Dodaje cień (wyniesienie) pod paskiem. */
|
|
6844
7099
|
this.elevated = input(false, { ...(ngDevMode ? { debugName: "elevated" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
7100
|
+
/**
|
|
7101
|
+
* Pozwala zawartości paska zawinąć się do kolejnych wierszy, gdy zabraknie miejsca.
|
|
7102
|
+
* Opcjonalne, bo zawijanie zmienia zachowanie `kptToolbarSpacer` — w jednowierszowym
|
|
7103
|
+
* pasku rozpycha on treść, a w zawijanym potrafi zepchnąć resztę do nowego wiersza.
|
|
7104
|
+
*/
|
|
7105
|
+
this.wrap = input(false, { ...(ngDevMode ? { debugName: "wrap" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
6845
7106
|
}
|
|
6846
7107
|
static { this.ɵfac = function KptToolbar_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptToolbar)(); }; }
|
|
6847
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptToolbar, selectors: [["kpt-toolbar"]], hostAttrs: [1, "kpt-toolbar"], hostVars:
|
|
7108
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptToolbar, selectors: [["kpt-toolbar"]], hostAttrs: [1, "kpt-toolbar"], hostVars: 3, hostBindings: function KptToolbar_HostBindings(rf, ctx) { if (rf & 2) {
|
|
7109
|
+
i0.ɵɵattribute("data-wrap", ctx.wrap() ? "" : null);
|
|
6848
7110
|
i0.ɵɵclassProp("kpt-toolbar--elevated", ctx.elevated());
|
|
6849
|
-
} }, inputs: { elevated: [1, "elevated"] }, ngContentSelectors: _c0$q, decls: 1, vars: 0, template: function KptToolbar_Template(rf, ctx) { if (rf & 1) {
|
|
7111
|
+
} }, inputs: { elevated: [1, "elevated"], wrap: [1, "wrap"] }, ngContentSelectors: _c0$q, decls: 1, vars: 0, template: function KptToolbar_Template(rf, ctx) { if (rf & 1) {
|
|
6850
7112
|
i0.ɵɵprojectionDef();
|
|
6851
7113
|
i0.ɵɵprojection(0);
|
|
6852
|
-
} }, styles: ["@layer kpt.components{.kpt-toolbar{
|
|
7114
|
+
} }, styles: ["@layer kpt.components{.kpt-toolbar{--%NS%_kpt-toolbar-height: var(--%NS%kpt-toolbar-height, 3.5rem);--%NS%_kpt-toolbar-padding-inline: var(--%NS%kpt-space-4, 1rem);--%NS%_kpt-toolbar-gap: var(--%NS%kpt-space-3, .75rem);display:flex;align-items:center;gap:var(--%NS%_kpt-toolbar-gap);min-height:var(--%NS%_kpt-toolbar-height);padding-inline:var(--%NS%_kpt-toolbar-padding-inline);background:var(--%NS%kpt-toolbar-bg);color:var(--%NS%kpt-toolbar-fg);border-bottom:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-toolbar-border);min-inline-size:0}.kpt-toolbar--elevated{box-shadow:var(--%NS%kpt-elevation-1)}.kpt-toolbar [kptToolbarSpacer]{flex:1 1 auto;min-inline-size:0}.kpt-toolbar[data-wrap]{flex-wrap:wrap;row-gap:var(--%NS%kpt-space-2, .5rem);padding-block:var(--%NS%kpt-space-2, .5rem)}@media(max-width:639.98px){.kpt-toolbar{--%NS%_kpt-toolbar-height: var(--%NS%kpt-toolbar-height-compact, 3rem);--%NS%_kpt-toolbar-padding-inline: var(--%NS%kpt-space-3, .75rem);--%NS%_kpt-toolbar-gap: var(--%NS%kpt-space-2, .5rem)}}}\n"], encapsulation: 2 }); }
|
|
6853
7115
|
}
|
|
6854
7116
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptToolbar, [{
|
|
6855
7117
|
type: Component,
|
|
6856
7118
|
args: [{ selector: 'kpt-toolbar', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: '<ng-content />', host: {
|
|
6857
7119
|
class: 'kpt-toolbar',
|
|
6858
7120
|
'[class.kpt-toolbar--elevated]': 'elevated()',
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
7121
|
+
'[attr.data-wrap]': "wrap() ? '' : null",
|
|
7122
|
+
}, styles: ["@layer kpt.components{.kpt-toolbar{--_kpt-toolbar-height: var(--kpt-toolbar-height, 3.5rem);--_kpt-toolbar-padding-inline: var(--kpt-space-4, 1rem);--_kpt-toolbar-gap: var(--kpt-space-3, .75rem);display:flex;align-items:center;gap:var(--_kpt-toolbar-gap);min-height:var(--_kpt-toolbar-height);padding-inline:var(--_kpt-toolbar-padding-inline);background:var(--kpt-toolbar-bg);color:var(--kpt-toolbar-fg);border-bottom:var(--kpt-border-width-thin, 1px) solid var(--kpt-toolbar-border);min-inline-size:0}.kpt-toolbar--elevated{box-shadow:var(--kpt-elevation-1)}.kpt-toolbar [kptToolbarSpacer]{flex:1 1 auto;min-inline-size:0}.kpt-toolbar[data-wrap]{flex-wrap:wrap;row-gap:var(--kpt-space-2, .5rem);padding-block:var(--kpt-space-2, .5rem)}@media(max-width:639.98px){.kpt-toolbar{--_kpt-toolbar-height: var(--kpt-toolbar-height-compact, 3rem);--_kpt-toolbar-padding-inline: var(--kpt-space-3, .75rem);--_kpt-toolbar-gap: var(--kpt-space-2, .5rem)}}}\n"] }]
|
|
7123
|
+
}], null, { elevated: [{ type: i0.Input, args: [{ isSignal: true, alias: "elevated", required: false }] }], wrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrap", required: false }] }] }); })();
|
|
7124
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptToolbar, { className: "KptToolbar", filePath: "lib/toolbar/toolbar.component.ts", lineNumber: 27 }); })();
|
|
6862
7125
|
|
|
6863
7126
|
const _c0$p = ["*"];
|
|
6864
7127
|
/**
|
|
@@ -6886,65 +7149,208 @@ class KptSidenav {
|
|
|
6886
7149
|
|
|
6887
7150
|
const _c0$o = [[["", "kptShellToolbar", ""]], [["", "kptShellSidenav", ""]], "*"];
|
|
6888
7151
|
const _c1$8 = ["[kptShellToolbar]", "[kptShellSidenav]", "*"];
|
|
6889
|
-
function KptAppShell_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
6890
|
-
const _r1 = i0.ɵɵgetCurrentView();
|
|
6891
|
-
i0.ɵɵdomElementStart(0, "div", 4);
|
|
6892
|
-
i0.ɵɵdomListener("click", function KptAppShell_Conditional_4_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onScrimClick()); });
|
|
6893
|
-
i0.ɵɵdomElementEnd();
|
|
6894
|
-
} }
|
|
6895
7152
|
/**
|
|
6896
|
-
* Szkielet aplikacji
|
|
6897
|
-
*
|
|
7153
|
+
* Szkielet aplikacji: pasek u góry, panel boczny i treść. Sloty projekcji:
|
|
7154
|
+
* `[kptShellToolbar]`, `[kptShellSidenav]` oraz treść domyślna.
|
|
7155
|
+
*
|
|
7156
|
+
* Domyślny tryb `auto` jest responsywny bez konfiguracji: od `sidenavBreakpoint` w górę
|
|
7157
|
+
* panel jest zadokowany, poniżej zachowuje się jak nakładka ze scrimem i startuje zamknięty.
|
|
7158
|
+
* Opcjonalny `sidenavRailBreakpoint` wstawia między te pasma szynę ikon.
|
|
7159
|
+
*
|
|
7160
|
+
* O układzie decyduje wyłącznie CSS — nic nie migocze przed hydracją i nic nie zależy od
|
|
7161
|
+
* `matchMedia`. JavaScript odpowiada tylko za to, KTÓRY stan przełącza przycisk.
|
|
7162
|
+
*
|
|
7163
|
+
* Panel ma dwa niezależne stany otwarcia (`sidenavOpen` dla układu zadokowanego,
|
|
7164
|
+
* `sidenavCompactOpen` dla nakładki), więc intencja z desktopu przeżywa zwężenie
|
|
7165
|
+
* i ponowne rozszerzenie okna.
|
|
6898
7166
|
*
|
|
6899
7167
|
* @example
|
|
6900
|
-
* <kpt-app-shell [(sidenavOpen)]="navOpen"
|
|
6901
|
-
* <kpt-toolbar kptShellToolbar
|
|
7168
|
+
* <kpt-app-shell [(sidenavOpen)]="navOpen">
|
|
7169
|
+
* <kpt-toolbar kptShellToolbar>
|
|
7170
|
+
* <button kptShellNavToggle type="button"><kpt-icon name="menu" /></button>
|
|
7171
|
+
* </kpt-toolbar>
|
|
6902
7172
|
* <kpt-sidenav kptShellSidenav>…</kpt-sidenav>
|
|
6903
7173
|
* <router-outlet />
|
|
6904
7174
|
* </kpt-app-shell>
|
|
6905
7175
|
*/
|
|
6906
7176
|
class KptAppShell {
|
|
7177
|
+
static { this.nextId = 0; }
|
|
6907
7178
|
constructor() {
|
|
6908
|
-
|
|
7179
|
+
this.breakpoints = inject(KptBreakpointObserver);
|
|
7180
|
+
this.i18n = inject(KptI18n);
|
|
7181
|
+
/** Czy panel jest otwarty w układzie zadokowanym (oraz w wymuszonym trybie `over`). */
|
|
6909
7182
|
this.sidenavOpen = model(true, /* @ts-ignore */
|
|
6910
7183
|
...(ngDevMode ? [{ debugName: "sidenavOpen" }] : /* istanbul ignore next */ []));
|
|
6911
|
-
/**
|
|
6912
|
-
|
|
7184
|
+
/**
|
|
7185
|
+
* Czy nakładka jest wysunięta w trybie `auto` poniżej `sidenavBreakpoint`.
|
|
7186
|
+
*
|
|
7187
|
+
* Celowo osobny od `sidenavOpen`: gdyby oba układy dzieliły jeden model, wejście na wąski
|
|
7188
|
+
* ekran musiałoby nadpisać stan konsumenta, a powrót na szeroki nie miałby czego przywrócić.
|
|
7189
|
+
*/
|
|
7190
|
+
this.sidenavCompactOpen = model(false, /* @ts-ignore */
|
|
7191
|
+
...(ngDevMode ? [{ debugName: "sidenavCompactOpen" }] : /* istanbul ignore next */ []));
|
|
7192
|
+
/** `auto` przełącza układ na breakpoincie; `side`/`over` wymuszają go niezależnie od szerokości. */
|
|
7193
|
+
this.sidenavMode = input('auto', /* @ts-ignore */
|
|
6913
7194
|
...(ngDevMode ? [{ debugName: "sidenavMode" }] : /* istanbul ignore next */ []));
|
|
7195
|
+
/** Od tego breakpointa w górę tryb `auto` dokuje panel; poniżej robi z niego nakładkę. */
|
|
7196
|
+
this.sidenavBreakpoint = input('lg', /* @ts-ignore */
|
|
7197
|
+
...(ngDevMode ? [{ debugName: "sidenavBreakpoint" }] : /* istanbul ignore next */ []));
|
|
7198
|
+
/**
|
|
7199
|
+
* Włącza szynę ikon w paśmie od `sidenavBreakpoint` do tego breakpointa: zamknięty panel
|
|
7200
|
+
* nie chowa się wtedy całkowicie, tylko zwęża do `--kpt-sidenav-rail-width`. Powyżej tego
|
|
7201
|
+
* progu zamknięcie znów chowa panel w całości. Wartość musi być wyższa niż `sidenavBreakpoint`.
|
|
7202
|
+
* `null` (domyślnie) wyłącza szynę.
|
|
7203
|
+
*/
|
|
7204
|
+
this.sidenavRailBreakpoint = input(null, /* @ts-ignore */
|
|
7205
|
+
...(ngDevMode ? [{ debugName: "sidenavRailBreakpoint" }] : /* istanbul ignore next */ []));
|
|
7206
|
+
/** Etykieta dostępności panelu; puste = `appShell.navigation` ze słownika. */
|
|
7207
|
+
this.sidenavLabel = input('', /* @ts-ignore */
|
|
7208
|
+
...(ngDevMode ? [{ debugName: "sidenavLabel" }] : /* istanbul ignore next */ []));
|
|
7209
|
+
/** Identyfikator panelu dla `aria-controls` przycisku przełączającego. */
|
|
7210
|
+
this.sidenavId = `kpt-app-shell-nav-${KptAppShell.nextId++}`;
|
|
7211
|
+
/** Czy panel zachowuje się TERAZ jak nakładka nad treścią. */
|
|
7212
|
+
this.isOverlay = computed(() => {
|
|
7213
|
+
const mode = this.sidenavMode();
|
|
7214
|
+
if (mode === 'over')
|
|
7215
|
+
return true;
|
|
7216
|
+
if (mode === 'side')
|
|
7217
|
+
return false;
|
|
7218
|
+
return !this.breakpoints.up(this.sidenavBreakpoint())();
|
|
7219
|
+
}, /* @ts-ignore */
|
|
7220
|
+
...(ngDevMode ? [{ debugName: "isOverlay" }] : /* istanbul ignore next */ []));
|
|
7221
|
+
/** Efektywny stan otwarcia — ten, który obowiązuje w bieżącym układzie. */
|
|
7222
|
+
this.isSidenavOpen = computed(() => this.usesCompactState() ? this.sidenavCompactOpen() : this.sidenavOpen(), /* @ts-ignore */
|
|
7223
|
+
...(ngDevMode ? [{ debugName: "isSidenavOpen" }] : /* istanbul ignore next */ []));
|
|
7224
|
+
this.navLabel = computed(() => this.sidenavLabel() || this.i18n.t('appShell.navigation'), /* @ts-ignore */
|
|
7225
|
+
...(ngDevMode ? [{ debugName: "navLabel" }] : /* istanbul ignore next */ []));
|
|
7226
|
+
/** Scrim blokuje wskaźnik, ale nie klawiaturę — treść pod nakładką nie może łapać fokusu. */
|
|
7227
|
+
this.contentInert = computed(() => this.isOverlay() && this.isSidenavOpen(), /* @ts-ignore */
|
|
7228
|
+
...(ngDevMode ? [{ debugName: "contentInert" }] : /* istanbul ignore next */ []));
|
|
7229
|
+
// Wyjście z nakładki chowa ją na wejściu: inaczej wróciłaby otwarta przy kolejnym
|
|
7230
|
+
// zwężeniu okna, mimo że użytkownik jej wtedy nie otwierał.
|
|
7231
|
+
effect(() => {
|
|
7232
|
+
if (!this.isOverlay())
|
|
7233
|
+
this.sidenavCompactOpen.set(false);
|
|
7234
|
+
});
|
|
7235
|
+
}
|
|
7236
|
+
/** Przełącza panel — trafia w stan właściwy dla bieżącego układu. */
|
|
7237
|
+
toggleSidenav() {
|
|
7238
|
+
this.setSidenavOpen(!this.isSidenavOpen());
|
|
7239
|
+
}
|
|
7240
|
+
/** Otwiera panel w bieżącym układzie. */
|
|
7241
|
+
openSidenav() {
|
|
7242
|
+
this.setSidenavOpen(true);
|
|
7243
|
+
}
|
|
7244
|
+
/** Zamyka panel w bieżącym układzie. */
|
|
7245
|
+
closeSidenav() {
|
|
7246
|
+
this.setSidenavOpen(false);
|
|
6914
7247
|
}
|
|
6915
7248
|
onScrimClick() {
|
|
6916
|
-
|
|
6917
|
-
|
|
6918
|
-
|
|
7249
|
+
// Scrim jest klikalny tylko wtedy, gdy CSS uczynił go widocznym — nie trzeba sprawdzać trybu.
|
|
7250
|
+
this.closeSidenav();
|
|
7251
|
+
}
|
|
7252
|
+
onEscape() {
|
|
7253
|
+
if (this.isOverlay() && this.isSidenavOpen())
|
|
7254
|
+
this.closeSidenav();
|
|
7255
|
+
}
|
|
7256
|
+
usesCompactState() {
|
|
7257
|
+
return this.sidenavMode() === 'auto' && this.isOverlay();
|
|
7258
|
+
}
|
|
7259
|
+
setSidenavOpen(open) {
|
|
7260
|
+
if (this.usesCompactState())
|
|
7261
|
+
this.sidenavCompactOpen.set(open);
|
|
7262
|
+
else
|
|
7263
|
+
this.sidenavOpen.set(open);
|
|
6919
7264
|
}
|
|
6920
7265
|
static { this.ɵfac = function KptAppShell_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptAppShell)(); }; }
|
|
6921
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptAppShell, selectors: [["kpt-app-shell"]], hostAttrs: [1, "kpt-app-shell"], hostVars:
|
|
6922
|
-
i0.ɵɵ
|
|
6923
|
-
|
|
6924
|
-
|
|
7266
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptAppShell, selectors: [["kpt-app-shell"]], hostAttrs: [1, "kpt-app-shell"], hostVars: 7, hostBindings: function KptAppShell_HostBindings(rf, ctx) { if (rf & 1) {
|
|
7267
|
+
i0.ɵɵlistener("keydown.escape", function KptAppShell_keydown_escape_HostBindingHandler() { return ctx.onEscape(); }, i0.ɵɵresolveDocument);
|
|
7268
|
+
} if (rf & 2) {
|
|
7269
|
+
i0.ɵɵattribute("data-sidenav-mode", ctx.sidenavMode())("data-sidenav-breakpoint", ctx.sidenavBreakpoint())("data-sidenav-rail", ctx.sidenavRailBreakpoint());
|
|
7270
|
+
i0.ɵɵclassProp("kpt-app-shell--nav-open", ctx.sidenavOpen())("kpt-app-shell--nav-compact-open", ctx.sidenavCompactOpen());
|
|
7271
|
+
} }, inputs: { sidenavOpen: [1, "sidenavOpen"], sidenavCompactOpen: [1, "sidenavCompactOpen"], sidenavMode: [1, "sidenavMode"], sidenavBreakpoint: [1, "sidenavBreakpoint"], sidenavRailBreakpoint: [1, "sidenavRailBreakpoint"], sidenavLabel: [1, "sidenavLabel"] }, outputs: { sidenavOpen: "sidenavOpenChange", sidenavCompactOpen: "sidenavCompactOpenChange" }, ngContentSelectors: _c1$8, decls: 7, vars: 3, consts: [[1, "kpt-app-shell__body"], ["role", "navigation", "tabindex", "-1", 1, "kpt-app-shell__sidenav", 3, "id"], ["aria-hidden", "true", 1, "kpt-app-shell__scrim", 3, "click"], [1, "kpt-app-shell__content"]], template: function KptAppShell_Template(rf, ctx) { if (rf & 1) {
|
|
6925
7272
|
i0.ɵɵprojectionDef(_c0$o);
|
|
6926
7273
|
i0.ɵɵprojection(0);
|
|
6927
7274
|
i0.ɵɵdomElementStart(1, "div", 0)(2, "aside", 1);
|
|
6928
7275
|
i0.ɵɵprojection(3, 1);
|
|
6929
7276
|
i0.ɵɵdomElementEnd();
|
|
6930
|
-
i0.ɵɵ
|
|
7277
|
+
i0.ɵɵdomElementStart(4, "div", 2);
|
|
7278
|
+
i0.ɵɵdomListener("click", function KptAppShell_Template_div_click_4_listener() { return ctx.onScrimClick(); });
|
|
7279
|
+
i0.ɵɵdomElementEnd();
|
|
6931
7280
|
i0.ɵɵdomElementStart(5, "main", 3);
|
|
6932
7281
|
i0.ɵɵprojection(6, 2);
|
|
6933
7282
|
i0.ɵɵdomElementEnd()();
|
|
6934
7283
|
} if (rf & 2) {
|
|
6935
|
-
i0.ɵɵadvance(
|
|
6936
|
-
i0.ɵɵ
|
|
6937
|
-
|
|
7284
|
+
i0.ɵɵadvance(2);
|
|
7285
|
+
i0.ɵɵdomProperty("id", ctx.sidenavId);
|
|
7286
|
+
i0.ɵɵattribute("aria-label", ctx.navLabel());
|
|
7287
|
+
i0.ɵɵadvance(3);
|
|
7288
|
+
i0.ɵɵattribute("inert", ctx.contentInert() ? "" : null);
|
|
7289
|
+
} }, styles: ["@layer kpt.components{.kpt-app-shell{--%NS%_kpt-shell-sidenav-width: var(--%NS%kpt-sidenav-width, 16rem);--%NS%_kpt-shell-z: var(--%NS%kpt-z-overlay, 1100);--%NS%_kpt-shell-duration: var(--%NS%kpt-motion-duration-base, .2s);--%NS%_kpt-shell-easing: var(--%NS%kpt-motion-easing-standard);--%NS%_kpt-shell-out: -100%;display:flex;flex-direction:column;block-size:100vh;block-size:100dvh}.kpt-app-shell__body{position:relative;flex:1;display:flex;min-block-size:0}.kpt-app-shell__sidenav{inline-size:var(--%NS%_kpt-shell-sidenav-width);flex-shrink:0;min-block-size:0;overflow-y:auto;overscroll-behavior:contain;transition:margin-inline-start var(--%NS%_kpt-shell-duration) var(--%NS%_kpt-shell-easing),inline-size var(--%NS%_kpt-shell-duration) var(--%NS%_kpt-shell-easing),translate var(--%NS%_kpt-shell-duration) var(--%NS%_kpt-shell-easing),visibility 0s linear var(--%NS%_kpt-shell-vis-delay, 0s)}.kpt-app-shell__content{flex:1;min-inline-size:0;overflow:auto}.kpt-app-shell__scrim{position:absolute;inset:0;background:var(--%NS%kpt-color-overlay-scrim);z-index:calc(var(--%NS%_kpt-shell-z) - 1);opacity:0;visibility:hidden;--%NS%_kpt-shell-vis-delay: var(--%NS%_kpt-shell-duration);transition:opacity var(--%NS%_kpt-shell-duration) var(--%NS%_kpt-shell-easing),visibility 0s linear var(--%NS%_kpt-shell-vis-delay, 0s)}.kpt-app-shell__sidenav [kptNavLabel],.kpt-app-shell__sidenav [kptNavSection]{position:var(--%NS%_kpt-shell-label-position, static);inline-size:var(--%NS%_kpt-shell-label-size, auto);block-size:var(--%NS%_kpt-shell-label-size, auto);overflow:var(--%NS%_kpt-shell-label-overflow, visible);clip-path:var(--%NS%_kpt-shell-label-clip, none);white-space:var(--%NS%_kpt-shell-label-wrap, normal)}:where(.kpt-app-shell__sidenav) :where(a,button){text-align:var(--%NS%_kpt-shell-item-align, start)}[dir=rtl] .kpt-app-shell,.kpt-app-shell[dir=rtl]{--%NS%_kpt-shell-out: 100%}.kpt-app-shell[data-sidenav-mode=side]{--%NS%_kpt-shell-sidenav-width: var(--%NS%kpt-sidenav-width, 16rem);--%NS%_kpt-shell-label-position: static;--%NS%_kpt-shell-label-size: auto;--%NS%_kpt-shell-label-overflow: visible;--%NS%_kpt-shell-label-clip: none;--%NS%_kpt-shell-label-wrap: normal;--%NS%_kpt-shell-item-align: start}.kpt-app-shell[data-sidenav-mode=side] .kpt-app-shell__sidenav{position:static;inset-block:auto;inset-inline-start:auto;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:auto;box-shadow:none;--%NS%_kpt-shell-vis-delay: 0s}.kpt-app-shell[data-sidenav-mode=side]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:calc(-1 * var(--%NS%_kpt-shell-sidenav-width));visibility:hidden;--%NS%_kpt-shell-vis-delay: var(--%NS%_kpt-shell-duration)}.kpt-app-shell[data-sidenav-mode=side] .kpt-app-shell__scrim{display:none}.kpt-app-shell[data-sidenav-mode=over]{--%NS%_kpt-shell-sidenav-width: min(var(--%NS%kpt-sidenav-width, 16rem), 85vw);--%NS%_kpt-shell-label-position: static;--%NS%_kpt-shell-label-size: auto;--%NS%_kpt-shell-label-overflow: visible;--%NS%_kpt-shell-label-clip: none;--%NS%_kpt-shell-label-wrap: normal;--%NS%_kpt-shell-item-align: start}.kpt-app-shell[data-sidenav-mode=over] .kpt-app-shell__sidenav{position:absolute;inset-block:0;inset-inline-start:0;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:var(--%NS%_kpt-shell-z);box-shadow:var(--%NS%kpt-elevation-3);--%NS%_kpt-shell-vis-delay: 0s}.kpt-app-shell[data-sidenav-mode=over]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{translate:var(--%NS%_kpt-shell-out) 0;visibility:hidden;--%NS%_kpt-shell-vis-delay: var(--%NS%_kpt-shell-duration)}.kpt-app-shell[data-sidenav-mode=over] .kpt-app-shell__scrim{display:block}.kpt-app-shell[data-sidenav-mode=over].kpt-app-shell--nav-open .kpt-app-shell__scrim{opacity:1;visibility:visible;--%NS%_kpt-shell-vis-delay: 0s}.kpt-app-shell[data-sidenav-mode=auto]{--%NS%_kpt-shell-sidenav-width: min(var(--%NS%kpt-sidenav-width, 16rem), 85vw);--%NS%_kpt-shell-label-position: static;--%NS%_kpt-shell-label-size: auto;--%NS%_kpt-shell-label-overflow: visible;--%NS%_kpt-shell-label-clip: none;--%NS%_kpt-shell-label-wrap: normal;--%NS%_kpt-shell-item-align: start}.kpt-app-shell[data-sidenav-mode=auto] .kpt-app-shell__sidenav{position:absolute;inset-block:0;inset-inline-start:0;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:var(--%NS%_kpt-shell-z);box-shadow:var(--%NS%kpt-elevation-3);--%NS%_kpt-shell-vis-delay: 0s}.kpt-app-shell[data-sidenav-mode=auto]:not(.kpt-app-shell--nav-compact-open) .kpt-app-shell__sidenav{translate:var(--%NS%_kpt-shell-out) 0;visibility:hidden;--%NS%_kpt-shell-vis-delay: var(--%NS%_kpt-shell-duration)}.kpt-app-shell[data-sidenav-mode=auto] .kpt-app-shell__scrim{display:block}.kpt-app-shell[data-sidenav-mode=auto].kpt-app-shell--nav-compact-open .kpt-app-shell__scrim{opacity:1;visibility:visible;--%NS%_kpt-shell-vis-delay: 0s}@media(min-width:640px){.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=sm]{--%NS%_kpt-shell-sidenav-width: var(--%NS%kpt-sidenav-width, 16rem);--%NS%_kpt-shell-label-position: static;--%NS%_kpt-shell-label-size: auto;--%NS%_kpt-shell-label-overflow: visible;--%NS%_kpt-shell-label-clip: none;--%NS%_kpt-shell-label-wrap: normal;--%NS%_kpt-shell-item-align: start}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=sm] .kpt-app-shell__sidenav{position:static;inset-block:auto;inset-inline-start:auto;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:auto;box-shadow:none;--%NS%_kpt-shell-vis-delay: 0s}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=sm]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:calc(-1 * var(--%NS%_kpt-shell-sidenav-width));visibility:hidden;--%NS%_kpt-shell-vis-delay: var(--%NS%_kpt-shell-duration)}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=sm] .kpt-app-shell__scrim{display:none}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=sm][data-sidenav-rail]:not(.kpt-app-shell--nav-open){--%NS%_kpt-shell-sidenav-width: var(--%NS%kpt-sidenav-rail-width, 4rem);--%NS%_kpt-shell-label-position: absolute;--%NS%_kpt-shell-label-size: 1px;--%NS%_kpt-shell-label-overflow: hidden;--%NS%_kpt-shell-label-clip: inset(50%);--%NS%_kpt-shell-label-wrap: nowrap;--%NS%_kpt-shell-item-align: center}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=sm][data-sidenav-rail]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:0;visibility:visible;overflow-x:hidden;--%NS%_kpt-shell-vis-delay: 0s}}@media(min-width:768px){.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=md]{--%NS%_kpt-shell-sidenav-width: var(--%NS%kpt-sidenav-width, 16rem);--%NS%_kpt-shell-label-position: static;--%NS%_kpt-shell-label-size: auto;--%NS%_kpt-shell-label-overflow: visible;--%NS%_kpt-shell-label-clip: none;--%NS%_kpt-shell-label-wrap: normal;--%NS%_kpt-shell-item-align: start}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=md] .kpt-app-shell__sidenav{position:static;inset-block:auto;inset-inline-start:auto;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:auto;box-shadow:none;--%NS%_kpt-shell-vis-delay: 0s}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=md]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:calc(-1 * var(--%NS%_kpt-shell-sidenav-width));visibility:hidden;--%NS%_kpt-shell-vis-delay: var(--%NS%_kpt-shell-duration)}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=md] .kpt-app-shell__scrim{display:none}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=md][data-sidenav-rail]:not(.kpt-app-shell--nav-open){--%NS%_kpt-shell-sidenav-width: var(--%NS%kpt-sidenav-rail-width, 4rem);--%NS%_kpt-shell-label-position: absolute;--%NS%_kpt-shell-label-size: 1px;--%NS%_kpt-shell-label-overflow: hidden;--%NS%_kpt-shell-label-clip: inset(50%);--%NS%_kpt-shell-label-wrap: nowrap;--%NS%_kpt-shell-item-align: center}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=md][data-sidenav-rail]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:0;visibility:visible;overflow-x:hidden;--%NS%_kpt-shell-vis-delay: 0s}}@media(min-width:1024px){.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=lg]{--%NS%_kpt-shell-sidenav-width: var(--%NS%kpt-sidenav-width, 16rem);--%NS%_kpt-shell-label-position: static;--%NS%_kpt-shell-label-size: auto;--%NS%_kpt-shell-label-overflow: visible;--%NS%_kpt-shell-label-clip: none;--%NS%_kpt-shell-label-wrap: normal;--%NS%_kpt-shell-item-align: start}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=lg] .kpt-app-shell__sidenav{position:static;inset-block:auto;inset-inline-start:auto;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:auto;box-shadow:none;--%NS%_kpt-shell-vis-delay: 0s}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=lg]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:calc(-1 * var(--%NS%_kpt-shell-sidenav-width));visibility:hidden;--%NS%_kpt-shell-vis-delay: var(--%NS%_kpt-shell-duration)}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=lg] .kpt-app-shell__scrim{display:none}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=lg][data-sidenav-rail]:not(.kpt-app-shell--nav-open){--%NS%_kpt-shell-sidenav-width: var(--%NS%kpt-sidenav-rail-width, 4rem);--%NS%_kpt-shell-label-position: absolute;--%NS%_kpt-shell-label-size: 1px;--%NS%_kpt-shell-label-overflow: hidden;--%NS%_kpt-shell-label-clip: inset(50%);--%NS%_kpt-shell-label-wrap: nowrap;--%NS%_kpt-shell-item-align: center}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=lg][data-sidenav-rail]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:0;visibility:visible;overflow-x:hidden;--%NS%_kpt-shell-vis-delay: 0s}}@media(min-width:1280px){.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=xl]{--%NS%_kpt-shell-sidenav-width: var(--%NS%kpt-sidenav-width, 16rem);--%NS%_kpt-shell-label-position: static;--%NS%_kpt-shell-label-size: auto;--%NS%_kpt-shell-label-overflow: visible;--%NS%_kpt-shell-label-clip: none;--%NS%_kpt-shell-label-wrap: normal;--%NS%_kpt-shell-item-align: start}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=xl] .kpt-app-shell__sidenav{position:static;inset-block:auto;inset-inline-start:auto;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:auto;box-shadow:none;--%NS%_kpt-shell-vis-delay: 0s}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=xl]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:calc(-1 * var(--%NS%_kpt-shell-sidenav-width));visibility:hidden;--%NS%_kpt-shell-vis-delay: var(--%NS%_kpt-shell-duration)}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=xl] .kpt-app-shell__scrim{display:none}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=xl][data-sidenav-rail]:not(.kpt-app-shell--nav-open){--%NS%_kpt-shell-sidenav-width: var(--%NS%kpt-sidenav-rail-width, 4rem);--%NS%_kpt-shell-label-position: absolute;--%NS%_kpt-shell-label-size: 1px;--%NS%_kpt-shell-label-overflow: hidden;--%NS%_kpt-shell-label-clip: inset(50%);--%NS%_kpt-shell-label-wrap: nowrap;--%NS%_kpt-shell-item-align: center}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=xl][data-sidenav-rail]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:0;visibility:visible;overflow-x:hidden;--%NS%_kpt-shell-vis-delay: 0s}}@media(min-width:1536px){.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=\"2xl\"]{--%NS%_kpt-shell-sidenav-width: var(--%NS%kpt-sidenav-width, 16rem);--%NS%_kpt-shell-label-position: static;--%NS%_kpt-shell-label-size: auto;--%NS%_kpt-shell-label-overflow: visible;--%NS%_kpt-shell-label-clip: none;--%NS%_kpt-shell-label-wrap: normal;--%NS%_kpt-shell-item-align: start}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=\"2xl\"] .kpt-app-shell__sidenav{position:static;inset-block:auto;inset-inline-start:auto;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:auto;box-shadow:none;--%NS%_kpt-shell-vis-delay: 0s}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=\"2xl\"]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:calc(-1 * var(--%NS%_kpt-shell-sidenav-width));visibility:hidden;--%NS%_kpt-shell-vis-delay: var(--%NS%_kpt-shell-duration)}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=\"2xl\"] .kpt-app-shell__scrim{display:none}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=\"2xl\"][data-sidenav-rail]:not(.kpt-app-shell--nav-open){--%NS%_kpt-shell-sidenav-width: var(--%NS%kpt-sidenav-rail-width, 4rem);--%NS%_kpt-shell-label-position: absolute;--%NS%_kpt-shell-label-size: 1px;--%NS%_kpt-shell-label-overflow: hidden;--%NS%_kpt-shell-label-clip: inset(50%);--%NS%_kpt-shell-label-wrap: nowrap;--%NS%_kpt-shell-item-align: center}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=\"2xl\"][data-sidenav-rail]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:0;visibility:visible;overflow-x:hidden;--%NS%_kpt-shell-vis-delay: 0s}}@media(min-width:640px){.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=sm]{--%NS%_kpt-shell-sidenav-width: var(--%NS%kpt-sidenav-width, 16rem);--%NS%_kpt-shell-label-position: static;--%NS%_kpt-shell-label-size: auto;--%NS%_kpt-shell-label-overflow: visible;--%NS%_kpt-shell-label-clip: none;--%NS%_kpt-shell-label-wrap: normal;--%NS%_kpt-shell-item-align: start}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=sm] .kpt-app-shell__sidenav{position:static;inset-block:auto;inset-inline-start:auto;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:auto;box-shadow:none;--%NS%_kpt-shell-vis-delay: 0s}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=sm]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:calc(-1 * var(--%NS%_kpt-shell-sidenav-width));visibility:hidden;--%NS%_kpt-shell-vis-delay: var(--%NS%_kpt-shell-duration)}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=sm] .kpt-app-shell__scrim{display:none}}@media(min-width:768px){.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=md]{--%NS%_kpt-shell-sidenav-width: var(--%NS%kpt-sidenav-width, 16rem);--%NS%_kpt-shell-label-position: static;--%NS%_kpt-shell-label-size: auto;--%NS%_kpt-shell-label-overflow: visible;--%NS%_kpt-shell-label-clip: none;--%NS%_kpt-shell-label-wrap: normal;--%NS%_kpt-shell-item-align: start}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=md] .kpt-app-shell__sidenav{position:static;inset-block:auto;inset-inline-start:auto;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:auto;box-shadow:none;--%NS%_kpt-shell-vis-delay: 0s}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=md]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:calc(-1 * var(--%NS%_kpt-shell-sidenav-width));visibility:hidden;--%NS%_kpt-shell-vis-delay: var(--%NS%_kpt-shell-duration)}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=md] .kpt-app-shell__scrim{display:none}}@media(min-width:1024px){.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=lg]{--%NS%_kpt-shell-sidenav-width: var(--%NS%kpt-sidenav-width, 16rem);--%NS%_kpt-shell-label-position: static;--%NS%_kpt-shell-label-size: auto;--%NS%_kpt-shell-label-overflow: visible;--%NS%_kpt-shell-label-clip: none;--%NS%_kpt-shell-label-wrap: normal;--%NS%_kpt-shell-item-align: start}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=lg] .kpt-app-shell__sidenav{position:static;inset-block:auto;inset-inline-start:auto;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:auto;box-shadow:none;--%NS%_kpt-shell-vis-delay: 0s}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=lg]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:calc(-1 * var(--%NS%_kpt-shell-sidenav-width));visibility:hidden;--%NS%_kpt-shell-vis-delay: var(--%NS%_kpt-shell-duration)}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=lg] .kpt-app-shell__scrim{display:none}}@media(min-width:1280px){.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=xl]{--%NS%_kpt-shell-sidenav-width: var(--%NS%kpt-sidenav-width, 16rem);--%NS%_kpt-shell-label-position: static;--%NS%_kpt-shell-label-size: auto;--%NS%_kpt-shell-label-overflow: visible;--%NS%_kpt-shell-label-clip: none;--%NS%_kpt-shell-label-wrap: normal;--%NS%_kpt-shell-item-align: start}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=xl] .kpt-app-shell__sidenav{position:static;inset-block:auto;inset-inline-start:auto;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:auto;box-shadow:none;--%NS%_kpt-shell-vis-delay: 0s}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=xl]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:calc(-1 * var(--%NS%_kpt-shell-sidenav-width));visibility:hidden;--%NS%_kpt-shell-vis-delay: var(--%NS%_kpt-shell-duration)}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=xl] .kpt-app-shell__scrim{display:none}}@media(min-width:1536px){.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=\"2xl\"]{--%NS%_kpt-shell-sidenav-width: var(--%NS%kpt-sidenav-width, 16rem);--%NS%_kpt-shell-label-position: static;--%NS%_kpt-shell-label-size: auto;--%NS%_kpt-shell-label-overflow: visible;--%NS%_kpt-shell-label-clip: none;--%NS%_kpt-shell-label-wrap: normal;--%NS%_kpt-shell-item-align: start}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=\"2xl\"] .kpt-app-shell__sidenav{position:static;inset-block:auto;inset-inline-start:auto;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:auto;box-shadow:none;--%NS%_kpt-shell-vis-delay: 0s}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=\"2xl\"]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:calc(-1 * var(--%NS%_kpt-shell-sidenav-width));visibility:hidden;--%NS%_kpt-shell-vis-delay: var(--%NS%_kpt-shell-duration)}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=\"2xl\"] .kpt-app-shell__scrim{display:none}}@media(prefers-reduced-motion:reduce){.kpt-app-shell__sidenav,.kpt-app-shell__scrim{transition:none}}}\n"], encapsulation: 2 }); }
|
|
6938
7290
|
}
|
|
6939
7291
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptAppShell, [{
|
|
6940
7292
|
type: Component,
|
|
6941
7293
|
args: [{ selector: 'kpt-app-shell', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
6942
7294
|
class: 'kpt-app-shell',
|
|
6943
7295
|
'[attr.data-sidenav-mode]': 'sidenavMode()',
|
|
7296
|
+
'[attr.data-sidenav-breakpoint]': 'sidenavBreakpoint()',
|
|
7297
|
+
'[attr.data-sidenav-rail]': 'sidenavRailBreakpoint()',
|
|
6944
7298
|
'[class.kpt-app-shell--nav-open]': 'sidenavOpen()',
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptAppShell, { className: "KptAppShell", filePath: "lib/app-shell/app-shell.component.ts", lineNumber: 28 }); })();
|
|
7299
|
+
'[class.kpt-app-shell--nav-compact-open]': 'sidenavCompactOpen()',
|
|
7300
|
+
'(document:keydown.escape)': 'onEscape()',
|
|
7301
|
+
}, template: "<ng-content select=\"[kptShellToolbar]\" />\n\n<div class=\"kpt-app-shell__body\">\n <aside\n class=\"kpt-app-shell__sidenav\"\n role=\"navigation\"\n tabindex=\"-1\"\n [id]=\"sidenavId\"\n [attr.aria-label]=\"navLabel()\"\n >\n <ng-content select=\"[kptShellSidenav]\" />\n </aside>\n\n <!--\n Scrim jest zawsze w DOM, a jego widoczno\u015Bci\u0105 steruje wy\u0142\u0105cznie CSS. Dzi\u0119ki temu nak\u0142adka\n wygl\u0105da poprawnie ju\u017C na pierwszej klatce \u2014 tak\u017Ce przed hydracj\u0105 i przy wy\u0142\u0105czonym JS.\n -->\n <div class=\"kpt-app-shell__scrim\" aria-hidden=\"true\" (click)=\"onScrimClick()\"></div>\n\n <main class=\"kpt-app-shell__content\" [attr.inert]=\"contentInert() ? '' : null\">\n <ng-content />\n </main>\n</div>\n", styles: ["@layer kpt.components{.kpt-app-shell{--_kpt-shell-sidenav-width: var(--kpt-sidenav-width, 16rem);--_kpt-shell-z: var(--kpt-z-overlay, 1100);--_kpt-shell-duration: var(--kpt-motion-duration-base, .2s);--_kpt-shell-easing: var(--kpt-motion-easing-standard);--_kpt-shell-out: -100%;display:flex;flex-direction:column;block-size:100vh;block-size:100dvh}.kpt-app-shell__body{position:relative;flex:1;display:flex;min-block-size:0}.kpt-app-shell__sidenav{inline-size:var(--_kpt-shell-sidenav-width);flex-shrink:0;min-block-size:0;overflow-y:auto;overscroll-behavior:contain;transition:margin-inline-start var(--_kpt-shell-duration) var(--_kpt-shell-easing),inline-size var(--_kpt-shell-duration) var(--_kpt-shell-easing),translate var(--_kpt-shell-duration) var(--_kpt-shell-easing),visibility 0s linear var(--_kpt-shell-vis-delay, 0s)}.kpt-app-shell__content{flex:1;min-inline-size:0;overflow:auto}.kpt-app-shell__scrim{position:absolute;inset:0;background:var(--kpt-color-overlay-scrim);z-index:calc(var(--_kpt-shell-z) - 1);opacity:0;visibility:hidden;--_kpt-shell-vis-delay: var(--_kpt-shell-duration);transition:opacity var(--_kpt-shell-duration) var(--_kpt-shell-easing),visibility 0s linear var(--_kpt-shell-vis-delay, 0s)}.kpt-app-shell__sidenav [kptNavLabel],.kpt-app-shell__sidenav [kptNavSection]{position:var(--_kpt-shell-label-position, static);inline-size:var(--_kpt-shell-label-size, auto);block-size:var(--_kpt-shell-label-size, auto);overflow:var(--_kpt-shell-label-overflow, visible);clip-path:var(--_kpt-shell-label-clip, none);white-space:var(--_kpt-shell-label-wrap, normal)}:where(.kpt-app-shell__sidenav) :where(a,button){text-align:var(--_kpt-shell-item-align, start)}[dir=rtl] .kpt-app-shell,.kpt-app-shell[dir=rtl]{--_kpt-shell-out: 100%}.kpt-app-shell[data-sidenav-mode=side]{--_kpt-shell-sidenav-width: var(--kpt-sidenav-width, 16rem);--_kpt-shell-label-position: static;--_kpt-shell-label-size: auto;--_kpt-shell-label-overflow: visible;--_kpt-shell-label-clip: none;--_kpt-shell-label-wrap: normal;--_kpt-shell-item-align: start}.kpt-app-shell[data-sidenav-mode=side] .kpt-app-shell__sidenav{position:static;inset-block:auto;inset-inline-start:auto;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:auto;box-shadow:none;--_kpt-shell-vis-delay: 0s}.kpt-app-shell[data-sidenav-mode=side]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:calc(-1 * var(--_kpt-shell-sidenav-width));visibility:hidden;--_kpt-shell-vis-delay: var(--_kpt-shell-duration)}.kpt-app-shell[data-sidenav-mode=side] .kpt-app-shell__scrim{display:none}.kpt-app-shell[data-sidenav-mode=over]{--_kpt-shell-sidenav-width: min(var(--kpt-sidenav-width, 16rem), 85vw);--_kpt-shell-label-position: static;--_kpt-shell-label-size: auto;--_kpt-shell-label-overflow: visible;--_kpt-shell-label-clip: none;--_kpt-shell-label-wrap: normal;--_kpt-shell-item-align: start}.kpt-app-shell[data-sidenav-mode=over] .kpt-app-shell__sidenav{position:absolute;inset-block:0;inset-inline-start:0;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:var(--_kpt-shell-z);box-shadow:var(--kpt-elevation-3);--_kpt-shell-vis-delay: 0s}.kpt-app-shell[data-sidenav-mode=over]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{translate:var(--_kpt-shell-out) 0;visibility:hidden;--_kpt-shell-vis-delay: var(--_kpt-shell-duration)}.kpt-app-shell[data-sidenav-mode=over] .kpt-app-shell__scrim{display:block}.kpt-app-shell[data-sidenav-mode=over].kpt-app-shell--nav-open .kpt-app-shell__scrim{opacity:1;visibility:visible;--_kpt-shell-vis-delay: 0s}.kpt-app-shell[data-sidenav-mode=auto]{--_kpt-shell-sidenav-width: min(var(--kpt-sidenav-width, 16rem), 85vw);--_kpt-shell-label-position: static;--_kpt-shell-label-size: auto;--_kpt-shell-label-overflow: visible;--_kpt-shell-label-clip: none;--_kpt-shell-label-wrap: normal;--_kpt-shell-item-align: start}.kpt-app-shell[data-sidenav-mode=auto] .kpt-app-shell__sidenav{position:absolute;inset-block:0;inset-inline-start:0;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:var(--_kpt-shell-z);box-shadow:var(--kpt-elevation-3);--_kpt-shell-vis-delay: 0s}.kpt-app-shell[data-sidenav-mode=auto]:not(.kpt-app-shell--nav-compact-open) .kpt-app-shell__sidenav{translate:var(--_kpt-shell-out) 0;visibility:hidden;--_kpt-shell-vis-delay: var(--_kpt-shell-duration)}.kpt-app-shell[data-sidenav-mode=auto] .kpt-app-shell__scrim{display:block}.kpt-app-shell[data-sidenav-mode=auto].kpt-app-shell--nav-compact-open .kpt-app-shell__scrim{opacity:1;visibility:visible;--_kpt-shell-vis-delay: 0s}@media(min-width:640px){.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=sm]{--_kpt-shell-sidenav-width: var(--kpt-sidenav-width, 16rem);--_kpt-shell-label-position: static;--_kpt-shell-label-size: auto;--_kpt-shell-label-overflow: visible;--_kpt-shell-label-clip: none;--_kpt-shell-label-wrap: normal;--_kpt-shell-item-align: start}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=sm] .kpt-app-shell__sidenav{position:static;inset-block:auto;inset-inline-start:auto;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:auto;box-shadow:none;--_kpt-shell-vis-delay: 0s}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=sm]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:calc(-1 * var(--_kpt-shell-sidenav-width));visibility:hidden;--_kpt-shell-vis-delay: var(--_kpt-shell-duration)}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=sm] .kpt-app-shell__scrim{display:none}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=sm][data-sidenav-rail]:not(.kpt-app-shell--nav-open){--_kpt-shell-sidenav-width: var(--kpt-sidenav-rail-width, 4rem);--_kpt-shell-label-position: absolute;--_kpt-shell-label-size: 1px;--_kpt-shell-label-overflow: hidden;--_kpt-shell-label-clip: inset(50%);--_kpt-shell-label-wrap: nowrap;--_kpt-shell-item-align: center}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=sm][data-sidenav-rail]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:0;visibility:visible;overflow-x:hidden;--_kpt-shell-vis-delay: 0s}}@media(min-width:768px){.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=md]{--_kpt-shell-sidenav-width: var(--kpt-sidenav-width, 16rem);--_kpt-shell-label-position: static;--_kpt-shell-label-size: auto;--_kpt-shell-label-overflow: visible;--_kpt-shell-label-clip: none;--_kpt-shell-label-wrap: normal;--_kpt-shell-item-align: start}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=md] .kpt-app-shell__sidenav{position:static;inset-block:auto;inset-inline-start:auto;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:auto;box-shadow:none;--_kpt-shell-vis-delay: 0s}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=md]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:calc(-1 * var(--_kpt-shell-sidenav-width));visibility:hidden;--_kpt-shell-vis-delay: var(--_kpt-shell-duration)}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=md] .kpt-app-shell__scrim{display:none}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=md][data-sidenav-rail]:not(.kpt-app-shell--nav-open){--_kpt-shell-sidenav-width: var(--kpt-sidenav-rail-width, 4rem);--_kpt-shell-label-position: absolute;--_kpt-shell-label-size: 1px;--_kpt-shell-label-overflow: hidden;--_kpt-shell-label-clip: inset(50%);--_kpt-shell-label-wrap: nowrap;--_kpt-shell-item-align: center}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=md][data-sidenav-rail]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:0;visibility:visible;overflow-x:hidden;--_kpt-shell-vis-delay: 0s}}@media(min-width:1024px){.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=lg]{--_kpt-shell-sidenav-width: var(--kpt-sidenav-width, 16rem);--_kpt-shell-label-position: static;--_kpt-shell-label-size: auto;--_kpt-shell-label-overflow: visible;--_kpt-shell-label-clip: none;--_kpt-shell-label-wrap: normal;--_kpt-shell-item-align: start}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=lg] .kpt-app-shell__sidenav{position:static;inset-block:auto;inset-inline-start:auto;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:auto;box-shadow:none;--_kpt-shell-vis-delay: 0s}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=lg]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:calc(-1 * var(--_kpt-shell-sidenav-width));visibility:hidden;--_kpt-shell-vis-delay: var(--_kpt-shell-duration)}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=lg] .kpt-app-shell__scrim{display:none}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=lg][data-sidenav-rail]:not(.kpt-app-shell--nav-open){--_kpt-shell-sidenav-width: var(--kpt-sidenav-rail-width, 4rem);--_kpt-shell-label-position: absolute;--_kpt-shell-label-size: 1px;--_kpt-shell-label-overflow: hidden;--_kpt-shell-label-clip: inset(50%);--_kpt-shell-label-wrap: nowrap;--_kpt-shell-item-align: center}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=lg][data-sidenav-rail]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:0;visibility:visible;overflow-x:hidden;--_kpt-shell-vis-delay: 0s}}@media(min-width:1280px){.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=xl]{--_kpt-shell-sidenav-width: var(--kpt-sidenav-width, 16rem);--_kpt-shell-label-position: static;--_kpt-shell-label-size: auto;--_kpt-shell-label-overflow: visible;--_kpt-shell-label-clip: none;--_kpt-shell-label-wrap: normal;--_kpt-shell-item-align: start}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=xl] .kpt-app-shell__sidenav{position:static;inset-block:auto;inset-inline-start:auto;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:auto;box-shadow:none;--_kpt-shell-vis-delay: 0s}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=xl]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:calc(-1 * var(--_kpt-shell-sidenav-width));visibility:hidden;--_kpt-shell-vis-delay: var(--_kpt-shell-duration)}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=xl] .kpt-app-shell__scrim{display:none}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=xl][data-sidenav-rail]:not(.kpt-app-shell--nav-open){--_kpt-shell-sidenav-width: var(--kpt-sidenav-rail-width, 4rem);--_kpt-shell-label-position: absolute;--_kpt-shell-label-size: 1px;--_kpt-shell-label-overflow: hidden;--_kpt-shell-label-clip: inset(50%);--_kpt-shell-label-wrap: nowrap;--_kpt-shell-item-align: center}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=xl][data-sidenav-rail]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:0;visibility:visible;overflow-x:hidden;--_kpt-shell-vis-delay: 0s}}@media(min-width:1536px){.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=\"2xl\"]{--_kpt-shell-sidenav-width: var(--kpt-sidenav-width, 16rem);--_kpt-shell-label-position: static;--_kpt-shell-label-size: auto;--_kpt-shell-label-overflow: visible;--_kpt-shell-label-clip: none;--_kpt-shell-label-wrap: normal;--_kpt-shell-item-align: start}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=\"2xl\"] .kpt-app-shell__sidenav{position:static;inset-block:auto;inset-inline-start:auto;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:auto;box-shadow:none;--_kpt-shell-vis-delay: 0s}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=\"2xl\"]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:calc(-1 * var(--_kpt-shell-sidenav-width));visibility:hidden;--_kpt-shell-vis-delay: var(--_kpt-shell-duration)}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=\"2xl\"] .kpt-app-shell__scrim{display:none}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=\"2xl\"][data-sidenav-rail]:not(.kpt-app-shell--nav-open){--_kpt-shell-sidenav-width: var(--kpt-sidenav-rail-width, 4rem);--_kpt-shell-label-position: absolute;--_kpt-shell-label-size: 1px;--_kpt-shell-label-overflow: hidden;--_kpt-shell-label-clip: inset(50%);--_kpt-shell-label-wrap: nowrap;--_kpt-shell-item-align: center}.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-breakpoint=\"2xl\"][data-sidenav-rail]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:0;visibility:visible;overflow-x:hidden;--_kpt-shell-vis-delay: 0s}}@media(min-width:640px){.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=sm]{--_kpt-shell-sidenav-width: var(--kpt-sidenav-width, 16rem);--_kpt-shell-label-position: static;--_kpt-shell-label-size: auto;--_kpt-shell-label-overflow: visible;--_kpt-shell-label-clip: none;--_kpt-shell-label-wrap: normal;--_kpt-shell-item-align: start}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=sm] .kpt-app-shell__sidenav{position:static;inset-block:auto;inset-inline-start:auto;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:auto;box-shadow:none;--_kpt-shell-vis-delay: 0s}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=sm]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:calc(-1 * var(--_kpt-shell-sidenav-width));visibility:hidden;--_kpt-shell-vis-delay: var(--_kpt-shell-duration)}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=sm] .kpt-app-shell__scrim{display:none}}@media(min-width:768px){.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=md]{--_kpt-shell-sidenav-width: var(--kpt-sidenav-width, 16rem);--_kpt-shell-label-position: static;--_kpt-shell-label-size: auto;--_kpt-shell-label-overflow: visible;--_kpt-shell-label-clip: none;--_kpt-shell-label-wrap: normal;--_kpt-shell-item-align: start}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=md] .kpt-app-shell__sidenav{position:static;inset-block:auto;inset-inline-start:auto;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:auto;box-shadow:none;--_kpt-shell-vis-delay: 0s}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=md]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:calc(-1 * var(--_kpt-shell-sidenav-width));visibility:hidden;--_kpt-shell-vis-delay: var(--_kpt-shell-duration)}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=md] .kpt-app-shell__scrim{display:none}}@media(min-width:1024px){.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=lg]{--_kpt-shell-sidenav-width: var(--kpt-sidenav-width, 16rem);--_kpt-shell-label-position: static;--_kpt-shell-label-size: auto;--_kpt-shell-label-overflow: visible;--_kpt-shell-label-clip: none;--_kpt-shell-label-wrap: normal;--_kpt-shell-item-align: start}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=lg] .kpt-app-shell__sidenav{position:static;inset-block:auto;inset-inline-start:auto;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:auto;box-shadow:none;--_kpt-shell-vis-delay: 0s}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=lg]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:calc(-1 * var(--_kpt-shell-sidenav-width));visibility:hidden;--_kpt-shell-vis-delay: var(--_kpt-shell-duration)}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=lg] .kpt-app-shell__scrim{display:none}}@media(min-width:1280px){.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=xl]{--_kpt-shell-sidenav-width: var(--kpt-sidenav-width, 16rem);--_kpt-shell-label-position: static;--_kpt-shell-label-size: auto;--_kpt-shell-label-overflow: visible;--_kpt-shell-label-clip: none;--_kpt-shell-label-wrap: normal;--_kpt-shell-item-align: start}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=xl] .kpt-app-shell__sidenav{position:static;inset-block:auto;inset-inline-start:auto;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:auto;box-shadow:none;--_kpt-shell-vis-delay: 0s}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=xl]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:calc(-1 * var(--_kpt-shell-sidenav-width));visibility:hidden;--_kpt-shell-vis-delay: var(--_kpt-shell-duration)}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=xl] .kpt-app-shell__scrim{display:none}}@media(min-width:1536px){.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=\"2xl\"]{--_kpt-shell-sidenav-width: var(--kpt-sidenav-width, 16rem);--_kpt-shell-label-position: static;--_kpt-shell-label-size: auto;--_kpt-shell-label-overflow: visible;--_kpt-shell-label-clip: none;--_kpt-shell-label-wrap: normal;--_kpt-shell-item-align: start}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=\"2xl\"] .kpt-app-shell__sidenav{position:static;inset-block:auto;inset-inline-start:auto;margin-inline-start:0;translate:none;visibility:visible;overflow-x:auto;z-index:auto;box-shadow:none;--_kpt-shell-vis-delay: 0s}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=\"2xl\"]:not(.kpt-app-shell--nav-open) .kpt-app-shell__sidenav{margin-inline-start:calc(-1 * var(--_kpt-shell-sidenav-width));visibility:hidden;--_kpt-shell-vis-delay: var(--_kpt-shell-duration)}.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell.kpt-app-shell[data-sidenav-mode=auto][data-sidenav-rail=\"2xl\"] .kpt-app-shell__scrim{display:none}}@media(prefers-reduced-motion:reduce){.kpt-app-shell__sidenav,.kpt-app-shell__scrim{transition:none}}}\n"] }]
|
|
7302
|
+
}], () => [], { sidenavOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidenavOpen", required: false }] }, { type: i0.Output, args: ["sidenavOpenChange"] }], sidenavCompactOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidenavCompactOpen", required: false }] }, { type: i0.Output, args: ["sidenavCompactOpenChange"] }], sidenavMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidenavMode", required: false }] }], sidenavBreakpoint: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidenavBreakpoint", required: false }] }], sidenavRailBreakpoint: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidenavRailBreakpoint", required: false }] }], sidenavLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidenavLabel", required: false }] }] }); })();
|
|
7303
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptAppShell, { className: "KptAppShell", filePath: "lib/app-shell/app-shell.component.ts", lineNumber: 63 }); })();
|
|
7304
|
+
|
|
7305
|
+
/**
|
|
7306
|
+
* Przycisk przełączający panel boczny `kpt-app-shell`. Umieść go w slocie
|
|
7307
|
+
* `[kptShellToolbar]` — dyrektywa sama odnajdzie shell w drzewie deklaracji.
|
|
7308
|
+
*
|
|
7309
|
+
* Trafia w stan właściwy dla bieżącego układu (zadokowany albo nakładka), więc jeden
|
|
7310
|
+
* przycisk obsługuje desktop i wąski ekran. Bez tej dyrektywy aplikacja musiałaby sama
|
|
7311
|
+
* wstrzyknąć `KptBreakpointObserver` i rozstrzygnąć, który z dwóch modeli przełączyć.
|
|
7312
|
+
*
|
|
7313
|
+
* Atrybuty ARIA nakłada wyłącznie na natywny `<button>`/`<a>`. Na komponencie opakowującym
|
|
7314
|
+
* (np. `kpt-icon-button`) trafiłyby na zewnętrzny element bez roli, co jest naruszeniem
|
|
7315
|
+
* `aria-allowed-attr` — tam etykietę podaj samemu komponentowi.
|
|
7316
|
+
*
|
|
7317
|
+
* @example
|
|
7318
|
+
* <button kptShellNavToggle type="button"><kpt-icon name="menu" /></button>
|
|
7319
|
+
* <kpt-icon-button kptShellNavToggle ariaLabel="Menu"><kpt-icon name="menu" /></kpt-icon-button>
|
|
7320
|
+
*/
|
|
7321
|
+
class KptShellNavToggle {
|
|
7322
|
+
constructor() {
|
|
7323
|
+
/** Własna etykieta przycisku; puste = `appShell.toggleNavigation` ze słownika. */
|
|
7324
|
+
this.label = input('', { ...(ngDevMode ? { debugName: "label" } : /* istanbul ignore next */ {}), alias: 'kptShellNavToggle' });
|
|
7325
|
+
this.shell = inject(KptAppShell);
|
|
7326
|
+
this.i18n = inject(KptI18n);
|
|
7327
|
+
this.isNativeControl = /^(?:BUTTON|A)$/.test(inject(ElementRef).nativeElement.tagName);
|
|
7328
|
+
this.ariaExpanded = computed(() => this.isNativeControl ? String(this.shell.isSidenavOpen()) : null, /* @ts-ignore */
|
|
7329
|
+
...(ngDevMode ? [{ debugName: "ariaExpanded" }] : /* istanbul ignore next */ []));
|
|
7330
|
+
this.ariaControls = computed(() => (this.isNativeControl ? this.shell.sidenavId : null), /* @ts-ignore */
|
|
7331
|
+
...(ngDevMode ? [{ debugName: "ariaControls" }] : /* istanbul ignore next */ []));
|
|
7332
|
+
this.ariaLabel = computed(() => this.isNativeControl ? this.label() || this.i18n.t('appShell.toggleNavigation') : null, /* @ts-ignore */
|
|
7333
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
7334
|
+
}
|
|
7335
|
+
static { this.ɵfac = function KptShellNavToggle_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptShellNavToggle)(); }; }
|
|
7336
|
+
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: KptShellNavToggle, selectors: [["", "kptShellNavToggle", ""]], hostVars: 3, hostBindings: function KptShellNavToggle_HostBindings(rf, ctx) { if (rf & 1) {
|
|
7337
|
+
i0.ɵɵlistener("click", function KptShellNavToggle_click_HostBindingHandler() { return ctx.shell.toggleSidenav(); });
|
|
7338
|
+
} if (rf & 2) {
|
|
7339
|
+
i0.ɵɵattribute("aria-expanded", ctx.ariaExpanded())("aria-controls", ctx.ariaControls())("aria-label", ctx.ariaLabel());
|
|
7340
|
+
} }, inputs: { label: [1, "kptShellNavToggle", "label"] } }); }
|
|
7341
|
+
}
|
|
7342
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptShellNavToggle, [{
|
|
7343
|
+
type: Directive,
|
|
7344
|
+
args: [{
|
|
7345
|
+
selector: '[kptShellNavToggle]',
|
|
7346
|
+
host: {
|
|
7347
|
+
'(click)': 'shell.toggleSidenav()',
|
|
7348
|
+
'[attr.aria-expanded]': 'ariaExpanded()',
|
|
7349
|
+
'[attr.aria-controls]': 'ariaControls()',
|
|
7350
|
+
'[attr.aria-label]': 'ariaLabel()',
|
|
7351
|
+
},
|
|
7352
|
+
}]
|
|
7353
|
+
}], null, { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptShellNavToggle", required: false }] }] }); })();
|
|
6948
7354
|
|
|
6949
7355
|
const _c0$n = [[["", "kptPanelActions", ""]], "*"];
|
|
6950
7356
|
const _c1$7 = ["[kptPanelActions]", "*"];
|
|
@@ -10417,15 +10823,47 @@ class KptDialog {
|
|
|
10417
10823
|
this.i18n = inject(KptI18n);
|
|
10418
10824
|
this.dialogRef = viewChild('dlg', /* @ts-ignore */
|
|
10419
10825
|
...(ngDevMode ? [{ debugName: "dialogRef" }] : /* istanbul ignore next */ []));
|
|
10826
|
+
this.overlayContainer = inject(OverlayContainer);
|
|
10827
|
+
/** Miejsce, z którego zabraliśmy kontener overlayów — żeby go tam oddać. */
|
|
10828
|
+
this.overlayHome = null;
|
|
10420
10829
|
effect(() => {
|
|
10421
10830
|
const el = this.dialogRef()?.nativeElement;
|
|
10422
10831
|
if (!el)
|
|
10423
10832
|
return;
|
|
10424
|
-
if (this.open() && !el.open)
|
|
10833
|
+
if (this.open() && !el.open) {
|
|
10425
10834
|
el.showModal();
|
|
10426
|
-
|
|
10835
|
+
this.adoptOverlayContainer(el);
|
|
10836
|
+
}
|
|
10837
|
+
else if (!this.open() && el.open) {
|
|
10427
10838
|
el.close();
|
|
10839
|
+
this.releaseOverlayContainer();
|
|
10840
|
+
}
|
|
10428
10841
|
});
|
|
10842
|
+
// Zamknięcie przez `close`/`cancel` też przechodzi tędy, ale zniszczenie komponentu
|
|
10843
|
+
// z otwartym oknem już nie — kontener musi wrócić na miejsce niezależnie od drogi.
|
|
10844
|
+
inject(DestroyRef).onDestroy(() => this.releaseOverlayContainer());
|
|
10845
|
+
}
|
|
10846
|
+
/**
|
|
10847
|
+
* Przenosi kontener CDK Overlay do wnętrza `<dialog>` na czas, gdy okno jest otwarte.
|
|
10848
|
+
*
|
|
10849
|
+
* `showModal()` wynosi okno do **warstwy szczytowej** przeglądarki, a ta jest ponad
|
|
10850
|
+
* całym drzewem dokumentu — żaden `z-index` tego nie przebije. Kontener overlayów
|
|
10851
|
+
* wisi na `<body>`, więc panele `kpt-select`, `kpt-datepicker`, `kpt-autocomplete`
|
|
10852
|
+
* czy `kpt-menu` otwierałyby się NIEWIDOCZNE, schowane za tłem okna.
|
|
10853
|
+
*/
|
|
10854
|
+
adoptOverlayContainer(dialog) {
|
|
10855
|
+
const container = this.overlayContainer.getContainerElement();
|
|
10856
|
+
if (container.parentElement === dialog)
|
|
10857
|
+
return;
|
|
10858
|
+
this.overlayHome = container.parentElement;
|
|
10859
|
+
dialog.appendChild(container);
|
|
10860
|
+
}
|
|
10861
|
+
releaseOverlayContainer() {
|
|
10862
|
+
if (!this.overlayHome)
|
|
10863
|
+
return;
|
|
10864
|
+
// `getContainerElement()` nie tworzy nowego kontenera — zwraca ten sam, który zabraliśmy.
|
|
10865
|
+
this.overlayHome.appendChild(this.overlayContainer.getContainerElement());
|
|
10866
|
+
this.overlayHome = null;
|
|
10429
10867
|
}
|
|
10430
10868
|
onCancel(event) {
|
|
10431
10869
|
if (!this.dismissible()) {
|
|
@@ -10452,7 +10890,7 @@ class KptDialog {
|
|
|
10452
10890
|
} if (rf & 2) {
|
|
10453
10891
|
i0.ɵɵadvance(2);
|
|
10454
10892
|
i0.ɵɵconditional(ctx.header() ? 2 : -1);
|
|
10455
|
-
} }, dependencies: [KptIcon], styles: ["@layer kpt.components{.kpt-dialog{margin:auto;width:min(32rem,100vw - 2rem);max-height:calc(100vh - 4rem);padding:0;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-lg, .75rem);background:var(--%NS%kpt-color-surface-raised);color:var(--%NS%kpt-color-on-surface);box-shadow:var(--%NS%kpt-elevation-4)}.kpt-dialog::backdrop{background:var(--%NS%kpt-color-overlay-scrim)}.kpt-dialog__header{display:flex;align-items:center;justify-content:space-between;gap:var(--%NS%kpt-space-3, .75rem);padding:var(--%NS%kpt-space-5, 1.25rem) var(--%NS%kpt-space-6, 1.5rem);border-bottom:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border)}.kpt-dialog__title{font-size:var(--%NS%kpt-font-size-lg, 1.125rem);font-weight:var(--%NS%kpt-font-weight-semibold, 600)}.kpt-dialog__close{background:none;border:0;cursor:pointer;color:var(--%NS%kpt-color-on-surface-muted);font-size:1.4rem;line-height:1;padding:0}.kpt-dialog__close:hover{color:var(--%NS%kpt-color-on-surface)}.kpt-dialog__body{padding:var(--%NS%kpt-space-6, 1.5rem);font-size:var(--%NS%kpt-font-size-sm, .875rem);overflow-y:auto}.kpt-dialog [kptDialogFooter]{display:flex;justify-content:flex-end;gap:var(--%NS%kpt-space-3, .75rem);padding:var(--%NS%kpt-space-4, 1rem) var(--%NS%kpt-space-6, 1.5rem);border-top:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border)}}\n"], encapsulation: 2 }); }
|
|
10893
|
+
} }, dependencies: [KptIcon], styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-dialog{margin:auto;width:min(32rem,100vw - 2rem);max-height:calc(100vh - 4rem);padding:0;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-lg, .75rem);background:var(--%NS%kpt-color-surface-raised);color:var(--%NS%kpt-color-on-surface);box-shadow:var(--%NS%kpt-elevation-4)}.kpt-dialog::backdrop{background:var(--%NS%kpt-color-overlay-scrim)}.kpt-dialog[open]{display:flex;flex-direction:column}.kpt-dialog__header{flex:none;display:flex;align-items:center;justify-content:space-between;gap:var(--%NS%kpt-space-3, .75rem);padding:var(--%NS%kpt-space-5, 1.25rem) var(--%NS%kpt-space-6, 1.5rem);border-bottom:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border)}.kpt-dialog__title{font-size:var(--%NS%kpt-font-size-lg, 1.125rem);font-weight:var(--%NS%kpt-font-weight-semibold, 600)}.kpt-dialog__close{background:none;border:0;cursor:pointer;color:var(--%NS%kpt-color-on-surface-muted);font-size:1.4rem;line-height:1;padding:0}.kpt-dialog__close:hover{color:var(--%NS%kpt-color-on-surface)}.kpt-dialog__body{min-height:0;padding:var(--%NS%kpt-space-6, 1.5rem);font-size:var(--%NS%kpt-font-size-sm, .875rem);overflow-y:auto;overscroll-behavior:contain}.kpt-dialog [kptDialogFooter]{flex:none;display:flex;justify-content:flex-end;gap:var(--%NS%kpt-space-3, .75rem);padding:var(--%NS%kpt-space-4, 1rem) var(--%NS%kpt-space-6, 1.5rem);border-top:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border)}}\n"], encapsulation: 2 }); }
|
|
10456
10894
|
}
|
|
10457
10895
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptDialog, [{
|
|
10458
10896
|
type: Component,
|
|
@@ -10469,9 +10907,9 @@ class KptDialog {
|
|
|
10469
10907
|
<div class="kpt-dialog__body"><ng-content /></div>
|
|
10470
10908
|
<ng-content select="[kptDialogFooter]" />
|
|
10471
10909
|
</dialog>
|
|
10472
|
-
`, host: { class: 'kpt-dialog-host' }, styles: ["@layer kpt.components{.kpt-dialog{margin:auto;width:min(32rem,100vw - 2rem);max-height:calc(100vh - 4rem);padding:0;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-lg, .75rem);background:var(--kpt-color-surface-raised);color:var(--kpt-color-on-surface);box-shadow:var(--kpt-elevation-4)}.kpt-dialog::backdrop{background:var(--kpt-color-overlay-scrim)}.kpt-dialog__header{display:flex;align-items:center;justify-content:space-between;gap:var(--kpt-space-3, .75rem);padding:var(--kpt-space-5, 1.25rem) var(--kpt-space-6, 1.5rem);border-bottom:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border)}.kpt-dialog__title{font-size:var(--kpt-font-size-lg, 1.125rem);font-weight:var(--kpt-font-weight-semibold, 600)}.kpt-dialog__close{background:none;border:0;cursor:pointer;color:var(--kpt-color-on-surface-muted);font-size:1.4rem;line-height:1;padding:0}.kpt-dialog__close:hover{color:var(--kpt-color-on-surface)}.kpt-dialog__body{padding:var(--kpt-space-6, 1.5rem);font-size:var(--kpt-font-size-sm, .875rem);overflow-y:auto}.kpt-dialog [kptDialogFooter]{display:flex;justify-content:flex-end;gap:var(--kpt-space-3, .75rem);padding:var(--kpt-space-4, 1rem) var(--kpt-space-6, 1.5rem);border-top:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border)}}\n"] }]
|
|
10910
|
+
`, host: { class: 'kpt-dialog-host' }, styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-dialog{margin:auto;width:min(32rem,100vw - 2rem);max-height:calc(100vh - 4rem);padding:0;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-lg, .75rem);background:var(--kpt-color-surface-raised);color:var(--kpt-color-on-surface);box-shadow:var(--kpt-elevation-4)}.kpt-dialog::backdrop{background:var(--kpt-color-overlay-scrim)}.kpt-dialog[open]{display:flex;flex-direction:column}.kpt-dialog__header{flex:none;display:flex;align-items:center;justify-content:space-between;gap:var(--kpt-space-3, .75rem);padding:var(--kpt-space-5, 1.25rem) var(--kpt-space-6, 1.5rem);border-bottom:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border)}.kpt-dialog__title{font-size:var(--kpt-font-size-lg, 1.125rem);font-weight:var(--kpt-font-weight-semibold, 600)}.kpt-dialog__close{background:none;border:0;cursor:pointer;color:var(--kpt-color-on-surface-muted);font-size:1.4rem;line-height:1;padding:0}.kpt-dialog__close:hover{color:var(--kpt-color-on-surface)}.kpt-dialog__body{min-height:0;padding:var(--kpt-space-6, 1.5rem);font-size:var(--kpt-font-size-sm, .875rem);overflow-y:auto;overscroll-behavior:contain}.kpt-dialog [kptDialogFooter]{flex:none;display:flex;justify-content:flex-end;gap:var(--kpt-space-3, .75rem);padding:var(--kpt-space-4, 1rem) var(--kpt-space-6, 1.5rem);border-top:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border)}}\n"] }]
|
|
10473
10911
|
}], () => [], { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], dialogRef: [{ type: i0.ViewChild, args: ['dlg', { isSignal: true }] }] }); })();
|
|
10474
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDialog, { className: "KptDialog", filePath: "lib/dialog/dialog.component.ts", lineNumber:
|
|
10912
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDialog, { className: "KptDialog", filePath: "lib/dialog/dialog.component.ts", lineNumber: 53 }); })();
|
|
10475
10913
|
|
|
10476
10914
|
/**
|
|
10477
10915
|
* Serwis powiadomień (toastów). Wstrzyknij i wywołuj `show`/`success`/`error`/...;
|
|
@@ -11034,7 +11472,7 @@ class KptDrawer {
|
|
|
11034
11472
|
i0.ɵɵattribute("data-position", ctx.position());
|
|
11035
11473
|
i0.ɵɵadvance();
|
|
11036
11474
|
i0.ɵɵconditional(ctx.header() || ctx.dismissible() ? 2 : -1);
|
|
11037
|
-
} }, dependencies: [KptIcon], styles: ["@layer kpt.components{.kpt-drawer-host{display:contents}.kpt-drawer__backdrop{position:fixed;inset:0;z-index:var(--%NS%kpt-z-overlay,
|
|
11475
|
+
} }, dependencies: [KptIcon], styles: ["@layer kpt.components{.kpt-drawer-host{display:contents}.kpt-drawer__backdrop{position:fixed;inset:0;z-index:var(--%NS%kpt-z-overlay, 1100);background:color-mix(in oklch,black 45%,transparent);opacity:0;visibility:hidden;transition:opacity .2s,visibility .2s}.kpt-drawer__backdrop.is-open{opacity:1;visibility:visible}.kpt-drawer__panel{position:fixed;z-index:calc(var(--%NS%kpt-z-overlay, 1100) + 1);display:flex;flex-direction:column;background:var(--%NS%kpt-color-surface-raised);color:var(--%NS%kpt-color-on-surface);box-shadow:var(--%NS%kpt-elevation-4);transition:transform .25s ease;outline:none}.kpt-drawer__panel[data-position=left]{inset:0 auto 0 0;width:min(20rem,90vw);transform:translate(-100%)}.kpt-drawer__panel[data-position=right]{inset:0 0 0 auto;width:min(20rem,90vw);transform:translate(100%)}.kpt-drawer__panel[data-position=top]{inset:0 0 auto;height:min(16rem,80vh);transform:translateY(-100%)}.kpt-drawer__panel[data-position=bottom]{inset:auto 0 0;height:min(16rem,80vh);transform:translateY(100%)}.kpt-drawer__panel.is-open{transform:none}.kpt-drawer__header{display:flex;align-items:center;justify-content:space-between;padding:var(--%NS%kpt-space-3, .75rem) var(--%NS%kpt-space-4, 1rem);border-bottom:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border)}.kpt-drawer__title{font-weight:var(--%NS%kpt-font-weight-semibold, 600)}.kpt-drawer__close{display:inline-flex;border:0;background:none;padding:0;cursor:pointer;color:var(--%NS%kpt-color-on-surface-muted)}.kpt-drawer__close:hover{color:var(--%NS%kpt-color-on-surface)}.kpt-drawer__body{flex:1;overflow:auto;padding:var(--%NS%kpt-space-4, 1rem)}}\n"], encapsulation: 2 }); }
|
|
11038
11476
|
}
|
|
11039
11477
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptDrawer, [{
|
|
11040
11478
|
type: Component,
|
|
@@ -11059,7 +11497,7 @@ class KptDrawer {
|
|
|
11059
11497
|
}
|
|
11060
11498
|
<div class="kpt-drawer__body"><ng-content /></div>
|
|
11061
11499
|
</aside>
|
|
11062
|
-
`, host: { class: 'kpt-drawer-host' }, styles: ["@layer kpt.components{.kpt-drawer-host{display:contents}.kpt-drawer__backdrop{position:fixed;inset:0;z-index:var(--kpt-z-overlay,
|
|
11500
|
+
`, host: { class: 'kpt-drawer-host' }, styles: ["@layer kpt.components{.kpt-drawer-host{display:contents}.kpt-drawer__backdrop{position:fixed;inset:0;z-index:var(--kpt-z-overlay, 1100);background:color-mix(in oklch,black 45%,transparent);opacity:0;visibility:hidden;transition:opacity .2s,visibility .2s}.kpt-drawer__backdrop.is-open{opacity:1;visibility:visible}.kpt-drawer__panel{position:fixed;z-index:calc(var(--kpt-z-overlay, 1100) + 1);display:flex;flex-direction:column;background:var(--kpt-color-surface-raised);color:var(--kpt-color-on-surface);box-shadow:var(--kpt-elevation-4);transition:transform .25s ease;outline:none}.kpt-drawer__panel[data-position=left]{inset:0 auto 0 0;width:min(20rem,90vw);transform:translate(-100%)}.kpt-drawer__panel[data-position=right]{inset:0 0 0 auto;width:min(20rem,90vw);transform:translate(100%)}.kpt-drawer__panel[data-position=top]{inset:0 0 auto;height:min(16rem,80vh);transform:translateY(-100%)}.kpt-drawer__panel[data-position=bottom]{inset:auto 0 0;height:min(16rem,80vh);transform:translateY(100%)}.kpt-drawer__panel.is-open{transform:none}.kpt-drawer__header{display:flex;align-items:center;justify-content:space-between;padding:var(--kpt-space-3, .75rem) var(--kpt-space-4, 1rem);border-bottom:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border)}.kpt-drawer__title{font-weight:var(--kpt-font-weight-semibold, 600)}.kpt-drawer__close{display:inline-flex;border:0;background:none;padding:0;cursor:pointer;color:var(--kpt-color-on-surface-muted)}.kpt-drawer__close:hover{color:var(--kpt-color-on-surface)}.kpt-drawer__body{flex:1;overflow:auto;padding:var(--kpt-space-4, 1rem)}}\n"] }]
|
|
11063
11501
|
}], null, { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], closeOnBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdrop", required: false }] }] }); })();
|
|
11064
11502
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDrawer, { className: "KptDrawer", filePath: "lib/drawer/drawer.component.ts", lineNumber: 45 }); })();
|
|
11065
11503
|
|
|
@@ -11865,5 +12303,5 @@ class KptSpeedDial {
|
|
|
11865
12303
|
* Generated bundle index. Do not edit.
|
|
11866
12304
|
*/
|
|
11867
12305
|
|
|
11868
|
-
export { KPT_I18N_CONFIG, KPT_MESSAGES_EN, KPT_MESSAGES_PL, KptAccordion, KptAccordionPanel, KptAlert, KptAppShell, KptAutocomplete, KptAvatar, KptAvatarGroup, KptBadge, KptBottomSheet, KptBreadcrumb, KptButton, KptButtonGroup, KptCard, KptCarousel, KptCellDef, KptCheckbox, KptChip, KptChipsInput, KptClock, KptColorPicker, KptConfirmContainer, KptConfirmService, KptContextMenu, KptDataTable, KptDataView, KptDateRange, KptDatepicker, KptDialog, KptDivider, KptDrawer, KptEmpty, KptFab, KptFieldset, KptFileUpload, KptFormField, KptGalleria, KptI18n, KptIcon, KptIconButton, KptIconRegistry, KptImage, KptInput, KptInputMask, KptInputNumber, KptInputOtp, KptKnob, KptListbox, KptMegamenu, KptMenu, KptMenubar, KptMeterGroup, KptOrderList, KptPaginator, KptPanel, KptPassword, KptPickList, KptPopover, KptProgress, KptRadioGroup, KptRating, KptRichText, KptRowDetailDef, KptScrollTop, KptSelect, KptSidenav, KptSkeleton, KptSlider, KptSpeedDial, KptSpinner, KptSplitButton, KptSplitter, KptStep, KptStepper, KptSwitch, KptSwitchGroup, KptTab, KptTabs, KptTextarea, KptTimeline, KptToastContainer, KptToastService, KptToolbar, KptTooltip, KptTree, provideKptI18n };
|
|
12306
|
+
export { KPT_BREAKPOINTS, KPT_FORM_FIELD_CONTROL, KPT_I18N_CONFIG, KPT_MESSAGES_EN, KPT_MESSAGES_PL, KptAccordion, KptAccordionPanel, KptAlert, KptAppShell, KptAutocomplete, KptAvatar, KptAvatarGroup, KptBadge, KptBottomSheet, KptBreadcrumb, KptBreakpointObserver, KptButton, KptButtonGroup, KptCard, KptCarousel, KptCellDef, KptCheckbox, KptChip, KptChipsInput, KptClock, KptColorPicker, KptConfirmContainer, KptConfirmService, KptContextMenu, KptDataTable, KptDataView, KptDateRange, KptDatepicker, KptDialog, KptDivider, KptDrawer, KptEmpty, KptFab, KptFieldset, KptFileUpload, KptFormField, KptGalleria, KptI18n, KptIcon, KptIconButton, KptIconRegistry, KptImage, KptInput, KptInputMask, KptInputNumber, KptInputOtp, KptKnob, KptListbox, KptMegamenu, KptMenu, KptMenubar, KptMeterGroup, KptOrderList, KptPaginator, KptPanel, KptPassword, KptPickList, KptPopover, KptProgress, KptRadioGroup, KptRating, KptRichText, KptRowDetailDef, KptScrollTop, KptSelect, KptShellNavToggle, KptSidenav, KptSkeleton, KptSlider, KptSpeedDial, KptSpinner, KptSplitButton, KptSplitter, KptStep, KptStepper, KptSwitch, KptSwitchGroup, KptTab, KptTabs, KptTextarea, KptTimeline, KptToastContainer, KptToastService, KptToolbar, KptTooltip, KptTree, provideKptI18n, renderKptIconSvg };
|
|
11869
12307
|
//# sourceMappingURL=konce-pt-angular.mjs.map
|