@kaufmann-lab/ui 0.1.32 → 0.1.35
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/fesm2022/kaufmann-lab-ui-business.mjs +58 -5
- package/fesm2022/kaufmann-lab-ui-business.mjs.map +1 -1
- package/fesm2022/kaufmann-lab-ui-core.mjs +165 -70
- package/fesm2022/kaufmann-lab-ui-core.mjs.map +1 -1
- package/package.json +1 -1
- package/types/kaufmann-lab-ui-business.d.ts +53 -3
- package/types/kaufmann-lab-ui-core.d.ts +66 -8
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DOCUMENT, NgTemplateOutlet } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { input, booleanAttribute, inject, computed, effect, Component, viewChild, model, afterRenderEffect, untracked, isDevMode,
|
|
3
|
+
import { input, booleanAttribute, inject, computed, effect, Component, viewChild, ViewContainerRef, Injector, DestroyRef, afterNextRender, model, afterRenderEffect, untracked, isDevMode, HostListener, TemplateRef, contentChild, ElementRef, output, signal as signal$1, ChangeDetectionStrategy, numberAttribute, Directive, contentChildren, forwardRef, viewChildren, Input as Input$1, Injectable } from '@angular/core';
|
|
4
4
|
import { FocusTrapFactory } from '@angular/cdk/a11y';
|
|
5
|
-
import {
|
|
5
|
+
import { Overlay, OverlayContainer } from '@angular/cdk/overlay';
|
|
6
6
|
import { TemplatePortal, ComponentPortal } from '@angular/cdk/portal';
|
|
7
7
|
import { Subscription } from 'rxjs';
|
|
8
8
|
import * as i1 from '@angular/forms';
|
|
@@ -1473,6 +1473,48 @@ function installModalAwareOverlayContainer(container) {
|
|
|
1473
1473
|
});
|
|
1474
1474
|
}
|
|
1475
1475
|
|
|
1476
|
+
/**
|
|
1477
|
+
* Monta una plantilla (típicamente un `kf-drawer side="bottom"`) en el contenedor
|
|
1478
|
+
* de overlays de CDK, fuera del DOM del componente que la declara. Un
|
|
1479
|
+
* `position: fixed` dentro de un ancestro con `container-type`, `transform` o
|
|
1480
|
+
* `contain` se mide contra ese ancestro y no contra la ventana; en el contenedor
|
|
1481
|
+
* de overlays no.
|
|
1482
|
+
*
|
|
1483
|
+
* La plantilla se monta una sola vez, la primera vez que se pide (`mount`), y
|
|
1484
|
+
* queda montada hasta que el componente se destruye o se pide `unmount`. `afterMount` corre tras el
|
|
1485
|
+
* siguiente render, cuando la hoja ya existe cerrada: abrirla ahí hace que entre
|
|
1486
|
+
* con su deslizamiento en vez de aparecer ya abierta.
|
|
1487
|
+
*
|
|
1488
|
+
* Debe construirse en un contexto de inyección (campo de un componente).
|
|
1489
|
+
*/
|
|
1490
|
+
class SheetPortal {
|
|
1491
|
+
overlay = inject(Overlay);
|
|
1492
|
+
viewContainerRef = inject(ViewContainerRef);
|
|
1493
|
+
injector = inject(Injector);
|
|
1494
|
+
overlayRef = null;
|
|
1495
|
+
constructor() {
|
|
1496
|
+
inject(DestroyRef).onDestroy(() => this.overlayRef?.dispose());
|
|
1497
|
+
}
|
|
1498
|
+
/** `true` si la plantilla ya estaba montada; si no, la monta y llama `afterMount` más tarde. */
|
|
1499
|
+
mount(template, afterMount) {
|
|
1500
|
+
if (this.overlayRef) {
|
|
1501
|
+
return true;
|
|
1502
|
+
}
|
|
1503
|
+
this.overlayRef = this.overlay.create({
|
|
1504
|
+
positionStrategy: this.overlay.position().global(),
|
|
1505
|
+
scrollStrategy: this.overlay.scrollStrategies.noop(),
|
|
1506
|
+
});
|
|
1507
|
+
this.overlayRef.attach(new TemplatePortal(template, this.viewContainerRef));
|
|
1508
|
+
afterNextRender(afterMount, { injector: this.injector });
|
|
1509
|
+
return false;
|
|
1510
|
+
}
|
|
1511
|
+
/** Retira la plantilla del contenedor de overlays; un `mount` posterior la monta de nuevo. */
|
|
1512
|
+
unmount() {
|
|
1513
|
+
this.overlayRef?.dispose();
|
|
1514
|
+
this.overlayRef = null;
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1476
1518
|
let nextId$6 = 0;
|
|
1477
1519
|
/** Controles que, al recibir el `pointerdown`, no deben iniciar el arrastre de la hoja. */
|
|
1478
1520
|
const DRAG_IGNORED_TARGETS = 'button, a[href], input, select, textarea, [role="button"], [contenteditable="true"]';
|
|
@@ -1568,9 +1610,34 @@ const DRAG_IGNORED_TARGETS = 'button, a[href], input, select, textarea, [role="b
|
|
|
1568
1610
|
* El panel y el telón son `position: fixed` dentro del propio componente. Un
|
|
1569
1611
|
* ancestro con `container-type`, `transform`, `filter` o `contain` pasa a ser
|
|
1570
1612
|
* su bloque contenedor: el drawer se mide contra ese ancestro y no contra la
|
|
1571
|
-
* ventana. Hay
|
|
1572
|
-
* `kf-date-field` y `kf-time-field` no tienen
|
|
1573
|
-
* en el contenedor de overlays de CDK.
|
|
1613
|
+
* ventana. Hay dos salidas: colocarlo fuera de esos contenedores o activar
|
|
1614
|
+
* `mountInOverlay`. `kf-action-menu`, `kf-date-field` y `kf-time-field` no tienen
|
|
1615
|
+
* esta limitación: montan su hoja en el contenedor de overlays de CDK.
|
|
1616
|
+
*
|
|
1617
|
+
* ## `mountInOverlay`
|
|
1618
|
+
*
|
|
1619
|
+
* Con `mountInOverlay`, el telón y el panel se montan en el contenedor de
|
|
1620
|
+
* overlays de CDK (hijo de `<body>`) en vez de dentro del componente, así un
|
|
1621
|
+
* ancestro con `container-type`, `transform`, `filter` o `contain` ya no
|
|
1622
|
+
* captura su posicionamiento `fixed`: el panel se ancla a la ventana. Foco
|
|
1623
|
+
* atrapado, Escape, telón, devolución de foco, `size`, `sheetSize`, arrastre de
|
|
1624
|
+
* la hoja y áreas seguras funcionan igual; `[(open)]` y el contenido proyectado
|
|
1625
|
+
* siguen declarándose donde se escribe `<kf-drawer>`. Sin el input el drawer
|
|
1626
|
+
* queda inline, como siempre.
|
|
1627
|
+
*
|
|
1628
|
+
* <section class="tarjeta" style="container-type: inline-size">
|
|
1629
|
+
* <kf-drawer [(open)]="open" role="dialog" side="right" title="Detalle" mountInOverlay>
|
|
1630
|
+
* ...
|
|
1631
|
+
* </kf-drawer>
|
|
1632
|
+
* </section>
|
|
1633
|
+
*
|
|
1634
|
+
* Qué cambia al montarlo así: el DOM del panel deja de ser descendiente del
|
|
1635
|
+
* `<kf-drawer>` (no le llegan variables CSS, atributos de tema ni estilos heredados de un
|
|
1636
|
+
* ancestro: usa `size`/`sheetSize`, o declara la variable en `:root`; la
|
|
1637
|
+
* tipografía del panel es `--kf-font-body`); y un panel
|
|
1638
|
+
* flotante abierto desde dentro (`kf-select`, `kf-dropdown`) queda en el
|
|
1639
|
+
* contenedor de overlays, junto al panel y no dentro de él. Se puede cambiar en
|
|
1640
|
+
* vida: al volver a `false` el drawer regresa al flujo del componente.
|
|
1574
1641
|
*/
|
|
1575
1642
|
class Drawer {
|
|
1576
1643
|
/** Visibilidad del panel, two-way: `[(open)]="menuOpen"`. */
|
|
@@ -1624,6 +1691,13 @@ class Drawer {
|
|
|
1624
1691
|
*/
|
|
1625
1692
|
closeOnBack = input(false, /* @ts-ignore */
|
|
1626
1693
|
...(ngDevMode ? [{ debugName: "closeOnBack" }] : /* istanbul ignore next */ []));
|
|
1694
|
+
/**
|
|
1695
|
+
* Monta el telón y el panel en el contenedor de overlays de CDK en vez de dentro del
|
|
1696
|
+
* componente, para que un ancestro con `container-type`, `transform`, `filter` o
|
|
1697
|
+
* `contain` no capture su posicionamiento `fixed`. Default `false` (inline). Ver el
|
|
1698
|
+
* JSDoc de la clase.
|
|
1699
|
+
*/
|
|
1700
|
+
mountInOverlay = input(false, { ...(ngDevMode ? { debugName: "mountInOverlay" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1627
1701
|
/** `ariaLabel` o, sin él, el default según el rol. */
|
|
1628
1702
|
resolvedAriaLabel = computed(() => this.ariaLabel() ?? (this.role() === 'dialog' ? 'Diálogo' : 'Menú'), /* @ts-ignore */
|
|
1629
1703
|
...(ngDevMode ? [{ debugName: "resolvedAriaLabel" }] : /* istanbul ignore next */ []));
|
|
@@ -1631,8 +1705,12 @@ class Drawer {
|
|
|
1631
1705
|
resolvedCloseLabel = computed(() => this.closeLabel() ?? (this.role() === 'dialog' ? 'Cerrar' : 'Cerrar menú'), /* @ts-ignore */
|
|
1632
1706
|
...(ngDevMode ? [{ debugName: "resolvedCloseLabel" }] : /* istanbul ignore next */ []));
|
|
1633
1707
|
titleId = `kf-drawer-title-${nextId$6++}`;
|
|
1634
|
-
|
|
1708
|
+
/** Ausente solo un instante: con `mountInOverlay` la plantilla se monta tras el primer render. */
|
|
1709
|
+
panelRef = viewChild('panel', /* @ts-ignore */
|
|
1635
1710
|
...(ngDevMode ? [{ debugName: "panelRef" }] : /* istanbul ignore next */ []));
|
|
1711
|
+
contentTemplate = viewChild('content', /* @ts-ignore */
|
|
1712
|
+
...(ngDevMode ? [{ debugName: "contentTemplate" }] : /* istanbul ignore next */ []));
|
|
1713
|
+
portal = new SheetPortal();
|
|
1636
1714
|
focusTrapFactory = inject(FocusTrapFactory);
|
|
1637
1715
|
document = inject(DOCUMENT);
|
|
1638
1716
|
overlayContainer = inject(OverlayContainer);
|
|
@@ -1641,13 +1719,35 @@ class Drawer {
|
|
|
1641
1719
|
drag = null;
|
|
1642
1720
|
registeredPanel = null;
|
|
1643
1721
|
focusTrap = null;
|
|
1722
|
+
focusTrapPanel = null;
|
|
1644
1723
|
lastFocusedElement = null;
|
|
1645
1724
|
constructor() {
|
|
1646
1725
|
// Ver `modal-overlay-container.ts`: con `role="dialog"` los paneles
|
|
1647
1726
|
// flotantes (select, dropdown) deben vivir dentro del diálogo.
|
|
1648
1727
|
installModalAwareOverlayContainer(this.overlayContainer);
|
|
1649
1728
|
afterRenderEffect(() => {
|
|
1650
|
-
const
|
|
1729
|
+
const template = this.contentTemplate();
|
|
1730
|
+
const inOverlay = this.mountInOverlay();
|
|
1731
|
+
untracked(() => {
|
|
1732
|
+
if (!template) {
|
|
1733
|
+
return;
|
|
1734
|
+
}
|
|
1735
|
+
if (inOverlay) {
|
|
1736
|
+
this.portal.mount(template, () => undefined);
|
|
1737
|
+
}
|
|
1738
|
+
else {
|
|
1739
|
+
this.portal.unmount();
|
|
1740
|
+
}
|
|
1741
|
+
});
|
|
1742
|
+
});
|
|
1743
|
+
afterRenderEffect(() => {
|
|
1744
|
+
const panel = this.panelRef()?.nativeElement;
|
|
1745
|
+
if (!panel) {
|
|
1746
|
+
return;
|
|
1747
|
+
}
|
|
1748
|
+
if (this.registeredPanel && this.registeredPanel !== panel) {
|
|
1749
|
+
unregisterOpenModalDialog(this.registeredPanel);
|
|
1750
|
+
}
|
|
1651
1751
|
this.registeredPanel = panel;
|
|
1652
1752
|
if (this.open() && this.role() === 'dialog') {
|
|
1653
1753
|
registerOpenModalDialog(panel);
|
|
@@ -1657,12 +1757,13 @@ class Drawer {
|
|
|
1657
1757
|
}
|
|
1658
1758
|
});
|
|
1659
1759
|
afterRenderEffect(() => {
|
|
1660
|
-
|
|
1760
|
+
const panel = this.panelRef()?.nativeElement;
|
|
1761
|
+
if (this.open() && panel) {
|
|
1661
1762
|
this.lastFocusedElement = this.document.activeElement;
|
|
1662
|
-
const trap = this.getOrCreateFocusTrap();
|
|
1763
|
+
const trap = this.getOrCreateFocusTrap(panel);
|
|
1663
1764
|
void trap.focusInitialElement();
|
|
1664
1765
|
}
|
|
1665
|
-
else {
|
|
1766
|
+
else if (!this.open()) {
|
|
1666
1767
|
this.focusTrap?.destroy();
|
|
1667
1768
|
this.focusTrap = null;
|
|
1668
1769
|
if (this.lastFocusedElement?.isConnected) {
|
|
@@ -1738,14 +1839,14 @@ class Drawer {
|
|
|
1738
1839
|
catch {
|
|
1739
1840
|
// Un puntero sintético no se puede capturar: el arrastre sigue por los eventos del propio elemento.
|
|
1740
1841
|
}
|
|
1741
|
-
this.panelRef()
|
|
1842
|
+
this.panelRef()?.nativeElement.style.setProperty('transition', 'none');
|
|
1742
1843
|
}
|
|
1743
1844
|
onDragMove(event) {
|
|
1744
1845
|
if (!this.drag || event.pointerId !== this.drag.pointerId) {
|
|
1745
1846
|
return;
|
|
1746
1847
|
}
|
|
1747
1848
|
this.drag.dy = Math.max(0, event.clientY - this.drag.startY);
|
|
1748
|
-
this.panelRef()
|
|
1849
|
+
this.panelRef()?.nativeElement.style.setProperty('transform', `translateY(${this.drag.dy}px)`);
|
|
1749
1850
|
}
|
|
1750
1851
|
onDragEnd(event) {
|
|
1751
1852
|
const drag = this.drag;
|
|
@@ -1753,7 +1854,10 @@ class Drawer {
|
|
|
1753
1854
|
return;
|
|
1754
1855
|
}
|
|
1755
1856
|
this.drag = null;
|
|
1756
|
-
const panel = this.panelRef()
|
|
1857
|
+
const panel = this.panelRef()?.nativeElement;
|
|
1858
|
+
if (!panel) {
|
|
1859
|
+
return;
|
|
1860
|
+
}
|
|
1757
1861
|
const elapsed = Math.max(1, performance.now() - drag.startTime);
|
|
1758
1862
|
const threshold = Math.min(80, panel.getBoundingClientRect().height * 0.25);
|
|
1759
1863
|
const shouldClose = drag.dy > threshold || (drag.dy > 24 && drag.dy / elapsed > 0.5);
|
|
@@ -1768,22 +1872,27 @@ class Drawer {
|
|
|
1768
1872
|
return;
|
|
1769
1873
|
}
|
|
1770
1874
|
this.drag = null;
|
|
1771
|
-
const panel = this.panelRef()
|
|
1772
|
-
panel
|
|
1773
|
-
panel
|
|
1875
|
+
const panel = this.panelRef()?.nativeElement;
|
|
1876
|
+
panel?.style.removeProperty('transition');
|
|
1877
|
+
panel?.style.removeProperty('transform');
|
|
1774
1878
|
}
|
|
1775
|
-
getOrCreateFocusTrap() {
|
|
1879
|
+
getOrCreateFocusTrap(panel) {
|
|
1880
|
+
if (this.focusTrap && this.focusTrapPanel !== panel) {
|
|
1881
|
+
this.focusTrap.destroy();
|
|
1882
|
+
this.focusTrap = null;
|
|
1883
|
+
}
|
|
1776
1884
|
if (!this.focusTrap) {
|
|
1777
|
-
this.focusTrap = this.focusTrapFactory.create(
|
|
1885
|
+
this.focusTrap = this.focusTrapFactory.create(panel);
|
|
1886
|
+
this.focusTrapPanel = panel;
|
|
1778
1887
|
}
|
|
1779
1888
|
return this.focusTrap;
|
|
1780
1889
|
}
|
|
1781
1890
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: Drawer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1782
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: Drawer, isStandalone: true, selector: "kf-drawer", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, sheetSize: { classPropertyName: "sheetSize", publicName: "sheetSize", isSignal: true, isRequired: false, transformFunction: null }, swipeToClose: { classPropertyName: "swipeToClose", publicName: "swipeToClose", isSignal: true, isRequired: false, transformFunction: null }, closeOnBack: { classPropertyName: "closeOnBack", publicName: "closeOnBack", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { listeners: { "window:popstate": "onPopState()", "document:keydown.escape": "onEscape($event)" }, properties: { "attr.role": "null", "attr.title": "null" } }, viewQueries: [{ propertyName: "panelRef", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (open()) {\n
|
|
1891
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: Drawer, isStandalone: true, selector: "kf-drawer", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, sheetSize: { classPropertyName: "sheetSize", publicName: "sheetSize", isSignal: true, isRequired: false, transformFunction: null }, swipeToClose: { classPropertyName: "swipeToClose", publicName: "swipeToClose", isSignal: true, isRequired: false, transformFunction: null }, closeOnBack: { classPropertyName: "closeOnBack", publicName: "closeOnBack", isSignal: true, isRequired: false, transformFunction: null }, mountInOverlay: { classPropertyName: "mountInOverlay", publicName: "mountInOverlay", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { listeners: { "window:popstate": "onPopState()", "document:keydown.escape": "onEscape($event)" }, properties: { "attr.role": "null", "attr.title": "null" } }, viewQueries: [{ propertyName: "panelRef", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "contentTemplate", first: true, predicate: ["content"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Backdrop y panel van en una plantilla: inline dentro del propio componente\n (default) o, con `mountInOverlay`, montados en el contenedor de overlays de\n CDK para escapar de un ancestro con `container-type`, `transform` o `contain`. -->\n<ng-template #content>\n @if (open()) {\n <button\n type=\"button\"\n class=\"kf-drawer__overlay\"\n [attr.aria-label]=\"resolvedCloseLabel()\"\n [attr.tabindex]=\"role() === 'dialog' ? -1 : null\"\n (click)=\"open.set(false)\"\n ></button>\n }\n\n <!-- Un <div> con rol expl\u00EDcito (no <nav>): un mismo panel puede ser\n navegaci\u00F3n o di\u00E1logo, y <nav> no admite role=\"dialog\". -->\n <div\n #panel\n class=\"kf-drawer__panel\"\n [class.kf-drawer__panel--open]=\"open()\"\n [class.kf-drawer__panel--right]=\"side() === 'right'\"\n [class.kf-drawer__panel--bottom]=\"side() === 'bottom'\"\n [class.kf-drawer__panel--size-md]=\"side() !== 'bottom' && size() === 'md'\"\n [class.kf-drawer__panel--size-lg]=\"side() !== 'bottom' && size() === 'lg'\"\n [class.kf-drawer__panel--sheet-full]=\"side() === 'bottom' && sheetSize() === 'full'\"\n [class.kf-drawer__panel--dialog]=\"role() === 'dialog'\"\n [class.kf-drawer__panel--overlay]=\"mountInOverlay()\"\n [attr.role]=\"role()\"\n [attr.aria-modal]=\"role() === 'dialog' ? 'true' : null\"\n [attr.aria-label]=\"title() ? null : resolvedAriaLabel()\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n [attr.aria-hidden]=\"!open()\"\n >\n @if (side() === 'bottom') {\n <div\n class=\"kf-drawer__grip\"\n aria-hidden=\"true\"\n (pointerdown)=\"onDragStart($event)\"\n (pointermove)=\"onDragMove($event)\"\n (pointerup)=\"onDragEnd($event)\"\n (pointercancel)=\"onDragCancel()\"\n ></div>\n }\n @if (title(); as titleText) {\n <div\n class=\"kf-drawer__titlebar\"\n (pointerdown)=\"onDragStart($event)\"\n (pointermove)=\"onDragMove($event)\"\n (pointerup)=\"onDragEnd($event)\"\n (pointercancel)=\"onDragCancel()\"\n >\n <h2 class=\"kf-drawer__title\" [id]=\"titleId\">{{ titleText }}</h2>\n <kf-button\n class=\"kf-drawer__close\"\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n icon=\"x\"\n [ariaLabel]=\"resolvedCloseLabel()\"\n (click)=\"open.set(false)\"\n />\n </div>\n }\n <div class=\"kf-drawer__header\"><ng-content select=\"[kf-drawer-header]\" /></div>\n <div class=\"kf-drawer__body\"><ng-content /></div>\n <div class=\"kf-drawer__footer\"><ng-content select=\"[kf-drawer-footer]\" /></div>\n </div>\n</ng-template>\n\n@if (!mountInOverlay()) {\n <ng-container [ngTemplateOutlet]=\"content\" />\n}\n", styles: [".kf-drawer__overlay{position:fixed;inset:0;border:none;padding:0;cursor:pointer;background:#171d2566;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);z-index:39}.kf-drawer__panel{position:fixed;top:0;left:0;bottom:0;z-index:40;display:flex;flex-direction:column;width:82%;max-width:320px;background:var(--kf-color-white);box-shadow:8px 0 24px -8px #1018284d;transform:translate(-100%);visibility:hidden;transition:transform .24s cubic-bezier(.32,.72,0,1),visibility 0s linear .24s}.kf-drawer__panel--overlay{font-family:var(--kf-font-body)}.kf-drawer__panel--right{left:auto;right:0;box-shadow:-8px 0 24px -8px #1018284d;transform:translate(100%)}.kf-drawer__panel--dialog{width:min(var(--kf-drawer-width, 480px),100vw);max-width:none}@media(max-width:640px){.kf-drawer__panel--dialog{width:100vw}}.kf-drawer__panel--size-md{width:min(var(--kf-drawer-width-md, 640px),94vw);max-width:none}.kf-drawer__panel--size-lg{width:min(var(--kf-drawer-width-lg, 880px),70vw);max-width:none}@media(max-width:600px){.kf-drawer__panel--size-md,.kf-drawer__panel--size-lg{width:100vw}}.kf-drawer__panel--bottom{top:auto;right:0;width:100%;max-width:none;max-height:80vh;border-radius:var(--kf-radius-lg) var(--kf-radius-lg) 0 0;box-shadow:var(--kf-shadow-lg);padding-bottom:env(safe-area-inset-bottom,0px);padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px);transform:translateY(100%)}.kf-drawer__panel--sheet-full{height:100vh;height:100dvh;max-height:none;border-radius:0}@media(orientation:landscape)and (max-height:500px){.kf-drawer__panel--bottom:not(.kf-drawer__panel--sheet-full){max-height:94vh}}.kf-drawer__panel--bottom .kf-drawer__grip,.kf-drawer__panel--bottom .kf-drawer__titlebar{touch-action:none}.kf-drawer__panel--open{transform:none;visibility:visible;transition:transform .24s cubic-bezier(.32,.72,0,1),visibility 0s linear 0s}.kf-drawer__panel--bottom.kf-drawer__panel--open{transform:none}@media(prefers-reduced-motion:reduce){.kf-drawer__panel,.kf-drawer__panel--open{transition:none}}.kf-drawer__grip{position:relative;flex:none;align-self:center;width:36px;height:4px;margin-top:var(--kf-space-sm);border-radius:var(--kf-radius-pill);background:var(--kf-color-border-strong)}.kf-drawer__grip:before{content:\"\";position:absolute;inset:-12px -32px}.kf-drawer__titlebar{flex:none;display:flex;align-items:center;justify-content:space-between;gap:var(--kf-space-sm);padding:var(--kf-space-sm) var(--kf-space-sm) var(--kf-space-sm) var(--kf-space-lg);border-bottom:1px solid var(--kf-color-border)}.kf-drawer__title{margin:0;min-width:0;font-family:var(--kf-font-title);font-size:var(--kf-font-size-title-sm);font-weight:700;line-height:1.25;color:var(--kf-color-ink)}.kf-drawer__close{flex:none}@media(pointer:coarse),(max-width:760px){.kf-drawer__close{--kf-button-min-height: 44px;min-width:44px}}.kf-drawer__header:empty,.kf-drawer__footer:empty{display:none}.kf-drawer__header{padding:var(--kf-space-lg);background:var(--kf-color-tertiary-deep)}.kf-drawer__body{flex:1 1 auto;min-height:0;overscroll-behavior:contain;display:flex;flex-direction:column;gap:var(--kf-space-xs);padding:var(--kf-space-lg);overflow-y:auto}.kf-drawer__panel--dialog .kf-drawer__body{gap:var(--kf-space-lg)}.kf-drawer__footer{flex:none;padding:var(--kf-space-lg);border-top:1px solid var(--kf-color-border)}.kf-drawer__panel--dialog .kf-drawer__footer{padding:var(--kf-space-md) var(--kf-space-lg)}\n"], dependencies: [{ kind: "component", type: Button, selector: "kf-button", inputs: ["variant", "size", "shape", "disabled", "type", "icon", "block", "loading", "ariaLabel", "ariaExpanded", "ariaPressed", "ariaDisabled", "ariaControls", "ariaHaspopup"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
1783
1892
|
}
|
|
1784
1893
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: Drawer, decorators: [{
|
|
1785
1894
|
type: Component,
|
|
1786
|
-
args: [{ selector: 'kf-drawer', imports: [Button], host: {
|
|
1895
|
+
args: [{ selector: 'kf-drawer', imports: [Button, NgTemplateOutlet], host: {
|
|
1787
1896
|
// `role` y `title` son inputs con nombre de atributo nativo: escritos
|
|
1788
1897
|
// como atributo estático (`role="dialog"`, `title="Filtros"`) Angular
|
|
1789
1898
|
// también los deja en el host, lo que anidaría dos diálogos y mostraría
|
|
@@ -1791,8 +1900,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
1791
1900
|
'[attr.role]': 'null',
|
|
1792
1901
|
'[attr.title]': 'null',
|
|
1793
1902
|
'(window:popstate)': 'onPopState()',
|
|
1794
|
-
}, template: "@if (open()) {\n
|
|
1795
|
-
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], closeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLabel", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], sheetSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "sheetSize", required: false }] }], swipeToClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "swipeToClose", required: false }] }], closeOnBack: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBack", required: false }] }], panelRef: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], onEscape: [{
|
|
1903
|
+
}, template: "<!-- Backdrop y panel van en una plantilla: inline dentro del propio componente\n (default) o, con `mountInOverlay`, montados en el contenedor de overlays de\n CDK para escapar de un ancestro con `container-type`, `transform` o `contain`. -->\n<ng-template #content>\n @if (open()) {\n <button\n type=\"button\"\n class=\"kf-drawer__overlay\"\n [attr.aria-label]=\"resolvedCloseLabel()\"\n [attr.tabindex]=\"role() === 'dialog' ? -1 : null\"\n (click)=\"open.set(false)\"\n ></button>\n }\n\n <!-- Un <div> con rol expl\u00EDcito (no <nav>): un mismo panel puede ser\n navegaci\u00F3n o di\u00E1logo, y <nav> no admite role=\"dialog\". -->\n <div\n #panel\n class=\"kf-drawer__panel\"\n [class.kf-drawer__panel--open]=\"open()\"\n [class.kf-drawer__panel--right]=\"side() === 'right'\"\n [class.kf-drawer__panel--bottom]=\"side() === 'bottom'\"\n [class.kf-drawer__panel--size-md]=\"side() !== 'bottom' && size() === 'md'\"\n [class.kf-drawer__panel--size-lg]=\"side() !== 'bottom' && size() === 'lg'\"\n [class.kf-drawer__panel--sheet-full]=\"side() === 'bottom' && sheetSize() === 'full'\"\n [class.kf-drawer__panel--dialog]=\"role() === 'dialog'\"\n [class.kf-drawer__panel--overlay]=\"mountInOverlay()\"\n [attr.role]=\"role()\"\n [attr.aria-modal]=\"role() === 'dialog' ? 'true' : null\"\n [attr.aria-label]=\"title() ? null : resolvedAriaLabel()\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n [attr.aria-hidden]=\"!open()\"\n >\n @if (side() === 'bottom') {\n <div\n class=\"kf-drawer__grip\"\n aria-hidden=\"true\"\n (pointerdown)=\"onDragStart($event)\"\n (pointermove)=\"onDragMove($event)\"\n (pointerup)=\"onDragEnd($event)\"\n (pointercancel)=\"onDragCancel()\"\n ></div>\n }\n @if (title(); as titleText) {\n <div\n class=\"kf-drawer__titlebar\"\n (pointerdown)=\"onDragStart($event)\"\n (pointermove)=\"onDragMove($event)\"\n (pointerup)=\"onDragEnd($event)\"\n (pointercancel)=\"onDragCancel()\"\n >\n <h2 class=\"kf-drawer__title\" [id]=\"titleId\">{{ titleText }}</h2>\n <kf-button\n class=\"kf-drawer__close\"\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n icon=\"x\"\n [ariaLabel]=\"resolvedCloseLabel()\"\n (click)=\"open.set(false)\"\n />\n </div>\n }\n <div class=\"kf-drawer__header\"><ng-content select=\"[kf-drawer-header]\" /></div>\n <div class=\"kf-drawer__body\"><ng-content /></div>\n <div class=\"kf-drawer__footer\"><ng-content select=\"[kf-drawer-footer]\" /></div>\n </div>\n</ng-template>\n\n@if (!mountInOverlay()) {\n <ng-container [ngTemplateOutlet]=\"content\" />\n}\n", styles: [".kf-drawer__overlay{position:fixed;inset:0;border:none;padding:0;cursor:pointer;background:#171d2566;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);z-index:39}.kf-drawer__panel{position:fixed;top:0;left:0;bottom:0;z-index:40;display:flex;flex-direction:column;width:82%;max-width:320px;background:var(--kf-color-white);box-shadow:8px 0 24px -8px #1018284d;transform:translate(-100%);visibility:hidden;transition:transform .24s cubic-bezier(.32,.72,0,1),visibility 0s linear .24s}.kf-drawer__panel--overlay{font-family:var(--kf-font-body)}.kf-drawer__panel--right{left:auto;right:0;box-shadow:-8px 0 24px -8px #1018284d;transform:translate(100%)}.kf-drawer__panel--dialog{width:min(var(--kf-drawer-width, 480px),100vw);max-width:none}@media(max-width:640px){.kf-drawer__panel--dialog{width:100vw}}.kf-drawer__panel--size-md{width:min(var(--kf-drawer-width-md, 640px),94vw);max-width:none}.kf-drawer__panel--size-lg{width:min(var(--kf-drawer-width-lg, 880px),70vw);max-width:none}@media(max-width:600px){.kf-drawer__panel--size-md,.kf-drawer__panel--size-lg{width:100vw}}.kf-drawer__panel--bottom{top:auto;right:0;width:100%;max-width:none;max-height:80vh;border-radius:var(--kf-radius-lg) var(--kf-radius-lg) 0 0;box-shadow:var(--kf-shadow-lg);padding-bottom:env(safe-area-inset-bottom,0px);padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px);transform:translateY(100%)}.kf-drawer__panel--sheet-full{height:100vh;height:100dvh;max-height:none;border-radius:0}@media(orientation:landscape)and (max-height:500px){.kf-drawer__panel--bottom:not(.kf-drawer__panel--sheet-full){max-height:94vh}}.kf-drawer__panel--bottom .kf-drawer__grip,.kf-drawer__panel--bottom .kf-drawer__titlebar{touch-action:none}.kf-drawer__panel--open{transform:none;visibility:visible;transition:transform .24s cubic-bezier(.32,.72,0,1),visibility 0s linear 0s}.kf-drawer__panel--bottom.kf-drawer__panel--open{transform:none}@media(prefers-reduced-motion:reduce){.kf-drawer__panel,.kf-drawer__panel--open{transition:none}}.kf-drawer__grip{position:relative;flex:none;align-self:center;width:36px;height:4px;margin-top:var(--kf-space-sm);border-radius:var(--kf-radius-pill);background:var(--kf-color-border-strong)}.kf-drawer__grip:before{content:\"\";position:absolute;inset:-12px -32px}.kf-drawer__titlebar{flex:none;display:flex;align-items:center;justify-content:space-between;gap:var(--kf-space-sm);padding:var(--kf-space-sm) var(--kf-space-sm) var(--kf-space-sm) var(--kf-space-lg);border-bottom:1px solid var(--kf-color-border)}.kf-drawer__title{margin:0;min-width:0;font-family:var(--kf-font-title);font-size:var(--kf-font-size-title-sm);font-weight:700;line-height:1.25;color:var(--kf-color-ink)}.kf-drawer__close{flex:none}@media(pointer:coarse),(max-width:760px){.kf-drawer__close{--kf-button-min-height: 44px;min-width:44px}}.kf-drawer__header:empty,.kf-drawer__footer:empty{display:none}.kf-drawer__header{padding:var(--kf-space-lg);background:var(--kf-color-tertiary-deep)}.kf-drawer__body{flex:1 1 auto;min-height:0;overscroll-behavior:contain;display:flex;flex-direction:column;gap:var(--kf-space-xs);padding:var(--kf-space-lg);overflow-y:auto}.kf-drawer__panel--dialog .kf-drawer__body{gap:var(--kf-space-lg)}.kf-drawer__footer{flex:none;padding:var(--kf-space-lg);border-top:1px solid var(--kf-color-border)}.kf-drawer__panel--dialog .kf-drawer__footer{padding:var(--kf-space-md) var(--kf-space-lg)}\n"] }]
|
|
1904
|
+
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], closeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLabel", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], sheetSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "sheetSize", required: false }] }], swipeToClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "swipeToClose", required: false }] }], closeOnBack: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBack", required: false }] }], mountInOverlay: [{ type: i0.Input, args: [{ isSignal: true, alias: "mountInOverlay", required: false }] }], panelRef: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], contentTemplate: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }], onEscape: [{
|
|
1796
1905
|
type: HostListener,
|
|
1797
1906
|
args: ['document:keydown.escape', ['$event']]
|
|
1798
1907
|
}] } });
|
|
@@ -2327,43 +2436,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
2327
2436
|
args: [{ selector: 'kf-dropdown-item', imports: [Badge, Icon], template: "<button\n type=\"button\"\n class=\"kf-dropdown-item\"\n [class.kf-dropdown-item--error]=\"tone() === 'error'\"\n [class.kf-dropdown-item--current]=\"current() || checked() === true\"\n [class.kf-dropdown-item--blocked]=\"blocked()\"\n [disabled]=\"disabled()\"\n [attr.aria-disabled]=\"blocked() ? 'true' : null\"\n [attr.aria-current]=\"current() ? 'true' : null\"\n [attr.aria-describedby]=\"blocked() ? reasonId : null\"\n [attr.role]=\"checked() === undefined ? 'menuitem' : 'menuitemradio'\"\n [attr.aria-checked]=\"checked() === undefined ? null : checked()\"\n (click)=\"onClick($event)\"\n>\n <ng-content select=\"[kf-dropdown-item-leading]\" />\n @if (icon()) {\n <kf-icon [name]=\"icon()!\" size=\"sm\" />\n }\n <span class=\"kf-dropdown-item__label\">\n <ng-content />\n @if (description()) {\n <span class=\"kf-dropdown-item__description\">{{ description() }}</span>\n }\n @if (disabledReason()) {\n <!-- Fuera del nombre accesible: se anuncia como descripci\u00F3n, no dos veces. -->\n <span class=\"kf-dropdown-item__reason\" [id]=\"reasonId\" aria-hidden=\"true\">{{\n disabledReason()\n }}</span>\n }\n </span>\n @if (badge()) {\n <kf-badge class=\"kf-dropdown-item__badge\" [tone]=\"badgeTone()\">{{ badge() }}</kf-badge>\n }\n</button>\n", styles: [":host{display:block}.kf-dropdown-item{display:flex;align-items:center;gap:var(--kf-space-sm);width:100%;min-height:var(--kf-control-min-height, auto);padding:var(--kf-space-sm) var(--kf-space-md);border:none;background:transparent;font:inherit;text-align:left;color:var(--kf-color-text);cursor:pointer}.kf-dropdown-item kf-icon{flex:none;color:var(--kf-color-text-muted)}.kf-dropdown-item__label{flex:1 1 auto}.kf-dropdown-item:hover{background:var(--kf-color-surface)}.kf-dropdown-item:focus-visible{outline:none;box-shadow:var(--kf-shadow-focus-inset)}.kf-dropdown-item:disabled{opacity:.55;cursor:not-allowed;pointer-events:none}.kf-dropdown-item--error{color:var(--kf-color-error-strong)}.kf-dropdown-item--error kf-icon{color:var(--kf-color-error-strong)}.kf-dropdown-item--error:hover{background:var(--kf-color-error-soft)}.kf-dropdown-item__description,.kf-dropdown-item__reason{display:block;font-size:var(--kf-font-size-caption);font-weight:400;color:var(--kf-color-text-muted)}.kf-dropdown-item__badge{flex:none}.kf-dropdown-item--current{background:var(--kf-color-primary-soft);font-weight:600}.kf-dropdown-item--current:hover{background:var(--kf-color-primary-soft)}.kf-dropdown-item--blocked{cursor:not-allowed}.kf-dropdown-item--blocked .kf-dropdown-item__label{opacity:.7}.kf-dropdown-item--blocked:hover{background:transparent}:host-context(.kf-dropdown-panel--dark) .kf-dropdown-item{color:#ffffffd9}:host-context(.kf-dropdown-panel--dark) .kf-dropdown-item kf-icon{color:#ffffff8c}:host-context(.kf-dropdown-panel--dark) .kf-dropdown-item:hover{background:#ffffff14}:host-context(.kf-dropdown-panel--dark) .kf-dropdown-item--error{color:var(--kf-color-error)}:host-context(.kf-dropdown-panel--dark) .kf-dropdown-item--error kf-icon{color:var(--kf-color-error)}:host-context(.kf-dropdown-panel--dark) .kf-dropdown-item--error:hover{background:#bc454529}\n"] }]
|
|
2328
2437
|
}], propDecorators: { tone: [{ type: i0.Input, args: [{ isSignal: true, alias: "tone", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], disabledReason: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledReason", required: false }] }], badge: [{ type: i0.Input, args: [{ isSignal: true, alias: "badge", required: false }] }], badgeTone: [{ type: i0.Input, args: [{ isSignal: true, alias: "badgeTone", required: false }] }], current: [{ type: i0.Input, args: [{ isSignal: true, alias: "current", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }] } });
|
|
2329
2438
|
|
|
2330
|
-
/**
|
|
2331
|
-
* Monta una plantilla (típicamente un `kf-drawer side="bottom"`) en el contenedor
|
|
2332
|
-
* de overlays de CDK, fuera del DOM del componente que la declara. Un
|
|
2333
|
-
* `position: fixed` dentro de un ancestro con `container-type`, `transform` o
|
|
2334
|
-
* `contain` se mide contra ese ancestro y no contra la ventana; en el contenedor
|
|
2335
|
-
* de overlays no.
|
|
2336
|
-
*
|
|
2337
|
-
* La plantilla se monta una sola vez, la primera vez que se pide (`mount`), y
|
|
2338
|
-
* queda montada hasta que el componente se destruye. `afterMount` corre tras el
|
|
2339
|
-
* siguiente render, cuando la hoja ya existe cerrada: abrirla ahí hace que entre
|
|
2340
|
-
* con su deslizamiento en vez de aparecer ya abierta.
|
|
2341
|
-
*
|
|
2342
|
-
* Debe construirse en un contexto de inyección (campo de un componente).
|
|
2343
|
-
*/
|
|
2344
|
-
class SheetPortal {
|
|
2345
|
-
overlay = inject(Overlay);
|
|
2346
|
-
viewContainerRef = inject(ViewContainerRef);
|
|
2347
|
-
injector = inject(Injector);
|
|
2348
|
-
overlayRef = null;
|
|
2349
|
-
constructor() {
|
|
2350
|
-
inject(DestroyRef).onDestroy(() => this.overlayRef?.dispose());
|
|
2351
|
-
}
|
|
2352
|
-
/** `true` si la plantilla ya estaba montada; si no, la monta y llama `afterMount` más tarde. */
|
|
2353
|
-
mount(template, afterMount) {
|
|
2354
|
-
if (this.overlayRef) {
|
|
2355
|
-
return true;
|
|
2356
|
-
}
|
|
2357
|
-
this.overlayRef = this.overlay.create({
|
|
2358
|
-
positionStrategy: this.overlay.position().global(),
|
|
2359
|
-
scrollStrategy: this.overlay.scrollStrategies.noop(),
|
|
2360
|
-
});
|
|
2361
|
-
this.overlayRef.attach(new TemplatePortal(template, this.viewContainerRef));
|
|
2362
|
-
afterNextRender(afterMount, { injector: this.injector });
|
|
2363
|
-
return false;
|
|
2364
|
-
}
|
|
2365
|
-
}
|
|
2366
|
-
|
|
2367
2439
|
const COMPACT_QUERY$1 = '(max-width: 639.98px)';
|
|
2368
2440
|
/**
|
|
2369
2441
|
* Botón «Acciones ▾» que abre un menú agrupado: panel flotante de 19rem con
|
|
@@ -2488,7 +2560,7 @@ class ActionMenu {
|
|
|
2488
2560
|
}
|
|
2489
2561
|
}
|
|
2490
2562
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: ActionMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2491
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: ActionMenu, isStandalone: true, selector: "kf-action-menu", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, presentation: { classPropertyName: "presentation", publicName: "presentation", isSignal: true, isRequired: false, transformFunction: null }, sheetTitle: { classPropertyName: "sheetTitle", publicName: "sheetTitle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemSelect: "itemSelect" }, viewQueries: [{ propertyName: "sheetTemplate", first: true, predicate: ["sheetTemplate"], descendants: true, isSignal: true }, { propertyName: "sheetBody", first: true, predicate: ["sheetBody"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #itemTemplate let-item>\n <kf-dropdown-item\n [icon]=\"item.icon\"\n [tone]=\"item.tone ?? 'neutral'\"\n [disabled]=\"item.disabled ?? false\"\n [description]=\"item.description\"\n [disabledReason]=\"item.disabledReason\"\n [badge]=\"item.badge\"\n [badgeTone]=\"item.badgeTone ?? 'neutral'\"\n [current]=\"item.current ?? false\"\n (click)=\"select(item)\"\n >\n {{ item.label }}\n </kf-dropdown-item>\n</ng-template>\n\n<ng-template #entriesTemplate>\n @for (entry of items(); track $index) {\n @if (asGroup(entry); as group) {\n <kf-dropdown-group [label]=\"group.group\">\n @for (item of group.items; track item.id) {\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n }\n </kf-dropdown-group>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: asItem(entry) }\"\n />\n }\n }\n</ng-template>\n\n<kf-dropdown [(open)]=\"menuOpen\">\n <kf-button\n class=\"kf-action-menu__trigger\"\n [variant]=\"variant()\"\n [size]=\"size()\"\n [shape]=\"iconOnly() ? 'circle' : 'rect'\"\n [icon]=\"iconOnly() ? (icon() ?? 'more-vertical') : icon()\"\n [disabled]=\"disabled()\"\n [ariaLabel]=\"iconOnly() ? label() : undefined\"\n [ariaHaspopup]=\"asSheet() ? 'dialog' : 'menu'\"\n [ariaExpanded]=\"expanded()\"\n (click)=\"toggle()\"\n >\n @if (!iconOnly()) {\n {{ label() }}\n <kf-icon name=\"chevron-down\" size=\"sm\" [rotate]=\"expanded() ? 180 : 0\" />\n }\n </kf-button>\n <kf-dropdown-panel width=\"19rem\" [ariaLabel]=\"label()\">\n <ng-container [ngTemplateOutlet]=\"entriesTemplate\" />\n </kf-dropdown-panel>\n</kf-dropdown>\n\n<ng-template #sheetTemplate>\n <kf-drawer side=\"bottom\" role=\"dialog\" [title]=\"sheetTitle() || label()\" [(open)]=\"sheetOpen\">\n <div\n #sheetBody\n class=\"kf-action-menu__sheet\"\n role=\"menu\"\n tabindex=\"-1\"\n [attr.aria-label]=\"label()\"\n (keydown)=\"onSheetKeydown($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"entriesTemplate\" />\n </div>\n </kf-drawer>\n</ng-template>\n", styles: [":host{display:inline-flex}.kf-action-menu__sheet{--kf-control-min-height: 3rem;display:flex;flex-direction:column;outline:none}\n"], dependencies: [{ kind: "component", type: Button, selector: "kf-button", inputs: ["variant", "size", "shape", "disabled", "type", "icon", "block", "loading", "ariaLabel", "ariaExpanded", "ariaPressed", "ariaDisabled", "ariaControls", "ariaHaspopup"] }, { kind: "component", type: Drawer, selector: "kf-drawer", inputs: ["open", "side", "role", "ariaLabel", "title", "closeLabel", "size", "sheetSize", "swipeToClose", "closeOnBack"], outputs: ["openChange"] }, { kind: "component", type: Dropdown, selector: "kf-dropdown", inputs: ["open", "anchor", "autoFocus"], outputs: ["openChange"] }, { kind: "component", type: DropdownGroup, selector: "kf-dropdown-group", inputs: ["label"] }, { kind: "component", type: DropdownItem, selector: "kf-dropdown-item", inputs: ["tone", "icon", "disabled", "description", "disabledReason", "badge", "badgeTone", "current", "checked"] }, { kind: "component", type: DropdownPanel, selector: "kf-dropdown-panel", inputs: ["variant", "role", "maxHeight", "width", "ariaLabel"] }, { kind: "component", type: Icon, selector: "kf-icon", inputs: ["name", "size", "rotate", "filled"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2563
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: ActionMenu, isStandalone: true, selector: "kf-action-menu", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, presentation: { classPropertyName: "presentation", publicName: "presentation", isSignal: true, isRequired: false, transformFunction: null }, sheetTitle: { classPropertyName: "sheetTitle", publicName: "sheetTitle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemSelect: "itemSelect" }, viewQueries: [{ propertyName: "sheetTemplate", first: true, predicate: ["sheetTemplate"], descendants: true, isSignal: true }, { propertyName: "sheetBody", first: true, predicate: ["sheetBody"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #itemTemplate let-item>\n <kf-dropdown-item\n [icon]=\"item.icon\"\n [tone]=\"item.tone ?? 'neutral'\"\n [disabled]=\"item.disabled ?? false\"\n [description]=\"item.description\"\n [disabledReason]=\"item.disabledReason\"\n [badge]=\"item.badge\"\n [badgeTone]=\"item.badgeTone ?? 'neutral'\"\n [current]=\"item.current ?? false\"\n (click)=\"select(item)\"\n >\n {{ item.label }}\n </kf-dropdown-item>\n</ng-template>\n\n<ng-template #entriesTemplate>\n @for (entry of items(); track $index) {\n @if (asGroup(entry); as group) {\n <kf-dropdown-group [label]=\"group.group\">\n @for (item of group.items; track item.id) {\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n }\n </kf-dropdown-group>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: asItem(entry) }\"\n />\n }\n }\n</ng-template>\n\n<kf-dropdown [(open)]=\"menuOpen\">\n <kf-button\n class=\"kf-action-menu__trigger\"\n [variant]=\"variant()\"\n [size]=\"size()\"\n [shape]=\"iconOnly() ? 'circle' : 'rect'\"\n [icon]=\"iconOnly() ? (icon() ?? 'more-vertical') : icon()\"\n [disabled]=\"disabled()\"\n [ariaLabel]=\"iconOnly() ? label() : undefined\"\n [ariaHaspopup]=\"asSheet() ? 'dialog' : 'menu'\"\n [ariaExpanded]=\"expanded()\"\n (click)=\"toggle()\"\n >\n @if (!iconOnly()) {\n {{ label() }}\n <kf-icon name=\"chevron-down\" size=\"sm\" [rotate]=\"expanded() ? 180 : 0\" />\n }\n </kf-button>\n <kf-dropdown-panel width=\"19rem\" [ariaLabel]=\"label()\">\n <ng-container [ngTemplateOutlet]=\"entriesTemplate\" />\n </kf-dropdown-panel>\n</kf-dropdown>\n\n<ng-template #sheetTemplate>\n <kf-drawer side=\"bottom\" role=\"dialog\" [title]=\"sheetTitle() || label()\" [(open)]=\"sheetOpen\">\n <div\n #sheetBody\n class=\"kf-action-menu__sheet\"\n role=\"menu\"\n tabindex=\"-1\"\n [attr.aria-label]=\"label()\"\n (keydown)=\"onSheetKeydown($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"entriesTemplate\" />\n </div>\n </kf-drawer>\n</ng-template>\n", styles: [":host{display:inline-flex}.kf-action-menu__sheet{--kf-control-min-height: 3rem;display:flex;flex-direction:column;outline:none}\n"], dependencies: [{ kind: "component", type: Button, selector: "kf-button", inputs: ["variant", "size", "shape", "disabled", "type", "icon", "block", "loading", "ariaLabel", "ariaExpanded", "ariaPressed", "ariaDisabled", "ariaControls", "ariaHaspopup"] }, { kind: "component", type: Drawer, selector: "kf-drawer", inputs: ["open", "side", "role", "ariaLabel", "title", "closeLabel", "size", "sheetSize", "swipeToClose", "closeOnBack", "mountInOverlay"], outputs: ["openChange"] }, { kind: "component", type: Dropdown, selector: "kf-dropdown", inputs: ["open", "anchor", "autoFocus"], outputs: ["openChange"] }, { kind: "component", type: DropdownGroup, selector: "kf-dropdown-group", inputs: ["label"] }, { kind: "component", type: DropdownItem, selector: "kf-dropdown-item", inputs: ["tone", "icon", "disabled", "description", "disabledReason", "badge", "badgeTone", "current", "checked"] }, { kind: "component", type: DropdownPanel, selector: "kf-dropdown-panel", inputs: ["variant", "role", "maxHeight", "width", "ariaLabel"] }, { kind: "component", type: Icon, selector: "kf-icon", inputs: ["name", "size", "rotate", "filled"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2492
2564
|
}
|
|
2493
2565
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: ActionMenu, decorators: [{
|
|
2494
2566
|
type: Component,
|
|
@@ -3561,7 +3633,9 @@ const TONE_ICON$1 = {
|
|
|
3561
3633
|
* <kf-alert variant="bar" tone="warn" title="Modo suplantación">Viendo como Ana Pérez.</kf-alert>
|
|
3562
3634
|
*
|
|
3563
3635
|
* Los elementos con el atributo `kfAlertActions` se proyectan bajo el mensaje, en
|
|
3564
|
-
* una fila propia apilados y alineados al inicio.
|
|
3636
|
+
* una fila propia apilados y alineados al inicio. En `variant="bar"`, `actionsInline`
|
|
3637
|
+
* los deja en la MISMA fila que el mensaje, a la derecha; si no caben, bajan a una fila
|
|
3638
|
+
* propia (ver más abajo). Si los envuelves en un solo
|
|
3565
3639
|
* `<div kfAlertActions>`, el aviso separa a sus hijos. Sin ellos la zona no
|
|
3566
3640
|
* existe y el aviso queda igual.
|
|
3567
3641
|
*
|
|
@@ -3569,6 +3643,17 @@ const TONE_ICON$1 = {
|
|
|
3569
3643
|
* Vence el 15/08.
|
|
3570
3644
|
* <div kfAlertActions><kf-button size="sm">Renovar</kf-button></div>
|
|
3571
3645
|
* </kf-alert>
|
|
3646
|
+
*
|
|
3647
|
+
* `actionsInline` (solo `variant="bar"`, default `false`) mantiene las acciones de
|
|
3648
|
+
* `kfAlertActions` en la misma fila que el ícono y el mensaje, empujadas al borde
|
|
3649
|
+
* derecho. El mensaje cede el espacio y envuelve; cuando ni así caben juntos (pantallas
|
|
3650
|
+
* angostas) las acciones bajan a su propia fila, alineadas al inicio, como sin el input.
|
|
3651
|
+
* Con `false` la barra no cambia: las acciones van siempre en una fila propia.
|
|
3652
|
+
*
|
|
3653
|
+
* <kf-alert variant="bar" tone="info" actionsInline>
|
|
3654
|
+
* Estás viendo la cuenta de Ana Pérez.
|
|
3655
|
+
* <div kfAlertActions><kf-button size="sm" variant="outline">Volver a mi cuenta</kf-button></div>
|
|
3656
|
+
* </kf-alert>
|
|
3572
3657
|
*/
|
|
3573
3658
|
class Alert {
|
|
3574
3659
|
tone = input('info', /* @ts-ignore */
|
|
@@ -3596,6 +3681,12 @@ class Alert {
|
|
|
3596
3681
|
title = input('', /* @ts-ignore */
|
|
3597
3682
|
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
3598
3683
|
dismissible = input(false, { ...(ngDevMode ? { debugName: "dismissible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3684
|
+
/**
|
|
3685
|
+
* Solo `variant="bar"`: con `true`, las acciones (`kfAlertActions`) van en la misma fila
|
|
3686
|
+
* que el mensaje, a la derecha, y bajan a su propia fila si no caben. Default `false`:
|
|
3687
|
+
* siempre en una fila propia. `card` lo ignora.
|
|
3688
|
+
*/
|
|
3689
|
+
actionsInline = input(false, { ...(ngDevMode ? { debugName: "actionsInline" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3599
3690
|
/** Visibilidad, two-way: `[(open)]="hasError"`. */
|
|
3600
3691
|
open = model(true, /* @ts-ignore */
|
|
3601
3692
|
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
@@ -3610,12 +3701,16 @@ class Alert {
|
|
|
3610
3701
|
...(ngDevMode ? [{ debugName: "toneIcon" }] : /* istanbul ignore next */ []));
|
|
3611
3702
|
/**
|
|
3612
3703
|
* Clases del contenedor: tono, forma (`bar` o `card` + apariencia), si lleva título y,
|
|
3613
|
-
* solo en `card` con `iconAlign="center"`, `kf-alert--icon-center
|
|
3704
|
+
* solo en `card` con `iconAlign="center"`, `kf-alert--icon-center`; solo en `bar` con
|
|
3705
|
+
* `actionsInline`, `kf-alert--actions-inline`.
|
|
3614
3706
|
*/
|
|
3615
3707
|
rootClass = computed(() => {
|
|
3616
3708
|
const classes = [`kf-alert--${this.tone()}`];
|
|
3617
3709
|
if (this.variant() === 'bar') {
|
|
3618
3710
|
classes.push('kf-alert--bar');
|
|
3711
|
+
if (this.actionsInline()) {
|
|
3712
|
+
classes.push('kf-alert--actions-inline');
|
|
3713
|
+
}
|
|
3619
3714
|
}
|
|
3620
3715
|
else {
|
|
3621
3716
|
classes.push('kf-alert--card', `kf-alert--${this.appearance()}`);
|
|
@@ -3630,15 +3725,15 @@ class Alert {
|
|
|
3630
3725
|
}, /* @ts-ignore */
|
|
3631
3726
|
...(ngDevMode ? [{ debugName: "rootClass" }] : /* istanbul ignore next */ []));
|
|
3632
3727
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: Alert, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3633
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: Alert, isStandalone: true, selector: "kf-alert", inputs: { tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, iconAlign: { classPropertyName: "iconAlign", publicName: "iconAlign", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { properties: { "attr.data-appearance": "appearance()", "attr.data-icon-align": "iconAlign()" } }, ngImport: i0, template: "@if (open()) {\n <div class=\"kf-alert\" [class]=\"rootClass()\" [attr.role]=\"ariaRole()\">\n <!--\n `bar` y `solid` usan el glifo de trazo de `kf-icon`. `surface` y `elevated`\n dibujan un glifo relleno propio: `kf-icon` solo tiene trazo y una marca\n blanca sobre un relleno exige dos colores en el mismo glifo.\n -->\n @if (variant() === 'bar') {\n <kf-icon class=\"kf-alert__icon\" [name]=\"toneIcon()\" size=\"sm\" />\n } @else if (appearance() === 'solid') {\n <kf-icon class=\"kf-alert__icon\" [name]=\"toneIcon()\" size=\"md\" />\n } @else {\n <span class=\"kf-alert__icon\">\n <svg class=\"kf-alert__glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n @switch (tone()) {\n @case ('ok') {\n <circle class=\"kf-alert__shape\" cx=\"12\" cy=\"12\" r=\"9.5\" />\n <path class=\"kf-alert__mark\" d=\"m7.8 12.4 2.8 2.8 5.6-5.8\" />\n }\n @case ('warn') {\n <path\n class=\"kf-alert__shape\"\n d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z\"\n />\n <path class=\"kf-alert__mark\" d=\"M12 9.2v4.2\" />\n <path class=\"kf-alert__mark kf-alert__mark--dot\" d=\"M12 17h.01\" />\n }\n @case ('error') {\n <polygon\n class=\"kf-alert__shape\"\n points=\"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2\"\n />\n <path class=\"kf-alert__mark\" d=\"M12 7.8v4.6\" />\n <path class=\"kf-alert__mark kf-alert__mark--dot\" d=\"M12 16h.01\" />\n }\n @default {\n <circle class=\"kf-alert__shape\" cx=\"12\" cy=\"12\" r=\"9.5\" />\n <path class=\"kf-alert__mark\" d=\"M12 11v5\" />\n <path class=\"kf-alert__mark kf-alert__mark--dot\" d=\"M12 7.6h.01\" />\n }\n }\n </svg>\n </span>\n }\n <div class=\"kf-alert__body\">\n <div class=\"kf-alert__content\">\n @if (title()) {\n <p class=\"kf-alert__title\">{{ title() }}</p>\n }\n <div class=\"kf-alert__message\"><ng-content /></div>\n </div>\n <div class=\"kf-alert__actions\"><ng-content select=\"[kfAlertActions]\" /></div>\n </div>\n @if (dismissible()) {\n <button\n type=\"button\"\n class=\"kf-alert__close\"\n aria-label=\"Cerrar aviso\"\n (click)=\"open.set(false)\"\n >\n <kf-icon name=\"x\" size=\"sm\" />\n </button>\n }\n </div>\n}\n", styles: [":host{display:block;font-family:var(--kf-font-body)}.kf-alert{--_mark: var(--kf-color-white);--_actions-gap: calc(var(--kf-space-sm) + var(--kf-space-xs));display:flex;color:var(--kf-color-text);font-size:var(--kf-font-size-body-sm);line-height:1.5}.kf-alert--info{--_tone: var(--kf-color-info);--_soft: var(--kf-color-info-soft);--_strong: var(--kf-color-info-strong);--_icon: var(--kf-color-info)}.kf-alert--ok{--_tone: var(--kf-color-success);--_soft: var(--kf-color-success-soft);--_strong: var(--kf-color-success-strong);--_icon: color-mix(in srgb, var(--kf-color-success) 60%, var(--kf-color-success-strong))}.kf-alert--warn{--_tone: var(--kf-color-warning);--_soft: var(--kf-color-warning-soft);--_strong: var(--kf-color-warning-strong);--_icon: color-mix(in srgb, var(--kf-color-warning) 35%, var(--kf-color-warning-strong));--_mark: var(--kf-color-ink)}.kf-alert--error{--_tone: var(--kf-color-error);--_soft: var(--kf-color-error-soft);--_strong: var(--kf-color-error-strong);--_icon: var(--kf-color-error)}.kf-alert__body{display:flex;min-width:0}.kf-alert__content{display:flex;flex-direction:column;min-width:0}.kf-alert__title{margin:0;color:var(--kf-color-ink);font-family:var(--kf-font-body);font-size:var(--kf-font-size-body);font-weight:var(--kf-font-weight-medium);line-height:1.5}.kf-alert__message{max-inline-size:72ch;color:var(--kf-color-text);overflow-wrap:anywhere}.kf-alert__message:has(>div,>section,>form,>table){max-inline-size:none}.kf-alert__message:empty{display:none}.kf-alert__actions{display:flex;flex:0 1 auto;flex-wrap:wrap;align-items:center;gap:var(--_actions-gap);min-width:0;max-width:100%}.kf-alert__actions:empty{display:none}.kf-alert__actions>*{max-width:100%;min-width:0}.kf-alert__actions ::ng-deep>:is(div,span,ul)[kfAlertActions]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--_actions-gap);margin:0;padding:0;list-style:none}.kf-alert__close{position:relative;flex:none;display:inline-flex;align-self:center;margin-inline-start:var(--kf-space-sm);padding:2px;border:none;background:transparent;color:var(--kf-color-text-muted);border-radius:var(--kf-radius-xs);cursor:pointer;transition:background-color .14s ease,color .14s ease}.kf-alert__close:after{content:\"\";position:absolute;top:50%;left:calc(-1 * var(--kf-space-sm));width:44px;height:44px;transform:translateY(-50%)}.kf-alert__close:hover{background:var(--kf-color-gray-100);color:var(--kf-color-ink)}.kf-alert__close:focus-visible{outline:none;box-shadow:var(--kf-shadow-focus)}@media(prefers-reduced-motion:reduce){.kf-alert__close{transition:none}}.kf-alert--bar{align-items:center;gap:var(--kf-space-sm);padding:var(--kf-space-sm) var(--kf-space-md);border:1px solid color-mix(in srgb,var(--_tone) 40%,var(--_soft));border-width:1px 0;border-radius:0;background:var(--_soft)}.kf-alert--bar .kf-alert__icon{align-items:center;justify-content:center;color:var(--_strong)}.kf-alert--bar .kf-alert__body{flex:1 1 0;flex-wrap:wrap;align-items:center;gap:var(--kf-space-sm) var(--kf-space-lg)}.kf-alert--bar .kf-alert__content{flex:1 1 20rem;flex-flow:row wrap;align-items:baseline;gap:2px var(--kf-space-xs)}.kf-alert--bar .kf-alert__title{font-size:inherit}.kf-alert--bar .kf-alert__message{max-inline-size:none}.kf-alert--bar .kf-alert__actions{flex-basis:100%}.kf-alert--bar .kf-alert__close:hover{background:color-mix(in srgb,var(--_strong) 12%,transparent)}.kf-alert--card{--_line: calc(var(--kf-font-size-body-sm) * 1.5);--_content-gap: 0px;align-items:flex-start}.kf-alert--card.kf-alert--titled{--_line: var(--_title-line)}.kf-alert--card .kf-alert__icon{display:flex;flex:none;align-items:center;justify-content:center;inline-size:var(--_glyph);block-size:var(--_line);color:var(--_icon)}.kf-alert--card .kf-alert__body{flex:1 1 0;flex-direction:column;gap:var(--_body-gap)}.kf-alert--card .kf-alert__content{gap:var(--_content-gap)}.kf-alert--card .kf-alert__title{color:inherit;font-size:var(--_title-size);font-weight:var(--_title-weight);line-height:var(--_title-line)}.kf-alert--card .kf-alert__message{color:inherit}.kf-alert--card.kf-alert--titled .kf-alert__message{color:var(--_desc)}.kf-alert--card .kf-alert__close{align-self:flex-start;margin-inline-start:0;margin-inline-end:calc(var(--kf-space-md) - var(--_pad-end));margin-block-start:calc((var(--_line) - 20px) / 2)}.kf-alert__glyph{display:block;flex:none;inline-size:var(--_glyph);block-size:var(--_glyph);fill:none;stroke:none}.kf-alert__shape{fill:currentColor;stroke:currentColor;stroke-width:1;stroke-linejoin:round}.kf-alert__mark{fill:none;stroke:var(--_mark);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.kf-alert__mark--dot{stroke-width:2.6}.kf-alert--surface{--_glyph: 16px;--_title-line: calc(var(--kf-font-size-body) * 1.5);--_title-size: var(--kf-font-size-body);--_title-weight: 500;--_body-gap: calc(var(--kf-space-sm) + var(--kf-space-xs));--_desc: var(--kf-color-text);--_pad-end: calc(var(--kf-space-sm) + var(--kf-space-xs));gap:var(--kf-space-sm);padding:var(--kf-space-sm) var(--_pad-end);border:1px solid color-mix(in srgb,var(--_tone) 40%,var(--_soft));border-radius:var(--kf-radius-sm);background:var(--_soft);color:var(--kf-color-ink)}.kf-alert--surface.kf-alert--titled{--_glyph: 24px;--_content-gap: var(--kf-space-sm);--_pad-end: var(--kf-space-lg);gap:calc(var(--kf-space-sm) + var(--kf-space-xs));padding:calc(var(--kf-space-md) + var(--kf-space-xs)) var(--_pad-end)}.kf-alert--surface .kf-alert__close:hover{background:color-mix(in srgb,var(--_strong) 12%,transparent)}.kf-alert--elevated{--_glyph: 24px;--_title-line: var(--kf-space-lg);--_title-size: var(--kf-font-size-body-sm);--_title-weight: var(--kf-font-weight-medium);--_body-gap: var(--kf-space-sm);--_actions-gap: 0px;--_desc: var(--kf-color-text-muted);--_pad-end: var(--kf-space-md);gap:var(--kf-space-md);padding:var(--kf-space-md) var(--_pad-end);border:1px solid var(--kf-color-border);border-radius:var(--kf-radius-sm);background:var(--kf-color-white);box-shadow:var(--kf-shadow-md);color:var(--kf-color-ink)}.kf-alert--elevated .kf-alert__actions{margin-inline-start:calc(-1 * var(--kf-space-sm))}.kf-alert--elevated .kf-alert__actions ::ng-deep>:is(div,span,ul)[kfAlertActions]>*{position:relative}.kf-alert--elevated .kf-alert__actions ::ng-deep>:is(div,span,ul)[kfAlertActions]>:not(:last-child):after{content:\"\\b7\";content:\"\\b7\" / \"\";position:absolute;inset-block:0;inset-inline-start:100%;display:grid;place-items:center;inline-size:0;color:var(--kf-color-text-muted);pointer-events:none}.kf-alert--solid{--_glyph: 20px;--_title-line: calc(var(--kf-space-md) + var(--kf-space-xs));--_title-size: .9375rem;--_title-weight: var(--kf-font-weight-medium);--_body-gap: var(--kf-space-sm);--_actions-gap: var(--kf-space-sm);--_solid: var(--_strong);--_on: var(--kf-color-white);--_btn-fg: var(--_solid);--_desc: var(--_on);--_pad-end: var(--kf-space-sm);gap:calc(var(--kf-space-sm) + var(--kf-space-xs));padding:calc(var(--kf-space-sm) + var(--kf-space-xs)) var(--_pad-end) calc(var(--kf-space-sm) + var(--kf-space-xs)) var(--kf-space-md);border-radius:var(--kf-radius-sm);background:var(--_solid);color:var(--_on)}.kf-alert--solid.kf-alert--warn{--_solid: var(--kf-color-warning);--_on: var(--kf-color-ink);--_btn-fg: var(--kf-color-white)}.kf-alert--solid .kf-alert__icon{color:var(--_on)}.kf-alert--solid:not(.kf-alert--titled) .kf-alert__message{font-weight:500}.kf-alert--solid .kf-alert__close{color:var(--_on)}.kf-alert--solid .kf-alert__close:hover{background:color-mix(in srgb,var(--_on) 16%,transparent);color:var(--_on)}.kf-alert--solid .kf-alert__close:focus-visible{box-shadow:0 0 0 2px var(--_solid),0 0 0 4px var(--_on)}.kf-alert--solid .kf-alert__actions{--kf-color-primary: var(--_on);--kf-color-primary-hover: color-mix(in srgb, var(--_on) 88%, var(--_solid));--kf-color-primary-soft: color-mix(in srgb, var(--_on) 16%, transparent);--kf-color-white: var(--_btn-fg);--kf-color-text: var(--_on);--kf-color-text-muted: var(--_on);--kf-color-border-strong: color-mix(in srgb, var(--_on) 55%, transparent);--kf-color-surface: color-mix(in srgb, var(--_on) 16%, transparent);--kf-shadow-focus: 0 0 0 2px var(--_solid), 0 0 0 4px var(--_on)}.kf-alert--card.kf-alert--icon-center{display:grid;grid-template-columns:auto minmax(0,1fr);row-gap:var(--_body-gap)}.kf-alert--icon-center .kf-alert__body{display:contents}.kf-alert--icon-center .kf-alert__icon{grid-area:1 / 1;align-self:center}.kf-alert--icon-center .kf-alert__content{grid-area:1 / 2}.kf-alert--icon-center .kf-alert__actions{grid-area:2 / 2}.kf-alert--icon-center .kf-alert__close{grid-area:1 / 3;align-self:center;margin-block-start:0}\n"], dependencies: [{ kind: "component", type: Icon, selector: "kf-icon", inputs: ["name", "size", "rotate", "filled"] }] });
|
|
3728
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: Alert, isStandalone: true, selector: "kf-alert", inputs: { tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, iconAlign: { classPropertyName: "iconAlign", publicName: "iconAlign", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, actionsInline: { classPropertyName: "actionsInline", publicName: "actionsInline", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { properties: { "attr.data-appearance": "appearance()", "attr.data-icon-align": "iconAlign()" } }, ngImport: i0, template: "@if (open()) {\n <div class=\"kf-alert\" [class]=\"rootClass()\" [attr.role]=\"ariaRole()\">\n <!--\n `bar` y `solid` usan el glifo de trazo de `kf-icon`. `surface` y `elevated`\n dibujan un glifo relleno propio: `kf-icon` solo tiene trazo y una marca\n blanca sobre un relleno exige dos colores en el mismo glifo.\n -->\n @if (variant() === 'bar') {\n <kf-icon class=\"kf-alert__icon\" [name]=\"toneIcon()\" size=\"sm\" />\n } @else if (appearance() === 'solid') {\n <kf-icon class=\"kf-alert__icon\" [name]=\"toneIcon()\" size=\"md\" />\n } @else {\n <span class=\"kf-alert__icon\">\n <svg class=\"kf-alert__glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n @switch (tone()) {\n @case ('ok') {\n <circle class=\"kf-alert__shape\" cx=\"12\" cy=\"12\" r=\"9.5\" />\n <path class=\"kf-alert__mark\" d=\"m7.8 12.4 2.8 2.8 5.6-5.8\" />\n }\n @case ('warn') {\n <path\n class=\"kf-alert__shape\"\n d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z\"\n />\n <path class=\"kf-alert__mark\" d=\"M12 9.2v4.2\" />\n <path class=\"kf-alert__mark kf-alert__mark--dot\" d=\"M12 17h.01\" />\n }\n @case ('error') {\n <polygon\n class=\"kf-alert__shape\"\n points=\"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2\"\n />\n <path class=\"kf-alert__mark\" d=\"M12 7.8v4.6\" />\n <path class=\"kf-alert__mark kf-alert__mark--dot\" d=\"M12 16h.01\" />\n }\n @default {\n <circle class=\"kf-alert__shape\" cx=\"12\" cy=\"12\" r=\"9.5\" />\n <path class=\"kf-alert__mark\" d=\"M12 11v5\" />\n <path class=\"kf-alert__mark kf-alert__mark--dot\" d=\"M12 7.6h.01\" />\n }\n }\n </svg>\n </span>\n }\n <div class=\"kf-alert__body\">\n <div class=\"kf-alert__content\">\n @if (title()) {\n <p class=\"kf-alert__title\">{{ title() }}</p>\n }\n <div class=\"kf-alert__message\"><ng-content /></div>\n </div>\n <div class=\"kf-alert__actions\"><ng-content select=\"[kfAlertActions]\" /></div>\n </div>\n @if (dismissible()) {\n <button\n type=\"button\"\n class=\"kf-alert__close\"\n aria-label=\"Cerrar aviso\"\n (click)=\"open.set(false)\"\n >\n <kf-icon name=\"x\" size=\"sm\" />\n </button>\n }\n </div>\n}\n", styles: [":host{display:block;font-family:var(--kf-font-body)}.kf-alert{--_mark: var(--kf-color-white);--_actions-gap: calc(var(--kf-space-sm) + var(--kf-space-xs));display:flex;color:var(--kf-color-text);font-size:var(--kf-font-size-body-sm);line-height:1.5}.kf-alert--info{--_tone: var(--kf-color-info);--_soft: var(--kf-color-info-soft);--_strong: var(--kf-color-info-strong);--_icon: var(--kf-color-info)}.kf-alert--ok{--_tone: var(--kf-color-success);--_soft: var(--kf-color-success-soft);--_strong: var(--kf-color-success-strong);--_icon: color-mix(in srgb, var(--kf-color-success) 60%, var(--kf-color-success-strong))}.kf-alert--warn{--_tone: var(--kf-color-warning);--_soft: var(--kf-color-warning-soft);--_strong: var(--kf-color-warning-strong);--_icon: color-mix(in srgb, var(--kf-color-warning) 35%, var(--kf-color-warning-strong));--_mark: var(--kf-color-ink)}.kf-alert--error{--_tone: var(--kf-color-error);--_soft: var(--kf-color-error-soft);--_strong: var(--kf-color-error-strong);--_icon: var(--kf-color-error)}.kf-alert__body{display:flex;min-width:0}.kf-alert__content{display:flex;flex-direction:column;min-width:0}.kf-alert__title{margin:0;color:var(--kf-color-ink);font-family:var(--kf-font-body);font-size:var(--kf-font-size-body);font-weight:var(--kf-font-weight-medium);line-height:1.5}.kf-alert__message{max-inline-size:72ch;color:var(--kf-color-text);overflow-wrap:anywhere}.kf-alert__message:has(>div,>section,>form,>table){max-inline-size:none}.kf-alert__message:empty{display:none}.kf-alert__actions{display:flex;flex:0 1 auto;flex-wrap:wrap;align-items:center;gap:var(--_actions-gap);min-width:0;max-width:100%}.kf-alert__actions:empty{display:none}.kf-alert__actions>*{max-width:100%;min-width:0}.kf-alert__actions ::ng-deep>:is(div,span,ul)[kfAlertActions]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--_actions-gap);margin:0;padding:0;list-style:none}.kf-alert__close{position:relative;flex:none;display:inline-flex;align-self:center;margin-inline-start:var(--kf-space-sm);padding:2px;border:none;background:transparent;color:var(--kf-color-text-muted);border-radius:var(--kf-radius-xs);cursor:pointer;transition:background-color .14s ease,color .14s ease}.kf-alert__close:after{content:\"\";position:absolute;top:50%;left:calc(-1 * var(--kf-space-sm));width:44px;height:44px;transform:translateY(-50%)}.kf-alert__close:hover{background:var(--kf-color-gray-100);color:var(--kf-color-ink)}.kf-alert__close:focus-visible{outline:none;box-shadow:var(--kf-shadow-focus)}@media(prefers-reduced-motion:reduce){.kf-alert__close{transition:none}}.kf-alert--bar{align-items:center;gap:var(--kf-space-sm);padding:var(--kf-space-sm) var(--kf-space-md);border:1px solid color-mix(in srgb,var(--_tone) 40%,var(--_soft));border-width:1px 0;border-radius:0;background:var(--_soft)}.kf-alert--bar .kf-alert__icon{align-items:center;justify-content:center;color:var(--_strong)}.kf-alert--bar .kf-alert__body{flex:1 1 0;flex-wrap:wrap;align-items:center;gap:var(--kf-space-sm) var(--kf-space-lg)}.kf-alert--bar .kf-alert__content{flex:1 1 20rem;flex-flow:row wrap;align-items:baseline;gap:2px var(--kf-space-xs)}.kf-alert--bar .kf-alert__title{font-size:inherit}.kf-alert--bar .kf-alert__message{max-inline-size:none}.kf-alert--bar .kf-alert__actions{flex-basis:100%}.kf-alert--bar.kf-alert--actions-inline .kf-alert__actions{flex-basis:auto}.kf-alert--bar .kf-alert__close:hover{background:color-mix(in srgb,var(--_strong) 12%,transparent)}.kf-alert--card{--_line: calc(var(--kf-font-size-body-sm) * 1.5);--_content-gap: 0px;align-items:flex-start}.kf-alert--card.kf-alert--titled{--_line: var(--_title-line)}.kf-alert--card .kf-alert__icon{display:flex;flex:none;align-items:center;justify-content:center;inline-size:var(--_glyph);block-size:var(--_line);color:var(--_icon)}.kf-alert--card .kf-alert__body{flex:1 1 0;flex-direction:column;gap:var(--_body-gap)}.kf-alert--card .kf-alert__content{gap:var(--_content-gap)}.kf-alert--card .kf-alert__title{color:inherit;font-size:var(--_title-size);font-weight:var(--_title-weight);line-height:var(--_title-line)}.kf-alert--card .kf-alert__message{color:inherit}.kf-alert--card.kf-alert--titled .kf-alert__message{color:var(--_desc)}.kf-alert--card .kf-alert__close{align-self:flex-start;margin-inline-start:0;margin-inline-end:calc(var(--kf-space-md) - var(--_pad-end));margin-block-start:calc((var(--_line) - 20px) / 2)}.kf-alert__glyph{display:block;flex:none;inline-size:var(--_glyph);block-size:var(--_glyph);fill:none;stroke:none}.kf-alert__shape{fill:currentColor;stroke:currentColor;stroke-width:1;stroke-linejoin:round}.kf-alert__mark{fill:none;stroke:var(--_mark);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.kf-alert__mark--dot{stroke-width:2.6}.kf-alert--surface{--_glyph: 16px;--_title-line: calc(var(--kf-font-size-body) * 1.5);--_title-size: var(--kf-font-size-body);--_title-weight: 500;--_body-gap: calc(var(--kf-space-sm) + var(--kf-space-xs));--_desc: var(--kf-color-text);--_pad-end: calc(var(--kf-space-sm) + var(--kf-space-xs));gap:var(--kf-space-sm);padding:var(--kf-space-sm) var(--_pad-end);border:1px solid color-mix(in srgb,var(--_tone) 40%,var(--_soft));border-radius:var(--kf-radius-sm);background:var(--_soft);color:var(--kf-color-ink)}.kf-alert--surface.kf-alert--titled{--_glyph: 24px;--_content-gap: var(--kf-space-sm);--_pad-end: var(--kf-space-lg);gap:calc(var(--kf-space-sm) + var(--kf-space-xs));padding:calc(var(--kf-space-md) + var(--kf-space-xs)) var(--_pad-end)}.kf-alert--surface .kf-alert__close:hover{background:color-mix(in srgb,var(--_strong) 12%,transparent)}.kf-alert--elevated{--_glyph: 24px;--_title-line: var(--kf-space-lg);--_title-size: var(--kf-font-size-body-sm);--_title-weight: var(--kf-font-weight-medium);--_body-gap: var(--kf-space-sm);--_actions-gap: 0px;--_desc: var(--kf-color-text-muted);--_pad-end: var(--kf-space-md);gap:var(--kf-space-md);padding:var(--kf-space-md) var(--_pad-end);border:1px solid var(--kf-color-border);border-radius:var(--kf-radius-sm);background:var(--kf-color-white);box-shadow:var(--kf-shadow-md);color:var(--kf-color-ink)}.kf-alert--elevated .kf-alert__actions{margin-inline-start:calc(-1 * var(--kf-space-sm))}.kf-alert--elevated .kf-alert__actions ::ng-deep>:is(div,span,ul)[kfAlertActions]>*{position:relative}.kf-alert--elevated .kf-alert__actions ::ng-deep>:is(div,span,ul)[kfAlertActions]>:not(:last-child):after{content:\"\\b7\";content:\"\\b7\" / \"\";position:absolute;inset-block:0;inset-inline-start:100%;display:grid;place-items:center;inline-size:0;color:var(--kf-color-text-muted);pointer-events:none}.kf-alert--solid{--_glyph: 20px;--_title-line: calc(var(--kf-space-md) + var(--kf-space-xs));--_title-size: .9375rem;--_title-weight: var(--kf-font-weight-medium);--_body-gap: var(--kf-space-sm);--_actions-gap: var(--kf-space-sm);--_solid: var(--_strong);--_on: var(--kf-color-white);--_btn-fg: var(--_solid);--_desc: var(--_on);--_pad-end: var(--kf-space-sm);gap:calc(var(--kf-space-sm) + var(--kf-space-xs));padding:calc(var(--kf-space-sm) + var(--kf-space-xs)) var(--_pad-end) calc(var(--kf-space-sm) + var(--kf-space-xs)) var(--kf-space-md);border-radius:var(--kf-radius-sm);background:var(--_solid);color:var(--_on)}.kf-alert--solid.kf-alert--warn{--_solid: var(--kf-color-warning);--_on: var(--kf-color-ink);--_btn-fg: var(--kf-color-white)}.kf-alert--solid .kf-alert__icon{color:var(--_on)}.kf-alert--solid:not(.kf-alert--titled) .kf-alert__message{font-weight:500}.kf-alert--solid .kf-alert__close{color:var(--_on)}.kf-alert--solid .kf-alert__close:hover{background:color-mix(in srgb,var(--_on) 16%,transparent);color:var(--_on)}.kf-alert--solid .kf-alert__close:focus-visible{box-shadow:0 0 0 2px var(--_solid),0 0 0 4px var(--_on)}.kf-alert--solid .kf-alert__actions{--kf-color-primary: var(--_on);--kf-color-primary-hover: color-mix(in srgb, var(--_on) 88%, var(--_solid));--kf-color-primary-soft: color-mix(in srgb, var(--_on) 16%, transparent);--kf-color-white: var(--_btn-fg);--kf-color-text: var(--_on);--kf-color-text-muted: var(--_on);--kf-color-border-strong: color-mix(in srgb, var(--_on) 55%, transparent);--kf-color-surface: color-mix(in srgb, var(--_on) 16%, transparent);--kf-shadow-focus: 0 0 0 2px var(--_solid), 0 0 0 4px var(--_on)}.kf-alert--card.kf-alert--icon-center{display:grid;grid-template-columns:auto minmax(0,1fr);row-gap:var(--_body-gap)}.kf-alert--icon-center .kf-alert__body{display:contents}.kf-alert--icon-center .kf-alert__icon{grid-area:1 / 1;align-self:center}.kf-alert--icon-center .kf-alert__content{grid-area:1 / 2}.kf-alert--icon-center .kf-alert__actions{grid-area:2 / 2}.kf-alert--icon-center .kf-alert__close{grid-area:1 / 3;align-self:center;margin-block-start:0}\n"], dependencies: [{ kind: "component", type: Icon, selector: "kf-icon", inputs: ["name", "size", "rotate", "filled"] }] });
|
|
3634
3729
|
}
|
|
3635
3730
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: Alert, decorators: [{
|
|
3636
3731
|
type: Component,
|
|
3637
3732
|
args: [{ selector: 'kf-alert', imports: [Icon], host: {
|
|
3638
3733
|
'[attr.data-appearance]': 'appearance()',
|
|
3639
3734
|
'[attr.data-icon-align]': 'iconAlign()',
|
|
3640
|
-
}, template: "@if (open()) {\n <div class=\"kf-alert\" [class]=\"rootClass()\" [attr.role]=\"ariaRole()\">\n <!--\n `bar` y `solid` usan el glifo de trazo de `kf-icon`. `surface` y `elevated`\n dibujan un glifo relleno propio: `kf-icon` solo tiene trazo y una marca\n blanca sobre un relleno exige dos colores en el mismo glifo.\n -->\n @if (variant() === 'bar') {\n <kf-icon class=\"kf-alert__icon\" [name]=\"toneIcon()\" size=\"sm\" />\n } @else if (appearance() === 'solid') {\n <kf-icon class=\"kf-alert__icon\" [name]=\"toneIcon()\" size=\"md\" />\n } @else {\n <span class=\"kf-alert__icon\">\n <svg class=\"kf-alert__glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n @switch (tone()) {\n @case ('ok') {\n <circle class=\"kf-alert__shape\" cx=\"12\" cy=\"12\" r=\"9.5\" />\n <path class=\"kf-alert__mark\" d=\"m7.8 12.4 2.8 2.8 5.6-5.8\" />\n }\n @case ('warn') {\n <path\n class=\"kf-alert__shape\"\n d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z\"\n />\n <path class=\"kf-alert__mark\" d=\"M12 9.2v4.2\" />\n <path class=\"kf-alert__mark kf-alert__mark--dot\" d=\"M12 17h.01\" />\n }\n @case ('error') {\n <polygon\n class=\"kf-alert__shape\"\n points=\"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2\"\n />\n <path class=\"kf-alert__mark\" d=\"M12 7.8v4.6\" />\n <path class=\"kf-alert__mark kf-alert__mark--dot\" d=\"M12 16h.01\" />\n }\n @default {\n <circle class=\"kf-alert__shape\" cx=\"12\" cy=\"12\" r=\"9.5\" />\n <path class=\"kf-alert__mark\" d=\"M12 11v5\" />\n <path class=\"kf-alert__mark kf-alert__mark--dot\" d=\"M12 7.6h.01\" />\n }\n }\n </svg>\n </span>\n }\n <div class=\"kf-alert__body\">\n <div class=\"kf-alert__content\">\n @if (title()) {\n <p class=\"kf-alert__title\">{{ title() }}</p>\n }\n <div class=\"kf-alert__message\"><ng-content /></div>\n </div>\n <div class=\"kf-alert__actions\"><ng-content select=\"[kfAlertActions]\" /></div>\n </div>\n @if (dismissible()) {\n <button\n type=\"button\"\n class=\"kf-alert__close\"\n aria-label=\"Cerrar aviso\"\n (click)=\"open.set(false)\"\n >\n <kf-icon name=\"x\" size=\"sm\" />\n </button>\n }\n </div>\n}\n", styles: [":host{display:block;font-family:var(--kf-font-body)}.kf-alert{--_mark: var(--kf-color-white);--_actions-gap: calc(var(--kf-space-sm) + var(--kf-space-xs));display:flex;color:var(--kf-color-text);font-size:var(--kf-font-size-body-sm);line-height:1.5}.kf-alert--info{--_tone: var(--kf-color-info);--_soft: var(--kf-color-info-soft);--_strong: var(--kf-color-info-strong);--_icon: var(--kf-color-info)}.kf-alert--ok{--_tone: var(--kf-color-success);--_soft: var(--kf-color-success-soft);--_strong: var(--kf-color-success-strong);--_icon: color-mix(in srgb, var(--kf-color-success) 60%, var(--kf-color-success-strong))}.kf-alert--warn{--_tone: var(--kf-color-warning);--_soft: var(--kf-color-warning-soft);--_strong: var(--kf-color-warning-strong);--_icon: color-mix(in srgb, var(--kf-color-warning) 35%, var(--kf-color-warning-strong));--_mark: var(--kf-color-ink)}.kf-alert--error{--_tone: var(--kf-color-error);--_soft: var(--kf-color-error-soft);--_strong: var(--kf-color-error-strong);--_icon: var(--kf-color-error)}.kf-alert__body{display:flex;min-width:0}.kf-alert__content{display:flex;flex-direction:column;min-width:0}.kf-alert__title{margin:0;color:var(--kf-color-ink);font-family:var(--kf-font-body);font-size:var(--kf-font-size-body);font-weight:var(--kf-font-weight-medium);line-height:1.5}.kf-alert__message{max-inline-size:72ch;color:var(--kf-color-text);overflow-wrap:anywhere}.kf-alert__message:has(>div,>section,>form,>table){max-inline-size:none}.kf-alert__message:empty{display:none}.kf-alert__actions{display:flex;flex:0 1 auto;flex-wrap:wrap;align-items:center;gap:var(--_actions-gap);min-width:0;max-width:100%}.kf-alert__actions:empty{display:none}.kf-alert__actions>*{max-width:100%;min-width:0}.kf-alert__actions ::ng-deep>:is(div,span,ul)[kfAlertActions]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--_actions-gap);margin:0;padding:0;list-style:none}.kf-alert__close{position:relative;flex:none;display:inline-flex;align-self:center;margin-inline-start:var(--kf-space-sm);padding:2px;border:none;background:transparent;color:var(--kf-color-text-muted);border-radius:var(--kf-radius-xs);cursor:pointer;transition:background-color .14s ease,color .14s ease}.kf-alert__close:after{content:\"\";position:absolute;top:50%;left:calc(-1 * var(--kf-space-sm));width:44px;height:44px;transform:translateY(-50%)}.kf-alert__close:hover{background:var(--kf-color-gray-100);color:var(--kf-color-ink)}.kf-alert__close:focus-visible{outline:none;box-shadow:var(--kf-shadow-focus)}@media(prefers-reduced-motion:reduce){.kf-alert__close{transition:none}}.kf-alert--bar{align-items:center;gap:var(--kf-space-sm);padding:var(--kf-space-sm) var(--kf-space-md);border:1px solid color-mix(in srgb,var(--_tone) 40%,var(--_soft));border-width:1px 0;border-radius:0;background:var(--_soft)}.kf-alert--bar .kf-alert__icon{align-items:center;justify-content:center;color:var(--_strong)}.kf-alert--bar .kf-alert__body{flex:1 1 0;flex-wrap:wrap;align-items:center;gap:var(--kf-space-sm) var(--kf-space-lg)}.kf-alert--bar .kf-alert__content{flex:1 1 20rem;flex-flow:row wrap;align-items:baseline;gap:2px var(--kf-space-xs)}.kf-alert--bar .kf-alert__title{font-size:inherit}.kf-alert--bar .kf-alert__message{max-inline-size:none}.kf-alert--bar .kf-alert__actions{flex-basis:100%}.kf-alert--bar .kf-alert__close:hover{background:color-mix(in srgb,var(--_strong) 12%,transparent)}.kf-alert--card{--_line: calc(var(--kf-font-size-body-sm) * 1.5);--_content-gap: 0px;align-items:flex-start}.kf-alert--card.kf-alert--titled{--_line: var(--_title-line)}.kf-alert--card .kf-alert__icon{display:flex;flex:none;align-items:center;justify-content:center;inline-size:var(--_glyph);block-size:var(--_line);color:var(--_icon)}.kf-alert--card .kf-alert__body{flex:1 1 0;flex-direction:column;gap:var(--_body-gap)}.kf-alert--card .kf-alert__content{gap:var(--_content-gap)}.kf-alert--card .kf-alert__title{color:inherit;font-size:var(--_title-size);font-weight:var(--_title-weight);line-height:var(--_title-line)}.kf-alert--card .kf-alert__message{color:inherit}.kf-alert--card.kf-alert--titled .kf-alert__message{color:var(--_desc)}.kf-alert--card .kf-alert__close{align-self:flex-start;margin-inline-start:0;margin-inline-end:calc(var(--kf-space-md) - var(--_pad-end));margin-block-start:calc((var(--_line) - 20px) / 2)}.kf-alert__glyph{display:block;flex:none;inline-size:var(--_glyph);block-size:var(--_glyph);fill:none;stroke:none}.kf-alert__shape{fill:currentColor;stroke:currentColor;stroke-width:1;stroke-linejoin:round}.kf-alert__mark{fill:none;stroke:var(--_mark);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.kf-alert__mark--dot{stroke-width:2.6}.kf-alert--surface{--_glyph: 16px;--_title-line: calc(var(--kf-font-size-body) * 1.5);--_title-size: var(--kf-font-size-body);--_title-weight: 500;--_body-gap: calc(var(--kf-space-sm) + var(--kf-space-xs));--_desc: var(--kf-color-text);--_pad-end: calc(var(--kf-space-sm) + var(--kf-space-xs));gap:var(--kf-space-sm);padding:var(--kf-space-sm) var(--_pad-end);border:1px solid color-mix(in srgb,var(--_tone) 40%,var(--_soft));border-radius:var(--kf-radius-sm);background:var(--_soft);color:var(--kf-color-ink)}.kf-alert--surface.kf-alert--titled{--_glyph: 24px;--_content-gap: var(--kf-space-sm);--_pad-end: var(--kf-space-lg);gap:calc(var(--kf-space-sm) + var(--kf-space-xs));padding:calc(var(--kf-space-md) + var(--kf-space-xs)) var(--_pad-end)}.kf-alert--surface .kf-alert__close:hover{background:color-mix(in srgb,var(--_strong) 12%,transparent)}.kf-alert--elevated{--_glyph: 24px;--_title-line: var(--kf-space-lg);--_title-size: var(--kf-font-size-body-sm);--_title-weight: var(--kf-font-weight-medium);--_body-gap: var(--kf-space-sm);--_actions-gap: 0px;--_desc: var(--kf-color-text-muted);--_pad-end: var(--kf-space-md);gap:var(--kf-space-md);padding:var(--kf-space-md) var(--_pad-end);border:1px solid var(--kf-color-border);border-radius:var(--kf-radius-sm);background:var(--kf-color-white);box-shadow:var(--kf-shadow-md);color:var(--kf-color-ink)}.kf-alert--elevated .kf-alert__actions{margin-inline-start:calc(-1 * var(--kf-space-sm))}.kf-alert--elevated .kf-alert__actions ::ng-deep>:is(div,span,ul)[kfAlertActions]>*{position:relative}.kf-alert--elevated .kf-alert__actions ::ng-deep>:is(div,span,ul)[kfAlertActions]>:not(:last-child):after{content:\"\\b7\";content:\"\\b7\" / \"\";position:absolute;inset-block:0;inset-inline-start:100%;display:grid;place-items:center;inline-size:0;color:var(--kf-color-text-muted);pointer-events:none}.kf-alert--solid{--_glyph: 20px;--_title-line: calc(var(--kf-space-md) + var(--kf-space-xs));--_title-size: .9375rem;--_title-weight: var(--kf-font-weight-medium);--_body-gap: var(--kf-space-sm);--_actions-gap: var(--kf-space-sm);--_solid: var(--_strong);--_on: var(--kf-color-white);--_btn-fg: var(--_solid);--_desc: var(--_on);--_pad-end: var(--kf-space-sm);gap:calc(var(--kf-space-sm) + var(--kf-space-xs));padding:calc(var(--kf-space-sm) + var(--kf-space-xs)) var(--_pad-end) calc(var(--kf-space-sm) + var(--kf-space-xs)) var(--kf-space-md);border-radius:var(--kf-radius-sm);background:var(--_solid);color:var(--_on)}.kf-alert--solid.kf-alert--warn{--_solid: var(--kf-color-warning);--_on: var(--kf-color-ink);--_btn-fg: var(--kf-color-white)}.kf-alert--solid .kf-alert__icon{color:var(--_on)}.kf-alert--solid:not(.kf-alert--titled) .kf-alert__message{font-weight:500}.kf-alert--solid .kf-alert__close{color:var(--_on)}.kf-alert--solid .kf-alert__close:hover{background:color-mix(in srgb,var(--_on) 16%,transparent);color:var(--_on)}.kf-alert--solid .kf-alert__close:focus-visible{box-shadow:0 0 0 2px var(--_solid),0 0 0 4px var(--_on)}.kf-alert--solid .kf-alert__actions{--kf-color-primary: var(--_on);--kf-color-primary-hover: color-mix(in srgb, var(--_on) 88%, var(--_solid));--kf-color-primary-soft: color-mix(in srgb, var(--_on) 16%, transparent);--kf-color-white: var(--_btn-fg);--kf-color-text: var(--_on);--kf-color-text-muted: var(--_on);--kf-color-border-strong: color-mix(in srgb, var(--_on) 55%, transparent);--kf-color-surface: color-mix(in srgb, var(--_on) 16%, transparent);--kf-shadow-focus: 0 0 0 2px var(--_solid), 0 0 0 4px var(--_on)}.kf-alert--card.kf-alert--icon-center{display:grid;grid-template-columns:auto minmax(0,1fr);row-gap:var(--_body-gap)}.kf-alert--icon-center .kf-alert__body{display:contents}.kf-alert--icon-center .kf-alert__icon{grid-area:1 / 1;align-self:center}.kf-alert--icon-center .kf-alert__content{grid-area:1 / 2}.kf-alert--icon-center .kf-alert__actions{grid-area:2 / 2}.kf-alert--icon-center .kf-alert__close{grid-area:1 / 3;align-self:center;margin-block-start:0}\n"] }]
|
|
3641
|
-
}], propDecorators: { tone: [{ type: i0.Input, args: [{ isSignal: true, alias: "tone", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], iconAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconAlign", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }] } });
|
|
3735
|
+
}, template: "@if (open()) {\n <div class=\"kf-alert\" [class]=\"rootClass()\" [attr.role]=\"ariaRole()\">\n <!--\n `bar` y `solid` usan el glifo de trazo de `kf-icon`. `surface` y `elevated`\n dibujan un glifo relleno propio: `kf-icon` solo tiene trazo y una marca\n blanca sobre un relleno exige dos colores en el mismo glifo.\n -->\n @if (variant() === 'bar') {\n <kf-icon class=\"kf-alert__icon\" [name]=\"toneIcon()\" size=\"sm\" />\n } @else if (appearance() === 'solid') {\n <kf-icon class=\"kf-alert__icon\" [name]=\"toneIcon()\" size=\"md\" />\n } @else {\n <span class=\"kf-alert__icon\">\n <svg class=\"kf-alert__glyph\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n @switch (tone()) {\n @case ('ok') {\n <circle class=\"kf-alert__shape\" cx=\"12\" cy=\"12\" r=\"9.5\" />\n <path class=\"kf-alert__mark\" d=\"m7.8 12.4 2.8 2.8 5.6-5.8\" />\n }\n @case ('warn') {\n <path\n class=\"kf-alert__shape\"\n d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z\"\n />\n <path class=\"kf-alert__mark\" d=\"M12 9.2v4.2\" />\n <path class=\"kf-alert__mark kf-alert__mark--dot\" d=\"M12 17h.01\" />\n }\n @case ('error') {\n <polygon\n class=\"kf-alert__shape\"\n points=\"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2\"\n />\n <path class=\"kf-alert__mark\" d=\"M12 7.8v4.6\" />\n <path class=\"kf-alert__mark kf-alert__mark--dot\" d=\"M12 16h.01\" />\n }\n @default {\n <circle class=\"kf-alert__shape\" cx=\"12\" cy=\"12\" r=\"9.5\" />\n <path class=\"kf-alert__mark\" d=\"M12 11v5\" />\n <path class=\"kf-alert__mark kf-alert__mark--dot\" d=\"M12 7.6h.01\" />\n }\n }\n </svg>\n </span>\n }\n <div class=\"kf-alert__body\">\n <div class=\"kf-alert__content\">\n @if (title()) {\n <p class=\"kf-alert__title\">{{ title() }}</p>\n }\n <div class=\"kf-alert__message\"><ng-content /></div>\n </div>\n <div class=\"kf-alert__actions\"><ng-content select=\"[kfAlertActions]\" /></div>\n </div>\n @if (dismissible()) {\n <button\n type=\"button\"\n class=\"kf-alert__close\"\n aria-label=\"Cerrar aviso\"\n (click)=\"open.set(false)\"\n >\n <kf-icon name=\"x\" size=\"sm\" />\n </button>\n }\n </div>\n}\n", styles: [":host{display:block;font-family:var(--kf-font-body)}.kf-alert{--_mark: var(--kf-color-white);--_actions-gap: calc(var(--kf-space-sm) + var(--kf-space-xs));display:flex;color:var(--kf-color-text);font-size:var(--kf-font-size-body-sm);line-height:1.5}.kf-alert--info{--_tone: var(--kf-color-info);--_soft: var(--kf-color-info-soft);--_strong: var(--kf-color-info-strong);--_icon: var(--kf-color-info)}.kf-alert--ok{--_tone: var(--kf-color-success);--_soft: var(--kf-color-success-soft);--_strong: var(--kf-color-success-strong);--_icon: color-mix(in srgb, var(--kf-color-success) 60%, var(--kf-color-success-strong))}.kf-alert--warn{--_tone: var(--kf-color-warning);--_soft: var(--kf-color-warning-soft);--_strong: var(--kf-color-warning-strong);--_icon: color-mix(in srgb, var(--kf-color-warning) 35%, var(--kf-color-warning-strong));--_mark: var(--kf-color-ink)}.kf-alert--error{--_tone: var(--kf-color-error);--_soft: var(--kf-color-error-soft);--_strong: var(--kf-color-error-strong);--_icon: var(--kf-color-error)}.kf-alert__body{display:flex;min-width:0}.kf-alert__content{display:flex;flex-direction:column;min-width:0}.kf-alert__title{margin:0;color:var(--kf-color-ink);font-family:var(--kf-font-body);font-size:var(--kf-font-size-body);font-weight:var(--kf-font-weight-medium);line-height:1.5}.kf-alert__message{max-inline-size:72ch;color:var(--kf-color-text);overflow-wrap:anywhere}.kf-alert__message:has(>div,>section,>form,>table){max-inline-size:none}.kf-alert__message:empty{display:none}.kf-alert__actions{display:flex;flex:0 1 auto;flex-wrap:wrap;align-items:center;gap:var(--_actions-gap);min-width:0;max-width:100%}.kf-alert__actions:empty{display:none}.kf-alert__actions>*{max-width:100%;min-width:0}.kf-alert__actions ::ng-deep>:is(div,span,ul)[kfAlertActions]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--_actions-gap);margin:0;padding:0;list-style:none}.kf-alert__close{position:relative;flex:none;display:inline-flex;align-self:center;margin-inline-start:var(--kf-space-sm);padding:2px;border:none;background:transparent;color:var(--kf-color-text-muted);border-radius:var(--kf-radius-xs);cursor:pointer;transition:background-color .14s ease,color .14s ease}.kf-alert__close:after{content:\"\";position:absolute;top:50%;left:calc(-1 * var(--kf-space-sm));width:44px;height:44px;transform:translateY(-50%)}.kf-alert__close:hover{background:var(--kf-color-gray-100);color:var(--kf-color-ink)}.kf-alert__close:focus-visible{outline:none;box-shadow:var(--kf-shadow-focus)}@media(prefers-reduced-motion:reduce){.kf-alert__close{transition:none}}.kf-alert--bar{align-items:center;gap:var(--kf-space-sm);padding:var(--kf-space-sm) var(--kf-space-md);border:1px solid color-mix(in srgb,var(--_tone) 40%,var(--_soft));border-width:1px 0;border-radius:0;background:var(--_soft)}.kf-alert--bar .kf-alert__icon{align-items:center;justify-content:center;color:var(--_strong)}.kf-alert--bar .kf-alert__body{flex:1 1 0;flex-wrap:wrap;align-items:center;gap:var(--kf-space-sm) var(--kf-space-lg)}.kf-alert--bar .kf-alert__content{flex:1 1 20rem;flex-flow:row wrap;align-items:baseline;gap:2px var(--kf-space-xs)}.kf-alert--bar .kf-alert__title{font-size:inherit}.kf-alert--bar .kf-alert__message{max-inline-size:none}.kf-alert--bar .kf-alert__actions{flex-basis:100%}.kf-alert--bar.kf-alert--actions-inline .kf-alert__actions{flex-basis:auto}.kf-alert--bar .kf-alert__close:hover{background:color-mix(in srgb,var(--_strong) 12%,transparent)}.kf-alert--card{--_line: calc(var(--kf-font-size-body-sm) * 1.5);--_content-gap: 0px;align-items:flex-start}.kf-alert--card.kf-alert--titled{--_line: var(--_title-line)}.kf-alert--card .kf-alert__icon{display:flex;flex:none;align-items:center;justify-content:center;inline-size:var(--_glyph);block-size:var(--_line);color:var(--_icon)}.kf-alert--card .kf-alert__body{flex:1 1 0;flex-direction:column;gap:var(--_body-gap)}.kf-alert--card .kf-alert__content{gap:var(--_content-gap)}.kf-alert--card .kf-alert__title{color:inherit;font-size:var(--_title-size);font-weight:var(--_title-weight);line-height:var(--_title-line)}.kf-alert--card .kf-alert__message{color:inherit}.kf-alert--card.kf-alert--titled .kf-alert__message{color:var(--_desc)}.kf-alert--card .kf-alert__close{align-self:flex-start;margin-inline-start:0;margin-inline-end:calc(var(--kf-space-md) - var(--_pad-end));margin-block-start:calc((var(--_line) - 20px) / 2)}.kf-alert__glyph{display:block;flex:none;inline-size:var(--_glyph);block-size:var(--_glyph);fill:none;stroke:none}.kf-alert__shape{fill:currentColor;stroke:currentColor;stroke-width:1;stroke-linejoin:round}.kf-alert__mark{fill:none;stroke:var(--_mark);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.kf-alert__mark--dot{stroke-width:2.6}.kf-alert--surface{--_glyph: 16px;--_title-line: calc(var(--kf-font-size-body) * 1.5);--_title-size: var(--kf-font-size-body);--_title-weight: 500;--_body-gap: calc(var(--kf-space-sm) + var(--kf-space-xs));--_desc: var(--kf-color-text);--_pad-end: calc(var(--kf-space-sm) + var(--kf-space-xs));gap:var(--kf-space-sm);padding:var(--kf-space-sm) var(--_pad-end);border:1px solid color-mix(in srgb,var(--_tone) 40%,var(--_soft));border-radius:var(--kf-radius-sm);background:var(--_soft);color:var(--kf-color-ink)}.kf-alert--surface.kf-alert--titled{--_glyph: 24px;--_content-gap: var(--kf-space-sm);--_pad-end: var(--kf-space-lg);gap:calc(var(--kf-space-sm) + var(--kf-space-xs));padding:calc(var(--kf-space-md) + var(--kf-space-xs)) var(--_pad-end)}.kf-alert--surface .kf-alert__close:hover{background:color-mix(in srgb,var(--_strong) 12%,transparent)}.kf-alert--elevated{--_glyph: 24px;--_title-line: var(--kf-space-lg);--_title-size: var(--kf-font-size-body-sm);--_title-weight: var(--kf-font-weight-medium);--_body-gap: var(--kf-space-sm);--_actions-gap: 0px;--_desc: var(--kf-color-text-muted);--_pad-end: var(--kf-space-md);gap:var(--kf-space-md);padding:var(--kf-space-md) var(--_pad-end);border:1px solid var(--kf-color-border);border-radius:var(--kf-radius-sm);background:var(--kf-color-white);box-shadow:var(--kf-shadow-md);color:var(--kf-color-ink)}.kf-alert--elevated .kf-alert__actions{margin-inline-start:calc(-1 * var(--kf-space-sm))}.kf-alert--elevated .kf-alert__actions ::ng-deep>:is(div,span,ul)[kfAlertActions]>*{position:relative}.kf-alert--elevated .kf-alert__actions ::ng-deep>:is(div,span,ul)[kfAlertActions]>:not(:last-child):after{content:\"\\b7\";content:\"\\b7\" / \"\";position:absolute;inset-block:0;inset-inline-start:100%;display:grid;place-items:center;inline-size:0;color:var(--kf-color-text-muted);pointer-events:none}.kf-alert--solid{--_glyph: 20px;--_title-line: calc(var(--kf-space-md) + var(--kf-space-xs));--_title-size: .9375rem;--_title-weight: var(--kf-font-weight-medium);--_body-gap: var(--kf-space-sm);--_actions-gap: var(--kf-space-sm);--_solid: var(--_strong);--_on: var(--kf-color-white);--_btn-fg: var(--_solid);--_desc: var(--_on);--_pad-end: var(--kf-space-sm);gap:calc(var(--kf-space-sm) + var(--kf-space-xs));padding:calc(var(--kf-space-sm) + var(--kf-space-xs)) var(--_pad-end) calc(var(--kf-space-sm) + var(--kf-space-xs)) var(--kf-space-md);border-radius:var(--kf-radius-sm);background:var(--_solid);color:var(--_on)}.kf-alert--solid.kf-alert--warn{--_solid: var(--kf-color-warning);--_on: var(--kf-color-ink);--_btn-fg: var(--kf-color-white)}.kf-alert--solid .kf-alert__icon{color:var(--_on)}.kf-alert--solid:not(.kf-alert--titled) .kf-alert__message{font-weight:500}.kf-alert--solid .kf-alert__close{color:var(--_on)}.kf-alert--solid .kf-alert__close:hover{background:color-mix(in srgb,var(--_on) 16%,transparent);color:var(--_on)}.kf-alert--solid .kf-alert__close:focus-visible{box-shadow:0 0 0 2px var(--_solid),0 0 0 4px var(--_on)}.kf-alert--solid .kf-alert__actions{--kf-color-primary: var(--_on);--kf-color-primary-hover: color-mix(in srgb, var(--_on) 88%, var(--_solid));--kf-color-primary-soft: color-mix(in srgb, var(--_on) 16%, transparent);--kf-color-white: var(--_btn-fg);--kf-color-text: var(--_on);--kf-color-text-muted: var(--_on);--kf-color-border-strong: color-mix(in srgb, var(--_on) 55%, transparent);--kf-color-surface: color-mix(in srgb, var(--_on) 16%, transparent);--kf-shadow-focus: 0 0 0 2px var(--_solid), 0 0 0 4px var(--_on)}.kf-alert--card.kf-alert--icon-center{display:grid;grid-template-columns:auto minmax(0,1fr);row-gap:var(--_body-gap)}.kf-alert--icon-center .kf-alert__body{display:contents}.kf-alert--icon-center .kf-alert__icon{grid-area:1 / 1;align-self:center}.kf-alert--icon-center .kf-alert__content{grid-area:1 / 2}.kf-alert--icon-center .kf-alert__actions{grid-area:2 / 2}.kf-alert--icon-center .kf-alert__close{grid-area:1 / 3;align-self:center;margin-block-start:0}\n"] }]
|
|
3736
|
+
}], propDecorators: { tone: [{ type: i0.Input, args: [{ isSignal: true, alias: "tone", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], iconAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconAlign", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], actionsInline: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionsInline", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }] } });
|
|
3642
3737
|
|
|
3643
3738
|
/**
|
|
3644
3739
|
* Fila clickeable de una lista de pendientes/alertas: ícono circular con
|
|
@@ -6059,7 +6154,7 @@ class Select {
|
|
|
6059
6154
|
}
|
|
6060
6155
|
}
|
|
6061
6156
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: Select, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6062
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: Select, isStandalone: true, selector: "kf-select", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hideLabel: { classPropertyName: "hideLabel", publicName: "hideLabel", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, searchThreshold: { classPropertyName: "searchThreshold", publicName: "searchThreshold", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, panelTitle: { classPropertyName: "panelTitle", publicName: "panelTitle", isSignal: true, isRequired: false, transformFunction: null }, panelWidth: { classPropertyName: "panelWidth", publicName: "panelWidth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { properties: { "class.kf-select--compact": "variant() === 'compact'", "class.kf-select--width-sm": "width() === 'sm'", "class.kf-select--width-lg": "width() === 'lg'", "class.kf-select--width-full": "width() === 'full'", "class.kf-select--width-fit": "width() === 'fit'", "class.kf-select--size-sm": "size() === 'sm'" } }, viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "panelTemplate", first: true, predicate: ["panelTemplate"], descendants: true, isSignal: true }, { propertyName: "searchInputRef", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }, { propertyName: "panelRef", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (label()) {\n <kf-field-label [for]=\"triggerId\" [required]=\"required()\" [visuallyHidden]=\"hideLabel()\">{{\n label()\n }}</kf-field-label>\n}\n<button\n #trigger\n type=\"button\"\n [id]=\"triggerId\"\n class=\"kf-select__trigger\"\n [class.kf-select__trigger--disabled]=\"disabled()\"\n [class.kf-select__trigger--invalid]=\"invalid()\"\n [class.kf-select__trigger--with-icon]=\"!!icon()\"\n [disabled]=\"disabled()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? listboxId : null\"\n [attr.aria-label]=\"triggerAriaLabel()\"\n [attr.aria-describedby]=\"errorMessage() ? errorId : null\"\n [attr.aria-invalid]=\"invalid() ? true : null\"\n [attr.aria-required]=\"required() ? true : null\"\n [class.kf-select__trigger--tagged]=\"!!selectedOption()?.tag\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\"\n>\n @if (icon(); as iconName) {\n <kf-icon class=\"kf-select__icon\" [name]=\"iconName\" size=\"sm\" />\n }\n @if (prefix(); as prefixText) {\n <span class=\"kf-select__prefix\">{{ prefixText }}</span>\n }\n <span\n class=\"kf-select__value\"\n [class.kf-select__value--placeholder]=\"!selectedOption()\"\n [class.kf-select__value--fit]=\"width() === 'fit'\"\n >\n @if (width() === 'fit') {\n <span class=\"kf-select__value-text\">{{ triggerText() }}</span>\n <!-- Reserva el ancho de la opci\u00F3n m\u00E1s larga: oculto a la vista y al\n \u00E1rbol de accesibilidad, solo aporta tama\u00F1o. -->\n <span class=\"kf-select__sizer\" aria-hidden=\"true\">\n @for (text of fitTexts(); track text) {\n <span>{{ text }}</span>\n }\n </span>\n } @else {\n {{ triggerText() }}\n }\n </span>\n @if (width() === 'fit' && fitTags().length) {\n <!-- Con `fit` el hueco del tag se reserva siempre con el m\u00E1s ancho: los\n dem\u00E1s se apilan en la misma celda y solo el elegido se ve. -->\n <span class=\"kf-select__tag-slot\">\n @for (tag of fitTags(); track tag) {\n <kf-badge\n class=\"kf-select__tag\"\n [class.kf-select__tag--reserved]=\"tag !== selectedOption()?.tag\"\n [attr.aria-hidden]=\"tag !== selectedOption()?.tag ? 'true' : null\"\n >{{ tag }}</kf-badge\n >\n }\n </span>\n } @else if (selectedOption()?.tag; as tag) {\n <kf-badge class=\"kf-select__tag\">{{ tag }}</kf-badge>\n }\n <span\n class=\"kf-select__caret kf-caret\"\n [class.kf-select__caret--open]=\"isOpen()\"\n [class.kf-caret--open]=\"isOpen()\"\n aria-hidden=\"true\"\n ></span>\n</button>\n@if (errorMessage(); as message) {\n <span class=\"kf-select__error kf-field-error\" [id]=\"errorId\" role=\"alert\">{{ message }}</span>\n}\n<ng-template #panelTemplate>\n <div #panel class=\"kf-select__panel\" [class.kf-select__panel--compact]=\"variant() === 'compact'\">\n @if (panelTitle(); as title) {\n <div class=\"kf-select__panel-title kf-overline-text\" aria-hidden=\"true\">{{ title }}</div>\n }\n @if (showSearch()) {\n <input\n #searchInput\n type=\"text\"\n class=\"kf-select__search\"\n placeholder=\"Buscar\u2026\"\n aria-label=\"Buscar opci\u00F3n\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-expanded=\"true\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"filteredOptions().length ? optionId(activeIndex()) : null\"\n [value]=\"searchQuery()\"\n (input)=\"onSearchInput($event)\"\n (keydown.arrowdown)=\"$event.preventDefault(); moveActive(1)\"\n (keydown.arrowup)=\"$event.preventDefault(); moveActive(-1)\"\n (keydown.enter)=\"$event.preventDefault(); selectActive()\"\n (keydown)=\"onSearchKeydown($event)\"\n />\n }\n <ul\n class=\"kf-select__list\"\n [id]=\"listboxId\"\n role=\"listbox\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabel() ? null : triggerId\"\n >\n @for (option of filteredOptions(); track option.value; let i = $index) {\n <li\n class=\"kf-select__option\"\n [id]=\"optionId(i)\"\n [class.kf-select__option--selected]=\"option.value === value()\"\n [class.kf-select__option--active]=\"i === activeIndex()\"\n role=\"option\"\n tabindex=\"-1\"\n [attr.aria-selected]=\"option.value === value()\"\n [attr.aria-label]=\"optionAriaLabel(option)\"\n [class.kf-select__option--rich]=\"!!(option.tag || option.detail)\"\n (click)=\"select(option)\"\n (mouseenter)=\"activeIndex.set(i)\"\n (keydown)=\"onOptionKeydown($event, option, i)\"\n >\n @if (option.tag || option.detail) {\n <span class=\"kf-select__option-main\">\n <span class=\"kf-select__option-label\">{{ option.label }}</span>\n @if (option.tag) {\n <kf-badge class=\"kf-select__tag\">{{ option.tag }}</kf-badge>\n }\n </span>\n @if (option.detail) {\n <span class=\"kf-select__option-detail\">{{ option.detail }}</span>\n }\n } @else {\n {{ option.label }}\n }\n </li>\n } @empty {\n <li class=\"kf-select__empty\">\n {{ searchQuery() ? 'Sin resultados' : 'Sin opciones disponibles' }}\n </li>\n }\n </ul>\n </div>\n</ng-template>\n", styles: [".kf-caret{flex-shrink:0;width:8px;height:8px;border-right:2px solid var(--kf-color-text-muted);border-bottom:2px solid var(--kf-color-text-muted);transform:rotate(45deg);transition:transform .14s;margin-top:-4px}.kf-caret--open{transform:rotate(-135deg);margin-top:4px}.kf-field-hint{font-size:.75rem;color:var(--kf-color-text-muted)}.kf-field-error{display:flex;align-items:center;gap:var(--kf-space-xs);font-size:.75rem;font-weight:600;color:var(--kf-color-error-strong)}.kf-overline-text{font-family:var(--kf-font-title);font-size:var(--kf-font-size-caption);font-weight:var(--kf-font-weight-medium);letter-spacing:.04em;text-transform:uppercase;color:var(--kf-color-text-muted)}:host{display:flex;flex-direction:column;gap:var(--kf-space-xs);width:var(--kf-select-width-md);font-family:var(--kf-font-body)}:host(.kf-select--compact){width:max-content;max-width:160px}:host(.kf-select--width-sm){width:var(--kf-select-width-sm)}:host(.kf-select--width-lg){width:var(--kf-select-width-lg)}:host(.kf-select--width-full){width:100%}:host(.kf-select--width-fit){width:max-content;max-width:var(--kf-select-fit-max-width, 20rem)}:host(.kf-select--compact) .kf-select__trigger{padding:6px var(--kf-space-sm);font-size:.85rem;gap:var(--kf-space-xs)}:host(.kf-select--compact) .kf-select__value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kf-select__trigger{display:flex;align-items:center;justify-content:space-between;gap:var(--kf-space-sm);width:100%;font:inherit;color:var(--kf-color-text);padding:var(--kf-space-sm) var(--kf-space-md);min-height:var(--kf-select-min-height, auto);background:var(--kf-color-white);border:1px solid var(--kf-color-border-control);border-radius:var(--kf-radius-sm);cursor:pointer;transition:border-color .14s,box-shadow .14s}:host(.kf-select--size-sm) .kf-select__trigger{box-sizing:border-box;min-height:var(--kf-select-min-height, var(--kf-control-sm, 2rem));padding-block:0}:host(.kf-select--size-sm:not(.kf-select--compact)) .kf-select__trigger{font-size:var(--kf-font-size-body-sm)}.kf-select__trigger:hover:not(:disabled){border-color:var(--kf-color-text-muted)}.kf-select__trigger:focus-visible{outline:none;border-color:var(--kf-color-primary);box-shadow:var(--kf-shadow-focus)}.kf-select__trigger--disabled{opacity:.5;cursor:not-allowed}.kf-select__trigger--invalid{border-color:var(--kf-color-error)}.kf-select__trigger--invalid:focus-visible{border-color:var(--kf-color-error);box-shadow:var(--kf-shadow-focus-error)}.kf-select__value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kf-select__value--fit{display:grid;grid-template-columns:minmax(0,1fr);text-align:start}.kf-select__value-text{grid-area:1 / 1;overflow:hidden;text-overflow:ellipsis}.kf-select__sizer{grid-area:1 / 1;display:grid;height:0;overflow:hidden;visibility:hidden}.kf-select__sizer>span{grid-area:1 / 1;white-space:nowrap}.kf-select__icon{flex:none;color:var(--kf-color-text-muted)}.kf-select__trigger--with-icon .kf-select__value{flex:1 1 auto;min-width:0;text-align:start}:host(.kf-select--compact) .kf-select__trigger--with-icon .kf-select__value{color:var(--kf-color-ink);font-weight:600}.kf-select__trigger--tagged .kf-select__value{flex:1 1 auto;min-width:0;text-align:start}.kf-select__tag{flex:none}.kf-select__tag-slot{display:grid;flex:none;justify-items:end}.kf-select__tag-slot>.kf-select__tag{grid-area:1 / 1}.kf-select__tag--reserved{visibility:hidden}.kf-select__trigger .kf-select__tag{margin-block:-2px}.kf-select__prefix{flex:none;color:var(--kf-color-text-muted);white-space:nowrap}.kf-select__value--placeholder{color:var(--kf-color-text-muted)}.kf-select__panel{box-sizing:border-box;font-family:var(--kf-font-body);width:100%;background:var(--kf-color-white);border:1px solid var(--kf-color-border);border-radius:var(--kf-radius-sm);box-shadow:var(--kf-shadow-md);overflow:hidden}.kf-select__panel-title{padding:var(--kf-space-sm) var(--kf-space-md) var(--kf-space-xs)}.kf-select__panel--compact .kf-select__panel-title{padding:var(--kf-space-xs) var(--kf-space-sm) 2px}.kf-select__search{box-sizing:border-box;width:100%;font:inherit;font-family:var(--kf-font-body);color:var(--kf-color-text);padding:var(--kf-space-sm) var(--kf-space-md);border:none;border-bottom:1px solid var(--kf-color-border);border-radius:var(--kf-radius-sm) var(--kf-radius-sm) 0 0;outline:none}.kf-select__search:focus-visible{box-shadow:inset 0 0 0 2px var(--kf-color-primary)}.kf-select__list{box-sizing:border-box;width:100%;margin:0;padding:var(--kf-space-xs) 0;list-style:none;max-height:240px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--kf-color-gray-400) transparent}.kf-select__list::-webkit-scrollbar{width:6px}.kf-select__list::-webkit-scrollbar-track{background:transparent}.kf-select__list::-webkit-scrollbar-thumb{background-color:var(--kf-color-gray-400);border-radius:var(--kf-radius-pill)}.kf-select__list::-webkit-scrollbar-thumb:hover{background-color:var(--kf-color-gray-500)}.kf-select__option{padding:var(--kf-space-sm) var(--kf-space-md);outline:none;color:var(--kf-color-text);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kf-select__option--rich{display:flex;flex-direction:column;gap:2px}.kf-select__option-main{display:flex;align-items:center;justify-content:space-between;gap:var(--kf-space-sm);min-width:0}.kf-select__option-label,.kf-select__option-detail{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.kf-select__option-detail{font-size:var(--kf-font-size-body-sm);font-weight:400;color:var(--kf-color-text-muted)}.kf-select__panel--compact .kf-select__option{padding:6px var(--kf-space-sm);font-size:.85rem}.kf-select__option:hover{background:var(--kf-color-primary-soft)}.kf-select__option--selected{background:var(--kf-color-primary-soft);color:var(--kf-color-primary);font-weight:600}.kf-select__option--active{background:var(--kf-color-primary-soft)}.kf-select__option:focus-visible{background:var(--kf-color-primary-soft);box-shadow:inset 0 0 0 2px var(--kf-color-primary)}.kf-select__empty{text-align:center;padding:var(--kf-space-sm) var(--kf-space-md);color:var(--kf-color-text-muted)}\n"], dependencies: [{ kind: "component", type: Badge, selector: "kf-badge", inputs: ["tone", "variant", "dot", "truncate", "wrap"] }, { kind: "component", type: FieldLabel, selector: "kf-field-label", inputs: ["for", "required", "visuallyHidden"] }, { kind: "component", type: Icon, selector: "kf-icon", inputs: ["name", "size", "rotate", "filled"] }] });
|
|
6157
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: Select, isStandalone: true, selector: "kf-select", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hideLabel: { classPropertyName: "hideLabel", publicName: "hideLabel", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, searchThreshold: { classPropertyName: "searchThreshold", publicName: "searchThreshold", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, panelTitle: { classPropertyName: "panelTitle", publicName: "panelTitle", isSignal: true, isRequired: false, transformFunction: null }, panelWidth: { classPropertyName: "panelWidth", publicName: "panelWidth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { properties: { "class.kf-select--compact": "variant() === 'compact'", "class.kf-select--width-sm": "width() === 'sm'", "class.kf-select--width-lg": "width() === 'lg'", "class.kf-select--width-full": "width() === 'full'", "class.kf-select--width-fit": "width() === 'fit'", "class.kf-select--size-sm": "size() === 'sm'" } }, viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "panelTemplate", first: true, predicate: ["panelTemplate"], descendants: true, isSignal: true }, { propertyName: "searchInputRef", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }, { propertyName: "panelRef", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (label()) {\n <kf-field-label [for]=\"triggerId\" [required]=\"required()\" [visuallyHidden]=\"hideLabel()\">{{\n label()\n }}</kf-field-label>\n}\n<button\n #trigger\n type=\"button\"\n [id]=\"triggerId\"\n class=\"kf-select__trigger\"\n [class.kf-select__trigger--disabled]=\"disabled()\"\n [class.kf-select__trigger--invalid]=\"invalid()\"\n [class.kf-select__trigger--with-icon]=\"!!icon()\"\n [disabled]=\"disabled()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? listboxId : null\"\n [attr.aria-label]=\"triggerAriaLabel()\"\n [attr.aria-describedby]=\"errorMessage() ? errorId : null\"\n [attr.aria-invalid]=\"invalid() ? true : null\"\n [attr.aria-required]=\"required() ? true : null\"\n [class.kf-select__trigger--tagged]=\"!!selectedOption()?.tag\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\"\n>\n @if (icon(); as iconName) {\n <kf-icon class=\"kf-select__icon\" [name]=\"iconName\" size=\"sm\" />\n }\n @if (prefix(); as prefixText) {\n <span class=\"kf-select__prefix\">{{ prefixText }}</span>\n }\n <span\n class=\"kf-select__value\"\n [class.kf-select__value--placeholder]=\"!selectedOption()\"\n [class.kf-select__value--fit]=\"width() === 'fit'\"\n >\n @if (width() === 'fit') {\n <span class=\"kf-select__value-text\">{{ triggerText() }}</span>\n <!-- Reserva el ancho de la opci\u00F3n m\u00E1s larga: oculto a la vista y al\n \u00E1rbol de accesibilidad, solo aporta tama\u00F1o. -->\n <span class=\"kf-select__sizer\" aria-hidden=\"true\">\n @for (text of fitTexts(); track text) {\n <span>{{ text }}</span>\n }\n </span>\n } @else {\n {{ triggerText() }}\n }\n </span>\n @if (width() === 'fit' && fitTags().length) {\n <!-- Con `fit` el hueco del tag se reserva siempre con el m\u00E1s ancho: los\n dem\u00E1s se apilan en la misma celda y solo el elegido se ve. -->\n <span class=\"kf-select__tag-slot\">\n @for (tag of fitTags(); track tag) {\n <kf-badge\n class=\"kf-select__tag\"\n [class.kf-select__tag--reserved]=\"tag !== selectedOption()?.tag\"\n [attr.aria-hidden]=\"tag !== selectedOption()?.tag ? 'true' : null\"\n >{{ tag }}</kf-badge\n >\n }\n </span>\n } @else if (selectedOption()?.tag; as tag) {\n <kf-badge class=\"kf-select__tag\">{{ tag }}</kf-badge>\n }\n <span\n class=\"kf-select__caret kf-caret\"\n [class.kf-select__caret--open]=\"isOpen()\"\n [class.kf-caret--open]=\"isOpen()\"\n aria-hidden=\"true\"\n ></span>\n</button>\n@if (errorMessage(); as message) {\n <span class=\"kf-select__error kf-field-error\" [id]=\"errorId\" role=\"alert\">{{ message }}</span>\n}\n<ng-template #panelTemplate>\n <div #panel class=\"kf-select__panel\" [class.kf-select__panel--compact]=\"variant() === 'compact'\">\n @if (panelTitle(); as title) {\n <div class=\"kf-select__panel-title kf-overline-text\" aria-hidden=\"true\">{{ title }}</div>\n }\n @if (showSearch()) {\n <input\n #searchInput\n type=\"text\"\n class=\"kf-select__search\"\n placeholder=\"Buscar\u2026\"\n aria-label=\"Buscar opci\u00F3n\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-expanded=\"true\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"filteredOptions().length ? optionId(activeIndex()) : null\"\n [value]=\"searchQuery()\"\n (input)=\"onSearchInput($event)\"\n (keydown.arrowdown)=\"$event.preventDefault(); moveActive(1)\"\n (keydown.arrowup)=\"$event.preventDefault(); moveActive(-1)\"\n (keydown.enter)=\"$event.preventDefault(); selectActive()\"\n (keydown)=\"onSearchKeydown($event)\"\n />\n }\n <ul\n class=\"kf-select__list\"\n [id]=\"listboxId\"\n role=\"listbox\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabel() ? null : triggerId\"\n >\n @for (option of filteredOptions(); track option.value; let i = $index) {\n <li\n class=\"kf-select__option\"\n [id]=\"optionId(i)\"\n [class.kf-select__option--selected]=\"option.value === value()\"\n [class.kf-select__option--active]=\"i === activeIndex()\"\n role=\"option\"\n tabindex=\"-1\"\n [attr.aria-selected]=\"option.value === value()\"\n [attr.aria-label]=\"optionAriaLabel(option)\"\n [class.kf-select__option--rich]=\"!!(option.tag || option.detail)\"\n [class.kf-select__option--detailed]=\"!!option.detail\"\n (click)=\"select(option)\"\n (mouseenter)=\"activeIndex.set(i)\"\n (keydown)=\"onOptionKeydown($event, option, i)\"\n >\n @if (option.tag || option.detail) {\n <span class=\"kf-select__option-main\">\n <span class=\"kf-select__option-label\">{{ option.label }}</span>\n @if (option.tag) {\n <kf-badge class=\"kf-select__tag\">{{ option.tag }}</kf-badge>\n }\n </span>\n @if (option.detail) {\n <span class=\"kf-select__option-detail\">{{ option.detail }}</span>\n }\n } @else {\n {{ option.label }}\n }\n </li>\n } @empty {\n <li class=\"kf-select__empty\">\n {{ searchQuery() ? 'Sin resultados' : 'Sin opciones disponibles' }}\n </li>\n }\n </ul>\n </div>\n</ng-template>\n", styles: [".kf-caret{flex-shrink:0;width:8px;height:8px;border-right:2px solid var(--kf-color-text-muted);border-bottom:2px solid var(--kf-color-text-muted);transform:rotate(45deg);transition:transform .14s;margin-top:-4px}.kf-caret--open{transform:rotate(-135deg);margin-top:4px}.kf-field-hint{font-size:.75rem;color:var(--kf-color-text-muted)}.kf-field-error{display:flex;align-items:center;gap:var(--kf-space-xs);font-size:.75rem;font-weight:600;color:var(--kf-color-error-strong)}.kf-overline-text{font-family:var(--kf-font-title);font-size:var(--kf-font-size-caption);font-weight:var(--kf-font-weight-medium);letter-spacing:.04em;text-transform:uppercase;color:var(--kf-color-text-muted)}:host{display:flex;flex-direction:column;gap:var(--kf-space-xs);width:var(--kf-select-width-md);font-family:var(--kf-font-body)}:host(.kf-select--compact){width:max-content;max-width:160px}:host(.kf-select--width-sm){width:var(--kf-select-width-sm)}:host(.kf-select--width-lg){width:var(--kf-select-width-lg)}:host(.kf-select--width-full){width:100%}:host(.kf-select--width-fit){width:max-content;max-width:var(--kf-select-fit-max-width, 20rem)}:host(.kf-select--compact) .kf-select__trigger{padding:6px var(--kf-space-sm);font-size:.85rem;gap:var(--kf-space-xs)}:host(.kf-select--compact) .kf-select__value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kf-select__trigger{display:flex;align-items:center;justify-content:space-between;gap:var(--kf-space-sm);width:100%;font:inherit;color:var(--kf-color-text);padding:var(--kf-space-sm) var(--kf-space-md);min-height:var(--kf-select-min-height, auto);background:var(--kf-color-white);border:1px solid var(--kf-color-border-control);border-radius:var(--kf-radius-sm);cursor:pointer;transition:border-color .14s,box-shadow .14s}:host(.kf-select--size-sm) .kf-select__trigger{box-sizing:border-box;min-height:var(--kf-select-min-height, var(--kf-control-sm, 2rem));padding-block:0}:host(.kf-select--size-sm:not(.kf-select--compact)) .kf-select__trigger{font-size:var(--kf-font-size-body-sm)}.kf-select__trigger:hover:not(:disabled){border-color:var(--kf-color-text-muted)}.kf-select__trigger:focus-visible{outline:none;border-color:var(--kf-color-primary);box-shadow:var(--kf-shadow-focus)}.kf-select__trigger--disabled{opacity:.5;cursor:not-allowed}.kf-select__trigger--invalid{border-color:var(--kf-color-error)}.kf-select__trigger--invalid:focus-visible{border-color:var(--kf-color-error);box-shadow:var(--kf-shadow-focus-error)}.kf-select__value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kf-select__value--fit{display:grid;grid-template-columns:minmax(0,1fr);text-align:start}.kf-select__value-text{grid-area:1 / 1;overflow:hidden;text-overflow:ellipsis}.kf-select__sizer{grid-area:1 / 1;display:grid;height:0;overflow:hidden;visibility:hidden}.kf-select__sizer>span{grid-area:1 / 1;white-space:nowrap}.kf-select__icon{flex:none;color:var(--kf-color-text-muted)}.kf-select__trigger--with-icon .kf-select__value{flex:1 1 auto;min-width:0;text-align:start}:host(.kf-select--compact) .kf-select__trigger--with-icon .kf-select__value{color:var(--kf-color-ink);font-weight:600}.kf-select__trigger--tagged .kf-select__value{flex:1 1 auto;min-width:0;text-align:start}.kf-select__tag{flex:none}.kf-select__tag-slot{display:grid;flex:none;justify-items:end}.kf-select__tag-slot>.kf-select__tag{grid-area:1 / 1}.kf-select__tag--reserved{visibility:hidden}.kf-select__trigger .kf-select__tag{margin-block:-2px}.kf-select__prefix{flex:none;color:var(--kf-color-text-muted);white-space:nowrap}.kf-select__value--placeholder{color:var(--kf-color-text-muted)}.kf-select__panel{box-sizing:border-box;font-family:var(--kf-font-body);width:100%;background:var(--kf-color-white);border:1px solid var(--kf-color-border);border-radius:var(--kf-radius-sm);box-shadow:var(--kf-shadow-md);overflow:hidden}.kf-select__panel-title{padding:var(--kf-space-sm) var(--kf-space-md) var(--kf-space-xs)}.kf-select__panel--compact .kf-select__panel-title{padding:var(--kf-space-xs) var(--kf-space-sm) 2px}.kf-select__search{box-sizing:border-box;width:100%;font:inherit;font-family:var(--kf-font-body);color:var(--kf-color-text);padding:var(--kf-space-sm) var(--kf-space-md);border:none;border-bottom:1px solid var(--kf-color-border);border-radius:var(--kf-radius-sm) var(--kf-radius-sm) 0 0;outline:none}.kf-select__search:focus-visible{box-shadow:inset 0 0 0 2px var(--kf-color-primary)}.kf-select__list{box-sizing:border-box;width:100%;margin:0;padding:var(--kf-space-xs) 0;list-style:none;max-height:240px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--kf-color-gray-400) transparent}.kf-select__list::-webkit-scrollbar{width:6px}.kf-select__list::-webkit-scrollbar-track{background:transparent}.kf-select__list::-webkit-scrollbar-thumb{background-color:var(--kf-color-gray-400);border-radius:var(--kf-radius-pill)}.kf-select__list::-webkit-scrollbar-thumb:hover{background-color:var(--kf-color-gray-500)}.kf-select__option{padding:var(--kf-space-sm) var(--kf-space-md);outline:none;color:var(--kf-color-text);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kf-select__option--rich{display:flex;flex-direction:column;gap:2px}.kf-select__option-main{display:flex;align-items:center;justify-content:space-between;gap:var(--kf-space-sm);min-width:0}.kf-select__option-label,.kf-select__option-detail{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.kf-select__option-detail{font-size:var(--kf-font-size-body-sm);font-weight:400;color:var(--kf-color-text-muted)}.kf-select__option--detailed .kf-select__option-label,.kf-select__option--detailed .kf-select__option-detail{overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}.kf-select__option--detailed .kf-select__option-main{align-items:baseline}.kf-select__list:has(.kf-select__option--detailed){max-height:min(60vh,22rem)}.kf-select__panel--compact .kf-select__option{padding:6px var(--kf-space-sm);font-size:.85rem}.kf-select__option:hover{background:var(--kf-color-primary-soft)}.kf-select__option--selected{background:var(--kf-color-primary-soft);color:var(--kf-color-primary);font-weight:600}.kf-select__option--active{background:var(--kf-color-primary-soft)}.kf-select__option:focus-visible{background:var(--kf-color-primary-soft);box-shadow:inset 0 0 0 2px var(--kf-color-primary)}.kf-select__empty{text-align:center;padding:var(--kf-space-sm) var(--kf-space-md);color:var(--kf-color-text-muted)}\n"], dependencies: [{ kind: "component", type: Badge, selector: "kf-badge", inputs: ["tone", "variant", "dot", "truncate", "wrap"] }, { kind: "component", type: FieldLabel, selector: "kf-field-label", inputs: ["for", "required", "visuallyHidden"] }, { kind: "component", type: Icon, selector: "kf-icon", inputs: ["name", "size", "rotate", "filled"] }] });
|
|
6063
6158
|
}
|
|
6064
6159
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: Select, decorators: [{
|
|
6065
6160
|
type: Component,
|
|
@@ -6070,7 +6165,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
6070
6165
|
'[class.kf-select--width-full]': "width() === 'full'",
|
|
6071
6166
|
'[class.kf-select--width-fit]': "width() === 'fit'",
|
|
6072
6167
|
'[class.kf-select--size-sm]': "size() === 'sm'",
|
|
6073
|
-
}, template: "@if (label()) {\n <kf-field-label [for]=\"triggerId\" [required]=\"required()\" [visuallyHidden]=\"hideLabel()\">{{\n label()\n }}</kf-field-label>\n}\n<button\n #trigger\n type=\"button\"\n [id]=\"triggerId\"\n class=\"kf-select__trigger\"\n [class.kf-select__trigger--disabled]=\"disabled()\"\n [class.kf-select__trigger--invalid]=\"invalid()\"\n [class.kf-select__trigger--with-icon]=\"!!icon()\"\n [disabled]=\"disabled()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? listboxId : null\"\n [attr.aria-label]=\"triggerAriaLabel()\"\n [attr.aria-describedby]=\"errorMessage() ? errorId : null\"\n [attr.aria-invalid]=\"invalid() ? true : null\"\n [attr.aria-required]=\"required() ? true : null\"\n [class.kf-select__trigger--tagged]=\"!!selectedOption()?.tag\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\"\n>\n @if (icon(); as iconName) {\n <kf-icon class=\"kf-select__icon\" [name]=\"iconName\" size=\"sm\" />\n }\n @if (prefix(); as prefixText) {\n <span class=\"kf-select__prefix\">{{ prefixText }}</span>\n }\n <span\n class=\"kf-select__value\"\n [class.kf-select__value--placeholder]=\"!selectedOption()\"\n [class.kf-select__value--fit]=\"width() === 'fit'\"\n >\n @if (width() === 'fit') {\n <span class=\"kf-select__value-text\">{{ triggerText() }}</span>\n <!-- Reserva el ancho de la opci\u00F3n m\u00E1s larga: oculto a la vista y al\n \u00E1rbol de accesibilidad, solo aporta tama\u00F1o. -->\n <span class=\"kf-select__sizer\" aria-hidden=\"true\">\n @for (text of fitTexts(); track text) {\n <span>{{ text }}</span>\n }\n </span>\n } @else {\n {{ triggerText() }}\n }\n </span>\n @if (width() === 'fit' && fitTags().length) {\n <!-- Con `fit` el hueco del tag se reserva siempre con el m\u00E1s ancho: los\n dem\u00E1s se apilan en la misma celda y solo el elegido se ve. -->\n <span class=\"kf-select__tag-slot\">\n @for (tag of fitTags(); track tag) {\n <kf-badge\n class=\"kf-select__tag\"\n [class.kf-select__tag--reserved]=\"tag !== selectedOption()?.tag\"\n [attr.aria-hidden]=\"tag !== selectedOption()?.tag ? 'true' : null\"\n >{{ tag }}</kf-badge\n >\n }\n </span>\n } @else if (selectedOption()?.tag; as tag) {\n <kf-badge class=\"kf-select__tag\">{{ tag }}</kf-badge>\n }\n <span\n class=\"kf-select__caret kf-caret\"\n [class.kf-select__caret--open]=\"isOpen()\"\n [class.kf-caret--open]=\"isOpen()\"\n aria-hidden=\"true\"\n ></span>\n</button>\n@if (errorMessage(); as message) {\n <span class=\"kf-select__error kf-field-error\" [id]=\"errorId\" role=\"alert\">{{ message }}</span>\n}\n<ng-template #panelTemplate>\n <div #panel class=\"kf-select__panel\" [class.kf-select__panel--compact]=\"variant() === 'compact'\">\n @if (panelTitle(); as title) {\n <div class=\"kf-select__panel-title kf-overline-text\" aria-hidden=\"true\">{{ title }}</div>\n }\n @if (showSearch()) {\n <input\n #searchInput\n type=\"text\"\n class=\"kf-select__search\"\n placeholder=\"Buscar\u2026\"\n aria-label=\"Buscar opci\u00F3n\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-expanded=\"true\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"filteredOptions().length ? optionId(activeIndex()) : null\"\n [value]=\"searchQuery()\"\n (input)=\"onSearchInput($event)\"\n (keydown.arrowdown)=\"$event.preventDefault(); moveActive(1)\"\n (keydown.arrowup)=\"$event.preventDefault(); moveActive(-1)\"\n (keydown.enter)=\"$event.preventDefault(); selectActive()\"\n (keydown)=\"onSearchKeydown($event)\"\n />\n }\n <ul\n class=\"kf-select__list\"\n [id]=\"listboxId\"\n role=\"listbox\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabel() ? null : triggerId\"\n >\n @for (option of filteredOptions(); track option.value; let i = $index) {\n <li\n class=\"kf-select__option\"\n [id]=\"optionId(i)\"\n [class.kf-select__option--selected]=\"option.value === value()\"\n [class.kf-select__option--active]=\"i === activeIndex()\"\n role=\"option\"\n tabindex=\"-1\"\n [attr.aria-selected]=\"option.value === value()\"\n [attr.aria-label]=\"optionAriaLabel(option)\"\n [class.kf-select__option--rich]=\"!!(option.tag || option.detail)\"\n (click)=\"select(option)\"\n (mouseenter)=\"activeIndex.set(i)\"\n (keydown)=\"onOptionKeydown($event, option, i)\"\n >\n @if (option.tag || option.detail) {\n <span class=\"kf-select__option-main\">\n <span class=\"kf-select__option-label\">{{ option.label }}</span>\n @if (option.tag) {\n <kf-badge class=\"kf-select__tag\">{{ option.tag }}</kf-badge>\n }\n </span>\n @if (option.detail) {\n <span class=\"kf-select__option-detail\">{{ option.detail }}</span>\n }\n } @else {\n {{ option.label }}\n }\n </li>\n } @empty {\n <li class=\"kf-select__empty\">\n {{ searchQuery() ? 'Sin resultados' : 'Sin opciones disponibles' }}\n </li>\n }\n </ul>\n </div>\n</ng-template>\n", styles: [".kf-caret{flex-shrink:0;width:8px;height:8px;border-right:2px solid var(--kf-color-text-muted);border-bottom:2px solid var(--kf-color-text-muted);transform:rotate(45deg);transition:transform .14s;margin-top:-4px}.kf-caret--open{transform:rotate(-135deg);margin-top:4px}.kf-field-hint{font-size:.75rem;color:var(--kf-color-text-muted)}.kf-field-error{display:flex;align-items:center;gap:var(--kf-space-xs);font-size:.75rem;font-weight:600;color:var(--kf-color-error-strong)}.kf-overline-text{font-family:var(--kf-font-title);font-size:var(--kf-font-size-caption);font-weight:var(--kf-font-weight-medium);letter-spacing:.04em;text-transform:uppercase;color:var(--kf-color-text-muted)}:host{display:flex;flex-direction:column;gap:var(--kf-space-xs);width:var(--kf-select-width-md);font-family:var(--kf-font-body)}:host(.kf-select--compact){width:max-content;max-width:160px}:host(.kf-select--width-sm){width:var(--kf-select-width-sm)}:host(.kf-select--width-lg){width:var(--kf-select-width-lg)}:host(.kf-select--width-full){width:100%}:host(.kf-select--width-fit){width:max-content;max-width:var(--kf-select-fit-max-width, 20rem)}:host(.kf-select--compact) .kf-select__trigger{padding:6px var(--kf-space-sm);font-size:.85rem;gap:var(--kf-space-xs)}:host(.kf-select--compact) .kf-select__value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kf-select__trigger{display:flex;align-items:center;justify-content:space-between;gap:var(--kf-space-sm);width:100%;font:inherit;color:var(--kf-color-text);padding:var(--kf-space-sm) var(--kf-space-md);min-height:var(--kf-select-min-height, auto);background:var(--kf-color-white);border:1px solid var(--kf-color-border-control);border-radius:var(--kf-radius-sm);cursor:pointer;transition:border-color .14s,box-shadow .14s}:host(.kf-select--size-sm) .kf-select__trigger{box-sizing:border-box;min-height:var(--kf-select-min-height, var(--kf-control-sm, 2rem));padding-block:0}:host(.kf-select--size-sm:not(.kf-select--compact)) .kf-select__trigger{font-size:var(--kf-font-size-body-sm)}.kf-select__trigger:hover:not(:disabled){border-color:var(--kf-color-text-muted)}.kf-select__trigger:focus-visible{outline:none;border-color:var(--kf-color-primary);box-shadow:var(--kf-shadow-focus)}.kf-select__trigger--disabled{opacity:.5;cursor:not-allowed}.kf-select__trigger--invalid{border-color:var(--kf-color-error)}.kf-select__trigger--invalid:focus-visible{border-color:var(--kf-color-error);box-shadow:var(--kf-shadow-focus-error)}.kf-select__value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kf-select__value--fit{display:grid;grid-template-columns:minmax(0,1fr);text-align:start}.kf-select__value-text{grid-area:1 / 1;overflow:hidden;text-overflow:ellipsis}.kf-select__sizer{grid-area:1 / 1;display:grid;height:0;overflow:hidden;visibility:hidden}.kf-select__sizer>span{grid-area:1 / 1;white-space:nowrap}.kf-select__icon{flex:none;color:var(--kf-color-text-muted)}.kf-select__trigger--with-icon .kf-select__value{flex:1 1 auto;min-width:0;text-align:start}:host(.kf-select--compact) .kf-select__trigger--with-icon .kf-select__value{color:var(--kf-color-ink);font-weight:600}.kf-select__trigger--tagged .kf-select__value{flex:1 1 auto;min-width:0;text-align:start}.kf-select__tag{flex:none}.kf-select__tag-slot{display:grid;flex:none;justify-items:end}.kf-select__tag-slot>.kf-select__tag{grid-area:1 / 1}.kf-select__tag--reserved{visibility:hidden}.kf-select__trigger .kf-select__tag{margin-block:-2px}.kf-select__prefix{flex:none;color:var(--kf-color-text-muted);white-space:nowrap}.kf-select__value--placeholder{color:var(--kf-color-text-muted)}.kf-select__panel{box-sizing:border-box;font-family:var(--kf-font-body);width:100%;background:var(--kf-color-white);border:1px solid var(--kf-color-border);border-radius:var(--kf-radius-sm);box-shadow:var(--kf-shadow-md);overflow:hidden}.kf-select__panel-title{padding:var(--kf-space-sm) var(--kf-space-md) var(--kf-space-xs)}.kf-select__panel--compact .kf-select__panel-title{padding:var(--kf-space-xs) var(--kf-space-sm) 2px}.kf-select__search{box-sizing:border-box;width:100%;font:inherit;font-family:var(--kf-font-body);color:var(--kf-color-text);padding:var(--kf-space-sm) var(--kf-space-md);border:none;border-bottom:1px solid var(--kf-color-border);border-radius:var(--kf-radius-sm) var(--kf-radius-sm) 0 0;outline:none}.kf-select__search:focus-visible{box-shadow:inset 0 0 0 2px var(--kf-color-primary)}.kf-select__list{box-sizing:border-box;width:100%;margin:0;padding:var(--kf-space-xs) 0;list-style:none;max-height:240px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--kf-color-gray-400) transparent}.kf-select__list::-webkit-scrollbar{width:6px}.kf-select__list::-webkit-scrollbar-track{background:transparent}.kf-select__list::-webkit-scrollbar-thumb{background-color:var(--kf-color-gray-400);border-radius:var(--kf-radius-pill)}.kf-select__list::-webkit-scrollbar-thumb:hover{background-color:var(--kf-color-gray-500)}.kf-select__option{padding:var(--kf-space-sm) var(--kf-space-md);outline:none;color:var(--kf-color-text);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kf-select__option--rich{display:flex;flex-direction:column;gap:2px}.kf-select__option-main{display:flex;align-items:center;justify-content:space-between;gap:var(--kf-space-sm);min-width:0}.kf-select__option-label,.kf-select__option-detail{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.kf-select__option-detail{font-size:var(--kf-font-size-body-sm);font-weight:400;color:var(--kf-color-text-muted)}.kf-select__panel--compact .kf-select__option{padding:6px var(--kf-space-sm);font-size:.85rem}.kf-select__option:hover{background:var(--kf-color-primary-soft)}.kf-select__option--selected{background:var(--kf-color-primary-soft);color:var(--kf-color-primary);font-weight:600}.kf-select__option--active{background:var(--kf-color-primary-soft)}.kf-select__option:focus-visible{background:var(--kf-color-primary-soft);box-shadow:inset 0 0 0 2px var(--kf-color-primary)}.kf-select__empty{text-align:center;padding:var(--kf-space-sm) var(--kf-space-md);color:var(--kf-color-text-muted)}\n"] }]
|
|
6168
|
+
}, template: "@if (label()) {\n <kf-field-label [for]=\"triggerId\" [required]=\"required()\" [visuallyHidden]=\"hideLabel()\">{{\n label()\n }}</kf-field-label>\n}\n<button\n #trigger\n type=\"button\"\n [id]=\"triggerId\"\n class=\"kf-select__trigger\"\n [class.kf-select__trigger--disabled]=\"disabled()\"\n [class.kf-select__trigger--invalid]=\"invalid()\"\n [class.kf-select__trigger--with-icon]=\"!!icon()\"\n [disabled]=\"disabled()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? listboxId : null\"\n [attr.aria-label]=\"triggerAriaLabel()\"\n [attr.aria-describedby]=\"errorMessage() ? errorId : null\"\n [attr.aria-invalid]=\"invalid() ? true : null\"\n [attr.aria-required]=\"required() ? true : null\"\n [class.kf-select__trigger--tagged]=\"!!selectedOption()?.tag\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\"\n>\n @if (icon(); as iconName) {\n <kf-icon class=\"kf-select__icon\" [name]=\"iconName\" size=\"sm\" />\n }\n @if (prefix(); as prefixText) {\n <span class=\"kf-select__prefix\">{{ prefixText }}</span>\n }\n <span\n class=\"kf-select__value\"\n [class.kf-select__value--placeholder]=\"!selectedOption()\"\n [class.kf-select__value--fit]=\"width() === 'fit'\"\n >\n @if (width() === 'fit') {\n <span class=\"kf-select__value-text\">{{ triggerText() }}</span>\n <!-- Reserva el ancho de la opci\u00F3n m\u00E1s larga: oculto a la vista y al\n \u00E1rbol de accesibilidad, solo aporta tama\u00F1o. -->\n <span class=\"kf-select__sizer\" aria-hidden=\"true\">\n @for (text of fitTexts(); track text) {\n <span>{{ text }}</span>\n }\n </span>\n } @else {\n {{ triggerText() }}\n }\n </span>\n @if (width() === 'fit' && fitTags().length) {\n <!-- Con `fit` el hueco del tag se reserva siempre con el m\u00E1s ancho: los\n dem\u00E1s se apilan en la misma celda y solo el elegido se ve. -->\n <span class=\"kf-select__tag-slot\">\n @for (tag of fitTags(); track tag) {\n <kf-badge\n class=\"kf-select__tag\"\n [class.kf-select__tag--reserved]=\"tag !== selectedOption()?.tag\"\n [attr.aria-hidden]=\"tag !== selectedOption()?.tag ? 'true' : null\"\n >{{ tag }}</kf-badge\n >\n }\n </span>\n } @else if (selectedOption()?.tag; as tag) {\n <kf-badge class=\"kf-select__tag\">{{ tag }}</kf-badge>\n }\n <span\n class=\"kf-select__caret kf-caret\"\n [class.kf-select__caret--open]=\"isOpen()\"\n [class.kf-caret--open]=\"isOpen()\"\n aria-hidden=\"true\"\n ></span>\n</button>\n@if (errorMessage(); as message) {\n <span class=\"kf-select__error kf-field-error\" [id]=\"errorId\" role=\"alert\">{{ message }}</span>\n}\n<ng-template #panelTemplate>\n <div #panel class=\"kf-select__panel\" [class.kf-select__panel--compact]=\"variant() === 'compact'\">\n @if (panelTitle(); as title) {\n <div class=\"kf-select__panel-title kf-overline-text\" aria-hidden=\"true\">{{ title }}</div>\n }\n @if (showSearch()) {\n <input\n #searchInput\n type=\"text\"\n class=\"kf-select__search\"\n placeholder=\"Buscar\u2026\"\n aria-label=\"Buscar opci\u00F3n\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-expanded=\"true\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"filteredOptions().length ? optionId(activeIndex()) : null\"\n [value]=\"searchQuery()\"\n (input)=\"onSearchInput($event)\"\n (keydown.arrowdown)=\"$event.preventDefault(); moveActive(1)\"\n (keydown.arrowup)=\"$event.preventDefault(); moveActive(-1)\"\n (keydown.enter)=\"$event.preventDefault(); selectActive()\"\n (keydown)=\"onSearchKeydown($event)\"\n />\n }\n <ul\n class=\"kf-select__list\"\n [id]=\"listboxId\"\n role=\"listbox\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabel() ? null : triggerId\"\n >\n @for (option of filteredOptions(); track option.value; let i = $index) {\n <li\n class=\"kf-select__option\"\n [id]=\"optionId(i)\"\n [class.kf-select__option--selected]=\"option.value === value()\"\n [class.kf-select__option--active]=\"i === activeIndex()\"\n role=\"option\"\n tabindex=\"-1\"\n [attr.aria-selected]=\"option.value === value()\"\n [attr.aria-label]=\"optionAriaLabel(option)\"\n [class.kf-select__option--rich]=\"!!(option.tag || option.detail)\"\n [class.kf-select__option--detailed]=\"!!option.detail\"\n (click)=\"select(option)\"\n (mouseenter)=\"activeIndex.set(i)\"\n (keydown)=\"onOptionKeydown($event, option, i)\"\n >\n @if (option.tag || option.detail) {\n <span class=\"kf-select__option-main\">\n <span class=\"kf-select__option-label\">{{ option.label }}</span>\n @if (option.tag) {\n <kf-badge class=\"kf-select__tag\">{{ option.tag }}</kf-badge>\n }\n </span>\n @if (option.detail) {\n <span class=\"kf-select__option-detail\">{{ option.detail }}</span>\n }\n } @else {\n {{ option.label }}\n }\n </li>\n } @empty {\n <li class=\"kf-select__empty\">\n {{ searchQuery() ? 'Sin resultados' : 'Sin opciones disponibles' }}\n </li>\n }\n </ul>\n </div>\n</ng-template>\n", styles: [".kf-caret{flex-shrink:0;width:8px;height:8px;border-right:2px solid var(--kf-color-text-muted);border-bottom:2px solid var(--kf-color-text-muted);transform:rotate(45deg);transition:transform .14s;margin-top:-4px}.kf-caret--open{transform:rotate(-135deg);margin-top:4px}.kf-field-hint{font-size:.75rem;color:var(--kf-color-text-muted)}.kf-field-error{display:flex;align-items:center;gap:var(--kf-space-xs);font-size:.75rem;font-weight:600;color:var(--kf-color-error-strong)}.kf-overline-text{font-family:var(--kf-font-title);font-size:var(--kf-font-size-caption);font-weight:var(--kf-font-weight-medium);letter-spacing:.04em;text-transform:uppercase;color:var(--kf-color-text-muted)}:host{display:flex;flex-direction:column;gap:var(--kf-space-xs);width:var(--kf-select-width-md);font-family:var(--kf-font-body)}:host(.kf-select--compact){width:max-content;max-width:160px}:host(.kf-select--width-sm){width:var(--kf-select-width-sm)}:host(.kf-select--width-lg){width:var(--kf-select-width-lg)}:host(.kf-select--width-full){width:100%}:host(.kf-select--width-fit){width:max-content;max-width:var(--kf-select-fit-max-width, 20rem)}:host(.kf-select--compact) .kf-select__trigger{padding:6px var(--kf-space-sm);font-size:.85rem;gap:var(--kf-space-xs)}:host(.kf-select--compact) .kf-select__value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kf-select__trigger{display:flex;align-items:center;justify-content:space-between;gap:var(--kf-space-sm);width:100%;font:inherit;color:var(--kf-color-text);padding:var(--kf-space-sm) var(--kf-space-md);min-height:var(--kf-select-min-height, auto);background:var(--kf-color-white);border:1px solid var(--kf-color-border-control);border-radius:var(--kf-radius-sm);cursor:pointer;transition:border-color .14s,box-shadow .14s}:host(.kf-select--size-sm) .kf-select__trigger{box-sizing:border-box;min-height:var(--kf-select-min-height, var(--kf-control-sm, 2rem));padding-block:0}:host(.kf-select--size-sm:not(.kf-select--compact)) .kf-select__trigger{font-size:var(--kf-font-size-body-sm)}.kf-select__trigger:hover:not(:disabled){border-color:var(--kf-color-text-muted)}.kf-select__trigger:focus-visible{outline:none;border-color:var(--kf-color-primary);box-shadow:var(--kf-shadow-focus)}.kf-select__trigger--disabled{opacity:.5;cursor:not-allowed}.kf-select__trigger--invalid{border-color:var(--kf-color-error)}.kf-select__trigger--invalid:focus-visible{border-color:var(--kf-color-error);box-shadow:var(--kf-shadow-focus-error)}.kf-select__value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kf-select__value--fit{display:grid;grid-template-columns:minmax(0,1fr);text-align:start}.kf-select__value-text{grid-area:1 / 1;overflow:hidden;text-overflow:ellipsis}.kf-select__sizer{grid-area:1 / 1;display:grid;height:0;overflow:hidden;visibility:hidden}.kf-select__sizer>span{grid-area:1 / 1;white-space:nowrap}.kf-select__icon{flex:none;color:var(--kf-color-text-muted)}.kf-select__trigger--with-icon .kf-select__value{flex:1 1 auto;min-width:0;text-align:start}:host(.kf-select--compact) .kf-select__trigger--with-icon .kf-select__value{color:var(--kf-color-ink);font-weight:600}.kf-select__trigger--tagged .kf-select__value{flex:1 1 auto;min-width:0;text-align:start}.kf-select__tag{flex:none}.kf-select__tag-slot{display:grid;flex:none;justify-items:end}.kf-select__tag-slot>.kf-select__tag{grid-area:1 / 1}.kf-select__tag--reserved{visibility:hidden}.kf-select__trigger .kf-select__tag{margin-block:-2px}.kf-select__prefix{flex:none;color:var(--kf-color-text-muted);white-space:nowrap}.kf-select__value--placeholder{color:var(--kf-color-text-muted)}.kf-select__panel{box-sizing:border-box;font-family:var(--kf-font-body);width:100%;background:var(--kf-color-white);border:1px solid var(--kf-color-border);border-radius:var(--kf-radius-sm);box-shadow:var(--kf-shadow-md);overflow:hidden}.kf-select__panel-title{padding:var(--kf-space-sm) var(--kf-space-md) var(--kf-space-xs)}.kf-select__panel--compact .kf-select__panel-title{padding:var(--kf-space-xs) var(--kf-space-sm) 2px}.kf-select__search{box-sizing:border-box;width:100%;font:inherit;font-family:var(--kf-font-body);color:var(--kf-color-text);padding:var(--kf-space-sm) var(--kf-space-md);border:none;border-bottom:1px solid var(--kf-color-border);border-radius:var(--kf-radius-sm) var(--kf-radius-sm) 0 0;outline:none}.kf-select__search:focus-visible{box-shadow:inset 0 0 0 2px var(--kf-color-primary)}.kf-select__list{box-sizing:border-box;width:100%;margin:0;padding:var(--kf-space-xs) 0;list-style:none;max-height:240px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--kf-color-gray-400) transparent}.kf-select__list::-webkit-scrollbar{width:6px}.kf-select__list::-webkit-scrollbar-track{background:transparent}.kf-select__list::-webkit-scrollbar-thumb{background-color:var(--kf-color-gray-400);border-radius:var(--kf-radius-pill)}.kf-select__list::-webkit-scrollbar-thumb:hover{background-color:var(--kf-color-gray-500)}.kf-select__option{padding:var(--kf-space-sm) var(--kf-space-md);outline:none;color:var(--kf-color-text);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kf-select__option--rich{display:flex;flex-direction:column;gap:2px}.kf-select__option-main{display:flex;align-items:center;justify-content:space-between;gap:var(--kf-space-sm);min-width:0}.kf-select__option-label,.kf-select__option-detail{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.kf-select__option-detail{font-size:var(--kf-font-size-body-sm);font-weight:400;color:var(--kf-color-text-muted)}.kf-select__option--detailed .kf-select__option-label,.kf-select__option--detailed .kf-select__option-detail{overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}.kf-select__option--detailed .kf-select__option-main{align-items:baseline}.kf-select__list:has(.kf-select__option--detailed){max-height:min(60vh,22rem)}.kf-select__panel--compact .kf-select__option{padding:6px var(--kf-space-sm);font-size:.85rem}.kf-select__option:hover{background:var(--kf-color-primary-soft)}.kf-select__option--selected{background:var(--kf-color-primary-soft);color:var(--kf-color-primary);font-weight:600}.kf-select__option--active{background:var(--kf-color-primary-soft)}.kf-select__option:focus-visible{background:var(--kf-color-primary-soft);box-shadow:inset 0 0 0 2px var(--kf-color-primary)}.kf-select__empty{text-align:center;padding:var(--kf-space-sm) var(--kf-space-md);color:var(--kf-color-text-muted)}\n"] }]
|
|
6074
6169
|
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hideLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideLabel", required: false }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], searchThreshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchThreshold", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], panelTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelTitle", required: false }] }], panelWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelWidth", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], triggerRef: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], panelTemplate: [{ type: i0.ViewChild, args: ['panelTemplate', { isSignal: true }] }], searchInputRef: [{ type: i0.ViewChild, args: ['searchInput', { isSignal: true }] }], panelRef: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
|
|
6075
6170
|
|
|
6076
6171
|
const SIBLINGS = 1;
|
|
@@ -8195,7 +8290,7 @@ class ConfirmDialog {
|
|
|
8195
8290
|
this.host.nativeElement.querySelector('[aria-invalid="true"]')?.focus();
|
|
8196
8291
|
}
|
|
8197
8292
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: ConfirmDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8198
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: ConfirmDialog, isStandalone: true, selector: "kf-confirm-dialog", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, confirmLabel: { classPropertyName: "confirmLabel", publicName: "confirmLabel", isSignal: true, isRequired: false, transformFunction: null }, cancelLabel: { classPropertyName: "cancelLabel", publicName: "cancelLabel", isSignal: true, isRequired: false, transformFunction: null }, busy: { classPropertyName: "busy", publicName: "busy", isSignal: true, isRequired: false, transformFunction: null }, consequence: { classPropertyName: "consequence", publicName: "consequence", isSignal: true, isRequired: false, transformFunction: null }, reasonLabel: { classPropertyName: "reasonLabel", publicName: "reasonLabel", isSignal: true, isRequired: false, transformFunction: null }, reasonMinLength: { classPropertyName: "reasonMinLength", publicName: "reasonMinLength", isSignal: true, isRequired: false, transformFunction: null }, reasonPlaceholder: { classPropertyName: "reasonPlaceholder", publicName: "reasonPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, reasonHint: { classPropertyName: "reasonHint", publicName: "reasonHint", isSignal: true, isRequired: false, transformFunction: null }, reasonError: { classPropertyName: "reasonError", publicName: "reasonError", isSignal: true, isRequired: false, transformFunction: null }, acknowledgeLabel: { classPropertyName: "acknowledgeLabel", publicName: "acknowledgeLabel", isSignal: true, isRequired: false, transformFunction: null }, acknowledgeError: { classPropertyName: "acknowledgeError", publicName: "acknowledgeError", isSignal: true, isRequired: false, transformFunction: null }, autoClose: { classPropertyName: "autoClose", publicName: "autoClose", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", confirmed: "confirmed", cancelled: "cancelled" }, ngImport: i0, template: "<kf-modal\n size=\"sm\"\n [open]=\"open()\"\n [title]=\"title()\"\n [dismissible]=\"!busy()\"\n [initialFocus]=\"initialFocus()\"\n (openChange)=\"onOpenChange($event)\"\n>\n <div class=\"kf-confirm-dialog__body\">\n @if (icon(); as iconName) {\n <span\n class=\"kf-confirm-dialog__icon\"\n [class.kf-confirm-dialog__icon--danger]=\"tone() === 'danger'\"\n >\n <kf-icon [name]=\"iconName\" size=\"lg\" />\n </span>\n }\n @if (message(); as text) {\n <p class=\"kf-confirm-dialog__message\">{{ text }}</p>\n }\n <ng-content />\n @if (consequence(); as text) {\n <kf-alert [tone]=\"tone() === 'danger' ? 'warn' : 'info'\">{{ text }}</kf-alert>\n }\n @if (reasonLabel(); as label) {\n <kf-textarea\n class=\"kf-confirm-dialog__reason\"\n required\n [label]=\"label\"\n [placeholder]=\"reasonPlaceholder()\"\n [hint]=\"reasonHint()\"\n [invalid]=\"showReasonError()\"\n [errorMessage]=\"showReasonError() ? reasonErrorText() : undefined\"\n [ngModelOptions]=\"{ standalone: true }\"\n [ngModel]=\"reason()\"\n (ngModelChange)=\"onReason($event)\"\n />\n }\n @if (acknowledgeLabel(); as label) {\n <div class=\"kf-confirm-dialog__acknowledge\">\n <kf-checkbox\n [label]=\"label\"\n [checked]=\"acknowledged()\"\n [invalid]=\"showAcknowledgeError()\"\n (checkedChange)=\"onAcknowledge($event)\"\n />\n @if (showAcknowledgeError()) {\n <span class=\"kf-confirm-dialog__error kf-field-error\" role=\"alert\">{{\n acknowledgeError()\n }}</span>\n }\n </div>\n }\n </div>\n <div footer class=\"kf-confirm-dialog__actions\">\n <kf-button\n class=\"kf-confirm-dialog__cancel\"\n variant=\"outline\"\n type=\"button\"\n [disabled]=\"busy()\"\n (click)=\"cancel()\"\n >\n {{ cancelLabel() }}\n </kf-button>\n <kf-button\n class=\"kf-confirm-dialog__confirm\"\n type=\"button\"\n [variant]=\"tone() === 'danger' ? 'danger' : 'primary'\"\n [loading]=\"busy()\"\n (click)=\"confirm()\"\n >\n {{ confirmLabel() }}\n </kf-button>\n </div>\n</kf-modal>\n", styles: [".kf-field-hint{font-size:.75rem;color:var(--kf-color-text-muted)}.kf-field-error{display:flex;align-items:center;gap:var(--kf-space-xs);font-size:.75rem;font-weight:600;color:var(--kf-color-error-strong)}:host{display:contents}.kf-confirm-dialog__body{display:flex;flex-direction:column;gap:var(--kf-space-md)}.kf-confirm-dialog__message{margin:0;font-size:var(--kf-font-size-body-sm);color:var(--kf-color-text-muted)}.kf-confirm-dialog__icon{display:flex;align-items:center;justify-content:center;align-self:center;width:48px;height:48px;border-radius:var(--kf-radius-pill);background:var(--kf-color-primary-soft);color:var(--kf-color-primary)}.kf-confirm-dialog__icon--danger{background:var(--kf-color-error-soft);color:var(--kf-color-error-strong)}.kf-confirm-dialog__acknowledge{display:flex;flex-direction:column;gap:var(--kf-space-xs)}.kf-confirm-dialog__actions{display:flex;justify-content:flex-end;gap:var(--kf-space-sm)}@media(max-width:480px){.kf-confirm-dialog__body{text-align:center}.kf-confirm-dialog__actions{flex-direction:column-reverse;align-items:stretch}}\n"], dependencies: [{ kind: "component", type: Alert, selector: "kf-alert", inputs: ["tone", "variant", "appearance", "iconAlign", "title", "dismissible", "open"], outputs: ["openChange"] }, { kind: "component", type: Button, selector: "kf-button", inputs: ["variant", "size", "shape", "disabled", "type", "icon", "block", "loading", "ariaLabel", "ariaExpanded", "ariaPressed", "ariaDisabled", "ariaControls", "ariaHaspopup"] }, { kind: "component", type: Checkbox, selector: "kf-checkbox", inputs: ["label", "ariaLabel", "checked", "disabled", "indeterminate", "invalid"], outputs: ["checkedChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: Icon, selector: "kf-icon", inputs: ["name", "size", "rotate", "filled"] }, { kind: "component", type: Modal, selector: "kf-modal", inputs: ["title", "open", "dismissible", "width", "size", "dividers", "maxHeight", "fullscreenOnMobile", "initialFocus"], outputs: ["openChange"] }, { kind: "component", type: Textarea, selector: "kf-textarea", inputs: ["label", "required", "hint", "invalid", "errorMessage", "disabled", "readonly", "placeholder", "minRows", "maxRows", "maxlength", "showCounter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8293
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: ConfirmDialog, isStandalone: true, selector: "kf-confirm-dialog", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, confirmLabel: { classPropertyName: "confirmLabel", publicName: "confirmLabel", isSignal: true, isRequired: false, transformFunction: null }, cancelLabel: { classPropertyName: "cancelLabel", publicName: "cancelLabel", isSignal: true, isRequired: false, transformFunction: null }, busy: { classPropertyName: "busy", publicName: "busy", isSignal: true, isRequired: false, transformFunction: null }, consequence: { classPropertyName: "consequence", publicName: "consequence", isSignal: true, isRequired: false, transformFunction: null }, reasonLabel: { classPropertyName: "reasonLabel", publicName: "reasonLabel", isSignal: true, isRequired: false, transformFunction: null }, reasonMinLength: { classPropertyName: "reasonMinLength", publicName: "reasonMinLength", isSignal: true, isRequired: false, transformFunction: null }, reasonPlaceholder: { classPropertyName: "reasonPlaceholder", publicName: "reasonPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, reasonHint: { classPropertyName: "reasonHint", publicName: "reasonHint", isSignal: true, isRequired: false, transformFunction: null }, reasonError: { classPropertyName: "reasonError", publicName: "reasonError", isSignal: true, isRequired: false, transformFunction: null }, acknowledgeLabel: { classPropertyName: "acknowledgeLabel", publicName: "acknowledgeLabel", isSignal: true, isRequired: false, transformFunction: null }, acknowledgeError: { classPropertyName: "acknowledgeError", publicName: "acknowledgeError", isSignal: true, isRequired: false, transformFunction: null }, autoClose: { classPropertyName: "autoClose", publicName: "autoClose", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", confirmed: "confirmed", cancelled: "cancelled" }, ngImport: i0, template: "<kf-modal\n size=\"sm\"\n [open]=\"open()\"\n [title]=\"title()\"\n [dismissible]=\"!busy()\"\n [initialFocus]=\"initialFocus()\"\n (openChange)=\"onOpenChange($event)\"\n>\n <div class=\"kf-confirm-dialog__body\">\n @if (icon(); as iconName) {\n <span\n class=\"kf-confirm-dialog__icon\"\n [class.kf-confirm-dialog__icon--danger]=\"tone() === 'danger'\"\n >\n <kf-icon [name]=\"iconName\" size=\"lg\" />\n </span>\n }\n @if (message(); as text) {\n <p class=\"kf-confirm-dialog__message\">{{ text }}</p>\n }\n <ng-content />\n @if (consequence(); as text) {\n <kf-alert [tone]=\"tone() === 'danger' ? 'warn' : 'info'\">{{ text }}</kf-alert>\n }\n @if (reasonLabel(); as label) {\n <kf-textarea\n class=\"kf-confirm-dialog__reason\"\n required\n [label]=\"label\"\n [placeholder]=\"reasonPlaceholder()\"\n [hint]=\"reasonHint()\"\n [invalid]=\"showReasonError()\"\n [errorMessage]=\"showReasonError() ? reasonErrorText() : undefined\"\n [ngModelOptions]=\"{ standalone: true }\"\n [ngModel]=\"reason()\"\n (ngModelChange)=\"onReason($event)\"\n />\n }\n @if (acknowledgeLabel(); as label) {\n <div class=\"kf-confirm-dialog__acknowledge\">\n <kf-checkbox\n [label]=\"label\"\n [checked]=\"acknowledged()\"\n [invalid]=\"showAcknowledgeError()\"\n (checkedChange)=\"onAcknowledge($event)\"\n />\n @if (showAcknowledgeError()) {\n <span class=\"kf-confirm-dialog__error kf-field-error\" role=\"alert\">{{\n acknowledgeError()\n }}</span>\n }\n </div>\n }\n </div>\n <div footer class=\"kf-confirm-dialog__actions\">\n <kf-button\n class=\"kf-confirm-dialog__cancel\"\n variant=\"outline\"\n type=\"button\"\n [disabled]=\"busy()\"\n (click)=\"cancel()\"\n >\n {{ cancelLabel() }}\n </kf-button>\n <kf-button\n class=\"kf-confirm-dialog__confirm\"\n type=\"button\"\n [variant]=\"tone() === 'danger' ? 'danger' : 'primary'\"\n [loading]=\"busy()\"\n (click)=\"confirm()\"\n >\n {{ confirmLabel() }}\n </kf-button>\n </div>\n</kf-modal>\n", styles: [".kf-field-hint{font-size:.75rem;color:var(--kf-color-text-muted)}.kf-field-error{display:flex;align-items:center;gap:var(--kf-space-xs);font-size:.75rem;font-weight:600;color:var(--kf-color-error-strong)}:host{display:contents}.kf-confirm-dialog__body{display:flex;flex-direction:column;gap:var(--kf-space-md)}.kf-confirm-dialog__message{margin:0;font-size:var(--kf-font-size-body-sm);color:var(--kf-color-text-muted)}.kf-confirm-dialog__icon{display:flex;align-items:center;justify-content:center;align-self:center;width:48px;height:48px;border-radius:var(--kf-radius-pill);background:var(--kf-color-primary-soft);color:var(--kf-color-primary)}.kf-confirm-dialog__icon--danger{background:var(--kf-color-error-soft);color:var(--kf-color-error-strong)}.kf-confirm-dialog__acknowledge{display:flex;flex-direction:column;gap:var(--kf-space-xs)}.kf-confirm-dialog__actions{display:flex;justify-content:flex-end;gap:var(--kf-space-sm)}@media(max-width:480px){.kf-confirm-dialog__body{text-align:center}.kf-confirm-dialog__actions{flex-direction:column-reverse;align-items:stretch}}\n"], dependencies: [{ kind: "component", type: Alert, selector: "kf-alert", inputs: ["tone", "variant", "appearance", "iconAlign", "title", "dismissible", "actionsInline", "open"], outputs: ["openChange"] }, { kind: "component", type: Button, selector: "kf-button", inputs: ["variant", "size", "shape", "disabled", "type", "icon", "block", "loading", "ariaLabel", "ariaExpanded", "ariaPressed", "ariaDisabled", "ariaControls", "ariaHaspopup"] }, { kind: "component", type: Checkbox, selector: "kf-checkbox", inputs: ["label", "ariaLabel", "checked", "disabled", "indeterminate", "invalid"], outputs: ["checkedChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: Icon, selector: "kf-icon", inputs: ["name", "size", "rotate", "filled"] }, { kind: "component", type: Modal, selector: "kf-modal", inputs: ["title", "open", "dismissible", "width", "size", "dividers", "maxHeight", "fullscreenOnMobile", "initialFocus"], outputs: ["openChange"] }, { kind: "component", type: Textarea, selector: "kf-textarea", inputs: ["label", "required", "hint", "invalid", "errorMessage", "disabled", "readonly", "placeholder", "minRows", "maxRows", "maxlength", "showCounter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8199
8294
|
}
|
|
8200
8295
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: ConfirmDialog, decorators: [{
|
|
8201
8296
|
type: Component,
|
|
@@ -9013,7 +9108,7 @@ class DateField {
|
|
|
9013
9108
|
?.focus();
|
|
9014
9109
|
}
|
|
9015
9110
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: DateField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9016
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.0", type: DateField, isStandalone: true, selector: "kf-date-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, hideLabel: { classPropertyName: "hideLabel", publicName: "hideLabel", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, availableDates: { classPropertyName: "availableDates", publicName: "availableDates", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, presentation: { classPropertyName: "presentation", publicName: "presentation", isSignal: true, isRequired: false, transformFunction: null }, parseErrorMessage: { classPropertyName: "parseErrorMessage", publicName: "parseErrorMessage", isSignal: true, isRequired: false, transformFunction: null }, rangeErrorMessage: { classPropertyName: "rangeErrorMessage", publicName: "rangeErrorMessage", isSignal: true, isRequired: false, transformFunction: null }, openCalendarLabel: { classPropertyName: "openCalendarLabel", publicName: "openCalendarLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, viewQueries: [{ propertyName: "field", first: true, predicate: Input, descendants: true, isSignal: true }, { propertyName: "fieldHost", first: true, predicate: Input, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "panel", first: true, predicate: DropdownPanel, descendants: true, isSignal: true }, { propertyName: "sheetTemplate", first: true, predicate: ["sheetTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #calendarTemplate>\n <kf-calendar\n [value]=\"value()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [availableDates]=\"availableDates()\"\n [monthNames]=\"monthNames()\"\n [weekdayLabels]=\"weekdayLabels()\"\n [weekdayNames]=\"weekdayNames()\"\n [ariaLabel]=\"label()\"\n (valueChange)=\"pick($event)\"\n />\n</ng-template>\n\n<kf-dropdown [(open)]=\"popoverOpen\" [anchor]=\"fieldHost()\" [autoFocus]=\"false\">\n <kf-input\n [label]=\"label()\"\n [hideLabel]=\"hideLabel()\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n [invalid]=\"fieldInvalid()\"\n [errorMessage]=\"fieldError()\"\n [hint]=\"hint()\"\n [placeholder]=\"placeholder()\"\n [maxlength]=\"maxLength()\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n [ngModelOptions]=\"{ standalone: true }\"\n [ngModel]=\"text()\"\n (ngModelChange)=\"onText($event)\"\n (keydown)=\"onKeydown($event)\"\n >\n <kf-button\n kf-input-trailing\n class=\"kf-date-field__toggle\"\n variant=\"ghost\"\n shape=\"circle\"\n size=\"sm\"\n icon=\"calendar\"\n type=\"button\"\n [ariaLabel]=\"openCalendarLabel()\"\n [ariaHaspopup]=\"'dialog'\"\n [ariaExpanded]=\"expanded()\"\n [disabled]=\"disabled()\"\n (click)=\"toggle()\"\n />\n </kf-input>\n <kf-dropdown-panel role=\"dialog\" [ariaLabel]=\"label()\">\n <ng-container [ngTemplateOutlet]=\"calendarTemplate\" />\n </kf-dropdown-panel>\n</kf-dropdown>\n\n<ng-template #sheetTemplate>\n <kf-drawer side=\"bottom\" role=\"dialog\" [title]=\"label()\" [(open)]=\"sheetOpen\">\n <div class=\"kf-date-field__sheet\">\n <ng-container [ngTemplateOutlet]=\"calendarTemplate\" />\n </div>\n </kf-drawer>\n</ng-template>\n", styles: [":host{display:block}kf-dropdown{display:block}.kf-date-field__sheet{display:flex;justify-content:center;padding:var(--kf-space-sm) 0 var(--kf-space-md)}\n"], dependencies: [{ kind: "component", type: Button, selector: "kf-button", inputs: ["variant", "size", "shape", "disabled", "type", "icon", "block", "loading", "ariaLabel", "ariaExpanded", "ariaPressed", "ariaDisabled", "ariaControls", "ariaHaspopup"] }, { kind: "component", type: Calendar, selector: "kf-calendar", inputs: ["value", "month", "min", "max", "availableDates", "markedDates", "today", "loading", "ariaLabel", "monthNames", "weekdayLabels", "weekdayNames", "markedLabel", "previousMonthLabel", "nextMonthLabel"], outputs: ["valueChange", "monthChange"] }, { kind: "component", type: Drawer, selector: "kf-drawer", inputs: ["open", "side", "role", "ariaLabel", "title", "closeLabel", "size", "sheetSize", "swipeToClose", "closeOnBack"], outputs: ["openChange"] }, { kind: "component", type: Dropdown, selector: "kf-dropdown", inputs: ["open", "anchor", "autoFocus"], outputs: ["openChange"] }, { kind: "component", type: DropdownPanel, selector: "kf-dropdown-panel", inputs: ["variant", "role", "maxHeight", "width", "ariaLabel"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: Input, selector: "kf-input", inputs: ["label", "size", "hideLabel", "required", "icon", "suffix", "hint", "invalid", "errorMessage", "disabled", "readonly", "type", "placeholder", "autocomplete", "name", "inputmode", "min", "max", "step", "maxlength", "toggleable", "ariaLabel", "clearable", "clearLabel"], outputs: ["cleared"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9111
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.0", type: DateField, isStandalone: true, selector: "kf-date-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, hideLabel: { classPropertyName: "hideLabel", publicName: "hideLabel", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, availableDates: { classPropertyName: "availableDates", publicName: "availableDates", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, presentation: { classPropertyName: "presentation", publicName: "presentation", isSignal: true, isRequired: false, transformFunction: null }, parseErrorMessage: { classPropertyName: "parseErrorMessage", publicName: "parseErrorMessage", isSignal: true, isRequired: false, transformFunction: null }, rangeErrorMessage: { classPropertyName: "rangeErrorMessage", publicName: "rangeErrorMessage", isSignal: true, isRequired: false, transformFunction: null }, openCalendarLabel: { classPropertyName: "openCalendarLabel", publicName: "openCalendarLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, viewQueries: [{ propertyName: "field", first: true, predicate: Input, descendants: true, isSignal: true }, { propertyName: "fieldHost", first: true, predicate: Input, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "panel", first: true, predicate: DropdownPanel, descendants: true, isSignal: true }, { propertyName: "sheetTemplate", first: true, predicate: ["sheetTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #calendarTemplate>\n <kf-calendar\n [value]=\"value()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [availableDates]=\"availableDates()\"\n [monthNames]=\"monthNames()\"\n [weekdayLabels]=\"weekdayLabels()\"\n [weekdayNames]=\"weekdayNames()\"\n [ariaLabel]=\"label()\"\n (valueChange)=\"pick($event)\"\n />\n</ng-template>\n\n<kf-dropdown [(open)]=\"popoverOpen\" [anchor]=\"fieldHost()\" [autoFocus]=\"false\">\n <kf-input\n [label]=\"label()\"\n [hideLabel]=\"hideLabel()\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n [invalid]=\"fieldInvalid()\"\n [errorMessage]=\"fieldError()\"\n [hint]=\"hint()\"\n [placeholder]=\"placeholder()\"\n [maxlength]=\"maxLength()\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n [ngModelOptions]=\"{ standalone: true }\"\n [ngModel]=\"text()\"\n (ngModelChange)=\"onText($event)\"\n (keydown)=\"onKeydown($event)\"\n >\n <kf-button\n kf-input-trailing\n class=\"kf-date-field__toggle\"\n variant=\"ghost\"\n shape=\"circle\"\n size=\"sm\"\n icon=\"calendar\"\n type=\"button\"\n [ariaLabel]=\"openCalendarLabel()\"\n [ariaHaspopup]=\"'dialog'\"\n [ariaExpanded]=\"expanded()\"\n [disabled]=\"disabled()\"\n (click)=\"toggle()\"\n />\n </kf-input>\n <kf-dropdown-panel role=\"dialog\" [ariaLabel]=\"label()\">\n <ng-container [ngTemplateOutlet]=\"calendarTemplate\" />\n </kf-dropdown-panel>\n</kf-dropdown>\n\n<ng-template #sheetTemplate>\n <kf-drawer side=\"bottom\" role=\"dialog\" [title]=\"label()\" [(open)]=\"sheetOpen\">\n <div class=\"kf-date-field__sheet\">\n <ng-container [ngTemplateOutlet]=\"calendarTemplate\" />\n </div>\n </kf-drawer>\n</ng-template>\n", styles: [":host{display:block}kf-dropdown{display:block}.kf-date-field__sheet{display:flex;justify-content:center;padding:var(--kf-space-sm) 0 var(--kf-space-md)}\n"], dependencies: [{ kind: "component", type: Button, selector: "kf-button", inputs: ["variant", "size", "shape", "disabled", "type", "icon", "block", "loading", "ariaLabel", "ariaExpanded", "ariaPressed", "ariaDisabled", "ariaControls", "ariaHaspopup"] }, { kind: "component", type: Calendar, selector: "kf-calendar", inputs: ["value", "month", "min", "max", "availableDates", "markedDates", "today", "loading", "ariaLabel", "monthNames", "weekdayLabels", "weekdayNames", "markedLabel", "previousMonthLabel", "nextMonthLabel"], outputs: ["valueChange", "monthChange"] }, { kind: "component", type: Drawer, selector: "kf-drawer", inputs: ["open", "side", "role", "ariaLabel", "title", "closeLabel", "size", "sheetSize", "swipeToClose", "closeOnBack", "mountInOverlay"], outputs: ["openChange"] }, { kind: "component", type: Dropdown, selector: "kf-dropdown", inputs: ["open", "anchor", "autoFocus"], outputs: ["openChange"] }, { kind: "component", type: DropdownPanel, selector: "kf-dropdown-panel", inputs: ["variant", "role", "maxHeight", "width", "ariaLabel"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: Input, selector: "kf-input", inputs: ["label", "size", "hideLabel", "required", "icon", "suffix", "hint", "invalid", "errorMessage", "disabled", "readonly", "type", "placeholder", "autocomplete", "name", "inputmode", "min", "max", "step", "maxlength", "toggleable", "ariaLabel", "clearable", "clearLabel"], outputs: ["cleared"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9017
9112
|
}
|
|
9018
9113
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: DateField, decorators: [{
|
|
9019
9114
|
type: Component,
|
|
@@ -12943,7 +13038,7 @@ class PortalHeader {
|
|
|
12943
13038
|
}, /* @ts-ignore */
|
|
12944
13039
|
...(ngDevMode ? [{ debugName: "thumbStyle" }] : /* istanbul ignore next */ []));
|
|
12945
13040
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: PortalHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12946
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: PortalHeader, isStandalone: true, selector: "kf-portal-header", inputs: { tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null }, brand: { classPropertyName: "brand", publicName: "brand", isSignal: true, isRequired: false, transformFunction: null }, logoSrc: { classPropertyName: "logoSrc", publicName: "logoSrc", isSignal: true, isRequired: false, transformFunction: null }, logoAlt: { classPropertyName: "logoAlt", publicName: "logoAlt", isSignal: true, isRequired: false, transformFunction: null }, isAdmin: { classPropertyName: "isAdmin", publicName: "isAdmin", isSignal: true, isRequired: false, transformFunction: null }, adminActions: { classPropertyName: "adminActions", publicName: "adminActions", isSignal: true, isRequired: false, transformFunction: null }, navItems: { classPropertyName: "navItems", publicName: "navItems", isSignal: true, isRequired: false, transformFunction: null }, userInitials: { classPropertyName: "userInitials", publicName: "userInitials", isSignal: true, isRequired: true, transformFunction: null }, tagline: { classPropertyName: "tagline", publicName: "tagline", isSignal: true, isRequired: false, transformFunction: null }, userName: { classPropertyName: "userName", publicName: "userName", isSignal: true, isRequired: false, transformFunction: null }, showCart: { classPropertyName: "showCart", publicName: "showCart", isSignal: true, isRequired: false, transformFunction: null }, cartCount: { classPropertyName: "cartCount", publicName: "cartCount", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sessionClick: "sessionClick", cartClick: "cartClick" }, host: { listeners: { "window:resize": "onWindowResize()" }, properties: { "attr.data-tone": "tone()" } }, viewQueries: [{ propertyName: "sessionButtonRef", first: true, predicate: ["sessionButton"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "navItemAnchors", predicate: ["navItemAnchor"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (isAdmin()) {\n <div class=\"kf-portal-header__admin-bar\">\n <div class=\"kf-portal-header__admin-inner\">\n <kf-admin-badge inline />\n <div class=\"kf-portal-header__admin-actions\">\n @for (action of adminActions(); track action.label) {\n <a class=\"kf-portal-header__admin-action\" [href]=\"action.href\">{{ action.label }}</a>\n }\n </div>\n </div>\n </div>\n}\n<div class=\"kf-portal-header__brand-bar\">\n <div class=\"kf-portal-header__brand-inner\">\n <div class=\"kf-portal-header__top-row\">\n <div class=\"kf-portal-header__logo-group\">\n @if (logoSrc()) {\n <img class=\"kf-portal-header__logo-img\" [src]=\"logoSrc()\" [alt]=\"logoAlt() || brand()\" />\n } @else {\n <span class=\"kf-portal-header__logo\">{{ brand() }}</span>\n }\n @if (tagline()) {\n <span class=\"kf-portal-header__logo-sep\" aria-hidden=\"true\"></span>\n <span class=\"kf-portal-header__logo-tag\">{{ tagline() }}</span>\n }\n </div>\n\n <div class=\"kf-portal-header__actions\">\n @if (showCart()) {\n <button\n type=\"button\"\n class=\"kf-portal-header__cart\"\n [attr.aria-label]=\"cartAriaLabel()\"\n (click)=\"cartClick.emit()\"\n >\n <kf-icon name=\"cart\" size=\"md\" />\n @if (cartCount() > 0) {\n <span class=\"kf-portal-header__cart-count\" aria-hidden=\"true\">{{\n cartCountLabel()\n }}</span>\n }\n </button>\n }\n\n <button\n #sessionButton\n type=\"button\"\n class=\"kf-portal-header__session\"\n [class.kf-portal-header__session--expanded]=\"userName()\"\n (click)=\"sessionClick.emit()\"\n >\n @if (userName()) {\n <kf-avatar [initials]=\"userInitials()\" />\n <span class=\"kf-portal-header__session-who\">\n <span class=\"kf-portal-header__session-greeting\">Hola</span>\n <span class=\"kf-portal-header__session-name\">{{ userName() }}</span>\n </span>\n <kf-icon name=\"chevron-down\" size=\"sm\" class=\"kf-portal-header__session-chevron\" />\n } @else {\n <kf-avatar [initials]=\"userInitials()\" pill />\n }\n </button>\n\n <button\n type=\"button\"\n class=\"kf-portal-header__menu-toggle\"\n [attr.aria-expanded]=\"mobileMenuOpen()\"\n aria-label=\"Abrir men\u00FA de navegaci\u00F3n\"\n (click)=\"mobileMenuOpen.set(!mobileMenuOpen())\"\n >\n <kf-icon [name]=\"mobileMenuOpen() ? 'x' : 'menu'\" size=\"md\" />\n </button>\n </div>\n </div>\n\n <nav class=\"kf-portal-header__nav\">\n <span class=\"kf-portal-header__nav-thumb\" [style]=\"thumbStyle()\" aria-hidden=\"true\"></span>\n @for (item of navItems(); track item.label) {\n <a\n #navItemAnchor\n class=\"kf-portal-header__nav-item\"\n [class.kf-portal-header__nav-item--active]=\"item.active\"\n [href]=\"item.href\"\n >\n {{ item.label }}\n </a>\n }\n </nav>\n </div>\n</div>\n\n<kf-drawer [(open)]=\"mobileMenuOpen\" ariaLabel=\"Men\u00FA de navegaci\u00F3n\">\n <div kf-drawer-header>\n <ng-content select=\"[kf-portal-header-extra]\" />\n </div>\n @for (item of navItems(); track item.label) {\n <a\n class=\"kf-portal-header__mobile-nav-item\"\n [class.kf-portal-header__mobile-nav-item--active]=\"item.active\"\n [href]=\"item.href\"\n (click)=\"mobileMenuOpen.set(false)\"\n >\n @if (item.icon) {\n <kf-icon [name]=\"item.icon\" size=\"sm\" />\n }\n <span class=\"kf-portal-header__mobile-nav-item-label\">{{ item.label }}</span>\n <kf-icon name=\"chevron-right\" size=\"sm\" />\n </a>\n }\n <div kf-drawer-footer>\n <ng-content select=\"[kf-portal-header-footer]\" />\n </div>\n</kf-drawer>\n", styles: [":host{display:block;position:sticky;top:0;z-index:30;font-family:var(--kf-font-body)}.kf-portal-header__admin-bar{padding-block:var(--kf-space-xs);background:var(--kf-header-bg)}.kf-portal-header__admin-inner{display:flex;align-items:center;justify-content:space-between;gap:var(--kf-space-md);max-width:var(--kf-header-max-width, none);margin:0 auto;padding:0 var(--kf-space-lg)}.kf-portal-header__admin-actions{display:flex;gap:var(--kf-space-md)}.kf-portal-header__admin-action{font-size:var(--kf-font-size-label);font-weight:600;color:color-mix(in srgb,var(--kf-header-fg) 85%,transparent);text-decoration:none}.kf-portal-header__admin-action:hover{color:var(--kf-header-fg)}.kf-portal-header__brand-bar{background:var(--kf-header-bg);border-top:1px solid color-mix(in srgb,var(--kf-header-fg) 10%,transparent)}.kf-portal-header__brand-inner{display:flex;flex-direction:column;max-width:var(--kf-header-max-width, none);margin:0 auto;padding:0 var(--kf-space-lg)}.kf-portal-header__top-row{display:flex;align-items:center;gap:var(--kf-space-lg);min-height:60px;padding-block:var(--kf-space-sm) 4px}.kf-portal-header__logo-group{display:flex;align-items:center;gap:var(--kf-space-md);flex:1 1 auto;min-width:0}.kf-portal-header__logo{font-family:var(--kf-font-title);font-size:1.25rem;font-weight:700;letter-spacing:.02em;color:var(--kf-header-fg);text-transform:uppercase}.kf-portal-header__logo-img{height:28px;width:auto;display:block}.kf-portal-header__logo-sep{flex:none;width:1px;height:30px;background:color-mix(in srgb,var(--kf-header-fg) 20%,transparent)}.kf-portal-header__logo-tag{font-family:var(--kf-font-title);font-weight:400;font-size:1.1875rem;color:color-mix(in srgb,var(--kf-header-fg) 78%,transparent)}.kf-portal-header__actions{margin-left:auto;display:flex;align-items:center;gap:var(--kf-space-sm)}.kf-portal-header__cart{position:relative;flex:none;width:46px;height:46px;border-radius:var(--kf-radius-pill);border:1px solid color-mix(in srgb,var(--kf-header-fg) 18%,transparent);background:transparent;color:var(--kf-header-fg);display:grid;place-items:center;cursor:pointer}.kf-portal-header__cart-count{position:absolute;top:-4px;right:-4px;min-width:20px;height:20px;padding:0 5px;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;border:2px solid var(--kf-header-bg);border-radius:var(--kf-radius-pill);background:var(--kf-color-primary);color:var(--kf-color-white);font-size:.6875rem;font-weight:700;line-height:1;pointer-events:none}.kf-portal-header__cart:hover{background:color-mix(in srgb,var(--kf-header-fg) 10%,transparent);border-color:color-mix(in srgb,var(--kf-header-fg) 30%,transparent)}.kf-portal-header__nav{display:flex;align-items:center;gap:2px;padding:4px;margin-bottom:var(--kf-space-sm);background:color-mix(in srgb,var(--kf-header-fg) 8%,transparent);border-radius:var(--kf-radius-pill);width:fit-content;max-width:100%;position:relative}.kf-portal-header__nav-thumb{position:absolute;top:4px;bottom:4px;left:0;background:var(--kf-header-fg);border-radius:var(--kf-radius-pill);transition:transform .25s cubic-bezier(.4,0,.2,1),width .25s cubic-bezier(.4,0,.2,1),opacity .15s linear;pointer-events:none}.kf-portal-header__nav-item{position:relative;padding:var(--kf-space-sm) var(--kf-space-md);border-radius:var(--kf-radius-pill);color:color-mix(in srgb,var(--kf-header-fg) 75%,transparent);font-size:.875rem;font-weight:600;text-decoration:none;white-space:nowrap;transition:background .14s,color .14s}.kf-portal-header__nav-item:hover:not(.kf-portal-header__nav-item--active){color:var(--kf-header-fg);background:color-mix(in srgb,var(--kf-header-fg) 8%,transparent)}.kf-portal-header__nav-item--active{color:var(--kf-color-ink)}:host([data-tone=\"light\"]) .kf-portal-header__nav-item--active{color:var(--kf-header-bg)}.kf-portal-header__session{flex:none;border:none;background:transparent;padding:0;cursor:pointer}.kf-portal-header__session--expanded{display:flex;align-items:center;gap:var(--kf-space-sm);padding:7px 12px 7px 8px;background:var(--kf-color-primary);border-radius:var(--kf-radius-pill)}.kf-portal-header__session--expanded:hover{background:var(--kf-color-primary-active)}.kf-portal-header__session-who{display:flex;flex-direction:column;line-height:1.2;color:var(--kf-color-white)}.kf-portal-header__session-greeting{font-size:.65625rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:color-mix(in srgb,var(--kf-color-white) 70%,transparent)}.kf-portal-header__session-name{font-size:.875rem;font-weight:700;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kf-portal-header__session-chevron{color:color-mix(in srgb,var(--kf-color-white) 85%,transparent)}.kf-portal-header__menu-toggle{display:none;flex:none;align-items:center;justify-content:center;width:36px;height:36px;border:none;border-radius:var(--kf-radius-sm);background:transparent;color:var(--kf-header-fg);cursor:pointer}.kf-portal-header__menu-toggle:hover{background:color-mix(in srgb,var(--kf-header-fg) 10%,transparent)}.kf-portal-header__mobile-nav-item{display:flex;align-items:center;gap:var(--kf-space-sm);padding:var(--kf-space-sm) var(--kf-space-xs);color:var(--kf-color-text);font-size:.9375rem;font-weight:600;text-decoration:none;border-radius:var(--kf-radius-sm)}.kf-portal-header__mobile-nav-item:hover{background:var(--kf-color-surface)}.kf-portal-header__mobile-nav-item--active{color:var(--kf-color-primary-active);background:var(--kf-color-primary-soft)}.kf-portal-header__mobile-nav-item-label{flex:1 1 auto}.kf-portal-header__mobile-nav-item kf-icon:last-child{color:color-mix(in srgb,var(--kf-color-ink) 35%,transparent)}@media(max-width:768px){.kf-portal-header__nav,.kf-portal-header__session{display:none}.kf-portal-header__menu-toggle{display:inline-flex}}\n"], dependencies: [{ kind: "component", type: AdminBadge, selector: "kf-admin-badge", inputs: ["inline"] }, { kind: "component", type: Avatar, selector: "kf-avatar", inputs: ["initials", "src", "round", "size", "pill"] }, { kind: "component", type: Icon, selector: "kf-icon", inputs: ["name", "size", "rotate", "filled"] }, { kind: "component", type: Drawer, selector: "kf-drawer", inputs: ["open", "side", "role", "ariaLabel", "title", "closeLabel", "size", "sheetSize", "swipeToClose", "closeOnBack"], outputs: ["openChange"] }] });
|
|
13041
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: PortalHeader, isStandalone: true, selector: "kf-portal-header", inputs: { tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null }, brand: { classPropertyName: "brand", publicName: "brand", isSignal: true, isRequired: false, transformFunction: null }, logoSrc: { classPropertyName: "logoSrc", publicName: "logoSrc", isSignal: true, isRequired: false, transformFunction: null }, logoAlt: { classPropertyName: "logoAlt", publicName: "logoAlt", isSignal: true, isRequired: false, transformFunction: null }, isAdmin: { classPropertyName: "isAdmin", publicName: "isAdmin", isSignal: true, isRequired: false, transformFunction: null }, adminActions: { classPropertyName: "adminActions", publicName: "adminActions", isSignal: true, isRequired: false, transformFunction: null }, navItems: { classPropertyName: "navItems", publicName: "navItems", isSignal: true, isRequired: false, transformFunction: null }, userInitials: { classPropertyName: "userInitials", publicName: "userInitials", isSignal: true, isRequired: true, transformFunction: null }, tagline: { classPropertyName: "tagline", publicName: "tagline", isSignal: true, isRequired: false, transformFunction: null }, userName: { classPropertyName: "userName", publicName: "userName", isSignal: true, isRequired: false, transformFunction: null }, showCart: { classPropertyName: "showCart", publicName: "showCart", isSignal: true, isRequired: false, transformFunction: null }, cartCount: { classPropertyName: "cartCount", publicName: "cartCount", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sessionClick: "sessionClick", cartClick: "cartClick" }, host: { listeners: { "window:resize": "onWindowResize()" }, properties: { "attr.data-tone": "tone()" } }, viewQueries: [{ propertyName: "sessionButtonRef", first: true, predicate: ["sessionButton"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "navItemAnchors", predicate: ["navItemAnchor"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (isAdmin()) {\n <div class=\"kf-portal-header__admin-bar\">\n <div class=\"kf-portal-header__admin-inner\">\n <kf-admin-badge inline />\n <div class=\"kf-portal-header__admin-actions\">\n @for (action of adminActions(); track action.label) {\n <a class=\"kf-portal-header__admin-action\" [href]=\"action.href\">{{ action.label }}</a>\n }\n </div>\n </div>\n </div>\n}\n<div class=\"kf-portal-header__brand-bar\">\n <div class=\"kf-portal-header__brand-inner\">\n <div class=\"kf-portal-header__top-row\">\n <div class=\"kf-portal-header__logo-group\">\n @if (logoSrc()) {\n <img class=\"kf-portal-header__logo-img\" [src]=\"logoSrc()\" [alt]=\"logoAlt() || brand()\" />\n } @else {\n <span class=\"kf-portal-header__logo\">{{ brand() }}</span>\n }\n @if (tagline()) {\n <span class=\"kf-portal-header__logo-sep\" aria-hidden=\"true\"></span>\n <span class=\"kf-portal-header__logo-tag\">{{ tagline() }}</span>\n }\n </div>\n\n <div class=\"kf-portal-header__actions\">\n @if (showCart()) {\n <button\n type=\"button\"\n class=\"kf-portal-header__cart\"\n [attr.aria-label]=\"cartAriaLabel()\"\n (click)=\"cartClick.emit()\"\n >\n <kf-icon name=\"cart\" size=\"md\" />\n @if (cartCount() > 0) {\n <span class=\"kf-portal-header__cart-count\" aria-hidden=\"true\">{{\n cartCountLabel()\n }}</span>\n }\n </button>\n }\n\n <button\n #sessionButton\n type=\"button\"\n class=\"kf-portal-header__session\"\n [class.kf-portal-header__session--expanded]=\"userName()\"\n (click)=\"sessionClick.emit()\"\n >\n @if (userName()) {\n <kf-avatar [initials]=\"userInitials()\" />\n <span class=\"kf-portal-header__session-who\">\n <span class=\"kf-portal-header__session-greeting\">Hola</span>\n <span class=\"kf-portal-header__session-name\">{{ userName() }}</span>\n </span>\n <kf-icon name=\"chevron-down\" size=\"sm\" class=\"kf-portal-header__session-chevron\" />\n } @else {\n <kf-avatar [initials]=\"userInitials()\" pill />\n }\n </button>\n\n <button\n type=\"button\"\n class=\"kf-portal-header__menu-toggle\"\n [attr.aria-expanded]=\"mobileMenuOpen()\"\n aria-label=\"Abrir men\u00FA de navegaci\u00F3n\"\n (click)=\"mobileMenuOpen.set(!mobileMenuOpen())\"\n >\n <kf-icon [name]=\"mobileMenuOpen() ? 'x' : 'menu'\" size=\"md\" />\n </button>\n </div>\n </div>\n\n <nav class=\"kf-portal-header__nav\">\n <span class=\"kf-portal-header__nav-thumb\" [style]=\"thumbStyle()\" aria-hidden=\"true\"></span>\n @for (item of navItems(); track item.label) {\n <a\n #navItemAnchor\n class=\"kf-portal-header__nav-item\"\n [class.kf-portal-header__nav-item--active]=\"item.active\"\n [href]=\"item.href\"\n >\n {{ item.label }}\n </a>\n }\n </nav>\n </div>\n</div>\n\n<kf-drawer [(open)]=\"mobileMenuOpen\" ariaLabel=\"Men\u00FA de navegaci\u00F3n\">\n <div kf-drawer-header>\n <ng-content select=\"[kf-portal-header-extra]\" />\n </div>\n @for (item of navItems(); track item.label) {\n <a\n class=\"kf-portal-header__mobile-nav-item\"\n [class.kf-portal-header__mobile-nav-item--active]=\"item.active\"\n [href]=\"item.href\"\n (click)=\"mobileMenuOpen.set(false)\"\n >\n @if (item.icon) {\n <kf-icon [name]=\"item.icon\" size=\"sm\" />\n }\n <span class=\"kf-portal-header__mobile-nav-item-label\">{{ item.label }}</span>\n <kf-icon name=\"chevron-right\" size=\"sm\" />\n </a>\n }\n <div kf-drawer-footer>\n <ng-content select=\"[kf-portal-header-footer]\" />\n </div>\n</kf-drawer>\n", styles: [":host{display:block;position:sticky;top:0;z-index:30;font-family:var(--kf-font-body)}.kf-portal-header__admin-bar{padding-block:var(--kf-space-xs);background:var(--kf-header-bg)}.kf-portal-header__admin-inner{display:flex;align-items:center;justify-content:space-between;gap:var(--kf-space-md);max-width:var(--kf-header-max-width, none);margin:0 auto;padding:0 var(--kf-space-lg)}.kf-portal-header__admin-actions{display:flex;gap:var(--kf-space-md)}.kf-portal-header__admin-action{font-size:var(--kf-font-size-label);font-weight:600;color:color-mix(in srgb,var(--kf-header-fg) 85%,transparent);text-decoration:none}.kf-portal-header__admin-action:hover{color:var(--kf-header-fg)}.kf-portal-header__brand-bar{background:var(--kf-header-bg);border-top:1px solid color-mix(in srgb,var(--kf-header-fg) 10%,transparent)}.kf-portal-header__brand-inner{display:flex;flex-direction:column;max-width:var(--kf-header-max-width, none);margin:0 auto;padding:0 var(--kf-space-lg)}.kf-portal-header__top-row{display:flex;align-items:center;gap:var(--kf-space-lg);min-height:60px;padding-block:var(--kf-space-sm) 4px}.kf-portal-header__logo-group{display:flex;align-items:center;gap:var(--kf-space-md);flex:1 1 auto;min-width:0}.kf-portal-header__logo{font-family:var(--kf-font-title);font-size:1.25rem;font-weight:700;letter-spacing:.02em;color:var(--kf-header-fg);text-transform:uppercase}.kf-portal-header__logo-img{height:28px;width:auto;display:block}.kf-portal-header__logo-sep{flex:none;width:1px;height:30px;background:color-mix(in srgb,var(--kf-header-fg) 20%,transparent)}.kf-portal-header__logo-tag{font-family:var(--kf-font-title);font-weight:400;font-size:1.1875rem;color:color-mix(in srgb,var(--kf-header-fg) 78%,transparent)}.kf-portal-header__actions{margin-left:auto;display:flex;align-items:center;gap:var(--kf-space-sm)}.kf-portal-header__cart{position:relative;flex:none;width:46px;height:46px;border-radius:var(--kf-radius-pill);border:1px solid color-mix(in srgb,var(--kf-header-fg) 18%,transparent);background:transparent;color:var(--kf-header-fg);display:grid;place-items:center;cursor:pointer}.kf-portal-header__cart-count{position:absolute;top:-4px;right:-4px;min-width:20px;height:20px;padding:0 5px;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;border:2px solid var(--kf-header-bg);border-radius:var(--kf-radius-pill);background:var(--kf-color-primary);color:var(--kf-color-white);font-size:.6875rem;font-weight:700;line-height:1;pointer-events:none}.kf-portal-header__cart:hover{background:color-mix(in srgb,var(--kf-header-fg) 10%,transparent);border-color:color-mix(in srgb,var(--kf-header-fg) 30%,transparent)}.kf-portal-header__nav{display:flex;align-items:center;gap:2px;padding:4px;margin-bottom:var(--kf-space-sm);background:color-mix(in srgb,var(--kf-header-fg) 8%,transparent);border-radius:var(--kf-radius-pill);width:fit-content;max-width:100%;position:relative}.kf-portal-header__nav-thumb{position:absolute;top:4px;bottom:4px;left:0;background:var(--kf-header-fg);border-radius:var(--kf-radius-pill);transition:transform .25s cubic-bezier(.4,0,.2,1),width .25s cubic-bezier(.4,0,.2,1),opacity .15s linear;pointer-events:none}.kf-portal-header__nav-item{position:relative;padding:var(--kf-space-sm) var(--kf-space-md);border-radius:var(--kf-radius-pill);color:color-mix(in srgb,var(--kf-header-fg) 75%,transparent);font-size:.875rem;font-weight:600;text-decoration:none;white-space:nowrap;transition:background .14s,color .14s}.kf-portal-header__nav-item:hover:not(.kf-portal-header__nav-item--active){color:var(--kf-header-fg);background:color-mix(in srgb,var(--kf-header-fg) 8%,transparent)}.kf-portal-header__nav-item--active{color:var(--kf-color-ink)}:host([data-tone=\"light\"]) .kf-portal-header__nav-item--active{color:var(--kf-header-bg)}.kf-portal-header__session{flex:none;border:none;background:transparent;padding:0;cursor:pointer}.kf-portal-header__session--expanded{display:flex;align-items:center;gap:var(--kf-space-sm);padding:7px 12px 7px 8px;background:var(--kf-color-primary);border-radius:var(--kf-radius-pill)}.kf-portal-header__session--expanded:hover{background:var(--kf-color-primary-active)}.kf-portal-header__session-who{display:flex;flex-direction:column;line-height:1.2;color:var(--kf-color-white)}.kf-portal-header__session-greeting{font-size:.65625rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:color-mix(in srgb,var(--kf-color-white) 70%,transparent)}.kf-portal-header__session-name{font-size:.875rem;font-weight:700;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kf-portal-header__session-chevron{color:color-mix(in srgb,var(--kf-color-white) 85%,transparent)}.kf-portal-header__menu-toggle{display:none;flex:none;align-items:center;justify-content:center;width:36px;height:36px;border:none;border-radius:var(--kf-radius-sm);background:transparent;color:var(--kf-header-fg);cursor:pointer}.kf-portal-header__menu-toggle:hover{background:color-mix(in srgb,var(--kf-header-fg) 10%,transparent)}.kf-portal-header__mobile-nav-item{display:flex;align-items:center;gap:var(--kf-space-sm);padding:var(--kf-space-sm) var(--kf-space-xs);color:var(--kf-color-text);font-size:.9375rem;font-weight:600;text-decoration:none;border-radius:var(--kf-radius-sm)}.kf-portal-header__mobile-nav-item:hover{background:var(--kf-color-surface)}.kf-portal-header__mobile-nav-item--active{color:var(--kf-color-primary-active);background:var(--kf-color-primary-soft)}.kf-portal-header__mobile-nav-item-label{flex:1 1 auto}.kf-portal-header__mobile-nav-item kf-icon:last-child{color:color-mix(in srgb,var(--kf-color-ink) 35%,transparent)}@media(max-width:768px){.kf-portal-header__nav,.kf-portal-header__session{display:none}.kf-portal-header__menu-toggle{display:inline-flex}}\n"], dependencies: [{ kind: "component", type: AdminBadge, selector: "kf-admin-badge", inputs: ["inline"] }, { kind: "component", type: Avatar, selector: "kf-avatar", inputs: ["initials", "src", "round", "size", "pill"] }, { kind: "component", type: Icon, selector: "kf-icon", inputs: ["name", "size", "rotate", "filled"] }, { kind: "component", type: Drawer, selector: "kf-drawer", inputs: ["open", "side", "role", "ariaLabel", "title", "closeLabel", "size", "sheetSize", "swipeToClose", "closeOnBack", "mountInOverlay"], outputs: ["openChange"] }] });
|
|
12947
13042
|
}
|
|
12948
13043
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: PortalHeader, decorators: [{
|
|
12949
13044
|
type: Component,
|