@konce-pt/angular 0.11.0 → 0.11.2
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 +43 -0
- package/fesm2022/konce-pt-angular.mjs +330 -274
- package/fesm2022/konce-pt-angular.mjs.map +1 -1
- package/package.json +11 -11
- package/src/lib/button-group/llms.txt +31 -30
- package/src/lib/tooltip/llms.txt +53 -45
- package/types/konce-pt-angular.d.ts +8 -8
- package/types/konce-pt-angular.d.ts.map +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NgTemplateOutlet, isPlatformBrowser } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { signal, Injectable, input, inject, ElementRef, effect, isDevMode, ViewEncapsulation, ChangeDetectionStrategy, Component, booleanAttribute, computed, model, output, linkedSignal, InjectionToken, Injector, viewChild, afterNextRender, provideAppInitializer, PLATFORM_ID, DestroyRef, makeEnvironmentProviders, contentChild, forwardRef, untracked, numberAttribute,
|
|
3
|
+
import { signal, Injectable, input, inject, ElementRef, effect, isDevMode, ViewEncapsulation, ChangeDetectionStrategy, Component, booleanAttribute, computed, afterRenderEffect, Directive, model, output, linkedSignal, InjectionToken, Injector, viewChild, afterNextRender, provideAppInitializer, PLATFORM_ID, DestroyRef, makeEnvironmentProviders, contentChild, forwardRef, untracked, numberAttribute, TemplateRef, viewChildren, contentChildren } from '@angular/core';
|
|
4
4
|
import { KPT_ICONS, toKptIconRecord, sanitizeSvgFragment, renderKptIconSvg } from '@konce-pt/icons';
|
|
5
5
|
export { renderKptIconSvg } from '@konce-pt/icons';
|
|
6
6
|
import { CdkOverlayOrigin, CdkConnectedOverlay, OverlayContainer } from '@angular/cdk/overlay';
|
|
@@ -344,6 +344,245 @@ class KptIconButton {
|
|
|
344
344
|
}], null, { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: true }] }], ariaPressed: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaPressed", required: false }] }], ariaExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaExpanded", required: false }] }] }); })();
|
|
345
345
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptIconButton, { className: "KptIconButton", filePath: "lib/icon-button/icon-button.component.ts", lineNumber: 38 }); })();
|
|
346
346
|
|
|
347
|
+
/** Elementy, które same przyjmują fokus — na nie trafia `aria-describedby`. */
|
|
348
|
+
const FOCUSABLE$3 = 'a[href], button, input, select, textarea, [tabindex]:not([tabindex="-1"])';
|
|
349
|
+
/** Ile czasu ma wskaźnik na przejście z hosta na dymek, zanim ten zniknie (WCAG 1.4.13). */
|
|
350
|
+
const HIDE_DELAY_MS = 120;
|
|
351
|
+
let nextId$l = 0;
|
|
352
|
+
/** Strona przeciwna i dwie boczne — kolejność prób, gdy zadana strona się nie nadaje. */
|
|
353
|
+
const FALLBACKS = {
|
|
354
|
+
top: ['top', 'bottom', 'right', 'left'],
|
|
355
|
+
bottom: ['bottom', 'top', 'right', 'left'],
|
|
356
|
+
left: ['left', 'right', 'top', 'bottom'],
|
|
357
|
+
right: ['right', 'left', 'top', 'bottom'],
|
|
358
|
+
};
|
|
359
|
+
/**
|
|
360
|
+
* Ustawia dymek przy hoście, na pierwszej stronie z `FALLBACKS`, która się nadaje: dymek mieści się
|
|
361
|
+
* w oknie, a krawędź hosta od tej strony nie jest niczym przykryta (przyklejony nagłówek, menu, panel
|
|
362
|
+
* — sprawdzane `elementFromPoint` tuż przy krawędzi). Bez tego dymek przycisku wsuniętego pod
|
|
363
|
+
* nagłówek wyskakiwał nad nagłówkiem, odcięty od tego, co opisuje. Gdy żadna strona się nie nadaje,
|
|
364
|
+
* zostaje zadana. Na koniec dymek jest dociśnięty do okna z marginesem 4 px.
|
|
365
|
+
* Bliźniak tej funkcji żyje w drugim porcie — zmiany w obu naraz.
|
|
366
|
+
*/
|
|
367
|
+
function placeTooltip(host, tip, preferred) {
|
|
368
|
+
const r = host.getBoundingClientRect();
|
|
369
|
+
const t = tip.getBoundingClientRect();
|
|
370
|
+
const gap = 8;
|
|
371
|
+
const margin = 4;
|
|
372
|
+
const vw = document.documentElement.clientWidth;
|
|
373
|
+
const vh = document.documentElement.clientHeight;
|
|
374
|
+
const at = (side) => {
|
|
375
|
+
switch (side) {
|
|
376
|
+
case 'bottom':
|
|
377
|
+
return { top: r.bottom + gap, left: r.left + r.width / 2 - t.width / 2 };
|
|
378
|
+
case 'left':
|
|
379
|
+
return { top: r.top + r.height / 2 - t.height / 2, left: r.left - t.width - gap };
|
|
380
|
+
case 'right':
|
|
381
|
+
return { top: r.top + r.height / 2 - t.height / 2, left: r.right + gap };
|
|
382
|
+
default:
|
|
383
|
+
return { top: r.top - t.height - gap, left: r.left + r.width / 2 - t.width / 2 };
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
const fits = (side) => {
|
|
387
|
+
const { top, left } = at(side);
|
|
388
|
+
// Po osi poprzecznej dymek i tak zostanie dociśnięty do okna — liczy się tylko oś strony.
|
|
389
|
+
return side === 'top' || side === 'bottom'
|
|
390
|
+
? top >= margin && top + t.height <= vh - margin
|
|
391
|
+
: left >= margin && left + t.width <= vw - margin;
|
|
392
|
+
};
|
|
393
|
+
// Punkt 2 px w głąb hosta przy krawędzi danej strony; widoczny, gdy na wierzchu jest host, jego
|
|
394
|
+
// potomek albo sam dymek (stoi jeszcze w poprzednim miejscu).
|
|
395
|
+
const exposed = (side) => {
|
|
396
|
+
const x = side === 'left' ? r.left + 2 : side === 'right' ? r.right - 2 : r.left + r.width / 2;
|
|
397
|
+
const y = side === 'top' ? r.top + 2 : side === 'bottom' ? r.bottom - 2 : r.top + r.height / 2;
|
|
398
|
+
if (x < 0 || y < 0 || x >= vw || y >= vh)
|
|
399
|
+
return false;
|
|
400
|
+
const hit = document.elementFromPoint(x, y);
|
|
401
|
+
return !hit || host.contains(hit) || tip.contains(hit);
|
|
402
|
+
};
|
|
403
|
+
const side = FALLBACKS[preferred].find((s) => fits(s) && exposed(s)) ?? preferred;
|
|
404
|
+
const { top, left } = at(side);
|
|
405
|
+
tip.dataset['side'] = side;
|
|
406
|
+
tip.style.top = `${Math.min(Math.max(margin, top), Math.max(margin, vh - t.height - margin))}px`;
|
|
407
|
+
tip.style.left = `${Math.min(Math.max(margin, left), Math.max(margin, vw - t.width - margin))}px`;
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Dymek podpowiedzi (tooltip) pokazywany na hover/focus hosta. Lekki — element dodawany
|
|
411
|
+
* do `body` i pozycjonowany względem hosta (działa w trybie zoneless).
|
|
412
|
+
*
|
|
413
|
+
* Dostępność:
|
|
414
|
+
* - fokus łapiemy przez `focusin`/`focusout`, bo `focus`/`blur` nie bąbelkują — na
|
|
415
|
+
* `kpt-button` czy `kpt-icon-button` fokus dostaje wewnętrzny `<button>`, nie host;
|
|
416
|
+
* - tekst trafia do czytników przez trwały, ukryty opis powiązany `aria-describedby`
|
|
417
|
+
* z elementem, który faktycznie przyjmuje fokus (sam dymek powstaje dopiero przy pokazaniu,
|
|
418
|
+
* więc nie da się go wskazać wcześniej). Opisu nie dodajemy, gdy powtarzałby nazwę elementu
|
|
419
|
+
* albo przy `kptTooltipOnlyWhenTruncated` — tam dymek pokazuje tekst, który i tak jest w DOM-ie;
|
|
420
|
+
* - `Escape` zamyka dymek, a wskaźnik może na niego przejść bez zniknięcia (WCAG 1.4.13).
|
|
421
|
+
*
|
|
422
|
+
* @example
|
|
423
|
+
* <kpt-button kptTooltip="Zapisz zmiany" kptTooltipPosition="bottom">Zapisz</kpt-button>
|
|
424
|
+
*
|
|
425
|
+
* @example Dymek tylko wtedy, gdy tekst nie mieści się w elemencie:
|
|
426
|
+
* <span class="ellipsis" [kptTooltip]="name" kptTooltipOnlyWhenTruncated>{{ name }}</span>
|
|
427
|
+
*/
|
|
428
|
+
class KptTooltip {
|
|
429
|
+
constructor() {
|
|
430
|
+
this.text = input.required({ ...(ngDevMode ? { debugName: "text" } : /* istanbul ignore next */ {}), alias: 'kptTooltip' });
|
|
431
|
+
this.position = input('top', { ...(ngDevMode ? { debugName: "position" } : /* istanbul ignore next */ {}), alias: 'kptTooltipPosition' });
|
|
432
|
+
this.onlyWhenTruncated = input(false, { ...(ngDevMode ? { debugName: "onlyWhenTruncated" } : /* istanbul ignore next */ {}), alias: 'kptTooltipOnlyWhenTruncated',
|
|
433
|
+
transform: booleanAttribute });
|
|
434
|
+
this.host = inject(ElementRef);
|
|
435
|
+
this.descId = `kpt-tooltip-desc-${++nextId$l}`;
|
|
436
|
+
this.follow = () => this.reposition();
|
|
437
|
+
this.onKeydown = (event) => {
|
|
438
|
+
if (event.key === 'Escape')
|
|
439
|
+
this.hide();
|
|
440
|
+
};
|
|
441
|
+
// Po renderze, bo wewnętrzny `<button>` komponentu-hosta istnieje dopiero wtedy.
|
|
442
|
+
// Efekt czyta `text()` i `onlyWhenTruncated()`, więc zmiana treści aktualizuje opis.
|
|
443
|
+
afterRenderEffect(() => this.syncDescription(this.text(), this.onlyWhenTruncated()));
|
|
444
|
+
}
|
|
445
|
+
show() {
|
|
446
|
+
this.cancelHide();
|
|
447
|
+
if (this.tip || !this.text())
|
|
448
|
+
return;
|
|
449
|
+
// Sprawdzamy dopiero teraz, a nie przy renderze: dzięki temu wynik jest zawsze
|
|
450
|
+
// aktualny po zmianie szerokości czy powiększenia, bez żadnych obserwatorów.
|
|
451
|
+
if (this.onlyWhenTruncated() && !this.isTruncated())
|
|
452
|
+
return;
|
|
453
|
+
const tip = document.createElement('div');
|
|
454
|
+
tip.className = 'kpt-tooltip';
|
|
455
|
+
tip.setAttribute('role', 'tooltip');
|
|
456
|
+
// Treść czytnik dostaje z trwałego opisu — dymek by ją zdublował.
|
|
457
|
+
if (this.desc)
|
|
458
|
+
tip.setAttribute('aria-hidden', 'true');
|
|
459
|
+
tip.textContent = this.text();
|
|
460
|
+
tip.style.cssText =
|
|
461
|
+
'position:fixed;z-index:1400;max-width:16rem;padding:0.35rem 0.6rem;' +
|
|
462
|
+
'border-radius:var(--kpt-radius-sm,0.25rem);font-size:var(--kpt-font-size-xs,0.75rem);' +
|
|
463
|
+
'line-height:1.4;background:var(--kpt-color-on-surface);color:var(--kpt-color-surface);' +
|
|
464
|
+
'box-shadow:var(--kpt-elevation-2);opacity:0;transition:opacity 120ms;';
|
|
465
|
+
// Wskaźnik może przejść na dymek (np. żeby go powiększyć lupą) — wtedy dymek zostaje.
|
|
466
|
+
tip.addEventListener('mouseenter', () => this.cancelHide());
|
|
467
|
+
tip.addEventListener('mouseleave', () => this.scheduleHide());
|
|
468
|
+
document.body.appendChild(tip);
|
|
469
|
+
this.tip = tip;
|
|
470
|
+
this.reposition();
|
|
471
|
+
// Faza przechwytywania łapie także przewijanie zagnieżdżonych kontenerów
|
|
472
|
+
// (np. osi roadmapy), bo zdarzenie `scroll` elementu się nie propaguje.
|
|
473
|
+
window.addEventListener('scroll', this.follow, true);
|
|
474
|
+
window.addEventListener('resize', this.follow);
|
|
475
|
+
document.addEventListener('keydown', this.onKeydown);
|
|
476
|
+
requestAnimationFrame(() => {
|
|
477
|
+
if (this.tip)
|
|
478
|
+
this.tip.style.opacity = '1';
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
/** Fokus przeszedł do innego elementu w obrębie hosta — dymek zostaje. */
|
|
482
|
+
onFocusOut(event) {
|
|
483
|
+
const next = event.relatedTarget;
|
|
484
|
+
if (next && this.host.nativeElement.contains(next))
|
|
485
|
+
return;
|
|
486
|
+
this.hide();
|
|
487
|
+
}
|
|
488
|
+
scheduleHide() {
|
|
489
|
+
this.cancelHide();
|
|
490
|
+
this.hideTimer = setTimeout(() => this.hide(), HIDE_DELAY_MS);
|
|
491
|
+
}
|
|
492
|
+
cancelHide() {
|
|
493
|
+
if (this.hideTimer !== undefined)
|
|
494
|
+
clearTimeout(this.hideTimer);
|
|
495
|
+
this.hideTimer = undefined;
|
|
496
|
+
}
|
|
497
|
+
hide() {
|
|
498
|
+
this.cancelHide();
|
|
499
|
+
window.removeEventListener('scroll', this.follow, true);
|
|
500
|
+
window.removeEventListener('resize', this.follow);
|
|
501
|
+
document.removeEventListener('keydown', this.onKeydown);
|
|
502
|
+
this.tip?.remove();
|
|
503
|
+
this.tip = undefined;
|
|
504
|
+
}
|
|
505
|
+
/** Trwały opis dla czytników albo jego usunięcie, gdy nie jest potrzebny. */
|
|
506
|
+
syncDescription(text, onlyWhenTruncated) {
|
|
507
|
+
const target = this.focusTarget();
|
|
508
|
+
const name = (target.getAttribute('aria-label') ?? target.textContent ?? '').trim();
|
|
509
|
+
if (!text || onlyWhenTruncated || name === text.trim()) {
|
|
510
|
+
this.removeDescription();
|
|
511
|
+
return;
|
|
512
|
+
}
|
|
513
|
+
if (!this.desc) {
|
|
514
|
+
const desc = document.createElement('span');
|
|
515
|
+
desc.id = this.descId;
|
|
516
|
+
desc.hidden = true;
|
|
517
|
+
document.body.appendChild(desc);
|
|
518
|
+
this.desc = desc;
|
|
519
|
+
}
|
|
520
|
+
this.desc.textContent = text;
|
|
521
|
+
if (this.describedEl !== target) {
|
|
522
|
+
this.unlink();
|
|
523
|
+
const ids = (target.getAttribute('aria-describedby') ?? '').split(/\s+/).filter(Boolean);
|
|
524
|
+
if (!ids.includes(this.descId))
|
|
525
|
+
ids.push(this.descId);
|
|
526
|
+
target.setAttribute('aria-describedby', ids.join(' '));
|
|
527
|
+
this.describedEl = target;
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
removeDescription() {
|
|
531
|
+
this.unlink();
|
|
532
|
+
this.desc?.remove();
|
|
533
|
+
this.desc = undefined;
|
|
534
|
+
}
|
|
535
|
+
unlink() {
|
|
536
|
+
const el = this.describedEl;
|
|
537
|
+
if (!el)
|
|
538
|
+
return;
|
|
539
|
+
const ids = (el.getAttribute('aria-describedby') ?? '').split(/\s+/).filter((id) => id && id !== this.descId);
|
|
540
|
+
if (ids.length)
|
|
541
|
+
el.setAttribute('aria-describedby', ids.join(' '));
|
|
542
|
+
else
|
|
543
|
+
el.removeAttribute('aria-describedby');
|
|
544
|
+
this.describedEl = undefined;
|
|
545
|
+
}
|
|
546
|
+
/** Host, jeśli sam przyjmuje fokus, inaczej pierwsza kontrolka w środku, a w ostateczności host. */
|
|
547
|
+
focusTarget() {
|
|
548
|
+
const root = this.host.nativeElement;
|
|
549
|
+
if (root.matches(FOCUSABLE$3))
|
|
550
|
+
return root;
|
|
551
|
+
return root.querySelector(FOCUSABLE$3) ?? root;
|
|
552
|
+
}
|
|
553
|
+
isTruncated() {
|
|
554
|
+
const root = this.host.nativeElement;
|
|
555
|
+
const overflows = (el) =>
|
|
556
|
+
// Tolerancja 1 px pochłania zaokrąglenia subpikselowe przy skalowaniu.
|
|
557
|
+
el.scrollWidth > el.clientWidth + 1 || el.scrollHeight > el.clientHeight + 1;
|
|
558
|
+
return overflows(root) || Array.from(root.children).some(overflows);
|
|
559
|
+
}
|
|
560
|
+
reposition() {
|
|
561
|
+
if (this.tip)
|
|
562
|
+
placeTooltip(this.host.nativeElement, this.tip, this.position());
|
|
563
|
+
}
|
|
564
|
+
ngOnDestroy() {
|
|
565
|
+
this.hide();
|
|
566
|
+
this.removeDescription();
|
|
567
|
+
}
|
|
568
|
+
static { this.ɵfac = function KptTooltip_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptTooltip)(); }; }
|
|
569
|
+
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: KptTooltip, selectors: [["", "kptTooltip", ""]], hostBindings: function KptTooltip_HostBindings(rf, ctx) { if (rf & 1) {
|
|
570
|
+
i0.ɵɵlistener("mouseenter", function KptTooltip_mouseenter_HostBindingHandler() { return ctx.show(); })("mouseleave", function KptTooltip_mouseleave_HostBindingHandler() { return ctx.scheduleHide(); })("focusin", function KptTooltip_focusin_HostBindingHandler() { return ctx.show(); })("focusout", function KptTooltip_focusout_HostBindingHandler($event) { return ctx.onFocusOut($event); });
|
|
571
|
+
} }, inputs: { text: [1, "kptTooltip", "text"], position: [1, "kptTooltipPosition", "position"], onlyWhenTruncated: [1, "kptTooltipOnlyWhenTruncated", "onlyWhenTruncated"] } }); }
|
|
572
|
+
}
|
|
573
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptTooltip, [{
|
|
574
|
+
type: Directive,
|
|
575
|
+
args: [{
|
|
576
|
+
selector: '[kptTooltip]',
|
|
577
|
+
host: {
|
|
578
|
+
'(mouseenter)': 'show()',
|
|
579
|
+
'(mouseleave)': 'scheduleHide()',
|
|
580
|
+
'(focusin)': 'show()',
|
|
581
|
+
'(focusout)': 'onFocusOut($event)',
|
|
582
|
+
},
|
|
583
|
+
}]
|
|
584
|
+
}], () => [], { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptTooltip", required: true }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptTooltipPosition", required: false }] }], onlyWhenTruncated: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptTooltipOnlyWhenTruncated", required: false }] }] }); })();
|
|
585
|
+
|
|
347
586
|
const _forTrack0$f = ($index, $item) => $item.value;
|
|
348
587
|
function KptButtonGroup_For_2_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
349
588
|
i0.ɵɵelement(0, "kpt-icon", 3);
|
|
@@ -371,8 +610,8 @@ function KptButtonGroup_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
371
610
|
const opt_r2 = ctx.$implicit;
|
|
372
611
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
373
612
|
i0.ɵɵclassProp("is-active", opt_r2.value === ctx_r2.value());
|
|
374
|
-
i0.ɵɵproperty("disabled", ctx_r2.disabled() || opt_r2.disabled);
|
|
375
|
-
i0.ɵɵattribute("aria-pressed", opt_r2.value === ctx_r2.value())("aria-label", ctx_r2.iconOnly() ? opt_r2.label : null)
|
|
613
|
+
i0.ɵɵproperty("disabled", ctx_r2.disabled() || opt_r2.disabled)("kptTooltip", ctx_r2.iconOnly() ? opt_r2.label : "");
|
|
614
|
+
i0.ɵɵattribute("aria-pressed", opt_r2.value === ctx_r2.value())("aria-label", ctx_r2.iconOnly() ? opt_r2.label : null);
|
|
376
615
|
i0.ɵɵadvance();
|
|
377
616
|
i0.ɵɵconditional(opt_r2.icon ? 1 : -1);
|
|
378
617
|
i0.ɵɵadvance();
|
|
@@ -382,7 +621,7 @@ function KptButtonGroup_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
382
621
|
* Segmentowana grupa przycisków (toggle) — pojedynczy wybór z opcji. Signal Forms.
|
|
383
622
|
*
|
|
384
623
|
* Pozycja może mieć ikonę (`KptOption.icon`); `iconOnly` chowa etykietę, ale zostawia ją
|
|
385
|
-
* w nazwie dostępnej, więc czytnik ekranu dalej wie, co wybiera
|
|
624
|
+
* w nazwie dostępnej, więc czytnik ekranu dalej wie, co wybiera, a myszka dostaje `kptTooltip`.
|
|
386
625
|
*
|
|
387
626
|
* @example
|
|
388
627
|
* <kpt-button-group [(value)]="view" [options]="[{label:'Lista',value:'list'},{label:'Siatka',value:'grid'}]" />
|
|
@@ -400,7 +639,7 @@ class KptButtonGroup {
|
|
|
400
639
|
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
401
640
|
this.invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
402
641
|
this.touched = input(false, { ...(ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
403
|
-
/** Chowa etykiety — zostaje sama ikona, a `label` zasila `aria-label` i `
|
|
642
|
+
/** Chowa etykiety — zostaje sama ikona, a `label` zasila `aria-label` i dymek `kptTooltip`. */
|
|
404
643
|
this.iconOnly = input(false, { ...(ngDevMode ? { debugName: "iconOnly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
405
644
|
this.touch = output();
|
|
406
645
|
}
|
|
@@ -411,7 +650,7 @@ class KptButtonGroup {
|
|
|
411
650
|
this.touch.emit();
|
|
412
651
|
}
|
|
413
652
|
static { this.ɵfac = function KptButtonGroup_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptButtonGroup)(); }; }
|
|
414
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptButtonGroup, selectors: [["kpt-button-group"]], hostAttrs: [1, "kpt-button-group-host"], inputs: { options: [1, "options"], value: [1, "value"], size: [1, "size"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], iconOnly: [1, "iconOnly"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 3, vars: 2, consts: [["role", "group", 1, "kpt-button-group"], ["type", "button", 1, "kpt-button-group__item", 3, "is-active", "disabled"], ["type", "button", 1, "kpt-button-group__item", 3, "click", "disabled"], [1, "kpt-button-group__icon", 3, "name"], [1, "kpt-button-group__label"]], template: function KptButtonGroup_Template(rf, ctx) { if (rf & 1) {
|
|
653
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptButtonGroup, selectors: [["kpt-button-group"]], hostAttrs: [1, "kpt-button-group-host"], inputs: { options: [1, "options"], value: [1, "value"], size: [1, "size"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], iconOnly: [1, "iconOnly"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 3, vars: 2, consts: [["role", "group", 1, "kpt-button-group"], ["type", "button", 1, "kpt-button-group__item", 3, "is-active", "disabled", "kptTooltip"], ["type", "button", 1, "kpt-button-group__item", 3, "click", "disabled", "kptTooltip"], [1, "kpt-button-group__icon", 3, "name"], [1, "kpt-button-group__label"]], template: function KptButtonGroup_Template(rf, ctx) { if (rf & 1) {
|
|
415
654
|
i0.ɵɵelementStart(0, "div", 0);
|
|
416
655
|
i0.ɵɵrepeaterCreate(1, KptButtonGroup_For_2_Template, 3, 8, "button", 1, _forTrack0$f);
|
|
417
656
|
i0.ɵɵelementEnd();
|
|
@@ -419,35 +658,35 @@ class KptButtonGroup {
|
|
|
419
658
|
i0.ɵɵattribute("data-size", ctx.size())("data-icon-only", ctx.iconOnly() ? "" : null);
|
|
420
659
|
i0.ɵɵadvance();
|
|
421
660
|
i0.ɵɵrepeater(ctx.options());
|
|
422
|
-
} }, dependencies: [KptIcon], styles: ["@layer kpt.components{.kpt-button-group-host{display:inline-flex}.kpt-button-group{display:inline-flex;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border-strong);border-radius:var(--%NS%kpt-radius-md, .5rem);overflow:hidden;background:var(--%NS%kpt-color-surface)}.kpt-button-group__item{appearance:none;border:0;border-inline-start:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);background:none;color:var(--%NS%kpt-color-on-surface);display:inline-flex;align-items:center;justify-content:center;gap:var(--%NS%kpt-button-gap, .5rem);padding:0 var(--%NS%_px, 1rem);height:var(--%NS%_h, 2.5rem);font:inherit;font-size:var(--%NS%_fs, .875rem);font-weight:var(--%NS%kpt-font-weight-medium, 500);cursor:pointer;transition:background-color var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard)}.kpt-button-group__item:first-child{border-inline-start:0}.kpt-button-group__item:hover:not(:disabled):not(.is-active){background:var(--%NS%kpt-color-muted)}.kpt-button-group__item.is-active{background:var(--%NS%kpt-color-primary);color:var(--%NS%kpt-color-on-primary)}.kpt-button-group__item:disabled{opacity:.5;cursor:not-allowed}.kpt-button-group__icon{font-size:var(--%NS%_icon, 1.125rem)}.kpt-button-group{--%NS%_h: 2.5rem;--%NS%_px: 1rem;--%NS%_fs: .875rem;--%NS%_icon: 1.125rem}.kpt-button-group[data-size=sm]{--%NS%_h: 2rem;--%NS%_px: .75rem;--%NS%_fs: .8125rem;--%NS%_icon: 1rem}.kpt-button-group[data-size=lg]{--%NS%_h: 3rem;--%NS%_px: 1.5rem;--%NS%_fs: 1rem;--%NS%_icon: 1.25rem}.kpt-button-group[data-icon-only] .kpt-button-group__item{--%NS%_px: 0;width:var(--%NS%_h)}}\n"], encapsulation: 2 }); }
|
|
661
|
+
} }, dependencies: [KptIcon, KptTooltip], styles: ["@layer kpt.components{.kpt-button-group-host{display:inline-flex}.kpt-button-group{display:inline-flex;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border-strong);border-radius:var(--%NS%kpt-radius-md, .5rem);overflow:hidden;background:var(--%NS%kpt-color-surface)}.kpt-button-group__item{appearance:none;border:0;border-inline-start:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);background:none;color:var(--%NS%kpt-color-on-surface);display:inline-flex;align-items:center;justify-content:center;gap:var(--%NS%kpt-button-gap, .5rem);padding:0 var(--%NS%_px, 1rem);height:var(--%NS%_h, 2.5rem);font:inherit;font-size:var(--%NS%_fs, .875rem);font-weight:var(--%NS%kpt-font-weight-medium, 500);cursor:pointer;transition:background-color var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard)}.kpt-button-group__item:first-child{border-inline-start:0}.kpt-button-group__item:hover:not(:disabled):not(.is-active){background:var(--%NS%kpt-color-muted)}.kpt-button-group__item.is-active{background:var(--%NS%kpt-color-primary);color:var(--%NS%kpt-color-on-primary)}.kpt-button-group__item:disabled{opacity:.5;cursor:not-allowed}.kpt-button-group__icon{font-size:var(--%NS%_icon, 1.125rem)}.kpt-button-group{--%NS%_h: 2.5rem;--%NS%_px: 1rem;--%NS%_fs: .875rem;--%NS%_icon: 1.125rem}.kpt-button-group[data-size=sm]{--%NS%_h: 2rem;--%NS%_px: .75rem;--%NS%_fs: .8125rem;--%NS%_icon: 1rem}.kpt-button-group[data-size=lg]{--%NS%_h: 3rem;--%NS%_px: 1.5rem;--%NS%_fs: 1rem;--%NS%_icon: 1.25rem}.kpt-button-group[data-icon-only] .kpt-button-group__item{--%NS%_px: 0;width:var(--%NS%_h)}}\n"], encapsulation: 2 }); }
|
|
423
662
|
}
|
|
424
663
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptButtonGroup, [{
|
|
425
664
|
type: Component,
|
|
426
|
-
args: [{ selector: 'kpt-button-group', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [KptIcon], template: `
|
|
427
|
-
<div class="kpt-button-group" role="group" [attr.data-size]="size()" [attr.data-icon-only]="iconOnly() ? '' : null">
|
|
428
|
-
@for (opt of options(); track opt.value) {
|
|
429
|
-
<button
|
|
430
|
-
type="button"
|
|
431
|
-
class="kpt-button-group__item"
|
|
432
|
-
[class.is-active]="opt.value === value()"
|
|
433
|
-
[disabled]="disabled() || opt.disabled"
|
|
434
|
-
[attr.aria-pressed]="opt.value === value()"
|
|
435
|
-
[attr.aria-label]="iconOnly() ? opt.label : null"
|
|
436
|
-
[
|
|
437
|
-
(click)="select(opt)"
|
|
438
|
-
>
|
|
439
|
-
@if (opt.icon) {
|
|
440
|
-
<kpt-icon class="kpt-button-group__icon" [name]="opt.icon" />
|
|
441
|
-
}
|
|
442
|
-
@if (!iconOnly()) {
|
|
443
|
-
<span class="kpt-button-group__label">{{ opt.label }}</span>
|
|
444
|
-
}
|
|
445
|
-
</button>
|
|
446
|
-
}
|
|
447
|
-
</div>
|
|
665
|
+
args: [{ selector: 'kpt-button-group', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [KptIcon, KptTooltip], template: `
|
|
666
|
+
<div class="kpt-button-group" role="group" [attr.data-size]="size()" [attr.data-icon-only]="iconOnly() ? '' : null">
|
|
667
|
+
@for (opt of options(); track opt.value) {
|
|
668
|
+
<button
|
|
669
|
+
type="button"
|
|
670
|
+
class="kpt-button-group__item"
|
|
671
|
+
[class.is-active]="opt.value === value()"
|
|
672
|
+
[disabled]="disabled() || opt.disabled"
|
|
673
|
+
[attr.aria-pressed]="opt.value === value()"
|
|
674
|
+
[attr.aria-label]="iconOnly() ? opt.label : null"
|
|
675
|
+
[kptTooltip]="iconOnly() ? opt.label : ''"
|
|
676
|
+
(click)="select(opt)"
|
|
677
|
+
>
|
|
678
|
+
@if (opt.icon) {
|
|
679
|
+
<kpt-icon class="kpt-button-group__icon" [name]="opt.icon" />
|
|
680
|
+
}
|
|
681
|
+
@if (!iconOnly()) {
|
|
682
|
+
<span class="kpt-button-group__label">{{ opt.label }}</span>
|
|
683
|
+
}
|
|
684
|
+
</button>
|
|
685
|
+
}
|
|
686
|
+
</div>
|
|
448
687
|
`, host: { class: 'kpt-button-group-host' }, styles: ["@layer kpt.components{.kpt-button-group-host{display:inline-flex}.kpt-button-group{display:inline-flex;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border-strong);border-radius:var(--kpt-radius-md, .5rem);overflow:hidden;background:var(--kpt-color-surface)}.kpt-button-group__item{appearance:none;border:0;border-inline-start:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);background:none;color:var(--kpt-color-on-surface);display:inline-flex;align-items:center;justify-content:center;gap:var(--kpt-button-gap, .5rem);padding:0 var(--_px, 1rem);height:var(--_h, 2.5rem);font:inherit;font-size:var(--_fs, .875rem);font-weight:var(--kpt-font-weight-medium, 500);cursor:pointer;transition:background-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-button-group__item:first-child{border-inline-start:0}.kpt-button-group__item:hover:not(:disabled):not(.is-active){background:var(--kpt-color-muted)}.kpt-button-group__item.is-active{background:var(--kpt-color-primary);color:var(--kpt-color-on-primary)}.kpt-button-group__item:disabled{opacity:.5;cursor:not-allowed}.kpt-button-group__icon{font-size:var(--_icon, 1.125rem)}.kpt-button-group{--_h: 2.5rem;--_px: 1rem;--_fs: .875rem;--_icon: 1.125rem}.kpt-button-group[data-size=sm]{--_h: 2rem;--_px: .75rem;--_fs: .8125rem;--_icon: 1rem}.kpt-button-group[data-size=lg]{--_h: 3rem;--_px: 1.5rem;--_fs: 1rem;--_icon: 1.25rem}.kpt-button-group[data-icon-only] .kpt-button-group__item{--_px: 0;width:var(--_h)}}\n"] }]
|
|
449
688
|
}], null, { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", 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 }] }], iconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOnly", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }] }); })();
|
|
450
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptButtonGroup, { className: "KptButtonGroup", filePath: "lib/button-group/button-group.component.ts", lineNumber:
|
|
689
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptButtonGroup, { className: "KptButtonGroup", filePath: "lib/button-group/button-group.component.ts", lineNumber: 57 }); })();
|
|
451
690
|
|
|
452
691
|
const _c0$P = ["*"];
|
|
453
692
|
/**
|
|
@@ -948,7 +1187,7 @@ function KptSplitButton_ng_template_7_Template(rf, ctx) { if (rf & 1) {
|
|
|
948
1187
|
i0.ɵɵadvance(2);
|
|
949
1188
|
i0.ɵɵrepeater(ctx_r1.items());
|
|
950
1189
|
} }
|
|
951
|
-
let nextId$
|
|
1190
|
+
let nextId$k = 0;
|
|
952
1191
|
/**
|
|
953
1192
|
* Przycisk dzielony (split button) — akcja główna + rozwijane menu dodatkowych akcji.
|
|
954
1193
|
* Wymaga `import '@angular/cdk/overlay-prebuilt.css';`
|
|
@@ -968,7 +1207,7 @@ class KptSplitButton {
|
|
|
968
1207
|
this.i18n = inject(KptI18n);
|
|
969
1208
|
this.open = signal(false, /* @ts-ignore */
|
|
970
1209
|
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
971
|
-
this.panelId = `kpt-split-button-menu-${(nextId$
|
|
1210
|
+
this.panelId = `kpt-split-button-menu-${(nextId$k += 1)}`;
|
|
972
1211
|
this.injector = inject(Injector);
|
|
973
1212
|
this.toggleBtn = viewChild.required('toggleBtn', /* @ts-ignore */
|
|
974
1213
|
...(ngDevMode ? [{ debugName: "toggleBtn" }] : /* istanbul ignore next */ []));
|
|
@@ -1280,7 +1519,7 @@ function KptChip_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
1280
1519
|
i0.ɵɵproperty("id", ctx_r1.removeId)("disabled", ctx_r1.disabled());
|
|
1281
1520
|
i0.ɵɵattribute("aria-label", ctx_r1.i18n.t("common.remove"))("aria-labelledby", ctx_r1.removeId + " " + ctx_r1.labelId);
|
|
1282
1521
|
} }
|
|
1283
|
-
let nextId$
|
|
1522
|
+
let nextId$j = 0;
|
|
1284
1523
|
/**
|
|
1285
1524
|
* Chip / tag — etykieta, opcjonalnie usuwalna.
|
|
1286
1525
|
*
|
|
@@ -1304,7 +1543,7 @@ class KptChip {
|
|
|
1304
1543
|
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1305
1544
|
this.removed = output();
|
|
1306
1545
|
this.i18n = inject(KptI18n);
|
|
1307
|
-
this.uid = (nextId$
|
|
1546
|
+
this.uid = (nextId$j += 1);
|
|
1308
1547
|
this.labelId = `kpt-chip-label-${this.uid}`;
|
|
1309
1548
|
this.removeId = `kpt-chip-remove-${this.uid}`;
|
|
1310
1549
|
}
|
|
@@ -1658,7 +1897,7 @@ const KPT_FORM_FIELD_CONTROL = new InjectionToken('KPT_FORM_FIELD_CONTROL');
|
|
|
1658
1897
|
|
|
1659
1898
|
/** Token DI kontekstu pola — dostarcza go `kpt-form-field` swojej zawartości. */
|
|
1660
1899
|
const KPT_FORM_FIELD = new InjectionToken('KPT_FORM_FIELD');
|
|
1661
|
-
let nextId$
|
|
1900
|
+
let nextId$i = 0;
|
|
1662
1901
|
/**
|
|
1663
1902
|
* Wiąże kontrolkę z otaczającym `kpt-form-field`. Wołać w kontekście wstrzykiwania (pole klasy
|
|
1664
1903
|
* komponentu). Poza wrapperem zwraca samo `id` (własne albo wygenerowane) i puste powiązania.
|
|
@@ -1670,7 +1909,7 @@ let nextId$j = 0;
|
|
|
1670
1909
|
*/
|
|
1671
1910
|
function kptFieldA11y(ownId, prefix) {
|
|
1672
1911
|
const field = inject(KPT_FORM_FIELD, { optional: true });
|
|
1673
|
-
const fallback = `${prefix}-${(nextId$
|
|
1912
|
+
const fallback = `${prefix}-${(nextId$i += 1)}`;
|
|
1674
1913
|
const id = computed(() => ownId() || field?.explicitId() || fallback, /* @ts-ignore */
|
|
1675
1914
|
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
1676
1915
|
if (field) {
|
|
@@ -1741,7 +1980,7 @@ function KptFormField_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
|
1741
1980
|
i0.ɵɵadvance();
|
|
1742
1981
|
i0.ɵɵtextInterpolate(ctx_r0.hint());
|
|
1743
1982
|
} }
|
|
1744
|
-
let nextId$
|
|
1983
|
+
let nextId$h = 0;
|
|
1745
1984
|
/**
|
|
1746
1985
|
* Wrapper pola formularza: etykieta, podpowiedź i komunikat błędu wokół dowolnej
|
|
1747
1986
|
* kontrolki (np. `kpt-input`). Prezentacyjny — stan błędu przekazuje się przez `error`
|
|
@@ -1798,7 +2037,7 @@ class KptFormField {
|
|
|
1798
2037
|
this.labelType = input('fixed', /* @ts-ignore */
|
|
1799
2038
|
...(ngDevMode ? [{ debugName: "labelType" }] : /* istanbul ignore next */ []));
|
|
1800
2039
|
this.host = inject(ElementRef);
|
|
1801
|
-
this.uid = `kpt-form-field-${(nextId$
|
|
2040
|
+
this.uid = `kpt-form-field-${(nextId$h += 1)}`;
|
|
1802
2041
|
this.labelElId = `${this.uid}-label`;
|
|
1803
2042
|
this.messageId = `${this.uid}-message`;
|
|
1804
2043
|
this.registry = createControlRegistry();
|
|
@@ -2618,7 +2857,7 @@ function KptSelect_ng_template_8_Template(rf, ctx) { if (rf & 1) {
|
|
|
2618
2857
|
i0.ɵɵadvance();
|
|
2619
2858
|
i0.ɵɵrepeater(ctx_r2.filteredOptions());
|
|
2620
2859
|
} }
|
|
2621
|
-
let nextId$
|
|
2860
|
+
let nextId$g = 0;
|
|
2622
2861
|
/**
|
|
2623
2862
|
* Lista wyboru (select) na własnym panelu (CDK Overlay), zintegrowana z Signal Forms.
|
|
2624
2863
|
* Warianty: pojedynczy, z wyszukiwarką (`filter`) i wielokrotny (`multiple`, chipy).
|
|
@@ -2673,7 +2912,7 @@ class KptSelect {
|
|
|
2673
2912
|
...(ngDevMode ? [{ debugName: "filterText" }] : /* istanbul ignore next */ []));
|
|
2674
2913
|
this.activeIndex = signal(-1, /* @ts-ignore */
|
|
2675
2914
|
...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
2676
|
-
this.uid = (nextId$
|
|
2915
|
+
this.uid = (nextId$g += 1);
|
|
2677
2916
|
this.listId = `kpt-select-list-${this.uid}`;
|
|
2678
2917
|
this.triggerEl = viewChild('triggerEl', /* @ts-ignore */
|
|
2679
2918
|
...(ngDevMode ? [{ debugName: "triggerEl" }] : /* istanbul ignore next */ []));
|
|
@@ -3140,10 +3379,10 @@ class KptClock {
|
|
|
3140
3379
|
*
|
|
3141
3380
|
* Bliźniak w porcie React: `internal/calendar-focus.ts` — zmiana zachowania w obu.
|
|
3142
3381
|
*/
|
|
3143
|
-
const FOCUSABLE$
|
|
3382
|
+
const FOCUSABLE$2 = 'button:not(:disabled):not([tabindex="-1"]), input:not(:disabled), [tabindex="0"]';
|
|
3144
3383
|
/** Zawija `Tab` / `Shift+Tab` w obrębie `panel`. */
|
|
3145
3384
|
function trapTab(panel, event) {
|
|
3146
|
-
const items = [...panel.querySelectorAll(FOCUSABLE$
|
|
3385
|
+
const items = [...panel.querySelectorAll(FOCUSABLE$2)].filter((el) => el.offsetParent !== null);
|
|
3147
3386
|
if (!items.length)
|
|
3148
3387
|
return;
|
|
3149
3388
|
const first = items[0];
|
|
@@ -3449,7 +3688,7 @@ function KptDatepicker_ng_template_8_Template(rf, ctx) { if (rf & 1) {
|
|
|
3449
3688
|
i0.ɵɵadvance(2);
|
|
3450
3689
|
i0.ɵɵconditional(ctx_r0.hasFooter() ? 3 : -1);
|
|
3451
3690
|
} }
|
|
3452
|
-
let nextId$
|
|
3691
|
+
let nextId$f = 0;
|
|
3453
3692
|
/**
|
|
3454
3693
|
* Wybór daty/godziny z własnym kalendarzem (CDK Overlay), Signal Forms.
|
|
3455
3694
|
* Granulacja przez `selectionMode`: data, miesiąc+rok, rok, miesiąc, data+godzina, sama godzina.
|
|
@@ -3546,7 +3785,7 @@ class KptDatepicker {
|
|
|
3546
3785
|
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
3547
3786
|
this.today = new Date();
|
|
3548
3787
|
this.todayIso = toIso(this.today);
|
|
3549
|
-
this.uid = (nextId$
|
|
3788
|
+
this.uid = (nextId$f += 1);
|
|
3550
3789
|
this.panelId = `kpt-datepicker-panel-${this.uid}`;
|
|
3551
3790
|
this.triggerEl = viewChild('triggerEl', /* @ts-ignore */
|
|
3552
3791
|
...(ngDevMode ? [{ debugName: "triggerEl" }] : /* istanbul ignore next */ []));
|
|
@@ -4061,10 +4300,29 @@ class KptTextarea {
|
|
|
4061
4300
|
...(ngDevMode ? [{ debugName: "describedBy" }] : /* istanbul ignore next */ []));
|
|
4062
4301
|
this.ta = viewChild('ta', /* @ts-ignore */
|
|
4063
4302
|
...(ngDevMode ? [{ debugName: "ta" }] : /* istanbul ignore next */ []));
|
|
4064
|
-
|
|
4303
|
+
// Wysokość idzie za wartością — także ustawioną z formularza (edycja istniejącego wpisu),
|
|
4304
|
+
// nie tylko wpisaną z klawiatury.
|
|
4305
|
+
afterRenderEffect(() => {
|
|
4306
|
+
this.value();
|
|
4065
4307
|
if (this.autoResize())
|
|
4066
4308
|
this.resize();
|
|
4067
4309
|
});
|
|
4310
|
+
// Pole ukryte przy pierwszym renderze (zamknięty dialog, zwinięta sekcja) nie ma `scrollHeight`.
|
|
4311
|
+
// Pomiar wraca, gdy pole dostaje układ — `ResizeObserver` zgłasza zmianę szerokości z zera.
|
|
4312
|
+
let width = 0;
|
|
4313
|
+
const observer = new ResizeObserver(([entry]) => {
|
|
4314
|
+
const next = entry?.contentRect.width ?? 0;
|
|
4315
|
+
if (next !== width && this.autoResize()) {
|
|
4316
|
+
width = next;
|
|
4317
|
+
this.resize();
|
|
4318
|
+
}
|
|
4319
|
+
});
|
|
4320
|
+
afterRenderEffect(() => {
|
|
4321
|
+
const el = this.ta()?.nativeElement;
|
|
4322
|
+
if (el)
|
|
4323
|
+
observer.observe(el);
|
|
4324
|
+
});
|
|
4325
|
+
inject(DestroyRef).onDestroy(() => observer.disconnect());
|
|
4068
4326
|
}
|
|
4069
4327
|
onInput(event) {
|
|
4070
4328
|
this.value.set(event.target.value);
|
|
@@ -4075,6 +4333,11 @@ class KptTextarea {
|
|
|
4075
4333
|
const el = this.ta()?.nativeElement;
|
|
4076
4334
|
if (!el)
|
|
4077
4335
|
return;
|
|
4336
|
+
// Bez układu `scrollHeight` to 0 — zostawiamy wysokość z `rows` zamiast zwijać pole do zera.
|
|
4337
|
+
if (!el.getClientRects().length) {
|
|
4338
|
+
el.style.height = '';
|
|
4339
|
+
return;
|
|
4340
|
+
}
|
|
4078
4341
|
el.style.height = 'auto';
|
|
4079
4342
|
el.style.height = `${el.scrollHeight}px`;
|
|
4080
4343
|
}
|
|
@@ -4099,237 +4362,30 @@ class KptTextarea {
|
|
|
4099
4362
|
}
|
|
4100
4363
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptTextarea, [{
|
|
4101
4364
|
type: Component,
|
|
4102
|
-
args: [{ selector: 'kpt-textarea', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: `
|
|
4103
|
-
<textarea
|
|
4104
|
-
#ta
|
|
4105
|
-
class="kpt-textarea__field"
|
|
4106
|
-
[id]="field.id()"
|
|
4107
|
-
[value]="value()"
|
|
4108
|
-
[placeholder]="placeholder()"
|
|
4109
|
-
[disabled]="disabled()"
|
|
4110
|
-
[readOnly]="readonly()"
|
|
4111
|
-
[rows]="rows()"
|
|
4112
|
-
[attr.aria-invalid]="showInvalid() ? 'true' : null"
|
|
4113
|
-
[attr.aria-required]="required() ? 'true' : null"
|
|
4114
|
-
[attr.aria-label]="ariaLabel()"
|
|
4115
|
-
[attr.maxlength]="maxLength() ?? null"
|
|
4116
|
-
[attr.aria-describedby]="describedBy()"
|
|
4117
|
-
(input)="onInput($event)"
|
|
4118
|
-
(blur)="touch.emit()"
|
|
4119
|
-
></textarea>
|
|
4120
|
-
@if (counter() && maxLength()) {
|
|
4121
|
-
<span class="kpt-textarea__counter" [id]="counterId()">{{ value().length }} / {{ maxLength() }}</span>
|
|
4122
|
-
}
|
|
4365
|
+
args: [{ selector: 'kpt-textarea', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: `
|
|
4366
|
+
<textarea
|
|
4367
|
+
#ta
|
|
4368
|
+
class="kpt-textarea__field"
|
|
4369
|
+
[id]="field.id()"
|
|
4370
|
+
[value]="value()"
|
|
4371
|
+
[placeholder]="placeholder()"
|
|
4372
|
+
[disabled]="disabled()"
|
|
4373
|
+
[readOnly]="readonly()"
|
|
4374
|
+
[rows]="rows()"
|
|
4375
|
+
[attr.aria-invalid]="showInvalid() ? 'true' : null"
|
|
4376
|
+
[attr.aria-required]="required() ? 'true' : null"
|
|
4377
|
+
[attr.aria-label]="ariaLabel()"
|
|
4378
|
+
[attr.maxlength]="maxLength() ?? null"
|
|
4379
|
+
[attr.aria-describedby]="describedBy()"
|
|
4380
|
+
(input)="onInput($event)"
|
|
4381
|
+
(blur)="touch.emit()"
|
|
4382
|
+
></textarea>
|
|
4383
|
+
@if (counter() && maxLength()) {
|
|
4384
|
+
<span class="kpt-textarea__counter" [id]="counterId()">{{ value().length }} / {{ maxLength() }}</span>
|
|
4385
|
+
}
|
|
4123
4386
|
`, host: { class: 'kpt-textarea-host', '[attr.id]': 'null' }, styles: ["@layer kpt.components{.kpt-textarea-host{display:block}.kpt-textarea__field{display:block;width:100%;box-sizing:border-box;min-height:3rem;padding:var(--kpt-space-2, .5rem) 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);line-height:var(--kpt-font-line-height-normal, 1.5);color:var(--kpt-form-field-text);background:var(--kpt-form-field-bg);resize:vertical}.kpt-textarea__field::placeholder{color:var(--kpt-form-field-placeholder)}.kpt-textarea__field:hover:not(:disabled){border-color:var(--kpt-form-field-border-hover)}.kpt-textarea__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-textarea__field[aria-invalid=true]{border-color:var(--kpt-form-field-border-error)}.kpt-textarea__field:disabled{cursor:not-allowed;opacity:.6;background:var(--kpt-color-surface-variant)}.kpt-textarea__counter{display:block;margin-top:var(--kpt-space-1, .25rem);text-align:end;font-size:var(--kpt-font-size-xs, .75rem);font-variant-numeric:tabular-nums;color:var(--kpt-color-on-surface-muted)}}\n"] }]
|
|
4124
4387
|
}], () => [], { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], autoResize: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoResize", required: false }] }], 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 }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], counter: [{ type: i0.Input, args: [{ isSignal: true, alias: "counter", 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"] }], ta: [{ type: i0.ViewChild, args: ['ta', { isSignal: true }] }] }); })();
|
|
4125
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptTextarea, { className: "KptTextarea", filePath: "lib/textarea/textarea.component.ts", lineNumber:
|
|
4126
|
-
|
|
4127
|
-
/** Elementy, które same przyjmują fokus — na nie trafia `aria-describedby`. */
|
|
4128
|
-
const FOCUSABLE$2 = 'a[href], button, input, select, textarea, [tabindex]:not([tabindex="-1"])';
|
|
4129
|
-
/** Ile czasu ma wskaźnik na przejście z hosta na dymek, zanim ten zniknie (WCAG 1.4.13). */
|
|
4130
|
-
const HIDE_DELAY_MS = 120;
|
|
4131
|
-
let nextId$f = 0;
|
|
4132
|
-
/**
|
|
4133
|
-
* Dymek podpowiedzi (tooltip) pokazywany na hover/focus hosta. Lekki — element dodawany
|
|
4134
|
-
* do `body` i pozycjonowany względem hosta (działa w trybie zoneless).
|
|
4135
|
-
*
|
|
4136
|
-
* Dostępność:
|
|
4137
|
-
* - fokus łapiemy przez `focusin`/`focusout`, bo `focus`/`blur` nie bąbelkują — na
|
|
4138
|
-
* `kpt-button` czy `kpt-icon-button` fokus dostaje wewnętrzny `<button>`, nie host;
|
|
4139
|
-
* - tekst trafia do czytników przez trwały, ukryty opis powiązany `aria-describedby`
|
|
4140
|
-
* z elementem, który faktycznie przyjmuje fokus (sam dymek powstaje dopiero przy pokazaniu,
|
|
4141
|
-
* więc nie da się go wskazać wcześniej). Opisu nie dodajemy, gdy powtarzałby nazwę elementu
|
|
4142
|
-
* albo przy `kptTooltipOnlyWhenTruncated` — tam dymek pokazuje tekst, który i tak jest w DOM-ie;
|
|
4143
|
-
* - `Escape` zamyka dymek, a wskaźnik może na niego przejść bez zniknięcia (WCAG 1.4.13).
|
|
4144
|
-
*
|
|
4145
|
-
* @example
|
|
4146
|
-
* <kpt-button kptTooltip="Zapisz zmiany" kptTooltipPosition="bottom">Zapisz</kpt-button>
|
|
4147
|
-
*
|
|
4148
|
-
* @example Dymek tylko wtedy, gdy tekst nie mieści się w elemencie:
|
|
4149
|
-
* <span class="ellipsis" [kptTooltip]="name" kptTooltipOnlyWhenTruncated>{{ name }}</span>
|
|
4150
|
-
*/
|
|
4151
|
-
class KptTooltip {
|
|
4152
|
-
constructor() {
|
|
4153
|
-
this.text = input.required({ ...(ngDevMode ? { debugName: "text" } : /* istanbul ignore next */ {}), alias: 'kptTooltip' });
|
|
4154
|
-
this.position = input('top', { ...(ngDevMode ? { debugName: "position" } : /* istanbul ignore next */ {}), alias: 'kptTooltipPosition' });
|
|
4155
|
-
this.onlyWhenTruncated = input(false, { ...(ngDevMode ? { debugName: "onlyWhenTruncated" } : /* istanbul ignore next */ {}), alias: 'kptTooltipOnlyWhenTruncated',
|
|
4156
|
-
transform: booleanAttribute });
|
|
4157
|
-
this.host = inject(ElementRef);
|
|
4158
|
-
this.descId = `kpt-tooltip-desc-${++nextId$f}`;
|
|
4159
|
-
this.follow = () => this.reposition();
|
|
4160
|
-
this.onKeydown = (event) => {
|
|
4161
|
-
if (event.key === 'Escape')
|
|
4162
|
-
this.hide();
|
|
4163
|
-
};
|
|
4164
|
-
// Po renderze, bo wewnętrzny `<button>` komponentu-hosta istnieje dopiero wtedy.
|
|
4165
|
-
// Efekt czyta `text()` i `onlyWhenTruncated()`, więc zmiana treści aktualizuje opis.
|
|
4166
|
-
afterRenderEffect(() => this.syncDescription(this.text(), this.onlyWhenTruncated()));
|
|
4167
|
-
}
|
|
4168
|
-
show() {
|
|
4169
|
-
this.cancelHide();
|
|
4170
|
-
if (this.tip || !this.text())
|
|
4171
|
-
return;
|
|
4172
|
-
// Sprawdzamy dopiero teraz, a nie przy renderze: dzięki temu wynik jest zawsze
|
|
4173
|
-
// aktualny po zmianie szerokości czy powiększenia, bez żadnych obserwatorów.
|
|
4174
|
-
if (this.onlyWhenTruncated() && !this.isTruncated())
|
|
4175
|
-
return;
|
|
4176
|
-
const tip = document.createElement('div');
|
|
4177
|
-
tip.className = 'kpt-tooltip';
|
|
4178
|
-
tip.setAttribute('role', 'tooltip');
|
|
4179
|
-
// Treść czytnik dostaje z trwałego opisu — dymek by ją zdublował.
|
|
4180
|
-
if (this.desc)
|
|
4181
|
-
tip.setAttribute('aria-hidden', 'true');
|
|
4182
|
-
tip.textContent = this.text();
|
|
4183
|
-
tip.style.cssText =
|
|
4184
|
-
'position:fixed;z-index:1400;max-width:16rem;padding:0.35rem 0.6rem;' +
|
|
4185
|
-
'border-radius:var(--kpt-radius-sm,0.25rem);font-size:var(--kpt-font-size-xs,0.75rem);' +
|
|
4186
|
-
'line-height:1.4;background:var(--kpt-color-on-surface);color:var(--kpt-color-surface);' +
|
|
4187
|
-
'box-shadow:var(--kpt-elevation-2);opacity:0;transition:opacity 120ms;';
|
|
4188
|
-
// Wskaźnik może przejść na dymek (np. żeby go powiększyć lupą) — wtedy dymek zostaje.
|
|
4189
|
-
tip.addEventListener('mouseenter', () => this.cancelHide());
|
|
4190
|
-
tip.addEventListener('mouseleave', () => this.scheduleHide());
|
|
4191
|
-
document.body.appendChild(tip);
|
|
4192
|
-
this.tip = tip;
|
|
4193
|
-
this.reposition();
|
|
4194
|
-
// Faza przechwytywania łapie także przewijanie zagnieżdżonych kontenerów
|
|
4195
|
-
// (np. osi roadmapy), bo zdarzenie `scroll` elementu się nie propaguje.
|
|
4196
|
-
window.addEventListener('scroll', this.follow, true);
|
|
4197
|
-
window.addEventListener('resize', this.follow);
|
|
4198
|
-
document.addEventListener('keydown', this.onKeydown);
|
|
4199
|
-
requestAnimationFrame(() => {
|
|
4200
|
-
if (this.tip)
|
|
4201
|
-
this.tip.style.opacity = '1';
|
|
4202
|
-
});
|
|
4203
|
-
}
|
|
4204
|
-
/** Fokus przeszedł do innego elementu w obrębie hosta — dymek zostaje. */
|
|
4205
|
-
onFocusOut(event) {
|
|
4206
|
-
const next = event.relatedTarget;
|
|
4207
|
-
if (next && this.host.nativeElement.contains(next))
|
|
4208
|
-
return;
|
|
4209
|
-
this.hide();
|
|
4210
|
-
}
|
|
4211
|
-
scheduleHide() {
|
|
4212
|
-
this.cancelHide();
|
|
4213
|
-
this.hideTimer = setTimeout(() => this.hide(), HIDE_DELAY_MS);
|
|
4214
|
-
}
|
|
4215
|
-
cancelHide() {
|
|
4216
|
-
if (this.hideTimer !== undefined)
|
|
4217
|
-
clearTimeout(this.hideTimer);
|
|
4218
|
-
this.hideTimer = undefined;
|
|
4219
|
-
}
|
|
4220
|
-
hide() {
|
|
4221
|
-
this.cancelHide();
|
|
4222
|
-
window.removeEventListener('scroll', this.follow, true);
|
|
4223
|
-
window.removeEventListener('resize', this.follow);
|
|
4224
|
-
document.removeEventListener('keydown', this.onKeydown);
|
|
4225
|
-
this.tip?.remove();
|
|
4226
|
-
this.tip = undefined;
|
|
4227
|
-
}
|
|
4228
|
-
/** Trwały opis dla czytników albo jego usunięcie, gdy nie jest potrzebny. */
|
|
4229
|
-
syncDescription(text, onlyWhenTruncated) {
|
|
4230
|
-
const target = this.focusTarget();
|
|
4231
|
-
const name = (target.getAttribute('aria-label') ?? target.textContent ?? '').trim();
|
|
4232
|
-
if (!text || onlyWhenTruncated || name === text.trim()) {
|
|
4233
|
-
this.removeDescription();
|
|
4234
|
-
return;
|
|
4235
|
-
}
|
|
4236
|
-
if (!this.desc) {
|
|
4237
|
-
const desc = document.createElement('span');
|
|
4238
|
-
desc.id = this.descId;
|
|
4239
|
-
desc.hidden = true;
|
|
4240
|
-
document.body.appendChild(desc);
|
|
4241
|
-
this.desc = desc;
|
|
4242
|
-
}
|
|
4243
|
-
this.desc.textContent = text;
|
|
4244
|
-
if (this.describedEl !== target) {
|
|
4245
|
-
this.unlink();
|
|
4246
|
-
const ids = (target.getAttribute('aria-describedby') ?? '').split(/\s+/).filter(Boolean);
|
|
4247
|
-
if (!ids.includes(this.descId))
|
|
4248
|
-
ids.push(this.descId);
|
|
4249
|
-
target.setAttribute('aria-describedby', ids.join(' '));
|
|
4250
|
-
this.describedEl = target;
|
|
4251
|
-
}
|
|
4252
|
-
}
|
|
4253
|
-
removeDescription() {
|
|
4254
|
-
this.unlink();
|
|
4255
|
-
this.desc?.remove();
|
|
4256
|
-
this.desc = undefined;
|
|
4257
|
-
}
|
|
4258
|
-
unlink() {
|
|
4259
|
-
const el = this.describedEl;
|
|
4260
|
-
if (!el)
|
|
4261
|
-
return;
|
|
4262
|
-
const ids = (el.getAttribute('aria-describedby') ?? '').split(/\s+/).filter((id) => id && id !== this.descId);
|
|
4263
|
-
if (ids.length)
|
|
4264
|
-
el.setAttribute('aria-describedby', ids.join(' '));
|
|
4265
|
-
else
|
|
4266
|
-
el.removeAttribute('aria-describedby');
|
|
4267
|
-
this.describedEl = undefined;
|
|
4268
|
-
}
|
|
4269
|
-
/** Host, jeśli sam przyjmuje fokus, inaczej pierwsza kontrolka w środku, a w ostateczności host. */
|
|
4270
|
-
focusTarget() {
|
|
4271
|
-
const root = this.host.nativeElement;
|
|
4272
|
-
if (root.matches(FOCUSABLE$2))
|
|
4273
|
-
return root;
|
|
4274
|
-
return root.querySelector(FOCUSABLE$2) ?? root;
|
|
4275
|
-
}
|
|
4276
|
-
isTruncated() {
|
|
4277
|
-
const root = this.host.nativeElement;
|
|
4278
|
-
const overflows = (el) =>
|
|
4279
|
-
// Tolerancja 1 px pochłania zaokrąglenia subpikselowe przy skalowaniu.
|
|
4280
|
-
el.scrollWidth > el.clientWidth + 1 || el.scrollHeight > el.clientHeight + 1;
|
|
4281
|
-
return overflows(root) || Array.from(root.children).some(overflows);
|
|
4282
|
-
}
|
|
4283
|
-
reposition() {
|
|
4284
|
-
const tip = this.tip;
|
|
4285
|
-
if (!tip)
|
|
4286
|
-
return;
|
|
4287
|
-
const r = this.host.nativeElement.getBoundingClientRect();
|
|
4288
|
-
const t = tip.getBoundingClientRect();
|
|
4289
|
-
const gap = 8;
|
|
4290
|
-
let top;
|
|
4291
|
-
let left;
|
|
4292
|
-
switch (this.position()) {
|
|
4293
|
-
case 'bottom':
|
|
4294
|
-
top = r.bottom + gap;
|
|
4295
|
-
left = r.left + r.width / 2 - t.width / 2;
|
|
4296
|
-
break;
|
|
4297
|
-
case 'left':
|
|
4298
|
-
top = r.top + r.height / 2 - t.height / 2;
|
|
4299
|
-
left = r.left - t.width - gap;
|
|
4300
|
-
break;
|
|
4301
|
-
case 'right':
|
|
4302
|
-
top = r.top + r.height / 2 - t.height / 2;
|
|
4303
|
-
left = r.right + gap;
|
|
4304
|
-
break;
|
|
4305
|
-
default:
|
|
4306
|
-
top = r.top - t.height - gap;
|
|
4307
|
-
left = r.left + r.width / 2 - t.width / 2;
|
|
4308
|
-
}
|
|
4309
|
-
tip.style.top = `${Math.max(4, top)}px`;
|
|
4310
|
-
tip.style.left = `${Math.max(4, left)}px`;
|
|
4311
|
-
}
|
|
4312
|
-
ngOnDestroy() {
|
|
4313
|
-
this.hide();
|
|
4314
|
-
this.removeDescription();
|
|
4315
|
-
}
|
|
4316
|
-
static { this.ɵfac = function KptTooltip_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptTooltip)(); }; }
|
|
4317
|
-
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: KptTooltip, selectors: [["", "kptTooltip", ""]], hostBindings: function KptTooltip_HostBindings(rf, ctx) { if (rf & 1) {
|
|
4318
|
-
i0.ɵɵlistener("mouseenter", function KptTooltip_mouseenter_HostBindingHandler() { return ctx.show(); })("mouseleave", function KptTooltip_mouseleave_HostBindingHandler() { return ctx.scheduleHide(); })("focusin", function KptTooltip_focusin_HostBindingHandler() { return ctx.show(); })("focusout", function KptTooltip_focusout_HostBindingHandler($event) { return ctx.onFocusOut($event); });
|
|
4319
|
-
} }, inputs: { text: [1, "kptTooltip", "text"], position: [1, "kptTooltipPosition", "position"], onlyWhenTruncated: [1, "kptTooltipOnlyWhenTruncated", "onlyWhenTruncated"] } }); }
|
|
4320
|
-
}
|
|
4321
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptTooltip, [{
|
|
4322
|
-
type: Directive,
|
|
4323
|
-
args: [{
|
|
4324
|
-
selector: '[kptTooltip]',
|
|
4325
|
-
host: {
|
|
4326
|
-
'(mouseenter)': 'show()',
|
|
4327
|
-
'(mouseleave)': 'scheduleHide()',
|
|
4328
|
-
'(focusin)': 'show()',
|
|
4329
|
-
'(focusout)': 'onFocusOut($event)',
|
|
4330
|
-
},
|
|
4331
|
-
}]
|
|
4332
|
-
}], () => [], { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptTooltip", required: true }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptTooltipPosition", required: false }] }], onlyWhenTruncated: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptTooltipOnlyWhenTruncated", required: false }] }] }); })();
|
|
4388
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptTextarea, { className: "KptTextarea", filePath: "lib/textarea/textarea.component.ts", lineNumber: 56 }); })();
|
|
4333
4389
|
|
|
4334
4390
|
/*
|
|
4335
4391
|
* Nawigacja strzałkami po poziomym rzędzie z jednym przystankiem Tab („roving tabindex”) —
|