@ids-group-ltd/ids-design-system 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +288 -0
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +613 -196
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.5.1.json +46 -0
- package/migrations/0.6.3.json +11 -0
- package/migrations/0.7.0.json +11 -0
- package/migrations/0.7.1.json +145 -0
- package/migrations/AUTHORING.md +18 -0
- package/package.json +1 -1
- package/styles/_dropdown-overlay.scss +11 -2
- package/styles/_overlay-motion.scss +52 -11
- package/styles/_surface-motion.scss +50 -0
- package/styles/ds.scss +1 -0
- package/types/ids-group-ltd-ids-design-system.d.ts +248 -75
|
@@ -1,29 +1,56 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, makeEnvironmentProviders, provideEnvironmentInitializer,
|
|
2
|
+
import { InjectionToken, inject, makeEnvironmentProviders, provideEnvironmentInitializer, PLATFORM_ID, Injectable, input, computed, ViewEncapsulation, Component, Directive, booleanAttribute, output, viewChild, isDevMode, effect, model, numberAttribute, signal, DestroyRef, afterNextRender, ChangeDetectionStrategy, ElementRef, contentChildren, forwardRef, ViewContainerRef, TemplateRef, Injector, viewChildren, contentChild, HostListener, HostBinding, DOCUMENT as DOCUMENT$1 } from '@angular/core';
|
|
3
3
|
import { isPlatformBrowser, DOCUMENT, NgTemplateOutlet } from '@angular/common';
|
|
4
4
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
5
|
+
import * as i1 from '@angular/cdk/a11y';
|
|
6
|
+
import { A11yModule, CdkTrapFocus } from '@angular/cdk/a11y';
|
|
5
7
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
|
-
import { fromEvent, debounceTime } from 'rxjs';
|
|
8
|
+
import { fromEvent, debounceTime, filter, map, distinctUntilChanged } from 'rxjs';
|
|
7
9
|
import { Router, NavigationEnd, RouterLink, RouterLinkActive } from '@angular/router';
|
|
8
|
-
import * as i1 from '@angular/forms';
|
|
10
|
+
import * as i1$1 from '@angular/forms';
|
|
9
11
|
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
10
12
|
import { Overlay } from '@angular/cdk/overlay';
|
|
11
13
|
import { TemplatePortal, ComponentPortal } from '@angular/cdk/portal';
|
|
12
14
|
import { moveItemInArray, CdkDropList, CdkDrag, CdkDragHandle } from '@angular/cdk/drag-drop';
|
|
13
|
-
import * as i1$1 from '@angular/cdk/a11y';
|
|
14
|
-
import { CdkTrapFocus, A11yModule } from '@angular/cdk/a11y';
|
|
15
15
|
|
|
16
16
|
const DS_CONFIG = new InjectionToken('DS_CONFIG', {
|
|
17
17
|
factory: () => ({}),
|
|
18
18
|
});
|
|
19
|
-
/** Provide DS-level defaults
|
|
19
|
+
/** Provide DS-level defaults.
|
|
20
20
|
*
|
|
21
21
|
* providers: [provideDsConfig({ card: { padding: 'sm' } })]
|
|
22
22
|
*
|
|
23
|
-
*
|
|
23
|
+
* Works at the app root, on a `Route`, or on a component/directive — the
|
|
24
|
+
* config resolves through the element-injector chain, so a subtree can differ
|
|
25
|
+
* from the app. Component inputs (e.g. `<ds-card padding="lg">`) still win.
|
|
26
|
+
*
|
|
27
|
+
* A nested call MERGES with the config above it, section by section, so
|
|
28
|
+
* scoping one flag cannot silently drop unrelated app-level settings. Only the
|
|
29
|
+
* keys you name are replaced.
|
|
24
30
|
*/
|
|
25
31
|
function provideDsConfig(config) {
|
|
26
|
-
return { provide: DS_CONFIG,
|
|
32
|
+
return { provide: DS_CONFIG, useFactory: () => inheritDsConfig(config) };
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The factory body behind `provideDsConfig`, exported so a directive can put the
|
|
36
|
+
* provider in its metadata as a plain object literal. Calling `provideDsConfig`
|
|
37
|
+
* there instead would run at module-evaluation time, which makes the module
|
|
38
|
+
* side-effectful and costs the consumer its tree-shaking (measured: the whole
|
|
39
|
+
* library moved into ds-docs' eager chunk, +566 kB).
|
|
40
|
+
*
|
|
41
|
+
* Must be called from an injection context.
|
|
42
|
+
*/
|
|
43
|
+
function inheritDsConfig(config) {
|
|
44
|
+
return mergeDsConfig(inject(DS_CONFIG, { skipSelf: true, optional: true }) ?? {}, config);
|
|
45
|
+
}
|
|
46
|
+
function mergeDsConfig(parent, own) {
|
|
47
|
+
const merged = { ...parent };
|
|
48
|
+
for (const section of Object.keys(own)) {
|
|
49
|
+
Object.assign(merged, {
|
|
50
|
+
[section]: { ...parent[section], ...own[section] },
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return merged;
|
|
27
54
|
}
|
|
28
55
|
|
|
29
56
|
/**
|
|
@@ -270,6 +297,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
270
297
|
`, styles: ["ds-icon{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;line-height:0}ds-icon>svg.icon{display:block}\n"] }]
|
|
271
298
|
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], stroke: [{ type: i0.Input, args: [{ isSignal: true, alias: "stroke", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
272
299
|
|
|
300
|
+
/**
|
|
301
|
+
* Turns on `reserveMessage` for every DS field declared inside the host
|
|
302
|
+
* element, so a validated form holds its message rows without repeating the
|
|
303
|
+
* input on each control:
|
|
304
|
+
*
|
|
305
|
+
* ```html
|
|
306
|
+
* <form dsReserveMessages>
|
|
307
|
+
* <ds-input label="Email" />
|
|
308
|
+
* <ds-input label="Password" />
|
|
309
|
+
* </form>
|
|
310
|
+
* ```
|
|
311
|
+
*
|
|
312
|
+
* It provides `DS_CONFIG`, which merges with the config above it — scoping this
|
|
313
|
+
* one flag cannot drop unrelated app-level settings. A field's own
|
|
314
|
+
* `[reserveMessage]` still wins, so a single control can opt back out.
|
|
315
|
+
*
|
|
316
|
+
* The switch is the directive's PRESENCE, not an input: providers are resolved
|
|
317
|
+
* at construction, before inputs are set, so a bound value could not drive
|
|
318
|
+
* them. To turn it off for a subtree, provide the config directly:
|
|
319
|
+
* `provideDsConfig({ field: { reserveMessage: false } })`.
|
|
320
|
+
*
|
|
321
|
+
* Applies to fields DECLARED inside the host — projected content keeps the
|
|
322
|
+
* injector of the template it was written in, so wrapping `<ng-content>` in
|
|
323
|
+
* this directive does not reach the projected fields.
|
|
324
|
+
*/
|
|
325
|
+
class ReserveMessagesDirective {
|
|
326
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ReserveMessagesDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
327
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.17", type: ReserveMessagesDirective, isStandalone: true, selector: "[dsReserveMessages]", providers: [
|
|
328
|
+
{
|
|
329
|
+
provide: DS_CONFIG,
|
|
330
|
+
useFactory: () => inheritDsConfig({ field: { reserveMessage: true } }),
|
|
331
|
+
},
|
|
332
|
+
], ngImport: i0 });
|
|
333
|
+
}
|
|
334
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ReserveMessagesDirective, decorators: [{
|
|
335
|
+
type: Directive,
|
|
336
|
+
args: [{
|
|
337
|
+
selector: '[dsReserveMessages]',
|
|
338
|
+
standalone: true,
|
|
339
|
+
// Object literal + arrow, NOT provideDsConfig(...): a call in decorator
|
|
340
|
+
// metadata runs at module-evaluation time, which marks the module
|
|
341
|
+
// side-effectful and cost the consumer its tree-shaking of the barrel
|
|
342
|
+
// (measured on ds-docs: the whole library moved into the eager chunk, +566 kB).
|
|
343
|
+
providers: [
|
|
344
|
+
{
|
|
345
|
+
provide: DS_CONFIG,
|
|
346
|
+
useFactory: () => inheritDsConfig({ field: { reserveMessage: true } }),
|
|
347
|
+
},
|
|
348
|
+
],
|
|
349
|
+
}]
|
|
350
|
+
}] });
|
|
351
|
+
|
|
273
352
|
// color×variant pairs that RENDER but read poorly — surfaced as a dev-mode
|
|
274
353
|
// console.warn (two inputs can't be narrowed against each other at compile
|
|
275
354
|
// time). They are discouraged, not blocked: a brand may still opt in.
|
|
@@ -571,28 +650,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
571
650
|
args: [{ providedIn: 'root' }]
|
|
572
651
|
}], ctorParameters: () => [] });
|
|
573
652
|
|
|
653
|
+
/**
|
|
654
|
+
* Emits the new path whenever navigation lands on a DIFFERENT one. Internal to
|
|
655
|
+
* `ds-app-layout`: a query- or fragment-only navigation is a search, sort or
|
|
656
|
+
* page step on the same screen, and both the scroll reset and the responsive
|
|
657
|
+
* rail must agree on that — so they read one source instead of each deciding
|
|
658
|
+
* for itself what "went somewhere else" means.
|
|
659
|
+
*
|
|
660
|
+
* Root-provided although it is internal: the PUBLIC `LayoutScrollService` now
|
|
661
|
+
* depends on it, and that service must be provided by whoever uses it. A
|
|
662
|
+
* consumer who provides it outside `ds-app-layout` cannot provide this one too
|
|
663
|
+
* — it is not exported — so anything but root would hand them a
|
|
664
|
+
* `NullInjectorError`. Safe as a singleton: the stream is derived from the
|
|
665
|
+
* router and holds no state.
|
|
666
|
+
*/
|
|
667
|
+
class LayoutNavigationService {
|
|
668
|
+
router = inject(Router);
|
|
669
|
+
pathChanged = this.router.events.pipe(filter((event) => event instanceof NavigationEnd), map((event) => event.urlAfterRedirects.split(/[?#]/)[0]), distinctUntilChanged());
|
|
670
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LayoutNavigationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
671
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LayoutNavigationService, providedIn: 'root' });
|
|
672
|
+
}
|
|
673
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LayoutNavigationService, decorators: [{
|
|
674
|
+
type: Injectable,
|
|
675
|
+
args: [{ providedIn: 'root' }]
|
|
676
|
+
}] });
|
|
677
|
+
|
|
574
678
|
/**
|
|
575
679
|
* Owns the layout's content scroller. In the fixed-frame layout the window
|
|
576
680
|
* never scrolls, so the router's built-in window-based scrolling no-ops —
|
|
577
|
-
* this service resets the registered container to the top
|
|
578
|
-
*
|
|
579
|
-
* `inject(LayoutScrollService)` and call `scrollToTop()` manually
|
|
580
|
-
* pages
|
|
581
|
-
* a documented growth point — add it here if a page
|
|
582
|
-
* back-navigation scroll memory.
|
|
681
|
+
* this service resets the registered container to the top when navigation
|
|
682
|
+
* lands on a different PATH instead. Provided by `ds-app-layout`, so routed
|
|
683
|
+
* pages can `inject(LayoutScrollService)` and call `scrollToTop()` manually
|
|
684
|
+
* (e.g. list pages that DO want the top after a filter change). Per-route
|
|
685
|
+
* scroll restoration is a documented growth point — add it here if a page
|
|
686
|
+
* ever needs back-navigation scroll memory.
|
|
583
687
|
*/
|
|
584
688
|
class LayoutScrollService {
|
|
585
|
-
|
|
689
|
+
navigation = inject(LayoutNavigationService);
|
|
586
690
|
destroyRef = inject(DestroyRef);
|
|
587
691
|
scrollContainer = null;
|
|
588
692
|
constructor() {
|
|
589
|
-
this.
|
|
693
|
+
this.navigation.pathChanged
|
|
590
694
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
591
|
-
.subscribe((
|
|
592
|
-
if (event instanceof NavigationEnd) {
|
|
593
|
-
this.scrollToTop();
|
|
594
|
-
}
|
|
595
|
-
});
|
|
695
|
+
.subscribe(() => this.scrollToTop());
|
|
596
696
|
}
|
|
597
697
|
setScrollContainer(element) {
|
|
598
698
|
this.scrollContainer = element;
|
|
@@ -624,11 +724,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
624
724
|
* ```
|
|
625
725
|
*
|
|
626
726
|
* The layout renders the `<main>` landmark itself — do not nest another
|
|
627
|
-
* `<main>` in the content. Scroll-to-top
|
|
628
|
-
*
|
|
629
|
-
*
|
|
630
|
-
*
|
|
631
|
-
*
|
|
727
|
+
* `<main>` in the content. Scroll-to-top is built in (`LayoutScrollService`)
|
|
728
|
+
* and fires when navigation changes the PATH, so a URL-driven list can page
|
|
729
|
+
* and filter without losing the reader's place; inject the service and call
|
|
730
|
+
* `scrollToTop()` for the changes that do want the top. The content padding
|
|
731
|
+
* auto-compensates the native scrollbar width so the right inset always
|
|
732
|
+
* equals the left one. The layout requires the application router
|
|
733
|
+
* (`provideRouter`) because its scroll-to-top service subscribes to
|
|
734
|
+
* navigation events.
|
|
735
|
+
*
|
|
736
|
+
* Below the `lg` breakpoint the rail becomes a modal overlay driven by
|
|
737
|
+
* `[(railOpen)]`; put the burger wherever the design wants it inside your own
|
|
738
|
+
* projected topbar.
|
|
632
739
|
*/
|
|
633
740
|
class AppLayoutComponent {
|
|
634
741
|
/**
|
|
@@ -637,25 +744,78 @@ class AppLayoutComponent {
|
|
|
637
744
|
* topbar spans the full width and the rail + content sit below it.
|
|
638
745
|
*/
|
|
639
746
|
topbarSpan = input('content', ...(ngDevMode ? [{ debugName: "topbarSpan" }] : /* istanbul ignore next */ []));
|
|
747
|
+
/**
|
|
748
|
+
* Whether the rail is open as an overlay. Only meaningful below the `lg`
|
|
749
|
+
* breakpoint — above it the rail is always in the layout and this is
|
|
750
|
+
* ignored. Two-way, so a burger in your topbar can drive it.
|
|
751
|
+
*/
|
|
752
|
+
railOpen = model(false, ...(ngDevMode ? [{ debugName: "railOpen" }] : /* istanbul ignore next */ []));
|
|
753
|
+
/** Accessible name for the rail while it is a modal overlay. */
|
|
754
|
+
railLabel = input('Navigation', ...(ngDevMode ? [{ debugName: "railLabel" }] : /* istanbul ignore next */ []));
|
|
755
|
+
/**
|
|
756
|
+
* True only while the rail is an overlay. Gates the dialog semantics: above
|
|
757
|
+
* the breakpoint the rail is an ordinary region, and a permanent
|
|
758
|
+
* `role="dialog"` there would lie to a screen reader.
|
|
759
|
+
*/
|
|
760
|
+
compact = signal(false, ...(ngDevMode ? [{ debugName: "compact" }] : /* istanbul ignore next */ []));
|
|
640
761
|
layoutScroll = inject(LayoutScrollService);
|
|
762
|
+
navigation = inject(LayoutNavigationService);
|
|
763
|
+
destroyRef = inject(DestroyRef);
|
|
641
764
|
content = viewChild.required('content');
|
|
642
765
|
constructor() {
|
|
643
766
|
// Root service: instantiating it publishes --ds-scrollbar-width.
|
|
644
767
|
inject(ScrollbarWidthService);
|
|
645
768
|
afterNextRender(() => {
|
|
646
769
|
this.layoutScroll.setScrollContainer(this.content().nativeElement);
|
|
770
|
+
this.watchDesktopBreakpoint();
|
|
647
771
|
});
|
|
772
|
+
this.navigation.pathChanged
|
|
773
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
774
|
+
.subscribe(() => this.closeRail());
|
|
775
|
+
}
|
|
776
|
+
closeRail() {
|
|
777
|
+
this.railOpen.set(false);
|
|
778
|
+
}
|
|
779
|
+
watchDesktopBreakpoint() {
|
|
780
|
+
// Single source of truth: the stylesheet's media block and this query both
|
|
781
|
+
// resolve to `--bp-lg`. There is deliberately NO literal fallback — one here
|
|
782
|
+
// could disagree with the scale and the rail would flip at a different width
|
|
783
|
+
// than the CSS, silently. A missing value means the DS global styles were
|
|
784
|
+
// never included, which breaks far more than this component, so say so.
|
|
785
|
+
const lg = getComputedStyle(document.documentElement)
|
|
786
|
+
.getPropertyValue('--bp-lg')
|
|
787
|
+
.trim();
|
|
788
|
+
if (!lg) {
|
|
789
|
+
if (isDevMode()) {
|
|
790
|
+
console.error('[ds-app-layout] --bp-lg is not defined, so the responsive rail cannot know its breakpoint and stays in desktop layout. Include the DS global styles (@use "…/styles/ds") — or, à la carte, the partial that emits the breakpoint vars.');
|
|
791
|
+
}
|
|
792
|
+
return;
|
|
793
|
+
}
|
|
794
|
+
const desktop = window.matchMedia(`(width >= ${lg})`);
|
|
795
|
+
const sync = () => {
|
|
796
|
+
this.compact.set(!desktop.matches);
|
|
797
|
+
// Crossing UP drops the overlay state: leaving it set would re-open the
|
|
798
|
+
// rail unprompted the next time the viewport narrows.
|
|
799
|
+
if (desktop.matches) {
|
|
800
|
+
this.closeRail();
|
|
801
|
+
}
|
|
802
|
+
};
|
|
803
|
+
sync();
|
|
804
|
+
desktop.addEventListener('change', sync);
|
|
805
|
+
this.destroyRef.onDestroy(() => desktop.removeEventListener('change', sync));
|
|
648
806
|
}
|
|
649
807
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: AppLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
650
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: AppLayoutComponent, isStandalone: true, selector: "ds-app-layout", inputs: { topbarSpan: { classPropertyName: "topbarSpan", publicName: "topbarSpan", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.app-layout": "true", "class.topbar-full": "topbarSpan() === 'full'" } }, providers: [LayoutScrollService], viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, isSignal: true }], ngImport: i0, template: "<div
|
|
808
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: AppLayoutComponent, isStandalone: true, selector: "ds-app-layout", inputs: { topbarSpan: { classPropertyName: "topbarSpan", publicName: "topbarSpan", isSignal: true, isRequired: false, transformFunction: null }, railOpen: { classPropertyName: "railOpen", publicName: "railOpen", isSignal: true, isRequired: false, transformFunction: null }, railLabel: { classPropertyName: "railLabel", publicName: "railLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { railOpen: "railOpenChange" }, host: { listeners: { "document:keydown.escape": "closeRail()" }, properties: { "class.app-layout": "true", "class.topbar-full": "topbarSpan() === 'full'", "class.rail-open": "railOpen()" } }, providers: [LayoutScrollService], viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- scrim; click dismisses, keyboard dismisses via Escape (host document:keydown.escape) -->\n<div\n class=\"scrim\"\n (click)=\"closeRail()\"\n>\n</div>\n\n<div\n class=\"rail\"\n [attr.role]=\"compact() ? 'dialog' : null\"\n [attr.aria-modal]=\"compact() ? 'true' : null\"\n [attr.aria-label]=\"compact() ? railLabel() : null\"\n [cdkTrapFocus]=\"compact() && railOpen()\"\n [cdkTrapFocusAutoCapture]=\"compact() && railOpen()\"\n>\n <ng-content select=\"[sidenav]\"></ng-content>\n</div>\n\n<div class=\"bar\">\n <ng-content select=\"[topbar]\"></ng-content>\n</div>\n\n<main\n #content\n class=\"content\"\n>\n <div class=\"inner\">\n <ng-content></ng-content>\n </div>\n</main>\n", styles: [":host{--_layout-pad-x: var(--ds-app-layout-pad-x, var(--space-6));--_layout-pad-y: var(--ds-app-layout-pad-y, var(--space-6));--_layout-content-max-width: var(--ds-app-layout-content-max-width, none);--_layout-rail-bg-color: var(--ds-app-layout-rail-bg-color, var(--surface-overlay));--_layout-rail-shadow: var(--ds-app-layout-rail-shadow, var(--shadow-modal));--_layout-scrim-color: var(--ds-app-layout-scrim-color, var(--scrim, hsl(220deg 20% 12% / 45%)));display:grid;grid-template-areas:\"sidenav topbar\" \"sidenav content\";grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;height:var(--ds-app-layout-height, 100dvh);overflow:hidden}:host(.topbar-full){grid-template-areas:\"topbar topbar\" \"sidenav content\"}.rail{display:grid;grid-area:sidenav;overflow-y:auto}@media(width<1024px){.rail{position:fixed;z-index:var(--layer-drawer);top:0;bottom:0;left:0;background:var(--_layout-rail-bg-color);box-shadow:var(--_layout-rail-shadow);transform:translate(-100%);transition:transform var(--duration-base) var(--ease-standard)}:host(.rail-open) .rail{transform:translate(0)}}.scrim{display:none}@media(width<1024px){.scrim{display:block;position:fixed;z-index:calc(var(--layer-drawer) - 1);inset:0;background:var(--_layout-scrim-color);opacity:0;transition:opacity var(--duration-base) var(--ease-standard),visibility var(--duration-base) var(--ease-standard);visibility:hidden}:host(.rail-open) .scrim{opacity:1;visibility:visible}}.bar{display:grid;grid-area:topbar}.content{grid-area:content;padding:var(--_layout-pad-y) var(--_layout-pad-x);padding-right:calc(var(--_layout-pad-x) - var(--ds-scrollbar-width, 0px));overflow:auto;scrollbar-gutter:stable}.inner{max-width:var(--_layout-content-max-width);margin-inline:auto}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
651
809
|
}
|
|
652
810
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: AppLayoutComponent, decorators: [{
|
|
653
811
|
type: Component,
|
|
654
|
-
args: [{ selector: 'ds-app-layout', standalone: true, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
812
|
+
args: [{ selector: 'ds-app-layout', standalone: true, imports: [A11yModule], encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
655
813
|
'[class.app-layout]': 'true',
|
|
656
814
|
'[class.topbar-full]': "topbarSpan() === 'full'",
|
|
657
|
-
|
|
658
|
-
|
|
815
|
+
'[class.rail-open]': 'railOpen()',
|
|
816
|
+
'(document:keydown.escape)': 'closeRail()',
|
|
817
|
+
}, providers: [LayoutScrollService], template: "<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- scrim; click dismisses, keyboard dismisses via Escape (host document:keydown.escape) -->\n<div\n class=\"scrim\"\n (click)=\"closeRail()\"\n>\n</div>\n\n<div\n class=\"rail\"\n [attr.role]=\"compact() ? 'dialog' : null\"\n [attr.aria-modal]=\"compact() ? 'true' : null\"\n [attr.aria-label]=\"compact() ? railLabel() : null\"\n [cdkTrapFocus]=\"compact() && railOpen()\"\n [cdkTrapFocusAutoCapture]=\"compact() && railOpen()\"\n>\n <ng-content select=\"[sidenav]\"></ng-content>\n</div>\n\n<div class=\"bar\">\n <ng-content select=\"[topbar]\"></ng-content>\n</div>\n\n<main\n #content\n class=\"content\"\n>\n <div class=\"inner\">\n <ng-content></ng-content>\n </div>\n</main>\n", styles: [":host{--_layout-pad-x: var(--ds-app-layout-pad-x, var(--space-6));--_layout-pad-y: var(--ds-app-layout-pad-y, var(--space-6));--_layout-content-max-width: var(--ds-app-layout-content-max-width, none);--_layout-rail-bg-color: var(--ds-app-layout-rail-bg-color, var(--surface-overlay));--_layout-rail-shadow: var(--ds-app-layout-rail-shadow, var(--shadow-modal));--_layout-scrim-color: var(--ds-app-layout-scrim-color, var(--scrim, hsl(220deg 20% 12% / 45%)));display:grid;grid-template-areas:\"sidenav topbar\" \"sidenav content\";grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;height:var(--ds-app-layout-height, 100dvh);overflow:hidden}:host(.topbar-full){grid-template-areas:\"topbar topbar\" \"sidenav content\"}.rail{display:grid;grid-area:sidenav;overflow-y:auto}@media(width<1024px){.rail{position:fixed;z-index:var(--layer-drawer);top:0;bottom:0;left:0;background:var(--_layout-rail-bg-color);box-shadow:var(--_layout-rail-shadow);transform:translate(-100%);transition:transform var(--duration-base) var(--ease-standard)}:host(.rail-open) .rail{transform:translate(0)}}.scrim{display:none}@media(width<1024px){.scrim{display:block;position:fixed;z-index:calc(var(--layer-drawer) - 1);inset:0;background:var(--_layout-scrim-color);opacity:0;transition:opacity var(--duration-base) var(--ease-standard),visibility var(--duration-base) var(--ease-standard);visibility:hidden}:host(.rail-open) .scrim{opacity:1;visibility:visible}}.bar{display:grid;grid-area:topbar}.content{grid-area:content;padding:var(--_layout-pad-y) var(--_layout-pad-x);padding-right:calc(var(--_layout-pad-x) - var(--ds-scrollbar-width, 0px));overflow:auto;scrollbar-gutter:stable}.inner{max-width:var(--_layout-content-max-width);margin-inline:auto}\n"] }]
|
|
818
|
+
}], ctorParameters: () => [], propDecorators: { topbarSpan: [{ type: i0.Input, args: [{ isSignal: true, alias: "topbarSpan", required: false }] }], railOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "railOpen", required: false }] }, { type: i0.Output, args: ["railOpenChange"] }], railLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "railLabel", required: false }] }], content: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }] } });
|
|
659
819
|
|
|
660
820
|
/** Deterministic `{ bg, fg }` tint for a seed string (an email, a name), so the
|
|
661
821
|
* same person always gets the same colour. The background is an OKLCH colour
|
|
@@ -915,7 +1075,7 @@ class StatComponent {
|
|
|
915
1075
|
return `${magnitude}${suffix}`;
|
|
916
1076
|
}, ...(ngDevMode ? [{ debugName: "deltaText" }] : /* istanbul ignore next */ []));
|
|
917
1077
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: StatComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
918
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: StatComponent, isStandalone: true, selector: "ds-stat", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, delta: { classPropertyName: "delta", publicName: "delta", isSignal: true, isRequired: false, transformFunction: null }, deltaLabel: { classPropertyName: "deltaLabel", publicName: "deltaLabel", isSignal: true, isRequired: false, transformFunction: null }, deltaTone: { classPropertyName: "deltaTone", publicName: "deltaTone", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", 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 } }, host: { properties: { "class.error": "variant() === 'error'", "class.size-sm": "size() === 'sm'", "class.size-lg": "size() === 'lg'" } }, ngImport: i0, template: "<div class=\"stat\">\n <div class=\"label\">\n {{ label() }}\n </div>\n\n <div class=\"value\">\n {{ value() }}{{ unit() }}\n </div>\n\n @if (delta() !== null) {\n <div [class]=\"deltaClasses()\">\n @if (deltaIcon(); as icon) {\n <ds-icon\n [name]=\"icon\"\n [size]=\"12\"\n >\n </ds-icon>\n }\n\n <ng-content select=\"[delta]\">{{ deltaText() }}</ng-content>\n </div>\n } @else if (caption()) {\n <div class=\"caption\">\n {{ caption() }}\n </div>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_stat-bg-color: var(--ds-stat-bg-color, var(--surface-default));--_stat-border: var(--ds-stat-border, var(--border-divider));--_stat-radius: var(--ds-stat-radius, var(--radius-lg));--_stat-pad: var(--ds-stat-pad, var(--ds-container-pad));--_stat-label-color: var(--ds-stat-label-color, var(--text-tertiary));--_stat-value-color: var(--ds-stat-value-color, var(--text-primary));--_stat-up-color: var(--ds-stat-up-color, var(--success-text));--_stat-down-color: var(--ds-stat-down-color, var(--error-text));display:block}:host(.error) .value{color:var(--error-text)}:host(.size-sm) .stat .label{font-size:var(--font-size-2xs);letter-spacing:var(--letter-spacing-wide)}:host(.size-sm) .stat .value{font-size:var(--font-size-h4)}:host(.size-lg) .stat .label{font-size:var(--font-size-s)}:host(.size-lg) .stat .value{font-size:var(--font-size-h1)}.stat{background-color:var(--_stat-bg-color);border:var(--border-width-default) solid var(--_stat-border);border-radius:var(--_stat-radius);padding:var(--_stat-pad)}.stat .label{font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);letter-spacing:var(--letter-spacing-wider);text-transform:uppercase;color:var(--_stat-label-color);margin:0 0 var(--space-2)}.stat .value{font:var(--font-weight-extrabold) var(--font-size-h2)/var(--line-height-flat) var(--font-sans);letter-spacing:var(--letter-spacing-snug);color:var(--_stat-value-color);margin:0;white-space:nowrap}.stat .delta{display:inline-flex;align-items:center;gap:var(--space-1);font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);margin-top:var(--space-2)}.stat .delta.up{color:var(--_stat-up-color)}.stat .delta.down{color:var(--_stat-down-color)}.stat .delta.neutral{color:var(--text-tertiary)}.stat .delta.secondary{color:var(--secondary-strong)}.stat .caption{font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-tertiary);margin-top:var(--space-2)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
|
|
1078
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: StatComponent, isStandalone: true, selector: "ds-stat", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, delta: { classPropertyName: "delta", publicName: "delta", isSignal: true, isRequired: false, transformFunction: null }, deltaLabel: { classPropertyName: "deltaLabel", publicName: "deltaLabel", isSignal: true, isRequired: false, transformFunction: null }, deltaTone: { classPropertyName: "deltaTone", publicName: "deltaTone", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", 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 } }, host: { properties: { "class.error": "variant() === 'error'", "class.size-sm": "size() === 'sm'", "class.size-lg": "size() === 'lg'" } }, ngImport: i0, template: "<div class=\"stat\">\n <div class=\"label\">\n {{ label() }}\n </div>\n\n <div class=\"value\">\n {{ value() }}{{ unit() }}\n </div>\n\n @if (delta() !== null) {\n <div [class]=\"deltaClasses()\">\n @if (deltaIcon(); as icon) {\n <ds-icon\n [name]=\"icon\"\n [size]=\"12\"\n >\n </ds-icon>\n }\n\n <ng-content select=\"[delta]\">{{ deltaText() }}</ng-content>\n </div>\n } @else if (caption()) {\n <div class=\"caption\">\n {{ caption() }}\n </div>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_stat-bg-color: var(--ds-stat-bg-color, var(--surface-default));--_stat-border: var(--ds-stat-border, var(--border-divider));--_stat-radius: var(--ds-stat-radius, var(--radius-lg));--_stat-pad: var(--ds-stat-pad, var(--ds-container-pad));--_stat-label-color: var(--ds-stat-label-color, var(--text-tertiary));--_stat-value-color: var(--ds-stat-value-color, var(--text-primary));--_stat-up-color: var(--ds-stat-up-color, var(--success-text));--_stat-down-color: var(--ds-stat-down-color, var(--error-text));display:block}:host(.error) .value{color:var(--error-text)}:host(.size-sm) .stat .label{font-size:var(--font-size-2xs);letter-spacing:var(--letter-spacing-wide)}:host(.size-sm) .stat .value{font-size:var(--font-size-h4)}:host(.size-lg) .stat .label{font-size:var(--font-size-s)}:host(.size-lg) .stat .value{font-size:var(--font-size-h1)}.stat{background-color:var(--_stat-bg-color);border:var(--border-width-default) solid var(--_stat-border);border-radius:var(--_stat-radius);padding:var(--_stat-pad);height:100%}.stat .label{font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);letter-spacing:var(--letter-spacing-wider);text-transform:uppercase;color:var(--_stat-label-color);margin:0 0 var(--space-2)}.stat .value{font:var(--font-weight-extrabold) var(--font-size-h2)/var(--line-height-flat) var(--font-sans);letter-spacing:var(--letter-spacing-snug);color:var(--_stat-value-color);margin:0;white-space:nowrap}.stat .delta{display:inline-flex;align-items:center;gap:var(--space-1);font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);margin-top:var(--space-2)}.stat .delta.up{color:var(--_stat-up-color)}.stat .delta.down{color:var(--_stat-down-color)}.stat .delta.neutral{color:var(--text-tertiary)}.stat .delta.secondary{color:var(--secondary-strong)}.stat .caption{font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-tertiary);margin-top:var(--space-2)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
|
|
919
1079
|
}
|
|
920
1080
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: StatComponent, decorators: [{
|
|
921
1081
|
type: Component,
|
|
@@ -923,7 +1083,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
923
1083
|
'[class.error]': "variant() === 'error'",
|
|
924
1084
|
'[class.size-sm]': "size() === 'sm'",
|
|
925
1085
|
'[class.size-lg]': "size() === 'lg'",
|
|
926
|
-
}, template: "<div class=\"stat\">\n <div class=\"label\">\n {{ label() }}\n </div>\n\n <div class=\"value\">\n {{ value() }}{{ unit() }}\n </div>\n\n @if (delta() !== null) {\n <div [class]=\"deltaClasses()\">\n @if (deltaIcon(); as icon) {\n <ds-icon\n [name]=\"icon\"\n [size]=\"12\"\n >\n </ds-icon>\n }\n\n <ng-content select=\"[delta]\">{{ deltaText() }}</ng-content>\n </div>\n } @else if (caption()) {\n <div class=\"caption\">\n {{ caption() }}\n </div>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_stat-bg-color: var(--ds-stat-bg-color, var(--surface-default));--_stat-border: var(--ds-stat-border, var(--border-divider));--_stat-radius: var(--ds-stat-radius, var(--radius-lg));--_stat-pad: var(--ds-stat-pad, var(--ds-container-pad));--_stat-label-color: var(--ds-stat-label-color, var(--text-tertiary));--_stat-value-color: var(--ds-stat-value-color, var(--text-primary));--_stat-up-color: var(--ds-stat-up-color, var(--success-text));--_stat-down-color: var(--ds-stat-down-color, var(--error-text));display:block}:host(.error) .value{color:var(--error-text)}:host(.size-sm) .stat .label{font-size:var(--font-size-2xs);letter-spacing:var(--letter-spacing-wide)}:host(.size-sm) .stat .value{font-size:var(--font-size-h4)}:host(.size-lg) .stat .label{font-size:var(--font-size-s)}:host(.size-lg) .stat .value{font-size:var(--font-size-h1)}.stat{background-color:var(--_stat-bg-color);border:var(--border-width-default) solid var(--_stat-border);border-radius:var(--_stat-radius);padding:var(--_stat-pad)}.stat .label{font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);letter-spacing:var(--letter-spacing-wider);text-transform:uppercase;color:var(--_stat-label-color);margin:0 0 var(--space-2)}.stat .value{font:var(--font-weight-extrabold) var(--font-size-h2)/var(--line-height-flat) var(--font-sans);letter-spacing:var(--letter-spacing-snug);color:var(--_stat-value-color);margin:0;white-space:nowrap}.stat .delta{display:inline-flex;align-items:center;gap:var(--space-1);font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);margin-top:var(--space-2)}.stat .delta.up{color:var(--_stat-up-color)}.stat .delta.down{color:var(--_stat-down-color)}.stat .delta.neutral{color:var(--text-tertiary)}.stat .delta.secondary{color:var(--secondary-strong)}.stat .caption{font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-tertiary);margin-top:var(--space-2)}\n"] }]
|
|
1086
|
+
}, template: "<div class=\"stat\">\n <div class=\"label\">\n {{ label() }}\n </div>\n\n <div class=\"value\">\n {{ value() }}{{ unit() }}\n </div>\n\n @if (delta() !== null) {\n <div [class]=\"deltaClasses()\">\n @if (deltaIcon(); as icon) {\n <ds-icon\n [name]=\"icon\"\n [size]=\"12\"\n >\n </ds-icon>\n }\n\n <ng-content select=\"[delta]\">{{ deltaText() }}</ng-content>\n </div>\n } @else if (caption()) {\n <div class=\"caption\">\n {{ caption() }}\n </div>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_stat-bg-color: var(--ds-stat-bg-color, var(--surface-default));--_stat-border: var(--ds-stat-border, var(--border-divider));--_stat-radius: var(--ds-stat-radius, var(--radius-lg));--_stat-pad: var(--ds-stat-pad, var(--ds-container-pad));--_stat-label-color: var(--ds-stat-label-color, var(--text-tertiary));--_stat-value-color: var(--ds-stat-value-color, var(--text-primary));--_stat-up-color: var(--ds-stat-up-color, var(--success-text));--_stat-down-color: var(--ds-stat-down-color, var(--error-text));display:block}:host(.error) .value{color:var(--error-text)}:host(.size-sm) .stat .label{font-size:var(--font-size-2xs);letter-spacing:var(--letter-spacing-wide)}:host(.size-sm) .stat .value{font-size:var(--font-size-h4)}:host(.size-lg) .stat .label{font-size:var(--font-size-s)}:host(.size-lg) .stat .value{font-size:var(--font-size-h1)}.stat{background-color:var(--_stat-bg-color);border:var(--border-width-default) solid var(--_stat-border);border-radius:var(--_stat-radius);padding:var(--_stat-pad);height:100%}.stat .label{font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);letter-spacing:var(--letter-spacing-wider);text-transform:uppercase;color:var(--_stat-label-color);margin:0 0 var(--space-2)}.stat .value{font:var(--font-weight-extrabold) var(--font-size-h2)/var(--line-height-flat) var(--font-sans);letter-spacing:var(--letter-spacing-snug);color:var(--_stat-value-color);margin:0;white-space:nowrap}.stat .delta{display:inline-flex;align-items:center;gap:var(--space-1);font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);margin-top:var(--space-2)}.stat .delta.up{color:var(--_stat-up-color)}.stat .delta.down{color:var(--_stat-down-color)}.stat .delta.neutral{color:var(--text-tertiary)}.stat .delta.secondary{color:var(--secondary-strong)}.stat .caption{font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-tertiary);margin-top:var(--space-2)}\n"] }]
|
|
927
1087
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], delta: [{ type: i0.Input, args: [{ isSignal: true, alias: "delta", required: false }] }], deltaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "deltaLabel", required: false }] }], deltaTone: [{ type: i0.Input, args: [{ isSignal: true, alias: "deltaTone", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], unit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unit", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
928
1088
|
|
|
929
1089
|
class TabComponent {
|
|
@@ -1302,7 +1462,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
1302
1462
|
}]
|
|
1303
1463
|
}] });
|
|
1304
1464
|
|
|
1465
|
+
/**
|
|
1466
|
+
* Resolve a field's `reserveMessage` against the app-level default.
|
|
1467
|
+
*
|
|
1468
|
+
* Fields declare the input as `boolean | null` with a `null` default so "not set"
|
|
1469
|
+
* stays distinguishable from an explicit `true` — a signal input cannot report
|
|
1470
|
+
* whether it was bound. Precedence: the component input, then
|
|
1471
|
+
* `DS_CONFIG.field.reserveMessage`, then `false`.
|
|
1472
|
+
*
|
|
1473
|
+
* Call from a field initializer (an injection context), e.g.
|
|
1474
|
+
* `protected readonly reserve = resolveReserveMessage(this.reserveMessage);`
|
|
1475
|
+
*/
|
|
1476
|
+
function resolveReserveMessage(reserveMessage) {
|
|
1477
|
+
const config = inject(DS_CONFIG);
|
|
1478
|
+
return computed(() => reserveMessage() ?? config.field?.reserveMessage ?? false);
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1305
1481
|
class InputComponent extends DsControlValueAccessor {
|
|
1482
|
+
control = viewChild('control', ...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
|
|
1306
1483
|
/** Text value, two-way bound. */
|
|
1307
1484
|
value = model('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1308
1485
|
/** Native input type — also affects the default clear button and password toggle. */
|
|
@@ -1314,9 +1491,11 @@ class InputComponent extends DsControlValueAccessor {
|
|
|
1314
1491
|
/** Helper text shown below the field. */
|
|
1315
1492
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
1316
1493
|
/** Reserve the message-row height even when empty, so the field doesn't shift
|
|
1317
|
-
* the layout below it when a hint/error appears.
|
|
1318
|
-
*
|
|
1319
|
-
|
|
1494
|
+
* the layout below it when a hint/error appears. Falls back to
|
|
1495
|
+
* `DS_CONFIG.field.reserveMessage`, then off — opt in per field, or app-wide
|
|
1496
|
+
* for a form that shows validation messages. */
|
|
1497
|
+
reserveMessage = input(null, { ...(ngDevMode ? { debugName: "reserveMessage" } : /* istanbul ignore next */ {}), transform: (value) => (value == null ? null : booleanAttribute(value)) });
|
|
1498
|
+
reserveMessageResolved = resolveReserveMessage(this.reserveMessage);
|
|
1320
1499
|
/** Placeholder shown when empty. */
|
|
1321
1500
|
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
1322
1501
|
/** Disables the field and blocks all interaction. */
|
|
@@ -1426,6 +1605,11 @@ class InputComponent extends DsControlValueAccessor {
|
|
|
1426
1605
|
}
|
|
1427
1606
|
return parts.join(' ');
|
|
1428
1607
|
}, ...(ngDevMode ? [{ debugName: "wrapperClasses" }] : /* istanbul ignore next */ []));
|
|
1608
|
+
/** Move keyboard focus to the native input — public so a host can drive it
|
|
1609
|
+
* deliberately, e.g. focusing the first invalid field on a failed submit. */
|
|
1610
|
+
focus(options) {
|
|
1611
|
+
this.control()?.nativeElement.focus(options);
|
|
1612
|
+
}
|
|
1429
1613
|
clear() {
|
|
1430
1614
|
this.value.set('');
|
|
1431
1615
|
}
|
|
@@ -1436,7 +1620,7 @@ class InputComponent extends DsControlValueAccessor {
|
|
|
1436
1620
|
useExisting: forwardRef(() => InputComponent),
|
|
1437
1621
|
multi: true,
|
|
1438
1622
|
},
|
|
1439
|
-
], usesInheritance: true, ngImport: i0, template: "<div [class]=\"wrapperClasses()\">\n @if (label() && !floating()) {\n <label\n class=\"label\"\n [attr.for]=\"uid\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\"\n >\n (optional)\n </span>\n }\n </label>\n }\n\n <div\n class=\"control\"\n dsFieldClickFocus\n >\n @if (floating() && label()) {\n <label\n class=\"floating-label\"\n [attr.for]=\"uid\"\n >\n {{ label() }}\n </label>\n }\n\n <span class=\"addon-slot prefix\">\n <ng-content select=\"[dsInputPrefix]\"></ng-content>\n </span>\n\n <input\n [id]=\"uid\"\n [type]=\"effectiveType()\"\n [attr.name]=\"name()\"\n [attr.min]=\"min()\"\n [attr.max]=\"max()\"\n [attr.step]=\"step()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.autofocus]=\"autofocus() ? '' : null\"\n [attr.placeholder]=\"placeholder() || null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.enterkeyhint]=\"enterKeyHint()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.maxlength]=\"maxLength()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readOnly()\"\n [required]=\"required()\"\n [(ngModel)]=\"value\"\n (blur)=\"blurred.emit(); markTouched()\"\n />\n\n @if (canClear() && value() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"clear-btn\"\n aria-label=\"Clear input\"\n (click)=\"clear()\"\n >\n </button>\n }\n\n @if (showPasswordToggle()) {\n <button\n type=\"button\"\n class=\"password-toggle\"\n tabindex=\"-1\"\n [attr.aria-label]=\"\n passwordVisible() ? 'Hide password' : 'Show password'\n \"\n (click)=\"togglePassword()\"\n >\n <ds-icon\n [name]=\"passwordVisible() ? 'eye-off' : 'eye'\"\n [size]=\"16\"\n />\n </button>\n }\n\n @if (loading()) {\n <ds-spinner size=\"sm\" />\n }\n\n <span class=\"addon-slot suffix\">\n <ng-content select=\"[dsInputSuffix]\"></ng-content>\n </span>\n </div>\n\n @if (\n reserveMessage() ||\n hint() ||\n messageState() !== 'default' ||\n maxLength() !== null\n ) {\n <div class=\"field-footer\">\n <ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessage()\"\n />\n\n @if (maxLength() !== null) {\n <span\n class=\"char-counter\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n [id]=\"counterId()\"\n >\n {{ currentLength() }}/{{ maxLength() }}\n </span>\n }\n </div>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_input-bg-color: var(--ds-input-bg-color, var(--surface-default));--_input-border: var(--ds-input-border, var(--border-default));--_input-border-hover: var(--ds-input-border-hover, var(--border-strong));--_input-border-focus: var(--ds-input-border-focus, var(--accent));--_input-text-color: var(--ds-input-text-color, var(--text-primary));--_input-placeholder: var(--ds-input-placeholder, var(--text-tertiary));--_input-radius: var(--ds-input-radius, var(--radius-md));--_input-pad-x: var(--ds-input-pad-x, var(--field-pad-x));--_input-pad-y: var(--ds-input-pad-y, var(--field-pad-y));--_input-focus-shadow: var(--ds-input-focus-shadow, var(--ds-field-focus-shadow));--_input-focus-shadow-error: var(--ds-input-focus-shadow-error, var(--ds-field-focus-shadow-error));--_input-border-error: var(--ds-input-border-error, var(--error));--_input-bg-color-error: var(--ds-input-bg-color-error, var(--error-subtitle));--_input-border-success: var(--ds-input-border-success, var(--success));--_input-bg-color-disabled: var(--ds-input-bg-color-disabled, var(--surface-disabled));--_input-label-color: var(--ds-input-label-color, var(--text-secondary));--_input-label-fs: var(--ds-input-label-fs, var(--font-size-xs));--_input-label-fw: var(--ds-input-label-fw, var(--font-weight-bold));--_input-fs: var(--ds-input-fs, var(--font-size-s));--_input-clear-color: var(--ds-input-clear-color, var(--text-secondary));display:block}.field{display:flex;flex-direction:column;gap:var(--field-label-gap);width:100%}.field .label{font:var(--_input-label-fw) var(--_input-label-fs)/var(--line-height-base) var(--font-sans);color:var(--_input-label-color);display:flex;align-items:center;gap:var(--space-1)}.field .label .req{color:var(--error);font-weight:var(--font-weight-semibold)}.field .label .optional-marker{color:var(--text-tertiary);font-weight:var(--font-weight-regular)}.field .control{display:flex;align-items:center;gap:var(--space-2);background-color:var(--_input-bg-color);border:var(--border-width-default) solid var(--_input-border);border-radius:var(--_input-radius);padding:var(--_input-pad-y) var(--_input-pad-x);height:var(--hit-cozy);transition:border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.field .control input{flex:1;min-width:0;appearance:none;border:0;outline:0;background:transparent;font:var(--font-weight-regular) var(--_input-fs)/var(--line-height-base) var(--font-sans);color:var(--_input-text-color)}.field .control input::placeholder{color:var(--_input-placeholder)}.field .control input[type=search]::-webkit-search-cancel-button,.field .control input[type=search]::-webkit-search-decoration{display:none;appearance:none}.field .control .clear-btn{display:inline-flex;align-items:center;justify-content:center;width:var(--icon-md);height:var(--icon-md);padding:0;border:0;background-color:var(--_input-clear-color);cursor:pointer;flex-shrink:0;transition:background-color var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard);-webkit-mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M18 6L6 18M6 6l12 12'/></svg>\") center/contain no-repeat;mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M18 6L6 18M6 6l12 12'/></svg>\") center/contain no-repeat}.field .control .clear-btn:hover{background-color:var(--text-primary)}.field .control .clear-btn:focus-visible{outline:none;box-shadow:var(--ds-control-focus-shadow);border-radius:var(--radius-sm)}.field .control .clear-btn:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.field .control .password-toggle{display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--text-tertiary);cursor:pointer;flex-shrink:0;transition:color var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.field .control .password-toggle:hover{color:var(--text-primary)}.field .control .password-toggle:focus-visible{outline:none;box-shadow:var(--ds-control-focus-shadow);border-radius:var(--radius-sm)}.field .control:hover{border-color:var(--_input-border-hover)}.field .control:focus-within{border-color:var(--_input-border-focus);box-shadow:var(--_input-focus-shadow)}.field.disabled .control{background-color:var(--_input-bg-color-disabled);border-color:var(--border-disabled)}.field.disabled input{color:var(--text-disabled)}.field.read-only .control{background:var(--surface-secondary)}.field.read-only .control input{cursor:default}.field.error .control{background-color:var(--_input-bg-color-error);border-color:var(--_input-border-error)}.field.error .control:focus-within{box-shadow:var(--_input-focus-shadow-error)}.field.success .control{border-color:var(--_input-border-success)}.field.sm .control{height:var(--hit-min);padding:0 var(--space-2)}.field.lg .control{height:var(--field-h-lg)}.field .addon-slot{display:inline-flex;align-items:center;align-self:stretch;color:var(--text-tertiary);flex-shrink:0}.field .addon-slot:empty{display:none}.field ::ng-deep .addon{display:inline-flex;align-items:center;padding:0 var(--space-3);margin:calc(var(--field-affix-overlap) * -1);background:var(--surface-secondary);color:var(--text-secondary);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);align-self:stretch;border-right:var(--border-width-default) solid var(--border-divider)}.field ::ng-deep .addon.right{border-right:0;border-left:var(--border-width-default) solid var(--border-divider)}.field:has(.addon-slot.prefix .addon) .control{padding-left:0}.field:has(.addon-slot.suffix .addon) .control{padding-right:0}.field .addon-slot.prefix ::ng-deep .addon{border-top-left-radius:var(--_input-radius);border-bottom-left-radius:var(--_input-radius)}.field .addon-slot.suffix ::ng-deep .addon.right{border-top-right-radius:var(--_input-radius);border-bottom-right-radius:var(--_input-radius)}.field .control ds-spinner{flex-shrink:0}.field .field-footer{display:flex;align-items:baseline;justify-content:space-between;gap:var(--space-2)}.field .char-counter{font-size:var(--font-size-xs);color:var(--text-tertiary);font-variant-numeric:tabular-nums;white-space:nowrap;flex-shrink:0;margin-left:auto}.field.floating .control{height:var(--field-h-floating);padding-top:var(--field-floating-pad-t);padding-bottom:var(--space-1-5);position:relative}.field.floating .floating-label{position:absolute;top:var(--field-floating-label-top);left:var(--_input-pad-x);font:var(--font-weight-bold) var(--field-floating-label-fs)/var(--field-floating-label-lh) var(--font-sans);color:var(--_input-label-color);letter-spacing:var(--letter-spacing-wide);pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { 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: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "component", type: SpinnerComponent, selector: "ds-spinner", inputs: ["size"] }, { kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }, { kind: "directive", type: FieldClickFocusDirective, selector: "[dsFieldClickFocus]" }] });
|
|
1623
|
+
], viewQueries: [{ propertyName: "control", first: true, predicate: ["control"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"wrapperClasses()\">\n @if (label() && !floating()) {\n <label\n class=\"label\"\n [attr.for]=\"uid\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\"\n >\n (optional)\n </span>\n }\n </label>\n }\n\n <div\n class=\"control\"\n dsFieldClickFocus\n >\n @if (floating() && label()) {\n <label\n class=\"floating-label\"\n [attr.for]=\"uid\"\n >\n {{ label() }}\n </label>\n }\n\n <span class=\"addon-slot prefix\">\n <ng-content select=\"[dsInputPrefix]\"></ng-content>\n </span>\n\n <input\n #control\n [id]=\"uid\"\n [type]=\"effectiveType()\"\n [attr.name]=\"name()\"\n [attr.min]=\"min()\"\n [attr.max]=\"max()\"\n [attr.step]=\"step()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.autofocus]=\"autofocus() ? '' : null\"\n [attr.placeholder]=\"placeholder() || null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.enterkeyhint]=\"enterKeyHint()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.maxlength]=\"maxLength()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readOnly()\"\n [required]=\"required()\"\n [(ngModel)]=\"value\"\n (blur)=\"blurred.emit(); markTouched()\"\n />\n\n @if (canClear() && value() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"clear-btn\"\n aria-label=\"Clear input\"\n (click)=\"clear()\"\n >\n </button>\n }\n\n @if (showPasswordToggle()) {\n <button\n type=\"button\"\n class=\"password-toggle\"\n tabindex=\"-1\"\n [attr.aria-label]=\"\n passwordVisible() ? 'Hide password' : 'Show password'\n \"\n (click)=\"togglePassword()\"\n >\n <ds-icon\n [name]=\"passwordVisible() ? 'eye-off' : 'eye'\"\n [size]=\"16\"\n />\n </button>\n }\n\n @if (loading()) {\n <ds-spinner size=\"sm\" />\n }\n\n <span class=\"addon-slot suffix\">\n <ng-content select=\"[dsInputSuffix]\"></ng-content>\n </span>\n </div>\n\n @if (\n reserveMessageResolved() ||\n hint() ||\n messageState() !== 'default' ||\n maxLength() !== null\n ) {\n <div class=\"field-footer\">\n <ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n />\n\n @if (maxLength() !== null) {\n <span\n class=\"char-counter\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n [id]=\"counterId()\"\n >\n {{ currentLength() }}/{{ maxLength() }}\n </span>\n }\n </div>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_input-bg-color: var(--ds-input-bg-color, var(--surface-default));--_input-border: var(--ds-input-border, var(--border-default));--_input-border-hover: var(--ds-input-border-hover, var(--border-strong));--_input-border-focus: var(--ds-input-border-focus, var(--accent));--_input-text-color: var(--ds-input-text-color, var(--text-primary));--_input-placeholder: var(--ds-input-placeholder, var(--text-tertiary));--_input-radius: var(--ds-input-radius, var(--radius-md));--_input-pad-x: var(--ds-input-pad-x, var(--field-pad-x));--_input-pad-y: var(--ds-input-pad-y, var(--field-pad-y));--_input-focus-shadow: var(--ds-input-focus-shadow, var(--ds-field-focus-shadow));--_input-focus-shadow-error: var(--ds-input-focus-shadow-error, var(--ds-field-focus-shadow-error));--_input-border-error: var(--ds-input-border-error, var(--error));--_input-bg-color-error: var(--ds-input-bg-color-error, var(--error-subtitle));--_input-border-success: var(--ds-input-border-success, var(--success));--_input-bg-color-disabled: var(--ds-input-bg-color-disabled, var(--surface-disabled));--_input-label-color: var(--ds-input-label-color, var(--text-secondary));--_input-label-fs: var(--ds-input-label-fs, var(--font-size-xs));--_input-label-fw: var(--ds-input-label-fw, var(--font-weight-bold));--_input-fs: var(--ds-input-fs, var(--font-size-s));--_input-clear-color: var(--ds-input-clear-color, var(--text-secondary));display:block}.field{display:flex;flex-direction:column;gap:var(--field-label-gap);width:100%}.field .label{font:var(--_input-label-fw) var(--_input-label-fs)/var(--line-height-base) var(--font-sans);color:var(--_input-label-color);display:flex;align-items:center;gap:var(--space-1)}.field .label .req{color:var(--error);font-weight:var(--font-weight-semibold)}.field .label .optional-marker{color:var(--text-tertiary);font-weight:var(--font-weight-regular)}.field .control{display:flex;align-items:center;gap:var(--space-2);background-color:var(--_input-bg-color);border:var(--border-width-default) solid var(--_input-border);border-radius:var(--_input-radius);padding:var(--_input-pad-y) var(--_input-pad-x);height:var(--hit-cozy);transition:border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.field .control input{flex:1;min-width:0;appearance:none;border:0;outline:0;background:transparent;font:var(--font-weight-regular) var(--_input-fs)/var(--line-height-base) var(--font-sans);color:var(--_input-text-color)}.field .control input::placeholder{color:var(--_input-placeholder)}.field .control input[type=search]::-webkit-search-cancel-button,.field .control input[type=search]::-webkit-search-decoration{display:none;appearance:none}.field .control .clear-btn{display:inline-flex;align-items:center;justify-content:center;width:var(--icon-md);height:var(--icon-md);padding:0;border:0;background-color:var(--_input-clear-color);cursor:pointer;flex-shrink:0;transition:background-color var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard);-webkit-mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M18 6L6 18M6 6l12 12'/></svg>\") center/contain no-repeat;mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M18 6L6 18M6 6l12 12'/></svg>\") center/contain no-repeat}.field .control .clear-btn:hover{background-color:var(--text-primary)}.field .control .clear-btn:focus-visible{outline:none;box-shadow:var(--ds-control-focus-shadow);border-radius:var(--radius-sm)}.field .control .clear-btn:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.field .control .password-toggle{display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--text-tertiary);cursor:pointer;flex-shrink:0;transition:color var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.field .control .password-toggle:hover{color:var(--text-primary)}.field .control .password-toggle:focus-visible{outline:none;box-shadow:var(--ds-control-focus-shadow);border-radius:var(--radius-sm)}.field .control:hover{border-color:var(--_input-border-hover)}.field .control:focus-within{border-color:var(--_input-border-focus);box-shadow:var(--_input-focus-shadow)}.field.disabled .control{background-color:var(--_input-bg-color-disabled);border-color:var(--border-disabled)}.field.disabled input{color:var(--text-disabled)}.field.read-only .control{background:var(--surface-secondary)}.field.read-only .control input{cursor:default}.field.error .control{background-color:var(--_input-bg-color-error);border-color:var(--_input-border-error)}.field.error .control:focus-within{box-shadow:var(--_input-focus-shadow-error)}.field.success .control{border-color:var(--_input-border-success)}.field.sm .control{height:var(--hit-min);padding:0 var(--space-2)}.field.lg .control{height:var(--field-h-lg)}.field .addon-slot{display:inline-flex;align-items:center;align-self:stretch;color:var(--text-tertiary);flex-shrink:0}.field .addon-slot:empty{display:none}.field ::ng-deep .addon{display:inline-flex;align-items:center;padding:0 var(--space-3);margin:calc(var(--field-affix-overlap) * -1);background:var(--surface-secondary);color:var(--text-secondary);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);align-self:stretch;border-right:var(--border-width-default) solid var(--border-divider)}.field ::ng-deep .addon.right{border-right:0;border-left:var(--border-width-default) solid var(--border-divider)}.field:has(.addon-slot.prefix .addon) .control{padding-left:0}.field:has(.addon-slot.suffix .addon) .control{padding-right:0}.field .addon-slot.prefix ::ng-deep .addon{border-top-left-radius:var(--_input-radius);border-bottom-left-radius:var(--_input-radius)}.field .addon-slot.suffix ::ng-deep .addon.right{border-top-right-radius:var(--_input-radius);border-bottom-right-radius:var(--_input-radius)}.field .control ds-spinner{flex-shrink:0}.field .field-footer{display:flex;align-items:baseline;justify-content:space-between;gap:var(--space-2)}.field .char-counter{font-size:var(--font-size-xs);color:var(--text-tertiary);font-variant-numeric:tabular-nums;white-space:nowrap;flex-shrink:0;margin-left:auto}.field.floating .control{height:var(--field-h-floating);padding-top:var(--field-floating-pad-t);padding-bottom:var(--space-1-5);position:relative}.field.floating .floating-label{position:absolute;top:var(--field-floating-label-top);left:var(--_input-pad-x);font:var(--font-weight-bold) var(--field-floating-label-fs)/var(--field-floating-label-lh) var(--font-sans);color:var(--_input-label-color);letter-spacing:var(--letter-spacing-wide);pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "component", type: SpinnerComponent, selector: "ds-spinner", inputs: ["size"] }, { kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }, { kind: "directive", type: FieldClickFocusDirective, selector: "[dsFieldClickFocus]" }] });
|
|
1440
1624
|
}
|
|
1441
1625
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: InputComponent, decorators: [{
|
|
1442
1626
|
type: Component,
|
|
@@ -1452,8 +1636,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
1452
1636
|
useExisting: forwardRef(() => InputComponent),
|
|
1453
1637
|
multi: true,
|
|
1454
1638
|
},
|
|
1455
|
-
], template: "<div [class]=\"wrapperClasses()\">\n @if (label() && !floating()) {\n <label\n class=\"label\"\n [attr.for]=\"uid\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\"\n >\n (optional)\n </span>\n }\n </label>\n }\n\n <div\n class=\"control\"\n dsFieldClickFocus\n >\n @if (floating() && label()) {\n <label\n class=\"floating-label\"\n [attr.for]=\"uid\"\n >\n {{ label() }}\n </label>\n }\n\n <span class=\"addon-slot prefix\">\n <ng-content select=\"[dsInputPrefix]\"></ng-content>\n </span>\n\n <input\n [id]=\"uid\"\n [type]=\"effectiveType()\"\n [attr.name]=\"name()\"\n [attr.min]=\"min()\"\n [attr.max]=\"max()\"\n [attr.step]=\"step()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.autofocus]=\"autofocus() ? '' : null\"\n [attr.placeholder]=\"placeholder() || null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.enterkeyhint]=\"enterKeyHint()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.maxlength]=\"maxLength()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readOnly()\"\n [required]=\"required()\"\n [(ngModel)]=\"value\"\n (blur)=\"blurred.emit(); markTouched()\"\n />\n\n @if (canClear() && value() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"clear-btn\"\n aria-label=\"Clear input\"\n (click)=\"clear()\"\n >\n </button>\n }\n\n @if (showPasswordToggle()) {\n <button\n type=\"button\"\n class=\"password-toggle\"\n tabindex=\"-1\"\n [attr.aria-label]=\"\n passwordVisible() ? 'Hide password' : 'Show password'\n \"\n (click)=\"togglePassword()\"\n >\n <ds-icon\n [name]=\"passwordVisible() ? 'eye-off' : 'eye'\"\n [size]=\"16\"\n />\n </button>\n }\n\n @if (loading()) {\n <ds-spinner size=\"sm\" />\n }\n\n <span class=\"addon-slot suffix\">\n <ng-content select=\"[dsInputSuffix]\"></ng-content>\n </span>\n </div>\n\n @if (\n reserveMessage() ||\n hint() ||\n messageState() !== 'default' ||\n maxLength() !== null\n ) {\n <div class=\"field-footer\">\n <ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessage()\"\n />\n\n @if (maxLength() !== null) {\n <span\n class=\"char-counter\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n [id]=\"counterId()\"\n >\n {{ currentLength() }}/{{ maxLength() }}\n </span>\n }\n </div>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_input-bg-color: var(--ds-input-bg-color, var(--surface-default));--_input-border: var(--ds-input-border, var(--border-default));--_input-border-hover: var(--ds-input-border-hover, var(--border-strong));--_input-border-focus: var(--ds-input-border-focus, var(--accent));--_input-text-color: var(--ds-input-text-color, var(--text-primary));--_input-placeholder: var(--ds-input-placeholder, var(--text-tertiary));--_input-radius: var(--ds-input-radius, var(--radius-md));--_input-pad-x: var(--ds-input-pad-x, var(--field-pad-x));--_input-pad-y: var(--ds-input-pad-y, var(--field-pad-y));--_input-focus-shadow: var(--ds-input-focus-shadow, var(--ds-field-focus-shadow));--_input-focus-shadow-error: var(--ds-input-focus-shadow-error, var(--ds-field-focus-shadow-error));--_input-border-error: var(--ds-input-border-error, var(--error));--_input-bg-color-error: var(--ds-input-bg-color-error, var(--error-subtitle));--_input-border-success: var(--ds-input-border-success, var(--success));--_input-bg-color-disabled: var(--ds-input-bg-color-disabled, var(--surface-disabled));--_input-label-color: var(--ds-input-label-color, var(--text-secondary));--_input-label-fs: var(--ds-input-label-fs, var(--font-size-xs));--_input-label-fw: var(--ds-input-label-fw, var(--font-weight-bold));--_input-fs: var(--ds-input-fs, var(--font-size-s));--_input-clear-color: var(--ds-input-clear-color, var(--text-secondary));display:block}.field{display:flex;flex-direction:column;gap:var(--field-label-gap);width:100%}.field .label{font:var(--_input-label-fw) var(--_input-label-fs)/var(--line-height-base) var(--font-sans);color:var(--_input-label-color);display:flex;align-items:center;gap:var(--space-1)}.field .label .req{color:var(--error);font-weight:var(--font-weight-semibold)}.field .label .optional-marker{color:var(--text-tertiary);font-weight:var(--font-weight-regular)}.field .control{display:flex;align-items:center;gap:var(--space-2);background-color:var(--_input-bg-color);border:var(--border-width-default) solid var(--_input-border);border-radius:var(--_input-radius);padding:var(--_input-pad-y) var(--_input-pad-x);height:var(--hit-cozy);transition:border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.field .control input{flex:1;min-width:0;appearance:none;border:0;outline:0;background:transparent;font:var(--font-weight-regular) var(--_input-fs)/var(--line-height-base) var(--font-sans);color:var(--_input-text-color)}.field .control input::placeholder{color:var(--_input-placeholder)}.field .control input[type=search]::-webkit-search-cancel-button,.field .control input[type=search]::-webkit-search-decoration{display:none;appearance:none}.field .control .clear-btn{display:inline-flex;align-items:center;justify-content:center;width:var(--icon-md);height:var(--icon-md);padding:0;border:0;background-color:var(--_input-clear-color);cursor:pointer;flex-shrink:0;transition:background-color var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard);-webkit-mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M18 6L6 18M6 6l12 12'/></svg>\") center/contain no-repeat;mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M18 6L6 18M6 6l12 12'/></svg>\") center/contain no-repeat}.field .control .clear-btn:hover{background-color:var(--text-primary)}.field .control .clear-btn:focus-visible{outline:none;box-shadow:var(--ds-control-focus-shadow);border-radius:var(--radius-sm)}.field .control .clear-btn:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.field .control .password-toggle{display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--text-tertiary);cursor:pointer;flex-shrink:0;transition:color var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.field .control .password-toggle:hover{color:var(--text-primary)}.field .control .password-toggle:focus-visible{outline:none;box-shadow:var(--ds-control-focus-shadow);border-radius:var(--radius-sm)}.field .control:hover{border-color:var(--_input-border-hover)}.field .control:focus-within{border-color:var(--_input-border-focus);box-shadow:var(--_input-focus-shadow)}.field.disabled .control{background-color:var(--_input-bg-color-disabled);border-color:var(--border-disabled)}.field.disabled input{color:var(--text-disabled)}.field.read-only .control{background:var(--surface-secondary)}.field.read-only .control input{cursor:default}.field.error .control{background-color:var(--_input-bg-color-error);border-color:var(--_input-border-error)}.field.error .control:focus-within{box-shadow:var(--_input-focus-shadow-error)}.field.success .control{border-color:var(--_input-border-success)}.field.sm .control{height:var(--hit-min);padding:0 var(--space-2)}.field.lg .control{height:var(--field-h-lg)}.field .addon-slot{display:inline-flex;align-items:center;align-self:stretch;color:var(--text-tertiary);flex-shrink:0}.field .addon-slot:empty{display:none}.field ::ng-deep .addon{display:inline-flex;align-items:center;padding:0 var(--space-3);margin:calc(var(--field-affix-overlap) * -1);background:var(--surface-secondary);color:var(--text-secondary);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);align-self:stretch;border-right:var(--border-width-default) solid var(--border-divider)}.field ::ng-deep .addon.right{border-right:0;border-left:var(--border-width-default) solid var(--border-divider)}.field:has(.addon-slot.prefix .addon) .control{padding-left:0}.field:has(.addon-slot.suffix .addon) .control{padding-right:0}.field .addon-slot.prefix ::ng-deep .addon{border-top-left-radius:var(--_input-radius);border-bottom-left-radius:var(--_input-radius)}.field .addon-slot.suffix ::ng-deep .addon.right{border-top-right-radius:var(--_input-radius);border-bottom-right-radius:var(--_input-radius)}.field .control ds-spinner{flex-shrink:0}.field .field-footer{display:flex;align-items:baseline;justify-content:space-between;gap:var(--space-2)}.field .char-counter{font-size:var(--font-size-xs);color:var(--text-tertiary);font-variant-numeric:tabular-nums;white-space:nowrap;flex-shrink:0;margin-left:auto}.field.floating .control{height:var(--field-h-floating);padding-top:var(--field-floating-pad-t);padding-bottom:var(--space-1-5);position:relative}.field.floating .floating-label{position:absolute;top:var(--field-floating-label-top);left:var(--_input-pad-x);font:var(--font-weight-bold) var(--field-floating-label-fs)/var(--field-floating-label-lh) var(--font-sans);color:var(--_input-label-color);letter-spacing:var(--letter-spacing-wide);pointer-events:none}\n"] }]
|
|
1456
|
-
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], reserveMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveMessage", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], success: [{ type: i0.Input, args: [{ isSignal: true, alias: "success", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], floating: [{ type: i0.Input, args: [{ isSignal: true, alias: "floating", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], optional: [{ type: i0.Input, args: [{ isSignal: true, alias: "optional", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], enterKeyHint: [{ type: i0.Input, args: [{ isSignal: true, alias: "enterKeyHint", required: false }] }], inputMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputMode", required: false }] }], blurred: [{ type: i0.Output, args: ["blurred"] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], passwordToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "passwordToggle", required: false }] }], passwordVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "passwordVisible", required: false }] }, { type: i0.Output, args: ["passwordVisibleChange"] }] } });
|
|
1639
|
+
], template: "<div [class]=\"wrapperClasses()\">\n @if (label() && !floating()) {\n <label\n class=\"label\"\n [attr.for]=\"uid\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\"\n >\n (optional)\n </span>\n }\n </label>\n }\n\n <div\n class=\"control\"\n dsFieldClickFocus\n >\n @if (floating() && label()) {\n <label\n class=\"floating-label\"\n [attr.for]=\"uid\"\n >\n {{ label() }}\n </label>\n }\n\n <span class=\"addon-slot prefix\">\n <ng-content select=\"[dsInputPrefix]\"></ng-content>\n </span>\n\n <input\n #control\n [id]=\"uid\"\n [type]=\"effectiveType()\"\n [attr.name]=\"name()\"\n [attr.min]=\"min()\"\n [attr.max]=\"max()\"\n [attr.step]=\"step()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.autofocus]=\"autofocus() ? '' : null\"\n [attr.placeholder]=\"placeholder() || null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.enterkeyhint]=\"enterKeyHint()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.maxlength]=\"maxLength()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readOnly()\"\n [required]=\"required()\"\n [(ngModel)]=\"value\"\n (blur)=\"blurred.emit(); markTouched()\"\n />\n\n @if (canClear() && value() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"clear-btn\"\n aria-label=\"Clear input\"\n (click)=\"clear()\"\n >\n </button>\n }\n\n @if (showPasswordToggle()) {\n <button\n type=\"button\"\n class=\"password-toggle\"\n tabindex=\"-1\"\n [attr.aria-label]=\"\n passwordVisible() ? 'Hide password' : 'Show password'\n \"\n (click)=\"togglePassword()\"\n >\n <ds-icon\n [name]=\"passwordVisible() ? 'eye-off' : 'eye'\"\n [size]=\"16\"\n />\n </button>\n }\n\n @if (loading()) {\n <ds-spinner size=\"sm\" />\n }\n\n <span class=\"addon-slot suffix\">\n <ng-content select=\"[dsInputSuffix]\"></ng-content>\n </span>\n </div>\n\n @if (\n reserveMessageResolved() ||\n hint() ||\n messageState() !== 'default' ||\n maxLength() !== null\n ) {\n <div class=\"field-footer\">\n <ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n />\n\n @if (maxLength() !== null) {\n <span\n class=\"char-counter\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n [id]=\"counterId()\"\n >\n {{ currentLength() }}/{{ maxLength() }}\n </span>\n }\n </div>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_input-bg-color: var(--ds-input-bg-color, var(--surface-default));--_input-border: var(--ds-input-border, var(--border-default));--_input-border-hover: var(--ds-input-border-hover, var(--border-strong));--_input-border-focus: var(--ds-input-border-focus, var(--accent));--_input-text-color: var(--ds-input-text-color, var(--text-primary));--_input-placeholder: var(--ds-input-placeholder, var(--text-tertiary));--_input-radius: var(--ds-input-radius, var(--radius-md));--_input-pad-x: var(--ds-input-pad-x, var(--field-pad-x));--_input-pad-y: var(--ds-input-pad-y, var(--field-pad-y));--_input-focus-shadow: var(--ds-input-focus-shadow, var(--ds-field-focus-shadow));--_input-focus-shadow-error: var(--ds-input-focus-shadow-error, var(--ds-field-focus-shadow-error));--_input-border-error: var(--ds-input-border-error, var(--error));--_input-bg-color-error: var(--ds-input-bg-color-error, var(--error-subtitle));--_input-border-success: var(--ds-input-border-success, var(--success));--_input-bg-color-disabled: var(--ds-input-bg-color-disabled, var(--surface-disabled));--_input-label-color: var(--ds-input-label-color, var(--text-secondary));--_input-label-fs: var(--ds-input-label-fs, var(--font-size-xs));--_input-label-fw: var(--ds-input-label-fw, var(--font-weight-bold));--_input-fs: var(--ds-input-fs, var(--font-size-s));--_input-clear-color: var(--ds-input-clear-color, var(--text-secondary));display:block}.field{display:flex;flex-direction:column;gap:var(--field-label-gap);width:100%}.field .label{font:var(--_input-label-fw) var(--_input-label-fs)/var(--line-height-base) var(--font-sans);color:var(--_input-label-color);display:flex;align-items:center;gap:var(--space-1)}.field .label .req{color:var(--error);font-weight:var(--font-weight-semibold)}.field .label .optional-marker{color:var(--text-tertiary);font-weight:var(--font-weight-regular)}.field .control{display:flex;align-items:center;gap:var(--space-2);background-color:var(--_input-bg-color);border:var(--border-width-default) solid var(--_input-border);border-radius:var(--_input-radius);padding:var(--_input-pad-y) var(--_input-pad-x);height:var(--hit-cozy);transition:border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.field .control input{flex:1;min-width:0;appearance:none;border:0;outline:0;background:transparent;font:var(--font-weight-regular) var(--_input-fs)/var(--line-height-base) var(--font-sans);color:var(--_input-text-color)}.field .control input::placeholder{color:var(--_input-placeholder)}.field .control input[type=search]::-webkit-search-cancel-button,.field .control input[type=search]::-webkit-search-decoration{display:none;appearance:none}.field .control .clear-btn{display:inline-flex;align-items:center;justify-content:center;width:var(--icon-md);height:var(--icon-md);padding:0;border:0;background-color:var(--_input-clear-color);cursor:pointer;flex-shrink:0;transition:background-color var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard);-webkit-mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M18 6L6 18M6 6l12 12'/></svg>\") center/contain no-repeat;mask:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M18 6L6 18M6 6l12 12'/></svg>\") center/contain no-repeat}.field .control .clear-btn:hover{background-color:var(--text-primary)}.field .control .clear-btn:focus-visible{outline:none;box-shadow:var(--ds-control-focus-shadow);border-radius:var(--radius-sm)}.field .control .clear-btn:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.field .control .password-toggle{display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--text-tertiary);cursor:pointer;flex-shrink:0;transition:color var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.field .control .password-toggle:hover{color:var(--text-primary)}.field .control .password-toggle:focus-visible{outline:none;box-shadow:var(--ds-control-focus-shadow);border-radius:var(--radius-sm)}.field .control:hover{border-color:var(--_input-border-hover)}.field .control:focus-within{border-color:var(--_input-border-focus);box-shadow:var(--_input-focus-shadow)}.field.disabled .control{background-color:var(--_input-bg-color-disabled);border-color:var(--border-disabled)}.field.disabled input{color:var(--text-disabled)}.field.read-only .control{background:var(--surface-secondary)}.field.read-only .control input{cursor:default}.field.error .control{background-color:var(--_input-bg-color-error);border-color:var(--_input-border-error)}.field.error .control:focus-within{box-shadow:var(--_input-focus-shadow-error)}.field.success .control{border-color:var(--_input-border-success)}.field.sm .control{height:var(--hit-min);padding:0 var(--space-2)}.field.lg .control{height:var(--field-h-lg)}.field .addon-slot{display:inline-flex;align-items:center;align-self:stretch;color:var(--text-tertiary);flex-shrink:0}.field .addon-slot:empty{display:none}.field ::ng-deep .addon{display:inline-flex;align-items:center;padding:0 var(--space-3);margin:calc(var(--field-affix-overlap) * -1);background:var(--surface-secondary);color:var(--text-secondary);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);align-self:stretch;border-right:var(--border-width-default) solid var(--border-divider)}.field ::ng-deep .addon.right{border-right:0;border-left:var(--border-width-default) solid var(--border-divider)}.field:has(.addon-slot.prefix .addon) .control{padding-left:0}.field:has(.addon-slot.suffix .addon) .control{padding-right:0}.field .addon-slot.prefix ::ng-deep .addon{border-top-left-radius:var(--_input-radius);border-bottom-left-radius:var(--_input-radius)}.field .addon-slot.suffix ::ng-deep .addon.right{border-top-right-radius:var(--_input-radius);border-bottom-right-radius:var(--_input-radius)}.field .control ds-spinner{flex-shrink:0}.field .field-footer{display:flex;align-items:baseline;justify-content:space-between;gap:var(--space-2)}.field .char-counter{font-size:var(--font-size-xs);color:var(--text-tertiary);font-variant-numeric:tabular-nums;white-space:nowrap;flex-shrink:0;margin-left:auto}.field.floating .control{height:var(--field-h-floating);padding-top:var(--field-floating-pad-t);padding-bottom:var(--space-1-5);position:relative}.field.floating .floating-label{position:absolute;top:var(--field-floating-label-top);left:var(--_input-pad-x);font:var(--font-weight-bold) var(--field-floating-label-fs)/var(--field-floating-label-lh) var(--font-sans);color:var(--_input-label-color);letter-spacing:var(--letter-spacing-wide);pointer-events:none}\n"] }]
|
|
1640
|
+
}], propDecorators: { control: [{ type: i0.ViewChild, args: ['control', { isSignal: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], reserveMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveMessage", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], success: [{ type: i0.Input, args: [{ isSignal: true, alias: "success", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], floating: [{ type: i0.Input, args: [{ isSignal: true, alias: "floating", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], optional: [{ type: i0.Input, args: [{ isSignal: true, alias: "optional", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], enterKeyHint: [{ type: i0.Input, args: [{ isSignal: true, alias: "enterKeyHint", required: false }] }], inputMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputMode", required: false }] }], blurred: [{ type: i0.Output, args: ["blurred"] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], passwordToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "passwordToggle", required: false }] }], passwordVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "passwordVisible", required: false }] }, { type: i0.Output, args: ["passwordVisibleChange"] }] } });
|
|
1457
1641
|
|
|
1458
1642
|
class NumberStepperComponent {
|
|
1459
1643
|
/** Current numeric value, two-way bound. */
|
|
@@ -1513,6 +1697,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
1513
1697
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
1514
1698
|
|
|
1515
1699
|
class TextareaComponent extends DsControlValueAccessor {
|
|
1700
|
+
control = viewChild('control', ...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
|
|
1516
1701
|
/** Text value, two-way bound. */
|
|
1517
1702
|
value = model('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1518
1703
|
/** Field height — sm/md/lg. */
|
|
@@ -1522,9 +1707,11 @@ class TextareaComponent extends DsControlValueAccessor {
|
|
|
1522
1707
|
/** Helper text shown below the field. */
|
|
1523
1708
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
1524
1709
|
/** Reserve the message-row height even when empty, so the field doesn't shift
|
|
1525
|
-
* the layout below it when a hint/error appears.
|
|
1526
|
-
*
|
|
1527
|
-
|
|
1710
|
+
* the layout below it when a hint/error appears. Falls back to
|
|
1711
|
+
* `DS_CONFIG.field.reserveMessage`, then off — opt in per field, or app-wide
|
|
1712
|
+
* for a form that shows validation messages. */
|
|
1713
|
+
reserveMessage = input(null, { ...(ngDevMode ? { debugName: "reserveMessage" } : /* istanbul ignore next */ {}), transform: (value) => (value == null ? null : booleanAttribute(value)) });
|
|
1714
|
+
reserveMessageResolved = resolveReserveMessage(this.reserveMessage);
|
|
1528
1715
|
/** Placeholder shown when empty. */
|
|
1529
1716
|
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
1530
1717
|
/** Disables the field and blocks all interaction. */
|
|
@@ -1588,6 +1775,11 @@ class TextareaComponent extends DsControlValueAccessor {
|
|
|
1588
1775
|
autosizeMaxHeight = computed(() => this.autosize() && this.maxRows() ? `${this.maxRows()}lh` : null, ...(ngDevMode ? [{ debugName: "autosizeMaxHeight" }] : /* istanbul ignore next */ []));
|
|
1589
1776
|
// Autosize grows with content, so a manual resize handle conflicts — force none.
|
|
1590
1777
|
effectiveResize = computed(() => this.autosize() ? 'none' : this.resize(), ...(ngDevMode ? [{ debugName: "effectiveResize" }] : /* istanbul ignore next */ []));
|
|
1778
|
+
/** Move keyboard focus to the native textarea — public so a host can drive it
|
|
1779
|
+
* deliberately, e.g. focusing the first invalid field on a failed submit. */
|
|
1780
|
+
focus(options) {
|
|
1781
|
+
this.control()?.nativeElement.focus(options);
|
|
1782
|
+
}
|
|
1591
1783
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1592
1784
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TextareaComponent, isStandalone: true, selector: "ds-textarea", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, reserveMessage: { classPropertyName: "reserveMessage", publicName: "reserveMessage", 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 }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", 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 }, optional: { classPropertyName: "optional", publicName: "optional", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, autosize: { classPropertyName: "autosize", publicName: "autosize", isSignal: true, isRequired: false, transformFunction: null }, minRows: { classPropertyName: "minRows", publicName: "minRows", isSignal: true, isRequired: false, transformFunction: null }, maxRows: { classPropertyName: "maxRows", publicName: "maxRows", isSignal: true, isRequired: false, transformFunction: null }, resize: { classPropertyName: "resize", publicName: "resize", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [
|
|
1593
1785
|
{
|
|
@@ -1595,7 +1787,7 @@ class TextareaComponent extends DsControlValueAccessor {
|
|
|
1595
1787
|
useExisting: forwardRef(() => TextareaComponent),
|
|
1596
1788
|
multi: true,
|
|
1597
1789
|
},
|
|
1598
|
-
], usesInheritance: true, ngImport: i0, template: "<div [class]=\"wrapperClasses()\">\n @if (label()) {\n <label\n class=\"label\"\n [attr.for]=\"uid\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\"\n >\n (optional)\n </span>\n }\n </label>\n }\n\n <div\n class=\"control\"\n dsFieldClickFocus\n >\n <textarea\n [id]=\"uid\"\n [rows]=\"rows()\"\n [attr.name]=\"name()\"\n [attr.placeholder]=\"placeholder() || null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.maxlength]=\"maxLength()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readOnly()\"\n [required]=\"required()\"\n [style.resize]=\"effectiveResize()\"\n [style.min-height]=\"autosizeMinHeight()\"\n [style.max-height]=\"autosizeMaxHeight()\"\n [style.overflow-y]=\"autosize() && maxRows() ? 'auto' : null\"\n [(ngModel)]=\"value\"\n (blur)=\"markTouched()\"\n >\n </textarea>\n </div>\n\n @if (\n
|
|
1790
|
+
], viewQueries: [{ propertyName: "control", first: true, predicate: ["control"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"wrapperClasses()\">\n @if (label()) {\n <label\n class=\"label\"\n [attr.for]=\"uid\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\"\n >\n (optional)\n </span>\n }\n </label>\n }\n\n <div\n class=\"control\"\n dsFieldClickFocus\n >\n <textarea\n #control\n [id]=\"uid\"\n [rows]=\"rows()\"\n [attr.name]=\"name()\"\n [attr.placeholder]=\"placeholder() || null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.maxlength]=\"maxLength()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readOnly()\"\n [required]=\"required()\"\n [style.resize]=\"effectiveResize()\"\n [style.min-height]=\"autosizeMinHeight()\"\n [style.max-height]=\"autosizeMaxHeight()\"\n [style.overflow-y]=\"autosize() && maxRows() ? 'auto' : null\"\n [(ngModel)]=\"value\"\n (blur)=\"markTouched()\"\n >\n </textarea>\n </div>\n\n @if (\n reserveMessageResolved() ||\n hint() ||\n messageState() !== 'default' ||\n maxLength() !== null\n ) {\n <div class=\"field-footer\">\n <ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n />\n\n @if (maxLength() !== null) {\n <span\n class=\"char-counter\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n [id]=\"counterId()\"\n >\n {{ currentLength() }}/{{ maxLength() }}\n </span>\n }\n </div>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_input-bg-color: var(--ds-input-bg-color, var(--surface-default));--_input-border: var(--ds-input-border, var(--border-default));--_input-radius: var(--ds-input-radius, var(--radius-md));--_input-pad-y: var(--ds-input-pad-y, var(--space-3));--_input-pad-x: var(--ds-input-pad-x, var(--field-pad-x));--_input-text-color: var(--ds-input-text-color, var(--text-primary));--_input-placeholder: var(--ds-input-placeholder, var(--text-tertiary));--_input-border-hover: var(--ds-input-border-hover, var(--border-strong));--_input-border-focus: var(--ds-input-border-focus, var(--accent));--_input-focus-shadow: var(--ds-input-focus-shadow, var(--ds-field-focus-shadow));--_input-focus-shadow-error: var(--ds-input-focus-shadow-error, var(--ds-field-focus-shadow-error));--_input-bg-color-disabled: var(--ds-input-bg-color-disabled, var(--surface-disabled));--_input-bg-color-error: var(--ds-input-bg-color-error, var(--error-subtitle));--_input-border-error: var(--ds-input-border-error, var(--error));--_input-border-success: var(--ds-input-border-success, var(--success));display:block}.field{display:flex;flex-direction:column;gap:var(--field-label-gap);width:100%}.field .label{font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-secondary);display:flex;align-items:center;gap:var(--space-1)}.field .label .req{color:var(--error);font-weight:var(--font-weight-semibold)}.field .label .optional-marker{color:var(--text-tertiary);font-weight:var(--font-weight-regular)}.field .control{display:flex;align-items:stretch;gap:var(--space-2);background-color:var(--_input-bg-color);border:var(--border-width-default) solid var(--_input-border);border-radius:var(--_input-radius);padding:0 var(--_input-pad-x);height:auto;transition:border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.field .control textarea{flex:1;min-width:0;appearance:none;border:0;outline:0;background:transparent;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_input-text-color);min-height:var(--field-textarea-rows-min, 60px);padding:var(--_input-pad-y) 0}.field .control textarea::placeholder{color:var(--_input-placeholder)}.field .control:hover{border-color:var(--_input-border-hover)}.field .control:focus-within{border-color:var(--_input-border-focus);box-shadow:var(--_input-focus-shadow)}.field.disabled .control{background-color:var(--_input-bg-color-disabled);border-color:var(--border-disabled)}.field.disabled textarea{color:var(--text-disabled)}.field.read-only .control{background:var(--surface-secondary)}.field.read-only .control textarea{cursor:default}.field.error .control{background-color:var(--_input-bg-color-error);border-color:var(--_input-border-error)}.field.error .control:focus-within{box-shadow:var(--_input-focus-shadow-error)}.field.success .control{border-color:var(--_input-border-success)}.field.sm .control{padding:0 var(--space-2)}.field.sm .control textarea{padding:var(--space-2) 0}.field.lg .control{padding:0 var(--space-3)}.field.lg .control textarea{padding:var(--space-4) 0}.field.autosize .control textarea{field-sizing:content;overflow:hidden}.field .field-footer{display:flex;align-items:baseline;justify-content:space-between;gap:var(--space-2)}.field .char-counter{font-size:var(--font-size-xs);color:var(--text-tertiary);font-variant-numeric:tabular-nums;white-space:nowrap;flex-shrink:0;margin-left:auto}:host .field .control textarea{padding-block:var(--ds-input-pad-y, var(--space-3))}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }, { kind: "directive", type: FieldClickFocusDirective, selector: "[dsFieldClickFocus]" }] });
|
|
1599
1791
|
}
|
|
1600
1792
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TextareaComponent, decorators: [{
|
|
1601
1793
|
type: Component,
|
|
@@ -1605,8 +1797,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
1605
1797
|
useExisting: forwardRef(() => TextareaComponent),
|
|
1606
1798
|
multi: true,
|
|
1607
1799
|
},
|
|
1608
|
-
], template: "<div [class]=\"wrapperClasses()\">\n @if (label()) {\n <label\n class=\"label\"\n [attr.for]=\"uid\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\"\n >\n (optional)\n </span>\n }\n </label>\n }\n\n <div\n class=\"control\"\n dsFieldClickFocus\n >\n <textarea\n [id]=\"uid\"\n [rows]=\"rows()\"\n [attr.name]=\"name()\"\n [attr.placeholder]=\"placeholder() || null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.maxlength]=\"maxLength()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readOnly()\"\n [required]=\"required()\"\n [style.resize]=\"effectiveResize()\"\n [style.min-height]=\"autosizeMinHeight()\"\n [style.max-height]=\"autosizeMaxHeight()\"\n [style.overflow-y]=\"autosize() && maxRows() ? 'auto' : null\"\n [(ngModel)]=\"value\"\n (blur)=\"markTouched()\"\n >\n </textarea>\n </div>\n\n @if (\n
|
|
1609
|
-
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], reserveMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveMessage", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], optional: [{ type: i0.Input, args: [{ isSignal: true, alias: "optional", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], autosize: [{ type: i0.Input, args: [{ isSignal: true, alias: "autosize", required: false }] }], minRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "minRows", required: false }] }], maxRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxRows", required: false }] }], resize: [{ type: i0.Input, args: [{ isSignal: true, alias: "resize", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }] } });
|
|
1800
|
+
], template: "<div [class]=\"wrapperClasses()\">\n @if (label()) {\n <label\n class=\"label\"\n [attr.for]=\"uid\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\"\n >\n (optional)\n </span>\n }\n </label>\n }\n\n <div\n class=\"control\"\n dsFieldClickFocus\n >\n <textarea\n #control\n [id]=\"uid\"\n [rows]=\"rows()\"\n [attr.name]=\"name()\"\n [attr.placeholder]=\"placeholder() || null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.maxlength]=\"maxLength()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readOnly()\"\n [required]=\"required()\"\n [style.resize]=\"effectiveResize()\"\n [style.min-height]=\"autosizeMinHeight()\"\n [style.max-height]=\"autosizeMaxHeight()\"\n [style.overflow-y]=\"autosize() && maxRows() ? 'auto' : null\"\n [(ngModel)]=\"value\"\n (blur)=\"markTouched()\"\n >\n </textarea>\n </div>\n\n @if (\n reserveMessageResolved() ||\n hint() ||\n messageState() !== 'default' ||\n maxLength() !== null\n ) {\n <div class=\"field-footer\">\n <ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n />\n\n @if (maxLength() !== null) {\n <span\n class=\"char-counter\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n [id]=\"counterId()\"\n >\n {{ currentLength() }}/{{ maxLength() }}\n </span>\n }\n </div>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_input-bg-color: var(--ds-input-bg-color, var(--surface-default));--_input-border: var(--ds-input-border, var(--border-default));--_input-radius: var(--ds-input-radius, var(--radius-md));--_input-pad-y: var(--ds-input-pad-y, var(--space-3));--_input-pad-x: var(--ds-input-pad-x, var(--field-pad-x));--_input-text-color: var(--ds-input-text-color, var(--text-primary));--_input-placeholder: var(--ds-input-placeholder, var(--text-tertiary));--_input-border-hover: var(--ds-input-border-hover, var(--border-strong));--_input-border-focus: var(--ds-input-border-focus, var(--accent));--_input-focus-shadow: var(--ds-input-focus-shadow, var(--ds-field-focus-shadow));--_input-focus-shadow-error: var(--ds-input-focus-shadow-error, var(--ds-field-focus-shadow-error));--_input-bg-color-disabled: var(--ds-input-bg-color-disabled, var(--surface-disabled));--_input-bg-color-error: var(--ds-input-bg-color-error, var(--error-subtitle));--_input-border-error: var(--ds-input-border-error, var(--error));--_input-border-success: var(--ds-input-border-success, var(--success));display:block}.field{display:flex;flex-direction:column;gap:var(--field-label-gap);width:100%}.field .label{font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-secondary);display:flex;align-items:center;gap:var(--space-1)}.field .label .req{color:var(--error);font-weight:var(--font-weight-semibold)}.field .label .optional-marker{color:var(--text-tertiary);font-weight:var(--font-weight-regular)}.field .control{display:flex;align-items:stretch;gap:var(--space-2);background-color:var(--_input-bg-color);border:var(--border-width-default) solid var(--_input-border);border-radius:var(--_input-radius);padding:0 var(--_input-pad-x);height:auto;transition:border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.field .control textarea{flex:1;min-width:0;appearance:none;border:0;outline:0;background:transparent;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_input-text-color);min-height:var(--field-textarea-rows-min, 60px);padding:var(--_input-pad-y) 0}.field .control textarea::placeholder{color:var(--_input-placeholder)}.field .control:hover{border-color:var(--_input-border-hover)}.field .control:focus-within{border-color:var(--_input-border-focus);box-shadow:var(--_input-focus-shadow)}.field.disabled .control{background-color:var(--_input-bg-color-disabled);border-color:var(--border-disabled)}.field.disabled textarea{color:var(--text-disabled)}.field.read-only .control{background:var(--surface-secondary)}.field.read-only .control textarea{cursor:default}.field.error .control{background-color:var(--_input-bg-color-error);border-color:var(--_input-border-error)}.field.error .control:focus-within{box-shadow:var(--_input-focus-shadow-error)}.field.success .control{border-color:var(--_input-border-success)}.field.sm .control{padding:0 var(--space-2)}.field.sm .control textarea{padding:var(--space-2) 0}.field.lg .control{padding:0 var(--space-3)}.field.lg .control textarea{padding:var(--space-4) 0}.field.autosize .control textarea{field-sizing:content;overflow:hidden}.field .field-footer{display:flex;align-items:baseline;justify-content:space-between;gap:var(--space-2)}.field .char-counter{font-size:var(--font-size-xs);color:var(--text-tertiary);font-variant-numeric:tabular-nums;white-space:nowrap;flex-shrink:0;margin-left:auto}:host .field .control textarea{padding-block:var(--ds-input-pad-y, var(--space-3))}\n"] }]
|
|
1801
|
+
}], propDecorators: { control: [{ type: i0.ViewChild, args: ['control', { isSignal: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], reserveMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveMessage", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], optional: [{ type: i0.Input, args: [{ isSignal: true, alias: "optional", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], autosize: [{ type: i0.Input, args: [{ isSignal: true, alias: "autosize", required: false }] }], minRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "minRows", required: false }] }], maxRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxRows", required: false }] }], resize: [{ type: i0.Input, args: [{ isSignal: true, alias: "resize", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }] } });
|
|
1610
1802
|
|
|
1611
1803
|
class SearchComponent {
|
|
1612
1804
|
/** Search text, two-way bound. */
|
|
@@ -1627,6 +1819,12 @@ class SearchComponent {
|
|
|
1627
1819
|
/** Fires with the current value on Enter. */
|
|
1628
1820
|
submitted = output();
|
|
1629
1821
|
inputEl = viewChild('searchInput', ...(ngDevMode ? [{ debugName: "inputEl" }] : /* istanbul ignore next */ []));
|
|
1822
|
+
/** Move keyboard focus to the search input. Public so a host can hand focus
|
|
1823
|
+
* over deliberately — e.g. a Clear button that disables itself on activation
|
|
1824
|
+
* would otherwise blur into `<body>` and restart Tab order at the top. */
|
|
1825
|
+
focus(options) {
|
|
1826
|
+
this.inputEl()?.nativeElement.focus(options);
|
|
1827
|
+
}
|
|
1630
1828
|
onSubmit() {
|
|
1631
1829
|
this.submitted.emit(this.value());
|
|
1632
1830
|
}
|
|
@@ -1637,13 +1835,21 @@ class SearchComponent {
|
|
|
1637
1835
|
this.inputEl()?.nativeElement.focus();
|
|
1638
1836
|
}
|
|
1639
1837
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1640
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SearchComponent, isStandalone: true, selector: "ds-search", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, shortcut: { classPropertyName: "shortcut", publicName: "shortcut", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", submitted: "submitted" }, viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"search\"\n dsFieldClickFocus\n [class]=\"size()\"\n>\n @if (showIcon()) {\n <ds-icon\n name=\"search\"\n [size]=\"16\"\n >\n </ds-icon>\n }\n\n <input\n #searchInput\n class=\"search-input\"\n [placeholder]=\"placeholder()\"\n [attr.aria-label]=\"ariaLabel() || placeholder() || null\"\n [(ngModel)]=\"value\"\n (keydown.enter)=\"onSubmit()\"\n />\n\n @if (clearable() && value()) {\n <button\n type=\"button\"\n class=\"search-clear\"\n aria-label=\"Clear search\"\n (click)=\"clear()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n }\n\n @if (shortcut()) {\n <kbd class=\"kbd\">\n {{ shortcut() }}\n </kbd>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_search-height: var(--ds-search-height, var(--search-h));--_search-bg-color: var(--ds-search-bg-color, var(--surface-default));--_search-border: var(--ds-search-border, var(--border-default));--_search-radius: var(--ds-search-radius, var(--radius-md));--_search-border-hover: var(--ds-search-border-hover, var(--border-default));--_search-bg-color-focus: var(--ds-search-bg-color-focus, var(--surface-default));--_search-border-focus: var(--ds-search-border-focus, var(--accent));--_search-focus-shadow: var(--ds-search-focus-shadow, var(--ds-field-focus-shadow));--_search-text-color: var(--ds-search-text-color, var(--text-primary));--_search-placeholder: var(--ds-search-placeholder, var(--text-tertiary));--_search-maxw: var(--ds-search-maxw, none);display:block}.search{display:flex;align-items:center;gap:var(--space-2);background-color:var(--_search-bg-color);border:var(--border-width-default) solid var(--_search-border);border-radius:var(--_search-radius);padding:0 var(--space-3);height:var(--_search-height);width:100%;max-width:var(--_search-maxw);transition:border-color var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.search:hover{border-color:var(--_search-border-hover)}.search:focus-within{background-color:var(--_search-bg-color-focus);border-color:var(--_search-border-focus);box-shadow:var(--_search-focus-shadow)}.search .icon{width:var(--icon-md);height:var(--icon-md);color:var(--icon-default)}.search .search-input{flex:1;min-width:0;border:0;outline:0;background:transparent;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_search-text-color)}.search .search-input::placeholder{color:var(--_search-placeholder)}.search .search-clear{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:var(--space-0-5);border:0;background:transparent;border-radius:var(--radius-pill, 999px);color:var(--icon-default);cursor:pointer;opacity:1;transition:opacity var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.search .search-clear .icon{width:var(--icon-sm);height:var(--icon-sm)}.search .search-clear:hover{opacity:1;background:var(--surface-muted, rgba(0, 0, 0, .06))}.search .search-clear:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.search .kbd{font:var(--font-weight-medium) var(--font-size-2xs)/var(--line-height-flat) var(--font-mono);padding:var(--space-px) var(--space-1-5);background:var(--surface-default);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-sm);color:var(--text-tertiary)}.search.sm{--_search-height: var(--ds-search-height, var(--hit-min))}.search.md{--_search-height: var(--ds-search-height, var(--search-h))}.search.lg{--_search-height: var(--ds-search-height, var(--field-h-lg))}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "directive", type: FieldClickFocusDirective, selector: "[dsFieldClickFocus]" }] });
|
|
1838
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SearchComponent, isStandalone: true, selector: "ds-search", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, shortcut: { classPropertyName: "shortcut", publicName: "shortcut", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", submitted: "submitted" }, viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"search\"\n dsFieldClickFocus\n [class]=\"size()\"\n>\n @if (showIcon()) {\n <ds-icon\n name=\"search\"\n [size]=\"16\"\n >\n </ds-icon>\n }\n\n <input\n #searchInput\n class=\"search-input\"\n [placeholder]=\"placeholder()\"\n [attr.aria-label]=\"ariaLabel() || placeholder() || null\"\n [(ngModel)]=\"value\"\n (keydown.enter)=\"onSubmit()\"\n />\n\n @if (clearable() && value()) {\n <button\n type=\"button\"\n class=\"search-clear\"\n aria-label=\"Clear search\"\n (click)=\"clear()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n }\n\n @if (shortcut()) {\n <kbd class=\"kbd\">\n {{ shortcut() }}\n </kbd>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_search-height: var(--ds-search-height, var(--search-h));--_search-bg-color: var(--ds-search-bg-color, var(--surface-default));--_search-border: var(--ds-search-border, var(--border-default));--_search-radius: var(--ds-search-radius, var(--radius-md));--_search-border-hover: var(--ds-search-border-hover, var(--border-default));--_search-bg-color-focus: var(--ds-search-bg-color-focus, var(--surface-default));--_search-border-focus: var(--ds-search-border-focus, var(--accent));--_search-focus-shadow: var(--ds-search-focus-shadow, var(--ds-field-focus-shadow));--_search-text-color: var(--ds-search-text-color, var(--text-primary));--_search-placeholder: var(--ds-search-placeholder, var(--text-tertiary));--_search-maxw: var(--ds-search-maxw, none);display:block}.search{display:flex;align-items:center;gap:var(--space-2);background-color:var(--_search-bg-color);border:var(--border-width-default) solid var(--_search-border);border-radius:var(--_search-radius);padding:0 var(--space-3);height:var(--_search-height);width:100%;max-width:var(--_search-maxw);transition:border-color var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.search:hover{border-color:var(--_search-border-hover)}.search:focus-within{background-color:var(--_search-bg-color-focus);border-color:var(--_search-border-focus);box-shadow:var(--_search-focus-shadow)}.search .icon{width:var(--icon-md);height:var(--icon-md);color:var(--icon-default)}.search .search-input{flex:1;min-width:0;border:0;outline:0;background:transparent;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_search-text-color)}.search .search-input::placeholder{color:var(--_search-placeholder)}.search .search-clear{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:var(--space-0-5);border:0;background:transparent;border-radius:var(--radius-pill, 999px);color:var(--icon-default);cursor:pointer;opacity:1;transition:opacity var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.search .search-clear .icon{width:var(--icon-sm);height:var(--icon-sm)}.search .search-clear:hover{opacity:1;background:var(--surface-muted, rgba(0, 0, 0, .06))}.search .search-clear:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.search .kbd{font:var(--font-weight-medium) var(--font-size-2xs)/var(--line-height-flat) var(--font-mono);padding:var(--space-px) var(--space-1-5);background:var(--surface-default);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-sm);color:var(--text-tertiary)}.search.sm{--_search-height: var(--ds-search-height, var(--hit-min))}.search.md{--_search-height: var(--ds-search-height, var(--search-h))}.search.lg{--_search-height: var(--ds-search-height, var(--field-h-lg))}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "directive", type: FieldClickFocusDirective, selector: "[dsFieldClickFocus]" }] });
|
|
1641
1839
|
}
|
|
1642
1840
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SearchComponent, decorators: [{
|
|
1643
1841
|
type: Component,
|
|
1644
1842
|
args: [{ selector: 'ds-search', standalone: true, imports: [FormsModule, IconComponent, FieldClickFocusDirective], encapsulation: ViewEncapsulation.Emulated, template: "<div\n class=\"search\"\n dsFieldClickFocus\n [class]=\"size()\"\n>\n @if (showIcon()) {\n <ds-icon\n name=\"search\"\n [size]=\"16\"\n >\n </ds-icon>\n }\n\n <input\n #searchInput\n class=\"search-input\"\n [placeholder]=\"placeholder()\"\n [attr.aria-label]=\"ariaLabel() || placeholder() || null\"\n [(ngModel)]=\"value\"\n (keydown.enter)=\"onSubmit()\"\n />\n\n @if (clearable() && value()) {\n <button\n type=\"button\"\n class=\"search-clear\"\n aria-label=\"Clear search\"\n (click)=\"clear()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n }\n\n @if (shortcut()) {\n <kbd class=\"kbd\">\n {{ shortcut() }}\n </kbd>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_search-height: var(--ds-search-height, var(--search-h));--_search-bg-color: var(--ds-search-bg-color, var(--surface-default));--_search-border: var(--ds-search-border, var(--border-default));--_search-radius: var(--ds-search-radius, var(--radius-md));--_search-border-hover: var(--ds-search-border-hover, var(--border-default));--_search-bg-color-focus: var(--ds-search-bg-color-focus, var(--surface-default));--_search-border-focus: var(--ds-search-border-focus, var(--accent));--_search-focus-shadow: var(--ds-search-focus-shadow, var(--ds-field-focus-shadow));--_search-text-color: var(--ds-search-text-color, var(--text-primary));--_search-placeholder: var(--ds-search-placeholder, var(--text-tertiary));--_search-maxw: var(--ds-search-maxw, none);display:block}.search{display:flex;align-items:center;gap:var(--space-2);background-color:var(--_search-bg-color);border:var(--border-width-default) solid var(--_search-border);border-radius:var(--_search-radius);padding:0 var(--space-3);height:var(--_search-height);width:100%;max-width:var(--_search-maxw);transition:border-color var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.search:hover{border-color:var(--_search-border-hover)}.search:focus-within{background-color:var(--_search-bg-color-focus);border-color:var(--_search-border-focus);box-shadow:var(--_search-focus-shadow)}.search .icon{width:var(--icon-md);height:var(--icon-md);color:var(--icon-default)}.search .search-input{flex:1;min-width:0;border:0;outline:0;background:transparent;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_search-text-color)}.search .search-input::placeholder{color:var(--_search-placeholder)}.search .search-clear{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:var(--space-0-5);border:0;background:transparent;border-radius:var(--radius-pill, 999px);color:var(--icon-default);cursor:pointer;opacity:1;transition:opacity var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.search .search-clear .icon{width:var(--icon-sm);height:var(--icon-sm)}.search .search-clear:hover{opacity:1;background:var(--surface-muted, rgba(0, 0, 0, .06))}.search .search-clear:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.search .kbd{font:var(--font-weight-medium) var(--font-size-2xs)/var(--line-height-flat) var(--font-mono);padding:var(--space-px) var(--space-1-5);background:var(--surface-default);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-sm);color:var(--text-tertiary)}.search.sm{--_search-height: var(--ds-search-height, var(--hit-min))}.search.md{--_search-height: var(--ds-search-height, var(--search-h))}.search.lg{--_search-height: var(--ds-search-height, var(--field-h-lg))}\n"] }]
|
|
1645
1843
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], shortcut: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcut", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], submitted: [{ type: i0.Output, args: ["submitted"] }], inputEl: [{ type: i0.ViewChild, args: ['searchInput', { isSignal: true }] }] } });
|
|
1646
1844
|
|
|
1845
|
+
/** Public enter-motion tokens read by every `ds-overlay-pane`
|
|
1846
|
+
* (styles/_overlay-motion.scss). */
|
|
1847
|
+
const OVERLAY_MOTION_TOKENS = [
|
|
1848
|
+
'--ds-overlay-enter-keyframes',
|
|
1849
|
+
'--ds-overlay-enter-duration',
|
|
1850
|
+
'--ds-overlay-enter-easing',
|
|
1851
|
+
'--ds-overlay-enter-offset',
|
|
1852
|
+
];
|
|
1647
1853
|
/**
|
|
1648
1854
|
* Close a DS overlay panel.
|
|
1649
1855
|
*
|
|
@@ -1690,6 +1896,38 @@ function forwardOverlayTokens(overlayRef, host, tokens) {
|
|
|
1690
1896
|
}
|
|
1691
1897
|
}
|
|
1692
1898
|
}
|
|
1899
|
+
/** Read a CDK connection pair as the panel's placement. `overlayY` is the panel
|
|
1900
|
+
* edge pinned to the trigger, so `top` means the panel hangs BELOW the trigger. */
|
|
1901
|
+
function overlayPlacementOf(overlayY, overlayX) {
|
|
1902
|
+
if (overlayY === 'top') {
|
|
1903
|
+
return 'bottom';
|
|
1904
|
+
}
|
|
1905
|
+
if (overlayY === 'bottom') {
|
|
1906
|
+
return 'top';
|
|
1907
|
+
}
|
|
1908
|
+
if (overlayX === 'start') {
|
|
1909
|
+
return 'right';
|
|
1910
|
+
}
|
|
1911
|
+
return 'left';
|
|
1912
|
+
}
|
|
1913
|
+
/**
|
|
1914
|
+
* Prime a `ds-overlay-pane` for its enter animation: forward the consumer's
|
|
1915
|
+
* `--ds-overlay-enter-*` overrides onto the portaled pane, then stamp the
|
|
1916
|
+
* resolved placement that `_overlay-motion.scss` turns into an enter direction.
|
|
1917
|
+
* Call right after `overlay.create()` — CDK applies the position in
|
|
1918
|
+
* `afterNextRender`, so the stamp still lands before the first painted frame.
|
|
1919
|
+
* Until it does (or with no strategy passed) the CSS default applies: entering
|
|
1920
|
+
* from above, i.e. today's behaviour for a panel below its trigger.
|
|
1921
|
+
*
|
|
1922
|
+
* The subscription needs no teardown — disposing the overlay disposes the
|
|
1923
|
+
* strategy, which completes `positionChanges`.
|
|
1924
|
+
*/
|
|
1925
|
+
function prepareOverlayEnter(overlayRef, host, positionStrategy) {
|
|
1926
|
+
forwardOverlayTokens(overlayRef, host, OVERLAY_MOTION_TOKENS);
|
|
1927
|
+
positionStrategy?.positionChanges.subscribe(({ connectionPair }) => {
|
|
1928
|
+
overlayRef.overlayElement.dataset['dsPlacement'] = overlayPlacementOf(connectionPair.overlayY, connectionPair.overlayX);
|
|
1929
|
+
});
|
|
1930
|
+
}
|
|
1693
1931
|
/** Close a non-modal overlay on a pointer press outside it, EXCEPT when the press
|
|
1694
1932
|
* lands on its trigger — so the trigger stays interactive (caret, re-focus) while
|
|
1695
1933
|
* open. Use with `hasBackdrop: false` so hover/cursor/pointer reach the live page. */
|
|
@@ -1781,9 +2019,11 @@ class SelectComponent extends DsControlValueAccessor {
|
|
|
1781
2019
|
/** Helper text shown below the trigger. */
|
|
1782
2020
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
1783
2021
|
/** Reserve the message-row height even when empty, so the field doesn't shift
|
|
1784
|
-
* the layout below it when a hint/error appears.
|
|
1785
|
-
*
|
|
1786
|
-
|
|
2022
|
+
* the layout below it when a hint/error appears. Falls back to
|
|
2023
|
+
* `DS_CONFIG.field.reserveMessage`, then off — opt in per field, or app-wide
|
|
2024
|
+
* for a form that shows validation messages. */
|
|
2025
|
+
reserveMessage = input(null, { ...(ngDevMode ? { debugName: "reserveMessage" } : /* istanbul ignore next */ {}), transform: (value) => (value == null ? null : booleanAttribute(value)) });
|
|
2026
|
+
reserveMessageResolved = resolveReserveMessage(this.reserveMessage);
|
|
1787
2027
|
/** Marks the field required — shows an asterisk and sets `aria-required`. */
|
|
1788
2028
|
required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1789
2029
|
/** Shows an "(optional)" marker next to the label (ignored when `required`). */
|
|
@@ -1930,6 +2170,7 @@ class SelectComponent extends DsControlValueAccessor {
|
|
|
1930
2170
|
width,
|
|
1931
2171
|
};
|
|
1932
2172
|
this.overlayRef = this.overlay.create(cfg);
|
|
2173
|
+
prepareOverlayEnter(this.overlayRef, this.host.nativeElement, positionStrategy);
|
|
1933
2174
|
closeOnOutsidePointer(this.overlayRef, (target) => this.host.nativeElement.contains(target), () => this.close());
|
|
1934
2175
|
// No backdrop catches a page scroll and CDK's scroll strategies miss a plain
|
|
1935
2176
|
// overflow container, so close on any outside scroll ourselves.
|
|
@@ -2082,7 +2323,7 @@ class SelectComponent extends DsControlValueAccessor {
|
|
|
2082
2323
|
useExisting: forwardRef(() => SelectComponent),
|
|
2083
2324
|
multi: true,
|
|
2084
2325
|
},
|
|
2085
|
-
], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "panelContentTpl", first: true, predicate: ["panelContent"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: DsStaticPreview, inputs: ["staticPreview", "staticPreview"] }], ngImport: i0, template: "@if (label()) {\n <span\n class=\"select-label\"\n [id]=\"labelId\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\"\n >\n (optional)\n </span>\n }\n </span>\n}\n\n<div\n #trigger\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [class]=\"triggerClasses()\"\n [attr.name]=\"name()\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-expanded]=\"open() || preview.staticPreview()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\"\n>\n @if (selectedOption()?.icon) {\n <ds-icon\n class=\"trigger-icon\"\n [name]=\"selectedOption()!.icon!\"\n [size]=\"16\"\n />\n }\n\n <span\n class=\"trigger-text\"\n [class.is-placeholder]=\"!hasValue()\"\n >\n {{ displayLabel() }}\n </span>\n\n @if (clearable() && hasValue() && !isDisabled() && !readOnly()) {\n <button\n type=\"button\"\n class=\"clear-btn\"\n aria-label=\"Clear selection\"\n (click)=\"clearValue($event)\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n />\n </button>\n }\n\n <span class=\"chevron\">\n <ds-icon\n name=\"chevronDown\"\n [size]=\"14\"\n />\n </span>\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessage()\"\n/>\n\n@if (preview.staticPreview()) {\n <div class=\"ds-dropdown-panel\">\n <ng-container [ngTemplateOutlet]=\"panelContentTpl()\" />\n </div>\n}\n\n<ng-template #panel>\n <ng-container [ngTemplateOutlet]=\"panelContentTpl()\" />\n</ng-template>\n\n<ng-template #panelContent>\n <div class=\"dropdown-panel\">\n <ul\n class=\"dropdown-list\"\n role=\"listbox\"\n [id]=\"listboxId\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n >\n @for (item of options(); track item.label; let groupIdx = $index) {\n @if (isOptionGroup(item)) {\n <li\n class=\"optgroup\"\n role=\"group\"\n [attr.aria-label]=\"item.label\"\n >\n <span\n class=\"optgroup-label\"\n [class.is-first]=\"groupIdx === 0\"\n >\n {{ item.label }}\n </span>\n\n <ul\n class=\"optgroup-list\"\n role=\"presentation\"\n >\n @for (opt of item.options; track opt.value) {\n <li role=\"presentation\">\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"option\"\n [id]=\"optionId(flatIndexOf(opt))\"\n [attr.aria-selected]=\"isSelected(opt)\"\n [attr.aria-disabled]=\"\n isOptionDisabled(opt, item.disabled) ? 'true' : null\n \"\n [class.is-selected]=\"isSelected(opt)\"\n [class.is-active]=\"isActive(flatIndexOf(opt))\"\n [class.is-disabled]=\"isOptionDisabled(opt, item.disabled)\"\n [disabled]=\"isOptionDisabled(opt, item.disabled)\"\n (click)=\"pick(opt, item.disabled)\"\n (mouseenter)=\"activeIndex.set(flatIndexOf(opt))\"\n >\n @if (opt.icon) {\n <ds-icon\n class=\"option-icon\"\n [name]=\"opt.icon\"\n [size]=\"16\"\n />\n }\n\n <span class=\"option-label\">\n {{ opt.label }}\n </span>\n\n @if (isSelected(opt)) {\n <ds-icon\n class=\"option-check\"\n name=\"check\"\n [size]=\"14\"\n />\n }\n </button>\n </li>\n }\n </ul>\n </li>\n } @else {\n <li role=\"presentation\">\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"option\"\n [id]=\"optionId(flatIndexOf(item))\"\n [attr.aria-selected]=\"isSelected(item)\"\n [attr.aria-disabled]=\"item.disabled ? 'true' : null\"\n [class.is-selected]=\"isSelected(item)\"\n [class.is-active]=\"isActive(flatIndexOf(item))\"\n [class.is-disabled]=\"item.disabled\"\n [disabled]=\"item.disabled\"\n (click)=\"pick(item)\"\n (mouseenter)=\"activeIndex.set(flatIndexOf(item))\"\n >\n @if (item.icon) {\n <ds-icon\n class=\"option-icon\"\n [name]=\"item.icon\"\n [size]=\"16\"\n />\n }\n\n <span class=\"option-label\">\n {{ item.label }}\n </span>\n\n @if (isSelected(item)) {\n <ds-icon\n class=\"option-check\"\n name=\"check\"\n [size]=\"14\"\n />\n }\n </button>\n </li>\n }\n }\n </ul>\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{--_select-focus-shadow: var(--ds-select-focus-shadow, var(--ds-field-focus-shadow));--_select-focus-shadow-error: var(--ds-select-focus-shadow-error, var(--ds-field-focus-shadow-error));--_select-bg-color: var(--ds-select-bg-color, var(--surface-default));--_select-border-color: var(--ds-select-border-color, var(--border-default));--_select-text-color: var(--ds-select-text-color, var(--text-primary));--_select-radius: var(--ds-select-radius, var(--radius-md));display:flex;flex-direction:column;gap:var(--field-label-gap);width:100%}.select-label{font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-secondary);display:flex;align-items:center;gap:var(--space-1)}.select-label .req{color:var(--error);font-weight:var(--font-weight-semibold)}.select-label .optional-marker{color:var(--text-tertiary);font-weight:var(--font-weight-regular)}.dropdown{display:flex;align-items:center;gap:var(--space-2);width:100%;background:var(--_select-bg-color);border:var(--border-width-default) solid var(--_select-border-color);border-radius:var(--_select-radius);padding:var(--field-pad-y) var(--field-pad-x);height:var(--hit-cozy);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_select-text-color);text-align:left;cursor:pointer;transition:border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.dropdown .trigger-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown .trigger-text.is-placeholder{color:var(--text-tertiary)}.dropdown .trigger-icon{color:var(--icon-default);flex:0 0 auto}.dropdown .clear-btn{border:0;background:transparent;display:inline-flex;align-items:center;justify-content:center;color:var(--icon-default);border-radius:var(--radius-sm);padding:var(--space-0-5);cursor:pointer;flex:0 0 auto}.dropdown .clear-btn:hover{color:var(--text-primary);background:var(--surface-secondary)}.dropdown .clear-btn:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.dropdown .chevron{display:inline-flex;align-items:center;justify-content:center;color:var(--icon-default);transition:transform var(--duration-fast) var(--ease-standard)}.dropdown:hover:not(:disabled){border-color:var(--border-strong)}.dropdown:focus-visible{outline:none;border-color:var(--accent);box-shadow:var(--_select-focus-shadow)}.dropdown.open{border-color:var(--accent);box-shadow:var(--_select-focus-shadow)}.dropdown.open .chevron{transform:rotate(180deg)}.dropdown.error{background:var(--error-subtitle);border-color:var(--error)}.dropdown.error:focus-visible{box-shadow:var(--_select-focus-shadow-error)}.dropdown.readonly{background:var(--surface-secondary);border-color:var(--border-divider);color:var(--text-secondary);cursor:default}.dropdown.readonly:hover{border-color:var(--border-divider)}.dropdown.readonly .chevron{display:none}.dropdown.disabled,.dropdown:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);color:var(--text-disabled);cursor:not-allowed;opacity:var(--opacity-muted)}.dropdown.disabled .chevron,.dropdown:disabled .chevron{color:var(--icon-muted)}.dropdown.sm{height:var(--hit-min);padding:0 var(--space-2)}.dropdown.lg{height:var(--field-h-lg)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }] });
|
|
2326
|
+
], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "panelContentTpl", first: true, predicate: ["panelContent"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: DsStaticPreview, inputs: ["staticPreview", "staticPreview"] }], ngImport: i0, template: "@if (label()) {\n <span\n class=\"select-label\"\n [id]=\"labelId\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\"\n >\n (optional)\n </span>\n }\n </span>\n}\n\n<div\n #trigger\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [class]=\"triggerClasses()\"\n [attr.name]=\"name()\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-expanded]=\"open() || preview.staticPreview()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\"\n>\n @if (selectedOption()?.icon) {\n <ds-icon\n class=\"trigger-icon\"\n [name]=\"selectedOption()!.icon!\"\n [size]=\"16\"\n />\n }\n\n <span\n class=\"trigger-text\"\n [class.is-placeholder]=\"!hasValue()\"\n >\n {{ displayLabel() }}\n </span>\n\n @if (clearable() && hasValue() && !isDisabled() && !readOnly()) {\n <button\n type=\"button\"\n class=\"clear-btn\"\n aria-label=\"Clear selection\"\n (click)=\"clearValue($event)\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n />\n </button>\n }\n\n <span class=\"chevron\">\n <ds-icon\n name=\"chevronDown\"\n [size]=\"14\"\n />\n </span>\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n/>\n\n@if (preview.staticPreview()) {\n <div class=\"ds-dropdown-panel\">\n <ng-container [ngTemplateOutlet]=\"panelContentTpl()\" />\n </div>\n}\n\n<ng-template #panel>\n <ng-container [ngTemplateOutlet]=\"panelContentTpl()\" />\n</ng-template>\n\n<ng-template #panelContent>\n <div class=\"dropdown-panel\">\n <ul\n class=\"dropdown-list\"\n role=\"listbox\"\n [id]=\"listboxId\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n >\n @for (item of options(); track item.label; let groupIdx = $index) {\n @if (isOptionGroup(item)) {\n <li\n class=\"optgroup\"\n role=\"group\"\n [attr.aria-label]=\"item.label\"\n >\n <span\n class=\"optgroup-label\"\n [class.is-first]=\"groupIdx === 0\"\n >\n {{ item.label }}\n </span>\n\n <ul\n class=\"optgroup-list\"\n role=\"presentation\"\n >\n @for (opt of item.options; track opt.value) {\n <li role=\"presentation\">\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"option\"\n [id]=\"optionId(flatIndexOf(opt))\"\n [attr.aria-selected]=\"isSelected(opt)\"\n [attr.aria-disabled]=\"\n isOptionDisabled(opt, item.disabled) ? 'true' : null\n \"\n [class.is-selected]=\"isSelected(opt)\"\n [class.is-active]=\"isActive(flatIndexOf(opt))\"\n [class.is-disabled]=\"isOptionDisabled(opt, item.disabled)\"\n [disabled]=\"isOptionDisabled(opt, item.disabled)\"\n (click)=\"pick(opt, item.disabled)\"\n (mouseenter)=\"activeIndex.set(flatIndexOf(opt))\"\n >\n @if (opt.icon) {\n <ds-icon\n class=\"option-icon\"\n [name]=\"opt.icon\"\n [size]=\"16\"\n />\n }\n\n <span class=\"option-label\">\n {{ opt.label }}\n </span>\n\n @if (isSelected(opt)) {\n <ds-icon\n class=\"option-check\"\n name=\"check\"\n [size]=\"14\"\n />\n }\n </button>\n </li>\n }\n </ul>\n </li>\n } @else {\n <li role=\"presentation\">\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"option\"\n [id]=\"optionId(flatIndexOf(item))\"\n [attr.aria-selected]=\"isSelected(item)\"\n [attr.aria-disabled]=\"item.disabled ? 'true' : null\"\n [class.is-selected]=\"isSelected(item)\"\n [class.is-active]=\"isActive(flatIndexOf(item))\"\n [class.is-disabled]=\"item.disabled\"\n [disabled]=\"item.disabled\"\n (click)=\"pick(item)\"\n (mouseenter)=\"activeIndex.set(flatIndexOf(item))\"\n >\n @if (item.icon) {\n <ds-icon\n class=\"option-icon\"\n [name]=\"item.icon\"\n [size]=\"16\"\n />\n }\n\n <span class=\"option-label\">\n {{ item.label }}\n </span>\n\n @if (isSelected(item)) {\n <ds-icon\n class=\"option-check\"\n name=\"check\"\n [size]=\"14\"\n />\n }\n </button>\n </li>\n }\n }\n </ul>\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{--_select-focus-shadow: var(--ds-select-focus-shadow, var(--ds-field-focus-shadow));--_select-focus-shadow-error: var(--ds-select-focus-shadow-error, var(--ds-field-focus-shadow-error));--_select-bg-color: var(--ds-select-bg-color, var(--surface-default));--_select-border-color: var(--ds-select-border-color, var(--border-default));--_select-text-color: var(--ds-select-text-color, var(--text-primary));--_select-radius: var(--ds-select-radius, var(--radius-md));display:flex;flex-direction:column;gap:var(--field-label-gap);width:100%}.select-label{font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-secondary);display:flex;align-items:center;gap:var(--space-1)}.select-label .req{color:var(--error);font-weight:var(--font-weight-semibold)}.select-label .optional-marker{color:var(--text-tertiary);font-weight:var(--font-weight-regular)}.dropdown{display:flex;align-items:center;gap:var(--space-2);width:100%;background:var(--_select-bg-color);border:var(--border-width-default) solid var(--_select-border-color);border-radius:var(--_select-radius);padding:var(--field-pad-y) var(--field-pad-x);height:var(--hit-cozy);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_select-text-color);text-align:left;cursor:pointer;transition:border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.dropdown .trigger-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown .trigger-text.is-placeholder{color:var(--text-tertiary)}.dropdown .trigger-icon{color:var(--icon-default);flex:0 0 auto}.dropdown .clear-btn{border:0;background:transparent;display:inline-flex;align-items:center;justify-content:center;color:var(--icon-default);border-radius:var(--radius-sm);padding:var(--space-0-5);cursor:pointer;flex:0 0 auto}.dropdown .clear-btn:hover{color:var(--text-primary);background:var(--surface-secondary)}.dropdown .clear-btn:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.dropdown .chevron{display:inline-flex;align-items:center;justify-content:center;color:var(--icon-default);transition:transform var(--duration-fast) var(--ease-standard)}.dropdown:hover:not(:disabled){border-color:var(--border-strong)}.dropdown:focus-visible{outline:none;border-color:var(--accent);box-shadow:var(--_select-focus-shadow)}.dropdown.open{border-color:var(--accent);box-shadow:var(--_select-focus-shadow)}.dropdown.open .chevron{transform:rotate(180deg)}.dropdown.error{background:var(--error-subtitle);border-color:var(--error)}.dropdown.error:focus-visible{box-shadow:var(--_select-focus-shadow-error)}.dropdown.readonly{background:var(--surface-secondary);border-color:var(--border-divider);color:var(--text-secondary);cursor:default}.dropdown.readonly:hover{border-color:var(--border-divider)}.dropdown.readonly .chevron{display:none}.dropdown.disabled,.dropdown:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);color:var(--text-disabled);cursor:not-allowed;opacity:var(--opacity-muted)}.dropdown.disabled .chevron,.dropdown:disabled .chevron{color:var(--icon-muted)}.dropdown.sm{height:var(--hit-min);padding:0 var(--space-2)}.dropdown.lg{height:var(--field-h-lg)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }] });
|
|
2086
2327
|
}
|
|
2087
2328
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SelectComponent, decorators: [{
|
|
2088
2329
|
type: Component,
|
|
@@ -2092,7 +2333,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
2092
2333
|
useExisting: forwardRef(() => SelectComponent),
|
|
2093
2334
|
multi: true,
|
|
2094
2335
|
},
|
|
2095
|
-
], template: "@if (label()) {\n <span\n class=\"select-label\"\n [id]=\"labelId\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\"\n >\n (optional)\n </span>\n }\n </span>\n}\n\n<div\n #trigger\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [class]=\"triggerClasses()\"\n [attr.name]=\"name()\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-expanded]=\"open() || preview.staticPreview()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\"\n>\n @if (selectedOption()?.icon) {\n <ds-icon\n class=\"trigger-icon\"\n [name]=\"selectedOption()!.icon!\"\n [size]=\"16\"\n />\n }\n\n <span\n class=\"trigger-text\"\n [class.is-placeholder]=\"!hasValue()\"\n >\n {{ displayLabel() }}\n </span>\n\n @if (clearable() && hasValue() && !isDisabled() && !readOnly()) {\n <button\n type=\"button\"\n class=\"clear-btn\"\n aria-label=\"Clear selection\"\n (click)=\"clearValue($event)\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n />\n </button>\n }\n\n <span class=\"chevron\">\n <ds-icon\n name=\"chevronDown\"\n [size]=\"14\"\n />\n </span>\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"
|
|
2336
|
+
], template: "@if (label()) {\n <span\n class=\"select-label\"\n [id]=\"labelId\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\"\n >\n (optional)\n </span>\n }\n </span>\n}\n\n<div\n #trigger\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [class]=\"triggerClasses()\"\n [attr.name]=\"name()\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-expanded]=\"open() || preview.staticPreview()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\"\n>\n @if (selectedOption()?.icon) {\n <ds-icon\n class=\"trigger-icon\"\n [name]=\"selectedOption()!.icon!\"\n [size]=\"16\"\n />\n }\n\n <span\n class=\"trigger-text\"\n [class.is-placeholder]=\"!hasValue()\"\n >\n {{ displayLabel() }}\n </span>\n\n @if (clearable() && hasValue() && !isDisabled() && !readOnly()) {\n <button\n type=\"button\"\n class=\"clear-btn\"\n aria-label=\"Clear selection\"\n (click)=\"clearValue($event)\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n />\n </button>\n }\n\n <span class=\"chevron\">\n <ds-icon\n name=\"chevronDown\"\n [size]=\"14\"\n />\n </span>\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n/>\n\n@if (preview.staticPreview()) {\n <div class=\"ds-dropdown-panel\">\n <ng-container [ngTemplateOutlet]=\"panelContentTpl()\" />\n </div>\n}\n\n<ng-template #panel>\n <ng-container [ngTemplateOutlet]=\"panelContentTpl()\" />\n</ng-template>\n\n<ng-template #panelContent>\n <div class=\"dropdown-panel\">\n <ul\n class=\"dropdown-list\"\n role=\"listbox\"\n [id]=\"listboxId\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n >\n @for (item of options(); track item.label; let groupIdx = $index) {\n @if (isOptionGroup(item)) {\n <li\n class=\"optgroup\"\n role=\"group\"\n [attr.aria-label]=\"item.label\"\n >\n <span\n class=\"optgroup-label\"\n [class.is-first]=\"groupIdx === 0\"\n >\n {{ item.label }}\n </span>\n\n <ul\n class=\"optgroup-list\"\n role=\"presentation\"\n >\n @for (opt of item.options; track opt.value) {\n <li role=\"presentation\">\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"option\"\n [id]=\"optionId(flatIndexOf(opt))\"\n [attr.aria-selected]=\"isSelected(opt)\"\n [attr.aria-disabled]=\"\n isOptionDisabled(opt, item.disabled) ? 'true' : null\n \"\n [class.is-selected]=\"isSelected(opt)\"\n [class.is-active]=\"isActive(flatIndexOf(opt))\"\n [class.is-disabled]=\"isOptionDisabled(opt, item.disabled)\"\n [disabled]=\"isOptionDisabled(opt, item.disabled)\"\n (click)=\"pick(opt, item.disabled)\"\n (mouseenter)=\"activeIndex.set(flatIndexOf(opt))\"\n >\n @if (opt.icon) {\n <ds-icon\n class=\"option-icon\"\n [name]=\"opt.icon\"\n [size]=\"16\"\n />\n }\n\n <span class=\"option-label\">\n {{ opt.label }}\n </span>\n\n @if (isSelected(opt)) {\n <ds-icon\n class=\"option-check\"\n name=\"check\"\n [size]=\"14\"\n />\n }\n </button>\n </li>\n }\n </ul>\n </li>\n } @else {\n <li role=\"presentation\">\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"option\"\n [id]=\"optionId(flatIndexOf(item))\"\n [attr.aria-selected]=\"isSelected(item)\"\n [attr.aria-disabled]=\"item.disabled ? 'true' : null\"\n [class.is-selected]=\"isSelected(item)\"\n [class.is-active]=\"isActive(flatIndexOf(item))\"\n [class.is-disabled]=\"item.disabled\"\n [disabled]=\"item.disabled\"\n (click)=\"pick(item)\"\n (mouseenter)=\"activeIndex.set(flatIndexOf(item))\"\n >\n @if (item.icon) {\n <ds-icon\n class=\"option-icon\"\n [name]=\"item.icon\"\n [size]=\"16\"\n />\n }\n\n <span class=\"option-label\">\n {{ item.label }}\n </span>\n\n @if (isSelected(item)) {\n <ds-icon\n class=\"option-check\"\n name=\"check\"\n [size]=\"14\"\n />\n }\n </button>\n </li>\n }\n }\n </ul>\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{--_select-focus-shadow: var(--ds-select-focus-shadow, var(--ds-field-focus-shadow));--_select-focus-shadow-error: var(--ds-select-focus-shadow-error, var(--ds-field-focus-shadow-error));--_select-bg-color: var(--ds-select-bg-color, var(--surface-default));--_select-border-color: var(--ds-select-border-color, var(--border-default));--_select-text-color: var(--ds-select-text-color, var(--text-primary));--_select-radius: var(--ds-select-radius, var(--radius-md));display:flex;flex-direction:column;gap:var(--field-label-gap);width:100%}.select-label{font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-secondary);display:flex;align-items:center;gap:var(--space-1)}.select-label .req{color:var(--error);font-weight:var(--font-weight-semibold)}.select-label .optional-marker{color:var(--text-tertiary);font-weight:var(--font-weight-regular)}.dropdown{display:flex;align-items:center;gap:var(--space-2);width:100%;background:var(--_select-bg-color);border:var(--border-width-default) solid var(--_select-border-color);border-radius:var(--_select-radius);padding:var(--field-pad-y) var(--field-pad-x);height:var(--hit-cozy);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_select-text-color);text-align:left;cursor:pointer;transition:border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard),background var(--duration-fast) var(--ease-standard)}.dropdown .trigger-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown .trigger-text.is-placeholder{color:var(--text-tertiary)}.dropdown .trigger-icon{color:var(--icon-default);flex:0 0 auto}.dropdown .clear-btn{border:0;background:transparent;display:inline-flex;align-items:center;justify-content:center;color:var(--icon-default);border-radius:var(--radius-sm);padding:var(--space-0-5);cursor:pointer;flex:0 0 auto}.dropdown .clear-btn:hover{color:var(--text-primary);background:var(--surface-secondary)}.dropdown .clear-btn:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.dropdown .chevron{display:inline-flex;align-items:center;justify-content:center;color:var(--icon-default);transition:transform var(--duration-fast) var(--ease-standard)}.dropdown:hover:not(:disabled){border-color:var(--border-strong)}.dropdown:focus-visible{outline:none;border-color:var(--accent);box-shadow:var(--_select-focus-shadow)}.dropdown.open{border-color:var(--accent);box-shadow:var(--_select-focus-shadow)}.dropdown.open .chevron{transform:rotate(180deg)}.dropdown.error{background:var(--error-subtitle);border-color:var(--error)}.dropdown.error:focus-visible{box-shadow:var(--_select-focus-shadow-error)}.dropdown.readonly{background:var(--surface-secondary);border-color:var(--border-divider);color:var(--text-secondary);cursor:default}.dropdown.readonly:hover{border-color:var(--border-divider)}.dropdown.readonly .chevron{display:none}.dropdown.disabled,.dropdown:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);color:var(--text-disabled);cursor:not-allowed;opacity:var(--opacity-muted)}.dropdown.disabled .chevron,.dropdown:disabled .chevron{color:var(--icon-muted)}.dropdown.sm{height:var(--hit-min);padding:0 var(--space-2)}.dropdown.lg{height:var(--field-h-lg)}\n"] }]
|
|
2096
2337
|
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], reserveMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveMessage", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], optional: [{ type: i0.Input, args: [{ isSignal: true, alias: "optional", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], trigger: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], panelTpl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], panelContentTpl: [{ type: i0.ViewChild, args: ['panelContent', { isSignal: true }] }] } });
|
|
2097
2338
|
|
|
2098
2339
|
class SkeletonComponent {
|
|
@@ -2130,6 +2371,9 @@ class PaginationComponent {
|
|
|
2130
2371
|
pageSizeOptions = input([10, 25, 50, 100], ...(ngDevMode ? [{ debugName: "pageSizeOptions" }] : /* istanbul ignore next */ []));
|
|
2131
2372
|
/** Shows the "Showing X–Y of Z" range label. */
|
|
2132
2373
|
showLabel = input(true, { ...(ngDevMode ? { debugName: "showLabel" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2374
|
+
/** Shows the rows-per-page dropdown. Turn it off for a screen with a fixed
|
|
2375
|
+
* page size — otherwise the control offers a choice the host won't honour. */
|
|
2376
|
+
showPageSize = input(true, { ...(ngDevMode ? { debugName: "showPageSize" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2133
2377
|
totalPages = computed(() => Math.max(1, Math.ceil(this.total() / this.pageSize())), ...(ngDevMode ? [{ debugName: "totalPages" }] : /* istanbul ignore next */ []));
|
|
2134
2378
|
pageItems = computed(() => {
|
|
2135
2379
|
const total = this.totalPages();
|
|
@@ -2181,12 +2425,12 @@ class PaginationComponent {
|
|
|
2181
2425
|
this.currentPage.set(1);
|
|
2182
2426
|
}
|
|
2183
2427
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2184
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: PaginationComponent, isStandalone: true, selector: "ds-pagination", inputs: { total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: true, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, currentPage: { classPropertyName: "currentPage", publicName: "currentPage", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageSize: "pageSizeChange", currentPage: "currentPageChange" }, ngImport: i0, template: "<nav\n class=\"pagination\"\n aria-label=\"Pagination\"\n>\n @if (showLabel()) {\n <span class=\"label\">\n {{ rangeLabel() }}\n </span>\n }\n\n <button\n class=\"pagination-button\"\n type=\"button\"\n aria-label=\"Previous page\"\n [disabled]=\"currentPage() === 1\"\n (click)=\"goTo(currentPage() - 1)\"\n >\n <ds-icon\n name=\"chevronLeft\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n\n @for (item of pageItems(); track $index) {\n @if (item === 'ellipsis') {\n <span\n class=\"ellipsis\"\n aria-hidden=\"true\"\n >\n \u2026\n </span>\n } @else {\n <button\n class=\"pagination-button\"\n type=\"button\"\n [class.active]=\"item === currentPage()\"\n [attr.aria-label]=\"'Page ' + item\"\n [attr.aria-current]=\"item === currentPage() ? 'page' : null\"\n (click)=\"goTo(item)\"\n >\n {{ item }}\n </button>\n }\n }\n\n <button\n class=\"pagination-button\"\n type=\"button\"\n aria-label=\"Next page\"\n [disabled]=\"currentPage() === totalPages()\"\n (click)=\"goTo(currentPage() + 1)\"\n >\n <ds-icon\n name=\"chevronRight\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n\n <ds-select\n
|
|
2428
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: PaginationComponent, isStandalone: true, selector: "ds-pagination", inputs: { total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: true, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, currentPage: { classPropertyName: "currentPage", publicName: "currentPage", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, showPageSize: { classPropertyName: "showPageSize", publicName: "showPageSize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageSize: "pageSizeChange", currentPage: "currentPageChange" }, ngImport: i0, template: "<nav\n class=\"pagination\"\n aria-label=\"Pagination\"\n>\n @if (showLabel()) {\n <span class=\"label\">\n {{ rangeLabel() }}\n </span>\n }\n\n <button\n class=\"pagination-button\"\n type=\"button\"\n aria-label=\"Previous page\"\n [disabled]=\"currentPage() === 1\"\n (click)=\"goTo(currentPage() - 1)\"\n >\n <ds-icon\n name=\"chevronLeft\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n\n @for (item of pageItems(); track $index) {\n @if (item === 'ellipsis') {\n <span\n class=\"ellipsis\"\n aria-hidden=\"true\"\n >\n \u2026\n </span>\n } @else {\n <button\n class=\"pagination-button\"\n type=\"button\"\n [class.active]=\"item === currentPage()\"\n [attr.aria-label]=\"'Page ' + item\"\n [attr.aria-current]=\"item === currentPage() ? 'page' : null\"\n (click)=\"goTo(item)\"\n >\n {{ item }}\n </button>\n }\n }\n\n <button\n class=\"pagination-button\"\n type=\"button\"\n aria-label=\"Next page\"\n [disabled]=\"currentPage() === totalPages()\"\n (click)=\"goTo(currentPage() + 1)\"\n >\n <ds-icon\n name=\"chevronRight\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n\n @if (showPageSize()) {\n <!-- reserveMessage pinned off: a page-size dropdown shows neither hint nor\n error, so there is nothing to reserve, and inheriting the app-level\n default would push the control off the page buttons' baseline. -->\n <ds-select\n class=\"size\"\n ariaLabel=\"Rows per page\"\n size=\"sm\"\n [reserveMessage]=\"false\"\n [options]=\"sizeOptions()\"\n [value]=\"pageSizeStr()\"\n (valueChange)=\"onSizeChange($event)\"\n >\n </ds-select>\n }\n</nav>\n", styles: ["@charset \"UTF-8\";:host{--_pagination-btn-bg-color: var(--ds-pagination-btn-bg-color, var(--surface-default));--_pagination-btn-bg-color-hover: var(--ds-pagination-btn-bg-color-hover, var(--surface-secondary));--_pagination-btn-label-color: var(--ds-pagination-btn-label-color, var(--text-secondary));--_pagination-btn-label-color-hover: var(--ds-pagination-btn-label-color-hover, var(--text-primary));--_pagination-btn-border: var(--ds-pagination-btn-border, var(--border-default));--_pagination-active-bg-color: var(--ds-pagination-active-bg-color, var(--accent));--_pagination-active-bg-color-hover: var(--ds-pagination-active-bg-color-hover, var(--accent-hover));--_pagination-active-label-color: var(--ds-pagination-active-label-color, var(--accent-on));--_pagination-radius: var(--ds-pagination-radius, var(--radius-md));--_pagination-focus-shadow: var(--ds-pagination-focus-shadow, var(--ds-control-focus-shadow));--_pagination-label-font-size: var(--ds-pagination-label-font-size, var(--font-size-s));--_pagination-label-weight: var(--ds-pagination-label-weight, var(--font-weight-regular));--_pagination-label-color: var(--ds-pagination-label-color, var(--text-secondary));display:inline-flex}.pagination{display:inline-flex;gap:var(--space-1);align-items:center;flex-wrap:wrap}.pagination .label{font:var(--_pagination-label-weight) var(--_pagination-label-font-size)/var(--line-height-flat) var(--font-sans);color:var(--_pagination-label-color);margin-right:var(--space-2)}.pagination .pagination-button{min-width:var(--hit-min);height:var(--hit-min);padding:0 var(--space-2);border:var(--border-width-default) solid var(--_pagination-btn-border);background-color:var(--_pagination-btn-bg-color);font:var(--font-weight-semibold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_pagination-btn-label-color);border-radius:var(--_pagination-radius);cursor:pointer;display:inline-grid;place-items:center;transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.pagination .pagination-button:hover:not([disabled],.active){background-color:var(--_pagination-btn-bg-color-hover);color:var(--_pagination-btn-label-color-hover)}.pagination .pagination-button.active{background-color:var(--_pagination-active-bg-color);color:var(--_pagination-active-label-color);border-color:var(--_pagination-active-bg-color)}.pagination .pagination-button.active:hover:not([disabled]){background-color:var(--_pagination-active-bg-color-hover);border-color:var(--_pagination-active-bg-color-hover)}.pagination .pagination-button[disabled]{color:var(--text-disabled);cursor:not-allowed}.pagination .pagination-button:focus-visible{outline:none;box-shadow:var(--_pagination-focus-shadow)}.pagination .pagination-button:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.pagination .ellipsis{padding:0 var(--space-2);color:var(--text-tertiary)}.pagination .size{margin-left:var(--space-2);width:auto;flex:0 0 auto}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "component", type: SelectComponent, selector: "ds-select", inputs: ["value", "options", "placeholder", "size", "label", "disabled", "readOnly", "invalid", "hint", "reserveMessage", "required", "optional", "name", "ariaLabel", "clearable"], outputs: ["valueChange"] }] });
|
|
2185
2429
|
}
|
|
2186
2430
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PaginationComponent, decorators: [{
|
|
2187
2431
|
type: Component,
|
|
2188
|
-
args: [{ selector: 'ds-pagination', standalone: true, imports: [FormsModule, IconComponent, SelectComponent], encapsulation: ViewEncapsulation.Emulated, template: "<nav\n class=\"pagination\"\n aria-label=\"Pagination\"\n>\n @if (showLabel()) {\n <span class=\"label\">\n {{ rangeLabel() }}\n </span>\n }\n\n <button\n class=\"pagination-button\"\n type=\"button\"\n aria-label=\"Previous page\"\n [disabled]=\"currentPage() === 1\"\n (click)=\"goTo(currentPage() - 1)\"\n >\n <ds-icon\n name=\"chevronLeft\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n\n @for (item of pageItems(); track $index) {\n @if (item === 'ellipsis') {\n <span\n class=\"ellipsis\"\n aria-hidden=\"true\"\n >\n \u2026\n </span>\n } @else {\n <button\n class=\"pagination-button\"\n type=\"button\"\n [class.active]=\"item === currentPage()\"\n [attr.aria-label]=\"'Page ' + item\"\n [attr.aria-current]=\"item === currentPage() ? 'page' : null\"\n (click)=\"goTo(item)\"\n >\n {{ item }}\n </button>\n }\n }\n\n <button\n class=\"pagination-button\"\n type=\"button\"\n aria-label=\"Next page\"\n [disabled]=\"currentPage() === totalPages()\"\n (click)=\"goTo(currentPage() + 1)\"\n >\n <ds-icon\n name=\"chevronRight\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n\n <ds-select\n
|
|
2189
|
-
}], propDecorators: { total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: true }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }, { type: i0.Output, args: ["pageSizeChange"] }], currentPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPage", required: false }] }, { type: i0.Output, args: ["currentPageChange"] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], showLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabel", required: false }] }] } });
|
|
2432
|
+
args: [{ selector: 'ds-pagination', standalone: true, imports: [FormsModule, IconComponent, SelectComponent], encapsulation: ViewEncapsulation.Emulated, template: "<nav\n class=\"pagination\"\n aria-label=\"Pagination\"\n>\n @if (showLabel()) {\n <span class=\"label\">\n {{ rangeLabel() }}\n </span>\n }\n\n <button\n class=\"pagination-button\"\n type=\"button\"\n aria-label=\"Previous page\"\n [disabled]=\"currentPage() === 1\"\n (click)=\"goTo(currentPage() - 1)\"\n >\n <ds-icon\n name=\"chevronLeft\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n\n @for (item of pageItems(); track $index) {\n @if (item === 'ellipsis') {\n <span\n class=\"ellipsis\"\n aria-hidden=\"true\"\n >\n \u2026\n </span>\n } @else {\n <button\n class=\"pagination-button\"\n type=\"button\"\n [class.active]=\"item === currentPage()\"\n [attr.aria-label]=\"'Page ' + item\"\n [attr.aria-current]=\"item === currentPage() ? 'page' : null\"\n (click)=\"goTo(item)\"\n >\n {{ item }}\n </button>\n }\n }\n\n <button\n class=\"pagination-button\"\n type=\"button\"\n aria-label=\"Next page\"\n [disabled]=\"currentPage() === totalPages()\"\n (click)=\"goTo(currentPage() + 1)\"\n >\n <ds-icon\n name=\"chevronRight\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n\n @if (showPageSize()) {\n <!-- reserveMessage pinned off: a page-size dropdown shows neither hint nor\n error, so there is nothing to reserve, and inheriting the app-level\n default would push the control off the page buttons' baseline. -->\n <ds-select\n class=\"size\"\n ariaLabel=\"Rows per page\"\n size=\"sm\"\n [reserveMessage]=\"false\"\n [options]=\"sizeOptions()\"\n [value]=\"pageSizeStr()\"\n (valueChange)=\"onSizeChange($event)\"\n >\n </ds-select>\n }\n</nav>\n", styles: ["@charset \"UTF-8\";:host{--_pagination-btn-bg-color: var(--ds-pagination-btn-bg-color, var(--surface-default));--_pagination-btn-bg-color-hover: var(--ds-pagination-btn-bg-color-hover, var(--surface-secondary));--_pagination-btn-label-color: var(--ds-pagination-btn-label-color, var(--text-secondary));--_pagination-btn-label-color-hover: var(--ds-pagination-btn-label-color-hover, var(--text-primary));--_pagination-btn-border: var(--ds-pagination-btn-border, var(--border-default));--_pagination-active-bg-color: var(--ds-pagination-active-bg-color, var(--accent));--_pagination-active-bg-color-hover: var(--ds-pagination-active-bg-color-hover, var(--accent-hover));--_pagination-active-label-color: var(--ds-pagination-active-label-color, var(--accent-on));--_pagination-radius: var(--ds-pagination-radius, var(--radius-md));--_pagination-focus-shadow: var(--ds-pagination-focus-shadow, var(--ds-control-focus-shadow));--_pagination-label-font-size: var(--ds-pagination-label-font-size, var(--font-size-s));--_pagination-label-weight: var(--ds-pagination-label-weight, var(--font-weight-regular));--_pagination-label-color: var(--ds-pagination-label-color, var(--text-secondary));display:inline-flex}.pagination{display:inline-flex;gap:var(--space-1);align-items:center;flex-wrap:wrap}.pagination .label{font:var(--_pagination-label-weight) var(--_pagination-label-font-size)/var(--line-height-flat) var(--font-sans);color:var(--_pagination-label-color);margin-right:var(--space-2)}.pagination .pagination-button{min-width:var(--hit-min);height:var(--hit-min);padding:0 var(--space-2);border:var(--border-width-default) solid var(--_pagination-btn-border);background-color:var(--_pagination-btn-bg-color);font:var(--font-weight-semibold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_pagination-btn-label-color);border-radius:var(--_pagination-radius);cursor:pointer;display:inline-grid;place-items:center;transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.pagination .pagination-button:hover:not([disabled],.active){background-color:var(--_pagination-btn-bg-color-hover);color:var(--_pagination-btn-label-color-hover)}.pagination .pagination-button.active{background-color:var(--_pagination-active-bg-color);color:var(--_pagination-active-label-color);border-color:var(--_pagination-active-bg-color)}.pagination .pagination-button.active:hover:not([disabled]){background-color:var(--_pagination-active-bg-color-hover);border-color:var(--_pagination-active-bg-color-hover)}.pagination .pagination-button[disabled]{color:var(--text-disabled);cursor:not-allowed}.pagination .pagination-button:focus-visible{outline:none;box-shadow:var(--_pagination-focus-shadow)}.pagination .pagination-button:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.pagination .ellipsis{padding:0 var(--space-2);color:var(--text-tertiary)}.pagination .size{margin-left:var(--space-2);width:auto;flex:0 0 auto}\n"] }]
|
|
2433
|
+
}], propDecorators: { total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: true }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }, { type: i0.Output, args: ["pageSizeChange"] }], currentPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPage", required: false }] }, { type: i0.Output, args: ["currentPageChange"] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], showLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabel", required: false }] }], showPageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPageSize", required: false }] }] } });
|
|
2190
2434
|
|
|
2191
2435
|
class LoadingOverlayComponent {
|
|
2192
2436
|
/** Show the scrim + spinner over the projected region. */
|
|
@@ -2200,13 +2444,13 @@ class LoadingOverlayComponent {
|
|
|
2200
2444
|
/** Offset the scrim top edge — useful when a sticky header should stay uncovered. */
|
|
2201
2445
|
insetTop = input('0', ...(ngDevMode ? [{ debugName: "insetTop" }] : /* istanbul ignore next */ []));
|
|
2202
2446
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoadingOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2203
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoadingOverlayComponent, isStandalone: true, selector: "ds-loading-overlay", inputs: { loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, blur: { classPropertyName: "blur", publicName: "blur", isSignal: true, isRequired: false, transformFunction: null }, spinnerSize: { classPropertyName: "spinnerSize", publicName: "spinnerSize", isSignal: true, isRequired: false, transformFunction: null }, insetTop: { classPropertyName: "insetTop", publicName: "insetTop", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-busy": "loading() ? \"true\" : null" } }, ngImport: i0, template: "<ng-content></ng-content>\n\n@if (loading()) {\n <div\n class=\"scrim\"\n [class.blur]=\"blur()\"\n [style.top]=\"insetTop()\"\n >\n <ds-spinner [size]=\"spinnerSize()\" />\n\n @if (label()) {\n <span class=\"label\">\n {{ label() }}\n </span>\n }\n </div>\n}\n", styles: [":host{display:block;position:relative;--_scrim-color: var(--ds-loading-overlay-scrim-color, color-mix( in srgb, var(--surface-canvas) calc(var(--opacity-scrim) * 100%), transparent ));--_label-color: var(--ds-loading-overlay-label-color, var(--text-secondary))}.scrim{position:absolute;inset:0;z-index:var(--layer-raised);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-3);background-color:var(--_scrim-color);animation:
|
|
2447
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoadingOverlayComponent, isStandalone: true, selector: "ds-loading-overlay", inputs: { loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, blur: { classPropertyName: "blur", publicName: "blur", isSignal: true, isRequired: false, transformFunction: null }, spinnerSize: { classPropertyName: "spinnerSize", publicName: "spinnerSize", isSignal: true, isRequired: false, transformFunction: null }, insetTop: { classPropertyName: "insetTop", publicName: "insetTop", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-busy": "loading() ? \"true\" : null" } }, ngImport: i0, template: "<ng-content></ng-content>\n\n@if (loading()) {\n <div\n class=\"scrim\"\n [class.blur]=\"blur()\"\n [style.top]=\"insetTop()\"\n >\n <ds-spinner [size]=\"spinnerSize()\" />\n\n @if (label()) {\n <span class=\"label\">\n {{ label() }}\n </span>\n }\n </div>\n}\n", styles: [":host{display:block;position:relative;--_scrim-color: var(--ds-loading-overlay-scrim-color, color-mix( in srgb, var(--surface-canvas) calc(var(--opacity-scrim) * 100%), transparent ));--_label-color: var(--ds-loading-overlay-label-color, var(--text-secondary));--_enter-keyframes: var(--ds-loading-overlay-enter-keyframes, ds-fade-in);--_enter-duration: var(--ds-loading-overlay-enter-duration, var(--duration-fast));--_enter-easing: var(--ds-loading-overlay-enter-easing, var(--ease-standard));--_ds-enter-scale: var(--ds-loading-overlay-enter-scale, .96)}@media(prefers-reduced-motion:reduce){:host{--_enter-duration: 0ms}}.scrim{position:absolute;inset:0;z-index:var(--layer-raised);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-3);background-color:var(--_scrim-color);animation-name:var(--_enter-keyframes);animation-duration:var(--_enter-duration);animation-timing-function:var(--_enter-easing)}.scrim.blur{-webkit-backdrop-filter:blur(var(--blur-sm));backdrop-filter:blur(var(--blur-sm))}.label{color:var(--_label-color);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-base) var(--font-sans)}\n"], dependencies: [{ kind: "component", type: SpinnerComponent, selector: "ds-spinner", inputs: ["size"] }] });
|
|
2204
2448
|
}
|
|
2205
2449
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoadingOverlayComponent, decorators: [{
|
|
2206
2450
|
type: Component,
|
|
2207
2451
|
args: [{ selector: 'ds-loading-overlay', standalone: true, imports: [SpinnerComponent], encapsulation: ViewEncapsulation.Emulated, host: {
|
|
2208
2452
|
'[attr.aria-busy]': 'loading() ? "true" : null',
|
|
2209
|
-
}, template: "<ng-content></ng-content>\n\n@if (loading()) {\n <div\n class=\"scrim\"\n [class.blur]=\"blur()\"\n [style.top]=\"insetTop()\"\n >\n <ds-spinner [size]=\"spinnerSize()\" />\n\n @if (label()) {\n <span class=\"label\">\n {{ label() }}\n </span>\n }\n </div>\n}\n", styles: [":host{display:block;position:relative;--_scrim-color: var(--ds-loading-overlay-scrim-color, color-mix( in srgb, var(--surface-canvas) calc(var(--opacity-scrim) * 100%), transparent ));--_label-color: var(--ds-loading-overlay-label-color, var(--text-secondary))}.scrim{position:absolute;inset:0;z-index:var(--layer-raised);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-3);background-color:var(--_scrim-color);animation:
|
|
2453
|
+
}, template: "<ng-content></ng-content>\n\n@if (loading()) {\n <div\n class=\"scrim\"\n [class.blur]=\"blur()\"\n [style.top]=\"insetTop()\"\n >\n <ds-spinner [size]=\"spinnerSize()\" />\n\n @if (label()) {\n <span class=\"label\">\n {{ label() }}\n </span>\n }\n </div>\n}\n", styles: [":host{display:block;position:relative;--_scrim-color: var(--ds-loading-overlay-scrim-color, color-mix( in srgb, var(--surface-canvas) calc(var(--opacity-scrim) * 100%), transparent ));--_label-color: var(--ds-loading-overlay-label-color, var(--text-secondary));--_enter-keyframes: var(--ds-loading-overlay-enter-keyframes, ds-fade-in);--_enter-duration: var(--ds-loading-overlay-enter-duration, var(--duration-fast));--_enter-easing: var(--ds-loading-overlay-enter-easing, var(--ease-standard));--_ds-enter-scale: var(--ds-loading-overlay-enter-scale, .96)}@media(prefers-reduced-motion:reduce){:host{--_enter-duration: 0ms}}.scrim{position:absolute;inset:0;z-index:var(--layer-raised);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-3);background-color:var(--_scrim-color);animation-name:var(--_enter-keyframes);animation-duration:var(--_enter-duration);animation-timing-function:var(--_enter-easing)}.scrim.blur{-webkit-backdrop-filter:blur(var(--blur-sm));backdrop-filter:blur(var(--blur-sm))}.label{color:var(--_label-color);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-base) var(--font-sans)}\n"] }]
|
|
2210
2454
|
}], propDecorators: { loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], blur: [{ type: i0.Input, args: [{ isSignal: true, alias: "blur", required: false }] }], spinnerSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "spinnerSize", required: false }] }], insetTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "insetTop", required: false }] }] } });
|
|
2211
2455
|
|
|
2212
2456
|
class PopoverComponent {
|
|
@@ -2228,7 +2472,12 @@ class PopoverComponent {
|
|
|
2228
2472
|
'--ds-popover-shadow',
|
|
2229
2473
|
'--ds-popover-padding',
|
|
2230
2474
|
'--ds-popover-max-width',
|
|
2475
|
+
'--ds-popover-min-width',
|
|
2231
2476
|
'--ds-popover-arrow-size',
|
|
2477
|
+
// Forwarded too: a projected ds-menu is portaled into the pane, so a
|
|
2478
|
+
// consumer scoping the menu's width in their own DOM can't reach it.
|
|
2479
|
+
'--ds-menu-min-width',
|
|
2480
|
+
'--ds-menu-max-width',
|
|
2232
2481
|
];
|
|
2233
2482
|
/** Cross-axis alignment of the panel against the trigger. */
|
|
2234
2483
|
align = input('start', ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
@@ -2265,7 +2514,7 @@ class PopoverComponent {
|
|
|
2265
2514
|
.withPositions(buildPositions(placement, this.align(), arrowOffset))
|
|
2266
2515
|
.withViewportMargin(8);
|
|
2267
2516
|
positionStrategy.positionChanges.subscribe((change) => {
|
|
2268
|
-
this.resolvedPlacement.set(
|
|
2517
|
+
this.resolvedPlacement.set(overlayPlacementOf(change.connectionPair.overlayY, change.connectionPair.overlayX));
|
|
2269
2518
|
});
|
|
2270
2519
|
const cfg = {
|
|
2271
2520
|
positionStrategy,
|
|
@@ -2274,6 +2523,7 @@ class PopoverComponent {
|
|
|
2274
2523
|
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
2275
2524
|
};
|
|
2276
2525
|
this.ref = this.overlay.create(cfg);
|
|
2526
|
+
prepareOverlayEnter(this.ref, this.host.nativeElement, positionStrategy);
|
|
2277
2527
|
forwardOverlayTokens(this.ref, this.host.nativeElement, this.panelTokens);
|
|
2278
2528
|
closeOnOutsidePointer(this.ref, (target) => trigger.contains(target), () => this.close());
|
|
2279
2529
|
// No backdrop catches a page scroll and CDK's scroll strategies miss a plain
|
|
@@ -2327,7 +2577,7 @@ class PopoverComponent {
|
|
|
2327
2577
|
provide: DsOverlayCloseRef,
|
|
2328
2578
|
useExisting: forwardRef(() => PopoverComponent),
|
|
2329
2579
|
},
|
|
2330
|
-
], viewQueries: [{ propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "panelTrap", first: true, predicate: CdkTrapFocus, descendants: true, isSignal: true }], hostDirectives: [{ directive: DsStaticPreview, inputs: ["staticPreview", "staticPreview"] }], ngImport: i0, template: "<!-- Projected content is captured ONCE here and stamped into whichever render\n site is active \u2014 duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\"\n >\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\"\n >\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{display:contents}.popover{--_popover-bg-color: var(--ds-popover-bg-color, var(--surface-overlay));--_popover-border-color: var(--ds-popover-border-color, var(--border-default));--_popover-radius: var(--ds-popover-radius, var(--radius-lg));--_popover-shadow: var(--ds-popover-shadow, var(--shadow-popover));--_popover-padding: var(--ds-popover-padding, var(--space-3));--_popover-max-width: var(--ds-popover-max-width, var(--popover-maxw));position:relative;background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);border-radius:var(--_popover-radius);box-shadow:var(--_popover-shadow);padding:var(--_popover-padding);z-index:var(--layer-popover);max-width:var(--_popover-max-width)}.popover:has(ds-menu){padding:0}.arrow{--_arrow-size: var(--ds-popover-arrow-size, 7px);position:absolute;width:calc(var(--_arrow-size) * 2);height:calc(var(--_arrow-size) * 2);overflow:hidden;pointer-events:none}.arrow:before{content:\"\";position:absolute;width:var(--_arrow-size);height:var(--_arrow-size);background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);transform:rotate(45deg);transform-origin:center}[data-placement=bottom] .arrow,[data-placement=bottom]>.arrow{top:calc(var(--_arrow-size) * -1);left:var(--space-4)}[data-placement=bottom] .arrow:before,[data-placement=bottom]>.arrow:before{bottom:0;left:50%;translate:-50% 0;border-right:none;border-bottom:none}[data-placement=top] .arrow,[data-placement=top]>.arrow{bottom:calc(var(--_arrow-size) * -1);left:var(--space-4)}[data-placement=top] .arrow:before,[data-placement=top]>.arrow:before{top:0;left:50%;translate:-50% 0;border-left:none;border-top:none}[data-placement=right] .arrow,[data-placement=right]>.arrow{left:calc(var(--_arrow-size) * -1);top:var(--space-4)}[data-placement=right] .arrow:before,[data-placement=right]>.arrow:before{right:0;top:50%;translate:0 -50%;border-right:none;border-top:none}[data-placement=left] .arrow,[data-placement=left]>.arrow{right:calc(var(--_arrow-size) * -1);top:var(--space-4)}[data-placement=left] .arrow:before,[data-placement=left]>.arrow:before{left:0;top:50%;translate:0 -50%;border-left:none;border-bottom:none}\n"], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
2580
|
+
], viewQueries: [{ propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "panelTrap", first: true, predicate: CdkTrapFocus, descendants: true, isSignal: true }], hostDirectives: [{ directive: DsStaticPreview, inputs: ["staticPreview", "staticPreview"] }], ngImport: i0, template: "<!-- Projected content is captured ONCE here and stamped into whichever render\n site is active \u2014 duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\"\n >\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\"\n >\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{display:contents}.popover{--_popover-bg-color: var(--ds-popover-bg-color, var(--surface-overlay));--_popover-border-color: var(--ds-popover-border-color, var(--border-default));--_popover-radius: var(--ds-popover-radius, var(--radius-lg));--_popover-shadow: var(--ds-popover-shadow, var(--shadow-popover));--_popover-padding: var(--ds-popover-padding, var(--space-3));--_popover-max-width: var(--ds-popover-max-width, var(--popover-maxw));--_popover-min-width: var(--ds-popover-min-width, auto);position:relative;background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);border-radius:var(--_popover-radius);box-shadow:var(--_popover-shadow);padding:var(--_popover-padding);z-index:var(--layer-popover);max-width:var(--_popover-max-width);min-width:var(--_popover-min-width)}.popover:has(ds-menu){padding:0}.arrow{--_arrow-size: var(--ds-popover-arrow-size, 7px);position:absolute;width:calc(var(--_arrow-size) * 2);height:calc(var(--_arrow-size) * 2);overflow:hidden;pointer-events:none}.arrow:before{content:\"\";position:absolute;width:var(--_arrow-size);height:var(--_arrow-size);background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);transform:rotate(45deg);transform-origin:center}[data-placement=bottom] .arrow,[data-placement=bottom]>.arrow{top:calc(var(--_arrow-size) * -1);left:var(--space-4)}[data-placement=bottom] .arrow:before,[data-placement=bottom]>.arrow:before{bottom:0;left:50%;translate:-50% 0;border-right:none;border-bottom:none}[data-placement=top] .arrow,[data-placement=top]>.arrow{bottom:calc(var(--_arrow-size) * -1);left:var(--space-4)}[data-placement=top] .arrow:before,[data-placement=top]>.arrow:before{top:0;left:50%;translate:-50% 0;border-left:none;border-top:none}[data-placement=right] .arrow,[data-placement=right]>.arrow{left:calc(var(--_arrow-size) * -1);top:var(--space-4)}[data-placement=right] .arrow:before,[data-placement=right]>.arrow:before{right:0;top:50%;translate:0 -50%;border-right:none;border-top:none}[data-placement=left] .arrow,[data-placement=left]>.arrow{right:calc(var(--_arrow-size) * -1);top:var(--space-4)}[data-placement=left] .arrow:before,[data-placement=left]>.arrow:before{left:0;top:50%;translate:0 -50%;border-left:none;border-bottom:none}\n"], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
2331
2581
|
}
|
|
2332
2582
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PopoverComponent, decorators: [{
|
|
2333
2583
|
type: Component,
|
|
@@ -2336,7 +2586,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
2336
2586
|
provide: DsOverlayCloseRef,
|
|
2337
2587
|
useExisting: forwardRef(() => PopoverComponent),
|
|
2338
2588
|
},
|
|
2339
|
-
], template: "<!-- Projected content is captured ONCE here and stamped into whichever render\n site is active \u2014 duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\"\n >\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\"\n >\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{display:contents}.popover{--_popover-bg-color: var(--ds-popover-bg-color, var(--surface-overlay));--_popover-border-color: var(--ds-popover-border-color, var(--border-default));--_popover-radius: var(--ds-popover-radius, var(--radius-lg));--_popover-shadow: var(--ds-popover-shadow, var(--shadow-popover));--_popover-padding: var(--ds-popover-padding, var(--space-3));--_popover-max-width: var(--ds-popover-max-width, var(--popover-maxw));position:relative;background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);border-radius:var(--_popover-radius);box-shadow:var(--_popover-shadow);padding:var(--_popover-padding);z-index:var(--layer-popover);max-width:var(--_popover-max-width)}.popover:has(ds-menu){padding:0}.arrow{--_arrow-size: var(--ds-popover-arrow-size, 7px);position:absolute;width:calc(var(--_arrow-size) * 2);height:calc(var(--_arrow-size) * 2);overflow:hidden;pointer-events:none}.arrow:before{content:\"\";position:absolute;width:var(--_arrow-size);height:var(--_arrow-size);background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);transform:rotate(45deg);transform-origin:center}[data-placement=bottom] .arrow,[data-placement=bottom]>.arrow{top:calc(var(--_arrow-size) * -1);left:var(--space-4)}[data-placement=bottom] .arrow:before,[data-placement=bottom]>.arrow:before{bottom:0;left:50%;translate:-50% 0;border-right:none;border-bottom:none}[data-placement=top] .arrow,[data-placement=top]>.arrow{bottom:calc(var(--_arrow-size) * -1);left:var(--space-4)}[data-placement=top] .arrow:before,[data-placement=top]>.arrow:before{top:0;left:50%;translate:-50% 0;border-left:none;border-top:none}[data-placement=right] .arrow,[data-placement=right]>.arrow{left:calc(var(--_arrow-size) * -1);top:var(--space-4)}[data-placement=right] .arrow:before,[data-placement=right]>.arrow:before{right:0;top:50%;translate:0 -50%;border-right:none;border-top:none}[data-placement=left] .arrow,[data-placement=left]>.arrow{right:calc(var(--_arrow-size) * -1);top:var(--space-4)}[data-placement=left] .arrow:before,[data-placement=left]>.arrow:before{left:0;top:50%;translate:0 -50%;border-left:none;border-bottom:none}\n"] }]
|
|
2589
|
+
], template: "<!-- Projected content is captured ONCE here and stamped into whichever render\n site is active \u2014 duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\"\n >\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\"\n >\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{display:contents}.popover{--_popover-bg-color: var(--ds-popover-bg-color, var(--surface-overlay));--_popover-border-color: var(--ds-popover-border-color, var(--border-default));--_popover-radius: var(--ds-popover-radius, var(--radius-lg));--_popover-shadow: var(--ds-popover-shadow, var(--shadow-popover));--_popover-padding: var(--ds-popover-padding, var(--space-3));--_popover-max-width: var(--ds-popover-max-width, var(--popover-maxw));--_popover-min-width: var(--ds-popover-min-width, auto);position:relative;background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);border-radius:var(--_popover-radius);box-shadow:var(--_popover-shadow);padding:var(--_popover-padding);z-index:var(--layer-popover);max-width:var(--_popover-max-width);min-width:var(--_popover-min-width)}.popover:has(ds-menu){padding:0}.arrow{--_arrow-size: var(--ds-popover-arrow-size, 7px);position:absolute;width:calc(var(--_arrow-size) * 2);height:calc(var(--_arrow-size) * 2);overflow:hidden;pointer-events:none}.arrow:before{content:\"\";position:absolute;width:var(--_arrow-size);height:var(--_arrow-size);background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);transform:rotate(45deg);transform-origin:center}[data-placement=bottom] .arrow,[data-placement=bottom]>.arrow{top:calc(var(--_arrow-size) * -1);left:var(--space-4)}[data-placement=bottom] .arrow:before,[data-placement=bottom]>.arrow:before{bottom:0;left:50%;translate:-50% 0;border-right:none;border-bottom:none}[data-placement=top] .arrow,[data-placement=top]>.arrow{bottom:calc(var(--_arrow-size) * -1);left:var(--space-4)}[data-placement=top] .arrow:before,[data-placement=top]>.arrow:before{top:0;left:50%;translate:-50% 0;border-left:none;border-top:none}[data-placement=right] .arrow,[data-placement=right]>.arrow{left:calc(var(--_arrow-size) * -1);top:var(--space-4)}[data-placement=right] .arrow:before,[data-placement=right]>.arrow:before{right:0;top:50%;translate:0 -50%;border-right:none;border-top:none}[data-placement=left] .arrow,[data-placement=left]>.arrow{right:calc(var(--_arrow-size) * -1);top:var(--space-4)}[data-placement=left] .arrow:before,[data-placement=left]>.arrow:before{left:0;top:50%;translate:0 -50%;border-left:none;border-bottom:none}\n"] }]
|
|
2340
2590
|
}], propDecorators: { panelTpl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], panelTrap: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkTrapFocus), { isSignal: true }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], arrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "arrow", required: false }] }], panelRole: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelRole", required: false }] }], panelLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelLabel", required: false }] }] } });
|
|
2341
2591
|
function buildPositions(placement, align, offsetPx) {
|
|
2342
2592
|
const crossStart = align === 'start' ? 'start' : 'end';
|
|
@@ -2426,18 +2676,6 @@ function buildPositions(placement, align, offsetPx) {
|
|
|
2426
2676
|
];
|
|
2427
2677
|
}
|
|
2428
2678
|
}
|
|
2429
|
-
function connectionToPlacement(overlayY, overlayX) {
|
|
2430
|
-
if (overlayY === 'top') {
|
|
2431
|
-
return 'bottom';
|
|
2432
|
-
}
|
|
2433
|
-
if (overlayY === 'bottom') {
|
|
2434
|
-
return 'top';
|
|
2435
|
-
}
|
|
2436
|
-
if (overlayX === 'start') {
|
|
2437
|
-
return 'right';
|
|
2438
|
-
}
|
|
2439
|
-
return 'left';
|
|
2440
|
-
}
|
|
2441
2679
|
|
|
2442
2680
|
class MenuItemComponent {
|
|
2443
2681
|
// The containing overlay (e.g. popover), if any — selecting an item closes it.
|
|
@@ -2557,6 +2795,7 @@ class MenuItemComponent {
|
|
|
2557
2795
|
panelClass: 'ds-overlay-pane',
|
|
2558
2796
|
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
2559
2797
|
});
|
|
2798
|
+
prepareOverlayEnter(this.submenuRef, this.hostElement.nativeElement, positionStrategy);
|
|
2560
2799
|
this.submenuRef.keydownEvents().subscribe((event) => {
|
|
2561
2800
|
if (event.key === 'Escape' || event.key === 'ArrowLeft') {
|
|
2562
2801
|
event.preventDefault();
|
|
@@ -2678,11 +2917,11 @@ class MenuComponent {
|
|
|
2678
2917
|
this.items()[index].focus();
|
|
2679
2918
|
}
|
|
2680
2919
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: MenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2681
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: MenuComponent, isStandalone: true, selector: "ds-menu", host: { listeners: { "keydown": "onKeydown($event)" } }, queries: [{ propertyName: "items", predicate: MenuItemComponent, isSignal: true }], ngImport: i0, template: "<ul\n class=\"menu\"\n role=\"menu\"\n>\n <ng-content></ng-content>\n</ul>\n", styles: [":host{--_menu-bg-color: var(--ds-menu-bg-color, var(--surface-default));--_menu-border-color: var(--ds-menu-border-color, var(--border-divider));display:block;background:var(--_menu-bg-color);border:var(--border-width-default) solid var(--_menu-border-color);border-radius:var(--radius-md);padding:var(--space-1)}:host-context(.popover){background:transparent;border:0;border-radius:var(--radius-flat);padding:0}.menu{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--space-0-5)}\n"] });
|
|
2920
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: MenuComponent, isStandalone: true, selector: "ds-menu", host: { listeners: { "keydown": "onKeydown($event)" } }, queries: [{ propertyName: "items", predicate: MenuItemComponent, isSignal: true }], ngImport: i0, template: "<ul\n class=\"menu\"\n role=\"menu\"\n>\n <ng-content></ng-content>\n</ul>\n", styles: [":host{--_menu-bg-color: var(--ds-menu-bg-color, var(--surface-default));--_menu-border-color: var(--ds-menu-border-color, var(--border-divider));--_menu-min-width: var(--ds-menu-min-width, auto);--_menu-max-width: var(--ds-menu-max-width, none);display:block;min-width:var(--_menu-min-width);max-width:var(--_menu-max-width);background:var(--_menu-bg-color);border:var(--border-width-default) solid var(--_menu-border-color);border-radius:var(--radius-md);padding:var(--space-1)}:host-context(.popover){background:transparent;border:0;border-radius:var(--radius-flat);padding:0}.menu{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--space-0-5)}\n"] });
|
|
2682
2921
|
}
|
|
2683
2922
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: MenuComponent, decorators: [{
|
|
2684
2923
|
type: Component,
|
|
2685
|
-
args: [{ selector: 'ds-menu', standalone: true, encapsulation: ViewEncapsulation.Emulated, host: { '(keydown)': 'onKeydown($event)' }, template: "<ul\n class=\"menu\"\n role=\"menu\"\n>\n <ng-content></ng-content>\n</ul>\n", styles: [":host{--_menu-bg-color: var(--ds-menu-bg-color, var(--surface-default));--_menu-border-color: var(--ds-menu-border-color, var(--border-divider));display:block;background:var(--_menu-bg-color);border:var(--border-width-default) solid var(--_menu-border-color);border-radius:var(--radius-md);padding:var(--space-1)}:host-context(.popover){background:transparent;border:0;border-radius:var(--radius-flat);padding:0}.menu{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--space-0-5)}\n"] }]
|
|
2924
|
+
args: [{ selector: 'ds-menu', standalone: true, encapsulation: ViewEncapsulation.Emulated, host: { '(keydown)': 'onKeydown($event)' }, template: "<ul\n class=\"menu\"\n role=\"menu\"\n>\n <ng-content></ng-content>\n</ul>\n", styles: [":host{--_menu-bg-color: var(--ds-menu-bg-color, var(--surface-default));--_menu-border-color: var(--ds-menu-border-color, var(--border-divider));--_menu-min-width: var(--ds-menu-min-width, auto);--_menu-max-width: var(--ds-menu-max-width, none);display:block;min-width:var(--_menu-min-width);max-width:var(--_menu-max-width);background:var(--_menu-bg-color);border:var(--border-width-default) solid var(--_menu-border-color);border-radius:var(--radius-md);padding:var(--space-1)}:host-context(.popover){background:transparent;border:0;border-radius:var(--radius-flat);padding:0}.menu{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--space-0-5)}\n"] }]
|
|
2686
2925
|
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => MenuItemComponent), { isSignal: true }] }] } });
|
|
2687
2926
|
|
|
2688
2927
|
/**
|
|
@@ -2718,9 +2957,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
2718
2957
|
}], propDecorators: { dsCellTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsCellTemplate", required: true }] }] } });
|
|
2719
2958
|
|
|
2720
2959
|
const NUMERIC = /^-?\d+(\.\d+)?$/;
|
|
2960
|
+
/** Rendered values that read as "no data", matched case-insensitively. The list
|
|
2961
|
+
* is wider than the empty string because consumers render placeholders; these
|
|
2962
|
+
* are the ones mm-broker had to enumerate itself before `sortValue` existed. */
|
|
2963
|
+
const BLANK_CELL = new Set(['', '—', '-', '–', 'n/a', 'never', 'none']);
|
|
2964
|
+
/** Normalises "no data" to a single `null`, so the comparator has one blank
|
|
2965
|
+
* case to test and TypeScript narrows the rest without a cast. */
|
|
2966
|
+
function sortableOf(value) {
|
|
2967
|
+
if (value === null || value === undefined) {
|
|
2968
|
+
return null;
|
|
2969
|
+
}
|
|
2970
|
+
if (typeof value === 'string' && BLANK_CELL.has(value.trim().toLowerCase())) {
|
|
2971
|
+
return null;
|
|
2972
|
+
}
|
|
2973
|
+
return value;
|
|
2974
|
+
}
|
|
2975
|
+
/** Both sides are known non-blank here. Dates and numbers compare numerically;
|
|
2976
|
+
* anything else falls back to text, where `numeric: true` keeps "item 10" after
|
|
2977
|
+
* "item 9" instead of before it. */
|
|
2978
|
+
function compareSortValues(first, second) {
|
|
2979
|
+
if (first instanceof Date && second instanceof Date) {
|
|
2980
|
+
return first.getTime() - second.getTime();
|
|
2981
|
+
}
|
|
2982
|
+
if (typeof first === 'number' && typeof second === 'number') {
|
|
2983
|
+
return first - second;
|
|
2984
|
+
}
|
|
2985
|
+
const firstText = String(first);
|
|
2986
|
+
const secondText = String(second);
|
|
2987
|
+
if (NUMERIC.test(firstText) && NUMERIC.test(secondText)) {
|
|
2988
|
+
return Number(firstText) - Number(secondText);
|
|
2989
|
+
}
|
|
2990
|
+
return firstText.localeCompare(secondText, undefined, { numeric: true });
|
|
2991
|
+
}
|
|
2721
2992
|
class TableComponent {
|
|
2722
2993
|
/** Rows to render. */
|
|
2723
2994
|
data = input.required(...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
2995
|
+
/** Row identity used for tracking, selection, expansion and the active-row
|
|
2996
|
+
* highlight. Defaults to `row.id`; pass an accessor for display-only data
|
|
2997
|
+
* with no natural key (`[rowId]="row => row.channel + row.sentAt"`), which
|
|
2998
|
+
* beats mapping synthetic ids into the data just to satisfy the table. */
|
|
2999
|
+
rowId = input(null, ...(ngDevMode ? [{ debugName: "rowId" }] : /* istanbul ignore next */ []));
|
|
2724
3000
|
/** Column definitions driving headers, cells and sorting. */
|
|
2725
3001
|
columns = input.required(...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
2726
3002
|
/** Adds a checkbox column for row/select-all selection. */
|
|
@@ -2829,10 +3105,10 @@ class TableComponent {
|
|
|
2829
3105
|
/** Fires when an `editable` cell is committed (Enter or blur) with the new value. */
|
|
2830
3106
|
cellEdited = output();
|
|
2831
3107
|
/** Cell templates supplied as an explicit map instead of (or in addition to)
|
|
2832
|
-
* projected `dsCellTemplate` directives. Lets a wrapper component
|
|
2833
|
-
*
|
|
2834
|
-
*
|
|
2835
|
-
*
|
|
3108
|
+
* projected `dsCellTemplate` directives. Lets a wrapper component collect
|
|
3109
|
+
* the directives itself and pass them down, since content projected through
|
|
3110
|
+
* a wrapper's `<ng-content>` is not seen by this component's content query.
|
|
3111
|
+
* Entries here override projected ones. */
|
|
2836
3112
|
cellTemplateMap = input({}, ...(ngDevMode ? [{ debugName: "cellTemplateMap" }] : /* istanbul ignore next */ []));
|
|
2837
3113
|
/** Empty-state template, as an alternative to the `[empty]` content slot —
|
|
2838
3114
|
* again for wrappers that can't rely on slot re-projection. */
|
|
@@ -2950,7 +3226,6 @@ class TableComponent {
|
|
|
2950
3226
|
this.hiddenKeys.set(null);
|
|
2951
3227
|
this.columnWidths.set(new Map());
|
|
2952
3228
|
}
|
|
2953
|
-
// ---- Per-column set filter ----
|
|
2954
3229
|
columnFilterPopover = viewChild('columnFilterPopover', ...(ngDevMode ? [{ debugName: "columnFilterPopover" }] : /* istanbul ignore next */ []));
|
|
2955
3230
|
/** The column whose filter menu is open — drives the distinct-value list. */
|
|
2956
3231
|
filterColumn = signal(null, ...(ngDevMode ? [{ debugName: "filterColumn" }] : /* istanbul ignore next */ []));
|
|
@@ -3039,14 +3314,13 @@ class TableComponent {
|
|
|
3039
3314
|
next.delete(col.key);
|
|
3040
3315
|
this.columnFilters.set(next);
|
|
3041
3316
|
}
|
|
3042
|
-
// ---- Inline cell editing (opt-in `column.editable`) ----
|
|
3043
3317
|
injector = inject(Injector);
|
|
3044
3318
|
editInput = viewChild('editInput', ...(ngDevMode ? [{ debugName: "editInput" }] : /* istanbul ignore next */ []));
|
|
3045
3319
|
editingCell = signal(null, ...(ngDevMode ? [{ debugName: "editingCell" }] : /* istanbul ignore next */ []));
|
|
3046
3320
|
editDraft = signal('', ...(ngDevMode ? [{ debugName: "editDraft" }] : /* istanbul ignore next */ []));
|
|
3047
3321
|
isEditing(row, col) {
|
|
3048
3322
|
const cell = this.editingCell();
|
|
3049
|
-
return !!cell && cell.rowId === row
|
|
3323
|
+
return !!cell && cell.rowId === this.rowKey(row) && cell.key === col.key;
|
|
3050
3324
|
}
|
|
3051
3325
|
startEdit(row, col, event) {
|
|
3052
3326
|
if (!col.editable) {
|
|
@@ -3054,7 +3328,7 @@ class TableComponent {
|
|
|
3054
3328
|
}
|
|
3055
3329
|
event.stopPropagation();
|
|
3056
3330
|
this.editDraft.set(this.cellValue(row, col));
|
|
3057
|
-
this.editingCell.set({ rowId: row
|
|
3331
|
+
this.editingCell.set({ rowId: this.rowKey(row), key: col.key });
|
|
3058
3332
|
afterNextRender(() => {
|
|
3059
3333
|
const input = this.editInput()?.nativeElement;
|
|
3060
3334
|
input?.focus();
|
|
@@ -3147,13 +3421,21 @@ class TableComponent {
|
|
|
3147
3421
|
if (!column) {
|
|
3148
3422
|
return rows;
|
|
3149
3423
|
}
|
|
3424
|
+
const direction = dir === 'asc' ? 1 : -1;
|
|
3425
|
+
const sortValue = column.sortValue;
|
|
3150
3426
|
return rows.slice().sort((a, b) => {
|
|
3151
|
-
const aValue = this.cellValue(a, column);
|
|
3152
|
-
const bValue = this.cellValue(b, column);
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3427
|
+
const aValue = sortableOf(sortValue ? sortValue(a) : this.cellValue(a, column));
|
|
3428
|
+
const bValue = sortableOf(sortValue ? sortValue(b) : this.cellValue(b, column));
|
|
3429
|
+
// Blanks sink in BOTH directions, so `direction` is deliberately not
|
|
3430
|
+
// applied to this branch — a descending sort must not open with a screen
|
|
3431
|
+
// of empty rows.
|
|
3432
|
+
if (aValue === null || bValue === null) {
|
|
3433
|
+
if (aValue === null && bValue === null) {
|
|
3434
|
+
return 0;
|
|
3435
|
+
}
|
|
3436
|
+
return aValue === null ? 1 : -1;
|
|
3437
|
+
}
|
|
3438
|
+
return compareSortValues(aValue, bValue) * direction;
|
|
3157
3439
|
});
|
|
3158
3440
|
}, ...(ngDevMode ? [{ debugName: "sortedData" }] : /* istanbul ignore next */ []));
|
|
3159
3441
|
/** Current page's slice of the sorted rows, when paginating. */
|
|
@@ -3174,12 +3456,12 @@ class TableComponent {
|
|
|
3174
3456
|
return false;
|
|
3175
3457
|
}
|
|
3176
3458
|
const sel = this.selectedIds();
|
|
3177
|
-
return data.every((row) => sel.has(row
|
|
3459
|
+
return data.every((row) => sel.has(this.rowKey(row)));
|
|
3178
3460
|
}, ...(ngDevMode ? [{ debugName: "allSelected" }] : /* istanbul ignore next */ []));
|
|
3179
3461
|
someSelected = computed(() => {
|
|
3180
3462
|
const data = this.displayData();
|
|
3181
3463
|
const sel = this.selectedIds();
|
|
3182
|
-
return data.some((row) => sel.has(row
|
|
3464
|
+
return data.some((row) => sel.has(this.rowKey(row))) && !this.allSelected();
|
|
3183
3465
|
}, ...(ngDevMode ? [{ debugName: "someSelected" }] : /* istanbul ignore next */ []));
|
|
3184
3466
|
/** Select-all is page-scoped only when paginating. */
|
|
3185
3467
|
selectAllLabel = computed(() => this.pageSize() !== null
|
|
@@ -3209,7 +3491,6 @@ class TableComponent {
|
|
|
3209
3491
|
onColumnPickerClick(event) {
|
|
3210
3492
|
this.columnPickerPopover()?.toggle(event.currentTarget);
|
|
3211
3493
|
}
|
|
3212
|
-
// ---- Truncated-cell full-text popover ----
|
|
3213
3494
|
hasTruncate = computed(() => this.columns().some((col) => col.truncate), ...(ngDevMode ? [{ debugName: "hasTruncate" }] : /* istanbul ignore next */ []));
|
|
3214
3495
|
cellTextPopover = viewChild('cellTextPopover', ...(ngDevMode ? [{ debugName: "cellTextPopover" }] : /* istanbul ignore next */ []));
|
|
3215
3496
|
cellPopoverText = signal('', ...(ngDevMode ? [{ debugName: "cellPopoverText" }] : /* istanbul ignore next */ []));
|
|
@@ -3224,7 +3505,6 @@ class TableComponent {
|
|
|
3224
3505
|
this.cellPopoverText.set(this.cellValue(row, col));
|
|
3225
3506
|
this.cellTextPopover()?.toggle(element);
|
|
3226
3507
|
}
|
|
3227
|
-
// ---- Sticky-proxy horizontal scrollbar (opt-in `stickyScrollbar`) ----
|
|
3228
3508
|
scrollWrap = viewChild.required('scrollWrap');
|
|
3229
3509
|
hscrollProxy = viewChild('hscrollProxy', ...(ngDevMode ? [{ debugName: "hscrollProxy" }] : /* istanbul ignore next */ []));
|
|
3230
3510
|
hscrollContentWidth = signal(0, ...(ngDevMode ? [{ debugName: "hscrollContentWidth" }] : /* istanbul ignore next */ []));
|
|
@@ -3376,30 +3656,30 @@ class TableComponent {
|
|
|
3376
3656
|
this.rowActionSelected.emit({ action, row });
|
|
3377
3657
|
}
|
|
3378
3658
|
isExpanded(row) {
|
|
3379
|
-
return this.expandedIds().has(row
|
|
3659
|
+
return this.expandedIds().has(this.rowKey(row));
|
|
3380
3660
|
}
|
|
3381
3661
|
onToggleExpand(row, event) {
|
|
3382
3662
|
event.stopPropagation();
|
|
3383
3663
|
const next = new Set(this.expandedIds());
|
|
3384
|
-
if (next.has(row
|
|
3385
|
-
next.delete(row
|
|
3664
|
+
if (next.has(this.rowKey(row))) {
|
|
3665
|
+
next.delete(this.rowKey(row));
|
|
3386
3666
|
}
|
|
3387
3667
|
else {
|
|
3388
|
-
next.add(row
|
|
3668
|
+
next.add(this.rowKey(row));
|
|
3389
3669
|
}
|
|
3390
3670
|
this.expandedIds.set(next);
|
|
3391
3671
|
}
|
|
3392
3672
|
isSelected(row) {
|
|
3393
|
-
return this.selectedIds().has(row
|
|
3673
|
+
return this.selectedIds().has(this.rowKey(row));
|
|
3394
3674
|
}
|
|
3395
3675
|
onToggleAll(event) {
|
|
3396
3676
|
const checked = event.target.checked;
|
|
3397
3677
|
const next = new Set(this.selectedIds());
|
|
3398
3678
|
if (checked) {
|
|
3399
|
-
this.displayData().forEach((row) => next.add(row
|
|
3679
|
+
this.displayData().forEach((row) => next.add(this.rowKey(row)));
|
|
3400
3680
|
}
|
|
3401
3681
|
else {
|
|
3402
|
-
this.displayData().forEach((row) => next.delete(row
|
|
3682
|
+
this.displayData().forEach((row) => next.delete(this.rowKey(row)));
|
|
3403
3683
|
}
|
|
3404
3684
|
this.selectedIds.set(next);
|
|
3405
3685
|
}
|
|
@@ -3408,10 +3688,10 @@ class TableComponent {
|
|
|
3408
3688
|
const checked = event.target.checked;
|
|
3409
3689
|
const next = new Set(this.selectedIds());
|
|
3410
3690
|
if (checked) {
|
|
3411
|
-
next.add(row
|
|
3691
|
+
next.add(this.rowKey(row));
|
|
3412
3692
|
}
|
|
3413
3693
|
else {
|
|
3414
|
-
next.delete(row
|
|
3694
|
+
next.delete(this.rowKey(row));
|
|
3415
3695
|
}
|
|
3416
3696
|
this.selectedIds.set(next);
|
|
3417
3697
|
}
|
|
@@ -3444,6 +3724,15 @@ class TableComponent {
|
|
|
3444
3724
|
return first ? this.cellValue(row, first) : '';
|
|
3445
3725
|
}
|
|
3446
3726
|
/** `aria-sort` value for a header: only meaningful on sortable columns. */
|
|
3727
|
+
/** Row identity — the `rowId` accessor when given, else `row.id`. Public so a
|
|
3728
|
+
* host reading `selectedIds`/`expandedIds` can compute the same keys. */
|
|
3729
|
+
rowKey(row) {
|
|
3730
|
+
const accessor = this.rowId();
|
|
3731
|
+
if (accessor) {
|
|
3732
|
+
return accessor(row);
|
|
3733
|
+
}
|
|
3734
|
+
return String(row.id ?? '');
|
|
3735
|
+
}
|
|
3447
3736
|
ariaSort(col) {
|
|
3448
3737
|
if (!col.sortable) {
|
|
3449
3738
|
return null;
|
|
@@ -3467,7 +3756,10 @@ class TableComponent {
|
|
|
3467
3756
|
const currentIndex = order.indexOf(this.sortDir());
|
|
3468
3757
|
dir = order[(currentIndex + 1) % order.length] ?? null;
|
|
3469
3758
|
}
|
|
3470
|
-
|
|
3759
|
+
// The key survives "unsorted" (`sortDir === null` alone means that): nulling
|
|
3760
|
+
// it desynced a host that maps off back to its own default sort, because on
|
|
3761
|
+
// the default column that write is a no-op for Angular's binding diff.
|
|
3762
|
+
this.sortKey.set(col.key);
|
|
3471
3763
|
this.sortDir.set(dir);
|
|
3472
3764
|
this.sortChange.emit({ key: col.key, dir });
|
|
3473
3765
|
}
|
|
@@ -3525,7 +3817,7 @@ class TableComponent {
|
|
|
3525
3817
|
return widths[Math.abs(hash) % widths.length] ?? '70%';
|
|
3526
3818
|
}
|
|
3527
3819
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3528
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TableComponent, isStandalone: true, selector: "ds-table", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "stickyHeader", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, zebra: { classPropertyName: "zebra", publicName: "zebra", isSignal: true, isRequired: false, transformFunction: null }, animateHeight: { classPropertyName: "animateHeight", publicName: "animateHeight", isSignal: true, isRequired: false, transformFunction: null }, selectedIds: { classPropertyName: "selectedIds", publicName: "selectedIds", isSignal: true, isRequired: false, transformFunction: null }, sortKey: { classPropertyName: "sortKey", publicName: "sortKey", isSignal: true, isRequired: false, transformFunction: null }, sortDir: { classPropertyName: "sortDir", publicName: "sortDir", isSignal: true, isRequired: false, transformFunction: null }, sortingOrder: { classPropertyName: "sortingOrder", publicName: "sortingOrder", isSignal: true, isRequired: false, transformFunction: null }, skeletonRows: { classPropertyName: "skeletonRows", publicName: "skeletonRows", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, rowInteractive: { classPropertyName: "rowInteractive", publicName: "rowInteractive", isSignal: true, isRequired: false, transformFunction: null }, activeRowId: { classPropertyName: "activeRowId", publicName: "activeRowId", isSignal: true, isRequired: false, transformFunction: null }, filterQuery: { classPropertyName: "filterQuery", publicName: "filterQuery", isSignal: true, isRequired: false, transformFunction: null }, columnFilters: { classPropertyName: "columnFilters", publicName: "columnFilters", isSignal: true, isRequired: false, transformFunction: null }, hiddenKeys: { classPropertyName: "hiddenKeys", publicName: "hiddenKeys", isSignal: true, isRequired: false, transformFunction: null }, resizableColumns: { classPropertyName: "resizableColumns", publicName: "resizableColumns", isSignal: true, isRequired: false, transformFunction: null }, columnWidths: { classPropertyName: "columnWidths", publicName: "columnWidths", isSignal: true, isRequired: false, transformFunction: null }, reorderableColumns: { classPropertyName: "reorderableColumns", publicName: "reorderableColumns", isSignal: true, isRequired: false, transformFunction: null }, columnOrder: { classPropertyName: "columnOrder", publicName: "columnOrder", isSignal: true, isRequired: false, transformFunction: null }, stickyScrollbar: { classPropertyName: "stickyScrollbar", publicName: "stickyScrollbar", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, scrollToTopOnPageChange: { classPropertyName: "scrollToTopOnPageChange", publicName: "scrollToTopOnPageChange", isSignal: true, isRequired: false, transformFunction: null }, clientSort: { classPropertyName: "clientSort", publicName: "clientSort", isSignal: true, isRequired: false, transformFunction: null }, stickyFirstColumn: { classPropertyName: "stickyFirstColumn", publicName: "stickyFirstColumn", isSignal: true, isRequired: false, transformFunction: null }, rowActions: { classPropertyName: "rowActions", publicName: "rowActions", isSignal: true, isRequired: false, transformFunction: null }, cellTemplateMap: { classPropertyName: "cellTemplateMap", publicName: "cellTemplateMap", isSignal: true, isRequired: false, transformFunction: null }, emptyTemplate: { classPropertyName: "emptyTemplate", publicName: "emptyTemplate", isSignal: true, isRequired: false, transformFunction: null }, expandableRows: { classPropertyName: "expandableRows", publicName: "expandableRows", isSignal: true, isRequired: false, transformFunction: null }, expandedIds: { classPropertyName: "expandedIds", publicName: "expandedIds", isSignal: true, isRequired: false, transformFunction: null }, rowExpandTemplate: { classPropertyName: "rowExpandTemplate", publicName: "rowExpandTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedIds: "selectedIdsChange", sortKey: "sortKeyChange", sortDir: "sortDirChange", columnFilters: "columnFiltersChange", hiddenKeys: "hiddenKeysChange", columnWidths: "columnWidthsChange", columnOrder: "columnOrderChange", pageSize: "pageSizeChange", page: "pageChange", rowClicked: "rowClicked", sortChange: "sortChange", rowActionSelected: "rowActionSelected", cellEdited: "cellEdited", expandedIds: "expandedIdsChange" }, host: { properties: { "class.bordered": "bordered()", "class.selectable": "selectable()", "class.pinned": "stickyFirstColumn()", "class.expandable": "expandableRows()", "class.sticky-scrollbar": "stickyScrollbar()", "class.resizable": "resizableColumns()" } }, queries: [{ propertyName: "cellTemplateDirectives", predicate: CellTemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "columnFilterPopover", first: true, predicate: ["columnFilterPopover"], descendants: true, isSignal: true }, { propertyName: "editInput", first: true, predicate: ["editInput"], descendants: true, isSignal: true }, { propertyName: "rowMenuPopover", first: true, predicate: ["rowMenuPopover"], descendants: true, isSignal: true }, { propertyName: "columnPickerPopover", first: true, predicate: ["columnPickerPopover"], descendants: true, isSignal: true }, { propertyName: "cellTextPopover", first: true, predicate: ["cellTextPopover"], descendants: true, isSignal: true }, { propertyName: "scrollWrap", first: true, predicate: ["scrollWrap"], descendants: true, isSignal: true }, { propertyName: "hscrollProxy", first: true, predicate: ["hscrollProxy"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n #scrollWrap\n class=\"scroll-wrap\"\n [class.scroll-y]=\"maxHeight()\"\n [style.max-height]=\"maxHeight()\"\n>\n <div\n class=\"visually-hidden\"\n role=\"status\"\n aria-live=\"polite\"\n >\n @if (loading() !== false) {\n Loading\u2026\n }\n </div>\n\n <ds-loading-overlay\n [loading]=\"isOverlayLoading()\"\n [blur]=\"true\"\n [insetTop]=\"'var(--ds-table-head-h, 40px)'\"\n >\n <table\n [class]=\"tableClasses()\"\n [attr.role]=\"rowInteractive() ? 'grid' : null\"\n [attr.aria-busy]=\"loading() !== false ? 'true' : null\"\n >\n @if (caption()) {\n <caption class=\"visually-hidden\">\n {{\n caption()\n }}\n </caption>\n }\n\n <thead>\n <tr>\n @if (selectable()) {\n <th\n scope=\"col\"\n class=\"select-col pin-select\"\n >\n <input\n type=\"checkbox\"\n class=\"check\"\n [attr.aria-label]=\"selectAllLabel()\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (change)=\"onToggleAll($event)\"\n />\n </th>\n }\n\n @if (expandableRows()) {\n <th\n scope=\"col\"\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\"\n >\n </th>\n }\n\n @for (col of visibleColumns(); track col.key; let first = $first) {\n <th\n scope=\"col\"\n [class]=\"headerClasses(col)\"\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n [style.width.px]=\"columnWidth(col)\"\n [style.min-width.px]=\"columnWidth(col)\"\n [style.max-width.px]=\"columnWidth(col)\"\n [attr.aria-sort]=\"ariaSort(col)\"\n >\n @if (col.sortable) {\n <button\n type=\"button\"\n class=\"th-label\"\n (click)=\"onSort(col)\"\n >\n @if (col.label) {\n {{ col.label }}\n } @else if (col.srLabel) {\n <span class=\"visually-hidden\">\n {{ col.srLabel }}\n </span>\n }\n\n <ds-icon\n class=\"sort-icon\"\n [name]=\"sortIcon(col)\"\n [size]=\"12\"\n >\n </ds-icon>\n </button>\n } @else {\n <span class=\"th-label\">\n @if (col.label) {\n {{ col.label }}\n } @else if (col.srLabel) {\n <span class=\"visually-hidden\">\n {{ col.srLabel }}\n </span>\n }\n </span>\n }\n\n @if (hasColumnFilter(col)) {\n <button\n type=\"button\"\n class=\"col-filter-btn\"\n aria-haspopup=\"dialog\"\n [class.active]=\"isColumnFiltered(col)\"\n [attr.aria-label]=\"'Filter ' + col.label\"\n (click)=\"onColumnFilterClick(col, $event)\"\n >\n <ds-icon\n name=\"filter\"\n [size]=\"12\"\n />\n </button>\n }\n\n @if (resizableColumns()) {\n <span\n class=\"col-resize\"\n aria-hidden=\"true\"\n (pointerdown)=\"onResizeStart(col, $event)\"\n (pointermove)=\"onResizeMove($event)\"\n (pointerup)=\"onResizeEnd()\"\n (pointercancel)=\"onResizeEnd()\"\n >\n </span>\n }\n </th>\n }\n\n @if (hasUtilityColumn()) {\n <th\n scope=\"col\"\n class=\"actions-col\"\n >\n @if (hasColumnPicker()) {\n <button\n type=\"button\"\n class=\"col-picker-btn\"\n aria-haspopup=\"dialog\"\n aria-label=\"Choose columns\"\n [attr.aria-expanded]=\"columnPickerOpened()\"\n (click)=\"onColumnPickerClick($event)\"\n >\n <ds-icon\n name=\"grid\"\n [size]=\"14\"\n />\n </button>\n } @else {\n <span class=\"visually-hidden\">\n Actions\n </span>\n }\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @if (isSkeletonLoading()) {\n @for (_ of skeletonArray(); track $index; let rowIndex = $index) {\n <tr>\n @if (selectable()) {\n <td class=\"select-col pin-select\">\n <ds-skeleton\n width=\"14px\"\n height=\"14px\"\n [inline]=\"true\"\n />\n </td>\n }\n\n @if (expandableRows()) {\n <td\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\"\n >\n </td>\n }\n\n @for (\n col of visibleColumns();\n track col.key;\n let first = $first\n ) {\n <td\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n >\n <ds-skeleton\n height=\"14px\"\n [width]=\"skeletonWidth(col, rowIndex)\"\n [inline]=\"true\"\n />\n </td>\n }\n\n @if (hasUtilityColumn()) {\n <td class=\"actions-col\"></td>\n }\n </tr>\n }\n } @else if (!filteredData().length) {\n <tr>\n <td\n class=\"empty\"\n [attr.colspan]=\"expandedColspan()\"\n >\n @if (emptyTemplate()) {\n <ng-container [ngTemplateOutlet]=\"emptyTemplate()!\">\n </ng-container>\n } @else {\n <ng-content select=\"[empty]\"></ng-content>\n }\n </td>\n </tr>\n } @else {\n @for (row of displayData(); track row.id) {\n <tr\n [class.selected]=\"isSelected(row)\"\n [class.expanded]=\"isExpanded(row)\"\n [class.clickable]=\"rowInteractive()\"\n [class.active]=\"row.id === activeRowId()\"\n [attr.aria-current]=\"row.id === activeRowId() ? 'true' : null\"\n [attr.tabindex]=\"rowInteractive() ? 0 : null\"\n [attr.aria-label]=\"rowInteractive() ? rowAriaLabel(row) : null\"\n (mousedown)=\"onRowMousedown()\"\n (click)=\"onRowClick(row, $event)\"\n (keydown.enter)=\"onRowKey(row, $event)\"\n (keydown.space)=\"onRowKey(row, $event)\"\n >\n @if (selectable()) {\n <td class=\"select-col pin-select\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [attr.aria-label]=\"'Select ' + rowAriaLabel(row)\"\n [checked]=\"isSelected(row)\"\n (change)=\"onToggleRow(row, $event)\"\n (click)=\"$event.stopPropagation()\"\n />\n </td>\n }\n\n @if (expandableRows()) {\n <td\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\"\n >\n <button\n type=\"button\"\n class=\"expand-btn\"\n [attr.aria-expanded]=\"isExpanded(row)\"\n [attr.aria-label]=\"\n isExpanded(row) ? 'Collapse row' : 'Expand row'\n \"\n (click)=\"onToggleExpand(row, $event)\"\n >\n <ds-icon\n class=\"expand-chev\"\n name=\"chevronRight\"\n [class.is-expanded]=\"isExpanded(row)\"\n [size]=\"16\"\n />\n </button>\n </td>\n }\n\n @for (\n col of visibleColumns();\n track col.key;\n let first = $first\n ) {\n <td\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n [class.editable-cell]=\"col.editable\"\n (dblclick)=\"startEdit(row, col, $event)\"\n >\n @if (isEditing(row, col)) {\n <input\n #editInput\n type=\"text\"\n class=\"cell-edit\"\n [value]=\"editDraft()\"\n (input)=\"onEditInput($event)\"\n (click)=\"$event.stopPropagation()\"\n (keydown.enter)=\"commitEdit(row, col)\"\n (keydown.escape)=\"cancelEdit()\"\n (blur)=\"commitEdit(row, col)\"\n />\n } @else if (cellTemplate(col); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row, row: row }\"\n >\n </ng-container>\n } @else if (col.truncate) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- pointer-only enhancement: the clip is visual (CSS ellipsis), keyboard/AT users already get the full DOM text + title; a tab stop per cell would wreck keyboard traversal -->\n <span\n class=\"cell-clip\"\n [style.max-width.px]=\"col.width ?? 240\"\n [attr.title]=\"cellValue(row, col)\"\n (click)=\"onCellClipClick(row, col, $event)\"\n >\n {{ cellValue(row, col) }}\n </span>\n } @else {\n {{ cellValue(row, col) }}\n }\n </td>\n }\n\n @if (hasUtilityColumn()) {\n <td class=\"actions-col\">\n @if (hasRowActions()) {\n <button\n type=\"button\"\n class=\"row-actions-btn\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"isMenuOpenFor(row)\"\n [attr.aria-label]=\"'Actions for ' + rowAriaLabel(row)\"\n (click)=\"onRowMenuClick(row, $event)\"\n (keydown.enter)=\"$event.stopPropagation()\"\n (keydown.space)=\"$event.stopPropagation()\"\n >\n <ds-icon\n name=\"moreV\"\n [size]=\"16\"\n />\n </button>\n }\n </td>\n }\n </tr>\n\n @if (expandableRows() && isExpanded(row) && rowExpandTemplate()) {\n <tr class=\"expand-panel-row\">\n <td\n class=\"expand-panel-cell\"\n [attr.colspan]=\"expandedColspan()\"\n >\n <ng-container\n [ngTemplateOutlet]=\"rowExpandTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: row, row: row }\"\n >\n </ng-container>\n </td>\n </tr>\n }\n }\n }\n </tbody>\n </table>\n </ds-loading-overlay>\n</div>\n\n@if (stickyScrollbar()) {\n <div\n #hscrollProxy\n class=\"hscroll-proxy\"\n aria-hidden=\"true\"\n [class.hscroll-hidden]=\"!hscrollNeeded()\"\n >\n <div\n class=\"hscroll-spacer\"\n [style.width.px]=\"hscrollContentWidth()\"\n >\n </div>\n </div>\n}\n\n@if (pageSize(); as size) {\n <div class=\"pagination-footer\">\n <ds-pagination\n [total]=\"total() ?? filteredData().length\"\n [pageSize]=\"size\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n [(currentPage)]=\"page\"\n (pageSizeChange)=\"pageSize.set($event)\"\n />\n </div>\n}\n\n@if (hasTruncate()) {\n <ds-popover #cellTextPopover>\n <div class=\"cell-text-pop\">\n {{ cellPopoverText() }}\n </div>\n </ds-popover>\n}\n\n@if (filterColumn()) {\n <ds-popover\n #columnFilterPopover\n align=\"start\"\n panelRole=\"dialog\"\n panelLabel=\"Filter values\"\n >\n <div class=\"col-filter\">\n <input\n type=\"text\"\n class=\"col-filter-search\"\n placeholder=\"Search\u2026\"\n [value]=\"filterSearch()\"\n (input)=\"onFilterSearch($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n\n <div class=\"col-filter-list\">\n @for (value of filterValues(); track value) {\n <label class=\"col-filter-option\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [checked]=\"isFilterValueChecked(value)\"\n (change)=\"toggleFilterValue(value)\"\n />\n {{ value || '(empty)' }}\n </label>\n } @empty {\n <div class=\"col-filter-empty\">\n No matches\n </div>\n }\n </div>\n\n <div class=\"col-filter-footer\">\n <span class=\"col-filter-count\">\n {{ filterSelectedCount() }} selected\n </span>\n\n <button\n type=\"button\"\n class=\"col-reset\"\n (click)=\"clearColumnFilter()\"\n >\n Clear\n </button>\n </div>\n </div>\n </ds-popover>\n}\n\n@if (hasColumnPicker()) {\n <ds-popover\n #columnPickerPopover\n align=\"end\"\n panelRole=\"dialog\"\n panelLabel=\"Column visibility\"\n >\n <div\n class=\"col-picker\"\n cdkDropList\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n >\n @for (\n col of orderedColumns();\n track col.key;\n let first = $first;\n let last = $last\n ) {\n <div\n class=\"col-picker-row\"\n cdkDrag\n [cdkDragDisabled]=\"!reorderableColumns()\"\n >\n @if (reorderableColumns()) {\n <span\n class=\"col-drag\"\n cdkDragHandle\n aria-hidden=\"true\"\n >\n <ds-icon\n name=\"drag\"\n [size]=\"14\"\n />\n </span>\n }\n\n <label class=\"col-picker-option\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [checked]=\"isColumnVisible(col)\"\n [disabled]=\"!col.hideable || isColumnLocked(col)\"\n (change)=\"toggleColumn(col)\"\n />\n {{ col.label }}\n </label>\n\n @if (reorderableColumns()) {\n <span class=\"col-move\">\n <button\n type=\"button\"\n class=\"col-move-btn\"\n aria-label=\"Move up\"\n [disabled]=\"first\"\n (click)=\"moveColumn(col, -1)\"\n >\n <ds-icon\n name=\"chevronUp\"\n [size]=\"14\"\n />\n </button>\n\n <button\n type=\"button\"\n class=\"col-move-btn\"\n aria-label=\"Move down\"\n [disabled]=\"last\"\n (click)=\"moveColumn(col, 1)\"\n >\n <ds-icon\n name=\"chevronDown\"\n [size]=\"14\"\n />\n </button>\n </span>\n }\n </div>\n }\n\n <button\n type=\"button\"\n class=\"col-reset\"\n (click)=\"resetColumns()\"\n >\n Reset to default\n </button>\n </div>\n </ds-popover>\n}\n\n@if (hasRowActions()) {\n <ds-popover\n #rowMenuPopover\n align=\"end\"\n >\n <ds-menu>\n @for (action of rowActions(); track action.id) {\n <ds-menu-item\n [icon]=\"action.icon ?? null\"\n [error]=\"action.error ?? false\"\n [disabled]=\"isActionDisabled(action)\"\n (pressed)=\"onRowAction(action)\"\n >\n {{ action.label }}\n </ds-menu-item>\n }\n </ds-menu>\n </ds-popover>\n}\n\n@if (selectable() && someSelected()) {\n <div class=\"bulk-bar\">\n <span class=\"count\">\n {{ selectedIds().size }} selected\n </span>\n\n <span class=\"sep\"></span>\n\n <ng-content select=\"[bulk-actions]\"></ng-content>\n </div>\n}\n", styles: ["@charset \"UTF-8\";:host{display:block}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host(.bordered) .scroll-wrap{border:var(--border-width-default) solid var(--_table-border);border-radius:var(--_table-radius)}.scroll-wrap{--_table-border: var(--ds-table-border, var(--border-default));--_table-radius: var(--ds-table-radius, var(--radius-md));--_table-bg-color: var(--ds-table-bg-color, var(--surface-default));width:100%;overflow:auto hidden;-webkit-overflow-scrolling:touch;background:var(--surface-default);box-sizing:border-box}.scroll-wrap.scroll-y{overflow-y:auto}:host(.sticky-scrollbar) .scroll-wrap{scrollbar-width:none}:host(.sticky-scrollbar) .scroll-wrap::-webkit-scrollbar{display:none}:host(.resizable) thead th{position:relative;overflow:hidden}.col-resize{position:absolute;inset-block:0;right:0;width:var(--space-2);cursor:col-resize;touch-action:none;-webkit-user-select:none;user-select:none}.col-resize:after{content:\"\";position:absolute;inset-block:var(--space-2);right:0;width:var(--border-width-default);background-color:transparent;transition:background-color var(--duration-fast) var(--ease-standard)}.col-resize:hover:after,.col-resize:active:after{background-color:var(--_table-sort-active-icon-color)}.hscroll-proxy{position:sticky;bottom:0;overflow:auto hidden}.hscroll-spacer{height:1px}.hscroll-hidden{display:none}.table{--_table-bg-color: var(--ds-table-bg-color, var(--surface-default));--_table-row-hover-bg-color: var(--ds-table-row-hover-bg-color, var(--surface-secondary));--_table-row-selected-bg-color: var(--ds-table-row-selected-bg-color, var(--accent-subtitle));--_table-row-pressed-bg-color: var(--ds-table-row-pressed-bg-color, var(--surface-muted));--_table-row-active-bg-color: var(--ds-table-row-active-bg-color, var(--accent-subtitle));--_table-row-stripe-bg-color: var(--ds-table-row-stripe-bg-color, var(--surface-secondary));--_table-head-text-color: var(--ds-table-head-text-color, var(--text-secondary));--_table-head-bg-color: var(--ds-table-head-bg-color, var(--surface-secondary));--_table-head-fs: var(--ds-table-head-fs, var(--font-size-xs));--_table-divider: var(--ds-table-divider, var(--border-divider));--_table-sort-active-icon-color: var(--ds-table-sort-active-icon-color, var(--accent));--_table-cell-pad-x: var(--ds-table-cell-pad-x, var(--table-cell-pad-x));--_table-cell-pad-y: var(--ds-table-cell-pad-y, var(--table-cell-pad-y));width:100%;border-collapse:collapse;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--_table-bg-color)}.table thead th{text-align:left;padding:var(--table-head-pad-y) var(--_table-cell-pad-x);font:var(--font-weight-bold) var(--_table-head-fs)/var(--line-height-base) var(--font-sans);letter-spacing:var(--letter-spacing-wider);text-transform:uppercase;color:var(--_table-head-text-color);background-color:var(--_table-head-bg-color);border-bottom:var(--border-width-default) solid var(--_table-divider);white-space:nowrap}.table thead th .th-label{display:inline-flex;align-items:center;vertical-align:middle;appearance:none;background:none;border:0;margin:0;padding:0;font:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit;text-align:left}.table thead th button.th-label{cursor:pointer;-webkit-user-select:none;user-select:none;transition:color var(--duration-fast) var(--ease-standard)}.table thead th button.th-label:hover{color:var(--text-secondary)}.table thead th button.th-label:focus-visible{outline:var(--border-width-strong, 2px) solid var(--accent);outline-offset:var(--focus-ring-offset);border-radius:var(--radius-sm)}.table thead th .sort-icon{display:inline-block;width:var(--sort-ic-size);height:var(--sort-ic-size);margin-left:var(--sort-ic-gap);vertical-align:middle;transform:translateY(-1px);color:var(--icon-default);opacity:var(--sort-ic-opacity-idle);transition:opacity var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.table thead th .sort-icon .icon{width:var(--sort-ic-size);height:var(--sort-ic-size);display:block}.table thead th.sorted-asc .sort-icon,.table thead th.sorted-desc .sort-icon{opacity:1;color:var(--_table-sort-active-icon-color)}.table thead th.numeric{text-align:right}.table thead th.select-col,.table thead th.expand-col,.table thead th.actions-col{width:var(--space-10)}.table.sticky-header thead th{position:sticky;top:0;z-index:var(--table-sticky-header-z)}.table tbody td{padding:var(--_table-cell-pad-y) var(--_table-cell-pad-x);line-height:var(--line-height-flat);transition:background-color var(--duration-fast) var(--ease-standard);box-shadow:inset 0 calc(-1 * var(--border-width-default)) 0 var(--_table-divider);vertical-align:middle}.table tbody td.numeric{text-align:right}.table tbody td.empty{text-align:center;color:var(--text-tertiary);padding:var(--space-4)}.table tbody tr:last-child td{box-shadow:none}.table tbody tr.clickable:not(.active):hover td{background-color:var(--_table-row-hover-bg-color)}.table tbody tr.selected td{background-color:var(--_table-row-selected-bg-color)}.table tbody tr.active td{background-color:var(--_table-row-active-bg-color)}.table tbody tr.clickable:active td{background-color:var(--_table-row-pressed-bg-color)}.table tbody tr.clickable{cursor:pointer}.table tbody tr.clickable:focus-visible{outline:var(--border-width-strong, 2px) solid var(--accent);outline-offset:-2px}.table tbody .expand-col,.table tbody .actions-col{width:var(--space-10)}.table tbody .expand-chev{display:block;transition:transform var(--duration-base) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.table tbody .expand-chev{transition:none}}.table tbody .expand-chev.is-expanded{transform:rotate(90deg)}.table tbody .expand-panel-cell{padding:var(--_table-cell-pad-y) var(--_table-cell-pad-x)}.table tbody .cell-clip{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.table .expand-btn,.table .row-actions-btn,.table .col-picker-btn{display:flex;align-items:center;justify-content:center;width:var(--space-6);height:var(--space-6);padding:0;border:0;background:none;cursor:pointer;color:var(--icon-default);border-radius:var(--radius-sm);transition:color var(--duration-fast) var(--ease-standard)}.table .expand-btn:hover,.table .row-actions-btn:hover,.table .col-picker-btn:hover{color:var(--icon-strong)}.table .expand-btn:focus-visible,.table .row-actions-btn:focus-visible,.table .col-picker-btn:focus-visible{outline:var(--border-width-strong, 2px) solid var(--accent);outline-offset:var(--focus-ring-offset)}.table.compact tbody td,.table.compact thead th{padding:var(--space-2) var(--space-3)}.table.zebra tbody tr:nth-child(odd) td{background-color:var(--_table-row-stripe-bg-color)}.col-picker{display:grid;gap:var(--space-2);min-width:160px}.col-picker-row{display:flex;align-items:center;gap:var(--space-2)}.col-picker-row.cdk-drag-preview{background-color:var(--surface-default);border-radius:var(--radius-sm);box-shadow:var(--shadow-popover);padding:var(--space-1) var(--space-2)}.col-picker-row.cdk-drag-placeholder{opacity:.4}.col-picker.cdk-drop-list-dragging .col-picker-row:not(.cdk-drag-placeholder){transition:transform var(--duration-fast) var(--ease-standard)}.col-drag{display:inline-flex;color:var(--icon-default);cursor:grab}.col-drag:active{cursor:grabbing}.col-picker-option{display:flex;align-items:center;gap:var(--space-2);flex:1;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer}.col-picker-option:has(input:disabled){color:var(--text-tertiary);cursor:default}.col-move{display:inline-flex;gap:var(--space-1)}.col-move-btn{display:inline-flex;padding:0;border:0;background:none;color:var(--icon-default);cursor:pointer}.col-move-btn:hover:not(:disabled){color:var(--icon-strong)}.col-move-btn:disabled{color:var(--text-disabled);cursor:default}.col-reset{margin-top:var(--space-1);padding:0;border:0;background:none;color:var(--accent);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);cursor:pointer;text-align:left}.col-reset:hover{text-decoration:underline}.col-filter-btn{display:inline-flex;margin-left:var(--space-1);padding:0;border:0;background:none;color:var(--icon-default);opacity:.5;cursor:pointer;vertical-align:middle;transition:color var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.col-filter-btn:hover{opacity:1;color:var(--icon-strong)}.col-filter-btn.active{opacity:1;color:var(--_table-sort-active-icon-color)}.col-filter{display:grid;gap:var(--space-2);min-width:180px}.col-filter-search{width:100%;box-sizing:border-box;padding:var(--space-1) var(--space-2);border:var(--border-width-default) solid var(--border-default);border-radius:var(--radius-sm);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--surface-default)}.col-filter-search:focus-visible{outline:0;border-color:var(--accent)}.col-filter-list{display:grid;gap:var(--space-1);max-height:240px;overflow-y:auto}.col-filter-option{display:flex;align-items:center;gap:var(--space-2);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer}.col-filter-empty{color:var(--text-tertiary);font-size:var(--font-size-s);padding:var(--space-1) 0}.col-filter-footer{display:flex;align-items:center;justify-content:space-between;padding-top:var(--space-1);border-top:var(--border-width-default) solid var(--border-divider)}.col-filter-count{color:var(--text-tertiary);font-size:var(--font-size-xs)}.col-filter-footer .col-reset{margin-top:0}.editable-cell{cursor:text}.cell-edit{width:100%;box-sizing:border-box;margin:calc(-1 * var(--space-1)) 0;padding:var(--space-1) var(--space-2);border:var(--border-width-default) solid var(--accent);border-radius:var(--radius-sm);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--surface-default)}.cell-edit:focus-visible{outline:0}.cell-text-pop{max-width:360px;overflow-wrap:anywhere;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary)}:host(.pinned){--_table-select-w: var(--ds-table-select-col-w, var(--space-10))}:host(.pinned) .table{border-collapse:separate;border-spacing:0}:host(.pinned) .table tbody td{box-shadow:none;border-bottom:var(--border-width-default) solid var(--_table-divider)}:host(.pinned) .table tbody tr:last-child td{border-bottom:0}:host(.pinned) .pin-select,:host(.pinned) .pin-first{position:sticky;left:0;z-index:var(--table-sticky-col-z);background-color:var(--_table-bg-color)}:host(.pinned) thead .pin-select,:host(.pinned) thead .pin-first{z-index:var(--table-sticky-corner-z);background-color:var(--_table-head-bg-color)}:host(.pinned) tbody tr.clickable:not(.active):hover .pin-first,:host(.pinned) tbody tr.clickable:not(.active):hover .pin-select{background-color:var(--_table-row-hover-bg-color)}:host(.pinned) tbody tr.selected .pin-first,:host(.pinned) tbody tr.selected .pin-select{background-color:var(--_table-row-selected-bg-color)}:host(.pinned) tbody tr.active .pin-first,:host(.pinned) tbody tr.active .pin-select{background-color:var(--_table-row-active-bg-color)}:host(.pinned) tbody tr.clickable:active .pin-first,:host(.pinned) tbody tr.clickable:active .pin-select{background-color:var(--_table-row-pressed-bg-color)}:host(.pinned.selectable) .pin-first{left:var(--_table-select-w)}:host(.pinned.expandable){--_table-expand-w: var(--ds-table-expand-col-w, var(--space-10))}:host(.pinned.expandable) .pin-expand{position:sticky;left:0;z-index:var(--table-sticky-col-z);background-color:var(--_table-bg-color)}:host(.pinned.expandable) thead .pin-expand{z-index:var(--table-sticky-corner-z);background-color:var(--_table-head-bg-color)}:host(.pinned.expandable) tbody tr.clickable:not(.active):hover .pin-expand{background-color:var(--_table-row-hover-bg-color)}:host(.pinned.expandable) tbody tr.selected .pin-expand{background-color:var(--_table-row-selected-bg-color)}:host(.pinned.expandable) tbody tr.active .pin-expand{background-color:var(--_table-row-active-bg-color)}:host(.pinned.expandable) tbody tr.clickable:active .pin-expand{background-color:var(--_table-row-pressed-bg-color)}:host(.pinned.expandable) .pin-first{left:var(--_table-expand-w)}:host(.pinned.selectable.expandable) .pin-expand{left:var(--_table-select-w)}:host(.pinned.selectable.expandable) .pin-first{left:calc(var(--_table-select-w) + var(--_table-expand-w))}.pagination-footer{padding-top:var(--space-3);border-top:var(--border-width-default) solid var(--ds-table-divider, var(--border-divider))}.bulk-bar{position:sticky;bottom:var(--bulk-bar-offset);display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--space-4);background:var(--surface-inverted);color:var(--text-inverted);border-radius:var(--radius-lg);box-shadow:var(--shadow-toast);margin:var(--space-4) auto 0;width:fit-content}.bulk-bar .count{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-flat) var(--font-sans)}.bulk-bar .sep{width:var(--border-width-default);height:var(--space-4);background:var(--border-inverted)}.bulk-bar .button{background:transparent;color:var(--text-inverted)}.bulk-bar .button:hover{background:var(--surface-inverted-hover)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline"] }, { kind: "component", type: PaginationComponent, selector: "ds-pagination", inputs: ["total", "pageSize", "currentPage", "pageSizeOptions", "showLabel"], outputs: ["pageSizeChange", "currentPageChange"] }, { kind: "component", type: LoadingOverlayComponent, selector: "ds-loading-overlay", inputs: ["loading", "label", "blur", "spinnerSize", "insetTop"] }, { kind: "component", type: PopoverComponent, selector: "ds-popover", inputs: ["align", "placement", "arrow", "panelRole", "panelLabel"] }, { kind: "component", type: MenuComponent, selector: "ds-menu" }, { kind: "component", type: MenuItemComponent, selector: "ds-menu-item", inputs: ["icon", "disabled", "error", "submenu"], outputs: ["pressed"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }] });
|
|
3820
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TableComponent, isStandalone: true, selector: "ds-table", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, rowId: { classPropertyName: "rowId", publicName: "rowId", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "stickyHeader", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, zebra: { classPropertyName: "zebra", publicName: "zebra", isSignal: true, isRequired: false, transformFunction: null }, animateHeight: { classPropertyName: "animateHeight", publicName: "animateHeight", isSignal: true, isRequired: false, transformFunction: null }, selectedIds: { classPropertyName: "selectedIds", publicName: "selectedIds", isSignal: true, isRequired: false, transformFunction: null }, sortKey: { classPropertyName: "sortKey", publicName: "sortKey", isSignal: true, isRequired: false, transformFunction: null }, sortDir: { classPropertyName: "sortDir", publicName: "sortDir", isSignal: true, isRequired: false, transformFunction: null }, sortingOrder: { classPropertyName: "sortingOrder", publicName: "sortingOrder", isSignal: true, isRequired: false, transformFunction: null }, skeletonRows: { classPropertyName: "skeletonRows", publicName: "skeletonRows", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, rowInteractive: { classPropertyName: "rowInteractive", publicName: "rowInteractive", isSignal: true, isRequired: false, transformFunction: null }, activeRowId: { classPropertyName: "activeRowId", publicName: "activeRowId", isSignal: true, isRequired: false, transformFunction: null }, filterQuery: { classPropertyName: "filterQuery", publicName: "filterQuery", isSignal: true, isRequired: false, transformFunction: null }, columnFilters: { classPropertyName: "columnFilters", publicName: "columnFilters", isSignal: true, isRequired: false, transformFunction: null }, hiddenKeys: { classPropertyName: "hiddenKeys", publicName: "hiddenKeys", isSignal: true, isRequired: false, transformFunction: null }, resizableColumns: { classPropertyName: "resizableColumns", publicName: "resizableColumns", isSignal: true, isRequired: false, transformFunction: null }, columnWidths: { classPropertyName: "columnWidths", publicName: "columnWidths", isSignal: true, isRequired: false, transformFunction: null }, reorderableColumns: { classPropertyName: "reorderableColumns", publicName: "reorderableColumns", isSignal: true, isRequired: false, transformFunction: null }, columnOrder: { classPropertyName: "columnOrder", publicName: "columnOrder", isSignal: true, isRequired: false, transformFunction: null }, stickyScrollbar: { classPropertyName: "stickyScrollbar", publicName: "stickyScrollbar", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, scrollToTopOnPageChange: { classPropertyName: "scrollToTopOnPageChange", publicName: "scrollToTopOnPageChange", isSignal: true, isRequired: false, transformFunction: null }, clientSort: { classPropertyName: "clientSort", publicName: "clientSort", isSignal: true, isRequired: false, transformFunction: null }, stickyFirstColumn: { classPropertyName: "stickyFirstColumn", publicName: "stickyFirstColumn", isSignal: true, isRequired: false, transformFunction: null }, rowActions: { classPropertyName: "rowActions", publicName: "rowActions", isSignal: true, isRequired: false, transformFunction: null }, cellTemplateMap: { classPropertyName: "cellTemplateMap", publicName: "cellTemplateMap", isSignal: true, isRequired: false, transformFunction: null }, emptyTemplate: { classPropertyName: "emptyTemplate", publicName: "emptyTemplate", isSignal: true, isRequired: false, transformFunction: null }, expandableRows: { classPropertyName: "expandableRows", publicName: "expandableRows", isSignal: true, isRequired: false, transformFunction: null }, expandedIds: { classPropertyName: "expandedIds", publicName: "expandedIds", isSignal: true, isRequired: false, transformFunction: null }, rowExpandTemplate: { classPropertyName: "rowExpandTemplate", publicName: "rowExpandTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedIds: "selectedIdsChange", sortKey: "sortKeyChange", sortDir: "sortDirChange", columnFilters: "columnFiltersChange", hiddenKeys: "hiddenKeysChange", columnWidths: "columnWidthsChange", columnOrder: "columnOrderChange", pageSize: "pageSizeChange", page: "pageChange", rowClicked: "rowClicked", sortChange: "sortChange", rowActionSelected: "rowActionSelected", cellEdited: "cellEdited", expandedIds: "expandedIdsChange" }, host: { properties: { "class.bordered": "bordered()", "class.selectable": "selectable()", "class.pinned": "stickyFirstColumn()", "class.expandable": "expandableRows()", "class.sticky-scrollbar": "stickyScrollbar()", "class.resizable": "resizableColumns()" } }, queries: [{ propertyName: "cellTemplateDirectives", predicate: CellTemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "columnFilterPopover", first: true, predicate: ["columnFilterPopover"], descendants: true, isSignal: true }, { propertyName: "editInput", first: true, predicate: ["editInput"], descendants: true, isSignal: true }, { propertyName: "rowMenuPopover", first: true, predicate: ["rowMenuPopover"], descendants: true, isSignal: true }, { propertyName: "columnPickerPopover", first: true, predicate: ["columnPickerPopover"], descendants: true, isSignal: true }, { propertyName: "cellTextPopover", first: true, predicate: ["cellTextPopover"], descendants: true, isSignal: true }, { propertyName: "scrollWrap", first: true, predicate: ["scrollWrap"], descendants: true, isSignal: true }, { propertyName: "hscrollProxy", first: true, predicate: ["hscrollProxy"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n #scrollWrap\n class=\"scroll-wrap\"\n [class.scroll-y]=\"maxHeight()\"\n [style.max-height]=\"maxHeight()\"\n>\n <div\n class=\"visually-hidden\"\n role=\"status\"\n aria-live=\"polite\"\n >\n @if (loading() !== false) {\n Loading\u2026\n }\n </div>\n\n <ds-loading-overlay\n [loading]=\"isOverlayLoading()\"\n [blur]=\"true\"\n [insetTop]=\"'var(--ds-table-head-h, 40px)'\"\n >\n <table\n [class]=\"tableClasses()\"\n [attr.role]=\"rowInteractive() ? 'grid' : null\"\n [attr.aria-busy]=\"loading() !== false ? 'true' : null\"\n >\n @if (caption()) {\n <caption class=\"visually-hidden\">\n {{\n caption()\n }}\n </caption>\n }\n\n <thead>\n <tr>\n @if (selectable()) {\n <th\n scope=\"col\"\n class=\"select-col pin-select\"\n >\n <input\n type=\"checkbox\"\n class=\"check\"\n [attr.aria-label]=\"selectAllLabel()\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (change)=\"onToggleAll($event)\"\n />\n </th>\n }\n\n @if (expandableRows()) {\n <th\n scope=\"col\"\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\"\n >\n </th>\n }\n\n @for (col of visibleColumns(); track col.key; let first = $first) {\n <th\n scope=\"col\"\n [class]=\"headerClasses(col)\"\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n [style.width.px]=\"columnWidth(col)\"\n [style.min-width.px]=\"columnWidth(col)\"\n [style.max-width.px]=\"columnWidth(col)\"\n [attr.aria-sort]=\"ariaSort(col)\"\n >\n @if (col.sortable) {\n <button\n type=\"button\"\n class=\"th-label\"\n (click)=\"onSort(col)\"\n >\n @if (col.label) {\n {{ col.label }}\n } @else if (col.srLabel) {\n <span class=\"visually-hidden\">\n {{ col.srLabel }}\n </span>\n }\n\n <ds-icon\n class=\"sort-icon\"\n [name]=\"sortIcon(col)\"\n [size]=\"12\"\n >\n </ds-icon>\n </button>\n } @else {\n <span class=\"th-label\">\n @if (col.label) {\n {{ col.label }}\n } @else if (col.srLabel) {\n <span class=\"visually-hidden\">\n {{ col.srLabel }}\n </span>\n }\n </span>\n }\n\n @if (hasColumnFilter(col)) {\n <button\n type=\"button\"\n class=\"col-filter-btn\"\n aria-haspopup=\"dialog\"\n [class.active]=\"isColumnFiltered(col)\"\n [attr.aria-label]=\"'Filter ' + col.label\"\n (click)=\"onColumnFilterClick(col, $event)\"\n >\n <ds-icon\n name=\"filter\"\n [size]=\"12\"\n />\n </button>\n }\n\n @if (resizableColumns()) {\n <span\n class=\"col-resize\"\n aria-hidden=\"true\"\n (pointerdown)=\"onResizeStart(col, $event)\"\n (pointermove)=\"onResizeMove($event)\"\n (pointerup)=\"onResizeEnd()\"\n (pointercancel)=\"onResizeEnd()\"\n >\n </span>\n }\n </th>\n }\n\n @if (hasUtilityColumn()) {\n <th\n scope=\"col\"\n class=\"actions-col\"\n >\n @if (hasColumnPicker()) {\n <button\n type=\"button\"\n class=\"col-picker-btn\"\n aria-haspopup=\"dialog\"\n aria-label=\"Choose columns\"\n [attr.aria-expanded]=\"columnPickerOpened()\"\n (click)=\"onColumnPickerClick($event)\"\n >\n <ds-icon\n name=\"grid\"\n [size]=\"14\"\n />\n </button>\n } @else {\n <span class=\"visually-hidden\">\n Actions\n </span>\n }\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @if (isSkeletonLoading()) {\n @for (_ of skeletonArray(); track $index; let rowIndex = $index) {\n <tr>\n @if (selectable()) {\n <td class=\"select-col pin-select\">\n <ds-skeleton\n width=\"14px\"\n height=\"14px\"\n [inline]=\"true\"\n />\n </td>\n }\n\n @if (expandableRows()) {\n <td\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\"\n >\n </td>\n }\n\n @for (\n col of visibleColumns();\n track col.key;\n let first = $first\n ) {\n <td\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n >\n <ds-skeleton\n height=\"14px\"\n [width]=\"skeletonWidth(col, rowIndex)\"\n [inline]=\"true\"\n />\n </td>\n }\n\n @if (hasUtilityColumn()) {\n <td class=\"actions-col\"></td>\n }\n </tr>\n }\n } @else if (!filteredData().length) {\n <tr>\n <td\n class=\"empty\"\n [attr.colspan]=\"expandedColspan()\"\n >\n @if (emptyTemplate()) {\n <ng-container [ngTemplateOutlet]=\"emptyTemplate()!\">\n </ng-container>\n } @else {\n <ng-content select=\"[empty]\"></ng-content>\n }\n </td>\n </tr>\n } @else {\n @for (row of displayData(); track rowKey(row)) {\n <tr\n [class.selected]=\"isSelected(row)\"\n [class.expanded]=\"isExpanded(row)\"\n [class.clickable]=\"rowInteractive()\"\n [class.active]=\"rowKey(row) === activeRowId()\"\n [attr.aria-current]=\"rowKey(row) === activeRowId() ? 'true' : null\"\n [attr.tabindex]=\"rowInteractive() ? 0 : null\"\n [attr.aria-label]=\"rowInteractive() ? rowAriaLabel(row) : null\"\n (mousedown)=\"onRowMousedown()\"\n (click)=\"onRowClick(row, $event)\"\n (keydown.enter)=\"onRowKey(row, $event)\"\n (keydown.space)=\"onRowKey(row, $event)\"\n >\n @if (selectable()) {\n <td class=\"select-col pin-select\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [attr.aria-label]=\"'Select ' + rowAriaLabel(row)\"\n [checked]=\"isSelected(row)\"\n (change)=\"onToggleRow(row, $event)\"\n (click)=\"$event.stopPropagation()\"\n />\n </td>\n }\n\n @if (expandableRows()) {\n <td\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\"\n >\n <button\n type=\"button\"\n class=\"expand-btn\"\n [attr.aria-expanded]=\"isExpanded(row)\"\n [attr.aria-label]=\"\n isExpanded(row) ? 'Collapse row' : 'Expand row'\n \"\n (click)=\"onToggleExpand(row, $event)\"\n >\n <ds-icon\n class=\"expand-chev\"\n name=\"chevronRight\"\n [class.is-expanded]=\"isExpanded(row)\"\n [size]=\"16\"\n />\n </button>\n </td>\n }\n\n @for (\n col of visibleColumns();\n track col.key;\n let first = $first\n ) {\n <td\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n [class.editable-cell]=\"col.editable\"\n (dblclick)=\"startEdit(row, col, $event)\"\n >\n @if (isEditing(row, col)) {\n <input\n #editInput\n type=\"text\"\n class=\"cell-edit\"\n [value]=\"editDraft()\"\n (input)=\"onEditInput($event)\"\n (click)=\"$event.stopPropagation()\"\n (keydown.enter)=\"commitEdit(row, col)\"\n (keydown.escape)=\"cancelEdit()\"\n (blur)=\"commitEdit(row, col)\"\n />\n } @else if (cellTemplate(col); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row, row: row }\"\n >\n </ng-container>\n } @else if (col.truncate) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- pointer-only enhancement: the clip is visual (CSS ellipsis), keyboard/AT users already get the full DOM text + title; a tab stop per cell would wreck keyboard traversal -->\n <span\n class=\"cell-clip\"\n [style.max-width.px]=\"col.width ?? 240\"\n [attr.title]=\"cellValue(row, col)\"\n (click)=\"onCellClipClick(row, col, $event)\"\n >\n {{ cellValue(row, col) }}\n </span>\n } @else {\n {{ cellValue(row, col) }}\n }\n </td>\n }\n\n @if (hasUtilityColumn()) {\n <td class=\"actions-col\">\n @if (hasRowActions()) {\n <button\n type=\"button\"\n class=\"row-actions-btn\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"isMenuOpenFor(row)\"\n [attr.aria-label]=\"'Actions for ' + rowAriaLabel(row)\"\n (click)=\"onRowMenuClick(row, $event)\"\n (keydown.enter)=\"$event.stopPropagation()\"\n (keydown.space)=\"$event.stopPropagation()\"\n >\n <ds-icon\n name=\"moreV\"\n [size]=\"16\"\n />\n </button>\n }\n </td>\n }\n </tr>\n\n @if (expandableRows() && isExpanded(row) && rowExpandTemplate()) {\n <tr class=\"expand-panel-row\">\n <td\n class=\"expand-panel-cell\"\n [attr.colspan]=\"expandedColspan()\"\n >\n <ng-container\n [ngTemplateOutlet]=\"rowExpandTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: row, row: row }\"\n >\n </ng-container>\n </td>\n </tr>\n }\n }\n }\n </tbody>\n </table>\n </ds-loading-overlay>\n</div>\n\n@if (stickyScrollbar()) {\n <div\n #hscrollProxy\n class=\"hscroll-proxy\"\n aria-hidden=\"true\"\n [class.hscroll-hidden]=\"!hscrollNeeded()\"\n >\n <div\n class=\"hscroll-spacer\"\n [style.width.px]=\"hscrollContentWidth()\"\n >\n </div>\n </div>\n}\n\n@if (pageSize(); as size) {\n <div class=\"pagination-footer\">\n <ds-pagination\n [total]=\"total() ?? filteredData().length\"\n [pageSize]=\"size\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n [(currentPage)]=\"page\"\n (pageSizeChange)=\"pageSize.set($event)\"\n />\n </div>\n}\n\n@if (hasTruncate()) {\n <ds-popover #cellTextPopover>\n <div class=\"cell-text-pop\">\n {{ cellPopoverText() }}\n </div>\n </ds-popover>\n}\n\n@if (filterColumn()) {\n <ds-popover\n #columnFilterPopover\n align=\"start\"\n panelRole=\"dialog\"\n panelLabel=\"Filter values\"\n >\n <div class=\"col-filter\">\n <input\n type=\"text\"\n class=\"col-filter-search\"\n placeholder=\"Search\u2026\"\n [value]=\"filterSearch()\"\n (input)=\"onFilterSearch($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n\n <div class=\"col-filter-list\">\n @for (value of filterValues(); track value) {\n <label class=\"col-filter-option\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [checked]=\"isFilterValueChecked(value)\"\n (change)=\"toggleFilterValue(value)\"\n />\n {{ value || '(empty)' }}\n </label>\n } @empty {\n <div class=\"col-filter-empty\">\n No matches\n </div>\n }\n </div>\n\n <div class=\"col-filter-footer\">\n <span class=\"col-filter-count\">\n {{ filterSelectedCount() }} selected\n </span>\n\n <button\n type=\"button\"\n class=\"col-reset\"\n (click)=\"clearColumnFilter()\"\n >\n Clear\n </button>\n </div>\n </div>\n </ds-popover>\n}\n\n@if (hasColumnPicker()) {\n <ds-popover\n #columnPickerPopover\n align=\"end\"\n panelRole=\"dialog\"\n panelLabel=\"Column visibility\"\n >\n <div\n class=\"col-picker\"\n cdkDropList\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n >\n @for (\n col of orderedColumns();\n track col.key;\n let first = $first;\n let last = $last\n ) {\n <div\n class=\"col-picker-row\"\n cdkDrag\n [cdkDragDisabled]=\"!reorderableColumns()\"\n >\n @if (reorderableColumns()) {\n <span\n class=\"col-drag\"\n cdkDragHandle\n aria-hidden=\"true\"\n >\n <ds-icon\n name=\"drag\"\n [size]=\"14\"\n />\n </span>\n }\n\n <label class=\"col-picker-option\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [checked]=\"isColumnVisible(col)\"\n [disabled]=\"!col.hideable || isColumnLocked(col)\"\n (change)=\"toggleColumn(col)\"\n />\n {{ col.label }}\n </label>\n\n @if (reorderableColumns()) {\n <span class=\"col-move\">\n <button\n type=\"button\"\n class=\"col-move-btn\"\n aria-label=\"Move up\"\n [disabled]=\"first\"\n (click)=\"moveColumn(col, -1)\"\n >\n <ds-icon\n name=\"chevronUp\"\n [size]=\"14\"\n />\n </button>\n\n <button\n type=\"button\"\n class=\"col-move-btn\"\n aria-label=\"Move down\"\n [disabled]=\"last\"\n (click)=\"moveColumn(col, 1)\"\n >\n <ds-icon\n name=\"chevronDown\"\n [size]=\"14\"\n />\n </button>\n </span>\n }\n </div>\n }\n\n <button\n type=\"button\"\n class=\"col-reset\"\n (click)=\"resetColumns()\"\n >\n Reset to default\n </button>\n </div>\n </ds-popover>\n}\n\n@if (hasRowActions()) {\n <ds-popover\n #rowMenuPopover\n align=\"end\"\n >\n <ds-menu>\n @for (action of rowActions(); track action.id) {\n <ds-menu-item\n [icon]=\"action.icon ?? null\"\n [error]=\"action.error ?? false\"\n [disabled]=\"isActionDisabled(action)\"\n (pressed)=\"onRowAction(action)\"\n >\n {{ action.label }}\n </ds-menu-item>\n }\n </ds-menu>\n </ds-popover>\n}\n\n@if (selectable() && someSelected()) {\n <div class=\"bulk-bar\">\n <span class=\"count\">\n {{ selectedIds().size }} selected\n </span>\n\n <span class=\"sep\"></span>\n\n <ng-content select=\"[bulk-actions]\"></ng-content>\n </div>\n}\n", styles: ["@charset \"UTF-8\";:host{display:block}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host(.bordered) .scroll-wrap{border:var(--border-width-default) solid var(--_table-border);border-radius:var(--_table-radius)}.scroll-wrap{--_table-border: var(--ds-table-border, var(--border-default));--_table-radius: var(--ds-table-radius, var(--radius-md));--_table-bg-color: var(--ds-table-bg-color, var(--surface-default));width:100%;overflow:auto hidden;-webkit-overflow-scrolling:touch;background:var(--surface-default);box-sizing:border-box}.scroll-wrap.scroll-y{overflow-y:auto}:host(.sticky-scrollbar) .scroll-wrap{scrollbar-width:none}:host(.sticky-scrollbar) .scroll-wrap::-webkit-scrollbar{display:none}:host(.resizable) thead th{position:relative;overflow:hidden}.col-resize{position:absolute;inset-block:0;right:0;width:var(--space-2);cursor:col-resize;touch-action:none;-webkit-user-select:none;user-select:none}.col-resize:after{content:\"\";position:absolute;inset-block:var(--space-2);right:0;width:var(--border-width-default);background-color:transparent;transition:background-color var(--duration-fast) var(--ease-standard)}.col-resize:hover:after,.col-resize:active:after{background-color:var(--_table-sort-active-icon-color)}.hscroll-proxy{position:sticky;bottom:0;overflow:auto hidden}.hscroll-spacer{height:1px}.hscroll-hidden{display:none}.table{--_table-bg-color: var(--ds-table-bg-color, var(--surface-default));--_table-row-hover-bg-color: var(--ds-table-row-hover-bg-color, var(--surface-secondary));--_table-row-selected-bg-color: var(--ds-table-row-selected-bg-color, var(--accent-subtitle));--_table-row-pressed-bg-color: var(--ds-table-row-pressed-bg-color, var(--surface-muted));--_table-row-active-bg-color: var(--ds-table-row-active-bg-color, var(--accent-subtitle));--_table-row-stripe-bg-color: var(--ds-table-row-stripe-bg-color, var(--surface-secondary));--_table-head-text-color: var(--ds-table-head-text-color, var(--text-secondary));--_table-head-bg-color: var(--ds-table-head-bg-color, var(--surface-secondary));--_table-head-fs: var(--ds-table-head-fs, var(--font-size-xs));--_table-divider: var(--ds-table-divider, var(--border-divider));--_table-sort-active-icon-color: var(--ds-table-sort-active-icon-color, var(--accent));--_table-cell-pad-x: var(--ds-table-cell-pad-x, var(--table-cell-pad-x));--_table-cell-pad-y: var(--ds-table-cell-pad-y, var(--table-cell-pad-y));--_table-cell-pad-top: var(--ds-table-cell-pad-top, var(--_table-cell-pad-y));--_table-cell-pad-right: var(--ds-table-cell-pad-right, var(--_table-cell-pad-x));--_table-cell-pad-bottom: var(--ds-table-cell-pad-bottom, var(--_table-cell-pad-y));--_table-cell-pad-left: var(--ds-table-cell-pad-left, var(--_table-cell-pad-x));--_table-head-border-color: var(--ds-table-head-border-color, var(--_table-divider));--_table-head-weight: var(--ds-table-head-weight, var(--font-weight-bold));--_table-head-tracking: var(--ds-table-head-tracking, var(--letter-spacing-wider));width:100%;border-collapse:collapse;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--_table-bg-color)}.table thead th{text-align:left;padding:var(--table-head-pad-y) var(--_table-cell-pad-right) var(--table-head-pad-y) var(--_table-cell-pad-left);font:var(--_table-head-weight) var(--_table-head-fs)/var(--line-height-base) var(--font-sans);letter-spacing:var(--_table-head-tracking);text-transform:uppercase;color:var(--_table-head-text-color);background-color:var(--_table-head-bg-color);border-bottom:var(--border-width-default) solid var(--_table-head-border-color);white-space:nowrap}.table thead th .th-label{display:inline-flex;align-items:center;vertical-align:middle;appearance:none;background:none;border:0;margin:0;padding:0;font:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit;text-align:left}.table thead th button.th-label{cursor:pointer;-webkit-user-select:none;user-select:none;transition:color var(--duration-fast) var(--ease-standard)}.table thead th button.th-label:hover{color:var(--text-secondary)}.table thead th button.th-label:focus-visible{outline:var(--border-width-strong, 2px) solid var(--accent);outline-offset:var(--focus-ring-offset);border-radius:var(--radius-sm)}.table thead th .sort-icon{display:inline-block;width:var(--sort-ic-size);height:var(--sort-ic-size);margin-left:var(--sort-ic-gap);vertical-align:middle;transform:translateY(-1px);color:var(--icon-default);opacity:var(--sort-ic-opacity-idle);transition:opacity var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.table thead th .sort-icon .icon{width:var(--sort-ic-size);height:var(--sort-ic-size);display:block}.table thead th.sorted-asc .sort-icon,.table thead th.sorted-desc .sort-icon{opacity:1;color:var(--_table-sort-active-icon-color)}.table thead th.numeric{text-align:right}.table thead th.select-col,.table thead th.expand-col,.table thead th.actions-col{width:var(--space-10)}.table.sticky-header thead th{position:sticky;top:0;z-index:var(--table-sticky-header-z)}.table tbody td{padding:var(--_table-cell-pad-top) var(--_table-cell-pad-right) var(--_table-cell-pad-bottom) var(--_table-cell-pad-left);line-height:var(--line-height-flat);transition:background-color var(--duration-fast) var(--ease-standard);box-shadow:inset 0 calc(-1 * var(--border-width-default)) 0 var(--_table-divider);vertical-align:middle}.table tbody td.numeric{text-align:right}.table tbody td.empty{text-align:center;color:var(--text-tertiary);padding:var(--space-4)}.table tbody tr:last-child td{box-shadow:none}.table tbody tr.clickable:not(.active):hover td{background-color:var(--_table-row-hover-bg-color)}.table tbody tr.selected td{background-color:var(--_table-row-selected-bg-color)}.table tbody tr.active td{background-color:var(--_table-row-active-bg-color)}.table tbody tr.clickable:active td{background-color:var(--_table-row-pressed-bg-color)}.table tbody tr.clickable{cursor:pointer}.table tbody tr.clickable:focus-visible{outline:var(--border-width-strong, 2px) solid var(--accent);outline-offset:-2px}.table tbody .expand-col,.table tbody .actions-col{width:var(--space-10)}.table tbody .expand-chev{display:block;transition:transform var(--duration-base) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.table tbody .expand-chev{transition:none}}.table tbody .expand-chev.is-expanded{transform:rotate(90deg)}.table tbody .expand-panel-cell{padding:var(--_table-cell-pad-top) var(--_table-cell-pad-right) var(--_table-cell-pad-bottom) var(--_table-cell-pad-left)}.table tbody .cell-clip{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.table .expand-btn,.table .row-actions-btn,.table .col-picker-btn{display:flex;align-items:center;justify-content:center;width:var(--space-6);height:var(--space-6);padding:0;border:0;background:none;cursor:pointer;color:var(--icon-default);border-radius:var(--radius-sm);transition:color var(--duration-fast) var(--ease-standard)}.table .expand-btn:hover,.table .row-actions-btn:hover,.table .col-picker-btn:hover{color:var(--icon-strong)}.table .expand-btn:focus-visible,.table .row-actions-btn:focus-visible,.table .col-picker-btn:focus-visible{outline:var(--border-width-strong, 2px) solid var(--accent);outline-offset:var(--focus-ring-offset)}.table.compact tbody td,.table.compact thead th{padding:var(--space-2) var(--space-3)}.table.zebra tbody tr:nth-child(odd) td{background-color:var(--_table-row-stripe-bg-color)}.col-picker{display:grid;gap:var(--space-2);min-width:160px}.col-picker-row{display:flex;align-items:center;gap:var(--space-2)}.col-picker-row.cdk-drag-preview{background-color:var(--surface-default);border-radius:var(--radius-sm);box-shadow:var(--shadow-popover);padding:var(--space-1) var(--space-2)}.col-picker-row.cdk-drag-placeholder{opacity:.4}.col-picker.cdk-drop-list-dragging .col-picker-row:not(.cdk-drag-placeholder){transition:transform var(--duration-fast) var(--ease-standard)}.col-drag{display:inline-flex;color:var(--icon-default);cursor:grab}.col-drag:active{cursor:grabbing}.col-picker-option{display:flex;align-items:center;gap:var(--space-2);flex:1;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer}.col-picker-option:has(input:disabled){color:var(--text-tertiary);cursor:default}.col-move{display:inline-flex;gap:var(--space-1)}.col-move-btn{display:inline-flex;padding:0;border:0;background:none;color:var(--icon-default);cursor:pointer}.col-move-btn:hover:not(:disabled){color:var(--icon-strong)}.col-move-btn:disabled{color:var(--text-disabled);cursor:default}.col-reset{margin-top:var(--space-1);padding:0;border:0;background:none;color:var(--accent);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);cursor:pointer;text-align:left}.col-reset:hover{text-decoration:underline}.col-filter-btn{display:inline-flex;margin-left:var(--space-1);padding:0;border:0;background:none;color:var(--icon-default);opacity:.5;cursor:pointer;vertical-align:middle;transition:color var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.col-filter-btn:hover{opacity:1;color:var(--icon-strong)}.col-filter-btn.active{opacity:1;color:var(--_table-sort-active-icon-color)}.col-filter{display:grid;gap:var(--space-2);min-width:180px}.col-filter-search{width:100%;box-sizing:border-box;padding:var(--space-1) var(--space-2);border:var(--border-width-default) solid var(--border-default);border-radius:var(--radius-sm);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--surface-default)}.col-filter-search:focus-visible{outline:0;border-color:var(--accent)}.col-filter-list{display:grid;gap:var(--space-1);max-height:240px;overflow-y:auto}.col-filter-option{display:flex;align-items:center;gap:var(--space-2);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer}.col-filter-empty{color:var(--text-tertiary);font-size:var(--font-size-s);padding:var(--space-1) 0}.col-filter-footer{display:flex;align-items:center;justify-content:space-between;padding-top:var(--space-1);border-top:var(--border-width-default) solid var(--border-divider)}.col-filter-count{color:var(--text-tertiary);font-size:var(--font-size-xs)}.col-filter-footer .col-reset{margin-top:0}.editable-cell{cursor:text}.cell-edit{width:100%;box-sizing:border-box;margin:calc(-1 * var(--space-1)) 0;padding:var(--space-1) var(--space-2);border:var(--border-width-default) solid var(--accent);border-radius:var(--radius-sm);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--surface-default)}.cell-edit:focus-visible{outline:0}.cell-text-pop{max-width:360px;overflow-wrap:anywhere;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary)}:host(.pinned){--_table-select-w: var(--ds-table-select-col-w, var(--space-10))}:host(.pinned) .table{border-collapse:separate;border-spacing:0}:host(.pinned) .table tbody td{box-shadow:none;border-bottom:var(--border-width-default) solid var(--_table-divider)}:host(.pinned) .table tbody tr:last-child td{border-bottom:0}:host(.pinned) .pin-select,:host(.pinned) .pin-first{position:sticky;left:0;z-index:var(--table-sticky-col-z);background-color:var(--_table-bg-color)}:host(.pinned) thead .pin-select,:host(.pinned) thead .pin-first{z-index:var(--table-sticky-corner-z);background-color:var(--_table-head-bg-color)}:host(.pinned) tbody tr.clickable:not(.active):hover .pin-first,:host(.pinned) tbody tr.clickable:not(.active):hover .pin-select{background-color:var(--_table-row-hover-bg-color)}:host(.pinned) tbody tr.selected .pin-first,:host(.pinned) tbody tr.selected .pin-select{background-color:var(--_table-row-selected-bg-color)}:host(.pinned) tbody tr.active .pin-first,:host(.pinned) tbody tr.active .pin-select{background-color:var(--_table-row-active-bg-color)}:host(.pinned) tbody tr.clickable:active .pin-first,:host(.pinned) tbody tr.clickable:active .pin-select{background-color:var(--_table-row-pressed-bg-color)}:host(.pinned.selectable) .pin-first{left:var(--_table-select-w)}:host(.pinned.expandable){--_table-expand-w: var(--ds-table-expand-col-w, var(--space-10))}:host(.pinned.expandable) .pin-expand{position:sticky;left:0;z-index:var(--table-sticky-col-z);background-color:var(--_table-bg-color)}:host(.pinned.expandable) thead .pin-expand{z-index:var(--table-sticky-corner-z);background-color:var(--_table-head-bg-color)}:host(.pinned.expandable) tbody tr.clickable:not(.active):hover .pin-expand{background-color:var(--_table-row-hover-bg-color)}:host(.pinned.expandable) tbody tr.selected .pin-expand{background-color:var(--_table-row-selected-bg-color)}:host(.pinned.expandable) tbody tr.active .pin-expand{background-color:var(--_table-row-active-bg-color)}:host(.pinned.expandable) tbody tr.clickable:active .pin-expand{background-color:var(--_table-row-pressed-bg-color)}:host(.pinned.expandable) .pin-first{left:var(--_table-expand-w)}:host(.pinned.selectable.expandable) .pin-expand{left:var(--_table-select-w)}:host(.pinned.selectable.expandable) .pin-first{left:calc(var(--_table-select-w) + var(--_table-expand-w))}.pagination-footer{padding-top:var(--space-3);border-top:var(--border-width-default) solid var(--ds-table-divider, var(--border-divider))}.bulk-bar{position:sticky;bottom:var(--bulk-bar-offset);display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--space-4);background:var(--surface-inverted);color:var(--text-inverted);border-radius:var(--radius-lg);box-shadow:var(--shadow-toast);margin:var(--space-4) auto 0;width:fit-content}.bulk-bar .count{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-flat) var(--font-sans)}.bulk-bar .sep{width:var(--border-width-default);height:var(--space-4);background:var(--border-inverted)}.bulk-bar .button{background:transparent;color:var(--text-inverted)}.bulk-bar .button:hover{background:var(--surface-inverted-hover)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline"] }, { kind: "component", type: PaginationComponent, selector: "ds-pagination", inputs: ["total", "pageSize", "currentPage", "pageSizeOptions", "showLabel", "showPageSize"], outputs: ["pageSizeChange", "currentPageChange"] }, { kind: "component", type: LoadingOverlayComponent, selector: "ds-loading-overlay", inputs: ["loading", "label", "blur", "spinnerSize", "insetTop"] }, { kind: "component", type: PopoverComponent, selector: "ds-popover", inputs: ["align", "placement", "arrow", "panelRole", "panelLabel"] }, { kind: "component", type: MenuComponent, selector: "ds-menu" }, { kind: "component", type: MenuItemComponent, selector: "ds-menu-item", inputs: ["icon", "disabled", "error", "submenu"], outputs: ["pressed"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }] });
|
|
3529
3821
|
}
|
|
3530
3822
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TableComponent, decorators: [{
|
|
3531
3823
|
type: Component,
|
|
@@ -3548,8 +3840,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
3548
3840
|
'[class.expandable]': 'expandableRows()',
|
|
3549
3841
|
'[class.sticky-scrollbar]': 'stickyScrollbar()',
|
|
3550
3842
|
'[class.resizable]': 'resizableColumns()',
|
|
3551
|
-
}, template: "<div\n #scrollWrap\n class=\"scroll-wrap\"\n [class.scroll-y]=\"maxHeight()\"\n [style.max-height]=\"maxHeight()\"\n>\n <div\n class=\"visually-hidden\"\n role=\"status\"\n aria-live=\"polite\"\n >\n @if (loading() !== false) {\n Loading\u2026\n }\n </div>\n\n <ds-loading-overlay\n [loading]=\"isOverlayLoading()\"\n [blur]=\"true\"\n [insetTop]=\"'var(--ds-table-head-h, 40px)'\"\n >\n <table\n [class]=\"tableClasses()\"\n [attr.role]=\"rowInteractive() ? 'grid' : null\"\n [attr.aria-busy]=\"loading() !== false ? 'true' : null\"\n >\n @if (caption()) {\n <caption class=\"visually-hidden\">\n {{\n caption()\n }}\n </caption>\n }\n\n <thead>\n <tr>\n @if (selectable()) {\n <th\n scope=\"col\"\n class=\"select-col pin-select\"\n >\n <input\n type=\"checkbox\"\n class=\"check\"\n [attr.aria-label]=\"selectAllLabel()\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (change)=\"onToggleAll($event)\"\n />\n </th>\n }\n\n @if (expandableRows()) {\n <th\n scope=\"col\"\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\"\n >\n </th>\n }\n\n @for (col of visibleColumns(); track col.key; let first = $first) {\n <th\n scope=\"col\"\n [class]=\"headerClasses(col)\"\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n [style.width.px]=\"columnWidth(col)\"\n [style.min-width.px]=\"columnWidth(col)\"\n [style.max-width.px]=\"columnWidth(col)\"\n [attr.aria-sort]=\"ariaSort(col)\"\n >\n @if (col.sortable) {\n <button\n type=\"button\"\n class=\"th-label\"\n (click)=\"onSort(col)\"\n >\n @if (col.label) {\n {{ col.label }}\n } @else if (col.srLabel) {\n <span class=\"visually-hidden\">\n {{ col.srLabel }}\n </span>\n }\n\n <ds-icon\n class=\"sort-icon\"\n [name]=\"sortIcon(col)\"\n [size]=\"12\"\n >\n </ds-icon>\n </button>\n } @else {\n <span class=\"th-label\">\n @if (col.label) {\n {{ col.label }}\n } @else if (col.srLabel) {\n <span class=\"visually-hidden\">\n {{ col.srLabel }}\n </span>\n }\n </span>\n }\n\n @if (hasColumnFilter(col)) {\n <button\n type=\"button\"\n class=\"col-filter-btn\"\n aria-haspopup=\"dialog\"\n [class.active]=\"isColumnFiltered(col)\"\n [attr.aria-label]=\"'Filter ' + col.label\"\n (click)=\"onColumnFilterClick(col, $event)\"\n >\n <ds-icon\n name=\"filter\"\n [size]=\"12\"\n />\n </button>\n }\n\n @if (resizableColumns()) {\n <span\n class=\"col-resize\"\n aria-hidden=\"true\"\n (pointerdown)=\"onResizeStart(col, $event)\"\n (pointermove)=\"onResizeMove($event)\"\n (pointerup)=\"onResizeEnd()\"\n (pointercancel)=\"onResizeEnd()\"\n >\n </span>\n }\n </th>\n }\n\n @if (hasUtilityColumn()) {\n <th\n scope=\"col\"\n class=\"actions-col\"\n >\n @if (hasColumnPicker()) {\n <button\n type=\"button\"\n class=\"col-picker-btn\"\n aria-haspopup=\"dialog\"\n aria-label=\"Choose columns\"\n [attr.aria-expanded]=\"columnPickerOpened()\"\n (click)=\"onColumnPickerClick($event)\"\n >\n <ds-icon\n name=\"grid\"\n [size]=\"14\"\n />\n </button>\n } @else {\n <span class=\"visually-hidden\">\n Actions\n </span>\n }\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @if (isSkeletonLoading()) {\n @for (_ of skeletonArray(); track $index; let rowIndex = $index) {\n <tr>\n @if (selectable()) {\n <td class=\"select-col pin-select\">\n <ds-skeleton\n width=\"14px\"\n height=\"14px\"\n [inline]=\"true\"\n />\n </td>\n }\n\n @if (expandableRows()) {\n <td\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\"\n >\n </td>\n }\n\n @for (\n col of visibleColumns();\n track col.key;\n let first = $first\n ) {\n <td\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n >\n <ds-skeleton\n height=\"14px\"\n [width]=\"skeletonWidth(col, rowIndex)\"\n [inline]=\"true\"\n />\n </td>\n }\n\n @if (hasUtilityColumn()) {\n <td class=\"actions-col\"></td>\n }\n </tr>\n }\n } @else if (!filteredData().length) {\n <tr>\n <td\n class=\"empty\"\n [attr.colspan]=\"expandedColspan()\"\n >\n @if (emptyTemplate()) {\n <ng-container [ngTemplateOutlet]=\"emptyTemplate()!\">\n </ng-container>\n } @else {\n <ng-content select=\"[empty]\"></ng-content>\n }\n </td>\n </tr>\n } @else {\n @for (row of displayData(); track row.id) {\n <tr\n [class.selected]=\"isSelected(row)\"\n [class.expanded]=\"isExpanded(row)\"\n [class.clickable]=\"rowInteractive()\"\n [class.active]=\"row.id === activeRowId()\"\n [attr.aria-current]=\"row.id === activeRowId() ? 'true' : null\"\n [attr.tabindex]=\"rowInteractive() ? 0 : null\"\n [attr.aria-label]=\"rowInteractive() ? rowAriaLabel(row) : null\"\n (mousedown)=\"onRowMousedown()\"\n (click)=\"onRowClick(row, $event)\"\n (keydown.enter)=\"onRowKey(row, $event)\"\n (keydown.space)=\"onRowKey(row, $event)\"\n >\n @if (selectable()) {\n <td class=\"select-col pin-select\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [attr.aria-label]=\"'Select ' + rowAriaLabel(row)\"\n [checked]=\"isSelected(row)\"\n (change)=\"onToggleRow(row, $event)\"\n (click)=\"$event.stopPropagation()\"\n />\n </td>\n }\n\n @if (expandableRows()) {\n <td\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\"\n >\n <button\n type=\"button\"\n class=\"expand-btn\"\n [attr.aria-expanded]=\"isExpanded(row)\"\n [attr.aria-label]=\"\n isExpanded(row) ? 'Collapse row' : 'Expand row'\n \"\n (click)=\"onToggleExpand(row, $event)\"\n >\n <ds-icon\n class=\"expand-chev\"\n name=\"chevronRight\"\n [class.is-expanded]=\"isExpanded(row)\"\n [size]=\"16\"\n />\n </button>\n </td>\n }\n\n @for (\n col of visibleColumns();\n track col.key;\n let first = $first\n ) {\n <td\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n [class.editable-cell]=\"col.editable\"\n (dblclick)=\"startEdit(row, col, $event)\"\n >\n @if (isEditing(row, col)) {\n <input\n #editInput\n type=\"text\"\n class=\"cell-edit\"\n [value]=\"editDraft()\"\n (input)=\"onEditInput($event)\"\n (click)=\"$event.stopPropagation()\"\n (keydown.enter)=\"commitEdit(row, col)\"\n (keydown.escape)=\"cancelEdit()\"\n (blur)=\"commitEdit(row, col)\"\n />\n } @else if (cellTemplate(col); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row, row: row }\"\n >\n </ng-container>\n } @else if (col.truncate) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- pointer-only enhancement: the clip is visual (CSS ellipsis), keyboard/AT users already get the full DOM text + title; a tab stop per cell would wreck keyboard traversal -->\n <span\n class=\"cell-clip\"\n [style.max-width.px]=\"col.width ?? 240\"\n [attr.title]=\"cellValue(row, col)\"\n (click)=\"onCellClipClick(row, col, $event)\"\n >\n {{ cellValue(row, col) }}\n </span>\n } @else {\n {{ cellValue(row, col) }}\n }\n </td>\n }\n\n @if (hasUtilityColumn()) {\n <td class=\"actions-col\">\n @if (hasRowActions()) {\n <button\n type=\"button\"\n class=\"row-actions-btn\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"isMenuOpenFor(row)\"\n [attr.aria-label]=\"'Actions for ' + rowAriaLabel(row)\"\n (click)=\"onRowMenuClick(row, $event)\"\n (keydown.enter)=\"$event.stopPropagation()\"\n (keydown.space)=\"$event.stopPropagation()\"\n >\n <ds-icon\n name=\"moreV\"\n [size]=\"16\"\n />\n </button>\n }\n </td>\n }\n </tr>\n\n @if (expandableRows() && isExpanded(row) && rowExpandTemplate()) {\n <tr class=\"expand-panel-row\">\n <td\n class=\"expand-panel-cell\"\n [attr.colspan]=\"expandedColspan()\"\n >\n <ng-container\n [ngTemplateOutlet]=\"rowExpandTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: row, row: row }\"\n >\n </ng-container>\n </td>\n </tr>\n }\n }\n }\n </tbody>\n </table>\n </ds-loading-overlay>\n</div>\n\n@if (stickyScrollbar()) {\n <div\n #hscrollProxy\n class=\"hscroll-proxy\"\n aria-hidden=\"true\"\n [class.hscroll-hidden]=\"!hscrollNeeded()\"\n >\n <div\n class=\"hscroll-spacer\"\n [style.width.px]=\"hscrollContentWidth()\"\n >\n </div>\n </div>\n}\n\n@if (pageSize(); as size) {\n <div class=\"pagination-footer\">\n <ds-pagination\n [total]=\"total() ?? filteredData().length\"\n [pageSize]=\"size\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n [(currentPage)]=\"page\"\n (pageSizeChange)=\"pageSize.set($event)\"\n />\n </div>\n}\n\n@if (hasTruncate()) {\n <ds-popover #cellTextPopover>\n <div class=\"cell-text-pop\">\n {{ cellPopoverText() }}\n </div>\n </ds-popover>\n}\n\n@if (filterColumn()) {\n <ds-popover\n #columnFilterPopover\n align=\"start\"\n panelRole=\"dialog\"\n panelLabel=\"Filter values\"\n >\n <div class=\"col-filter\">\n <input\n type=\"text\"\n class=\"col-filter-search\"\n placeholder=\"Search\u2026\"\n [value]=\"filterSearch()\"\n (input)=\"onFilterSearch($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n\n <div class=\"col-filter-list\">\n @for (value of filterValues(); track value) {\n <label class=\"col-filter-option\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [checked]=\"isFilterValueChecked(value)\"\n (change)=\"toggleFilterValue(value)\"\n />\n {{ value || '(empty)' }}\n </label>\n } @empty {\n <div class=\"col-filter-empty\">\n No matches\n </div>\n }\n </div>\n\n <div class=\"col-filter-footer\">\n <span class=\"col-filter-count\">\n {{ filterSelectedCount() }} selected\n </span>\n\n <button\n type=\"button\"\n class=\"col-reset\"\n (click)=\"clearColumnFilter()\"\n >\n Clear\n </button>\n </div>\n </div>\n </ds-popover>\n}\n\n@if (hasColumnPicker()) {\n <ds-popover\n #columnPickerPopover\n align=\"end\"\n panelRole=\"dialog\"\n panelLabel=\"Column visibility\"\n >\n <div\n class=\"col-picker\"\n cdkDropList\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n >\n @for (\n col of orderedColumns();\n track col.key;\n let first = $first;\n let last = $last\n ) {\n <div\n class=\"col-picker-row\"\n cdkDrag\n [cdkDragDisabled]=\"!reorderableColumns()\"\n >\n @if (reorderableColumns()) {\n <span\n class=\"col-drag\"\n cdkDragHandle\n aria-hidden=\"true\"\n >\n <ds-icon\n name=\"drag\"\n [size]=\"14\"\n />\n </span>\n }\n\n <label class=\"col-picker-option\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [checked]=\"isColumnVisible(col)\"\n [disabled]=\"!col.hideable || isColumnLocked(col)\"\n (change)=\"toggleColumn(col)\"\n />\n {{ col.label }}\n </label>\n\n @if (reorderableColumns()) {\n <span class=\"col-move\">\n <button\n type=\"button\"\n class=\"col-move-btn\"\n aria-label=\"Move up\"\n [disabled]=\"first\"\n (click)=\"moveColumn(col, -1)\"\n >\n <ds-icon\n name=\"chevronUp\"\n [size]=\"14\"\n />\n </button>\n\n <button\n type=\"button\"\n class=\"col-move-btn\"\n aria-label=\"Move down\"\n [disabled]=\"last\"\n (click)=\"moveColumn(col, 1)\"\n >\n <ds-icon\n name=\"chevronDown\"\n [size]=\"14\"\n />\n </button>\n </span>\n }\n </div>\n }\n\n <button\n type=\"button\"\n class=\"col-reset\"\n (click)=\"resetColumns()\"\n >\n Reset to default\n </button>\n </div>\n </ds-popover>\n}\n\n@if (hasRowActions()) {\n <ds-popover\n #rowMenuPopover\n align=\"end\"\n >\n <ds-menu>\n @for (action of rowActions(); track action.id) {\n <ds-menu-item\n [icon]=\"action.icon ?? null\"\n [error]=\"action.error ?? false\"\n [disabled]=\"isActionDisabled(action)\"\n (pressed)=\"onRowAction(action)\"\n >\n {{ action.label }}\n </ds-menu-item>\n }\n </ds-menu>\n </ds-popover>\n}\n\n@if (selectable() && someSelected()) {\n <div class=\"bulk-bar\">\n <span class=\"count\">\n {{ selectedIds().size }} selected\n </span>\n\n <span class=\"sep\"></span>\n\n <ng-content select=\"[bulk-actions]\"></ng-content>\n </div>\n}\n", styles: ["@charset \"UTF-8\";:host{display:block}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host(.bordered) .scroll-wrap{border:var(--border-width-default) solid var(--_table-border);border-radius:var(--_table-radius)}.scroll-wrap{--_table-border: var(--ds-table-border, var(--border-default));--_table-radius: var(--ds-table-radius, var(--radius-md));--_table-bg-color: var(--ds-table-bg-color, var(--surface-default));width:100%;overflow:auto hidden;-webkit-overflow-scrolling:touch;background:var(--surface-default);box-sizing:border-box}.scroll-wrap.scroll-y{overflow-y:auto}:host(.sticky-scrollbar) .scroll-wrap{scrollbar-width:none}:host(.sticky-scrollbar) .scroll-wrap::-webkit-scrollbar{display:none}:host(.resizable) thead th{position:relative;overflow:hidden}.col-resize{position:absolute;inset-block:0;right:0;width:var(--space-2);cursor:col-resize;touch-action:none;-webkit-user-select:none;user-select:none}.col-resize:after{content:\"\";position:absolute;inset-block:var(--space-2);right:0;width:var(--border-width-default);background-color:transparent;transition:background-color var(--duration-fast) var(--ease-standard)}.col-resize:hover:after,.col-resize:active:after{background-color:var(--_table-sort-active-icon-color)}.hscroll-proxy{position:sticky;bottom:0;overflow:auto hidden}.hscroll-spacer{height:1px}.hscroll-hidden{display:none}.table{--_table-bg-color: var(--ds-table-bg-color, var(--surface-default));--_table-row-hover-bg-color: var(--ds-table-row-hover-bg-color, var(--surface-secondary));--_table-row-selected-bg-color: var(--ds-table-row-selected-bg-color, var(--accent-subtitle));--_table-row-pressed-bg-color: var(--ds-table-row-pressed-bg-color, var(--surface-muted));--_table-row-active-bg-color: var(--ds-table-row-active-bg-color, var(--accent-subtitle));--_table-row-stripe-bg-color: var(--ds-table-row-stripe-bg-color, var(--surface-secondary));--_table-head-text-color: var(--ds-table-head-text-color, var(--text-secondary));--_table-head-bg-color: var(--ds-table-head-bg-color, var(--surface-secondary));--_table-head-fs: var(--ds-table-head-fs, var(--font-size-xs));--_table-divider: var(--ds-table-divider, var(--border-divider));--_table-sort-active-icon-color: var(--ds-table-sort-active-icon-color, var(--accent));--_table-cell-pad-x: var(--ds-table-cell-pad-x, var(--table-cell-pad-x));--_table-cell-pad-y: var(--ds-table-cell-pad-y, var(--table-cell-pad-y));width:100%;border-collapse:collapse;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--_table-bg-color)}.table thead th{text-align:left;padding:var(--table-head-pad-y) var(--_table-cell-pad-x);font:var(--font-weight-bold) var(--_table-head-fs)/var(--line-height-base) var(--font-sans);letter-spacing:var(--letter-spacing-wider);text-transform:uppercase;color:var(--_table-head-text-color);background-color:var(--_table-head-bg-color);border-bottom:var(--border-width-default) solid var(--_table-divider);white-space:nowrap}.table thead th .th-label{display:inline-flex;align-items:center;vertical-align:middle;appearance:none;background:none;border:0;margin:0;padding:0;font:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit;text-align:left}.table thead th button.th-label{cursor:pointer;-webkit-user-select:none;user-select:none;transition:color var(--duration-fast) var(--ease-standard)}.table thead th button.th-label:hover{color:var(--text-secondary)}.table thead th button.th-label:focus-visible{outline:var(--border-width-strong, 2px) solid var(--accent);outline-offset:var(--focus-ring-offset);border-radius:var(--radius-sm)}.table thead th .sort-icon{display:inline-block;width:var(--sort-ic-size);height:var(--sort-ic-size);margin-left:var(--sort-ic-gap);vertical-align:middle;transform:translateY(-1px);color:var(--icon-default);opacity:var(--sort-ic-opacity-idle);transition:opacity var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.table thead th .sort-icon .icon{width:var(--sort-ic-size);height:var(--sort-ic-size);display:block}.table thead th.sorted-asc .sort-icon,.table thead th.sorted-desc .sort-icon{opacity:1;color:var(--_table-sort-active-icon-color)}.table thead th.numeric{text-align:right}.table thead th.select-col,.table thead th.expand-col,.table thead th.actions-col{width:var(--space-10)}.table.sticky-header thead th{position:sticky;top:0;z-index:var(--table-sticky-header-z)}.table tbody td{padding:var(--_table-cell-pad-y) var(--_table-cell-pad-x);line-height:var(--line-height-flat);transition:background-color var(--duration-fast) var(--ease-standard);box-shadow:inset 0 calc(-1 * var(--border-width-default)) 0 var(--_table-divider);vertical-align:middle}.table tbody td.numeric{text-align:right}.table tbody td.empty{text-align:center;color:var(--text-tertiary);padding:var(--space-4)}.table tbody tr:last-child td{box-shadow:none}.table tbody tr.clickable:not(.active):hover td{background-color:var(--_table-row-hover-bg-color)}.table tbody tr.selected td{background-color:var(--_table-row-selected-bg-color)}.table tbody tr.active td{background-color:var(--_table-row-active-bg-color)}.table tbody tr.clickable:active td{background-color:var(--_table-row-pressed-bg-color)}.table tbody tr.clickable{cursor:pointer}.table tbody tr.clickable:focus-visible{outline:var(--border-width-strong, 2px) solid var(--accent);outline-offset:-2px}.table tbody .expand-col,.table tbody .actions-col{width:var(--space-10)}.table tbody .expand-chev{display:block;transition:transform var(--duration-base) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.table tbody .expand-chev{transition:none}}.table tbody .expand-chev.is-expanded{transform:rotate(90deg)}.table tbody .expand-panel-cell{padding:var(--_table-cell-pad-y) var(--_table-cell-pad-x)}.table tbody .cell-clip{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.table .expand-btn,.table .row-actions-btn,.table .col-picker-btn{display:flex;align-items:center;justify-content:center;width:var(--space-6);height:var(--space-6);padding:0;border:0;background:none;cursor:pointer;color:var(--icon-default);border-radius:var(--radius-sm);transition:color var(--duration-fast) var(--ease-standard)}.table .expand-btn:hover,.table .row-actions-btn:hover,.table .col-picker-btn:hover{color:var(--icon-strong)}.table .expand-btn:focus-visible,.table .row-actions-btn:focus-visible,.table .col-picker-btn:focus-visible{outline:var(--border-width-strong, 2px) solid var(--accent);outline-offset:var(--focus-ring-offset)}.table.compact tbody td,.table.compact thead th{padding:var(--space-2) var(--space-3)}.table.zebra tbody tr:nth-child(odd) td{background-color:var(--_table-row-stripe-bg-color)}.col-picker{display:grid;gap:var(--space-2);min-width:160px}.col-picker-row{display:flex;align-items:center;gap:var(--space-2)}.col-picker-row.cdk-drag-preview{background-color:var(--surface-default);border-radius:var(--radius-sm);box-shadow:var(--shadow-popover);padding:var(--space-1) var(--space-2)}.col-picker-row.cdk-drag-placeholder{opacity:.4}.col-picker.cdk-drop-list-dragging .col-picker-row:not(.cdk-drag-placeholder){transition:transform var(--duration-fast) var(--ease-standard)}.col-drag{display:inline-flex;color:var(--icon-default);cursor:grab}.col-drag:active{cursor:grabbing}.col-picker-option{display:flex;align-items:center;gap:var(--space-2);flex:1;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer}.col-picker-option:has(input:disabled){color:var(--text-tertiary);cursor:default}.col-move{display:inline-flex;gap:var(--space-1)}.col-move-btn{display:inline-flex;padding:0;border:0;background:none;color:var(--icon-default);cursor:pointer}.col-move-btn:hover:not(:disabled){color:var(--icon-strong)}.col-move-btn:disabled{color:var(--text-disabled);cursor:default}.col-reset{margin-top:var(--space-1);padding:0;border:0;background:none;color:var(--accent);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);cursor:pointer;text-align:left}.col-reset:hover{text-decoration:underline}.col-filter-btn{display:inline-flex;margin-left:var(--space-1);padding:0;border:0;background:none;color:var(--icon-default);opacity:.5;cursor:pointer;vertical-align:middle;transition:color var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.col-filter-btn:hover{opacity:1;color:var(--icon-strong)}.col-filter-btn.active{opacity:1;color:var(--_table-sort-active-icon-color)}.col-filter{display:grid;gap:var(--space-2);min-width:180px}.col-filter-search{width:100%;box-sizing:border-box;padding:var(--space-1) var(--space-2);border:var(--border-width-default) solid var(--border-default);border-radius:var(--radius-sm);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--surface-default)}.col-filter-search:focus-visible{outline:0;border-color:var(--accent)}.col-filter-list{display:grid;gap:var(--space-1);max-height:240px;overflow-y:auto}.col-filter-option{display:flex;align-items:center;gap:var(--space-2);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer}.col-filter-empty{color:var(--text-tertiary);font-size:var(--font-size-s);padding:var(--space-1) 0}.col-filter-footer{display:flex;align-items:center;justify-content:space-between;padding-top:var(--space-1);border-top:var(--border-width-default) solid var(--border-divider)}.col-filter-count{color:var(--text-tertiary);font-size:var(--font-size-xs)}.col-filter-footer .col-reset{margin-top:0}.editable-cell{cursor:text}.cell-edit{width:100%;box-sizing:border-box;margin:calc(-1 * var(--space-1)) 0;padding:var(--space-1) var(--space-2);border:var(--border-width-default) solid var(--accent);border-radius:var(--radius-sm);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--surface-default)}.cell-edit:focus-visible{outline:0}.cell-text-pop{max-width:360px;overflow-wrap:anywhere;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary)}:host(.pinned){--_table-select-w: var(--ds-table-select-col-w, var(--space-10))}:host(.pinned) .table{border-collapse:separate;border-spacing:0}:host(.pinned) .table tbody td{box-shadow:none;border-bottom:var(--border-width-default) solid var(--_table-divider)}:host(.pinned) .table tbody tr:last-child td{border-bottom:0}:host(.pinned) .pin-select,:host(.pinned) .pin-first{position:sticky;left:0;z-index:var(--table-sticky-col-z);background-color:var(--_table-bg-color)}:host(.pinned) thead .pin-select,:host(.pinned) thead .pin-first{z-index:var(--table-sticky-corner-z);background-color:var(--_table-head-bg-color)}:host(.pinned) tbody tr.clickable:not(.active):hover .pin-first,:host(.pinned) tbody tr.clickable:not(.active):hover .pin-select{background-color:var(--_table-row-hover-bg-color)}:host(.pinned) tbody tr.selected .pin-first,:host(.pinned) tbody tr.selected .pin-select{background-color:var(--_table-row-selected-bg-color)}:host(.pinned) tbody tr.active .pin-first,:host(.pinned) tbody tr.active .pin-select{background-color:var(--_table-row-active-bg-color)}:host(.pinned) tbody tr.clickable:active .pin-first,:host(.pinned) tbody tr.clickable:active .pin-select{background-color:var(--_table-row-pressed-bg-color)}:host(.pinned.selectable) .pin-first{left:var(--_table-select-w)}:host(.pinned.expandable){--_table-expand-w: var(--ds-table-expand-col-w, var(--space-10))}:host(.pinned.expandable) .pin-expand{position:sticky;left:0;z-index:var(--table-sticky-col-z);background-color:var(--_table-bg-color)}:host(.pinned.expandable) thead .pin-expand{z-index:var(--table-sticky-corner-z);background-color:var(--_table-head-bg-color)}:host(.pinned.expandable) tbody tr.clickable:not(.active):hover .pin-expand{background-color:var(--_table-row-hover-bg-color)}:host(.pinned.expandable) tbody tr.selected .pin-expand{background-color:var(--_table-row-selected-bg-color)}:host(.pinned.expandable) tbody tr.active .pin-expand{background-color:var(--_table-row-active-bg-color)}:host(.pinned.expandable) tbody tr.clickable:active .pin-expand{background-color:var(--_table-row-pressed-bg-color)}:host(.pinned.expandable) .pin-first{left:var(--_table-expand-w)}:host(.pinned.selectable.expandable) .pin-expand{left:var(--_table-select-w)}:host(.pinned.selectable.expandable) .pin-first{left:calc(var(--_table-select-w) + var(--_table-expand-w))}.pagination-footer{padding-top:var(--space-3);border-top:var(--border-width-default) solid var(--ds-table-divider, var(--border-divider))}.bulk-bar{position:sticky;bottom:var(--bulk-bar-offset);display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--space-4);background:var(--surface-inverted);color:var(--text-inverted);border-radius:var(--radius-lg);box-shadow:var(--shadow-toast);margin:var(--space-4) auto 0;width:fit-content}.bulk-bar .count{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-flat) var(--font-sans)}.bulk-bar .sep{width:var(--border-width-default);height:var(--space-4);background:var(--border-inverted)}.bulk-bar .button{background:transparent;color:var(--text-inverted)}.bulk-bar .button:hover{background:var(--surface-inverted-hover)}\n"] }]
|
|
3552
|
-
}], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], stickyHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyHeader", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], zebra: [{ type: i0.Input, args: [{ isSignal: true, alias: "zebra", required: false }] }], animateHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "animateHeight", required: false }] }], selectedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedIds", required: false }] }, { type: i0.Output, args: ["selectedIdsChange"] }], sortKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortKey", required: false }] }, { type: i0.Output, args: ["sortKeyChange"] }], sortDir: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortDir", required: false }] }, { type: i0.Output, args: ["sortDirChange"] }], sortingOrder: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortingOrder", required: false }] }], skeletonRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeletonRows", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], rowInteractive: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowInteractive", required: false }] }], activeRowId: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeRowId", required: false }] }], filterQuery: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterQuery", required: false }] }], columnFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnFilters", required: false }] }, { type: i0.Output, args: ["columnFiltersChange"] }], hiddenKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "hiddenKeys", required: false }] }, { type: i0.Output, args: ["hiddenKeysChange"] }], resizableColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizableColumns", required: false }] }], columnWidths: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnWidths", required: false }] }, { type: i0.Output, args: ["columnWidthsChange"] }], reorderableColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "reorderableColumns", required: false }] }], columnOrder: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnOrder", required: false }] }, { type: i0.Output, args: ["columnOrderChange"] }], stickyScrollbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyScrollbar", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }, { type: i0.Output, args: ["pageSizeChange"] }], page: [{ type: i0.Input, args: [{ isSignal: true, alias: "page", required: false }] }, { type: i0.Output, args: ["pageChange"] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }], scrollToTopOnPageChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollToTopOnPageChange", required: false }] }], clientSort: [{ type: i0.Input, args: [{ isSignal: true, alias: "clientSort", required: false }] }], stickyFirstColumn: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyFirstColumn", required: false }] }], rowClicked: [{ type: i0.Output, args: ["rowClicked"] }], sortChange: [{ type: i0.Output, args: ["sortChange"] }], rowActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowActions", required: false }] }], rowActionSelected: [{ type: i0.Output, args: ["rowActionSelected"] }], cellEdited: [{ type: i0.Output, args: ["cellEdited"] }], cellTemplateMap: [{ type: i0.Input, args: [{ isSignal: true, alias: "cellTemplateMap", required: false }] }], emptyTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyTemplate", required: false }] }], expandableRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandableRows", required: false }] }], expandedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedIds", required: false }] }, { type: i0.Output, args: ["expandedIdsChange"] }], rowExpandTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowExpandTemplate", required: false }] }], cellTemplateDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => CellTemplateDirective), { isSignal: true }] }], columnFilterPopover: [{ type: i0.ViewChild, args: ['columnFilterPopover', { isSignal: true }] }], editInput: [{ type: i0.ViewChild, args: ['editInput', { isSignal: true }] }], rowMenuPopover: [{ type: i0.ViewChild, args: ['rowMenuPopover', { isSignal: true }] }], columnPickerPopover: [{ type: i0.ViewChild, args: ['columnPickerPopover', { isSignal: true }] }], cellTextPopover: [{ type: i0.ViewChild, args: ['cellTextPopover', { isSignal: true }] }], scrollWrap: [{ type: i0.ViewChild, args: ['scrollWrap', { isSignal: true }] }], hscrollProxy: [{ type: i0.ViewChild, args: ['hscrollProxy', { isSignal: true }] }] } });
|
|
3843
|
+
}, template: "<div\n #scrollWrap\n class=\"scroll-wrap\"\n [class.scroll-y]=\"maxHeight()\"\n [style.max-height]=\"maxHeight()\"\n>\n <div\n class=\"visually-hidden\"\n role=\"status\"\n aria-live=\"polite\"\n >\n @if (loading() !== false) {\n Loading\u2026\n }\n </div>\n\n <ds-loading-overlay\n [loading]=\"isOverlayLoading()\"\n [blur]=\"true\"\n [insetTop]=\"'var(--ds-table-head-h, 40px)'\"\n >\n <table\n [class]=\"tableClasses()\"\n [attr.role]=\"rowInteractive() ? 'grid' : null\"\n [attr.aria-busy]=\"loading() !== false ? 'true' : null\"\n >\n @if (caption()) {\n <caption class=\"visually-hidden\">\n {{\n caption()\n }}\n </caption>\n }\n\n <thead>\n <tr>\n @if (selectable()) {\n <th\n scope=\"col\"\n class=\"select-col pin-select\"\n >\n <input\n type=\"checkbox\"\n class=\"check\"\n [attr.aria-label]=\"selectAllLabel()\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (change)=\"onToggleAll($event)\"\n />\n </th>\n }\n\n @if (expandableRows()) {\n <th\n scope=\"col\"\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\"\n >\n </th>\n }\n\n @for (col of visibleColumns(); track col.key; let first = $first) {\n <th\n scope=\"col\"\n [class]=\"headerClasses(col)\"\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n [style.width.px]=\"columnWidth(col)\"\n [style.min-width.px]=\"columnWidth(col)\"\n [style.max-width.px]=\"columnWidth(col)\"\n [attr.aria-sort]=\"ariaSort(col)\"\n >\n @if (col.sortable) {\n <button\n type=\"button\"\n class=\"th-label\"\n (click)=\"onSort(col)\"\n >\n @if (col.label) {\n {{ col.label }}\n } @else if (col.srLabel) {\n <span class=\"visually-hidden\">\n {{ col.srLabel }}\n </span>\n }\n\n <ds-icon\n class=\"sort-icon\"\n [name]=\"sortIcon(col)\"\n [size]=\"12\"\n >\n </ds-icon>\n </button>\n } @else {\n <span class=\"th-label\">\n @if (col.label) {\n {{ col.label }}\n } @else if (col.srLabel) {\n <span class=\"visually-hidden\">\n {{ col.srLabel }}\n </span>\n }\n </span>\n }\n\n @if (hasColumnFilter(col)) {\n <button\n type=\"button\"\n class=\"col-filter-btn\"\n aria-haspopup=\"dialog\"\n [class.active]=\"isColumnFiltered(col)\"\n [attr.aria-label]=\"'Filter ' + col.label\"\n (click)=\"onColumnFilterClick(col, $event)\"\n >\n <ds-icon\n name=\"filter\"\n [size]=\"12\"\n />\n </button>\n }\n\n @if (resizableColumns()) {\n <span\n class=\"col-resize\"\n aria-hidden=\"true\"\n (pointerdown)=\"onResizeStart(col, $event)\"\n (pointermove)=\"onResizeMove($event)\"\n (pointerup)=\"onResizeEnd()\"\n (pointercancel)=\"onResizeEnd()\"\n >\n </span>\n }\n </th>\n }\n\n @if (hasUtilityColumn()) {\n <th\n scope=\"col\"\n class=\"actions-col\"\n >\n @if (hasColumnPicker()) {\n <button\n type=\"button\"\n class=\"col-picker-btn\"\n aria-haspopup=\"dialog\"\n aria-label=\"Choose columns\"\n [attr.aria-expanded]=\"columnPickerOpened()\"\n (click)=\"onColumnPickerClick($event)\"\n >\n <ds-icon\n name=\"grid\"\n [size]=\"14\"\n />\n </button>\n } @else {\n <span class=\"visually-hidden\">\n Actions\n </span>\n }\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @if (isSkeletonLoading()) {\n @for (_ of skeletonArray(); track $index; let rowIndex = $index) {\n <tr>\n @if (selectable()) {\n <td class=\"select-col pin-select\">\n <ds-skeleton\n width=\"14px\"\n height=\"14px\"\n [inline]=\"true\"\n />\n </td>\n }\n\n @if (expandableRows()) {\n <td\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\"\n >\n </td>\n }\n\n @for (\n col of visibleColumns();\n track col.key;\n let first = $first\n ) {\n <td\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n >\n <ds-skeleton\n height=\"14px\"\n [width]=\"skeletonWidth(col, rowIndex)\"\n [inline]=\"true\"\n />\n </td>\n }\n\n @if (hasUtilityColumn()) {\n <td class=\"actions-col\"></td>\n }\n </tr>\n }\n } @else if (!filteredData().length) {\n <tr>\n <td\n class=\"empty\"\n [attr.colspan]=\"expandedColspan()\"\n >\n @if (emptyTemplate()) {\n <ng-container [ngTemplateOutlet]=\"emptyTemplate()!\">\n </ng-container>\n } @else {\n <ng-content select=\"[empty]\"></ng-content>\n }\n </td>\n </tr>\n } @else {\n @for (row of displayData(); track rowKey(row)) {\n <tr\n [class.selected]=\"isSelected(row)\"\n [class.expanded]=\"isExpanded(row)\"\n [class.clickable]=\"rowInteractive()\"\n [class.active]=\"rowKey(row) === activeRowId()\"\n [attr.aria-current]=\"rowKey(row) === activeRowId() ? 'true' : null\"\n [attr.tabindex]=\"rowInteractive() ? 0 : null\"\n [attr.aria-label]=\"rowInteractive() ? rowAriaLabel(row) : null\"\n (mousedown)=\"onRowMousedown()\"\n (click)=\"onRowClick(row, $event)\"\n (keydown.enter)=\"onRowKey(row, $event)\"\n (keydown.space)=\"onRowKey(row, $event)\"\n >\n @if (selectable()) {\n <td class=\"select-col pin-select\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [attr.aria-label]=\"'Select ' + rowAriaLabel(row)\"\n [checked]=\"isSelected(row)\"\n (change)=\"onToggleRow(row, $event)\"\n (click)=\"$event.stopPropagation()\"\n />\n </td>\n }\n\n @if (expandableRows()) {\n <td\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\"\n >\n <button\n type=\"button\"\n class=\"expand-btn\"\n [attr.aria-expanded]=\"isExpanded(row)\"\n [attr.aria-label]=\"\n isExpanded(row) ? 'Collapse row' : 'Expand row'\n \"\n (click)=\"onToggleExpand(row, $event)\"\n >\n <ds-icon\n class=\"expand-chev\"\n name=\"chevronRight\"\n [class.is-expanded]=\"isExpanded(row)\"\n [size]=\"16\"\n />\n </button>\n </td>\n }\n\n @for (\n col of visibleColumns();\n track col.key;\n let first = $first\n ) {\n <td\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n [class.editable-cell]=\"col.editable\"\n (dblclick)=\"startEdit(row, col, $event)\"\n >\n @if (isEditing(row, col)) {\n <input\n #editInput\n type=\"text\"\n class=\"cell-edit\"\n [value]=\"editDraft()\"\n (input)=\"onEditInput($event)\"\n (click)=\"$event.stopPropagation()\"\n (keydown.enter)=\"commitEdit(row, col)\"\n (keydown.escape)=\"cancelEdit()\"\n (blur)=\"commitEdit(row, col)\"\n />\n } @else if (cellTemplate(col); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row, row: row }\"\n >\n </ng-container>\n } @else if (col.truncate) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- pointer-only enhancement: the clip is visual (CSS ellipsis), keyboard/AT users already get the full DOM text + title; a tab stop per cell would wreck keyboard traversal -->\n <span\n class=\"cell-clip\"\n [style.max-width.px]=\"col.width ?? 240\"\n [attr.title]=\"cellValue(row, col)\"\n (click)=\"onCellClipClick(row, col, $event)\"\n >\n {{ cellValue(row, col) }}\n </span>\n } @else {\n {{ cellValue(row, col) }}\n }\n </td>\n }\n\n @if (hasUtilityColumn()) {\n <td class=\"actions-col\">\n @if (hasRowActions()) {\n <button\n type=\"button\"\n class=\"row-actions-btn\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"isMenuOpenFor(row)\"\n [attr.aria-label]=\"'Actions for ' + rowAriaLabel(row)\"\n (click)=\"onRowMenuClick(row, $event)\"\n (keydown.enter)=\"$event.stopPropagation()\"\n (keydown.space)=\"$event.stopPropagation()\"\n >\n <ds-icon\n name=\"moreV\"\n [size]=\"16\"\n />\n </button>\n }\n </td>\n }\n </tr>\n\n @if (expandableRows() && isExpanded(row) && rowExpandTemplate()) {\n <tr class=\"expand-panel-row\">\n <td\n class=\"expand-panel-cell\"\n [attr.colspan]=\"expandedColspan()\"\n >\n <ng-container\n [ngTemplateOutlet]=\"rowExpandTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: row, row: row }\"\n >\n </ng-container>\n </td>\n </tr>\n }\n }\n }\n </tbody>\n </table>\n </ds-loading-overlay>\n</div>\n\n@if (stickyScrollbar()) {\n <div\n #hscrollProxy\n class=\"hscroll-proxy\"\n aria-hidden=\"true\"\n [class.hscroll-hidden]=\"!hscrollNeeded()\"\n >\n <div\n class=\"hscroll-spacer\"\n [style.width.px]=\"hscrollContentWidth()\"\n >\n </div>\n </div>\n}\n\n@if (pageSize(); as size) {\n <div class=\"pagination-footer\">\n <ds-pagination\n [total]=\"total() ?? filteredData().length\"\n [pageSize]=\"size\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n [(currentPage)]=\"page\"\n (pageSizeChange)=\"pageSize.set($event)\"\n />\n </div>\n}\n\n@if (hasTruncate()) {\n <ds-popover #cellTextPopover>\n <div class=\"cell-text-pop\">\n {{ cellPopoverText() }}\n </div>\n </ds-popover>\n}\n\n@if (filterColumn()) {\n <ds-popover\n #columnFilterPopover\n align=\"start\"\n panelRole=\"dialog\"\n panelLabel=\"Filter values\"\n >\n <div class=\"col-filter\">\n <input\n type=\"text\"\n class=\"col-filter-search\"\n placeholder=\"Search\u2026\"\n [value]=\"filterSearch()\"\n (input)=\"onFilterSearch($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n\n <div class=\"col-filter-list\">\n @for (value of filterValues(); track value) {\n <label class=\"col-filter-option\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [checked]=\"isFilterValueChecked(value)\"\n (change)=\"toggleFilterValue(value)\"\n />\n {{ value || '(empty)' }}\n </label>\n } @empty {\n <div class=\"col-filter-empty\">\n No matches\n </div>\n }\n </div>\n\n <div class=\"col-filter-footer\">\n <span class=\"col-filter-count\">\n {{ filterSelectedCount() }} selected\n </span>\n\n <button\n type=\"button\"\n class=\"col-reset\"\n (click)=\"clearColumnFilter()\"\n >\n Clear\n </button>\n </div>\n </div>\n </ds-popover>\n}\n\n@if (hasColumnPicker()) {\n <ds-popover\n #columnPickerPopover\n align=\"end\"\n panelRole=\"dialog\"\n panelLabel=\"Column visibility\"\n >\n <div\n class=\"col-picker\"\n cdkDropList\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n >\n @for (\n col of orderedColumns();\n track col.key;\n let first = $first;\n let last = $last\n ) {\n <div\n class=\"col-picker-row\"\n cdkDrag\n [cdkDragDisabled]=\"!reorderableColumns()\"\n >\n @if (reorderableColumns()) {\n <span\n class=\"col-drag\"\n cdkDragHandle\n aria-hidden=\"true\"\n >\n <ds-icon\n name=\"drag\"\n [size]=\"14\"\n />\n </span>\n }\n\n <label class=\"col-picker-option\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [checked]=\"isColumnVisible(col)\"\n [disabled]=\"!col.hideable || isColumnLocked(col)\"\n (change)=\"toggleColumn(col)\"\n />\n {{ col.label }}\n </label>\n\n @if (reorderableColumns()) {\n <span class=\"col-move\">\n <button\n type=\"button\"\n class=\"col-move-btn\"\n aria-label=\"Move up\"\n [disabled]=\"first\"\n (click)=\"moveColumn(col, -1)\"\n >\n <ds-icon\n name=\"chevronUp\"\n [size]=\"14\"\n />\n </button>\n\n <button\n type=\"button\"\n class=\"col-move-btn\"\n aria-label=\"Move down\"\n [disabled]=\"last\"\n (click)=\"moveColumn(col, 1)\"\n >\n <ds-icon\n name=\"chevronDown\"\n [size]=\"14\"\n />\n </button>\n </span>\n }\n </div>\n }\n\n <button\n type=\"button\"\n class=\"col-reset\"\n (click)=\"resetColumns()\"\n >\n Reset to default\n </button>\n </div>\n </ds-popover>\n}\n\n@if (hasRowActions()) {\n <ds-popover\n #rowMenuPopover\n align=\"end\"\n >\n <ds-menu>\n @for (action of rowActions(); track action.id) {\n <ds-menu-item\n [icon]=\"action.icon ?? null\"\n [error]=\"action.error ?? false\"\n [disabled]=\"isActionDisabled(action)\"\n (pressed)=\"onRowAction(action)\"\n >\n {{ action.label }}\n </ds-menu-item>\n }\n </ds-menu>\n </ds-popover>\n}\n\n@if (selectable() && someSelected()) {\n <div class=\"bulk-bar\">\n <span class=\"count\">\n {{ selectedIds().size }} selected\n </span>\n\n <span class=\"sep\"></span>\n\n <ng-content select=\"[bulk-actions]\"></ng-content>\n </div>\n}\n", styles: ["@charset \"UTF-8\";:host{display:block}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host(.bordered) .scroll-wrap{border:var(--border-width-default) solid var(--_table-border);border-radius:var(--_table-radius)}.scroll-wrap{--_table-border: var(--ds-table-border, var(--border-default));--_table-radius: var(--ds-table-radius, var(--radius-md));--_table-bg-color: var(--ds-table-bg-color, var(--surface-default));width:100%;overflow:auto hidden;-webkit-overflow-scrolling:touch;background:var(--surface-default);box-sizing:border-box}.scroll-wrap.scroll-y{overflow-y:auto}:host(.sticky-scrollbar) .scroll-wrap{scrollbar-width:none}:host(.sticky-scrollbar) .scroll-wrap::-webkit-scrollbar{display:none}:host(.resizable) thead th{position:relative;overflow:hidden}.col-resize{position:absolute;inset-block:0;right:0;width:var(--space-2);cursor:col-resize;touch-action:none;-webkit-user-select:none;user-select:none}.col-resize:after{content:\"\";position:absolute;inset-block:var(--space-2);right:0;width:var(--border-width-default);background-color:transparent;transition:background-color var(--duration-fast) var(--ease-standard)}.col-resize:hover:after,.col-resize:active:after{background-color:var(--_table-sort-active-icon-color)}.hscroll-proxy{position:sticky;bottom:0;overflow:auto hidden}.hscroll-spacer{height:1px}.hscroll-hidden{display:none}.table{--_table-bg-color: var(--ds-table-bg-color, var(--surface-default));--_table-row-hover-bg-color: var(--ds-table-row-hover-bg-color, var(--surface-secondary));--_table-row-selected-bg-color: var(--ds-table-row-selected-bg-color, var(--accent-subtitle));--_table-row-pressed-bg-color: var(--ds-table-row-pressed-bg-color, var(--surface-muted));--_table-row-active-bg-color: var(--ds-table-row-active-bg-color, var(--accent-subtitle));--_table-row-stripe-bg-color: var(--ds-table-row-stripe-bg-color, var(--surface-secondary));--_table-head-text-color: var(--ds-table-head-text-color, var(--text-secondary));--_table-head-bg-color: var(--ds-table-head-bg-color, var(--surface-secondary));--_table-head-fs: var(--ds-table-head-fs, var(--font-size-xs));--_table-divider: var(--ds-table-divider, var(--border-divider));--_table-sort-active-icon-color: var(--ds-table-sort-active-icon-color, var(--accent));--_table-cell-pad-x: var(--ds-table-cell-pad-x, var(--table-cell-pad-x));--_table-cell-pad-y: var(--ds-table-cell-pad-y, var(--table-cell-pad-y));--_table-cell-pad-top: var(--ds-table-cell-pad-top, var(--_table-cell-pad-y));--_table-cell-pad-right: var(--ds-table-cell-pad-right, var(--_table-cell-pad-x));--_table-cell-pad-bottom: var(--ds-table-cell-pad-bottom, var(--_table-cell-pad-y));--_table-cell-pad-left: var(--ds-table-cell-pad-left, var(--_table-cell-pad-x));--_table-head-border-color: var(--ds-table-head-border-color, var(--_table-divider));--_table-head-weight: var(--ds-table-head-weight, var(--font-weight-bold));--_table-head-tracking: var(--ds-table-head-tracking, var(--letter-spacing-wider));width:100%;border-collapse:collapse;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--_table-bg-color)}.table thead th{text-align:left;padding:var(--table-head-pad-y) var(--_table-cell-pad-right) var(--table-head-pad-y) var(--_table-cell-pad-left);font:var(--_table-head-weight) var(--_table-head-fs)/var(--line-height-base) var(--font-sans);letter-spacing:var(--_table-head-tracking);text-transform:uppercase;color:var(--_table-head-text-color);background-color:var(--_table-head-bg-color);border-bottom:var(--border-width-default) solid var(--_table-head-border-color);white-space:nowrap}.table thead th .th-label{display:inline-flex;align-items:center;vertical-align:middle;appearance:none;background:none;border:0;margin:0;padding:0;font:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit;text-align:left}.table thead th button.th-label{cursor:pointer;-webkit-user-select:none;user-select:none;transition:color var(--duration-fast) var(--ease-standard)}.table thead th button.th-label:hover{color:var(--text-secondary)}.table thead th button.th-label:focus-visible{outline:var(--border-width-strong, 2px) solid var(--accent);outline-offset:var(--focus-ring-offset);border-radius:var(--radius-sm)}.table thead th .sort-icon{display:inline-block;width:var(--sort-ic-size);height:var(--sort-ic-size);margin-left:var(--sort-ic-gap);vertical-align:middle;transform:translateY(-1px);color:var(--icon-default);opacity:var(--sort-ic-opacity-idle);transition:opacity var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.table thead th .sort-icon .icon{width:var(--sort-ic-size);height:var(--sort-ic-size);display:block}.table thead th.sorted-asc .sort-icon,.table thead th.sorted-desc .sort-icon{opacity:1;color:var(--_table-sort-active-icon-color)}.table thead th.numeric{text-align:right}.table thead th.select-col,.table thead th.expand-col,.table thead th.actions-col{width:var(--space-10)}.table.sticky-header thead th{position:sticky;top:0;z-index:var(--table-sticky-header-z)}.table tbody td{padding:var(--_table-cell-pad-top) var(--_table-cell-pad-right) var(--_table-cell-pad-bottom) var(--_table-cell-pad-left);line-height:var(--line-height-flat);transition:background-color var(--duration-fast) var(--ease-standard);box-shadow:inset 0 calc(-1 * var(--border-width-default)) 0 var(--_table-divider);vertical-align:middle}.table tbody td.numeric{text-align:right}.table tbody td.empty{text-align:center;color:var(--text-tertiary);padding:var(--space-4)}.table tbody tr:last-child td{box-shadow:none}.table tbody tr.clickable:not(.active):hover td{background-color:var(--_table-row-hover-bg-color)}.table tbody tr.selected td{background-color:var(--_table-row-selected-bg-color)}.table tbody tr.active td{background-color:var(--_table-row-active-bg-color)}.table tbody tr.clickable:active td{background-color:var(--_table-row-pressed-bg-color)}.table tbody tr.clickable{cursor:pointer}.table tbody tr.clickable:focus-visible{outline:var(--border-width-strong, 2px) solid var(--accent);outline-offset:-2px}.table tbody .expand-col,.table tbody .actions-col{width:var(--space-10)}.table tbody .expand-chev{display:block;transition:transform var(--duration-base) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.table tbody .expand-chev{transition:none}}.table tbody .expand-chev.is-expanded{transform:rotate(90deg)}.table tbody .expand-panel-cell{padding:var(--_table-cell-pad-top) var(--_table-cell-pad-right) var(--_table-cell-pad-bottom) var(--_table-cell-pad-left)}.table tbody .cell-clip{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.table .expand-btn,.table .row-actions-btn,.table .col-picker-btn{display:flex;align-items:center;justify-content:center;width:var(--space-6);height:var(--space-6);padding:0;border:0;background:none;cursor:pointer;color:var(--icon-default);border-radius:var(--radius-sm);transition:color var(--duration-fast) var(--ease-standard)}.table .expand-btn:hover,.table .row-actions-btn:hover,.table .col-picker-btn:hover{color:var(--icon-strong)}.table .expand-btn:focus-visible,.table .row-actions-btn:focus-visible,.table .col-picker-btn:focus-visible{outline:var(--border-width-strong, 2px) solid var(--accent);outline-offset:var(--focus-ring-offset)}.table.compact tbody td,.table.compact thead th{padding:var(--space-2) var(--space-3)}.table.zebra tbody tr:nth-child(odd) td{background-color:var(--_table-row-stripe-bg-color)}.col-picker{display:grid;gap:var(--space-2);min-width:160px}.col-picker-row{display:flex;align-items:center;gap:var(--space-2)}.col-picker-row.cdk-drag-preview{background-color:var(--surface-default);border-radius:var(--radius-sm);box-shadow:var(--shadow-popover);padding:var(--space-1) var(--space-2)}.col-picker-row.cdk-drag-placeholder{opacity:.4}.col-picker.cdk-drop-list-dragging .col-picker-row:not(.cdk-drag-placeholder){transition:transform var(--duration-fast) var(--ease-standard)}.col-drag{display:inline-flex;color:var(--icon-default);cursor:grab}.col-drag:active{cursor:grabbing}.col-picker-option{display:flex;align-items:center;gap:var(--space-2);flex:1;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer}.col-picker-option:has(input:disabled){color:var(--text-tertiary);cursor:default}.col-move{display:inline-flex;gap:var(--space-1)}.col-move-btn{display:inline-flex;padding:0;border:0;background:none;color:var(--icon-default);cursor:pointer}.col-move-btn:hover:not(:disabled){color:var(--icon-strong)}.col-move-btn:disabled{color:var(--text-disabled);cursor:default}.col-reset{margin-top:var(--space-1);padding:0;border:0;background:none;color:var(--accent);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);cursor:pointer;text-align:left}.col-reset:hover{text-decoration:underline}.col-filter-btn{display:inline-flex;margin-left:var(--space-1);padding:0;border:0;background:none;color:var(--icon-default);opacity:.5;cursor:pointer;vertical-align:middle;transition:color var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.col-filter-btn:hover{opacity:1;color:var(--icon-strong)}.col-filter-btn.active{opacity:1;color:var(--_table-sort-active-icon-color)}.col-filter{display:grid;gap:var(--space-2);min-width:180px}.col-filter-search{width:100%;box-sizing:border-box;padding:var(--space-1) var(--space-2);border:var(--border-width-default) solid var(--border-default);border-radius:var(--radius-sm);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--surface-default)}.col-filter-search:focus-visible{outline:0;border-color:var(--accent)}.col-filter-list{display:grid;gap:var(--space-1);max-height:240px;overflow-y:auto}.col-filter-option{display:flex;align-items:center;gap:var(--space-2);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer}.col-filter-empty{color:var(--text-tertiary);font-size:var(--font-size-s);padding:var(--space-1) 0}.col-filter-footer{display:flex;align-items:center;justify-content:space-between;padding-top:var(--space-1);border-top:var(--border-width-default) solid var(--border-divider)}.col-filter-count{color:var(--text-tertiary);font-size:var(--font-size-xs)}.col-filter-footer .col-reset{margin-top:0}.editable-cell{cursor:text}.cell-edit{width:100%;box-sizing:border-box;margin:calc(-1 * var(--space-1)) 0;padding:var(--space-1) var(--space-2);border:var(--border-width-default) solid var(--accent);border-radius:var(--radius-sm);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--surface-default)}.cell-edit:focus-visible{outline:0}.cell-text-pop{max-width:360px;overflow-wrap:anywhere;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary)}:host(.pinned){--_table-select-w: var(--ds-table-select-col-w, var(--space-10))}:host(.pinned) .table{border-collapse:separate;border-spacing:0}:host(.pinned) .table tbody td{box-shadow:none;border-bottom:var(--border-width-default) solid var(--_table-divider)}:host(.pinned) .table tbody tr:last-child td{border-bottom:0}:host(.pinned) .pin-select,:host(.pinned) .pin-first{position:sticky;left:0;z-index:var(--table-sticky-col-z);background-color:var(--_table-bg-color)}:host(.pinned) thead .pin-select,:host(.pinned) thead .pin-first{z-index:var(--table-sticky-corner-z);background-color:var(--_table-head-bg-color)}:host(.pinned) tbody tr.clickable:not(.active):hover .pin-first,:host(.pinned) tbody tr.clickable:not(.active):hover .pin-select{background-color:var(--_table-row-hover-bg-color)}:host(.pinned) tbody tr.selected .pin-first,:host(.pinned) tbody tr.selected .pin-select{background-color:var(--_table-row-selected-bg-color)}:host(.pinned) tbody tr.active .pin-first,:host(.pinned) tbody tr.active .pin-select{background-color:var(--_table-row-active-bg-color)}:host(.pinned) tbody tr.clickable:active .pin-first,:host(.pinned) tbody tr.clickable:active .pin-select{background-color:var(--_table-row-pressed-bg-color)}:host(.pinned.selectable) .pin-first{left:var(--_table-select-w)}:host(.pinned.expandable){--_table-expand-w: var(--ds-table-expand-col-w, var(--space-10))}:host(.pinned.expandable) .pin-expand{position:sticky;left:0;z-index:var(--table-sticky-col-z);background-color:var(--_table-bg-color)}:host(.pinned.expandable) thead .pin-expand{z-index:var(--table-sticky-corner-z);background-color:var(--_table-head-bg-color)}:host(.pinned.expandable) tbody tr.clickable:not(.active):hover .pin-expand{background-color:var(--_table-row-hover-bg-color)}:host(.pinned.expandable) tbody tr.selected .pin-expand{background-color:var(--_table-row-selected-bg-color)}:host(.pinned.expandable) tbody tr.active .pin-expand{background-color:var(--_table-row-active-bg-color)}:host(.pinned.expandable) tbody tr.clickable:active .pin-expand{background-color:var(--_table-row-pressed-bg-color)}:host(.pinned.expandable) .pin-first{left:var(--_table-expand-w)}:host(.pinned.selectable.expandable) .pin-expand{left:var(--_table-select-w)}:host(.pinned.selectable.expandable) .pin-first{left:calc(var(--_table-select-w) + var(--_table-expand-w))}.pagination-footer{padding-top:var(--space-3);border-top:var(--border-width-default) solid var(--ds-table-divider, var(--border-divider))}.bulk-bar{position:sticky;bottom:var(--bulk-bar-offset);display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--space-4);background:var(--surface-inverted);color:var(--text-inverted);border-radius:var(--radius-lg);box-shadow:var(--shadow-toast);margin:var(--space-4) auto 0;width:fit-content}.bulk-bar .count{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-flat) var(--font-sans)}.bulk-bar .sep{width:var(--border-width-default);height:var(--space-4);background:var(--border-inverted)}.bulk-bar .button{background:transparent;color:var(--text-inverted)}.bulk-bar .button:hover{background:var(--surface-inverted-hover)}\n"] }]
|
|
3844
|
+
}], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], rowId: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowId", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], stickyHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyHeader", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], zebra: [{ type: i0.Input, args: [{ isSignal: true, alias: "zebra", required: false }] }], animateHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "animateHeight", required: false }] }], selectedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedIds", required: false }] }, { type: i0.Output, args: ["selectedIdsChange"] }], sortKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortKey", required: false }] }, { type: i0.Output, args: ["sortKeyChange"] }], sortDir: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortDir", required: false }] }, { type: i0.Output, args: ["sortDirChange"] }], sortingOrder: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortingOrder", required: false }] }], skeletonRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeletonRows", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], rowInteractive: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowInteractive", required: false }] }], activeRowId: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeRowId", required: false }] }], filterQuery: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterQuery", required: false }] }], columnFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnFilters", required: false }] }, { type: i0.Output, args: ["columnFiltersChange"] }], hiddenKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "hiddenKeys", required: false }] }, { type: i0.Output, args: ["hiddenKeysChange"] }], resizableColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizableColumns", required: false }] }], columnWidths: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnWidths", required: false }] }, { type: i0.Output, args: ["columnWidthsChange"] }], reorderableColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "reorderableColumns", required: false }] }], columnOrder: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnOrder", required: false }] }, { type: i0.Output, args: ["columnOrderChange"] }], stickyScrollbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyScrollbar", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }, { type: i0.Output, args: ["pageSizeChange"] }], page: [{ type: i0.Input, args: [{ isSignal: true, alias: "page", required: false }] }, { type: i0.Output, args: ["pageChange"] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }], scrollToTopOnPageChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollToTopOnPageChange", required: false }] }], clientSort: [{ type: i0.Input, args: [{ isSignal: true, alias: "clientSort", required: false }] }], stickyFirstColumn: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyFirstColumn", required: false }] }], rowClicked: [{ type: i0.Output, args: ["rowClicked"] }], sortChange: [{ type: i0.Output, args: ["sortChange"] }], rowActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowActions", required: false }] }], rowActionSelected: [{ type: i0.Output, args: ["rowActionSelected"] }], cellEdited: [{ type: i0.Output, args: ["cellEdited"] }], cellTemplateMap: [{ type: i0.Input, args: [{ isSignal: true, alias: "cellTemplateMap", required: false }] }], emptyTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyTemplate", required: false }] }], expandableRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandableRows", required: false }] }], expandedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedIds", required: false }] }, { type: i0.Output, args: ["expandedIdsChange"] }], rowExpandTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowExpandTemplate", required: false }] }], cellTemplateDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => CellTemplateDirective), { isSignal: true }] }], columnFilterPopover: [{ type: i0.ViewChild, args: ['columnFilterPopover', { isSignal: true }] }], editInput: [{ type: i0.ViewChild, args: ['editInput', { isSignal: true }] }], rowMenuPopover: [{ type: i0.ViewChild, args: ['rowMenuPopover', { isSignal: true }] }], columnPickerPopover: [{ type: i0.ViewChild, args: ['columnPickerPopover', { isSignal: true }] }], cellTextPopover: [{ type: i0.ViewChild, args: ['cellTextPopover', { isSignal: true }] }], scrollWrap: [{ type: i0.ViewChild, args: ['scrollWrap', { isSignal: true }] }], hscrollProxy: [{ type: i0.ViewChild, args: ['hscrollProxy', { isSignal: true }] }] } });
|
|
3553
3845
|
|
|
3554
3846
|
/** A single calendar day cell — the building block of `<ds-date-picker>`'s grid,
|
|
3555
3847
|
* also usable standalone (e.g. a state showcase). Renders a focusable
|
|
@@ -3983,11 +4275,15 @@ class DatePickerComponent extends DsControlValueAccessor {
|
|
|
3983
4275
|
'--ds-date-picker-header-label-color',
|
|
3984
4276
|
'--ds-date-picker-nav-icon-color',
|
|
3985
4277
|
'--ds-date-picker-width',
|
|
4278
|
+
'--ds-date-picker-panel-radius',
|
|
3986
4279
|
];
|
|
3987
4280
|
/** Selection mode — single date or start/end range. */
|
|
3988
4281
|
mode = input('single', ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
3989
4282
|
/** Trigger height — sm/md/lg. */
|
|
3990
4283
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
4284
|
+
/** Stretch the trigger to fill its container instead of hugging the mask
|
|
4285
|
+
* width — opt in when the field shares a grid/flex track with inputs. */
|
|
4286
|
+
fullWidth = input(false, { ...(ngDevMode ? { debugName: "fullWidth" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3991
4287
|
/** Selected date (single) or `[start, end]` (range), two-way bound. */
|
|
3992
4288
|
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3993
4289
|
/** Accessible-name fallback only — the mask fills the visible placeholder, not this. */
|
|
@@ -3997,9 +4293,11 @@ class DatePickerComponent extends DsControlValueAccessor {
|
|
|
3997
4293
|
/** Helper text shown below the field. */
|
|
3998
4294
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
3999
4295
|
/** Reserve the message-row height even when empty, so the field doesn't shift
|
|
4000
|
-
* the layout below it when a hint/error appears.
|
|
4001
|
-
*
|
|
4002
|
-
|
|
4296
|
+
* the layout below it when a hint/error appears. Falls back to
|
|
4297
|
+
* `DS_CONFIG.field.reserveMessage`, then off — opt in per field, or app-wide
|
|
4298
|
+
* for a form that shows validation messages. */
|
|
4299
|
+
reserveMessage = input(null, { ...(ngDevMode ? { debugName: "reserveMessage" } : /* istanbul ignore next */ {}), transform: (value) => (value == null ? null : booleanAttribute(value)) });
|
|
4300
|
+
reserveMessageResolved = resolveReserveMessage(this.reserveMessage);
|
|
4003
4301
|
/** Marks the field required — shows an asterisk and sets `aria-required`. */
|
|
4004
4302
|
required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
4005
4303
|
/** Shows an "(optional)" marker beside the label — ignored when `required` is set. */
|
|
@@ -4390,6 +4688,7 @@ class DatePickerComponent extends DsControlValueAccessor {
|
|
|
4390
4688
|
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
4391
4689
|
};
|
|
4392
4690
|
this.overlayRef = this.overlay.create(cfg);
|
|
4691
|
+
prepareOverlayEnter(this.overlayRef, this.host.nativeElement, positionStrategy);
|
|
4393
4692
|
forwardOverlayTokens(this.overlayRef, this.host.nativeElement, this.panelTokens);
|
|
4394
4693
|
closeOnOutsidePointer(this.overlayRef, (target) => this.host.nativeElement.contains(target), () => this.close());
|
|
4395
4694
|
// No backdrop catches a page scroll, and CDK's scroll strategies don't see a
|
|
@@ -4794,13 +5093,13 @@ class DatePickerComponent extends DsControlValueAccessor {
|
|
|
4794
5093
|
this.focusTrigger();
|
|
4795
5094
|
}
|
|
4796
5095
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DatePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4797
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DatePickerComponent, isStandalone: true, selector: "ds-date-picker", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, reserveMessage: { classPropertyName: "reserveMessage", publicName: "reserveMessage", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, optional: { classPropertyName: "optional", publicName: "optional", 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 }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, minYear: { classPropertyName: "minYear", publicName: "minYear", isSignal: true, isRequired: false, transformFunction: null }, maxYear: { classPropertyName: "maxYear", publicName: "maxYear", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, disabledDate: { classPropertyName: "disabledDate", publicName: "disabledDate", isSignal: true, isRequired: false, transformFunction: null }, presets: { classPropertyName: "presets", publicName: "presets", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, defaultDate: { classPropertyName: "defaultDate", publicName: "defaultDate", isSignal: true, isRequired: false, transformFunction: null }, allowInput: { classPropertyName: "allowInput", publicName: "allowInput", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [
|
|
5096
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DatePickerComponent, isStandalone: true, selector: "ds-date-picker", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, reserveMessage: { classPropertyName: "reserveMessage", publicName: "reserveMessage", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, optional: { classPropertyName: "optional", publicName: "optional", 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 }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, minYear: { classPropertyName: "minYear", publicName: "minYear", isSignal: true, isRequired: false, transformFunction: null }, maxYear: { classPropertyName: "maxYear", publicName: "maxYear", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, disabledDate: { classPropertyName: "disabledDate", publicName: "disabledDate", isSignal: true, isRequired: false, transformFunction: null }, presets: { classPropertyName: "presets", publicName: "presets", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, defaultDate: { classPropertyName: "defaultDate", publicName: "defaultDate", isSignal: true, isRequired: false, transformFunction: null }, allowInput: { classPropertyName: "allowInput", publicName: "allowInput", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class.full-width": "fullWidth()" } }, providers: [
|
|
4798
5097
|
{
|
|
4799
5098
|
provide: NG_VALUE_ACCESSOR,
|
|
4800
5099
|
useExisting: forwardRef(() => DatePickerComponent),
|
|
4801
5100
|
multi: true,
|
|
4802
5101
|
},
|
|
4803
|
-
], viewQueries: [{ propertyName: "anchor", first: true, predicate: ["anchor"], descendants: true, isSignal: true }, { propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }, { propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"field\">\n @if (label()) {\n <span\n class=\"label\"\n [id]=\"labelId\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\"\n >\n (optional)\n </span>\n }\n </span>\n }\n\n <!-- Whole-field click opens the panel; keyboard access is on the inner input\n (aria-haspopup + ArrowDown), so the wrapper needs no key handler of its own. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div\n #anchor\n [class]=\"triggerClasses()\"\n (click)=\"onFieldClick()\"\n >\n <span class=\"input-wrap\">\n <input\n #inputEl\n type=\"text\"\n class=\"date-input\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n aria-haspopup=\"dialog\"\n [class.masked]=\"allowInput()\"\n [value]=\"fieldText()\"\n [attr.size]=\"fieldSize()\"\n [readOnly]=\"!allowInput()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId : null\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"\n invalid() || typedInvalid() || rangeInvalid() ? 'true' : null\n \"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-placeholder]=\"fieldPlaceholder()\"\n (beforeinput)=\"onFieldBeforeInput($event)\"\n (input)=\"onFieldInput($event)\"\n (paste)=\"onFieldPaste($event)\"\n (blur)=\"onFieldBlur()\"\n (keydown)=\"onFieldKeydown($event)\"\n (keydown.arrowdown)=\"open(true); $event.preventDefault()\"\n />\n\n <!-- Per-slot overlay: the real input is transparent (see .masked in the\n SCSS), so this paints every glyph \u2014 digits at normal weight, unfilled\n positions muted. Monospace font keeps letters and digits equal\n width, so glyphs stay aligned 1:1 with the invisible input's caret. -->\n @if (allowInput()) {\n <!-- Whitespace-tight on purpose: the overlay paints with `white-space:\n pre`, so it must hug its tags or stray whitespace would render\n and shift later glyphs out of alignment. -->\n <!-- eslint-disable ds/template/element-content-newline -->\n <span\n class=\"mask-ghost\"\n aria-hidden=\"true\"\n >\n @for (part of displaySlots(); track $index) {\n <span [class.muted]=\"part.muted\">{{ part.text }}</span>\n }\n </span>\n <!-- eslint-enable ds/template/element-content-newline -->\n }\n </span>\n\n <button\n type=\"button\"\n class=\"calendar-toggle\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [disabled]=\"isDisabled()\"\n (click)=\"open(true); $event.stopPropagation()\"\n >\n <ds-icon\n name=\"calendar\"\n [size]=\"16\"\n />\n </button>\n </div>\n\n <ds-field-message\n [text]=\"messageText()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessage()\"\n />\n</div>\n\n<ng-template #panel>\n <!-- Dialog-level click is a pointer-only light-dismiss that closes an open\n month/year popup; keyboard users dismiss it with Escape (bound on each popup). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -->\n <div\n class=\"calendar\"\n role=\"dialog\"\n aria-label=\"Choose date\"\n cdkTrapFocus\n [id]=\"panelId\"\n [class.has-presets]=\"presets().length > 0\"\n (click)=\"closeMenus()\"\n >\n <span\n class=\"visually-hidden\"\n aria-live=\"polite\"\n >\n {{ monthYearLabel() }}\n </span>\n\n <div class=\"calendar-body\">\n <div class=\"head\">\n <span\n class=\"period\"\n [id]=\"captionId\"\n >\n <span class=\"period-item\">\n <button\n type=\"button\"\n class=\"period-trigger\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"monthMenuOpen()\"\n (click)=\"toggleMonthMenu($event)\"\n >\n {{ monthNames()[viewMonthIndex()] }}\n <ds-icon\n name=\"chevronDown\"\n [size]=\"12\"\n />\n </button>\n\n @if (monthMenuOpen()) {\n <!-- Popup container, not a focusable widget: it wraps real <button>s\n and closes on Escape; the click only stops light-dismiss bubbling. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"picker-menu\"\n (click)=\"$event.stopPropagation()\"\n (keydown.escape)=\"closeMenus()\"\n >\n <div\n class=\"picker-grid\"\n role=\"group\"\n aria-label=\"Select month\"\n >\n @for (name of monthNames(); track $index) {\n <button\n type=\"button\"\n class=\"picker-cell\"\n [class.selected]=\"$index === viewMonthIndex()\"\n [attr.aria-label]=\"name\"\n [attr.aria-current]=\"\n $index === viewMonthIndex() ? 'true' : null\n \"\n (click)=\"selectMonth($index, $event)\"\n >\n {{ name.slice(0, 3) }}\n </button>\n }\n </div>\n </div>\n }\n </span>\n\n <span class=\"period-item\">\n <button\n type=\"button\"\n class=\"period-trigger\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"yearMenuOpen()\"\n (click)=\"toggleYearMenu($event)\"\n >\n {{ viewYear() }}\n <ds-icon\n name=\"chevronDown\"\n [size]=\"12\"\n />\n </button>\n\n @if (yearMenuOpen()) {\n <!-- Popup container, not a focusable widget: it wraps real <button>s\n and closes on Escape; the click only stops light-dismiss bubbling. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"picker-menu\"\n (click)=\"$event.stopPropagation()\"\n (keydown.escape)=\"closeMenus()\"\n >\n <div class=\"picker-head\">\n <button\n type=\"button\"\n class=\"picker-nav\"\n aria-label=\"Previous years\"\n [disabled]=\"!canPrevYearPage()\"\n (click)=\"prevYearPage($event)\"\n >\n <ds-icon\n name=\"chevronLeft\"\n [size]=\"14\"\n />\n </button>\n\n <span class=\"picker-range\">\n {{ yearRangeLabel() }}\n </span>\n\n <button\n type=\"button\"\n class=\"picker-nav\"\n aria-label=\"Next years\"\n [disabled]=\"!canNextYearPage()\"\n (click)=\"nextYearPage($event)\"\n >\n <ds-icon\n name=\"chevronRight\"\n [size]=\"14\"\n />\n </button>\n </div>\n\n <div\n class=\"picker-grid\"\n role=\"group\"\n aria-label=\"Select year\"\n >\n @for (year of yearsOnPage(); track year) {\n <button\n type=\"button\"\n class=\"picker-cell year-cell\"\n [class.selected]=\"year === viewYear()\"\n [attr.aria-current]=\"year === viewYear() ? 'true' : null\"\n (click)=\"selectYear(year, $event)\"\n >\n {{ year }}\n </button>\n }\n </div>\n </div>\n }\n </span>\n </span>\n\n <span class=\"nav\">\n <button\n type=\"button\"\n (click)=\"prevMonth()\"\n >\n <ds-icon\n name=\"chevronLeft\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n\n <button\n type=\"button\"\n (click)=\"nextMonth()\"\n >\n <ds-icon\n name=\"chevronRight\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n </span>\n </div>\n\n <div\n class=\"grid\"\n role=\"grid\"\n [attr.aria-labelledby]=\"captionId\"\n >\n <div\n class=\"dow-row\"\n role=\"row\"\n >\n @for (dow of weekdays(); track $index) {\n <span\n class=\"dow\"\n role=\"columnheader\"\n [attr.aria-label]=\"weekdaysFull()[$index]\"\n >\n {{ dow }}\n </span>\n }\n </div>\n\n @for (week of weeksGrid(); track $index) {\n <div\n class=\"week\"\n role=\"row\"\n >\n @for (cell of week; track $index) {\n <ds-calendar-day\n [muted]=\"!cell.inMonth\"\n [today]=\"cell.isToday\"\n [selected]=\"cell.isSelected\"\n [inRange]=\"cell.inRange\"\n [rangeStart]=\"cell.isRangeStart\"\n [rangeEnd]=\"cell.isRangeEnd\"\n [disabled]=\"cell.isDisabled\"\n [dataDay]=\"dayKey(cell.date)\"\n [tabIndex]=\"isFocusDay(cell) ? 0 : -1\"\n [ariaLabel]=\"dayLabel(cell)\"\n (daySelected)=\"selectDay(cell)\"\n (dayKeydown)=\"onGridKeydown($event, cell)\"\n >\n {{ cell.day }}\n </ds-calendar-day>\n }\n </div>\n }\n </div>\n </div>\n\n @if (presets().length > 0) {\n <div class=\"presets\">\n @for (preset of presets(); track $index) {\n <button\n type=\"button\"\n class=\"preset-btn\"\n [disabled]=\"isPresetDisabled(preset)\"\n (click)=\"applyPreset(preset); $event.stopPropagation()\"\n >\n {{ preset.label }}\n </button>\n }\n </div>\n }\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{--_date-picker-focus-shadow: var(--ds-date-picker-focus-shadow, var(--ds-control-focus-shadow));--_date-picker-trigger-bg-color: var(--ds-date-picker-trigger-bg-color, var(--surface-default));--_date-picker-trigger-border-color: var(--ds-date-picker-trigger-border-color, var(--border-default));--_date-picker-trigger-label-color: var(--ds-date-picker-trigger-label-color, var(--text-primary));--_date-picker-required-color: var(--ds-date-picker-required-color, var(--error));--_date-picker-placeholder-color: var(--ds-date-picker-placeholder-color, var(--text-tertiary));display:block;width:fit-content;max-width:100%}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.field{display:flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap);width:100%}.field .label{font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-secondary);display:flex;align-items:center;gap:var(--space-1)}.field .label .req{color:var(--_date-picker-required-color);font-weight:var(--font-weight-semibold)}.field .label .optional-marker{color:var(--text-tertiary);font-weight:var(--font-weight-regular)}.trigger{display:inline-flex;align-items:center;gap:var(--space-1);background:var(--_date-picker-trigger-bg-color);border:var(--border-width-default) solid var(--_date-picker-trigger-border-color);border-radius:var(--radius-md);padding:0 var(--space-3);height:var(--hit-cozy);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_date-picker-trigger-label-color);cursor:pointer;transition:border-color var(--duration-fast) var(--ease-standard)}.trigger:hover{border-color:var(--border-strong)}.trigger:focus-visible,.trigger:focus-within{outline:none;box-shadow:var(--_date-picker-focus-shadow)}.trigger.sm{height:var(--hit-min);padding:0 var(--space-2);font-size:var(--font-size-xs)}.trigger.lg{height:var(--field-h-lg);padding:0 var(--space-4);font-size:var(--font-size-m)}.trigger.error{background:var(--error-subtitle);border-color:var(--error)}.trigger.disabled,.trigger:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);color:var(--text-disabled);cursor:not-allowed;opacity:var(--opacity-muted)}.input-wrap{position:relative;display:inline-flex;align-items:center}.mask-ghost{position:absolute;inset:0;display:flex;align-items:center;font:inherit;font-family:var(--font-mono);white-space:pre;pointer-events:none;overflow:hidden}.mask-ghost .muted{color:var(--_date-picker-placeholder-color)}.date-input{width:auto;border:none;background:transparent;color:inherit;font:inherit;font-family:var(--font-mono);padding:0;outline:none}.date-input.masked{color:transparent;caret-color:var(--_date-picker-trigger-label-color)}.date-input:read-only{cursor:pointer}.date-input:disabled{cursor:not-allowed}.calendar-toggle{display:inline-flex;align-items:center;border:none;background:transparent;color:var(--icon-default);padding:0;cursor:pointer}.calendar-toggle:disabled{cursor:not-allowed}.calendar{--_date-picker-bg-color: var(--ds-date-picker-bg-color, var(--surface-overlay));--_date-picker-border: var(--ds-date-picker-border, var(--border-default));--_date-picker-shadow: var(--ds-date-picker-shadow, var(--shadow-popover));--_date-picker-day-hover-bg-color: var(--ds-date-picker-day-hover-bg-color, var(--surface-secondary));--_date-picker-day-today-label-color: var(--ds-date-picker-day-today-label-color, var(--accent));--_date-picker-day-selected-bg-color: var(--ds-date-picker-day-selected-bg-color, var(--accent));--_date-picker-day-selected-bg-color-hover: var(--ds-date-picker-day-selected-bg-color-hover, var(--accent-hover));--_date-picker-day-selected-label-color: var(--ds-date-picker-day-selected-label-color, var(--accent-on));--_date-picker-day-range-bg-color: var(--ds-date-picker-day-range-bg-color, var(--accent-subtitle));--_date-picker-day-range-label-color: var(--ds-date-picker-day-range-label-color, var(--accent-strong));--_date-picker-day-disabled-label-color: var(--ds-date-picker-day-disabled-label-color, var(--text-disabled));--_date-picker-day-label-color: var(--ds-date-picker-day-label-color, var(--text-primary));--_date-picker-day-muted-label-color: var(--ds-date-picker-day-muted-label-color, var(--text-muted));--_date-picker-weekday-color: var(--ds-date-picker-weekday-color, var(--text-tertiary));--_date-picker-header-label-color: var(--ds-date-picker-header-label-color, var(--text-primary));--_date-picker-nav-icon-color: var(--ds-date-picker-nav-icon-color, var(--icon-default));--_date-picker-width: var(--ds-date-picker-width, var(--date-picker-w));background-color:var(--_date-picker-bg-color);border:var(--border-width-default) solid var(--_date-picker-border);border-radius:var(--radius-lg);box-shadow:var(--_date-picker-shadow);padding:var(--space-3);width:var(--_date-picker-width)}.calendar .head{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--space-2)}.calendar .period{display:flex;gap:var(--space-1)}.calendar .period-item{position:relative}.calendar .period-trigger{display:inline-flex;align-items:center;gap:var(--space-1);border:0;background:transparent;padding:var(--space-1) var(--space-1-5);border-radius:var(--radius-sm);font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_date-picker-header-label-color);cursor:pointer}.calendar .period-trigger:hover{background-color:var(--_date-picker-day-hover-bg-color)}.calendar .period-trigger:focus-visible{outline:none;box-shadow:var(--_date-picker-focus-shadow)}.calendar .picker-menu{position:absolute;top:calc(100% + var(--space-1));left:0;z-index:1;padding:var(--space-2);width:max-content;min-width:100%;background-color:var(--_date-picker-bg-color);border:var(--border-width-default) solid var(--_date-picker-border);border-radius:var(--radius-md);box-shadow:var(--_date-picker-shadow)}.calendar .picker-head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2);margin-bottom:var(--space-2)}.calendar .picker-head .picker-nav{width:var(--date-picker-nav-size);height:var(--date-picker-nav-size);border:0;background:transparent;display:grid;place-items:center;color:var(--_date-picker-nav-icon-color);cursor:pointer;border-radius:var(--radius-sm)}.calendar .picker-head .picker-nav:hover:not(:disabled){background-color:var(--_date-picker-day-hover-bg-color)}.calendar .picker-head .picker-nav:disabled{opacity:var(--opacity-muted);cursor:not-allowed}.calendar .picker-head .picker-range{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_date-picker-header-label-color)}.calendar .picker-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-1)}.calendar .picker-cell{border:0;background:transparent;padding:var(--space-1-5) var(--space-2);border-radius:var(--radius-sm);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--text-primary);cursor:pointer;text-align:center;white-space:nowrap}.calendar .picker-cell:hover{background-color:var(--_date-picker-day-hover-bg-color)}.calendar .picker-cell:focus-visible{outline:none;box-shadow:var(--_date-picker-focus-shadow)}.calendar .picker-cell.selected{background-color:var(--_date-picker-day-selected-bg-color);color:var(--_date-picker-day-selected-label-color);font-weight:var(--font-weight-bold)}.calendar .nav{display:flex;gap:var(--space-1)}.calendar .nav button{width:var(--date-picker-nav-size);height:var(--date-picker-nav-size);border:0;background:transparent;display:grid;place-items:center;color:var(--_date-picker-nav-icon-color);cursor:pointer;border-radius:var(--radius-sm)}.calendar .nav button:hover{background-color:var(--_date-picker-day-hover-bg-color)}.calendar .grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:var(--date-picker-cell-gap)}.calendar .dow-row,.calendar .week{display:contents}.calendar .dow{font:var(--font-weight-bold) var(--font-size-2xs)/var(--line-height-flat) var(--font-sans);text-align:center;padding:var(--space-1) 0;color:var(--_date-picker-weekday-color);text-transform:uppercase;letter-spacing:var(--letter-spacing-wider)}.calendar.has-presets{display:flex;flex-direction:row;gap:var(--space-3);width:auto}.calendar.has-presets .calendar-body{flex:0 0 var(--_date-picker-width);width:var(--_date-picker-width)}.calendar .calendar-body{display:flex;flex-direction:column}.calendar .presets{display:flex;flex-direction:column;gap:var(--space-1);border-left:var(--border-width-default) solid var(--_date-picker-border);padding-left:var(--space-3);min-width:8.5rem}.calendar .preset-btn{display:flex;align-items:center;width:100%;min-height:var(--hit-min);border:0;background:transparent;padding:var(--space-2) var(--space-3);border-radius:var(--radius-sm);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--text-primary);cursor:pointer;text-align:left;white-space:nowrap}.calendar .preset-btn:hover:not(:disabled){background-color:var(--_date-picker-day-hover-bg-color)}.calendar .preset-btn:focus-visible{outline:none;box-shadow:var(--_date-picker-focus-shadow)}.calendar .preset-btn:disabled{color:var(--_date-picker-day-disabled-label-color);cursor:not-allowed}@media(width<640px){.calendar{max-width:calc(100vw - var(--space-4))}.calendar.has-presets{flex-direction:column;width:100%}.calendar.has-presets .calendar-body{flex:1 1 auto;width:100%}.calendar .presets{border-left:0;padding-left:0;border-top:var(--border-width-default) solid var(--_date-picker-border);padding-top:var(--space-3);min-width:0;width:100%}}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "component", type: CalendarDayComponent, selector: "ds-calendar-day", inputs: ["selected", "inRange", "rangeStart", "rangeEnd", "today", "muted", "disabled", "dataDay", "tabIndex", "ariaLabel"], outputs: ["daySelected", "dayKeydown"] }, { kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] });
|
|
5102
|
+
], viewQueries: [{ propertyName: "anchor", first: true, predicate: ["anchor"], descendants: true, isSignal: true }, { propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }, { propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"field\">\n @if (label()) {\n <span\n class=\"label\"\n [id]=\"labelId\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\"\n >\n (optional)\n </span>\n }\n </span>\n }\n\n <!-- Whole-field click opens the panel; keyboard access is on the inner input\n (aria-haspopup + ArrowDown), so the wrapper needs no key handler of its own. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div\n #anchor\n [class]=\"triggerClasses()\"\n (click)=\"onFieldClick()\"\n >\n <span class=\"input-wrap\">\n <input\n #inputEl\n type=\"text\"\n class=\"date-input\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n aria-haspopup=\"dialog\"\n [class.masked]=\"allowInput()\"\n [value]=\"fieldText()\"\n [attr.size]=\"fieldSize()\"\n [readOnly]=\"!allowInput()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId : null\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"\n invalid() || typedInvalid() || rangeInvalid() ? 'true' : null\n \"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-placeholder]=\"fieldPlaceholder()\"\n (beforeinput)=\"onFieldBeforeInput($event)\"\n (input)=\"onFieldInput($event)\"\n (paste)=\"onFieldPaste($event)\"\n (blur)=\"onFieldBlur()\"\n (keydown)=\"onFieldKeydown($event)\"\n (keydown.arrowdown)=\"open(true); $event.preventDefault()\"\n />\n\n <!-- Per-slot overlay: the real input is transparent (see .masked in the\n SCSS), so this paints every glyph \u2014 digits at normal weight, unfilled\n positions muted. Monospace font keeps letters and digits equal\n width, so glyphs stay aligned 1:1 with the invisible input's caret. -->\n @if (allowInput()) {\n <!-- Whitespace-tight on purpose: the overlay paints with `white-space:\n pre`, so it must hug its tags or stray whitespace would render\n and shift later glyphs out of alignment. -->\n <!-- eslint-disable ds/template/element-content-newline -->\n <span\n class=\"mask-ghost\"\n aria-hidden=\"true\"\n >\n @for (part of displaySlots(); track $index) {\n <span [class.muted]=\"part.muted\">{{ part.text }}</span>\n }\n </span>\n <!-- eslint-enable ds/template/element-content-newline -->\n }\n </span>\n\n <button\n type=\"button\"\n class=\"calendar-toggle\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [disabled]=\"isDisabled()\"\n (click)=\"open(true); $event.stopPropagation()\"\n >\n <ds-icon\n name=\"calendar\"\n [size]=\"16\"\n />\n </button>\n </div>\n\n <ds-field-message\n [text]=\"messageText()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n />\n</div>\n\n<ng-template #panel>\n <!-- Dialog-level click is a pointer-only light-dismiss that closes an open\n month/year popup; keyboard users dismiss it with Escape (bound on each popup). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -->\n <div\n class=\"calendar\"\n role=\"dialog\"\n aria-label=\"Choose date\"\n cdkTrapFocus\n [id]=\"panelId\"\n [class.has-presets]=\"presets().length > 0\"\n (click)=\"closeMenus()\"\n >\n <span\n class=\"visually-hidden\"\n aria-live=\"polite\"\n >\n {{ monthYearLabel() }}\n </span>\n\n <div class=\"calendar-body\">\n <div class=\"head\">\n <span\n class=\"period\"\n [id]=\"captionId\"\n >\n <span class=\"period-item\">\n <button\n type=\"button\"\n class=\"period-trigger\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"monthMenuOpen()\"\n (click)=\"toggleMonthMenu($event)\"\n >\n {{ monthNames()[viewMonthIndex()] }}\n <ds-icon\n name=\"chevronDown\"\n [size]=\"12\"\n />\n </button>\n\n @if (monthMenuOpen()) {\n <!-- Popup container, not a focusable widget: it wraps real <button>s\n and closes on Escape; the click only stops light-dismiss bubbling. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"picker-menu\"\n (click)=\"$event.stopPropagation()\"\n (keydown.escape)=\"closeMenus()\"\n >\n <div\n class=\"picker-grid\"\n role=\"group\"\n aria-label=\"Select month\"\n >\n @for (name of monthNames(); track $index) {\n <button\n type=\"button\"\n class=\"picker-cell\"\n [class.selected]=\"$index === viewMonthIndex()\"\n [attr.aria-label]=\"name\"\n [attr.aria-current]=\"\n $index === viewMonthIndex() ? 'true' : null\n \"\n (click)=\"selectMonth($index, $event)\"\n >\n {{ name.slice(0, 3) }}\n </button>\n }\n </div>\n </div>\n }\n </span>\n\n <span class=\"period-item\">\n <button\n type=\"button\"\n class=\"period-trigger\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"yearMenuOpen()\"\n (click)=\"toggleYearMenu($event)\"\n >\n {{ viewYear() }}\n <ds-icon\n name=\"chevronDown\"\n [size]=\"12\"\n />\n </button>\n\n @if (yearMenuOpen()) {\n <!-- Popup container, not a focusable widget: it wraps real <button>s\n and closes on Escape; the click only stops light-dismiss bubbling. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"picker-menu\"\n (click)=\"$event.stopPropagation()\"\n (keydown.escape)=\"closeMenus()\"\n >\n <div class=\"picker-head\">\n <button\n type=\"button\"\n class=\"picker-nav\"\n aria-label=\"Previous years\"\n [disabled]=\"!canPrevYearPage()\"\n (click)=\"prevYearPage($event)\"\n >\n <ds-icon\n name=\"chevronLeft\"\n [size]=\"14\"\n />\n </button>\n\n <span class=\"picker-range\">\n {{ yearRangeLabel() }}\n </span>\n\n <button\n type=\"button\"\n class=\"picker-nav\"\n aria-label=\"Next years\"\n [disabled]=\"!canNextYearPage()\"\n (click)=\"nextYearPage($event)\"\n >\n <ds-icon\n name=\"chevronRight\"\n [size]=\"14\"\n />\n </button>\n </div>\n\n <div\n class=\"picker-grid\"\n role=\"group\"\n aria-label=\"Select year\"\n >\n @for (year of yearsOnPage(); track year) {\n <button\n type=\"button\"\n class=\"picker-cell year-cell\"\n [class.selected]=\"year === viewYear()\"\n [attr.aria-current]=\"year === viewYear() ? 'true' : null\"\n (click)=\"selectYear(year, $event)\"\n >\n {{ year }}\n </button>\n }\n </div>\n </div>\n }\n </span>\n </span>\n\n <span class=\"nav\">\n <button\n type=\"button\"\n (click)=\"prevMonth()\"\n >\n <ds-icon\n name=\"chevronLeft\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n\n <button\n type=\"button\"\n (click)=\"nextMonth()\"\n >\n <ds-icon\n name=\"chevronRight\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n </span>\n </div>\n\n <div\n class=\"grid\"\n role=\"grid\"\n [attr.aria-labelledby]=\"captionId\"\n >\n <div\n class=\"dow-row\"\n role=\"row\"\n >\n @for (dow of weekdays(); track $index) {\n <span\n class=\"dow\"\n role=\"columnheader\"\n [attr.aria-label]=\"weekdaysFull()[$index]\"\n >\n {{ dow }}\n </span>\n }\n </div>\n\n @for (week of weeksGrid(); track $index) {\n <div\n class=\"week\"\n role=\"row\"\n >\n @for (cell of week; track $index) {\n <ds-calendar-day\n [muted]=\"!cell.inMonth\"\n [today]=\"cell.isToday\"\n [selected]=\"cell.isSelected\"\n [inRange]=\"cell.inRange\"\n [rangeStart]=\"cell.isRangeStart\"\n [rangeEnd]=\"cell.isRangeEnd\"\n [disabled]=\"cell.isDisabled\"\n [dataDay]=\"dayKey(cell.date)\"\n [tabIndex]=\"isFocusDay(cell) ? 0 : -1\"\n [ariaLabel]=\"dayLabel(cell)\"\n (daySelected)=\"selectDay(cell)\"\n (dayKeydown)=\"onGridKeydown($event, cell)\"\n >\n {{ cell.day }}\n </ds-calendar-day>\n }\n </div>\n }\n </div>\n </div>\n\n @if (presets().length > 0) {\n <div class=\"presets\">\n @for (preset of presets(); track $index) {\n <button\n type=\"button\"\n class=\"preset-btn\"\n [disabled]=\"isPresetDisabled(preset)\"\n (click)=\"applyPreset(preset); $event.stopPropagation()\"\n >\n {{ preset.label }}\n </button>\n }\n </div>\n }\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{--_date-picker-focus-shadow: var(--ds-date-picker-focus-shadow, var(--ds-control-focus-shadow));--_date-picker-trigger-bg-color: var(--ds-date-picker-trigger-bg-color, var(--surface-default));--_date-picker-trigger-border-color: var(--ds-date-picker-trigger-border-color, var(--border-default));--_date-picker-trigger-label-color: var(--ds-date-picker-trigger-label-color, var(--text-primary));--_date-picker-required-color: var(--ds-date-picker-required-color, var(--error));--_date-picker-placeholder-color: var(--ds-date-picker-placeholder-color, var(--text-tertiary));--_date-picker-trigger-radius: var(--ds-date-picker-trigger-radius, var(--radius-md));--_date-picker-value-font-family: var(--ds-date-picker-value-font-family, var(--font-mono));--_date-picker-value-font-size: var(--ds-date-picker-value-font-size, var(--font-size-s));--_date-picker-value-weight: var(--ds-date-picker-value-weight, var(--font-weight-regular));display:block;width:fit-content;max-width:100%}:host(.full-width){width:100%}:host(.full-width) .trigger{width:100%}:host(.full-width) .input-wrap{flex:1}:host(.full-width) .date-input{flex:1}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.field{display:flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap);width:100%}.field .label{font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-secondary);display:flex;align-items:center;gap:var(--space-1)}.field .label .req{color:var(--_date-picker-required-color);font-weight:var(--font-weight-semibold)}.field .label .optional-marker{color:var(--text-tertiary);font-weight:var(--font-weight-regular)}.trigger{display:inline-flex;align-items:center;gap:var(--space-1);background:var(--_date-picker-trigger-bg-color);border:var(--border-width-default) solid var(--_date-picker-trigger-border-color);border-radius:var(--_date-picker-trigger-radius);padding:0 var(--space-3);height:var(--hit-cozy);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_date-picker-trigger-label-color);cursor:pointer;transition:border-color var(--duration-fast) var(--ease-standard)}.trigger:hover{border-color:var(--border-strong)}.trigger:focus-visible,.trigger:focus-within{outline:none;box-shadow:var(--_date-picker-focus-shadow)}.trigger.sm{height:var(--hit-min);padding:0 var(--space-2);font-size:var(--font-size-xs)}.trigger.lg{height:var(--field-h-lg);padding:0 var(--space-4);font-size:var(--font-size-m)}.trigger.error{background:var(--error-subtitle);border-color:var(--error)}.trigger.disabled,.trigger:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);color:var(--text-disabled);cursor:not-allowed;opacity:var(--opacity-muted)}.input-wrap{position:relative;display:inline-flex;align-items:center}.mask-ghost{position:absolute;inset:0;display:flex;align-items:center;font:inherit;font-family:var(--_date-picker-value-font-family);font-size:var(--_date-picker-value-font-size);font-weight:var(--_date-picker-value-weight);font-variant-numeric:tabular-nums;white-space:pre;pointer-events:none;overflow:hidden}.mask-ghost .muted{color:var(--_date-picker-placeholder-color)}.date-input{width:auto;border:none;background:transparent;color:inherit;font:inherit;font-family:var(--_date-picker-value-font-family);font-size:var(--_date-picker-value-font-size);font-weight:var(--_date-picker-value-weight);font-variant-numeric:tabular-nums;padding:0;outline:none}.date-input.masked{color:transparent;caret-color:var(--_date-picker-trigger-label-color)}.date-input:read-only{cursor:pointer}.date-input:disabled{cursor:not-allowed}.calendar-toggle{display:inline-flex;align-items:center;border:none;background:transparent;color:var(--icon-default);padding:0;cursor:pointer}.calendar-toggle:disabled{cursor:not-allowed}.calendar{--_date-picker-bg-color: var(--ds-date-picker-bg-color, var(--surface-overlay));--_date-picker-border: var(--ds-date-picker-border, var(--border-default));--_date-picker-shadow: var(--ds-date-picker-shadow, var(--shadow-popover));--_date-picker-day-hover-bg-color: var(--ds-date-picker-day-hover-bg-color, var(--surface-secondary));--_date-picker-day-today-label-color: var(--ds-date-picker-day-today-label-color, var(--accent));--_date-picker-day-selected-bg-color: var(--ds-date-picker-day-selected-bg-color, var(--accent));--_date-picker-day-selected-bg-color-hover: var(--ds-date-picker-day-selected-bg-color-hover, var(--accent-hover));--_date-picker-day-selected-label-color: var(--ds-date-picker-day-selected-label-color, var(--accent-on));--_date-picker-day-range-bg-color: var(--ds-date-picker-day-range-bg-color, var(--accent-subtitle));--_date-picker-day-range-label-color: var(--ds-date-picker-day-range-label-color, var(--accent-strong));--_date-picker-day-disabled-label-color: var(--ds-date-picker-day-disabled-label-color, var(--text-disabled));--_date-picker-day-label-color: var(--ds-date-picker-day-label-color, var(--text-primary));--_date-picker-day-muted-label-color: var(--ds-date-picker-day-muted-label-color, var(--text-muted));--_date-picker-weekday-color: var(--ds-date-picker-weekday-color, var(--text-tertiary));--_date-picker-header-label-color: var(--ds-date-picker-header-label-color, var(--text-primary));--_date-picker-nav-icon-color: var(--ds-date-picker-nav-icon-color, var(--icon-default));--_date-picker-width: var(--ds-date-picker-width, var(--date-picker-w));--_date-picker-panel-radius: var(--ds-date-picker-panel-radius, var(--radius-lg));background-color:var(--_date-picker-bg-color);border:var(--border-width-default) solid var(--_date-picker-border);border-radius:var(--_date-picker-panel-radius);box-shadow:var(--_date-picker-shadow);padding:var(--space-3);width:var(--_date-picker-width)}.calendar .head{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--space-2)}.calendar .period{display:flex;gap:var(--space-1)}.calendar .period-item{position:relative}.calendar .period-trigger{display:inline-flex;align-items:center;gap:var(--space-1);border:0;background:transparent;padding:var(--space-1) var(--space-1-5);border-radius:var(--radius-sm);font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_date-picker-header-label-color);cursor:pointer}.calendar .period-trigger:hover{background-color:var(--_date-picker-day-hover-bg-color)}.calendar .period-trigger:focus-visible{outline:none;box-shadow:var(--_date-picker-focus-shadow)}.calendar .picker-menu{position:absolute;top:calc(100% + var(--space-1));left:0;z-index:1;padding:var(--space-2);width:max-content;min-width:100%;background-color:var(--_date-picker-bg-color);border:var(--border-width-default) solid var(--_date-picker-border);border-radius:var(--radius-md);box-shadow:var(--_date-picker-shadow)}.calendar .picker-head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2);margin-bottom:var(--space-2)}.calendar .picker-head .picker-nav{width:var(--date-picker-nav-size);height:var(--date-picker-nav-size);border:0;background:transparent;display:grid;place-items:center;color:var(--_date-picker-nav-icon-color);cursor:pointer;border-radius:var(--radius-sm)}.calendar .picker-head .picker-nav:hover:not(:disabled){background-color:var(--_date-picker-day-hover-bg-color)}.calendar .picker-head .picker-nav:disabled{opacity:var(--opacity-muted);cursor:not-allowed}.calendar .picker-head .picker-range{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_date-picker-header-label-color)}.calendar .picker-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-1)}.calendar .picker-cell{border:0;background:transparent;padding:var(--space-1-5) var(--space-2);border-radius:var(--radius-sm);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--text-primary);cursor:pointer;text-align:center;white-space:nowrap}.calendar .picker-cell:hover{background-color:var(--_date-picker-day-hover-bg-color)}.calendar .picker-cell:focus-visible{outline:none;box-shadow:var(--_date-picker-focus-shadow)}.calendar .picker-cell.selected{background-color:var(--_date-picker-day-selected-bg-color);color:var(--_date-picker-day-selected-label-color);font-weight:var(--font-weight-bold)}.calendar .nav{display:flex;gap:var(--space-1)}.calendar .nav button{width:var(--date-picker-nav-size);height:var(--date-picker-nav-size);border:0;background:transparent;display:grid;place-items:center;color:var(--_date-picker-nav-icon-color);cursor:pointer;border-radius:var(--radius-sm)}.calendar .nav button:hover{background-color:var(--_date-picker-day-hover-bg-color)}.calendar .grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:var(--date-picker-cell-gap)}.calendar .dow-row,.calendar .week{display:contents}.calendar .dow{font:var(--font-weight-bold) var(--font-size-2xs)/var(--line-height-flat) var(--font-sans);text-align:center;padding:var(--space-1) 0;color:var(--_date-picker-weekday-color);text-transform:uppercase;letter-spacing:var(--letter-spacing-wider)}.calendar.has-presets{display:flex;flex-direction:row;gap:var(--space-3);width:auto}.calendar.has-presets .calendar-body{flex:0 0 var(--_date-picker-width);width:var(--_date-picker-width)}.calendar .calendar-body{display:flex;flex-direction:column}.calendar .presets{display:flex;flex-direction:column;gap:var(--space-1);border-left:var(--border-width-default) solid var(--_date-picker-border);padding-left:var(--space-3);min-width:8.5rem}.calendar .preset-btn{display:flex;align-items:center;width:100%;min-height:var(--hit-min);border:0;background:transparent;padding:var(--space-2) var(--space-3);border-radius:var(--radius-sm);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--text-primary);cursor:pointer;text-align:left;white-space:nowrap}.calendar .preset-btn:hover:not(:disabled){background-color:var(--_date-picker-day-hover-bg-color)}.calendar .preset-btn:focus-visible{outline:none;box-shadow:var(--_date-picker-focus-shadow)}.calendar .preset-btn:disabled{color:var(--_date-picker-day-disabled-label-color);cursor:not-allowed}@media(width<640px){.calendar{max-width:calc(100vw - var(--space-4))}.calendar.has-presets{flex-direction:column;width:100%}.calendar.has-presets .calendar-body{flex:1 1 auto;width:100%}.calendar .presets{border-left:0;padding-left:0;border-top:var(--border-width-default) solid var(--_date-picker-border);padding-top:var(--space-3);min-width:0;width:100%}}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "component", type: CalendarDayComponent, selector: "ds-calendar-day", inputs: ["selected", "inRange", "rangeStart", "rangeEnd", "today", "muted", "disabled", "dataDay", "tabIndex", "ariaLabel"], outputs: ["daySelected", "dayKeydown"] }, { kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] });
|
|
4804
5103
|
}
|
|
4805
5104
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DatePickerComponent, decorators: [{
|
|
4806
5105
|
type: Component,
|
|
@@ -4815,8 +5114,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
4815
5114
|
useExisting: forwardRef(() => DatePickerComponent),
|
|
4816
5115
|
multi: true,
|
|
4817
5116
|
},
|
|
4818
|
-
], template: "<div class=\"field\">\n @if (label()) {\n <span\n class=\"label\"\n [id]=\"labelId\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\"\n >\n (optional)\n </span>\n }\n </span>\n }\n\n <!-- Whole-field click opens the panel; keyboard access is on the inner input\n (aria-haspopup + ArrowDown), so the wrapper needs no key handler of its own. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div\n #anchor\n [class]=\"triggerClasses()\"\n (click)=\"onFieldClick()\"\n >\n <span class=\"input-wrap\">\n <input\n #inputEl\n type=\"text\"\n class=\"date-input\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n aria-haspopup=\"dialog\"\n [class.masked]=\"allowInput()\"\n [value]=\"fieldText()\"\n [attr.size]=\"fieldSize()\"\n [readOnly]=\"!allowInput()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId : null\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"\n invalid() || typedInvalid() || rangeInvalid() ? 'true' : null\n \"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-placeholder]=\"fieldPlaceholder()\"\n (beforeinput)=\"onFieldBeforeInput($event)\"\n (input)=\"onFieldInput($event)\"\n (paste)=\"onFieldPaste($event)\"\n (blur)=\"onFieldBlur()\"\n (keydown)=\"onFieldKeydown($event)\"\n (keydown.arrowdown)=\"open(true); $event.preventDefault()\"\n />\n\n <!-- Per-slot overlay: the real input is transparent (see .masked in the\n SCSS), so this paints every glyph \u2014 digits at normal weight, unfilled\n positions muted. Monospace font keeps letters and digits equal\n width, so glyphs stay aligned 1:1 with the invisible input's caret. -->\n @if (allowInput()) {\n <!-- Whitespace-tight on purpose: the overlay paints with `white-space:\n pre`, so it must hug its tags or stray whitespace would render\n and shift later glyphs out of alignment. -->\n <!-- eslint-disable ds/template/element-content-newline -->\n <span\n class=\"mask-ghost\"\n aria-hidden=\"true\"\n >\n @for (part of displaySlots(); track $index) {\n <span [class.muted]=\"part.muted\">{{ part.text }}</span>\n }\n </span>\n <!-- eslint-enable ds/template/element-content-newline -->\n }\n </span>\n\n <button\n type=\"button\"\n class=\"calendar-toggle\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [disabled]=\"isDisabled()\"\n (click)=\"open(true); $event.stopPropagation()\"\n >\n <ds-icon\n name=\"calendar\"\n [size]=\"16\"\n />\n </button>\n </div>\n\n <ds-field-message\n [text]=\"messageText()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessage()\"\n />\n</div>\n\n<ng-template #panel>\n <!-- Dialog-level click is a pointer-only light-dismiss that closes an open\n month/year popup; keyboard users dismiss it with Escape (bound on each popup). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -->\n <div\n class=\"calendar\"\n role=\"dialog\"\n aria-label=\"Choose date\"\n cdkTrapFocus\n [id]=\"panelId\"\n [class.has-presets]=\"presets().length > 0\"\n (click)=\"closeMenus()\"\n >\n <span\n class=\"visually-hidden\"\n aria-live=\"polite\"\n >\n {{ monthYearLabel() }}\n </span>\n\n <div class=\"calendar-body\">\n <div class=\"head\">\n <span\n class=\"period\"\n [id]=\"captionId\"\n >\n <span class=\"period-item\">\n <button\n type=\"button\"\n class=\"period-trigger\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"monthMenuOpen()\"\n (click)=\"toggleMonthMenu($event)\"\n >\n {{ monthNames()[viewMonthIndex()] }}\n <ds-icon\n name=\"chevronDown\"\n [size]=\"12\"\n />\n </button>\n\n @if (monthMenuOpen()) {\n <!-- Popup container, not a focusable widget: it wraps real <button>s\n and closes on Escape; the click only stops light-dismiss bubbling. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"picker-menu\"\n (click)=\"$event.stopPropagation()\"\n (keydown.escape)=\"closeMenus()\"\n >\n <div\n class=\"picker-grid\"\n role=\"group\"\n aria-label=\"Select month\"\n >\n @for (name of monthNames(); track $index) {\n <button\n type=\"button\"\n class=\"picker-cell\"\n [class.selected]=\"$index === viewMonthIndex()\"\n [attr.aria-label]=\"name\"\n [attr.aria-current]=\"\n $index === viewMonthIndex() ? 'true' : null\n \"\n (click)=\"selectMonth($index, $event)\"\n >\n {{ name.slice(0, 3) }}\n </button>\n }\n </div>\n </div>\n }\n </span>\n\n <span class=\"period-item\">\n <button\n type=\"button\"\n class=\"period-trigger\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"yearMenuOpen()\"\n (click)=\"toggleYearMenu($event)\"\n >\n {{ viewYear() }}\n <ds-icon\n name=\"chevronDown\"\n [size]=\"12\"\n />\n </button>\n\n @if (yearMenuOpen()) {\n <!-- Popup container, not a focusable widget: it wraps real <button>s\n and closes on Escape; the click only stops light-dismiss bubbling. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"picker-menu\"\n (click)=\"$event.stopPropagation()\"\n (keydown.escape)=\"closeMenus()\"\n >\n <div class=\"picker-head\">\n <button\n type=\"button\"\n class=\"picker-nav\"\n aria-label=\"Previous years\"\n [disabled]=\"!canPrevYearPage()\"\n (click)=\"prevYearPage($event)\"\n >\n <ds-icon\n name=\"chevronLeft\"\n [size]=\"14\"\n />\n </button>\n\n <span class=\"picker-range\">\n {{ yearRangeLabel() }}\n </span>\n\n <button\n type=\"button\"\n class=\"picker-nav\"\n aria-label=\"Next years\"\n [disabled]=\"!canNextYearPage()\"\n (click)=\"nextYearPage($event)\"\n >\n <ds-icon\n name=\"chevronRight\"\n [size]=\"14\"\n />\n </button>\n </div>\n\n <div\n class=\"picker-grid\"\n role=\"group\"\n aria-label=\"Select year\"\n >\n @for (year of yearsOnPage(); track year) {\n <button\n type=\"button\"\n class=\"picker-cell year-cell\"\n [class.selected]=\"year === viewYear()\"\n [attr.aria-current]=\"year === viewYear() ? 'true' : null\"\n (click)=\"selectYear(year, $event)\"\n >\n {{ year }}\n </button>\n }\n </div>\n </div>\n }\n </span>\n </span>\n\n <span class=\"nav\">\n <button\n type=\"button\"\n (click)=\"prevMonth()\"\n >\n <ds-icon\n name=\"chevronLeft\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n\n <button\n type=\"button\"\n (click)=\"nextMonth()\"\n >\n <ds-icon\n name=\"chevronRight\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n </span>\n </div>\n\n <div\n class=\"grid\"\n role=\"grid\"\n [attr.aria-labelledby]=\"captionId\"\n >\n <div\n class=\"dow-row\"\n role=\"row\"\n >\n @for (dow of weekdays(); track $index) {\n <span\n class=\"dow\"\n role=\"columnheader\"\n [attr.aria-label]=\"weekdaysFull()[$index]\"\n >\n {{ dow }}\n </span>\n }\n </div>\n\n @for (week of weeksGrid(); track $index) {\n <div\n class=\"week\"\n role=\"row\"\n >\n @for (cell of week; track $index) {\n <ds-calendar-day\n [muted]=\"!cell.inMonth\"\n [today]=\"cell.isToday\"\n [selected]=\"cell.isSelected\"\n [inRange]=\"cell.inRange\"\n [rangeStart]=\"cell.isRangeStart\"\n [rangeEnd]=\"cell.isRangeEnd\"\n [disabled]=\"cell.isDisabled\"\n [dataDay]=\"dayKey(cell.date)\"\n [tabIndex]=\"isFocusDay(cell) ? 0 : -1\"\n [ariaLabel]=\"dayLabel(cell)\"\n (daySelected)=\"selectDay(cell)\"\n (dayKeydown)=\"onGridKeydown($event, cell)\"\n >\n {{ cell.day }}\n </ds-calendar-day>\n }\n </div>\n }\n </div>\n </div>\n\n @if (presets().length > 0) {\n <div class=\"presets\">\n @for (preset of presets(); track $index) {\n <button\n type=\"button\"\n class=\"preset-btn\"\n [disabled]=\"isPresetDisabled(preset)\"\n (click)=\"applyPreset(preset); $event.stopPropagation()\"\n >\n {{ preset.label }}\n </button>\n }\n </div>\n }\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{--_date-picker-focus-shadow: var(--ds-date-picker-focus-shadow, var(--ds-control-focus-shadow));--_date-picker-trigger-bg-color: var(--ds-date-picker-trigger-bg-color, var(--surface-default));--_date-picker-trigger-border-color: var(--ds-date-picker-trigger-border-color, var(--border-default));--_date-picker-trigger-label-color: var(--ds-date-picker-trigger-label-color, var(--text-primary));--_date-picker-required-color: var(--ds-date-picker-required-color, var(--error));--_date-picker-placeholder-color: var(--ds-date-picker-placeholder-color, var(--text-tertiary));display:block;width:fit-content;max-width:100%}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.field{display:flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap);width:100%}.field .label{font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-secondary);display:flex;align-items:center;gap:var(--space-1)}.field .label .req{color:var(--_date-picker-required-color);font-weight:var(--font-weight-semibold)}.field .label .optional-marker{color:var(--text-tertiary);font-weight:var(--font-weight-regular)}.trigger{display:inline-flex;align-items:center;gap:var(--space-1);background:var(--_date-picker-trigger-bg-color);border:var(--border-width-default) solid var(--_date-picker-trigger-border-color);border-radius:var(--radius-md);padding:0 var(--space-3);height:var(--hit-cozy);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_date-picker-trigger-label-color);cursor:pointer;transition:border-color var(--duration-fast) var(--ease-standard)}.trigger:hover{border-color:var(--border-strong)}.trigger:focus-visible,.trigger:focus-within{outline:none;box-shadow:var(--_date-picker-focus-shadow)}.trigger.sm{height:var(--hit-min);padding:0 var(--space-2);font-size:var(--font-size-xs)}.trigger.lg{height:var(--field-h-lg);padding:0 var(--space-4);font-size:var(--font-size-m)}.trigger.error{background:var(--error-subtitle);border-color:var(--error)}.trigger.disabled,.trigger:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);color:var(--text-disabled);cursor:not-allowed;opacity:var(--opacity-muted)}.input-wrap{position:relative;display:inline-flex;align-items:center}.mask-ghost{position:absolute;inset:0;display:flex;align-items:center;font:inherit;font-family:var(--font-mono);white-space:pre;pointer-events:none;overflow:hidden}.mask-ghost .muted{color:var(--_date-picker-placeholder-color)}.date-input{width:auto;border:none;background:transparent;color:inherit;font:inherit;font-family:var(--font-mono);padding:0;outline:none}.date-input.masked{color:transparent;caret-color:var(--_date-picker-trigger-label-color)}.date-input:read-only{cursor:pointer}.date-input:disabled{cursor:not-allowed}.calendar-toggle{display:inline-flex;align-items:center;border:none;background:transparent;color:var(--icon-default);padding:0;cursor:pointer}.calendar-toggle:disabled{cursor:not-allowed}.calendar{--_date-picker-bg-color: var(--ds-date-picker-bg-color, var(--surface-overlay));--_date-picker-border: var(--ds-date-picker-border, var(--border-default));--_date-picker-shadow: var(--ds-date-picker-shadow, var(--shadow-popover));--_date-picker-day-hover-bg-color: var(--ds-date-picker-day-hover-bg-color, var(--surface-secondary));--_date-picker-day-today-label-color: var(--ds-date-picker-day-today-label-color, var(--accent));--_date-picker-day-selected-bg-color: var(--ds-date-picker-day-selected-bg-color, var(--accent));--_date-picker-day-selected-bg-color-hover: var(--ds-date-picker-day-selected-bg-color-hover, var(--accent-hover));--_date-picker-day-selected-label-color: var(--ds-date-picker-day-selected-label-color, var(--accent-on));--_date-picker-day-range-bg-color: var(--ds-date-picker-day-range-bg-color, var(--accent-subtitle));--_date-picker-day-range-label-color: var(--ds-date-picker-day-range-label-color, var(--accent-strong));--_date-picker-day-disabled-label-color: var(--ds-date-picker-day-disabled-label-color, var(--text-disabled));--_date-picker-day-label-color: var(--ds-date-picker-day-label-color, var(--text-primary));--_date-picker-day-muted-label-color: var(--ds-date-picker-day-muted-label-color, var(--text-muted));--_date-picker-weekday-color: var(--ds-date-picker-weekday-color, var(--text-tertiary));--_date-picker-header-label-color: var(--ds-date-picker-header-label-color, var(--text-primary));--_date-picker-nav-icon-color: var(--ds-date-picker-nav-icon-color, var(--icon-default));--_date-picker-width: var(--ds-date-picker-width, var(--date-picker-w));background-color:var(--_date-picker-bg-color);border:var(--border-width-default) solid var(--_date-picker-border);border-radius:var(--radius-lg);box-shadow:var(--_date-picker-shadow);padding:var(--space-3);width:var(--_date-picker-width)}.calendar .head{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--space-2)}.calendar .period{display:flex;gap:var(--space-1)}.calendar .period-item{position:relative}.calendar .period-trigger{display:inline-flex;align-items:center;gap:var(--space-1);border:0;background:transparent;padding:var(--space-1) var(--space-1-5);border-radius:var(--radius-sm);font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_date-picker-header-label-color);cursor:pointer}.calendar .period-trigger:hover{background-color:var(--_date-picker-day-hover-bg-color)}.calendar .period-trigger:focus-visible{outline:none;box-shadow:var(--_date-picker-focus-shadow)}.calendar .picker-menu{position:absolute;top:calc(100% + var(--space-1));left:0;z-index:1;padding:var(--space-2);width:max-content;min-width:100%;background-color:var(--_date-picker-bg-color);border:var(--border-width-default) solid var(--_date-picker-border);border-radius:var(--radius-md);box-shadow:var(--_date-picker-shadow)}.calendar .picker-head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2);margin-bottom:var(--space-2)}.calendar .picker-head .picker-nav{width:var(--date-picker-nav-size);height:var(--date-picker-nav-size);border:0;background:transparent;display:grid;place-items:center;color:var(--_date-picker-nav-icon-color);cursor:pointer;border-radius:var(--radius-sm)}.calendar .picker-head .picker-nav:hover:not(:disabled){background-color:var(--_date-picker-day-hover-bg-color)}.calendar .picker-head .picker-nav:disabled{opacity:var(--opacity-muted);cursor:not-allowed}.calendar .picker-head .picker-range{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_date-picker-header-label-color)}.calendar .picker-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-1)}.calendar .picker-cell{border:0;background:transparent;padding:var(--space-1-5) var(--space-2);border-radius:var(--radius-sm);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--text-primary);cursor:pointer;text-align:center;white-space:nowrap}.calendar .picker-cell:hover{background-color:var(--_date-picker-day-hover-bg-color)}.calendar .picker-cell:focus-visible{outline:none;box-shadow:var(--_date-picker-focus-shadow)}.calendar .picker-cell.selected{background-color:var(--_date-picker-day-selected-bg-color);color:var(--_date-picker-day-selected-label-color);font-weight:var(--font-weight-bold)}.calendar .nav{display:flex;gap:var(--space-1)}.calendar .nav button{width:var(--date-picker-nav-size);height:var(--date-picker-nav-size);border:0;background:transparent;display:grid;place-items:center;color:var(--_date-picker-nav-icon-color);cursor:pointer;border-radius:var(--radius-sm)}.calendar .nav button:hover{background-color:var(--_date-picker-day-hover-bg-color)}.calendar .grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:var(--date-picker-cell-gap)}.calendar .dow-row,.calendar .week{display:contents}.calendar .dow{font:var(--font-weight-bold) var(--font-size-2xs)/var(--line-height-flat) var(--font-sans);text-align:center;padding:var(--space-1) 0;color:var(--_date-picker-weekday-color);text-transform:uppercase;letter-spacing:var(--letter-spacing-wider)}.calendar.has-presets{display:flex;flex-direction:row;gap:var(--space-3);width:auto}.calendar.has-presets .calendar-body{flex:0 0 var(--_date-picker-width);width:var(--_date-picker-width)}.calendar .calendar-body{display:flex;flex-direction:column}.calendar .presets{display:flex;flex-direction:column;gap:var(--space-1);border-left:var(--border-width-default) solid var(--_date-picker-border);padding-left:var(--space-3);min-width:8.5rem}.calendar .preset-btn{display:flex;align-items:center;width:100%;min-height:var(--hit-min);border:0;background:transparent;padding:var(--space-2) var(--space-3);border-radius:var(--radius-sm);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--text-primary);cursor:pointer;text-align:left;white-space:nowrap}.calendar .preset-btn:hover:not(:disabled){background-color:var(--_date-picker-day-hover-bg-color)}.calendar .preset-btn:focus-visible{outline:none;box-shadow:var(--_date-picker-focus-shadow)}.calendar .preset-btn:disabled{color:var(--_date-picker-day-disabled-label-color);cursor:not-allowed}@media(width<640px){.calendar{max-width:calc(100vw - var(--space-4))}.calendar.has-presets{flex-direction:column;width:100%}.calendar.has-presets .calendar-body{flex:1 1 auto;width:100%}.calendar .presets{border-left:0;padding-left:0;border-top:var(--border-width-default) solid var(--_date-picker-border);padding-top:var(--space-3);min-width:0;width:100%}}\n"] }]
|
|
4819
|
-
}], ctorParameters: () => [], propDecorators: { mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], reserveMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveMessage", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], optional: [{ type: i0.Input, args: [{ isSignal: true, alias: "optional", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], minYear: [{ type: i0.Input, args: [{ isSignal: true, alias: "minYear", required: false }] }], maxYear: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxYear", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], disabledDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDate", required: false }] }], presets: [{ type: i0.Input, args: [{ isSignal: true, alias: "presets", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormat", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], defaultDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultDate", required: false }] }], allowInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowInput", required: false }] }], anchor: [{ type: i0.ViewChild, args: ['anchor', { isSignal: true }] }], inputEl: [{ type: i0.ViewChild, args: ['inputEl', { isSignal: true }] }], panelTpl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
|
|
5117
|
+
], host: { '[class.full-width]': 'fullWidth()' }, template: "<div class=\"field\">\n @if (label()) {\n <span\n class=\"label\"\n [id]=\"labelId\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\"\n >\n (optional)\n </span>\n }\n </span>\n }\n\n <!-- Whole-field click opens the panel; keyboard access is on the inner input\n (aria-haspopup + ArrowDown), so the wrapper needs no key handler of its own. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div\n #anchor\n [class]=\"triggerClasses()\"\n (click)=\"onFieldClick()\"\n >\n <span class=\"input-wrap\">\n <input\n #inputEl\n type=\"text\"\n class=\"date-input\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n aria-haspopup=\"dialog\"\n [class.masked]=\"allowInput()\"\n [value]=\"fieldText()\"\n [attr.size]=\"fieldSize()\"\n [readOnly]=\"!allowInput()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId : null\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"\n invalid() || typedInvalid() || rangeInvalid() ? 'true' : null\n \"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-placeholder]=\"fieldPlaceholder()\"\n (beforeinput)=\"onFieldBeforeInput($event)\"\n (input)=\"onFieldInput($event)\"\n (paste)=\"onFieldPaste($event)\"\n (blur)=\"onFieldBlur()\"\n (keydown)=\"onFieldKeydown($event)\"\n (keydown.arrowdown)=\"open(true); $event.preventDefault()\"\n />\n\n <!-- Per-slot overlay: the real input is transparent (see .masked in the\n SCSS), so this paints every glyph \u2014 digits at normal weight, unfilled\n positions muted. Monospace font keeps letters and digits equal\n width, so glyphs stay aligned 1:1 with the invisible input's caret. -->\n @if (allowInput()) {\n <!-- Whitespace-tight on purpose: the overlay paints with `white-space:\n pre`, so it must hug its tags or stray whitespace would render\n and shift later glyphs out of alignment. -->\n <!-- eslint-disable ds/template/element-content-newline -->\n <span\n class=\"mask-ghost\"\n aria-hidden=\"true\"\n >\n @for (part of displaySlots(); track $index) {\n <span [class.muted]=\"part.muted\">{{ part.text }}</span>\n }\n </span>\n <!-- eslint-enable ds/template/element-content-newline -->\n }\n </span>\n\n <button\n type=\"button\"\n class=\"calendar-toggle\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [disabled]=\"isDisabled()\"\n (click)=\"open(true); $event.stopPropagation()\"\n >\n <ds-icon\n name=\"calendar\"\n [size]=\"16\"\n />\n </button>\n </div>\n\n <ds-field-message\n [text]=\"messageText()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n />\n</div>\n\n<ng-template #panel>\n <!-- Dialog-level click is a pointer-only light-dismiss that closes an open\n month/year popup; keyboard users dismiss it with Escape (bound on each popup). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -->\n <div\n class=\"calendar\"\n role=\"dialog\"\n aria-label=\"Choose date\"\n cdkTrapFocus\n [id]=\"panelId\"\n [class.has-presets]=\"presets().length > 0\"\n (click)=\"closeMenus()\"\n >\n <span\n class=\"visually-hidden\"\n aria-live=\"polite\"\n >\n {{ monthYearLabel() }}\n </span>\n\n <div class=\"calendar-body\">\n <div class=\"head\">\n <span\n class=\"period\"\n [id]=\"captionId\"\n >\n <span class=\"period-item\">\n <button\n type=\"button\"\n class=\"period-trigger\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"monthMenuOpen()\"\n (click)=\"toggleMonthMenu($event)\"\n >\n {{ monthNames()[viewMonthIndex()] }}\n <ds-icon\n name=\"chevronDown\"\n [size]=\"12\"\n />\n </button>\n\n @if (monthMenuOpen()) {\n <!-- Popup container, not a focusable widget: it wraps real <button>s\n and closes on Escape; the click only stops light-dismiss bubbling. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"picker-menu\"\n (click)=\"$event.stopPropagation()\"\n (keydown.escape)=\"closeMenus()\"\n >\n <div\n class=\"picker-grid\"\n role=\"group\"\n aria-label=\"Select month\"\n >\n @for (name of monthNames(); track $index) {\n <button\n type=\"button\"\n class=\"picker-cell\"\n [class.selected]=\"$index === viewMonthIndex()\"\n [attr.aria-label]=\"name\"\n [attr.aria-current]=\"\n $index === viewMonthIndex() ? 'true' : null\n \"\n (click)=\"selectMonth($index, $event)\"\n >\n {{ name.slice(0, 3) }}\n </button>\n }\n </div>\n </div>\n }\n </span>\n\n <span class=\"period-item\">\n <button\n type=\"button\"\n class=\"period-trigger\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"yearMenuOpen()\"\n (click)=\"toggleYearMenu($event)\"\n >\n {{ viewYear() }}\n <ds-icon\n name=\"chevronDown\"\n [size]=\"12\"\n />\n </button>\n\n @if (yearMenuOpen()) {\n <!-- Popup container, not a focusable widget: it wraps real <button>s\n and closes on Escape; the click only stops light-dismiss bubbling. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"picker-menu\"\n (click)=\"$event.stopPropagation()\"\n (keydown.escape)=\"closeMenus()\"\n >\n <div class=\"picker-head\">\n <button\n type=\"button\"\n class=\"picker-nav\"\n aria-label=\"Previous years\"\n [disabled]=\"!canPrevYearPage()\"\n (click)=\"prevYearPage($event)\"\n >\n <ds-icon\n name=\"chevronLeft\"\n [size]=\"14\"\n />\n </button>\n\n <span class=\"picker-range\">\n {{ yearRangeLabel() }}\n </span>\n\n <button\n type=\"button\"\n class=\"picker-nav\"\n aria-label=\"Next years\"\n [disabled]=\"!canNextYearPage()\"\n (click)=\"nextYearPage($event)\"\n >\n <ds-icon\n name=\"chevronRight\"\n [size]=\"14\"\n />\n </button>\n </div>\n\n <div\n class=\"picker-grid\"\n role=\"group\"\n aria-label=\"Select year\"\n >\n @for (year of yearsOnPage(); track year) {\n <button\n type=\"button\"\n class=\"picker-cell year-cell\"\n [class.selected]=\"year === viewYear()\"\n [attr.aria-current]=\"year === viewYear() ? 'true' : null\"\n (click)=\"selectYear(year, $event)\"\n >\n {{ year }}\n </button>\n }\n </div>\n </div>\n }\n </span>\n </span>\n\n <span class=\"nav\">\n <button\n type=\"button\"\n (click)=\"prevMonth()\"\n >\n <ds-icon\n name=\"chevronLeft\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n\n <button\n type=\"button\"\n (click)=\"nextMonth()\"\n >\n <ds-icon\n name=\"chevronRight\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n </span>\n </div>\n\n <div\n class=\"grid\"\n role=\"grid\"\n [attr.aria-labelledby]=\"captionId\"\n >\n <div\n class=\"dow-row\"\n role=\"row\"\n >\n @for (dow of weekdays(); track $index) {\n <span\n class=\"dow\"\n role=\"columnheader\"\n [attr.aria-label]=\"weekdaysFull()[$index]\"\n >\n {{ dow }}\n </span>\n }\n </div>\n\n @for (week of weeksGrid(); track $index) {\n <div\n class=\"week\"\n role=\"row\"\n >\n @for (cell of week; track $index) {\n <ds-calendar-day\n [muted]=\"!cell.inMonth\"\n [today]=\"cell.isToday\"\n [selected]=\"cell.isSelected\"\n [inRange]=\"cell.inRange\"\n [rangeStart]=\"cell.isRangeStart\"\n [rangeEnd]=\"cell.isRangeEnd\"\n [disabled]=\"cell.isDisabled\"\n [dataDay]=\"dayKey(cell.date)\"\n [tabIndex]=\"isFocusDay(cell) ? 0 : -1\"\n [ariaLabel]=\"dayLabel(cell)\"\n (daySelected)=\"selectDay(cell)\"\n (dayKeydown)=\"onGridKeydown($event, cell)\"\n >\n {{ cell.day }}\n </ds-calendar-day>\n }\n </div>\n }\n </div>\n </div>\n\n @if (presets().length > 0) {\n <div class=\"presets\">\n @for (preset of presets(); track $index) {\n <button\n type=\"button\"\n class=\"preset-btn\"\n [disabled]=\"isPresetDisabled(preset)\"\n (click)=\"applyPreset(preset); $event.stopPropagation()\"\n >\n {{ preset.label }}\n </button>\n }\n </div>\n }\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{--_date-picker-focus-shadow: var(--ds-date-picker-focus-shadow, var(--ds-control-focus-shadow));--_date-picker-trigger-bg-color: var(--ds-date-picker-trigger-bg-color, var(--surface-default));--_date-picker-trigger-border-color: var(--ds-date-picker-trigger-border-color, var(--border-default));--_date-picker-trigger-label-color: var(--ds-date-picker-trigger-label-color, var(--text-primary));--_date-picker-required-color: var(--ds-date-picker-required-color, var(--error));--_date-picker-placeholder-color: var(--ds-date-picker-placeholder-color, var(--text-tertiary));--_date-picker-trigger-radius: var(--ds-date-picker-trigger-radius, var(--radius-md));--_date-picker-value-font-family: var(--ds-date-picker-value-font-family, var(--font-mono));--_date-picker-value-font-size: var(--ds-date-picker-value-font-size, var(--font-size-s));--_date-picker-value-weight: var(--ds-date-picker-value-weight, var(--font-weight-regular));display:block;width:fit-content;max-width:100%}:host(.full-width){width:100%}:host(.full-width) .trigger{width:100%}:host(.full-width) .input-wrap{flex:1}:host(.full-width) .date-input{flex:1}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.field{display:flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap);width:100%}.field .label{font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-secondary);display:flex;align-items:center;gap:var(--space-1)}.field .label .req{color:var(--_date-picker-required-color);font-weight:var(--font-weight-semibold)}.field .label .optional-marker{color:var(--text-tertiary);font-weight:var(--font-weight-regular)}.trigger{display:inline-flex;align-items:center;gap:var(--space-1);background:var(--_date-picker-trigger-bg-color);border:var(--border-width-default) solid var(--_date-picker-trigger-border-color);border-radius:var(--_date-picker-trigger-radius);padding:0 var(--space-3);height:var(--hit-cozy);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_date-picker-trigger-label-color);cursor:pointer;transition:border-color var(--duration-fast) var(--ease-standard)}.trigger:hover{border-color:var(--border-strong)}.trigger:focus-visible,.trigger:focus-within{outline:none;box-shadow:var(--_date-picker-focus-shadow)}.trigger.sm{height:var(--hit-min);padding:0 var(--space-2);font-size:var(--font-size-xs)}.trigger.lg{height:var(--field-h-lg);padding:0 var(--space-4);font-size:var(--font-size-m)}.trigger.error{background:var(--error-subtitle);border-color:var(--error)}.trigger.disabled,.trigger:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);color:var(--text-disabled);cursor:not-allowed;opacity:var(--opacity-muted)}.input-wrap{position:relative;display:inline-flex;align-items:center}.mask-ghost{position:absolute;inset:0;display:flex;align-items:center;font:inherit;font-family:var(--_date-picker-value-font-family);font-size:var(--_date-picker-value-font-size);font-weight:var(--_date-picker-value-weight);font-variant-numeric:tabular-nums;white-space:pre;pointer-events:none;overflow:hidden}.mask-ghost .muted{color:var(--_date-picker-placeholder-color)}.date-input{width:auto;border:none;background:transparent;color:inherit;font:inherit;font-family:var(--_date-picker-value-font-family);font-size:var(--_date-picker-value-font-size);font-weight:var(--_date-picker-value-weight);font-variant-numeric:tabular-nums;padding:0;outline:none}.date-input.masked{color:transparent;caret-color:var(--_date-picker-trigger-label-color)}.date-input:read-only{cursor:pointer}.date-input:disabled{cursor:not-allowed}.calendar-toggle{display:inline-flex;align-items:center;border:none;background:transparent;color:var(--icon-default);padding:0;cursor:pointer}.calendar-toggle:disabled{cursor:not-allowed}.calendar{--_date-picker-bg-color: var(--ds-date-picker-bg-color, var(--surface-overlay));--_date-picker-border: var(--ds-date-picker-border, var(--border-default));--_date-picker-shadow: var(--ds-date-picker-shadow, var(--shadow-popover));--_date-picker-day-hover-bg-color: var(--ds-date-picker-day-hover-bg-color, var(--surface-secondary));--_date-picker-day-today-label-color: var(--ds-date-picker-day-today-label-color, var(--accent));--_date-picker-day-selected-bg-color: var(--ds-date-picker-day-selected-bg-color, var(--accent));--_date-picker-day-selected-bg-color-hover: var(--ds-date-picker-day-selected-bg-color-hover, var(--accent-hover));--_date-picker-day-selected-label-color: var(--ds-date-picker-day-selected-label-color, var(--accent-on));--_date-picker-day-range-bg-color: var(--ds-date-picker-day-range-bg-color, var(--accent-subtitle));--_date-picker-day-range-label-color: var(--ds-date-picker-day-range-label-color, var(--accent-strong));--_date-picker-day-disabled-label-color: var(--ds-date-picker-day-disabled-label-color, var(--text-disabled));--_date-picker-day-label-color: var(--ds-date-picker-day-label-color, var(--text-primary));--_date-picker-day-muted-label-color: var(--ds-date-picker-day-muted-label-color, var(--text-muted));--_date-picker-weekday-color: var(--ds-date-picker-weekday-color, var(--text-tertiary));--_date-picker-header-label-color: var(--ds-date-picker-header-label-color, var(--text-primary));--_date-picker-nav-icon-color: var(--ds-date-picker-nav-icon-color, var(--icon-default));--_date-picker-width: var(--ds-date-picker-width, var(--date-picker-w));--_date-picker-panel-radius: var(--ds-date-picker-panel-radius, var(--radius-lg));background-color:var(--_date-picker-bg-color);border:var(--border-width-default) solid var(--_date-picker-border);border-radius:var(--_date-picker-panel-radius);box-shadow:var(--_date-picker-shadow);padding:var(--space-3);width:var(--_date-picker-width)}.calendar .head{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--space-2)}.calendar .period{display:flex;gap:var(--space-1)}.calendar .period-item{position:relative}.calendar .period-trigger{display:inline-flex;align-items:center;gap:var(--space-1);border:0;background:transparent;padding:var(--space-1) var(--space-1-5);border-radius:var(--radius-sm);font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_date-picker-header-label-color);cursor:pointer}.calendar .period-trigger:hover{background-color:var(--_date-picker-day-hover-bg-color)}.calendar .period-trigger:focus-visible{outline:none;box-shadow:var(--_date-picker-focus-shadow)}.calendar .picker-menu{position:absolute;top:calc(100% + var(--space-1));left:0;z-index:1;padding:var(--space-2);width:max-content;min-width:100%;background-color:var(--_date-picker-bg-color);border:var(--border-width-default) solid var(--_date-picker-border);border-radius:var(--radius-md);box-shadow:var(--_date-picker-shadow)}.calendar .picker-head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2);margin-bottom:var(--space-2)}.calendar .picker-head .picker-nav{width:var(--date-picker-nav-size);height:var(--date-picker-nav-size);border:0;background:transparent;display:grid;place-items:center;color:var(--_date-picker-nav-icon-color);cursor:pointer;border-radius:var(--radius-sm)}.calendar .picker-head .picker-nav:hover:not(:disabled){background-color:var(--_date-picker-day-hover-bg-color)}.calendar .picker-head .picker-nav:disabled{opacity:var(--opacity-muted);cursor:not-allowed}.calendar .picker-head .picker-range{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_date-picker-header-label-color)}.calendar .picker-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-1)}.calendar .picker-cell{border:0;background:transparent;padding:var(--space-1-5) var(--space-2);border-radius:var(--radius-sm);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--text-primary);cursor:pointer;text-align:center;white-space:nowrap}.calendar .picker-cell:hover{background-color:var(--_date-picker-day-hover-bg-color)}.calendar .picker-cell:focus-visible{outline:none;box-shadow:var(--_date-picker-focus-shadow)}.calendar .picker-cell.selected{background-color:var(--_date-picker-day-selected-bg-color);color:var(--_date-picker-day-selected-label-color);font-weight:var(--font-weight-bold)}.calendar .nav{display:flex;gap:var(--space-1)}.calendar .nav button{width:var(--date-picker-nav-size);height:var(--date-picker-nav-size);border:0;background:transparent;display:grid;place-items:center;color:var(--_date-picker-nav-icon-color);cursor:pointer;border-radius:var(--radius-sm)}.calendar .nav button:hover{background-color:var(--_date-picker-day-hover-bg-color)}.calendar .grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:var(--date-picker-cell-gap)}.calendar .dow-row,.calendar .week{display:contents}.calendar .dow{font:var(--font-weight-bold) var(--font-size-2xs)/var(--line-height-flat) var(--font-sans);text-align:center;padding:var(--space-1) 0;color:var(--_date-picker-weekday-color);text-transform:uppercase;letter-spacing:var(--letter-spacing-wider)}.calendar.has-presets{display:flex;flex-direction:row;gap:var(--space-3);width:auto}.calendar.has-presets .calendar-body{flex:0 0 var(--_date-picker-width);width:var(--_date-picker-width)}.calendar .calendar-body{display:flex;flex-direction:column}.calendar .presets{display:flex;flex-direction:column;gap:var(--space-1);border-left:var(--border-width-default) solid var(--_date-picker-border);padding-left:var(--space-3);min-width:8.5rem}.calendar .preset-btn{display:flex;align-items:center;width:100%;min-height:var(--hit-min);border:0;background:transparent;padding:var(--space-2) var(--space-3);border-radius:var(--radius-sm);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--text-primary);cursor:pointer;text-align:left;white-space:nowrap}.calendar .preset-btn:hover:not(:disabled){background-color:var(--_date-picker-day-hover-bg-color)}.calendar .preset-btn:focus-visible{outline:none;box-shadow:var(--_date-picker-focus-shadow)}.calendar .preset-btn:disabled{color:var(--_date-picker-day-disabled-label-color);cursor:not-allowed}@media(width<640px){.calendar{max-width:calc(100vw - var(--space-4))}.calendar.has-presets{flex-direction:column;width:100%}.calendar.has-presets .calendar-body{flex:1 1 auto;width:100%}.calendar .presets{border-left:0;padding-left:0;border-top:var(--border-width-default) solid var(--_date-picker-border);padding-top:var(--space-3);min-width:0;width:100%}}\n"] }]
|
|
5118
|
+
}], ctorParameters: () => [], propDecorators: { mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], reserveMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveMessage", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], optional: [{ type: i0.Input, args: [{ isSignal: true, alias: "optional", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], minYear: [{ type: i0.Input, args: [{ isSignal: true, alias: "minYear", required: false }] }], maxYear: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxYear", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], disabledDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDate", required: false }] }], presets: [{ type: i0.Input, args: [{ isSignal: true, alias: "presets", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormat", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], defaultDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultDate", required: false }] }], allowInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowInput", required: false }] }], anchor: [{ type: i0.ViewChild, args: ['anchor', { isSignal: true }] }], inputEl: [{ type: i0.ViewChild, args: ['inputEl', { isSignal: true }] }], panelTpl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
|
|
4820
5119
|
|
|
4821
5120
|
function pad2(value) {
|
|
4822
5121
|
return value < 10 ? `0${value}` : `${value}`;
|
|
@@ -5186,6 +5485,16 @@ class TimePickerComponent extends DsControlValueAccessor {
|
|
|
5186
5485
|
disabledTime = input(null, ...(ngDevMode ? [{ debugName: "disabledTime" }] : /* istanbul ignore next */ []));
|
|
5187
5486
|
/** Trigger height — sm/md/lg. */
|
|
5188
5487
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
5488
|
+
/** Stretch the trigger to fill its container instead of hugging its content —
|
|
5489
|
+
* opt in when the field shares a grid/flex track with inputs. */
|
|
5490
|
+
fullWidth = input(false, { ...(ngDevMode ? { debugName: "fullWidth" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
5491
|
+
/** Field label shown above the trigger — same row a `ds-date-picker` label
|
|
5492
|
+
* occupies, so date + time in one form row line up without a hand-rolled label. */
|
|
5493
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
5494
|
+
/** Marks the field required — shows an asterisk and sets `aria-required`. */
|
|
5495
|
+
required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
5496
|
+
/** Shows an "(optional)" marker beside the label — ignored when `required` is set. */
|
|
5497
|
+
optional = input(false, { ...(ngDevMode ? { debugName: "optional" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
5189
5498
|
/** Disables the picker and blocks all interaction. */
|
|
5190
5499
|
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
5191
5500
|
/** Applies error styling and marks the trigger `aria-invalid`. */
|
|
@@ -5193,9 +5502,11 @@ class TimePickerComponent extends DsControlValueAccessor {
|
|
|
5193
5502
|
/** Helper text shown below the picker. */
|
|
5194
5503
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
5195
5504
|
/** Reserve the message-row height even when empty, so the field doesn't shift
|
|
5196
|
-
* the layout below it when a hint/error appears.
|
|
5197
|
-
*
|
|
5198
|
-
|
|
5505
|
+
* the layout below it when a hint/error appears. Falls back to
|
|
5506
|
+
* `DS_CONFIG.field.reserveMessage`, then off — opt in per field, or app-wide
|
|
5507
|
+
* for a form that shows validation messages. */
|
|
5508
|
+
reserveMessage = input(null, { ...(ngDevMode ? { debugName: "reserveMessage" } : /* istanbul ignore next */ {}), transform: (value) => (value == null ? null : booleanAttribute(value)) });
|
|
5509
|
+
reserveMessageResolved = resolveReserveMessage(this.reserveMessage);
|
|
5199
5510
|
/** Shown in the trigger when no time is set. */
|
|
5200
5511
|
placeholder = input('--:--', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
5201
5512
|
/** Shows an inline clear button when a value is set — single mode only. */
|
|
@@ -5205,6 +5516,7 @@ class TimePickerComponent extends DsControlValueAccessor {
|
|
|
5205
5516
|
/** Override the DS-config format for this instance. */
|
|
5206
5517
|
format = input(null, ...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
|
|
5207
5518
|
uid = `ds-timepicker-${++nextId$7}`;
|
|
5519
|
+
labelId = `${this.uid}-label`;
|
|
5208
5520
|
openSegment = signal(null, ...(ngDevMode ? [{ debugName: "openSegment" }] : /* istanbul ignore next */ []));
|
|
5209
5521
|
overlayRef = null;
|
|
5210
5522
|
singleTrigger = viewChild('singleTrigger', ...(ngDevMode ? [{ debugName: "singleTrigger" }] : /* istanbul ignore next */ []));
|
|
@@ -5263,7 +5575,9 @@ class TimePickerComponent extends DsControlValueAccessor {
|
|
|
5263
5575
|
}, ...(ngDevMode ? [{ debugName: "panelMinTime" }] : /* istanbul ignore next */ []));
|
|
5264
5576
|
panelMaxTime = computed(() => this.maxTime(), ...(ngDevMode ? [{ debugName: "panelMaxTime" }] : /* istanbul ignore next */ []));
|
|
5265
5577
|
ariaLabelFor(segment) {
|
|
5266
|
-
|
|
5578
|
+
// A visible label is the accessible name; range segments still need the
|
|
5579
|
+
// from/to suffix, so they keep an aria-label built from it.
|
|
5580
|
+
const base = this.ariaLabel() ?? (this.label() || 'Select time');
|
|
5267
5581
|
if (segment === 'start') {
|
|
5268
5582
|
return `${base} (from)`;
|
|
5269
5583
|
}
|
|
@@ -5309,6 +5623,7 @@ class TimePickerComponent extends DsControlValueAccessor {
|
|
|
5309
5623
|
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
5310
5624
|
};
|
|
5311
5625
|
this.overlayRef = this.overlay.create(cfg);
|
|
5626
|
+
prepareOverlayEnter(this.overlayRef, this.host.nativeElement, positionStrategy);
|
|
5312
5627
|
forwardOverlayTokens(this.overlayRef, this.host.nativeElement, this.panelTokens);
|
|
5313
5628
|
closeOnOutsidePointer(this.overlayRef, (target) => this.host.nativeElement.contains(target), () => this.close());
|
|
5314
5629
|
// No backdrop catches a page scroll and CDK's scroll strategies miss a plain
|
|
@@ -5416,13 +5731,13 @@ class TimePickerComponent extends DsControlValueAccessor {
|
|
|
5416
5731
|
return this.minutesOf(a) >= this.minutesOf(b) ? a : b;
|
|
5417
5732
|
}
|
|
5418
5733
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TimePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5419
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TimePickerComponent, isStandalone: true, selector: "ds-time-picker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, minuteStep: { classPropertyName: "minuteStep", publicName: "minuteStep", isSignal: true, isRequired: false, transformFunction: null }, minTime: { classPropertyName: "minTime", publicName: "minTime", isSignal: true, isRequired: false, transformFunction: null }, maxTime: { classPropertyName: "maxTime", publicName: "maxTime", isSignal: true, isRequired: false, transformFunction: null }, disabledTime: { classPropertyName: "disabledTime", publicName: "disabledTime", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", 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 }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, reserveMessage: { classPropertyName: "reserveMessage", publicName: "reserveMessage", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [
|
|
5734
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TimePickerComponent, isStandalone: true, selector: "ds-time-picker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, minuteStep: { classPropertyName: "minuteStep", publicName: "minuteStep", isSignal: true, isRequired: false, transformFunction: null }, minTime: { classPropertyName: "minTime", publicName: "minTime", isSignal: true, isRequired: false, transformFunction: null }, maxTime: { classPropertyName: "maxTime", publicName: "maxTime", isSignal: true, isRequired: false, transformFunction: null }, disabledTime: { classPropertyName: "disabledTime", publicName: "disabledTime", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, optional: { classPropertyName: "optional", publicName: "optional", 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 }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, reserveMessage: { classPropertyName: "reserveMessage", publicName: "reserveMessage", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class.full-width": "fullWidth()" } }, providers: [
|
|
5420
5735
|
{
|
|
5421
5736
|
provide: NG_VALUE_ACCESSOR,
|
|
5422
5737
|
useExisting: forwardRef(() => TimePickerComponent),
|
|
5423
5738
|
multi: true,
|
|
5424
5739
|
},
|
|
5425
|
-
], viewQueries: [{ propertyName: "singleTrigger", first: true, predicate: ["singleTrigger"], descendants: true, isSignal: true }, { propertyName: "startTrigger", first: true, predicate: ["startTrigger"], descendants: true, isSignal: true }, { propertyName: "endTrigger", first: true, predicate: ["endTrigger"], descendants: true, isSignal: true }, { propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "columns", first: true, predicate: TimeColumnsComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"field\">\n @if (mode() === 'range') {\n <div class=\"range-wrap\">\n <div class=\"trigger-wrap\">\n <button\n #startTrigger\n type=\"button\"\n aria-haspopup=\"dialog\"\n [class]=\"triggerClasses()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-expanded]=\"openSegment() === 'start'\"\n [attr.aria-label]=\"ariaLabelFor('start')\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n (click)=\"onTriggerClick('start')\"\n >\n <
|
|
5740
|
+
], viewQueries: [{ propertyName: "singleTrigger", first: true, predicate: ["singleTrigger"], descendants: true, isSignal: true }, { propertyName: "startTrigger", first: true, predicate: ["startTrigger"], descendants: true, isSignal: true }, { propertyName: "endTrigger", first: true, predicate: ["endTrigger"], descendants: true, isSignal: true }, { propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "columns", first: true, predicate: TimeColumnsComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"field\">\n @if (label()) {\n <span\n class=\"label\"\n [id]=\"labelId\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\"\n >\n (optional)\n </span>\n }\n </span>\n }\n\n @if (mode() === 'range') {\n <div class=\"range-wrap\">\n <div class=\"trigger-wrap\">\n <button\n #startTrigger\n type=\"button\"\n aria-haspopup=\"dialog\"\n [class]=\"triggerClasses()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-expanded]=\"openSegment() === 'start'\"\n [attr.aria-label]=\"ariaLabelFor('start')\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n (click)=\"onTriggerClick('start')\"\n >\n <span class=\"time-value\">\n {{ formatFor(rangeValue()[0]) || placeholder() }}\n </span>\n\n <ds-icon\n name=\"clock\"\n [size]=\"16\"\n />\n </button>\n </div>\n\n <span\n class=\"range-sep\"\n aria-hidden=\"true\"\n >\n \u2013\n </span>\n\n <div class=\"trigger-wrap\">\n <button\n #endTrigger\n type=\"button\"\n aria-haspopup=\"dialog\"\n [class]=\"triggerClasses()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-expanded]=\"openSegment() === 'end'\"\n [attr.aria-label]=\"ariaLabelFor('end')\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n (click)=\"onTriggerClick('end')\"\n >\n <span class=\"time-value\">\n {{ formatFor(rangeValue()[1]) || placeholder() }}\n </span>\n\n <ds-icon\n name=\"clock\"\n [size]=\"16\"\n />\n </button>\n </div>\n </div>\n } @else {\n <div class=\"trigger-wrap\">\n <button\n #singleTrigger\n type=\"button\"\n aria-haspopup=\"dialog\"\n [class]=\"triggerClasses()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-expanded]=\"openSegment() === 'single'\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-label]=\"label() ? null : ariaLabelFor('single')\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n (click)=\"onTriggerClick('single')\"\n >\n <span class=\"time-value\">\n {{ displayValue() }}\n </span>\n\n <ds-icon\n name=\"clock\"\n [size]=\"16\"\n />\n </button>\n\n @if (clearable() && hasValue()) {\n <button\n type=\"button\"\n class=\"time-clear\"\n aria-label=\"Clear\"\n [disabled]=\"isDisabled()\"\n (click)=\"clear($event)\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n />\n </button>\n }\n </div>\n }\n\n <ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n />\n</div>\n\n<ng-template #panel>\n <div class=\"time-panel\">\n <ds-time-columns\n [value]=\"panelValue()\"\n [format]=\"resolvedFormat()\"\n [minuteStep]=\"minuteStep()\"\n [minTime]=\"panelMinTime()\"\n [maxTime]=\"panelMaxTime()\"\n [disabledTime]=\"disabledTime()\"\n (timeChange)=\"onPick($event)\"\n />\n\n <div class=\"time-footer\">\n <button\n type=\"button\"\n class=\"time-action\"\n (click)=\"setNow()\"\n >\n Now\n </button>\n\n <button\n type=\"button\"\n class=\"time-action primary\"\n (click)=\"onEscape()\"\n >\n Done\n </button>\n </div>\n </div>\n</ng-template>\n", styles: [":host{--_time-picker-focus-shadow: var( --ds-time-picker-focus-shadow, var(--ds-control-focus-shadow) );--_time-picker-trigger-bg-color: var( --ds-time-picker-trigger-bg-color, var(--surface-default) );--_time-picker-trigger-border: var( --ds-time-picker-trigger-border, var(--border-default) );--_time-picker-trigger-color: var( --ds-time-picker-trigger-color, var(--text-primary) );--_time-picker-trigger-radius: var(--ds-time-picker-trigger-radius, var(--radius-md));--_time-picker-required-color: var(--ds-time-picker-required-color, var(--error));--_time-picker-value-font-family: var(--ds-time-picker-value-font-family, var(--font-sans));--_time-picker-value-font-size: var(--ds-time-picker-value-font-size, var(--font-size-s));--_time-picker-value-weight: var(--ds-time-picker-value-weight, var(--font-weight-regular));display:block}.field{display:flex;flex-direction:column;gap:var(--field-label-gap);width:100%}.field .label{font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-secondary);display:flex;align-items:center;gap:var(--space-1)}.field .label .req{color:var(--_time-picker-required-color);font-weight:var(--font-weight-semibold)}.field .label .optional-marker{color:var(--text-tertiary);font-weight:var(--font-weight-regular)}.trigger-wrap{position:relative;display:inline-flex;width:fit-content}:host(.full-width) .trigger-wrap,:host(.full-width) .range-wrap,:host(.full-width) .trigger{width:100%}.range-wrap{display:inline-flex;align-items:center;gap:var(--space-2);width:fit-content}.range-sep{color:var(--text-tertiary)}.trigger{display:inline-flex;align-items:center;gap:var(--space-1);background:var(--_time-picker-trigger-bg-color);border:var(--border-width-default) solid var(--_time-picker-trigger-border);border-radius:var(--_time-picker-trigger-radius);padding:0 var(--space-3);height:var(--hit-cozy);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_time-picker-trigger-color);cursor:pointer;transition:border-color var(--duration-fast) var(--ease-standard)}.trigger:hover{border-color:var(--border-strong)}.trigger:focus-visible{outline:none;box-shadow:var(--_time-picker-focus-shadow)}.trigger.sm{height:var(--hit-min);padding:0 var(--space-2);font-size:var(--font-size-xs)}.trigger.lg{height:var(--field-h-lg);padding:0 var(--space-4);font-size:var(--font-size-m)}.trigger.error{background:var(--error-subtitle);border-color:var(--error)}.trigger.disabled,.trigger:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);color:var(--text-disabled);cursor:not-allowed;opacity:var(--opacity-muted)}.trigger.has-clear{padding-right:var(--space-8)}.trigger.lg.has-clear{padding-right:var(--space-10)}.time-value{flex:1;text-align:left;font-family:var(--_time-picker-value-font-family);font-size:var(--_time-picker-value-font-size);font-weight:var(--_time-picker-value-weight);font-variant-numeric:tabular-nums}.time-clear{position:absolute;top:50%;right:var(--space-2);transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;border:0;padding:var(--space-1);border-radius:var(--radius-sm);background:transparent;color:var(--text-tertiary);cursor:pointer;transition:color var(--duration-fast) var(--ease-standard)}.time-clear:hover:not(:disabled){color:var(--text-primary)}.time-clear:focus-visible{outline:none;box-shadow:var(--_time-picker-focus-shadow)}.time-clear:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.time-panel{display:flex;flex-direction:column;background:var(--ds-time-picker-bg-color, var(--surface-overlay));border:var(--border-width-default) solid var(--ds-time-picker-border, var(--border-default));border-radius:var(--radius-md);box-shadow:var(--ds-time-picker-shadow, var(--shadow-popover));padding:var(--space-2);gap:var(--space-1)}.time-footer{display:flex;justify-content:flex-end;gap:var(--space-2);padding-top:var(--space-1);border-top:var(--border-width-default) solid var(--border-subtitle)}.time-action{appearance:none;border:0;background:transparent;cursor:pointer;padding:var(--space-1) var(--space-2);border-radius:var(--radius-sm);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--text-secondary);transition:background-color var(--duration-fast) var(--ease-standard)}.time-action:hover{background-color:var(--surface-secondary)}.time-action.primary{color:var(--accent)}.time-action:focus-visible{outline:none;box-shadow:var(--_time-picker-focus-shadow)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }, { kind: "component", type: TimeColumnsComponent, selector: "ds-time-columns", inputs: ["value", "format", "minuteStep", "minTime", "maxTime", "disabledTime"], outputs: ["timeChange"] }] });
|
|
5426
5741
|
}
|
|
5427
5742
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TimePickerComponent, decorators: [{
|
|
5428
5743
|
type: Component,
|
|
@@ -5432,8 +5747,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
5432
5747
|
useExisting: forwardRef(() => TimePickerComponent),
|
|
5433
5748
|
multi: true,
|
|
5434
5749
|
},
|
|
5435
|
-
], template: "<div class=\"field\">\n @if (mode() === 'range') {\n <div class=\"range-wrap\">\n <div class=\"trigger-wrap\">\n <button\n #startTrigger\n type=\"button\"\n aria-haspopup=\"dialog\"\n [class]=\"triggerClasses()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-expanded]=\"openSegment() === 'start'\"\n [attr.aria-label]=\"ariaLabelFor('start')\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n (click)=\"onTriggerClick('start')\"\n >\n <
|
|
5436
|
-
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], minuteStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteStep", required: false }] }], minTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "minTime", required: false }] }], maxTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxTime", required: false }] }], disabledTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledTime", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], reserveMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveMessage", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }], singleTrigger: [{ type: i0.ViewChild, args: ['singleTrigger', { isSignal: true }] }], startTrigger: [{ type: i0.ViewChild, args: ['startTrigger', { isSignal: true }] }], endTrigger: [{ type: i0.ViewChild, args: ['endTrigger', { isSignal: true }] }], panelTpl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], columns: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TimeColumnsComponent), { isSignal: true }] }] } });
|
|
5750
|
+
], host: { '[class.full-width]': 'fullWidth()' }, template: "<div class=\"field\">\n @if (label()) {\n <span\n class=\"label\"\n [id]=\"labelId\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\"\n >\n (optional)\n </span>\n }\n </span>\n }\n\n @if (mode() === 'range') {\n <div class=\"range-wrap\">\n <div class=\"trigger-wrap\">\n <button\n #startTrigger\n type=\"button\"\n aria-haspopup=\"dialog\"\n [class]=\"triggerClasses()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-expanded]=\"openSegment() === 'start'\"\n [attr.aria-label]=\"ariaLabelFor('start')\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n (click)=\"onTriggerClick('start')\"\n >\n <span class=\"time-value\">\n {{ formatFor(rangeValue()[0]) || placeholder() }}\n </span>\n\n <ds-icon\n name=\"clock\"\n [size]=\"16\"\n />\n </button>\n </div>\n\n <span\n class=\"range-sep\"\n aria-hidden=\"true\"\n >\n \u2013\n </span>\n\n <div class=\"trigger-wrap\">\n <button\n #endTrigger\n type=\"button\"\n aria-haspopup=\"dialog\"\n [class]=\"triggerClasses()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-expanded]=\"openSegment() === 'end'\"\n [attr.aria-label]=\"ariaLabelFor('end')\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n (click)=\"onTriggerClick('end')\"\n >\n <span class=\"time-value\">\n {{ formatFor(rangeValue()[1]) || placeholder() }}\n </span>\n\n <ds-icon\n name=\"clock\"\n [size]=\"16\"\n />\n </button>\n </div>\n </div>\n } @else {\n <div class=\"trigger-wrap\">\n <button\n #singleTrigger\n type=\"button\"\n aria-haspopup=\"dialog\"\n [class]=\"triggerClasses()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-expanded]=\"openSegment() === 'single'\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-label]=\"label() ? null : ariaLabelFor('single')\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n (click)=\"onTriggerClick('single')\"\n >\n <span class=\"time-value\">\n {{ displayValue() }}\n </span>\n\n <ds-icon\n name=\"clock\"\n [size]=\"16\"\n />\n </button>\n\n @if (clearable() && hasValue()) {\n <button\n type=\"button\"\n class=\"time-clear\"\n aria-label=\"Clear\"\n [disabled]=\"isDisabled()\"\n (click)=\"clear($event)\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n />\n </button>\n }\n </div>\n }\n\n <ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n />\n</div>\n\n<ng-template #panel>\n <div class=\"time-panel\">\n <ds-time-columns\n [value]=\"panelValue()\"\n [format]=\"resolvedFormat()\"\n [minuteStep]=\"minuteStep()\"\n [minTime]=\"panelMinTime()\"\n [maxTime]=\"panelMaxTime()\"\n [disabledTime]=\"disabledTime()\"\n (timeChange)=\"onPick($event)\"\n />\n\n <div class=\"time-footer\">\n <button\n type=\"button\"\n class=\"time-action\"\n (click)=\"setNow()\"\n >\n Now\n </button>\n\n <button\n type=\"button\"\n class=\"time-action primary\"\n (click)=\"onEscape()\"\n >\n Done\n </button>\n </div>\n </div>\n</ng-template>\n", styles: [":host{--_time-picker-focus-shadow: var( --ds-time-picker-focus-shadow, var(--ds-control-focus-shadow) );--_time-picker-trigger-bg-color: var( --ds-time-picker-trigger-bg-color, var(--surface-default) );--_time-picker-trigger-border: var( --ds-time-picker-trigger-border, var(--border-default) );--_time-picker-trigger-color: var( --ds-time-picker-trigger-color, var(--text-primary) );--_time-picker-trigger-radius: var(--ds-time-picker-trigger-radius, var(--radius-md));--_time-picker-required-color: var(--ds-time-picker-required-color, var(--error));--_time-picker-value-font-family: var(--ds-time-picker-value-font-family, var(--font-sans));--_time-picker-value-font-size: var(--ds-time-picker-value-font-size, var(--font-size-s));--_time-picker-value-weight: var(--ds-time-picker-value-weight, var(--font-weight-regular));display:block}.field{display:flex;flex-direction:column;gap:var(--field-label-gap);width:100%}.field .label{font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-secondary);display:flex;align-items:center;gap:var(--space-1)}.field .label .req{color:var(--_time-picker-required-color);font-weight:var(--font-weight-semibold)}.field .label .optional-marker{color:var(--text-tertiary);font-weight:var(--font-weight-regular)}.trigger-wrap{position:relative;display:inline-flex;width:fit-content}:host(.full-width) .trigger-wrap,:host(.full-width) .range-wrap,:host(.full-width) .trigger{width:100%}.range-wrap{display:inline-flex;align-items:center;gap:var(--space-2);width:fit-content}.range-sep{color:var(--text-tertiary)}.trigger{display:inline-flex;align-items:center;gap:var(--space-1);background:var(--_time-picker-trigger-bg-color);border:var(--border-width-default) solid var(--_time-picker-trigger-border);border-radius:var(--_time-picker-trigger-radius);padding:0 var(--space-3);height:var(--hit-cozy);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_time-picker-trigger-color);cursor:pointer;transition:border-color var(--duration-fast) var(--ease-standard)}.trigger:hover{border-color:var(--border-strong)}.trigger:focus-visible{outline:none;box-shadow:var(--_time-picker-focus-shadow)}.trigger.sm{height:var(--hit-min);padding:0 var(--space-2);font-size:var(--font-size-xs)}.trigger.lg{height:var(--field-h-lg);padding:0 var(--space-4);font-size:var(--font-size-m)}.trigger.error{background:var(--error-subtitle);border-color:var(--error)}.trigger.disabled,.trigger:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);color:var(--text-disabled);cursor:not-allowed;opacity:var(--opacity-muted)}.trigger.has-clear{padding-right:var(--space-8)}.trigger.lg.has-clear{padding-right:var(--space-10)}.time-value{flex:1;text-align:left;font-family:var(--_time-picker-value-font-family);font-size:var(--_time-picker-value-font-size);font-weight:var(--_time-picker-value-weight);font-variant-numeric:tabular-nums}.time-clear{position:absolute;top:50%;right:var(--space-2);transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;border:0;padding:var(--space-1);border-radius:var(--radius-sm);background:transparent;color:var(--text-tertiary);cursor:pointer;transition:color var(--duration-fast) var(--ease-standard)}.time-clear:hover:not(:disabled){color:var(--text-primary)}.time-clear:focus-visible{outline:none;box-shadow:var(--_time-picker-focus-shadow)}.time-clear:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.time-panel{display:flex;flex-direction:column;background:var(--ds-time-picker-bg-color, var(--surface-overlay));border:var(--border-width-default) solid var(--ds-time-picker-border, var(--border-default));border-radius:var(--radius-md);box-shadow:var(--ds-time-picker-shadow, var(--shadow-popover));padding:var(--space-2);gap:var(--space-1)}.time-footer{display:flex;justify-content:flex-end;gap:var(--space-2);padding-top:var(--space-1);border-top:var(--border-width-default) solid var(--border-subtitle)}.time-action{appearance:none;border:0;background:transparent;cursor:pointer;padding:var(--space-1) var(--space-2);border-radius:var(--radius-sm);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--text-secondary);transition:background-color var(--duration-fast) var(--ease-standard)}.time-action:hover{background-color:var(--surface-secondary)}.time-action.primary{color:var(--accent)}.time-action:focus-visible{outline:none;box-shadow:var(--_time-picker-focus-shadow)}\n"] }]
|
|
5751
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], minuteStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteStep", required: false }] }], minTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "minTime", required: false }] }], maxTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxTime", required: false }] }], disabledTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledTime", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], optional: [{ type: i0.Input, args: [{ isSignal: true, alias: "optional", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], reserveMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveMessage", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }], singleTrigger: [{ type: i0.ViewChild, args: ['singleTrigger', { isSignal: true }] }], startTrigger: [{ type: i0.ViewChild, args: ['startTrigger', { isSignal: true }] }], endTrigger: [{ type: i0.ViewChild, args: ['endTrigger', { isSignal: true }] }], panelTpl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], columns: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TimeColumnsComponent), { isSignal: true }] }] } });
|
|
5437
5752
|
|
|
5438
5753
|
/**
|
|
5439
5754
|
* Library-level breadcrumb state. Apps push items either programmatically
|
|
@@ -5602,7 +5917,38 @@ class TooltipDirective {
|
|
|
5602
5917
|
ref = null;
|
|
5603
5918
|
timer = null;
|
|
5604
5919
|
tipId = `ds-tooltip-${++nextId$6}`;
|
|
5605
|
-
|
|
5920
|
+
/**
|
|
5921
|
+
* Where `aria-describedby` belongs, when focus is involved. A host that is not
|
|
5922
|
+
* focusable itself never reaches a screen reader — `ds-menu-item` carries
|
|
5923
|
+
* `role="none"` and puts the real `<button>` inside — so describing the host
|
|
5924
|
+
* describes something the user never focuses. `focusin` bubbles, so its target
|
|
5925
|
+
* IS whatever took focus; recording it is what keeps this directive out of the
|
|
5926
|
+
* host component's internal DOM. A pointer-only open leaves this null and
|
|
5927
|
+
* falls back to the host, where no screen reader is involved anyway.
|
|
5928
|
+
*/
|
|
5929
|
+
focusedTarget = null;
|
|
5930
|
+
/**
|
|
5931
|
+
* Where `aria-describedby` was actually written, remembered so teardown strips
|
|
5932
|
+
* it from the same element. Not derivable at teardown: focus can arrive after
|
|
5933
|
+
* the panel opened (hover, then click or arrow onto it), which moves
|
|
5934
|
+
* `focusedTarget` and would otherwise strand the attribute on the host,
|
|
5935
|
+
* pointing at a panel that no longer exists.
|
|
5936
|
+
*/
|
|
5937
|
+
describedElement = null;
|
|
5938
|
+
onPointerEnter() {
|
|
5939
|
+
this.scheduleShow();
|
|
5940
|
+
}
|
|
5941
|
+
onFocusIn(event) {
|
|
5942
|
+
if (event.target instanceof HTMLElement) {
|
|
5943
|
+
this.focusedTarget = event.target;
|
|
5944
|
+
}
|
|
5945
|
+
this.scheduleShow();
|
|
5946
|
+
}
|
|
5947
|
+
onFocusOut() {
|
|
5948
|
+
this.focusedTarget = null;
|
|
5949
|
+
this.onClose();
|
|
5950
|
+
}
|
|
5951
|
+
scheduleShow() {
|
|
5606
5952
|
if (!this.dsTooltip()) {
|
|
5607
5953
|
return;
|
|
5608
5954
|
}
|
|
@@ -5624,16 +5970,20 @@ class TooltipDirective {
|
|
|
5624
5970
|
disposeRef() {
|
|
5625
5971
|
this.ref?.dispose();
|
|
5626
5972
|
this.ref = null;
|
|
5627
|
-
const
|
|
5628
|
-
|
|
5973
|
+
const described = this.describedElement;
|
|
5974
|
+
if (!described) {
|
|
5975
|
+
return;
|
|
5976
|
+
}
|
|
5977
|
+
this.describedElement = null;
|
|
5978
|
+
const remaining = (described.getAttribute('aria-describedby') ?? '')
|
|
5629
5979
|
.split(' ')
|
|
5630
5980
|
.filter((id) => id && id !== this.tipId)
|
|
5631
5981
|
.join(' ');
|
|
5632
5982
|
if (remaining) {
|
|
5633
|
-
|
|
5983
|
+
described.setAttribute('aria-describedby', remaining);
|
|
5634
5984
|
}
|
|
5635
5985
|
else {
|
|
5636
|
-
|
|
5986
|
+
described.removeAttribute('aria-describedby');
|
|
5637
5987
|
}
|
|
5638
5988
|
}
|
|
5639
5989
|
onEscape() {
|
|
@@ -5656,13 +6006,15 @@ class TooltipDirective {
|
|
|
5656
6006
|
panelClass: 'ds-overlay-pane',
|
|
5657
6007
|
scrollStrategy: this.overlay.scrollStrategies.close(),
|
|
5658
6008
|
});
|
|
6009
|
+
prepareOverlayEnter(this.ref, this.host.nativeElement, positionStrategy);
|
|
5659
6010
|
const cmpRef = this.ref.attach(new ComponentPortal(TooltipPanelComponent));
|
|
5660
6011
|
cmpRef.setInput('text', this.dsTooltip());
|
|
5661
6012
|
cmpRef.setInput('placement', placement);
|
|
5662
6013
|
cmpRef.setInput('panelId', this.tipId);
|
|
5663
|
-
const
|
|
5664
|
-
|
|
5665
|
-
|
|
6014
|
+
const described = this.focusedTarget ?? this.host.nativeElement;
|
|
6015
|
+
this.describedElement = described;
|
|
6016
|
+
const existing = described.getAttribute('aria-describedby');
|
|
6017
|
+
described.setAttribute('aria-describedby', existing ? `${existing} ${this.tipId}` : this.tipId);
|
|
5666
6018
|
}
|
|
5667
6019
|
positionFor(placement) {
|
|
5668
6020
|
switch (placement) {
|
|
@@ -5704,7 +6056,7 @@ class TooltipDirective {
|
|
|
5704
6056
|
this.onClose();
|
|
5705
6057
|
}
|
|
5706
6058
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
5707
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: TooltipDirective, isStandalone: true, selector: "[dsTooltip]", inputs: { dsTooltip: { classPropertyName: "dsTooltip", publicName: "dsTooltip", isSignal: true, isRequired: false, transformFunction: null }, dsTooltipPlacement: { classPropertyName: "dsTooltipPlacement", publicName: "dsTooltipPlacement", isSignal: true, isRequired: false, transformFunction: null }, dsTooltipDelay: { classPropertyName: "dsTooltipDelay", publicName: "dsTooltipDelay", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "
|
|
6059
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: TooltipDirective, isStandalone: true, selector: "[dsTooltip]", inputs: { dsTooltip: { classPropertyName: "dsTooltip", publicName: "dsTooltip", isSignal: true, isRequired: false, transformFunction: null }, dsTooltipPlacement: { classPropertyName: "dsTooltipPlacement", publicName: "dsTooltipPlacement", isSignal: true, isRequired: false, transformFunction: null }, dsTooltipDelay: { classPropertyName: "dsTooltipDelay", publicName: "dsTooltipDelay", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "onPointerEnter()", "focusin": "onFocusIn($event)", "focusout": "onFocusOut()", "mouseleave": "onClose()", "click": "onClose()", "keydown.escape": "onEscape()" } }, ngImport: i0 });
|
|
5708
6060
|
}
|
|
5709
6061
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
5710
6062
|
type: Directive,
|
|
@@ -5712,18 +6064,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
5712
6064
|
selector: '[dsTooltip]',
|
|
5713
6065
|
standalone: true,
|
|
5714
6066
|
}]
|
|
5715
|
-
}], propDecorators: { dsTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsTooltip", required: false }] }], dsTooltipPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsTooltipPlacement", required: false }] }], dsTooltipDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsTooltipDelay", required: false }] }],
|
|
6067
|
+
}], propDecorators: { dsTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsTooltip", required: false }] }], dsTooltipPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsTooltipPlacement", required: false }] }], dsTooltipDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsTooltipDelay", required: false }] }], onPointerEnter: [{
|
|
5716
6068
|
type: HostListener,
|
|
5717
6069
|
args: ['mouseenter']
|
|
5718
|
-
}, {
|
|
6070
|
+
}], onFocusIn: [{
|
|
6071
|
+
type: HostListener,
|
|
6072
|
+
args: ['focusin', ['$event']]
|
|
6073
|
+
}], onFocusOut: [{
|
|
5719
6074
|
type: HostListener,
|
|
5720
|
-
args: ['
|
|
6075
|
+
args: ['focusout']
|
|
5721
6076
|
}], onClose: [{
|
|
5722
6077
|
type: HostListener,
|
|
5723
6078
|
args: ['mouseleave']
|
|
5724
|
-
}, {
|
|
5725
|
-
type: HostListener,
|
|
5726
|
-
args: ['focusout']
|
|
5727
6079
|
}, {
|
|
5728
6080
|
type: HostListener,
|
|
5729
6081
|
args: ['click']
|
|
@@ -5952,11 +6304,11 @@ class ModalCardComponent {
|
|
|
5952
6304
|
this.closed.emit();
|
|
5953
6305
|
}
|
|
5954
6306
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ModalCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5955
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ModalCardComponent, isStandalone: true, selector: "ds-modal-card", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, showClose: { classPropertyName: "showClose", publicName: "showClose", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, dialogRole: { classPropertyName: "dialogRole", publicName: "dialogRole", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, ngImport: i0, template: "<div\n aria-modal=\"true\"\n [attr.role]=\"dialogRole()\"\n [class]=\"classes()\"\n [attr.aria-labelledby]=\"titleId\"\n>\n <div class=\"header\">\n @if (icon(); as iconName) {\n <span\n class=\"icon-badge\"\n [class.error]=\"error()\"\n >\n <ds-icon\n [name]=\"iconName\"\n [size]=\"20\"\n />\n </span>\n }\n\n <
|
|
6307
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ModalCardComponent, isStandalone: true, selector: "ds-modal-card", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, showClose: { classPropertyName: "showClose", publicName: "showClose", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, dialogRole: { classPropertyName: "dialogRole", publicName: "dialogRole", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, ngImport: i0, template: "<div\n aria-modal=\"true\"\n [attr.role]=\"dialogRole()\"\n [class]=\"classes()\"\n [attr.aria-labelledby]=\"titleId\"\n>\n <div class=\"header\">\n @if (icon(); as iconName) {\n <span\n class=\"icon-badge\"\n [class.error]=\"error()\"\n >\n <ds-icon\n [name]=\"iconName\"\n [size]=\"20\"\n />\n </span>\n }\n\n <div class=\"heading\">\n <div class=\"eyebrow\">\n <ng-content select=\"[eyebrow]\"></ng-content>\n </div>\n\n <h2\n class=\"title\"\n [id]=\"titleId\"\n >\n {{ title() }}\n </h2>\n </div>\n\n @if (showClose()) {\n <button\n class=\"close\"\n type=\"button\"\n aria-label=\"Close dialog\"\n (click)=\"onClose()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"16\"\n >\n </ds-icon>\n </button>\n }\n </div>\n\n <div class=\"body\">\n <ng-content select=\"[body]\"></ng-content>\n\n <div class=\"impact\">\n <ng-content select=\"[impact]\"></ng-content>\n </div>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_modal-bg-color: var(--ds-modal-bg-color, var(--surface-overlay));--_modal-radius: var(--ds-modal-radius, var(--radius-lg));--_modal-shadow: var(--ds-modal-shadow, var(--shadow-modal));--_modal-divider: var(--ds-modal-divider, var(--border-divider));--_modal-title-text-color: var(--ds-modal-title-text-color, var(--text-primary));--_modal-title-text-color-error: var(--ds-modal-title-text-color-error, var(--error-text));--_modal-title-weight: var(--ds-modal-title-weight, var(--font-weight-bold));--_modal-title-font-size: var(--ds-modal-title-font-size, var(--font-size-h5));--_modal-eyebrow-text-color: var(--ds-modal-eyebrow-text-color, var(--text-tertiary));--_modal-eyebrow-font-size: var(--ds-modal-eyebrow-font-size, var(--font-size-xs));--_modal-eyebrow-weight: var(--ds-modal-eyebrow-weight, var(--font-weight-bold));--_modal-eyebrow-tracking: var(--ds-modal-eyebrow-tracking, var(--letter-spacing-wide));--_modal-eyebrow-transform: var(--ds-modal-eyebrow-transform, uppercase);--_modal-close-icon-color: var(--ds-modal-close-icon-color, var(--icon-default));--_modal-close-icon-color-hover: var(--ds-modal-close-icon-color-hover, var(--icon-strong));--_modal-icon-badge-bg-color: var(--ds-modal-icon-badge-bg-color, var(--accent-subtitle));--_modal-icon-badge-icon-color: var(--ds-modal-icon-badge-icon-color, var(--accent));--_modal-impact-text-color: var(--ds-modal-impact-text-color, var(--warning-text));--_modal-enter-keyframes: var(--ds-modal-enter-keyframes, ds-scale-in);--_modal-enter-duration: var(--ds-modal-enter-duration, var(--duration-base));--_modal-enter-easing: var(--ds-modal-enter-easing, var(--ease-decelerate));--_modal-leave-duration: var(--ds-modal-leave-duration, var(--duration-fast));--_modal-leave-easing: var(--ds-modal-leave-easing, var(--ease-accelerate));--_ds-enter-scale: var(--ds-modal-enter-scale, .97);display:contents}@media(prefers-reduced-motion:reduce){:host{--_modal-enter-duration: 0ms;--_modal-leave-duration: 0ms}}.modal{background-color:var(--_modal-bg-color);border-radius:var(--_modal-radius);box-shadow:var(--_modal-shadow);display:flex;flex-direction:column;max-width:calc(100vw - var(--space-6));max-height:90vh;max-height:90dvh;overflow:hidden;animation-name:var(--_modal-enter-keyframes);animation-duration:var(--_modal-enter-duration);animation-timing-function:var(--_modal-enter-easing)}.modal.sm{width:var(--modal-w-sm)}.modal.md{width:var(--modal-w-md)}.modal.lg{width:var(--modal-w-lg)}.modal.xl{width:var(--modal-w-xl)}.modal.fullscreen{width:var(--modal-w-fullscreen);max-height:var(--modal-h-fullscreen)}.modal .header{display:flex;align-items:center;gap:var(--space-3);justify-content:space-between;padding:var(--space-4) var(--space-5);border-bottom:var(--border-width-default) solid var(--_modal-divider)}.modal .icon-badge{display:inline-flex;align-items:center;justify-content:center;flex:none;width:var(--space-10);height:var(--space-10);border-radius:var(--radius-pill);background-color:var(--_modal-icon-badge-bg-color);color:var(--_modal-icon-badge-icon-color)}.modal .icon-badge.error{background-color:var(--error-subtitle);color:var(--error)}.modal .heading{flex:1;min-width:0}.modal .eyebrow{font:var(--_modal-eyebrow-weight) var(--_modal-eyebrow-font-size)/var(--line-height-flat) var(--font-sans);letter-spacing:var(--_modal-eyebrow-tracking);text-transform:var(--_modal-eyebrow-transform);color:var(--_modal-eyebrow-text-color);margin-bottom:var(--space-0-5)}.modal .eyebrow:empty{display:none}.modal .title{font:var(--_modal-title-weight) var(--_modal-title-font-size)/var(--line-height-snug) var(--font-heading);margin:0;min-width:0;color:var(--_modal-title-text-color)}.modal .close{background:none;border:0;cursor:pointer;color:var(--_modal-close-icon-color);width:var(--modal-close-size);height:var(--modal-close-size);display:grid;place-items:center}.modal .close:hover{color:var(--_modal-close-icon-color-hover)}.modal .close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.modal .body{padding:var(--space-5);overflow-y:auto}.modal .actions{display:flex;gap:var(--space-3);justify-content:flex-end;padding:var(--space-4) var(--space-5);border-top:var(--border-width-default) solid var(--_modal-divider)}.modal .actions:empty{display:none}.modal.error .title{color:var(--_modal-title-text-color-error)}.modal .impact{margin-top:var(--space-3)}.modal .impact:empty{display:none}.modal .impact .list{margin:var(--space-1) 0 0;padding-left:var(--space-4);font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--_modal-impact-text-color)}.modal-static{display:contents}.modal-backdrop{--_modal-backdrop: var(--ds-modal-backdrop, var(--surface-scrim));position:fixed;inset:0;background:var(--_modal-backdrop);z-index:var(--layer-modal);display:grid;place-items:center;animation-name:ds-fade-in;animation-duration:var(--_modal-enter-duration);animation-timing-function:var(--_modal-enter-easing)}.modal-backdrop.closing{animation-name:modal-out;animation-duration:var(--_modal-leave-duration);animation-timing-function:var(--_modal-leave-easing);animation-fill-mode:forwards}@keyframes modal-out{to{opacity:0}}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
|
|
5956
6308
|
}
|
|
5957
6309
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ModalCardComponent, decorators: [{
|
|
5958
6310
|
type: Component,
|
|
5959
|
-
args: [{ selector: 'ds-modal-card', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, template: "<div\n aria-modal=\"true\"\n [attr.role]=\"dialogRole()\"\n [class]=\"classes()\"\n [attr.aria-labelledby]=\"titleId\"\n>\n <div class=\"header\">\n @if (icon(); as iconName) {\n <span\n class=\"icon-badge\"\n [class.error]=\"error()\"\n >\n <ds-icon\n [name]=\"iconName\"\n [size]=\"20\"\n />\n </span>\n }\n\n <
|
|
6311
|
+
args: [{ selector: 'ds-modal-card', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, template: "<div\n aria-modal=\"true\"\n [attr.role]=\"dialogRole()\"\n [class]=\"classes()\"\n [attr.aria-labelledby]=\"titleId\"\n>\n <div class=\"header\">\n @if (icon(); as iconName) {\n <span\n class=\"icon-badge\"\n [class.error]=\"error()\"\n >\n <ds-icon\n [name]=\"iconName\"\n [size]=\"20\"\n />\n </span>\n }\n\n <div class=\"heading\">\n <div class=\"eyebrow\">\n <ng-content select=\"[eyebrow]\"></ng-content>\n </div>\n\n <h2\n class=\"title\"\n [id]=\"titleId\"\n >\n {{ title() }}\n </h2>\n </div>\n\n @if (showClose()) {\n <button\n class=\"close\"\n type=\"button\"\n aria-label=\"Close dialog\"\n (click)=\"onClose()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"16\"\n >\n </ds-icon>\n </button>\n }\n </div>\n\n <div class=\"body\">\n <ng-content select=\"[body]\"></ng-content>\n\n <div class=\"impact\">\n <ng-content select=\"[impact]\"></ng-content>\n </div>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_modal-bg-color: var(--ds-modal-bg-color, var(--surface-overlay));--_modal-radius: var(--ds-modal-radius, var(--radius-lg));--_modal-shadow: var(--ds-modal-shadow, var(--shadow-modal));--_modal-divider: var(--ds-modal-divider, var(--border-divider));--_modal-title-text-color: var(--ds-modal-title-text-color, var(--text-primary));--_modal-title-text-color-error: var(--ds-modal-title-text-color-error, var(--error-text));--_modal-title-weight: var(--ds-modal-title-weight, var(--font-weight-bold));--_modal-title-font-size: var(--ds-modal-title-font-size, var(--font-size-h5));--_modal-eyebrow-text-color: var(--ds-modal-eyebrow-text-color, var(--text-tertiary));--_modal-eyebrow-font-size: var(--ds-modal-eyebrow-font-size, var(--font-size-xs));--_modal-eyebrow-weight: var(--ds-modal-eyebrow-weight, var(--font-weight-bold));--_modal-eyebrow-tracking: var(--ds-modal-eyebrow-tracking, var(--letter-spacing-wide));--_modal-eyebrow-transform: var(--ds-modal-eyebrow-transform, uppercase);--_modal-close-icon-color: var(--ds-modal-close-icon-color, var(--icon-default));--_modal-close-icon-color-hover: var(--ds-modal-close-icon-color-hover, var(--icon-strong));--_modal-icon-badge-bg-color: var(--ds-modal-icon-badge-bg-color, var(--accent-subtitle));--_modal-icon-badge-icon-color: var(--ds-modal-icon-badge-icon-color, var(--accent));--_modal-impact-text-color: var(--ds-modal-impact-text-color, var(--warning-text));--_modal-enter-keyframes: var(--ds-modal-enter-keyframes, ds-scale-in);--_modal-enter-duration: var(--ds-modal-enter-duration, var(--duration-base));--_modal-enter-easing: var(--ds-modal-enter-easing, var(--ease-decelerate));--_modal-leave-duration: var(--ds-modal-leave-duration, var(--duration-fast));--_modal-leave-easing: var(--ds-modal-leave-easing, var(--ease-accelerate));--_ds-enter-scale: var(--ds-modal-enter-scale, .97);display:contents}@media(prefers-reduced-motion:reduce){:host{--_modal-enter-duration: 0ms;--_modal-leave-duration: 0ms}}.modal{background-color:var(--_modal-bg-color);border-radius:var(--_modal-radius);box-shadow:var(--_modal-shadow);display:flex;flex-direction:column;max-width:calc(100vw - var(--space-6));max-height:90vh;max-height:90dvh;overflow:hidden;animation-name:var(--_modal-enter-keyframes);animation-duration:var(--_modal-enter-duration);animation-timing-function:var(--_modal-enter-easing)}.modal.sm{width:var(--modal-w-sm)}.modal.md{width:var(--modal-w-md)}.modal.lg{width:var(--modal-w-lg)}.modal.xl{width:var(--modal-w-xl)}.modal.fullscreen{width:var(--modal-w-fullscreen);max-height:var(--modal-h-fullscreen)}.modal .header{display:flex;align-items:center;gap:var(--space-3);justify-content:space-between;padding:var(--space-4) var(--space-5);border-bottom:var(--border-width-default) solid var(--_modal-divider)}.modal .icon-badge{display:inline-flex;align-items:center;justify-content:center;flex:none;width:var(--space-10);height:var(--space-10);border-radius:var(--radius-pill);background-color:var(--_modal-icon-badge-bg-color);color:var(--_modal-icon-badge-icon-color)}.modal .icon-badge.error{background-color:var(--error-subtitle);color:var(--error)}.modal .heading{flex:1;min-width:0}.modal .eyebrow{font:var(--_modal-eyebrow-weight) var(--_modal-eyebrow-font-size)/var(--line-height-flat) var(--font-sans);letter-spacing:var(--_modal-eyebrow-tracking);text-transform:var(--_modal-eyebrow-transform);color:var(--_modal-eyebrow-text-color);margin-bottom:var(--space-0-5)}.modal .eyebrow:empty{display:none}.modal .title{font:var(--_modal-title-weight) var(--_modal-title-font-size)/var(--line-height-snug) var(--font-heading);margin:0;min-width:0;color:var(--_modal-title-text-color)}.modal .close{background:none;border:0;cursor:pointer;color:var(--_modal-close-icon-color);width:var(--modal-close-size);height:var(--modal-close-size);display:grid;place-items:center}.modal .close:hover{color:var(--_modal-close-icon-color-hover)}.modal .close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.modal .body{padding:var(--space-5);overflow-y:auto}.modal .actions{display:flex;gap:var(--space-3);justify-content:flex-end;padding:var(--space-4) var(--space-5);border-top:var(--border-width-default) solid var(--_modal-divider)}.modal .actions:empty{display:none}.modal.error .title{color:var(--_modal-title-text-color-error)}.modal .impact{margin-top:var(--space-3)}.modal .impact:empty{display:none}.modal .impact .list{margin:var(--space-1) 0 0;padding-left:var(--space-4);font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--_modal-impact-text-color)}.modal-static{display:contents}.modal-backdrop{--_modal-backdrop: var(--ds-modal-backdrop, var(--surface-scrim));position:fixed;inset:0;background:var(--_modal-backdrop);z-index:var(--layer-modal);display:grid;place-items:center;animation-name:ds-fade-in;animation-duration:var(--_modal-enter-duration);animation-timing-function:var(--_modal-enter-easing)}.modal-backdrop.closing{animation-name:modal-out;animation-duration:var(--_modal-leave-duration);animation-timing-function:var(--_modal-leave-easing);animation-fill-mode:forwards}@keyframes modal-out{to{opacity:0}}\n"] }]
|
|
5960
6312
|
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], showClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClose", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], dialogRole: [{ type: i0.Input, args: [{ isSignal: true, alias: "dialogRole", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
5961
6313
|
|
|
5962
6314
|
class ModalComponent {
|
|
@@ -6064,11 +6416,11 @@ class ModalComponent {
|
|
|
6064
6416
|
this.onClose();
|
|
6065
6417
|
}
|
|
6066
6418
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6067
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ModalComponent, isStandalone: true, selector: "ds-modal", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, closeOnBackdrop: { classPropertyName: "closeOnBackdrop", publicName: "closeOnBackdrop", isSignal: true, isRequired: false, transformFunction: null }, persistent: { classPropertyName: "persistent", publicName: "persistent", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", closed: "closed", confirmed: "confirmed" }, hostDirectives: [{ directive: DsStaticPreview, inputs: ["staticPreview", "staticPreview"] }], ngImport: i0, template: "@if (rendered() || preview.staticPreview()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) below, a backdrop isn't a tabbable control -->\n <div\n [class]=\"preview.staticPreview() ? 'modal-static' : 'modal-backdrop'\"\n [class.closing]=\"closing()\"\n (click)=\"onBackdrop($event)\"\n (keydown.escape)=\"onEscape()\"\n (animationend)=\"onLeaveEnd($event)\"\n >\n <ds-modal-card\n [cdkTrapFocus]=\"!preview.staticPreview()\"\n [cdkTrapFocusAutoCapture]=\"!preview.staticPreview()\"\n [size]=\"size()\"\n [error]=\"error()\"\n [title]=\"title()\"\n (closed)=\"onClose()\"\n >\n <ng-container body>\n <ng-content select=\"[body]\"></ng-content>\n </ng-container>\n\n <ng-container impact>\n <ng-content select=\"[impact]\"></ng-content>\n </ng-container>\n\n <ng-container actions>\n <ng-content select=\"[actions]\"></ng-content>\n </ng-container>\n </ds-modal-card>\n </div>\n}\n", styles: ["@charset \"UTF-8\";:host{--_modal-bg-color: var(--ds-modal-bg-color, var(--surface-overlay));--_modal-radius: var(--ds-modal-radius, var(--radius-lg));--_modal-shadow: var(--ds-modal-shadow, var(--shadow-modal));--_modal-divider: var(--ds-modal-divider, var(--border-divider));--_modal-title-text-color: var(--ds-modal-title-text-color, var(--text-primary));--_modal-title-text-color-error: var(--ds-modal-title-text-color-error, var(--error-text));--_modal-title-weight: var(--ds-modal-title-weight, var(--font-weight-bold));--_modal-close-icon-color: var(--ds-modal-close-icon-color, var(--icon-default));--_modal-close-icon-color-hover: var(--ds-modal-close-icon-color-hover, var(--icon-strong));--_modal-icon-badge-bg-color: var(--ds-modal-icon-badge-bg-color, var(--accent-subtitle));--_modal-icon-badge-icon-color: var(--ds-modal-icon-badge-icon-color, var(--accent));--_modal-impact-text-color: var(--ds-modal-impact-text-color, var(--warning-text));display:contents}.modal{background-color:var(--_modal-bg-color);border-radius:var(--_modal-radius);box-shadow:var(--_modal-shadow);display:flex;flex-direction:column;max-width:calc(100vw - var(--space-6));max-height:90vh;max-height:90dvh;overflow:hidden;animation:
|
|
6419
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ModalComponent, isStandalone: true, selector: "ds-modal", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, closeOnBackdrop: { classPropertyName: "closeOnBackdrop", publicName: "closeOnBackdrop", isSignal: true, isRequired: false, transformFunction: null }, persistent: { classPropertyName: "persistent", publicName: "persistent", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", closed: "closed", confirmed: "confirmed" }, hostDirectives: [{ directive: DsStaticPreview, inputs: ["staticPreview", "staticPreview"] }], ngImport: i0, template: "@if (rendered() || preview.staticPreview()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) below, a backdrop isn't a tabbable control -->\n <div\n [class]=\"preview.staticPreview() ? 'modal-static' : 'modal-backdrop'\"\n [class.closing]=\"closing()\"\n (click)=\"onBackdrop($event)\"\n (keydown.escape)=\"onEscape()\"\n (animationend)=\"onLeaveEnd($event)\"\n >\n <ds-modal-card\n [cdkTrapFocus]=\"!preview.staticPreview()\"\n [cdkTrapFocusAutoCapture]=\"!preview.staticPreview()\"\n [size]=\"size()\"\n [error]=\"error()\"\n [title]=\"title()\"\n (closed)=\"onClose()\"\n >\n <ng-container eyebrow>\n <ng-content select=\"[eyebrow]\"></ng-content>\n </ng-container>\n\n <ng-container body>\n <ng-content select=\"[body]\"></ng-content>\n </ng-container>\n\n <ng-container impact>\n <ng-content select=\"[impact]\"></ng-content>\n </ng-container>\n\n <ng-container actions>\n <ng-content select=\"[actions]\"></ng-content>\n </ng-container>\n </ds-modal-card>\n </div>\n}\n", styles: ["@charset \"UTF-8\";:host{--_modal-bg-color: var(--ds-modal-bg-color, var(--surface-overlay));--_modal-radius: var(--ds-modal-radius, var(--radius-lg));--_modal-shadow: var(--ds-modal-shadow, var(--shadow-modal));--_modal-divider: var(--ds-modal-divider, var(--border-divider));--_modal-title-text-color: var(--ds-modal-title-text-color, var(--text-primary));--_modal-title-text-color-error: var(--ds-modal-title-text-color-error, var(--error-text));--_modal-title-weight: var(--ds-modal-title-weight, var(--font-weight-bold));--_modal-title-font-size: var(--ds-modal-title-font-size, var(--font-size-h5));--_modal-eyebrow-text-color: var(--ds-modal-eyebrow-text-color, var(--text-tertiary));--_modal-eyebrow-font-size: var(--ds-modal-eyebrow-font-size, var(--font-size-xs));--_modal-eyebrow-weight: var(--ds-modal-eyebrow-weight, var(--font-weight-bold));--_modal-eyebrow-tracking: var(--ds-modal-eyebrow-tracking, var(--letter-spacing-wide));--_modal-eyebrow-transform: var(--ds-modal-eyebrow-transform, uppercase);--_modal-close-icon-color: var(--ds-modal-close-icon-color, var(--icon-default));--_modal-close-icon-color-hover: var(--ds-modal-close-icon-color-hover, var(--icon-strong));--_modal-icon-badge-bg-color: var(--ds-modal-icon-badge-bg-color, var(--accent-subtitle));--_modal-icon-badge-icon-color: var(--ds-modal-icon-badge-icon-color, var(--accent));--_modal-impact-text-color: var(--ds-modal-impact-text-color, var(--warning-text));--_modal-enter-keyframes: var(--ds-modal-enter-keyframes, ds-scale-in);--_modal-enter-duration: var(--ds-modal-enter-duration, var(--duration-base));--_modal-enter-easing: var(--ds-modal-enter-easing, var(--ease-decelerate));--_modal-leave-duration: var(--ds-modal-leave-duration, var(--duration-fast));--_modal-leave-easing: var(--ds-modal-leave-easing, var(--ease-accelerate));--_ds-enter-scale: var(--ds-modal-enter-scale, .97);display:contents}@media(prefers-reduced-motion:reduce){:host{--_modal-enter-duration: 0ms;--_modal-leave-duration: 0ms}}.modal{background-color:var(--_modal-bg-color);border-radius:var(--_modal-radius);box-shadow:var(--_modal-shadow);display:flex;flex-direction:column;max-width:calc(100vw - var(--space-6));max-height:90vh;max-height:90dvh;overflow:hidden;animation-name:var(--_modal-enter-keyframes);animation-duration:var(--_modal-enter-duration);animation-timing-function:var(--_modal-enter-easing)}.modal.sm{width:var(--modal-w-sm)}.modal.md{width:var(--modal-w-md)}.modal.lg{width:var(--modal-w-lg)}.modal.xl{width:var(--modal-w-xl)}.modal.fullscreen{width:var(--modal-w-fullscreen);max-height:var(--modal-h-fullscreen)}.modal .header{display:flex;align-items:center;gap:var(--space-3);justify-content:space-between;padding:var(--space-4) var(--space-5);border-bottom:var(--border-width-default) solid var(--_modal-divider)}.modal .icon-badge{display:inline-flex;align-items:center;justify-content:center;flex:none;width:var(--space-10);height:var(--space-10);border-radius:var(--radius-pill);background-color:var(--_modal-icon-badge-bg-color);color:var(--_modal-icon-badge-icon-color)}.modal .icon-badge.error{background-color:var(--error-subtitle);color:var(--error)}.modal .heading{flex:1;min-width:0}.modal .eyebrow{font:var(--_modal-eyebrow-weight) var(--_modal-eyebrow-font-size)/var(--line-height-flat) var(--font-sans);letter-spacing:var(--_modal-eyebrow-tracking);text-transform:var(--_modal-eyebrow-transform);color:var(--_modal-eyebrow-text-color);margin-bottom:var(--space-0-5)}.modal .eyebrow:empty{display:none}.modal .title{font:var(--_modal-title-weight) var(--_modal-title-font-size)/var(--line-height-snug) var(--font-heading);margin:0;min-width:0;color:var(--_modal-title-text-color)}.modal .close{background:none;border:0;cursor:pointer;color:var(--_modal-close-icon-color);width:var(--modal-close-size);height:var(--modal-close-size);display:grid;place-items:center}.modal .close:hover{color:var(--_modal-close-icon-color-hover)}.modal .close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.modal .body{padding:var(--space-5);overflow-y:auto}.modal .actions{display:flex;gap:var(--space-3);justify-content:flex-end;padding:var(--space-4) var(--space-5);border-top:var(--border-width-default) solid var(--_modal-divider)}.modal .actions:empty{display:none}.modal.error .title{color:var(--_modal-title-text-color-error)}.modal .impact{margin-top:var(--space-3)}.modal .impact:empty{display:none}.modal .impact .list{margin:var(--space-1) 0 0;padding-left:var(--space-4);font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--_modal-impact-text-color)}.modal-static{display:contents}.modal-backdrop{--_modal-backdrop: var(--ds-modal-backdrop, var(--surface-scrim));position:fixed;inset:0;background:var(--_modal-backdrop);z-index:var(--layer-modal);display:grid;place-items:center;animation-name:ds-fade-in;animation-duration:var(--_modal-enter-duration);animation-timing-function:var(--_modal-enter-easing)}.modal-backdrop.closing{animation-name:modal-out;animation-duration:var(--_modal-leave-duration);animation-timing-function:var(--_modal-leave-easing);animation-fill-mode:forwards}@keyframes modal-out{to{opacity:0}}\n"], dependencies: [{ kind: "component", type: ModalCardComponent, selector: "ds-modal-card", inputs: ["size", "error", "title", "showClose", "icon", "dialogRole"], outputs: ["closed"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] });
|
|
6068
6420
|
}
|
|
6069
6421
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ModalComponent, decorators: [{
|
|
6070
6422
|
type: Component,
|
|
6071
|
-
args: [{ selector: 'ds-modal', standalone: true, imports: [ModalCardComponent, A11yModule], encapsulation: ViewEncapsulation.Emulated, hostDirectives: [{ directive: DsStaticPreview, inputs: ['staticPreview'] }], template: "@if (rendered() || preview.staticPreview()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) below, a backdrop isn't a tabbable control -->\n <div\n [class]=\"preview.staticPreview() ? 'modal-static' : 'modal-backdrop'\"\n [class.closing]=\"closing()\"\n (click)=\"onBackdrop($event)\"\n (keydown.escape)=\"onEscape()\"\n (animationend)=\"onLeaveEnd($event)\"\n >\n <ds-modal-card\n [cdkTrapFocus]=\"!preview.staticPreview()\"\n [cdkTrapFocusAutoCapture]=\"!preview.staticPreview()\"\n [size]=\"size()\"\n [error]=\"error()\"\n [title]=\"title()\"\n (closed)=\"onClose()\"\n >\n <ng-container body>\n <ng-content select=\"[body]\"></ng-content>\n </ng-container>\n\n <ng-container impact>\n <ng-content select=\"[impact]\"></ng-content>\n </ng-container>\n\n <ng-container actions>\n <ng-content select=\"[actions]\"></ng-content>\n </ng-container>\n </ds-modal-card>\n </div>\n}\n", styles: ["@charset \"UTF-8\";:host{--_modal-bg-color: var(--ds-modal-bg-color, var(--surface-overlay));--_modal-radius: var(--ds-modal-radius, var(--radius-lg));--_modal-shadow: var(--ds-modal-shadow, var(--shadow-modal));--_modal-divider: var(--ds-modal-divider, var(--border-divider));--_modal-title-text-color: var(--ds-modal-title-text-color, var(--text-primary));--_modal-title-text-color-error: var(--ds-modal-title-text-color-error, var(--error-text));--_modal-title-weight: var(--ds-modal-title-weight, var(--font-weight-bold));--_modal-close-icon-color: var(--ds-modal-close-icon-color, var(--icon-default));--_modal-close-icon-color-hover: var(--ds-modal-close-icon-color-hover, var(--icon-strong));--_modal-icon-badge-bg-color: var(--ds-modal-icon-badge-bg-color, var(--accent-subtitle));--_modal-icon-badge-icon-color: var(--ds-modal-icon-badge-icon-color, var(--accent));--_modal-impact-text-color: var(--ds-modal-impact-text-color, var(--warning-text));display:contents}.modal{background-color:var(--_modal-bg-color);border-radius:var(--_modal-radius);box-shadow:var(--_modal-shadow);display:flex;flex-direction:column;max-width:calc(100vw - var(--space-6));max-height:90vh;max-height:90dvh;overflow:hidden;animation:
|
|
6423
|
+
args: [{ selector: 'ds-modal', standalone: true, imports: [ModalCardComponent, A11yModule], encapsulation: ViewEncapsulation.Emulated, hostDirectives: [{ directive: DsStaticPreview, inputs: ['staticPreview'] }], template: "@if (rendered() || preview.staticPreview()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) below, a backdrop isn't a tabbable control -->\n <div\n [class]=\"preview.staticPreview() ? 'modal-static' : 'modal-backdrop'\"\n [class.closing]=\"closing()\"\n (click)=\"onBackdrop($event)\"\n (keydown.escape)=\"onEscape()\"\n (animationend)=\"onLeaveEnd($event)\"\n >\n <ds-modal-card\n [cdkTrapFocus]=\"!preview.staticPreview()\"\n [cdkTrapFocusAutoCapture]=\"!preview.staticPreview()\"\n [size]=\"size()\"\n [error]=\"error()\"\n [title]=\"title()\"\n (closed)=\"onClose()\"\n >\n <ng-container eyebrow>\n <ng-content select=\"[eyebrow]\"></ng-content>\n </ng-container>\n\n <ng-container body>\n <ng-content select=\"[body]\"></ng-content>\n </ng-container>\n\n <ng-container impact>\n <ng-content select=\"[impact]\"></ng-content>\n </ng-container>\n\n <ng-container actions>\n <ng-content select=\"[actions]\"></ng-content>\n </ng-container>\n </ds-modal-card>\n </div>\n}\n", styles: ["@charset \"UTF-8\";:host{--_modal-bg-color: var(--ds-modal-bg-color, var(--surface-overlay));--_modal-radius: var(--ds-modal-radius, var(--radius-lg));--_modal-shadow: var(--ds-modal-shadow, var(--shadow-modal));--_modal-divider: var(--ds-modal-divider, var(--border-divider));--_modal-title-text-color: var(--ds-modal-title-text-color, var(--text-primary));--_modal-title-text-color-error: var(--ds-modal-title-text-color-error, var(--error-text));--_modal-title-weight: var(--ds-modal-title-weight, var(--font-weight-bold));--_modal-title-font-size: var(--ds-modal-title-font-size, var(--font-size-h5));--_modal-eyebrow-text-color: var(--ds-modal-eyebrow-text-color, var(--text-tertiary));--_modal-eyebrow-font-size: var(--ds-modal-eyebrow-font-size, var(--font-size-xs));--_modal-eyebrow-weight: var(--ds-modal-eyebrow-weight, var(--font-weight-bold));--_modal-eyebrow-tracking: var(--ds-modal-eyebrow-tracking, var(--letter-spacing-wide));--_modal-eyebrow-transform: var(--ds-modal-eyebrow-transform, uppercase);--_modal-close-icon-color: var(--ds-modal-close-icon-color, var(--icon-default));--_modal-close-icon-color-hover: var(--ds-modal-close-icon-color-hover, var(--icon-strong));--_modal-icon-badge-bg-color: var(--ds-modal-icon-badge-bg-color, var(--accent-subtitle));--_modal-icon-badge-icon-color: var(--ds-modal-icon-badge-icon-color, var(--accent));--_modal-impact-text-color: var(--ds-modal-impact-text-color, var(--warning-text));--_modal-enter-keyframes: var(--ds-modal-enter-keyframes, ds-scale-in);--_modal-enter-duration: var(--ds-modal-enter-duration, var(--duration-base));--_modal-enter-easing: var(--ds-modal-enter-easing, var(--ease-decelerate));--_modal-leave-duration: var(--ds-modal-leave-duration, var(--duration-fast));--_modal-leave-easing: var(--ds-modal-leave-easing, var(--ease-accelerate));--_ds-enter-scale: var(--ds-modal-enter-scale, .97);display:contents}@media(prefers-reduced-motion:reduce){:host{--_modal-enter-duration: 0ms;--_modal-leave-duration: 0ms}}.modal{background-color:var(--_modal-bg-color);border-radius:var(--_modal-radius);box-shadow:var(--_modal-shadow);display:flex;flex-direction:column;max-width:calc(100vw - var(--space-6));max-height:90vh;max-height:90dvh;overflow:hidden;animation-name:var(--_modal-enter-keyframes);animation-duration:var(--_modal-enter-duration);animation-timing-function:var(--_modal-enter-easing)}.modal.sm{width:var(--modal-w-sm)}.modal.md{width:var(--modal-w-md)}.modal.lg{width:var(--modal-w-lg)}.modal.xl{width:var(--modal-w-xl)}.modal.fullscreen{width:var(--modal-w-fullscreen);max-height:var(--modal-h-fullscreen)}.modal .header{display:flex;align-items:center;gap:var(--space-3);justify-content:space-between;padding:var(--space-4) var(--space-5);border-bottom:var(--border-width-default) solid var(--_modal-divider)}.modal .icon-badge{display:inline-flex;align-items:center;justify-content:center;flex:none;width:var(--space-10);height:var(--space-10);border-radius:var(--radius-pill);background-color:var(--_modal-icon-badge-bg-color);color:var(--_modal-icon-badge-icon-color)}.modal .icon-badge.error{background-color:var(--error-subtitle);color:var(--error)}.modal .heading{flex:1;min-width:0}.modal .eyebrow{font:var(--_modal-eyebrow-weight) var(--_modal-eyebrow-font-size)/var(--line-height-flat) var(--font-sans);letter-spacing:var(--_modal-eyebrow-tracking);text-transform:var(--_modal-eyebrow-transform);color:var(--_modal-eyebrow-text-color);margin-bottom:var(--space-0-5)}.modal .eyebrow:empty{display:none}.modal .title{font:var(--_modal-title-weight) var(--_modal-title-font-size)/var(--line-height-snug) var(--font-heading);margin:0;min-width:0;color:var(--_modal-title-text-color)}.modal .close{background:none;border:0;cursor:pointer;color:var(--_modal-close-icon-color);width:var(--modal-close-size);height:var(--modal-close-size);display:grid;place-items:center}.modal .close:hover{color:var(--_modal-close-icon-color-hover)}.modal .close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.modal .body{padding:var(--space-5);overflow-y:auto}.modal .actions{display:flex;gap:var(--space-3);justify-content:flex-end;padding:var(--space-4) var(--space-5);border-top:var(--border-width-default) solid var(--_modal-divider)}.modal .actions:empty{display:none}.modal.error .title{color:var(--_modal-title-text-color-error)}.modal .impact{margin-top:var(--space-3)}.modal .impact:empty{display:none}.modal .impact .list{margin:var(--space-1) 0 0;padding-left:var(--space-4);font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--_modal-impact-text-color)}.modal-static{display:contents}.modal-backdrop{--_modal-backdrop: var(--ds-modal-backdrop, var(--surface-scrim));position:fixed;inset:0;background:var(--_modal-backdrop);z-index:var(--layer-modal);display:grid;place-items:center;animation-name:ds-fade-in;animation-duration:var(--_modal-enter-duration);animation-timing-function:var(--_modal-enter-easing)}.modal-backdrop.closing{animation-name:modal-out;animation-duration:var(--_modal-leave-duration);animation-timing-function:var(--_modal-leave-easing);animation-fill-mode:forwards}@keyframes modal-out{to{opacity:0}}\n"] }]
|
|
6072
6424
|
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], closed: [{ type: i0.Output, args: ["closed"] }], confirmed: [{ type: i0.Output, args: ["confirmed"] }], closeOnBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdrop", required: false }] }], persistent: [{ type: i0.Input, args: [{ isSignal: true, alias: "persistent", required: false }] }] } });
|
|
6073
6425
|
|
|
6074
6426
|
const MODAL_CONFIRM_DATA = new InjectionToken('MODAL_CONFIRM_DATA');
|
|
@@ -6121,7 +6473,6 @@ class ModalService {
|
|
|
6121
6473
|
.centerVertically(),
|
|
6122
6474
|
hasBackdrop: true,
|
|
6123
6475
|
backdropClass: 'cdk-overlay-dark-backdrop',
|
|
6124
|
-
panelClass: 'ds-overlay-pane',
|
|
6125
6476
|
scrollStrategy: this.overlay.scrollStrategies.block(),
|
|
6126
6477
|
});
|
|
6127
6478
|
let settled = false;
|
|
@@ -6218,11 +6569,11 @@ class BannerComponent {
|
|
|
6218
6569
|
this.closed.emit();
|
|
6219
6570
|
}
|
|
6220
6571
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: BannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6221
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: BannerComponent, isStandalone: true, selector: "ds-banner", inputs: { variant: { classPropertyName: "variant", publicName: "variant", 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 }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, accentRail: { classPropertyName: "accentRail", publicName: "accentRail", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "class.no-rail": "this.noRail", "attr.role": "this.ariaRole", "attr.aria-live": "this.ariaLive" } }, ngImport: i0, template: "<div [class]=\"classes()\">\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"20\"\n >\n </ds-icon>\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n\n <ng-content></ng-content>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"close\"\n type=\"button\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"16\"\n >\n </ds-icon>\n </button>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block}.banner{--_banner-bg-color: var(--ds-banner-bg-color, var(--info-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--info-text));--_banner-bar: var(--ds-banner-bar, var(--info));--_banner-pad-y: var(--ds-banner-pad-y, var(--space-3));--_banner-pad-x: var(--ds-banner-pad-x, var(--space-4));--_banner-radius: var(--ds-banner-radius, var(--radius-md));--_banner-bar-width: var(--ds-banner-bar-width, var(--banner-bar-w));--_banner-title-text-color: var(--ds-banner-title-text-color, var(--text-primary));--_banner-close-icon-color: var(--ds-banner-close-icon-color, var(--icon-default));--_banner-close-icon-color-hover: var(--ds-banner-close-icon-color-hover, var(--icon-strong));display:flex;gap:var(--space-3);padding:var(--_banner-pad-y) var(--_banner-pad-x);border-radius:var(--_banner-radius);background-color:var(--_banner-bg-color);color:var(--_banner-text-color);animation:
|
|
6572
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: BannerComponent, isStandalone: true, selector: "ds-banner", inputs: { variant: { classPropertyName: "variant", publicName: "variant", 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 }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, accentRail: { classPropertyName: "accentRail", publicName: "accentRail", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "class.no-rail": "this.noRail", "attr.role": "this.ariaRole", "attr.aria-live": "this.ariaLive" } }, ngImport: i0, template: "<div [class]=\"classes()\">\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"20\"\n >\n </ds-icon>\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n\n <ng-content></ng-content>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"close\"\n type=\"button\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"16\"\n >\n </ds-icon>\n </button>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block}.banner{--_banner-bg-color: var(--ds-banner-bg-color, var(--info-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--info-text));--_banner-bar: var(--ds-banner-bar, var(--info));--_banner-pad-y: var(--ds-banner-pad-y, var(--space-3));--_banner-pad-x: var(--ds-banner-pad-x, var(--space-4));--_banner-radius: var(--ds-banner-radius, var(--radius-md));--_banner-bar-width: var(--ds-banner-bar-width, var(--banner-bar-w));--_banner-title-text-color: var(--ds-banner-title-text-color, var(--text-primary));--_banner-close-icon-color: var(--ds-banner-close-icon-color, var(--icon-default));--_banner-close-icon-color-hover: var(--ds-banner-close-icon-color-hover, var(--icon-strong));--_banner-enter-keyframes: var(--ds-banner-enter-keyframes, ds-slide-in);--_banner-enter-duration: var(--ds-banner-enter-duration, var(--duration-base));--_banner-enter-easing: var(--ds-banner-enter-easing, var(--ease-decelerate));--_banner-enter-offset: var(--ds-banner-enter-offset, 4px);--_ds-enter-y: calc(-1 * var(--_banner-enter-offset));--_ds-enter-scale: var(--ds-banner-enter-scale, .96);display:flex;gap:var(--space-3);padding:var(--_banner-pad-y) var(--_banner-pad-x);border-radius:var(--_banner-radius);background-color:var(--_banner-bg-color);color:var(--_banner-text-color);animation-name:var(--_banner-enter-keyframes);animation-duration:var(--_banner-enter-duration);animation-timing-function:var(--_banner-enter-easing)}@media(prefers-reduced-motion:reduce){.banner{--_banner-enter-duration: 0ms}}:host(:not(.no-rail)) .banner{border-left:var(--_banner-bar-width) solid var(--_banner-bar)}.banner.success{--_banner-bar: var(--ds-banner-bar, var(--success));--_banner-bg-color: var(--ds-banner-bg-color, var(--success-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--success-text))}.banner.warning{--_banner-bar: var(--ds-banner-bar, var(--warning));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.severe{--_banner-bar: var(--ds-banner-bar, var(--warning-hover));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-muted));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.error{--_banner-bar: var(--ds-banner-bar, var(--error));--_banner-bg-color: var(--ds-banner-bg-color, var(--error-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--error-text))}.banner.neutral{--_banner-bar: var(--ds-banner-bar, var(--border-strong));--_banner-bg-color: var(--ds-banner-bg-color, var(--surface-secondary));--_banner-text-color: var(--ds-banner-text-color, var(--text-secondary))}.banner .icon{flex-shrink:0;color:inherit;margin-top:var(--banner-ic-mt)}.banner .body{flex:1;min-width:0}.banner .title{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_banner-title-text-color);margin:0 0 var(--space-1)}.banner .close{background:none;border:0;cursor:pointer;color:var(--_banner-close-icon-color)}.banner .close:hover{color:var(--_banner-close-icon-color-hover)}.banner .close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.banner .actions{display:flex;gap:var(--space-2)}.banner .actions:empty{display:none}.banner.layout-stacked{flex-wrap:wrap;align-items:flex-start}.banner.layout-stacked .actions{flex-basis:100%;margin-top:var(--space-2);padding-left:calc(var(--icon-lg) + var(--space-3))}.banner.layout-row{align-items:center}.banner.layout-row .icon{align-self:flex-start}.banner.layout-row .body{flex:1;min-width:0}.banner.layout-row .actions{flex-shrink:0}.banner.compact{align-items:center;--_banner-pad-y: var(--ds-banner-pad-y, var(--space-2));--_banner-pad-x: var(--ds-banner-pad-x, var(--space-3))}.banner.compact .icon{margin-top:0}.banner.compact .title{margin:0;white-space:nowrap}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
|
|
6222
6573
|
}
|
|
6223
6574
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: BannerComponent, decorators: [{
|
|
6224
6575
|
type: Component,
|
|
6225
|
-
args: [{ selector: 'ds-banner', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, template: "<div [class]=\"classes()\">\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"20\"\n >\n </ds-icon>\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n\n <ng-content></ng-content>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"close\"\n type=\"button\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"16\"\n >\n </ds-icon>\n </button>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block}.banner{--_banner-bg-color: var(--ds-banner-bg-color, var(--info-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--info-text));--_banner-bar: var(--ds-banner-bar, var(--info));--_banner-pad-y: var(--ds-banner-pad-y, var(--space-3));--_banner-pad-x: var(--ds-banner-pad-x, var(--space-4));--_banner-radius: var(--ds-banner-radius, var(--radius-md));--_banner-bar-width: var(--ds-banner-bar-width, var(--banner-bar-w));--_banner-title-text-color: var(--ds-banner-title-text-color, var(--text-primary));--_banner-close-icon-color: var(--ds-banner-close-icon-color, var(--icon-default));--_banner-close-icon-color-hover: var(--ds-banner-close-icon-color-hover, var(--icon-strong));display:flex;gap:var(--space-3);padding:var(--_banner-pad-y) var(--_banner-pad-x);border-radius:var(--_banner-radius);background-color:var(--_banner-bg-color);color:var(--_banner-text-color);animation:
|
|
6576
|
+
args: [{ selector: 'ds-banner', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, template: "<div [class]=\"classes()\">\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"20\"\n >\n </ds-icon>\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n\n <ng-content></ng-content>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"close\"\n type=\"button\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"16\"\n >\n </ds-icon>\n </button>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block}.banner{--_banner-bg-color: var(--ds-banner-bg-color, var(--info-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--info-text));--_banner-bar: var(--ds-banner-bar, var(--info));--_banner-pad-y: var(--ds-banner-pad-y, var(--space-3));--_banner-pad-x: var(--ds-banner-pad-x, var(--space-4));--_banner-radius: var(--ds-banner-radius, var(--radius-md));--_banner-bar-width: var(--ds-banner-bar-width, var(--banner-bar-w));--_banner-title-text-color: var(--ds-banner-title-text-color, var(--text-primary));--_banner-close-icon-color: var(--ds-banner-close-icon-color, var(--icon-default));--_banner-close-icon-color-hover: var(--ds-banner-close-icon-color-hover, var(--icon-strong));--_banner-enter-keyframes: var(--ds-banner-enter-keyframes, ds-slide-in);--_banner-enter-duration: var(--ds-banner-enter-duration, var(--duration-base));--_banner-enter-easing: var(--ds-banner-enter-easing, var(--ease-decelerate));--_banner-enter-offset: var(--ds-banner-enter-offset, 4px);--_ds-enter-y: calc(-1 * var(--_banner-enter-offset));--_ds-enter-scale: var(--ds-banner-enter-scale, .96);display:flex;gap:var(--space-3);padding:var(--_banner-pad-y) var(--_banner-pad-x);border-radius:var(--_banner-radius);background-color:var(--_banner-bg-color);color:var(--_banner-text-color);animation-name:var(--_banner-enter-keyframes);animation-duration:var(--_banner-enter-duration);animation-timing-function:var(--_banner-enter-easing)}@media(prefers-reduced-motion:reduce){.banner{--_banner-enter-duration: 0ms}}:host(:not(.no-rail)) .banner{border-left:var(--_banner-bar-width) solid var(--_banner-bar)}.banner.success{--_banner-bar: var(--ds-banner-bar, var(--success));--_banner-bg-color: var(--ds-banner-bg-color, var(--success-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--success-text))}.banner.warning{--_banner-bar: var(--ds-banner-bar, var(--warning));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.severe{--_banner-bar: var(--ds-banner-bar, var(--warning-hover));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-muted));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.error{--_banner-bar: var(--ds-banner-bar, var(--error));--_banner-bg-color: var(--ds-banner-bg-color, var(--error-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--error-text))}.banner.neutral{--_banner-bar: var(--ds-banner-bar, var(--border-strong));--_banner-bg-color: var(--ds-banner-bg-color, var(--surface-secondary));--_banner-text-color: var(--ds-banner-text-color, var(--text-secondary))}.banner .icon{flex-shrink:0;color:inherit;margin-top:var(--banner-ic-mt)}.banner .body{flex:1;min-width:0}.banner .title{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_banner-title-text-color);margin:0 0 var(--space-1)}.banner .close{background:none;border:0;cursor:pointer;color:var(--_banner-close-icon-color)}.banner .close:hover{color:var(--_banner-close-icon-color-hover)}.banner .close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.banner .actions{display:flex;gap:var(--space-2)}.banner .actions:empty{display:none}.banner.layout-stacked{flex-wrap:wrap;align-items:flex-start}.banner.layout-stacked .actions{flex-basis:100%;margin-top:var(--space-2);padding-left:calc(var(--icon-lg) + var(--space-3))}.banner.layout-row{align-items:center}.banner.layout-row .icon{align-self:flex-start}.banner.layout-row .body{flex:1;min-width:0}.banner.layout-row .actions{flex-shrink:0}.banner.compact{align-items:center;--_banner-pad-y: var(--ds-banner-pad-y, var(--space-2));--_banner-pad-x: var(--ds-banner-pad-x, var(--space-3))}.banner.compact .icon{margin-top:0}.banner.compact .title{margin:0;white-space:nowrap}\n"] }]
|
|
6226
6577
|
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], accentRail: [{ type: i0.Input, args: [{ isSignal: true, alias: "accentRail", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], noRail: [{
|
|
6227
6578
|
type: HostBinding,
|
|
6228
6579
|
args: ['class.no-rail']
|
|
@@ -6271,11 +6622,11 @@ class AlertComponent {
|
|
|
6271
6622
|
this.closed.emit();
|
|
6272
6623
|
}
|
|
6273
6624
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: AlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6274
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: AlertComponent, isStandalone: true, selector: "ds-alert", inputs: { variant: { classPropertyName: "variant", publicName: "variant", 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 }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "attr.role": "this.ariaRole", "attr.aria-live": "this.ariaLive" } }, ngImport: i0, template: "<div [class]=\"classes()\">\n <ds-icon\n class=\"a-icon\"\n [name]=\"resolvedIcon()\"\n [size]=\"16\"\n >\n </ds-icon>\n\n <div class=\"a-body\">\n @if (title()) {\n <div class=\"a-title\">\n {{ title() }}\n </div>\n }\n\n <div class=\"a-msg\">\n <ng-content />\n </div>\n\n <div class=\"a-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"a-close\"\n type=\"button\"\n aria-label=\"Dismiss\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n }\n</div>\n", styles: [":host{display:inline-flex}.alert{--_alert-bg-color: var(--ds-alert-bg-color, var(--info-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--info-text));--_alert-title-text-color: var(--ds-alert-title-text-color, var(--text-primary));--_alert-close-icon-color: var(--ds-alert-close-icon-color, var(--icon-default));--_alert-close-icon-color-hover: var(--ds-alert-close-icon-color-hover, var(--icon-strong));--_alert-pad-y: var(--ds-alert-pad-y, var(--space-2));--_alert-pad-x: var(--ds-alert-pad-x, var(--space-3));--_alert-radius: var(--ds-alert-radius, var(--radius-md));display:inline-flex;align-items:flex-start;gap:var(--space-2);padding:var(--_alert-pad-y) var(--_alert-pad-x);border-radius:var(--_alert-radius);background-color:var(--_alert-bg-color);color:var(--_alert-text-color);animation:
|
|
6625
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: AlertComponent, isStandalone: true, selector: "ds-alert", inputs: { variant: { classPropertyName: "variant", publicName: "variant", 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 }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "attr.role": "this.ariaRole", "attr.aria-live": "this.ariaLive" } }, ngImport: i0, template: "<div [class]=\"classes()\">\n <ds-icon\n class=\"a-icon\"\n [name]=\"resolvedIcon()\"\n [size]=\"16\"\n >\n </ds-icon>\n\n <div class=\"a-body\">\n @if (title()) {\n <div class=\"a-title\">\n {{ title() }}\n </div>\n }\n\n <div class=\"a-msg\">\n <ng-content />\n </div>\n\n <div class=\"a-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"a-close\"\n type=\"button\"\n aria-label=\"Dismiss\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n }\n</div>\n", styles: [":host{display:inline-flex}.alert{--_alert-bg-color: var(--ds-alert-bg-color, var(--info-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--info-text));--_alert-title-text-color: var(--ds-alert-title-text-color, var(--text-primary));--_alert-close-icon-color: var(--ds-alert-close-icon-color, var(--icon-default));--_alert-close-icon-color-hover: var(--ds-alert-close-icon-color-hover, var(--icon-strong));--_alert-pad-y: var(--ds-alert-pad-y, var(--space-2));--_alert-pad-x: var(--ds-alert-pad-x, var(--space-3));--_alert-radius: var(--ds-alert-radius, var(--radius-md));--_alert-enter-keyframes: var(--ds-alert-enter-keyframes, ds-slide-in);--_alert-enter-duration: var(--ds-alert-enter-duration, var(--duration-base));--_alert-enter-easing: var(--ds-alert-enter-easing, var(--ease-decelerate));--_alert-enter-offset: var(--ds-alert-enter-offset, 2px);--_ds-enter-y: calc(-1 * var(--_alert-enter-offset));--_ds-enter-scale: var(--ds-alert-enter-scale, .96);display:inline-flex;align-items:flex-start;gap:var(--space-2);padding:var(--_alert-pad-y) var(--_alert-pad-x);border-radius:var(--_alert-radius);background-color:var(--_alert-bg-color);color:var(--_alert-text-color);animation-name:var(--_alert-enter-keyframes);animation-duration:var(--_alert-enter-duration);animation-timing-function:var(--_alert-enter-easing)}@media(prefers-reduced-motion:reduce){.alert{--_alert-enter-duration: 0ms}}.alert.success{--_alert-bg-color: var(--ds-alert-bg-color, var(--success-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--success-text))}.alert.warning{--_alert-bg-color: var(--ds-alert-bg-color, var(--warning-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--warning-text))}.alert.error{--_alert-bg-color: var(--ds-alert-bg-color, var(--error-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--error-text))}.alert.neutral{--_alert-bg-color: var(--ds-alert-bg-color, var(--surface-secondary));--_alert-text-color: var(--ds-alert-text-color, var(--text-secondary))}.alert .a-icon{flex-shrink:0;color:inherit;margin-top:var(--border-width-default)}.alert .a-body{flex:1;min-width:0}.alert .a-title{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_alert-title-text-color);margin:0 0 var(--space-1)}.alert .a-actions{display:flex;gap:var(--space-2);margin-top:var(--space-2)}.alert .a-actions:empty{display:none}.alert .a-close{background:none;border:0;cursor:pointer;padding:0;color:var(--_alert-close-icon-color);flex-shrink:0}.alert .a-close:hover{color:var(--_alert-close-icon-color-hover)}.alert .a-close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
|
|
6275
6626
|
}
|
|
6276
6627
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: AlertComponent, decorators: [{
|
|
6277
6628
|
type: Component,
|
|
6278
|
-
args: [{ selector: 'ds-alert', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, template: "<div [class]=\"classes()\">\n <ds-icon\n class=\"a-icon\"\n [name]=\"resolvedIcon()\"\n [size]=\"16\"\n >\n </ds-icon>\n\n <div class=\"a-body\">\n @if (title()) {\n <div class=\"a-title\">\n {{ title() }}\n </div>\n }\n\n <div class=\"a-msg\">\n <ng-content />\n </div>\n\n <div class=\"a-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"a-close\"\n type=\"button\"\n aria-label=\"Dismiss\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n }\n</div>\n", styles: [":host{display:inline-flex}.alert{--_alert-bg-color: var(--ds-alert-bg-color, var(--info-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--info-text));--_alert-title-text-color: var(--ds-alert-title-text-color, var(--text-primary));--_alert-close-icon-color: var(--ds-alert-close-icon-color, var(--icon-default));--_alert-close-icon-color-hover: var(--ds-alert-close-icon-color-hover, var(--icon-strong));--_alert-pad-y: var(--ds-alert-pad-y, var(--space-2));--_alert-pad-x: var(--ds-alert-pad-x, var(--space-3));--_alert-radius: var(--ds-alert-radius, var(--radius-md));display:inline-flex;align-items:flex-start;gap:var(--space-2);padding:var(--_alert-pad-y) var(--_alert-pad-x);border-radius:var(--_alert-radius);background-color:var(--_alert-bg-color);color:var(--_alert-text-color);animation:
|
|
6629
|
+
args: [{ selector: 'ds-alert', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, template: "<div [class]=\"classes()\">\n <ds-icon\n class=\"a-icon\"\n [name]=\"resolvedIcon()\"\n [size]=\"16\"\n >\n </ds-icon>\n\n <div class=\"a-body\">\n @if (title()) {\n <div class=\"a-title\">\n {{ title() }}\n </div>\n }\n\n <div class=\"a-msg\">\n <ng-content />\n </div>\n\n <div class=\"a-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"a-close\"\n type=\"button\"\n aria-label=\"Dismiss\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n }\n</div>\n", styles: [":host{display:inline-flex}.alert{--_alert-bg-color: var(--ds-alert-bg-color, var(--info-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--info-text));--_alert-title-text-color: var(--ds-alert-title-text-color, var(--text-primary));--_alert-close-icon-color: var(--ds-alert-close-icon-color, var(--icon-default));--_alert-close-icon-color-hover: var(--ds-alert-close-icon-color-hover, var(--icon-strong));--_alert-pad-y: var(--ds-alert-pad-y, var(--space-2));--_alert-pad-x: var(--ds-alert-pad-x, var(--space-3));--_alert-radius: var(--ds-alert-radius, var(--radius-md));--_alert-enter-keyframes: var(--ds-alert-enter-keyframes, ds-slide-in);--_alert-enter-duration: var(--ds-alert-enter-duration, var(--duration-base));--_alert-enter-easing: var(--ds-alert-enter-easing, var(--ease-decelerate));--_alert-enter-offset: var(--ds-alert-enter-offset, 2px);--_ds-enter-y: calc(-1 * var(--_alert-enter-offset));--_ds-enter-scale: var(--ds-alert-enter-scale, .96);display:inline-flex;align-items:flex-start;gap:var(--space-2);padding:var(--_alert-pad-y) var(--_alert-pad-x);border-radius:var(--_alert-radius);background-color:var(--_alert-bg-color);color:var(--_alert-text-color);animation-name:var(--_alert-enter-keyframes);animation-duration:var(--_alert-enter-duration);animation-timing-function:var(--_alert-enter-easing)}@media(prefers-reduced-motion:reduce){.alert{--_alert-enter-duration: 0ms}}.alert.success{--_alert-bg-color: var(--ds-alert-bg-color, var(--success-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--success-text))}.alert.warning{--_alert-bg-color: var(--ds-alert-bg-color, var(--warning-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--warning-text))}.alert.error{--_alert-bg-color: var(--ds-alert-bg-color, var(--error-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--error-text))}.alert.neutral{--_alert-bg-color: var(--ds-alert-bg-color, var(--surface-secondary));--_alert-text-color: var(--ds-alert-text-color, var(--text-secondary))}.alert .a-icon{flex-shrink:0;color:inherit;margin-top:var(--border-width-default)}.alert .a-body{flex:1;min-width:0}.alert .a-title{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_alert-title-text-color);margin:0 0 var(--space-1)}.alert .a-actions{display:flex;gap:var(--space-2);margin-top:var(--space-2)}.alert .a-actions:empty{display:none}.alert .a-close{background:none;border:0;cursor:pointer;padding:0;color:var(--_alert-close-icon-color);flex-shrink:0}.alert .a-close:hover{color:var(--_alert-close-icon-color-hover)}.alert .a-close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}\n"] }]
|
|
6279
6630
|
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], ariaRole: [{
|
|
6280
6631
|
type: HostBinding,
|
|
6281
6632
|
args: ['attr.role']
|
|
@@ -6651,11 +7002,11 @@ class ToastComponent {
|
|
|
6651
7002
|
this.closed.emit();
|
|
6652
7003
|
}
|
|
6653
7004
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6654
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ToastComponent, isStandalone: true, selector: "ds-toast", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, ngImport: i0, template: "<div\n aria-atomic=\"true\"\n [class]=\"classes()\"\n [attr.role]=\"role()\"\n [attr.aria-live]=\"role() === 'alert' ? 'assertive' : 'polite'\"\n>\n @if (isLoading()) {\n <ds-spinner\n class=\"icon\"\n size=\"sm\"\n />\n } @else {\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"16\"\n />\n }\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n {{ message() }}\n <ng-content></ng-content>\n </div>\n\n @if (action(); as act) {\n <button\n type=\"button\"\n class=\"action\"\n (click)=\"onAction(act)\"\n >\n {{ act.label }}\n </button>\n }\n\n <span class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </span>\n\n @if (dismissible()) {\n <button\n type=\"button\"\n class=\"close\"\n aria-label=\"Dismiss\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n />\n </button>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block;transition:opacity var(--duration
|
|
7005
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ToastComponent, isStandalone: true, selector: "ds-toast", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, ngImport: i0, template: "<div\n aria-atomic=\"true\"\n [class]=\"classes()\"\n [attr.role]=\"role()\"\n [attr.aria-live]=\"role() === 'alert' ? 'assertive' : 'polite'\"\n>\n @if (isLoading()) {\n <ds-spinner\n class=\"icon\"\n size=\"sm\"\n />\n } @else {\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"16\"\n />\n }\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n {{ message() }}\n <ng-content></ng-content>\n </div>\n\n @if (action(); as act) {\n <button\n type=\"button\"\n class=\"action\"\n (click)=\"onAction(act)\"\n >\n {{ act.label }}\n </button>\n }\n\n <span class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </span>\n\n @if (dismissible()) {\n <button\n type=\"button\"\n class=\"close\"\n aria-label=\"Dismiss\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n />\n </button>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_toast-leave-duration: var(--ds-toast-leave-duration, var(--duration-base));--_toast-leave-easing: var(--ds-toast-leave-easing, var(--ease-standard));display:block;transition:opacity var(--_toast-leave-duration) var(--_toast-leave-easing),transform var(--_toast-leave-duration) var(--_toast-leave-easing)}:host(.leaving){opacity:0;transform:translateY(calc(var(--space-2) * -1));pointer-events:none}.toast{--_toast-bg-color: var(--ds-toast-bg-color, var(--surface-overlay));--_toast-border: var(--ds-toast-border, var(--border-default));--_toast-focus-shadow: var(--ds-toast-focus-shadow, var(--ds-control-focus-shadow));--_toast-bar-color: var(--ds-toast-bar-color, var(--accent));--_toast-icon-color: var(--ds-toast-icon-color, var(--accent));--_toast-enter-keyframes: var(--ds-toast-enter-keyframes, ds-slide-in);--_toast-enter-duration: var(--ds-toast-enter-duration, var(--duration-slow));--_toast-enter-easing: var(--ds-toast-enter-easing, var(--ease-decelerate));--_toast-enter-offset: var(--ds-toast-enter-offset, var(--space-2));--_toast-min-width: var(--ds-toast-min-width, var(--toast-minw));--_toast-max-width: var(--ds-toast-max-width, var(--toast-maxw));--_ds-enter-y: var(--_toast-enter-offset);--_ds-enter-scale: var(--ds-toast-enter-scale, .96);display:flex;align-items:flex-start;gap:var(--space-3);background-color:var(--_toast-bg-color);border:var(--border-width-default) solid var(--_toast-border);border-left:var(--toast-bar-w) solid var(--_toast-bar-color);border-radius:var(--radius-lg);padding:var(--space-3) var(--space-4);box-shadow:var(--shadow-toast);min-width:var(--_toast-min-width);max-width:var(--_toast-max-width);animation-name:var(--_toast-enter-keyframes);animation-duration:var(--_toast-enter-duration);animation-timing-function:var(--_toast-enter-easing)}@media(prefers-reduced-motion:reduce){.toast{--_toast-enter-duration: 0ms}}.toast .icon{color:var(--_toast-icon-color);flex-shrink:0;margin-top:var(--space-0-5)}.toast .body{flex:1;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-secondary)}.toast .title{font-weight:var(--font-weight-bold);color:var(--text-primary);margin-bottom:var(--space-0-5)}.toast .close{border:0;background:transparent;color:var(--icon-default);cursor:pointer;padding:var(--space-0-5)}.toast .close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.toast .action{flex-shrink:0;align-self:center;border:0;background:transparent;color:var(--accent-strong);font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);cursor:pointer;padding:var(--space-1) var(--space-2);border-radius:var(--radius-sm)}.toast .action:hover{background:var(--surface-secondary)}.toast .action:focus-visible{outline:none;box-shadow:var(--_toast-focus-shadow)}.toast .actions{display:inline-flex;align-items:center;gap:var(--space-2);flex-shrink:0}.toast .actions:empty{display:none}.toast.info{--_toast-bg-color: var(--ds-toast-bg-color-info, var(--ds-toast-bg-color, var(--surface-overlay)));--_toast-border: var(--ds-toast-border-info, var(--ds-toast-border, var(--border-default)));--_toast-bar-color: var(--ds-toast-bar-color, var(--accent));--_toast-icon-color: var(--ds-toast-icon-color, var(--accent));border-left-color:var(--_toast-bar-color)}.toast.success{--_toast-bg-color: var(--ds-toast-bg-color-success, var(--ds-toast-bg-color, var(--surface-overlay)));--_toast-border: var(--ds-toast-border-success, var(--ds-toast-border, var(--border-default)));--_toast-bar-color: var(--ds-toast-bar-color, var(--success));--_toast-icon-color: var(--ds-toast-icon-color, var(--success));border-left-color:var(--_toast-bar-color)}.toast.success .icon{color:var(--_toast-icon-color)}.toast.warning{--_toast-bg-color: var(--ds-toast-bg-color-warning, var(--ds-toast-bg-color, var(--surface-overlay)));--_toast-border: var(--ds-toast-border-warning, var(--ds-toast-border, var(--border-default)));--_toast-bar-color: var(--ds-toast-bar-color, var(--warning-hover));--_toast-icon-color: var(--ds-toast-icon-color, var(--warning-hover));border-left-color:var(--_toast-bar-color)}.toast.warning .icon{color:var(--_toast-icon-color)}.toast.error{--_toast-bg-color: var(--ds-toast-bg-color-error, var(--ds-toast-bg-color, var(--surface-overlay)));--_toast-border: var(--ds-toast-border-error, var(--ds-toast-border, var(--border-default)));--_toast-bar-color: var(--ds-toast-bar-color, var(--error));--_toast-icon-color: var(--ds-toast-icon-color, var(--error));border-left-color:var(--_toast-bar-color)}.toast.error .icon{color:var(--_toast-icon-color)}.toast.loading{border-left-color:var(--accent)}.toast.loading .icon{color:var(--accent);margin-top:var(--space-0-5)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "component", type: SpinnerComponent, selector: "ds-spinner", inputs: ["size"] }] });
|
|
6655
7006
|
}
|
|
6656
7007
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ToastComponent, decorators: [{
|
|
6657
7008
|
type: Component,
|
|
6658
|
-
args: [{ selector: 'ds-toast', standalone: true, imports: [IconComponent, SpinnerComponent], encapsulation: ViewEncapsulation.Emulated, template: "<div\n aria-atomic=\"true\"\n [class]=\"classes()\"\n [attr.role]=\"role()\"\n [attr.aria-live]=\"role() === 'alert' ? 'assertive' : 'polite'\"\n>\n @if (isLoading()) {\n <ds-spinner\n class=\"icon\"\n size=\"sm\"\n />\n } @else {\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"16\"\n />\n }\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n {{ message() }}\n <ng-content></ng-content>\n </div>\n\n @if (action(); as act) {\n <button\n type=\"button\"\n class=\"action\"\n (click)=\"onAction(act)\"\n >\n {{ act.label }}\n </button>\n }\n\n <span class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </span>\n\n @if (dismissible()) {\n <button\n type=\"button\"\n class=\"close\"\n aria-label=\"Dismiss\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n />\n </button>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block;transition:opacity var(--duration
|
|
7009
|
+
args: [{ selector: 'ds-toast', standalone: true, imports: [IconComponent, SpinnerComponent], encapsulation: ViewEncapsulation.Emulated, template: "<div\n aria-atomic=\"true\"\n [class]=\"classes()\"\n [attr.role]=\"role()\"\n [attr.aria-live]=\"role() === 'alert' ? 'assertive' : 'polite'\"\n>\n @if (isLoading()) {\n <ds-spinner\n class=\"icon\"\n size=\"sm\"\n />\n } @else {\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"16\"\n />\n }\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n {{ message() }}\n <ng-content></ng-content>\n </div>\n\n @if (action(); as act) {\n <button\n type=\"button\"\n class=\"action\"\n (click)=\"onAction(act)\"\n >\n {{ act.label }}\n </button>\n }\n\n <span class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </span>\n\n @if (dismissible()) {\n <button\n type=\"button\"\n class=\"close\"\n aria-label=\"Dismiss\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n />\n </button>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_toast-leave-duration: var(--ds-toast-leave-duration, var(--duration-base));--_toast-leave-easing: var(--ds-toast-leave-easing, var(--ease-standard));display:block;transition:opacity var(--_toast-leave-duration) var(--_toast-leave-easing),transform var(--_toast-leave-duration) var(--_toast-leave-easing)}:host(.leaving){opacity:0;transform:translateY(calc(var(--space-2) * -1));pointer-events:none}.toast{--_toast-bg-color: var(--ds-toast-bg-color, var(--surface-overlay));--_toast-border: var(--ds-toast-border, var(--border-default));--_toast-focus-shadow: var(--ds-toast-focus-shadow, var(--ds-control-focus-shadow));--_toast-bar-color: var(--ds-toast-bar-color, var(--accent));--_toast-icon-color: var(--ds-toast-icon-color, var(--accent));--_toast-enter-keyframes: var(--ds-toast-enter-keyframes, ds-slide-in);--_toast-enter-duration: var(--ds-toast-enter-duration, var(--duration-slow));--_toast-enter-easing: var(--ds-toast-enter-easing, var(--ease-decelerate));--_toast-enter-offset: var(--ds-toast-enter-offset, var(--space-2));--_toast-min-width: var(--ds-toast-min-width, var(--toast-minw));--_toast-max-width: var(--ds-toast-max-width, var(--toast-maxw));--_ds-enter-y: var(--_toast-enter-offset);--_ds-enter-scale: var(--ds-toast-enter-scale, .96);display:flex;align-items:flex-start;gap:var(--space-3);background-color:var(--_toast-bg-color);border:var(--border-width-default) solid var(--_toast-border);border-left:var(--toast-bar-w) solid var(--_toast-bar-color);border-radius:var(--radius-lg);padding:var(--space-3) var(--space-4);box-shadow:var(--shadow-toast);min-width:var(--_toast-min-width);max-width:var(--_toast-max-width);animation-name:var(--_toast-enter-keyframes);animation-duration:var(--_toast-enter-duration);animation-timing-function:var(--_toast-enter-easing)}@media(prefers-reduced-motion:reduce){.toast{--_toast-enter-duration: 0ms}}.toast .icon{color:var(--_toast-icon-color);flex-shrink:0;margin-top:var(--space-0-5)}.toast .body{flex:1;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-secondary)}.toast .title{font-weight:var(--font-weight-bold);color:var(--text-primary);margin-bottom:var(--space-0-5)}.toast .close{border:0;background:transparent;color:var(--icon-default);cursor:pointer;padding:var(--space-0-5)}.toast .close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.toast .action{flex-shrink:0;align-self:center;border:0;background:transparent;color:var(--accent-strong);font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);cursor:pointer;padding:var(--space-1) var(--space-2);border-radius:var(--radius-sm)}.toast .action:hover{background:var(--surface-secondary)}.toast .action:focus-visible{outline:none;box-shadow:var(--_toast-focus-shadow)}.toast .actions{display:inline-flex;align-items:center;gap:var(--space-2);flex-shrink:0}.toast .actions:empty{display:none}.toast.info{--_toast-bg-color: var(--ds-toast-bg-color-info, var(--ds-toast-bg-color, var(--surface-overlay)));--_toast-border: var(--ds-toast-border-info, var(--ds-toast-border, var(--border-default)));--_toast-bar-color: var(--ds-toast-bar-color, var(--accent));--_toast-icon-color: var(--ds-toast-icon-color, var(--accent));border-left-color:var(--_toast-bar-color)}.toast.success{--_toast-bg-color: var(--ds-toast-bg-color-success, var(--ds-toast-bg-color, var(--surface-overlay)));--_toast-border: var(--ds-toast-border-success, var(--ds-toast-border, var(--border-default)));--_toast-bar-color: var(--ds-toast-bar-color, var(--success));--_toast-icon-color: var(--ds-toast-icon-color, var(--success));border-left-color:var(--_toast-bar-color)}.toast.success .icon{color:var(--_toast-icon-color)}.toast.warning{--_toast-bg-color: var(--ds-toast-bg-color-warning, var(--ds-toast-bg-color, var(--surface-overlay)));--_toast-border: var(--ds-toast-border-warning, var(--ds-toast-border, var(--border-default)));--_toast-bar-color: var(--ds-toast-bar-color, var(--warning-hover));--_toast-icon-color: var(--ds-toast-icon-color, var(--warning-hover));border-left-color:var(--_toast-bar-color)}.toast.warning .icon{color:var(--_toast-icon-color)}.toast.error{--_toast-bg-color: var(--ds-toast-bg-color-error, var(--ds-toast-bg-color, var(--surface-overlay)));--_toast-border: var(--ds-toast-border-error, var(--ds-toast-border, var(--border-default)));--_toast-bar-color: var(--ds-toast-bar-color, var(--error));--_toast-icon-color: var(--ds-toast-icon-color, var(--error));border-left-color:var(--_toast-bar-color)}.toast.error .icon{color:var(--_toast-icon-color)}.toast.loading{border-left-color:var(--accent)}.toast.loading .icon{color:var(--accent);margin-top:var(--space-0-5)}\n"] }]
|
|
6659
7010
|
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], action: [{ type: i0.Input, args: [{ isSignal: true, alias: "action", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
6660
7011
|
|
|
6661
7012
|
// Must match the leave transition on :host in toast.component.scss (--duration-base).
|
|
@@ -6942,13 +7293,13 @@ class DrawerComponent {
|
|
|
6942
7293
|
}
|
|
6943
7294
|
}
|
|
6944
7295
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6945
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DrawerComponent, isStandalone: true, selector: "ds-drawer", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { open: "openChange", closed: "closed" }, host: { listeners: { "document:keydown.escape": "onEscape()" } }, ngImport: i0, template: "@if (rendered()) {\n <div class=\"drawer-root\">\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- scrim; click dismisses, keyboard dismisses via Escape (host document:keydown.escape) -->\n <div\n class=\"drawer-scrim\"\n [class.closing]=\"closing()\"\n (click)=\"onClose()\"\n >\n </div>\n\n <div\n role=\"dialog\"\n aria-modal=\"true\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n [class]=\"classes()\"\n [class.closing]=\"closing()\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n (keydown.escape)=\"onClose()\"\n (animationend)=\"onLeaveEnd($event)\"\n >\n <header class=\"header\">\n <h4\n class=\"title\"\n [id]=\"titleId\"\n >\n {{ title() }}\n </h4>\n\n <button\n type=\"button\"\n class=\"close\"\n aria-label=\"Close\"\n (click)=\"onClose()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"16\"\n />\n </button>\n </header>\n\n <div class=\"body\">\n <ng-content select=\"[drawer-body]\"></ng-content>\n </div>\n\n <div class=\"footer\">\n <ng-content select=\"[drawer-footer]\"></ng-content>\n </div>\n </div>\n </div>\n}\n", styles: ["@charset \"UTF-8\";:host{--_drawer-bg-color: var(--ds-drawer-bg-color, var(--surface-overlay));--_drawer-scrim-color: var(--ds-drawer-scrim-color, var(--scrim, hsl(220deg 20% 12% / 45%)));--_drawer-shadow: var(--ds-drawer-shadow, var(--shadow-modal));--_drawer-divider: var(--ds-drawer-divider, var(--border-divider));--_drawer-close-icon-color: var(--ds-drawer-close-icon-color, var(--icon-default));--_drawer-close-icon-color-hover: var(--ds-drawer-close-icon-color-hover, var(--icon-strong));--_drawer-radius: var(--ds-drawer-radius, 0);--_drawer-title-color: var(--ds-drawer-title-color, inherit);--_drawer-width-sm: var(--ds-drawer-width, var(--drawer-w-sm));--_drawer-width-md: var(--ds-drawer-width, var(--drawer-w-md));--_drawer-width-lg: var(--ds-drawer-width, var(--drawer-w-lg));display:contents}.drawer-root{position:fixed;inset:0;z-index:var(--layer-modal);overflow:clip}.drawer-scrim{position:absolute;inset:0;background:var(--_drawer-scrim-color);animation:
|
|
7296
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DrawerComponent, isStandalone: true, selector: "ds-drawer", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { open: "openChange", closed: "closed" }, host: { listeners: { "document:keydown.escape": "onEscape()" } }, ngImport: i0, template: "@if (rendered()) {\n <div class=\"drawer-root\">\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- scrim; click dismisses, keyboard dismisses via Escape (host document:keydown.escape) -->\n <div\n class=\"drawer-scrim\"\n [class.closing]=\"closing()\"\n (click)=\"onClose()\"\n >\n </div>\n\n <div\n role=\"dialog\"\n aria-modal=\"true\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n [class]=\"classes()\"\n [class.closing]=\"closing()\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n (keydown.escape)=\"onClose()\"\n (animationend)=\"onLeaveEnd($event)\"\n >\n <header class=\"header\">\n <h4\n class=\"title\"\n [id]=\"titleId\"\n >\n {{ title() }}\n </h4>\n\n <button\n type=\"button\"\n class=\"close\"\n aria-label=\"Close\"\n (click)=\"onClose()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"16\"\n />\n </button>\n </header>\n\n <div class=\"body\">\n <ng-content select=\"[drawer-body]\"></ng-content>\n </div>\n\n <div class=\"footer\">\n <ng-content select=\"[drawer-footer]\"></ng-content>\n </div>\n </div>\n </div>\n}\n", styles: ["@charset \"UTF-8\";:host{--_drawer-bg-color: var(--ds-drawer-bg-color, var(--surface-overlay));--_drawer-scrim-color: var(--ds-drawer-scrim-color, var(--scrim, hsl(220deg 20% 12% / 45%)));--_drawer-shadow: var(--ds-drawer-shadow, var(--shadow-modal));--_drawer-divider: var(--ds-drawer-divider, var(--border-divider));--_drawer-close-icon-color: var(--ds-drawer-close-icon-color, var(--icon-default));--_drawer-close-icon-color-hover: var(--ds-drawer-close-icon-color-hover, var(--icon-strong));--_drawer-radius: var(--ds-drawer-radius, 0);--_drawer-title-color: var(--ds-drawer-title-color, inherit);--_drawer-width-sm: var(--ds-drawer-width, var(--drawer-w-sm));--_drawer-width-md: var(--ds-drawer-width, var(--drawer-w-md));--_drawer-width-lg: var(--ds-drawer-width, var(--drawer-w-lg));--_drawer-enter-keyframes: var(--ds-drawer-enter-keyframes, ds-slide-edge-in);--_drawer-enter-duration: var(--ds-drawer-enter-duration, var(--duration-slow));--_drawer-enter-easing: var(--ds-drawer-enter-easing, var(--ease-decelerate));--_drawer-leave-duration: var(--ds-drawer-leave-duration, var(--duration-base));--_drawer-leave-easing: var(--ds-drawer-leave-easing, var(--ease-accelerate));--_drawer-scrim-enter-duration: var(--ds-drawer-enter-duration, var(--duration-fast));--_drawer-scrim-leave-duration: var(--ds-drawer-leave-duration, var(--duration-fast));--_ds-enter-scale: var(--ds-drawer-enter-scale, .96);display:contents}@media(prefers-reduced-motion:reduce){:host{--_drawer-enter-duration: 0ms;--_drawer-leave-duration: 0ms;--_drawer-scrim-enter-duration: 0ms;--_drawer-scrim-leave-duration: 0ms}}.drawer-root{position:fixed;inset:0;z-index:var(--layer-modal);overflow:clip}.drawer-scrim{position:absolute;inset:0;background:var(--_drawer-scrim-color);animation-name:ds-fade-in;animation-duration:var(--_drawer-scrim-enter-duration);animation-timing-function:var(--_drawer-enter-easing)}.drawer-scrim.closing{animation-name:drawer-scrim-out;animation-duration:var(--_drawer-scrim-leave-duration);animation-timing-function:var(--_drawer-leave-easing);animation-fill-mode:forwards}@keyframes drawer-scrim-out{to{opacity:0}}.drawer{position:absolute;background:var(--_drawer-bg-color);box-shadow:var(--_drawer-shadow);border-radius:var(--_drawer-radius);display:flex;flex-direction:column;isolation:isolate;animation-name:var(--_drawer-enter-keyframes);animation-duration:var(--_drawer-enter-duration);animation-timing-function:var(--_drawer-enter-easing)}.drawer.closing{animation-duration:var(--_drawer-leave-duration);animation-timing-function:var(--_drawer-leave-easing);animation-fill-mode:forwards}.drawer.sm{width:var(--_drawer-width-sm)}.drawer.md{width:var(--_drawer-width-md)}.drawer.lg{width:var(--_drawer-width-lg)}.drawer.right{--_ds-enter-x: 100%;top:0;right:0;bottom:0;max-width:100vw}.drawer.right.closing{animation-name:drawer-panel-close-right}.drawer.left{--_ds-enter-x: -100%;top:0;left:0;bottom:0;max-width:100vw}.drawer.left.closing{animation-name:drawer-panel-close-left}.drawer.top{--_ds-enter-y: -100%;top:0;left:0;right:0;width:auto;max-height:80vh}.drawer.top.closing{animation-name:drawer-panel-close-top}.drawer.bottom{--_ds-enter-y: 100%;bottom:0;left:0;right:0;width:auto;max-height:80vh}.drawer.bottom.closing{animation-name:drawer-panel-close-bottom}.drawer .header{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-5) var(--space-6);border-bottom:var(--border-width-default) solid var(--_drawer-divider)}.drawer .title{font:var(--font-weight-bold) var(--font-size-h5)/var(--line-height-snug) var(--font-sans);color:var(--_drawer-title-color);margin:0;flex:1}.drawer .close{background:transparent;border:0;width:var(--modal-close-size);height:var(--modal-close-size);color:var(--_drawer-close-icon-color);cursor:pointer;padding:0}.drawer .close:hover{color:var(--_drawer-close-icon-color-hover)}.drawer .close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.drawer .body{flex:1;padding:var(--space-6);overflow-y:auto}.drawer .footer{padding:var(--space-4) var(--space-6);border-top:var(--border-width-default) solid var(--_drawer-divider);display:flex;gap:var(--space-2);justify-content:flex-end}@keyframes drawer-panel-close-right{to{transform:translate(100%)}}@keyframes drawer-panel-close-left{to{transform:translate(-100%)}}@keyframes drawer-panel-close-top{to{transform:translateY(-100%)}}@keyframes drawer-panel-close-bottom{to{transform:translateY(100%)}}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] });
|
|
6946
7297
|
}
|
|
6947
7298
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DrawerComponent, decorators: [{
|
|
6948
7299
|
type: Component,
|
|
6949
7300
|
args: [{ selector: 'ds-drawer', standalone: true, imports: [IconComponent, A11yModule], encapsulation: ViewEncapsulation.Emulated, host: {
|
|
6950
7301
|
'(document:keydown.escape)': 'onEscape()',
|
|
6951
|
-
}, template: "@if (rendered()) {\n <div class=\"drawer-root\">\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- scrim; click dismisses, keyboard dismisses via Escape (host document:keydown.escape) -->\n <div\n class=\"drawer-scrim\"\n [class.closing]=\"closing()\"\n (click)=\"onClose()\"\n >\n </div>\n\n <div\n role=\"dialog\"\n aria-modal=\"true\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n [class]=\"classes()\"\n [class.closing]=\"closing()\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n (keydown.escape)=\"onClose()\"\n (animationend)=\"onLeaveEnd($event)\"\n >\n <header class=\"header\">\n <h4\n class=\"title\"\n [id]=\"titleId\"\n >\n {{ title() }}\n </h4>\n\n <button\n type=\"button\"\n class=\"close\"\n aria-label=\"Close\"\n (click)=\"onClose()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"16\"\n />\n </button>\n </header>\n\n <div class=\"body\">\n <ng-content select=\"[drawer-body]\"></ng-content>\n </div>\n\n <div class=\"footer\">\n <ng-content select=\"[drawer-footer]\"></ng-content>\n </div>\n </div>\n </div>\n}\n", styles: ["@charset \"UTF-8\";:host{--_drawer-bg-color: var(--ds-drawer-bg-color, var(--surface-overlay));--_drawer-scrim-color: var(--ds-drawer-scrim-color, var(--scrim, hsl(220deg 20% 12% / 45%)));--_drawer-shadow: var(--ds-drawer-shadow, var(--shadow-modal));--_drawer-divider: var(--ds-drawer-divider, var(--border-divider));--_drawer-close-icon-color: var(--ds-drawer-close-icon-color, var(--icon-default));--_drawer-close-icon-color-hover: var(--ds-drawer-close-icon-color-hover, var(--icon-strong));--_drawer-radius: var(--ds-drawer-radius, 0);--_drawer-title-color: var(--ds-drawer-title-color, inherit);--_drawer-width-sm: var(--ds-drawer-width, var(--drawer-w-sm));--_drawer-width-md: var(--ds-drawer-width, var(--drawer-w-md));--_drawer-width-lg: var(--ds-drawer-width, var(--drawer-w-lg));display:contents}.drawer-root{position:fixed;inset:0;z-index:var(--layer-modal);overflow:clip}.drawer-scrim{position:absolute;inset:0;background:var(--_drawer-scrim-color);animation:
|
|
7302
|
+
}, template: "@if (rendered()) {\n <div class=\"drawer-root\">\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- scrim; click dismisses, keyboard dismisses via Escape (host document:keydown.escape) -->\n <div\n class=\"drawer-scrim\"\n [class.closing]=\"closing()\"\n (click)=\"onClose()\"\n >\n </div>\n\n <div\n role=\"dialog\"\n aria-modal=\"true\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n [class]=\"classes()\"\n [class.closing]=\"closing()\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n (keydown.escape)=\"onClose()\"\n (animationend)=\"onLeaveEnd($event)\"\n >\n <header class=\"header\">\n <h4\n class=\"title\"\n [id]=\"titleId\"\n >\n {{ title() }}\n </h4>\n\n <button\n type=\"button\"\n class=\"close\"\n aria-label=\"Close\"\n (click)=\"onClose()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"16\"\n />\n </button>\n </header>\n\n <div class=\"body\">\n <ng-content select=\"[drawer-body]\"></ng-content>\n </div>\n\n <div class=\"footer\">\n <ng-content select=\"[drawer-footer]\"></ng-content>\n </div>\n </div>\n </div>\n}\n", styles: ["@charset \"UTF-8\";:host{--_drawer-bg-color: var(--ds-drawer-bg-color, var(--surface-overlay));--_drawer-scrim-color: var(--ds-drawer-scrim-color, var(--scrim, hsl(220deg 20% 12% / 45%)));--_drawer-shadow: var(--ds-drawer-shadow, var(--shadow-modal));--_drawer-divider: var(--ds-drawer-divider, var(--border-divider));--_drawer-close-icon-color: var(--ds-drawer-close-icon-color, var(--icon-default));--_drawer-close-icon-color-hover: var(--ds-drawer-close-icon-color-hover, var(--icon-strong));--_drawer-radius: var(--ds-drawer-radius, 0);--_drawer-title-color: var(--ds-drawer-title-color, inherit);--_drawer-width-sm: var(--ds-drawer-width, var(--drawer-w-sm));--_drawer-width-md: var(--ds-drawer-width, var(--drawer-w-md));--_drawer-width-lg: var(--ds-drawer-width, var(--drawer-w-lg));--_drawer-enter-keyframes: var(--ds-drawer-enter-keyframes, ds-slide-edge-in);--_drawer-enter-duration: var(--ds-drawer-enter-duration, var(--duration-slow));--_drawer-enter-easing: var(--ds-drawer-enter-easing, var(--ease-decelerate));--_drawer-leave-duration: var(--ds-drawer-leave-duration, var(--duration-base));--_drawer-leave-easing: var(--ds-drawer-leave-easing, var(--ease-accelerate));--_drawer-scrim-enter-duration: var(--ds-drawer-enter-duration, var(--duration-fast));--_drawer-scrim-leave-duration: var(--ds-drawer-leave-duration, var(--duration-fast));--_ds-enter-scale: var(--ds-drawer-enter-scale, .96);display:contents}@media(prefers-reduced-motion:reduce){:host{--_drawer-enter-duration: 0ms;--_drawer-leave-duration: 0ms;--_drawer-scrim-enter-duration: 0ms;--_drawer-scrim-leave-duration: 0ms}}.drawer-root{position:fixed;inset:0;z-index:var(--layer-modal);overflow:clip}.drawer-scrim{position:absolute;inset:0;background:var(--_drawer-scrim-color);animation-name:ds-fade-in;animation-duration:var(--_drawer-scrim-enter-duration);animation-timing-function:var(--_drawer-enter-easing)}.drawer-scrim.closing{animation-name:drawer-scrim-out;animation-duration:var(--_drawer-scrim-leave-duration);animation-timing-function:var(--_drawer-leave-easing);animation-fill-mode:forwards}@keyframes drawer-scrim-out{to{opacity:0}}.drawer{position:absolute;background:var(--_drawer-bg-color);box-shadow:var(--_drawer-shadow);border-radius:var(--_drawer-radius);display:flex;flex-direction:column;isolation:isolate;animation-name:var(--_drawer-enter-keyframes);animation-duration:var(--_drawer-enter-duration);animation-timing-function:var(--_drawer-enter-easing)}.drawer.closing{animation-duration:var(--_drawer-leave-duration);animation-timing-function:var(--_drawer-leave-easing);animation-fill-mode:forwards}.drawer.sm{width:var(--_drawer-width-sm)}.drawer.md{width:var(--_drawer-width-md)}.drawer.lg{width:var(--_drawer-width-lg)}.drawer.right{--_ds-enter-x: 100%;top:0;right:0;bottom:0;max-width:100vw}.drawer.right.closing{animation-name:drawer-panel-close-right}.drawer.left{--_ds-enter-x: -100%;top:0;left:0;bottom:0;max-width:100vw}.drawer.left.closing{animation-name:drawer-panel-close-left}.drawer.top{--_ds-enter-y: -100%;top:0;left:0;right:0;width:auto;max-height:80vh}.drawer.top.closing{animation-name:drawer-panel-close-top}.drawer.bottom{--_ds-enter-y: 100%;bottom:0;left:0;right:0;width:auto;max-height:80vh}.drawer.bottom.closing{animation-name:drawer-panel-close-bottom}.drawer .header{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-5) var(--space-6);border-bottom:var(--border-width-default) solid var(--_drawer-divider)}.drawer .title{font:var(--font-weight-bold) var(--font-size-h5)/var(--line-height-snug) var(--font-sans);color:var(--_drawer-title-color);margin:0;flex:1}.drawer .close{background:transparent;border:0;width:var(--modal-close-size);height:var(--modal-close-size);color:var(--_drawer-close-icon-color);cursor:pointer;padding:0}.drawer .close:hover{color:var(--_drawer-close-icon-color-hover)}.drawer .close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.drawer .body{flex:1;padding:var(--space-6);overflow-y:auto}.drawer .footer{padding:var(--space-4) var(--space-6);border-top:var(--border-width-default) solid var(--_drawer-divider);display:flex;gap:var(--space-2);justify-content:flex-end}@keyframes drawer-panel-close-right{to{transform:translate(100%)}}@keyframes drawer-panel-close-left{to{transform:translate(-100%)}}@keyframes drawer-panel-close-top{to{transform:translateY(-100%)}}@keyframes drawer-panel-close-bottom{to{transform:translateY(100%)}}\n"] }]
|
|
6952
7303
|
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
6953
7304
|
|
|
6954
7305
|
let nextId$1 = 0;
|
|
@@ -7132,11 +7483,11 @@ class BottomSheetComponent {
|
|
|
7132
7483
|
this.activeSnapIndex.set(nearestIndex);
|
|
7133
7484
|
}
|
|
7134
7485
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: BottomSheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7135
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: BottomSheetComponent, isStandalone: true, selector: "ds-bottom-sheet", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, snapPoints: { classPropertyName: "snapPoints", publicName: "snapPoints", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", closed: "closed" }, viewQueries: [{ propertyName: "sheetRef", first: true, predicate: ["sheet"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (rendered()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) on this element, a backdrop isn't a tabbable control -->\n <div\n class=\"sheet-overlay\"\n [class.closing]=\"closing()\"\n (click)=\"close()\"\n (keydown.escape)=\"onEscape()\"\n >\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -- (click) only stops propagation to the backdrop; the dialog itself isn't an activatable control -->\n <div\n #sheet\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n class=\"sheet\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n [class.dragging]=\"dragOffset() !== null\"\n [class.closing]=\"closing()\"\n [class.snapping]=\"snapPoints().length > 0 && dragOffset() === null\"\n [style.transform]=\"\n dragOffset() ? 'translateY(' + dragOffset() + 'px)' : null\n \"\n [style.height]=\"snapHeight()\"\n [style.maxHeight]=\"snapHeight() ? snapHeight() : null\"\n (click)=\"stop($event)\"\n (animationend)=\"onLeaveEnd($event)\"\n >\n <div\n class=\"grab\"\n (pointerdown)=\"onGrabStart($event)\"\n (pointermove)=\"onGrabMove($event)\"\n (pointerup)=\"onGrabEnd()\"\n (pointercancel)=\"onGrabEnd()\"\n >\n <div class=\"sheet-handle\"></div>\n </div>\n\n @if (title()) {\n <h3\n class=\"sheet-title\"\n [id]=\"titleId\"\n >\n {{ title() }}\n </h3>\n }\n\n <div class=\"sheet-body\">\n <ng-content />\n </div>\n\n <div class=\"sheet-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n </div>\n}\n", styles: ["@charset \"UTF-8\";:host{--_bottom-sheet-maxw: var(--ds-bottom-sheet-maxw, 480px);--_bottom-sheet-maxh: var(--ds-bottom-sheet-maxh, 80%);--_bottom-sheet-radius: var(--ds-bottom-sheet-radius, var(--radius-lg));--_bottom-sheet-bg-color: var(--ds-bottom-sheet-bg-color, var(--surface-default));--_bottom-sheet-scrim-color: var(--ds-bottom-sheet-scrim-color, var(--surface-scrim));--_bottom-sheet-title-text-color: var(--ds-bottom-sheet-title-text-color, var(--text-primary));display:contents}.sheet-overlay{position:fixed;inset:0;z-index:var(--layer-modal);background:var(--_bottom-sheet-scrim-color);display:flex;flex-direction:column;justify-content:flex-end;overflow:clip;animation:ds-
|
|
7486
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: BottomSheetComponent, isStandalone: true, selector: "ds-bottom-sheet", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, snapPoints: { classPropertyName: "snapPoints", publicName: "snapPoints", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", closed: "closed" }, viewQueries: [{ propertyName: "sheetRef", first: true, predicate: ["sheet"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (rendered()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) on this element, a backdrop isn't a tabbable control -->\n <div\n class=\"sheet-overlay\"\n [class.closing]=\"closing()\"\n (click)=\"close()\"\n (keydown.escape)=\"onEscape()\"\n >\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -- (click) only stops propagation to the backdrop; the dialog itself isn't an activatable control -->\n <div\n #sheet\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n class=\"sheet\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n [class.dragging]=\"dragOffset() !== null\"\n [class.closing]=\"closing()\"\n [class.snapping]=\"snapPoints().length > 0 && dragOffset() === null\"\n [style.transform]=\"\n dragOffset() ? 'translateY(' + dragOffset() + 'px)' : null\n \"\n [style.height]=\"snapHeight()\"\n [style.maxHeight]=\"snapHeight() ? snapHeight() : null\"\n (click)=\"stop($event)\"\n (animationend)=\"onLeaveEnd($event)\"\n >\n <div\n class=\"grab\"\n (pointerdown)=\"onGrabStart($event)\"\n (pointermove)=\"onGrabMove($event)\"\n (pointerup)=\"onGrabEnd()\"\n (pointercancel)=\"onGrabEnd()\"\n >\n <div class=\"sheet-handle\"></div>\n </div>\n\n @if (title()) {\n <h3\n class=\"sheet-title\"\n [id]=\"titleId\"\n >\n {{ title() }}\n </h3>\n }\n\n <div class=\"sheet-body\">\n <ng-content />\n </div>\n\n <div class=\"sheet-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n </div>\n}\n", styles: ["@charset \"UTF-8\";:host{--_bottom-sheet-maxw: var(--ds-bottom-sheet-maxw, 480px);--_bottom-sheet-maxh: var(--ds-bottom-sheet-maxh, 80%);--_bottom-sheet-radius: var(--ds-bottom-sheet-radius, var(--radius-lg));--_bottom-sheet-bg-color: var(--ds-bottom-sheet-bg-color, var(--surface-default));--_bottom-sheet-scrim-color: var(--ds-bottom-sheet-scrim-color, var(--surface-scrim));--_bottom-sheet-title-text-color: var(--ds-bottom-sheet-title-text-color, var(--text-primary));--_bottom-sheet-enter-keyframes: var(--ds-bottom-sheet-enter-keyframes, ds-slide-edge-in);--_bottom-sheet-enter-duration: var(--ds-bottom-sheet-enter-duration, var(--duration-base));--_bottom-sheet-enter-easing: var(--ds-bottom-sheet-enter-easing, var(--ease-decelerate));--_bottom-sheet-leave-duration: var(--ds-bottom-sheet-leave-duration, var(--duration-base));--_bottom-sheet-leave-easing: var(--ds-bottom-sheet-leave-easing, var(--ease-accelerate));--_bottom-sheet-scrim-enter-duration: var(--ds-bottom-sheet-enter-duration, var(--duration-fast));--_bottom-sheet-scrim-leave-duration: var(--ds-bottom-sheet-leave-duration, var(--duration-fast));--_ds-enter-scale: var(--ds-bottom-sheet-enter-scale, .96);display:contents}@media(prefers-reduced-motion:reduce){:host{--_bottom-sheet-enter-duration: 0ms;--_bottom-sheet-leave-duration: 0ms;--_bottom-sheet-scrim-enter-duration: 0ms;--_bottom-sheet-scrim-leave-duration: 0ms}}.sheet-overlay{position:fixed;inset:0;z-index:var(--layer-modal);background:var(--_bottom-sheet-scrim-color);display:flex;flex-direction:column;justify-content:flex-end;overflow:clip;animation-name:ds-fade-in;animation-duration:var(--_bottom-sheet-scrim-enter-duration);animation-timing-function:var(--_bottom-sheet-enter-easing)}.sheet-overlay.closing{animation-name:ds-sheet-fade-out;animation-duration:var(--_bottom-sheet-scrim-leave-duration);animation-timing-function:var(--_bottom-sheet-leave-easing);animation-fill-mode:forwards}.sheet{--_ds-enter-y: 100%;position:relative;width:min(100%,var(--_bottom-sheet-maxw));margin-inline:auto;background:var(--_bottom-sheet-bg-color);border-radius:var(--_bottom-sheet-radius) var(--_bottom-sheet-radius) 0 0;padding:0 var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom));animation-name:var(--_bottom-sheet-enter-keyframes);animation-duration:var(--_bottom-sheet-enter-duration);animation-timing-function:var(--_bottom-sheet-enter-easing);max-height:var(--_bottom-sheet-maxh);display:flex;flex-direction:column;transition:transform var(--duration-base) var(--ease-decelerate)}.sheet.dragging{transition:none}.sheet.snapping{transition:transform var(--duration-base) var(--ease-decelerate),height var(--duration-base) var(--ease-decelerate)}@media(prefers-reduced-motion:reduce){.sheet.snapping{transition:none}}.sheet.closing{animation-name:ds-sheet-down;animation-duration:var(--_bottom-sheet-leave-duration);animation-timing-function:var(--_bottom-sheet-leave-easing);animation-fill-mode:forwards}.grab{padding:var(--space-3) 0;margin:0 calc(var(--space-4) * -1);cursor:grab;touch-action:none}.sheet-handle{width:var(--bottom-sheet-handle-w);height:var(--bottom-sheet-handle-h);background:var(--border-strong);border-radius:var(--radius-pill);margin:0 auto}.sheet-title{font:var(--font-weight-semibold) var(--font-size-l)/var(--line-height-snug) var(--font-sans);color:var(--_bottom-sheet-title-text-color);margin:0 0 var(--space-3)}.sheet-body{display:flex;flex-direction:column;gap:var(--space-2);overflow-y:auto;min-height:0;padding:var(--space-1);margin:calc(var(--space-1) * -1)}.sheet-actions{display:flex;flex-direction:column;gap:var(--space-2)}.sheet-actions:not(:empty){margin-top:var(--space-3)}@keyframes ds-sheet-fade-out{to{opacity:0}}@keyframes ds-sheet-down{to{transform:translateY(100%)}}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] });
|
|
7136
7487
|
}
|
|
7137
7488
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: BottomSheetComponent, decorators: [{
|
|
7138
7489
|
type: Component,
|
|
7139
|
-
args: [{ selector: 'ds-bottom-sheet', standalone: true, imports: [A11yModule], encapsulation: ViewEncapsulation.Emulated, template: "@if (rendered()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) on this element, a backdrop isn't a tabbable control -->\n <div\n class=\"sheet-overlay\"\n [class.closing]=\"closing()\"\n (click)=\"close()\"\n (keydown.escape)=\"onEscape()\"\n >\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -- (click) only stops propagation to the backdrop; the dialog itself isn't an activatable control -->\n <div\n #sheet\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n class=\"sheet\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n [class.dragging]=\"dragOffset() !== null\"\n [class.closing]=\"closing()\"\n [class.snapping]=\"snapPoints().length > 0 && dragOffset() === null\"\n [style.transform]=\"\n dragOffset() ? 'translateY(' + dragOffset() + 'px)' : null\n \"\n [style.height]=\"snapHeight()\"\n [style.maxHeight]=\"snapHeight() ? snapHeight() : null\"\n (click)=\"stop($event)\"\n (animationend)=\"onLeaveEnd($event)\"\n >\n <div\n class=\"grab\"\n (pointerdown)=\"onGrabStart($event)\"\n (pointermove)=\"onGrabMove($event)\"\n (pointerup)=\"onGrabEnd()\"\n (pointercancel)=\"onGrabEnd()\"\n >\n <div class=\"sheet-handle\"></div>\n </div>\n\n @if (title()) {\n <h3\n class=\"sheet-title\"\n [id]=\"titleId\"\n >\n {{ title() }}\n </h3>\n }\n\n <div class=\"sheet-body\">\n <ng-content />\n </div>\n\n <div class=\"sheet-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n </div>\n}\n", styles: ["@charset \"UTF-8\";:host{--_bottom-sheet-maxw: var(--ds-bottom-sheet-maxw, 480px);--_bottom-sheet-maxh: var(--ds-bottom-sheet-maxh, 80%);--_bottom-sheet-radius: var(--ds-bottom-sheet-radius, var(--radius-lg));--_bottom-sheet-bg-color: var(--ds-bottom-sheet-bg-color, var(--surface-default));--_bottom-sheet-scrim-color: var(--ds-bottom-sheet-scrim-color, var(--surface-scrim));--_bottom-sheet-title-text-color: var(--ds-bottom-sheet-title-text-color, var(--text-primary));display:contents}.sheet-overlay{position:fixed;inset:0;z-index:var(--layer-modal);background:var(--_bottom-sheet-scrim-color);display:flex;flex-direction:column;justify-content:flex-end;overflow:clip;animation:ds-
|
|
7490
|
+
args: [{ selector: 'ds-bottom-sheet', standalone: true, imports: [A11yModule], encapsulation: ViewEncapsulation.Emulated, template: "@if (rendered()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) on this element, a backdrop isn't a tabbable control -->\n <div\n class=\"sheet-overlay\"\n [class.closing]=\"closing()\"\n (click)=\"close()\"\n (keydown.escape)=\"onEscape()\"\n >\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -- (click) only stops propagation to the backdrop; the dialog itself isn't an activatable control -->\n <div\n #sheet\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n class=\"sheet\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n [class.dragging]=\"dragOffset() !== null\"\n [class.closing]=\"closing()\"\n [class.snapping]=\"snapPoints().length > 0 && dragOffset() === null\"\n [style.transform]=\"\n dragOffset() ? 'translateY(' + dragOffset() + 'px)' : null\n \"\n [style.height]=\"snapHeight()\"\n [style.maxHeight]=\"snapHeight() ? snapHeight() : null\"\n (click)=\"stop($event)\"\n (animationend)=\"onLeaveEnd($event)\"\n >\n <div\n class=\"grab\"\n (pointerdown)=\"onGrabStart($event)\"\n (pointermove)=\"onGrabMove($event)\"\n (pointerup)=\"onGrabEnd()\"\n (pointercancel)=\"onGrabEnd()\"\n >\n <div class=\"sheet-handle\"></div>\n </div>\n\n @if (title()) {\n <h3\n class=\"sheet-title\"\n [id]=\"titleId\"\n >\n {{ title() }}\n </h3>\n }\n\n <div class=\"sheet-body\">\n <ng-content />\n </div>\n\n <div class=\"sheet-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n </div>\n}\n", styles: ["@charset \"UTF-8\";:host{--_bottom-sheet-maxw: var(--ds-bottom-sheet-maxw, 480px);--_bottom-sheet-maxh: var(--ds-bottom-sheet-maxh, 80%);--_bottom-sheet-radius: var(--ds-bottom-sheet-radius, var(--radius-lg));--_bottom-sheet-bg-color: var(--ds-bottom-sheet-bg-color, var(--surface-default));--_bottom-sheet-scrim-color: var(--ds-bottom-sheet-scrim-color, var(--surface-scrim));--_bottom-sheet-title-text-color: var(--ds-bottom-sheet-title-text-color, var(--text-primary));--_bottom-sheet-enter-keyframes: var(--ds-bottom-sheet-enter-keyframes, ds-slide-edge-in);--_bottom-sheet-enter-duration: var(--ds-bottom-sheet-enter-duration, var(--duration-base));--_bottom-sheet-enter-easing: var(--ds-bottom-sheet-enter-easing, var(--ease-decelerate));--_bottom-sheet-leave-duration: var(--ds-bottom-sheet-leave-duration, var(--duration-base));--_bottom-sheet-leave-easing: var(--ds-bottom-sheet-leave-easing, var(--ease-accelerate));--_bottom-sheet-scrim-enter-duration: var(--ds-bottom-sheet-enter-duration, var(--duration-fast));--_bottom-sheet-scrim-leave-duration: var(--ds-bottom-sheet-leave-duration, var(--duration-fast));--_ds-enter-scale: var(--ds-bottom-sheet-enter-scale, .96);display:contents}@media(prefers-reduced-motion:reduce){:host{--_bottom-sheet-enter-duration: 0ms;--_bottom-sheet-leave-duration: 0ms;--_bottom-sheet-scrim-enter-duration: 0ms;--_bottom-sheet-scrim-leave-duration: 0ms}}.sheet-overlay{position:fixed;inset:0;z-index:var(--layer-modal);background:var(--_bottom-sheet-scrim-color);display:flex;flex-direction:column;justify-content:flex-end;overflow:clip;animation-name:ds-fade-in;animation-duration:var(--_bottom-sheet-scrim-enter-duration);animation-timing-function:var(--_bottom-sheet-enter-easing)}.sheet-overlay.closing{animation-name:ds-sheet-fade-out;animation-duration:var(--_bottom-sheet-scrim-leave-duration);animation-timing-function:var(--_bottom-sheet-leave-easing);animation-fill-mode:forwards}.sheet{--_ds-enter-y: 100%;position:relative;width:min(100%,var(--_bottom-sheet-maxw));margin-inline:auto;background:var(--_bottom-sheet-bg-color);border-radius:var(--_bottom-sheet-radius) var(--_bottom-sheet-radius) 0 0;padding:0 var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom));animation-name:var(--_bottom-sheet-enter-keyframes);animation-duration:var(--_bottom-sheet-enter-duration);animation-timing-function:var(--_bottom-sheet-enter-easing);max-height:var(--_bottom-sheet-maxh);display:flex;flex-direction:column;transition:transform var(--duration-base) var(--ease-decelerate)}.sheet.dragging{transition:none}.sheet.snapping{transition:transform var(--duration-base) var(--ease-decelerate),height var(--duration-base) var(--ease-decelerate)}@media(prefers-reduced-motion:reduce){.sheet.snapping{transition:none}}.sheet.closing{animation-name:ds-sheet-down;animation-duration:var(--_bottom-sheet-leave-duration);animation-timing-function:var(--_bottom-sheet-leave-easing);animation-fill-mode:forwards}.grab{padding:var(--space-3) 0;margin:0 calc(var(--space-4) * -1);cursor:grab;touch-action:none}.sheet-handle{width:var(--bottom-sheet-handle-w);height:var(--bottom-sheet-handle-h);background:var(--border-strong);border-radius:var(--radius-pill);margin:0 auto}.sheet-title{font:var(--font-weight-semibold) var(--font-size-l)/var(--line-height-snug) var(--font-sans);color:var(--_bottom-sheet-title-text-color);margin:0 0 var(--space-3)}.sheet-body{display:flex;flex-direction:column;gap:var(--space-2);overflow-y:auto;min-height:0;padding:var(--space-1);margin:calc(var(--space-1) * -1)}.sheet-actions{display:flex;flex-direction:column;gap:var(--space-2)}.sheet-actions:not(:empty){margin-top:var(--space-3)}@keyframes ds-sheet-fade-out{to{opacity:0}}@keyframes ds-sheet-down{to{transform:translateY(100%)}}\n"] }]
|
|
7140
7491
|
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], closed: [{ type: i0.Output, args: ["closed"] }], snapPoints: [{ type: i0.Input, args: [{ isSignal: true, alias: "snapPoints", required: false }] }], sheetRef: [{ type: i0.ViewChild, args: ['sheet', { isSignal: true }] }] } });
|
|
7141
7492
|
|
|
7142
7493
|
class TagComponent {
|
|
@@ -7257,9 +7608,11 @@ class AutocompleteComponent extends DsControlValueAccessor {
|
|
|
7257
7608
|
/** Helper text shown below the field. */
|
|
7258
7609
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
7259
7610
|
/** Reserve the message-row height even when empty, so the field doesn't shift
|
|
7260
|
-
* the layout below it when a hint/error appears.
|
|
7261
|
-
*
|
|
7262
|
-
|
|
7611
|
+
* the layout below it when a hint/error appears. Falls back to
|
|
7612
|
+
* `DS_CONFIG.field.reserveMessage`, then off — opt in per field, or app-wide
|
|
7613
|
+
* for a form that shows validation messages. */
|
|
7614
|
+
reserveMessage = input(null, { ...(ngDevMode ? { debugName: "reserveMessage" } : /* istanbul ignore next */ {}), transform: (value) => (value == null ? null : booleanAttribute(value)) });
|
|
7615
|
+
reserveMessageResolved = resolveReserveMessage(this.reserveMessage);
|
|
7263
7616
|
/** Shows a "Create «text»" row when the typed text matches no option. */
|
|
7264
7617
|
allowCreate = input(false, { ...(ngDevMode ? { debugName: "allowCreate" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
7265
7618
|
/** Accessible name for the combobox input. */
|
|
@@ -7502,6 +7855,7 @@ class AutocompleteComponent extends DsControlValueAccessor {
|
|
|
7502
7855
|
overlayConfig.width = triggerWidth;
|
|
7503
7856
|
}
|
|
7504
7857
|
this.overlayRef = this.overlay.create(overlayConfig);
|
|
7858
|
+
prepareOverlayEnter(this.overlayRef, this.host.nativeElement, positionStrategy);
|
|
7505
7859
|
forwardOverlayTokens(this.overlayRef, this.host.nativeElement, this.panelTokens);
|
|
7506
7860
|
closeOnOutsidePointer(this.overlayRef, (target) => this.host.nativeElement.contains(target), () => this.close());
|
|
7507
7861
|
// No backdrop catches a page scroll and CDK's scroll strategies miss a plain
|
|
@@ -7569,7 +7923,7 @@ class AutocompleteComponent extends DsControlValueAccessor {
|
|
|
7569
7923
|
useExisting: forwardRef(() => AutocompleteComponent),
|
|
7570
7924
|
multi: true,
|
|
7571
7925
|
},
|
|
7572
|
-
], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "filterInput", first: true, predicate: ["filter"], descendants: true, isSignal: true }, { propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- click opens/focuses; keyboard runs through the inner <input role=\"combobox\"> (type/arrows/Enter/Esc) -->\n<div\n #trigger\n class=\"autocomplete-trigger\"\n [class]=\"size()\"\n [class.open]=\"isOpen()\"\n [class.disabled]=\"isDisabled()\"\n [class.error]=\"invalid()\"\n (click)=\"onTriggerClick()\"\n>\n @if (multiple()) {\n @for (selectedOption of selectedTags(); track selectedOption.value) {\n <ds-tag\n [closable]=\"true\"\n [closeLabel]=\"'Remove ' + selectedOption.label\"\n (closed)=\"remove(selectedOption.value)\"\n >\n {{ selectedOption.label }}\n </ds-tag>\n }\n } @else if (displayLabel()) {\n <span class=\"autocomplete-value\">\n {{ displayLabel() }}\n </span>\n }\n\n <input\n #filter\n type=\"text\"\n class=\"autocomplete-input\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-label]=\"ariaLabel() || placeholder()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [disabled]=\"isDisabled()\"\n [value]=\"query()\"\n [placeholder]=\"placeholderText()\"\n (input)=\"onFilter($event)\"\n (focus)=\"openPanel()\"\n (blur)=\"markTouched()\"\n (keydown)=\"onKeydown($event)\"\n />\n\n <ds-icon\n name=\"chevronDown\"\n class=\"autocomplete-chevron\"\n [size]=\"16\"\n (click)=\"togglePanel($event)\"\n />\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessage()\"\n/>\n\n<ng-template #panel>\n <ul\n class=\"autocomplete-list\"\n role=\"listbox\"\n [id]=\"listboxId\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n >\n @if (filteredGroups().length > 0) {\n @for (\n group of filteredGroups();\n track group.label;\n let groupIdx = $index\n ) {\n <li\n class=\"autocomplete-optgroup\"\n role=\"group\"\n [attr.aria-label]=\"group.label\"\n >\n <span\n class=\"autocomplete-optgroup-label\"\n [class.is-first]=\"groupIdx === 0\"\n >\n {{ group.label }}\n </span>\n\n @for (option of group.options; track option.value) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- listbox option; activated via the combobox input + aria-activedescendant, options aren't individually focusable -->\n <div\n role=\"option\"\n [class]=\"optionClass(option)\"\n [id]=\"optionId(flatIndexOf(option))\"\n [class.is-active]=\"flatIndexOf(option) === activeIndex()\"\n [attr.aria-selected]=\"isSelected(option)\"\n (click)=\"onPick(option)\"\n (mouseenter)=\"activeIndex.set(flatIndexOf(option))\"\n >\n @if (multiple()) {\n <span\n class=\"check-box\"\n [class.checked]=\"isSelected(option)\"\n >\n @if (isSelected(option)) {\n <ds-icon\n name=\"check\"\n [size]=\"13\"\n />\n }\n </span>\n }\n\n <span class=\"option-label\">\n {{ option.label }}\n </span>\n\n @if (!multiple() && isSelected(option)) {\n <ds-icon\n name=\"check\"\n class=\"icon\"\n [size]=\"14\"\n />\n }\n </div>\n }\n </li>\n }\n } @else {\n @for (option of filteredOptions(); track option.value; let i = $index) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- listbox option; activated via the combobox input + aria-activedescendant, options aren't individually focusable -->\n <li\n role=\"option\"\n [class]=\"optionClass(option)\"\n [id]=\"optionId(i)\"\n [class.is-active]=\"i === activeIndex()\"\n [attr.aria-selected]=\"isSelected(option)\"\n (click)=\"onPick(option)\"\n (mouseenter)=\"activeIndex.set(i)\"\n >\n @if (multiple()) {\n <span\n class=\"check-box\"\n [class.checked]=\"isSelected(option)\"\n >\n @if (isSelected(option)) {\n <ds-icon\n name=\"check\"\n [size]=\"13\"\n />\n }\n </span>\n }\n\n <span class=\"option-label\">\n {{ option.label }}\n </span>\n\n @if (!multiple() && isSelected(option)) {\n <ds-icon\n name=\"check\"\n class=\"icon\"\n [size]=\"14\"\n />\n }\n </li>\n }\n }\n\n @if (filteredOptions().length === 0 && !showCreateRow()) {\n <li\n class=\"empty t-s\"\n role=\"status\"\n >\n No matches\n </li>\n }\n\n @if (showCreateRow()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- listbox option; activated via the combobox input + aria-activedescendant, options aren't individually focusable -->\n <li\n class=\"option create-row\"\n role=\"option\"\n [id]=\"optionId(visibleOptions().length)\"\n [class.is-active]=\"activeIndex() === visibleOptions().length\"\n [attr.aria-selected]=\"false\"\n (click)=\"onCreateNew()\"\n (mouseenter)=\"activeIndex.set(visibleOptions().length)\"\n >\n <ds-icon\n name=\"plus\"\n class=\"create-icon\"\n [size]=\"16\"\n />\n\n <span class=\"option-label\">\n Create \u00AB{{ query().trim() }}\u00BB\n </span>\n </li>\n }\n </ul>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{--_autocomplete-focus-shadow: var(--ds-autocomplete-focus-shadow, var(--ds-field-focus-shadow));--_autocomplete-maxw: var(--ds-autocomplete-maxw, none);--_autocomplete-input-minw: var(--ds-autocomplete-input-minw, 80px);--_autocomplete-bg-color: var(--ds-autocomplete-bg-color, var(--surface-default));--_autocomplete-border-color: var(--ds-autocomplete-border-color, var(--border-default));--_autocomplete-radius: var(--ds-autocomplete-radius, var(--radius-md));--_autocomplete-border-color-focus: var(--ds-autocomplete-border-color-focus, var(--accent));display:flex;flex-direction:column;gap:var(--field-label-gap);width:100%;max-width:var(--_autocomplete-maxw);position:relative}:host(.content-width){--_autocomplete-maxw: var(--ds-autocomplete-maxw, 100%);width:fit-content}.autocomplete-trigger{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:var(--hit-cozy);padding:var(--space-1) var(--space-2);background:var(--_autocomplete-bg-color);border:var(--border-width-default) solid var(--_autocomplete-border-color);border-radius:var(--_autocomplete-radius);cursor:text;text-align:left;flex-wrap:wrap;transition:border-color var(--duration-fast) var(--ease-standard)}.autocomplete-trigger:hover:not(.disabled){border-color:var(--border-strong)}.autocomplete-trigger:focus-within:not(.disabled){border-color:var(--_autocomplete-border-color-focus);box-shadow:var(--_autocomplete-focus-shadow);outline:0}.autocomplete-trigger.error{border-color:var(--border-error)}.autocomplete-trigger.disabled{background:var(--surface-disabled);border-color:var(--border-disabled);color:var(--text-disabled);cursor:not-allowed}.autocomplete-trigger.disabled .autocomplete-input{cursor:not-allowed;color:var(--text-disabled)}.autocomplete-trigger.disabled .autocomplete-value,.autocomplete-trigger.disabled .autocomplete-chevron{color:var(--text-disabled)}.autocomplete-trigger.sm{min-height:var(--hit-min)}.autocomplete-trigger.lg{min-height:var(--field-h-lg)}.autocomplete-value{font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--text-primary)}.autocomplete-input{flex:1;min-width:var(--_autocomplete-input-minw);border:0;outline:0;background:transparent;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--text-primary)}.autocomplete-chevron{color:var(--icon-default);margin-left:auto}.autocomplete-list{--_autocomplete-panel-bg-color: var(--ds-autocomplete-panel-bg-color, var(--surface-overlay));--_autocomplete-option-bg-color-hover: var(--ds-autocomplete-option-bg-color-hover, var(--surface-secondary));width:100%;list-style:none;padding:0;background:var(--_autocomplete-panel-bg-color);border:var(--border-width-default) solid var(--border-default);border-radius:var(--radius-lg);box-shadow:var(--shadow-popover);margin:var(--combobox-offset) 0 0;max-height:var(--combobox-maxh);overflow-y:auto;z-index:var(--layer-popover)}.autocomplete-list .option{display:flex;width:100%;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-base) var(--font-sans);cursor:pointer;transition:background-color var(--duration-fast) var(--ease-standard)}.autocomplete-list .option:hover,.autocomplete-list .option.is-active,.autocomplete-list .option[aria-selected=true]{background:var(--_autocomplete-option-bg-color-hover)}.autocomplete-list .option .icon{color:var(--accent);margin-left:auto}.autocomplete-list .option.multi{padding-left:var(--space-2)}.autocomplete-list .option .option-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.autocomplete-list .option .check-box{flex:none;display:inline-flex;align-items:center;justify-content:center;width:var(--check-size);height:var(--check-size);border:var(--border-width-strong) solid var(--border-strong);border-radius:var(--radius-sm);color:var(--text-on-primary)}.autocomplete-list .option .check-box.checked{background-color:var(--accent);border-color:var(--accent)}.autocomplete-list .empty{padding:var(--space-3) var(--space-4);color:var(--text-tertiary);text-align:center}.autocomplete-list .autocomplete-optgroup{list-style:none;display:flex;flex-direction:column}.autocomplete-list .autocomplete-optgroup-label{display:block;padding:var(--space-2) var(--space-3) var(--space-1);font:var(--font-weight-semibold) var(--font-size-xs)/var(--line-height-flat) var(--font-sans);color:var(--text-tertiary);text-transform:uppercase;letter-spacing:var(--letter-spacing-wide)}.autocomplete-list .autocomplete-optgroup-label.is-first{padding-top:var(--space-1)}.autocomplete-list .create-row{color:var(--accent)}.autocomplete-list .create-row .create-icon{flex:0 0 auto}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "component", type: TagComponent, selector: "ds-tag", inputs: ["variant", "closable", "interactive", "selected", "closeLabel"], outputs: ["closed", "toggled"] }, { kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }] });
|
|
7926
|
+
], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "filterInput", first: true, predicate: ["filter"], descendants: true, isSignal: true }, { propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- click opens/focuses; keyboard runs through the inner <input role=\"combobox\"> (type/arrows/Enter/Esc) -->\n<div\n #trigger\n class=\"autocomplete-trigger\"\n [class]=\"size()\"\n [class.open]=\"isOpen()\"\n [class.disabled]=\"isDisabled()\"\n [class.error]=\"invalid()\"\n (click)=\"onTriggerClick()\"\n>\n @if (multiple()) {\n @for (selectedOption of selectedTags(); track selectedOption.value) {\n <ds-tag\n [closable]=\"true\"\n [closeLabel]=\"'Remove ' + selectedOption.label\"\n (closed)=\"remove(selectedOption.value)\"\n >\n {{ selectedOption.label }}\n </ds-tag>\n }\n } @else if (displayLabel()) {\n <span class=\"autocomplete-value\">\n {{ displayLabel() }}\n </span>\n }\n\n <input\n #filter\n type=\"text\"\n class=\"autocomplete-input\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-label]=\"ariaLabel() || placeholder()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [disabled]=\"isDisabled()\"\n [value]=\"query()\"\n [placeholder]=\"placeholderText()\"\n (input)=\"onFilter($event)\"\n (focus)=\"openPanel()\"\n (blur)=\"markTouched()\"\n (keydown)=\"onKeydown($event)\"\n />\n\n <ds-icon\n name=\"chevronDown\"\n class=\"autocomplete-chevron\"\n [size]=\"16\"\n (click)=\"togglePanel($event)\"\n />\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n/>\n\n<ng-template #panel>\n <ul\n class=\"autocomplete-list\"\n role=\"listbox\"\n [id]=\"listboxId\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n >\n @if (filteredGroups().length > 0) {\n @for (\n group of filteredGroups();\n track group.label;\n let groupIdx = $index\n ) {\n <li\n class=\"autocomplete-optgroup\"\n role=\"group\"\n [attr.aria-label]=\"group.label\"\n >\n <span\n class=\"autocomplete-optgroup-label\"\n [class.is-first]=\"groupIdx === 0\"\n >\n {{ group.label }}\n </span>\n\n @for (option of group.options; track option.value) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- listbox option; activated via the combobox input + aria-activedescendant, options aren't individually focusable -->\n <div\n role=\"option\"\n [class]=\"optionClass(option)\"\n [id]=\"optionId(flatIndexOf(option))\"\n [class.is-active]=\"flatIndexOf(option) === activeIndex()\"\n [attr.aria-selected]=\"isSelected(option)\"\n (click)=\"onPick(option)\"\n (mouseenter)=\"activeIndex.set(flatIndexOf(option))\"\n >\n @if (multiple()) {\n <span\n class=\"check-box\"\n [class.checked]=\"isSelected(option)\"\n >\n @if (isSelected(option)) {\n <ds-icon\n name=\"check\"\n [size]=\"13\"\n />\n }\n </span>\n }\n\n <span class=\"option-label\">\n {{ option.label }}\n </span>\n\n @if (!multiple() && isSelected(option)) {\n <ds-icon\n name=\"check\"\n class=\"icon\"\n [size]=\"14\"\n />\n }\n </div>\n }\n </li>\n }\n } @else {\n @for (option of filteredOptions(); track option.value; let i = $index) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- listbox option; activated via the combobox input + aria-activedescendant, options aren't individually focusable -->\n <li\n role=\"option\"\n [class]=\"optionClass(option)\"\n [id]=\"optionId(i)\"\n [class.is-active]=\"i === activeIndex()\"\n [attr.aria-selected]=\"isSelected(option)\"\n (click)=\"onPick(option)\"\n (mouseenter)=\"activeIndex.set(i)\"\n >\n @if (multiple()) {\n <span\n class=\"check-box\"\n [class.checked]=\"isSelected(option)\"\n >\n @if (isSelected(option)) {\n <ds-icon\n name=\"check\"\n [size]=\"13\"\n />\n }\n </span>\n }\n\n <span class=\"option-label\">\n {{ option.label }}\n </span>\n\n @if (!multiple() && isSelected(option)) {\n <ds-icon\n name=\"check\"\n class=\"icon\"\n [size]=\"14\"\n />\n }\n </li>\n }\n }\n\n @if (filteredOptions().length === 0 && !showCreateRow()) {\n <li\n class=\"empty t-s\"\n role=\"status\"\n >\n No matches\n </li>\n }\n\n @if (showCreateRow()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- listbox option; activated via the combobox input + aria-activedescendant, options aren't individually focusable -->\n <li\n class=\"option create-row\"\n role=\"option\"\n [id]=\"optionId(visibleOptions().length)\"\n [class.is-active]=\"activeIndex() === visibleOptions().length\"\n [attr.aria-selected]=\"false\"\n (click)=\"onCreateNew()\"\n (mouseenter)=\"activeIndex.set(visibleOptions().length)\"\n >\n <ds-icon\n name=\"plus\"\n class=\"create-icon\"\n [size]=\"16\"\n />\n\n <span class=\"option-label\">\n Create \u00AB{{ query().trim() }}\u00BB\n </span>\n </li>\n }\n </ul>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{--_autocomplete-focus-shadow: var(--ds-autocomplete-focus-shadow, var(--ds-field-focus-shadow));--_autocomplete-maxw: var(--ds-autocomplete-maxw, none);--_autocomplete-input-minw: var(--ds-autocomplete-input-minw, 80px);--_autocomplete-bg-color: var(--ds-autocomplete-bg-color, var(--surface-default));--_autocomplete-border-color: var(--ds-autocomplete-border-color, var(--border-default));--_autocomplete-radius: var(--ds-autocomplete-radius, var(--radius-md));--_autocomplete-border-color-focus: var(--ds-autocomplete-border-color-focus, var(--accent));display:flex;flex-direction:column;gap:var(--field-label-gap);width:100%;max-width:var(--_autocomplete-maxw);position:relative}:host(.content-width){--_autocomplete-maxw: var(--ds-autocomplete-maxw, 100%);width:fit-content}.autocomplete-trigger{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:var(--hit-cozy);padding:var(--space-1) var(--space-2);background:var(--_autocomplete-bg-color);border:var(--border-width-default) solid var(--_autocomplete-border-color);border-radius:var(--_autocomplete-radius);cursor:text;text-align:left;flex-wrap:wrap;transition:border-color var(--duration-fast) var(--ease-standard)}.autocomplete-trigger:hover:not(.disabled){border-color:var(--border-strong)}.autocomplete-trigger:focus-within:not(.disabled){border-color:var(--_autocomplete-border-color-focus);box-shadow:var(--_autocomplete-focus-shadow);outline:0}.autocomplete-trigger.error{border-color:var(--border-error)}.autocomplete-trigger.disabled{background:var(--surface-disabled);border-color:var(--border-disabled);color:var(--text-disabled);cursor:not-allowed}.autocomplete-trigger.disabled .autocomplete-input{cursor:not-allowed;color:var(--text-disabled)}.autocomplete-trigger.disabled .autocomplete-value,.autocomplete-trigger.disabled .autocomplete-chevron{color:var(--text-disabled)}.autocomplete-trigger.sm{min-height:var(--hit-min)}.autocomplete-trigger.lg{min-height:var(--field-h-lg)}.autocomplete-value{font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--text-primary)}.autocomplete-input{flex:1;min-width:var(--_autocomplete-input-minw);border:0;outline:0;background:transparent;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--text-primary)}.autocomplete-chevron{color:var(--icon-default);margin-left:auto}.autocomplete-list{--_autocomplete-panel-bg-color: var(--ds-autocomplete-panel-bg-color, var(--surface-overlay));--_autocomplete-option-bg-color-hover: var(--ds-autocomplete-option-bg-color-hover, var(--surface-secondary));width:100%;list-style:none;padding:0;background:var(--_autocomplete-panel-bg-color);border:var(--border-width-default) solid var(--border-default);border-radius:var(--radius-lg);box-shadow:var(--shadow-popover);margin:var(--combobox-offset) 0 0;max-height:var(--combobox-maxh);overflow-y:auto;z-index:var(--layer-popover)}.autocomplete-list .option{display:flex;width:100%;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-base) var(--font-sans);cursor:pointer;transition:background-color var(--duration-fast) var(--ease-standard)}.autocomplete-list .option:hover,.autocomplete-list .option.is-active,.autocomplete-list .option[aria-selected=true]{background:var(--_autocomplete-option-bg-color-hover)}.autocomplete-list .option .icon{color:var(--accent);margin-left:auto}.autocomplete-list .option.multi{padding-left:var(--space-2)}.autocomplete-list .option .option-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.autocomplete-list .option .check-box{flex:none;display:inline-flex;align-items:center;justify-content:center;width:var(--check-size);height:var(--check-size);border:var(--border-width-strong) solid var(--border-strong);border-radius:var(--radius-sm);color:var(--text-on-primary)}.autocomplete-list .option .check-box.checked{background-color:var(--accent);border-color:var(--accent)}.autocomplete-list .empty{padding:var(--space-3) var(--space-4);color:var(--text-tertiary);text-align:center}.autocomplete-list .autocomplete-optgroup{list-style:none;display:flex;flex-direction:column}.autocomplete-list .autocomplete-optgroup-label{display:block;padding:var(--space-2) var(--space-3) var(--space-1);font:var(--font-weight-semibold) var(--font-size-xs)/var(--line-height-flat) var(--font-sans);color:var(--text-tertiary);text-transform:uppercase;letter-spacing:var(--letter-spacing-wide)}.autocomplete-list .autocomplete-optgroup-label.is-first{padding-top:var(--space-1)}.autocomplete-list .create-row{color:var(--accent)}.autocomplete-list .create-row .create-icon{flex:0 0 auto}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "component", type: TagComponent, selector: "ds-tag", inputs: ["variant", "closable", "interactive", "selected", "closeLabel"], outputs: ["closed", "toggled"] }, { kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }] });
|
|
7573
7927
|
}
|
|
7574
7928
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: AutocompleteComponent, decorators: [{
|
|
7575
7929
|
type: Component,
|
|
@@ -7581,7 +7935,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
7581
7935
|
useExisting: forwardRef(() => AutocompleteComponent),
|
|
7582
7936
|
multi: true,
|
|
7583
7937
|
},
|
|
7584
|
-
], template: "<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- click opens/focuses; keyboard runs through the inner <input role=\"combobox\"> (type/arrows/Enter/Esc) -->\n<div\n #trigger\n class=\"autocomplete-trigger\"\n [class]=\"size()\"\n [class.open]=\"isOpen()\"\n [class.disabled]=\"isDisabled()\"\n [class.error]=\"invalid()\"\n (click)=\"onTriggerClick()\"\n>\n @if (multiple()) {\n @for (selectedOption of selectedTags(); track selectedOption.value) {\n <ds-tag\n [closable]=\"true\"\n [closeLabel]=\"'Remove ' + selectedOption.label\"\n (closed)=\"remove(selectedOption.value)\"\n >\n {{ selectedOption.label }}\n </ds-tag>\n }\n } @else if (displayLabel()) {\n <span class=\"autocomplete-value\">\n {{ displayLabel() }}\n </span>\n }\n\n <input\n #filter\n type=\"text\"\n class=\"autocomplete-input\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-label]=\"ariaLabel() || placeholder()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [disabled]=\"isDisabled()\"\n [value]=\"query()\"\n [placeholder]=\"placeholderText()\"\n (input)=\"onFilter($event)\"\n (focus)=\"openPanel()\"\n (blur)=\"markTouched()\"\n (keydown)=\"onKeydown($event)\"\n />\n\n <ds-icon\n name=\"chevronDown\"\n class=\"autocomplete-chevron\"\n [size]=\"16\"\n (click)=\"togglePanel($event)\"\n />\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessage()\"\n/>\n\n<ng-template #panel>\n <ul\n class=\"autocomplete-list\"\n role=\"listbox\"\n [id]=\"listboxId\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n >\n @if (filteredGroups().length > 0) {\n @for (\n group of filteredGroups();\n track group.label;\n let groupIdx = $index\n ) {\n <li\n class=\"autocomplete-optgroup\"\n role=\"group\"\n [attr.aria-label]=\"group.label\"\n >\n <span\n class=\"autocomplete-optgroup-label\"\n [class.is-first]=\"groupIdx === 0\"\n >\n {{ group.label }}\n </span>\n\n @for (option of group.options; track option.value) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- listbox option; activated via the combobox input + aria-activedescendant, options aren't individually focusable -->\n <div\n role=\"option\"\n [class]=\"optionClass(option)\"\n [id]=\"optionId(flatIndexOf(option))\"\n [class.is-active]=\"flatIndexOf(option) === activeIndex()\"\n [attr.aria-selected]=\"isSelected(option)\"\n (click)=\"onPick(option)\"\n (mouseenter)=\"activeIndex.set(flatIndexOf(option))\"\n >\n @if (multiple()) {\n <span\n class=\"check-box\"\n [class.checked]=\"isSelected(option)\"\n >\n @if (isSelected(option)) {\n <ds-icon\n name=\"check\"\n [size]=\"13\"\n />\n }\n </span>\n }\n\n <span class=\"option-label\">\n {{ option.label }}\n </span>\n\n @if (!multiple() && isSelected(option)) {\n <ds-icon\n name=\"check\"\n class=\"icon\"\n [size]=\"14\"\n />\n }\n </div>\n }\n </li>\n }\n } @else {\n @for (option of filteredOptions(); track option.value; let i = $index) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- listbox option; activated via the combobox input + aria-activedescendant, options aren't individually focusable -->\n <li\n role=\"option\"\n [class]=\"optionClass(option)\"\n [id]=\"optionId(i)\"\n [class.is-active]=\"i === activeIndex()\"\n [attr.aria-selected]=\"isSelected(option)\"\n (click)=\"onPick(option)\"\n (mouseenter)=\"activeIndex.set(i)\"\n >\n @if (multiple()) {\n <span\n class=\"check-box\"\n [class.checked]=\"isSelected(option)\"\n >\n @if (isSelected(option)) {\n <ds-icon\n name=\"check\"\n [size]=\"13\"\n />\n }\n </span>\n }\n\n <span class=\"option-label\">\n {{ option.label }}\n </span>\n\n @if (!multiple() && isSelected(option)) {\n <ds-icon\n name=\"check\"\n class=\"icon\"\n [size]=\"14\"\n />\n }\n </li>\n }\n }\n\n @if (filteredOptions().length === 0 && !showCreateRow()) {\n <li\n class=\"empty t-s\"\n role=\"status\"\n >\n No matches\n </li>\n }\n\n @if (showCreateRow()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- listbox option; activated via the combobox input + aria-activedescendant, options aren't individually focusable -->\n <li\n class=\"option create-row\"\n role=\"option\"\n [id]=\"optionId(visibleOptions().length)\"\n [class.is-active]=\"activeIndex() === visibleOptions().length\"\n [attr.aria-selected]=\"false\"\n (click)=\"onCreateNew()\"\n (mouseenter)=\"activeIndex.set(visibleOptions().length)\"\n >\n <ds-icon\n name=\"plus\"\n class=\"create-icon\"\n [size]=\"16\"\n />\n\n <span class=\"option-label\">\n Create \u00AB{{ query().trim() }}\u00BB\n </span>\n </li>\n }\n </ul>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{--_autocomplete-focus-shadow: var(--ds-autocomplete-focus-shadow, var(--ds-field-focus-shadow));--_autocomplete-maxw: var(--ds-autocomplete-maxw, none);--_autocomplete-input-minw: var(--ds-autocomplete-input-minw, 80px);--_autocomplete-bg-color: var(--ds-autocomplete-bg-color, var(--surface-default));--_autocomplete-border-color: var(--ds-autocomplete-border-color, var(--border-default));--_autocomplete-radius: var(--ds-autocomplete-radius, var(--radius-md));--_autocomplete-border-color-focus: var(--ds-autocomplete-border-color-focus, var(--accent));display:flex;flex-direction:column;gap:var(--field-label-gap);width:100%;max-width:var(--_autocomplete-maxw);position:relative}:host(.content-width){--_autocomplete-maxw: var(--ds-autocomplete-maxw, 100%);width:fit-content}.autocomplete-trigger{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:var(--hit-cozy);padding:var(--space-1) var(--space-2);background:var(--_autocomplete-bg-color);border:var(--border-width-default) solid var(--_autocomplete-border-color);border-radius:var(--_autocomplete-radius);cursor:text;text-align:left;flex-wrap:wrap;transition:border-color var(--duration-fast) var(--ease-standard)}.autocomplete-trigger:hover:not(.disabled){border-color:var(--border-strong)}.autocomplete-trigger:focus-within:not(.disabled){border-color:var(--_autocomplete-border-color-focus);box-shadow:var(--_autocomplete-focus-shadow);outline:0}.autocomplete-trigger.error{border-color:var(--border-error)}.autocomplete-trigger.disabled{background:var(--surface-disabled);border-color:var(--border-disabled);color:var(--text-disabled);cursor:not-allowed}.autocomplete-trigger.disabled .autocomplete-input{cursor:not-allowed;color:var(--text-disabled)}.autocomplete-trigger.disabled .autocomplete-value,.autocomplete-trigger.disabled .autocomplete-chevron{color:var(--text-disabled)}.autocomplete-trigger.sm{min-height:var(--hit-min)}.autocomplete-trigger.lg{min-height:var(--field-h-lg)}.autocomplete-value{font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--text-primary)}.autocomplete-input{flex:1;min-width:var(--_autocomplete-input-minw);border:0;outline:0;background:transparent;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--text-primary)}.autocomplete-chevron{color:var(--icon-default);margin-left:auto}.autocomplete-list{--_autocomplete-panel-bg-color: var(--ds-autocomplete-panel-bg-color, var(--surface-overlay));--_autocomplete-option-bg-color-hover: var(--ds-autocomplete-option-bg-color-hover, var(--surface-secondary));width:100%;list-style:none;padding:0;background:var(--_autocomplete-panel-bg-color);border:var(--border-width-default) solid var(--border-default);border-radius:var(--radius-lg);box-shadow:var(--shadow-popover);margin:var(--combobox-offset) 0 0;max-height:var(--combobox-maxh);overflow-y:auto;z-index:var(--layer-popover)}.autocomplete-list .option{display:flex;width:100%;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-base) var(--font-sans);cursor:pointer;transition:background-color var(--duration-fast) var(--ease-standard)}.autocomplete-list .option:hover,.autocomplete-list .option.is-active,.autocomplete-list .option[aria-selected=true]{background:var(--_autocomplete-option-bg-color-hover)}.autocomplete-list .option .icon{color:var(--accent);margin-left:auto}.autocomplete-list .option.multi{padding-left:var(--space-2)}.autocomplete-list .option .option-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.autocomplete-list .option .check-box{flex:none;display:inline-flex;align-items:center;justify-content:center;width:var(--check-size);height:var(--check-size);border:var(--border-width-strong) solid var(--border-strong);border-radius:var(--radius-sm);color:var(--text-on-primary)}.autocomplete-list .option .check-box.checked{background-color:var(--accent);border-color:var(--accent)}.autocomplete-list .empty{padding:var(--space-3) var(--space-4);color:var(--text-tertiary);text-align:center}.autocomplete-list .autocomplete-optgroup{list-style:none;display:flex;flex-direction:column}.autocomplete-list .autocomplete-optgroup-label{display:block;padding:var(--space-2) var(--space-3) var(--space-1);font:var(--font-weight-semibold) var(--font-size-xs)/var(--line-height-flat) var(--font-sans);color:var(--text-tertiary);text-transform:uppercase;letter-spacing:var(--letter-spacing-wide)}.autocomplete-list .autocomplete-optgroup-label.is-first{padding-top:var(--space-1)}.autocomplete-list .create-row{color:var(--accent)}.autocomplete-list .create-row .create-icon{flex:0 0 auto}\n"] }]
|
|
7938
|
+
], template: "<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- click opens/focuses; keyboard runs through the inner <input role=\"combobox\"> (type/arrows/Enter/Esc) -->\n<div\n #trigger\n class=\"autocomplete-trigger\"\n [class]=\"size()\"\n [class.open]=\"isOpen()\"\n [class.disabled]=\"isDisabled()\"\n [class.error]=\"invalid()\"\n (click)=\"onTriggerClick()\"\n>\n @if (multiple()) {\n @for (selectedOption of selectedTags(); track selectedOption.value) {\n <ds-tag\n [closable]=\"true\"\n [closeLabel]=\"'Remove ' + selectedOption.label\"\n (closed)=\"remove(selectedOption.value)\"\n >\n {{ selectedOption.label }}\n </ds-tag>\n }\n } @else if (displayLabel()) {\n <span class=\"autocomplete-value\">\n {{ displayLabel() }}\n </span>\n }\n\n <input\n #filter\n type=\"text\"\n class=\"autocomplete-input\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-label]=\"ariaLabel() || placeholder()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [disabled]=\"isDisabled()\"\n [value]=\"query()\"\n [placeholder]=\"placeholderText()\"\n (input)=\"onFilter($event)\"\n (focus)=\"openPanel()\"\n (blur)=\"markTouched()\"\n (keydown)=\"onKeydown($event)\"\n />\n\n <ds-icon\n name=\"chevronDown\"\n class=\"autocomplete-chevron\"\n [size]=\"16\"\n (click)=\"togglePanel($event)\"\n />\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n/>\n\n<ng-template #panel>\n <ul\n class=\"autocomplete-list\"\n role=\"listbox\"\n [id]=\"listboxId\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\"\n >\n @if (filteredGroups().length > 0) {\n @for (\n group of filteredGroups();\n track group.label;\n let groupIdx = $index\n ) {\n <li\n class=\"autocomplete-optgroup\"\n role=\"group\"\n [attr.aria-label]=\"group.label\"\n >\n <span\n class=\"autocomplete-optgroup-label\"\n [class.is-first]=\"groupIdx === 0\"\n >\n {{ group.label }}\n </span>\n\n @for (option of group.options; track option.value) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- listbox option; activated via the combobox input + aria-activedescendant, options aren't individually focusable -->\n <div\n role=\"option\"\n [class]=\"optionClass(option)\"\n [id]=\"optionId(flatIndexOf(option))\"\n [class.is-active]=\"flatIndexOf(option) === activeIndex()\"\n [attr.aria-selected]=\"isSelected(option)\"\n (click)=\"onPick(option)\"\n (mouseenter)=\"activeIndex.set(flatIndexOf(option))\"\n >\n @if (multiple()) {\n <span\n class=\"check-box\"\n [class.checked]=\"isSelected(option)\"\n >\n @if (isSelected(option)) {\n <ds-icon\n name=\"check\"\n [size]=\"13\"\n />\n }\n </span>\n }\n\n <span class=\"option-label\">\n {{ option.label }}\n </span>\n\n @if (!multiple() && isSelected(option)) {\n <ds-icon\n name=\"check\"\n class=\"icon\"\n [size]=\"14\"\n />\n }\n </div>\n }\n </li>\n }\n } @else {\n @for (option of filteredOptions(); track option.value; let i = $index) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- listbox option; activated via the combobox input + aria-activedescendant, options aren't individually focusable -->\n <li\n role=\"option\"\n [class]=\"optionClass(option)\"\n [id]=\"optionId(i)\"\n [class.is-active]=\"i === activeIndex()\"\n [attr.aria-selected]=\"isSelected(option)\"\n (click)=\"onPick(option)\"\n (mouseenter)=\"activeIndex.set(i)\"\n >\n @if (multiple()) {\n <span\n class=\"check-box\"\n [class.checked]=\"isSelected(option)\"\n >\n @if (isSelected(option)) {\n <ds-icon\n name=\"check\"\n [size]=\"13\"\n />\n }\n </span>\n }\n\n <span class=\"option-label\">\n {{ option.label }}\n </span>\n\n @if (!multiple() && isSelected(option)) {\n <ds-icon\n name=\"check\"\n class=\"icon\"\n [size]=\"14\"\n />\n }\n </li>\n }\n }\n\n @if (filteredOptions().length === 0 && !showCreateRow()) {\n <li\n class=\"empty t-s\"\n role=\"status\"\n >\n No matches\n </li>\n }\n\n @if (showCreateRow()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- listbox option; activated via the combobox input + aria-activedescendant, options aren't individually focusable -->\n <li\n class=\"option create-row\"\n role=\"option\"\n [id]=\"optionId(visibleOptions().length)\"\n [class.is-active]=\"activeIndex() === visibleOptions().length\"\n [attr.aria-selected]=\"false\"\n (click)=\"onCreateNew()\"\n (mouseenter)=\"activeIndex.set(visibleOptions().length)\"\n >\n <ds-icon\n name=\"plus\"\n class=\"create-icon\"\n [size]=\"16\"\n />\n\n <span class=\"option-label\">\n Create \u00AB{{ query().trim() }}\u00BB\n </span>\n </li>\n }\n </ul>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{--_autocomplete-focus-shadow: var(--ds-autocomplete-focus-shadow, var(--ds-field-focus-shadow));--_autocomplete-maxw: var(--ds-autocomplete-maxw, none);--_autocomplete-input-minw: var(--ds-autocomplete-input-minw, 80px);--_autocomplete-bg-color: var(--ds-autocomplete-bg-color, var(--surface-default));--_autocomplete-border-color: var(--ds-autocomplete-border-color, var(--border-default));--_autocomplete-radius: var(--ds-autocomplete-radius, var(--radius-md));--_autocomplete-border-color-focus: var(--ds-autocomplete-border-color-focus, var(--accent));display:flex;flex-direction:column;gap:var(--field-label-gap);width:100%;max-width:var(--_autocomplete-maxw);position:relative}:host(.content-width){--_autocomplete-maxw: var(--ds-autocomplete-maxw, 100%);width:fit-content}.autocomplete-trigger{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:var(--hit-cozy);padding:var(--space-1) var(--space-2);background:var(--_autocomplete-bg-color);border:var(--border-width-default) solid var(--_autocomplete-border-color);border-radius:var(--_autocomplete-radius);cursor:text;text-align:left;flex-wrap:wrap;transition:border-color var(--duration-fast) var(--ease-standard)}.autocomplete-trigger:hover:not(.disabled){border-color:var(--border-strong)}.autocomplete-trigger:focus-within:not(.disabled){border-color:var(--_autocomplete-border-color-focus);box-shadow:var(--_autocomplete-focus-shadow);outline:0}.autocomplete-trigger.error{border-color:var(--border-error)}.autocomplete-trigger.disabled{background:var(--surface-disabled);border-color:var(--border-disabled);color:var(--text-disabled);cursor:not-allowed}.autocomplete-trigger.disabled .autocomplete-input{cursor:not-allowed;color:var(--text-disabled)}.autocomplete-trigger.disabled .autocomplete-value,.autocomplete-trigger.disabled .autocomplete-chevron{color:var(--text-disabled)}.autocomplete-trigger.sm{min-height:var(--hit-min)}.autocomplete-trigger.lg{min-height:var(--field-h-lg)}.autocomplete-value{font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--text-primary)}.autocomplete-input{flex:1;min-width:var(--_autocomplete-input-minw);border:0;outline:0;background:transparent;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--text-primary)}.autocomplete-chevron{color:var(--icon-default);margin-left:auto}.autocomplete-list{--_autocomplete-panel-bg-color: var(--ds-autocomplete-panel-bg-color, var(--surface-overlay));--_autocomplete-option-bg-color-hover: var(--ds-autocomplete-option-bg-color-hover, var(--surface-secondary));width:100%;list-style:none;padding:0;background:var(--_autocomplete-panel-bg-color);border:var(--border-width-default) solid var(--border-default);border-radius:var(--radius-lg);box-shadow:var(--shadow-popover);margin:var(--combobox-offset) 0 0;max-height:var(--combobox-maxh);overflow-y:auto;z-index:var(--layer-popover)}.autocomplete-list .option{display:flex;width:100%;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-base) var(--font-sans);cursor:pointer;transition:background-color var(--duration-fast) var(--ease-standard)}.autocomplete-list .option:hover,.autocomplete-list .option.is-active,.autocomplete-list .option[aria-selected=true]{background:var(--_autocomplete-option-bg-color-hover)}.autocomplete-list .option .icon{color:var(--accent);margin-left:auto}.autocomplete-list .option.multi{padding-left:var(--space-2)}.autocomplete-list .option .option-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.autocomplete-list .option .check-box{flex:none;display:inline-flex;align-items:center;justify-content:center;width:var(--check-size);height:var(--check-size);border:var(--border-width-strong) solid var(--border-strong);border-radius:var(--radius-sm);color:var(--text-on-primary)}.autocomplete-list .option .check-box.checked{background-color:var(--accent);border-color:var(--accent)}.autocomplete-list .empty{padding:var(--space-3) var(--space-4);color:var(--text-tertiary);text-align:center}.autocomplete-list .autocomplete-optgroup{list-style:none;display:flex;flex-direction:column}.autocomplete-list .autocomplete-optgroup-label{display:block;padding:var(--space-2) var(--space-3) var(--space-1);font:var(--font-weight-semibold) var(--font-size-xs)/var(--line-height-flat) var(--font-sans);color:var(--text-tertiary);text-transform:uppercase;letter-spacing:var(--letter-spacing-wide)}.autocomplete-list .autocomplete-optgroup-label.is-first{padding-top:var(--space-1)}.autocomplete-list .create-row{color:var(--accent)}.autocomplete-list .create-row .create-icon{flex:0 0 auto}\n"] }]
|
|
7585
7939
|
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionGroups: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroups", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", 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 }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], reserveMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveMessage", required: false }] }], allowCreate: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowCreate", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], create: [{ type: i0.Output, args: ["create"] }], trigger: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], filterInput: [{ type: i0.ViewChild, args: ['filter', { isSignal: true }] }], panelTpl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
|
|
7586
7940
|
|
|
7587
7941
|
class DividerComponent {
|
|
@@ -7915,9 +8269,11 @@ class OtpInputComponent extends DsControlValueAccessor {
|
|
|
7915
8269
|
/** Helper text shown below the cells. */
|
|
7916
8270
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
7917
8271
|
/** Reserve the message-row height even when empty, so the field doesn't shift
|
|
7918
|
-
* the layout below it when a hint/error appears.
|
|
7919
|
-
*
|
|
7920
|
-
|
|
8272
|
+
* the layout below it when a hint/error appears. Falls back to
|
|
8273
|
+
* `DS_CONFIG.field.reserveMessage`, then off — opt in per field, or app-wide
|
|
8274
|
+
* for a form that shows validation messages. */
|
|
8275
|
+
reserveMessage = input(null, { ...(ngDevMode ? { debugName: "reserveMessage" } : /* istanbul ignore next */ {}), transform: (value) => (value == null ? null : booleanAttribute(value)) });
|
|
8276
|
+
reserveMessageResolved = resolveReserveMessage(this.reserveMessage);
|
|
7921
8277
|
/** Accessible group label for the cell row. */
|
|
7922
8278
|
ariaLabel = input('Verification code', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
7923
8279
|
/** Fires once, with the full code, on the partial → complete transition. */
|
|
@@ -8049,7 +8405,7 @@ class OtpInputComponent extends DsControlValueAccessor {
|
|
|
8049
8405
|
useExisting: forwardRef(() => OtpInputComponent),
|
|
8050
8406
|
multi: true,
|
|
8051
8407
|
},
|
|
8052
|
-
], viewQueries: [{ propertyName: "boxes", predicate: ["box"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"cells\">\n @for (cell of cells(); track $index; let i = $index) {\n <input\n #box\n class=\"cell\"\n [type]=\"mask() ? 'password' : 'text'\"\n [attr.inputmode]=\"mode() === 'numeric' ? 'numeric' : 'text'\"\n [attr.autocomplete]=\"i === 0 ? 'one-time-code' : 'off'\"\n [attr.aria-label]=\"cellLabel(i)\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [value]=\"cell\"\n [disabled]=\"isDisabled()\"\n (input)=\"onInput($event, i)\"\n (keydown)=\"onKeydown($event, i)\"\n (paste)=\"onPaste($event, i)\"\n (focus)=\"onFocus($event, i)\"\n (blur)=\"onBlur()\"\n />\n }\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"
|
|
8408
|
+
], viewQueries: [{ propertyName: "boxes", predicate: ["box"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"cells\">\n @for (cell of cells(); track $index; let i = $index) {\n <input\n #box\n class=\"cell\"\n [type]=\"mask() ? 'password' : 'text'\"\n [attr.inputmode]=\"mode() === 'numeric' ? 'numeric' : 'text'\"\n [attr.autocomplete]=\"i === 0 ? 'one-time-code' : 'off'\"\n [attr.aria-label]=\"cellLabel(i)\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [value]=\"cell\"\n [disabled]=\"isDisabled()\"\n (input)=\"onInput($event, i)\"\n (keydown)=\"onKeydown($event, i)\"\n (paste)=\"onPaste($event, i)\"\n (focus)=\"onFocus($event, i)\"\n (blur)=\"onBlur()\"\n />\n }\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n/>\n", styles: [":host{--_otp-cell-w: var(--ds-otp-cell-w, var(--otp-cell-w));--_otp-cell-h: var(--ds-otp-cell-h, var(--otp-cell-h));--_otp-gap: var(--ds-otp-gap, var(--otp-gap));--_otp-cell-bg-color: var(--ds-otp-cell-bg-color, var(--surface-default));--_otp-cell-border-color: var(--ds-otp-cell-border-color, var(--border-default));--_otp-cell-border-color-focus: var(--ds-otp-cell-border-color-focus, var(--accent));display:inline-flex;flex-direction:column;gap:var(--field-label-gap)}.cells{display:flex;gap:var(--_otp-gap)}.cell{width:var(--_otp-cell-w);height:var(--_otp-cell-h);padding:0;text-align:center;font:var(--font-weight-bold) var(--font-size-h4)/var(--line-height-flat) var(--font-sans);color:var(--text-primary);background-color:var(--_otp-cell-bg-color);border:var(--border-width-default) solid var(--_otp-cell-border-color);border-radius:var(--radius-md);caret-color:var(--accent);transition:border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard)}.cell:focus{outline:none;border-color:var(--_otp-cell-border-color-focus);box-shadow:var(--accent-focus-field)}.cell:disabled{background-color:var(--surface-muted);color:var(--text-disabled);cursor:not-allowed}:host(.invalid) .cell{border-color:var(--error)}:host(.invalid) .cell:focus{box-shadow:var(--focus-field-error)}\n"], dependencies: [{ kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }] });
|
|
8053
8409
|
}
|
|
8054
8410
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: OtpInputComponent, decorators: [{
|
|
8055
8411
|
type: Component,
|
|
@@ -8064,7 +8420,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
8064
8420
|
'[attr.aria-label]': 'ariaLabel()',
|
|
8065
8421
|
'[class.invalid]': 'invalid()',
|
|
8066
8422
|
'[attr.aria-describedby]': 'hintId()',
|
|
8067
|
-
}, template: "<div class=\"cells\">\n @for (cell of cells(); track $index; let i = $index) {\n <input\n #box\n class=\"cell\"\n [type]=\"mask() ? 'password' : 'text'\"\n [attr.inputmode]=\"mode() === 'numeric' ? 'numeric' : 'text'\"\n [attr.autocomplete]=\"i === 0 ? 'one-time-code' : 'off'\"\n [attr.aria-label]=\"cellLabel(i)\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [value]=\"cell\"\n [disabled]=\"isDisabled()\"\n (input)=\"onInput($event, i)\"\n (keydown)=\"onKeydown($event, i)\"\n (paste)=\"onPaste($event, i)\"\n (focus)=\"onFocus($event, i)\"\n (blur)=\"onBlur()\"\n />\n }\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"
|
|
8423
|
+
}, template: "<div class=\"cells\">\n @for (cell of cells(); track $index; let i = $index) {\n <input\n #box\n class=\"cell\"\n [type]=\"mask() ? 'password' : 'text'\"\n [attr.inputmode]=\"mode() === 'numeric' ? 'numeric' : 'text'\"\n [attr.autocomplete]=\"i === 0 ? 'one-time-code' : 'off'\"\n [attr.aria-label]=\"cellLabel(i)\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [value]=\"cell\"\n [disabled]=\"isDisabled()\"\n (input)=\"onInput($event, i)\"\n (keydown)=\"onKeydown($event, i)\"\n (paste)=\"onPaste($event, i)\"\n (focus)=\"onFocus($event, i)\"\n (blur)=\"onBlur()\"\n />\n }\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n/>\n", styles: [":host{--_otp-cell-w: var(--ds-otp-cell-w, var(--otp-cell-w));--_otp-cell-h: var(--ds-otp-cell-h, var(--otp-cell-h));--_otp-gap: var(--ds-otp-gap, var(--otp-gap));--_otp-cell-bg-color: var(--ds-otp-cell-bg-color, var(--surface-default));--_otp-cell-border-color: var(--ds-otp-cell-border-color, var(--border-default));--_otp-cell-border-color-focus: var(--ds-otp-cell-border-color-focus, var(--accent));display:inline-flex;flex-direction:column;gap:var(--field-label-gap)}.cells{display:flex;gap:var(--_otp-gap)}.cell{width:var(--_otp-cell-w);height:var(--_otp-cell-h);padding:0;text-align:center;font:var(--font-weight-bold) var(--font-size-h4)/var(--line-height-flat) var(--font-sans);color:var(--text-primary);background-color:var(--_otp-cell-bg-color);border:var(--border-width-default) solid var(--_otp-cell-border-color);border-radius:var(--radius-md);caret-color:var(--accent);transition:border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard)}.cell:focus{outline:none;border-color:var(--_otp-cell-border-color-focus);box-shadow:var(--accent-focus-field)}.cell:disabled{background-color:var(--surface-muted);color:var(--text-disabled);cursor:not-allowed}:host(.invalid) .cell{border-color:var(--error)}:host(.invalid) .cell:focus{box-shadow:var(--focus-field-error)}\n"] }]
|
|
8068
8424
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], length: [{ type: i0.Input, args: [{ isSignal: true, alias: "length", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], mask: [{ type: i0.Input, args: [{ isSignal: true, alias: "mask", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], reserveMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveMessage", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], completed: [{ type: i0.Output, args: ["completed"] }], boxes: [{ type: i0.ViewChildren, args: ['box', { isSignal: true }] }] } });
|
|
8069
8425
|
|
|
8070
8426
|
class SliderComponent extends DsControlValueAccessor {
|
|
@@ -8087,9 +8443,11 @@ class SliderComponent extends DsControlValueAccessor {
|
|
|
8087
8443
|
/** Helper text shown below the slider. */
|
|
8088
8444
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
8089
8445
|
/** Reserve the message-row height even when empty, so the field doesn't shift
|
|
8090
|
-
* the layout below it when a hint/error appears.
|
|
8091
|
-
*
|
|
8092
|
-
|
|
8446
|
+
* the layout below it when a hint/error appears. Falls back to
|
|
8447
|
+
* `DS_CONFIG.field.reserveMessage`, then off — opt in per field, or app-wide
|
|
8448
|
+
* for a form that shows validation messages. */
|
|
8449
|
+
reserveMessage = input(null, { ...(ngDevMode ? { debugName: "reserveMessage" } : /* istanbul ignore next */ {}), transform: (value) => (value == null ? null : booleanAttribute(value)) });
|
|
8450
|
+
reserveMessageResolved = resolveReserveMessage(this.reserveMessage);
|
|
8093
8451
|
track = viewChild.required('track');
|
|
8094
8452
|
dragging = -1;
|
|
8095
8453
|
uid = nextControlId('ds-slider');
|
|
@@ -8240,7 +8598,7 @@ class SliderComponent extends DsControlValueAccessor {
|
|
|
8240
8598
|
useExisting: forwardRef(() => SliderComponent),
|
|
8241
8599
|
multi: true,
|
|
8242
8600
|
},
|
|
8243
|
-
], viewQueries: [{ propertyName: "track", first: true, predicate: ["track"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n #track\n class=\"track\"\n (pointerdown)=\"onTrackPointerDown($event)\"\n (pointermove)=\"onTrackPointerMove($event)\"\n (pointerup)=\"onTrackPointerUp($event)\"\n (pointercancel)=\"onTrackPointerUp($event)\"\n>\n <span\n class=\"fill\"\n [style.left.%]=\"fill().left\"\n [style.width.%]=\"fill().width\"\n >\n </span>\n\n @for (thumbValue of thumbValues(); track $index; let i = $index) {\n <span\n class=\"thumb\"\n role=\"slider\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [style.left.%]=\"percent(thumbValue)\"\n [attr.aria-valuemin]=\"thumbMin(i)\"\n [attr.aria-valuemax]=\"thumbMax(i)\"\n [attr.aria-valuenow]=\"thumbValue\"\n [attr.aria-orientation]=\"'horizontal'\"\n [attr.aria-label]=\"thumbAriaLabel(i)\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n (keydown)=\"onThumbKeydown($event, i)\"\n >\n </span>\n }\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"
|
|
8601
|
+
], viewQueries: [{ propertyName: "track", first: true, predicate: ["track"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n #track\n class=\"track\"\n (pointerdown)=\"onTrackPointerDown($event)\"\n (pointermove)=\"onTrackPointerMove($event)\"\n (pointerup)=\"onTrackPointerUp($event)\"\n (pointercancel)=\"onTrackPointerUp($event)\"\n>\n <span\n class=\"fill\"\n [style.left.%]=\"fill().left\"\n [style.width.%]=\"fill().width\"\n >\n </span>\n\n @for (thumbValue of thumbValues(); track $index; let i = $index) {\n <span\n class=\"thumb\"\n role=\"slider\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [style.left.%]=\"percent(thumbValue)\"\n [attr.aria-valuemin]=\"thumbMin(i)\"\n [attr.aria-valuemax]=\"thumbMax(i)\"\n [attr.aria-valuenow]=\"thumbValue\"\n [attr.aria-orientation]=\"'horizontal'\"\n [attr.aria-label]=\"thumbAriaLabel(i)\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n (keydown)=\"onThumbKeydown($event, i)\"\n >\n </span>\n }\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n/>\n", styles: [":host{--_slider-track-h: var(--ds-slider-track-h, var(--slider-track-h));--_slider-thumb-size: var(--ds-slider-thumb-size, var(--slider-thumb-size));--_slider-thumb-bw: var(--ds-slider-thumb-bw, var(--slider-thumb-bw));--_slider-fill-color: var(--ds-slider-fill-color, var(--accent));--_slider-track-color: var(--ds-slider-track-color, var(--surface-muted));--_slider-thumb-color: var(--ds-slider-thumb-color, var(--surface-default));--_slider-thumb-border-color: var(--ds-slider-thumb-border-color, var(--accent));display:flex;flex-direction:column;padding-block:calc((var(--_slider-thumb-size) - var(--_slider-track-h)) / 2);gap:calc((var(--_slider-thumb-size) - var(--_slider-track-h)) / 2 + var(--space-1-5))}.track{position:relative;height:var(--_slider-track-h);background-color:var(--_slider-track-color);border-radius:var(--radius-pill);cursor:pointer;touch-action:none}.fill{position:absolute;top:0;height:100%;background-color:var(--_slider-fill-color);border-radius:var(--radius-pill)}.thumb{position:absolute;top:50%;transform:translate(-50%,-50%);width:var(--_slider-thumb-size);height:var(--_slider-thumb-size);border-radius:var(--radius-pill);background-color:var(--_slider-thumb-color);border:var(--_slider-thumb-bw) solid var(--_slider-thumb-border-color);box-shadow:var(--shadow-card);cursor:grab;touch-action:none}.thumb:focus-visible{outline:none;box-shadow:var(--accent-focus-ring)}.thumb:active{cursor:grabbing}:host(.disabled) .track{cursor:not-allowed}:host(.disabled) .fill{background-color:var(--border-strong)}:host(.disabled) .thumb{border-color:var(--border-strong);cursor:not-allowed}:host(.invalid) .fill{background-color:var(--error)}:host(.invalid) .thumb{border-color:var(--error)}\n"], dependencies: [{ kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }] });
|
|
8244
8602
|
}
|
|
8245
8603
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SliderComponent, decorators: [{
|
|
8246
8604
|
type: Component,
|
|
@@ -8254,7 +8612,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
8254
8612
|
'[class.range]': 'range()',
|
|
8255
8613
|
'[class.disabled]': 'isDisabled()',
|
|
8256
8614
|
'[class.invalid]': 'invalid()',
|
|
8257
|
-
}, template: "<div\n #track\n class=\"track\"\n (pointerdown)=\"onTrackPointerDown($event)\"\n (pointermove)=\"onTrackPointerMove($event)\"\n (pointerup)=\"onTrackPointerUp($event)\"\n (pointercancel)=\"onTrackPointerUp($event)\"\n>\n <span\n class=\"fill\"\n [style.left.%]=\"fill().left\"\n [style.width.%]=\"fill().width\"\n >\n </span>\n\n @for (thumbValue of thumbValues(); track $index; let i = $index) {\n <span\n class=\"thumb\"\n role=\"slider\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [style.left.%]=\"percent(thumbValue)\"\n [attr.aria-valuemin]=\"thumbMin(i)\"\n [attr.aria-valuemax]=\"thumbMax(i)\"\n [attr.aria-valuenow]=\"thumbValue\"\n [attr.aria-orientation]=\"'horizontal'\"\n [attr.aria-label]=\"thumbAriaLabel(i)\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n (keydown)=\"onThumbKeydown($event, i)\"\n >\n </span>\n }\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"
|
|
8615
|
+
}, template: "<div\n #track\n class=\"track\"\n (pointerdown)=\"onTrackPointerDown($event)\"\n (pointermove)=\"onTrackPointerMove($event)\"\n (pointerup)=\"onTrackPointerUp($event)\"\n (pointercancel)=\"onTrackPointerUp($event)\"\n>\n <span\n class=\"fill\"\n [style.left.%]=\"fill().left\"\n [style.width.%]=\"fill().width\"\n >\n </span>\n\n @for (thumbValue of thumbValues(); track $index; let i = $index) {\n <span\n class=\"thumb\"\n role=\"slider\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [style.left.%]=\"percent(thumbValue)\"\n [attr.aria-valuemin]=\"thumbMin(i)\"\n [attr.aria-valuemax]=\"thumbMax(i)\"\n [attr.aria-valuenow]=\"thumbValue\"\n [attr.aria-orientation]=\"'horizontal'\"\n [attr.aria-label]=\"thumbAriaLabel(i)\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n (keydown)=\"onThumbKeydown($event, i)\"\n >\n </span>\n }\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n/>\n", styles: [":host{--_slider-track-h: var(--ds-slider-track-h, var(--slider-track-h));--_slider-thumb-size: var(--ds-slider-thumb-size, var(--slider-thumb-size));--_slider-thumb-bw: var(--ds-slider-thumb-bw, var(--slider-thumb-bw));--_slider-fill-color: var(--ds-slider-fill-color, var(--accent));--_slider-track-color: var(--ds-slider-track-color, var(--surface-muted));--_slider-thumb-color: var(--ds-slider-thumb-color, var(--surface-default));--_slider-thumb-border-color: var(--ds-slider-thumb-border-color, var(--accent));display:flex;flex-direction:column;padding-block:calc((var(--_slider-thumb-size) - var(--_slider-track-h)) / 2);gap:calc((var(--_slider-thumb-size) - var(--_slider-track-h)) / 2 + var(--space-1-5))}.track{position:relative;height:var(--_slider-track-h);background-color:var(--_slider-track-color);border-radius:var(--radius-pill);cursor:pointer;touch-action:none}.fill{position:absolute;top:0;height:100%;background-color:var(--_slider-fill-color);border-radius:var(--radius-pill)}.thumb{position:absolute;top:50%;transform:translate(-50%,-50%);width:var(--_slider-thumb-size);height:var(--_slider-thumb-size);border-radius:var(--radius-pill);background-color:var(--_slider-thumb-color);border:var(--_slider-thumb-bw) solid var(--_slider-thumb-border-color);box-shadow:var(--shadow-card);cursor:grab;touch-action:none}.thumb:focus-visible{outline:none;box-shadow:var(--accent-focus-ring)}.thumb:active{cursor:grabbing}:host(.disabled) .track{cursor:not-allowed}:host(.disabled) .fill{background-color:var(--border-strong)}:host(.disabled) .thumb{border-color:var(--border-strong);cursor:not-allowed}:host(.invalid) .fill{background-color:var(--error)}:host(.invalid) .thumb{border-color:var(--error)}\n"] }]
|
|
8258
8616
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], range: [{ type: i0.Input, args: [{ isSignal: true, alias: "range", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], reserveMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveMessage", required: false }] }], track: [{ type: i0.ViewChild, args: ['track', { isSignal: true }] }] } });
|
|
8259
8617
|
|
|
8260
8618
|
class TreeComponent {
|
|
@@ -8524,9 +8882,11 @@ class ColorPickerComponent extends DsControlValueAccessor {
|
|
|
8524
8882
|
/** Helper text shown below the trigger. */
|
|
8525
8883
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
8526
8884
|
/** Reserve the message-row height even when empty, so the field doesn't shift
|
|
8527
|
-
* the layout below it when a hint/error appears.
|
|
8528
|
-
*
|
|
8529
|
-
|
|
8885
|
+
* the layout below it when a hint/error appears. Falls back to
|
|
8886
|
+
* `DS_CONFIG.field.reserveMessage`, then off — opt in per field, or app-wide
|
|
8887
|
+
* for a form that shows validation messages. */
|
|
8888
|
+
reserveMessage = input(null, { ...(ngDevMode ? { debugName: "reserveMessage" } : /* istanbul ignore next */ {}), transform: (value) => (value == null ? null : booleanAttribute(value)) });
|
|
8889
|
+
reserveMessageResolved = resolveReserveMessage(this.reserveMessage);
|
|
8530
8890
|
trigger = viewChild.required('trigger');
|
|
8531
8891
|
panelTpl = viewChild.required('panel');
|
|
8532
8892
|
open = signal(false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
@@ -8701,6 +9061,7 @@ class ColorPickerComponent extends DsControlValueAccessor {
|
|
|
8701
9061
|
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
8702
9062
|
};
|
|
8703
9063
|
this.overlayRef = this.overlay.create(cfg);
|
|
9064
|
+
prepareOverlayEnter(this.overlayRef, this.host.nativeElement, positionStrategy);
|
|
8704
9065
|
forwardOverlayTokens(this.overlayRef, this.host.nativeElement, this.panelTokens);
|
|
8705
9066
|
closeOnOutsidePointer(this.overlayRef, (target) => this.host.nativeElement.contains(target), () => this.close());
|
|
8706
9067
|
// No backdrop catches a page scroll and CDK's scroll strategies miss a plain
|
|
@@ -8776,7 +9137,7 @@ class ColorPickerComponent extends DsControlValueAccessor {
|
|
|
8776
9137
|
provide: DsOverlayCloseRef,
|
|
8777
9138
|
useExisting: forwardRef(() => ColorPickerComponent),
|
|
8778
9139
|
},
|
|
8779
|
-
], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<button\n #trigger\n type=\"button\"\n class=\"trigger\"\n aria-haspopup=\"dialog\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [disabled]=\"isDisabled()\"\n (click)=\"toggle()\"\n>\n <span\n class=\"swatch\"\n [style.background-color]=\"displayHex()\"\n >\n </span>\n\n <span class=\"hex\">\n {{ displayHex() }}\n </span>\n\n <ds-icon\n class=\"chevron\"\n name=\"chevronDown\"\n [size]=\"16\"\n />\n</button>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"
|
|
9140
|
+
], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<button\n #trigger\n type=\"button\"\n class=\"trigger\"\n aria-haspopup=\"dialog\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [disabled]=\"isDisabled()\"\n (click)=\"toggle()\"\n>\n <span\n class=\"swatch\"\n [style.background-color]=\"displayHex()\"\n >\n </span>\n\n <span class=\"hex\">\n {{ displayHex() }}\n </span>\n\n <ds-icon\n class=\"chevron\"\n name=\"chevronDown\"\n [size]=\"16\"\n />\n</button>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n/>\n\n<ng-template #panel>\n <div\n class=\"panel\"\n role=\"dialog\"\n [attr.aria-label]=\"ariaLabel()\"\n >\n <div\n class=\"sv-plane\"\n tabindex=\"0\"\n aria-label=\"Saturation and brightness \u2014 use arrow keys to adjust\"\n [style.background-color]=\"hueColor()\"\n (pointerdown)=\"onSvPointerDown($event)\"\n (pointermove)=\"onSvPointerMove($event)\"\n (pointerup)=\"onSvPointerUp($event)\"\n (pointercancel)=\"onSvPointerUp($event)\"\n (keydown)=\"onSvKeydown($event)\"\n >\n <span\n class=\"sv-thumb\"\n [style.left.%]=\"svThumb().left\"\n [style.top.%]=\"svThumb().top\"\n >\n </span>\n </div>\n\n <div\n class=\"hue-track\"\n role=\"slider\"\n tabindex=\"0\"\n aria-label=\"Hue\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"360\"\n [attr.aria-valuenow]=\"hsv().h\"\n (pointerdown)=\"onHuePointerDown($event)\"\n (pointermove)=\"onHuePointerMove($event)\"\n (pointerup)=\"onHuePointerUp($event)\"\n (pointercancel)=\"onHuePointerUp($event)\"\n (keydown)=\"onHueKeydown($event)\"\n >\n <span\n class=\"hue-thumb\"\n [style.left.%]=\"huePercent()\"\n >\n </span>\n </div>\n\n <div class=\"fields\">\n <span\n class=\"preview\"\n [style.background-color]=\"displayHex()\"\n >\n </span>\n\n <input\n type=\"text\"\n class=\"hex-input\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n aria-label=\"Hex colour value\"\n [value]=\"displayHex()\"\n (input)=\"onHexInput($event)\"\n />\n </div>\n\n <div\n class=\"presets\"\n role=\"group\"\n aria-label=\"Preset colours\"\n >\n @for (preset of presets(); track preset) {\n <button\n type=\"button\"\n class=\"preset\"\n [class.selected]=\"isSelected(preset)\"\n [style.background-color]=\"preset\"\n [attr.aria-label]=\"preset\"\n [attr.aria-pressed]=\"isSelected(preset)\"\n (click)=\"selectPreset(preset)\"\n >\n </button>\n }\n </div>\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host,.panel{--_cp-swatch: var(--ds-color-picker-swatch, var(--color-picker-swatch));--_cp-preview: var(--ds-color-picker-preview, var(--color-picker-preview));--_cp-panel-w: var(--ds-color-picker-panel-w, var(--color-picker-panel-w));--_cp-sv-h: var(--ds-color-picker-sv-h, var(--color-picker-sv-h));--_cp-hue-h: var(--ds-color-picker-hue-h, var(--color-picker-hue-h));--_cp-thumb: var(--ds-color-picker-thumb, var(--color-picker-thumb));--_cp-trigger-border-color: var(--ds-color-picker-trigger-border-color, var(--border-default))}:host{display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap)}.trigger{display:inline-flex;align-items:center;gap:var(--space-2);height:var(--hit-cozy);padding:0 var(--field-pad-x);background-color:var(--surface-default);border:var(--border-width-default) solid var(--_cp-trigger-border-color);border-radius:var(--radius-md);color:var(--text-primary);cursor:pointer;transition:border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard)}.trigger:hover:not(:disabled){border-color:var(--border-strong)}.trigger:active:not(:disabled){background-color:var(--surface-secondary)}.trigger:focus-visible{outline:none;border-color:var(--accent);box-shadow:var(--accent-focus-field)}.trigger:disabled{background-color:var(--surface-muted);color:var(--text-disabled);cursor:not-allowed}.trigger .swatch{width:var(--_cp-swatch);height:var(--_cp-swatch);border-radius:var(--radius-sm);border:var(--border-width-default) solid var(--border-default);flex:none}.trigger .hex{font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-mono);text-transform:uppercase}.trigger .chevron{margin-left:var(--space-1);color:var(--text-tertiary);transition:transform var(--duration-fast) var(--ease-standard)}:host(.open) .trigger .chevron{transform:rotate(180deg)}:host(.invalid) .trigger{border-color:var(--error)}.panel{display:flex;flex-direction:column;gap:var(--space-3);width:var(--_cp-panel-w);padding:var(--space-4);background-color:var(--surface-overlay);border:var(--border-width-default) solid var(--border-default);border-radius:var(--radius-md);box-shadow:var(--shadow-popover)}.sv-plane{position:relative;width:100%;height:var(--_cp-sv-h);border-radius:var(--radius-md);cursor:crosshair;touch-action:none;overflow:hidden}.sv-plane:before{content:\"\";position:absolute;inset:0;background:linear-gradient(to right,#fff,#fff0)}.sv-plane:after{content:\"\";position:absolute;inset:0;background:linear-gradient(to top,#000,#0000)}.sv-plane:focus-visible{outline:var(--border-width-strong) solid var(--focus-ring-color, currentColor);outline-offset:var(--focus-ring-offset)}.sv-thumb{position:absolute;z-index:1;width:var(--_cp-thumb);height:var(--_cp-thumb);transform:translate(-50%,-50%);border-radius:var(--radius-pill);border:var(--border-width-strong) solid #fff;box-shadow:0 0 0 var(--border-width-default) #00000059,var(--shadow-card);pointer-events:none}.hue-track{position:relative;width:100%;height:var(--_cp-hue-h);border-radius:var(--radius-pill);cursor:pointer;touch-action:none;background:linear-gradient(to right,red,#ff0 17%,#0f0 33%,#0ff,#00f 67%,#f0f 83%,red)}.hue-track:focus-visible{outline:var(--border-width-strong) solid var(--focus-ring-color, currentColor);outline-offset:var(--focus-ring-offset)}.hue-thumb{position:absolute;top:50%;width:var(--_cp-thumb);height:var(--_cp-thumb);transform:translate(-50%,-50%);border-radius:var(--radius-pill);background-color:var(--surface-default);border:var(--border-width-strong) solid #fff;box-shadow:0 0 0 var(--border-width-default) #00000059,var(--shadow-card);pointer-events:none}.fields{display:flex;align-items:center;gap:var(--space-3)}.preview{flex:none;width:var(--_cp-preview);height:var(--_cp-preview);border-radius:var(--radius-md);border:var(--border-width-default) solid var(--border-default)}.hex-input{flex:1;min-width:0;height:var(--hit-sm);padding:0 var(--space-2);background-color:var(--surface-default);border:var(--border-width-default) solid var(--border-default);border-radius:var(--radius-sm);color:var(--text-primary);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-mono);text-transform:uppercase}.hex-input:focus{outline:none;border-color:var(--accent);box-shadow:var(--accent-focus-field)}.presets{display:flex;flex-wrap:wrap;gap:var(--space-2)}.preset{width:var(--_cp-swatch);height:var(--_cp-swatch);padding:0;border-radius:var(--radius-sm);border:var(--border-width-default) solid var(--border-default);cursor:pointer}.preset.selected{box-shadow:0 0 0 var(--border-width-default) var(--surface-overlay),0 0 0 var(--border-width-strong) var(--accent)}.preset:focus-visible{outline:var(--border-width-strong) solid var(--focus-ring-color, currentColor);outline-offset:var(--border-width-strong)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }] });
|
|
8780
9141
|
}
|
|
8781
9142
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ColorPickerComponent, decorators: [{
|
|
8782
9143
|
type: Component,
|
|
@@ -8794,7 +9155,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
8794
9155
|
'[class.open]': 'open()',
|
|
8795
9156
|
'[class.disabled]': 'isDisabled()',
|
|
8796
9157
|
'[class.invalid]': 'invalid()',
|
|
8797
|
-
}, template: "<button\n #trigger\n type=\"button\"\n class=\"trigger\"\n aria-haspopup=\"dialog\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [disabled]=\"isDisabled()\"\n (click)=\"toggle()\"\n>\n <span\n class=\"swatch\"\n [style.background-color]=\"displayHex()\"\n >\n </span>\n\n <span class=\"hex\">\n {{ displayHex() }}\n </span>\n\n <ds-icon\n class=\"chevron\"\n name=\"chevronDown\"\n [size]=\"16\"\n />\n</button>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"
|
|
9158
|
+
}, template: "<button\n #trigger\n type=\"button\"\n class=\"trigger\"\n aria-haspopup=\"dialog\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [disabled]=\"isDisabled()\"\n (click)=\"toggle()\"\n>\n <span\n class=\"swatch\"\n [style.background-color]=\"displayHex()\"\n >\n </span>\n\n <span class=\"hex\">\n {{ displayHex() }}\n </span>\n\n <ds-icon\n class=\"chevron\"\n name=\"chevronDown\"\n [size]=\"16\"\n />\n</button>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n/>\n\n<ng-template #panel>\n <div\n class=\"panel\"\n role=\"dialog\"\n [attr.aria-label]=\"ariaLabel()\"\n >\n <div\n class=\"sv-plane\"\n tabindex=\"0\"\n aria-label=\"Saturation and brightness \u2014 use arrow keys to adjust\"\n [style.background-color]=\"hueColor()\"\n (pointerdown)=\"onSvPointerDown($event)\"\n (pointermove)=\"onSvPointerMove($event)\"\n (pointerup)=\"onSvPointerUp($event)\"\n (pointercancel)=\"onSvPointerUp($event)\"\n (keydown)=\"onSvKeydown($event)\"\n >\n <span\n class=\"sv-thumb\"\n [style.left.%]=\"svThumb().left\"\n [style.top.%]=\"svThumb().top\"\n >\n </span>\n </div>\n\n <div\n class=\"hue-track\"\n role=\"slider\"\n tabindex=\"0\"\n aria-label=\"Hue\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"360\"\n [attr.aria-valuenow]=\"hsv().h\"\n (pointerdown)=\"onHuePointerDown($event)\"\n (pointermove)=\"onHuePointerMove($event)\"\n (pointerup)=\"onHuePointerUp($event)\"\n (pointercancel)=\"onHuePointerUp($event)\"\n (keydown)=\"onHueKeydown($event)\"\n >\n <span\n class=\"hue-thumb\"\n [style.left.%]=\"huePercent()\"\n >\n </span>\n </div>\n\n <div class=\"fields\">\n <span\n class=\"preview\"\n [style.background-color]=\"displayHex()\"\n >\n </span>\n\n <input\n type=\"text\"\n class=\"hex-input\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n aria-label=\"Hex colour value\"\n [value]=\"displayHex()\"\n (input)=\"onHexInput($event)\"\n />\n </div>\n\n <div\n class=\"presets\"\n role=\"group\"\n aria-label=\"Preset colours\"\n >\n @for (preset of presets(); track preset) {\n <button\n type=\"button\"\n class=\"preset\"\n [class.selected]=\"isSelected(preset)\"\n [style.background-color]=\"preset\"\n [attr.aria-label]=\"preset\"\n [attr.aria-pressed]=\"isSelected(preset)\"\n (click)=\"selectPreset(preset)\"\n >\n </button>\n }\n </div>\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host,.panel{--_cp-swatch: var(--ds-color-picker-swatch, var(--color-picker-swatch));--_cp-preview: var(--ds-color-picker-preview, var(--color-picker-preview));--_cp-panel-w: var(--ds-color-picker-panel-w, var(--color-picker-panel-w));--_cp-sv-h: var(--ds-color-picker-sv-h, var(--color-picker-sv-h));--_cp-hue-h: var(--ds-color-picker-hue-h, var(--color-picker-hue-h));--_cp-thumb: var(--ds-color-picker-thumb, var(--color-picker-thumb));--_cp-trigger-border-color: var(--ds-color-picker-trigger-border-color, var(--border-default))}:host{display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap)}.trigger{display:inline-flex;align-items:center;gap:var(--space-2);height:var(--hit-cozy);padding:0 var(--field-pad-x);background-color:var(--surface-default);border:var(--border-width-default) solid var(--_cp-trigger-border-color);border-radius:var(--radius-md);color:var(--text-primary);cursor:pointer;transition:border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard)}.trigger:hover:not(:disabled){border-color:var(--border-strong)}.trigger:active:not(:disabled){background-color:var(--surface-secondary)}.trigger:focus-visible{outline:none;border-color:var(--accent);box-shadow:var(--accent-focus-field)}.trigger:disabled{background-color:var(--surface-muted);color:var(--text-disabled);cursor:not-allowed}.trigger .swatch{width:var(--_cp-swatch);height:var(--_cp-swatch);border-radius:var(--radius-sm);border:var(--border-width-default) solid var(--border-default);flex:none}.trigger .hex{font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-mono);text-transform:uppercase}.trigger .chevron{margin-left:var(--space-1);color:var(--text-tertiary);transition:transform var(--duration-fast) var(--ease-standard)}:host(.open) .trigger .chevron{transform:rotate(180deg)}:host(.invalid) .trigger{border-color:var(--error)}.panel{display:flex;flex-direction:column;gap:var(--space-3);width:var(--_cp-panel-w);padding:var(--space-4);background-color:var(--surface-overlay);border:var(--border-width-default) solid var(--border-default);border-radius:var(--radius-md);box-shadow:var(--shadow-popover)}.sv-plane{position:relative;width:100%;height:var(--_cp-sv-h);border-radius:var(--radius-md);cursor:crosshair;touch-action:none;overflow:hidden}.sv-plane:before{content:\"\";position:absolute;inset:0;background:linear-gradient(to right,#fff,#fff0)}.sv-plane:after{content:\"\";position:absolute;inset:0;background:linear-gradient(to top,#000,#0000)}.sv-plane:focus-visible{outline:var(--border-width-strong) solid var(--focus-ring-color, currentColor);outline-offset:var(--focus-ring-offset)}.sv-thumb{position:absolute;z-index:1;width:var(--_cp-thumb);height:var(--_cp-thumb);transform:translate(-50%,-50%);border-radius:var(--radius-pill);border:var(--border-width-strong) solid #fff;box-shadow:0 0 0 var(--border-width-default) #00000059,var(--shadow-card);pointer-events:none}.hue-track{position:relative;width:100%;height:var(--_cp-hue-h);border-radius:var(--radius-pill);cursor:pointer;touch-action:none;background:linear-gradient(to right,red,#ff0 17%,#0f0 33%,#0ff,#00f 67%,#f0f 83%,red)}.hue-track:focus-visible{outline:var(--border-width-strong) solid var(--focus-ring-color, currentColor);outline-offset:var(--focus-ring-offset)}.hue-thumb{position:absolute;top:50%;width:var(--_cp-thumb);height:var(--_cp-thumb);transform:translate(-50%,-50%);border-radius:var(--radius-pill);background-color:var(--surface-default);border:var(--border-width-strong) solid #fff;box-shadow:0 0 0 var(--border-width-default) #00000059,var(--shadow-card);pointer-events:none}.fields{display:flex;align-items:center;gap:var(--space-3)}.preview{flex:none;width:var(--_cp-preview);height:var(--_cp-preview);border-radius:var(--radius-md);border:var(--border-width-default) solid var(--border-default)}.hex-input{flex:1;min-width:0;height:var(--hit-sm);padding:0 var(--space-2);background-color:var(--surface-default);border:var(--border-width-default) solid var(--border-default);border-radius:var(--radius-sm);color:var(--text-primary);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-mono);text-transform:uppercase}.hex-input:focus{outline:none;border-color:var(--accent);box-shadow:var(--accent-focus-field)}.presets{display:flex;flex-wrap:wrap;gap:var(--space-2)}.preset{width:var(--_cp-swatch);height:var(--_cp-swatch);padding:0;border-radius:var(--radius-sm);border:var(--border-width-default) solid var(--border-default);cursor:pointer}.preset.selected{box-shadow:0 0 0 var(--border-width-default) var(--surface-overlay),0 0 0 var(--border-width-strong) var(--accent)}.preset:focus-visible{outline:var(--border-width-strong) solid var(--focus-ring-color, currentColor);outline-offset:var(--border-width-strong)}\n"] }]
|
|
8798
9159
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], presets: [{ type: i0.Input, args: [{ isSignal: true, alias: "presets", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], reserveMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveMessage", required: false }] }], trigger: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], panelTpl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
|
|
8799
9160
|
|
|
8800
9161
|
class MultiSelectComponent extends DsControlValueAccessor {
|
|
@@ -8825,9 +9186,11 @@ class MultiSelectComponent extends DsControlValueAccessor {
|
|
|
8825
9186
|
/** Helper text shown below the field. */
|
|
8826
9187
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
8827
9188
|
/** Reserve the message-row height even when empty, so the field doesn't shift
|
|
8828
|
-
* the layout below it when a hint/error appears.
|
|
8829
|
-
*
|
|
8830
|
-
|
|
9189
|
+
* the layout below it when a hint/error appears. Falls back to
|
|
9190
|
+
* `DS_CONFIG.field.reserveMessage`, then off — opt in per field, or app-wide
|
|
9191
|
+
* for a form that shows validation messages. */
|
|
9192
|
+
reserveMessage = input(null, { ...(ngDevMode ? { debugName: "reserveMessage" } : /* istanbul ignore next */ {}), transform: (value) => (value == null ? null : booleanAttribute(value)) });
|
|
9193
|
+
reserveMessageResolved = resolveReserveMessage(this.reserveMessage);
|
|
8831
9194
|
/** Accessible name for the trigger — falls back to `placeholder`. */
|
|
8832
9195
|
ariaLabel = input(null, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
8833
9196
|
/** Shows a "Select all" row that toggles every filter-matching, enabled option. */
|
|
@@ -9008,6 +9371,7 @@ class MultiSelectComponent extends DsControlValueAccessor {
|
|
|
9008
9371
|
width: triggerElement.getBoundingClientRect().width,
|
|
9009
9372
|
};
|
|
9010
9373
|
this.overlayRef = this.overlay.create(cfg);
|
|
9374
|
+
prepareOverlayEnter(this.overlayRef, this.host.nativeElement, positionStrategy);
|
|
9011
9375
|
forwardOverlayTokens(this.overlayRef, this.host.nativeElement, this.panelTokens);
|
|
9012
9376
|
closeOnOutsidePointer(this.overlayRef, (target) => this.host.nativeElement.contains(target), () => this.close());
|
|
9013
9377
|
// No backdrop catches a page scroll and CDK's scroll strategies miss a plain
|
|
@@ -9082,7 +9446,7 @@ class MultiSelectComponent extends DsControlValueAccessor {
|
|
|
9082
9446
|
useExisting: forwardRef(() => MultiSelectComponent),
|
|
9083
9447
|
multi: true,
|
|
9084
9448
|
},
|
|
9085
|
-
], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "searchInput", first: true, predicate: ["search"], descendants: true, isSignal: true }, { propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n #trigger\n class=\"field-trigger\"\n aria-haspopup=\"listbox\"\n [attr.role]=\"open() ? 'group' : 'combobox'\"\n [class.open]=\"open()\"\n [class.invalid]=\"invalid()\"\n [class.disabled]=\"isDisabled()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n (click)=\"onTriggerClick()\"\n (keydown)=\"onTriggerKeydown($event)\"\n>\n @if (selectedOptions().length === 0) {\n <span class=\"placeholder\">\n {{ placeholder() }}\n </span>\n } @else {\n @for (option of visibleChips(); track option.value) {\n <ds-tag\n variant=\"neutral\"\n closable\n [closeLabel]=\"'Remove ' + option.label\"\n (closed)=\"removeValue(option.value)\"\n >\n {{ option.label }}\n </ds-tag>\n }\n\n @if (overflowCount() > 0) {\n <span class=\"overflow\">\n +{{ overflowCount() }} more\n </span>\n }\n }\n\n <ds-icon\n class=\"chevron\"\n name=\"chevronDown\"\n [size]=\"18\"\n />\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"
|
|
9449
|
+
], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "searchInput", first: true, predicate: ["search"], descendants: true, isSignal: true }, { propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n #trigger\n class=\"field-trigger\"\n aria-haspopup=\"listbox\"\n [attr.role]=\"open() ? 'group' : 'combobox'\"\n [class.open]=\"open()\"\n [class.invalid]=\"invalid()\"\n [class.disabled]=\"isDisabled()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n (click)=\"onTriggerClick()\"\n (keydown)=\"onTriggerKeydown($event)\"\n>\n @if (selectedOptions().length === 0) {\n <span class=\"placeholder\">\n {{ placeholder() }}\n </span>\n } @else {\n @for (option of visibleChips(); track option.value) {\n <ds-tag\n variant=\"neutral\"\n closable\n [closeLabel]=\"'Remove ' + option.label\"\n (closed)=\"removeValue(option.value)\"\n >\n {{ option.label }}\n </ds-tag>\n }\n\n @if (overflowCount() > 0) {\n <span class=\"overflow\">\n +{{ overflowCount() }} more\n </span>\n }\n }\n\n <ds-icon\n class=\"chevron\"\n name=\"chevronDown\"\n [size]=\"18\"\n />\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n/>\n\n<ng-template #panel>\n <div class=\"panel\">\n <div class=\"search-row\">\n <ds-icon\n class=\"search-icon\"\n name=\"search\"\n [size]=\"16\"\n />\n\n <input\n #search\n type=\"text\"\n class=\"search-input\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-expanded=\"true\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [placeholder]=\"searchPlaceholder()\"\n [value]=\"filter()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n (input)=\"onFilter($event)\"\n (keydown)=\"onSearchKeydown($event)\"\n />\n </div>\n\n @if (selectAll() && filteredOptions().length) {\n <button\n type=\"button\"\n class=\"select-all\"\n role=\"checkbox\"\n [attr.aria-checked]=\"\n allFilteredSelected()\n ? 'true'\n : someFilteredSelected()\n ? 'mixed'\n : 'false'\n \"\n (click)=\"toggleSelectAll()\"\n >\n <span\n class=\"checkbox\"\n [class.checked]=\"allFilteredSelected()\"\n [class.indeterminate]=\"someFilteredSelected()\"\n >\n @if (allFilteredSelected()) {\n <ds-icon\n name=\"check\"\n [size]=\"13\"\n />\n } @else if (someFilteredSelected()) {\n <span class=\"dash\"></span>\n }\n </span>\n\n <span class=\"select-all-label\">\n Select all\n </span>\n </button>\n }\n\n <ul\n class=\"options\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [id]=\"listboxId\"\n >\n @for (option of filteredOptions(); track option.value; let i = $index) {\n <li role=\"presentation\">\n <button\n type=\"button\"\n role=\"option\"\n class=\"option\"\n [id]=\"optionId(i)\"\n [class.is-active]=\"activeIndex() === i\"\n [attr.aria-selected]=\"isSelected(option.value)\"\n [disabled]=\"option.disabled\"\n (click)=\"toggleValue(option)\"\n (mouseenter)=\"activeIndex.set(i)\"\n >\n <span\n class=\"checkbox\"\n [class.checked]=\"isSelected(option.value)\"\n >\n @if (isSelected(option.value)) {\n <ds-icon\n name=\"check\"\n [size]=\"13\"\n />\n }\n </span>\n\n <span class=\"option-label\">\n {{ option.label }}\n </span>\n </button>\n </li>\n }\n\n @if (filteredOptions().length === 0) {\n <li class=\"empty\">\n No matches\n </li>\n }\n </ul>\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{display:flex;flex-direction:column;gap:var(--field-label-gap);--_trigger-bg-color: var(--ds-multi-select-bg-color, var(--surface-default));--_trigger-border-color: var( --ds-multi-select-border-color, var(--border-default) );--_trigger-radius: var(--ds-multi-select-radius, var(--radius-md));--_trigger-text-color: var(--ds-multi-select-text-color, var(--text-primary));--_trigger-border-color-focus: var( --ds-multi-select-border-color-focus, var(--accent) )}.field-trigger{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-1-5);min-height:var(--hit-cozy);padding:var(--space-1-5) var(--field-pad-x);background-color:var(--_trigger-bg-color);border:var(--border-width-default) solid var(--_trigger-border-color);border-radius:var(--_trigger-radius);color:var(--_trigger-text-color);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);cursor:pointer;transition:border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard)}.field-trigger:hover:not(.disabled){border-color:var(--border-strong)}.field-trigger.open,.field-trigger:focus-visible{outline:none;border-color:var(--_trigger-border-color-focus);box-shadow:var(--accent-focus-field)}.field-trigger.invalid{border-color:var(--error)}.field-trigger.disabled{background-color:var(--surface-muted);color:var(--text-disabled);cursor:not-allowed}.placeholder{color:var(--text-tertiary)}.overflow{color:var(--text-secondary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-xs)}.chevron{margin-left:auto;color:var(--text-tertiary)}.panel{--_panel-bg-color: var(--ds-multi-select-panel-bg-color, var(--surface-overlay));--_option-bg-color-active: var(--ds-multi-select-option-bg-color-active, var(--surface-secondary));--_check-bg-color: var(--ds-multi-select-check-bg-color, var(--accent));display:flex;flex-direction:column;width:100%;background-color:var(--_panel-bg-color);border:var(--border-width-default) solid var(--border-default);border-radius:var(--radius-md);box-shadow:var(--shadow-popover);overflow:hidden}.search-row{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border-bottom:var(--border-width-default) solid var(--border-divider)}.search-icon{color:var(--text-tertiary);flex:none}.search-input{flex:1;min-width:0;border:0;background:transparent;color:var(--text-primary);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans)}.search-input:focus{outline:none}.options{list-style:none;margin:0;padding:var(--space-1);display:flex;flex-direction:column;gap:var(--space-px);max-height:var(--combobox-maxh);overflow-y:auto}.option{display:flex;align-items:center;gap:var(--space-3);width:100%;padding:var(--space-2) var(--space-2-5);border:0;border-radius:var(--radius-sm);background:transparent;color:var(--text-primary);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);text-align:left;cursor:pointer}.option.is-active:not(:disabled){background-color:var(--_option-bg-color-active)}.option:disabled{color:var(--text-disabled);cursor:not-allowed}.select-all{display:flex;align-items:center;gap:var(--space-3);width:calc(100% - var(--space-2));padding:var(--space-2) var(--space-2-5);margin:var(--space-1) var(--space-1) 0;border:0;border-bottom:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-sm) var(--radius-sm) 0 0;background:transparent;color:var(--text-secondary);font:var(--font-weight-semibold) var(--font-size-xs)/var(--line-height-flat) var(--font-sans);text-transform:uppercase;letter-spacing:var(--letter-spacing-wide);text-align:left;cursor:pointer}.select-all:hover{background-color:var(--surface-secondary)}.checkbox{display:inline-flex;align-items:center;justify-content:center;flex:none;width:var(--check-size);height:var(--check-size);border-radius:var(--radius-sm);border:var(--border-width-strong) solid var(--border-strong);color:var(--text-on-primary)}.checkbox.checked,.checkbox.indeterminate{background-color:var(--_check-bg-color);border-color:var(--_check-bg-color)}.checkbox .dash{width:var(--check-indet-w);height:var(--check-indet-h);border-radius:var(--radius-sm);background-color:var(--text-on-primary)}.option-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty{padding:var(--space-3) var(--space-3);color:var(--text-tertiary);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);text-align:center}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "component", type: TagComponent, selector: "ds-tag", inputs: ["variant", "closable", "interactive", "selected", "closeLabel"], outputs: ["closed", "toggled"] }, { kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }] });
|
|
9086
9450
|
}
|
|
9087
9451
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: MultiSelectComponent, decorators: [{
|
|
9088
9452
|
type: Component,
|
|
@@ -9092,9 +9456,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
9092
9456
|
useExisting: forwardRef(() => MultiSelectComponent),
|
|
9093
9457
|
multi: true,
|
|
9094
9458
|
},
|
|
9095
|
-
], template: "<div\n #trigger\n class=\"field-trigger\"\n aria-haspopup=\"listbox\"\n [attr.role]=\"open() ? 'group' : 'combobox'\"\n [class.open]=\"open()\"\n [class.invalid]=\"invalid()\"\n [class.disabled]=\"isDisabled()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n (click)=\"onTriggerClick()\"\n (keydown)=\"onTriggerKeydown($event)\"\n>\n @if (selectedOptions().length === 0) {\n <span class=\"placeholder\">\n {{ placeholder() }}\n </span>\n } @else {\n @for (option of visibleChips(); track option.value) {\n <ds-tag\n variant=\"neutral\"\n closable\n [closeLabel]=\"'Remove ' + option.label\"\n (closed)=\"removeValue(option.value)\"\n >\n {{ option.label }}\n </ds-tag>\n }\n\n @if (overflowCount() > 0) {\n <span class=\"overflow\">\n +{{ overflowCount() }} more\n </span>\n }\n }\n\n <ds-icon\n class=\"chevron\"\n name=\"chevronDown\"\n [size]=\"18\"\n />\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"
|
|
9459
|
+
], template: "<div\n #trigger\n class=\"field-trigger\"\n aria-haspopup=\"listbox\"\n [attr.role]=\"open() ? 'group' : 'combobox'\"\n [class.open]=\"open()\"\n [class.invalid]=\"invalid()\"\n [class.disabled]=\"isDisabled()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n (click)=\"onTriggerClick()\"\n (keydown)=\"onTriggerKeydown($event)\"\n>\n @if (selectedOptions().length === 0) {\n <span class=\"placeholder\">\n {{ placeholder() }}\n </span>\n } @else {\n @for (option of visibleChips(); track option.value) {\n <ds-tag\n variant=\"neutral\"\n closable\n [closeLabel]=\"'Remove ' + option.label\"\n (closed)=\"removeValue(option.value)\"\n >\n {{ option.label }}\n </ds-tag>\n }\n\n @if (overflowCount() > 0) {\n <span class=\"overflow\">\n +{{ overflowCount() }} more\n </span>\n }\n }\n\n <ds-icon\n class=\"chevron\"\n name=\"chevronDown\"\n [size]=\"18\"\n />\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n/>\n\n<ng-template #panel>\n <div class=\"panel\">\n <div class=\"search-row\">\n <ds-icon\n class=\"search-icon\"\n name=\"search\"\n [size]=\"16\"\n />\n\n <input\n #search\n type=\"text\"\n class=\"search-input\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-expanded=\"true\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [placeholder]=\"searchPlaceholder()\"\n [value]=\"filter()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n (input)=\"onFilter($event)\"\n (keydown)=\"onSearchKeydown($event)\"\n />\n </div>\n\n @if (selectAll() && filteredOptions().length) {\n <button\n type=\"button\"\n class=\"select-all\"\n role=\"checkbox\"\n [attr.aria-checked]=\"\n allFilteredSelected()\n ? 'true'\n : someFilteredSelected()\n ? 'mixed'\n : 'false'\n \"\n (click)=\"toggleSelectAll()\"\n >\n <span\n class=\"checkbox\"\n [class.checked]=\"allFilteredSelected()\"\n [class.indeterminate]=\"someFilteredSelected()\"\n >\n @if (allFilteredSelected()) {\n <ds-icon\n name=\"check\"\n [size]=\"13\"\n />\n } @else if (someFilteredSelected()) {\n <span class=\"dash\"></span>\n }\n </span>\n\n <span class=\"select-all-label\">\n Select all\n </span>\n </button>\n }\n\n <ul\n class=\"options\"\n role=\"listbox\"\n aria-multiselectable=\"true\"\n [id]=\"listboxId\"\n >\n @for (option of filteredOptions(); track option.value; let i = $index) {\n <li role=\"presentation\">\n <button\n type=\"button\"\n role=\"option\"\n class=\"option\"\n [id]=\"optionId(i)\"\n [class.is-active]=\"activeIndex() === i\"\n [attr.aria-selected]=\"isSelected(option.value)\"\n [disabled]=\"option.disabled\"\n (click)=\"toggleValue(option)\"\n (mouseenter)=\"activeIndex.set(i)\"\n >\n <span\n class=\"checkbox\"\n [class.checked]=\"isSelected(option.value)\"\n >\n @if (isSelected(option.value)) {\n <ds-icon\n name=\"check\"\n [size]=\"13\"\n />\n }\n </span>\n\n <span class=\"option-label\">\n {{ option.label }}\n </span>\n </button>\n </li>\n }\n\n @if (filteredOptions().length === 0) {\n <li class=\"empty\">\n No matches\n </li>\n }\n </ul>\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{display:flex;flex-direction:column;gap:var(--field-label-gap);--_trigger-bg-color: var(--ds-multi-select-bg-color, var(--surface-default));--_trigger-border-color: var( --ds-multi-select-border-color, var(--border-default) );--_trigger-radius: var(--ds-multi-select-radius, var(--radius-md));--_trigger-text-color: var(--ds-multi-select-text-color, var(--text-primary));--_trigger-border-color-focus: var( --ds-multi-select-border-color-focus, var(--accent) )}.field-trigger{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-1-5);min-height:var(--hit-cozy);padding:var(--space-1-5) var(--field-pad-x);background-color:var(--_trigger-bg-color);border:var(--border-width-default) solid var(--_trigger-border-color);border-radius:var(--_trigger-radius);color:var(--_trigger-text-color);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);cursor:pointer;transition:border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard)}.field-trigger:hover:not(.disabled){border-color:var(--border-strong)}.field-trigger.open,.field-trigger:focus-visible{outline:none;border-color:var(--_trigger-border-color-focus);box-shadow:var(--accent-focus-field)}.field-trigger.invalid{border-color:var(--error)}.field-trigger.disabled{background-color:var(--surface-muted);color:var(--text-disabled);cursor:not-allowed}.placeholder{color:var(--text-tertiary)}.overflow{color:var(--text-secondary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-xs)}.chevron{margin-left:auto;color:var(--text-tertiary)}.panel{--_panel-bg-color: var(--ds-multi-select-panel-bg-color, var(--surface-overlay));--_option-bg-color-active: var(--ds-multi-select-option-bg-color-active, var(--surface-secondary));--_check-bg-color: var(--ds-multi-select-check-bg-color, var(--accent));display:flex;flex-direction:column;width:100%;background-color:var(--_panel-bg-color);border:var(--border-width-default) solid var(--border-default);border-radius:var(--radius-md);box-shadow:var(--shadow-popover);overflow:hidden}.search-row{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border-bottom:var(--border-width-default) solid var(--border-divider)}.search-icon{color:var(--text-tertiary);flex:none}.search-input{flex:1;min-width:0;border:0;background:transparent;color:var(--text-primary);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans)}.search-input:focus{outline:none}.options{list-style:none;margin:0;padding:var(--space-1);display:flex;flex-direction:column;gap:var(--space-px);max-height:var(--combobox-maxh);overflow-y:auto}.option{display:flex;align-items:center;gap:var(--space-3);width:100%;padding:var(--space-2) var(--space-2-5);border:0;border-radius:var(--radius-sm);background:transparent;color:var(--text-primary);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);text-align:left;cursor:pointer}.option.is-active:not(:disabled){background-color:var(--_option-bg-color-active)}.option:disabled{color:var(--text-disabled);cursor:not-allowed}.select-all{display:flex;align-items:center;gap:var(--space-3);width:calc(100% - var(--space-2));padding:var(--space-2) var(--space-2-5);margin:var(--space-1) var(--space-1) 0;border:0;border-bottom:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-sm) var(--radius-sm) 0 0;background:transparent;color:var(--text-secondary);font:var(--font-weight-semibold) var(--font-size-xs)/var(--line-height-flat) var(--font-sans);text-transform:uppercase;letter-spacing:var(--letter-spacing-wide);text-align:left;cursor:pointer}.select-all:hover{background-color:var(--surface-secondary)}.checkbox{display:inline-flex;align-items:center;justify-content:center;flex:none;width:var(--check-size);height:var(--check-size);border-radius:var(--radius-sm);border:var(--border-width-strong) solid var(--border-strong);color:var(--text-on-primary)}.checkbox.checked,.checkbox.indeterminate{background-color:var(--_check-bg-color);border-color:var(--_check-bg-color)}.checkbox .dash{width:var(--check-indet-w);height:var(--check-indet-h);border-radius:var(--radius-sm);background-color:var(--text-on-primary)}.option-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty{padding:var(--space-3) var(--space-3);color:var(--text-tertiary);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);text-align:center}\n"] }]
|
|
9096
9460
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], maxVisibleChips: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxVisibleChips", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], reserveMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveMessage", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], selectAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAll", required: false }] }], trigger: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], searchInput: [{ type: i0.ViewChild, args: ['search', { isSignal: true }] }], panelTpl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
|
|
9097
9461
|
|
|
9462
|
+
/**
|
|
9463
|
+
* Dev-only guard for a component whose caption comes from a `[label]` input and
|
|
9464
|
+
* that therefore projects nothing, so `<ds-switch>Some text</ds-switch>` renders
|
|
9465
|
+
* no caption at all — silently, with no compile-time signal. Put it on a probe
|
|
9466
|
+
* around the component's only `<ng-content>`, gated on dev mode so production
|
|
9467
|
+
* renders no extra node:
|
|
9468
|
+
*
|
|
9469
|
+
* ```html
|
|
9470
|
+
* @if (devMode) {
|
|
9471
|
+
* <span dsProjectionDropped="ds-switch"><ng-content></ng-content></span>
|
|
9472
|
+
* }
|
|
9473
|
+
* ```
|
|
9474
|
+
*
|
|
9475
|
+
* NOT projection support: the probe exists only so the warning can see that
|
|
9476
|
+
* content was passed, and the directive hides it. Real projection for the field
|
|
9477
|
+
* family is still open — see docs/todo.md.
|
|
9478
|
+
*/
|
|
9479
|
+
class ProjectionDroppedDirective {
|
|
9480
|
+
/** The host component's selector, named in the warning. */
|
|
9481
|
+
dsProjectionDropped = input.required(...(ngDevMode ? [{ debugName: "dsProjectionDropped" }] : /* istanbul ignore next */ []));
|
|
9482
|
+
probe = inject((ElementRef));
|
|
9483
|
+
constructor() {
|
|
9484
|
+
afterNextRender(() => {
|
|
9485
|
+
if (!this.probe.nativeElement.textContent?.trim()) {
|
|
9486
|
+
return;
|
|
9487
|
+
}
|
|
9488
|
+
const selector = this.dsProjectionDropped();
|
|
9489
|
+
console.warn(`[${selector}] Projected content renders nothing — the caption comes from the [label] input only, so \`<${selector}>Some text</${selector}>\` shows no caption at all. Move the text into [label].`);
|
|
9490
|
+
});
|
|
9491
|
+
}
|
|
9492
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ProjectionDroppedDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
9493
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: ProjectionDroppedDirective, isStandalone: true, selector: "[dsProjectionDropped]", inputs: { dsProjectionDropped: { classPropertyName: "dsProjectionDropped", publicName: "dsProjectionDropped", isSignal: true, isRequired: true, transformFunction: null } }, host: { styleAttribute: "display: none" }, ngImport: i0 });
|
|
9494
|
+
}
|
|
9495
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ProjectionDroppedDirective, decorators: [{
|
|
9496
|
+
type: Directive,
|
|
9497
|
+
args: [{
|
|
9498
|
+
selector: '[dsProjectionDropped]',
|
|
9499
|
+
standalone: true,
|
|
9500
|
+
host: { style: 'display: none' },
|
|
9501
|
+
}]
|
|
9502
|
+
}], ctorParameters: () => [], propDecorators: { dsProjectionDropped: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsProjectionDropped", required: true }] }] } });
|
|
9503
|
+
|
|
9098
9504
|
class CheckboxComponent extends DsBooleanControlValueAccessor {
|
|
9099
9505
|
/** Checked state, two-way bound. */
|
|
9100
9506
|
checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
@@ -9111,9 +9517,11 @@ class CheckboxComponent extends DsBooleanControlValueAccessor {
|
|
|
9111
9517
|
/** Helper text shown below the checkbox. */
|
|
9112
9518
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
9113
9519
|
/** Reserve the message-row height even when empty, so the field doesn't shift
|
|
9114
|
-
* the layout below it when a hint/error appears.
|
|
9115
|
-
*
|
|
9116
|
-
|
|
9520
|
+
* the layout below it when a hint/error appears. Falls back to
|
|
9521
|
+
* `DS_CONFIG.field.reserveMessage`, then off — opt in per field, or app-wide
|
|
9522
|
+
* for a form that shows validation messages. */
|
|
9523
|
+
reserveMessage = input(null, { ...(ngDevMode ? { debugName: "reserveMessage" } : /* istanbul ignore next */ {}), transform: (value) => (value == null ? null : booleanAttribute(value)) });
|
|
9524
|
+
reserveMessageResolved = resolveReserveMessage(this.reserveMessage);
|
|
9117
9525
|
/** Checkbox size — sm/md/lg. */
|
|
9118
9526
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
9119
9527
|
/** Marks the field required — shows an asterisk and sets `aria-required`. */
|
|
@@ -9130,6 +9538,7 @@ class CheckboxComponent extends DsBooleanControlValueAccessor {
|
|
|
9130
9538
|
onCheckedChange(event) {
|
|
9131
9539
|
this.checked.set(event.target.checked);
|
|
9132
9540
|
}
|
|
9541
|
+
devMode = isDevMode();
|
|
9133
9542
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: CheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
9134
9543
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: CheckboxComponent, isStandalone: true, selector: "ds-checkbox", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, reserveMessage: { classPropertyName: "reserveMessage", publicName: "reserveMessage", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, providers: [
|
|
9135
9544
|
{
|
|
@@ -9137,17 +9546,17 @@ class CheckboxComponent extends DsBooleanControlValueAccessor {
|
|
|
9137
9546
|
useExisting: forwardRef(() => CheckboxComponent),
|
|
9138
9547
|
multi: true,
|
|
9139
9548
|
},
|
|
9140
|
-
], usesInheritance: true, ngImport: i0, template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"isDisabled()\"\n >\n <input\n type=\"checkbox\"\n class=\"check\"\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate()\"\n [disabled]=\"isDisabled()\"\n [attr.name]=\"name()\"\n [attr.id]=\"controlId()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onCheckedChange($event)\"\n (blur)=\"markTouched()\"\n />\n\n @if (label()) {\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n }\n </label>\n }\n </span>\n\n <ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"
|
|
9549
|
+
], usesInheritance: true, ngImport: i0, template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"isDisabled()\"\n >\n <input\n type=\"checkbox\"\n class=\"check\"\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate()\"\n [disabled]=\"isDisabled()\"\n [attr.name]=\"name()\"\n [attr.id]=\"controlId()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onCheckedChange($event)\"\n (blur)=\"markTouched()\"\n />\n\n @if (label()) {\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n }\n </label>\n }\n\n @if (devMode) {\n <span dsProjectionDropped=\"ds-checkbox\">\n <ng-content></ng-content>\n </span>\n }\n </span>\n\n <ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n />\n</div>\n", styles: [":host{--_checkbox-focus-shadow: var(--ds-checkbox-focus-shadow, var(--ds-control-focus-shadow));--_checkbox-bg: var(--ds-checkbox-bg-color, var(--surface-default));--_checkbox-border: var(--ds-checkbox-border-color, var(--border-strong));--_checkbox-hover-border: var(--ds-checkbox-hover-border-color, var(--accent));--_checkbox-selected-bg: var(--ds-checkbox-selected-bg-color, var(--accent));--_checkbox-selected-border: var(--ds-checkbox-selected-border-color, var(--accent));--_checkbox-radius: var(--ds-checkbox-radius, var(--radius-sm));--_checkbox-glyph: var(--check-size);--_checkbox-label-fs: var(--font-size-s);display:inline-flex}.checkbox-field{display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap)}.checkbox-field.size-sm{--_checkbox-glyph: var(--check-glyph-sm);--_checkbox-label-fs: var(--font-size-xs)}.checkbox-field.size-lg{--_checkbox-glyph: var(--check-glyph-lg);--_checkbox-label-fs: var(--font-size-m)}.control-line{display:inline-flex;align-items:center;gap:var(--space-2)}.control-line .control-text{font:var(--font-weight-regular) var(--_checkbox-label-fs)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer;-webkit-user-select:none;user-select:none}.control-line .control-text .req{color:var(--error);font-weight:var(--font-weight-semibold);margin-inline-start:var(--space-1)}.control-line.is-disabled .control-text{color:var(--text-disabled);cursor:not-allowed}.check{appearance:none;width:var(--_checkbox-glyph);height:var(--_checkbox-glyph);border:var(--check-bw) solid var(--_checkbox-border);background:var(--_checkbox-bg);cursor:pointer;display:inline-grid;place-items:center;flex-shrink:0;margin:0;border-radius:var(--_checkbox-radius);transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard)}.check:hover:not(:disabled){border-color:var(--_checkbox-hover-border)}.check:focus-visible{outline:none;box-shadow:var(--_checkbox-focus-shadow)}.check:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.check:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.check:after{content:\"\";transform:scale(.6);opacity:0;transform-origin:center;transition:transform var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.check:checked{background:var(--_checkbox-selected-bg);border-color:var(--_checkbox-selected-border)}.check:checked:after{content:\"\";width:var(--check-tick-size);height:var(--check-tick-size);background:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat;transform:scale(1);opacity:1}.check:indeterminate{background:var(--_checkbox-selected-bg);border-color:var(--_checkbox-selected-border)}.check:indeterminate:after{content:\"\";width:var(--check-indet-w);height:var(--check-indet-h);background:var(--icon-on-primary);border-radius:var(--radius-sm);transform:scale(1);opacity:1}\n"], dependencies: [{ kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }, { kind: "directive", type: ProjectionDroppedDirective, selector: "[dsProjectionDropped]", inputs: ["dsProjectionDropped"] }] });
|
|
9141
9550
|
}
|
|
9142
9551
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
9143
9552
|
type: Component,
|
|
9144
|
-
args: [{ selector: 'ds-checkbox', standalone: true, imports: [FieldMessageComponent], encapsulation: ViewEncapsulation.Emulated, providers: [
|
|
9553
|
+
args: [{ selector: 'ds-checkbox', standalone: true, imports: [FieldMessageComponent, ProjectionDroppedDirective], encapsulation: ViewEncapsulation.Emulated, providers: [
|
|
9145
9554
|
{
|
|
9146
9555
|
provide: NG_VALUE_ACCESSOR,
|
|
9147
9556
|
useExisting: forwardRef(() => CheckboxComponent),
|
|
9148
9557
|
multi: true,
|
|
9149
9558
|
},
|
|
9150
|
-
], template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"isDisabled()\"\n >\n <input\n type=\"checkbox\"\n class=\"check\"\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate()\"\n [disabled]=\"isDisabled()\"\n [attr.name]=\"name()\"\n [attr.id]=\"controlId()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onCheckedChange($event)\"\n (blur)=\"markTouched()\"\n />\n\n @if (label()) {\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n }\n </label>\n }\n </span>\n\n <ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"
|
|
9559
|
+
], template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"isDisabled()\"\n >\n <input\n type=\"checkbox\"\n class=\"check\"\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate()\"\n [disabled]=\"isDisabled()\"\n [attr.name]=\"name()\"\n [attr.id]=\"controlId()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onCheckedChange($event)\"\n (blur)=\"markTouched()\"\n />\n\n @if (label()) {\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n }\n </label>\n }\n\n @if (devMode) {\n <span dsProjectionDropped=\"ds-checkbox\">\n <ng-content></ng-content>\n </span>\n }\n </span>\n\n <ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n />\n</div>\n", styles: [":host{--_checkbox-focus-shadow: var(--ds-checkbox-focus-shadow, var(--ds-control-focus-shadow));--_checkbox-bg: var(--ds-checkbox-bg-color, var(--surface-default));--_checkbox-border: var(--ds-checkbox-border-color, var(--border-strong));--_checkbox-hover-border: var(--ds-checkbox-hover-border-color, var(--accent));--_checkbox-selected-bg: var(--ds-checkbox-selected-bg-color, var(--accent));--_checkbox-selected-border: var(--ds-checkbox-selected-border-color, var(--accent));--_checkbox-radius: var(--ds-checkbox-radius, var(--radius-sm));--_checkbox-glyph: var(--check-size);--_checkbox-label-fs: var(--font-size-s);display:inline-flex}.checkbox-field{display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap)}.checkbox-field.size-sm{--_checkbox-glyph: var(--check-glyph-sm);--_checkbox-label-fs: var(--font-size-xs)}.checkbox-field.size-lg{--_checkbox-glyph: var(--check-glyph-lg);--_checkbox-label-fs: var(--font-size-m)}.control-line{display:inline-flex;align-items:center;gap:var(--space-2)}.control-line .control-text{font:var(--font-weight-regular) var(--_checkbox-label-fs)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer;-webkit-user-select:none;user-select:none}.control-line .control-text .req{color:var(--error);font-weight:var(--font-weight-semibold);margin-inline-start:var(--space-1)}.control-line.is-disabled .control-text{color:var(--text-disabled);cursor:not-allowed}.check{appearance:none;width:var(--_checkbox-glyph);height:var(--_checkbox-glyph);border:var(--check-bw) solid var(--_checkbox-border);background:var(--_checkbox-bg);cursor:pointer;display:inline-grid;place-items:center;flex-shrink:0;margin:0;border-radius:var(--_checkbox-radius);transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard)}.check:hover:not(:disabled){border-color:var(--_checkbox-hover-border)}.check:focus-visible{outline:none;box-shadow:var(--_checkbox-focus-shadow)}.check:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.check:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.check:after{content:\"\";transform:scale(.6);opacity:0;transform-origin:center;transition:transform var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.check:checked{background:var(--_checkbox-selected-bg);border-color:var(--_checkbox-selected-border)}.check:checked:after{content:\"\";width:var(--check-tick-size);height:var(--check-tick-size);background:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\") center/contain no-repeat;transform:scale(1);opacity:1}.check:indeterminate{background:var(--_checkbox-selected-bg);border-color:var(--_checkbox-selected-border)}.check:indeterminate:after{content:\"\";width:var(--check-indet-w);height:var(--check-indet-h);background:var(--icon-on-primary);border-radius:var(--radius-sm);transform:scale(1);opacity:1}\n"] }]
|
|
9151
9560
|
}], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], reserveMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveMessage", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }] } });
|
|
9152
9561
|
|
|
9153
9562
|
const RADIO_GROUP = new InjectionToken('RADIO_GROUP');
|
|
@@ -9169,9 +9578,11 @@ class RadioComponent {
|
|
|
9169
9578
|
/** Helper text shown below the control. */
|
|
9170
9579
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
9171
9580
|
/** Reserve the message-row height even when empty, so the field doesn't shift
|
|
9172
|
-
* the layout below it when a hint/error appears.
|
|
9173
|
-
*
|
|
9174
|
-
|
|
9581
|
+
* the layout below it when a hint/error appears. Falls back to
|
|
9582
|
+
* `DS_CONFIG.field.reserveMessage`, then off — opt in per field, or app-wide
|
|
9583
|
+
* for a form that shows validation messages. */
|
|
9584
|
+
reserveMessage = input(null, { ...(ngDevMode ? { debugName: "reserveMessage" } : /* istanbul ignore next */ {}), transform: (value) => (value == null ? null : booleanAttribute(value)) });
|
|
9585
|
+
reserveMessageResolved = resolveReserveMessage(this.reserveMessage);
|
|
9175
9586
|
/** Control size — sm/md/lg. */
|
|
9176
9587
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
9177
9588
|
/** Marks the radio required — shows an asterisk on the label and sets `aria-required`. */
|
|
@@ -9212,12 +9623,13 @@ class RadioComponent {
|
|
|
9212
9623
|
this.checked.set(true);
|
|
9213
9624
|
}
|
|
9214
9625
|
}
|
|
9626
|
+
devMode = isDevMode();
|
|
9215
9627
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: RadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9216
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: RadioComponent, isStandalone: true, selector: "ds-radio", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, reserveMessage: { classPropertyName: "reserveMessage", publicName: "reserveMessage", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"effectiveDisabled()\"\n >\n <input\n #inputRef\n type=\"radio\"\n class=\"radio\"\n [checked]=\"isChecked()\"\n [disabled]=\"effectiveDisabled()\"\n [attr.name]=\"effectiveName() || null\"\n [attr.value]=\"value() ?? null\"\n [attr.id]=\"controlId()\"\n [attr.tabindex]=\"tabIndexAttr\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onSelect()\"\n />\n\n @if (label()) {\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n }\n </label>\n }\n </span>\n\n <ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"
|
|
9628
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: RadioComponent, isStandalone: true, selector: "ds-radio", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, reserveMessage: { classPropertyName: "reserveMessage", publicName: "reserveMessage", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"effectiveDisabled()\"\n >\n <input\n #inputRef\n type=\"radio\"\n class=\"radio\"\n [checked]=\"isChecked()\"\n [disabled]=\"effectiveDisabled()\"\n [attr.name]=\"effectiveName() || null\"\n [attr.value]=\"value() ?? null\"\n [attr.id]=\"controlId()\"\n [attr.tabindex]=\"tabIndexAttr\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onSelect()\"\n />\n\n @if (label()) {\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n }\n </label>\n }\n\n @if (devMode) {\n <span dsProjectionDropped=\"ds-radio\">\n <ng-content></ng-content>\n </span>\n }\n </span>\n\n <ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n />\n</div>\n", styles: [":host{--_radio-focus-shadow: var(--ds-radio-focus-shadow, var(--ds-control-focus-shadow));--_radio-accent-color: var(--ds-radio-accent-color, var(--accent));--_radio-bg-color: var(--ds-radio-bg-color, var(--surface-default));--_radio-border-color: var(--ds-radio-border-color, var(--border-strong));--_radio-label-color: var(--ds-radio-label-color, var(--text-primary));--_radio-glyph: var(--check-size);--_radio-label-fs: var(--font-size-s);display:inline-flex}.radio-field{display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap)}.radio-field.size-sm{--_radio-glyph: var(--radio-glyph-sm);--_radio-label-fs: var(--font-size-xs)}.radio-field.size-lg{--_radio-glyph: var(--radio-glyph-lg);--_radio-label-fs: var(--font-size-m)}.control-line{display:inline-flex;align-items:center;gap:var(--space-2)}.control-line .control-text{font:var(--font-weight-regular) var(--_radio-label-fs)/var(--line-height-base) var(--font-sans);color:var(--_radio-label-color);cursor:pointer;-webkit-user-select:none;user-select:none}.control-line .control-text .req{color:var(--error);font-weight:var(--font-weight-semibold);margin-inline-start:var(--space-1)}.control-line.is-disabled .control-text{color:var(--text-disabled);cursor:not-allowed}.radio{appearance:none;width:var(--_radio-glyph);height:var(--_radio-glyph);border:var(--check-bw) solid var(--_radio-border-color);background:var(--_radio-bg-color);cursor:pointer;display:inline-grid;place-items:center;flex-shrink:0;margin:0;border-radius:var(--radius-pill);transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),border-width var(--duration-fast) var(--ease-standard)}.radio:hover:not(:disabled){border-color:var(--accent)}.radio:focus-visible{outline:none;box-shadow:var(--_radio-focus-shadow)}.radio:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.radio:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.radio:after{content:\"\";transform:scale(0);opacity:0;transform-origin:center;transition:transform var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.radio:checked{border-color:var(--_radio-accent-color);border-width:var(--radio-bw-checked)}.radio:checked:after{content:\"\";width:var(--radio-dot-size);height:var(--radio-dot-size);border-radius:var(--radius-pill);background:var(--_radio-accent-color);transform:scale(1);opacity:1}\n"], dependencies: [{ kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }, { kind: "directive", type: ProjectionDroppedDirective, selector: "[dsProjectionDropped]", inputs: ["dsProjectionDropped"] }] });
|
|
9217
9629
|
}
|
|
9218
9630
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: RadioComponent, decorators: [{
|
|
9219
9631
|
type: Component,
|
|
9220
|
-
args: [{ selector: 'ds-radio', standalone: true, imports: [FieldMessageComponent], encapsulation: ViewEncapsulation.Emulated, template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"effectiveDisabled()\"\n >\n <input\n #inputRef\n type=\"radio\"\n class=\"radio\"\n [checked]=\"isChecked()\"\n [disabled]=\"effectiveDisabled()\"\n [attr.name]=\"effectiveName() || null\"\n [attr.value]=\"value() ?? null\"\n [attr.id]=\"controlId()\"\n [attr.tabindex]=\"tabIndexAttr\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onSelect()\"\n />\n\n @if (label()) {\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n }\n </label>\n }\n </span>\n\n <ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"
|
|
9632
|
+
args: [{ selector: 'ds-radio', standalone: true, imports: [FieldMessageComponent, ProjectionDroppedDirective], encapsulation: ViewEncapsulation.Emulated, template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"effectiveDisabled()\"\n >\n <input\n #inputRef\n type=\"radio\"\n class=\"radio\"\n [checked]=\"isChecked()\"\n [disabled]=\"effectiveDisabled()\"\n [attr.name]=\"effectiveName() || null\"\n [attr.value]=\"value() ?? null\"\n [attr.id]=\"controlId()\"\n [attr.tabindex]=\"tabIndexAttr\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onSelect()\"\n />\n\n @if (label()) {\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n }\n </label>\n }\n\n @if (devMode) {\n <span dsProjectionDropped=\"ds-radio\">\n <ng-content></ng-content>\n </span>\n }\n </span>\n\n <ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n />\n</div>\n", styles: [":host{--_radio-focus-shadow: var(--ds-radio-focus-shadow, var(--ds-control-focus-shadow));--_radio-accent-color: var(--ds-radio-accent-color, var(--accent));--_radio-bg-color: var(--ds-radio-bg-color, var(--surface-default));--_radio-border-color: var(--ds-radio-border-color, var(--border-strong));--_radio-label-color: var(--ds-radio-label-color, var(--text-primary));--_radio-glyph: var(--check-size);--_radio-label-fs: var(--font-size-s);display:inline-flex}.radio-field{display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap)}.radio-field.size-sm{--_radio-glyph: var(--radio-glyph-sm);--_radio-label-fs: var(--font-size-xs)}.radio-field.size-lg{--_radio-glyph: var(--radio-glyph-lg);--_radio-label-fs: var(--font-size-m)}.control-line{display:inline-flex;align-items:center;gap:var(--space-2)}.control-line .control-text{font:var(--font-weight-regular) var(--_radio-label-fs)/var(--line-height-base) var(--font-sans);color:var(--_radio-label-color);cursor:pointer;-webkit-user-select:none;user-select:none}.control-line .control-text .req{color:var(--error);font-weight:var(--font-weight-semibold);margin-inline-start:var(--space-1)}.control-line.is-disabled .control-text{color:var(--text-disabled);cursor:not-allowed}.radio{appearance:none;width:var(--_radio-glyph);height:var(--_radio-glyph);border:var(--check-bw) solid var(--_radio-border-color);background:var(--_radio-bg-color);cursor:pointer;display:inline-grid;place-items:center;flex-shrink:0;margin:0;border-radius:var(--radius-pill);transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),border-width var(--duration-fast) var(--ease-standard)}.radio:hover:not(:disabled){border-color:var(--accent)}.radio:focus-visible{outline:none;box-shadow:var(--_radio-focus-shadow)}.radio:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.radio:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);cursor:not-allowed}.radio:after{content:\"\";transform:scale(0);opacity:0;transform-origin:center;transition:transform var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.radio:checked{border-color:var(--_radio-accent-color);border-width:var(--radio-bw-checked)}.radio:checked:after{content:\"\";width:var(--radio-dot-size);height:var(--radio-dot-size);border-radius:var(--radius-pill);background:var(--_radio-accent-color);transform:scale(1);opacity:1}\n"] }]
|
|
9221
9633
|
}], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], reserveMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveMessage", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], inputElement: [{ type: i0.ViewChild, args: ['inputRef', { isSignal: true }] }] } });
|
|
9222
9634
|
|
|
9223
9635
|
class RadioGroupComponent extends DsControlValueAccessor {
|
|
@@ -9232,9 +9644,11 @@ class RadioGroupComponent extends DsControlValueAccessor {
|
|
|
9232
9644
|
/** Helper text shown below the group. */
|
|
9233
9645
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
9234
9646
|
/** Reserve the message-row height even when empty, so the field doesn't shift
|
|
9235
|
-
* the layout below it when a hint/error appears.
|
|
9236
|
-
*
|
|
9237
|
-
|
|
9647
|
+
* the layout below it when a hint/error appears. Falls back to
|
|
9648
|
+
* `DS_CONFIG.field.reserveMessage`, then off — opt in per field, or app-wide
|
|
9649
|
+
* for a form that shows validation messages. */
|
|
9650
|
+
reserveMessage = input(null, { ...(ngDevMode ? { debugName: "reserveMessage" } : /* istanbul ignore next */ {}), transform: (value) => (value == null ? null : booleanAttribute(value)) });
|
|
9651
|
+
reserveMessageResolved = resolveReserveMessage(this.reserveMessage);
|
|
9238
9652
|
/** Accessible name for the group when no visible label is provided. */
|
|
9239
9653
|
ariaLabel = input(null, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
9240
9654
|
/** Visible group label; omit to supply your own. */
|
|
@@ -9336,7 +9750,7 @@ class RadioGroupComponent extends DsControlValueAccessor {
|
|
|
9336
9750
|
provide: RADIO_GROUP,
|
|
9337
9751
|
useExisting: forwardRef(() => RadioGroupComponent),
|
|
9338
9752
|
},
|
|
9339
|
-
], queries: [{ propertyName: "radios", predicate: RadioComponent, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (label()) {\n <span class=\"group-label\">\n {{ label() }}\n </span>\n}\n\n<div class=\"radios\">\n <ng-content />\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"
|
|
9753
|
+
], queries: [{ propertyName: "radios", predicate: RadioComponent, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (label()) {\n <span class=\"group-label\">\n {{ label() }}\n </span>\n}\n\n<div class=\"radios\">\n <ng-content />\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n/>\n", styles: [":host{display:flex;flex-direction:column;gap:var(--field-label-gap)}.group-label{font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--text-secondary)}.radios{display:flex;flex-direction:column;gap:var(--space-2, 8px)}\n"], dependencies: [{ kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }] });
|
|
9340
9754
|
}
|
|
9341
9755
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: RadioGroupComponent, decorators: [{
|
|
9342
9756
|
type: Component,
|
|
@@ -9356,7 +9770,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
9356
9770
|
provide: RADIO_GROUP,
|
|
9357
9771
|
useExisting: forwardRef(() => RadioGroupComponent),
|
|
9358
9772
|
},
|
|
9359
|
-
], template: "@if (label()) {\n <span class=\"group-label\">\n {{ label() }}\n </span>\n}\n\n<div class=\"radios\">\n <ng-content />\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"
|
|
9773
|
+
], template: "@if (label()) {\n <span class=\"group-label\">\n {{ label() }}\n </span>\n}\n\n<div class=\"radios\">\n <ng-content />\n</div>\n\n<ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n/>\n", styles: [":host{display:flex;flex-direction:column;gap:var(--field-label-gap)}.group-label{font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--text-secondary)}.radios{display:flex;flex-direction:column;gap:var(--space-2, 8px)}\n"] }]
|
|
9360
9774
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], reserveMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveMessage", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], radios: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => RadioComponent), { isSignal: true }] }] } });
|
|
9361
9775
|
|
|
9362
9776
|
class SwitchComponent extends DsBooleanControlValueAccessor {
|
|
@@ -9375,9 +9789,11 @@ class SwitchComponent extends DsBooleanControlValueAccessor {
|
|
|
9375
9789
|
/** Helper text shown below the switch. */
|
|
9376
9790
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
9377
9791
|
/** Reserve the message-row height even when empty, so the field doesn't shift
|
|
9378
|
-
* the layout below it when a hint/error appears.
|
|
9379
|
-
*
|
|
9380
|
-
|
|
9792
|
+
* the layout below it when a hint/error appears. Falls back to
|
|
9793
|
+
* `DS_CONFIG.field.reserveMessage`, then off — opt in per field, or app-wide
|
|
9794
|
+
* for a form that shows validation messages. */
|
|
9795
|
+
reserveMessage = input(null, { ...(ngDevMode ? { debugName: "reserveMessage" } : /* istanbul ignore next */ {}), transform: (value) => (value == null ? null : booleanAttribute(value)) });
|
|
9796
|
+
reserveMessageResolved = resolveReserveMessage(this.reserveMessage);
|
|
9381
9797
|
/** Switch size — sm/md/lg. */
|
|
9382
9798
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
9383
9799
|
/** Marks the field required — shows an asterisk and sets `aria-required`. */
|
|
@@ -9398,6 +9814,7 @@ class SwitchComponent extends DsBooleanControlValueAccessor {
|
|
|
9398
9814
|
onCheckedChange(event) {
|
|
9399
9815
|
this.checked.set(event.target.checked);
|
|
9400
9816
|
}
|
|
9817
|
+
devMode = isDevMode();
|
|
9401
9818
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SwitchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
9402
9819
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SwitchComponent, isStandalone: true, selector: "ds-switch", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, reserveMessage: { classPropertyName: "reserveMessage", publicName: "reserveMessage", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, providers: [
|
|
9403
9820
|
{
|
|
@@ -9405,22 +9822,22 @@ class SwitchComponent extends DsBooleanControlValueAccessor {
|
|
|
9405
9822
|
useExisting: forwardRef(() => SwitchComponent),
|
|
9406
9823
|
multi: true,
|
|
9407
9824
|
},
|
|
9408
|
-
], usesInheritance: true, ngImport: i0, template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"isDisabled()\"\n >\n <input\n type=\"checkbox\"\n role=\"switch\"\n [class]=\"switchClasses()\"\n [checked]=\"checked()\"\n [attr.aria-checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [attr.name]=\"name()\"\n [attr.id]=\"controlId()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onCheckedChange($event)\"\n (blur)=\"markTouched()\"\n />\n\n @if (label()) {\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n }\n </label>\n }\n </span>\n\n <ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"
|
|
9825
|
+
], usesInheritance: true, ngImport: i0, template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"isDisabled()\"\n >\n <input\n type=\"checkbox\"\n role=\"switch\"\n [class]=\"switchClasses()\"\n [checked]=\"checked()\"\n [attr.aria-checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [attr.name]=\"name()\"\n [attr.id]=\"controlId()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onCheckedChange($event)\"\n (blur)=\"markTouched()\"\n />\n\n @if (label()) {\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n }\n </label>\n }\n\n @if (devMode) {\n <span dsProjectionDropped=\"ds-switch\">\n <ng-content></ng-content>\n </span>\n }\n </span>\n\n <ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n />\n</div>\n", styles: [":host{--_switch-focus-shadow: var(--ds-switch-focus-shadow, var(--ds-control-focus-shadow));--_switch-track-w: var(--switch-track-w);--_switch-track-h: var(--switch-track-h);--_switch-thumb-size: var(--switch-thumb-size);--_switch-thumb-pad: var(--switch-thumb-pad);--_switch-label-fs: var(--font-size-s);--_switch-track-on-bg-color: var(--ds-switch-track-on-bg-color, var(--accent));--_switch-track-off-bg-color: var(--ds-switch-track-off-bg-color, var(--border-strong));--_switch-thumb-bg-color: var(--ds-switch-thumb-bg-color, var(--surface-default));display:inline-flex}.switch-field{display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap)}.switch-field.size-sm{--_switch-track-w: 26px;--_switch-track-h: 14px;--_switch-thumb-size: 10px;--_switch-thumb-pad: var(--switch-thumb-pad);--_switch-label-fs: var(--font-size-xs)}.switch-field.size-lg{--_switch-track-w: 48px;--_switch-track-h: 26px;--_switch-thumb-size: 22px;--_switch-thumb-pad: var(--switch-thumb-pad);--_switch-label-fs: var(--font-size-m)}.control-line{display:inline-flex;align-items:center;gap:var(--space-2)}.control-line .control-text{font:var(--font-weight-regular) var(--_switch-label-fs)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer;-webkit-user-select:none;user-select:none}.control-line .control-text .req{color:var(--error);font-weight:var(--font-weight-semibold);margin-inline-start:var(--space-1)}.control-line.is-disabled .control-text{color:var(--text-disabled);cursor:not-allowed}.switch{appearance:none;width:var(--_switch-track-w);height:var(--_switch-track-h);background:var(--_switch-track-off-bg-color);border-radius:var(--radius-pill);position:relative;cursor:pointer;flex-shrink:0;margin:0;transition:background-color var(--duration-base) var(--ease-standard)}.switch:after{content:\"\";position:absolute;top:var(--_switch-thumb-pad);left:var(--_switch-thumb-pad);width:var(--_switch-thumb-size);height:var(--_switch-thumb-size);background:var(--_switch-thumb-bg-color);border-radius:var(--radius-pill);box-shadow:var(--shadow-1);transition:transform var(--duration-base) var(--ease-standard),box-shadow var(--duration-base) var(--ease-standard)}.switch:checked{background:var(--_switch-track-on-bg-color)}.switch:checked:after{transform:translate(calc(var(--_switch-track-w) - var(--_switch-thumb-size) - 2 * var(--_switch-thumb-pad)))}.switch:focus-visible{outline:none;box-shadow:var(--_switch-focus-shadow)}.switch:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.switch:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.switch.success:checked{background:var(--success)}.switch.error:checked{background:var(--error)}\n"], dependencies: [{ kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }, { kind: "directive", type: ProjectionDroppedDirective, selector: "[dsProjectionDropped]", inputs: ["dsProjectionDropped"] }] });
|
|
9409
9826
|
}
|
|
9410
9827
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SwitchComponent, decorators: [{
|
|
9411
9828
|
type: Component,
|
|
9412
|
-
args: [{ selector: 'ds-switch', standalone: true, imports: [FieldMessageComponent], encapsulation: ViewEncapsulation.Emulated, providers: [
|
|
9829
|
+
args: [{ selector: 'ds-switch', standalone: true, imports: [FieldMessageComponent, ProjectionDroppedDirective], encapsulation: ViewEncapsulation.Emulated, providers: [
|
|
9413
9830
|
{
|
|
9414
9831
|
provide: NG_VALUE_ACCESSOR,
|
|
9415
9832
|
useExisting: forwardRef(() => SwitchComponent),
|
|
9416
9833
|
multi: true,
|
|
9417
9834
|
},
|
|
9418
|
-
], template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"isDisabled()\"\n >\n <input\n type=\"checkbox\"\n role=\"switch\"\n [class]=\"switchClasses()\"\n [checked]=\"checked()\"\n [attr.aria-checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [attr.name]=\"name()\"\n [attr.id]=\"controlId()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onCheckedChange($event)\"\n (blur)=\"markTouched()\"\n />\n\n @if (label()) {\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n }\n </label>\n }\n </span>\n\n <ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"
|
|
9835
|
+
], template: "<div [class]=\"fieldClass()\">\n <span\n class=\"control-line\"\n [class.is-disabled]=\"isDisabled()\"\n >\n <input\n type=\"checkbox\"\n role=\"switch\"\n [class]=\"switchClasses()\"\n [checked]=\"checked()\"\n [attr.aria-checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [attr.name]=\"name()\"\n [attr.id]=\"controlId()\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n (change)=\"onCheckedChange($event)\"\n (blur)=\"markTouched()\"\n />\n\n @if (label()) {\n <label\n class=\"control-text\"\n [attr.for]=\"controlId()\"\n >\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\"\n >\n *\n </span>\n }\n </label>\n }\n\n @if (devMode) {\n <span dsProjectionDropped=\"ds-switch\">\n <ng-content></ng-content>\n </span>\n }\n </span>\n\n <ds-field-message\n [text]=\"hint()\"\n [state]=\"messageState()\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\"\n />\n</div>\n", styles: [":host{--_switch-focus-shadow: var(--ds-switch-focus-shadow, var(--ds-control-focus-shadow));--_switch-track-w: var(--switch-track-w);--_switch-track-h: var(--switch-track-h);--_switch-thumb-size: var(--switch-thumb-size);--_switch-thumb-pad: var(--switch-thumb-pad);--_switch-label-fs: var(--font-size-s);--_switch-track-on-bg-color: var(--ds-switch-track-on-bg-color, var(--accent));--_switch-track-off-bg-color: var(--ds-switch-track-off-bg-color, var(--border-strong));--_switch-thumb-bg-color: var(--ds-switch-thumb-bg-color, var(--surface-default));display:inline-flex}.switch-field{display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap)}.switch-field.size-sm{--_switch-track-w: 26px;--_switch-track-h: 14px;--_switch-thumb-size: 10px;--_switch-thumb-pad: var(--switch-thumb-pad);--_switch-label-fs: var(--font-size-xs)}.switch-field.size-lg{--_switch-track-w: 48px;--_switch-track-h: 26px;--_switch-thumb-size: 22px;--_switch-thumb-pad: var(--switch-thumb-pad);--_switch-label-fs: var(--font-size-m)}.control-line{display:inline-flex;align-items:center;gap:var(--space-2)}.control-line .control-text{font:var(--font-weight-regular) var(--_switch-label-fs)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer;-webkit-user-select:none;user-select:none}.control-line .control-text .req{color:var(--error);font-weight:var(--font-weight-semibold);margin-inline-start:var(--space-1)}.control-line.is-disabled .control-text{color:var(--text-disabled);cursor:not-allowed}.switch{appearance:none;width:var(--_switch-track-w);height:var(--_switch-track-h);background:var(--_switch-track-off-bg-color);border-radius:var(--radius-pill);position:relative;cursor:pointer;flex-shrink:0;margin:0;transition:background-color var(--duration-base) var(--ease-standard)}.switch:after{content:\"\";position:absolute;top:var(--_switch-thumb-pad);left:var(--_switch-thumb-pad);width:var(--_switch-thumb-size);height:var(--_switch-thumb-size);background:var(--_switch-thumb-bg-color);border-radius:var(--radius-pill);box-shadow:var(--shadow-1);transition:transform var(--duration-base) var(--ease-standard),box-shadow var(--duration-base) var(--ease-standard)}.switch:checked{background:var(--_switch-track-on-bg-color)}.switch:checked:after{transform:translate(calc(var(--_switch-track-w) - var(--_switch-thumb-size) - 2 * var(--_switch-thumb-pad)))}.switch:focus-visible{outline:none;box-shadow:var(--_switch-focus-shadow)}.switch:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.switch:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.switch.success:checked{background:var(--success)}.switch.error:checked{background:var(--error)}\n"] }]
|
|
9419
9836
|
}], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], reserveMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "reserveMessage", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }] } });
|
|
9420
9837
|
|
|
9421
9838
|
/**
|
|
9422
9839
|
* Generated bundle index. Do not edit.
|
|
9423
9840
|
*/
|
|
9424
9841
|
|
|
9425
|
-
export { ACCORDION, AccordionComponent, AccordionItemComponent, AlertComponent, AppLayoutComponent, AutocompleteComponent, AvatarComponent, AvatarGroupComponent, BadgeComponent, BannerComponent, BodyScrollLockService, BottomSheetComponent, BrandNameDirective, BreadcrumbsComponent, BreadcrumbsService, ButtonComponent, ButtonGroupComponent, CardComponent, CellTemplateDirective, CheckboxComponent, ColorPickerComponent, ContainerComponent, DS_CONFIG, DS_ICON_REGISTRY, DS_TOAST_CONFIG, DS_TOAST_POSITION, DS_TOAST_POSITION_DEFAULT, DatePickerComponent, DescriptionItemComponent, DescriptionListComponent, DividerComponent, DrawerComponent, DropzoneComponent, DsOverlayCloseRef, DsStaticPreview, EmptyStateComponent, FieldClickFocusDirective, ICONS, IconButtonComponent, IconComponent, InlineComponent, InputComponent, LayoutScrollService, ListComponent, ListItemComponent, LoadingOverlayComponent, MenuComponent, MenuDividerComponent, MenuItemComponent, ModalCardComponent, ModalComponent, ModalService, MultiSelectComponent, NumberStepperComponent, OtpInputComponent, PageFooterComponent, PageHeaderComponent, PaginationComponent, PopoverComponent, ProgressComponent, RADIO_GROUP, RadioComponent, RadioGroupComponent, SIDENAV, SearchComponent, SegmentedComponent, SelectComponent, SidenavComponent, SidenavFooterComponent, SidenavGroupComponent, SidenavItemComponent, SkeletonComponent, SliderComponent, SpinnerComponent, SplitButtonComponent, StackComponent, StatComponent, StatusDotComponent, StepperComponent, SwitchComponent, TabComponent, TableComponent, TabsComponent, TagComponent, TextareaComponent, TimePickerComponent, TimelineComponent, TimelineItemComponent, ToastComponent, ToastRegionComponent, ToastService, ToggleButtonComponent, TooltipDirective, TooltipPanelComponent, TopBarComponent, TreeComponent, W3wComponent, avatarTint, initialsFrom, isSelectOptionGroup, provideDsConfig, provideDsIcons, provideDsTheme };
|
|
9842
|
+
export { ACCORDION, AccordionComponent, AccordionItemComponent, AlertComponent, AppLayoutComponent, AutocompleteComponent, AvatarComponent, AvatarGroupComponent, BadgeComponent, BannerComponent, BodyScrollLockService, BottomSheetComponent, BrandNameDirective, BreadcrumbsComponent, BreadcrumbsService, ButtonComponent, ButtonGroupComponent, CardComponent, CellTemplateDirective, CheckboxComponent, ColorPickerComponent, ContainerComponent, DS_CONFIG, DS_ICON_REGISTRY, DS_TOAST_CONFIG, DS_TOAST_POSITION, DS_TOAST_POSITION_DEFAULT, DatePickerComponent, DescriptionItemComponent, DescriptionListComponent, DividerComponent, DrawerComponent, DropzoneComponent, DsOverlayCloseRef, DsStaticPreview, EmptyStateComponent, FieldClickFocusDirective, ICONS, IconButtonComponent, IconComponent, InlineComponent, InputComponent, LayoutScrollService, ListComponent, ListItemComponent, LoadingOverlayComponent, MenuComponent, MenuDividerComponent, MenuItemComponent, ModalCardComponent, ModalComponent, ModalService, MultiSelectComponent, NumberStepperComponent, OtpInputComponent, PageFooterComponent, PageHeaderComponent, PaginationComponent, PopoverComponent, ProgressComponent, RADIO_GROUP, RadioComponent, RadioGroupComponent, ReserveMessagesDirective, SIDENAV, SearchComponent, SegmentedComponent, SelectComponent, SidenavComponent, SidenavFooterComponent, SidenavGroupComponent, SidenavItemComponent, SkeletonComponent, SliderComponent, SpinnerComponent, SplitButtonComponent, StackComponent, StatComponent, StatusDotComponent, StepperComponent, SwitchComponent, TabComponent, TableComponent, TabsComponent, TagComponent, TextareaComponent, TimePickerComponent, TimelineComponent, TimelineItemComponent, ToastComponent, ToastRegionComponent, ToastService, ToggleButtonComponent, TooltipDirective, TooltipPanelComponent, TopBarComponent, TreeComponent, W3wComponent, avatarTint, inheritDsConfig, initialsFrom, isSelectOptionGroup, provideDsConfig, provideDsIcons, provideDsTheme };
|
|
9426
9843
|
//# sourceMappingURL=ids-group-ltd-ids-design-system.mjs.map
|