@jdpo2008/ngx-ds 0.4.0 → 0.6.0
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/README.md +16 -0
- package/fesm2022/jdpo2008-ngx-ds.mjs +933 -165
- package/fesm2022/jdpo2008-ngx-ds.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/_themes.scss +5 -0
- package/styles/_tokens.scss +7 -1
- package/types/jdpo2008-ngx-ds.d.ts +238 -8
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal, Injectable, InjectionToken, inject, provideAppInitializer, makeEnvironmentProviders, DOCUMENT, DestroyRef, ElementRef, Directive, input, ChangeDetectionStrategy, Component, computed, output, ViewEncapsulation, ApplicationRef, EnvironmentInjector, createComponent, model, forwardRef, Renderer2, viewChild, Injector, afterNextRender, effect, untracked, viewChildren, contentChildren, afterRenderEffect, linkedSignal, TemplateRef, contentChild } from '@angular/core';
|
|
2
|
+
import { signal, Injectable, InjectionToken, inject, provideAppInitializer, makeEnvironmentProviders, DOCUMENT, DestroyRef, isDevMode, ElementRef, Directive, input, ChangeDetectionStrategy, Component, computed, output, ViewEncapsulation, ApplicationRef, EnvironmentInjector, createComponent, model, forwardRef, Renderer2, viewChild, Injector, afterNextRender, effect, untracked, viewChildren, contentChildren, afterRenderEffect, linkedSignal, TemplateRef, contentChild } from '@angular/core';
|
|
3
3
|
import { DOCUMENT as DOCUMENT$1, NgTemplateOutlet, CommonModule } from '@angular/common';
|
|
4
4
|
import * as i1 from 'lucide-angular';
|
|
5
|
-
import { LucideAngularModule, X, EyeOff, Eye, ChevronDown, ChevronUp, Check, Search, Calendar, ChevronLeft, ChevronRight, AlertCircle, AlertTriangle, CheckCircle2, Info, Upload, FileImage, FileVideo, FileText, File, Plus, Minus, Star, Clock, Columns3, MoreVertical, ArrowUpDown, ArrowDown, ArrowUp, Inbox, CheckCircle, Bell, BellOff, PanelLeftOpen, PanelLeftClose, Play, Pause } from 'lucide-angular';
|
|
5
|
+
import { LucideAngularModule, X, EyeOff, Eye, ChevronDown, ChevronUp, Check, Search, Calendar, ChevronLeft, ChevronRight, AlertCircle, AlertTriangle, CheckCircle2, Info, Upload, FileImage, FileVideo, FileText, File, Plus, Minus, Star, Clock, Pencil, Columns3, MoreVertical, ArrowUpDown, ArrowDown, ArrowUp, Inbox, CheckCircle, Bell, BellOff, PanelLeftOpen, PanelLeftClose, Play, Pause } from 'lucide-angular';
|
|
6
6
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
7
7
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
8
8
|
|
|
@@ -83,7 +83,12 @@ const NGX_DS_LABELS_ES = {
|
|
|
83
83
|
increment: 'Incrementar',
|
|
84
84
|
decrement: 'Decrementar',
|
|
85
85
|
otpGroup: 'Código de verificación',
|
|
86
|
+
otpDigit: (n, total) => `Dígito ${n} de ${total}`,
|
|
87
|
+
rangeStart: 'Valor mínimo',
|
|
88
|
+
rangeEnd: 'Valor máximo',
|
|
86
89
|
removeTag: (label) => `Eliminar ${label}`,
|
|
90
|
+
edit: (label) => (label ? `Editar ${label}` : 'Editar'),
|
|
91
|
+
save: 'Guardar',
|
|
87
92
|
removeChip: (label) => `Quitar ${label}`,
|
|
88
93
|
rating: 'Valoración',
|
|
89
94
|
ratingStar: (n) => `${n} estrella${n > 1 ? 's' : ''}`,
|
|
@@ -195,7 +200,12 @@ const NGX_DS_LABELS_EN = {
|
|
|
195
200
|
increment: 'Increment',
|
|
196
201
|
decrement: 'Decrement',
|
|
197
202
|
otpGroup: 'Verification code',
|
|
203
|
+
otpDigit: (n, total) => `Digit ${n} of ${total}`,
|
|
204
|
+
rangeStart: 'Minimum value',
|
|
205
|
+
rangeEnd: 'Maximum value',
|
|
198
206
|
removeTag: (label) => `Remove ${label}`,
|
|
207
|
+
edit: (label) => (label ? `Edit ${label}` : 'Edit'),
|
|
208
|
+
save: 'Save',
|
|
199
209
|
removeChip: (label) => `Remove ${label}`,
|
|
200
210
|
rating: 'Rating',
|
|
201
211
|
ratingStar: (n) => `${n} star${n > 1 ? 's' : ''}`,
|
|
@@ -380,17 +390,167 @@ function formatDayLabel(date, locale) {
|
|
|
380
390
|
return date.toLocaleDateString(locale, { day: 'numeric', month: 'long', year: 'numeric' });
|
|
381
391
|
}
|
|
382
392
|
|
|
393
|
+
// Runtime primary colour: builds the --primary-* scale from one brand colour.
|
|
394
|
+
//
|
|
395
|
+
// The scale is computed in OKLCH. The brand colour is step 600 (the one behind
|
|
396
|
+
// --fill-primary) and the other steps keep the lightness/chroma ladder of the
|
|
397
|
+
// default indigo palette, so a brand colour of #4f46e5 reproduces the defaults.
|
|
398
|
+
/** Steps of `--primary-*` the components read, in the light and in the dark theme. */
|
|
399
|
+
const PRIMARY_STEPS = [50, 100, 200, 300, 400, 500, 600, 700];
|
|
400
|
+
// Lightness and chroma of each step of the reference ladder (Tailwind indigo in
|
|
401
|
+
// OKLCH), relative to step 600: lighter steps as a share of the way to white,
|
|
402
|
+
// darker ones as a share of the lightness of 600.
|
|
403
|
+
const L600 = 0.511;
|
|
404
|
+
const C600 = 0.262;
|
|
405
|
+
const LADDER = {
|
|
406
|
+
50: [0.962, 0.018],
|
|
407
|
+
100: [0.93, 0.034],
|
|
408
|
+
200: [0.87, 0.065],
|
|
409
|
+
300: [0.785, 0.115],
|
|
410
|
+
400: [0.673, 0.182],
|
|
411
|
+
500: [0.585, 0.233],
|
|
412
|
+
600: [L600, C600],
|
|
413
|
+
700: [0.457, 0.24],
|
|
414
|
+
800: [0.398, 0.195],
|
|
415
|
+
900: [0.359, 0.144],
|
|
416
|
+
950: [0.257, 0.09],
|
|
417
|
+
};
|
|
418
|
+
// The dark theme uses deep shades for the soft backgrounds (50–200) and lighter
|
|
419
|
+
// ones for the accents (500–700), same as _themes.scss.
|
|
420
|
+
const DARK_MAP = {
|
|
421
|
+
50: 950,
|
|
422
|
+
100: 900,
|
|
423
|
+
200: 800,
|
|
424
|
+
500: 400,
|
|
425
|
+
600: 500,
|
|
426
|
+
700: 300,
|
|
427
|
+
};
|
|
428
|
+
/** Parses `#rgb` or `#rrggbb`. Returns `null` for anything else. */
|
|
429
|
+
function parseHex(color) {
|
|
430
|
+
const m = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(color.trim());
|
|
431
|
+
if (!m)
|
|
432
|
+
return null;
|
|
433
|
+
const hex = m[1].length === 3 ? [...m[1]].map((c) => c + c).join('') : m[1];
|
|
434
|
+
return [0, 2, 4].map((i) => parseInt(hex.slice(i, i + 2), 16) / 255);
|
|
435
|
+
}
|
|
436
|
+
const toLinear = (c) => (c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4);
|
|
437
|
+
const fromLinear = (c) => (c <= 0.0031308 ? 12.92 * c : 1.055 * c ** (1 / 2.4) - 0.055);
|
|
438
|
+
function rgbToOklch([r, g, b]) {
|
|
439
|
+
const [lr, lg, lb] = [r, g, b].map(toLinear);
|
|
440
|
+
const l = Math.cbrt(0.4122214708 * lr + 0.5363325363 * lg + 0.0514459929 * lb);
|
|
441
|
+
const m = Math.cbrt(0.2119034982 * lr + 0.6806995451 * lg + 0.1073969566 * lb);
|
|
442
|
+
const s = Math.cbrt(0.0883024619 * lr + 0.2817188376 * lg + 0.6299787005 * lb);
|
|
443
|
+
const L = 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s;
|
|
444
|
+
const a = 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s;
|
|
445
|
+
const bb = 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s;
|
|
446
|
+
return [L, Math.hypot(a, bb), (Math.atan2(bb, a) * 180) / Math.PI];
|
|
447
|
+
}
|
|
448
|
+
/** Linear sRGB of an OKLCH colour; may fall outside [0, 1]. */
|
|
449
|
+
function oklchToLinear([L, C, H]) {
|
|
450
|
+
const a = C * Math.cos((H * Math.PI) / 180);
|
|
451
|
+
const b = C * Math.sin((H * Math.PI) / 180);
|
|
452
|
+
const l = (L + 0.3963377774 * a + 0.2158037573 * b) ** 3;
|
|
453
|
+
const m = (L - 0.1055613458 * a - 0.0638541728 * b) ** 3;
|
|
454
|
+
const s = (L - 0.0894841775 * a - 1.291485548 * b) ** 3;
|
|
455
|
+
return [
|
|
456
|
+
4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s,
|
|
457
|
+
-1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s,
|
|
458
|
+
-0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s,
|
|
459
|
+
];
|
|
460
|
+
}
|
|
461
|
+
const inGamut = (rgb) => rgb.every((c) => c >= -1e-4 && c <= 1 + 1e-4);
|
|
462
|
+
/** Hex of an OKLCH colour, lowering the chroma until it fits in sRGB. */
|
|
463
|
+
function oklchToHex([L, C, H]) {
|
|
464
|
+
let lo = 0;
|
|
465
|
+
let hi = C;
|
|
466
|
+
if (!inGamut(oklchToLinear([L, C, H]))) {
|
|
467
|
+
for (let i = 0; i < 20; i++) {
|
|
468
|
+
const mid = (lo + hi) / 2;
|
|
469
|
+
if (inGamut(oklchToLinear([L, mid, H])))
|
|
470
|
+
lo = mid;
|
|
471
|
+
else
|
|
472
|
+
hi = mid;
|
|
473
|
+
}
|
|
474
|
+
C = lo;
|
|
475
|
+
}
|
|
476
|
+
return ('#' +
|
|
477
|
+
oklchToLinear([L, C, H])
|
|
478
|
+
.map((c) => Math.round(Math.min(1, Math.max(0, fromLinear(c))) * 255))
|
|
479
|
+
.map((c) => c.toString(16).padStart(2, '0'))
|
|
480
|
+
.join(''));
|
|
481
|
+
}
|
|
482
|
+
/** WCAG 2 contrast ratio between two hex colours. */
|
|
483
|
+
function contrastRatio(a, b) {
|
|
484
|
+
const lum = (hex) => {
|
|
485
|
+
const [r, g, bl] = (parseHex(hex) ?? [0, 0, 0]).map(toLinear);
|
|
486
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * bl;
|
|
487
|
+
};
|
|
488
|
+
const [x, y] = [lum(a), lum(b)].sort((p, q) => q - p);
|
|
489
|
+
return (x + 0.05) / (y + 0.05);
|
|
490
|
+
}
|
|
491
|
+
/**
|
|
492
|
+
* Builds the `--primary-*` scale from a brand colour (`#rgb` / `#rrggbb`), which
|
|
493
|
+
* becomes step 600 in the light theme. Throws on an invalid colour.
|
|
494
|
+
*/
|
|
495
|
+
function createPrimaryPalette(color) {
|
|
496
|
+
const rgb = parseHex(color);
|
|
497
|
+
if (!rgb)
|
|
498
|
+
throw new Error(`ngx-ds: invalid primary colour "${color}", use #rgb or #rrggbb.`);
|
|
499
|
+
const [l, c, h] = rgbToOklch(rgb);
|
|
500
|
+
const exact = '#' +
|
|
501
|
+
rgb
|
|
502
|
+
.map((v) => Math.round(v * 255)
|
|
503
|
+
.toString(16)
|
|
504
|
+
.padStart(2, '0'))
|
|
505
|
+
.join('');
|
|
506
|
+
const step = (n) => {
|
|
507
|
+
if (n === 600)
|
|
508
|
+
return exact;
|
|
509
|
+
const [refL, refC] = LADDER[n];
|
|
510
|
+
const L = refL > L600 ? l + ((refL - L600) / (1 - L600)) * (1 - l) : (refL / L600) * l;
|
|
511
|
+
return oklchToHex([L, (refC / C600) * c, h]);
|
|
512
|
+
};
|
|
513
|
+
const light = Object.fromEntries(PRIMARY_STEPS.map((n) => [n, step(n)]));
|
|
514
|
+
const dark = Object.fromEntries(Object.entries(DARK_MAP).map(([n, ref]) => [n, step(ref)]));
|
|
515
|
+
return { light, dark };
|
|
516
|
+
}
|
|
517
|
+
/** CSS that sets the palette on `:root`, with the dark overrides for `data-theme="dark"` / `.dark`. */
|
|
518
|
+
function primaryPaletteCss({ light, dark }) {
|
|
519
|
+
const decls = (steps) => Object.entries(steps)
|
|
520
|
+
.map(([n, hex]) => `--primary-${n}:${hex};`)
|
|
521
|
+
.join('');
|
|
522
|
+
return `:root{${decls(light)}}:root[data-theme='dark'],.dark{${decls(dark)}}`;
|
|
523
|
+
}
|
|
524
|
+
const STYLE_ID = 'ngx-ds-primary';
|
|
525
|
+
/**
|
|
526
|
+
* Applies a brand colour as the primary colour of every ngx-ds component, at runtime.
|
|
527
|
+
* Call it again to change it, or with `null` to go back to the default indigo.
|
|
528
|
+
*
|
|
529
|
+
* The styles are not in a cascade layer, so they win over the tokens in `ngx-ds.scss`.
|
|
530
|
+
*/
|
|
531
|
+
function applyPrimaryColor(color, doc = document) {
|
|
532
|
+
doc.getElementById(STYLE_ID)?.remove();
|
|
533
|
+
if (color === null)
|
|
534
|
+
return;
|
|
535
|
+
const style = doc.createElement('style');
|
|
536
|
+
style.id = STYLE_ID;
|
|
537
|
+
style.textContent = primaryPaletteCss(createPrimaryPalette(color));
|
|
538
|
+
doc.head.appendChild(style);
|
|
539
|
+
}
|
|
540
|
+
|
|
383
541
|
/**
|
|
384
542
|
* Configures ngx-ds in one call:
|
|
385
543
|
*
|
|
386
544
|
* ```ts
|
|
387
545
|
* bootstrapApplication(AppComponent, {
|
|
388
|
-
* providers: [
|
|
546
|
+
* providers: [
|
|
547
|
+
* provideNgxDs({ locale: 'en-US', theme: 'system', colors: { primary: '#0d9488' } }),
|
|
548
|
+
* ],
|
|
389
549
|
* });
|
|
390
550
|
* ```
|
|
391
551
|
*/
|
|
392
552
|
function provideNgxDs(config = {}) {
|
|
393
|
-
const { locale, labels, theme } = config;
|
|
553
|
+
const { locale, labels, theme, colors } = config;
|
|
394
554
|
const providers = [];
|
|
395
555
|
if (locale)
|
|
396
556
|
providers.push(provideNgxDsLocale(locale));
|
|
@@ -400,6 +560,9 @@ function provideNgxDs(config = {}) {
|
|
|
400
560
|
}
|
|
401
561
|
if (theme)
|
|
402
562
|
providers.push(provideAppInitializer(() => applyTheme(theme)));
|
|
563
|
+
const primary = colors?.primary;
|
|
564
|
+
if (primary)
|
|
565
|
+
providers.push(provideAppInitializer(() => applyPrimary(primary)));
|
|
403
566
|
return makeEnvironmentProviders(providers);
|
|
404
567
|
}
|
|
405
568
|
function applyTheme(theme) {
|
|
@@ -418,6 +581,17 @@ function applyTheme(theme) {
|
|
|
418
581
|
query.addEventListener('change', sync);
|
|
419
582
|
inject(DestroyRef).onDestroy(() => query.removeEventListener('change', sync));
|
|
420
583
|
}
|
|
584
|
+
function applyPrimary(color) {
|
|
585
|
+
applyPrimaryColor(color, inject(DOCUMENT));
|
|
586
|
+
if (!isDevMode())
|
|
587
|
+
return;
|
|
588
|
+
const fill = createPrimaryPalette(color).light[600];
|
|
589
|
+
const ratio = contrastRatio(fill, '#ffffff');
|
|
590
|
+
if (ratio < 4.5) {
|
|
591
|
+
console.warn(`ngx-ds: white text on the primary colour ${fill} has a contrast of ${ratio.toFixed(2)}:1, ` +
|
|
592
|
+
'below the 4.5:1 WCAG AA minimum. Use a darker colour.');
|
|
593
|
+
}
|
|
594
|
+
}
|
|
421
595
|
|
|
422
596
|
const FOCUSABLE_SELECTOR = [
|
|
423
597
|
'a[href]',
|
|
@@ -529,7 +703,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
529
703
|
args: [{ selector: 'ngx-ds-spinner', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [class]=\"hostClasses()\" role=\"status\" [attr.aria-label]=\"i18n.loading\"></span>\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;line-height:0}.spinner{display:inline-block;border-radius:50%;border-style:solid;border-top-color:transparent!important;animation:ngx-spin .8s linear infinite}.spinner--xs{width:.875rem;height:.875rem;border-width:1.5px}.spinner--sm{width:1rem;height:1rem;border-width:2px}.spinner--md{width:1.25rem;height:1.25rem;border-width:2px}.spinner--lg{width:1.75rem;height:1.75rem;border-width:2.5px}.spinner--current{border-color:currentColor}.spinner--primary{border-color:var(--primary-500, #6366f1)}.spinner--secondary{border-color:var(--gray-500, #6b7280)}.spinner--danger{border-color:var(--danger-500, #ef4444)}.spinner--success{border-color:var(--success-500, #10b981)}.spinner--warning{border-color:var(--warning-500, #f59e0b)}@keyframes ngx-spin{to{transform:rotate(360deg)}}\n"] }]
|
|
530
704
|
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }] } });
|
|
531
705
|
|
|
532
|
-
const ICON_SIZE$
|
|
706
|
+
const ICON_SIZE$f = { sm: 14, md: 16, lg: 20 };
|
|
533
707
|
const SPINNER_SIZE = { sm: 'xs', md: 'sm', lg: 'md' };
|
|
534
708
|
class ButtonComponent {
|
|
535
709
|
variant = input('solid', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
@@ -541,6 +715,8 @@ class ButtonComponent {
|
|
|
541
715
|
loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
542
716
|
rounded = input(false, ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
|
|
543
717
|
type = input('button', ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
718
|
+
/** Accessible name for icon-only buttons; set on the native `<button>`. */
|
|
719
|
+
ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
544
720
|
hostClasses = computed(() => {
|
|
545
721
|
const classes = [
|
|
546
722
|
'btn',
|
|
@@ -554,17 +730,17 @@ class ButtonComponent {
|
|
|
554
730
|
classes.push('btn--loading');
|
|
555
731
|
return classes.join(' ');
|
|
556
732
|
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
557
|
-
iconSize = computed(() => ICON_SIZE$
|
|
733
|
+
iconSize = computed(() => ICON_SIZE$f[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
558
734
|
spinnerSize = computed(() => SPINNER_SIZE[this.size()], ...(ngDevMode ? [{ debugName: "spinnerSize" }] : /* istanbul ignore next */ []));
|
|
559
735
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
560
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ButtonComponent, isStandalone: true, selector: "ngx-ds-button", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, iconLeft: { classPropertyName: "iconLeft", publicName: "iconLeft", isSignal: true, isRequired: false, transformFunction: null }, iconRight: { classPropertyName: "iconRight", publicName: "iconRight", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<button
|
|
736
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ButtonComponent, isStandalone: true, selector: "ngx-ds-button", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, iconLeft: { classPropertyName: "iconLeft", publicName: "iconLeft", isSignal: true, isRequired: false, transformFunction: null }, iconRight: { classPropertyName: "iconRight", publicName: "iconRight", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<button\n [type]=\"type()\"\n [class]=\"hostClasses()\"\n [disabled]=\"disabled() || loading() || null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n>\n @if (loading()) {\n <ngx-ds-spinner class=\"btn__icon\" [size]=\"spinnerSize()\" color=\"current\" />\n } @else if (iconLeft()) {\n <ngx-ds-icon class=\"btn__icon\" [icon]=\"iconLeft()!\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n <ng-content />\n @if (!loading() && iconRight()) {\n <ngx-ds-icon class=\"btn__icon\" [icon]=\"iconRight()!\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n</button>\n", styles: [".btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif);font-weight:500;border-radius:.375rem;border:1.5px solid transparent;cursor:pointer;transition:background-color .15s ease,border-color .15s ease,color .15s ease,filter .15s ease;white-space:nowrap;line-height:1;text-decoration:none;-webkit-user-select:none;user-select:none}.btn:focus-visible{outline:2px solid currentColor;outline-offset:2px}.btn:disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.btn--sm{padding:.375rem .75rem;font-size:.75rem}.btn--md{padding:.5rem 1rem;font-size:.875rem}.btn--lg{padding:.75rem 1.5rem;font-size:1rem}.btn--rounded{border-radius:9999px}.btn__icon{flex-shrink:0}.btn--loading{cursor:wait;pointer-events:none;opacity:.85}.btn--primary.btn--solid{background-color:var(--fill-primary, #4f46e5);border-color:var(--fill-primary, #4f46e5);color:var(--text-on-color, #fff)}.btn--primary.btn--solid:hover:not(:disabled){filter:brightness(.88)}.btn--primary.btn--solid:active:not(:disabled){filter:brightness(.78)}.btn--primary.btn--outline{background-color:transparent;border-color:var(--fill-primary, #4f46e5);color:var(--fill-primary, #4f46e5)}.btn--primary.btn--outline:hover:not(:disabled){background-color:var(--fill-primary, #4f46e5);color:var(--text-on-color, #fff)}.btn--primary.btn--outline:active:not(:disabled){background-color:var(--fill-primary, #4f46e5);filter:brightness(.88);color:var(--text-on-color, #fff)}.btn--secondary.btn--solid{background-color:var(--fill-neutral, #6b7280);border-color:var(--fill-neutral, #6b7280);color:var(--text-on-color, #fff)}.btn--secondary.btn--solid:hover:not(:disabled){filter:brightness(.88)}.btn--secondary.btn--solid:active:not(:disabled){filter:brightness(.78)}.btn--secondary.btn--outline{background-color:transparent;border-color:var(--fill-neutral, #6b7280);color:var(--fill-neutral, #6b7280)}.btn--secondary.btn--outline:hover:not(:disabled){background-color:var(--fill-neutral, #6b7280);color:var(--text-on-color, #fff)}.btn--secondary.btn--outline:active:not(:disabled){background-color:var(--fill-neutral, #6b7280);filter:brightness(.88);color:var(--text-on-color, #fff)}.btn--danger.btn--solid{background-color:var(--fill-danger, #dc2626);border-color:var(--fill-danger, #dc2626);color:var(--text-on-color, #fff)}.btn--danger.btn--solid:hover:not(:disabled){filter:brightness(.88)}.btn--danger.btn--solid:active:not(:disabled){filter:brightness(.78)}.btn--danger.btn--outline{background-color:transparent;border-color:var(--fill-danger, #dc2626);color:var(--fill-danger, #dc2626)}.btn--danger.btn--outline:hover:not(:disabled){background-color:var(--fill-danger, #dc2626);color:var(--text-on-color, #fff)}.btn--danger.btn--outline:active:not(:disabled){background-color:var(--fill-danger, #dc2626);filter:brightness(.88);color:var(--text-on-color, #fff)}.btn--success.btn--solid{background-color:var(--fill-success, #047857);border-color:var(--fill-success, #047857);color:var(--text-on-color, #fff)}.btn--success.btn--solid:hover:not(:disabled){filter:brightness(.88)}.btn--success.btn--solid:active:not(:disabled){filter:brightness(.78)}.btn--success.btn--outline{background-color:transparent;border-color:var(--fill-success, #047857);color:var(--fill-success, #047857)}.btn--success.btn--outline:hover:not(:disabled){background-color:var(--fill-success, #047857);color:var(--text-on-color, #fff)}.btn--success.btn--outline:active:not(:disabled){background-color:var(--fill-success, #047857);filter:brightness(.88);color:var(--text-on-color, #fff)}.btn--warning.btn--solid{background-color:var(--fill-warning, #b45309);border-color:var(--fill-warning, #b45309);color:var(--text-on-color, #fff)}.btn--warning.btn--solid:hover:not(:disabled){filter:brightness(.88)}.btn--warning.btn--solid:active:not(:disabled){filter:brightness(.78)}.btn--warning.btn--outline{background-color:transparent;border-color:var(--fill-warning, #b45309);color:var(--fill-warning, #b45309)}.btn--warning.btn--outline:hover:not(:disabled){background-color:var(--fill-warning, #b45309);color:var(--text-on-color, #fff)}.btn--warning.btn--outline:active:not(:disabled){background-color:var(--fill-warning, #b45309);filter:brightness(.88);color:var(--text-on-color, #fff)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }, { kind: "component", type: SpinnerComponent, selector: "ngx-ds-spinner", inputs: ["size", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
561
737
|
}
|
|
562
738
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
563
739
|
type: Component,
|
|
564
|
-
args: [{ selector: 'ngx-ds-button', standalone: true, imports: [IconComponent, SpinnerComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button
|
|
565
|
-
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], iconLeft: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconLeft", required: false }] }], iconRight: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconRight", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }] } });
|
|
740
|
+
args: [{ selector: 'ngx-ds-button', standalone: true, imports: [IconComponent, SpinnerComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n [type]=\"type()\"\n [class]=\"hostClasses()\"\n [disabled]=\"disabled() || loading() || null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n>\n @if (loading()) {\n <ngx-ds-spinner class=\"btn__icon\" [size]=\"spinnerSize()\" color=\"current\" />\n } @else if (iconLeft()) {\n <ngx-ds-icon class=\"btn__icon\" [icon]=\"iconLeft()!\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n <ng-content />\n @if (!loading() && iconRight()) {\n <ngx-ds-icon class=\"btn__icon\" [icon]=\"iconRight()!\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n</button>\n", styles: [".btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif);font-weight:500;border-radius:.375rem;border:1.5px solid transparent;cursor:pointer;transition:background-color .15s ease,border-color .15s ease,color .15s ease,filter .15s ease;white-space:nowrap;line-height:1;text-decoration:none;-webkit-user-select:none;user-select:none}.btn:focus-visible{outline:2px solid currentColor;outline-offset:2px}.btn:disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.btn--sm{padding:.375rem .75rem;font-size:.75rem}.btn--md{padding:.5rem 1rem;font-size:.875rem}.btn--lg{padding:.75rem 1.5rem;font-size:1rem}.btn--rounded{border-radius:9999px}.btn__icon{flex-shrink:0}.btn--loading{cursor:wait;pointer-events:none;opacity:.85}.btn--primary.btn--solid{background-color:var(--fill-primary, #4f46e5);border-color:var(--fill-primary, #4f46e5);color:var(--text-on-color, #fff)}.btn--primary.btn--solid:hover:not(:disabled){filter:brightness(.88)}.btn--primary.btn--solid:active:not(:disabled){filter:brightness(.78)}.btn--primary.btn--outline{background-color:transparent;border-color:var(--fill-primary, #4f46e5);color:var(--fill-primary, #4f46e5)}.btn--primary.btn--outline:hover:not(:disabled){background-color:var(--fill-primary, #4f46e5);color:var(--text-on-color, #fff)}.btn--primary.btn--outline:active:not(:disabled){background-color:var(--fill-primary, #4f46e5);filter:brightness(.88);color:var(--text-on-color, #fff)}.btn--secondary.btn--solid{background-color:var(--fill-neutral, #6b7280);border-color:var(--fill-neutral, #6b7280);color:var(--text-on-color, #fff)}.btn--secondary.btn--solid:hover:not(:disabled){filter:brightness(.88)}.btn--secondary.btn--solid:active:not(:disabled){filter:brightness(.78)}.btn--secondary.btn--outline{background-color:transparent;border-color:var(--fill-neutral, #6b7280);color:var(--fill-neutral, #6b7280)}.btn--secondary.btn--outline:hover:not(:disabled){background-color:var(--fill-neutral, #6b7280);color:var(--text-on-color, #fff)}.btn--secondary.btn--outline:active:not(:disabled){background-color:var(--fill-neutral, #6b7280);filter:brightness(.88);color:var(--text-on-color, #fff)}.btn--danger.btn--solid{background-color:var(--fill-danger, #dc2626);border-color:var(--fill-danger, #dc2626);color:var(--text-on-color, #fff)}.btn--danger.btn--solid:hover:not(:disabled){filter:brightness(.88)}.btn--danger.btn--solid:active:not(:disabled){filter:brightness(.78)}.btn--danger.btn--outline{background-color:transparent;border-color:var(--fill-danger, #dc2626);color:var(--fill-danger, #dc2626)}.btn--danger.btn--outline:hover:not(:disabled){background-color:var(--fill-danger, #dc2626);color:var(--text-on-color, #fff)}.btn--danger.btn--outline:active:not(:disabled){background-color:var(--fill-danger, #dc2626);filter:brightness(.88);color:var(--text-on-color, #fff)}.btn--success.btn--solid{background-color:var(--fill-success, #047857);border-color:var(--fill-success, #047857);color:var(--text-on-color, #fff)}.btn--success.btn--solid:hover:not(:disabled){filter:brightness(.88)}.btn--success.btn--solid:active:not(:disabled){filter:brightness(.78)}.btn--success.btn--outline{background-color:transparent;border-color:var(--fill-success, #047857);color:var(--fill-success, #047857)}.btn--success.btn--outline:hover:not(:disabled){background-color:var(--fill-success, #047857);color:var(--text-on-color, #fff)}.btn--success.btn--outline:active:not(:disabled){background-color:var(--fill-success, #047857);filter:brightness(.88);color:var(--text-on-color, #fff)}.btn--warning.btn--solid{background-color:var(--fill-warning, #b45309);border-color:var(--fill-warning, #b45309);color:var(--text-on-color, #fff)}.btn--warning.btn--solid:hover:not(:disabled){filter:brightness(.88)}.btn--warning.btn--solid:active:not(:disabled){filter:brightness(.78)}.btn--warning.btn--outline{background-color:transparent;border-color:var(--fill-warning, #b45309);color:var(--fill-warning, #b45309)}.btn--warning.btn--outline:hover:not(:disabled){background-color:var(--fill-warning, #b45309);color:var(--text-on-color, #fff)}.btn--warning.btn--outline:active:not(:disabled){background-color:var(--fill-warning, #b45309);filter:brightness(.88);color:var(--text-on-color, #fff)}\n"] }]
|
|
741
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], iconLeft: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconLeft", required: false }] }], iconRight: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconRight", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
566
742
|
|
|
567
|
-
const ICON_SIZE$
|
|
743
|
+
const ICON_SIZE$e = { sm: 14, md: 18, lg: 22 };
|
|
568
744
|
class IconButtonComponent {
|
|
569
745
|
icon = input.required(...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
570
746
|
ariaLabel = input.required(...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
@@ -588,7 +764,7 @@ class IconButtonComponent {
|
|
|
588
764
|
classes.push('icon-btn--borderless');
|
|
589
765
|
return classes.join(' ');
|
|
590
766
|
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
591
|
-
iconSize = computed(() => ICON_SIZE$
|
|
767
|
+
iconSize = computed(() => ICON_SIZE$e[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
592
768
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: IconButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
593
769
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.12", type: IconButtonComponent, isStandalone: true, selector: "ngx-ds-icon-button", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: true, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: true, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<button\n [type]=\"type()\"\n [class]=\"hostClasses()\"\n [disabled]=\"disabled() || null\"\n [attr.aria-label]=\"ariaLabel()\"\n>\n <ngx-ds-icon [icon]=\"icon()\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n</button>\n", styles: [".icon-btn{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:.375rem;border:1.5px solid transparent;cursor:pointer;transition:background-color .15s ease,border-color .15s ease,color .15s ease,filter .15s ease;-webkit-user-select:none;user-select:none}.icon-btn:focus-visible{outline:2px solid currentColor;outline-offset:2px}.icon-btn:disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.icon-btn--sm{width:1.75rem;height:1.75rem}.icon-btn--md{width:2.25rem;height:2.25rem}.icon-btn--lg{width:2.75rem;height:2.75rem}.icon-btn--rounded{border-radius:9999px}.icon-btn--primary.icon-btn--solid{background-color:var(--primary-500, #6366f1);border-color:var(--primary-500, #6366f1);color:var(--text-on-color, #fff)}.icon-btn--primary.icon-btn--solid:hover:not(:disabled){filter:brightness(.88)}.icon-btn--primary.icon-btn--solid:active:not(:disabled){filter:brightness(.78)}.icon-btn--primary.icon-btn--outline{background-color:transparent;border-color:var(--primary-500, #6366f1);color:var(--primary-500, #6366f1)}.icon-btn--primary.icon-btn--outline:hover:not(:disabled){background-color:var(--primary-500, #6366f1);color:var(--text-on-color, #fff)}.icon-btn--primary.icon-btn--outline:active:not(:disabled){background-color:var(--primary-500, #6366f1);filter:brightness(.88);color:var(--text-on-color, #fff)}.icon-btn--secondary.icon-btn--solid{background-color:var(--fill-neutral, #6b7280);border-color:var(--fill-neutral, #6b7280);color:var(--text-on-color, #fff)}.icon-btn--secondary.icon-btn--solid:hover:not(:disabled){filter:brightness(.88)}.icon-btn--secondary.icon-btn--solid:active:not(:disabled){filter:brightness(.78)}.icon-btn--secondary.icon-btn--outline{background-color:transparent;border-color:var(--fill-neutral, #6b7280);color:var(--fill-neutral, #6b7280)}.icon-btn--secondary.icon-btn--outline:hover:not(:disabled){background-color:var(--fill-neutral, #6b7280);color:var(--text-on-color, #fff)}.icon-btn--secondary.icon-btn--outline:active:not(:disabled){background-color:var(--fill-neutral, #6b7280);filter:brightness(.88);color:var(--text-on-color, #fff)}.icon-btn--danger.icon-btn--solid{background-color:var(--danger-500, #ef4444);border-color:var(--danger-500, #ef4444);color:var(--text-on-color, #fff)}.icon-btn--danger.icon-btn--solid:hover:not(:disabled){filter:brightness(.88)}.icon-btn--danger.icon-btn--solid:active:not(:disabled){filter:brightness(.78)}.icon-btn--danger.icon-btn--outline{background-color:transparent;border-color:var(--danger-500, #ef4444);color:var(--danger-500, #ef4444)}.icon-btn--danger.icon-btn--outline:hover:not(:disabled){background-color:var(--danger-500, #ef4444);color:var(--text-on-color, #fff)}.icon-btn--danger.icon-btn--outline:active:not(:disabled){background-color:var(--danger-500, #ef4444);filter:brightness(.88);color:var(--text-on-color, #fff)}.icon-btn--success.icon-btn--solid{background-color:var(--success-500, #10b981);border-color:var(--success-500, #10b981);color:var(--text-on-color, #fff)}.icon-btn--success.icon-btn--solid:hover:not(:disabled){filter:brightness(.88)}.icon-btn--success.icon-btn--solid:active:not(:disabled){filter:brightness(.78)}.icon-btn--success.icon-btn--outline{background-color:transparent;border-color:var(--success-500, #10b981);color:var(--success-500, #10b981)}.icon-btn--success.icon-btn--outline:hover:not(:disabled){background-color:var(--success-500, #10b981);color:var(--text-on-color, #fff)}.icon-btn--success.icon-btn--outline:active:not(:disabled){background-color:var(--success-500, #10b981);filter:brightness(.88);color:var(--text-on-color, #fff)}.icon-btn--warning.icon-btn--solid{background-color:var(--warning-500, #f59e0b);border-color:var(--warning-500, #f59e0b);color:var(--text-on-color, #fff)}.icon-btn--warning.icon-btn--solid:hover:not(:disabled){filter:brightness(.88)}.icon-btn--warning.icon-btn--solid:active:not(:disabled){filter:brightness(.78)}.icon-btn--warning.icon-btn--outline{background-color:transparent;border-color:var(--warning-500, #f59e0b);color:var(--warning-500, #f59e0b)}.icon-btn--warning.icon-btn--outline:hover:not(:disabled){background-color:var(--warning-500, #f59e0b);color:var(--text-on-color, #fff)}.icon-btn--warning.icon-btn--outline:active:not(:disabled){background-color:var(--warning-500, #f59e0b);filter:brightness(.88);color:var(--text-on-color, #fff)}.icon-btn--borderless{border-color:transparent!important}.icon-btn--borderless:hover:not(:disabled),.icon-btn--borderless:active:not(:disabled){border-color:transparent!important}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
594
770
|
}
|
|
@@ -655,14 +831,14 @@ class BadgeComponent {
|
|
|
655
831
|
return parts.join(' ');
|
|
656
832
|
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
657
833
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: BadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
658
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.12", type: BadgeComponent, isStandalone: true, selector: "ngx-ds-badge", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, dot: { classPropertyName: "dot", publicName: "dot", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<span [class]=\"hostClasses()\">{{ displayText() }}</span>\n", styles: [".badge{display:inline-flex;align-items:center;justify-content:center;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif);font-weight:500;white-space:nowrap;line-height:1;border:1.5px solid transparent}.badge--rounded{border-radius:9999px}.badge:not(.badge--rounded){border-radius:.25rem}.badge--dot{padding:0;border-radius:9999px}.badge--dot.badge--sm{width:.5rem;height:.5rem}.badge--dot.badge--md{width:.625rem;height:.625rem}.badge--dot.badge--lg{width:.75rem;height:.75rem}.badge--sm:not(.badge--dot){font-size:.65rem;padding:.25rem .45rem}.badge--md:not(.badge--dot){font-size:.75rem;padding:.3rem .6rem}.badge--lg:not(.badge--dot){font-size:.875rem;padding:.4rem .75rem}.badge--primary.badge--solid{background-color:var(--primary
|
|
834
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.12", type: BadgeComponent, isStandalone: true, selector: "ngx-ds-badge", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, dot: { classPropertyName: "dot", publicName: "dot", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<span [class]=\"hostClasses()\">{{ displayText() }}</span>\n", styles: [".badge{display:inline-flex;align-items:center;justify-content:center;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif);font-weight:500;white-space:nowrap;line-height:1;border:1.5px solid transparent}.badge--rounded{border-radius:9999px}.badge:not(.badge--rounded){border-radius:.25rem}.badge--dot{padding:0;border-radius:9999px}.badge--dot.badge--sm{width:.5rem;height:.5rem}.badge--dot.badge--md{width:.625rem;height:.625rem}.badge--dot.badge--lg{width:.75rem;height:.75rem}.badge--sm:not(.badge--dot){font-size:.65rem;padding:.25rem .45rem}.badge--md:not(.badge--dot){font-size:.75rem;padding:.3rem .6rem}.badge--lg:not(.badge--dot){font-size:.875rem;padding:.4rem .75rem}.badge--primary.badge--solid{background-color:var(--fill-primary, #4f46e5);color:var(--text-on-color, #fff);border-color:var(--fill-primary, #4f46e5)}.badge--primary.badge--soft{background-color:var(--info-50, #eff6ff);color:var(--info-700, #1d4ed8);border-color:transparent}.badge--primary.badge--outline{background-color:transparent;color:var(--fill-primary, #4f46e5);border-color:var(--fill-primary, #4f46e5)}.badge--primary.badge--dot{background-color:var(--fill-primary, #4f46e5);border-color:var(--fill-primary, #4f46e5)}.badge--secondary.badge--solid{background-color:var(--fill-neutral, #6b7280);color:var(--text-on-color, #fff);border-color:var(--fill-neutral, #6b7280)}.badge--secondary.badge--soft{background-color:var(--surface-muted, #f3f4f6);color:var(--text-secondary, #374151);border-color:transparent}.badge--secondary.badge--outline{background-color:transparent;color:var(--fill-neutral, #6b7280);border-color:var(--fill-neutral, #6b7280)}.badge--secondary.badge--dot{background-color:var(--fill-neutral, #6b7280);border-color:var(--fill-neutral, #6b7280)}.badge--danger.badge--solid{background-color:var(--fill-danger, #dc2626);color:var(--text-on-color, #fff);border-color:var(--fill-danger, #dc2626)}.badge--danger.badge--soft{background-color:var(--danger-50, #fef2f2);color:var(--danger-700, #b91c1c);border-color:transparent}.badge--danger.badge--outline{background-color:transparent;color:var(--fill-danger, #dc2626);border-color:var(--fill-danger, #dc2626)}.badge--danger.badge--dot{background-color:var(--fill-danger, #dc2626);border-color:var(--fill-danger, #dc2626)}.badge--success.badge--solid{background-color:var(--fill-success, #047857);color:var(--text-on-color, #fff);border-color:var(--fill-success, #047857)}.badge--success.badge--soft{background-color:var(--success-50, #ecfdf5);color:var(--success-700, #047857);border-color:transparent}.badge--success.badge--outline{background-color:transparent;color:var(--fill-success, #047857);border-color:var(--fill-success, #047857)}.badge--success.badge--dot{background-color:var(--fill-success, #047857);border-color:var(--fill-success, #047857)}.badge--warning.badge--solid{background-color:var(--fill-warning, #b45309);color:var(--text-on-color, #fff);border-color:var(--fill-warning, #b45309)}.badge--warning.badge--soft{background-color:var(--warning-50, #fffbeb);color:var(--warning-700, #b45309);border-color:transparent}.badge--warning.badge--outline{background-color:transparent;color:var(--fill-warning, #b45309);border-color:var(--fill-warning, #b45309)}.badge--warning.badge--dot{background-color:var(--fill-warning, #b45309);border-color:var(--fill-warning, #b45309)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
659
835
|
}
|
|
660
836
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: BadgeComponent, decorators: [{
|
|
661
837
|
type: Component,
|
|
662
|
-
args: [{ selector: 'ngx-ds-badge', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [class]=\"hostClasses()\">{{ displayText() }}</span>\n", styles: [".badge{display:inline-flex;align-items:center;justify-content:center;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif);font-weight:500;white-space:nowrap;line-height:1;border:1.5px solid transparent}.badge--rounded{border-radius:9999px}.badge:not(.badge--rounded){border-radius:.25rem}.badge--dot{padding:0;border-radius:9999px}.badge--dot.badge--sm{width:.5rem;height:.5rem}.badge--dot.badge--md{width:.625rem;height:.625rem}.badge--dot.badge--lg{width:.75rem;height:.75rem}.badge--sm:not(.badge--dot){font-size:.65rem;padding:.25rem .45rem}.badge--md:not(.badge--dot){font-size:.75rem;padding:.3rem .6rem}.badge--lg:not(.badge--dot){font-size:.875rem;padding:.4rem .75rem}.badge--primary.badge--solid{background-color:var(--primary
|
|
838
|
+
args: [{ selector: 'ngx-ds-badge', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [class]=\"hostClasses()\">{{ displayText() }}</span>\n", styles: [".badge{display:inline-flex;align-items:center;justify-content:center;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif);font-weight:500;white-space:nowrap;line-height:1;border:1.5px solid transparent}.badge--rounded{border-radius:9999px}.badge:not(.badge--rounded){border-radius:.25rem}.badge--dot{padding:0;border-radius:9999px}.badge--dot.badge--sm{width:.5rem;height:.5rem}.badge--dot.badge--md{width:.625rem;height:.625rem}.badge--dot.badge--lg{width:.75rem;height:.75rem}.badge--sm:not(.badge--dot){font-size:.65rem;padding:.25rem .45rem}.badge--md:not(.badge--dot){font-size:.75rem;padding:.3rem .6rem}.badge--lg:not(.badge--dot){font-size:.875rem;padding:.4rem .75rem}.badge--primary.badge--solid{background-color:var(--fill-primary, #4f46e5);color:var(--text-on-color, #fff);border-color:var(--fill-primary, #4f46e5)}.badge--primary.badge--soft{background-color:var(--info-50, #eff6ff);color:var(--info-700, #1d4ed8);border-color:transparent}.badge--primary.badge--outline{background-color:transparent;color:var(--fill-primary, #4f46e5);border-color:var(--fill-primary, #4f46e5)}.badge--primary.badge--dot{background-color:var(--fill-primary, #4f46e5);border-color:var(--fill-primary, #4f46e5)}.badge--secondary.badge--solid{background-color:var(--fill-neutral, #6b7280);color:var(--text-on-color, #fff);border-color:var(--fill-neutral, #6b7280)}.badge--secondary.badge--soft{background-color:var(--surface-muted, #f3f4f6);color:var(--text-secondary, #374151);border-color:transparent}.badge--secondary.badge--outline{background-color:transparent;color:var(--fill-neutral, #6b7280);border-color:var(--fill-neutral, #6b7280)}.badge--secondary.badge--dot{background-color:var(--fill-neutral, #6b7280);border-color:var(--fill-neutral, #6b7280)}.badge--danger.badge--solid{background-color:var(--fill-danger, #dc2626);color:var(--text-on-color, #fff);border-color:var(--fill-danger, #dc2626)}.badge--danger.badge--soft{background-color:var(--danger-50, #fef2f2);color:var(--danger-700, #b91c1c);border-color:transparent}.badge--danger.badge--outline{background-color:transparent;color:var(--fill-danger, #dc2626);border-color:var(--fill-danger, #dc2626)}.badge--danger.badge--dot{background-color:var(--fill-danger, #dc2626);border-color:var(--fill-danger, #dc2626)}.badge--success.badge--solid{background-color:var(--fill-success, #047857);color:var(--text-on-color, #fff);border-color:var(--fill-success, #047857)}.badge--success.badge--soft{background-color:var(--success-50, #ecfdf5);color:var(--success-700, #047857);border-color:transparent}.badge--success.badge--outline{background-color:transparent;color:var(--fill-success, #047857);border-color:var(--fill-success, #047857)}.badge--success.badge--dot{background-color:var(--fill-success, #047857);border-color:var(--fill-success, #047857)}.badge--warning.badge--solid{background-color:var(--fill-warning, #b45309);color:var(--text-on-color, #fff);border-color:var(--fill-warning, #b45309)}.badge--warning.badge--soft{background-color:var(--warning-50, #fffbeb);color:var(--warning-700, #b45309);border-color:transparent}.badge--warning.badge--outline{background-color:transparent;color:var(--fill-warning, #b45309);border-color:var(--fill-warning, #b45309)}.badge--warning.badge--dot{background-color:var(--fill-warning, #b45309);border-color:var(--fill-warning, #b45309)}\n"] }]
|
|
663
839
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], count: [{ type: i0.Input, args: [{ isSignal: true, alias: "count", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], dot: [{ type: i0.Input, args: [{ isSignal: true, alias: "dot", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }] } });
|
|
664
840
|
|
|
665
|
-
const ICON_SIZE$
|
|
841
|
+
const ICON_SIZE$d = { sm: 12, md: 14, lg: 16 };
|
|
666
842
|
class TagComponent {
|
|
667
843
|
i18n = inject(NGX_DS_LABELS);
|
|
668
844
|
label = input.required(...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
@@ -686,16 +862,16 @@ class TagComponent {
|
|
|
686
862
|
classes.push('tag--rounded');
|
|
687
863
|
return classes.join(' ');
|
|
688
864
|
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
689
|
-
iconSize = computed(() => ICON_SIZE$
|
|
865
|
+
iconSize = computed(() => ICON_SIZE$d[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
690
866
|
onDismiss() {
|
|
691
867
|
this.dismissed.emit();
|
|
692
868
|
}
|
|
693
869
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
694
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TagComponent, isStandalone: true, selector: "ngx-ds-tag", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, iconLeft: { classPropertyName: "iconLeft", publicName: "iconLeft", isSignal: true, isRequired: false, transformFunction: null }, iconRight: { classPropertyName: "iconRight", publicName: "iconRight", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dismissed: "dismissed" }, ngImport: i0, template: "<span [class]=\"hostClasses()\">\n @if (iconLeft()) {\n <ngx-ds-icon class=\"tag__icon\" [icon]=\"iconLeft()!\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n\n <span class=\"tag__label\">{{ label() }}</span>\n\n @if (iconRight()) {\n <ngx-ds-icon class=\"tag__icon\" [icon]=\"iconRight()!\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n\n @if (dismissible()) {\n <button\n type=\"button\"\n class=\"tag__dismiss\"\n [attr.aria-label]=\"i18n.removeTag(label())\"\n (click)=\"onDismiss()\"\n >\n <ngx-ds-icon [icon]=\"closeIcon\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n </button>\n }\n</span>\n", styles: [".tag{display:inline-flex;align-items:center;gap:.25rem;font-weight:500;line-height:1;white-space:nowrap;border:1.5px solid transparent;border-radius:.25rem;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.tag--rounded{border-radius:9999px}.tag--sm{padding:.125rem .5rem;font-size:.6875rem}.tag--md{padding:.25rem .625rem;font-size:.75rem}.tag--lg{padding:.375rem .75rem;font-size:.875rem}.tag__icon{flex-shrink:0}.tag__label{line-height:1}.tag__dismiss{display:inline-flex;align-items:center;justify-content:center;padding:0;margin:0;border:none;background:transparent;color:inherit;cursor:pointer;opacity:.7;transition:opacity .15s ease;flex-shrink:0}.tag__dismiss:hover{opacity:1}.tag__dismiss:focus-visible{outline:2px solid currentColor;outline-offset:1px;border-radius:2px}.tag--primary.tag--solid{background-color:var(--primary
|
|
870
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TagComponent, isStandalone: true, selector: "ngx-ds-tag", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, iconLeft: { classPropertyName: "iconLeft", publicName: "iconLeft", isSignal: true, isRequired: false, transformFunction: null }, iconRight: { classPropertyName: "iconRight", publicName: "iconRight", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dismissed: "dismissed" }, ngImport: i0, template: "<span [class]=\"hostClasses()\">\n @if (iconLeft()) {\n <ngx-ds-icon class=\"tag__icon\" [icon]=\"iconLeft()!\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n\n <span class=\"tag__label\">{{ label() }}</span>\n\n @if (iconRight()) {\n <ngx-ds-icon class=\"tag__icon\" [icon]=\"iconRight()!\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n\n @if (dismissible()) {\n <button\n type=\"button\"\n class=\"tag__dismiss\"\n [attr.aria-label]=\"i18n.removeTag(label())\"\n (click)=\"onDismiss()\"\n >\n <ngx-ds-icon [icon]=\"closeIcon\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n </button>\n }\n</span>\n", styles: [".tag{display:inline-flex;align-items:center;gap:.25rem;font-weight:500;line-height:1;white-space:nowrap;border:1.5px solid transparent;border-radius:.25rem;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.tag--rounded{border-radius:9999px}.tag--sm{padding:.125rem .5rem;font-size:.6875rem}.tag--md{padding:.25rem .625rem;font-size:.75rem}.tag--lg{padding:.375rem .75rem;font-size:.875rem}.tag__icon{flex-shrink:0}.tag__label{line-height:1}.tag__dismiss{display:inline-flex;align-items:center;justify-content:center;padding:0;margin:0;border:none;background:transparent;color:inherit;cursor:pointer;opacity:.7;transition:opacity .15s ease;flex-shrink:0}.tag__dismiss:hover{opacity:1}.tag__dismiss:focus-visible{outline:2px solid currentColor;outline-offset:1px;border-radius:2px}.tag--primary.tag--solid{background-color:var(--fill-primary, #4f46e5);border-color:var(--fill-primary, #4f46e5);color:var(--text-on-color, #fff)}.tag--primary.tag--outline{background-color:transparent;border-color:var(--fill-primary, #4f46e5);color:var(--fill-primary, #4f46e5)}.tag--primary.tag--soft{background-color:var(--info-100, #dbeafe);border-color:var(--info-100, #dbeafe);color:var(--info-700, #1d4ed8)}.tag--secondary.tag--solid{background-color:var(--fill-neutral, #6b7280);border-color:var(--fill-neutral, #6b7280);color:var(--text-on-color, #fff)}.tag--secondary.tag--outline{background-color:transparent;border-color:var(--fill-neutral, #6b7280);color:var(--fill-neutral, #6b7280)}.tag--secondary.tag--soft{background-color:var(--surface-muted, #f3f4f6);border-color:var(--surface-muted, #f3f4f6);color:var(--text-secondary, #374151)}.tag--danger.tag--solid{background-color:var(--fill-danger, #dc2626);border-color:var(--fill-danger, #dc2626);color:var(--text-on-color, #fff)}.tag--danger.tag--outline{background-color:transparent;border-color:var(--fill-danger, #dc2626);color:var(--fill-danger, #dc2626)}.tag--danger.tag--soft{background-color:var(--danger-100, #fee2e2);border-color:var(--danger-100, #fee2e2);color:var(--danger-700, #b91c1c)}.tag--success.tag--solid{background-color:var(--fill-success, #047857);border-color:var(--fill-success, #047857);color:var(--text-on-color, #fff)}.tag--success.tag--outline{background-color:transparent;border-color:var(--fill-success, #047857);color:var(--fill-success, #047857)}.tag--success.tag--soft{background-color:var(--success-100, #d1fae5);border-color:var(--success-100, #d1fae5);color:var(--success-800, #065f46)}.tag--warning.tag--solid{background-color:var(--fill-warning, #b45309);border-color:var(--fill-warning, #b45309);color:var(--text-on-color, #fff)}.tag--warning.tag--outline{background-color:transparent;border-color:var(--fill-warning, #b45309);color:var(--fill-warning, #b45309)}.tag--warning.tag--soft{background-color:var(--warning-100, #fef3c7);border-color:var(--warning-100, #fef3c7);color:var(--warning-800, #92400e)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
695
871
|
}
|
|
696
872
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TagComponent, decorators: [{
|
|
697
873
|
type: Component,
|
|
698
|
-
args: [{ selector: 'ngx-ds-tag', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [class]=\"hostClasses()\">\n @if (iconLeft()) {\n <ngx-ds-icon class=\"tag__icon\" [icon]=\"iconLeft()!\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n\n <span class=\"tag__label\">{{ label() }}</span>\n\n @if (iconRight()) {\n <ngx-ds-icon class=\"tag__icon\" [icon]=\"iconRight()!\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n\n @if (dismissible()) {\n <button\n type=\"button\"\n class=\"tag__dismiss\"\n [attr.aria-label]=\"i18n.removeTag(label())\"\n (click)=\"onDismiss()\"\n >\n <ngx-ds-icon [icon]=\"closeIcon\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n </button>\n }\n</span>\n", styles: [".tag{display:inline-flex;align-items:center;gap:.25rem;font-weight:500;line-height:1;white-space:nowrap;border:1.5px solid transparent;border-radius:.25rem;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.tag--rounded{border-radius:9999px}.tag--sm{padding:.125rem .5rem;font-size:.6875rem}.tag--md{padding:.25rem .625rem;font-size:.75rem}.tag--lg{padding:.375rem .75rem;font-size:.875rem}.tag__icon{flex-shrink:0}.tag__label{line-height:1}.tag__dismiss{display:inline-flex;align-items:center;justify-content:center;padding:0;margin:0;border:none;background:transparent;color:inherit;cursor:pointer;opacity:.7;transition:opacity .15s ease;flex-shrink:0}.tag__dismiss:hover{opacity:1}.tag__dismiss:focus-visible{outline:2px solid currentColor;outline-offset:1px;border-radius:2px}.tag--primary.tag--solid{background-color:var(--primary
|
|
874
|
+
args: [{ selector: 'ngx-ds-tag', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [class]=\"hostClasses()\">\n @if (iconLeft()) {\n <ngx-ds-icon class=\"tag__icon\" [icon]=\"iconLeft()!\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n\n <span class=\"tag__label\">{{ label() }}</span>\n\n @if (iconRight()) {\n <ngx-ds-icon class=\"tag__icon\" [icon]=\"iconRight()!\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n\n @if (dismissible()) {\n <button\n type=\"button\"\n class=\"tag__dismiss\"\n [attr.aria-label]=\"i18n.removeTag(label())\"\n (click)=\"onDismiss()\"\n >\n <ngx-ds-icon [icon]=\"closeIcon\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n </button>\n }\n</span>\n", styles: [".tag{display:inline-flex;align-items:center;gap:.25rem;font-weight:500;line-height:1;white-space:nowrap;border:1.5px solid transparent;border-radius:.25rem;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.tag--rounded{border-radius:9999px}.tag--sm{padding:.125rem .5rem;font-size:.6875rem}.tag--md{padding:.25rem .625rem;font-size:.75rem}.tag--lg{padding:.375rem .75rem;font-size:.875rem}.tag__icon{flex-shrink:0}.tag__label{line-height:1}.tag__dismiss{display:inline-flex;align-items:center;justify-content:center;padding:0;margin:0;border:none;background:transparent;color:inherit;cursor:pointer;opacity:.7;transition:opacity .15s ease;flex-shrink:0}.tag__dismiss:hover{opacity:1}.tag__dismiss:focus-visible{outline:2px solid currentColor;outline-offset:1px;border-radius:2px}.tag--primary.tag--solid{background-color:var(--fill-primary, #4f46e5);border-color:var(--fill-primary, #4f46e5);color:var(--text-on-color, #fff)}.tag--primary.tag--outline{background-color:transparent;border-color:var(--fill-primary, #4f46e5);color:var(--fill-primary, #4f46e5)}.tag--primary.tag--soft{background-color:var(--info-100, #dbeafe);border-color:var(--info-100, #dbeafe);color:var(--info-700, #1d4ed8)}.tag--secondary.tag--solid{background-color:var(--fill-neutral, #6b7280);border-color:var(--fill-neutral, #6b7280);color:var(--text-on-color, #fff)}.tag--secondary.tag--outline{background-color:transparent;border-color:var(--fill-neutral, #6b7280);color:var(--fill-neutral, #6b7280)}.tag--secondary.tag--soft{background-color:var(--surface-muted, #f3f4f6);border-color:var(--surface-muted, #f3f4f6);color:var(--text-secondary, #374151)}.tag--danger.tag--solid{background-color:var(--fill-danger, #dc2626);border-color:var(--fill-danger, #dc2626);color:var(--text-on-color, #fff)}.tag--danger.tag--outline{background-color:transparent;border-color:var(--fill-danger, #dc2626);color:var(--fill-danger, #dc2626)}.tag--danger.tag--soft{background-color:var(--danger-100, #fee2e2);border-color:var(--danger-100, #fee2e2);color:var(--danger-700, #b91c1c)}.tag--success.tag--solid{background-color:var(--fill-success, #047857);border-color:var(--fill-success, #047857);color:var(--text-on-color, #fff)}.tag--success.tag--outline{background-color:transparent;border-color:var(--fill-success, #047857);color:var(--fill-success, #047857)}.tag--success.tag--soft{background-color:var(--success-100, #d1fae5);border-color:var(--success-100, #d1fae5);color:var(--success-800, #065f46)}.tag--warning.tag--solid{background-color:var(--fill-warning, #b45309);border-color:var(--fill-warning, #b45309);color:var(--text-on-color, #fff)}.tag--warning.tag--outline{background-color:transparent;border-color:var(--fill-warning, #b45309);color:var(--fill-warning, #b45309)}.tag--warning.tag--soft{background-color:var(--warning-100, #fef3c7);border-color:var(--warning-100, #fef3c7);color:var(--warning-800, #92400e)}\n"] }]
|
|
699
875
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], iconLeft: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconLeft", required: false }] }], iconRight: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconRight", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], dismissed: [{ type: i0.Output, args: ["dismissed"] }] } });
|
|
700
876
|
|
|
701
877
|
class ProgressBarComponent {
|
|
@@ -744,7 +920,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
744
920
|
args: [{ selector: 'ngx-ds-progress-bar', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (label() || (showValue() && !indeterminate())) {\n <div class=\"progress__header\">\n @if (label()) {\n <span class=\"progress__label\">{{ label() }}</span>\n }\n @if (showValue() && !indeterminate()) {\n <span class=\"progress__value\">{{ displayValue() }}</span>\n }\n </div>\n}\n\n<div\n [class]=\"trackClasses()\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"indeterminate() ? null : value()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"max()\"\n [attr.aria-label]=\"label() || i18n.progress\"\n>\n <div [class]=\"barClasses()\" [style.width.%]=\"indeterminate() ? null : percentage()\"></div>\n</div>\n", styles: ["@keyframes progress-stripes{0%{background-position:1.5rem 0}to{background-position:0 0}}@keyframes progress-indeterminate{0%{margin-left:-40%}to{margin-left:100%}}.progress{width:100%;background-color:var(--surface-active, #e5e7eb);overflow:hidden;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.progress__header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.375rem}.progress__label{font-size:.8125rem;font-weight:500;color:var(--text-secondary, #374151)}.progress__value{font-size:.8125rem;font-weight:600;color:var(--text-muted, #6b7280)}.progress--rounded{border-radius:9999px}.progress--sm{height:.25rem}.progress--md{height:.5rem}.progress--lg{height:.875rem}.progress__bar{height:100%;transition:width .4s ease}.progress__bar--rounded{border-radius:9999px}.progress__bar--striped{background-image:repeating-linear-gradient(45deg,transparent,transparent .625rem,rgba(255,255,255,.2) .625rem,rgba(255,255,255,.2) 1.25rem);background-size:1.5rem 1.5rem}.progress__bar--animated{animation:progress-stripes .8s linear infinite}.progress__bar--indeterminate{width:40%!important;animation:progress-indeterminate 1.2s ease-in-out infinite}.progress--primary .progress__bar{background-color:var(--primary-500, #6366f1)}.progress--secondary .progress__bar{background-color:var(--fill-neutral, #6b7280)}.progress--danger .progress__bar{background-color:var(--danger-500, #ef4444)}.progress--success .progress__bar{background-color:var(--success-500, #10b981)}.progress--warning .progress__bar{background-color:var(--warning-500, #f59e0b)}\n"] }]
|
|
745
921
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], showValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValue", required: false }] }], striped: [{ type: i0.Input, args: [{ isSignal: true, alias: "striped", required: false }] }], animated: [{ type: i0.Input, args: [{ isSignal: true, alias: "animated", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }] } });
|
|
746
922
|
|
|
747
|
-
const ICON_SIZE$
|
|
923
|
+
const ICON_SIZE$c = { sm: 14, md: 16, lg: 18 };
|
|
748
924
|
class MenuButtonComponent {
|
|
749
925
|
iconLeft = input(undefined, ...(ngDevMode ? [{ debugName: "iconLeft" }] : /* istanbul ignore next */ []));
|
|
750
926
|
iconRight = input(undefined, ...(ngDevMode ? [{ debugName: "iconRight" }] : /* istanbul ignore next */ []));
|
|
@@ -759,13 +935,13 @@ class MenuButtonComponent {
|
|
|
759
935
|
classes.push('menu-btn--full');
|
|
760
936
|
return classes.join(' ');
|
|
761
937
|
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
762
|
-
iconSize = computed(() => ICON_SIZE$
|
|
938
|
+
iconSize = computed(() => ICON_SIZE$c[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
763
939
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: MenuButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
764
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: MenuButtonComponent, isStandalone: true, selector: "ngx-ds-menu-button", inputs: { iconLeft: { classPropertyName: "iconLeft", publicName: "iconLeft", isSignal: true, isRequired: false, transformFunction: null }, iconRight: { classPropertyName: "iconRight", publicName: "iconRight", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", 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 }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<button [type]=\"type()\" [class]=\"hostClasses()\" [disabled]=\"disabled() || null\">\n @if (iconLeft()) {\n <ngx-ds-icon\n class=\"menu-btn__icon\"\n [icon]=\"iconLeft()!\"\n [size]=\"iconSize()\"\n aria-hidden=\"true\"\n />\n }\n <ng-content />\n @if (iconRight()) {\n <ngx-ds-icon\n class=\"menu-btn__icon\"\n [icon]=\"iconRight()!\"\n [size]=\"iconSize()\"\n aria-hidden=\"true\"\n />\n }\n</button>\n", styles: [".menu-btn{display:inline-flex;align-items:center;gap:.5rem;border:none;background:transparent;cursor:pointer;border-radius:.375rem;white-space:nowrap;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif);font-weight:400;line-height:1;-webkit-user-select:none;user-select:none;transition:background .12s ease,color .12s ease}.menu-btn:focus-visible{outline:2px solid currentColor;outline-offset:2px}.menu-btn:disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.menu-btn--sm{padding:.375rem .625rem;font-size:.8125rem}.menu-btn--md{padding:.5rem .75rem;font-size:.875rem}.menu-btn--lg{padding:.625rem 1rem;font-size:1rem}.menu-btn--full{width:100%;justify-content:flex-start}.menu-btn--default{color:var(--text-base, #111827)}.menu-btn--default:hover:not(:disabled){background:var(--surface-hover, #f3f4f6)}.menu-btn--primary{color:var(--primary
|
|
940
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: MenuButtonComponent, isStandalone: true, selector: "ngx-ds-menu-button", inputs: { iconLeft: { classPropertyName: "iconLeft", publicName: "iconLeft", isSignal: true, isRequired: false, transformFunction: null }, iconRight: { classPropertyName: "iconRight", publicName: "iconRight", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", 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 }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<button [type]=\"type()\" [class]=\"hostClasses()\" [disabled]=\"disabled() || null\">\n @if (iconLeft()) {\n <ngx-ds-icon\n class=\"menu-btn__icon\"\n [icon]=\"iconLeft()!\"\n [size]=\"iconSize()\"\n aria-hidden=\"true\"\n />\n }\n <ng-content />\n @if (iconRight()) {\n <ngx-ds-icon\n class=\"menu-btn__icon\"\n [icon]=\"iconRight()!\"\n [size]=\"iconSize()\"\n aria-hidden=\"true\"\n />\n }\n</button>\n", styles: [".menu-btn{display:inline-flex;align-items:center;gap:.5rem;border:none;background:transparent;cursor:pointer;border-radius:.375rem;white-space:nowrap;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif);font-weight:400;line-height:1;-webkit-user-select:none;user-select:none;transition:background .12s ease,color .12s ease}.menu-btn:focus-visible{outline:2px solid currentColor;outline-offset:2px}.menu-btn:disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.menu-btn--sm{padding:.375rem .625rem;font-size:.8125rem}.menu-btn--md{padding:.5rem .75rem;font-size:.875rem}.menu-btn--lg{padding:.625rem 1rem;font-size:1rem}.menu-btn--full{width:100%;justify-content:flex-start}.menu-btn--default{color:var(--text-base, #111827)}.menu-btn--default:hover:not(:disabled){background:var(--surface-hover, #f3f4f6)}.menu-btn--primary{color:var(--fill-primary, #4f46e5)}.menu-btn--primary:hover:not(:disabled){background:var(--primary-50, #eef2ff)}.menu-btn--danger{color:var(--fill-danger, #dc2626)}.menu-btn--danger:hover:not(:disabled){background:var(--danger-50, #fef2f2)}.menu-btn--success{color:var(--fill-success, #047857)}.menu-btn--success:hover:not(:disabled){background:var(--success-50, #ecfdf5)}.menu-btn--warning{color:var(--fill-warning, #b45309)}.menu-btn--warning:hover:not(:disabled){background:var(--warning-50, #fffbeb)}.menu-btn__icon{flex-shrink:0}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
765
941
|
}
|
|
766
942
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: MenuButtonComponent, decorators: [{
|
|
767
943
|
type: Component,
|
|
768
|
-
args: [{ selector: 'ngx-ds-menu-button', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button [type]=\"type()\" [class]=\"hostClasses()\" [disabled]=\"disabled() || null\">\n @if (iconLeft()) {\n <ngx-ds-icon\n class=\"menu-btn__icon\"\n [icon]=\"iconLeft()!\"\n [size]=\"iconSize()\"\n aria-hidden=\"true\"\n />\n }\n <ng-content />\n @if (iconRight()) {\n <ngx-ds-icon\n class=\"menu-btn__icon\"\n [icon]=\"iconRight()!\"\n [size]=\"iconSize()\"\n aria-hidden=\"true\"\n />\n }\n</button>\n", styles: [".menu-btn{display:inline-flex;align-items:center;gap:.5rem;border:none;background:transparent;cursor:pointer;border-radius:.375rem;white-space:nowrap;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif);font-weight:400;line-height:1;-webkit-user-select:none;user-select:none;transition:background .12s ease,color .12s ease}.menu-btn:focus-visible{outline:2px solid currentColor;outline-offset:2px}.menu-btn:disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.menu-btn--sm{padding:.375rem .625rem;font-size:.8125rem}.menu-btn--md{padding:.5rem .75rem;font-size:.875rem}.menu-btn--lg{padding:.625rem 1rem;font-size:1rem}.menu-btn--full{width:100%;justify-content:flex-start}.menu-btn--default{color:var(--text-base, #111827)}.menu-btn--default:hover:not(:disabled){background:var(--surface-hover, #f3f4f6)}.menu-btn--primary{color:var(--primary
|
|
944
|
+
args: [{ selector: 'ngx-ds-menu-button', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button [type]=\"type()\" [class]=\"hostClasses()\" [disabled]=\"disabled() || null\">\n @if (iconLeft()) {\n <ngx-ds-icon\n class=\"menu-btn__icon\"\n [icon]=\"iconLeft()!\"\n [size]=\"iconSize()\"\n aria-hidden=\"true\"\n />\n }\n <ng-content />\n @if (iconRight()) {\n <ngx-ds-icon\n class=\"menu-btn__icon\"\n [icon]=\"iconRight()!\"\n [size]=\"iconSize()\"\n aria-hidden=\"true\"\n />\n }\n</button>\n", styles: [".menu-btn{display:inline-flex;align-items:center;gap:.5rem;border:none;background:transparent;cursor:pointer;border-radius:.375rem;white-space:nowrap;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif);font-weight:400;line-height:1;-webkit-user-select:none;user-select:none;transition:background .12s ease,color .12s ease}.menu-btn:focus-visible{outline:2px solid currentColor;outline-offset:2px}.menu-btn:disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.menu-btn--sm{padding:.375rem .625rem;font-size:.8125rem}.menu-btn--md{padding:.5rem .75rem;font-size:.875rem}.menu-btn--lg{padding:.625rem 1rem;font-size:1rem}.menu-btn--full{width:100%;justify-content:flex-start}.menu-btn--default{color:var(--text-base, #111827)}.menu-btn--default:hover:not(:disabled){background:var(--surface-hover, #f3f4f6)}.menu-btn--primary{color:var(--fill-primary, #4f46e5)}.menu-btn--primary:hover:not(:disabled){background:var(--primary-50, #eef2ff)}.menu-btn--danger{color:var(--fill-danger, #dc2626)}.menu-btn--danger:hover:not(:disabled){background:var(--danger-50, #fef2f2)}.menu-btn--success{color:var(--fill-success, #047857)}.menu-btn--success:hover:not(:disabled){background:var(--success-50, #ecfdf5)}.menu-btn--warning{color:var(--fill-warning, #b45309)}.menu-btn--warning:hover:not(:disabled){background:var(--warning-50, #fffbeb)}.menu-btn__icon{flex-shrink:0}\n"] }]
|
|
769
945
|
}], propDecorators: { iconLeft: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconLeft", required: false }] }], iconRight: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconRight", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }] } });
|
|
770
946
|
|
|
771
947
|
class TooltipBoxComponent {
|
|
@@ -924,11 +1100,11 @@ class DividerComponent {
|
|
|
924
1100
|
.join(' ');
|
|
925
1101
|
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
926
1102
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
927
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: DividerComponent, isStandalone: true, selector: "ngx-ds-divider", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [class]=\"hostClasses()\" [style.border-color]=\"color() || null\" role=\"separator\">\n @if (label() && orientation() === 'horizontal') {\n <span class=\"divider__label\">{{ label() }}</span>\n }\n</div>\n", styles: [":host{display:block}.divider{border-color:var(--border-base, #e5e7eb)}.divider--horizontal{width:100%;border-top-width:1.5px;border-top-style:solid;border-right:none;border-bottom:none;border-left:none}.divider--vertical{display:inline-block;align-self:stretch;min-height:1em;border-left-width:1.5px;border-left-style:solid;border-top:none;border-right:none;border-bottom:none;margin:0 .75rem}.divider--dashed{border-style:dashed}.divider--dotted{border-style:dotted}.divider--labeled{display:flex;align-items:center;gap:.75rem;border:none}.divider--labeled:before,.divider--labeled:after{content:\"\";flex:1;border-top-width:1.5px;border-top-style:inherit;border-color:inherit}.divider--label-start:before{flex:0 0 1.5rem}.divider--label-end:after{flex:0 0 1.5rem}.divider__label{flex-shrink:0;font-size:.75rem;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif);color:var(--text-placeholder, #
|
|
1103
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: DividerComponent, isStandalone: true, selector: "ngx-ds-divider", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [class]=\"hostClasses()\" [style.border-color]=\"color() || null\" role=\"separator\">\n @if (label() && orientation() === 'horizontal') {\n <span class=\"divider__label\">{{ label() }}</span>\n }\n</div>\n", styles: [":host{display:block}.divider{border-color:var(--border-base, #e5e7eb)}.divider--horizontal{width:100%;border-top-width:1.5px;border-top-style:solid;border-right:none;border-bottom:none;border-left:none}.divider--vertical{display:inline-block;align-self:stretch;min-height:1em;border-left-width:1.5px;border-left-style:solid;border-top:none;border-right:none;border-bottom:none;margin:0 .75rem}.divider--dashed{border-style:dashed}.divider--dotted{border-style:dotted}.divider--labeled{display:flex;align-items:center;gap:.75rem;border:none}.divider--labeled:before,.divider--labeled:after{content:\"\";flex:1;border-top-width:1.5px;border-top-style:inherit;border-color:inherit}.divider--label-start:before{flex:0 0 1.5rem}.divider--label-end:after{flex:0 0 1.5rem}.divider__label{flex-shrink:0;font-size:.75rem;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif);color:var(--text-placeholder, #6b7280);white-space:nowrap}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
928
1104
|
}
|
|
929
1105
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DividerComponent, decorators: [{
|
|
930
1106
|
type: Component,
|
|
931
|
-
args: [{ selector: 'ngx-ds-divider', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"hostClasses()\" [style.border-color]=\"color() || null\" role=\"separator\">\n @if (label() && orientation() === 'horizontal') {\n <span class=\"divider__label\">{{ label() }}</span>\n }\n</div>\n", styles: [":host{display:block}.divider{border-color:var(--border-base, #e5e7eb)}.divider--horizontal{width:100%;border-top-width:1.5px;border-top-style:solid;border-right:none;border-bottom:none;border-left:none}.divider--vertical{display:inline-block;align-self:stretch;min-height:1em;border-left-width:1.5px;border-left-style:solid;border-top:none;border-right:none;border-bottom:none;margin:0 .75rem}.divider--dashed{border-style:dashed}.divider--dotted{border-style:dotted}.divider--labeled{display:flex;align-items:center;gap:.75rem;border:none}.divider--labeled:before,.divider--labeled:after{content:\"\";flex:1;border-top-width:1.5px;border-top-style:inherit;border-color:inherit}.divider--label-start:before{flex:0 0 1.5rem}.divider--label-end:after{flex:0 0 1.5rem}.divider__label{flex-shrink:0;font-size:.75rem;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif);color:var(--text-placeholder, #
|
|
1107
|
+
args: [{ selector: 'ngx-ds-divider', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"hostClasses()\" [style.border-color]=\"color() || null\" role=\"separator\">\n @if (label() && orientation() === 'horizontal') {\n <span class=\"divider__label\">{{ label() }}</span>\n }\n</div>\n", styles: [":host{display:block}.divider{border-color:var(--border-base, #e5e7eb)}.divider--horizontal{width:100%;border-top-width:1.5px;border-top-style:solid;border-right:none;border-bottom:none;border-left:none}.divider--vertical{display:inline-block;align-self:stretch;min-height:1em;border-left-width:1.5px;border-left-style:solid;border-top:none;border-right:none;border-bottom:none;margin:0 .75rem}.divider--dashed{border-style:dashed}.divider--dotted{border-style:dotted}.divider--labeled{display:flex;align-items:center;gap:.75rem;border:none}.divider--labeled:before,.divider--labeled:after{content:\"\";flex:1;border-top-width:1.5px;border-top-style:inherit;border-color:inherit}.divider--label-start:before{flex:0 0 1.5rem}.divider--label-end:after{flex:0 0 1.5rem}.divider__label{flex-shrink:0;font-size:.75rem;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif);color:var(--text-placeholder, #6b7280);white-space:nowrap}\n"] }]
|
|
932
1108
|
}], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }] } });
|
|
933
1109
|
|
|
934
1110
|
class KbdComponent {
|
|
@@ -942,15 +1118,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
942
1118
|
args: [{ selector: 'ngx-ds-kbd', standalone: true, imports: [], template: `<kbd [class]="hostClasses()"><ng-content /></kbd>`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:inline-flex;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.kbd{display:inline-flex;align-items:center;justify-content:center;font-family:ui-monospace,SFMono-Regular,Cascadia Code,Consolas,monospace;font-weight:500;background:var(--surface-muted, #f3f4f6);border:1px solid var(--border-input, #d1d5db);border-bottom-width:2px;border-radius:.3rem;color:var(--text-secondary, #374151);line-height:1;white-space:nowrap;box-shadow:inset 0 -1px 0 var(--border-input, #d1d5db)}.kbd--sm{font-size:.7rem;padding:.125rem .35rem}.kbd--md{font-size:.8125rem;padding:.2rem .5rem}.kbd--lg{font-size:.9375rem;padding:.25rem .625rem}\n"] }]
|
|
943
1119
|
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
944
1120
|
|
|
945
|
-
let nextId$
|
|
1121
|
+
let nextId$k = 0;
|
|
946
1122
|
class CheckboxComponent {
|
|
947
1123
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1124
|
+
/** Accessible name when there is no visible `label`. */
|
|
1125
|
+
ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
948
1126
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
949
1127
|
color = input('primary', ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
950
1128
|
indeterminate = input(false, ...(ngDevMode ? [{ debugName: "indeterminate" }] : /* istanbul ignore next */ []));
|
|
951
1129
|
labelPosition = input('right', ...(ngDevMode ? [{ debugName: "labelPosition" }] : /* istanbul ignore next */ []));
|
|
952
1130
|
checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
953
|
-
id = `ngx-checkbox-${nextId$
|
|
1131
|
+
id = `ngx-checkbox-${nextId$k++}`;
|
|
954
1132
|
#disabled = signal(false, ...(ngDevMode ? [{ debugName: "#disabled" }] : /* istanbul ignore next */ []));
|
|
955
1133
|
isDisabled = this.#disabled.asReadonly();
|
|
956
1134
|
onChange = () => { };
|
|
@@ -984,13 +1162,13 @@ class CheckboxComponent {
|
|
|
984
1162
|
this.#disabled.set(disabled);
|
|
985
1163
|
}
|
|
986
1164
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
987
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: CheckboxComponent, isStandalone: true, selector: "ngx-ds-checkbox", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, providers: [
|
|
1165
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: CheckboxComponent, isStandalone: true, selector: "ngx-ds-checkbox", inputs: { label: { classPropertyName: "label", publicName: "label", 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 }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, providers: [
|
|
988
1166
|
{
|
|
989
1167
|
provide: NG_VALUE_ACCESSOR,
|
|
990
1168
|
useExisting: forwardRef(() => CheckboxComponent),
|
|
991
1169
|
multi: true,
|
|
992
1170
|
},
|
|
993
|
-
], ngImport: i0, template: "<label [for]=\"id\" [class]=\"hostClasses()\">\n <input\n type=\"checkbox\"\n [id]=\"id\"\n class=\"checkbox__input\"\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate() && !checked()\"\n [disabled]=\"isDisabled()\"\n (change)=\"onNativeChange($event)\"\n />\n\n @if (labelPosition() === 'left' && label()) {\n <span class=\"checkbox__label\">{{ label() }}</span>\n }\n\n <span class=\"checkbox__box\" aria-hidden=\"true\"></span>\n\n @if (labelPosition() === 'right' && label()) {\n <span class=\"checkbox__label\">{{ label() }}</span>\n }\n</label>\n", styles: [".checkbox{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.checkbox--disabled{cursor:not-allowed;opacity:.5}.checkbox__input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.checkbox__input:focus-visible~.checkbox__box{outline:2px solid var(--ngx-checkbox-color);outline-offset:2px}.checkbox__box{position:relative;flex-shrink:0;border:2px solid var(--border-input, #d1d5db);border-radius:.25rem;background:var(--surface-base, #fff);transition:background-color .15s ease,border-color .15s ease}.checkbox__box:after{content:\"\";position:absolute;display:none;left:50%;top:46%;width:35%;height:58%;border:2px solid var(--text-on-color, #fff);border-top:none;border-left:none;transform:translate(-50%,-50%) rotate(45deg)}.checkbox:hover:not(.checkbox--disabled):not(.checkbox--checked):not(.checkbox--indeterminate) .checkbox__box{border-color:var(--ngx-checkbox-color)}.checkbox--checked .checkbox__box{background-color:var(--ngx-checkbox-color);border-color:var(--ngx-checkbox-color)}.checkbox--checked .checkbox__box:after{display:block}.checkbox--indeterminate .checkbox__box{background-color:var(--ngx-checkbox-color);border-color:var(--ngx-checkbox-color)}.checkbox--indeterminate .checkbox__box:after{display:block;width:55%;height:2px;border:none;background:var(--text-on-color, #fff);top:50%;transform:translate(-50%,-50%)}.checkbox__label{font-size:.875rem;color:var(--text-secondary, #374151);line-height:1.25}.checkbox--sm .checkbox__box{width:.875rem;height:.875rem}.checkbox--md .checkbox__box{width:1.125rem;height:1.125rem}.checkbox--lg .checkbox__box{width:1.375rem;height:1.375rem}.checkbox--primary{--ngx-checkbox-color: var(--primary-500, #6366f1)}.checkbox--secondary{--ngx-checkbox-color: var(--fill-neutral, #6b7280)}.checkbox--danger{--ngx-checkbox-color: var(--danger-500, #ef4444)}.checkbox--success{--ngx-checkbox-color: var(--success-500, #10b981)}.checkbox--warning{--ngx-checkbox-color: var(--warning-500, #f59e0b)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1171
|
+
], ngImport: i0, template: "<label [for]=\"id\" [class]=\"hostClasses()\">\n <input\n type=\"checkbox\"\n [id]=\"id\"\n class=\"checkbox__input\"\n [attr.aria-label]=\"label() ? null : (ariaLabel() ?? null)\"\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate() && !checked()\"\n [disabled]=\"isDisabled()\"\n (change)=\"onNativeChange($event)\"\n />\n\n @if (labelPosition() === 'left' && label()) {\n <span class=\"checkbox__label\">{{ label() }}</span>\n }\n\n <span class=\"checkbox__box\" aria-hidden=\"true\"></span>\n\n @if (labelPosition() === 'right' && label()) {\n <span class=\"checkbox__label\">{{ label() }}</span>\n }\n</label>\n", styles: [".checkbox{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.checkbox--disabled{cursor:not-allowed;opacity:.5}.checkbox__input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.checkbox__input:focus-visible~.checkbox__box{outline:2px solid var(--ngx-checkbox-color);outline-offset:2px}.checkbox__box{position:relative;flex-shrink:0;border:2px solid var(--border-input, #d1d5db);border-radius:.25rem;background:var(--surface-base, #fff);transition:background-color .15s ease,border-color .15s ease}.checkbox__box:after{content:\"\";position:absolute;display:none;left:50%;top:46%;width:35%;height:58%;border:2px solid var(--text-on-color, #fff);border-top:none;border-left:none;transform:translate(-50%,-50%) rotate(45deg)}.checkbox:hover:not(.checkbox--disabled):not(.checkbox--checked):not(.checkbox--indeterminate) .checkbox__box{border-color:var(--ngx-checkbox-color)}.checkbox--checked .checkbox__box{background-color:var(--ngx-checkbox-color);border-color:var(--ngx-checkbox-color)}.checkbox--checked .checkbox__box:after{display:block}.checkbox--indeterminate .checkbox__box{background-color:var(--ngx-checkbox-color);border-color:var(--ngx-checkbox-color)}.checkbox--indeterminate .checkbox__box:after{display:block;width:55%;height:2px;border:none;background:var(--text-on-color, #fff);top:50%;transform:translate(-50%,-50%)}.checkbox__label{font-size:.875rem;color:var(--text-secondary, #374151);line-height:1.25}.checkbox--sm .checkbox__box{width:.875rem;height:.875rem}.checkbox--md .checkbox__box{width:1.125rem;height:1.125rem}.checkbox--lg .checkbox__box{width:1.375rem;height:1.375rem}.checkbox--primary{--ngx-checkbox-color: var(--primary-500, #6366f1)}.checkbox--secondary{--ngx-checkbox-color: var(--fill-neutral, #6b7280)}.checkbox--danger{--ngx-checkbox-color: var(--danger-500, #ef4444)}.checkbox--success{--ngx-checkbox-color: var(--success-500, #10b981)}.checkbox--warning{--ngx-checkbox-color: var(--warning-500, #f59e0b)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
994
1172
|
}
|
|
995
1173
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
996
1174
|
type: Component,
|
|
@@ -1000,10 +1178,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
1000
1178
|
useExisting: forwardRef(() => CheckboxComponent),
|
|
1001
1179
|
multi: true,
|
|
1002
1180
|
},
|
|
1003
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label [for]=\"id\" [class]=\"hostClasses()\">\n <input\n type=\"checkbox\"\n [id]=\"id\"\n class=\"checkbox__input\"\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate() && !checked()\"\n [disabled]=\"isDisabled()\"\n (change)=\"onNativeChange($event)\"\n />\n\n @if (labelPosition() === 'left' && label()) {\n <span class=\"checkbox__label\">{{ label() }}</span>\n }\n\n <span class=\"checkbox__box\" aria-hidden=\"true\"></span>\n\n @if (labelPosition() === 'right' && label()) {\n <span class=\"checkbox__label\">{{ label() }}</span>\n }\n</label>\n", styles: [".checkbox{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.checkbox--disabled{cursor:not-allowed;opacity:.5}.checkbox__input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.checkbox__input:focus-visible~.checkbox__box{outline:2px solid var(--ngx-checkbox-color);outline-offset:2px}.checkbox__box{position:relative;flex-shrink:0;border:2px solid var(--border-input, #d1d5db);border-radius:.25rem;background:var(--surface-base, #fff);transition:background-color .15s ease,border-color .15s ease}.checkbox__box:after{content:\"\";position:absolute;display:none;left:50%;top:46%;width:35%;height:58%;border:2px solid var(--text-on-color, #fff);border-top:none;border-left:none;transform:translate(-50%,-50%) rotate(45deg)}.checkbox:hover:not(.checkbox--disabled):not(.checkbox--checked):not(.checkbox--indeterminate) .checkbox__box{border-color:var(--ngx-checkbox-color)}.checkbox--checked .checkbox__box{background-color:var(--ngx-checkbox-color);border-color:var(--ngx-checkbox-color)}.checkbox--checked .checkbox__box:after{display:block}.checkbox--indeterminate .checkbox__box{background-color:var(--ngx-checkbox-color);border-color:var(--ngx-checkbox-color)}.checkbox--indeterminate .checkbox__box:after{display:block;width:55%;height:2px;border:none;background:var(--text-on-color, #fff);top:50%;transform:translate(-50%,-50%)}.checkbox__label{font-size:.875rem;color:var(--text-secondary, #374151);line-height:1.25}.checkbox--sm .checkbox__box{width:.875rem;height:.875rem}.checkbox--md .checkbox__box{width:1.125rem;height:1.125rem}.checkbox--lg .checkbox__box{width:1.375rem;height:1.375rem}.checkbox--primary{--ngx-checkbox-color: var(--primary-500, #6366f1)}.checkbox--secondary{--ngx-checkbox-color: var(--fill-neutral, #6b7280)}.checkbox--danger{--ngx-checkbox-color: var(--danger-500, #ef4444)}.checkbox--success{--ngx-checkbox-color: var(--success-500, #10b981)}.checkbox--warning{--ngx-checkbox-color: var(--warning-500, #f59e0b)}\n"] }]
|
|
1004
|
-
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }] } });
|
|
1181
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label [for]=\"id\" [class]=\"hostClasses()\">\n <input\n type=\"checkbox\"\n [id]=\"id\"\n class=\"checkbox__input\"\n [attr.aria-label]=\"label() ? null : (ariaLabel() ?? null)\"\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate() && !checked()\"\n [disabled]=\"isDisabled()\"\n (change)=\"onNativeChange($event)\"\n />\n\n @if (labelPosition() === 'left' && label()) {\n <span class=\"checkbox__label\">{{ label() }}</span>\n }\n\n <span class=\"checkbox__box\" aria-hidden=\"true\"></span>\n\n @if (labelPosition() === 'right' && label()) {\n <span class=\"checkbox__label\">{{ label() }}</span>\n }\n</label>\n", styles: [".checkbox{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.checkbox--disabled{cursor:not-allowed;opacity:.5}.checkbox__input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.checkbox__input:focus-visible~.checkbox__box{outline:2px solid var(--ngx-checkbox-color);outline-offset:2px}.checkbox__box{position:relative;flex-shrink:0;border:2px solid var(--border-input, #d1d5db);border-radius:.25rem;background:var(--surface-base, #fff);transition:background-color .15s ease,border-color .15s ease}.checkbox__box:after{content:\"\";position:absolute;display:none;left:50%;top:46%;width:35%;height:58%;border:2px solid var(--text-on-color, #fff);border-top:none;border-left:none;transform:translate(-50%,-50%) rotate(45deg)}.checkbox:hover:not(.checkbox--disabled):not(.checkbox--checked):not(.checkbox--indeterminate) .checkbox__box{border-color:var(--ngx-checkbox-color)}.checkbox--checked .checkbox__box{background-color:var(--ngx-checkbox-color);border-color:var(--ngx-checkbox-color)}.checkbox--checked .checkbox__box:after{display:block}.checkbox--indeterminate .checkbox__box{background-color:var(--ngx-checkbox-color);border-color:var(--ngx-checkbox-color)}.checkbox--indeterminate .checkbox__box:after{display:block;width:55%;height:2px;border:none;background:var(--text-on-color, #fff);top:50%;transform:translate(-50%,-50%)}.checkbox__label{font-size:.875rem;color:var(--text-secondary, #374151);line-height:1.25}.checkbox--sm .checkbox__box{width:.875rem;height:.875rem}.checkbox--md .checkbox__box{width:1.125rem;height:1.125rem}.checkbox--lg .checkbox__box{width:1.375rem;height:1.375rem}.checkbox--primary{--ngx-checkbox-color: var(--primary-500, #6366f1)}.checkbox--secondary{--ngx-checkbox-color: var(--fill-neutral, #6b7280)}.checkbox--danger{--ngx-checkbox-color: var(--danger-500, #ef4444)}.checkbox--success{--ngx-checkbox-color: var(--success-500, #10b981)}.checkbox--warning{--ngx-checkbox-color: var(--warning-500, #f59e0b)}\n"] }]
|
|
1182
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }] } });
|
|
1005
1183
|
|
|
1006
|
-
let nextId$
|
|
1184
|
+
let nextId$j = 0;
|
|
1007
1185
|
class RadioComponent {
|
|
1008
1186
|
value = input.required(...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1009
1187
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
@@ -1019,7 +1197,7 @@ class RadioComponent {
|
|
|
1019
1197
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1020
1198
|
/** Emits this radio's `value` when the user selects it. */
|
|
1021
1199
|
valueSelect = output();
|
|
1022
|
-
id = `ngx-radio-${nextId$
|
|
1200
|
+
id = `ngx-radio-${nextId$j++}`;
|
|
1023
1201
|
#modelValue = signal(null, ...(ngDevMode ? [{ debugName: "#modelValue" }] : /* istanbul ignore next */ []));
|
|
1024
1202
|
#formDisabled = signal(false, ...(ngDevMode ? [{ debugName: "#formDisabled" }] : /* istanbul ignore next */ []));
|
|
1025
1203
|
isDisabled = computed(() => this.disabled() || this.#formDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
@@ -1075,16 +1253,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
1075
1253
|
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label [for]=\"id\" [class]=\"hostClasses()\">\n <input\n type=\"radio\"\n [id]=\"id\"\n [name]=\"name()\"\n [value]=\"value()\"\n class=\"radio__input\"\n [checked]=\"isChecked()\"\n [disabled]=\"isDisabled()\"\n (change)=\"onSelect()\"\n />\n\n @if (labelPosition() === 'left' && label()) {\n <span class=\"radio__label\">{{ label() }}</span>\n }\n\n <span class=\"radio__circle\" aria-hidden=\"true\">\n <span class=\"radio__dot\"></span>\n </span>\n\n @if (labelPosition() === 'right' && label()) {\n <span class=\"radio__label\">{{ label() }}</span>\n }\n</label>\n", styles: [".radio{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.radio--disabled{cursor:not-allowed;opacity:.5}.radio__input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.radio__input:focus-visible~.radio__circle{outline:2px solid var(--ngx-radio-color);outline-offset:2px}.radio__circle{display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:9999px;border:2px solid var(--border-input, #d1d5db);background:var(--surface-base, #fff);transition:border-color .15s ease,background-color .15s ease}.radio:hover:not(.radio--disabled):not(.radio--checked) .radio__circle{border-color:var(--ngx-radio-color)}.radio--checked .radio__circle{border-color:var(--ngx-radio-color);background-color:var(--ngx-radio-color)}.radio__dot{border-radius:9999px;background:var(--text-on-color, #fff);width:40%;height:40%;transform:scale(0);transition:transform .15s ease}.radio--checked .radio__dot{transform:scale(1)}.radio__label{font-size:.875rem;color:var(--text-secondary, #374151);line-height:1.25}.radio--sm .radio__circle{width:.875rem;height:.875rem}.radio--md .radio__circle{width:1.125rem;height:1.125rem}.radio--lg .radio__circle{width:1.375rem;height:1.375rem}.radio--primary{--ngx-radio-color: var(--primary-500, #6366f1)}.radio--secondary{--ngx-radio-color: var(--fill-neutral, #6b7280)}.radio--danger{--ngx-radio-color: var(--danger-500, #ef4444)}.radio--success{--ngx-radio-color: var(--success-500, #10b981)}.radio--warning{--ngx-radio-color: var(--warning-500, #f59e0b)}\n"] }]
|
|
1076
1254
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], valueSelect: [{ type: i0.Output, args: ["valueSelect"] }] } });
|
|
1077
1255
|
|
|
1078
|
-
let nextId$
|
|
1256
|
+
let nextId$i = 0;
|
|
1079
1257
|
class SwitchComponent {
|
|
1080
1258
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1259
|
+
/** Accessible name when there is no visible `label`. */
|
|
1260
|
+
ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
1081
1261
|
labelPosition = input('right', ...(ngDevMode ? [{ debugName: "labelPosition" }] : /* istanbul ignore next */ []));
|
|
1082
1262
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
1083
1263
|
color = input('primary', ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
1084
1264
|
labelOn = input('', ...(ngDevMode ? [{ debugName: "labelOn" }] : /* istanbul ignore next */ []));
|
|
1085
1265
|
labelOff = input('', ...(ngDevMode ? [{ debugName: "labelOff" }] : /* istanbul ignore next */ []));
|
|
1086
1266
|
checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
1087
|
-
id = `ngx-switch-${nextId$
|
|
1267
|
+
id = `ngx-switch-${nextId$i++}`;
|
|
1088
1268
|
#disabled = signal(false, ...(ngDevMode ? [{ debugName: "#disabled" }] : /* istanbul ignore next */ []));
|
|
1089
1269
|
isDisabled = this.#disabled.asReadonly();
|
|
1090
1270
|
onChange = () => { };
|
|
@@ -1117,13 +1297,13 @@ class SwitchComponent {
|
|
|
1117
1297
|
this.#disabled.set(disabled);
|
|
1118
1298
|
}
|
|
1119
1299
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: SwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1120
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: SwitchComponent, isStandalone: true, selector: "ngx-ds-switch", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, labelOn: { classPropertyName: "labelOn", publicName: "labelOn", isSignal: true, isRequired: false, transformFunction: null }, labelOff: { classPropertyName: "labelOff", publicName: "labelOff", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, providers: [
|
|
1300
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: SwitchComponent, isStandalone: true, selector: "ngx-ds-switch", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, labelOn: { classPropertyName: "labelOn", publicName: "labelOn", isSignal: true, isRequired: false, transformFunction: null }, labelOff: { classPropertyName: "labelOff", publicName: "labelOff", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, providers: [
|
|
1121
1301
|
{
|
|
1122
1302
|
provide: NG_VALUE_ACCESSOR,
|
|
1123
1303
|
useExisting: forwardRef(() => SwitchComponent),
|
|
1124
1304
|
multi: true,
|
|
1125
1305
|
},
|
|
1126
|
-
], ngImport: i0, template: "<label [for]=\"id\" [class]=\"hostClasses()\">\n <input\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"id\"\n class=\"switch__input\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-checked]=\"checked()\"\n [attr.aria-label]=\"label() || null\"\n (change)=\"onNativeChange($event)\"\n />\n\n @if (labelPosition() === 'left' && label()) {\n <span class=\"switch__label\">{{ label() }}</span>\n }\n\n <span class=\"switch__track\" aria-hidden=\"true\">\n <span class=\"switch__thumb\"></span>\n </span>\n\n @if (labelPosition() === 'right' && label()) {\n <span class=\"switch__label\">{{ label() }}</span>\n }\n\n @if (activeLabel()) {\n <span class=\"switch__state-label\">{{ activeLabel() }}</span>\n }\n</label>\n", styles: [".switch{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.switch--disabled{cursor:not-allowed;opacity:.5}.switch__input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.switch__input:focus-visible~.switch__track{outline:2px solid var(--ngx-switch-color);outline-offset:2px}.switch__track{position:relative;flex-shrink:0;border-radius:9999px;background-color:var(--border-input, #d1d5db);transition:background-color .2s ease}.switch--checked .switch__track{background-color:var(--ngx-switch-color)}.switch:hover:not(.switch--disabled) .switch__track{filter:brightness(.95)}.switch__thumb{position:absolute;top:50%;background:var(--surface-thumb, #fff);border-radius:9999px;box-shadow:0 1px 3px #0003;transition:transform .2s ease;transform:translateY(-50%) translate(var(--ngx-switch-thumb-start))}.switch--checked .switch__thumb{transform:translateY(-50%) translate(var(--ngx-switch-thumb-end))}.switch__label{font-size:.875rem;color:var(--text-secondary, #374151);line-height:1.25}.switch__state-label{font-size:.75rem;color:var(--text-muted, #6b7280);min-width:2rem}.switch--sm .switch__track{width:2rem;height:1.125rem}.switch--sm .switch__thumb{width:.75rem;height:.75rem;--ngx-switch-thumb-start: .1875rem;--ngx-switch-thumb-end: .875rem}.switch--md .switch__track{width:2.75rem;height:1.5rem}.switch--md .switch__thumb{width:1rem;height:1rem;--ngx-switch-thumb-start: .25rem;--ngx-switch-thumb-end: 1.25rem}.switch--lg .switch__track{width:3.5rem;height:1.875rem}.switch--lg .switch__thumb{width:1.25rem;height:1.25rem;--ngx-switch-thumb-start: .3125rem;--ngx-switch-thumb-end: 1.625rem}.switch--primary{--ngx-switch-color: var(--primary-500, #6366f1)}.switch--secondary{--ngx-switch-color: var(--fill-neutral, #6b7280)}.switch--danger{--ngx-switch-color: var(--danger-500, #ef4444)}.switch--success{--ngx-switch-color: var(--success-500, #10b981)}.switch--warning{--ngx-switch-color: var(--warning-500, #f59e0b)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1306
|
+
], ngImport: i0, template: "<label [for]=\"id\" [class]=\"hostClasses()\">\n <input\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"id\"\n class=\"switch__input\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-checked]=\"checked()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n (change)=\"onNativeChange($event)\"\n />\n\n @if (labelPosition() === 'left' && label()) {\n <span class=\"switch__label\">{{ label() }}</span>\n }\n\n <span class=\"switch__track\" aria-hidden=\"true\">\n <span class=\"switch__thumb\"></span>\n </span>\n\n @if (labelPosition() === 'right' && label()) {\n <span class=\"switch__label\">{{ label() }}</span>\n }\n\n @if (activeLabel()) {\n <span class=\"switch__state-label\">{{ activeLabel() }}</span>\n }\n</label>\n", styles: [".switch{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.switch--disabled{cursor:not-allowed;opacity:.5}.switch__input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.switch__input:focus-visible~.switch__track{outline:2px solid var(--ngx-switch-color);outline-offset:2px}.switch__track{position:relative;flex-shrink:0;border-radius:9999px;background-color:var(--border-input, #d1d5db);transition:background-color .2s ease}.switch--checked .switch__track{background-color:var(--ngx-switch-color)}.switch:hover:not(.switch--disabled) .switch__track{filter:brightness(.95)}.switch__thumb{position:absolute;top:50%;background:var(--surface-thumb, #fff);border-radius:9999px;box-shadow:0 1px 3px #0003;transition:transform .2s ease;transform:translateY(-50%) translate(var(--ngx-switch-thumb-start))}.switch--checked .switch__thumb{transform:translateY(-50%) translate(var(--ngx-switch-thumb-end))}.switch__label{font-size:.875rem;color:var(--text-secondary, #374151);line-height:1.25}.switch__state-label{font-size:.75rem;color:var(--text-muted, #6b7280);min-width:2rem}.switch--sm .switch__track{width:2rem;height:1.125rem}.switch--sm .switch__thumb{width:.75rem;height:.75rem;--ngx-switch-thumb-start: .1875rem;--ngx-switch-thumb-end: .875rem}.switch--md .switch__track{width:2.75rem;height:1.5rem}.switch--md .switch__thumb{width:1rem;height:1rem;--ngx-switch-thumb-start: .25rem;--ngx-switch-thumb-end: 1.25rem}.switch--lg .switch__track{width:3.5rem;height:1.875rem}.switch--lg .switch__thumb{width:1.25rem;height:1.25rem;--ngx-switch-thumb-start: .3125rem;--ngx-switch-thumb-end: 1.625rem}.switch--primary{--ngx-switch-color: var(--primary-500, #6366f1)}.switch--secondary{--ngx-switch-color: var(--fill-neutral, #6b7280)}.switch--danger{--ngx-switch-color: var(--danger-500, #ef4444)}.switch--success{--ngx-switch-color: var(--success-500, #10b981)}.switch--warning{--ngx-switch-color: var(--warning-500, #f59e0b)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1127
1307
|
}
|
|
1128
1308
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: SwitchComponent, decorators: [{
|
|
1129
1309
|
type: Component,
|
|
@@ -1133,8 +1313,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
1133
1313
|
useExisting: forwardRef(() => SwitchComponent),
|
|
1134
1314
|
multi: true,
|
|
1135
1315
|
},
|
|
1136
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label [for]=\"id\" [class]=\"hostClasses()\">\n <input\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"id\"\n class=\"switch__input\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-checked]=\"checked()\"\n [attr.aria-label]=\"label() || null\"\n (change)=\"onNativeChange($event)\"\n />\n\n @if (labelPosition() === 'left' && label()) {\n <span class=\"switch__label\">{{ label() }}</span>\n }\n\n <span class=\"switch__track\" aria-hidden=\"true\">\n <span class=\"switch__thumb\"></span>\n </span>\n\n @if (labelPosition() === 'right' && label()) {\n <span class=\"switch__label\">{{ label() }}</span>\n }\n\n @if (activeLabel()) {\n <span class=\"switch__state-label\">{{ activeLabel() }}</span>\n }\n</label>\n", styles: [".switch{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.switch--disabled{cursor:not-allowed;opacity:.5}.switch__input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.switch__input:focus-visible~.switch__track{outline:2px solid var(--ngx-switch-color);outline-offset:2px}.switch__track{position:relative;flex-shrink:0;border-radius:9999px;background-color:var(--border-input, #d1d5db);transition:background-color .2s ease}.switch--checked .switch__track{background-color:var(--ngx-switch-color)}.switch:hover:not(.switch--disabled) .switch__track{filter:brightness(.95)}.switch__thumb{position:absolute;top:50%;background:var(--surface-thumb, #fff);border-radius:9999px;box-shadow:0 1px 3px #0003;transition:transform .2s ease;transform:translateY(-50%) translate(var(--ngx-switch-thumb-start))}.switch--checked .switch__thumb{transform:translateY(-50%) translate(var(--ngx-switch-thumb-end))}.switch__label{font-size:.875rem;color:var(--text-secondary, #374151);line-height:1.25}.switch__state-label{font-size:.75rem;color:var(--text-muted, #6b7280);min-width:2rem}.switch--sm .switch__track{width:2rem;height:1.125rem}.switch--sm .switch__thumb{width:.75rem;height:.75rem;--ngx-switch-thumb-start: .1875rem;--ngx-switch-thumb-end: .875rem}.switch--md .switch__track{width:2.75rem;height:1.5rem}.switch--md .switch__thumb{width:1rem;height:1rem;--ngx-switch-thumb-start: .25rem;--ngx-switch-thumb-end: 1.25rem}.switch--lg .switch__track{width:3.5rem;height:1.875rem}.switch--lg .switch__thumb{width:1.25rem;height:1.25rem;--ngx-switch-thumb-start: .3125rem;--ngx-switch-thumb-end: 1.625rem}.switch--primary{--ngx-switch-color: var(--primary-500, #6366f1)}.switch--secondary{--ngx-switch-color: var(--fill-neutral, #6b7280)}.switch--danger{--ngx-switch-color: var(--danger-500, #ef4444)}.switch--success{--ngx-switch-color: var(--success-500, #10b981)}.switch--warning{--ngx-switch-color: var(--warning-500, #f59e0b)}\n"] }]
|
|
1137
|
-
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], labelOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelOn", required: false }] }], labelOff: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelOff", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }] } });
|
|
1316
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label [for]=\"id\" [class]=\"hostClasses()\">\n <input\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"id\"\n class=\"switch__input\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-checked]=\"checked()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n (change)=\"onNativeChange($event)\"\n />\n\n @if (labelPosition() === 'left' && label()) {\n <span class=\"switch__label\">{{ label() }}</span>\n }\n\n <span class=\"switch__track\" aria-hidden=\"true\">\n <span class=\"switch__thumb\"></span>\n </span>\n\n @if (labelPosition() === 'right' && label()) {\n <span class=\"switch__label\">{{ label() }}</span>\n }\n\n @if (activeLabel()) {\n <span class=\"switch__state-label\">{{ activeLabel() }}</span>\n }\n</label>\n", styles: [".switch{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.switch--disabled{cursor:not-allowed;opacity:.5}.switch__input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.switch__input:focus-visible~.switch__track{outline:2px solid var(--ngx-switch-color);outline-offset:2px}.switch__track{position:relative;flex-shrink:0;border-radius:9999px;background-color:var(--border-input, #d1d5db);transition:background-color .2s ease}.switch--checked .switch__track{background-color:var(--ngx-switch-color)}.switch:hover:not(.switch--disabled) .switch__track{filter:brightness(.95)}.switch__thumb{position:absolute;top:50%;background:var(--surface-thumb, #fff);border-radius:9999px;box-shadow:0 1px 3px #0003;transition:transform .2s ease;transform:translateY(-50%) translate(var(--ngx-switch-thumb-start))}.switch--checked .switch__thumb{transform:translateY(-50%) translate(var(--ngx-switch-thumb-end))}.switch__label{font-size:.875rem;color:var(--text-secondary, #374151);line-height:1.25}.switch__state-label{font-size:.75rem;color:var(--text-muted, #6b7280);min-width:2rem}.switch--sm .switch__track{width:2rem;height:1.125rem}.switch--sm .switch__thumb{width:.75rem;height:.75rem;--ngx-switch-thumb-start: .1875rem;--ngx-switch-thumb-end: .875rem}.switch--md .switch__track{width:2.75rem;height:1.5rem}.switch--md .switch__thumb{width:1rem;height:1rem;--ngx-switch-thumb-start: .25rem;--ngx-switch-thumb-end: 1.25rem}.switch--lg .switch__track{width:3.5rem;height:1.875rem}.switch--lg .switch__thumb{width:1.25rem;height:1.25rem;--ngx-switch-thumb-start: .3125rem;--ngx-switch-thumb-end: 1.625rem}.switch--primary{--ngx-switch-color: var(--primary-500, #6366f1)}.switch--secondary{--ngx-switch-color: var(--fill-neutral, #6b7280)}.switch--danger{--ngx-switch-color: var(--danger-500, #ef4444)}.switch--success{--ngx-switch-color: var(--success-500, #10b981)}.switch--warning{--ngx-switch-color: var(--warning-500, #f59e0b)}\n"] }]
|
|
1317
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], labelOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelOn", required: false }] }], labelOff: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelOff", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }] } });
|
|
1138
1318
|
|
|
1139
1319
|
/**
|
|
1140
1320
|
* Whether a control shows its error state: always with an explicit `errorMessage`,
|
|
@@ -1155,8 +1335,8 @@ function fieldErrorText(explicit, errors, touched) {
|
|
|
1155
1335
|
return errors.find((e) => e.message)?.message ?? '';
|
|
1156
1336
|
}
|
|
1157
1337
|
|
|
1158
|
-
const ICON_SIZE$
|
|
1159
|
-
let nextId$
|
|
1338
|
+
const ICON_SIZE$b = { sm: 14, md: 16, lg: 18 };
|
|
1339
|
+
let nextId$h = 0;
|
|
1160
1340
|
class InputComponent {
|
|
1161
1341
|
i18n = inject(NGX_DS_LABELS);
|
|
1162
1342
|
// ── Configuration ────────────────────────────────────────────
|
|
@@ -1175,7 +1355,7 @@ class InputComponent {
|
|
|
1175
1355
|
readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
1176
1356
|
// ── Value — two-way bindable (signal forms) ──────────────────
|
|
1177
1357
|
value = model('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1178
|
-
id = `ngx-input-${nextId$
|
|
1358
|
+
id = `ngx-input-${nextId$h++}`;
|
|
1179
1359
|
messageId = `${this.id}-message`;
|
|
1180
1360
|
// ── Internal state ───────────────────────────────────────────
|
|
1181
1361
|
#disabled = signal(false, ...(ngDevMode ? [{ debugName: "#disabled" }] : /* istanbul ignore next */ []));
|
|
@@ -1189,7 +1369,7 @@ class InputComponent {
|
|
|
1189
1369
|
isFloating = computed(() => this.#focused() || this.value().length > 0, ...(ngDevMode ? [{ debugName: "isFloating" }] : /* istanbul ignore next */ []));
|
|
1190
1370
|
hasError = computed(() => fieldHasError(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "hasError" }] : /* istanbul ignore next */ []));
|
|
1191
1371
|
errorText = computed(() => fieldErrorText(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
1192
|
-
iconSize = computed(() => ICON_SIZE$
|
|
1372
|
+
iconSize = computed(() => ICON_SIZE$b[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
1193
1373
|
// In floating mode the placeholder only appears once the label has floated up
|
|
1194
1374
|
effectivePlaceholder = computed(() => this.floatingLabel() && this.label() && !this.isFloating() ? '' : this.placeholder(), ...(ngDevMode ? [{ debugName: "effectivePlaceholder" }] : /* istanbul ignore next */ []));
|
|
1195
1375
|
fieldClasses = computed(() => {
|
|
@@ -1255,7 +1435,7 @@ class InputComponent {
|
|
|
1255
1435
|
useExisting: forwardRef(() => InputComponent),
|
|
1256
1436
|
multi: true,
|
|
1257
1437
|
},
|
|
1258
|
-
], ngImport: i0, template: "<!-- Static label (non-floating) -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-input__label\">{{ label() }}</label>\n}\n\n<!-- Field container -->\n<div [class]=\"fieldClasses()\">\n <!-- Floating label (lives inside the bordered field) -->\n @if (floatingLabel() && label()) {\n <label [for]=\"id\" [class]=\"floatLabelClasses()\">{{ label() }}</label>\n }\n\n <!-- Left icon -->\n @if (iconLeft()) {\n <span class=\"ngx-input__icon ngx-input__icon--left\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"iconLeft()!\" [size]=\"iconSize()\" />\n </span>\n }\n\n <!-- Native input -->\n <input\n class=\"ngx-input__native\"\n [id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n [type]=\"effectiveType()\"\n [value]=\"value()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled() || null\"\n [attr.readonly]=\"readonly() || null\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n\n <!-- Password toggle -->\n @if (type() === 'password') {\n <button\n type=\"button\"\n class=\"ngx-input__password-toggle\"\n [attr.aria-label]=\"effectiveType() === 'text' ? i18n.hidePassword : i18n.showPassword\"\n (click)=\"togglePassword()\"\n tabindex=\"-1\"\n >\n <ngx-ds-icon [icon]=\"eyeIcon()\" [size]=\"iconSize()\" />\n </button>\n }\n\n <!-- Right icon (non-password) -->\n @if (iconRight() && type() !== 'password') {\n <span class=\"ngx-input__icon ngx-input__icon--right\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"iconRight()!\" [size]=\"iconSize()\" />\n </span>\n }\n</div>\n\n<!-- Error / Hint -->\n@if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-input__message ngx-input__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-input__message ngx-input__message--hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-input__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-input__field{position:relative;display:flex;align-items:center;gap:.5rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;transition:border-color .15s ease,box-shadow .15s ease}.ngx-input__field--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-input__field--error{border-color:var(--danger-500, #ef4444)}.ngx-input__field--error.ngx-input__field--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-input__field--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed}.ngx-input__field--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-input__field--md{padding:.5rem .75rem;font-size:.875rem}.ngx-input__field--lg{padding:.625rem 1rem;font-size:1rem}.ngx-input__native{flex:1;min-width:0;padding:0;background:transparent;border:none;outline:none;color:var(--text-base, #111827);font-family:inherit;font-size:inherit;line-height:1.5}.ngx-input__native::placeholder{color:var(--text-placeholder, #
|
|
1438
|
+
], ngImport: i0, template: "<!-- Static label (non-floating) -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-input__label\">{{ label() }}</label>\n}\n\n<!-- Field container -->\n<div [class]=\"fieldClasses()\">\n <!-- Floating label (lives inside the bordered field) -->\n @if (floatingLabel() && label()) {\n <label [for]=\"id\" [class]=\"floatLabelClasses()\">{{ label() }}</label>\n }\n\n <!-- Left icon -->\n @if (iconLeft()) {\n <span class=\"ngx-input__icon ngx-input__icon--left\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"iconLeft()!\" [size]=\"iconSize()\" />\n </span>\n }\n\n <!-- Native input -->\n <input\n class=\"ngx-input__native\"\n [id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n [type]=\"effectiveType()\"\n [value]=\"value()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled() || null\"\n [attr.readonly]=\"readonly() || null\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n\n <!-- Password toggle -->\n @if (type() === 'password') {\n <button\n type=\"button\"\n class=\"ngx-input__password-toggle\"\n [attr.aria-label]=\"effectiveType() === 'text' ? i18n.hidePassword : i18n.showPassword\"\n (click)=\"togglePassword()\"\n tabindex=\"-1\"\n >\n <ngx-ds-icon [icon]=\"eyeIcon()\" [size]=\"iconSize()\" />\n </button>\n }\n\n <!-- Right icon (non-password) -->\n @if (iconRight() && type() !== 'password') {\n <span class=\"ngx-input__icon ngx-input__icon--right\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"iconRight()!\" [size]=\"iconSize()\" />\n </span>\n }\n</div>\n\n<!-- Error / Hint -->\n@if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-input__message ngx-input__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-input__message ngx-input__message--hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-input__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-input__field{position:relative;display:flex;align-items:center;gap:.5rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;transition:border-color .15s ease,box-shadow .15s ease}.ngx-input__field--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-input__field--error{border-color:var(--danger-500, #ef4444)}.ngx-input__field--error.ngx-input__field--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-input__field--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed}.ngx-input__field--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-input__field--md{padding:.5rem .75rem;font-size:.875rem}.ngx-input__field--lg{padding:.625rem 1rem;font-size:1rem}.ngx-input__native{flex:1;min-width:0;padding:0;background:transparent;border:none;outline:none;color:var(--text-base, #111827);font-family:inherit;font-size:inherit;line-height:1.5}.ngx-input__native::placeholder{color:var(--text-placeholder, #6b7280)}.ngx-input__native:disabled{cursor:not-allowed;color:var(--text-muted, #6b7280)}.ngx-input__native[readonly]{cursor:default}.ngx-input__float-label{position:absolute;left:.75rem;top:50%;transform:translateY(-50%);font-size:inherit;color:var(--text-placeholder, #6b7280);pointer-events:none;white-space:nowrap;line-height:1;padding:0;background:transparent;transition:top .15s ease,font-size .15s ease,color .15s ease,background-color .15s ease,padding .15s ease}.ngx-input__float-label--offset{left:2.25rem}.ngx-input__float-label--active{top:0;font-size:.7rem;background:var(--surface-base, #fff);padding:0 .25rem;color:var(--fill-primary, #4f46e5)}.ngx-input__float-label--focused:not(.ngx-input__float-label--error){color:var(--fill-primary, #4f46e5)}.ngx-input__float-label--error{color:var(--fill-danger, #dc2626)}.ngx-input__icon{display:inline-flex;align-items:center;flex-shrink:0;color:var(--text-placeholder, #6b7280)}.ngx-input__password-toggle{display:inline-flex;align-items:center;flex-shrink:0;padding:0;background:transparent;border:none;cursor:pointer;color:var(--text-placeholder, #6b7280);transition:color .15s ease}.ngx-input__password-toggle:hover{color:var(--text-muted, #6b7280)}.ngx-input__message{margin-top:.375rem;font-size:.75rem;line-height:1.4}.ngx-input__message--hint{color:var(--text-muted, #6b7280)}.ngx-input__message--error{color:var(--fill-danger, #dc2626)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1259
1439
|
}
|
|
1260
1440
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: InputComponent, decorators: [{
|
|
1261
1441
|
type: Component,
|
|
@@ -1265,10 +1445,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
1265
1445
|
useExisting: forwardRef(() => InputComponent),
|
|
1266
1446
|
multi: true,
|
|
1267
1447
|
},
|
|
1268
|
-
], template: "<!-- Static label (non-floating) -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-input__label\">{{ label() }}</label>\n}\n\n<!-- Field container -->\n<div [class]=\"fieldClasses()\">\n <!-- Floating label (lives inside the bordered field) -->\n @if (floatingLabel() && label()) {\n <label [for]=\"id\" [class]=\"floatLabelClasses()\">{{ label() }}</label>\n }\n\n <!-- Left icon -->\n @if (iconLeft()) {\n <span class=\"ngx-input__icon ngx-input__icon--left\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"iconLeft()!\" [size]=\"iconSize()\" />\n </span>\n }\n\n <!-- Native input -->\n <input\n class=\"ngx-input__native\"\n [id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n [type]=\"effectiveType()\"\n [value]=\"value()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled() || null\"\n [attr.readonly]=\"readonly() || null\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n\n <!-- Password toggle -->\n @if (type() === 'password') {\n <button\n type=\"button\"\n class=\"ngx-input__password-toggle\"\n [attr.aria-label]=\"effectiveType() === 'text' ? i18n.hidePassword : i18n.showPassword\"\n (click)=\"togglePassword()\"\n tabindex=\"-1\"\n >\n <ngx-ds-icon [icon]=\"eyeIcon()\" [size]=\"iconSize()\" />\n </button>\n }\n\n <!-- Right icon (non-password) -->\n @if (iconRight() && type() !== 'password') {\n <span class=\"ngx-input__icon ngx-input__icon--right\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"iconRight()!\" [size]=\"iconSize()\" />\n </span>\n }\n</div>\n\n<!-- Error / Hint -->\n@if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-input__message ngx-input__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-input__message ngx-input__message--hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-input__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-input__field{position:relative;display:flex;align-items:center;gap:.5rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;transition:border-color .15s ease,box-shadow .15s ease}.ngx-input__field--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-input__field--error{border-color:var(--danger-500, #ef4444)}.ngx-input__field--error.ngx-input__field--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-input__field--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed}.ngx-input__field--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-input__field--md{padding:.5rem .75rem;font-size:.875rem}.ngx-input__field--lg{padding:.625rem 1rem;font-size:1rem}.ngx-input__native{flex:1;min-width:0;padding:0;background:transparent;border:none;outline:none;color:var(--text-base, #111827);font-family:inherit;font-size:inherit;line-height:1.5}.ngx-input__native::placeholder{color:var(--text-placeholder, #
|
|
1448
|
+
], template: "<!-- Static label (non-floating) -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-input__label\">{{ label() }}</label>\n}\n\n<!-- Field container -->\n<div [class]=\"fieldClasses()\">\n <!-- Floating label (lives inside the bordered field) -->\n @if (floatingLabel() && label()) {\n <label [for]=\"id\" [class]=\"floatLabelClasses()\">{{ label() }}</label>\n }\n\n <!-- Left icon -->\n @if (iconLeft()) {\n <span class=\"ngx-input__icon ngx-input__icon--left\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"iconLeft()!\" [size]=\"iconSize()\" />\n </span>\n }\n\n <!-- Native input -->\n <input\n class=\"ngx-input__native\"\n [id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n [type]=\"effectiveType()\"\n [value]=\"value()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled() || null\"\n [attr.readonly]=\"readonly() || null\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n\n <!-- Password toggle -->\n @if (type() === 'password') {\n <button\n type=\"button\"\n class=\"ngx-input__password-toggle\"\n [attr.aria-label]=\"effectiveType() === 'text' ? i18n.hidePassword : i18n.showPassword\"\n (click)=\"togglePassword()\"\n tabindex=\"-1\"\n >\n <ngx-ds-icon [icon]=\"eyeIcon()\" [size]=\"iconSize()\" />\n </button>\n }\n\n <!-- Right icon (non-password) -->\n @if (iconRight() && type() !== 'password') {\n <span class=\"ngx-input__icon ngx-input__icon--right\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"iconRight()!\" [size]=\"iconSize()\" />\n </span>\n }\n</div>\n\n<!-- Error / Hint -->\n@if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-input__message ngx-input__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-input__message ngx-input__message--hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-input__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-input__field{position:relative;display:flex;align-items:center;gap:.5rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;transition:border-color .15s ease,box-shadow .15s ease}.ngx-input__field--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-input__field--error{border-color:var(--danger-500, #ef4444)}.ngx-input__field--error.ngx-input__field--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-input__field--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed}.ngx-input__field--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-input__field--md{padding:.5rem .75rem;font-size:.875rem}.ngx-input__field--lg{padding:.625rem 1rem;font-size:1rem}.ngx-input__native{flex:1;min-width:0;padding:0;background:transparent;border:none;outline:none;color:var(--text-base, #111827);font-family:inherit;font-size:inherit;line-height:1.5}.ngx-input__native::placeholder{color:var(--text-placeholder, #6b7280)}.ngx-input__native:disabled{cursor:not-allowed;color:var(--text-muted, #6b7280)}.ngx-input__native[readonly]{cursor:default}.ngx-input__float-label{position:absolute;left:.75rem;top:50%;transform:translateY(-50%);font-size:inherit;color:var(--text-placeholder, #6b7280);pointer-events:none;white-space:nowrap;line-height:1;padding:0;background:transparent;transition:top .15s ease,font-size .15s ease,color .15s ease,background-color .15s ease,padding .15s ease}.ngx-input__float-label--offset{left:2.25rem}.ngx-input__float-label--active{top:0;font-size:.7rem;background:var(--surface-base, #fff);padding:0 .25rem;color:var(--fill-primary, #4f46e5)}.ngx-input__float-label--focused:not(.ngx-input__float-label--error){color:var(--fill-primary, #4f46e5)}.ngx-input__float-label--error{color:var(--fill-danger, #dc2626)}.ngx-input__icon{display:inline-flex;align-items:center;flex-shrink:0;color:var(--text-placeholder, #6b7280)}.ngx-input__password-toggle{display:inline-flex;align-items:center;flex-shrink:0;padding:0;background:transparent;border:none;cursor:pointer;color:var(--text-placeholder, #6b7280);transition:color .15s ease}.ngx-input__password-toggle:hover{color:var(--text-muted, #6b7280)}.ngx-input__message{margin-top:.375rem;font-size:.75rem;line-height:1.4}.ngx-input__message--hint{color:var(--text-muted, #6b7280)}.ngx-input__message--error{color:var(--fill-danger, #dc2626)}\n"] }]
|
|
1269
1449
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], floatingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatingLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], iconLeft: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconLeft", required: false }] }], iconRight: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconRight", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
|
|
1270
1450
|
|
|
1271
|
-
let nextId$
|
|
1451
|
+
let nextId$g = 0;
|
|
1272
1452
|
class TextareaComponent {
|
|
1273
1453
|
// ── Configuration ────────────────────────────────────────────
|
|
1274
1454
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
@@ -1287,7 +1467,7 @@ class TextareaComponent {
|
|
|
1287
1467
|
showCount = input(false, ...(ngDevMode ? [{ debugName: "showCount" }] : /* istanbul ignore next */ []));
|
|
1288
1468
|
// ── Value ─────────────────────────────────────────────────────
|
|
1289
1469
|
value = model('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1290
|
-
id = `ngx-textarea-${nextId$
|
|
1470
|
+
id = `ngx-textarea-${nextId$g++}`;
|
|
1291
1471
|
messageId = `${this.id}-message`;
|
|
1292
1472
|
// ── Internal state ────────────────────────────────────────────
|
|
1293
1473
|
#disabled = signal(false, ...(ngDevMode ? [{ debugName: "#disabled" }] : /* istanbul ignore next */ []));
|
|
@@ -1359,7 +1539,7 @@ class TextareaComponent {
|
|
|
1359
1539
|
useExisting: forwardRef(() => TextareaComponent),
|
|
1360
1540
|
multi: true,
|
|
1361
1541
|
},
|
|
1362
|
-
], ngImport: i0, template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-textarea__label\">{{ label() }}</label>\n}\n\n<!-- Field container -->\n<div [class]=\"fieldClasses()\">\n <!-- Floating label -->\n @if (floatingLabel() && label()) {\n <label [for]=\"id\" [class]=\"floatLabelClasses()\">{{ label() }}</label>\n }\n\n <!-- Native textarea -->\n <textarea\n class=\"ngx-textarea__native\"\n [id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n [rows]=\"rows()\"\n [value]=\"value()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled() || null\"\n [attr.readonly]=\"readonly() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n ></textarea>\n</div>\n\n<!-- Footer: error/hint + char count -->\n<div class=\"ngx-textarea__footer\">\n @if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-textarea__message ngx-textarea__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n } @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-textarea__message ngx-textarea__message--hint\">{{ hint() }}</p>\n } @else {\n <span></span>\n }\n\n @if (showCount() && maxLength()) {\n <span\n class=\"ngx-textarea__count\"\n [class.ngx-textarea__count--limit]=\"charCount() >= maxLength()!\"\n >\n {{ charCount() }}/{{ maxLength() }}\n </span>\n }\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-textarea__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-textarea__field{position:relative;display:flex;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;transition:border-color .15s ease,box-shadow .15s ease}.ngx-textarea__field--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-textarea__field--error{border-color:var(--danger-500, #ef4444)}.ngx-textarea__field--error.ngx-textarea__field--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-textarea__field--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed}.ngx-textarea__field--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-textarea__field--md{padding:.5rem .75rem;font-size:.875rem}.ngx-textarea__field--lg{padding:.625rem 1rem;font-size:1rem}.ngx-textarea__field--floating{padding-top:1.25rem}.ngx-textarea__field--resize-none .ngx-textarea__native{resize:none}.ngx-textarea__field--resize-vertical .ngx-textarea__native{resize:vertical}.ngx-textarea__field--resize-horizontal .ngx-textarea__native{resize:horizontal}.ngx-textarea__field--resize-both .ngx-textarea__native{resize:both}.ngx-textarea__native{flex:1;min-width:0;padding:0;background:transparent;border:none;outline:none;color:var(--text-base, #111827);font-family:inherit;font-size:inherit;line-height:1.6;resize:vertical}.ngx-textarea__native::placeholder{color:var(--text-placeholder, #
|
|
1542
|
+
], ngImport: i0, template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-textarea__label\">{{ label() }}</label>\n}\n\n<!-- Field container -->\n<div [class]=\"fieldClasses()\">\n <!-- Floating label -->\n @if (floatingLabel() && label()) {\n <label [for]=\"id\" [class]=\"floatLabelClasses()\">{{ label() }}</label>\n }\n\n <!-- Native textarea -->\n <textarea\n class=\"ngx-textarea__native\"\n [id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n [rows]=\"rows()\"\n [value]=\"value()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled() || null\"\n [attr.readonly]=\"readonly() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n ></textarea>\n</div>\n\n<!-- Footer: error/hint + char count -->\n<div class=\"ngx-textarea__footer\">\n @if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-textarea__message ngx-textarea__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n } @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-textarea__message ngx-textarea__message--hint\">{{ hint() }}</p>\n } @else {\n <span></span>\n }\n\n @if (showCount() && maxLength()) {\n <span\n class=\"ngx-textarea__count\"\n [class.ngx-textarea__count--limit]=\"charCount() >= maxLength()!\"\n >\n {{ charCount() }}/{{ maxLength() }}\n </span>\n }\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-textarea__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-textarea__field{position:relative;display:flex;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;transition:border-color .15s ease,box-shadow .15s ease}.ngx-textarea__field--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-textarea__field--error{border-color:var(--danger-500, #ef4444)}.ngx-textarea__field--error.ngx-textarea__field--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-textarea__field--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed}.ngx-textarea__field--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-textarea__field--md{padding:.5rem .75rem;font-size:.875rem}.ngx-textarea__field--lg{padding:.625rem 1rem;font-size:1rem}.ngx-textarea__field--floating{padding-top:1.25rem}.ngx-textarea__field--resize-none .ngx-textarea__native{resize:none}.ngx-textarea__field--resize-vertical .ngx-textarea__native{resize:vertical}.ngx-textarea__field--resize-horizontal .ngx-textarea__native{resize:horizontal}.ngx-textarea__field--resize-both .ngx-textarea__native{resize:both}.ngx-textarea__native{flex:1;min-width:0;padding:0;background:transparent;border:none;outline:none;color:var(--text-base, #111827);font-family:inherit;font-size:inherit;line-height:1.6;resize:vertical}.ngx-textarea__native::placeholder{color:var(--text-placeholder, #6b7280)}.ngx-textarea__native:disabled{cursor:not-allowed;color:var(--text-muted, #6b7280)}.ngx-textarea__native[readonly]{cursor:default}.ngx-textarea__float-label{position:absolute;left:.75rem;top:.625rem;transform:none;font-size:inherit;color:var(--text-placeholder, #6b7280);pointer-events:none;white-space:nowrap;line-height:1;padding:0;background:transparent;transition:top .15s ease,font-size .15s ease,color .15s ease,background-color .15s ease,padding .15s ease}.ngx-textarea__float-label--active{top:0;font-size:.7rem;background:var(--surface-base, #fff);padding:0 .25rem;color:var(--fill-primary, #4f46e5);transform:translateY(-50%)}.ngx-textarea__float-label--focused:not(.ngx-textarea__float-label--error){color:var(--fill-primary, #4f46e5)}.ngx-textarea__float-label--error{color:var(--fill-danger, #dc2626)}.ngx-textarea__footer{display:flex;justify-content:space-between;align-items:flex-start;gap:.5rem;min-height:1.25rem}.ngx-textarea__message{margin-top:.375rem;font-size:.75rem;line-height:1.4}.ngx-textarea__message--hint{color:var(--text-muted, #6b7280)}.ngx-textarea__message--error{color:var(--fill-danger, #dc2626)}.ngx-textarea__count{flex-shrink:0;margin-top:.375rem;font-size:.75rem;color:var(--text-placeholder, #6b7280)}.ngx-textarea__count--limit{color:var(--fill-danger, #dc2626)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1363
1543
|
}
|
|
1364
1544
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TextareaComponent, decorators: [{
|
|
1365
1545
|
type: Component,
|
|
@@ -1369,7 +1549,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
1369
1549
|
useExisting: forwardRef(() => TextareaComponent),
|
|
1370
1550
|
multi: true,
|
|
1371
1551
|
},
|
|
1372
|
-
], template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-textarea__label\">{{ label() }}</label>\n}\n\n<!-- Field container -->\n<div [class]=\"fieldClasses()\">\n <!-- Floating label -->\n @if (floatingLabel() && label()) {\n <label [for]=\"id\" [class]=\"floatLabelClasses()\">{{ label() }}</label>\n }\n\n <!-- Native textarea -->\n <textarea\n class=\"ngx-textarea__native\"\n [id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n [rows]=\"rows()\"\n [value]=\"value()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled() || null\"\n [attr.readonly]=\"readonly() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n ></textarea>\n</div>\n\n<!-- Footer: error/hint + char count -->\n<div class=\"ngx-textarea__footer\">\n @if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-textarea__message ngx-textarea__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n } @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-textarea__message ngx-textarea__message--hint\">{{ hint() }}</p>\n } @else {\n <span></span>\n }\n\n @if (showCount() && maxLength()) {\n <span\n class=\"ngx-textarea__count\"\n [class.ngx-textarea__count--limit]=\"charCount() >= maxLength()!\"\n >\n {{ charCount() }}/{{ maxLength() }}\n </span>\n }\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-textarea__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-textarea__field{position:relative;display:flex;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;transition:border-color .15s ease,box-shadow .15s ease}.ngx-textarea__field--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-textarea__field--error{border-color:var(--danger-500, #ef4444)}.ngx-textarea__field--error.ngx-textarea__field--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-textarea__field--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed}.ngx-textarea__field--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-textarea__field--md{padding:.5rem .75rem;font-size:.875rem}.ngx-textarea__field--lg{padding:.625rem 1rem;font-size:1rem}.ngx-textarea__field--floating{padding-top:1.25rem}.ngx-textarea__field--resize-none .ngx-textarea__native{resize:none}.ngx-textarea__field--resize-vertical .ngx-textarea__native{resize:vertical}.ngx-textarea__field--resize-horizontal .ngx-textarea__native{resize:horizontal}.ngx-textarea__field--resize-both .ngx-textarea__native{resize:both}.ngx-textarea__native{flex:1;min-width:0;padding:0;background:transparent;border:none;outline:none;color:var(--text-base, #111827);font-family:inherit;font-size:inherit;line-height:1.6;resize:vertical}.ngx-textarea__native::placeholder{color:var(--text-placeholder, #
|
|
1552
|
+
], template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-textarea__label\">{{ label() }}</label>\n}\n\n<!-- Field container -->\n<div [class]=\"fieldClasses()\">\n <!-- Floating label -->\n @if (floatingLabel() && label()) {\n <label [for]=\"id\" [class]=\"floatLabelClasses()\">{{ label() }}</label>\n }\n\n <!-- Native textarea -->\n <textarea\n class=\"ngx-textarea__native\"\n [id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n [rows]=\"rows()\"\n [value]=\"value()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled() || null\"\n [attr.readonly]=\"readonly() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n ></textarea>\n</div>\n\n<!-- Footer: error/hint + char count -->\n<div class=\"ngx-textarea__footer\">\n @if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-textarea__message ngx-textarea__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n } @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-textarea__message ngx-textarea__message--hint\">{{ hint() }}</p>\n } @else {\n <span></span>\n }\n\n @if (showCount() && maxLength()) {\n <span\n class=\"ngx-textarea__count\"\n [class.ngx-textarea__count--limit]=\"charCount() >= maxLength()!\"\n >\n {{ charCount() }}/{{ maxLength() }}\n </span>\n }\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-textarea__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-textarea__field{position:relative;display:flex;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;transition:border-color .15s ease,box-shadow .15s ease}.ngx-textarea__field--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-textarea__field--error{border-color:var(--danger-500, #ef4444)}.ngx-textarea__field--error.ngx-textarea__field--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-textarea__field--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed}.ngx-textarea__field--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-textarea__field--md{padding:.5rem .75rem;font-size:.875rem}.ngx-textarea__field--lg{padding:.625rem 1rem;font-size:1rem}.ngx-textarea__field--floating{padding-top:1.25rem}.ngx-textarea__field--resize-none .ngx-textarea__native{resize:none}.ngx-textarea__field--resize-vertical .ngx-textarea__native{resize:vertical}.ngx-textarea__field--resize-horizontal .ngx-textarea__native{resize:horizontal}.ngx-textarea__field--resize-both .ngx-textarea__native{resize:both}.ngx-textarea__native{flex:1;min-width:0;padding:0;background:transparent;border:none;outline:none;color:var(--text-base, #111827);font-family:inherit;font-size:inherit;line-height:1.6;resize:vertical}.ngx-textarea__native::placeholder{color:var(--text-placeholder, #6b7280)}.ngx-textarea__native:disabled{cursor:not-allowed;color:var(--text-muted, #6b7280)}.ngx-textarea__native[readonly]{cursor:default}.ngx-textarea__float-label{position:absolute;left:.75rem;top:.625rem;transform:none;font-size:inherit;color:var(--text-placeholder, #6b7280);pointer-events:none;white-space:nowrap;line-height:1;padding:0;background:transparent;transition:top .15s ease,font-size .15s ease,color .15s ease,background-color .15s ease,padding .15s ease}.ngx-textarea__float-label--active{top:0;font-size:.7rem;background:var(--surface-base, #fff);padding:0 .25rem;color:var(--fill-primary, #4f46e5);transform:translateY(-50%)}.ngx-textarea__float-label--focused:not(.ngx-textarea__float-label--error){color:var(--fill-primary, #4f46e5)}.ngx-textarea__float-label--error{color:var(--fill-danger, #dc2626)}.ngx-textarea__footer{display:flex;justify-content:space-between;align-items:flex-start;gap:.5rem;min-height:1.25rem}.ngx-textarea__message{margin-top:.375rem;font-size:.75rem;line-height:1.4}.ngx-textarea__message--hint{color:var(--text-muted, #6b7280)}.ngx-textarea__message--error{color:var(--fill-danger, #dc2626)}.ngx-textarea__count{flex-shrink:0;margin-top:.375rem;font-size:.75rem;color:var(--text-placeholder, #6b7280)}.ngx-textarea__count--limit{color:var(--fill-danger, #dc2626)}\n"] }]
|
|
1373
1553
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], floatingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatingLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], resize: [{ type: i0.Input, args: [{ isSignal: true, alias: "resize", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], showCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCount", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
|
|
1374
1554
|
|
|
1375
1555
|
/**
|
|
@@ -1445,8 +1625,8 @@ function moveOptionFocus(event) {
|
|
|
1445
1625
|
return true;
|
|
1446
1626
|
}
|
|
1447
1627
|
|
|
1448
|
-
const ICON_SIZE$
|
|
1449
|
-
let nextId$
|
|
1628
|
+
const ICON_SIZE$a = { sm: 14, md: 16, lg: 18 };
|
|
1629
|
+
let nextId$f = 0;
|
|
1450
1630
|
class SelectComponent {
|
|
1451
1631
|
i18n = inject(NGX_DS_LABELS);
|
|
1452
1632
|
// ── Configuration ──────────────────────────────────────────
|
|
@@ -1464,7 +1644,7 @@ class SelectComponent {
|
|
|
1464
1644
|
touched = input(false, ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
1465
1645
|
// ── Value ─────────────────────────────────────────────────
|
|
1466
1646
|
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1467
|
-
id = `ngx-select-${nextId$
|
|
1647
|
+
id = `ngx-select-${nextId$f++}`;
|
|
1468
1648
|
messageId = `${this.id}-message`;
|
|
1469
1649
|
// ── Icons ──────────────────────────────────────────────────
|
|
1470
1650
|
ChevronDown = ChevronDown;
|
|
@@ -1480,7 +1660,7 @@ class SelectComponent {
|
|
|
1480
1660
|
isOpen = this.#open.asReadonly();
|
|
1481
1661
|
isDisabled = this.#disabled.asReadonly();
|
|
1482
1662
|
searchText = this.#search.asReadonly();
|
|
1483
|
-
iconSize = computed(() => ICON_SIZE$
|
|
1663
|
+
iconSize = computed(() => ICON_SIZE$a[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
1484
1664
|
hasError = computed(() => fieldHasError(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "hasError" }] : /* istanbul ignore next */ []));
|
|
1485
1665
|
errorText = computed(() => fieldErrorText(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
1486
1666
|
// ── Derived ────────────────────────────────────────────────
|
|
@@ -1672,7 +1852,7 @@ class SelectComponent {
|
|
|
1672
1852
|
useExisting: forwardRef(() => SelectComponent),
|
|
1673
1853
|
multi: true,
|
|
1674
1854
|
},
|
|
1675
|
-
], viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-select__label\">{{ label() }}</label>\n}\n\n<!-- Trigger -->\n<div\n #trigger\n [class]=\"triggerClasses()\"\n (click)=\"togglePanel()\"\n (keydown)=\"onTriggerKeydown($event)\"\n [attr.id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n role=\"combobox\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-controls]=\"id + '-panel'\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-disabled]=\"isDisabled()\"\n>\n <!-- Floating label -->\n @if (floatingLabel() && label()) {\n <span [class]=\"floatLabelClasses()\">{{ label() }}</span>\n }\n\n <!-- Display area -->\n <span class=\"ngx-select__display\">\n @if (multiple() && selectedValues().length) {\n <!-- Chips (\u22642) or count badge (>2) -->\n @if (selectedValues().length <= 2) {\n @for (val of selectedValues(); track val) {\n <span class=\"ngx-select__tag\">\n {{ tagLabel(val) }}\n @if (!isDisabled()) {\n <button\n type=\"button\"\n class=\"ngx-select__tag-remove\"\n [attr.aria-label]=\"i18n.removeChip(tagLabel(val))\"\n (click)=\"removeTag(val, $event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"10\" />\n </button>\n }\n </span>\n }\n } @else {\n <span class=\"ngx-select__tag\"\n >{{ selectedValues().length }} seleccionados\n @if (!isDisabled()) {\n <button\n type=\"button\"\n class=\"ngx-select__tag-remove\"\n [attr.aria-label]=\"i18n.clearSelection\"\n (click)=\"clearAll($event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"10\" />\n </button>\n }\n </span>\n }\n } @else if (!multiple() && displayText()) {\n <span class=\"ngx-select__value\">{{ displayText() }}</span>\n } @else {\n <span class=\"ngx-select__placeholder\">{{ placeholder() ?? i18n.selectPlaceholder }}</span>\n }\n </span>\n\n <!-- Clear button (single mode) -->\n @if (!multiple() && displayText() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"ngx-select__clear\"\n [attr.aria-label]=\"i18n.clearSelection\"\n (click)=\"clearAll($event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"iconSize()\" />\n </button>\n }\n\n <!-- Chevron -->\n <span class=\"ngx-select__chevron\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"isOpen() ? ChevronUp : ChevronDown\" [size]=\"iconSize()\" />\n </span>\n</div>\n\n<!-- Dropdown panel -->\n@if (isOpen()) {\n <div\n class=\"ngx-select__panel\"\n [id]=\"id + '-panel'\"\n role=\"listbox\"\n [attr.aria-multiselectable]=\"multiple()\"\n >\n <!-- Search -->\n @if (searchable()) {\n <div class=\"ngx-select__search\">\n <ngx-ds-icon [icon]=\"SearchIcon\" [size]=\"14\" class=\"ngx-select__search-icon\" />\n <input\n class=\"ngx-select__search-input\"\n type=\"text\"\n [placeholder]=\"i18n.searchPlaceholder\"\n [value]=\"searchText()\"\n (input)=\"onSearchChange($any($event.target).value)\"\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"onSearchKeydown($event)\"\n autocomplete=\"off\"\n />\n </div>\n }\n\n <!-- Select all (multiple only) -->\n @if (multiple() && !searchText()) {\n <button\n type=\"button\"\n class=\"ngx-select__select-all\"\n (click)=\"selectAll(); $event.stopPropagation()\"\n >\n {{ i18n.selectAll }}\n </button>\n }\n\n <!-- Options -->\n <ul class=\"ngx-select__options\" role=\"presentation\">\n @for (option of filteredOptions(); track option.value) {\n <li\n class=\"ngx-select__option\"\n [class.ngx-select__option--selected]=\"isSelected(option.value)\"\n [class.ngx-select__option--disabled]=\"option.disabled\"\n role=\"option\"\n tabindex=\"-1\"\n [attr.aria-selected]=\"isSelected(option.value)\"\n [attr.aria-disabled]=\"option.disabled || null\"\n (click)=\"selectOption(option); $event.stopPropagation()\"\n (keydown)=\"onOptionKeydown($event, option)\"\n >\n @if (multiple()) {\n <span\n class=\"ngx-select__checkbox\"\n [class.ngx-select__checkbox--checked]=\"isSelected(option.value)\"\n aria-hidden=\"true\"\n ></span>\n } @else {\n <span class=\"ngx-select__check\">\n @if (isSelected(option.value)) {\n <ngx-ds-icon [icon]=\"CheckIcon\" [size]=\"14\" />\n }\n </span>\n }\n <span class=\"ngx-select__option-label\">{{ option.label }}</span>\n </li>\n } @empty {\n <li class=\"ngx-select__empty\">{{ i18n.noResults }}</li>\n }\n </ul>\n </div>\n}\n\n<!-- Hint / Error -->\n@if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-select__message ngx-select__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-select__message ngx-select__message--hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;position:relative;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-select__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-select__trigger{position:relative;display:flex;align-items:center;gap:.375rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color .15s ease,box-shadow .15s ease;min-height:2.375rem}.ngx-select__trigger--focused,.ngx-select__trigger--open{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-select__trigger--error{border-color:var(--danger-500, #ef4444)}.ngx-select__trigger--error.ngx-select__trigger--open,.ngx-select__trigger--error.ngx-select__trigger--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-select__trigger--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed;color:var(--text-placeholder, #9ca3af)}.ngx-select__trigger--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-select__trigger--md{padding:.5rem .75rem;font-size:.875rem}.ngx-select__trigger--lg{padding:.625rem 1rem;font-size:1rem}.ngx-select__display{flex:1;min-width:0;display:flex;flex-wrap:wrap;gap:.25rem;align-items:center}.ngx-select__value{color:var(--text-base, #111827);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ngx-select__placeholder{color:var(--text-placeholder, #9ca3af);white-space:nowrap}.ngx-select__tag{display:inline-flex;align-items:center;gap:.25rem;padding:.125rem .375rem;background:var(--primary-100, #e0e7ff);color:var(--primary-700, #4338ca);border-radius:.25rem;font-size:.75rem;font-weight:500;white-space:nowrap}.ngx-select__tag-remove{display:inline-flex;align-items:center;padding:0;background:transparent;border:none;cursor:pointer;color:inherit;opacity:.7}.ngx-select__tag-remove:hover{opacity:1}.ngx-select__clear{display:inline-flex;align-items:center;padding:0;background:transparent;border:none;cursor:pointer;color:var(--text-placeholder, #9ca3af);flex-shrink:0}.ngx-select__clear:hover{color:var(--text-muted, #6b7280)}.ngx-select__chevron{display:inline-flex;align-items:center;flex-shrink:0;color:var(--text-placeholder, #9ca3af)}.ngx-select__float-label{position:absolute;left:.75rem;top:50%;transform:translateY(-50%);font-size:inherit;color:var(--text-placeholder, #9ca3af);pointer-events:none;white-space:nowrap;line-height:1;padding:0;background:transparent;transition:top .15s ease,font-size .15s ease,color .15s ease,background-color .15s ease,padding .15s ease}.ngx-select__float-label--active{top:0;font-size:.7rem;background:var(--surface-base, #fff);padding:0 .25rem;color:var(--primary-500, #6366f1)}.ngx-select__float-label--focused:not(.ngx-select__float-label--error){color:var(--primary-500, #6366f1)}.ngx-select__float-label--error{color:var(--danger-500, #ef4444)}.ngx-select__panel{position:absolute;top:calc(100% + .25rem);left:0;right:0;z-index:100;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;box-shadow:0 4px 16px #0000001a;overflow:hidden}.ngx-select__search{display:flex;align-items:center;gap:.375rem;padding:.375rem .75rem;border-bottom:1px solid var(--border-subtle, #f3f4f6)}.ngx-select__search-icon{color:var(--text-placeholder, #9ca3af);flex-shrink:0}.ngx-select__search-input{flex:1;border:none;outline:none;font-size:.8125rem;color:var(--text-base, #111827);background:transparent;font-family:inherit}.ngx-select__search-input::placeholder{color:var(--text-placeholder, #9ca3af)}.ngx-select__select-all{display:block;width:100%;padding:.375rem .75rem;text-align:left;background:transparent;border:none;border-bottom:1px solid var(--border-subtle, #f3f4f6);font-size:.8125rem;color:var(--primary-500, #6366f1);font-weight:500;cursor:pointer;font-family:inherit}.ngx-select__select-all:hover{background:var(--primary-50, #eef2ff)}.ngx-select__options{list-style:none;margin:0;padding:.25rem 0;max-height:14rem;overflow-y:auto}.ngx-select__option{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;font-size:.875rem;color:var(--text-secondary, #374151);cursor:pointer;transition:background .1s ease}.ngx-select__option:hover:not(.ngx-select__option--disabled){background:var(--surface-subtle, #f9fafb)}.ngx-select__option--selected:not(.ngx-select__option--disabled){color:var(--primary-700, #4338ca);background:var(--primary-50, #eef2ff)}.ngx-select__option--disabled{color:var(--text-placeholder, #9ca3af);cursor:not-allowed}.ngx-select__option-label{flex:1}.ngx-select__checkbox{flex-shrink:0;width:1rem;height:1rem;border:1.5px solid var(--border-input, #d1d5db);border-radius:.2rem;background:var(--surface-base, #fff);position:relative;transition:border-color .1s,background .1s}.ngx-select__checkbox--checked{border-color:var(--primary-500, #6366f1);background:var(--primary-500, #6366f1)}.ngx-select__checkbox--checked:after{content:\"\";position:absolute;left:.2rem;top:.05rem;width:.35rem;height:.55rem;border:2px solid var(--text-on-color, #fff);border-top:none;border-left:none;transform:rotate(45deg)}.ngx-select__check{flex-shrink:0;width:1rem;height:1rem;display:flex;align-items:center;justify-content:center;color:var(--primary-500, #6366f1)}.ngx-select__empty{padding:.75rem;text-align:center;font-size:.875rem;color:var(--text-placeholder, #9ca3af)}.ngx-select__message{margin-top:.375rem;font-size:.75rem;line-height:1.4}.ngx-select__message--hint{color:var(--text-muted, #6b7280)}.ngx-select__message--error{color:var(--danger-500, #ef4444)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1855
|
+
], viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-select__label\">{{ label() }}</label>\n}\n\n<!-- Trigger -->\n<div\n #trigger\n [class]=\"triggerClasses()\"\n (click)=\"togglePanel()\"\n (keydown)=\"onTriggerKeydown($event)\"\n [attr.id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n role=\"combobox\"\n [attr.aria-label]=\"label() || null\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-controls]=\"id + '-panel'\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-disabled]=\"isDisabled()\"\n>\n <!-- Floating label -->\n @if (floatingLabel() && label()) {\n <span [class]=\"floatLabelClasses()\">{{ label() }}</span>\n }\n\n <!-- Display area -->\n <span class=\"ngx-select__display\">\n @if (multiple() && selectedValues().length) {\n <!-- Chips (\u22642) or count badge (>2) -->\n @if (selectedValues().length <= 2) {\n @for (val of selectedValues(); track val) {\n <span class=\"ngx-select__tag\">\n {{ tagLabel(val) }}\n @if (!isDisabled()) {\n <button\n type=\"button\"\n class=\"ngx-select__tag-remove\"\n [attr.aria-label]=\"i18n.removeChip(tagLabel(val))\"\n (click)=\"removeTag(val, $event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"10\" />\n </button>\n }\n </span>\n }\n } @else {\n <span class=\"ngx-select__tag\"\n >{{ selectedValues().length }} seleccionados\n @if (!isDisabled()) {\n <button\n type=\"button\"\n class=\"ngx-select__tag-remove\"\n [attr.aria-label]=\"i18n.clearSelection\"\n (click)=\"clearAll($event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"10\" />\n </button>\n }\n </span>\n }\n } @else if (!multiple() && displayText()) {\n <span class=\"ngx-select__value\">{{ displayText() }}</span>\n } @else {\n <span class=\"ngx-select__placeholder\">{{ placeholder() ?? i18n.selectPlaceholder }}</span>\n }\n </span>\n\n <!-- Clear button (single mode) -->\n @if (!multiple() && displayText() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"ngx-select__clear\"\n [attr.aria-label]=\"i18n.clearSelection\"\n (click)=\"clearAll($event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"iconSize()\" />\n </button>\n }\n\n <!-- Chevron -->\n <span class=\"ngx-select__chevron\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"isOpen() ? ChevronUp : ChevronDown\" [size]=\"iconSize()\" />\n </span>\n</div>\n\n<!-- Dropdown panel -->\n@if (isOpen()) {\n <div\n class=\"ngx-select__panel\"\n [id]=\"id + '-panel'\"\n role=\"listbox\"\n [attr.aria-multiselectable]=\"multiple()\"\n >\n <!-- Search -->\n @if (searchable()) {\n <div class=\"ngx-select__search\">\n <ngx-ds-icon [icon]=\"SearchIcon\" [size]=\"14\" class=\"ngx-select__search-icon\" />\n <input\n class=\"ngx-select__search-input\"\n type=\"text\"\n [placeholder]=\"i18n.searchPlaceholder\"\n [value]=\"searchText()\"\n (input)=\"onSearchChange($any($event.target).value)\"\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"onSearchKeydown($event)\"\n autocomplete=\"off\"\n />\n </div>\n }\n\n <!-- Select all (multiple only) -->\n @if (multiple() && !searchText()) {\n <button\n type=\"button\"\n class=\"ngx-select__select-all\"\n (click)=\"selectAll(); $event.stopPropagation()\"\n >\n {{ i18n.selectAll }}\n </button>\n }\n\n <!-- Options -->\n <ul class=\"ngx-select__options\" role=\"presentation\">\n @for (option of filteredOptions(); track option.value) {\n <li\n class=\"ngx-select__option\"\n [class.ngx-select__option--selected]=\"isSelected(option.value)\"\n [class.ngx-select__option--disabled]=\"option.disabled\"\n role=\"option\"\n tabindex=\"-1\"\n [attr.aria-selected]=\"isSelected(option.value)\"\n [attr.aria-disabled]=\"option.disabled || null\"\n (click)=\"selectOption(option); $event.stopPropagation()\"\n (keydown)=\"onOptionKeydown($event, option)\"\n >\n @if (multiple()) {\n <span\n class=\"ngx-select__checkbox\"\n [class.ngx-select__checkbox--checked]=\"isSelected(option.value)\"\n aria-hidden=\"true\"\n ></span>\n } @else {\n <span class=\"ngx-select__check\">\n @if (isSelected(option.value)) {\n <ngx-ds-icon [icon]=\"CheckIcon\" [size]=\"14\" />\n }\n </span>\n }\n <span class=\"ngx-select__option-label\">{{ option.label }}</span>\n </li>\n } @empty {\n <li class=\"ngx-select__empty\">{{ i18n.noResults }}</li>\n }\n </ul>\n </div>\n}\n\n<!-- Hint / Error -->\n@if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-select__message ngx-select__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-select__message ngx-select__message--hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;position:relative;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-select__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-select__trigger{position:relative;display:flex;align-items:center;gap:.375rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color .15s ease,box-shadow .15s ease;min-height:2.375rem}.ngx-select__trigger--focused,.ngx-select__trigger--open{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-select__trigger--error{border-color:var(--danger-500, #ef4444)}.ngx-select__trigger--error.ngx-select__trigger--open,.ngx-select__trigger--error.ngx-select__trigger--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-select__trigger--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed;color:var(--text-placeholder, #6b7280)}.ngx-select__trigger--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-select__trigger--md{padding:.5rem .75rem;font-size:.875rem}.ngx-select__trigger--lg{padding:.625rem 1rem;font-size:1rem}.ngx-select__display{flex:1;min-width:0;display:flex;flex-wrap:wrap;gap:.25rem;align-items:center}.ngx-select__value{color:var(--text-base, #111827);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ngx-select__placeholder{color:var(--text-placeholder, #6b7280);white-space:nowrap}.ngx-select__tag{display:inline-flex;align-items:center;gap:.25rem;padding:.125rem .375rem;background:var(--primary-100, #e0e7ff);color:var(--primary-700, #4338ca);border-radius:.25rem;font-size:.75rem;font-weight:500;white-space:nowrap}.ngx-select__tag-remove{display:inline-flex;align-items:center;padding:0;background:transparent;border:none;cursor:pointer;color:inherit;opacity:.7}.ngx-select__tag-remove:hover{opacity:1}.ngx-select__clear{display:inline-flex;align-items:center;padding:0;background:transparent;border:none;cursor:pointer;color:var(--text-placeholder, #6b7280);flex-shrink:0}.ngx-select__clear:hover{color:var(--text-muted, #6b7280)}.ngx-select__chevron{display:inline-flex;align-items:center;flex-shrink:0;color:var(--text-placeholder, #6b7280)}.ngx-select__float-label{position:absolute;left:.75rem;top:50%;transform:translateY(-50%);font-size:inherit;color:var(--text-placeholder, #6b7280);pointer-events:none;white-space:nowrap;line-height:1;padding:0;background:transparent;transition:top .15s ease,font-size .15s ease,color .15s ease,background-color .15s ease,padding .15s ease}.ngx-select__float-label--active{top:0;font-size:.7rem;background:var(--surface-base, #fff);padding:0 .25rem;color:var(--fill-primary, #4f46e5)}.ngx-select__float-label--focused:not(.ngx-select__float-label--error){color:var(--fill-primary, #4f46e5)}.ngx-select__float-label--error{color:var(--fill-danger, #dc2626)}.ngx-select__panel{position:absolute;top:calc(100% + .25rem);left:0;right:0;z-index:100;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;box-shadow:0 4px 16px #0000001a;overflow:hidden}.ngx-select__search{display:flex;align-items:center;gap:.375rem;padding:.375rem .75rem;border-bottom:1px solid var(--border-subtle, #f3f4f6)}.ngx-select__search-icon{color:var(--text-placeholder, #6b7280);flex-shrink:0}.ngx-select__search-input{flex:1;border:none;outline:none;font-size:.8125rem;color:var(--text-base, #111827);background:transparent;font-family:inherit}.ngx-select__search-input::placeholder{color:var(--text-placeholder, #6b7280)}.ngx-select__select-all{display:block;width:100%;padding:.375rem .75rem;text-align:left;background:transparent;border:none;border-bottom:1px solid var(--border-subtle, #f3f4f6);font-size:.8125rem;color:var(--fill-primary, #4f46e5);font-weight:500;cursor:pointer;font-family:inherit}.ngx-select__select-all:hover{background:var(--primary-50, #eef2ff)}.ngx-select__options{list-style:none;margin:0;padding:.25rem 0;max-height:14rem;overflow-y:auto}.ngx-select__option{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;font-size:.875rem;color:var(--text-secondary, #374151);cursor:pointer;transition:background .1s ease}.ngx-select__option:hover:not(.ngx-select__option--disabled){background:var(--surface-subtle, #f9fafb)}.ngx-select__option--selected:not(.ngx-select__option--disabled){color:var(--primary-700, #4338ca);background:var(--primary-50, #eef2ff)}.ngx-select__option--disabled{color:var(--text-placeholder, #6b7280);cursor:not-allowed}.ngx-select__option-label{flex:1}.ngx-select__checkbox{flex-shrink:0;width:1rem;height:1rem;border:1.5px solid var(--border-input, #d1d5db);border-radius:.2rem;background:var(--surface-base, #fff);position:relative;transition:border-color .1s,background .1s}.ngx-select__checkbox--checked{border-color:var(--primary-500, #6366f1);background:var(--primary-500, #6366f1)}.ngx-select__checkbox--checked:after{content:\"\";position:absolute;left:.2rem;top:.05rem;width:.35rem;height:.55rem;border:2px solid var(--text-on-color, #fff);border-top:none;border-left:none;transform:rotate(45deg)}.ngx-select__check{flex-shrink:0;width:1rem;height:1rem;display:flex;align-items:center;justify-content:center;color:var(--fill-primary, #4f46e5)}.ngx-select__empty{padding:.75rem;text-align:center;font-size:.875rem;color:var(--text-placeholder, #6b7280)}.ngx-select__message{margin-top:.375rem;font-size:.75rem;line-height:1.4}.ngx-select__message--hint{color:var(--text-muted, #6b7280)}.ngx-select__message--error{color:var(--fill-danger, #dc2626)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1676
1856
|
}
|
|
1677
1857
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: SelectComponent, decorators: [{
|
|
1678
1858
|
type: Component,
|
|
@@ -1682,11 +1862,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
1682
1862
|
useExisting: forwardRef(() => SelectComponent),
|
|
1683
1863
|
multi: true,
|
|
1684
1864
|
},
|
|
1685
|
-
], template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-select__label\">{{ label() }}</label>\n}\n\n<!-- Trigger -->\n<div\n #trigger\n [class]=\"triggerClasses()\"\n (click)=\"togglePanel()\"\n (keydown)=\"onTriggerKeydown($event)\"\n [attr.id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n role=\"combobox\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-controls]=\"id + '-panel'\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-disabled]=\"isDisabled()\"\n>\n <!-- Floating label -->\n @if (floatingLabel() && label()) {\n <span [class]=\"floatLabelClasses()\">{{ label() }}</span>\n }\n\n <!-- Display area -->\n <span class=\"ngx-select__display\">\n @if (multiple() && selectedValues().length) {\n <!-- Chips (\u22642) or count badge (>2) -->\n @if (selectedValues().length <= 2) {\n @for (val of selectedValues(); track val) {\n <span class=\"ngx-select__tag\">\n {{ tagLabel(val) }}\n @if (!isDisabled()) {\n <button\n type=\"button\"\n class=\"ngx-select__tag-remove\"\n [attr.aria-label]=\"i18n.removeChip(tagLabel(val))\"\n (click)=\"removeTag(val, $event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"10\" />\n </button>\n }\n </span>\n }\n } @else {\n <span class=\"ngx-select__tag\"\n >{{ selectedValues().length }} seleccionados\n @if (!isDisabled()) {\n <button\n type=\"button\"\n class=\"ngx-select__tag-remove\"\n [attr.aria-label]=\"i18n.clearSelection\"\n (click)=\"clearAll($event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"10\" />\n </button>\n }\n </span>\n }\n } @else if (!multiple() && displayText()) {\n <span class=\"ngx-select__value\">{{ displayText() }}</span>\n } @else {\n <span class=\"ngx-select__placeholder\">{{ placeholder() ?? i18n.selectPlaceholder }}</span>\n }\n </span>\n\n <!-- Clear button (single mode) -->\n @if (!multiple() && displayText() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"ngx-select__clear\"\n [attr.aria-label]=\"i18n.clearSelection\"\n (click)=\"clearAll($event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"iconSize()\" />\n </button>\n }\n\n <!-- Chevron -->\n <span class=\"ngx-select__chevron\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"isOpen() ? ChevronUp : ChevronDown\" [size]=\"iconSize()\" />\n </span>\n</div>\n\n<!-- Dropdown panel -->\n@if (isOpen()) {\n <div\n class=\"ngx-select__panel\"\n [id]=\"id + '-panel'\"\n role=\"listbox\"\n [attr.aria-multiselectable]=\"multiple()\"\n >\n <!-- Search -->\n @if (searchable()) {\n <div class=\"ngx-select__search\">\n <ngx-ds-icon [icon]=\"SearchIcon\" [size]=\"14\" class=\"ngx-select__search-icon\" />\n <input\n class=\"ngx-select__search-input\"\n type=\"text\"\n [placeholder]=\"i18n.searchPlaceholder\"\n [value]=\"searchText()\"\n (input)=\"onSearchChange($any($event.target).value)\"\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"onSearchKeydown($event)\"\n autocomplete=\"off\"\n />\n </div>\n }\n\n <!-- Select all (multiple only) -->\n @if (multiple() && !searchText()) {\n <button\n type=\"button\"\n class=\"ngx-select__select-all\"\n (click)=\"selectAll(); $event.stopPropagation()\"\n >\n {{ i18n.selectAll }}\n </button>\n }\n\n <!-- Options -->\n <ul class=\"ngx-select__options\" role=\"presentation\">\n @for (option of filteredOptions(); track option.value) {\n <li\n class=\"ngx-select__option\"\n [class.ngx-select__option--selected]=\"isSelected(option.value)\"\n [class.ngx-select__option--disabled]=\"option.disabled\"\n role=\"option\"\n tabindex=\"-1\"\n [attr.aria-selected]=\"isSelected(option.value)\"\n [attr.aria-disabled]=\"option.disabled || null\"\n (click)=\"selectOption(option); $event.stopPropagation()\"\n (keydown)=\"onOptionKeydown($event, option)\"\n >\n @if (multiple()) {\n <span\n class=\"ngx-select__checkbox\"\n [class.ngx-select__checkbox--checked]=\"isSelected(option.value)\"\n aria-hidden=\"true\"\n ></span>\n } @else {\n <span class=\"ngx-select__check\">\n @if (isSelected(option.value)) {\n <ngx-ds-icon [icon]=\"CheckIcon\" [size]=\"14\" />\n }\n </span>\n }\n <span class=\"ngx-select__option-label\">{{ option.label }}</span>\n </li>\n } @empty {\n <li class=\"ngx-select__empty\">{{ i18n.noResults }}</li>\n }\n </ul>\n </div>\n}\n\n<!-- Hint / Error -->\n@if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-select__message ngx-select__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-select__message ngx-select__message--hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;position:relative;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-select__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-select__trigger{position:relative;display:flex;align-items:center;gap:.375rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color .15s ease,box-shadow .15s ease;min-height:2.375rem}.ngx-select__trigger--focused,.ngx-select__trigger--open{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-select__trigger--error{border-color:var(--danger-500, #ef4444)}.ngx-select__trigger--error.ngx-select__trigger--open,.ngx-select__trigger--error.ngx-select__trigger--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-select__trigger--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed;color:var(--text-placeholder, #9ca3af)}.ngx-select__trigger--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-select__trigger--md{padding:.5rem .75rem;font-size:.875rem}.ngx-select__trigger--lg{padding:.625rem 1rem;font-size:1rem}.ngx-select__display{flex:1;min-width:0;display:flex;flex-wrap:wrap;gap:.25rem;align-items:center}.ngx-select__value{color:var(--text-base, #111827);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ngx-select__placeholder{color:var(--text-placeholder, #9ca3af);white-space:nowrap}.ngx-select__tag{display:inline-flex;align-items:center;gap:.25rem;padding:.125rem .375rem;background:var(--primary-100, #e0e7ff);color:var(--primary-700, #4338ca);border-radius:.25rem;font-size:.75rem;font-weight:500;white-space:nowrap}.ngx-select__tag-remove{display:inline-flex;align-items:center;padding:0;background:transparent;border:none;cursor:pointer;color:inherit;opacity:.7}.ngx-select__tag-remove:hover{opacity:1}.ngx-select__clear{display:inline-flex;align-items:center;padding:0;background:transparent;border:none;cursor:pointer;color:var(--text-placeholder, #9ca3af);flex-shrink:0}.ngx-select__clear:hover{color:var(--text-muted, #6b7280)}.ngx-select__chevron{display:inline-flex;align-items:center;flex-shrink:0;color:var(--text-placeholder, #9ca3af)}.ngx-select__float-label{position:absolute;left:.75rem;top:50%;transform:translateY(-50%);font-size:inherit;color:var(--text-placeholder, #9ca3af);pointer-events:none;white-space:nowrap;line-height:1;padding:0;background:transparent;transition:top .15s ease,font-size .15s ease,color .15s ease,background-color .15s ease,padding .15s ease}.ngx-select__float-label--active{top:0;font-size:.7rem;background:var(--surface-base, #fff);padding:0 .25rem;color:var(--primary-500, #6366f1)}.ngx-select__float-label--focused:not(.ngx-select__float-label--error){color:var(--primary-500, #6366f1)}.ngx-select__float-label--error{color:var(--danger-500, #ef4444)}.ngx-select__panel{position:absolute;top:calc(100% + .25rem);left:0;right:0;z-index:100;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;box-shadow:0 4px 16px #0000001a;overflow:hidden}.ngx-select__search{display:flex;align-items:center;gap:.375rem;padding:.375rem .75rem;border-bottom:1px solid var(--border-subtle, #f3f4f6)}.ngx-select__search-icon{color:var(--text-placeholder, #9ca3af);flex-shrink:0}.ngx-select__search-input{flex:1;border:none;outline:none;font-size:.8125rem;color:var(--text-base, #111827);background:transparent;font-family:inherit}.ngx-select__search-input::placeholder{color:var(--text-placeholder, #9ca3af)}.ngx-select__select-all{display:block;width:100%;padding:.375rem .75rem;text-align:left;background:transparent;border:none;border-bottom:1px solid var(--border-subtle, #f3f4f6);font-size:.8125rem;color:var(--primary-500, #6366f1);font-weight:500;cursor:pointer;font-family:inherit}.ngx-select__select-all:hover{background:var(--primary-50, #eef2ff)}.ngx-select__options{list-style:none;margin:0;padding:.25rem 0;max-height:14rem;overflow-y:auto}.ngx-select__option{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;font-size:.875rem;color:var(--text-secondary, #374151);cursor:pointer;transition:background .1s ease}.ngx-select__option:hover:not(.ngx-select__option--disabled){background:var(--surface-subtle, #f9fafb)}.ngx-select__option--selected:not(.ngx-select__option--disabled){color:var(--primary-700, #4338ca);background:var(--primary-50, #eef2ff)}.ngx-select__option--disabled{color:var(--text-placeholder, #9ca3af);cursor:not-allowed}.ngx-select__option-label{flex:1}.ngx-select__checkbox{flex-shrink:0;width:1rem;height:1rem;border:1.5px solid var(--border-input, #d1d5db);border-radius:.2rem;background:var(--surface-base, #fff);position:relative;transition:border-color .1s,background .1s}.ngx-select__checkbox--checked{border-color:var(--primary-500, #6366f1);background:var(--primary-500, #6366f1)}.ngx-select__checkbox--checked:after{content:\"\";position:absolute;left:.2rem;top:.05rem;width:.35rem;height:.55rem;border:2px solid var(--text-on-color, #fff);border-top:none;border-left:none;transform:rotate(45deg)}.ngx-select__check{flex-shrink:0;width:1rem;height:1rem;display:flex;align-items:center;justify-content:center;color:var(--primary-500, #6366f1)}.ngx-select__empty{padding:.75rem;text-align:center;font-size:.875rem;color:var(--text-placeholder, #9ca3af)}.ngx-select__message{margin-top:.375rem;font-size:.75rem;line-height:1.4}.ngx-select__message--hint{color:var(--text-muted, #6b7280)}.ngx-select__message--error{color:var(--danger-500, #ef4444)}\n"] }]
|
|
1865
|
+
], template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-select__label\">{{ label() }}</label>\n}\n\n<!-- Trigger -->\n<div\n #trigger\n [class]=\"triggerClasses()\"\n (click)=\"togglePanel()\"\n (keydown)=\"onTriggerKeydown($event)\"\n [attr.id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n role=\"combobox\"\n [attr.aria-label]=\"label() || null\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-controls]=\"id + '-panel'\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-disabled]=\"isDisabled()\"\n>\n <!-- Floating label -->\n @if (floatingLabel() && label()) {\n <span [class]=\"floatLabelClasses()\">{{ label() }}</span>\n }\n\n <!-- Display area -->\n <span class=\"ngx-select__display\">\n @if (multiple() && selectedValues().length) {\n <!-- Chips (\u22642) or count badge (>2) -->\n @if (selectedValues().length <= 2) {\n @for (val of selectedValues(); track val) {\n <span class=\"ngx-select__tag\">\n {{ tagLabel(val) }}\n @if (!isDisabled()) {\n <button\n type=\"button\"\n class=\"ngx-select__tag-remove\"\n [attr.aria-label]=\"i18n.removeChip(tagLabel(val))\"\n (click)=\"removeTag(val, $event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"10\" />\n </button>\n }\n </span>\n }\n } @else {\n <span class=\"ngx-select__tag\"\n >{{ selectedValues().length }} seleccionados\n @if (!isDisabled()) {\n <button\n type=\"button\"\n class=\"ngx-select__tag-remove\"\n [attr.aria-label]=\"i18n.clearSelection\"\n (click)=\"clearAll($event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"10\" />\n </button>\n }\n </span>\n }\n } @else if (!multiple() && displayText()) {\n <span class=\"ngx-select__value\">{{ displayText() }}</span>\n } @else {\n <span class=\"ngx-select__placeholder\">{{ placeholder() ?? i18n.selectPlaceholder }}</span>\n }\n </span>\n\n <!-- Clear button (single mode) -->\n @if (!multiple() && displayText() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"ngx-select__clear\"\n [attr.aria-label]=\"i18n.clearSelection\"\n (click)=\"clearAll($event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"iconSize()\" />\n </button>\n }\n\n <!-- Chevron -->\n <span class=\"ngx-select__chevron\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"isOpen() ? ChevronUp : ChevronDown\" [size]=\"iconSize()\" />\n </span>\n</div>\n\n<!-- Dropdown panel -->\n@if (isOpen()) {\n <div\n class=\"ngx-select__panel\"\n [id]=\"id + '-panel'\"\n role=\"listbox\"\n [attr.aria-multiselectable]=\"multiple()\"\n >\n <!-- Search -->\n @if (searchable()) {\n <div class=\"ngx-select__search\">\n <ngx-ds-icon [icon]=\"SearchIcon\" [size]=\"14\" class=\"ngx-select__search-icon\" />\n <input\n class=\"ngx-select__search-input\"\n type=\"text\"\n [placeholder]=\"i18n.searchPlaceholder\"\n [value]=\"searchText()\"\n (input)=\"onSearchChange($any($event.target).value)\"\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"onSearchKeydown($event)\"\n autocomplete=\"off\"\n />\n </div>\n }\n\n <!-- Select all (multiple only) -->\n @if (multiple() && !searchText()) {\n <button\n type=\"button\"\n class=\"ngx-select__select-all\"\n (click)=\"selectAll(); $event.stopPropagation()\"\n >\n {{ i18n.selectAll }}\n </button>\n }\n\n <!-- Options -->\n <ul class=\"ngx-select__options\" role=\"presentation\">\n @for (option of filteredOptions(); track option.value) {\n <li\n class=\"ngx-select__option\"\n [class.ngx-select__option--selected]=\"isSelected(option.value)\"\n [class.ngx-select__option--disabled]=\"option.disabled\"\n role=\"option\"\n tabindex=\"-1\"\n [attr.aria-selected]=\"isSelected(option.value)\"\n [attr.aria-disabled]=\"option.disabled || null\"\n (click)=\"selectOption(option); $event.stopPropagation()\"\n (keydown)=\"onOptionKeydown($event, option)\"\n >\n @if (multiple()) {\n <span\n class=\"ngx-select__checkbox\"\n [class.ngx-select__checkbox--checked]=\"isSelected(option.value)\"\n aria-hidden=\"true\"\n ></span>\n } @else {\n <span class=\"ngx-select__check\">\n @if (isSelected(option.value)) {\n <ngx-ds-icon [icon]=\"CheckIcon\" [size]=\"14\" />\n }\n </span>\n }\n <span class=\"ngx-select__option-label\">{{ option.label }}</span>\n </li>\n } @empty {\n <li class=\"ngx-select__empty\">{{ i18n.noResults }}</li>\n }\n </ul>\n </div>\n}\n\n<!-- Hint / Error -->\n@if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-select__message ngx-select__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-select__message ngx-select__message--hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;position:relative;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-select__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-select__trigger{position:relative;display:flex;align-items:center;gap:.375rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color .15s ease,box-shadow .15s ease;min-height:2.375rem}.ngx-select__trigger--focused,.ngx-select__trigger--open{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-select__trigger--error{border-color:var(--danger-500, #ef4444)}.ngx-select__trigger--error.ngx-select__trigger--open,.ngx-select__trigger--error.ngx-select__trigger--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-select__trigger--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed;color:var(--text-placeholder, #6b7280)}.ngx-select__trigger--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-select__trigger--md{padding:.5rem .75rem;font-size:.875rem}.ngx-select__trigger--lg{padding:.625rem 1rem;font-size:1rem}.ngx-select__display{flex:1;min-width:0;display:flex;flex-wrap:wrap;gap:.25rem;align-items:center}.ngx-select__value{color:var(--text-base, #111827);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ngx-select__placeholder{color:var(--text-placeholder, #6b7280);white-space:nowrap}.ngx-select__tag{display:inline-flex;align-items:center;gap:.25rem;padding:.125rem .375rem;background:var(--primary-100, #e0e7ff);color:var(--primary-700, #4338ca);border-radius:.25rem;font-size:.75rem;font-weight:500;white-space:nowrap}.ngx-select__tag-remove{display:inline-flex;align-items:center;padding:0;background:transparent;border:none;cursor:pointer;color:inherit;opacity:.7}.ngx-select__tag-remove:hover{opacity:1}.ngx-select__clear{display:inline-flex;align-items:center;padding:0;background:transparent;border:none;cursor:pointer;color:var(--text-placeholder, #6b7280);flex-shrink:0}.ngx-select__clear:hover{color:var(--text-muted, #6b7280)}.ngx-select__chevron{display:inline-flex;align-items:center;flex-shrink:0;color:var(--text-placeholder, #6b7280)}.ngx-select__float-label{position:absolute;left:.75rem;top:50%;transform:translateY(-50%);font-size:inherit;color:var(--text-placeholder, #6b7280);pointer-events:none;white-space:nowrap;line-height:1;padding:0;background:transparent;transition:top .15s ease,font-size .15s ease,color .15s ease,background-color .15s ease,padding .15s ease}.ngx-select__float-label--active{top:0;font-size:.7rem;background:var(--surface-base, #fff);padding:0 .25rem;color:var(--fill-primary, #4f46e5)}.ngx-select__float-label--focused:not(.ngx-select__float-label--error){color:var(--fill-primary, #4f46e5)}.ngx-select__float-label--error{color:var(--fill-danger, #dc2626)}.ngx-select__panel{position:absolute;top:calc(100% + .25rem);left:0;right:0;z-index:100;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;box-shadow:0 4px 16px #0000001a;overflow:hidden}.ngx-select__search{display:flex;align-items:center;gap:.375rem;padding:.375rem .75rem;border-bottom:1px solid var(--border-subtle, #f3f4f6)}.ngx-select__search-icon{color:var(--text-placeholder, #6b7280);flex-shrink:0}.ngx-select__search-input{flex:1;border:none;outline:none;font-size:.8125rem;color:var(--text-base, #111827);background:transparent;font-family:inherit}.ngx-select__search-input::placeholder{color:var(--text-placeholder, #6b7280)}.ngx-select__select-all{display:block;width:100%;padding:.375rem .75rem;text-align:left;background:transparent;border:none;border-bottom:1px solid var(--border-subtle, #f3f4f6);font-size:.8125rem;color:var(--fill-primary, #4f46e5);font-weight:500;cursor:pointer;font-family:inherit}.ngx-select__select-all:hover{background:var(--primary-50, #eef2ff)}.ngx-select__options{list-style:none;margin:0;padding:.25rem 0;max-height:14rem;overflow-y:auto}.ngx-select__option{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;font-size:.875rem;color:var(--text-secondary, #374151);cursor:pointer;transition:background .1s ease}.ngx-select__option:hover:not(.ngx-select__option--disabled){background:var(--surface-subtle, #f9fafb)}.ngx-select__option--selected:not(.ngx-select__option--disabled){color:var(--primary-700, #4338ca);background:var(--primary-50, #eef2ff)}.ngx-select__option--disabled{color:var(--text-placeholder, #6b7280);cursor:not-allowed}.ngx-select__option-label{flex:1}.ngx-select__checkbox{flex-shrink:0;width:1rem;height:1rem;border:1.5px solid var(--border-input, #d1d5db);border-radius:.2rem;background:var(--surface-base, #fff);position:relative;transition:border-color .1s,background .1s}.ngx-select__checkbox--checked{border-color:var(--primary-500, #6366f1);background:var(--primary-500, #6366f1)}.ngx-select__checkbox--checked:after{content:\"\";position:absolute;left:.2rem;top:.05rem;width:.35rem;height:.55rem;border:2px solid var(--text-on-color, #fff);border-top:none;border-left:none;transform:rotate(45deg)}.ngx-select__check{flex-shrink:0;width:1rem;height:1rem;display:flex;align-items:center;justify-content:center;color:var(--fill-primary, #4f46e5)}.ngx-select__empty{padding:.75rem;text-align:center;font-size:.875rem;color:var(--text-placeholder, #6b7280)}.ngx-select__message{margin-top:.375rem;font-size:.75rem;line-height:1.4}.ngx-select__message--hint{color:var(--text-muted, #6b7280)}.ngx-select__message--error{color:var(--fill-danger, #dc2626)}\n"] }]
|
|
1686
1866
|
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], floatingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatingLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], triggerRef: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }] } });
|
|
1687
1867
|
|
|
1688
|
-
const ICON_SIZE$
|
|
1689
|
-
let nextId$
|
|
1868
|
+
const ICON_SIZE$9 = { sm: 14, md: 16, lg: 18 };
|
|
1869
|
+
let nextId$e = 0;
|
|
1690
1870
|
class DropdownComponent {
|
|
1691
1871
|
i18n = inject(NGX_DS_LABELS);
|
|
1692
1872
|
// ── Configuration ──────────────────────────────────────────
|
|
@@ -1702,7 +1882,7 @@ class DropdownComponent {
|
|
|
1702
1882
|
touched = input(false, ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
1703
1883
|
// ── Value ─────────────────────────────────────────────────
|
|
1704
1884
|
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1705
|
-
id = `ngx-dropdown-${nextId$
|
|
1885
|
+
id = `ngx-dropdown-${nextId$e++}`;
|
|
1706
1886
|
messageId = `${this.id}-message`;
|
|
1707
1887
|
// ── Icons ──────────────────────────────────────────────────
|
|
1708
1888
|
ChevronDown = ChevronDown;
|
|
@@ -1715,7 +1895,7 @@ class DropdownComponent {
|
|
|
1715
1895
|
#focused = signal(false, ...(ngDevMode ? [{ debugName: "#focused" }] : /* istanbul ignore next */ []));
|
|
1716
1896
|
isOpen = this.#open.asReadonly();
|
|
1717
1897
|
isDisabled = this.#disabled.asReadonly();
|
|
1718
|
-
iconSize = computed(() => ICON_SIZE$
|
|
1898
|
+
iconSize = computed(() => ICON_SIZE$9[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
1719
1899
|
hasError = computed(() => fieldHasError(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "hasError" }] : /* istanbul ignore next */ []));
|
|
1720
1900
|
errorText = computed(() => fieldErrorText(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
1721
1901
|
hasValue = computed(() => this.value() !== null && this.value() !== undefined, ...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
|
|
@@ -1844,7 +2024,7 @@ class DropdownComponent {
|
|
|
1844
2024
|
useExisting: forwardRef(() => DropdownComponent),
|
|
1845
2025
|
multi: true,
|
|
1846
2026
|
},
|
|
1847
|
-
], viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-dropdown__label\">{{ label() }}</label>\n}\n\n<!-- Trigger -->\n<div\n #trigger\n [class]=\"triggerClasses()\"\n (click)=\"togglePanel()\"\n (keydown)=\"onTriggerKeydown($event)\"\n [attr.id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n role=\"combobox\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-controls]=\"id + '-panel'\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-disabled]=\"isDisabled()\"\n>\n <!-- Floating label -->\n @if (floatingLabel() && label()) {\n <span [class]=\"floatLabelClasses()\">{{ label() }}</span>\n }\n\n <!-- Display area -->\n <span class=\"ngx-dropdown__display\">\n @if (displayText()) {\n <span class=\"ngx-dropdown__value\">{{ displayText() }}</span>\n } @else {\n <span class=\"ngx-dropdown__placeholder\">{{ placeholder() ?? i18n.selectPlaceholder }}</span>\n }\n </span>\n\n <!-- Clear button -->\n @if (hasValue() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"ngx-dropdown__clear\"\n [attr.aria-label]=\"i18n.clearSelection\"\n (click)=\"clearValue($event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"iconSize()\" />\n </button>\n }\n\n <!-- Chevron -->\n <span class=\"ngx-dropdown__chevron\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"isOpen() ? ChevronUp : ChevronDown\" [size]=\"iconSize()\" />\n </span>\n</div>\n\n<!-- Dropdown panel -->\n@if (isOpen()) {\n <div class=\"ngx-dropdown__panel\" [id]=\"id + '-panel'\" role=\"listbox\">\n <ul class=\"ngx-dropdown__options\" role=\"presentation\">\n @for (option of options(); track option.value) {\n <li\n class=\"ngx-dropdown__option\"\n [class.ngx-dropdown__option--selected]=\"isSelected(option.value)\"\n [class.ngx-dropdown__option--disabled]=\"option.disabled\"\n role=\"option\"\n tabindex=\"-1\"\n [attr.aria-selected]=\"isSelected(option.value)\"\n [attr.aria-disabled]=\"option.disabled || null\"\n (click)=\"selectOption(option); $event.stopPropagation()\"\n (keydown)=\"onOptionKeydown($event, option)\"\n >\n <span class=\"ngx-dropdown__check\">\n @if (isSelected(option.value)) {\n <ngx-ds-icon [icon]=\"CheckIcon\" [size]=\"14\" />\n }\n </span>\n <span class=\"ngx-dropdown__option-label\">{{ option.label }}</span>\n </li>\n } @empty {\n <li class=\"ngx-dropdown__empty\">{{ i18n.noOptions }}</li>\n }\n </ul>\n </div>\n}\n\n<!-- Hint / Error -->\n@if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-dropdown__message ngx-dropdown__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-dropdown__message ngx-dropdown__message--hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;position:relative;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-dropdown__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-dropdown__trigger{position:relative;display:flex;align-items:center;gap:.5rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color .15s ease,box-shadow .15s ease;min-height:2.375rem}.ngx-dropdown__trigger--focused,.ngx-dropdown__trigger--open{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-dropdown__trigger--error{border-color:var(--danger-500, #ef4444)}.ngx-dropdown__trigger--error.ngx-dropdown__trigger--open,.ngx-dropdown__trigger--error.ngx-dropdown__trigger--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-dropdown__trigger--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed;color:var(--text-placeholder, #
|
|
2027
|
+
], viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-dropdown__label\">{{ label() }}</label>\n}\n\n<!-- Trigger -->\n<div\n #trigger\n [class]=\"triggerClasses()\"\n (click)=\"togglePanel()\"\n (keydown)=\"onTriggerKeydown($event)\"\n [attr.id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n role=\"combobox\"\n [attr.aria-label]=\"label() || null\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-controls]=\"id + '-panel'\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-disabled]=\"isDisabled()\"\n>\n <!-- Floating label -->\n @if (floatingLabel() && label()) {\n <span [class]=\"floatLabelClasses()\">{{ label() }}</span>\n }\n\n <!-- Display area -->\n <span class=\"ngx-dropdown__display\">\n @if (displayText()) {\n <span class=\"ngx-dropdown__value\">{{ displayText() }}</span>\n } @else {\n <span class=\"ngx-dropdown__placeholder\">{{ placeholder() ?? i18n.selectPlaceholder }}</span>\n }\n </span>\n\n <!-- Clear button -->\n @if (hasValue() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"ngx-dropdown__clear\"\n [attr.aria-label]=\"i18n.clearSelection\"\n (click)=\"clearValue($event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"iconSize()\" />\n </button>\n }\n\n <!-- Chevron -->\n <span class=\"ngx-dropdown__chevron\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"isOpen() ? ChevronUp : ChevronDown\" [size]=\"iconSize()\" />\n </span>\n</div>\n\n<!-- Dropdown panel -->\n@if (isOpen()) {\n <div class=\"ngx-dropdown__panel\" [id]=\"id + '-panel'\" role=\"listbox\">\n <ul class=\"ngx-dropdown__options\" role=\"presentation\">\n @for (option of options(); track option.value) {\n <li\n class=\"ngx-dropdown__option\"\n [class.ngx-dropdown__option--selected]=\"isSelected(option.value)\"\n [class.ngx-dropdown__option--disabled]=\"option.disabled\"\n role=\"option\"\n tabindex=\"-1\"\n [attr.aria-selected]=\"isSelected(option.value)\"\n [attr.aria-disabled]=\"option.disabled || null\"\n (click)=\"selectOption(option); $event.stopPropagation()\"\n (keydown)=\"onOptionKeydown($event, option)\"\n >\n <span class=\"ngx-dropdown__check\">\n @if (isSelected(option.value)) {\n <ngx-ds-icon [icon]=\"CheckIcon\" [size]=\"14\" />\n }\n </span>\n <span class=\"ngx-dropdown__option-label\">{{ option.label }}</span>\n </li>\n } @empty {\n <li class=\"ngx-dropdown__empty\">{{ i18n.noOptions }}</li>\n }\n </ul>\n </div>\n}\n\n<!-- Hint / Error -->\n@if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-dropdown__message ngx-dropdown__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-dropdown__message ngx-dropdown__message--hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;position:relative;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-dropdown__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-dropdown__trigger{position:relative;display:flex;align-items:center;gap:.5rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color .15s ease,box-shadow .15s ease;min-height:2.375rem}.ngx-dropdown__trigger--focused,.ngx-dropdown__trigger--open{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-dropdown__trigger--error{border-color:var(--danger-500, #ef4444)}.ngx-dropdown__trigger--error.ngx-dropdown__trigger--open,.ngx-dropdown__trigger--error.ngx-dropdown__trigger--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-dropdown__trigger--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed;color:var(--text-placeholder, #6b7280)}.ngx-dropdown__trigger--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-dropdown__trigger--md{padding:.5rem .75rem;font-size:.875rem}.ngx-dropdown__trigger--lg{padding:.625rem 1rem;font-size:1rem}.ngx-dropdown__display{flex:1;min-width:0;overflow:hidden}.ngx-dropdown__value{display:block;color:var(--text-base, #111827);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ngx-dropdown__placeholder{display:block;color:var(--text-placeholder, #6b7280);white-space:nowrap}.ngx-dropdown__clear{display:inline-flex;align-items:center;padding:0;background:transparent;border:none;cursor:pointer;color:var(--text-placeholder, #6b7280);flex-shrink:0}.ngx-dropdown__clear:hover{color:var(--text-muted, #6b7280)}.ngx-dropdown__chevron{display:inline-flex;align-items:center;flex-shrink:0;color:var(--text-placeholder, #6b7280)}.ngx-dropdown__float-label{position:absolute;left:.75rem;top:50%;transform:translateY(-50%);font-size:inherit;color:var(--text-placeholder, #6b7280);pointer-events:none;white-space:nowrap;line-height:1;padding:0;background:transparent;transition:top .15s ease,font-size .15s ease,color .15s ease,background-color .15s ease,padding .15s ease}.ngx-dropdown__float-label--active{top:0;font-size:.7rem;background:var(--surface-base, #fff);padding:0 .25rem;color:var(--fill-primary, #4f46e5)}.ngx-dropdown__float-label--focused:not(.ngx-dropdown__float-label--error){color:var(--fill-primary, #4f46e5)}.ngx-dropdown__float-label--error{color:var(--fill-danger, #dc2626)}.ngx-dropdown__panel{position:absolute;top:calc(100% + .25rem);left:0;right:0;z-index:100;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;box-shadow:0 4px 16px #0000001a;overflow:hidden}.ngx-dropdown__options{list-style:none;margin:0;padding:.25rem 0;max-height:14rem;overflow-y:auto}.ngx-dropdown__option{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;font-size:.875rem;color:var(--text-secondary, #374151);cursor:pointer;transition:background .1s ease}.ngx-dropdown__option:hover:not(.ngx-dropdown__option--disabled){background:var(--surface-subtle, #f9fafb)}.ngx-dropdown__option--selected:not(.ngx-dropdown__option--disabled){color:var(--primary-700, #4338ca);background:var(--primary-50, #eef2ff)}.ngx-dropdown__option--disabled{color:var(--text-placeholder, #6b7280);cursor:not-allowed}.ngx-dropdown__option-label{flex:1}.ngx-dropdown__check{flex-shrink:0;width:1rem;height:1rem;display:flex;align-items:center;justify-content:center;color:var(--fill-primary, #4f46e5)}.ngx-dropdown__empty{padding:.75rem;text-align:center;font-size:.875rem;color:var(--text-placeholder, #6b7280)}.ngx-dropdown__message{margin-top:.375rem;font-size:.75rem;line-height:1.4}.ngx-dropdown__message--hint{color:var(--text-muted, #6b7280)}.ngx-dropdown__message--error{color:var(--fill-danger, #dc2626)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1848
2028
|
}
|
|
1849
2029
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
1850
2030
|
type: Component,
|
|
@@ -1854,11 +2034,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
1854
2034
|
useExisting: forwardRef(() => DropdownComponent),
|
|
1855
2035
|
multi: true,
|
|
1856
2036
|
},
|
|
1857
|
-
], template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-dropdown__label\">{{ label() }}</label>\n}\n\n<!-- Trigger -->\n<div\n #trigger\n [class]=\"triggerClasses()\"\n (click)=\"togglePanel()\"\n (keydown)=\"onTriggerKeydown($event)\"\n [attr.id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n role=\"combobox\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-controls]=\"id + '-panel'\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-disabled]=\"isDisabled()\"\n>\n <!-- Floating label -->\n @if (floatingLabel() && label()) {\n <span [class]=\"floatLabelClasses()\">{{ label() }}</span>\n }\n\n <!-- Display area -->\n <span class=\"ngx-dropdown__display\">\n @if (displayText()) {\n <span class=\"ngx-dropdown__value\">{{ displayText() }}</span>\n } @else {\n <span class=\"ngx-dropdown__placeholder\">{{ placeholder() ?? i18n.selectPlaceholder }}</span>\n }\n </span>\n\n <!-- Clear button -->\n @if (hasValue() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"ngx-dropdown__clear\"\n [attr.aria-label]=\"i18n.clearSelection\"\n (click)=\"clearValue($event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"iconSize()\" />\n </button>\n }\n\n <!-- Chevron -->\n <span class=\"ngx-dropdown__chevron\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"isOpen() ? ChevronUp : ChevronDown\" [size]=\"iconSize()\" />\n </span>\n</div>\n\n<!-- Dropdown panel -->\n@if (isOpen()) {\n <div class=\"ngx-dropdown__panel\" [id]=\"id + '-panel'\" role=\"listbox\">\n <ul class=\"ngx-dropdown__options\" role=\"presentation\">\n @for (option of options(); track option.value) {\n <li\n class=\"ngx-dropdown__option\"\n [class.ngx-dropdown__option--selected]=\"isSelected(option.value)\"\n [class.ngx-dropdown__option--disabled]=\"option.disabled\"\n role=\"option\"\n tabindex=\"-1\"\n [attr.aria-selected]=\"isSelected(option.value)\"\n [attr.aria-disabled]=\"option.disabled || null\"\n (click)=\"selectOption(option); $event.stopPropagation()\"\n (keydown)=\"onOptionKeydown($event, option)\"\n >\n <span class=\"ngx-dropdown__check\">\n @if (isSelected(option.value)) {\n <ngx-ds-icon [icon]=\"CheckIcon\" [size]=\"14\" />\n }\n </span>\n <span class=\"ngx-dropdown__option-label\">{{ option.label }}</span>\n </li>\n } @empty {\n <li class=\"ngx-dropdown__empty\">{{ i18n.noOptions }}</li>\n }\n </ul>\n </div>\n}\n\n<!-- Hint / Error -->\n@if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-dropdown__message ngx-dropdown__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-dropdown__message ngx-dropdown__message--hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;position:relative;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-dropdown__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-dropdown__trigger{position:relative;display:flex;align-items:center;gap:.5rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color .15s ease,box-shadow .15s ease;min-height:2.375rem}.ngx-dropdown__trigger--focused,.ngx-dropdown__trigger--open{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-dropdown__trigger--error{border-color:var(--danger-500, #ef4444)}.ngx-dropdown__trigger--error.ngx-dropdown__trigger--open,.ngx-dropdown__trigger--error.ngx-dropdown__trigger--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-dropdown__trigger--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed;color:var(--text-placeholder, #
|
|
2037
|
+
], template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-dropdown__label\">{{ label() }}</label>\n}\n\n<!-- Trigger -->\n<div\n #trigger\n [class]=\"triggerClasses()\"\n (click)=\"togglePanel()\"\n (keydown)=\"onTriggerKeydown($event)\"\n [attr.id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n role=\"combobox\"\n [attr.aria-label]=\"label() || null\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-controls]=\"id + '-panel'\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-disabled]=\"isDisabled()\"\n>\n <!-- Floating label -->\n @if (floatingLabel() && label()) {\n <span [class]=\"floatLabelClasses()\">{{ label() }}</span>\n }\n\n <!-- Display area -->\n <span class=\"ngx-dropdown__display\">\n @if (displayText()) {\n <span class=\"ngx-dropdown__value\">{{ displayText() }}</span>\n } @else {\n <span class=\"ngx-dropdown__placeholder\">{{ placeholder() ?? i18n.selectPlaceholder }}</span>\n }\n </span>\n\n <!-- Clear button -->\n @if (hasValue() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"ngx-dropdown__clear\"\n [attr.aria-label]=\"i18n.clearSelection\"\n (click)=\"clearValue($event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"iconSize()\" />\n </button>\n }\n\n <!-- Chevron -->\n <span class=\"ngx-dropdown__chevron\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"isOpen() ? ChevronUp : ChevronDown\" [size]=\"iconSize()\" />\n </span>\n</div>\n\n<!-- Dropdown panel -->\n@if (isOpen()) {\n <div class=\"ngx-dropdown__panel\" [id]=\"id + '-panel'\" role=\"listbox\">\n <ul class=\"ngx-dropdown__options\" role=\"presentation\">\n @for (option of options(); track option.value) {\n <li\n class=\"ngx-dropdown__option\"\n [class.ngx-dropdown__option--selected]=\"isSelected(option.value)\"\n [class.ngx-dropdown__option--disabled]=\"option.disabled\"\n role=\"option\"\n tabindex=\"-1\"\n [attr.aria-selected]=\"isSelected(option.value)\"\n [attr.aria-disabled]=\"option.disabled || null\"\n (click)=\"selectOption(option); $event.stopPropagation()\"\n (keydown)=\"onOptionKeydown($event, option)\"\n >\n <span class=\"ngx-dropdown__check\">\n @if (isSelected(option.value)) {\n <ngx-ds-icon [icon]=\"CheckIcon\" [size]=\"14\" />\n }\n </span>\n <span class=\"ngx-dropdown__option-label\">{{ option.label }}</span>\n </li>\n } @empty {\n <li class=\"ngx-dropdown__empty\">{{ i18n.noOptions }}</li>\n }\n </ul>\n </div>\n}\n\n<!-- Hint / Error -->\n@if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-dropdown__message ngx-dropdown__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-dropdown__message ngx-dropdown__message--hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;position:relative;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-dropdown__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-dropdown__trigger{position:relative;display:flex;align-items:center;gap:.5rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color .15s ease,box-shadow .15s ease;min-height:2.375rem}.ngx-dropdown__trigger--focused,.ngx-dropdown__trigger--open{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-dropdown__trigger--error{border-color:var(--danger-500, #ef4444)}.ngx-dropdown__trigger--error.ngx-dropdown__trigger--open,.ngx-dropdown__trigger--error.ngx-dropdown__trigger--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-dropdown__trigger--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed;color:var(--text-placeholder, #6b7280)}.ngx-dropdown__trigger--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-dropdown__trigger--md{padding:.5rem .75rem;font-size:.875rem}.ngx-dropdown__trigger--lg{padding:.625rem 1rem;font-size:1rem}.ngx-dropdown__display{flex:1;min-width:0;overflow:hidden}.ngx-dropdown__value{display:block;color:var(--text-base, #111827);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ngx-dropdown__placeholder{display:block;color:var(--text-placeholder, #6b7280);white-space:nowrap}.ngx-dropdown__clear{display:inline-flex;align-items:center;padding:0;background:transparent;border:none;cursor:pointer;color:var(--text-placeholder, #6b7280);flex-shrink:0}.ngx-dropdown__clear:hover{color:var(--text-muted, #6b7280)}.ngx-dropdown__chevron{display:inline-flex;align-items:center;flex-shrink:0;color:var(--text-placeholder, #6b7280)}.ngx-dropdown__float-label{position:absolute;left:.75rem;top:50%;transform:translateY(-50%);font-size:inherit;color:var(--text-placeholder, #6b7280);pointer-events:none;white-space:nowrap;line-height:1;padding:0;background:transparent;transition:top .15s ease,font-size .15s ease,color .15s ease,background-color .15s ease,padding .15s ease}.ngx-dropdown__float-label--active{top:0;font-size:.7rem;background:var(--surface-base, #fff);padding:0 .25rem;color:var(--fill-primary, #4f46e5)}.ngx-dropdown__float-label--focused:not(.ngx-dropdown__float-label--error){color:var(--fill-primary, #4f46e5)}.ngx-dropdown__float-label--error{color:var(--fill-danger, #dc2626)}.ngx-dropdown__panel{position:absolute;top:calc(100% + .25rem);left:0;right:0;z-index:100;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;box-shadow:0 4px 16px #0000001a;overflow:hidden}.ngx-dropdown__options{list-style:none;margin:0;padding:.25rem 0;max-height:14rem;overflow-y:auto}.ngx-dropdown__option{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;font-size:.875rem;color:var(--text-secondary, #374151);cursor:pointer;transition:background .1s ease}.ngx-dropdown__option:hover:not(.ngx-dropdown__option--disabled){background:var(--surface-subtle, #f9fafb)}.ngx-dropdown__option--selected:not(.ngx-dropdown__option--disabled){color:var(--primary-700, #4338ca);background:var(--primary-50, #eef2ff)}.ngx-dropdown__option--disabled{color:var(--text-placeholder, #6b7280);cursor:not-allowed}.ngx-dropdown__option-label{flex:1}.ngx-dropdown__check{flex-shrink:0;width:1rem;height:1rem;display:flex;align-items:center;justify-content:center;color:var(--fill-primary, #4f46e5)}.ngx-dropdown__empty{padding:.75rem;text-align:center;font-size:.875rem;color:var(--text-placeholder, #6b7280)}.ngx-dropdown__message{margin-top:.375rem;font-size:.75rem;line-height:1.4}.ngx-dropdown__message--hint{color:var(--text-muted, #6b7280)}.ngx-dropdown__message--error{color:var(--fill-danger, #dc2626)}\n"] }]
|
|
1858
2038
|
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], floatingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatingLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], triggerRef: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }] } });
|
|
1859
2039
|
|
|
1860
|
-
const ICON_SIZE$
|
|
1861
|
-
let nextId$
|
|
2040
|
+
const ICON_SIZE$8 = { sm: 14, md: 16, lg: 18 };
|
|
2041
|
+
let nextId$d = 0;
|
|
1862
2042
|
class AutocompleteComponent {
|
|
1863
2043
|
i18n = inject(NGX_DS_LABELS);
|
|
1864
2044
|
sanitizer = inject(DomSanitizer);
|
|
@@ -1890,7 +2070,7 @@ class AutocompleteComponent {
|
|
|
1890
2070
|
// ── Outputs ──────────────────────────────────────────────
|
|
1891
2071
|
/** Emits the current search string (debounced) — use for async data loading */
|
|
1892
2072
|
searchChange = output();
|
|
1893
|
-
id = `ngx-autocomplete-${nextId$
|
|
2073
|
+
id = `ngx-autocomplete-${nextId$d++}`;
|
|
1894
2074
|
messageId = `${this.id}-message`;
|
|
1895
2075
|
// ── Icons ────────────────────────────────────────────────
|
|
1896
2076
|
SearchIcon = Search;
|
|
@@ -1907,7 +2087,7 @@ class AutocompleteComponent {
|
|
|
1907
2087
|
searchTimer = null;
|
|
1908
2088
|
inputEl = null;
|
|
1909
2089
|
// ── Derived ──────────────────────────────────────────────
|
|
1910
|
-
iconSize = computed(() => ICON_SIZE$
|
|
2090
|
+
iconSize = computed(() => ICON_SIZE$8[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
1911
2091
|
hasError = computed(() => fieldHasError(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "hasError" }] : /* istanbul ignore next */ []));
|
|
1912
2092
|
errorText = computed(() => fieldErrorText(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
1913
2093
|
hasValue = computed(() => this.value() !== null && this.value() !== undefined, ...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
|
|
@@ -2089,7 +2269,7 @@ class AutocompleteComponent {
|
|
|
2089
2269
|
useExisting: forwardRef(() => AutocompleteComponent),
|
|
2090
2270
|
multi: true,
|
|
2091
2271
|
},
|
|
2092
|
-
], ngImport: i0, template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-autocomplete__label\">{{ label() }}</label>\n}\n\n<!-- Field container -->\n<div [class]=\"fieldClasses()\">\n <!-- Floating label -->\n @if (floatingLabel() && label()) {\n <label [for]=\"id\" [class]=\"floatLabelClasses()\">{{ label() }}</label>\n }\n\n <!-- Left icon -->\n @if (iconLeft()) {\n <span class=\"ngx-autocomplete__icon ngx-autocomplete__icon--left\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"iconLeft()!\" [size]=\"iconSize()\" />\n </span>\n }\n\n <!-- Text input -->\n <input\n #nativeInput\n class=\"ngx-autocomplete__native\"\n [id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n type=\"text\"\n [value]=\"inputText()\"\n [placeholder]=\"\n floatingLabel() && label() && !isFloating() ? '' : (placeholder() ?? i18n.searchPlaceholder)\n \"\n [disabled]=\"isDisabled() || null\"\n autocomplete=\"off\"\n role=\"combobox\"\n [attr.aria-controls]=\"id + '-panel'\"\n [attr.aria-expanded]=\"showPanel()\"\n [attr.aria-autocomplete]=\"'list'\"\n (input)=\"onInputChange($any($event.target).value)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n\n <!-- Loading spinner -->\n @if (loading()) {\n <span class=\"ngx-autocomplete__spinner\" aria-hidden=\"true\">\n <span class=\"ngx-autocomplete__spinner-ring\"></span>\n </span>\n }\n\n <!-- Clear button -->\n @if (hasValue() && !isDisabled() && !loading()) {\n <button\n type=\"button\"\n class=\"ngx-autocomplete__clear\"\n [attr.aria-label]=\"i18n.clear\"\n (mousedown)=\"onClear($event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"iconSize()\" />\n </button>\n }\n</div>\n\n<!-- Dropdown panel -->\n@if (showPanel()) {\n <div class=\"ngx-autocomplete__panel\" role=\"listbox\" [id]=\"id + '-panel'\">\n <ul class=\"ngx-autocomplete__options\" role=\"presentation\">\n @for (option of filteredOptions(); track option.value) {\n <li\n class=\"ngx-autocomplete__option\"\n [class.ngx-autocomplete__option--selected]=\"isSelected(option.value)\"\n [class.ngx-autocomplete__option--disabled]=\"option.disabled\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(option.value)\"\n (mousedown)=\"onOptionSelect(option)\"\n >\n <span [innerHTML]=\"getHighlightedLabel(option.label)\"></span>\n @if (isSelected(option.value)) {\n <span class=\"ngx-autocomplete__check\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"SearchIcon\" [size]=\"12\" />\n </span>\n }\n </li>\n } @empty {\n @if (!loading()) {\n <li class=\"ngx-autocomplete__empty\">{{ noResultsText() ?? i18n.noResults }}</li>\n }\n }\n </ul>\n @if (loading() && filteredOptions().length === 0) {\n <p class=\"ngx-autocomplete__loading-text\">{{ i18n.searching }}</p>\n }\n </div>\n}\n\n<!-- Error / Hint -->\n@if (errorText()) {\n <p\n [id]=\"messageId\"\n class=\"ngx-autocomplete__message ngx-autocomplete__message--error\"\n role=\"alert\"\n >\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-autocomplete__message ngx-autocomplete__message--hint\">\n {{ hint() }}\n </p>\n}\n", styles: [":host{display:block;position:relative;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-autocomplete__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-autocomplete__field{position:relative;display:flex;align-items:center;gap:.5rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;transition:border-color .15s ease,box-shadow .15s ease}.ngx-autocomplete__field--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-autocomplete__field--error{border-color:var(--danger-500, #ef4444)}.ngx-autocomplete__field--error.ngx-autocomplete__field--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-autocomplete__field--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed}.ngx-autocomplete__field--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-autocomplete__field--md{padding:.5rem .75rem;font-size:.875rem}.ngx-autocomplete__field--lg{padding:.625rem 1rem;font-size:1rem}.ngx-autocomplete__native{flex:1;min-width:0;padding:0;background:transparent;border:none;outline:none;color:var(--text-base, #111827);font-family:inherit;font-size:inherit;line-height:1.5}.ngx-autocomplete__native::placeholder{color:var(--text-placeholder, #
|
|
2272
|
+
], ngImport: i0, template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-autocomplete__label\">{{ label() }}</label>\n}\n\n<!-- Field container -->\n<div [class]=\"fieldClasses()\">\n <!-- Floating label -->\n @if (floatingLabel() && label()) {\n <label [for]=\"id\" [class]=\"floatLabelClasses()\">{{ label() }}</label>\n }\n\n <!-- Left icon -->\n @if (iconLeft()) {\n <span class=\"ngx-autocomplete__icon ngx-autocomplete__icon--left\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"iconLeft()!\" [size]=\"iconSize()\" />\n </span>\n }\n\n <!-- Text input -->\n <input\n #nativeInput\n class=\"ngx-autocomplete__native\"\n [id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n type=\"text\"\n [value]=\"inputText()\"\n [placeholder]=\"\n floatingLabel() && label() && !isFloating() ? '' : (placeholder() ?? i18n.searchPlaceholder)\n \"\n [disabled]=\"isDisabled() || null\"\n autocomplete=\"off\"\n role=\"combobox\"\n [attr.aria-controls]=\"id + '-panel'\"\n [attr.aria-expanded]=\"showPanel()\"\n [attr.aria-autocomplete]=\"'list'\"\n (input)=\"onInputChange($any($event.target).value)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n\n <!-- Loading spinner -->\n @if (loading()) {\n <span class=\"ngx-autocomplete__spinner\" aria-hidden=\"true\">\n <span class=\"ngx-autocomplete__spinner-ring\"></span>\n </span>\n }\n\n <!-- Clear button -->\n @if (hasValue() && !isDisabled() && !loading()) {\n <button\n type=\"button\"\n class=\"ngx-autocomplete__clear\"\n [attr.aria-label]=\"i18n.clear\"\n (mousedown)=\"onClear($event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"iconSize()\" />\n </button>\n }\n</div>\n\n<!-- Dropdown panel -->\n@if (showPanel()) {\n <div class=\"ngx-autocomplete__panel\" role=\"listbox\" [id]=\"id + '-panel'\">\n <ul class=\"ngx-autocomplete__options\" role=\"presentation\">\n @for (option of filteredOptions(); track option.value) {\n <li\n class=\"ngx-autocomplete__option\"\n [class.ngx-autocomplete__option--selected]=\"isSelected(option.value)\"\n [class.ngx-autocomplete__option--disabled]=\"option.disabled\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(option.value)\"\n (mousedown)=\"onOptionSelect(option)\"\n >\n <span [innerHTML]=\"getHighlightedLabel(option.label)\"></span>\n @if (isSelected(option.value)) {\n <span class=\"ngx-autocomplete__check\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"SearchIcon\" [size]=\"12\" />\n </span>\n }\n </li>\n } @empty {\n @if (!loading()) {\n <li class=\"ngx-autocomplete__empty\">{{ noResultsText() ?? i18n.noResults }}</li>\n }\n }\n </ul>\n @if (loading() && filteredOptions().length === 0) {\n <p class=\"ngx-autocomplete__loading-text\">{{ i18n.searching }}</p>\n }\n </div>\n}\n\n<!-- Error / Hint -->\n@if (errorText()) {\n <p\n [id]=\"messageId\"\n class=\"ngx-autocomplete__message ngx-autocomplete__message--error\"\n role=\"alert\"\n >\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-autocomplete__message ngx-autocomplete__message--hint\">\n {{ hint() }}\n </p>\n}\n", styles: [":host{display:block;position:relative;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-autocomplete__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-autocomplete__field{position:relative;display:flex;align-items:center;gap:.5rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;transition:border-color .15s ease,box-shadow .15s ease}.ngx-autocomplete__field--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-autocomplete__field--error{border-color:var(--danger-500, #ef4444)}.ngx-autocomplete__field--error.ngx-autocomplete__field--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-autocomplete__field--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed}.ngx-autocomplete__field--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-autocomplete__field--md{padding:.5rem .75rem;font-size:.875rem}.ngx-autocomplete__field--lg{padding:.625rem 1rem;font-size:1rem}.ngx-autocomplete__native{flex:1;min-width:0;padding:0;background:transparent;border:none;outline:none;color:var(--text-base, #111827);font-family:inherit;font-size:inherit;line-height:1.5}.ngx-autocomplete__native::placeholder{color:var(--text-placeholder, #6b7280)}.ngx-autocomplete__native:disabled{cursor:not-allowed;color:var(--text-muted, #6b7280)}.ngx-autocomplete__icon{display:inline-flex;align-items:center;flex-shrink:0;color:var(--text-placeholder, #6b7280)}.ngx-autocomplete__clear{display:inline-flex;align-items:center;flex-shrink:0;padding:0;background:transparent;border:none;cursor:pointer;color:var(--text-placeholder, #6b7280);transition:color .15s ease}.ngx-autocomplete__clear:hover{color:var(--text-muted, #6b7280)}.ngx-autocomplete__float-label{position:absolute;left:.75rem;top:50%;transform:translateY(-50%);font-size:inherit;color:var(--text-placeholder, #6b7280);pointer-events:none;white-space:nowrap;line-height:1;padding:0;background:transparent;transition:top .15s ease,font-size .15s ease,color .15s ease,background-color .15s ease,padding .15s ease}.ngx-autocomplete__float-label--active{top:0;font-size:.7rem;background:var(--surface-base, #fff);padding:0 .25rem;color:var(--fill-primary, #4f46e5)}.ngx-autocomplete__float-label--offset{left:2.25rem}.ngx-autocomplete__float-label--focused:not(.ngx-autocomplete__float-label--error){color:var(--fill-primary, #4f46e5)}.ngx-autocomplete__float-label--error{color:var(--fill-danger, #dc2626)}.ngx-autocomplete__spinner{display:inline-flex;align-items:center;flex-shrink:0}.ngx-autocomplete__spinner-ring{display:block;width:1rem;height:1rem;border:2px solid var(--surface-active, #e5e7eb);border-top-color:var(--primary-500, #6366f1);border-radius:50%;animation:ngx-spin .7s linear infinite}@keyframes ngx-spin{to{transform:rotate(360deg)}}.ngx-autocomplete__panel{position:absolute;top:calc(100% + .25rem);left:0;right:0;z-index:100;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;box-shadow:0 4px 16px #0000001a;overflow:hidden}.ngx-autocomplete__options{list-style:none;margin:0;padding:.25rem 0;max-height:14rem;overflow-y:auto}.ngx-autocomplete__option{display:flex;align-items:center;justify-content:space-between;padding:.5rem .75rem;font-size:.875rem;color:var(--text-secondary, #374151);cursor:pointer;transition:background .1s ease}.ngx-autocomplete__option:hover:not(.ngx-autocomplete__option--disabled){background:var(--surface-subtle, #f9fafb)}.ngx-autocomplete__option--selected:not(.ngx-autocomplete__option--disabled){color:var(--primary-700, #4338ca);background:var(--primary-50, #eef2ff)}.ngx-autocomplete__option--disabled{color:var(--text-placeholder, #6b7280);cursor:not-allowed}.ngx-autocomplete__highlight{background:var(--warning-200, #fde68a);color:var(--warning-800, #92400e);border-radius:.125rem;font-style:normal;font-weight:600;padding:0 .1rem}.ngx-autocomplete__check{flex-shrink:0;color:var(--fill-primary, #4f46e5);display:inline-flex;align-items:center}.ngx-autocomplete__empty,.ngx-autocomplete__loading-text{padding:.75rem;text-align:center;font-size:.875rem;color:var(--text-placeholder, #6b7280)}.ngx-autocomplete__message{margin-top:.375rem;font-size:.75rem;line-height:1.4}.ngx-autocomplete__message--hint{color:var(--text-muted, #6b7280)}.ngx-autocomplete__message--error{color:var(--fill-danger, #dc2626)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2093
2273
|
}
|
|
2094
2274
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: AutocompleteComponent, decorators: [{
|
|
2095
2275
|
type: Component,
|
|
@@ -2099,7 +2279,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
2099
2279
|
useExisting: forwardRef(() => AutocompleteComponent),
|
|
2100
2280
|
multi: true,
|
|
2101
2281
|
},
|
|
2102
|
-
], template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-autocomplete__label\">{{ label() }}</label>\n}\n\n<!-- Field container -->\n<div [class]=\"fieldClasses()\">\n <!-- Floating label -->\n @if (floatingLabel() && label()) {\n <label [for]=\"id\" [class]=\"floatLabelClasses()\">{{ label() }}</label>\n }\n\n <!-- Left icon -->\n @if (iconLeft()) {\n <span class=\"ngx-autocomplete__icon ngx-autocomplete__icon--left\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"iconLeft()!\" [size]=\"iconSize()\" />\n </span>\n }\n\n <!-- Text input -->\n <input\n #nativeInput\n class=\"ngx-autocomplete__native\"\n [id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n type=\"text\"\n [value]=\"inputText()\"\n [placeholder]=\"\n floatingLabel() && label() && !isFloating() ? '' : (placeholder() ?? i18n.searchPlaceholder)\n \"\n [disabled]=\"isDisabled() || null\"\n autocomplete=\"off\"\n role=\"combobox\"\n [attr.aria-controls]=\"id + '-panel'\"\n [attr.aria-expanded]=\"showPanel()\"\n [attr.aria-autocomplete]=\"'list'\"\n (input)=\"onInputChange($any($event.target).value)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n\n <!-- Loading spinner -->\n @if (loading()) {\n <span class=\"ngx-autocomplete__spinner\" aria-hidden=\"true\">\n <span class=\"ngx-autocomplete__spinner-ring\"></span>\n </span>\n }\n\n <!-- Clear button -->\n @if (hasValue() && !isDisabled() && !loading()) {\n <button\n type=\"button\"\n class=\"ngx-autocomplete__clear\"\n [attr.aria-label]=\"i18n.clear\"\n (mousedown)=\"onClear($event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"iconSize()\" />\n </button>\n }\n</div>\n\n<!-- Dropdown panel -->\n@if (showPanel()) {\n <div class=\"ngx-autocomplete__panel\" role=\"listbox\" [id]=\"id + '-panel'\">\n <ul class=\"ngx-autocomplete__options\" role=\"presentation\">\n @for (option of filteredOptions(); track option.value) {\n <li\n class=\"ngx-autocomplete__option\"\n [class.ngx-autocomplete__option--selected]=\"isSelected(option.value)\"\n [class.ngx-autocomplete__option--disabled]=\"option.disabled\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(option.value)\"\n (mousedown)=\"onOptionSelect(option)\"\n >\n <span [innerHTML]=\"getHighlightedLabel(option.label)\"></span>\n @if (isSelected(option.value)) {\n <span class=\"ngx-autocomplete__check\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"SearchIcon\" [size]=\"12\" />\n </span>\n }\n </li>\n } @empty {\n @if (!loading()) {\n <li class=\"ngx-autocomplete__empty\">{{ noResultsText() ?? i18n.noResults }}</li>\n }\n }\n </ul>\n @if (loading() && filteredOptions().length === 0) {\n <p class=\"ngx-autocomplete__loading-text\">{{ i18n.searching }}</p>\n }\n </div>\n}\n\n<!-- Error / Hint -->\n@if (errorText()) {\n <p\n [id]=\"messageId\"\n class=\"ngx-autocomplete__message ngx-autocomplete__message--error\"\n role=\"alert\"\n >\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-autocomplete__message ngx-autocomplete__message--hint\">\n {{ hint() }}\n </p>\n}\n", styles: [":host{display:block;position:relative;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-autocomplete__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-autocomplete__field{position:relative;display:flex;align-items:center;gap:.5rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;transition:border-color .15s ease,box-shadow .15s ease}.ngx-autocomplete__field--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-autocomplete__field--error{border-color:var(--danger-500, #ef4444)}.ngx-autocomplete__field--error.ngx-autocomplete__field--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-autocomplete__field--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed}.ngx-autocomplete__field--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-autocomplete__field--md{padding:.5rem .75rem;font-size:.875rem}.ngx-autocomplete__field--lg{padding:.625rem 1rem;font-size:1rem}.ngx-autocomplete__native{flex:1;min-width:0;padding:0;background:transparent;border:none;outline:none;color:var(--text-base, #111827);font-family:inherit;font-size:inherit;line-height:1.5}.ngx-autocomplete__native::placeholder{color:var(--text-placeholder, #
|
|
2282
|
+
], template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-autocomplete__label\">{{ label() }}</label>\n}\n\n<!-- Field container -->\n<div [class]=\"fieldClasses()\">\n <!-- Floating label -->\n @if (floatingLabel() && label()) {\n <label [for]=\"id\" [class]=\"floatLabelClasses()\">{{ label() }}</label>\n }\n\n <!-- Left icon -->\n @if (iconLeft()) {\n <span class=\"ngx-autocomplete__icon ngx-autocomplete__icon--left\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"iconLeft()!\" [size]=\"iconSize()\" />\n </span>\n }\n\n <!-- Text input -->\n <input\n #nativeInput\n class=\"ngx-autocomplete__native\"\n [id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n type=\"text\"\n [value]=\"inputText()\"\n [placeholder]=\"\n floatingLabel() && label() && !isFloating() ? '' : (placeholder() ?? i18n.searchPlaceholder)\n \"\n [disabled]=\"isDisabled() || null\"\n autocomplete=\"off\"\n role=\"combobox\"\n [attr.aria-controls]=\"id + '-panel'\"\n [attr.aria-expanded]=\"showPanel()\"\n [attr.aria-autocomplete]=\"'list'\"\n (input)=\"onInputChange($any($event.target).value)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n\n <!-- Loading spinner -->\n @if (loading()) {\n <span class=\"ngx-autocomplete__spinner\" aria-hidden=\"true\">\n <span class=\"ngx-autocomplete__spinner-ring\"></span>\n </span>\n }\n\n <!-- Clear button -->\n @if (hasValue() && !isDisabled() && !loading()) {\n <button\n type=\"button\"\n class=\"ngx-autocomplete__clear\"\n [attr.aria-label]=\"i18n.clear\"\n (mousedown)=\"onClear($event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"iconSize()\" />\n </button>\n }\n</div>\n\n<!-- Dropdown panel -->\n@if (showPanel()) {\n <div class=\"ngx-autocomplete__panel\" role=\"listbox\" [id]=\"id + '-panel'\">\n <ul class=\"ngx-autocomplete__options\" role=\"presentation\">\n @for (option of filteredOptions(); track option.value) {\n <li\n class=\"ngx-autocomplete__option\"\n [class.ngx-autocomplete__option--selected]=\"isSelected(option.value)\"\n [class.ngx-autocomplete__option--disabled]=\"option.disabled\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(option.value)\"\n (mousedown)=\"onOptionSelect(option)\"\n >\n <span [innerHTML]=\"getHighlightedLabel(option.label)\"></span>\n @if (isSelected(option.value)) {\n <span class=\"ngx-autocomplete__check\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"SearchIcon\" [size]=\"12\" />\n </span>\n }\n </li>\n } @empty {\n @if (!loading()) {\n <li class=\"ngx-autocomplete__empty\">{{ noResultsText() ?? i18n.noResults }}</li>\n }\n }\n </ul>\n @if (loading() && filteredOptions().length === 0) {\n <p class=\"ngx-autocomplete__loading-text\">{{ i18n.searching }}</p>\n }\n </div>\n}\n\n<!-- Error / Hint -->\n@if (errorText()) {\n <p\n [id]=\"messageId\"\n class=\"ngx-autocomplete__message ngx-autocomplete__message--error\"\n role=\"alert\"\n >\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-autocomplete__message ngx-autocomplete__message--hint\">\n {{ hint() }}\n </p>\n}\n", styles: [":host{display:block;position:relative;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-autocomplete__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-autocomplete__field{position:relative;display:flex;align-items:center;gap:.5rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;transition:border-color .15s ease,box-shadow .15s ease}.ngx-autocomplete__field--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-autocomplete__field--error{border-color:var(--danger-500, #ef4444)}.ngx-autocomplete__field--error.ngx-autocomplete__field--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-autocomplete__field--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed}.ngx-autocomplete__field--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-autocomplete__field--md{padding:.5rem .75rem;font-size:.875rem}.ngx-autocomplete__field--lg{padding:.625rem 1rem;font-size:1rem}.ngx-autocomplete__native{flex:1;min-width:0;padding:0;background:transparent;border:none;outline:none;color:var(--text-base, #111827);font-family:inherit;font-size:inherit;line-height:1.5}.ngx-autocomplete__native::placeholder{color:var(--text-placeholder, #6b7280)}.ngx-autocomplete__native:disabled{cursor:not-allowed;color:var(--text-muted, #6b7280)}.ngx-autocomplete__icon{display:inline-flex;align-items:center;flex-shrink:0;color:var(--text-placeholder, #6b7280)}.ngx-autocomplete__clear{display:inline-flex;align-items:center;flex-shrink:0;padding:0;background:transparent;border:none;cursor:pointer;color:var(--text-placeholder, #6b7280);transition:color .15s ease}.ngx-autocomplete__clear:hover{color:var(--text-muted, #6b7280)}.ngx-autocomplete__float-label{position:absolute;left:.75rem;top:50%;transform:translateY(-50%);font-size:inherit;color:var(--text-placeholder, #6b7280);pointer-events:none;white-space:nowrap;line-height:1;padding:0;background:transparent;transition:top .15s ease,font-size .15s ease,color .15s ease,background-color .15s ease,padding .15s ease}.ngx-autocomplete__float-label--active{top:0;font-size:.7rem;background:var(--surface-base, #fff);padding:0 .25rem;color:var(--fill-primary, #4f46e5)}.ngx-autocomplete__float-label--offset{left:2.25rem}.ngx-autocomplete__float-label--focused:not(.ngx-autocomplete__float-label--error){color:var(--fill-primary, #4f46e5)}.ngx-autocomplete__float-label--error{color:var(--fill-danger, #dc2626)}.ngx-autocomplete__spinner{display:inline-flex;align-items:center;flex-shrink:0}.ngx-autocomplete__spinner-ring{display:block;width:1rem;height:1rem;border:2px solid var(--surface-active, #e5e7eb);border-top-color:var(--primary-500, #6366f1);border-radius:50%;animation:ngx-spin .7s linear infinite}@keyframes ngx-spin{to{transform:rotate(360deg)}}.ngx-autocomplete__panel{position:absolute;top:calc(100% + .25rem);left:0;right:0;z-index:100;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;box-shadow:0 4px 16px #0000001a;overflow:hidden}.ngx-autocomplete__options{list-style:none;margin:0;padding:.25rem 0;max-height:14rem;overflow-y:auto}.ngx-autocomplete__option{display:flex;align-items:center;justify-content:space-between;padding:.5rem .75rem;font-size:.875rem;color:var(--text-secondary, #374151);cursor:pointer;transition:background .1s ease}.ngx-autocomplete__option:hover:not(.ngx-autocomplete__option--disabled){background:var(--surface-subtle, #f9fafb)}.ngx-autocomplete__option--selected:not(.ngx-autocomplete__option--disabled){color:var(--primary-700, #4338ca);background:var(--primary-50, #eef2ff)}.ngx-autocomplete__option--disabled{color:var(--text-placeholder, #6b7280);cursor:not-allowed}.ngx-autocomplete__highlight{background:var(--warning-200, #fde68a);color:var(--warning-800, #92400e);border-radius:.125rem;font-style:normal;font-weight:600;padding:0 .1rem}.ngx-autocomplete__check{flex-shrink:0;color:var(--fill-primary, #4f46e5);display:inline-flex;align-items:center}.ngx-autocomplete__empty,.ngx-autocomplete__loading-text{padding:.75rem;text-align:center;font-size:.875rem;color:var(--text-placeholder, #6b7280)}.ngx-autocomplete__message{margin-top:.375rem;font-size:.75rem;line-height:1.4}.ngx-autocomplete__message--hint{color:var(--text-muted, #6b7280)}.ngx-autocomplete__message--error{color:var(--fill-danger, #dc2626)}\n"] }]
|
|
2103
2283
|
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], floatingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatingLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], iconLeft: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconLeft", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], minChars: [{ type: i0.Input, args: [{ isSignal: true, alias: "minChars", required: false }] }], debounceMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceMs", required: false }] }], allowCustom: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowCustom", required: false }] }], showAllOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAllOnFocus", required: false }] }], noResultsText: [{ type: i0.Input, args: [{ isSignal: true, alias: "noResultsText", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], searchChange: [{ type: i0.Output, args: ["searchChange"] }] } });
|
|
2104
2284
|
|
|
2105
2285
|
/** True when both dates fall on the same calendar day. */
|
|
@@ -2161,8 +2341,8 @@ function moveFocusDate(date, event, firstDayOfWeek = 1) {
|
|
|
2161
2341
|
}
|
|
2162
2342
|
}
|
|
2163
2343
|
|
|
2164
|
-
const ICON_SIZE$
|
|
2165
|
-
let nextId$
|
|
2344
|
+
const ICON_SIZE$7 = { sm: 14, md: 16, lg: 18 };
|
|
2345
|
+
let nextId$c = 0;
|
|
2166
2346
|
class DatepickerComponent {
|
|
2167
2347
|
i18n = inject(NGX_DS_LABELS);
|
|
2168
2348
|
// ── Configuration ─────────────────────────────────────────
|
|
@@ -2183,7 +2363,7 @@ class DatepickerComponent {
|
|
|
2183
2363
|
showToday = input(true, ...(ngDevMode ? [{ debugName: "showToday" }] : /* istanbul ignore next */ []));
|
|
2184
2364
|
// ── Value ────────────────────────────────────────────────
|
|
2185
2365
|
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2186
|
-
id = `ngx-datepicker-${nextId$
|
|
2366
|
+
id = `ngx-datepicker-${nextId$c++}`;
|
|
2187
2367
|
messageId = `${this.id}-message`;
|
|
2188
2368
|
// ── Icons ────────────────────────────────────────────────
|
|
2189
2369
|
CalendarIcon = Calendar;
|
|
@@ -2206,7 +2386,7 @@ class DatepickerComponent {
|
|
|
2206
2386
|
isDisabled = this.#disabled.asReadonly();
|
|
2207
2387
|
isFocused = this.#focused.asReadonly();
|
|
2208
2388
|
// ── Derived ───────────────────────────────────────────────
|
|
2209
|
-
iconSize = computed(() => ICON_SIZE$
|
|
2389
|
+
iconSize = computed(() => ICON_SIZE$7[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
2210
2390
|
hasError = computed(() => fieldHasError(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "hasError" }] : /* istanbul ignore next */ []));
|
|
2211
2391
|
errorText = computed(() => fieldErrorText(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
2212
2392
|
hasValue = computed(() => this.value() !== null, ...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
|
|
@@ -2390,6 +2570,7 @@ class DatepickerComponent {
|
|
|
2390
2570
|
this.hasError() ? `${base}--error` : '',
|
|
2391
2571
|
this.isDisabled() ? `${base}--disabled` : '',
|
|
2392
2572
|
this.floatingLabel() ? `${base}--floating` : '',
|
|
2573
|
+
this.hasValue() && !this.isDisabled() ? `${base}--clearable` : '',
|
|
2393
2574
|
]
|
|
2394
2575
|
.filter(Boolean)
|
|
2395
2576
|
.join(' ');
|
|
@@ -2429,7 +2610,7 @@ class DatepickerComponent {
|
|
|
2429
2610
|
useExisting: forwardRef(() => DatepickerComponent),
|
|
2430
2611
|
multi: true,
|
|
2431
2612
|
},
|
|
2432
|
-
], viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "gridRef", first: true, predicate: ["grid"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-datepicker__label\">{{ label() }}</label>\n}\n\n<!-- Field trigger -->\n<div\n #trigger\n [class]=\"fieldClasses()\"\n (click)=\"togglePanel()\"\n (keydown)=\"onTriggerKeydown($event)\"\n [attr.id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n role=\"button\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-disabled]=\"isDisabled()\"\n>\n <!-- Floating label -->\n @if (floatingLabel() && label()) {\n <span [class]=\"floatLabelClasses()\">{{ label() }}</span>\n }\n\n <!-- Calendar icon -->\n <span class=\"ngx-datepicker__icon\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"CalendarIcon\" [size]=\"iconSize()\" />\n </span>\n\n <!-- Display value -->\n <span class=\"ngx-datepicker__display\">\n @if (displayValue()) {\n <span class=\"ngx-datepicker__value\">{{ displayValue() }}</span>\n } @else {\n <span class=\"ngx-datepicker__placeholder\">{{ placeholder() ?? i18n.datePlaceholder }}</span>\n }\n </span>\n\n <!-- Clear button -->\n @if (hasValue() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"ngx-datepicker__clear\"\n [attr.aria-label]=\"i18n.clearDate\"\n (click)=\"clearValue($event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"iconSize()\" />\n </button>\n }\n</div>\n\n<!-- Calendar panel -->\n@if (isOpen()) {\n <div class=\"ngx-datepicker__panel\" role=\"dialog\" [attr.aria-label]=\"i18n.calendar\">\n <!-- Month navigation -->\n <div class=\"ngx-datepicker__header\">\n <button\n type=\"button\"\n class=\"ngx-datepicker__nav\"\n [attr.aria-label]=\"i18n.prevMonth\"\n (click)=\"prevMonth(); $event.stopPropagation()\"\n >\n <ngx-ds-icon [icon]=\"ChevronLeft\" [size]=\"16\" />\n </button>\n <span class=\"ngx-datepicker__header-text\">{{ headerText() }}</span>\n <button\n type=\"button\"\n class=\"ngx-datepicker__nav\"\n [attr.aria-label]=\"i18n.nextMonth\"\n (click)=\"nextMonth(); $event.stopPropagation()\"\n >\n <ngx-ds-icon [icon]=\"ChevronRight\" [size]=\"16\" />\n </button>\n </div>\n\n <!-- Weekday labels -->\n <div class=\"ngx-datepicker__weekdays\" aria-hidden=\"true\">\n @for (day of weekdayLabels(); track day) {\n <span class=\"ngx-datepicker__weekday\">{{ day }}</span>\n }\n </div>\n\n <!-- Day grid -->\n <div #grid class=\"ngx-datepicker__days\" role=\"grid\" [attr.aria-label]=\"headerText()\">\n @for (week of calendarWeeks(); track $index) {\n <div class=\"ngx-datepicker__week\" role=\"row\">\n @for (cell of week; track trackByTime($index, cell)) {\n <button\n type=\"button\"\n class=\"ngx-datepicker__day\"\n [class.ngx-datepicker__day--other-month]=\"!cell.inMonth\"\n [class.ngx-datepicker__day--today]=\"cell.isToday\"\n [class.ngx-datepicker__day--selected]=\"cell.isSelected\"\n [class.ngx-datepicker__day--disabled]=\"cell.isDisabled\"\n [attr.aria-disabled]=\"cell.isDisabled || null\"\n [attr.aria-label]=\"dayLabel(cell.date)\"\n [attr.aria-selected]=\"cell.isSelected\"\n [attr.aria-current]=\"cell.isToday ? 'date' : null\"\n [attr.tabindex]=\"isFocusTarget(cell) ? 0 : -1\"\n role=\"gridcell\"\n (click)=\"selectDate(cell); $event.stopPropagation()\"\n (keydown)=\"onDayKeydown($event, cell)\"\n >\n {{ cell.date.getDate() }}\n </button>\n }\n </div>\n }\n </div>\n\n <!-- Footer -->\n @if (showToday()) {\n <div class=\"ngx-datepicker__footer\">\n <button\n type=\"button\"\n class=\"ngx-datepicker__today-btn\"\n (click)=\"selectToday(); $event.stopPropagation()\"\n >\n Hoy\n </button>\n </div>\n }\n </div>\n}\n\n<!-- Error / Hint -->\n@if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-datepicker__message ngx-datepicker__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-datepicker__message ngx-datepicker__message--hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;position:relative;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-datepicker__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-datepicker__field{position:relative;display:flex;align-items:center;gap:.5rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color .15s ease,box-shadow .15s ease;min-height:2.375rem}.ngx-datepicker__field--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-datepicker__field--error{border-color:var(--danger-500, #ef4444)}.ngx-datepicker__field--error.ngx-datepicker__field--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-datepicker__field--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed;color:var(--text-placeholder, #9ca3af)}.ngx-datepicker__field--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-datepicker__field--md{padding:.5rem .75rem;font-size:.875rem}.ngx-datepicker__field--lg{padding:.625rem 1rem;font-size:1rem}.ngx-datepicker__float-label{position:absolute;left:2.25rem;top:50%;transform:translateY(-50%);font-size:inherit;color:var(--text-placeholder, #9ca3af);pointer-events:none;white-space:nowrap;line-height:1;padding:0;background:transparent;transition:top .15s ease,font-size .15s ease,color .15s ease,background-color .15s ease,padding .15s ease}.ngx-datepicker__float-label--active{top:0;font-size:.7rem;background:var(--surface-base, #fff);padding:0 .25rem;color:var(--primary-500, #6366f1)}.ngx-datepicker__float-label--focused:not(.ngx-datepicker__float-label--error){color:var(--primary-500, #6366f1)}.ngx-datepicker__float-label--error{color:var(--danger-500, #ef4444)}.ngx-datepicker__icon{display:inline-flex;align-items:center;flex-shrink:0;color:var(--text-placeholder, #9ca3af)}.ngx-datepicker__display{flex:1;min-width:0}.ngx-datepicker__value{display:block;color:var(--text-base, #111827);font-variant-numeric:tabular-nums}.ngx-datepicker__placeholder{display:block;color:var(--text-placeholder, #9ca3af)}.ngx-datepicker__clear{display:inline-flex;align-items:center;flex-shrink:0;padding:0;background:transparent;border:none;cursor:pointer;color:var(--text-placeholder, #9ca3af);transition:color .15s ease}.ngx-datepicker__clear:hover{color:var(--text-muted, #6b7280)}.ngx-datepicker__panel{position:absolute;top:calc(100% + .25rem);left:0;z-index:100;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.5rem;box-shadow:0 8px 24px #0000001f;width:17.5rem;overflow:hidden}.ngx-datepicker__header{display:flex;align-items:center;justify-content:space-between;padding:.75rem .625rem .5rem;border-bottom:1px solid var(--border-subtle, #f3f4f6)}.ngx-datepicker__header-text{font-size:.875rem;font-weight:600;color:var(--text-base, #111827);text-transform:capitalize}.ngx-datepicker__nav{display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;padding:0;background:transparent;border:none;border-radius:.375rem;cursor:pointer;color:var(--text-muted, #6b7280);transition:background .1s ease,color .1s ease}.ngx-datepicker__nav:hover{background:var(--surface-muted, #f3f4f6);color:var(--text-base, #111827)}.ngx-datepicker__weekdays{display:grid;grid-template-columns:repeat(7,1fr);padding:.375rem .5rem .25rem}.ngx-datepicker__weekday{display:flex;align-items:center;justify-content:center;font-size:.7rem;font-weight:600;color:var(--text-placeholder, #9ca3af);text-transform:uppercase;letter-spacing:.03em}.ngx-datepicker__days{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;padding:0 .5rem .5rem}.ngx-datepicker__week{display:contents}.ngx-datepicker__day{display:flex;align-items:center;justify-content:center;height:2.25rem;padding:0;background:transparent;border:none;border-radius:.375rem;font-size:.8125rem;font-family:inherit;color:var(--text-secondary, #374151);cursor:pointer;transition:background .1s ease,color .1s ease;font-variant-numeric:tabular-nums}.ngx-datepicker__day:focus-visible{outline:2px solid var(--primary-300, #a5b4fc);outline-offset:1px}.ngx-datepicker__day:hover:not(.ngx-datepicker__day--disabled):not(.ngx-datepicker__day--selected){background:var(--surface-muted, #f3f4f6);color:var(--text-base, #111827)}.ngx-datepicker__day--other-month{color:var(--text-disabled, #d1d5db)}.ngx-datepicker__day--today:not(.ngx-datepicker__day--selected){color:var(--primary-500, #6366f1);font-weight:700;background:var(--primary-50, #eef2ff)}.ngx-datepicker__day--selected{background:var(--primary-500, #6366f1);color:var(--text-on-color, #fff);font-weight:600}.ngx-datepicker__day--selected:hover{background:var(--primary-600, #4f46e5)}.ngx-datepicker__day--disabled{color:var(--text-disabled, #d1d5db);cursor:not-allowed;pointer-events:none}.ngx-datepicker__footer{display:flex;justify-content:center;padding:.5rem;border-top:1px solid var(--border-subtle, #f3f4f6)}.ngx-datepicker__today-btn{padding:.25rem .875rem;background:transparent;border:1.5px solid var(--border-base, #e5e7eb);border-radius:.375rem;font-size:.8125rem;font-family:inherit;font-weight:500;color:var(--primary-500, #6366f1);cursor:pointer;transition:background .1s ease,border-color .1s ease}.ngx-datepicker__today-btn:hover{background:var(--primary-50, #eef2ff);border-color:var(--primary-200, #c7d2fe)}.ngx-datepicker__message{margin-top:.375rem;font-size:.75rem;line-height:1.4}.ngx-datepicker__message--hint{color:var(--text-muted, #6b7280)}.ngx-datepicker__message--error{color:var(--danger-500, #ef4444)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2613
|
+
], viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "gridRef", first: true, predicate: ["grid"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-datepicker__label\">{{ label() }}</label>\n}\n\n<!-- Field trigger. The clear button is a sibling: a button inside\n role=\"button\" would be a nested interactive control. -->\n<div class=\"ngx-datepicker__control\">\n <div\n #trigger\n [class]=\"fieldClasses()\"\n (click)=\"togglePanel()\"\n (keydown)=\"onTriggerKeydown($event)\"\n [attr.id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n role=\"button\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-disabled]=\"isDisabled()\"\n >\n <!-- Floating label -->\n @if (floatingLabel() && label()) {\n <span [class]=\"floatLabelClasses()\">{{ label() }}</span>\n }\n\n <!-- Calendar icon -->\n <span class=\"ngx-datepicker__icon\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"CalendarIcon\" [size]=\"iconSize()\" />\n </span>\n\n <!-- Display value -->\n <span class=\"ngx-datepicker__display\">\n @if (displayValue()) {\n <span class=\"ngx-datepicker__value\">{{ displayValue() }}</span>\n } @else {\n <span class=\"ngx-datepicker__placeholder\">{{ placeholder() ?? i18n.datePlaceholder }}</span>\n }\n </span>\n </div>\n\n @if (hasValue() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"ngx-datepicker__clear\"\n [attr.aria-label]=\"i18n.clearDate\"\n (click)=\"clearValue($event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"iconSize()\" />\n </button>\n }\n</div>\n\n<!-- Calendar panel -->\n@if (isOpen()) {\n <div class=\"ngx-datepicker__panel\" role=\"dialog\" [attr.aria-label]=\"i18n.calendar\">\n <!-- Month navigation -->\n <div class=\"ngx-datepicker__header\">\n <button\n type=\"button\"\n class=\"ngx-datepicker__nav\"\n [attr.aria-label]=\"i18n.prevMonth\"\n (click)=\"prevMonth(); $event.stopPropagation()\"\n >\n <ngx-ds-icon [icon]=\"ChevronLeft\" [size]=\"16\" />\n </button>\n <span class=\"ngx-datepicker__header-text\">{{ headerText() }}</span>\n <button\n type=\"button\"\n class=\"ngx-datepicker__nav\"\n [attr.aria-label]=\"i18n.nextMonth\"\n (click)=\"nextMonth(); $event.stopPropagation()\"\n >\n <ngx-ds-icon [icon]=\"ChevronRight\" [size]=\"16\" />\n </button>\n </div>\n\n <!-- Weekday labels -->\n <div class=\"ngx-datepicker__weekdays\" aria-hidden=\"true\">\n @for (day of weekdayLabels(); track day) {\n <span class=\"ngx-datepicker__weekday\">{{ day }}</span>\n }\n </div>\n\n <!-- Day grid -->\n <div #grid class=\"ngx-datepicker__days\" role=\"grid\" [attr.aria-label]=\"headerText()\">\n @for (week of calendarWeeks(); track $index) {\n <div class=\"ngx-datepicker__week\" role=\"row\">\n @for (cell of week; track trackByTime($index, cell)) {\n <button\n type=\"button\"\n class=\"ngx-datepicker__day\"\n [class.ngx-datepicker__day--other-month]=\"!cell.inMonth\"\n [class.ngx-datepicker__day--today]=\"cell.isToday\"\n [class.ngx-datepicker__day--selected]=\"cell.isSelected\"\n [class.ngx-datepicker__day--disabled]=\"cell.isDisabled\"\n [attr.aria-disabled]=\"cell.isDisabled || null\"\n [attr.aria-label]=\"dayLabel(cell.date)\"\n [attr.aria-selected]=\"cell.isSelected\"\n [attr.aria-current]=\"cell.isToday ? 'date' : null\"\n [attr.tabindex]=\"isFocusTarget(cell) ? 0 : -1\"\n role=\"gridcell\"\n (click)=\"selectDate(cell); $event.stopPropagation()\"\n (keydown)=\"onDayKeydown($event, cell)\"\n >\n {{ cell.date.getDate() }}\n </button>\n }\n </div>\n }\n </div>\n\n <!-- Footer -->\n @if (showToday()) {\n <div class=\"ngx-datepicker__footer\">\n <button\n type=\"button\"\n class=\"ngx-datepicker__today-btn\"\n (click)=\"selectToday(); $event.stopPropagation()\"\n >\n Hoy\n </button>\n </div>\n }\n </div>\n}\n\n<!-- Error / Hint -->\n@if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-datepicker__message ngx-datepicker__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-datepicker__message ngx-datepicker__message--hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;position:relative;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-datepicker__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-datepicker__field{position:relative;display:flex;align-items:center;gap:.5rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color .15s ease,box-shadow .15s ease;min-height:2.375rem}.ngx-datepicker__field--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-datepicker__field--error{border-color:var(--danger-500, #ef4444)}.ngx-datepicker__field--error.ngx-datepicker__field--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-datepicker__field--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed;color:var(--text-placeholder, #6b7280)}.ngx-datepicker__field--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-datepicker__field--md{padding:.5rem .75rem;font-size:.875rem}.ngx-datepicker__field--lg{padding:.625rem 1rem;font-size:1rem}.ngx-datepicker__float-label{position:absolute;left:2.25rem;top:50%;transform:translateY(-50%);font-size:inherit;color:var(--text-placeholder, #6b7280);pointer-events:none;white-space:nowrap;line-height:1;padding:0;background:transparent;transition:top .15s ease,font-size .15s ease,color .15s ease,background-color .15s ease,padding .15s ease}.ngx-datepicker__float-label--active{top:0;font-size:.7rem;background:var(--surface-base, #fff);padding:0 .25rem;color:var(--fill-primary, #4f46e5)}.ngx-datepicker__float-label--focused:not(.ngx-datepicker__float-label--error){color:var(--fill-primary, #4f46e5)}.ngx-datepicker__float-label--error{color:var(--fill-danger, #dc2626)}.ngx-datepicker__icon{display:inline-flex;align-items:center;flex-shrink:0;color:var(--text-placeholder, #6b7280)}.ngx-datepicker__display{flex:1;min-width:0}.ngx-datepicker__value{display:block;color:var(--text-base, #111827);font-variant-numeric:tabular-nums}.ngx-datepicker__placeholder{display:block;color:var(--text-placeholder, #6b7280)}.ngx-datepicker__control{position:relative}.ngx-datepicker__field.ngx-datepicker__field--clearable{padding-right:2.25rem}.ngx-datepicker__clear{position:absolute;top:50%;right:.375rem;display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;padding:0;color:var(--text-placeholder, #6b7280);background:transparent;border:none;border-radius:.25rem;transform:translateY(-50%);cursor:pointer;transition:color .15s ease}.ngx-datepicker__clear:hover{color:var(--text-muted, #6b7280)}.ngx-datepicker__clear:focus-visible{outline:2px solid var(--primary-500, #6366f1);outline-offset:1px}.ngx-datepicker__panel{position:absolute;top:calc(100% + .25rem);left:0;z-index:100;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.5rem;box-shadow:0 8px 24px #0000001f;width:17.5rem;overflow:hidden}.ngx-datepicker__header{display:flex;align-items:center;justify-content:space-between;padding:.75rem .625rem .5rem;border-bottom:1px solid var(--border-subtle, #f3f4f6)}.ngx-datepicker__header-text{font-size:.875rem;font-weight:600;color:var(--text-base, #111827);text-transform:capitalize}.ngx-datepicker__nav{display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;padding:0;background:transparent;border:none;border-radius:.375rem;cursor:pointer;color:var(--text-muted, #6b7280);transition:background .1s ease,color .1s ease}.ngx-datepicker__nav:hover{background:var(--surface-muted, #f3f4f6);color:var(--text-base, #111827)}.ngx-datepicker__weekdays{display:grid;grid-template-columns:repeat(7,1fr);padding:.375rem .5rem .25rem}.ngx-datepicker__weekday{display:flex;align-items:center;justify-content:center;font-size:.7rem;font-weight:600;color:var(--text-placeholder, #6b7280);text-transform:uppercase;letter-spacing:.03em}.ngx-datepicker__days{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;padding:0 .5rem .5rem}.ngx-datepicker__week{display:contents}.ngx-datepicker__day{display:flex;align-items:center;justify-content:center;height:2.25rem;padding:0;background:transparent;border:none;border-radius:.375rem;font-size:.8125rem;font-family:inherit;color:var(--text-secondary, #374151);cursor:pointer;transition:background .1s ease,color .1s ease;font-variant-numeric:tabular-nums}.ngx-datepicker__day:focus-visible{outline:2px solid var(--primary-300, #a5b4fc);outline-offset:1px}.ngx-datepicker__day:hover:not(.ngx-datepicker__day--disabled):not(.ngx-datepicker__day--selected){background:var(--surface-muted, #f3f4f6);color:var(--text-base, #111827)}.ngx-datepicker__day--other-month{color:var(--text-muted, #6b7280)}.ngx-datepicker__day--today:not(.ngx-datepicker__day--selected){color:var(--fill-primary, #4f46e5);font-weight:700;background:var(--primary-50, #eef2ff)}.ngx-datepicker__day--selected{background:var(--fill-primary, #4f46e5);color:var(--text-on-color, #fff);font-weight:600}.ngx-datepicker__day--selected:hover{background:var(--primary-700, #4338ca)}.ngx-datepicker__day--disabled{color:var(--text-disabled, #d1d5db);cursor:not-allowed;pointer-events:none}.ngx-datepicker__footer{display:flex;justify-content:center;padding:.5rem;border-top:1px solid var(--border-subtle, #f3f4f6)}.ngx-datepicker__today-btn{padding:.25rem .875rem;background:transparent;border:1.5px solid var(--border-base, #e5e7eb);border-radius:.375rem;font-size:.8125rem;font-family:inherit;font-weight:500;color:var(--fill-primary, #4f46e5);cursor:pointer;transition:background .1s ease,border-color .1s ease}.ngx-datepicker__today-btn:hover{background:var(--primary-50, #eef2ff);border-color:var(--primary-200, #c7d2fe)}.ngx-datepicker__message{margin-top:.375rem;font-size:.75rem;line-height:1.4}.ngx-datepicker__message--hint{color:var(--text-muted, #6b7280)}.ngx-datepicker__message--error{color:var(--fill-danger, #dc2626)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2433
2614
|
}
|
|
2434
2615
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DatepickerComponent, decorators: [{
|
|
2435
2616
|
type: Component,
|
|
@@ -2439,7 +2620,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
2439
2620
|
useExisting: forwardRef(() => DatepickerComponent),
|
|
2440
2621
|
multi: true,
|
|
2441
2622
|
},
|
|
2442
|
-
], template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-datepicker__label\">{{ label() }}</label>\n}\n\n<!-- Field trigger -->\n<div\n #trigger\n [class]=\"fieldClasses()\"\n (click)=\"togglePanel()\"\n (keydown)=\"onTriggerKeydown($event)\"\n [attr.id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n role=\"button\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-disabled]=\"isDisabled()\"\n>\n <!-- Floating label -->\n @if (floatingLabel() && label()) {\n <span [class]=\"floatLabelClasses()\">{{ label() }}</span>\n }\n\n <!-- Calendar icon -->\n <span class=\"ngx-datepicker__icon\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"CalendarIcon\" [size]=\"iconSize()\" />\n </span>\n\n <!-- Display value -->\n <span class=\"ngx-datepicker__display\">\n @if (displayValue()) {\n <span class=\"ngx-datepicker__value\">{{ displayValue() }}</span>\n } @else {\n <span class=\"ngx-datepicker__placeholder\">{{ placeholder() ?? i18n.datePlaceholder }}</span>\n }\n </span>\n\n <!-- Clear button -->\n @if (hasValue() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"ngx-datepicker__clear\"\n [attr.aria-label]=\"i18n.clearDate\"\n (click)=\"clearValue($event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"iconSize()\" />\n </button>\n }\n</div>\n\n<!-- Calendar panel -->\n@if (isOpen()) {\n <div class=\"ngx-datepicker__panel\" role=\"dialog\" [attr.aria-label]=\"i18n.calendar\">\n <!-- Month navigation -->\n <div class=\"ngx-datepicker__header\">\n <button\n type=\"button\"\n class=\"ngx-datepicker__nav\"\n [attr.aria-label]=\"i18n.prevMonth\"\n (click)=\"prevMonth(); $event.stopPropagation()\"\n >\n <ngx-ds-icon [icon]=\"ChevronLeft\" [size]=\"16\" />\n </button>\n <span class=\"ngx-datepicker__header-text\">{{ headerText() }}</span>\n <button\n type=\"button\"\n class=\"ngx-datepicker__nav\"\n [attr.aria-label]=\"i18n.nextMonth\"\n (click)=\"nextMonth(); $event.stopPropagation()\"\n >\n <ngx-ds-icon [icon]=\"ChevronRight\" [size]=\"16\" />\n </button>\n </div>\n\n <!-- Weekday labels -->\n <div class=\"ngx-datepicker__weekdays\" aria-hidden=\"true\">\n @for (day of weekdayLabels(); track day) {\n <span class=\"ngx-datepicker__weekday\">{{ day }}</span>\n }\n </div>\n\n <!-- Day grid -->\n <div #grid class=\"ngx-datepicker__days\" role=\"grid\" [attr.aria-label]=\"headerText()\">\n @for (week of calendarWeeks(); track $index) {\n <div class=\"ngx-datepicker__week\" role=\"row\">\n @for (cell of week; track trackByTime($index, cell)) {\n <button\n type=\"button\"\n class=\"ngx-datepicker__day\"\n [class.ngx-datepicker__day--other-month]=\"!cell.inMonth\"\n [class.ngx-datepicker__day--today]=\"cell.isToday\"\n [class.ngx-datepicker__day--selected]=\"cell.isSelected\"\n [class.ngx-datepicker__day--disabled]=\"cell.isDisabled\"\n [attr.aria-disabled]=\"cell.isDisabled || null\"\n [attr.aria-label]=\"dayLabel(cell.date)\"\n [attr.aria-selected]=\"cell.isSelected\"\n [attr.aria-current]=\"cell.isToday ? 'date' : null\"\n [attr.tabindex]=\"isFocusTarget(cell) ? 0 : -1\"\n role=\"gridcell\"\n (click)=\"selectDate(cell); $event.stopPropagation()\"\n (keydown)=\"onDayKeydown($event, cell)\"\n >\n {{ cell.date.getDate() }}\n </button>\n }\n </div>\n }\n </div>\n\n <!-- Footer -->\n @if (showToday()) {\n <div class=\"ngx-datepicker__footer\">\n <button\n type=\"button\"\n class=\"ngx-datepicker__today-btn\"\n (click)=\"selectToday(); $event.stopPropagation()\"\n >\n Hoy\n </button>\n </div>\n }\n </div>\n}\n\n<!-- Error / Hint -->\n@if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-datepicker__message ngx-datepicker__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-datepicker__message ngx-datepicker__message--hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;position:relative;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-datepicker__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-datepicker__field{position:relative;display:flex;align-items:center;gap:.5rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color .15s ease,box-shadow .15s ease;min-height:2.375rem}.ngx-datepicker__field--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-datepicker__field--error{border-color:var(--danger-500, #ef4444)}.ngx-datepicker__field--error.ngx-datepicker__field--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-datepicker__field--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed;color:var(--text-placeholder, #9ca3af)}.ngx-datepicker__field--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-datepicker__field--md{padding:.5rem .75rem;font-size:.875rem}.ngx-datepicker__field--lg{padding:.625rem 1rem;font-size:1rem}.ngx-datepicker__float-label{position:absolute;left:2.25rem;top:50%;transform:translateY(-50%);font-size:inherit;color:var(--text-placeholder, #9ca3af);pointer-events:none;white-space:nowrap;line-height:1;padding:0;background:transparent;transition:top .15s ease,font-size .15s ease,color .15s ease,background-color .15s ease,padding .15s ease}.ngx-datepicker__float-label--active{top:0;font-size:.7rem;background:var(--surface-base, #fff);padding:0 .25rem;color:var(--primary-500, #6366f1)}.ngx-datepicker__float-label--focused:not(.ngx-datepicker__float-label--error){color:var(--primary-500, #6366f1)}.ngx-datepicker__float-label--error{color:var(--danger-500, #ef4444)}.ngx-datepicker__icon{display:inline-flex;align-items:center;flex-shrink:0;color:var(--text-placeholder, #9ca3af)}.ngx-datepicker__display{flex:1;min-width:0}.ngx-datepicker__value{display:block;color:var(--text-base, #111827);font-variant-numeric:tabular-nums}.ngx-datepicker__placeholder{display:block;color:var(--text-placeholder, #9ca3af)}.ngx-datepicker__clear{display:inline-flex;align-items:center;flex-shrink:0;padding:0;background:transparent;border:none;cursor:pointer;color:var(--text-placeholder, #9ca3af);transition:color .15s ease}.ngx-datepicker__clear:hover{color:var(--text-muted, #6b7280)}.ngx-datepicker__panel{position:absolute;top:calc(100% + .25rem);left:0;z-index:100;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.5rem;box-shadow:0 8px 24px #0000001f;width:17.5rem;overflow:hidden}.ngx-datepicker__header{display:flex;align-items:center;justify-content:space-between;padding:.75rem .625rem .5rem;border-bottom:1px solid var(--border-subtle, #f3f4f6)}.ngx-datepicker__header-text{font-size:.875rem;font-weight:600;color:var(--text-base, #111827);text-transform:capitalize}.ngx-datepicker__nav{display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;padding:0;background:transparent;border:none;border-radius:.375rem;cursor:pointer;color:var(--text-muted, #6b7280);transition:background .1s ease,color .1s ease}.ngx-datepicker__nav:hover{background:var(--surface-muted, #f3f4f6);color:var(--text-base, #111827)}.ngx-datepicker__weekdays{display:grid;grid-template-columns:repeat(7,1fr);padding:.375rem .5rem .25rem}.ngx-datepicker__weekday{display:flex;align-items:center;justify-content:center;font-size:.7rem;font-weight:600;color:var(--text-placeholder, #9ca3af);text-transform:uppercase;letter-spacing:.03em}.ngx-datepicker__days{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;padding:0 .5rem .5rem}.ngx-datepicker__week{display:contents}.ngx-datepicker__day{display:flex;align-items:center;justify-content:center;height:2.25rem;padding:0;background:transparent;border:none;border-radius:.375rem;font-size:.8125rem;font-family:inherit;color:var(--text-secondary, #374151);cursor:pointer;transition:background .1s ease,color .1s ease;font-variant-numeric:tabular-nums}.ngx-datepicker__day:focus-visible{outline:2px solid var(--primary-300, #a5b4fc);outline-offset:1px}.ngx-datepicker__day:hover:not(.ngx-datepicker__day--disabled):not(.ngx-datepicker__day--selected){background:var(--surface-muted, #f3f4f6);color:var(--text-base, #111827)}.ngx-datepicker__day--other-month{color:var(--text-disabled, #d1d5db)}.ngx-datepicker__day--today:not(.ngx-datepicker__day--selected){color:var(--primary-500, #6366f1);font-weight:700;background:var(--primary-50, #eef2ff)}.ngx-datepicker__day--selected{background:var(--primary-500, #6366f1);color:var(--text-on-color, #fff);font-weight:600}.ngx-datepicker__day--selected:hover{background:var(--primary-600, #4f46e5)}.ngx-datepicker__day--disabled{color:var(--text-disabled, #d1d5db);cursor:not-allowed;pointer-events:none}.ngx-datepicker__footer{display:flex;justify-content:center;padding:.5rem;border-top:1px solid var(--border-subtle, #f3f4f6)}.ngx-datepicker__today-btn{padding:.25rem .875rem;background:transparent;border:1.5px solid var(--border-base, #e5e7eb);border-radius:.375rem;font-size:.8125rem;font-family:inherit;font-weight:500;color:var(--primary-500, #6366f1);cursor:pointer;transition:background .1s ease,border-color .1s ease}.ngx-datepicker__today-btn:hover{background:var(--primary-50, #eef2ff);border-color:var(--primary-200, #c7d2fe)}.ngx-datepicker__message{margin-top:.375rem;font-size:.75rem;line-height:1.4}.ngx-datepicker__message--hint{color:var(--text-muted, #6b7280)}.ngx-datepicker__message--error{color:var(--danger-500, #ef4444)}\n"] }]
|
|
2623
|
+
], template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-datepicker__label\">{{ label() }}</label>\n}\n\n<!-- Field trigger. The clear button is a sibling: a button inside\n role=\"button\" would be a nested interactive control. -->\n<div class=\"ngx-datepicker__control\">\n <div\n #trigger\n [class]=\"fieldClasses()\"\n (click)=\"togglePanel()\"\n (keydown)=\"onTriggerKeydown($event)\"\n [attr.id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n role=\"button\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-disabled]=\"isDisabled()\"\n >\n <!-- Floating label -->\n @if (floatingLabel() && label()) {\n <span [class]=\"floatLabelClasses()\">{{ label() }}</span>\n }\n\n <!-- Calendar icon -->\n <span class=\"ngx-datepicker__icon\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"CalendarIcon\" [size]=\"iconSize()\" />\n </span>\n\n <!-- Display value -->\n <span class=\"ngx-datepicker__display\">\n @if (displayValue()) {\n <span class=\"ngx-datepicker__value\">{{ displayValue() }}</span>\n } @else {\n <span class=\"ngx-datepicker__placeholder\">{{ placeholder() ?? i18n.datePlaceholder }}</span>\n }\n </span>\n </div>\n\n @if (hasValue() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"ngx-datepicker__clear\"\n [attr.aria-label]=\"i18n.clearDate\"\n (click)=\"clearValue($event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"iconSize()\" />\n </button>\n }\n</div>\n\n<!-- Calendar panel -->\n@if (isOpen()) {\n <div class=\"ngx-datepicker__panel\" role=\"dialog\" [attr.aria-label]=\"i18n.calendar\">\n <!-- Month navigation -->\n <div class=\"ngx-datepicker__header\">\n <button\n type=\"button\"\n class=\"ngx-datepicker__nav\"\n [attr.aria-label]=\"i18n.prevMonth\"\n (click)=\"prevMonth(); $event.stopPropagation()\"\n >\n <ngx-ds-icon [icon]=\"ChevronLeft\" [size]=\"16\" />\n </button>\n <span class=\"ngx-datepicker__header-text\">{{ headerText() }}</span>\n <button\n type=\"button\"\n class=\"ngx-datepicker__nav\"\n [attr.aria-label]=\"i18n.nextMonth\"\n (click)=\"nextMonth(); $event.stopPropagation()\"\n >\n <ngx-ds-icon [icon]=\"ChevronRight\" [size]=\"16\" />\n </button>\n </div>\n\n <!-- Weekday labels -->\n <div class=\"ngx-datepicker__weekdays\" aria-hidden=\"true\">\n @for (day of weekdayLabels(); track day) {\n <span class=\"ngx-datepicker__weekday\">{{ day }}</span>\n }\n </div>\n\n <!-- Day grid -->\n <div #grid class=\"ngx-datepicker__days\" role=\"grid\" [attr.aria-label]=\"headerText()\">\n @for (week of calendarWeeks(); track $index) {\n <div class=\"ngx-datepicker__week\" role=\"row\">\n @for (cell of week; track trackByTime($index, cell)) {\n <button\n type=\"button\"\n class=\"ngx-datepicker__day\"\n [class.ngx-datepicker__day--other-month]=\"!cell.inMonth\"\n [class.ngx-datepicker__day--today]=\"cell.isToday\"\n [class.ngx-datepicker__day--selected]=\"cell.isSelected\"\n [class.ngx-datepicker__day--disabled]=\"cell.isDisabled\"\n [attr.aria-disabled]=\"cell.isDisabled || null\"\n [attr.aria-label]=\"dayLabel(cell.date)\"\n [attr.aria-selected]=\"cell.isSelected\"\n [attr.aria-current]=\"cell.isToday ? 'date' : null\"\n [attr.tabindex]=\"isFocusTarget(cell) ? 0 : -1\"\n role=\"gridcell\"\n (click)=\"selectDate(cell); $event.stopPropagation()\"\n (keydown)=\"onDayKeydown($event, cell)\"\n >\n {{ cell.date.getDate() }}\n </button>\n }\n </div>\n }\n </div>\n\n <!-- Footer -->\n @if (showToday()) {\n <div class=\"ngx-datepicker__footer\">\n <button\n type=\"button\"\n class=\"ngx-datepicker__today-btn\"\n (click)=\"selectToday(); $event.stopPropagation()\"\n >\n Hoy\n </button>\n </div>\n }\n </div>\n}\n\n<!-- Error / Hint -->\n@if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-datepicker__message ngx-datepicker__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-datepicker__message ngx-datepicker__message--hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;position:relative;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-datepicker__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-datepicker__field{position:relative;display:flex;align-items:center;gap:.5rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color .15s ease,box-shadow .15s ease;min-height:2.375rem}.ngx-datepicker__field--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-datepicker__field--error{border-color:var(--danger-500, #ef4444)}.ngx-datepicker__field--error.ngx-datepicker__field--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-datepicker__field--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed;color:var(--text-placeholder, #6b7280)}.ngx-datepicker__field--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-datepicker__field--md{padding:.5rem .75rem;font-size:.875rem}.ngx-datepicker__field--lg{padding:.625rem 1rem;font-size:1rem}.ngx-datepicker__float-label{position:absolute;left:2.25rem;top:50%;transform:translateY(-50%);font-size:inherit;color:var(--text-placeholder, #6b7280);pointer-events:none;white-space:nowrap;line-height:1;padding:0;background:transparent;transition:top .15s ease,font-size .15s ease,color .15s ease,background-color .15s ease,padding .15s ease}.ngx-datepicker__float-label--active{top:0;font-size:.7rem;background:var(--surface-base, #fff);padding:0 .25rem;color:var(--fill-primary, #4f46e5)}.ngx-datepicker__float-label--focused:not(.ngx-datepicker__float-label--error){color:var(--fill-primary, #4f46e5)}.ngx-datepicker__float-label--error{color:var(--fill-danger, #dc2626)}.ngx-datepicker__icon{display:inline-flex;align-items:center;flex-shrink:0;color:var(--text-placeholder, #6b7280)}.ngx-datepicker__display{flex:1;min-width:0}.ngx-datepicker__value{display:block;color:var(--text-base, #111827);font-variant-numeric:tabular-nums}.ngx-datepicker__placeholder{display:block;color:var(--text-placeholder, #6b7280)}.ngx-datepicker__control{position:relative}.ngx-datepicker__field.ngx-datepicker__field--clearable{padding-right:2.25rem}.ngx-datepicker__clear{position:absolute;top:50%;right:.375rem;display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;padding:0;color:var(--text-placeholder, #6b7280);background:transparent;border:none;border-radius:.25rem;transform:translateY(-50%);cursor:pointer;transition:color .15s ease}.ngx-datepicker__clear:hover{color:var(--text-muted, #6b7280)}.ngx-datepicker__clear:focus-visible{outline:2px solid var(--primary-500, #6366f1);outline-offset:1px}.ngx-datepicker__panel{position:absolute;top:calc(100% + .25rem);left:0;z-index:100;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.5rem;box-shadow:0 8px 24px #0000001f;width:17.5rem;overflow:hidden}.ngx-datepicker__header{display:flex;align-items:center;justify-content:space-between;padding:.75rem .625rem .5rem;border-bottom:1px solid var(--border-subtle, #f3f4f6)}.ngx-datepicker__header-text{font-size:.875rem;font-weight:600;color:var(--text-base, #111827);text-transform:capitalize}.ngx-datepicker__nav{display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;padding:0;background:transparent;border:none;border-radius:.375rem;cursor:pointer;color:var(--text-muted, #6b7280);transition:background .1s ease,color .1s ease}.ngx-datepicker__nav:hover{background:var(--surface-muted, #f3f4f6);color:var(--text-base, #111827)}.ngx-datepicker__weekdays{display:grid;grid-template-columns:repeat(7,1fr);padding:.375rem .5rem .25rem}.ngx-datepicker__weekday{display:flex;align-items:center;justify-content:center;font-size:.7rem;font-weight:600;color:var(--text-placeholder, #6b7280);text-transform:uppercase;letter-spacing:.03em}.ngx-datepicker__days{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;padding:0 .5rem .5rem}.ngx-datepicker__week{display:contents}.ngx-datepicker__day{display:flex;align-items:center;justify-content:center;height:2.25rem;padding:0;background:transparent;border:none;border-radius:.375rem;font-size:.8125rem;font-family:inherit;color:var(--text-secondary, #374151);cursor:pointer;transition:background .1s ease,color .1s ease;font-variant-numeric:tabular-nums}.ngx-datepicker__day:focus-visible{outline:2px solid var(--primary-300, #a5b4fc);outline-offset:1px}.ngx-datepicker__day:hover:not(.ngx-datepicker__day--disabled):not(.ngx-datepicker__day--selected){background:var(--surface-muted, #f3f4f6);color:var(--text-base, #111827)}.ngx-datepicker__day--other-month{color:var(--text-muted, #6b7280)}.ngx-datepicker__day--today:not(.ngx-datepicker__day--selected){color:var(--fill-primary, #4f46e5);font-weight:700;background:var(--primary-50, #eef2ff)}.ngx-datepicker__day--selected{background:var(--fill-primary, #4f46e5);color:var(--text-on-color, #fff);font-weight:600}.ngx-datepicker__day--selected:hover{background:var(--primary-700, #4338ca)}.ngx-datepicker__day--disabled{color:var(--text-disabled, #d1d5db);cursor:not-allowed;pointer-events:none}.ngx-datepicker__footer{display:flex;justify-content:center;padding:.5rem;border-top:1px solid var(--border-subtle, #f3f4f6)}.ngx-datepicker__today-btn{padding:.25rem .875rem;background:transparent;border:1.5px solid var(--border-base, #e5e7eb);border-radius:.375rem;font-size:.8125rem;font-family:inherit;font-weight:500;color:var(--fill-primary, #4f46e5);cursor:pointer;transition:background .1s ease,border-color .1s ease}.ngx-datepicker__today-btn:hover{background:var(--primary-50, #eef2ff);border-color:var(--primary-200, #c7d2fe)}.ngx-datepicker__message{margin-top:.375rem;font-size:.75rem;line-height:1.4}.ngx-datepicker__message--hint{color:var(--text-muted, #6b7280)}.ngx-datepicker__message--error{color:var(--fill-danger, #dc2626)}\n"] }]
|
|
2443
2624
|
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], floatingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatingLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], disabledDates: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDates", required: false }] }], disabledDaysOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDaysOfWeek", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], showToday: [{ type: i0.Input, args: [{ isSignal: true, alias: "showToday", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], triggerRef: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], gridRef: [{ type: i0.ViewChild, args: ['grid', { isSignal: true }] }] } });
|
|
2444
2625
|
|
|
2445
2626
|
class PasswordStrengthComponent {
|
|
@@ -2520,11 +2701,11 @@ class PasswordStrengthComponent {
|
|
|
2520
2701
|
return labels[this.strengthLevel()];
|
|
2521
2702
|
}, ...(ngDevMode ? [{ debugName: "strengthLabel" }] : /* istanbul ignore next */ []));
|
|
2522
2703
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: PasswordStrengthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2523
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: PasswordStrengthComponent, isStandalone: true, selector: "ngx-ds-password-strength", inputs: { password: { classPropertyName: "password", publicName: "password", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, requireLowercase: { classPropertyName: "requireLowercase", publicName: "requireLowercase", isSignal: true, isRequired: false, transformFunction: null }, requireUppercase: { classPropertyName: "requireUppercase", publicName: "requireUppercase", isSignal: true, isRequired: false, transformFunction: null }, requireNumbers: { classPropertyName: "requireNumbers", publicName: "requireNumbers", isSignal: true, isRequired: false, transformFunction: null }, requireSpecial: { classPropertyName: "requireSpecial", publicName: "requireSpecial", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, showRequirements: { classPropertyName: "showRequirements", publicName: "showRequirements", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"psm\">\n <!-- Segmented bars + label -->\n <div class=\"psm__row\">\n <div\n class=\"psm__bars\"\n role=\"meter\"\n [attr.aria-valuenow]=\"score()\"\n aria-valuemin=\"0\"\n aria-valuemax=\"4\"\n [attr.aria-label]=\"i18n.passwordStrength + ': ' + strengthLabel()\"\n >\n @for (seg of segments; track seg) {\n <div\n class=\"psm__bar\"\n [class]=\"\n 'psm__bar psm__bar--' + (score() >= seg && score() > 0 ? strengthLevel() : 'empty')\n \"\n ></div>\n }\n </div>\n\n @if (showLabel() && password()) {\n <span class=\"psm__label psm__label--{{ strengthLevel() }}\">\n {{ strengthLabel() }}\n </span>\n }\n </div>\n\n <!-- Requirements checklist -->\n @if (showRequirements() && password()) {\n <ul class=\"psm__requirements\" [attr.aria-label]=\"i18n.passwordRequirements\">\n @for (req of requirements(); track req.label) {\n <li class=\"psm__req\" [class.psm__req--met]=\"req.met\">\n <span class=\"psm__req-icon\" aria-hidden=\"true\"></span>\n {{ req.label }}\n </li>\n }\n </ul>\n }\n</div>\n", styles: [".psm{display:flex;flex-direction:column;gap:.5rem;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.psm__row{display:flex;align-items:center;gap:.75rem}.psm__bars{display:flex;flex:1;gap:.25rem}.psm__bar{flex:1;height:.3rem;border-radius:9999px;transition:background-color .3s ease}.psm__bar--empty{background-color:var(--surface-active, #e5e7eb)}.psm__bar--weak{background-color:var(--danger
|
|
2704
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: PasswordStrengthComponent, isStandalone: true, selector: "ngx-ds-password-strength", inputs: { password: { classPropertyName: "password", publicName: "password", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, requireLowercase: { classPropertyName: "requireLowercase", publicName: "requireLowercase", isSignal: true, isRequired: false, transformFunction: null }, requireUppercase: { classPropertyName: "requireUppercase", publicName: "requireUppercase", isSignal: true, isRequired: false, transformFunction: null }, requireNumbers: { classPropertyName: "requireNumbers", publicName: "requireNumbers", isSignal: true, isRequired: false, transformFunction: null }, requireSpecial: { classPropertyName: "requireSpecial", publicName: "requireSpecial", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, showRequirements: { classPropertyName: "showRequirements", publicName: "showRequirements", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"psm\">\n <!-- Segmented bars + label -->\n <div class=\"psm__row\">\n <div\n class=\"psm__bars\"\n role=\"meter\"\n [attr.aria-valuenow]=\"score()\"\n aria-valuemin=\"0\"\n aria-valuemax=\"4\"\n [attr.aria-label]=\"i18n.passwordStrength + ': ' + strengthLabel()\"\n >\n @for (seg of segments; track seg) {\n <div\n class=\"psm__bar\"\n [class]=\"\n 'psm__bar psm__bar--' + (score() >= seg && score() > 0 ? strengthLevel() : 'empty')\n \"\n ></div>\n }\n </div>\n\n @if (showLabel() && password()) {\n <span class=\"psm__label psm__label--{{ strengthLevel() }}\">\n {{ strengthLabel() }}\n </span>\n }\n </div>\n\n <!-- Requirements checklist -->\n @if (showRequirements() && password()) {\n <ul class=\"psm__requirements\" [attr.aria-label]=\"i18n.passwordRequirements\">\n @for (req of requirements(); track req.label) {\n <li class=\"psm__req\" [class.psm__req--met]=\"req.met\">\n <span class=\"psm__req-icon\" aria-hidden=\"true\"></span>\n {{ req.label }}\n </li>\n }\n </ul>\n }\n</div>\n", styles: [".psm{display:flex;flex-direction:column;gap:.5rem;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.psm__row{display:flex;align-items:center;gap:.75rem}.psm__bars{display:flex;flex:1;gap:.25rem}.psm__bar{flex:1;height:.3rem;border-radius:9999px;transition:background-color .3s ease}.psm__bar--empty{background-color:var(--surface-active, #e5e7eb)}.psm__bar--weak{background-color:var(--fill-danger, #dc2626)}.psm__bar--fair{background-color:var(--fill-warning, #b45309)}.psm__bar--good{background-color:var(--fill-primary, #4f46e5)}.psm__bar--strong{background-color:var(--fill-success, #047857)}.psm__label{flex-shrink:0;font-size:.75rem;font-weight:600;min-width:3.5rem;text-align:right;transition:color .3s ease}.psm__label--weak{color:var(--fill-danger, #dc2626)}.psm__label--fair{color:var(--fill-warning, #b45309)}.psm__label--good{color:var(--fill-primary, #4f46e5)}.psm__label--strong{color:var(--fill-success, #047857)}.psm__requirements{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.3rem}.psm__req{display:flex;align-items:center;gap:.4rem;font-size:.75rem;color:var(--text-placeholder, #6b7280);transition:color .2s ease}.psm__req--met{color:var(--fill-success, #047857)}.psm__req--met .psm__req-icon{background-color:var(--success-500, #10b981);border-color:var(--success-500, #10b981)}.psm__req--met .psm__req-icon:after{opacity:1}.psm__req-icon{flex-shrink:0;position:relative;width:.875rem;height:.875rem;border-radius:50%;border:1.5px solid var(--border-input, #d1d5db);background-color:transparent;transition:background-color .2s ease,border-color .2s ease}.psm__req-icon:after{content:\"\";position:absolute;left:50%;top:45%;width:30%;height:50%;border:1.5px solid var(--text-on-color, #fff);border-top:none;border-left:none;transform:translate(-50%,-50%) rotate(45deg);opacity:0;transition:opacity .2s ease}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2524
2705
|
}
|
|
2525
2706
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: PasswordStrengthComponent, decorators: [{
|
|
2526
2707
|
type: Component,
|
|
2527
|
-
args: [{ selector: 'ngx-ds-password-strength', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"psm\">\n <!-- Segmented bars + label -->\n <div class=\"psm__row\">\n <div\n class=\"psm__bars\"\n role=\"meter\"\n [attr.aria-valuenow]=\"score()\"\n aria-valuemin=\"0\"\n aria-valuemax=\"4\"\n [attr.aria-label]=\"i18n.passwordStrength + ': ' + strengthLabel()\"\n >\n @for (seg of segments; track seg) {\n <div\n class=\"psm__bar\"\n [class]=\"\n 'psm__bar psm__bar--' + (score() >= seg && score() > 0 ? strengthLevel() : 'empty')\n \"\n ></div>\n }\n </div>\n\n @if (showLabel() && password()) {\n <span class=\"psm__label psm__label--{{ strengthLevel() }}\">\n {{ strengthLabel() }}\n </span>\n }\n </div>\n\n <!-- Requirements checklist -->\n @if (showRequirements() && password()) {\n <ul class=\"psm__requirements\" [attr.aria-label]=\"i18n.passwordRequirements\">\n @for (req of requirements(); track req.label) {\n <li class=\"psm__req\" [class.psm__req--met]=\"req.met\">\n <span class=\"psm__req-icon\" aria-hidden=\"true\"></span>\n {{ req.label }}\n </li>\n }\n </ul>\n }\n</div>\n", styles: [".psm{display:flex;flex-direction:column;gap:.5rem;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.psm__row{display:flex;align-items:center;gap:.75rem}.psm__bars{display:flex;flex:1;gap:.25rem}.psm__bar{flex:1;height:.3rem;border-radius:9999px;transition:background-color .3s ease}.psm__bar--empty{background-color:var(--surface-active, #e5e7eb)}.psm__bar--weak{background-color:var(--danger
|
|
2708
|
+
args: [{ selector: 'ngx-ds-password-strength', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"psm\">\n <!-- Segmented bars + label -->\n <div class=\"psm__row\">\n <div\n class=\"psm__bars\"\n role=\"meter\"\n [attr.aria-valuenow]=\"score()\"\n aria-valuemin=\"0\"\n aria-valuemax=\"4\"\n [attr.aria-label]=\"i18n.passwordStrength + ': ' + strengthLabel()\"\n >\n @for (seg of segments; track seg) {\n <div\n class=\"psm__bar\"\n [class]=\"\n 'psm__bar psm__bar--' + (score() >= seg && score() > 0 ? strengthLevel() : 'empty')\n \"\n ></div>\n }\n </div>\n\n @if (showLabel() && password()) {\n <span class=\"psm__label psm__label--{{ strengthLevel() }}\">\n {{ strengthLabel() }}\n </span>\n }\n </div>\n\n <!-- Requirements checklist -->\n @if (showRequirements() && password()) {\n <ul class=\"psm__requirements\" [attr.aria-label]=\"i18n.passwordRequirements\">\n @for (req of requirements(); track req.label) {\n <li class=\"psm__req\" [class.psm__req--met]=\"req.met\">\n <span class=\"psm__req-icon\" aria-hidden=\"true\"></span>\n {{ req.label }}\n </li>\n }\n </ul>\n }\n</div>\n", styles: [".psm{display:flex;flex-direction:column;gap:.5rem;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.psm__row{display:flex;align-items:center;gap:.75rem}.psm__bars{display:flex;flex:1;gap:.25rem}.psm__bar{flex:1;height:.3rem;border-radius:9999px;transition:background-color .3s ease}.psm__bar--empty{background-color:var(--surface-active, #e5e7eb)}.psm__bar--weak{background-color:var(--fill-danger, #dc2626)}.psm__bar--fair{background-color:var(--fill-warning, #b45309)}.psm__bar--good{background-color:var(--fill-primary, #4f46e5)}.psm__bar--strong{background-color:var(--fill-success, #047857)}.psm__label{flex-shrink:0;font-size:.75rem;font-weight:600;min-width:3.5rem;text-align:right;transition:color .3s ease}.psm__label--weak{color:var(--fill-danger, #dc2626)}.psm__label--fair{color:var(--fill-warning, #b45309)}.psm__label--good{color:var(--fill-primary, #4f46e5)}.psm__label--strong{color:var(--fill-success, #047857)}.psm__requirements{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.3rem}.psm__req{display:flex;align-items:center;gap:.4rem;font-size:.75rem;color:var(--text-placeholder, #6b7280);transition:color .2s ease}.psm__req--met{color:var(--fill-success, #047857)}.psm__req--met .psm__req-icon{background-color:var(--success-500, #10b981);border-color:var(--success-500, #10b981)}.psm__req--met .psm__req-icon:after{opacity:1}.psm__req-icon{flex-shrink:0;position:relative;width:.875rem;height:.875rem;border-radius:50%;border:1.5px solid var(--border-input, #d1d5db);background-color:transparent;transition:background-color .2s ease,border-color .2s ease}.psm__req-icon:after{content:\"\";position:absolute;left:50%;top:45%;width:30%;height:50%;border:1.5px solid var(--text-on-color, #fff);border-top:none;border-left:none;transform:translate(-50%,-50%) rotate(45deg);opacity:0;transition:opacity .2s ease}\n"] }]
|
|
2528
2709
|
}], propDecorators: { password: [{ type: i0.Input, args: [{ isSignal: true, alias: "password", required: false }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], requireLowercase: [{ type: i0.Input, args: [{ isSignal: true, alias: "requireLowercase", required: false }] }], requireUppercase: [{ type: i0.Input, args: [{ isSignal: true, alias: "requireUppercase", required: false }] }], requireNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "requireNumbers", required: false }] }], requireSpecial: [{ type: i0.Input, args: [{ isSignal: true, alias: "requireSpecial", required: false }] }], showLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabel", required: false }] }], showRequirements: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRequirements", required: false }] }] } });
|
|
2529
2710
|
|
|
2530
2711
|
const TYPE_ICONS$1 = {
|
|
@@ -2551,11 +2732,11 @@ class AlertComponent {
|
|
|
2551
2732
|
this.dismissed.emit();
|
|
2552
2733
|
}
|
|
2553
2734
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: AlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2554
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: AlertComponent, isStandalone: true, selector: "ngx-ds-alert", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dismissed: "dismissed" }, ngImport: i0, template: "@if (!isClosed()) {\n <div [class]=\"hostClasses()\" role=\"alert\">\n @if (showIcon()) {\n <ngx-ds-icon class=\"alert__icon\" [icon]=\"typeIcon()\" [size]=\"20\" aria-hidden=\"true\" />\n }\n\n <div class=\"alert__body\">\n @if (title()) {\n <p class=\"alert__title\">{{ title() }}</p>\n }\n <div class=\"alert__message\">\n <ng-content />\n </div>\n </div>\n\n @if (dismissible()) {\n <button\n type=\"button\"\n class=\"alert__close\"\n (click)=\"close()\"\n [attr.aria-label]=\"i18n.closeAlert\"\n >\n <ngx-ds-icon [icon]=\"closeIcon\" [size]=\"16\" aria-hidden=\"true\" />\n </button>\n }\n </div>\n}\n", styles: [".alert{display:flex;align-items:flex-start;gap:.75rem;padding:1rem;border-radius:.5rem;border:1.5px solid transparent;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.alert__icon{flex-shrink:0;margin-top:.1rem}.alert__body{flex:1;min-width:0}.alert__title{margin:0 0 .25rem;font-size:.875rem;font-weight:600;line-height:1.25}.alert__message{font-size:.875rem;line-height:1.5}.alert__close{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;margin-top:.1rem;padding:0;background:transparent;border:none;border-radius:.25rem;cursor:pointer;opacity:.6;transition:opacity .15s ease}.alert__close:hover{opacity:1}.alert--info.alert--soft{background-color:var(--info-50, #eff6ff);border-color:var(--info-200, #bfdbfe);color:var(--info-800, #1e40af)}.alert--info.alert--solid{background-color:var(--info
|
|
2735
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: AlertComponent, isStandalone: true, selector: "ngx-ds-alert", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dismissed: "dismissed" }, ngImport: i0, template: "@if (!isClosed()) {\n <div [class]=\"hostClasses()\" role=\"alert\">\n @if (showIcon()) {\n <ngx-ds-icon class=\"alert__icon\" [icon]=\"typeIcon()\" [size]=\"20\" aria-hidden=\"true\" />\n }\n\n <div class=\"alert__body\">\n @if (title()) {\n <p class=\"alert__title\">{{ title() }}</p>\n }\n <div class=\"alert__message\">\n <ng-content />\n </div>\n </div>\n\n @if (dismissible()) {\n <button\n type=\"button\"\n class=\"alert__close\"\n (click)=\"close()\"\n [attr.aria-label]=\"i18n.closeAlert\"\n >\n <ngx-ds-icon [icon]=\"closeIcon\" [size]=\"16\" aria-hidden=\"true\" />\n </button>\n }\n </div>\n}\n", styles: [".alert{display:flex;align-items:flex-start;gap:.75rem;padding:1rem;border-radius:.5rem;border:1.5px solid transparent;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.alert__icon{flex-shrink:0;margin-top:.1rem}.alert__body{flex:1;min-width:0}.alert__title{margin:0 0 .25rem;font-size:.875rem;font-weight:600;line-height:1.25}.alert__message{font-size:.875rem;line-height:1.5}.alert__close{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;margin-top:.1rem;padding:0;background:transparent;border:none;border-radius:.25rem;cursor:pointer;opacity:.6;transition:opacity .15s ease}.alert__close:hover{opacity:1}.alert--info.alert--soft{background-color:var(--info-50, #eff6ff);border-color:var(--info-200, #bfdbfe);color:var(--info-800, #1e40af)}.alert--info.alert--solid{background-color:var(--fill-info, #2563eb);border-color:var(--fill-info, #2563eb);color:var(--text-on-color, #fff)}.alert--info.alert--outline{background-color:var(--surface-base, #fff);border-color:var(--fill-info, #2563eb);color:var(--info-800, #1e40af)}.alert--success.alert--soft{background-color:var(--success-50, #ecfdf5);border-color:var(--success-200, #a7f3d0);color:var(--success-800, #065f46)}.alert--success.alert--solid{background-color:var(--fill-success, #047857);border-color:var(--fill-success, #047857);color:var(--text-on-color, #fff)}.alert--success.alert--outline{background-color:var(--surface-base, #fff);border-color:var(--fill-success, #047857);color:var(--success-800, #065f46)}.alert--warning.alert--soft{background-color:var(--warning-50, #fffbeb);border-color:var(--warning-200, #fde68a);color:var(--warning-800, #92400e)}.alert--warning.alert--solid{background-color:var(--fill-warning, #b45309);border-color:var(--fill-warning, #b45309);color:var(--text-on-color, #fff)}.alert--warning.alert--outline{background-color:var(--surface-base, #fff);border-color:var(--fill-warning, #b45309);color:var(--warning-800, #92400e)}.alert--danger.alert--soft{background-color:var(--danger-50, #fef2f2);border-color:var(--danger-200, #fecaca);color:var(--danger-800, #991b1b)}.alert--danger.alert--solid{background-color:var(--fill-danger, #dc2626);border-color:var(--fill-danger, #dc2626);color:var(--text-on-color, #fff)}.alert--danger.alert--outline{background-color:var(--surface-base, #fff);border-color:var(--fill-danger, #dc2626);color:var(--danger-800, #991b1b)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2555
2736
|
}
|
|
2556
2737
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: AlertComponent, decorators: [{
|
|
2557
2738
|
type: Component,
|
|
2558
|
-
args: [{ selector: 'ngx-ds-alert', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (!isClosed()) {\n <div [class]=\"hostClasses()\" role=\"alert\">\n @if (showIcon()) {\n <ngx-ds-icon class=\"alert__icon\" [icon]=\"typeIcon()\" [size]=\"20\" aria-hidden=\"true\" />\n }\n\n <div class=\"alert__body\">\n @if (title()) {\n <p class=\"alert__title\">{{ title() }}</p>\n }\n <div class=\"alert__message\">\n <ng-content />\n </div>\n </div>\n\n @if (dismissible()) {\n <button\n type=\"button\"\n class=\"alert__close\"\n (click)=\"close()\"\n [attr.aria-label]=\"i18n.closeAlert\"\n >\n <ngx-ds-icon [icon]=\"closeIcon\" [size]=\"16\" aria-hidden=\"true\" />\n </button>\n }\n </div>\n}\n", styles: [".alert{display:flex;align-items:flex-start;gap:.75rem;padding:1rem;border-radius:.5rem;border:1.5px solid transparent;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.alert__icon{flex-shrink:0;margin-top:.1rem}.alert__body{flex:1;min-width:0}.alert__title{margin:0 0 .25rem;font-size:.875rem;font-weight:600;line-height:1.25}.alert__message{font-size:.875rem;line-height:1.5}.alert__close{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;margin-top:.1rem;padding:0;background:transparent;border:none;border-radius:.25rem;cursor:pointer;opacity:.6;transition:opacity .15s ease}.alert__close:hover{opacity:1}.alert--info.alert--soft{background-color:var(--info-50, #eff6ff);border-color:var(--info-200, #bfdbfe);color:var(--info-800, #1e40af)}.alert--info.alert--solid{background-color:var(--info
|
|
2739
|
+
args: [{ selector: 'ngx-ds-alert', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (!isClosed()) {\n <div [class]=\"hostClasses()\" role=\"alert\">\n @if (showIcon()) {\n <ngx-ds-icon class=\"alert__icon\" [icon]=\"typeIcon()\" [size]=\"20\" aria-hidden=\"true\" />\n }\n\n <div class=\"alert__body\">\n @if (title()) {\n <p class=\"alert__title\">{{ title() }}</p>\n }\n <div class=\"alert__message\">\n <ng-content />\n </div>\n </div>\n\n @if (dismissible()) {\n <button\n type=\"button\"\n class=\"alert__close\"\n (click)=\"close()\"\n [attr.aria-label]=\"i18n.closeAlert\"\n >\n <ngx-ds-icon [icon]=\"closeIcon\" [size]=\"16\" aria-hidden=\"true\" />\n </button>\n }\n </div>\n}\n", styles: [".alert{display:flex;align-items:flex-start;gap:.75rem;padding:1rem;border-radius:.5rem;border:1.5px solid transparent;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.alert__icon{flex-shrink:0;margin-top:.1rem}.alert__body{flex:1;min-width:0}.alert__title{margin:0 0 .25rem;font-size:.875rem;font-weight:600;line-height:1.25}.alert__message{font-size:.875rem;line-height:1.5}.alert__close{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;margin-top:.1rem;padding:0;background:transparent;border:none;border-radius:.25rem;cursor:pointer;opacity:.6;transition:opacity .15s ease}.alert__close:hover{opacity:1}.alert--info.alert--soft{background-color:var(--info-50, #eff6ff);border-color:var(--info-200, #bfdbfe);color:var(--info-800, #1e40af)}.alert--info.alert--solid{background-color:var(--fill-info, #2563eb);border-color:var(--fill-info, #2563eb);color:var(--text-on-color, #fff)}.alert--info.alert--outline{background-color:var(--surface-base, #fff);border-color:var(--fill-info, #2563eb);color:var(--info-800, #1e40af)}.alert--success.alert--soft{background-color:var(--success-50, #ecfdf5);border-color:var(--success-200, #a7f3d0);color:var(--success-800, #065f46)}.alert--success.alert--solid{background-color:var(--fill-success, #047857);border-color:var(--fill-success, #047857);color:var(--text-on-color, #fff)}.alert--success.alert--outline{background-color:var(--surface-base, #fff);border-color:var(--fill-success, #047857);color:var(--success-800, #065f46)}.alert--warning.alert--soft{background-color:var(--warning-50, #fffbeb);border-color:var(--warning-200, #fde68a);color:var(--warning-800, #92400e)}.alert--warning.alert--solid{background-color:var(--fill-warning, #b45309);border-color:var(--fill-warning, #b45309);color:var(--text-on-color, #fff)}.alert--warning.alert--outline{background-color:var(--surface-base, #fff);border-color:var(--fill-warning, #b45309);color:var(--warning-800, #92400e)}.alert--danger.alert--soft{background-color:var(--danger-50, #fef2f2);border-color:var(--danger-200, #fecaca);color:var(--danger-800, #991b1b)}.alert--danger.alert--solid{background-color:var(--fill-danger, #dc2626);border-color:var(--fill-danger, #dc2626);color:var(--text-on-color, #fff)}.alert--danger.alert--outline{background-color:var(--surface-base, #fff);border-color:var(--fill-danger, #dc2626);color:var(--danger-800, #991b1b)}\n"] }]
|
|
2559
2740
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], dismissed: [{ type: i0.Output, args: ["dismissed"] }] } });
|
|
2560
2741
|
|
|
2561
2742
|
class FileUploadComponent {
|
|
@@ -2677,14 +2858,14 @@ class FileUploadComponent {
|
|
|
2677
2858
|
return this.uploadState()[file.id];
|
|
2678
2859
|
}
|
|
2679
2860
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: FileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2680
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: FileUploadComponent, isStandalone: true, selector: "ngx-ds-file-upload", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, maxSizeMb: { classPropertyName: "maxSizeMb", publicName: "maxSizeMb", isSignal: true, isRequired: false, transformFunction: null }, maxFiles: { classPropertyName: "maxFiles", publicName: "maxFiles", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", 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 }, uploadState: { classPropertyName: "uploadState", publicName: "uploadState", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filesChange: "filesChange" }, host: { classAttribute: "file-upload-host" }, ngImport: i0, template: "<label\n [class]=\"zoneClasses()\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\"\n>\n <input\n type=\"file\"\n class=\"upload-input\"\n [accept]=\"accept() || null\"\n [multiple]=\"multiple() || null\"\n [disabled]=\"disabled() || null\"\n (change)=\"onFileSelected($event)\"\n />\n\n <ngx-ds-icon class=\"upload-icon\" [icon]=\"icons.Upload\" [size]=\"32\" />\n <span class=\"upload-label\">{{ label() ?? i18n.fileUploadPrompt }}</span>\n @if (hint()) {\n <span class=\"upload-hint\">{{ hint() }}</span>\n }\n</label>\n\n@if (files().length > 0) {\n <ul class=\"upload-list\" role=\"list\">\n @for (file of files(); track file.id) {\n <li\n class=\"upload-file\"\n [class.upload-file--invalid]=\"file.status === 'invalid'\"\n [class.upload-file--error]=\"stateFor(file)?.status === 'error'\"\n >\n <ngx-ds-icon class=\"upload-file__icon\" [icon]=\"fileIcon(file)\" [size]=\"20\" />\n <div class=\"upload-file__info\">\n <span class=\"upload-file__name\">{{ file.name }}</span>\n <span class=\"upload-file__meta\">\n {{ formatSize(file.size) }}\n @if (file.error) {\n \u00B7 {{ file.error }}\n }\n @if (stateFor(file)?.status === 'error' && stateFor(file)?.error) {\n \u00B7 {{ stateFor(file)?.error }}\n }\n </span>\n\n @if (stateFor(file); as state) {\n @if (state.status === 'uploading') {\n <ngx-ds-progress-bar\n class=\"upload-file__progress\"\n size=\"sm\"\n color=\"primary\"\n [value]=\"state.progress ?? 0\"\n [indeterminate]=\"state.progress == null\"\n />\n }\n }\n </div>\n\n @if (stateFor(file); as state) {\n @if (state.status === 'done') {\n <ngx-ds-icon\n class=\"upload-file__status upload-file__status--done\"\n [icon]=\"icons.CheckCircle2\"\n [size]=\"18\"\n />\n } @else if (state.status === 'error') {\n <ngx-ds-icon\n class=\"upload-file__status upload-file__status--error\"\n [icon]=\"icons.AlertCircle\"\n [size]=\"18\"\n />\n }\n }\n\n <ngx-ds-icon-button\n [icon]=\"icons.X\"\n [ariaLabel]=\"i18n.removeFile\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n [bordered]=\"false\"\n (click)=\"removeFile(file.id)\"\n />\n </li>\n }\n </ul>\n}\n", styles: [":host{display:block}.upload-zone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.375rem;padding:2rem 1.5rem;min-height:9rem;border:2px dashed var(--border-input, #d1d5db);border-radius:.75rem;cursor:pointer;text-align:center;transition:border-color .15s ease,background .15s ease;background:var(--surface-subtle, #f9fafb)}.upload-zone:hover:not(.upload-zone--disabled),.upload-zone--dragging{border-color:var(--primary-500, #6366f1);background:#3b82f60a}.upload-zone:hover:not(.upload-zone--disabled) .upload-icon,.upload-zone--dragging .upload-icon{color:var(--primary
|
|
2861
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: FileUploadComponent, isStandalone: true, selector: "ngx-ds-file-upload", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, maxSizeMb: { classPropertyName: "maxSizeMb", publicName: "maxSizeMb", isSignal: true, isRequired: false, transformFunction: null }, maxFiles: { classPropertyName: "maxFiles", publicName: "maxFiles", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", 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 }, uploadState: { classPropertyName: "uploadState", publicName: "uploadState", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filesChange: "filesChange" }, host: { classAttribute: "file-upload-host" }, ngImport: i0, template: "<label\n [class]=\"zoneClasses()\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\"\n>\n <input\n type=\"file\"\n class=\"upload-input\"\n [accept]=\"accept() || null\"\n [multiple]=\"multiple() || null\"\n [disabled]=\"disabled() || null\"\n (change)=\"onFileSelected($event)\"\n />\n\n <ngx-ds-icon class=\"upload-icon\" [icon]=\"icons.Upload\" [size]=\"32\" />\n <span class=\"upload-label\">{{ label() ?? i18n.fileUploadPrompt }}</span>\n @if (hint()) {\n <span class=\"upload-hint\">{{ hint() }}</span>\n }\n</label>\n\n@if (files().length > 0) {\n <ul class=\"upload-list\" role=\"list\">\n @for (file of files(); track file.id) {\n <li\n class=\"upload-file\"\n [class.upload-file--invalid]=\"file.status === 'invalid'\"\n [class.upload-file--error]=\"stateFor(file)?.status === 'error'\"\n >\n <ngx-ds-icon class=\"upload-file__icon\" [icon]=\"fileIcon(file)\" [size]=\"20\" />\n <div class=\"upload-file__info\">\n <span class=\"upload-file__name\">{{ file.name }}</span>\n <span class=\"upload-file__meta\">\n {{ formatSize(file.size) }}\n @if (file.error) {\n \u00B7 {{ file.error }}\n }\n @if (stateFor(file)?.status === 'error' && stateFor(file)?.error) {\n \u00B7 {{ stateFor(file)?.error }}\n }\n </span>\n\n @if (stateFor(file); as state) {\n @if (state.status === 'uploading') {\n <ngx-ds-progress-bar\n class=\"upload-file__progress\"\n size=\"sm\"\n color=\"primary\"\n [value]=\"state.progress ?? 0\"\n [indeterminate]=\"state.progress == null\"\n />\n }\n }\n </div>\n\n @if (stateFor(file); as state) {\n @if (state.status === 'done') {\n <ngx-ds-icon\n class=\"upload-file__status upload-file__status--done\"\n [icon]=\"icons.CheckCircle2\"\n [size]=\"18\"\n />\n } @else if (state.status === 'error') {\n <ngx-ds-icon\n class=\"upload-file__status upload-file__status--error\"\n [icon]=\"icons.AlertCircle\"\n [size]=\"18\"\n />\n }\n }\n\n <ngx-ds-icon-button\n [icon]=\"icons.X\"\n [ariaLabel]=\"i18n.removeFile\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n [bordered]=\"false\"\n (click)=\"removeFile(file.id)\"\n />\n </li>\n }\n </ul>\n}\n", styles: [":host{display:block}.upload-zone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.375rem;padding:2rem 1.5rem;min-height:9rem;border:2px dashed var(--border-input, #d1d5db);border-radius:.75rem;cursor:pointer;text-align:center;transition:border-color .15s ease,background .15s ease;background:var(--surface-subtle, #f9fafb)}.upload-zone:hover:not(.upload-zone--disabled),.upload-zone--dragging{border-color:var(--primary-500, #6366f1);background:#3b82f60a}.upload-zone:hover:not(.upload-zone--disabled) .upload-icon,.upload-zone--dragging .upload-icon{color:var(--fill-primary, #4f46e5)}.upload-zone--disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.upload-input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.upload-icon{color:var(--text-placeholder, #6b7280);transition:color .15s ease;margin-bottom:.25rem}.upload-label{font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.upload-hint{font-size:.75rem;color:var(--text-muted, #6b7280)}.upload-list{list-style:none;margin:.75rem 0 0;padding:0;display:flex;flex-direction:column;gap:.5rem}.upload-file{display:flex;align-items:center;flex-wrap:wrap;gap:.75rem;padding:.625rem .875rem;border:1px solid var(--border-base, #e5e7eb);border-radius:.5rem;background:var(--surface-base, #fff)}.upload-file--invalid,.upload-file--error{border-color:#ef444480;background:#ef44440a}.upload-file--invalid .upload-file__meta,.upload-file--error .upload-file__meta{color:var(--fill-danger, #dc2626)}.upload-file__progress{flex-basis:100%}.upload-file__status{flex-shrink:0}.upload-file__status--done{color:var(--fill-success, #047857)}.upload-file__status--error{color:var(--fill-danger, #dc2626)}.upload-file__icon{color:var(--text-muted, #6b7280);flex-shrink:0}.upload-file__info{flex:1;min-width:0}.upload-file__name{display:block;font-size:.875rem;font-weight:500;color:var(--text-base, #111827);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.upload-file__meta{display:block;font-size:.75rem;color:var(--text-muted, #6b7280);margin-top:.0625rem}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }, { kind: "component", type: IconButtonComponent, selector: "ngx-ds-icon-button", inputs: ["icon", "ariaLabel", "variant", "size", "color", "rounded", "bordered", "disabled", "type"] }, { kind: "component", type: ProgressBarComponent, selector: "ngx-ds-progress-bar", inputs: ["value", "max", "size", "color", "label", "showValue", "striped", "animated", "rounded", "indeterminate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2681
2862
|
}
|
|
2682
2863
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: FileUploadComponent, decorators: [{
|
|
2683
2864
|
type: Component,
|
|
2684
|
-
args: [{ selector: 'ngx-ds-file-upload', standalone: true, imports: [IconComponent, IconButtonComponent, ProgressBarComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'file-upload-host' }, template: "<label\n [class]=\"zoneClasses()\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\"\n>\n <input\n type=\"file\"\n class=\"upload-input\"\n [accept]=\"accept() || null\"\n [multiple]=\"multiple() || null\"\n [disabled]=\"disabled() || null\"\n (change)=\"onFileSelected($event)\"\n />\n\n <ngx-ds-icon class=\"upload-icon\" [icon]=\"icons.Upload\" [size]=\"32\" />\n <span class=\"upload-label\">{{ label() ?? i18n.fileUploadPrompt }}</span>\n @if (hint()) {\n <span class=\"upload-hint\">{{ hint() }}</span>\n }\n</label>\n\n@if (files().length > 0) {\n <ul class=\"upload-list\" role=\"list\">\n @for (file of files(); track file.id) {\n <li\n class=\"upload-file\"\n [class.upload-file--invalid]=\"file.status === 'invalid'\"\n [class.upload-file--error]=\"stateFor(file)?.status === 'error'\"\n >\n <ngx-ds-icon class=\"upload-file__icon\" [icon]=\"fileIcon(file)\" [size]=\"20\" />\n <div class=\"upload-file__info\">\n <span class=\"upload-file__name\">{{ file.name }}</span>\n <span class=\"upload-file__meta\">\n {{ formatSize(file.size) }}\n @if (file.error) {\n \u00B7 {{ file.error }}\n }\n @if (stateFor(file)?.status === 'error' && stateFor(file)?.error) {\n \u00B7 {{ stateFor(file)?.error }}\n }\n </span>\n\n @if (stateFor(file); as state) {\n @if (state.status === 'uploading') {\n <ngx-ds-progress-bar\n class=\"upload-file__progress\"\n size=\"sm\"\n color=\"primary\"\n [value]=\"state.progress ?? 0\"\n [indeterminate]=\"state.progress == null\"\n />\n }\n }\n </div>\n\n @if (stateFor(file); as state) {\n @if (state.status === 'done') {\n <ngx-ds-icon\n class=\"upload-file__status upload-file__status--done\"\n [icon]=\"icons.CheckCircle2\"\n [size]=\"18\"\n />\n } @else if (state.status === 'error') {\n <ngx-ds-icon\n class=\"upload-file__status upload-file__status--error\"\n [icon]=\"icons.AlertCircle\"\n [size]=\"18\"\n />\n }\n }\n\n <ngx-ds-icon-button\n [icon]=\"icons.X\"\n [ariaLabel]=\"i18n.removeFile\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n [bordered]=\"false\"\n (click)=\"removeFile(file.id)\"\n />\n </li>\n }\n </ul>\n}\n", styles: [":host{display:block}.upload-zone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.375rem;padding:2rem 1.5rem;min-height:9rem;border:2px dashed var(--border-input, #d1d5db);border-radius:.75rem;cursor:pointer;text-align:center;transition:border-color .15s ease,background .15s ease;background:var(--surface-subtle, #f9fafb)}.upload-zone:hover:not(.upload-zone--disabled),.upload-zone--dragging{border-color:var(--primary-500, #6366f1);background:#3b82f60a}.upload-zone:hover:not(.upload-zone--disabled) .upload-icon,.upload-zone--dragging .upload-icon{color:var(--primary
|
|
2865
|
+
args: [{ selector: 'ngx-ds-file-upload', standalone: true, imports: [IconComponent, IconButtonComponent, ProgressBarComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'file-upload-host' }, template: "<label\n [class]=\"zoneClasses()\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\"\n>\n <input\n type=\"file\"\n class=\"upload-input\"\n [accept]=\"accept() || null\"\n [multiple]=\"multiple() || null\"\n [disabled]=\"disabled() || null\"\n (change)=\"onFileSelected($event)\"\n />\n\n <ngx-ds-icon class=\"upload-icon\" [icon]=\"icons.Upload\" [size]=\"32\" />\n <span class=\"upload-label\">{{ label() ?? i18n.fileUploadPrompt }}</span>\n @if (hint()) {\n <span class=\"upload-hint\">{{ hint() }}</span>\n }\n</label>\n\n@if (files().length > 0) {\n <ul class=\"upload-list\" role=\"list\">\n @for (file of files(); track file.id) {\n <li\n class=\"upload-file\"\n [class.upload-file--invalid]=\"file.status === 'invalid'\"\n [class.upload-file--error]=\"stateFor(file)?.status === 'error'\"\n >\n <ngx-ds-icon class=\"upload-file__icon\" [icon]=\"fileIcon(file)\" [size]=\"20\" />\n <div class=\"upload-file__info\">\n <span class=\"upload-file__name\">{{ file.name }}</span>\n <span class=\"upload-file__meta\">\n {{ formatSize(file.size) }}\n @if (file.error) {\n \u00B7 {{ file.error }}\n }\n @if (stateFor(file)?.status === 'error' && stateFor(file)?.error) {\n \u00B7 {{ stateFor(file)?.error }}\n }\n </span>\n\n @if (stateFor(file); as state) {\n @if (state.status === 'uploading') {\n <ngx-ds-progress-bar\n class=\"upload-file__progress\"\n size=\"sm\"\n color=\"primary\"\n [value]=\"state.progress ?? 0\"\n [indeterminate]=\"state.progress == null\"\n />\n }\n }\n </div>\n\n @if (stateFor(file); as state) {\n @if (state.status === 'done') {\n <ngx-ds-icon\n class=\"upload-file__status upload-file__status--done\"\n [icon]=\"icons.CheckCircle2\"\n [size]=\"18\"\n />\n } @else if (state.status === 'error') {\n <ngx-ds-icon\n class=\"upload-file__status upload-file__status--error\"\n [icon]=\"icons.AlertCircle\"\n [size]=\"18\"\n />\n }\n }\n\n <ngx-ds-icon-button\n [icon]=\"icons.X\"\n [ariaLabel]=\"i18n.removeFile\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n [bordered]=\"false\"\n (click)=\"removeFile(file.id)\"\n />\n </li>\n }\n </ul>\n}\n", styles: [":host{display:block}.upload-zone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.375rem;padding:2rem 1.5rem;min-height:9rem;border:2px dashed var(--border-input, #d1d5db);border-radius:.75rem;cursor:pointer;text-align:center;transition:border-color .15s ease,background .15s ease;background:var(--surface-subtle, #f9fafb)}.upload-zone:hover:not(.upload-zone--disabled),.upload-zone--dragging{border-color:var(--primary-500, #6366f1);background:#3b82f60a}.upload-zone:hover:not(.upload-zone--disabled) .upload-icon,.upload-zone--dragging .upload-icon{color:var(--fill-primary, #4f46e5)}.upload-zone--disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.upload-input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.upload-icon{color:var(--text-placeholder, #6b7280);transition:color .15s ease;margin-bottom:.25rem}.upload-label{font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.upload-hint{font-size:.75rem;color:var(--text-muted, #6b7280)}.upload-list{list-style:none;margin:.75rem 0 0;padding:0;display:flex;flex-direction:column;gap:.5rem}.upload-file{display:flex;align-items:center;flex-wrap:wrap;gap:.75rem;padding:.625rem .875rem;border:1px solid var(--border-base, #e5e7eb);border-radius:.5rem;background:var(--surface-base, #fff)}.upload-file--invalid,.upload-file--error{border-color:#ef444480;background:#ef44440a}.upload-file--invalid .upload-file__meta,.upload-file--error .upload-file__meta{color:var(--fill-danger, #dc2626)}.upload-file__progress{flex-basis:100%}.upload-file__status{flex-shrink:0}.upload-file__status--done{color:var(--fill-success, #047857)}.upload-file__status--error{color:var(--fill-danger, #dc2626)}.upload-file__icon{color:var(--text-muted, #6b7280);flex-shrink:0}.upload-file__info{flex:1;min-width:0}.upload-file__name{display:block;font-size:.875rem;font-weight:500;color:var(--text-base, #111827);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.upload-file__meta{display:block;font-size:.75rem;color:var(--text-muted, #6b7280);margin-top:.0625rem}\n"] }]
|
|
2685
2866
|
}], propDecorators: { multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], maxSizeMb: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSizeMb", required: false }] }], maxFiles: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFiles", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], uploadState: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadState", required: false }] }], filesChange: [{ type: i0.Output, args: ["filesChange"] }] } });
|
|
2686
2867
|
|
|
2687
|
-
const ICON_SIZE$
|
|
2868
|
+
const ICON_SIZE$6 = { sm: 14, md: 16, lg: 18 };
|
|
2688
2869
|
class SearchInputComponent {
|
|
2689
2870
|
i18n = inject(NGX_DS_LABELS);
|
|
2690
2871
|
value = model('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
@@ -2700,7 +2881,7 @@ class SearchInputComponent {
|
|
|
2700
2881
|
focused = signal(false, ...(ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []));
|
|
2701
2882
|
searchIcon = Search;
|
|
2702
2883
|
clearIcon = X;
|
|
2703
|
-
iconSize = computed(() => ICON_SIZE$
|
|
2884
|
+
iconSize = computed(() => ICON_SIZE$6[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
2704
2885
|
showClear = computed(() => this.clearable() && this.value().length > 0 && !this.disabled() && !this.loading(), ...(ngDevMode ? [{ debugName: "showClear" }] : /* istanbul ignore next */ []));
|
|
2705
2886
|
wrapperClasses = computed(() => {
|
|
2706
2887
|
const b = 'search-input';
|
|
@@ -2726,11 +2907,11 @@ class SearchInputComponent {
|
|
|
2726
2907
|
this.cleared.emit();
|
|
2727
2908
|
}
|
|
2728
2909
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: SearchInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2729
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: SearchInputComponent, isStandalone: true, selector: "ngx-ds-search-input", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", 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 }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", searchSubmit: "searchSubmit", cleared: "cleared" }, ngImport: i0, template: "<div [class]=\"wrapperClasses()\">\n <span class=\"search-input__icon\">\n @if (loading()) {\n <ngx-ds-spinner size=\"xs\" />\n } @else {\n <ngx-ds-icon [icon]=\"searchIcon\" [size]=\"iconSize()\" />\n }\n </span>\n\n <input\n class=\"search-input__native\"\n type=\"search\"\n [placeholder]=\"placeholder() ?? i18n.searchPlaceholder\"\n [attr.aria-label]=\"ariaLabel() ?? i18n.search\"\n [disabled]=\"disabled() || null\"\n [value]=\"value()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (focus)=\"focused.set(true)\"\n (blur)=\"focused.set(false)\"\n />\n\n @if (showClear()) {\n <button\n class=\"search-input__clear\"\n type=\"button\"\n [attr.aria-label]=\"i18n.clear\"\n (click)=\"clear()\"\n >\n <ngx-ds-icon [icon]=\"clearIcon\" [size]=\"iconSize()\" />\n </button>\n }\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.search-input{position:relative;display:flex;align-items:center;gap:.375rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;transition:border-color .15s ease,box-shadow .15s ease}.search-input--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.search-input--disabled{background:var(--surface-subtle, #f9fafb);opacity:.6;cursor:not-allowed}.search-input--sm{padding:.375rem .625rem;font-size:.8125rem}.search-input--md{padding:.5rem .75rem;font-size:.875rem}.search-input--lg{padding:.625rem 1rem;font-size:1rem}.search-input__icon{display:inline-flex;align-items:center;flex-shrink:0;color:var(--text-placeholder, #
|
|
2910
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: SearchInputComponent, isStandalone: true, selector: "ngx-ds-search-input", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", 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 }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", searchSubmit: "searchSubmit", cleared: "cleared" }, ngImport: i0, template: "<div [class]=\"wrapperClasses()\">\n <span class=\"search-input__icon\">\n @if (loading()) {\n <ngx-ds-spinner size=\"xs\" />\n } @else {\n <ngx-ds-icon [icon]=\"searchIcon\" [size]=\"iconSize()\" />\n }\n </span>\n\n <input\n class=\"search-input__native\"\n type=\"search\"\n [placeholder]=\"placeholder() ?? i18n.searchPlaceholder\"\n [attr.aria-label]=\"ariaLabel() ?? i18n.search\"\n [disabled]=\"disabled() || null\"\n [value]=\"value()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (focus)=\"focused.set(true)\"\n (blur)=\"focused.set(false)\"\n />\n\n @if (showClear()) {\n <button\n class=\"search-input__clear\"\n type=\"button\"\n [attr.aria-label]=\"i18n.clear\"\n (click)=\"clear()\"\n >\n <ngx-ds-icon [icon]=\"clearIcon\" [size]=\"iconSize()\" />\n </button>\n }\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.search-input{position:relative;display:flex;align-items:center;gap:.375rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;transition:border-color .15s ease,box-shadow .15s ease}.search-input--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.search-input--disabled{background:var(--surface-subtle, #f9fafb);opacity:.6;cursor:not-allowed}.search-input--sm{padding:.375rem .625rem;font-size:.8125rem}.search-input--md{padding:.5rem .75rem;font-size:.875rem}.search-input--lg{padding:.625rem 1rem;font-size:1rem}.search-input__icon{display:inline-flex;align-items:center;flex-shrink:0;color:var(--text-placeholder, #6b7280)}.search-input__native{flex:1;min-width:0;padding:0;background:transparent;border:none;outline:none;color:var(--text-base, #111827);font-family:inherit;font-size:inherit;line-height:1.5}.search-input__native::placeholder{color:var(--text-placeholder, #6b7280)}.search-input__native:disabled{cursor:not-allowed;color:var(--text-muted, #6b7280)}.search-input__native::-webkit-search-cancel-button,.search-input__native::-webkit-search-decoration{-webkit-appearance:none;appearance:none}.search-input__clear{display:inline-flex;align-items:center;flex-shrink:0;padding:0;background:transparent;border:none;cursor:pointer;color:var(--text-placeholder, #6b7280);transition:color .15s ease}.search-input__clear:hover{color:var(--text-muted, #6b7280)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }, { kind: "component", type: SpinnerComponent, selector: "ngx-ds-spinner", inputs: ["size", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2730
2911
|
}
|
|
2731
2912
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: SearchInputComponent, decorators: [{
|
|
2732
2913
|
type: Component,
|
|
2733
|
-
args: [{ selector: 'ngx-ds-search-input', standalone: true, imports: [IconComponent, SpinnerComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"wrapperClasses()\">\n <span class=\"search-input__icon\">\n @if (loading()) {\n <ngx-ds-spinner size=\"xs\" />\n } @else {\n <ngx-ds-icon [icon]=\"searchIcon\" [size]=\"iconSize()\" />\n }\n </span>\n\n <input\n class=\"search-input__native\"\n type=\"search\"\n [placeholder]=\"placeholder() ?? i18n.searchPlaceholder\"\n [attr.aria-label]=\"ariaLabel() ?? i18n.search\"\n [disabled]=\"disabled() || null\"\n [value]=\"value()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (focus)=\"focused.set(true)\"\n (blur)=\"focused.set(false)\"\n />\n\n @if (showClear()) {\n <button\n class=\"search-input__clear\"\n type=\"button\"\n [attr.aria-label]=\"i18n.clear\"\n (click)=\"clear()\"\n >\n <ngx-ds-icon [icon]=\"clearIcon\" [size]=\"iconSize()\" />\n </button>\n }\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.search-input{position:relative;display:flex;align-items:center;gap:.375rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;transition:border-color .15s ease,box-shadow .15s ease}.search-input--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.search-input--disabled{background:var(--surface-subtle, #f9fafb);opacity:.6;cursor:not-allowed}.search-input--sm{padding:.375rem .625rem;font-size:.8125rem}.search-input--md{padding:.5rem .75rem;font-size:.875rem}.search-input--lg{padding:.625rem 1rem;font-size:1rem}.search-input__icon{display:inline-flex;align-items:center;flex-shrink:0;color:var(--text-placeholder, #
|
|
2914
|
+
args: [{ selector: 'ngx-ds-search-input', standalone: true, imports: [IconComponent, SpinnerComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"wrapperClasses()\">\n <span class=\"search-input__icon\">\n @if (loading()) {\n <ngx-ds-spinner size=\"xs\" />\n } @else {\n <ngx-ds-icon [icon]=\"searchIcon\" [size]=\"iconSize()\" />\n }\n </span>\n\n <input\n class=\"search-input__native\"\n type=\"search\"\n [placeholder]=\"placeholder() ?? i18n.searchPlaceholder\"\n [attr.aria-label]=\"ariaLabel() ?? i18n.search\"\n [disabled]=\"disabled() || null\"\n [value]=\"value()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (focus)=\"focused.set(true)\"\n (blur)=\"focused.set(false)\"\n />\n\n @if (showClear()) {\n <button\n class=\"search-input__clear\"\n type=\"button\"\n [attr.aria-label]=\"i18n.clear\"\n (click)=\"clear()\"\n >\n <ngx-ds-icon [icon]=\"clearIcon\" [size]=\"iconSize()\" />\n </button>\n }\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.search-input{position:relative;display:flex;align-items:center;gap:.375rem;width:100%;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;transition:border-color .15s ease,box-shadow .15s ease}.search-input--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.search-input--disabled{background:var(--surface-subtle, #f9fafb);opacity:.6;cursor:not-allowed}.search-input--sm{padding:.375rem .625rem;font-size:.8125rem}.search-input--md{padding:.5rem .75rem;font-size:.875rem}.search-input--lg{padding:.625rem 1rem;font-size:1rem}.search-input__icon{display:inline-flex;align-items:center;flex-shrink:0;color:var(--text-placeholder, #6b7280)}.search-input__native{flex:1;min-width:0;padding:0;background:transparent;border:none;outline:none;color:var(--text-base, #111827);font-family:inherit;font-size:inherit;line-height:1.5}.search-input__native::placeholder{color:var(--text-placeholder, #6b7280)}.search-input__native:disabled{cursor:not-allowed;color:var(--text-muted, #6b7280)}.search-input__native::-webkit-search-cancel-button,.search-input__native::-webkit-search-decoration{-webkit-appearance:none;appearance:none}.search-input__clear{display:inline-flex;align-items:center;flex-shrink:0;padding:0;background:transparent;border:none;cursor:pointer;color:var(--text-placeholder, #6b7280);transition:color .15s ease}.search-input__clear:hover{color:var(--text-muted, #6b7280)}\n"] }]
|
|
2734
2915
|
}], 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 }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], searchSubmit: [{ type: i0.Output, args: ["searchSubmit"] }], cleared: [{ type: i0.Output, args: ["cleared"] }] } });
|
|
2735
2916
|
|
|
2736
2917
|
const BOX_DIM = { sm: '2rem', md: '2.75rem', lg: '3.25rem' };
|
|
@@ -2869,7 +3050,7 @@ class OtpInputComponent {
|
|
|
2869
3050
|
useExisting: forwardRef(() => OtpInputComponent),
|
|
2870
3051
|
multi: true,
|
|
2871
3052
|
},
|
|
2872
|
-
], viewQueries: [{ propertyName: "boxes", predicate: ["otpBox"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"wrapperClasses()\" role=\"group\" [attr.aria-label]=\"i18n.otpGroup\">\n @for (i of indices(); track i) {\n <input\n #otpBox\n [class]=\"boxClasses()\"\n [type]=\"inputType()\"\n [inputMode]=\"inputMode()\"\n maxlength=\"1\"\n [value]=\"digits()[i] || ''\"\n [attr.autocomplete]=\"i === 0 ? 'one-time-code' : 'off'\"\n [disabled]=\"isDisabled() || null\"\n [attr.aria-invalid]=\"hasError() || null\"\n [style.width]=\"boxDim()\"\n [style.height]=\"boxDim()\"\n [style.fontSize]=\"boxFs()\"\n (input)=\"onInput($event, i)\"\n (keydown)=\"onKeydown($event, i)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur()\"\n />\n }\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.otp{display:flex;align-items:center;gap:.5rem}.otp--disabled{opacity:.55;pointer-events:none}.otp__box{display:flex;align-items:center;justify-content:center;padding:0;text-align:center;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.5rem;color:var(--text-base, #111827);font-family:inherit;font-weight:600;caret-color:var(--primary-500, #6366f1);transition:border-color .15s ease,box-shadow .15s ease;outline:none}.otp__box:focus{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.otp__box--error{border-color:var(--danger-500, #ef4444);background:#ef44440a}.otp__box--error:focus{box-shadow:0 0 0 3px #ef44441f}.otp__box--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed}.otp__box::-webkit-outer-spin-button,.otp__box::-webkit-inner-spin-button{-webkit-appearance:none}.otp__box{-moz-appearance:textfield}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3053
|
+
], viewQueries: [{ propertyName: "boxes", predicate: ["otpBox"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"wrapperClasses()\" role=\"group\" [attr.aria-label]=\"i18n.otpGroup\">\n @for (i of indices(); track i) {\n <input\n #otpBox\n [class]=\"boxClasses()\"\n [type]=\"inputType()\"\n [inputMode]=\"inputMode()\"\n maxlength=\"1\"\n [value]=\"digits()[i] || ''\"\n [attr.autocomplete]=\"i === 0 ? 'one-time-code' : 'off'\"\n [disabled]=\"isDisabled() || null\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-label]=\"i18n.otpDigit(i + 1, indices().length)\"\n [style.width]=\"boxDim()\"\n [style.height]=\"boxDim()\"\n [style.fontSize]=\"boxFs()\"\n (input)=\"onInput($event, i)\"\n (keydown)=\"onKeydown($event, i)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur()\"\n />\n }\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.otp{display:flex;align-items:center;gap:.5rem}.otp--disabled{opacity:.55;pointer-events:none}.otp__box{display:flex;align-items:center;justify-content:center;padding:0;text-align:center;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.5rem;color:var(--text-base, #111827);font-family:inherit;font-weight:600;caret-color:var(--primary-500, #6366f1);transition:border-color .15s ease,box-shadow .15s ease;outline:none}.otp__box:focus{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.otp__box--error{border-color:var(--danger-500, #ef4444);background:#ef44440a}.otp__box--error:focus{box-shadow:0 0 0 3px #ef44441f}.otp__box--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed}.otp__box::-webkit-outer-spin-button,.otp__box::-webkit-inner-spin-button{-webkit-appearance:none}.otp__box{-moz-appearance:textfield}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2873
3054
|
}
|
|
2874
3055
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: OtpInputComponent, decorators: [{
|
|
2875
3056
|
type: Component,
|
|
@@ -2879,7 +3060,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
2879
3060
|
useExisting: forwardRef(() => OtpInputComponent),
|
|
2880
3061
|
multi: true,
|
|
2881
3062
|
},
|
|
2882
|
-
], template: "<div [class]=\"wrapperClasses()\" role=\"group\" [attr.aria-label]=\"i18n.otpGroup\">\n @for (i of indices(); track i) {\n <input\n #otpBox\n [class]=\"boxClasses()\"\n [type]=\"inputType()\"\n [inputMode]=\"inputMode()\"\n maxlength=\"1\"\n [value]=\"digits()[i] || ''\"\n [attr.autocomplete]=\"i === 0 ? 'one-time-code' : 'off'\"\n [disabled]=\"isDisabled() || null\"\n [attr.aria-invalid]=\"hasError() || null\"\n [style.width]=\"boxDim()\"\n [style.height]=\"boxDim()\"\n [style.fontSize]=\"boxFs()\"\n (input)=\"onInput($event, i)\"\n (keydown)=\"onKeydown($event, i)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur()\"\n />\n }\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.otp{display:flex;align-items:center;gap:.5rem}.otp--disabled{opacity:.55;pointer-events:none}.otp__box{display:flex;align-items:center;justify-content:center;padding:0;text-align:center;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.5rem;color:var(--text-base, #111827);font-family:inherit;font-weight:600;caret-color:var(--primary-500, #6366f1);transition:border-color .15s ease,box-shadow .15s ease;outline:none}.otp__box:focus{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.otp__box--error{border-color:var(--danger-500, #ef4444);background:#ef44440a}.otp__box--error:focus{box-shadow:0 0 0 3px #ef44441f}.otp__box--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed}.otp__box::-webkit-outer-spin-button,.otp__box::-webkit-inner-spin-button{-webkit-appearance:none}.otp__box{-moz-appearance:textfield}\n"] }]
|
|
3063
|
+
], template: "<div [class]=\"wrapperClasses()\" role=\"group\" [attr.aria-label]=\"i18n.otpGroup\">\n @for (i of indices(); track i) {\n <input\n #otpBox\n [class]=\"boxClasses()\"\n [type]=\"inputType()\"\n [inputMode]=\"inputMode()\"\n maxlength=\"1\"\n [value]=\"digits()[i] || ''\"\n [attr.autocomplete]=\"i === 0 ? 'one-time-code' : 'off'\"\n [disabled]=\"isDisabled() || null\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-label]=\"i18n.otpDigit(i + 1, indices().length)\"\n [style.width]=\"boxDim()\"\n [style.height]=\"boxDim()\"\n [style.fontSize]=\"boxFs()\"\n (input)=\"onInput($event, i)\"\n (keydown)=\"onKeydown($event, i)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur()\"\n />\n }\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.otp{display:flex;align-items:center;gap:.5rem}.otp--disabled{opacity:.55;pointer-events:none}.otp__box{display:flex;align-items:center;justify-content:center;padding:0;text-align:center;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.5rem;color:var(--text-base, #111827);font-family:inherit;font-weight:600;caret-color:var(--primary-500, #6366f1);transition:border-color .15s ease,box-shadow .15s ease;outline:none}.otp__box:focus{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.otp__box--error{border-color:var(--danger-500, #ef4444);background:#ef44440a}.otp__box--error:focus{box-shadow:0 0 0 3px #ef44441f}.otp__box--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed}.otp__box::-webkit-outer-spin-button,.otp__box::-webkit-inner-spin-button{-webkit-appearance:none}.otp__box{-moz-appearance:textfield}\n"] }]
|
|
2883
3064
|
}], ctorParameters: () => [], propDecorators: { length: [{ type: i0.Input, args: [{ isSignal: true, alias: "length", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], masked: [{ type: i0.Input, args: [{ isSignal: true, alias: "masked", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], complete: [{ type: i0.Output, args: ["complete"] }], boxes: [{ type: i0.ViewChildren, args: ['otpBox', { isSignal: true }] }] } });
|
|
2884
3065
|
|
|
2885
3066
|
// Theme tokens (with fallbacks) so consumers can restyle the slider via CSS.
|
|
@@ -2890,9 +3071,10 @@ const TRACK_COLORS = {
|
|
|
2890
3071
|
warning: 'var(--warning-500, #f59e0b)',
|
|
2891
3072
|
danger: 'var(--danger-500, #ef4444)',
|
|
2892
3073
|
};
|
|
2893
|
-
let nextId$
|
|
3074
|
+
let nextId$b = 0;
|
|
2894
3075
|
class RangeSliderComponent {
|
|
2895
|
-
id = `ngx-range-slider-${nextId$
|
|
3076
|
+
id = `ngx-range-slider-${nextId$b++}`;
|
|
3077
|
+
i18n = inject(NGX_DS_LABELS);
|
|
2896
3078
|
value = model(0, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2897
3079
|
// `undefined` is accepted so Signal Forms can bind the field's min/max.
|
|
2898
3080
|
min = input(0, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: (v) => v ?? 0 });
|
|
@@ -2906,6 +3088,8 @@ class RangeSliderComponent {
|
|
|
2906
3088
|
range = input(false, ...(ngDevMode ? [{ debugName: "range" }] : /* istanbul ignore next */ []));
|
|
2907
3089
|
values = model([0, 100], ...(ngDevMode ? [{ debugName: "values" }] : /* istanbul ignore next */ []));
|
|
2908
3090
|
minGap = input(0, ...(ngDevMode ? [{ debugName: "minGap" }] : /* istanbul ignore next */ []));
|
|
3091
|
+
/** Accessible name for the single slider when there is no visible `label`. */
|
|
3092
|
+
ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
2909
3093
|
ariaLabelStart = input('', ...(ngDevMode ? [{ debugName: "ariaLabelStart" }] : /* istanbul ignore next */ []));
|
|
2910
3094
|
ariaLabelEnd = input('', ...(ngDevMode ? [{ debugName: "ariaLabelEnd" }] : /* istanbul ignore next */ []));
|
|
2911
3095
|
rangeChange = output();
|
|
@@ -2994,13 +3178,13 @@ class RangeSliderComponent {
|
|
|
2994
3178
|
this.#formDisabled.set(disabled);
|
|
2995
3179
|
}
|
|
2996
3180
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: RangeSliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2997
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: RangeSliderComponent, isStandalone: true, selector: "ngx-ds-range-slider", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, showValue: { classPropertyName: "showValue", publicName: "showValue", isSignal: true, isRequired: false, transformFunction: null }, showMinMax: { classPropertyName: "showMinMax", publicName: "showMinMax", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, range: { classPropertyName: "range", publicName: "range", isSignal: true, isRequired: false, transformFunction: null }, values: { classPropertyName: "values", publicName: "values", isSignal: true, isRequired: false, transformFunction: null }, minGap: { classPropertyName: "minGap", publicName: "minGap", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelStart: { classPropertyName: "ariaLabelStart", publicName: "ariaLabelStart", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelEnd: { classPropertyName: "ariaLabelEnd", publicName: "ariaLabelEnd", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", values: "valuesChange", rangeChange: "rangeChange" }, providers: [
|
|
3181
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: RangeSliderComponent, isStandalone: true, selector: "ngx-ds-range-slider", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, showValue: { classPropertyName: "showValue", publicName: "showValue", isSignal: true, isRequired: false, transformFunction: null }, showMinMax: { classPropertyName: "showMinMax", publicName: "showMinMax", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, range: { classPropertyName: "range", publicName: "range", isSignal: true, isRequired: false, transformFunction: null }, values: { classPropertyName: "values", publicName: "values", isSignal: true, isRequired: false, transformFunction: null }, minGap: { classPropertyName: "minGap", publicName: "minGap", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelStart: { classPropertyName: "ariaLabelStart", publicName: "ariaLabelStart", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelEnd: { classPropertyName: "ariaLabelEnd", publicName: "ariaLabelEnd", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", values: "valuesChange", rangeChange: "rangeChange" }, providers: [
|
|
2998
3182
|
{
|
|
2999
3183
|
provide: NG_VALUE_ACCESSOR,
|
|
3000
3184
|
useExisting: forwardRef(() => RangeSliderComponent),
|
|
3001
3185
|
multi: true,
|
|
3002
3186
|
},
|
|
3003
|
-
], ngImport: i0, template: "@if (label()) {\n <span class=\"slider__label\" [id]=\"id + '-label'\">{{ label() }}</span>\n}\n\n@if (!range()) {\n <div class=\"slider__row\">\n @if (showMinMax()) {\n <span class=\"slider__bound\">{{ min() }}</span>\n }\n\n <div class=\"slider__rail\" [style]=\"trackStyle()\">\n <input\n class=\"slider__native\"\n type=\"range\"\n [min]=\"min()\"\n [max]=\"max()\"\n [step]=\"step()\"\n [value]=\"value()\"\n [disabled]=\"isDisabled() || null\"\n [attr.aria-labelledby]=\"label() ? id + '-label' : null\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n />\n </div>\n\n @if (showMinMax()) {\n <span class=\"slider__bound\">{{ max() }}</span>\n }\n\n @if (showValue()) {\n <span class=\"slider__value\">{{ value() }}</span>\n }\n </div>\n} @else {\n <div class=\"slider__row\" role=\"group\" [attr.aria-labelledby]=\"label() ? id + '-label' : null\">\n @if (showMinMax()) {\n <span class=\"slider__bound\">{{ min() }}</span>\n }\n\n <div class=\"slider__rail slider__rail--range\" [style]=\"rangeTrackStyle()\">\n <input\n class=\"slider__native slider__native--range slider__native--start\"\n type=\"range\"\n [min]=\"min()\"\n [max]=\"max()\"\n [step]=\"step()\"\n [value]=\"values()[0]\"\n [disabled]=\"isDisabled() || null\"\n [attr.aria-label]=\"ariaLabelStart() ||
|
|
3187
|
+
], ngImport: i0, template: "@if (label()) {\n <span class=\"slider__label\" [id]=\"id + '-label'\">{{ label() }}</span>\n}\n\n@if (!range()) {\n <div class=\"slider__row\">\n @if (showMinMax()) {\n <span class=\"slider__bound\">{{ min() }}</span>\n }\n\n <div class=\"slider__rail\" [style]=\"trackStyle()\">\n <input\n class=\"slider__native\"\n type=\"range\"\n [min]=\"min()\"\n [max]=\"max()\"\n [step]=\"step()\"\n [value]=\"value()\"\n [disabled]=\"isDisabled() || null\"\n [attr.aria-labelledby]=\"label() ? id + '-label' : null\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n />\n </div>\n\n @if (showMinMax()) {\n <span class=\"slider__bound\">{{ max() }}</span>\n }\n\n @if (showValue()) {\n <span class=\"slider__value\">{{ value() }}</span>\n }\n </div>\n} @else {\n <div class=\"slider__row\" role=\"group\" [attr.aria-labelledby]=\"label() ? id + '-label' : null\">\n @if (showMinMax()) {\n <span class=\"slider__bound\">{{ min() }}</span>\n }\n\n <div class=\"slider__rail slider__rail--range\" [style]=\"rangeTrackStyle()\">\n <input\n class=\"slider__native slider__native--range slider__native--start\"\n type=\"range\"\n [min]=\"min()\"\n [max]=\"max()\"\n [step]=\"step()\"\n [value]=\"values()[0]\"\n [disabled]=\"isDisabled() || null\"\n [attr.aria-label]=\"ariaLabelStart() || i18n.rangeStart\"\n (input)=\"onStartInput($event)\"\n (blur)=\"onBlur()\"\n />\n <input\n class=\"slider__native slider__native--range slider__native--end\"\n type=\"range\"\n [min]=\"min()\"\n [max]=\"max()\"\n [step]=\"step()\"\n [value]=\"values()[1]\"\n [disabled]=\"isDisabled() || null\"\n [attr.aria-label]=\"ariaLabelEnd() || i18n.rangeEnd\"\n (input)=\"onEndInput($event)\"\n (blur)=\"onBlur()\"\n />\n </div>\n\n @if (showMinMax()) {\n <span class=\"slider__bound\">{{ max() }}</span>\n }\n\n @if (showValue()) {\n <span class=\"slider__value\">{{ values()[0] }} \u2013 {{ values()[1] }}</span>\n }\n </div>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.slider__label{display:block;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151);margin-bottom:.5rem}.slider__row{display:flex;align-items:center;gap:.75rem}.slider__rail{flex:1;position:relative;--slider-fill: 0%;--slider-color: var(--primary-500, #6366f1)}.slider__native{width:100%;height:.375rem;appearance:none;-webkit-appearance:none;background:transparent;outline:none;cursor:pointer;margin:0;padding:0}.slider__native:disabled{cursor:not-allowed;opacity:.5}.slider__native::-webkit-slider-runnable-track{height:.375rem;border-radius:9999px;background:linear-gradient(to right,var(--slider-color) 0%,var(--slider-color) var(--slider-fill),var(--surface-active, #e5e7eb) var(--slider-fill),var(--surface-active, #e5e7eb) 100%)}.slider__native::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:1.125rem;height:1.125rem;border-radius:50%;background:var(--slider-color);border:2px solid var(--surface-base, #fff);box-shadow:0 0 0 1.5px var(--slider-color);margin-top:-.375rem;cursor:pointer;transition:box-shadow .15s ease}.slider__native:not(:disabled):hover::-webkit-slider-thumb,.slider__native:not(:disabled):focus::-webkit-slider-thumb{box-shadow:0 0 0 1.5px var(--slider-color),0 0 0 4px color-mix(in srgb,var(--slider-color) 20%,transparent)}.slider__native::-moz-range-track{height:.375rem;border-radius:9999px;background:var(--surface-active, #e5e7eb)}.slider__native::-moz-range-progress{height:.375rem;border-radius:9999px;background:var(--slider-color)}.slider__native::-moz-range-thumb{width:1.125rem;height:1.125rem;border-radius:50%;background:var(--slider-color);border:2px solid var(--surface-base, #fff);box-shadow:0 0 0 1.5px var(--slider-color);cursor:pointer;transition:box-shadow .15s ease}.slider__native:not(:disabled):hover::-moz-range-thumb,.slider__native:not(:disabled):focus::-moz-range-thumb{box-shadow:0 0 0 1.5px var(--slider-color),0 0 0 4px color-mix(in srgb,var(--slider-color) 20%,transparent)}.slider__rail--range{--slider-fill-from: 0%;--slider-fill-to: 100%;height:1.5rem;display:flex;align-items:center}.slider__native--range{position:absolute;left:0;width:100%;height:1.5rem;background:transparent;pointer-events:none}.slider__native--range::-webkit-slider-runnable-track{background:linear-gradient(to right,var(--surface-active, #e5e7eb) 0%,var(--surface-active, #e5e7eb) var(--slider-fill-from),var(--slider-color) var(--slider-fill-from),var(--slider-color) var(--slider-fill-to),var(--surface-active, #e5e7eb) var(--slider-fill-to),var(--surface-active, #e5e7eb) 100%)}.slider__native--range::-moz-range-track{background:linear-gradient(to right,var(--surface-active, #e5e7eb) 0%,var(--surface-active, #e5e7eb) var(--slider-fill-from),var(--slider-color) var(--slider-fill-from),var(--slider-color) var(--slider-fill-to),var(--surface-active, #e5e7eb) var(--slider-fill-to),var(--surface-active, #e5e7eb) 100%)}.slider__native--range::-moz-range-progress{background:transparent}.slider__native--range::-webkit-slider-thumb{pointer-events:auto}.slider__native--range::-moz-range-thumb{pointer-events:auto}.slider__native--range:focus{z-index:3}.slider__bound{font-size:.75rem;color:var(--text-muted, #6b7280);flex-shrink:0}.slider__value{font-size:.875rem;font-weight:600;color:var(--text-secondary, #374151);min-width:2.5rem;text-align:right;flex-shrink:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3004
3188
|
}
|
|
3005
3189
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: RangeSliderComponent, decorators: [{
|
|
3006
3190
|
type: Component,
|
|
@@ -3010,8 +3194,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
3010
3194
|
useExisting: forwardRef(() => RangeSliderComponent),
|
|
3011
3195
|
multi: true,
|
|
3012
3196
|
},
|
|
3013
|
-
], template: "@if (label()) {\n <span class=\"slider__label\" [id]=\"id + '-label'\">{{ label() }}</span>\n}\n\n@if (!range()) {\n <div class=\"slider__row\">\n @if (showMinMax()) {\n <span class=\"slider__bound\">{{ min() }}</span>\n }\n\n <div class=\"slider__rail\" [style]=\"trackStyle()\">\n <input\n class=\"slider__native\"\n type=\"range\"\n [min]=\"min()\"\n [max]=\"max()\"\n [step]=\"step()\"\n [value]=\"value()\"\n [disabled]=\"isDisabled() || null\"\n [attr.aria-labelledby]=\"label() ? id + '-label' : null\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n />\n </div>\n\n @if (showMinMax()) {\n <span class=\"slider__bound\">{{ max() }}</span>\n }\n\n @if (showValue()) {\n <span class=\"slider__value\">{{ value() }}</span>\n }\n </div>\n} @else {\n <div class=\"slider__row\" role=\"group\" [attr.aria-labelledby]=\"label() ? id + '-label' : null\">\n @if (showMinMax()) {\n <span class=\"slider__bound\">{{ min() }}</span>\n }\n\n <div class=\"slider__rail slider__rail--range\" [style]=\"rangeTrackStyle()\">\n <input\n class=\"slider__native slider__native--range slider__native--start\"\n type=\"range\"\n [min]=\"min()\"\n [max]=\"max()\"\n [step]=\"step()\"\n [value]=\"values()[0]\"\n [disabled]=\"isDisabled() || null\"\n [attr.aria-label]=\"ariaLabelStart() ||
|
|
3014
|
-
}], 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 }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], showValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValue", required: false }] }], showMinMax: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMinMax", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], range: [{ type: i0.Input, args: [{ isSignal: true, alias: "range", required: false }] }], values: [{ type: i0.Input, args: [{ isSignal: true, alias: "values", required: false }] }, { type: i0.Output, args: ["valuesChange"] }], minGap: [{ type: i0.Input, args: [{ isSignal: true, alias: "minGap", required: false }] }], ariaLabelStart: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelStart", required: false }] }], ariaLabelEnd: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelEnd", required: false }] }], rangeChange: [{ type: i0.Output, args: ["rangeChange"] }] } });
|
|
3197
|
+
], template: "@if (label()) {\n <span class=\"slider__label\" [id]=\"id + '-label'\">{{ label() }}</span>\n}\n\n@if (!range()) {\n <div class=\"slider__row\">\n @if (showMinMax()) {\n <span class=\"slider__bound\">{{ min() }}</span>\n }\n\n <div class=\"slider__rail\" [style]=\"trackStyle()\">\n <input\n class=\"slider__native\"\n type=\"range\"\n [min]=\"min()\"\n [max]=\"max()\"\n [step]=\"step()\"\n [value]=\"value()\"\n [disabled]=\"isDisabled() || null\"\n [attr.aria-labelledby]=\"label() ? id + '-label' : null\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n />\n </div>\n\n @if (showMinMax()) {\n <span class=\"slider__bound\">{{ max() }}</span>\n }\n\n @if (showValue()) {\n <span class=\"slider__value\">{{ value() }}</span>\n }\n </div>\n} @else {\n <div class=\"slider__row\" role=\"group\" [attr.aria-labelledby]=\"label() ? id + '-label' : null\">\n @if (showMinMax()) {\n <span class=\"slider__bound\">{{ min() }}</span>\n }\n\n <div class=\"slider__rail slider__rail--range\" [style]=\"rangeTrackStyle()\">\n <input\n class=\"slider__native slider__native--range slider__native--start\"\n type=\"range\"\n [min]=\"min()\"\n [max]=\"max()\"\n [step]=\"step()\"\n [value]=\"values()[0]\"\n [disabled]=\"isDisabled() || null\"\n [attr.aria-label]=\"ariaLabelStart() || i18n.rangeStart\"\n (input)=\"onStartInput($event)\"\n (blur)=\"onBlur()\"\n />\n <input\n class=\"slider__native slider__native--range slider__native--end\"\n type=\"range\"\n [min]=\"min()\"\n [max]=\"max()\"\n [step]=\"step()\"\n [value]=\"values()[1]\"\n [disabled]=\"isDisabled() || null\"\n [attr.aria-label]=\"ariaLabelEnd() || i18n.rangeEnd\"\n (input)=\"onEndInput($event)\"\n (blur)=\"onBlur()\"\n />\n </div>\n\n @if (showMinMax()) {\n <span class=\"slider__bound\">{{ max() }}</span>\n }\n\n @if (showValue()) {\n <span class=\"slider__value\">{{ values()[0] }} \u2013 {{ values()[1] }}</span>\n }\n </div>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.slider__label{display:block;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151);margin-bottom:.5rem}.slider__row{display:flex;align-items:center;gap:.75rem}.slider__rail{flex:1;position:relative;--slider-fill: 0%;--slider-color: var(--primary-500, #6366f1)}.slider__native{width:100%;height:.375rem;appearance:none;-webkit-appearance:none;background:transparent;outline:none;cursor:pointer;margin:0;padding:0}.slider__native:disabled{cursor:not-allowed;opacity:.5}.slider__native::-webkit-slider-runnable-track{height:.375rem;border-radius:9999px;background:linear-gradient(to right,var(--slider-color) 0%,var(--slider-color) var(--slider-fill),var(--surface-active, #e5e7eb) var(--slider-fill),var(--surface-active, #e5e7eb) 100%)}.slider__native::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:1.125rem;height:1.125rem;border-radius:50%;background:var(--slider-color);border:2px solid var(--surface-base, #fff);box-shadow:0 0 0 1.5px var(--slider-color);margin-top:-.375rem;cursor:pointer;transition:box-shadow .15s ease}.slider__native:not(:disabled):hover::-webkit-slider-thumb,.slider__native:not(:disabled):focus::-webkit-slider-thumb{box-shadow:0 0 0 1.5px var(--slider-color),0 0 0 4px color-mix(in srgb,var(--slider-color) 20%,transparent)}.slider__native::-moz-range-track{height:.375rem;border-radius:9999px;background:var(--surface-active, #e5e7eb)}.slider__native::-moz-range-progress{height:.375rem;border-radius:9999px;background:var(--slider-color)}.slider__native::-moz-range-thumb{width:1.125rem;height:1.125rem;border-radius:50%;background:var(--slider-color);border:2px solid var(--surface-base, #fff);box-shadow:0 0 0 1.5px var(--slider-color);cursor:pointer;transition:box-shadow .15s ease}.slider__native:not(:disabled):hover::-moz-range-thumb,.slider__native:not(:disabled):focus::-moz-range-thumb{box-shadow:0 0 0 1.5px var(--slider-color),0 0 0 4px color-mix(in srgb,var(--slider-color) 20%,transparent)}.slider__rail--range{--slider-fill-from: 0%;--slider-fill-to: 100%;height:1.5rem;display:flex;align-items:center}.slider__native--range{position:absolute;left:0;width:100%;height:1.5rem;background:transparent;pointer-events:none}.slider__native--range::-webkit-slider-runnable-track{background:linear-gradient(to right,var(--surface-active, #e5e7eb) 0%,var(--surface-active, #e5e7eb) var(--slider-fill-from),var(--slider-color) var(--slider-fill-from),var(--slider-color) var(--slider-fill-to),var(--surface-active, #e5e7eb) var(--slider-fill-to),var(--surface-active, #e5e7eb) 100%)}.slider__native--range::-moz-range-track{background:linear-gradient(to right,var(--surface-active, #e5e7eb) 0%,var(--surface-active, #e5e7eb) var(--slider-fill-from),var(--slider-color) var(--slider-fill-from),var(--slider-color) var(--slider-fill-to),var(--surface-active, #e5e7eb) var(--slider-fill-to),var(--surface-active, #e5e7eb) 100%)}.slider__native--range::-moz-range-progress{background:transparent}.slider__native--range::-webkit-slider-thumb{pointer-events:auto}.slider__native--range::-moz-range-thumb{pointer-events:auto}.slider__native--range:focus{z-index:3}.slider__bound{font-size:.75rem;color:var(--text-muted, #6b7280);flex-shrink:0}.slider__value{font-size:.875rem;font-weight:600;color:var(--text-secondary, #374151);min-width:2.5rem;text-align:right;flex-shrink:0}\n"] }]
|
|
3198
|
+
}], 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 }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], showValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValue", required: false }] }], showMinMax: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMinMax", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], range: [{ type: i0.Input, args: [{ isSignal: true, alias: "range", required: false }] }], values: [{ type: i0.Input, args: [{ isSignal: true, alias: "values", required: false }] }, { type: i0.Output, args: ["valuesChange"] }], minGap: [{ type: i0.Input, args: [{ isSignal: true, alias: "minGap", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelStart: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelStart", required: false }] }], ariaLabelEnd: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelEnd", required: false }] }], rangeChange: [{ type: i0.Output, args: ["rangeChange"] }] } });
|
|
3015
3199
|
|
|
3016
3200
|
class CardComponent {
|
|
3017
3201
|
shadow = input('sm', ...(ngDevMode ? [{ debugName: "shadow" }] : /* istanbul ignore next */ []));
|
|
@@ -3038,7 +3222,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
3038
3222
|
args: [{ selector: 'ngx-ds-card', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"hostClasses()\">\n <!-- Header \u2014 hidden when empty -->\n <div class=\"card__header\">\n <ng-content select=\"[card-header]\" />\n </div>\n\n <!-- Body -->\n <div class=\"card__body\">\n <ng-content />\n </div>\n\n <!-- Footer \u2014 hidden when empty -->\n <div class=\"card__footer\">\n <ng-content select=\"[card-footer]\" />\n </div>\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.card{background:var(--surface-base, #fff);border-radius:.75rem;overflow:hidden}.card--bordered{border:1.5px solid var(--border-base, #e5e7eb)}.card--shadow-none{box-shadow:none}.card--shadow-sm{box-shadow:0 1px 3px #00000014,0 1px 2px #0000000d}.card--shadow-md{box-shadow:0 4px 6px #00000012,0 2px 4px #0000000d}.card--shadow-lg{box-shadow:0 10px 15px #00000014,0 4px 6px #0000000d}.card--hoverable{transition:box-shadow .2s ease,transform .2s ease;cursor:pointer}.card--hoverable:hover{box-shadow:0 8px 20px #0000001a,0 4px 8px #0000000f;transform:translateY(-2px)}.card__header{padding:0;border-bottom:1.5px solid var(--border-base, #e5e7eb)}.card__header:not(:has(*)){display:none}.card__body{color:var(--text-secondary, #374151);font-size:.875rem;line-height:1.6}.card__footer{border-top:1.5px solid var(--border-base, #e5e7eb)}.card__footer:not(:has(*)){display:none}.card--pad-none .card__header,.card--pad-none .card__body,.card--pad-none .card__footer{padding:0}.card--pad-sm .card__header,.card--pad-sm .card__footer{padding:.625rem .875rem}.card--pad-sm .card__body{padding:.875rem}.card--pad-md .card__header,.card--pad-md .card__footer{padding:.875rem 1.25rem}.card--pad-md .card__body{padding:1.25rem}.card--pad-lg .card__header,.card--pad-lg .card__footer{padding:1.25rem 1.5rem}.card--pad-lg .card__body{padding:1.5rem}\n"] }]
|
|
3039
3223
|
}], propDecorators: { shadow: [{ type: i0.Input, args: [{ isSignal: true, alias: "shadow", required: false }] }], padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], hoverable: [{ type: i0.Input, args: [{ isSignal: true, alias: "hoverable", required: false }] }] } });
|
|
3040
3224
|
|
|
3041
|
-
const ICON_SIZE$
|
|
3225
|
+
const ICON_SIZE$5 = { sm: 12, md: 14, lg: 16 };
|
|
3042
3226
|
class BreadcrumbComponent {
|
|
3043
3227
|
i18n = inject(NGX_DS_LABELS);
|
|
3044
3228
|
items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
@@ -3049,7 +3233,7 @@ class BreadcrumbComponent {
|
|
|
3049
3233
|
separatorIsIcon = computed(() => typeof this.separator() !== 'string', ...(ngDevMode ? [{ debugName: "separatorIsIcon" }] : /* istanbul ignore next */ []));
|
|
3050
3234
|
separatorIcon = computed(() => typeof this.separator() === 'string' ? null : this.separator(), ...(ngDevMode ? [{ debugName: "separatorIcon" }] : /* istanbul ignore next */ []));
|
|
3051
3235
|
separatorChar = computed(() => typeof this.separator() === 'string' ? this.separator() : '', ...(ngDevMode ? [{ debugName: "separatorChar" }] : /* istanbul ignore next */ []));
|
|
3052
|
-
iconSize = computed(() => ICON_SIZE$
|
|
3236
|
+
iconSize = computed(() => ICON_SIZE$5[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
3053
3237
|
visibleItems = computed(() => {
|
|
3054
3238
|
const all = this.items();
|
|
3055
3239
|
const max = this.maxItems();
|
|
@@ -3067,11 +3251,11 @@ class BreadcrumbComponent {
|
|
|
3067
3251
|
this.itemClick.emit(item);
|
|
3068
3252
|
}
|
|
3069
3253
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: BreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3070
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: BreadcrumbComponent, isStandalone: true, selector: "ngx-ds-breadcrumb", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, maxItems: { classPropertyName: "maxItems", publicName: "maxItems", isSignal: true, isRequired: false, transformFunction: null }, separator: { classPropertyName: "separator", publicName: "separator", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick" }, ngImport: i0, template: "<nav class=\"breadcrumb breadcrumb--{{ size() }}\" [attr.aria-label]=\"i18n.breadcrumb\">\n <ol class=\"breadcrumb__list\">\n @for (item of visibleItems(); track $index) {\n <li class=\"breadcrumb__item\">\n @if (isLast($index)) {\n <!-- Current page \u2014 not a link -->\n <span class=\"breadcrumb__crumb breadcrumb__crumb--current\" [attr.aria-current]=\"'page'\">\n @if (item.icon) {\n <ngx-ds-icon [icon]=\"item.icon\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n {{ item.label }}\n </span>\n } @else if (item.disabled) {\n <!-- Ellipsis collapse placeholder -->\n <span class=\"breadcrumb__crumb breadcrumb__crumb--ellipsis\">{{ item.label }}</span>\n } @else if (item.href) {\n <a\n class=\"breadcrumb__crumb breadcrumb__crumb--link\"\n [href]=\"item.href\"\n (click)=\"onClick(item)\"\n >\n @if (item.icon) {\n <ngx-ds-icon [icon]=\"item.icon\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n {{ item.label }}\n </a>\n } @else {\n <button\n class=\"breadcrumb__crumb breadcrumb__crumb--link\"\n type=\"button\"\n (click)=\"onClick(item)\"\n >\n @if (item.icon) {\n <ngx-ds-icon [icon]=\"item.icon\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n {{ item.label }}\n </button>\n }\n\n @if (!isLast($index)) {\n <span class=\"breadcrumb__separator\" aria-hidden=\"true\">\n @if (separatorIsIcon()) {\n <ngx-ds-icon [icon]=\"separatorIcon()!\" [size]=\"iconSize()\" />\n } @else {\n {{ separatorChar() }}\n }\n </span>\n }\n </li>\n }\n </ol>\n</nav>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.breadcrumb__list{list-style:none;margin:0;padding:0;display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}.breadcrumb__item{display:flex;align-items:center;gap:.125rem}.breadcrumb__crumb{display:inline-flex;align-items:center;gap:.375rem;border-radius:.25rem;white-space:nowrap;line-height:1.4;transition:color .15s ease,background .15s ease}.breadcrumb__crumb--link{color:var(--text-muted, #6b7280);background:transparent;border:none;cursor:pointer;padding:.125rem .25rem;text-decoration:none;font-family:inherit;font-size:inherit}.breadcrumb__crumb--link:hover{color:var(--text-base, #111827);background:var(--surface-muted, #f3f4f6)}.breadcrumb__crumb--current{color:var(--text-base, #111827);font-weight:500;padding:.125rem .25rem}.breadcrumb__crumb--ellipsis{color:var(--text-placeholder, #
|
|
3254
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: BreadcrumbComponent, isStandalone: true, selector: "ngx-ds-breadcrumb", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, maxItems: { classPropertyName: "maxItems", publicName: "maxItems", isSignal: true, isRequired: false, transformFunction: null }, separator: { classPropertyName: "separator", publicName: "separator", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick" }, ngImport: i0, template: "<nav class=\"breadcrumb breadcrumb--{{ size() }}\" [attr.aria-label]=\"i18n.breadcrumb\">\n <ol class=\"breadcrumb__list\">\n @for (item of visibleItems(); track $index) {\n <li class=\"breadcrumb__item\">\n @if (isLast($index)) {\n <!-- Current page \u2014 not a link -->\n <span class=\"breadcrumb__crumb breadcrumb__crumb--current\" [attr.aria-current]=\"'page'\">\n @if (item.icon) {\n <ngx-ds-icon [icon]=\"item.icon\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n {{ item.label }}\n </span>\n } @else if (item.disabled) {\n <!-- Ellipsis collapse placeholder -->\n <span class=\"breadcrumb__crumb breadcrumb__crumb--ellipsis\">{{ item.label }}</span>\n } @else if (item.href) {\n <a\n class=\"breadcrumb__crumb breadcrumb__crumb--link\"\n [href]=\"item.href\"\n (click)=\"onClick(item)\"\n >\n @if (item.icon) {\n <ngx-ds-icon [icon]=\"item.icon\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n {{ item.label }}\n </a>\n } @else {\n <button\n class=\"breadcrumb__crumb breadcrumb__crumb--link\"\n type=\"button\"\n (click)=\"onClick(item)\"\n >\n @if (item.icon) {\n <ngx-ds-icon [icon]=\"item.icon\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n {{ item.label }}\n </button>\n }\n\n @if (!isLast($index)) {\n <span class=\"breadcrumb__separator\" aria-hidden=\"true\">\n @if (separatorIsIcon()) {\n <ngx-ds-icon [icon]=\"separatorIcon()!\" [size]=\"iconSize()\" />\n } @else {\n {{ separatorChar() }}\n }\n </span>\n }\n </li>\n }\n </ol>\n</nav>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.breadcrumb__list{list-style:none;margin:0;padding:0;display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}.breadcrumb__item{display:flex;align-items:center;gap:.125rem}.breadcrumb__crumb{display:inline-flex;align-items:center;gap:.375rem;border-radius:.25rem;white-space:nowrap;line-height:1.4;transition:color .15s ease,background .15s ease}.breadcrumb__crumb--link{color:var(--text-muted, #6b7280);background:transparent;border:none;cursor:pointer;padding:.125rem .25rem;text-decoration:none;font-family:inherit;font-size:inherit}.breadcrumb__crumb--link:hover{color:var(--text-base, #111827);background:var(--surface-muted, #f3f4f6)}.breadcrumb__crumb--current{color:var(--text-base, #111827);font-weight:500;padding:.125rem .25rem}.breadcrumb__crumb--ellipsis{color:var(--text-placeholder, #6b7280);padding:.125rem .25rem}.breadcrumb__separator{display:inline-flex;align-items:center;color:var(--text-disabled, #d1d5db);padding:0 .125rem}.breadcrumb--sm{font-size:.75rem}.breadcrumb--md{font-size:.8125rem}.breadcrumb--lg{font-size:.9375rem}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3071
3255
|
}
|
|
3072
3256
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: BreadcrumbComponent, decorators: [{
|
|
3073
3257
|
type: Component,
|
|
3074
|
-
args: [{ selector: 'ngx-ds-breadcrumb', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav class=\"breadcrumb breadcrumb--{{ size() }}\" [attr.aria-label]=\"i18n.breadcrumb\">\n <ol class=\"breadcrumb__list\">\n @for (item of visibleItems(); track $index) {\n <li class=\"breadcrumb__item\">\n @if (isLast($index)) {\n <!-- Current page \u2014 not a link -->\n <span class=\"breadcrumb__crumb breadcrumb__crumb--current\" [attr.aria-current]=\"'page'\">\n @if (item.icon) {\n <ngx-ds-icon [icon]=\"item.icon\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n {{ item.label }}\n </span>\n } @else if (item.disabled) {\n <!-- Ellipsis collapse placeholder -->\n <span class=\"breadcrumb__crumb breadcrumb__crumb--ellipsis\">{{ item.label }}</span>\n } @else if (item.href) {\n <a\n class=\"breadcrumb__crumb breadcrumb__crumb--link\"\n [href]=\"item.href\"\n (click)=\"onClick(item)\"\n >\n @if (item.icon) {\n <ngx-ds-icon [icon]=\"item.icon\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n {{ item.label }}\n </a>\n } @else {\n <button\n class=\"breadcrumb__crumb breadcrumb__crumb--link\"\n type=\"button\"\n (click)=\"onClick(item)\"\n >\n @if (item.icon) {\n <ngx-ds-icon [icon]=\"item.icon\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n {{ item.label }}\n </button>\n }\n\n @if (!isLast($index)) {\n <span class=\"breadcrumb__separator\" aria-hidden=\"true\">\n @if (separatorIsIcon()) {\n <ngx-ds-icon [icon]=\"separatorIcon()!\" [size]=\"iconSize()\" />\n } @else {\n {{ separatorChar() }}\n }\n </span>\n }\n </li>\n }\n </ol>\n</nav>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.breadcrumb__list{list-style:none;margin:0;padding:0;display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}.breadcrumb__item{display:flex;align-items:center;gap:.125rem}.breadcrumb__crumb{display:inline-flex;align-items:center;gap:.375rem;border-radius:.25rem;white-space:nowrap;line-height:1.4;transition:color .15s ease,background .15s ease}.breadcrumb__crumb--link{color:var(--text-muted, #6b7280);background:transparent;border:none;cursor:pointer;padding:.125rem .25rem;text-decoration:none;font-family:inherit;font-size:inherit}.breadcrumb__crumb--link:hover{color:var(--text-base, #111827);background:var(--surface-muted, #f3f4f6)}.breadcrumb__crumb--current{color:var(--text-base, #111827);font-weight:500;padding:.125rem .25rem}.breadcrumb__crumb--ellipsis{color:var(--text-placeholder, #
|
|
3258
|
+
args: [{ selector: 'ngx-ds-breadcrumb', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav class=\"breadcrumb breadcrumb--{{ size() }}\" [attr.aria-label]=\"i18n.breadcrumb\">\n <ol class=\"breadcrumb__list\">\n @for (item of visibleItems(); track $index) {\n <li class=\"breadcrumb__item\">\n @if (isLast($index)) {\n <!-- Current page \u2014 not a link -->\n <span class=\"breadcrumb__crumb breadcrumb__crumb--current\" [attr.aria-current]=\"'page'\">\n @if (item.icon) {\n <ngx-ds-icon [icon]=\"item.icon\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n {{ item.label }}\n </span>\n } @else if (item.disabled) {\n <!-- Ellipsis collapse placeholder -->\n <span class=\"breadcrumb__crumb breadcrumb__crumb--ellipsis\">{{ item.label }}</span>\n } @else if (item.href) {\n <a\n class=\"breadcrumb__crumb breadcrumb__crumb--link\"\n [href]=\"item.href\"\n (click)=\"onClick(item)\"\n >\n @if (item.icon) {\n <ngx-ds-icon [icon]=\"item.icon\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n {{ item.label }}\n </a>\n } @else {\n <button\n class=\"breadcrumb__crumb breadcrumb__crumb--link\"\n type=\"button\"\n (click)=\"onClick(item)\"\n >\n @if (item.icon) {\n <ngx-ds-icon [icon]=\"item.icon\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n }\n {{ item.label }}\n </button>\n }\n\n @if (!isLast($index)) {\n <span class=\"breadcrumb__separator\" aria-hidden=\"true\">\n @if (separatorIsIcon()) {\n <ngx-ds-icon [icon]=\"separatorIcon()!\" [size]=\"iconSize()\" />\n } @else {\n {{ separatorChar() }}\n }\n </span>\n }\n </li>\n }\n </ol>\n</nav>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.breadcrumb__list{list-style:none;margin:0;padding:0;display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}.breadcrumb__item{display:flex;align-items:center;gap:.125rem}.breadcrumb__crumb{display:inline-flex;align-items:center;gap:.375rem;border-radius:.25rem;white-space:nowrap;line-height:1.4;transition:color .15s ease,background .15s ease}.breadcrumb__crumb--link{color:var(--text-muted, #6b7280);background:transparent;border:none;cursor:pointer;padding:.125rem .25rem;text-decoration:none;font-family:inherit;font-size:inherit}.breadcrumb__crumb--link:hover{color:var(--text-base, #111827);background:var(--surface-muted, #f3f4f6)}.breadcrumb__crumb--current{color:var(--text-base, #111827);font-weight:500;padding:.125rem .25rem}.breadcrumb__crumb--ellipsis{color:var(--text-placeholder, #6b7280);padding:.125rem .25rem}.breadcrumb__separator{display:inline-flex;align-items:center;color:var(--text-disabled, #d1d5db);padding:0 .125rem}.breadcrumb--sm{font-size:.75rem}.breadcrumb--md{font-size:.8125rem}.breadcrumb--lg{font-size:.9375rem}\n"] }]
|
|
3075
3259
|
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], maxItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxItems", required: false }] }], separator: [{ type: i0.Input, args: [{ isSignal: true, alias: "separator", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }] } });
|
|
3076
3260
|
|
|
3077
3261
|
class SegmentedControlComponent {
|
|
@@ -3152,7 +3336,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
3152
3336
|
}], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
3153
3337
|
|
|
3154
3338
|
const ICON_SIZES = { sm: 14, md: 16, lg: 18 };
|
|
3155
|
-
let nextId$
|
|
3339
|
+
let nextId$a = 0;
|
|
3156
3340
|
class NumberInputComponent {
|
|
3157
3341
|
i18n = inject(NGX_DS_LABELS);
|
|
3158
3342
|
value = model(0, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
@@ -3162,6 +3346,8 @@ class NumberInputComponent {
|
|
|
3162
3346
|
step = input(1, ...(ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []));
|
|
3163
3347
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3164
3348
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
3349
|
+
/** Accessible name when there is no visible `label`. */
|
|
3350
|
+
ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
3165
3351
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
3166
3352
|
errorMessage = input('', ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
3167
3353
|
/** Set by Signal Forms `[formField]`. Its errors show once the field is touched. */
|
|
@@ -3172,7 +3358,7 @@ class NumberInputComponent {
|
|
|
3172
3358
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
3173
3359
|
#formDisabled = signal(false, ...(ngDevMode ? [{ debugName: "#formDisabled" }] : /* istanbul ignore next */ []));
|
|
3174
3360
|
isDisabled = computed(() => this.disabled() || this.#formDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
3175
|
-
id = `ngx-number-${nextId$
|
|
3361
|
+
id = `ngx-number-${nextId$a++}`;
|
|
3176
3362
|
messageId = `${this.id}-message`;
|
|
3177
3363
|
PlusIcon = Plus;
|
|
3178
3364
|
MinusIcon = Minus;
|
|
@@ -3233,13 +3419,13 @@ class NumberInputComponent {
|
|
|
3233
3419
|
this.#formDisabled.set(isDisabled);
|
|
3234
3420
|
}
|
|
3235
3421
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: NumberInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3236
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: NumberInputComponent, isStandalone: true, selector: "ngx-ds-number-input", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", 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 }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [
|
|
3422
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: NumberInputComponent, isStandalone: true, selector: "ngx-ds-number-input", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", 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 }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [
|
|
3237
3423
|
{
|
|
3238
3424
|
provide: NG_VALUE_ACCESSOR,
|
|
3239
3425
|
useExisting: forwardRef(() => NumberInputComponent),
|
|
3240
3426
|
multi: true,
|
|
3241
3427
|
},
|
|
3242
|
-
], ngImport: i0, template: "@if (label()) {\n <label class=\"number-input__label\" [for]=\"id\">{{ label() }}</label>\n}\n\n<div [class]=\"hostClasses()\">\n <button\n type=\"button\"\n class=\"number-input__btn\"\n [disabled]=\"!canDecrement() || null\"\n (click)=\"decrement()\"\n [attr.aria-label]=\"i18n.decrement\"\n >\n <ngx-ds-icon [icon]=\"MinusIcon\" [size]=\"iconSize()\" />\n </button>\n\n <input\n class=\"number-input__field\"\n type=\"number\"\n [id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n [value]=\"value()\"\n [min]=\"min() ?? null\"\n [max]=\"max() ?? null\"\n [step]=\"step()\"\n [disabled]=\"isDisabled() || null\"\n (change)=\"onInputChange($event)\"\n />\n\n <button\n type=\"button\"\n class=\"number-input__btn\"\n [disabled]=\"!canIncrement() || null\"\n (click)=\"increment()\"\n [attr.aria-label]=\"i18n.increment\"\n >\n <ngx-ds-icon [icon]=\"PlusIcon\" [size]=\"iconSize()\" />\n </button>\n</div>\n\n@if (errorText()) {\n <p [id]=\"messageId\" role=\"alert\" class=\"number-input__error\">{{ errorText() }}</p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"number-input__hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.number-input__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-base, #111827)}.number-input{display:inline-flex;align-items:center;border:1px solid var(--border-input, #d1d5db);border-radius:.5rem;background:var(--surface-base, #ffffff);overflow:hidden;transition:border-color .15s ease,box-shadow .15s ease}.number-input:focus-within{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px var(--primary-100, #e0e7ff)}.number-input--error,.number-input--error:focus-within{border-color:var(--danger-500, #ef4444)}.number-input--error:focus-within{box-shadow:0 0 0 3px #ef44441f}.number-input__btn{display:inline-flex;align-items:center;justify-content:center;background:var(--surface-subtle, #f9fafb);border:none;cursor:pointer;color:var(--text-muted, #6b7280);flex-shrink:0;transition:background .15s ease,color .15s ease}.number-input__btn:hover:not(:disabled){background:var(--surface-hover, #f3f4f6);color:var(--text-base, #111827)}.number-input__btn:disabled{opacity:.4;cursor:not-allowed}.number-input__field{flex:1;min-width:0;border:none;background:transparent;font-family:inherit;font-weight:500;text-align:center;color:var(--text-base, #111827);outline:none;-moz-appearance:textfield}.number-input__field::-webkit-inner-spin-button,.number-input__field::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.number-input__field:disabled{opacity:.5;cursor:not-allowed}.number-input--sm .number-input__btn{width:2rem;height:2rem}.number-input--sm .number-input__field{font-size:.8125rem;height:2rem;width:3.5rem}.number-input--md .number-input__btn{width:2.5rem;height:2.5rem}.number-input--md .number-input__field{font-size:.9375rem;height:2.5rem;width:4rem}.number-input--lg .number-input__btn{width:3rem;height:3rem}.number-input--lg .number-input__field{font-size:1.0625rem;height:3rem;width:5rem}.number-input__hint{margin:.375rem 0 0;font-size:.8125rem;color:var(--text-muted, #6b7280)}.number-input__error{margin:.375rem 0 0;font-size:.8125rem;color:var(--danger-600, #dc2626)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3428
|
+
], ngImport: i0, template: "@if (label()) {\n <label class=\"number-input__label\" [for]=\"id\">{{ label() }}</label>\n}\n\n<div [class]=\"hostClasses()\">\n <button\n type=\"button\"\n class=\"number-input__btn\"\n [disabled]=\"!canDecrement() || null\"\n (click)=\"decrement()\"\n [attr.aria-label]=\"i18n.decrement\"\n >\n <ngx-ds-icon [icon]=\"MinusIcon\" [size]=\"iconSize()\" />\n </button>\n\n <input\n class=\"number-input__field\"\n type=\"number\"\n [id]=\"id\"\n [attr.aria-label]=\"label() ? null : (ariaLabel() ?? null)\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n [value]=\"value()\"\n [min]=\"min() ?? null\"\n [max]=\"max() ?? null\"\n [step]=\"step()\"\n [disabled]=\"isDisabled() || null\"\n (change)=\"onInputChange($event)\"\n />\n\n <button\n type=\"button\"\n class=\"number-input__btn\"\n [disabled]=\"!canIncrement() || null\"\n (click)=\"increment()\"\n [attr.aria-label]=\"i18n.increment\"\n >\n <ngx-ds-icon [icon]=\"PlusIcon\" [size]=\"iconSize()\" />\n </button>\n</div>\n\n@if (errorText()) {\n <p [id]=\"messageId\" role=\"alert\" class=\"number-input__error\">{{ errorText() }}</p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"number-input__hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.number-input__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-base, #111827)}.number-input{display:inline-flex;align-items:center;border:1px solid var(--border-input, #d1d5db);border-radius:.5rem;background:var(--surface-base, #ffffff);overflow:hidden;transition:border-color .15s ease,box-shadow .15s ease}.number-input:focus-within{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px var(--primary-100, #e0e7ff)}.number-input--error,.number-input--error:focus-within{border-color:var(--danger-500, #ef4444)}.number-input--error:focus-within{box-shadow:0 0 0 3px #ef44441f}.number-input__btn{display:inline-flex;align-items:center;justify-content:center;background:var(--surface-subtle, #f9fafb);border:none;cursor:pointer;color:var(--text-muted, #6b7280);flex-shrink:0;transition:background .15s ease,color .15s ease}.number-input__btn:hover:not(:disabled){background:var(--surface-hover, #f3f4f6);color:var(--text-base, #111827)}.number-input__btn:disabled{opacity:.4;cursor:not-allowed}.number-input__field{flex:1;min-width:0;border:none;background:transparent;font-family:inherit;font-weight:500;text-align:center;color:var(--text-base, #111827);outline:none;-moz-appearance:textfield}.number-input__field::-webkit-inner-spin-button,.number-input__field::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.number-input__field:disabled{opacity:.5;cursor:not-allowed}.number-input--sm .number-input__btn{width:2rem;height:2rem}.number-input--sm .number-input__field{font-size:.8125rem;height:2rem;width:3.5rem}.number-input--md .number-input__btn{width:2.5rem;height:2.5rem}.number-input--md .number-input__field{font-size:.9375rem;height:2.5rem;width:4rem}.number-input--lg .number-input__btn{width:3rem;height:3rem}.number-input--lg .number-input__field{font-size:1.0625rem;height:3rem;width:5rem}.number-input__hint{margin:.375rem 0 0;font-size:.8125rem;color:var(--text-muted, #6b7280)}.number-input__error{margin:.375rem 0 0;font-size:.8125rem;color:var(--danger-600, #dc2626)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3243
3429
|
}
|
|
3244
3430
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: NumberInputComponent, decorators: [{
|
|
3245
3431
|
type: Component,
|
|
@@ -3249,10 +3435,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
3249
3435
|
useExisting: forwardRef(() => NumberInputComponent),
|
|
3250
3436
|
multi: true,
|
|
3251
3437
|
},
|
|
3252
|
-
], template: "@if (label()) {\n <label class=\"number-input__label\" [for]=\"id\">{{ label() }}</label>\n}\n\n<div [class]=\"hostClasses()\">\n <button\n type=\"button\"\n class=\"number-input__btn\"\n [disabled]=\"!canDecrement() || null\"\n (click)=\"decrement()\"\n [attr.aria-label]=\"i18n.decrement\"\n >\n <ngx-ds-icon [icon]=\"MinusIcon\" [size]=\"iconSize()\" />\n </button>\n\n <input\n class=\"number-input__field\"\n type=\"number\"\n [id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n [value]=\"value()\"\n [min]=\"min() ?? null\"\n [max]=\"max() ?? null\"\n [step]=\"step()\"\n [disabled]=\"isDisabled() || null\"\n (change)=\"onInputChange($event)\"\n />\n\n <button\n type=\"button\"\n class=\"number-input__btn\"\n [disabled]=\"!canIncrement() || null\"\n (click)=\"increment()\"\n [attr.aria-label]=\"i18n.increment\"\n >\n <ngx-ds-icon [icon]=\"PlusIcon\" [size]=\"iconSize()\" />\n </button>\n</div>\n\n@if (errorText()) {\n <p [id]=\"messageId\" role=\"alert\" class=\"number-input__error\">{{ errorText() }}</p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"number-input__hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.number-input__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-base, #111827)}.number-input{display:inline-flex;align-items:center;border:1px solid var(--border-input, #d1d5db);border-radius:.5rem;background:var(--surface-base, #ffffff);overflow:hidden;transition:border-color .15s ease,box-shadow .15s ease}.number-input:focus-within{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px var(--primary-100, #e0e7ff)}.number-input--error,.number-input--error:focus-within{border-color:var(--danger-500, #ef4444)}.number-input--error:focus-within{box-shadow:0 0 0 3px #ef44441f}.number-input__btn{display:inline-flex;align-items:center;justify-content:center;background:var(--surface-subtle, #f9fafb);border:none;cursor:pointer;color:var(--text-muted, #6b7280);flex-shrink:0;transition:background .15s ease,color .15s ease}.number-input__btn:hover:not(:disabled){background:var(--surface-hover, #f3f4f6);color:var(--text-base, #111827)}.number-input__btn:disabled{opacity:.4;cursor:not-allowed}.number-input__field{flex:1;min-width:0;border:none;background:transparent;font-family:inherit;font-weight:500;text-align:center;color:var(--text-base, #111827);outline:none;-moz-appearance:textfield}.number-input__field::-webkit-inner-spin-button,.number-input__field::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.number-input__field:disabled{opacity:.5;cursor:not-allowed}.number-input--sm .number-input__btn{width:2rem;height:2rem}.number-input--sm .number-input__field{font-size:.8125rem;height:2rem;width:3.5rem}.number-input--md .number-input__btn{width:2.5rem;height:2.5rem}.number-input--md .number-input__field{font-size:.9375rem;height:2.5rem;width:4rem}.number-input--lg .number-input__btn{width:3rem;height:3rem}.number-input--lg .number-input__field{font-size:1.0625rem;height:3rem;width:5rem}.number-input__hint{margin:.375rem 0 0;font-size:.8125rem;color:var(--text-muted, #6b7280)}.number-input__error{margin:.375rem 0 0;font-size:.8125rem;color:var(--danger-600, #dc2626)}\n"] }]
|
|
3253
|
-
}], 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 }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
3438
|
+
], template: "@if (label()) {\n <label class=\"number-input__label\" [for]=\"id\">{{ label() }}</label>\n}\n\n<div [class]=\"hostClasses()\">\n <button\n type=\"button\"\n class=\"number-input__btn\"\n [disabled]=\"!canDecrement() || null\"\n (click)=\"decrement()\"\n [attr.aria-label]=\"i18n.decrement\"\n >\n <ngx-ds-icon [icon]=\"MinusIcon\" [size]=\"iconSize()\" />\n </button>\n\n <input\n class=\"number-input__field\"\n type=\"number\"\n [id]=\"id\"\n [attr.aria-label]=\"label() ? null : (ariaLabel() ?? null)\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n [value]=\"value()\"\n [min]=\"min() ?? null\"\n [max]=\"max() ?? null\"\n [step]=\"step()\"\n [disabled]=\"isDisabled() || null\"\n (change)=\"onInputChange($event)\"\n />\n\n <button\n type=\"button\"\n class=\"number-input__btn\"\n [disabled]=\"!canIncrement() || null\"\n (click)=\"increment()\"\n [attr.aria-label]=\"i18n.increment\"\n >\n <ngx-ds-icon [icon]=\"PlusIcon\" [size]=\"iconSize()\" />\n </button>\n</div>\n\n@if (errorText()) {\n <p [id]=\"messageId\" role=\"alert\" class=\"number-input__error\">{{ errorText() }}</p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"number-input__hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.number-input__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-base, #111827)}.number-input{display:inline-flex;align-items:center;border:1px solid var(--border-input, #d1d5db);border-radius:.5rem;background:var(--surface-base, #ffffff);overflow:hidden;transition:border-color .15s ease,box-shadow .15s ease}.number-input:focus-within{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px var(--primary-100, #e0e7ff)}.number-input--error,.number-input--error:focus-within{border-color:var(--danger-500, #ef4444)}.number-input--error:focus-within{box-shadow:0 0 0 3px #ef44441f}.number-input__btn{display:inline-flex;align-items:center;justify-content:center;background:var(--surface-subtle, #f9fafb);border:none;cursor:pointer;color:var(--text-muted, #6b7280);flex-shrink:0;transition:background .15s ease,color .15s ease}.number-input__btn:hover:not(:disabled){background:var(--surface-hover, #f3f4f6);color:var(--text-base, #111827)}.number-input__btn:disabled{opacity:.4;cursor:not-allowed}.number-input__field{flex:1;min-width:0;border:none;background:transparent;font-family:inherit;font-weight:500;text-align:center;color:var(--text-base, #111827);outline:none;-moz-appearance:textfield}.number-input__field::-webkit-inner-spin-button,.number-input__field::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.number-input__field:disabled{opacity:.5;cursor:not-allowed}.number-input--sm .number-input__btn{width:2rem;height:2rem}.number-input--sm .number-input__field{font-size:.8125rem;height:2rem;width:3.5rem}.number-input--md .number-input__btn{width:2.5rem;height:2.5rem}.number-input--md .number-input__field{font-size:.9375rem;height:2.5rem;width:4rem}.number-input--lg .number-input__btn{width:3rem;height:3rem}.number-input--lg .number-input__field{font-size:1.0625rem;height:3rem;width:5rem}.number-input__hint{margin:.375rem 0 0;font-size:.8125rem;color:var(--text-muted, #6b7280)}.number-input__error{margin:.375rem 0 0;font-size:.8125rem;color:var(--danger-600, #dc2626)}\n"] }]
|
|
3439
|
+
}], 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 }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
3254
3440
|
|
|
3255
|
-
let nextId$
|
|
3441
|
+
let nextId$9 = 0;
|
|
3256
3442
|
class MultiSelectComponent {
|
|
3257
3443
|
i18n = inject(NGX_DS_LABELS);
|
|
3258
3444
|
options = input([], ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
@@ -3268,7 +3454,7 @@ class MultiSelectComponent {
|
|
|
3268
3454
|
searchable = input(true, ...(ngDevMode ? [{ debugName: "searchable" }] : /* istanbul ignore next */ []));
|
|
3269
3455
|
maxSelected = input(null, ...(ngDevMode ? [{ debugName: "maxSelected" }] : /* istanbul ignore next */ []));
|
|
3270
3456
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
3271
|
-
id = `ngx-multi-${nextId$
|
|
3457
|
+
id = `ngx-multi-${nextId$9++}`;
|
|
3272
3458
|
messageId = `${this.id}-message`;
|
|
3273
3459
|
ChevronDownIcon = ChevronDown;
|
|
3274
3460
|
XIcon = X;
|
|
@@ -3417,7 +3603,7 @@ class MultiSelectComponent {
|
|
|
3417
3603
|
useExisting: forwardRef(() => MultiSelectComponent),
|
|
3418
3604
|
multi: true,
|
|
3419
3605
|
},
|
|
3420
|
-
], viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (label()) {\n <label class=\"ms__label\" [for]=\"id\">{{ label() }}</label>\n}\n\n<div class=\"ms\">\n <!-- Trigger -->\n <div\n #trigger\n [class]=\"triggerClasses()\"\n [id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n role=\"combobox\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [attr.aria-controls]=\"id + '-panel'\"\n [attr.aria-expanded]=\"isOpen()\"\n (click)=\"toggleOpen()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n <div class=\"ms__chips\">\n @if (value().length === 0) {\n <span class=\"ms__placeholder\">{{ placeholder() ?? i18n.selectPlaceholder }}</span>\n }\n @for (val of value(); track val) {\n @let label = selectedLabels()[$index];\n <span class=\"ms__chip\">\n {{ label }}\n <button\n type=\"button\"\n class=\"ms__chip-remove\"\n (click)=\"removeChip(val, $event)\"\n [attr.aria-label]=\"i18n.removeChip(label)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"12\" />\n </button>\n </span>\n }\n </div>\n <ngx-ds-icon\n [icon]=\"ChevronDownIcon\"\n [size]=\"16\"\n class=\"ms__arrow\"\n [class.ms__arrow--open]=\"isOpen()\"\n />\n </div>\n\n <!-- Dropdown -->\n @if (isOpen()) {\n <div\n class=\"ms__dropdown\"\n [id]=\"id + '-panel'\"\n role=\"listbox\"\n [attr.aria-multiselectable]=\"true\"\n >\n @if (searchable()) {\n <div class=\"ms__search-wrap\">\n <input\n class=\"ms__search\"\n type=\"text\"\n [placeholder]=\"i18n.searchPlaceholder\"\n [value]=\"search()\"\n (input)=\"onSearch($event)\"\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"onSearchKeydown($event)\"\n />\n </div>\n }\n\n <ul class=\"ms__list\">\n @for (option of filteredOptions(); track option.value) {\n <li\n class=\"ms__option\"\n [class.ms__option--selected]=\"isSelected(option)\"\n [class.ms__option--disabled]=\"\n option.disabled || (!canSelectMore() && !isSelected(option))\n \"\n role=\"option\"\n tabindex=\"-1\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"option.disabled || null\"\n (click)=\"toggleOption(option)\"\n (keydown)=\"onOptionKeydown($event, option)\"\n >\n <span class=\"ms__option-check\">\n @if (isSelected(option)) {\n <ngx-ds-icon [icon]=\"CheckIcon\" [size]=\"14\" />\n }\n </span>\n {{ option.label }}\n </li>\n }\n\n @if (filteredOptions().length === 0) {\n <li class=\"ms__empty\">{{ i18n.noResults }}</li>\n }\n </ul>\n </div>\n }\n</div>\n\n@if (errorText()) {\n <p [id]=\"messageId\" role=\"alert\" class=\"ms__error\">{{ errorText() }}</p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ms__hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ms__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-base, #111827)}.ms{position:relative}.ms__trigger{display:flex;align-items:center;gap:.5rem;border:1px solid var(--border-input, #d1d5db);border-radius:.5rem;background:var(--surface-base, #ffffff);cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease;min-height:2.5rem}.ms__trigger--sm{padding:.25rem .625rem;font-size:.8125rem;min-height:2rem}.ms__trigger--md{padding:.375rem .75rem;font-size:.875rem;min-height:2.5rem}.ms__trigger--lg{padding:.5rem 1rem;font-size:1rem;min-height:3rem}.ms__trigger--open,.ms__trigger:focus{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px var(--primary-100, #e0e7ff);outline:none}.ms__trigger--error{border-color:var(--danger-600, #dc2626)}.ms__chips{flex:1;display:flex;flex-wrap:wrap;gap:.25rem;min-width:0}.ms__placeholder{color:var(--text-placeholder, #
|
|
3606
|
+
], viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (label()) {\n <label class=\"ms__label\" [for]=\"id\">{{ label() }}</label>\n}\n\n<div class=\"ms\">\n <!-- Trigger -->\n <div\n #trigger\n [class]=\"triggerClasses()\"\n [id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n role=\"combobox\"\n [attr.aria-label]=\"label() || null\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [attr.aria-controls]=\"id + '-panel'\"\n [attr.aria-expanded]=\"isOpen()\"\n (click)=\"toggleOpen()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n <div class=\"ms__chips\">\n @if (value().length === 0) {\n <span class=\"ms__placeholder\">{{ placeholder() ?? i18n.selectPlaceholder }}</span>\n }\n @for (val of value(); track val) {\n @let label = selectedLabels()[$index];\n <span class=\"ms__chip\">\n {{ label }}\n <button\n type=\"button\"\n class=\"ms__chip-remove\"\n (click)=\"removeChip(val, $event)\"\n [attr.aria-label]=\"i18n.removeChip(label)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"12\" />\n </button>\n </span>\n }\n </div>\n <ngx-ds-icon\n [icon]=\"ChevronDownIcon\"\n [size]=\"16\"\n class=\"ms__arrow\"\n [class.ms__arrow--open]=\"isOpen()\"\n />\n </div>\n\n <!-- Dropdown -->\n @if (isOpen()) {\n <div\n class=\"ms__dropdown\"\n [id]=\"id + '-panel'\"\n role=\"listbox\"\n [attr.aria-multiselectable]=\"true\"\n >\n @if (searchable()) {\n <div class=\"ms__search-wrap\">\n <input\n class=\"ms__search\"\n type=\"text\"\n [placeholder]=\"i18n.searchPlaceholder\"\n [value]=\"search()\"\n (input)=\"onSearch($event)\"\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"onSearchKeydown($event)\"\n />\n </div>\n }\n\n <ul class=\"ms__list\">\n @for (option of filteredOptions(); track option.value) {\n <li\n class=\"ms__option\"\n [class.ms__option--selected]=\"isSelected(option)\"\n [class.ms__option--disabled]=\"\n option.disabled || (!canSelectMore() && !isSelected(option))\n \"\n role=\"option\"\n tabindex=\"-1\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"option.disabled || null\"\n (click)=\"toggleOption(option)\"\n (keydown)=\"onOptionKeydown($event, option)\"\n >\n <span class=\"ms__option-check\">\n @if (isSelected(option)) {\n <ngx-ds-icon [icon]=\"CheckIcon\" [size]=\"14\" />\n }\n </span>\n {{ option.label }}\n </li>\n }\n\n @if (filteredOptions().length === 0) {\n <li class=\"ms__empty\">{{ i18n.noResults }}</li>\n }\n </ul>\n </div>\n }\n</div>\n\n@if (errorText()) {\n <p [id]=\"messageId\" role=\"alert\" class=\"ms__error\">{{ errorText() }}</p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ms__hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ms__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-base, #111827)}.ms{position:relative}.ms__trigger{display:flex;align-items:center;gap:.5rem;border:1px solid var(--border-input, #d1d5db);border-radius:.5rem;background:var(--surface-base, #ffffff);cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease;min-height:2.5rem}.ms__trigger--sm{padding:.25rem .625rem;font-size:.8125rem;min-height:2rem}.ms__trigger--md{padding:.375rem .75rem;font-size:.875rem;min-height:2.5rem}.ms__trigger--lg{padding:.5rem 1rem;font-size:1rem;min-height:3rem}.ms__trigger--open,.ms__trigger:focus{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px var(--primary-100, #e0e7ff);outline:none}.ms__trigger--error{border-color:var(--danger-600, #dc2626)}.ms__chips{flex:1;display:flex;flex-wrap:wrap;gap:.25rem;min-width:0}.ms__placeholder{color:var(--text-placeholder, #6b7280);font-size:inherit}.ms__chip{display:inline-flex;align-items:center;gap:.25rem;background:var(--primary-100, #e0e7ff);color:var(--primary-700, #4338ca);border-radius:.25rem;font-size:.75rem;font-weight:500;padding:.125rem .375rem}.ms__chip-remove{display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:0;cursor:pointer;color:inherit;opacity:.7;line-height:1}.ms__chip-remove:hover{opacity:1}.ms__arrow{flex-shrink:0;color:var(--text-placeholder, #6b7280);transition:transform .2s ease}.ms__arrow--open{transform:rotate(180deg)}.ms__dropdown{position:absolute;top:calc(100% + .25rem);left:0;right:0;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.5rem;box-shadow:0 4px 16px #0000001a;z-index:1000;overflow:hidden}.ms__search-wrap{padding:.5rem;border-bottom:1px solid var(--border-base, #e5e7eb)}.ms__search{width:100%;border:1px solid var(--border-input, #d1d5db);border-radius:.375rem;padding:.375rem .5rem;font-family:inherit;font-size:.8125rem;outline:none;background:var(--surface-subtle, #f9fafb);color:var(--text-base, #111827);box-sizing:border-box}.ms__search:focus{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 2px var(--primary-100, #e0e7ff)}.ms__list{list-style:none;margin:0;padding:.25rem;max-height:14rem;overflow-y:auto}.ms__option{display:flex;align-items:center;gap:.5rem;padding:.5rem .625rem;border-radius:.375rem;cursor:pointer;font-size:.875rem;color:var(--text-base, #111827);transition:background .1s ease}.ms__option:hover:not(.ms__option--disabled){background:var(--surface-hover, #f3f4f6)}.ms__option--selected{background:var(--primary-50, #eef2ff);color:var(--primary-700, #4338ca)}.ms__option--disabled{opacity:.45;cursor:not-allowed}.ms__option-check{display:inline-flex;align-items:center;justify-content:center;width:1rem;height:1rem;flex-shrink:0}.ms__empty{padding:.75rem;text-align:center;font-size:.8125rem;color:var(--text-placeholder, #6b7280)}.ms__hint{margin:.375rem 0 0;font-size:.8125rem;color:var(--text-muted, #6b7280)}.ms__error{margin:.375rem 0 0;font-size:.8125rem;color:var(--danger-600, #dc2626)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3421
3607
|
}
|
|
3422
3608
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: MultiSelectComponent, decorators: [{
|
|
3423
3609
|
type: Component,
|
|
@@ -3427,7 +3613,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
3427
3613
|
useExisting: forwardRef(() => MultiSelectComponent),
|
|
3428
3614
|
multi: true,
|
|
3429
3615
|
},
|
|
3430
|
-
], template: "@if (label()) {\n <label class=\"ms__label\" [for]=\"id\">{{ label() }}</label>\n}\n\n<div class=\"ms\">\n <!-- Trigger -->\n <div\n #trigger\n [class]=\"triggerClasses()\"\n [id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n role=\"combobox\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [attr.aria-controls]=\"id + '-panel'\"\n [attr.aria-expanded]=\"isOpen()\"\n (click)=\"toggleOpen()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n <div class=\"ms__chips\">\n @if (value().length === 0) {\n <span class=\"ms__placeholder\">{{ placeholder() ?? i18n.selectPlaceholder }}</span>\n }\n @for (val of value(); track val) {\n @let label = selectedLabels()[$index];\n <span class=\"ms__chip\">\n {{ label }}\n <button\n type=\"button\"\n class=\"ms__chip-remove\"\n (click)=\"removeChip(val, $event)\"\n [attr.aria-label]=\"i18n.removeChip(label)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"12\" />\n </button>\n </span>\n }\n </div>\n <ngx-ds-icon\n [icon]=\"ChevronDownIcon\"\n [size]=\"16\"\n class=\"ms__arrow\"\n [class.ms__arrow--open]=\"isOpen()\"\n />\n </div>\n\n <!-- Dropdown -->\n @if (isOpen()) {\n <div\n class=\"ms__dropdown\"\n [id]=\"id + '-panel'\"\n role=\"listbox\"\n [attr.aria-multiselectable]=\"true\"\n >\n @if (searchable()) {\n <div class=\"ms__search-wrap\">\n <input\n class=\"ms__search\"\n type=\"text\"\n [placeholder]=\"i18n.searchPlaceholder\"\n [value]=\"search()\"\n (input)=\"onSearch($event)\"\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"onSearchKeydown($event)\"\n />\n </div>\n }\n\n <ul class=\"ms__list\">\n @for (option of filteredOptions(); track option.value) {\n <li\n class=\"ms__option\"\n [class.ms__option--selected]=\"isSelected(option)\"\n [class.ms__option--disabled]=\"\n option.disabled || (!canSelectMore() && !isSelected(option))\n \"\n role=\"option\"\n tabindex=\"-1\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"option.disabled || null\"\n (click)=\"toggleOption(option)\"\n (keydown)=\"onOptionKeydown($event, option)\"\n >\n <span class=\"ms__option-check\">\n @if (isSelected(option)) {\n <ngx-ds-icon [icon]=\"CheckIcon\" [size]=\"14\" />\n }\n </span>\n {{ option.label }}\n </li>\n }\n\n @if (filteredOptions().length === 0) {\n <li class=\"ms__empty\">{{ i18n.noResults }}</li>\n }\n </ul>\n </div>\n }\n</div>\n\n@if (errorText()) {\n <p [id]=\"messageId\" role=\"alert\" class=\"ms__error\">{{ errorText() }}</p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ms__hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ms__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-base, #111827)}.ms{position:relative}.ms__trigger{display:flex;align-items:center;gap:.5rem;border:1px solid var(--border-input, #d1d5db);border-radius:.5rem;background:var(--surface-base, #ffffff);cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease;min-height:2.5rem}.ms__trigger--sm{padding:.25rem .625rem;font-size:.8125rem;min-height:2rem}.ms__trigger--md{padding:.375rem .75rem;font-size:.875rem;min-height:2.5rem}.ms__trigger--lg{padding:.5rem 1rem;font-size:1rem;min-height:3rem}.ms__trigger--open,.ms__trigger:focus{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px var(--primary-100, #e0e7ff);outline:none}.ms__trigger--error{border-color:var(--danger-600, #dc2626)}.ms__chips{flex:1;display:flex;flex-wrap:wrap;gap:.25rem;min-width:0}.ms__placeholder{color:var(--text-placeholder, #
|
|
3616
|
+
], template: "@if (label()) {\n <label class=\"ms__label\" [for]=\"id\">{{ label() }}</label>\n}\n\n<div class=\"ms\">\n <!-- Trigger -->\n <div\n #trigger\n [class]=\"triggerClasses()\"\n [id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n role=\"combobox\"\n [attr.aria-label]=\"label() || null\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [attr.aria-controls]=\"id + '-panel'\"\n [attr.aria-expanded]=\"isOpen()\"\n (click)=\"toggleOpen()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n <div class=\"ms__chips\">\n @if (value().length === 0) {\n <span class=\"ms__placeholder\">{{ placeholder() ?? i18n.selectPlaceholder }}</span>\n }\n @for (val of value(); track val) {\n @let label = selectedLabels()[$index];\n <span class=\"ms__chip\">\n {{ label }}\n <button\n type=\"button\"\n class=\"ms__chip-remove\"\n (click)=\"removeChip(val, $event)\"\n [attr.aria-label]=\"i18n.removeChip(label)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"12\" />\n </button>\n </span>\n }\n </div>\n <ngx-ds-icon\n [icon]=\"ChevronDownIcon\"\n [size]=\"16\"\n class=\"ms__arrow\"\n [class.ms__arrow--open]=\"isOpen()\"\n />\n </div>\n\n <!-- Dropdown -->\n @if (isOpen()) {\n <div\n class=\"ms__dropdown\"\n [id]=\"id + '-panel'\"\n role=\"listbox\"\n [attr.aria-multiselectable]=\"true\"\n >\n @if (searchable()) {\n <div class=\"ms__search-wrap\">\n <input\n class=\"ms__search\"\n type=\"text\"\n [placeholder]=\"i18n.searchPlaceholder\"\n [value]=\"search()\"\n (input)=\"onSearch($event)\"\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"onSearchKeydown($event)\"\n />\n </div>\n }\n\n <ul class=\"ms__list\">\n @for (option of filteredOptions(); track option.value) {\n <li\n class=\"ms__option\"\n [class.ms__option--selected]=\"isSelected(option)\"\n [class.ms__option--disabled]=\"\n option.disabled || (!canSelectMore() && !isSelected(option))\n \"\n role=\"option\"\n tabindex=\"-1\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"option.disabled || null\"\n (click)=\"toggleOption(option)\"\n (keydown)=\"onOptionKeydown($event, option)\"\n >\n <span class=\"ms__option-check\">\n @if (isSelected(option)) {\n <ngx-ds-icon [icon]=\"CheckIcon\" [size]=\"14\" />\n }\n </span>\n {{ option.label }}\n </li>\n }\n\n @if (filteredOptions().length === 0) {\n <li class=\"ms__empty\">{{ i18n.noResults }}</li>\n }\n </ul>\n </div>\n }\n</div>\n\n@if (errorText()) {\n <p [id]=\"messageId\" role=\"alert\" class=\"ms__error\">{{ errorText() }}</p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ms__hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ms__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-base, #111827)}.ms{position:relative}.ms__trigger{display:flex;align-items:center;gap:.5rem;border:1px solid var(--border-input, #d1d5db);border-radius:.5rem;background:var(--surface-base, #ffffff);cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease;min-height:2.5rem}.ms__trigger--sm{padding:.25rem .625rem;font-size:.8125rem;min-height:2rem}.ms__trigger--md{padding:.375rem .75rem;font-size:.875rem;min-height:2.5rem}.ms__trigger--lg{padding:.5rem 1rem;font-size:1rem;min-height:3rem}.ms__trigger--open,.ms__trigger:focus{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px var(--primary-100, #e0e7ff);outline:none}.ms__trigger--error{border-color:var(--danger-600, #dc2626)}.ms__chips{flex:1;display:flex;flex-wrap:wrap;gap:.25rem;min-width:0}.ms__placeholder{color:var(--text-placeholder, #6b7280);font-size:inherit}.ms__chip{display:inline-flex;align-items:center;gap:.25rem;background:var(--primary-100, #e0e7ff);color:var(--primary-700, #4338ca);border-radius:.25rem;font-size:.75rem;font-weight:500;padding:.125rem .375rem}.ms__chip-remove{display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:0;cursor:pointer;color:inherit;opacity:.7;line-height:1}.ms__chip-remove:hover{opacity:1}.ms__arrow{flex-shrink:0;color:var(--text-placeholder, #6b7280);transition:transform .2s ease}.ms__arrow--open{transform:rotate(180deg)}.ms__dropdown{position:absolute;top:calc(100% + .25rem);left:0;right:0;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.5rem;box-shadow:0 4px 16px #0000001a;z-index:1000;overflow:hidden}.ms__search-wrap{padding:.5rem;border-bottom:1px solid var(--border-base, #e5e7eb)}.ms__search{width:100%;border:1px solid var(--border-input, #d1d5db);border-radius:.375rem;padding:.375rem .5rem;font-family:inherit;font-size:.8125rem;outline:none;background:var(--surface-subtle, #f9fafb);color:var(--text-base, #111827);box-sizing:border-box}.ms__search:focus{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 2px var(--primary-100, #e0e7ff)}.ms__list{list-style:none;margin:0;padding:.25rem;max-height:14rem;overflow-y:auto}.ms__option{display:flex;align-items:center;gap:.5rem;padding:.5rem .625rem;border-radius:.375rem;cursor:pointer;font-size:.875rem;color:var(--text-base, #111827);transition:background .1s ease}.ms__option:hover:not(.ms__option--disabled){background:var(--surface-hover, #f3f4f6)}.ms__option--selected{background:var(--primary-50, #eef2ff);color:var(--primary-700, #4338ca)}.ms__option--disabled{opacity:.45;cursor:not-allowed}.ms__option-check{display:inline-flex;align-items:center;justify-content:center;width:1rem;height:1rem;flex-shrink:0}.ms__empty{padding:.75rem;text-align:center;font-size:.8125rem;color:var(--text-placeholder, #6b7280)}.ms__hint{margin:.375rem 0 0;font-size:.8125rem;color:var(--text-muted, #6b7280)}.ms__error{margin:.375rem 0 0;font-size:.8125rem;color:var(--danger-600, #dc2626)}\n"] }]
|
|
3431
3617
|
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], 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 }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], maxSelected: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSelected", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], triggerRef: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }] } });
|
|
3432
3618
|
|
|
3433
3619
|
const SIZES = { sm: 16, md: 22, lg: 28 };
|
|
@@ -3489,7 +3675,7 @@ class RatingComponent {
|
|
|
3489
3675
|
useExisting: forwardRef(() => RatingComponent),
|
|
3490
3676
|
multi: true,
|
|
3491
3677
|
},
|
|
3492
|
-
], ngImport: i0, template: "@if (label()) {\n <span class=\"rating__label\">{{ label() }}</span>\n}\n\n<div\n class=\"rating\"\n [class.rating--disabled]=\"isDisabled()\"\n [class.rating--readonly]=\"readonly()\"\n (mouseleave)=\"onLeave()\"\n [attr.aria-label]=\"label() || i18n.rating\"\n>\n @for (star of stars(); track star) {\n <button\n type=\"button\"\n class=\"rating__star\"\n [class.rating__star--filled]=\"isFilled(star)\"\n [disabled]=\"isDisabled() || readonly() || null\"\n (mouseenter)=\"onHover(star)\"\n (click)=\"onClick(star)\"\n [attr.aria-label]=\"i18n.ratingStar(star)\"\n >\n <ngx-ds-icon [icon]=\"StarIcon\" [size]=\"iconSize()\" />\n </button>\n }\n</div>\n", styles: [":host{display:inline-flex;flex-direction:column;gap:.375rem;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.rating__label{font-size:.875rem;font-weight:500;color:var(--text-base, #111827)}.rating{display:inline-flex;gap:.125rem}.rating--disabled{opacity:.5;pointer-events:none}.rating--readonly{cursor:default}.rating__star{background:none;border:none;padding:.125rem;cursor:pointer;color:var(--text-disabled, #d1d5db);transition:color .1s ease,transform .1s ease;line-height:0;display:inline-flex}.rating__star:hover:not(:disabled){transform:scale(1.15)}.rating__star--filled{color:var(--warning-400, #fbbf24)}.rating__star:disabled{cursor:not-allowed}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3678
|
+
], ngImport: i0, template: "@if (label()) {\n <span class=\"rating__label\">{{ label() }}</span>\n}\n\n<div\n class=\"rating\"\n [class.rating--disabled]=\"isDisabled()\"\n [class.rating--readonly]=\"readonly()\"\n (mouseleave)=\"onLeave()\"\n [attr.aria-label]=\"label() || i18n.rating\"\n>\n @for (star of stars(); track star) {\n <button\n type=\"button\"\n class=\"rating__star\"\n [class.rating__star--filled]=\"isFilled(star)\"\n [disabled]=\"isDisabled() || readonly() || null\"\n (mouseenter)=\"onHover(star)\"\n (click)=\"onClick(star)\"\n [attr.aria-label]=\"i18n.ratingStar(star)\"\n >\n <ngx-ds-icon [icon]=\"StarIcon\" [size]=\"iconSize()\" />\n </button>\n }\n</div>\n", styles: [":host{display:inline-flex;flex-direction:column;gap:.375rem;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.rating__label{font-size:.875rem;font-weight:500;color:var(--text-base, #111827)}.rating{display:inline-flex;gap:.125rem}.rating--disabled{opacity:.5;pointer-events:none}.rating--readonly{cursor:default}.rating__star{background:none;border:none;padding:.125rem;cursor:pointer;color:var(--text-disabled, #d1d5db);transition:color .1s ease,transform .1s ease;line-height:0;display:inline-flex;align-items:center;justify-content:center;min-width:1.5rem;min-height:1.5rem}.rating__star:hover:not(:disabled){transform:scale(1.15)}.rating__star--filled{color:var(--warning-400, #fbbf24)}.rating__star:disabled{cursor:not-allowed}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3493
3679
|
}
|
|
3494
3680
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: RatingComponent, decorators: [{
|
|
3495
3681
|
type: Component,
|
|
@@ -3499,7 +3685,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
3499
3685
|
useExisting: forwardRef(() => RatingComponent),
|
|
3500
3686
|
multi: true,
|
|
3501
3687
|
},
|
|
3502
|
-
], template: "@if (label()) {\n <span class=\"rating__label\">{{ label() }}</span>\n}\n\n<div\n class=\"rating\"\n [class.rating--disabled]=\"isDisabled()\"\n [class.rating--readonly]=\"readonly()\"\n (mouseleave)=\"onLeave()\"\n [attr.aria-label]=\"label() || i18n.rating\"\n>\n @for (star of stars(); track star) {\n <button\n type=\"button\"\n class=\"rating__star\"\n [class.rating__star--filled]=\"isFilled(star)\"\n [disabled]=\"isDisabled() || readonly() || null\"\n (mouseenter)=\"onHover(star)\"\n (click)=\"onClick(star)\"\n [attr.aria-label]=\"i18n.ratingStar(star)\"\n >\n <ngx-ds-icon [icon]=\"StarIcon\" [size]=\"iconSize()\" />\n </button>\n }\n</div>\n", styles: [":host{display:inline-flex;flex-direction:column;gap:.375rem;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.rating__label{font-size:.875rem;font-weight:500;color:var(--text-base, #111827)}.rating{display:inline-flex;gap:.125rem}.rating--disabled{opacity:.5;pointer-events:none}.rating--readonly{cursor:default}.rating__star{background:none;border:none;padding:.125rem;cursor:pointer;color:var(--text-disabled, #d1d5db);transition:color .1s ease,transform .1s ease;line-height:0;display:inline-flex}.rating__star:hover:not(:disabled){transform:scale(1.15)}.rating__star--filled{color:var(--warning-400, #fbbf24)}.rating__star:disabled{cursor:not-allowed}\n"] }]
|
|
3688
|
+
], template: "@if (label()) {\n <span class=\"rating__label\">{{ label() }}</span>\n}\n\n<div\n class=\"rating\"\n [class.rating--disabled]=\"isDisabled()\"\n [class.rating--readonly]=\"readonly()\"\n (mouseleave)=\"onLeave()\"\n [attr.aria-label]=\"label() || i18n.rating\"\n>\n @for (star of stars(); track star) {\n <button\n type=\"button\"\n class=\"rating__star\"\n [class.rating__star--filled]=\"isFilled(star)\"\n [disabled]=\"isDisabled() || readonly() || null\"\n (mouseenter)=\"onHover(star)\"\n (click)=\"onClick(star)\"\n [attr.aria-label]=\"i18n.ratingStar(star)\"\n >\n <ngx-ds-icon [icon]=\"StarIcon\" [size]=\"iconSize()\" />\n </button>\n }\n</div>\n", styles: [":host{display:inline-flex;flex-direction:column;gap:.375rem;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.rating__label{font-size:.875rem;font-weight:500;color:var(--text-base, #111827)}.rating{display:inline-flex;gap:.125rem}.rating--disabled{opacity:.5;pointer-events:none}.rating--readonly{cursor:default}.rating__star{background:none;border:none;padding:.125rem;cursor:pointer;color:var(--text-disabled, #d1d5db);transition:color .1s ease,transform .1s ease;line-height:0;display:inline-flex;align-items:center;justify-content:center;min-width:1.5rem;min-height:1.5rem}.rating__star:hover:not(:disabled){transform:scale(1.15)}.rating__star--filled{color:var(--warning-400, #fbbf24)}.rating__star:disabled{cursor:not-allowed}\n"] }]
|
|
3503
3689
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }] } });
|
|
3504
3690
|
|
|
3505
3691
|
class ChipGroupComponent {
|
|
@@ -3562,7 +3748,7 @@ class ChipGroupComponent {
|
|
|
3562
3748
|
useExisting: forwardRef(() => ChipGroupComponent),
|
|
3563
3749
|
multi: true,
|
|
3564
3750
|
},
|
|
3565
|
-
], ngImport: i0, template: "<div [class]=\"hostClasses()\" role=\"group\">\n @for (chip of chips(); track chip.value) {\n <span\n class=\"chip\"\n [class.chip--selected]=\"isSelected(chip)\"\n [class.chip--disabled]=\"chip.disabled || isDisabled()\"\n >\n <button\n type=\"button\"\n class=\"chip__label\"\n [disabled]=\"chip.disabled || isDisabled() || null\"\n [attr.aria-pressed]=\"selectable() ? isSelected(chip) : null\"\n (click)=\"toggle(chip)\"\n >\n {{ chip.label }}\n </button>\n\n @if (removable()) {\n <button\n type=\"button\"\n class=\"chip__remove\"\n [disabled]=\"chip.disabled || isDisabled() || null\"\n [attr.aria-label]=\"i18n.removeChip(chip.label)\"\n (click)=\"remove(chip, $event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"12\" />\n </button>\n }\n </span>\n }\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.chip-group{display:flex;flex-wrap:wrap;gap:.5rem}.chip{display:inline-flex;align-items:center;gap:.375rem;border-radius:999px;cursor:pointer;font-family:inherit;font-weight:500;transition:background .15s ease,color .15s ease,border-color .15s ease,box-shadow .15s ease;white-space:nowrap;position:relative}.chip:has(.chip__label:focus-visible){box-shadow:0 0 0 2px var(--primary-300, #a5b4fc)}.chip--disabled{opacity:.45;cursor:not-allowed}.chip__label,.chip__remove{appearance:none;background:none;border:0;padding:0;margin:0;color:inherit;font:inherit;cursor:inherit}.chip__label:disabled,.chip__remove:disabled{cursor:not-allowed}.chip__label{outline:none}.chip__label:after{content:\"\";position:absolute;inset:0;border-radius:inherit}.chip__remove{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;width:1rem;height:1rem;line-height:0;opacity:.6}.chip__remove:hover:not(:disabled){opacity:1}.chip__remove:focus-visible{opacity:1;outline:2px solid var(--primary-300, #a5b4fc);outline-offset:1px}.chip-group--sm .chip{font-size:.75rem;padding:.2rem .625rem}.chip-group--md .chip{font-size:.8125rem;padding:.3rem .875rem}.chip-group--lg .chip{font-size:.9375rem;padding:.4rem 1.125rem}.chip-group--soft .chip{background:var(--surface-muted, #f3f4f6);color:var(--text-secondary, #374151);border:1px solid transparent}.chip-group--soft .chip:hover:not(.chip--disabled){background:var(--surface-active, #e5e7eb);color:var(--text-base, #111827)}.chip-group--soft .chip--selected{background:var(--primary-100, #e0e7ff);color:var(--primary-700, #4338ca);border-color:var(--primary-200, #c7d2fe)}.chip-group--filled .chip{background:var(--surface-active, #e5e7eb);color:var(--text-secondary, #374151);border:1px solid transparent}.chip-group--filled .chip:hover:not(.chip--disabled){background:var(--border-input, #d1d5db)}.chip-group--filled .chip--selected{background:var(--primary
|
|
3751
|
+
], ngImport: i0, template: "<div [class]=\"hostClasses()\" role=\"group\">\n @for (chip of chips(); track chip.value) {\n <span\n class=\"chip\"\n [class.chip--selected]=\"isSelected(chip)\"\n [class.chip--disabled]=\"chip.disabled || isDisabled()\"\n >\n <button\n type=\"button\"\n class=\"chip__label\"\n [disabled]=\"chip.disabled || isDisabled() || null\"\n [attr.aria-pressed]=\"selectable() ? isSelected(chip) : null\"\n (click)=\"toggle(chip)\"\n >\n {{ chip.label }}\n </button>\n\n @if (removable()) {\n <button\n type=\"button\"\n class=\"chip__remove\"\n [disabled]=\"chip.disabled || isDisabled() || null\"\n [attr.aria-label]=\"i18n.removeChip(chip.label)\"\n (click)=\"remove(chip, $event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"12\" />\n </button>\n }\n </span>\n }\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.chip-group{display:flex;flex-wrap:wrap;gap:.5rem}.chip{display:inline-flex;align-items:center;gap:.375rem;border-radius:999px;cursor:pointer;font-family:inherit;font-weight:500;transition:background .15s ease,color .15s ease,border-color .15s ease,box-shadow .15s ease;white-space:nowrap;position:relative}.chip:has(.chip__label:focus-visible){box-shadow:0 0 0 2px var(--primary-300, #a5b4fc)}.chip--disabled{opacity:.45;cursor:not-allowed}.chip__label,.chip__remove{appearance:none;background:none;border:0;padding:0;margin:0;color:inherit;font:inherit;cursor:inherit}.chip__label:disabled,.chip__remove:disabled{cursor:not-allowed}.chip__label{outline:none}.chip__label:after{content:\"\";position:absolute;inset:0;border-radius:inherit}.chip__remove{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;width:1rem;height:1rem;line-height:0;opacity:.6}.chip__remove:hover:not(:disabled){opacity:1}.chip__remove:focus-visible{opacity:1;outline:2px solid var(--primary-300, #a5b4fc);outline-offset:1px}.chip-group--sm .chip{font-size:.75rem;padding:.2rem .625rem}.chip-group--md .chip{font-size:.8125rem;padding:.3rem .875rem}.chip-group--lg .chip{font-size:.9375rem;padding:.4rem 1.125rem}.chip-group--soft .chip{background:var(--surface-muted, #f3f4f6);color:var(--text-secondary, #374151);border:1px solid transparent}.chip-group--soft .chip:hover:not(.chip--disabled){background:var(--surface-active, #e5e7eb);color:var(--text-base, #111827)}.chip-group--soft .chip--selected{background:var(--primary-100, #e0e7ff);color:var(--primary-700, #4338ca);border-color:var(--primary-200, #c7d2fe)}.chip-group--filled .chip{background:var(--surface-active, #e5e7eb);color:var(--text-secondary, #374151);border:1px solid transparent}.chip-group--filled .chip:hover:not(.chip--disabled){background:var(--border-input, #d1d5db)}.chip-group--filled .chip--selected{background:var(--fill-primary, #4f46e5);color:var(--text-on-color, #fff);border-color:var(--primary-600, #4f46e5)}.chip-group--outline .chip{background:transparent;color:var(--text-muted, #6b7280);border:1px solid var(--border-input, #d1d5db)}.chip-group--outline .chip:hover:not(.chip--disabled){border-color:var(--text-placeholder, #6b7280);color:var(--text-base, #111827)}.chip-group--outline .chip--selected{border-color:var(--primary-500, #6366f1);color:var(--primary-700, #4338ca);background:var(--primary-50, #eef2ff)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3566
3752
|
}
|
|
3567
3753
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ChipGroupComponent, decorators: [{
|
|
3568
3754
|
type: Component,
|
|
@@ -3572,10 +3758,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
3572
3758
|
useExisting: forwardRef(() => ChipGroupComponent),
|
|
3573
3759
|
multi: true,
|
|
3574
3760
|
},
|
|
3575
|
-
], template: "<div [class]=\"hostClasses()\" role=\"group\">\n @for (chip of chips(); track chip.value) {\n <span\n class=\"chip\"\n [class.chip--selected]=\"isSelected(chip)\"\n [class.chip--disabled]=\"chip.disabled || isDisabled()\"\n >\n <button\n type=\"button\"\n class=\"chip__label\"\n [disabled]=\"chip.disabled || isDisabled() || null\"\n [attr.aria-pressed]=\"selectable() ? isSelected(chip) : null\"\n (click)=\"toggle(chip)\"\n >\n {{ chip.label }}\n </button>\n\n @if (removable()) {\n <button\n type=\"button\"\n class=\"chip__remove\"\n [disabled]=\"chip.disabled || isDisabled() || null\"\n [attr.aria-label]=\"i18n.removeChip(chip.label)\"\n (click)=\"remove(chip, $event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"12\" />\n </button>\n }\n </span>\n }\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.chip-group{display:flex;flex-wrap:wrap;gap:.5rem}.chip{display:inline-flex;align-items:center;gap:.375rem;border-radius:999px;cursor:pointer;font-family:inherit;font-weight:500;transition:background .15s ease,color .15s ease,border-color .15s ease,box-shadow .15s ease;white-space:nowrap;position:relative}.chip:has(.chip__label:focus-visible){box-shadow:0 0 0 2px var(--primary-300, #a5b4fc)}.chip--disabled{opacity:.45;cursor:not-allowed}.chip__label,.chip__remove{appearance:none;background:none;border:0;padding:0;margin:0;color:inherit;font:inherit;cursor:inherit}.chip__label:disabled,.chip__remove:disabled{cursor:not-allowed}.chip__label{outline:none}.chip__label:after{content:\"\";position:absolute;inset:0;border-radius:inherit}.chip__remove{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;width:1rem;height:1rem;line-height:0;opacity:.6}.chip__remove:hover:not(:disabled){opacity:1}.chip__remove:focus-visible{opacity:1;outline:2px solid var(--primary-300, #a5b4fc);outline-offset:1px}.chip-group--sm .chip{font-size:.75rem;padding:.2rem .625rem}.chip-group--md .chip{font-size:.8125rem;padding:.3rem .875rem}.chip-group--lg .chip{font-size:.9375rem;padding:.4rem 1.125rem}.chip-group--soft .chip{background:var(--surface-muted, #f3f4f6);color:var(--text-secondary, #374151);border:1px solid transparent}.chip-group--soft .chip:hover:not(.chip--disabled){background:var(--surface-active, #e5e7eb);color:var(--text-base, #111827)}.chip-group--soft .chip--selected{background:var(--primary-100, #e0e7ff);color:var(--primary-700, #4338ca);border-color:var(--primary-200, #c7d2fe)}.chip-group--filled .chip{background:var(--surface-active, #e5e7eb);color:var(--text-secondary, #374151);border:1px solid transparent}.chip-group--filled .chip:hover:not(.chip--disabled){background:var(--border-input, #d1d5db)}.chip-group--filled .chip--selected{background:var(--primary
|
|
3761
|
+
], template: "<div [class]=\"hostClasses()\" role=\"group\">\n @for (chip of chips(); track chip.value) {\n <span\n class=\"chip\"\n [class.chip--selected]=\"isSelected(chip)\"\n [class.chip--disabled]=\"chip.disabled || isDisabled()\"\n >\n <button\n type=\"button\"\n class=\"chip__label\"\n [disabled]=\"chip.disabled || isDisabled() || null\"\n [attr.aria-pressed]=\"selectable() ? isSelected(chip) : null\"\n (click)=\"toggle(chip)\"\n >\n {{ chip.label }}\n </button>\n\n @if (removable()) {\n <button\n type=\"button\"\n class=\"chip__remove\"\n [disabled]=\"chip.disabled || isDisabled() || null\"\n [attr.aria-label]=\"i18n.removeChip(chip.label)\"\n (click)=\"remove(chip, $event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"12\" />\n </button>\n }\n </span>\n }\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.chip-group{display:flex;flex-wrap:wrap;gap:.5rem}.chip{display:inline-flex;align-items:center;gap:.375rem;border-radius:999px;cursor:pointer;font-family:inherit;font-weight:500;transition:background .15s ease,color .15s ease,border-color .15s ease,box-shadow .15s ease;white-space:nowrap;position:relative}.chip:has(.chip__label:focus-visible){box-shadow:0 0 0 2px var(--primary-300, #a5b4fc)}.chip--disabled{opacity:.45;cursor:not-allowed}.chip__label,.chip__remove{appearance:none;background:none;border:0;padding:0;margin:0;color:inherit;font:inherit;cursor:inherit}.chip__label:disabled,.chip__remove:disabled{cursor:not-allowed}.chip__label{outline:none}.chip__label:after{content:\"\";position:absolute;inset:0;border-radius:inherit}.chip__remove{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;width:1rem;height:1rem;line-height:0;opacity:.6}.chip__remove:hover:not(:disabled){opacity:1}.chip__remove:focus-visible{opacity:1;outline:2px solid var(--primary-300, #a5b4fc);outline-offset:1px}.chip-group--sm .chip{font-size:.75rem;padding:.2rem .625rem}.chip-group--md .chip{font-size:.8125rem;padding:.3rem .875rem}.chip-group--lg .chip{font-size:.9375rem;padding:.4rem 1.125rem}.chip-group--soft .chip{background:var(--surface-muted, #f3f4f6);color:var(--text-secondary, #374151);border:1px solid transparent}.chip-group--soft .chip:hover:not(.chip--disabled){background:var(--surface-active, #e5e7eb);color:var(--text-base, #111827)}.chip-group--soft .chip--selected{background:var(--primary-100, #e0e7ff);color:var(--primary-700, #4338ca);border-color:var(--primary-200, #c7d2fe)}.chip-group--filled .chip{background:var(--surface-active, #e5e7eb);color:var(--text-secondary, #374151);border:1px solid transparent}.chip-group--filled .chip:hover:not(.chip--disabled){background:var(--border-input, #d1d5db)}.chip-group--filled .chip--selected{background:var(--fill-primary, #4f46e5);color:var(--text-on-color, #fff);border-color:var(--primary-600, #4f46e5)}.chip-group--outline .chip{background:transparent;color:var(--text-muted, #6b7280);border:1px solid var(--border-input, #d1d5db)}.chip-group--outline .chip:hover:not(.chip--disabled){border-color:var(--text-placeholder, #6b7280);color:var(--text-base, #111827)}.chip-group--outline .chip--selected{border-color:var(--primary-500, #6366f1);color:var(--primary-700, #4338ca);background:var(--primary-50, #eef2ff)}\n"] }]
|
|
3576
3762
|
}], propDecorators: { chips: [{ type: i0.Input, args: [{ isSignal: true, alias: "chips", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }, { type: i0.Output, args: ["selectedChange"] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], multiSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiSelect", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], removed: [{ type: i0.Output, args: ["removed"] }] } });
|
|
3577
3763
|
|
|
3578
|
-
let nextId$
|
|
3764
|
+
let nextId$8 = 0;
|
|
3579
3765
|
class DateRangePickerComponent {
|
|
3580
3766
|
i18n = inject(NGX_DS_LABELS);
|
|
3581
3767
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
@@ -3593,7 +3779,7 @@ class DateRangePickerComponent {
|
|
|
3593
3779
|
isDisabled = computed(() => this.disabled() || this.#formDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
3594
3780
|
start = model(null, ...(ngDevMode ? [{ debugName: "start" }] : /* istanbul ignore next */ []));
|
|
3595
3781
|
end = model(null, ...(ngDevMode ? [{ debugName: "end" }] : /* istanbul ignore next */ []));
|
|
3596
|
-
id = `ngx-drp-${nextId$
|
|
3782
|
+
id = `ngx-drp-${nextId$8++}`;
|
|
3597
3783
|
messageId = `${this.id}-message`;
|
|
3598
3784
|
CalendarIcon = Calendar;
|
|
3599
3785
|
ChevronLeft = ChevronLeft;
|
|
@@ -3852,7 +4038,7 @@ class DateRangePickerComponent {
|
|
|
3852
4038
|
useExisting: forwardRef(() => DateRangePickerComponent),
|
|
3853
4039
|
multi: true,
|
|
3854
4040
|
},
|
|
3855
|
-
], viewQueries: [{ propertyName: "panelRef", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (label()) {\n <label class=\"drp__label\" [for]=\"id\">{{ label() }}</label>\n}\n\n<div class=\"drp\">\n <!-- Trigger -->\n <div\n #trigger\n [class]=\"triggerClasses()\"\n [id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n role=\"button\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n (click)=\"openCalendar()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n <ngx-ds-icon [icon]=\"CalendarIcon\" [size]=\"16\" class=\"drp__icon\" />\n <span class=\"drp__text\" [class.drp__text--placeholder]=\"!triggerLabel()\">\n {{ triggerLabel() || placeholderText() + ' \u2013 ' + placeholderText() }}\n </span>\n @if ((start() || end()) && !isDisabled()) {\n <button\n type=\"button\"\n class=\"drp__clear\"\n (click)=\"clear($event)\"\n [attr.aria-label]=\"i18n.clear\"\n >\n \u00D7\n </button>\n }\n </div>\n\n <!-- Calendars panel -->\n @if (isOpen()) {\n <div\n #panel\n class=\"drp__panel\"\n role=\"dialog\"\n [attr.aria-label]=\"i18n.selectDateRange\"\n (mouseleave)=\"onLeave()\"\n >\n <!-- Left calendar -->\n <div class=\"drp__calendar\">\n <div class=\"drp__cal-header\">\n <button\n type=\"button\"\n class=\"drp__nav-btn\"\n [attr.aria-label]=\"i18n.prevMonth\"\n (click)=\"prevMonth()\"\n >\n <ngx-ds-icon [icon]=\"ChevronLeft\" [size]=\"16\" />\n </button>\n <span class=\"drp__month-title\">{{ leftTitle() }}</span>\n <button\n type=\"button\"\n class=\"drp__nav-btn\"\n style=\"visibility: hidden\"\n aria-hidden=\"true\"\n tabindex=\"-1\"\n >\n <ngx-ds-icon [icon]=\"ChevronRight\" [size]=\"16\" />\n </button>\n </div>\n <div class=\"drp__weekdays\" aria-hidden=\"true\">\n @for (d of weekdays; track d) {\n <span class=\"drp__weekday\">{{ d }}</span>\n }\n </div>\n <div class=\"drp__grid\" role=\"grid\" [attr.aria-label]=\"leftTitle()\">\n @for (week of leftWeeks(); track $index) {\n <div class=\"drp__week\" role=\"row\">\n @for (cell of week; track cell.date.getTime()) {\n <button\n type=\"button\"\n class=\"drp__day\"\n role=\"gridcell\"\n [class.drp__day--other]=\"!cell.inMonth\"\n [class.drp__day--today]=\"cell.isToday\"\n [class.drp__day--start]=\"isStart(cell.date)\"\n [class.drp__day--end]=\"isEnd(cell.date)\"\n [class.drp__day--in-range]=\"inRange(cell.date)\"\n [class.drp__day--disabled]=\"cell.isDisabled\"\n [attr.aria-disabled]=\"cell.isDisabled || null\"\n [attr.aria-label]=\"dayLabel(cell.date)\"\n [attr.aria-selected]=\"isSelected(cell.date)\"\n [attr.aria-current]=\"cell.isToday ? 'date' : null\"\n [attr.tabindex]=\"isFocusTarget(cell) ? 0 : -1\"\n (click)=\"selectDay(cell)\"\n (mouseenter)=\"onHover(cell)\"\n (keydown)=\"onDayKeydown($event, cell)\"\n >\n {{ cell.date.getDate() }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n\n <div class=\"drp__divider\"></div>\n\n <!-- Right calendar -->\n <div class=\"drp__calendar\">\n <div class=\"drp__cal-header\">\n <button\n type=\"button\"\n class=\"drp__nav-btn\"\n style=\"visibility: hidden\"\n aria-hidden=\"true\"\n tabindex=\"-1\"\n >\n <ngx-ds-icon [icon]=\"ChevronLeft\" [size]=\"16\" />\n </button>\n <span class=\"drp__month-title\">{{ rightTitle() }}</span>\n <button\n type=\"button\"\n class=\"drp__nav-btn\"\n [attr.aria-label]=\"i18n.nextMonth\"\n (click)=\"nextMonth()\"\n >\n <ngx-ds-icon [icon]=\"ChevronRight\" [size]=\"16\" />\n </button>\n </div>\n <div class=\"drp__weekdays\" aria-hidden=\"true\">\n @for (d of weekdays; track d) {\n <span class=\"drp__weekday\">{{ d }}</span>\n }\n </div>\n <div class=\"drp__grid\" role=\"grid\" [attr.aria-label]=\"rightTitle()\">\n @for (week of rightWeeks(); track $index) {\n <div class=\"drp__week\" role=\"row\">\n @for (cell of week; track cell.date.getTime()) {\n <button\n type=\"button\"\n class=\"drp__day\"\n role=\"gridcell\"\n [class.drp__day--other]=\"!cell.inMonth\"\n [class.drp__day--today]=\"cell.isToday\"\n [class.drp__day--start]=\"isStart(cell.date)\"\n [class.drp__day--end]=\"isEnd(cell.date)\"\n [class.drp__day--in-range]=\"inRange(cell.date)\"\n [class.drp__day--disabled]=\"cell.isDisabled\"\n [attr.aria-disabled]=\"cell.isDisabled || null\"\n [attr.aria-label]=\"dayLabel(cell.date)\"\n [attr.aria-selected]=\"isSelected(cell.date)\"\n [attr.aria-current]=\"cell.isToday ? 'date' : null\"\n [attr.tabindex]=\"isFocusTarget(cell) ? 0 : -1\"\n (click)=\"selectDay(cell)\"\n (mouseenter)=\"onHover(cell)\"\n (keydown)=\"onDayKeydown($event, cell)\"\n >\n {{ cell.date.getDate() }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n }\n</div>\n\n@if (errorText()) {\n <p [id]=\"messageId\" role=\"alert\" class=\"drp__error\">{{ errorText() }}</p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"drp__hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.drp__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-base, #111827)}.drp{position:relative;display:inline-block}.drp__trigger{display:inline-flex;align-items:center;gap:.5rem;border:1px solid var(--border-input, #d1d5db);border-radius:.5rem;background:var(--surface-base, #ffffff);cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease}.drp__trigger--sm{padding:.375rem .75rem;font-size:.8125rem}.drp__trigger--md{padding:.5rem .875rem;font-size:.875rem}.drp__trigger--lg{padding:.625rem 1rem;font-size:1rem}.drp__trigger--open{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px var(--primary-100, #e0e7ff)}.drp__trigger--error{border-color:var(--danger-600, #dc2626)}.drp__trigger--disabled{background:var(--surface-subtle, #f9fafb);color:var(--text-disabled, #9ca3af);cursor:not-allowed}.drp__icon{color:var(--text-placeholder, #9ca3af);flex-shrink:0}.drp__text{flex:1;min-width:0;white-space:nowrap;color:var(--text-base, #111827)}.drp__text--placeholder{color:var(--text-placeholder, #9ca3af)}.drp__clear{background:none;border:none;padding:0;cursor:pointer;font-size:1.125rem;line-height:1;color:var(--text-placeholder, #9ca3af);display:flex;align-items:center}.drp__clear:hover{color:var(--text-base, #111827)}.drp__panel{position:absolute;top:calc(100% + .5rem);left:0;display:flex;gap:0;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.75rem;box-shadow:0 8px 24px #0000001f;z-index:1000;overflow:hidden}.drp__divider{width:1px;background:var(--border-base, #e5e7eb);margin:1rem 0}.drp__calendar{padding:1rem;width:17rem}.drp__cal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.drp__month-title{font-size:.9375rem;font-weight:600;color:var(--text-base, #111827)}.drp__nav-btn{background:none;border:none;cursor:pointer;padding:.25rem;border-radius:.375rem;display:flex;align-items:center;color:var(--text-muted, #6b7280);transition:background .1s ease}.drp__nav-btn:hover{background:var(--surface-hover, #f3f4f6);color:var(--text-base, #111827)}.drp__weekdays{display:grid;grid-template-columns:repeat(7,1fr);margin-bottom:.25rem}.drp__weekday{text-align:center;font-size:.75rem;font-weight:600;color:var(--text-placeholder, #9ca3af);padding:.25rem 0}.drp__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:.125rem}.drp__day{display:flex;align-items:center;justify-content:center;aspect-ratio:1;border:none;background:transparent;border-radius:.375rem;font-size:.8125rem;font-family:inherit;cursor:pointer;color:var(--text-base, #111827);transition:background .1s ease,color .1s ease}.drp__day:focus-visible{outline:2px solid var(--primary-300, #a5b4fc);outline-offset:1px}.drp__day:hover:not(.drp__day--disabled):not(.drp__day--in-range):not(.drp__day--start):not(.drp__day--end){background:var(--surface-hover, #f3f4f6)}.drp__day--other{color:var(--text-disabled, #d1d5db)}.drp__day--today{font-weight:700;color:var(--primary-600, #4f46e5)}.drp__day--in-range{background:var(--primary-50, #eef2ff);border-radius:0;color:var(--primary-700, #4338ca)}.drp__day--start,.drp__day--end{background:var(--primary-500, #6366f1);color:var(--text-on-color, #fff);font-weight:600;border-radius:.375rem}.drp__day--start.drp__day--in-range{border-radius:.375rem 0 0 .375rem}.drp__day--end.drp__day--in-range{border-radius:0 .375rem .375rem 0}.drp__day--disabled{opacity:.35;cursor:not-allowed}.drp__week{display:contents}.drp__hint{margin:.375rem 0 0;font-size:.8125rem;color:var(--text-muted, #6b7280)}.drp__error{margin:.375rem 0 0;font-size:.8125rem;color:var(--danger-600, #dc2626)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4041
|
+
], viewQueries: [{ propertyName: "panelRef", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (label()) {\n <label class=\"drp__label\" [for]=\"id\">{{ label() }}</label>\n}\n\n<div class=\"drp\">\n <!-- Trigger -->\n <div\n #trigger\n [class]=\"triggerClasses()\"\n [id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n role=\"button\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n (click)=\"openCalendar()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n <ngx-ds-icon [icon]=\"CalendarIcon\" [size]=\"16\" class=\"drp__icon\" />\n <span class=\"drp__text\" [class.drp__text--placeholder]=\"!triggerLabel()\">\n {{ triggerLabel() || placeholderText() + ' \u2013 ' + placeholderText() }}\n </span>\n @if ((start() || end()) && !isDisabled()) {\n <button\n type=\"button\"\n class=\"drp__clear\"\n (click)=\"clear($event)\"\n [attr.aria-label]=\"i18n.clear\"\n >\n \u00D7\n </button>\n }\n </div>\n\n <!-- Calendars panel -->\n @if (isOpen()) {\n <div\n #panel\n class=\"drp__panel\"\n role=\"dialog\"\n [attr.aria-label]=\"i18n.selectDateRange\"\n (mouseleave)=\"onLeave()\"\n >\n <!-- Left calendar -->\n <div class=\"drp__calendar\">\n <div class=\"drp__cal-header\">\n <button\n type=\"button\"\n class=\"drp__nav-btn\"\n [attr.aria-label]=\"i18n.prevMonth\"\n (click)=\"prevMonth()\"\n >\n <ngx-ds-icon [icon]=\"ChevronLeft\" [size]=\"16\" />\n </button>\n <span class=\"drp__month-title\">{{ leftTitle() }}</span>\n <button\n type=\"button\"\n class=\"drp__nav-btn\"\n style=\"visibility: hidden\"\n aria-hidden=\"true\"\n tabindex=\"-1\"\n >\n <ngx-ds-icon [icon]=\"ChevronRight\" [size]=\"16\" />\n </button>\n </div>\n <div class=\"drp__weekdays\" aria-hidden=\"true\">\n @for (d of weekdays; track d) {\n <span class=\"drp__weekday\">{{ d }}</span>\n }\n </div>\n <div class=\"drp__grid\" role=\"grid\" [attr.aria-label]=\"leftTitle()\">\n @for (week of leftWeeks(); track $index) {\n <div class=\"drp__week\" role=\"row\">\n @for (cell of week; track cell.date.getTime()) {\n <button\n type=\"button\"\n class=\"drp__day\"\n role=\"gridcell\"\n [class.drp__day--other]=\"!cell.inMonth\"\n [class.drp__day--today]=\"cell.isToday\"\n [class.drp__day--start]=\"isStart(cell.date)\"\n [class.drp__day--end]=\"isEnd(cell.date)\"\n [class.drp__day--in-range]=\"inRange(cell.date)\"\n [class.drp__day--disabled]=\"cell.isDisabled\"\n [attr.aria-disabled]=\"cell.isDisabled || null\"\n [attr.aria-label]=\"dayLabel(cell.date)\"\n [attr.aria-selected]=\"isSelected(cell.date)\"\n [attr.aria-current]=\"cell.isToday ? 'date' : null\"\n [attr.tabindex]=\"isFocusTarget(cell) ? 0 : -1\"\n (click)=\"selectDay(cell)\"\n (mouseenter)=\"onHover(cell)\"\n (keydown)=\"onDayKeydown($event, cell)\"\n >\n {{ cell.date.getDate() }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n\n <div class=\"drp__divider\"></div>\n\n <!-- Right calendar -->\n <div class=\"drp__calendar\">\n <div class=\"drp__cal-header\">\n <button\n type=\"button\"\n class=\"drp__nav-btn\"\n style=\"visibility: hidden\"\n aria-hidden=\"true\"\n tabindex=\"-1\"\n >\n <ngx-ds-icon [icon]=\"ChevronLeft\" [size]=\"16\" />\n </button>\n <span class=\"drp__month-title\">{{ rightTitle() }}</span>\n <button\n type=\"button\"\n class=\"drp__nav-btn\"\n [attr.aria-label]=\"i18n.nextMonth\"\n (click)=\"nextMonth()\"\n >\n <ngx-ds-icon [icon]=\"ChevronRight\" [size]=\"16\" />\n </button>\n </div>\n <div class=\"drp__weekdays\" aria-hidden=\"true\">\n @for (d of weekdays; track d) {\n <span class=\"drp__weekday\">{{ d }}</span>\n }\n </div>\n <div class=\"drp__grid\" role=\"grid\" [attr.aria-label]=\"rightTitle()\">\n @for (week of rightWeeks(); track $index) {\n <div class=\"drp__week\" role=\"row\">\n @for (cell of week; track cell.date.getTime()) {\n <button\n type=\"button\"\n class=\"drp__day\"\n role=\"gridcell\"\n [class.drp__day--other]=\"!cell.inMonth\"\n [class.drp__day--today]=\"cell.isToday\"\n [class.drp__day--start]=\"isStart(cell.date)\"\n [class.drp__day--end]=\"isEnd(cell.date)\"\n [class.drp__day--in-range]=\"inRange(cell.date)\"\n [class.drp__day--disabled]=\"cell.isDisabled\"\n [attr.aria-disabled]=\"cell.isDisabled || null\"\n [attr.aria-label]=\"dayLabel(cell.date)\"\n [attr.aria-selected]=\"isSelected(cell.date)\"\n [attr.aria-current]=\"cell.isToday ? 'date' : null\"\n [attr.tabindex]=\"isFocusTarget(cell) ? 0 : -1\"\n (click)=\"selectDay(cell)\"\n (mouseenter)=\"onHover(cell)\"\n (keydown)=\"onDayKeydown($event, cell)\"\n >\n {{ cell.date.getDate() }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n }\n</div>\n\n@if (errorText()) {\n <p [id]=\"messageId\" role=\"alert\" class=\"drp__error\">{{ errorText() }}</p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"drp__hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.drp__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-base, #111827)}.drp{position:relative;display:inline-block}.drp__trigger{display:inline-flex;align-items:center;gap:.5rem;border:1px solid var(--border-input, #d1d5db);border-radius:.5rem;background:var(--surface-base, #ffffff);cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease}.drp__trigger--sm{padding:.375rem .75rem;font-size:.8125rem}.drp__trigger--md{padding:.5rem .875rem;font-size:.875rem}.drp__trigger--lg{padding:.625rem 1rem;font-size:1rem}.drp__trigger--open{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px var(--primary-100, #e0e7ff)}.drp__trigger--error{border-color:var(--danger-600, #dc2626)}.drp__trigger--disabled{background:var(--surface-subtle, #f9fafb);color:var(--text-disabled, #9ca3af);cursor:not-allowed}.drp__icon{color:var(--text-placeholder, #6b7280);flex-shrink:0}.drp__text{flex:1;min-width:0;white-space:nowrap;color:var(--text-base, #111827)}.drp__text--placeholder{color:var(--text-placeholder, #6b7280)}.drp__clear{background:none;border:none;padding:0;cursor:pointer;font-size:1.125rem;line-height:1;color:var(--text-placeholder, #6b7280);display:flex;align-items:center}.drp__clear:hover{color:var(--text-base, #111827)}.drp__panel{position:absolute;top:calc(100% + .5rem);left:0;display:flex;gap:0;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.75rem;box-shadow:0 8px 24px #0000001f;z-index:1000;overflow:hidden}.drp__divider{width:1px;background:var(--border-base, #e5e7eb);margin:1rem 0}.drp__calendar{padding:1rem;width:17rem}.drp__cal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.drp__month-title{font-size:.9375rem;font-weight:600;color:var(--text-base, #111827)}.drp__nav-btn{background:none;border:none;cursor:pointer;padding:.25rem;border-radius:.375rem;display:flex;align-items:center;color:var(--text-muted, #6b7280);transition:background .1s ease}.drp__nav-btn:hover{background:var(--surface-hover, #f3f4f6);color:var(--text-base, #111827)}.drp__weekdays{display:grid;grid-template-columns:repeat(7,1fr);margin-bottom:.25rem}.drp__weekday{text-align:center;font-size:.75rem;font-weight:600;color:var(--text-placeholder, #6b7280);padding:.25rem 0}.drp__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:.125rem}.drp__day{display:flex;align-items:center;justify-content:center;aspect-ratio:1;border:none;background:transparent;border-radius:.375rem;font-size:.8125rem;font-family:inherit;cursor:pointer;color:var(--text-base, #111827);transition:background .1s ease,color .1s ease}.drp__day:focus-visible{outline:2px solid var(--primary-300, #a5b4fc);outline-offset:1px}.drp__day:hover:not(.drp__day--disabled):not(.drp__day--in-range):not(.drp__day--start):not(.drp__day--end){background:var(--surface-hover, #f3f4f6)}.drp__day--other{color:var(--text-muted, #6b7280)}.drp__day--today{font-weight:700;color:var(--primary-600, #4f46e5)}.drp__day--in-range{background:var(--primary-50, #eef2ff);border-radius:0;color:var(--primary-700, #4338ca)}.drp__day--start,.drp__day--end{background:var(--fill-primary, #4f46e5);color:var(--text-on-color, #fff);font-weight:600;border-radius:.375rem}.drp__day--start.drp__day--in-range{border-radius:.375rem 0 0 .375rem}.drp__day--end.drp__day--in-range{border-radius:0 .375rem .375rem 0}.drp__day--disabled{opacity:.35;cursor:not-allowed}.drp__week{display:contents}.drp__hint{margin:.375rem 0 0;font-size:.8125rem;color:var(--text-muted, #6b7280)}.drp__error{margin:.375rem 0 0;font-size:.8125rem;color:var(--danger-600, #dc2626)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3856
4042
|
}
|
|
3857
4043
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DateRangePickerComponent, decorators: [{
|
|
3858
4044
|
type: Component,
|
|
@@ -3862,7 +4048,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
3862
4048
|
useExisting: forwardRef(() => DateRangePickerComponent),
|
|
3863
4049
|
multi: true,
|
|
3864
4050
|
},
|
|
3865
|
-
], template: "@if (label()) {\n <label class=\"drp__label\" [for]=\"id\">{{ label() }}</label>\n}\n\n<div class=\"drp\">\n <!-- Trigger -->\n <div\n #trigger\n [class]=\"triggerClasses()\"\n [id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n role=\"button\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n (click)=\"openCalendar()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n <ngx-ds-icon [icon]=\"CalendarIcon\" [size]=\"16\" class=\"drp__icon\" />\n <span class=\"drp__text\" [class.drp__text--placeholder]=\"!triggerLabel()\">\n {{ triggerLabel() || placeholderText() + ' \u2013 ' + placeholderText() }}\n </span>\n @if ((start() || end()) && !isDisabled()) {\n <button\n type=\"button\"\n class=\"drp__clear\"\n (click)=\"clear($event)\"\n [attr.aria-label]=\"i18n.clear\"\n >\n \u00D7\n </button>\n }\n </div>\n\n <!-- Calendars panel -->\n @if (isOpen()) {\n <div\n #panel\n class=\"drp__panel\"\n role=\"dialog\"\n [attr.aria-label]=\"i18n.selectDateRange\"\n (mouseleave)=\"onLeave()\"\n >\n <!-- Left calendar -->\n <div class=\"drp__calendar\">\n <div class=\"drp__cal-header\">\n <button\n type=\"button\"\n class=\"drp__nav-btn\"\n [attr.aria-label]=\"i18n.prevMonth\"\n (click)=\"prevMonth()\"\n >\n <ngx-ds-icon [icon]=\"ChevronLeft\" [size]=\"16\" />\n </button>\n <span class=\"drp__month-title\">{{ leftTitle() }}</span>\n <button\n type=\"button\"\n class=\"drp__nav-btn\"\n style=\"visibility: hidden\"\n aria-hidden=\"true\"\n tabindex=\"-1\"\n >\n <ngx-ds-icon [icon]=\"ChevronRight\" [size]=\"16\" />\n </button>\n </div>\n <div class=\"drp__weekdays\" aria-hidden=\"true\">\n @for (d of weekdays; track d) {\n <span class=\"drp__weekday\">{{ d }}</span>\n }\n </div>\n <div class=\"drp__grid\" role=\"grid\" [attr.aria-label]=\"leftTitle()\">\n @for (week of leftWeeks(); track $index) {\n <div class=\"drp__week\" role=\"row\">\n @for (cell of week; track cell.date.getTime()) {\n <button\n type=\"button\"\n class=\"drp__day\"\n role=\"gridcell\"\n [class.drp__day--other]=\"!cell.inMonth\"\n [class.drp__day--today]=\"cell.isToday\"\n [class.drp__day--start]=\"isStart(cell.date)\"\n [class.drp__day--end]=\"isEnd(cell.date)\"\n [class.drp__day--in-range]=\"inRange(cell.date)\"\n [class.drp__day--disabled]=\"cell.isDisabled\"\n [attr.aria-disabled]=\"cell.isDisabled || null\"\n [attr.aria-label]=\"dayLabel(cell.date)\"\n [attr.aria-selected]=\"isSelected(cell.date)\"\n [attr.aria-current]=\"cell.isToday ? 'date' : null\"\n [attr.tabindex]=\"isFocusTarget(cell) ? 0 : -1\"\n (click)=\"selectDay(cell)\"\n (mouseenter)=\"onHover(cell)\"\n (keydown)=\"onDayKeydown($event, cell)\"\n >\n {{ cell.date.getDate() }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n\n <div class=\"drp__divider\"></div>\n\n <!-- Right calendar -->\n <div class=\"drp__calendar\">\n <div class=\"drp__cal-header\">\n <button\n type=\"button\"\n class=\"drp__nav-btn\"\n style=\"visibility: hidden\"\n aria-hidden=\"true\"\n tabindex=\"-1\"\n >\n <ngx-ds-icon [icon]=\"ChevronLeft\" [size]=\"16\" />\n </button>\n <span class=\"drp__month-title\">{{ rightTitle() }}</span>\n <button\n type=\"button\"\n class=\"drp__nav-btn\"\n [attr.aria-label]=\"i18n.nextMonth\"\n (click)=\"nextMonth()\"\n >\n <ngx-ds-icon [icon]=\"ChevronRight\" [size]=\"16\" />\n </button>\n </div>\n <div class=\"drp__weekdays\" aria-hidden=\"true\">\n @for (d of weekdays; track d) {\n <span class=\"drp__weekday\">{{ d }}</span>\n }\n </div>\n <div class=\"drp__grid\" role=\"grid\" [attr.aria-label]=\"rightTitle()\">\n @for (week of rightWeeks(); track $index) {\n <div class=\"drp__week\" role=\"row\">\n @for (cell of week; track cell.date.getTime()) {\n <button\n type=\"button\"\n class=\"drp__day\"\n role=\"gridcell\"\n [class.drp__day--other]=\"!cell.inMonth\"\n [class.drp__day--today]=\"cell.isToday\"\n [class.drp__day--start]=\"isStart(cell.date)\"\n [class.drp__day--end]=\"isEnd(cell.date)\"\n [class.drp__day--in-range]=\"inRange(cell.date)\"\n [class.drp__day--disabled]=\"cell.isDisabled\"\n [attr.aria-disabled]=\"cell.isDisabled || null\"\n [attr.aria-label]=\"dayLabel(cell.date)\"\n [attr.aria-selected]=\"isSelected(cell.date)\"\n [attr.aria-current]=\"cell.isToday ? 'date' : null\"\n [attr.tabindex]=\"isFocusTarget(cell) ? 0 : -1\"\n (click)=\"selectDay(cell)\"\n (mouseenter)=\"onHover(cell)\"\n (keydown)=\"onDayKeydown($event, cell)\"\n >\n {{ cell.date.getDate() }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n }\n</div>\n\n@if (errorText()) {\n <p [id]=\"messageId\" role=\"alert\" class=\"drp__error\">{{ errorText() }}</p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"drp__hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.drp__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-base, #111827)}.drp{position:relative;display:inline-block}.drp__trigger{display:inline-flex;align-items:center;gap:.5rem;border:1px solid var(--border-input, #d1d5db);border-radius:.5rem;background:var(--surface-base, #ffffff);cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease}.drp__trigger--sm{padding:.375rem .75rem;font-size:.8125rem}.drp__trigger--md{padding:.5rem .875rem;font-size:.875rem}.drp__trigger--lg{padding:.625rem 1rem;font-size:1rem}.drp__trigger--open{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px var(--primary-100, #e0e7ff)}.drp__trigger--error{border-color:var(--danger-600, #dc2626)}.drp__trigger--disabled{background:var(--surface-subtle, #f9fafb);color:var(--text-disabled, #9ca3af);cursor:not-allowed}.drp__icon{color:var(--text-placeholder, #9ca3af);flex-shrink:0}.drp__text{flex:1;min-width:0;white-space:nowrap;color:var(--text-base, #111827)}.drp__text--placeholder{color:var(--text-placeholder, #9ca3af)}.drp__clear{background:none;border:none;padding:0;cursor:pointer;font-size:1.125rem;line-height:1;color:var(--text-placeholder, #9ca3af);display:flex;align-items:center}.drp__clear:hover{color:var(--text-base, #111827)}.drp__panel{position:absolute;top:calc(100% + .5rem);left:0;display:flex;gap:0;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.75rem;box-shadow:0 8px 24px #0000001f;z-index:1000;overflow:hidden}.drp__divider{width:1px;background:var(--border-base, #e5e7eb);margin:1rem 0}.drp__calendar{padding:1rem;width:17rem}.drp__cal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.drp__month-title{font-size:.9375rem;font-weight:600;color:var(--text-base, #111827)}.drp__nav-btn{background:none;border:none;cursor:pointer;padding:.25rem;border-radius:.375rem;display:flex;align-items:center;color:var(--text-muted, #6b7280);transition:background .1s ease}.drp__nav-btn:hover{background:var(--surface-hover, #f3f4f6);color:var(--text-base, #111827)}.drp__weekdays{display:grid;grid-template-columns:repeat(7,1fr);margin-bottom:.25rem}.drp__weekday{text-align:center;font-size:.75rem;font-weight:600;color:var(--text-placeholder, #9ca3af);padding:.25rem 0}.drp__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:.125rem}.drp__day{display:flex;align-items:center;justify-content:center;aspect-ratio:1;border:none;background:transparent;border-radius:.375rem;font-size:.8125rem;font-family:inherit;cursor:pointer;color:var(--text-base, #111827);transition:background .1s ease,color .1s ease}.drp__day:focus-visible{outline:2px solid var(--primary-300, #a5b4fc);outline-offset:1px}.drp__day:hover:not(.drp__day--disabled):not(.drp__day--in-range):not(.drp__day--start):not(.drp__day--end){background:var(--surface-hover, #f3f4f6)}.drp__day--other{color:var(--text-disabled, #d1d5db)}.drp__day--today{font-weight:700;color:var(--primary-600, #4f46e5)}.drp__day--in-range{background:var(--primary-50, #eef2ff);border-radius:0;color:var(--primary-700, #4338ca)}.drp__day--start,.drp__day--end{background:var(--primary-500, #6366f1);color:var(--text-on-color, #fff);font-weight:600;border-radius:.375rem}.drp__day--start.drp__day--in-range{border-radius:.375rem 0 0 .375rem}.drp__day--end.drp__day--in-range{border-radius:0 .375rem .375rem 0}.drp__day--disabled{opacity:.35;cursor:not-allowed}.drp__week{display:contents}.drp__hint{margin:.375rem 0 0;font-size:.8125rem;color:var(--text-muted, #6b7280)}.drp__error{margin:.375rem 0 0;font-size:.8125rem;color:var(--danger-600, #dc2626)}\n"] }]
|
|
4051
|
+
], template: "@if (label()) {\n <label class=\"drp__label\" [for]=\"id\">{{ label() }}</label>\n}\n\n<div class=\"drp\">\n <!-- Trigger -->\n <div\n #trigger\n [class]=\"triggerClasses()\"\n [id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n role=\"button\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n (click)=\"openCalendar()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n <ngx-ds-icon [icon]=\"CalendarIcon\" [size]=\"16\" class=\"drp__icon\" />\n <span class=\"drp__text\" [class.drp__text--placeholder]=\"!triggerLabel()\">\n {{ triggerLabel() || placeholderText() + ' \u2013 ' + placeholderText() }}\n </span>\n @if ((start() || end()) && !isDisabled()) {\n <button\n type=\"button\"\n class=\"drp__clear\"\n (click)=\"clear($event)\"\n [attr.aria-label]=\"i18n.clear\"\n >\n \u00D7\n </button>\n }\n </div>\n\n <!-- Calendars panel -->\n @if (isOpen()) {\n <div\n #panel\n class=\"drp__panel\"\n role=\"dialog\"\n [attr.aria-label]=\"i18n.selectDateRange\"\n (mouseleave)=\"onLeave()\"\n >\n <!-- Left calendar -->\n <div class=\"drp__calendar\">\n <div class=\"drp__cal-header\">\n <button\n type=\"button\"\n class=\"drp__nav-btn\"\n [attr.aria-label]=\"i18n.prevMonth\"\n (click)=\"prevMonth()\"\n >\n <ngx-ds-icon [icon]=\"ChevronLeft\" [size]=\"16\" />\n </button>\n <span class=\"drp__month-title\">{{ leftTitle() }}</span>\n <button\n type=\"button\"\n class=\"drp__nav-btn\"\n style=\"visibility: hidden\"\n aria-hidden=\"true\"\n tabindex=\"-1\"\n >\n <ngx-ds-icon [icon]=\"ChevronRight\" [size]=\"16\" />\n </button>\n </div>\n <div class=\"drp__weekdays\" aria-hidden=\"true\">\n @for (d of weekdays; track d) {\n <span class=\"drp__weekday\">{{ d }}</span>\n }\n </div>\n <div class=\"drp__grid\" role=\"grid\" [attr.aria-label]=\"leftTitle()\">\n @for (week of leftWeeks(); track $index) {\n <div class=\"drp__week\" role=\"row\">\n @for (cell of week; track cell.date.getTime()) {\n <button\n type=\"button\"\n class=\"drp__day\"\n role=\"gridcell\"\n [class.drp__day--other]=\"!cell.inMonth\"\n [class.drp__day--today]=\"cell.isToday\"\n [class.drp__day--start]=\"isStart(cell.date)\"\n [class.drp__day--end]=\"isEnd(cell.date)\"\n [class.drp__day--in-range]=\"inRange(cell.date)\"\n [class.drp__day--disabled]=\"cell.isDisabled\"\n [attr.aria-disabled]=\"cell.isDisabled || null\"\n [attr.aria-label]=\"dayLabel(cell.date)\"\n [attr.aria-selected]=\"isSelected(cell.date)\"\n [attr.aria-current]=\"cell.isToday ? 'date' : null\"\n [attr.tabindex]=\"isFocusTarget(cell) ? 0 : -1\"\n (click)=\"selectDay(cell)\"\n (mouseenter)=\"onHover(cell)\"\n (keydown)=\"onDayKeydown($event, cell)\"\n >\n {{ cell.date.getDate() }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n\n <div class=\"drp__divider\"></div>\n\n <!-- Right calendar -->\n <div class=\"drp__calendar\">\n <div class=\"drp__cal-header\">\n <button\n type=\"button\"\n class=\"drp__nav-btn\"\n style=\"visibility: hidden\"\n aria-hidden=\"true\"\n tabindex=\"-1\"\n >\n <ngx-ds-icon [icon]=\"ChevronLeft\" [size]=\"16\" />\n </button>\n <span class=\"drp__month-title\">{{ rightTitle() }}</span>\n <button\n type=\"button\"\n class=\"drp__nav-btn\"\n [attr.aria-label]=\"i18n.nextMonth\"\n (click)=\"nextMonth()\"\n >\n <ngx-ds-icon [icon]=\"ChevronRight\" [size]=\"16\" />\n </button>\n </div>\n <div class=\"drp__weekdays\" aria-hidden=\"true\">\n @for (d of weekdays; track d) {\n <span class=\"drp__weekday\">{{ d }}</span>\n }\n </div>\n <div class=\"drp__grid\" role=\"grid\" [attr.aria-label]=\"rightTitle()\">\n @for (week of rightWeeks(); track $index) {\n <div class=\"drp__week\" role=\"row\">\n @for (cell of week; track cell.date.getTime()) {\n <button\n type=\"button\"\n class=\"drp__day\"\n role=\"gridcell\"\n [class.drp__day--other]=\"!cell.inMonth\"\n [class.drp__day--today]=\"cell.isToday\"\n [class.drp__day--start]=\"isStart(cell.date)\"\n [class.drp__day--end]=\"isEnd(cell.date)\"\n [class.drp__day--in-range]=\"inRange(cell.date)\"\n [class.drp__day--disabled]=\"cell.isDisabled\"\n [attr.aria-disabled]=\"cell.isDisabled || null\"\n [attr.aria-label]=\"dayLabel(cell.date)\"\n [attr.aria-selected]=\"isSelected(cell.date)\"\n [attr.aria-current]=\"cell.isToday ? 'date' : null\"\n [attr.tabindex]=\"isFocusTarget(cell) ? 0 : -1\"\n (click)=\"selectDay(cell)\"\n (mouseenter)=\"onHover(cell)\"\n (keydown)=\"onDayKeydown($event, cell)\"\n >\n {{ cell.date.getDate() }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n }\n</div>\n\n@if (errorText()) {\n <p [id]=\"messageId\" role=\"alert\" class=\"drp__error\">{{ errorText() }}</p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"drp__hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.drp__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-base, #111827)}.drp{position:relative;display:inline-block}.drp__trigger{display:inline-flex;align-items:center;gap:.5rem;border:1px solid var(--border-input, #d1d5db);border-radius:.5rem;background:var(--surface-base, #ffffff);cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease}.drp__trigger--sm{padding:.375rem .75rem;font-size:.8125rem}.drp__trigger--md{padding:.5rem .875rem;font-size:.875rem}.drp__trigger--lg{padding:.625rem 1rem;font-size:1rem}.drp__trigger--open{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px var(--primary-100, #e0e7ff)}.drp__trigger--error{border-color:var(--danger-600, #dc2626)}.drp__trigger--disabled{background:var(--surface-subtle, #f9fafb);color:var(--text-disabled, #9ca3af);cursor:not-allowed}.drp__icon{color:var(--text-placeholder, #6b7280);flex-shrink:0}.drp__text{flex:1;min-width:0;white-space:nowrap;color:var(--text-base, #111827)}.drp__text--placeholder{color:var(--text-placeholder, #6b7280)}.drp__clear{background:none;border:none;padding:0;cursor:pointer;font-size:1.125rem;line-height:1;color:var(--text-placeholder, #6b7280);display:flex;align-items:center}.drp__clear:hover{color:var(--text-base, #111827)}.drp__panel{position:absolute;top:calc(100% + .5rem);left:0;display:flex;gap:0;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.75rem;box-shadow:0 8px 24px #0000001f;z-index:1000;overflow:hidden}.drp__divider{width:1px;background:var(--border-base, #e5e7eb);margin:1rem 0}.drp__calendar{padding:1rem;width:17rem}.drp__cal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.drp__month-title{font-size:.9375rem;font-weight:600;color:var(--text-base, #111827)}.drp__nav-btn{background:none;border:none;cursor:pointer;padding:.25rem;border-radius:.375rem;display:flex;align-items:center;color:var(--text-muted, #6b7280);transition:background .1s ease}.drp__nav-btn:hover{background:var(--surface-hover, #f3f4f6);color:var(--text-base, #111827)}.drp__weekdays{display:grid;grid-template-columns:repeat(7,1fr);margin-bottom:.25rem}.drp__weekday{text-align:center;font-size:.75rem;font-weight:600;color:var(--text-placeholder, #6b7280);padding:.25rem 0}.drp__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:.125rem}.drp__day{display:flex;align-items:center;justify-content:center;aspect-ratio:1;border:none;background:transparent;border-radius:.375rem;font-size:.8125rem;font-family:inherit;cursor:pointer;color:var(--text-base, #111827);transition:background .1s ease,color .1s ease}.drp__day:focus-visible{outline:2px solid var(--primary-300, #a5b4fc);outline-offset:1px}.drp__day:hover:not(.drp__day--disabled):not(.drp__day--in-range):not(.drp__day--start):not(.drp__day--end){background:var(--surface-hover, #f3f4f6)}.drp__day--other{color:var(--text-muted, #6b7280)}.drp__day--today{font-weight:700;color:var(--primary-600, #4f46e5)}.drp__day--in-range{background:var(--primary-50, #eef2ff);border-radius:0;color:var(--primary-700, #4338ca)}.drp__day--start,.drp__day--end{background:var(--fill-primary, #4f46e5);color:var(--text-on-color, #fff);font-weight:600;border-radius:.375rem}.drp__day--start.drp__day--in-range{border-radius:.375rem 0 0 .375rem}.drp__day--end.drp__day--in-range{border-radius:0 .375rem .375rem 0}.drp__day--disabled{opacity:.35;cursor:not-allowed}.drp__week{display:contents}.drp__hint{margin:.375rem 0 0;font-size:.8125rem;color:var(--text-muted, #6b7280)}.drp__error{margin:.375rem 0 0;font-size:.8125rem;color:var(--danger-600, #dc2626)}\n"] }]
|
|
3866
4052
|
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], start: [{ type: i0.Input, args: [{ isSignal: true, alias: "start", required: false }] }, { type: i0.Output, args: ["startChange"] }], end: [{ type: i0.Input, args: [{ isSignal: true, alias: "end", required: false }] }, { type: i0.Output, args: ["endChange"] }], panelRef: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], triggerRef: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }] } });
|
|
3867
4053
|
|
|
3868
4054
|
function hexToHsl(hex) {
|
|
@@ -3913,10 +4099,10 @@ function hslToHex(h, s, l) {
|
|
|
3913
4099
|
};
|
|
3914
4100
|
return `#${f(0)}${f(8)}${f(4)}`;
|
|
3915
4101
|
}
|
|
3916
|
-
let nextId$
|
|
4102
|
+
let nextId$7 = 0;
|
|
3917
4103
|
class ColorPickerComponent {
|
|
3918
4104
|
i18n = inject(NGX_DS_LABELS);
|
|
3919
|
-
id = `ngx-color-picker-${nextId$
|
|
4105
|
+
id = `ngx-color-picker-${nextId$7++}`;
|
|
3920
4106
|
value = model('#6366f1', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3921
4107
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
3922
4108
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
@@ -3994,7 +4180,7 @@ class ColorPickerComponent {
|
|
|
3994
4180
|
useExisting: forwardRef(() => ColorPickerComponent),
|
|
3995
4181
|
multi: true,
|
|
3996
4182
|
},
|
|
3997
|
-
], ngImport: i0, template: "@if (label()) {\n <span class=\"cp__label\" [id]=\"id + '-label'\">{{ label() }}</span>\n}\n\n<div\n class=\"cp\"\n [class.cp--disabled]=\"isDisabled()\"\n role=\"group\"\n [attr.aria-labelledby]=\"label() ? id + '-label' : null\"\n>\n <!-- Preview swatch -->\n <div class=\"cp__preview\" [style]=\"previewStyle()\"></div>\n\n <div class=\"cp__sliders\">\n <!-- Hue slider -->\n <label class=\"cp__slider-label\" [for]=\"id + '-hue'\">{{ i18n.colorHue }}</label>\n <input\n [id]=\"id + '-hue'\"\n type=\"range\"\n class=\"cp__range cp__range--hue\"\n [value]=\"hue()\"\n min=\"0\"\n max=\"360\"\n step=\"1\"\n [disabled]=\"isDisabled() || null\"\n (input)=\"onHueChange($event)\"\n />\n\n <!-- Saturation slider -->\n <label class=\"cp__slider-label\" [for]=\"id + '-sat'\">{{ i18n.colorSaturation }}</label>\n <input\n [id]=\"id + '-sat'\"\n type=\"range\"\n class=\"cp__range cp__range--sat\"\n [value]=\"saturation()\"\n min=\"0\"\n max=\"100\"\n step=\"1\"\n [disabled]=\"isDisabled() || null\"\n [style.background]=\"gradientStyle()\"\n (input)=\"onSatChange($event)\"\n />\n\n <!-- Lightness slider -->\n <label class=\"cp__slider-label\" [for]=\"id + '-light'\">{{ i18n.colorLightness }}</label>\n <input\n [id]=\"id + '-light'\"\n type=\"range\"\n class=\"cp__range cp__range--light\"\n [value]=\"lightness()\"\n min=\"0\"\n max=\"100\"\n step=\"1\"\n [disabled]=\"isDisabled() || null\"\n [style.background]=\"lightnessStyle()\"\n (input)=\"onLightChange($event)\"\n />\n </div>\n\n <!-- Hex input -->\n <
|
|
4183
|
+
], ngImport: i0, template: "@if (label()) {\n <span class=\"cp__label\" [id]=\"id + '-label'\">{{ label() }}</span>\n}\n\n<div\n class=\"cp\"\n [class.cp--disabled]=\"isDisabled()\"\n role=\"group\"\n [attr.aria-labelledby]=\"label() ? id + '-label' : null\"\n>\n <!-- Preview swatch -->\n <div class=\"cp__preview\" [style]=\"previewStyle()\"></div>\n\n <div class=\"cp__sliders\">\n <!-- Hue slider -->\n <label class=\"cp__slider-label\" [for]=\"id + '-hue'\">{{ i18n.colorHue }}</label>\n <input\n [id]=\"id + '-hue'\"\n type=\"range\"\n class=\"cp__range cp__range--hue\"\n [value]=\"hue()\"\n min=\"0\"\n max=\"360\"\n step=\"1\"\n [disabled]=\"isDisabled() || null\"\n (input)=\"onHueChange($event)\"\n />\n\n <!-- Saturation slider -->\n <label class=\"cp__slider-label\" [for]=\"id + '-sat'\">{{ i18n.colorSaturation }}</label>\n <input\n [id]=\"id + '-sat'\"\n type=\"range\"\n class=\"cp__range cp__range--sat\"\n [value]=\"saturation()\"\n min=\"0\"\n max=\"100\"\n step=\"1\"\n [disabled]=\"isDisabled() || null\"\n [style.background]=\"gradientStyle()\"\n (input)=\"onSatChange($event)\"\n />\n\n <!-- Lightness slider -->\n <label class=\"cp__slider-label\" [for]=\"id + '-light'\">{{ i18n.colorLightness }}</label>\n <input\n [id]=\"id + '-light'\"\n type=\"range\"\n class=\"cp__range cp__range--light\"\n [value]=\"lightness()\"\n min=\"0\"\n max=\"100\"\n step=\"1\"\n [disabled]=\"isDisabled() || null\"\n [style.background]=\"lightnessStyle()\"\n (input)=\"onLightChange($event)\"\n />\n </div>\n\n <!-- Hex input (the label wraps it, so \"HEX\" counts as the disabled control's label) -->\n <label class=\"cp__hex-row\">\n <input\n type=\"text\"\n class=\"cp__hex-input\"\n [value]=\"hexInput()\"\n maxlength=\"7\"\n placeholder=\"#000000\"\n [attr.aria-label]=\"i18n.colorHex\"\n [disabled]=\"isDisabled() || null\"\n (input)=\"onHexInput($event)\"\n />\n <span class=\"cp__hex-label\">HEX</span>\n </label>\n</div>\n", styles: [":host{display:inline-block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.cp__label{display:block;margin-bottom:.5rem;font-size:.875rem;font-weight:500;color:var(--text-base, #111827)}.cp{display:flex;flex-direction:column;gap:.75rem;padding:1rem;border:1px solid var(--border-base, #e5e7eb);border-radius:.75rem;background:var(--surface-base, #ffffff);width:240px}.cp--disabled{opacity:.5;pointer-events:none}.cp__preview{width:100%;height:3rem;border-radius:.5rem;border:1px solid var(--border-base, #e5e7eb)}.cp__sliders{display:flex;flex-direction:column;gap:.5rem}.cp__slider-label{font-size:.75rem;color:var(--text-muted, #6b7280);margin-bottom:.125rem}.cp__range{-webkit-appearance:none;width:100%;height:.625rem;border-radius:999px;outline:none;cursor:pointer}.cp__range--hue{background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.cp__range::-webkit-slider-thumb{-webkit-appearance:none;width:1.125rem;height:1.125rem;border-radius:50%;background:var(--surface-thumb, #fff);border:2px solid var(--border-input, #d1d5db);box-shadow:0 1px 4px #0003;cursor:pointer}.cp__range::-moz-range-thumb{width:1.125rem;height:1.125rem;border-radius:50%;background:var(--surface-thumb, #fff);border:2px solid var(--border-input, #d1d5db);box-shadow:0 1px 4px #0003;cursor:pointer}.cp__hex-row{display:flex;align-items:center;gap:.5rem}.cp__hex-input{flex:1;background:var(--surface-base, #fff);border:1px solid var(--border-input, #d1d5db);border-radius:.375rem;padding:.375rem .5rem;font-family:ui-monospace,monospace;font-size:.875rem;color:var(--text-base, #111827);outline:none;text-transform:uppercase}.cp__hex-input:focus{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 2px var(--primary-100, #e0e7ff)}.cp__hex-label{font-size:.75rem;font-weight:600;color:var(--text-muted, #6b7280);letter-spacing:.05em}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3998
4184
|
}
|
|
3999
4185
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ColorPickerComponent, decorators: [{
|
|
4000
4186
|
type: Component,
|
|
@@ -4004,7 +4190,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
4004
4190
|
useExisting: forwardRef(() => ColorPickerComponent),
|
|
4005
4191
|
multi: true,
|
|
4006
4192
|
},
|
|
4007
|
-
], template: "@if (label()) {\n <span class=\"cp__label\" [id]=\"id + '-label'\">{{ label() }}</span>\n}\n\n<div\n class=\"cp\"\n [class.cp--disabled]=\"isDisabled()\"\n role=\"group\"\n [attr.aria-labelledby]=\"label() ? id + '-label' : null\"\n>\n <!-- Preview swatch -->\n <div class=\"cp__preview\" [style]=\"previewStyle()\"></div>\n\n <div class=\"cp__sliders\">\n <!-- Hue slider -->\n <label class=\"cp__slider-label\" [for]=\"id + '-hue'\">{{ i18n.colorHue }}</label>\n <input\n [id]=\"id + '-hue'\"\n type=\"range\"\n class=\"cp__range cp__range--hue\"\n [value]=\"hue()\"\n min=\"0\"\n max=\"360\"\n step=\"1\"\n [disabled]=\"isDisabled() || null\"\n (input)=\"onHueChange($event)\"\n />\n\n <!-- Saturation slider -->\n <label class=\"cp__slider-label\" [for]=\"id + '-sat'\">{{ i18n.colorSaturation }}</label>\n <input\n [id]=\"id + '-sat'\"\n type=\"range\"\n class=\"cp__range cp__range--sat\"\n [value]=\"saturation()\"\n min=\"0\"\n max=\"100\"\n step=\"1\"\n [disabled]=\"isDisabled() || null\"\n [style.background]=\"gradientStyle()\"\n (input)=\"onSatChange($event)\"\n />\n\n <!-- Lightness slider -->\n <label class=\"cp__slider-label\" [for]=\"id + '-light'\">{{ i18n.colorLightness }}</label>\n <input\n [id]=\"id + '-light'\"\n type=\"range\"\n class=\"cp__range cp__range--light\"\n [value]=\"lightness()\"\n min=\"0\"\n max=\"100\"\n step=\"1\"\n [disabled]=\"isDisabled() || null\"\n [style.background]=\"lightnessStyle()\"\n (input)=\"onLightChange($event)\"\n />\n </div>\n\n <!-- Hex input -->\n <
|
|
4193
|
+
], template: "@if (label()) {\n <span class=\"cp__label\" [id]=\"id + '-label'\">{{ label() }}</span>\n}\n\n<div\n class=\"cp\"\n [class.cp--disabled]=\"isDisabled()\"\n role=\"group\"\n [attr.aria-labelledby]=\"label() ? id + '-label' : null\"\n>\n <!-- Preview swatch -->\n <div class=\"cp__preview\" [style]=\"previewStyle()\"></div>\n\n <div class=\"cp__sliders\">\n <!-- Hue slider -->\n <label class=\"cp__slider-label\" [for]=\"id + '-hue'\">{{ i18n.colorHue }}</label>\n <input\n [id]=\"id + '-hue'\"\n type=\"range\"\n class=\"cp__range cp__range--hue\"\n [value]=\"hue()\"\n min=\"0\"\n max=\"360\"\n step=\"1\"\n [disabled]=\"isDisabled() || null\"\n (input)=\"onHueChange($event)\"\n />\n\n <!-- Saturation slider -->\n <label class=\"cp__slider-label\" [for]=\"id + '-sat'\">{{ i18n.colorSaturation }}</label>\n <input\n [id]=\"id + '-sat'\"\n type=\"range\"\n class=\"cp__range cp__range--sat\"\n [value]=\"saturation()\"\n min=\"0\"\n max=\"100\"\n step=\"1\"\n [disabled]=\"isDisabled() || null\"\n [style.background]=\"gradientStyle()\"\n (input)=\"onSatChange($event)\"\n />\n\n <!-- Lightness slider -->\n <label class=\"cp__slider-label\" [for]=\"id + '-light'\">{{ i18n.colorLightness }}</label>\n <input\n [id]=\"id + '-light'\"\n type=\"range\"\n class=\"cp__range cp__range--light\"\n [value]=\"lightness()\"\n min=\"0\"\n max=\"100\"\n step=\"1\"\n [disabled]=\"isDisabled() || null\"\n [style.background]=\"lightnessStyle()\"\n (input)=\"onLightChange($event)\"\n />\n </div>\n\n <!-- Hex input (the label wraps it, so \"HEX\" counts as the disabled control's label) -->\n <label class=\"cp__hex-row\">\n <input\n type=\"text\"\n class=\"cp__hex-input\"\n [value]=\"hexInput()\"\n maxlength=\"7\"\n placeholder=\"#000000\"\n [attr.aria-label]=\"i18n.colorHex\"\n [disabled]=\"isDisabled() || null\"\n (input)=\"onHexInput($event)\"\n />\n <span class=\"cp__hex-label\">HEX</span>\n </label>\n</div>\n", styles: [":host{display:inline-block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.cp__label{display:block;margin-bottom:.5rem;font-size:.875rem;font-weight:500;color:var(--text-base, #111827)}.cp{display:flex;flex-direction:column;gap:.75rem;padding:1rem;border:1px solid var(--border-base, #e5e7eb);border-radius:.75rem;background:var(--surface-base, #ffffff);width:240px}.cp--disabled{opacity:.5;pointer-events:none}.cp__preview{width:100%;height:3rem;border-radius:.5rem;border:1px solid var(--border-base, #e5e7eb)}.cp__sliders{display:flex;flex-direction:column;gap:.5rem}.cp__slider-label{font-size:.75rem;color:var(--text-muted, #6b7280);margin-bottom:.125rem}.cp__range{-webkit-appearance:none;width:100%;height:.625rem;border-radius:999px;outline:none;cursor:pointer}.cp__range--hue{background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.cp__range::-webkit-slider-thumb{-webkit-appearance:none;width:1.125rem;height:1.125rem;border-radius:50%;background:var(--surface-thumb, #fff);border:2px solid var(--border-input, #d1d5db);box-shadow:0 1px 4px #0003;cursor:pointer}.cp__range::-moz-range-thumb{width:1.125rem;height:1.125rem;border-radius:50%;background:var(--surface-thumb, #fff);border:2px solid var(--border-input, #d1d5db);box-shadow:0 1px 4px #0003;cursor:pointer}.cp__hex-row{display:flex;align-items:center;gap:.5rem}.cp__hex-input{flex:1;background:var(--surface-base, #fff);border:1px solid var(--border-input, #d1d5db);border-radius:.375rem;padding:.375rem .5rem;font-family:ui-monospace,monospace;font-size:.875rem;color:var(--text-base, #111827);outline:none;text-transform:uppercase}.cp__hex-input:focus{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 2px var(--primary-100, #e0e7ff)}.cp__hex-label{font-size:.75rem;font-weight:600;color:var(--text-muted, #6b7280);letter-spacing:.05em}\n"] }]
|
|
4008
4194
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
4009
4195
|
|
|
4010
4196
|
class ButtonGroupComponent {
|
|
@@ -4058,7 +4244,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
4058
4244
|
args: [{ selector: 'ngx-ds-avatar-group', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"avatar-group\" [style]=\"hostStyle()\">\n <ng-content />\n @if (hiddenCount() > 0) {\n <span class=\"avatar-group__count\" [class]=\"'avatar-group__count--' + size()\"\n >+{{ hiddenCount() }}</span\n >\n }\n</div>\n", styles: [":host{display:inline-flex;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.avatar-group{--ag-overlap: -.5rem;display:inline-flex;align-items:center}.avatar-group ::ng-deep ngx-ds-avatar{display:inline-flex;margin-left:var(--ag-overlap);outline:2px solid var(--surface-base, #fff);border-radius:9999px}.avatar-group ::ng-deep ngx-ds-avatar:first-child{margin-left:0}.avatar-group__count{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;margin-left:var(--ag-overlap);border-radius:9999px;outline:2px solid var(--surface-base, #fff);background:var(--surface-muted, #f3f4f6);color:var(--text-secondary, #4b5563);font-weight:600;-webkit-user-select:none;user-select:none}.avatar-group__count--xs{width:1.5rem;height:1.5rem;font-size:.625rem}.avatar-group__count--sm{width:2rem;height:2rem;font-size:.75rem}.avatar-group__count--md{width:2.5rem;height:2.5rem;font-size:.875rem}.avatar-group__count--lg{width:3rem;height:3rem;font-size:1rem}.avatar-group__count--xl{width:4rem;height:4rem;font-size:1.25rem}\n"] }]
|
|
4059
4245
|
}], ctorParameters: () => [], propDecorators: { max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], spacing: [{ type: i0.Input, args: [{ isSignal: true, alias: "spacing", required: false }] }], avatarRefs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => AvatarComponent), { ...{ read: ElementRef }, isSignal: true }] }] } });
|
|
4060
4246
|
|
|
4061
|
-
const ICON_SIZE$
|
|
4247
|
+
const ICON_SIZE$4 = { sm: 14, md: 16, lg: 18 };
|
|
4062
4248
|
class MenuComponent {
|
|
4063
4249
|
items = input.required(...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
4064
4250
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
@@ -4070,7 +4256,7 @@ class MenuComponent {
|
|
|
4070
4256
|
activeIndex = signal(0, ...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
4071
4257
|
openSubmenu = signal(null, ...(ngDevMode ? [{ debugName: "openSubmenu" }] : /* istanbul ignore next */ []));
|
|
4072
4258
|
chevronRight = ChevronRight;
|
|
4073
|
-
iconSize = computed(() => ICON_SIZE$
|
|
4259
|
+
iconSize = computed(() => ICON_SIZE$4[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
4074
4260
|
constructor() {
|
|
4075
4261
|
afterNextRender(() => {
|
|
4076
4262
|
if (this.autofocus()) {
|
|
@@ -4164,7 +4350,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
4164
4350
|
}, template: "@for (item of items(); track item.id; let i = $index) {\n @if (item.separator) {\n <ngx-ds-divider />\n }\n <div class=\"menu__item-wrapper\">\n <button\n #itemBtn\n type=\"button\"\n role=\"menuitem\"\n class=\"menu__item\"\n [class.menu__item--danger]=\"item.danger\"\n [class.menu__item--active]=\"activeIndex() === i\"\n [disabled]=\"item.disabled\"\n [attr.aria-haspopup]=\"item.children?.length ? 'menu' : null\"\n [attr.aria-expanded]=\"item.children?.length ? openSubmenu() === item.id : null\"\n [attr.tabindex]=\"activeIndex() === i ? 0 : -1\"\n (click)=\"onItemClick(item, i)\"\n >\n @if (item.icon) {\n <ngx-ds-icon [icon]=\"item.icon\" [size]=\"iconSize()\" class=\"menu__item-icon\" />\n }\n <span class=\"menu__item-label\">{{ item.label }}</span>\n @if (item.kbd) {\n <ngx-ds-kbd size=\"sm\" class=\"menu__item-kbd\">{{ item.kbd }}</ngx-ds-kbd>\n }\n @if (item.children?.length) {\n <ngx-ds-icon [icon]=\"chevronRight\" [size]=\"14\" class=\"menu__item-chevron\" />\n }\n </button>\n\n @if (item.children?.length && openSubmenu() === item.id) {\n <div class=\"menu__submenu\">\n <ngx-ds-menu\n [items]=\"item.children!\"\n [size]=\"size()\"\n [autofocus]=\"true\"\n (itemClick)=\"onSubmenuItemClick($event)\"\n (closed)=\"onSubmenuClosed(i)\"\n />\n </div>\n }\n </div>\n}\n", styles: [":host{display:inline-flex;flex-direction:column;min-width:12rem;padding:.375rem;background:var(--surface-base, #fff);border:1px solid var(--border-base, #e5e7eb);border-radius:.5rem;box-shadow:0 4px 12px #00000014;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif);outline:none}.menu__item-wrapper{position:relative}.menu__item{display:flex;align-items:center;gap:.5rem;width:100%;border:none;background:transparent;cursor:pointer;border-radius:.375rem;padding:.5rem .625rem;font-size:.875rem;color:var(--text-base, #111827);text-align:left;white-space:nowrap;transition:background .12s ease,color .12s ease}.menu__item:hover:not(:disabled),.menu__item--active{background:var(--surface-hover, #f3f4f6)}.menu__item:focus-visible{outline:2px solid var(--primary-600, #4f46e5);outline-offset:-2px}.menu__item:disabled{opacity:.5;cursor:not-allowed}.menu__item--danger{color:var(--danger-600, #dc2626)}.menu__item--danger:hover:not(:disabled){background:#ef444414}.menu__item-icon{flex-shrink:0}.menu__item-label{flex:1;overflow:hidden;text-overflow:ellipsis}.menu__item-kbd,.menu__item-chevron{flex-shrink:0}.menu__submenu{position:absolute;top:0;left:100%;z-index:10;padding-left:.25rem}\n"] }]
|
|
4165
4351
|
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], closed: [{ type: i0.Output, args: ["closed"] }], itemBtns: [{ type: i0.ViewChildren, args: ['itemBtn', { isSignal: true }] }] } });
|
|
4166
4352
|
|
|
4167
|
-
let nextId$
|
|
4353
|
+
let nextId$6 = 0;
|
|
4168
4354
|
class FormFieldComponent {
|
|
4169
4355
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
4170
4356
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
@@ -4172,7 +4358,7 @@ class FormFieldComponent {
|
|
|
4172
4358
|
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
4173
4359
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
4174
4360
|
for = input(null, ...(ngDevMode ? [{ debugName: "for" }] : /* istanbul ignore next */ []));
|
|
4175
|
-
generatedId = `ngx-ff-${nextId$
|
|
4361
|
+
generatedId = `ngx-ff-${nextId$6++}`;
|
|
4176
4362
|
fieldId = computed(() => this.for() ?? this.generatedId, ...(ngDevMode ? [{ debugName: "fieldId" }] : /* istanbul ignore next */ []));
|
|
4177
4363
|
hintId = computed(() => `${this.fieldId()}-hint`, ...(ngDevMode ? [{ debugName: "hintId" }] : /* istanbul ignore next */ []));
|
|
4178
4364
|
errorId = computed(() => `${this.fieldId()}-error`, ...(ngDevMode ? [{ debugName: "errorId" }] : /* istanbul ignore next */ []));
|
|
@@ -4203,14 +4389,14 @@ class FormFieldComponent {
|
|
|
4203
4389
|
});
|
|
4204
4390
|
}
|
|
4205
4391
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: FormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4206
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: FormFieldComponent, isStandalone: true, selector: "ngx-ds-form-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, for: { classPropertyName: "for", publicName: "for", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (label()) {\n <label [for]=\"fieldId()\" class=\"ngx-ff__label\">\n {{ label() }}\n @if (required()) {\n <span class=\"ngx-ff__required\" aria-hidden=\"true\">*</span>\n }\n </label>\n}\n\n<div class=\"ngx-ff__control\" [class.ngx-ff__control--disabled]=\"disabled()\">\n <ng-content />\n</div>\n\n@if (error()) {\n <p [id]=\"errorId()\" class=\"ngx-ff__message ngx-ff__message--error\" role=\"alert\">{{ error() }}</p>\n} @else if (hint()) {\n <p [id]=\"hintId()\" class=\"ngx-ff__message ngx-ff__message--hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-ff__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-ff__required{margin-left:.125rem;color:var(--danger
|
|
4392
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: FormFieldComponent, isStandalone: true, selector: "ngx-ds-form-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, for: { classPropertyName: "for", publicName: "for", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (label()) {\n <label [for]=\"fieldId()\" class=\"ngx-ff__label\">\n {{ label() }}\n @if (required()) {\n <span class=\"ngx-ff__required\" aria-hidden=\"true\">*</span>\n }\n </label>\n}\n\n<div class=\"ngx-ff__control\" [class.ngx-ff__control--disabled]=\"disabled()\">\n <ng-content />\n</div>\n\n@if (error()) {\n <p [id]=\"errorId()\" class=\"ngx-ff__message ngx-ff__message--error\" role=\"alert\">{{ error() }}</p>\n} @else if (hint()) {\n <p [id]=\"hintId()\" class=\"ngx-ff__message ngx-ff__message--hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-ff__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-ff__required{margin-left:.125rem;color:var(--fill-danger, #dc2626)}.ngx-ff__control--disabled{opacity:.6;pointer-events:none}.ngx-ff__message{margin-top:.375rem;font-size:.75rem;line-height:1.4}.ngx-ff__message--hint{color:var(--text-muted, #6b7280)}.ngx-ff__message--error{color:var(--fill-danger, #dc2626)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4207
4393
|
}
|
|
4208
4394
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
4209
4395
|
type: Component,
|
|
4210
|
-
args: [{ selector: 'ngx-ds-form-field', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (label()) {\n <label [for]=\"fieldId()\" class=\"ngx-ff__label\">\n {{ label() }}\n @if (required()) {\n <span class=\"ngx-ff__required\" aria-hidden=\"true\">*</span>\n }\n </label>\n}\n\n<div class=\"ngx-ff__control\" [class.ngx-ff__control--disabled]=\"disabled()\">\n <ng-content />\n</div>\n\n@if (error()) {\n <p [id]=\"errorId()\" class=\"ngx-ff__message ngx-ff__message--error\" role=\"alert\">{{ error() }}</p>\n} @else if (hint()) {\n <p [id]=\"hintId()\" class=\"ngx-ff__message ngx-ff__message--hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-ff__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-ff__required{margin-left:.125rem;color:var(--danger
|
|
4396
|
+
args: [{ selector: 'ngx-ds-form-field', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (label()) {\n <label [for]=\"fieldId()\" class=\"ngx-ff__label\">\n {{ label() }}\n @if (required()) {\n <span class=\"ngx-ff__required\" aria-hidden=\"true\">*</span>\n }\n </label>\n}\n\n<div class=\"ngx-ff__control\" [class.ngx-ff__control--disabled]=\"disabled()\">\n <ng-content />\n</div>\n\n@if (error()) {\n <p [id]=\"errorId()\" class=\"ngx-ff__message ngx-ff__message--error\" role=\"alert\">{{ error() }}</p>\n} @else if (hint()) {\n <p [id]=\"hintId()\" class=\"ngx-ff__message ngx-ff__message--hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-ff__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-ff__required{margin-left:.125rem;color:var(--fill-danger, #dc2626)}.ngx-ff__control--disabled{opacity:.6;pointer-events:none}.ngx-ff__message{margin-top:.375rem;font-size:.75rem;line-height:1.4}.ngx-ff__message--hint{color:var(--text-muted, #6b7280)}.ngx-ff__message--error{color:var(--fill-danger, #dc2626)}\n"] }]
|
|
4211
4397
|
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], for: [{ type: i0.Input, args: [{ isSignal: true, alias: "for", required: false }] }] } });
|
|
4212
4398
|
|
|
4213
|
-
const ICON_SIZE$
|
|
4399
|
+
const ICON_SIZE$3 = { sm: 14, md: 16, lg: 18 };
|
|
4214
4400
|
const LAST_MINUTE = 23 * 60 + 59;
|
|
4215
4401
|
const pad = (n) => String(n).padStart(2, '0');
|
|
4216
4402
|
/** Parses `HH:mm` into minutes since midnight, or `null` when it is not a valid time. */
|
|
@@ -4225,7 +4411,7 @@ function parseTime(value) {
|
|
|
4225
4411
|
function formatTime(total) {
|
|
4226
4412
|
return `${pad(Math.floor(total / 60))}:${pad(total % 60)}`;
|
|
4227
4413
|
}
|
|
4228
|
-
let nextId$
|
|
4414
|
+
let nextId$5 = 0;
|
|
4229
4415
|
/**
|
|
4230
4416
|
* Time field with an hour / minute (and AM/PM) panel.
|
|
4231
4417
|
* The value is a 24-hour `HH:mm` string, like a native `<input type="time">`.
|
|
@@ -4253,7 +4439,7 @@ class TimePickerComponent {
|
|
|
4253
4439
|
// ── Value ────────────────────────────────────────────────
|
|
4254
4440
|
/** Selected time as `HH:mm` (24-hour), or `null`. */
|
|
4255
4441
|
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
4256
|
-
id = `ngx-time-picker-${nextId$
|
|
4442
|
+
id = `ngx-time-picker-${nextId$5++}`;
|
|
4257
4443
|
messageId = `${this.id}-message`;
|
|
4258
4444
|
ClockIcon = Clock;
|
|
4259
4445
|
XIcon = X;
|
|
@@ -4286,7 +4472,7 @@ class TimePickerComponent {
|
|
|
4286
4472
|
return values;
|
|
4287
4473
|
}, ...(ngDevMode ? [{ debugName: "#minuteValues" }] : /* istanbul ignore next */ []));
|
|
4288
4474
|
// ── Derived ───────────────────────────────────────────────
|
|
4289
|
-
iconSize = computed(() => ICON_SIZE$
|
|
4475
|
+
iconSize = computed(() => ICON_SIZE$3[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
4290
4476
|
is12h = computed(() => this.hourFormat() === '12', ...(ngDevMode ? [{ debugName: "is12h" }] : /* istanbul ignore next */ []));
|
|
4291
4477
|
hasError = computed(() => fieldHasError(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "hasError" }] : /* istanbul ignore next */ []));
|
|
4292
4478
|
errorText = computed(() => fieldErrorText(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
@@ -4342,6 +4528,7 @@ class TimePickerComponent {
|
|
|
4342
4528
|
this.hasError() ? `${base}--error` : '',
|
|
4343
4529
|
this.isDisabled() ? `${base}--disabled` : '',
|
|
4344
4530
|
this.floatingLabel() ? `${base}--floating` : '',
|
|
4531
|
+
this.hasValue() && !this.isDisabled() ? `${base}--clearable` : '',
|
|
4345
4532
|
]
|
|
4346
4533
|
.filter(Boolean)
|
|
4347
4534
|
.join(' ');
|
|
@@ -4521,7 +4708,7 @@ class TimePickerComponent {
|
|
|
4521
4708
|
useExisting: forwardRef(() => TimePickerComponent),
|
|
4522
4709
|
multi: true,
|
|
4523
4710
|
},
|
|
4524
|
-
], viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "panelRef", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-time-picker__label\">{{ label() }}</label>\n}\n\n<!-- Field trigger -->\n<div\n #trigger\n
|
|
4711
|
+
], viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "panelRef", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-time-picker__label\">{{ label() }}</label>\n}\n\n<!-- Field trigger. The clear button is a sibling: a button inside\n role=\"button\" would be a nested interactive control. -->\n<div class=\"ngx-time-picker__control\">\n <div\n #trigger\n [class]=\"fieldClasses()\"\n (click)=\"togglePanel()\"\n (keydown)=\"onTriggerKeydown($event)\"\n [attr.id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n role=\"button\"\n aria-haspopup=\"dialog\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-disabled]=\"isDisabled()\"\n >\n @if (floatingLabel() && label()) {\n <span [class]=\"floatLabelClasses()\">{{ label() }}</span>\n }\n\n <span class=\"ngx-time-picker__icon\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"ClockIcon\" [size]=\"iconSize()\" />\n </span>\n\n <span class=\"ngx-time-picker__display\">\n @if (displayValue()) {\n <span class=\"ngx-time-picker__value\">{{ displayValue() }}</span>\n } @else {\n <span class=\"ngx-time-picker__placeholder\">{{\n placeholder() ?? i18n.timePlaceholder\n }}</span>\n }\n </span>\n </div>\n\n @if (hasValue() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"ngx-time-picker__clear\"\n [attr.aria-label]=\"i18n.clearTime\"\n (click)=\"clearValue($event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"iconSize()\" />\n </button>\n }\n</div>\n\n<!-- Panel -->\n@if (isOpen()) {\n <div #panel class=\"ngx-time-picker__panel\" role=\"dialog\" [attr.aria-label]=\"i18n.selectTime\">\n <ng-container\n *ngTemplateOutlet=\"\n column;\n context: { options: hourOptions(), label: i18n.hours, kind: 'hour' }\n \"\n />\n <ng-container\n *ngTemplateOutlet=\"\n column;\n context: { options: minuteOptions(), label: i18n.minutes, kind: 'minute' }\n \"\n />\n @if (is12h()) {\n <ng-container\n *ngTemplateOutlet=\"\n column;\n context: { options: periodOptions(), label: i18n.timePeriod, kind: 'period' }\n \"\n />\n }\n </div>\n}\n\n<ng-template #column let-options=\"options\" let-label=\"label\" let-kind=\"kind\">\n <div class=\"ngx-time-picker__column\" role=\"listbox\" [attr.aria-label]=\"label\">\n @for (option of options; track option.value) {\n <button\n type=\"button\"\n role=\"option\"\n class=\"ngx-time-picker__option\"\n [class.ngx-time-picker__option--selected]=\"option.selected\"\n [class.ngx-time-picker__option--disabled]=\"option.disabled\"\n [attr.aria-selected]=\"option.selected\"\n [attr.aria-disabled]=\"option.disabled || null\"\n [attr.tabindex]=\"isFocusTarget(options, option) ? 0 : -1\"\n (click)=\"select(kind, option); $event.stopPropagation()\"\n (keydown)=\"onOptionKeydown($event)\"\n >\n {{ option.label }}\n </button>\n }\n </div>\n</ng-template>\n\n<!-- Error / Hint -->\n@if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-time-picker__message ngx-time-picker__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-time-picker__message ngx-time-picker__message--hint\">\n {{ hint() }}\n </p>\n}\n", styles: [":host{display:block;position:relative;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-time-picker__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-time-picker__field{position:relative;display:flex;align-items:center;gap:.5rem;width:100%;min-height:2.375rem;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color .15s ease,box-shadow .15s ease}.ngx-time-picker__field:focus-visible{outline:none;border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-time-picker__field--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-time-picker__field--error{border-color:var(--danger-500, #ef4444)}.ngx-time-picker__field--error.ngx-time-picker__field--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-time-picker__field--disabled{background:var(--surface-subtle, #f9fafb);color:var(--text-placeholder, #6b7280);cursor:not-allowed}.ngx-time-picker__field--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-time-picker__field--md{padding:.5rem .75rem;font-size:.875rem}.ngx-time-picker__field--lg{padding:.625rem 1rem;font-size:1rem}.ngx-time-picker__float-label{position:absolute;left:2.25rem;top:50%;transform:translateY(-50%);padding:0;font-size:inherit;line-height:1;white-space:nowrap;color:var(--text-placeholder, #6b7280);background:transparent;pointer-events:none;transition:top .15s ease,font-size .15s ease,color .15s ease,padding .15s ease}.ngx-time-picker__float-label--active{top:0;padding:0 .25rem;font-size:.7rem;color:var(--fill-primary, #4f46e5);background:var(--surface-base, #fff)}.ngx-time-picker__float-label--focused:not(.ngx-time-picker__float-label--error){color:var(--fill-primary, #4f46e5)}.ngx-time-picker__float-label--error{color:var(--fill-danger, #dc2626)}.ngx-time-picker__icon{display:inline-flex;flex-shrink:0;align-items:center;color:var(--text-placeholder, #6b7280)}.ngx-time-picker__display{flex:1;min-width:0}.ngx-time-picker__value{display:block;color:var(--text-base, #111827);font-variant-numeric:tabular-nums}.ngx-time-picker__placeholder{display:block;color:var(--text-placeholder, #6b7280)}.ngx-time-picker__control{position:relative}.ngx-time-picker__field.ngx-time-picker__field--clearable{padding-right:2.25rem}.ngx-time-picker__clear{position:absolute;top:50%;right:.375rem;display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;padding:0;color:var(--text-placeholder, #6b7280);background:transparent;border:none;border-radius:.25rem;transform:translateY(-50%);cursor:pointer;transition:color .15s ease}.ngx-time-picker__clear:hover{color:var(--text-muted, #6b7280)}.ngx-time-picker__clear:focus-visible{outline:2px solid var(--primary-500, #6366f1);outline-offset:1px}.ngx-time-picker__panel{position:absolute;top:calc(100% + .25rem);left:0;z-index:100;display:flex;padding:.375rem;gap:.25rem;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.5rem;box-shadow:0 8px 24px #0000001f}.ngx-time-picker__column{position:relative;display:flex;flex-direction:column;gap:2px;width:3.25rem;max-height:13.5rem;overflow-y:auto;scrollbar-width:none}.ngx-time-picker__column::-webkit-scrollbar{display:none}.ngx-time-picker__column+.ngx-time-picker__column{padding-left:.25rem;border-left:1px solid var(--border-subtle, #f3f4f6)}.ngx-time-picker__option{flex-shrink:0;height:2rem;padding:0;font-family:inherit;font-size:.8125rem;font-variant-numeric:tabular-nums;color:var(--text-secondary, #374151);background:transparent;border:none;border-radius:.375rem;cursor:pointer;transition:background .1s ease,color .1s ease}.ngx-time-picker__option:focus-visible{outline:2px solid var(--primary-300, #a5b4fc);outline-offset:-2px}.ngx-time-picker__option:hover:not(.ngx-time-picker__option--disabled):not(.ngx-time-picker__option--selected){color:var(--text-base, #111827);background:var(--surface-muted, #f3f4f6)}.ngx-time-picker__option--selected{font-weight:600;color:var(--text-on-color, #fff);background:var(--primary-500, #6366f1)}.ngx-time-picker__option--selected:hover{background:var(--primary-600, #4f46e5)}.ngx-time-picker__option--disabled{color:var(--text-disabled, #d1d5db);cursor:not-allowed}.ngx-time-picker__message{margin-top:.375rem;font-size:.75rem;line-height:1.4}.ngx-time-picker__message--hint{color:var(--text-muted, #6b7280)}.ngx-time-picker__message--error{color:var(--fill-danger, #dc2626)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4525
4712
|
}
|
|
4526
4713
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TimePickerComponent, decorators: [{
|
|
4527
4714
|
type: Component,
|
|
@@ -4531,10 +4718,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
4531
4718
|
useExisting: forwardRef(() => TimePickerComponent),
|
|
4532
4719
|
multi: true,
|
|
4533
4720
|
},
|
|
4534
|
-
], template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-time-picker__label\">{{ label() }}</label>\n}\n\n<!-- Field trigger -->\n<div\n #trigger\n
|
|
4721
|
+
], template: "<!-- Static label -->\n@if (!floatingLabel() && label()) {\n <label [for]=\"id\" class=\"ngx-time-picker__label\">{{ label() }}</label>\n}\n\n<!-- Field trigger. The clear button is a sibling: a button inside\n role=\"button\" would be a nested interactive control. -->\n<div class=\"ngx-time-picker__control\">\n <div\n #trigger\n [class]=\"fieldClasses()\"\n (click)=\"togglePanel()\"\n (keydown)=\"onTriggerKeydown($event)\"\n [attr.id]=\"id\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n role=\"button\"\n aria-haspopup=\"dialog\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-disabled]=\"isDisabled()\"\n >\n @if (floatingLabel() && label()) {\n <span [class]=\"floatLabelClasses()\">{{ label() }}</span>\n }\n\n <span class=\"ngx-time-picker__icon\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"ClockIcon\" [size]=\"iconSize()\" />\n </span>\n\n <span class=\"ngx-time-picker__display\">\n @if (displayValue()) {\n <span class=\"ngx-time-picker__value\">{{ displayValue() }}</span>\n } @else {\n <span class=\"ngx-time-picker__placeholder\">{{\n placeholder() ?? i18n.timePlaceholder\n }}</span>\n }\n </span>\n </div>\n\n @if (hasValue() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"ngx-time-picker__clear\"\n [attr.aria-label]=\"i18n.clearTime\"\n (click)=\"clearValue($event)\"\n >\n <ngx-ds-icon [icon]=\"XIcon\" [size]=\"iconSize()\" />\n </button>\n }\n</div>\n\n<!-- Panel -->\n@if (isOpen()) {\n <div #panel class=\"ngx-time-picker__panel\" role=\"dialog\" [attr.aria-label]=\"i18n.selectTime\">\n <ng-container\n *ngTemplateOutlet=\"\n column;\n context: { options: hourOptions(), label: i18n.hours, kind: 'hour' }\n \"\n />\n <ng-container\n *ngTemplateOutlet=\"\n column;\n context: { options: minuteOptions(), label: i18n.minutes, kind: 'minute' }\n \"\n />\n @if (is12h()) {\n <ng-container\n *ngTemplateOutlet=\"\n column;\n context: { options: periodOptions(), label: i18n.timePeriod, kind: 'period' }\n \"\n />\n }\n </div>\n}\n\n<ng-template #column let-options=\"options\" let-label=\"label\" let-kind=\"kind\">\n <div class=\"ngx-time-picker__column\" role=\"listbox\" [attr.aria-label]=\"label\">\n @for (option of options; track option.value) {\n <button\n type=\"button\"\n role=\"option\"\n class=\"ngx-time-picker__option\"\n [class.ngx-time-picker__option--selected]=\"option.selected\"\n [class.ngx-time-picker__option--disabled]=\"option.disabled\"\n [attr.aria-selected]=\"option.selected\"\n [attr.aria-disabled]=\"option.disabled || null\"\n [attr.tabindex]=\"isFocusTarget(options, option) ? 0 : -1\"\n (click)=\"select(kind, option); $event.stopPropagation()\"\n (keydown)=\"onOptionKeydown($event)\"\n >\n {{ option.label }}\n </button>\n }\n </div>\n</ng-template>\n\n<!-- Error / Hint -->\n@if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-time-picker__message ngx-time-picker__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-time-picker__message ngx-time-picker__message--hint\">\n {{ hint() }}\n </p>\n}\n", styles: [":host{display:block;position:relative;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-time-picker__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-time-picker__field{position:relative;display:flex;align-items:center;gap:.5rem;width:100%;min-height:2.375rem;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color .15s ease,box-shadow .15s ease}.ngx-time-picker__field:focus-visible{outline:none;border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-time-picker__field--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-time-picker__field--error{border-color:var(--danger-500, #ef4444)}.ngx-time-picker__field--error.ngx-time-picker__field--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-time-picker__field--disabled{background:var(--surface-subtle, #f9fafb);color:var(--text-placeholder, #6b7280);cursor:not-allowed}.ngx-time-picker__field--sm{padding:.375rem .625rem;font-size:.8125rem}.ngx-time-picker__field--md{padding:.5rem .75rem;font-size:.875rem}.ngx-time-picker__field--lg{padding:.625rem 1rem;font-size:1rem}.ngx-time-picker__float-label{position:absolute;left:2.25rem;top:50%;transform:translateY(-50%);padding:0;font-size:inherit;line-height:1;white-space:nowrap;color:var(--text-placeholder, #6b7280);background:transparent;pointer-events:none;transition:top .15s ease,font-size .15s ease,color .15s ease,padding .15s ease}.ngx-time-picker__float-label--active{top:0;padding:0 .25rem;font-size:.7rem;color:var(--fill-primary, #4f46e5);background:var(--surface-base, #fff)}.ngx-time-picker__float-label--focused:not(.ngx-time-picker__float-label--error){color:var(--fill-primary, #4f46e5)}.ngx-time-picker__float-label--error{color:var(--fill-danger, #dc2626)}.ngx-time-picker__icon{display:inline-flex;flex-shrink:0;align-items:center;color:var(--text-placeholder, #6b7280)}.ngx-time-picker__display{flex:1;min-width:0}.ngx-time-picker__value{display:block;color:var(--text-base, #111827);font-variant-numeric:tabular-nums}.ngx-time-picker__placeholder{display:block;color:var(--text-placeholder, #6b7280)}.ngx-time-picker__control{position:relative}.ngx-time-picker__field.ngx-time-picker__field--clearable{padding-right:2.25rem}.ngx-time-picker__clear{position:absolute;top:50%;right:.375rem;display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;padding:0;color:var(--text-placeholder, #6b7280);background:transparent;border:none;border-radius:.25rem;transform:translateY(-50%);cursor:pointer;transition:color .15s ease}.ngx-time-picker__clear:hover{color:var(--text-muted, #6b7280)}.ngx-time-picker__clear:focus-visible{outline:2px solid var(--primary-500, #6366f1);outline-offset:1px}.ngx-time-picker__panel{position:absolute;top:calc(100% + .25rem);left:0;z-index:100;display:flex;padding:.375rem;gap:.25rem;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.5rem;box-shadow:0 8px 24px #0000001f}.ngx-time-picker__column{position:relative;display:flex;flex-direction:column;gap:2px;width:3.25rem;max-height:13.5rem;overflow-y:auto;scrollbar-width:none}.ngx-time-picker__column::-webkit-scrollbar{display:none}.ngx-time-picker__column+.ngx-time-picker__column{padding-left:.25rem;border-left:1px solid var(--border-subtle, #f3f4f6)}.ngx-time-picker__option{flex-shrink:0;height:2rem;padding:0;font-family:inherit;font-size:.8125rem;font-variant-numeric:tabular-nums;color:var(--text-secondary, #374151);background:transparent;border:none;border-radius:.375rem;cursor:pointer;transition:background .1s ease,color .1s ease}.ngx-time-picker__option:focus-visible{outline:2px solid var(--primary-300, #a5b4fc);outline-offset:-2px}.ngx-time-picker__option:hover:not(.ngx-time-picker__option--disabled):not(.ngx-time-picker__option--selected){color:var(--text-base, #111827);background:var(--surface-muted, #f3f4f6)}.ngx-time-picker__option--selected{font-weight:600;color:var(--text-on-color, #fff);background:var(--primary-500, #6366f1)}.ngx-time-picker__option--selected:hover{background:var(--primary-600, #4f46e5)}.ngx-time-picker__option--disabled{color:var(--text-disabled, #d1d5db);cursor:not-allowed}.ngx-time-picker__message{margin-top:.375rem;font-size:.75rem;line-height:1.4}.ngx-time-picker__message--hint{color:var(--text-muted, #6b7280)}.ngx-time-picker__message--error{color:var(--fill-danger, #dc2626)}\n"] }]
|
|
4535
4722
|
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], floatingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatingLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", 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 }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], triggerRef: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], panelRef: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
|
|
4536
4723
|
|
|
4537
|
-
let nextId$
|
|
4724
|
+
let nextId$4 = 0;
|
|
4538
4725
|
function escapeRegExp(text) {
|
|
4539
4726
|
return text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
4540
4727
|
}
|
|
@@ -4562,7 +4749,7 @@ class TagInputComponent {
|
|
|
4562
4749
|
value = model([], ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
4563
4750
|
added = output();
|
|
4564
4751
|
removed = output();
|
|
4565
|
-
id = `ngx-tag-input-${nextId$
|
|
4752
|
+
id = `ngx-tag-input-${nextId$4++}`;
|
|
4566
4753
|
messageId = `${this.id}-message`;
|
|
4567
4754
|
native = viewChild.required('native');
|
|
4568
4755
|
// ── Internal state ───────────────────────────────────────────
|
|
@@ -4724,7 +4911,7 @@ class TagInputComponent {
|
|
|
4724
4911
|
useExisting: forwardRef(() => TagInputComponent),
|
|
4725
4912
|
multi: true,
|
|
4726
4913
|
},
|
|
4727
|
-
], viewQueries: [{ propertyName: "native", first: true, predicate: ["native"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (label()) {\n <label class=\"ngx-tag-input__label\" [for]=\"id\">{{ label() }}</label>\n}\n\n<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n<div [class]=\"fieldClasses()\" (click)=\"focusInput()\">\n @if (value().length) {\n <ul class=\"ngx-tag-input__tags\" [attr.aria-label]=\"label() || null\">\n @for (tag of value(); track $index; let i = $index) {\n <li class=\"ngx-tag-input__tag\">\n <ngx-ds-tag\n [label]=\"tag\"\n size=\"sm\"\n color=\"primary\"\n [dismissible]=\"!isDisabled()\"\n (dismissed)=\"remove(i)\"\n />\n </li>\n }\n </ul>\n }\n\n <input\n #native\n class=\"ngx-tag-input__native\"\n type=\"text\"\n autocomplete=\"off\"\n [id]=\"id\"\n [value]=\"text()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"isFull()\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n</div>\n\n@if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-tag-input__message ngx-tag-input__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-tag-input__message ngx-tag-input__message--hint\">\n {{ hint() }}\n </p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-tag-input__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-tag-input__field{display:flex;flex-wrap:wrap;align-items:center;gap:.375rem;width:100%;min-height:2.375rem;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;cursor:text;transition:border-color .15s ease,box-shadow .15s ease}.ngx-tag-input__field--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-tag-input__field--error{border-color:var(--danger-500, #ef4444)}.ngx-tag-input__field--error.ngx-tag-input__field--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-tag-input__field--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed}.ngx-tag-input__field--sm{padding:.25rem .5rem;font-size:.8125rem}.ngx-tag-input__field--md{padding:.3125rem .625rem;font-size:.875rem}.ngx-tag-input__field--lg{padding:.4375rem .875rem;font-size:1rem}.ngx-tag-input__tags{display:contents;margin:0;padding:0;list-style:none}.ngx-tag-input__tag{display:inline-flex}.ngx-tag-input__native{flex:1 1 6rem;min-width:6rem;padding:.125rem 0;font:inherit;color:var(--text-base, #111827);background:transparent;border:none;outline:none}.ngx-tag-input__native::placeholder{color:var(--text-placeholder, #
|
|
4914
|
+
], viewQueries: [{ propertyName: "native", first: true, predicate: ["native"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (label()) {\n <label class=\"ngx-tag-input__label\" [for]=\"id\">{{ label() }}</label>\n}\n\n<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n<div [class]=\"fieldClasses()\" (click)=\"focusInput()\">\n @if (value().length) {\n <ul class=\"ngx-tag-input__tags\" [attr.aria-label]=\"label() || null\">\n @for (tag of value(); track $index; let i = $index) {\n <li class=\"ngx-tag-input__tag\">\n <ngx-ds-tag\n [label]=\"tag\"\n size=\"sm\"\n color=\"primary\"\n [dismissible]=\"!isDisabled()\"\n (dismissed)=\"remove(i)\"\n />\n </li>\n }\n </ul>\n }\n\n <input\n #native\n class=\"ngx-tag-input__native\"\n type=\"text\"\n autocomplete=\"off\"\n [id]=\"id\"\n [value]=\"text()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"isFull()\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n</div>\n\n@if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-tag-input__message ngx-tag-input__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-tag-input__message ngx-tag-input__message--hint\">\n {{ hint() }}\n </p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-tag-input__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-tag-input__field{display:flex;flex-wrap:wrap;align-items:center;gap:.375rem;width:100%;min-height:2.375rem;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;cursor:text;transition:border-color .15s ease,box-shadow .15s ease}.ngx-tag-input__field--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-tag-input__field--error{border-color:var(--danger-500, #ef4444)}.ngx-tag-input__field--error.ngx-tag-input__field--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-tag-input__field--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed}.ngx-tag-input__field--sm{padding:.25rem .5rem;font-size:.8125rem}.ngx-tag-input__field--md{padding:.3125rem .625rem;font-size:.875rem}.ngx-tag-input__field--lg{padding:.4375rem .875rem;font-size:1rem}.ngx-tag-input__tags{display:contents;margin:0;padding:0;list-style:none}.ngx-tag-input__tag{display:inline-flex}.ngx-tag-input__native{flex:1 1 6rem;min-width:6rem;padding:.125rem 0;font:inherit;color:var(--text-base, #111827);background:transparent;border:none;outline:none}.ngx-tag-input__native::placeholder{color:var(--text-placeholder, #6b7280)}.ngx-tag-input__native:disabled{color:var(--text-placeholder, #6b7280);cursor:not-allowed}.ngx-tag-input__native:read-only{caret-color:transparent}.ngx-tag-input__message{margin-top:.375rem;font-size:.75rem;line-height:1.4}.ngx-tag-input__message--hint{color:var(--text-muted, #6b7280)}.ngx-tag-input__message--error{color:var(--fill-danger, #dc2626)}\n"], dependencies: [{ kind: "component", type: TagComponent, selector: "ngx-ds-tag", inputs: ["label", "size", "color", "variant", "iconLeft", "iconRight", "rounded", "dismissible"], outputs: ["dismissed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4728
4915
|
}
|
|
4729
4916
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TagInputComponent, decorators: [{
|
|
4730
4917
|
type: Component,
|
|
@@ -4734,9 +4921,566 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
4734
4921
|
useExisting: forwardRef(() => TagInputComponent),
|
|
4735
4922
|
multi: true,
|
|
4736
4923
|
},
|
|
4737
|
-
], template: "@if (label()) {\n <label class=\"ngx-tag-input__label\" [for]=\"id\">{{ label() }}</label>\n}\n\n<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n<div [class]=\"fieldClasses()\" (click)=\"focusInput()\">\n @if (value().length) {\n <ul class=\"ngx-tag-input__tags\" [attr.aria-label]=\"label() || null\">\n @for (tag of value(); track $index; let i = $index) {\n <li class=\"ngx-tag-input__tag\">\n <ngx-ds-tag\n [label]=\"tag\"\n size=\"sm\"\n color=\"primary\"\n [dismissible]=\"!isDisabled()\"\n (dismissed)=\"remove(i)\"\n />\n </li>\n }\n </ul>\n }\n\n <input\n #native\n class=\"ngx-tag-input__native\"\n type=\"text\"\n autocomplete=\"off\"\n [id]=\"id\"\n [value]=\"text()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"isFull()\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n</div>\n\n@if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-tag-input__message ngx-tag-input__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-tag-input__message ngx-tag-input__message--hint\">\n {{ hint() }}\n </p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-tag-input__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-tag-input__field{display:flex;flex-wrap:wrap;align-items:center;gap:.375rem;width:100%;min-height:2.375rem;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;cursor:text;transition:border-color .15s ease,box-shadow .15s ease}.ngx-tag-input__field--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-tag-input__field--error{border-color:var(--danger-500, #ef4444)}.ngx-tag-input__field--error.ngx-tag-input__field--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-tag-input__field--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed}.ngx-tag-input__field--sm{padding:.25rem .5rem;font-size:.8125rem}.ngx-tag-input__field--md{padding:.3125rem .625rem;font-size:.875rem}.ngx-tag-input__field--lg{padding:.4375rem .875rem;font-size:1rem}.ngx-tag-input__tags{display:contents;margin:0;padding:0;list-style:none}.ngx-tag-input__tag{display:inline-flex}.ngx-tag-input__native{flex:1 1 6rem;min-width:6rem;padding:.125rem 0;font:inherit;color:var(--text-base, #111827);background:transparent;border:none;outline:none}.ngx-tag-input__native::placeholder{color:var(--text-placeholder, #
|
|
4924
|
+
], template: "@if (label()) {\n <label class=\"ngx-tag-input__label\" [for]=\"id\">{{ label() }}</label>\n}\n\n<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n<div [class]=\"fieldClasses()\" (click)=\"focusInput()\">\n @if (value().length) {\n <ul class=\"ngx-tag-input__tags\" [attr.aria-label]=\"label() || null\">\n @for (tag of value(); track $index; let i = $index) {\n <li class=\"ngx-tag-input__tag\">\n <ngx-ds-tag\n [label]=\"tag\"\n size=\"sm\"\n color=\"primary\"\n [dismissible]=\"!isDisabled()\"\n (dismissed)=\"remove(i)\"\n />\n </li>\n }\n </ul>\n }\n\n <input\n #native\n class=\"ngx-tag-input__native\"\n type=\"text\"\n autocomplete=\"off\"\n [id]=\"id\"\n [value]=\"text()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"isFull()\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n</div>\n\n@if (errorText()) {\n <p [id]=\"messageId\" class=\"ngx-tag-input__message ngx-tag-input__message--error\" role=\"alert\">\n {{ errorText() }}\n </p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ngx-tag-input__message ngx-tag-input__message--hint\">\n {{ hint() }}\n </p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ngx-tag-input__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-secondary, #374151)}.ngx-tag-input__field{display:flex;flex-wrap:wrap;align-items:center;gap:.375rem;width:100%;min-height:2.375rem;background:var(--surface-base, #fff);border:1.5px solid var(--border-input, #d1d5db);border-radius:.375rem;cursor:text;transition:border-color .15s ease,box-shadow .15s ease}.ngx-tag-input__field--focused{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f61f}.ngx-tag-input__field--error{border-color:var(--danger-500, #ef4444)}.ngx-tag-input__field--error.ngx-tag-input__field--focused{box-shadow:0 0 0 3px #ef44441f}.ngx-tag-input__field--disabled{background:var(--surface-subtle, #f9fafb);cursor:not-allowed}.ngx-tag-input__field--sm{padding:.25rem .5rem;font-size:.8125rem}.ngx-tag-input__field--md{padding:.3125rem .625rem;font-size:.875rem}.ngx-tag-input__field--lg{padding:.4375rem .875rem;font-size:1rem}.ngx-tag-input__tags{display:contents;margin:0;padding:0;list-style:none}.ngx-tag-input__tag{display:inline-flex}.ngx-tag-input__native{flex:1 1 6rem;min-width:6rem;padding:.125rem 0;font:inherit;color:var(--text-base, #111827);background:transparent;border:none;outline:none}.ngx-tag-input__native::placeholder{color:var(--text-placeholder, #6b7280)}.ngx-tag-input__native:disabled{color:var(--text-placeholder, #6b7280);cursor:not-allowed}.ngx-tag-input__native:read-only{caret-color:transparent}.ngx-tag-input__message{margin-top:.375rem;font-size:.75rem;line-height:1.4}.ngx-tag-input__message--hint{color:var(--text-muted, #6b7280)}.ngx-tag-input__message--error{color:var(--fill-danger, #dc2626)}\n"] }]
|
|
4738
4925
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], separators: [{ type: i0.Input, args: [{ isSignal: true, alias: "separators", required: false }] }], maxTags: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxTags", required: false }] }], allowDuplicates: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowDuplicates", required: false }] }], addOnBlur: [{ type: i0.Input, args: [{ isSignal: true, alias: "addOnBlur", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], added: [{ type: i0.Output, args: ["added"] }], removed: [{ type: i0.Output, args: ["removed"] }], native: [{ type: i0.ViewChild, args: ['native', { isSignal: true }] }] } });
|
|
4739
4926
|
|
|
4927
|
+
const ICON_SIZE$2 = { sm: 12, md: 14, lg: 16 };
|
|
4928
|
+
/**
|
|
4929
|
+
* Text that turns into a field on click. Enter (Ctrl/⌘+Enter when `multiline`) or
|
|
4930
|
+
* blur saves, Escape restores the previous value.
|
|
4931
|
+
*
|
|
4932
|
+
* Works with `[(value)]`, reactive forms and Signal Forms `[formField]`.
|
|
4933
|
+
*/
|
|
4934
|
+
class InlineEditComponent {
|
|
4935
|
+
i18n = inject(NGX_DS_LABELS);
|
|
4936
|
+
#injector = inject(Injector);
|
|
4937
|
+
// ── Configuration ────────────────────────────────────────────
|
|
4938
|
+
/** Names the field for assistive tech ("Edit <label>"). Not shown. */
|
|
4939
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
4940
|
+
/** Shown, muted, while the value is empty. */
|
|
4941
|
+
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
4942
|
+
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
4943
|
+
/** Uses a textarea. Enter adds a line, Ctrl/⌘+Enter saves. */
|
|
4944
|
+
multiline = input(false, ...(ngDevMode ? [{ debugName: "multiline" }] : /* istanbul ignore next */ []));
|
|
4945
|
+
/** An empty value is not saved: the previous one is restored. */
|
|
4946
|
+
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
4947
|
+
/** Shows save and cancel buttons while editing. */
|
|
4948
|
+
showActions = input(false, ...(ngDevMode ? [{ debugName: "showActions" }] : /* istanbul ignore next */ []));
|
|
4949
|
+
/** Saves when the field loses focus. With `false`, leaving the field cancels. */
|
|
4950
|
+
saveOnBlur = input(true, ...(ngDevMode ? [{ debugName: "saveOnBlur" }] : /* istanbul ignore next */ []));
|
|
4951
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
4952
|
+
// ── Value ─────────────────────────────────────────────────────
|
|
4953
|
+
value = model('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
4954
|
+
/** Whether the field is being edited. Bind it to start editing from outside. */
|
|
4955
|
+
editing = model(false, ...(ngDevMode ? [{ debugName: "editing" }] : /* istanbul ignore next */ []));
|
|
4956
|
+
/** Emits the new value when an edit is saved and the value changed. */
|
|
4957
|
+
saved = output();
|
|
4958
|
+
/** Emits when an edit is cancelled. */
|
|
4959
|
+
cancelled = output();
|
|
4960
|
+
fieldRef = viewChild('field', ...(ngDevMode ? [{ debugName: "fieldRef" }] : /* istanbul ignore next */ []));
|
|
4961
|
+
triggerRef = viewChild('trigger', ...(ngDevMode ? [{ debugName: "triggerRef" }] : /* istanbul ignore next */ []));
|
|
4962
|
+
#draft = signal('', ...(ngDevMode ? [{ debugName: "#draft" }] : /* istanbul ignore next */ []));
|
|
4963
|
+
#cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "#cvaDisabled" }] : /* istanbul ignore next */ []));
|
|
4964
|
+
draft = this.#draft.asReadonly();
|
|
4965
|
+
isDisabled = computed(() => this.disabled() || this.#cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
4966
|
+
isEmpty = computed(() => this.value().trim() === '', ...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
|
|
4967
|
+
iconSize = computed(() => ICON_SIZE$2[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
4968
|
+
triggerLabel = computed(() => this.i18n.edit(this.label()), ...(ngDevMode ? [{ debugName: "triggerLabel" }] : /* istanbul ignore next */ []));
|
|
4969
|
+
hostClasses = computed(() => [
|
|
4970
|
+
'ie',
|
|
4971
|
+
`ie--${this.size()}`,
|
|
4972
|
+
this.multiline() ? 'ie--multiline' : '',
|
|
4973
|
+
this.isDisabled() ? 'ie--disabled' : '',
|
|
4974
|
+
]
|
|
4975
|
+
.filter(Boolean)
|
|
4976
|
+
.join(' '), ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
4977
|
+
icons = { Pencil, Check, X };
|
|
4978
|
+
constructor() {
|
|
4979
|
+
// Entering edit mode, from a click or from a bound `[(editing)]`, starts a draft
|
|
4980
|
+
// from the current value and focuses the field.
|
|
4981
|
+
let wasEditing = false;
|
|
4982
|
+
effect(() => {
|
|
4983
|
+
const editing = this.editing();
|
|
4984
|
+
if (editing && !wasEditing)
|
|
4985
|
+
untracked(() => this.#begin());
|
|
4986
|
+
wasEditing = editing;
|
|
4987
|
+
});
|
|
4988
|
+
}
|
|
4989
|
+
// ── Actions ──────────────────────────────────────────────────
|
|
4990
|
+
edit() {
|
|
4991
|
+
if (this.isDisabled())
|
|
4992
|
+
return;
|
|
4993
|
+
this.editing.set(true);
|
|
4994
|
+
}
|
|
4995
|
+
save() {
|
|
4996
|
+
if (!this.editing())
|
|
4997
|
+
return;
|
|
4998
|
+
const next = this.multiline() ? this.#draft() : this.#draft().trim();
|
|
4999
|
+
if (this.required() && next.trim() === '') {
|
|
5000
|
+
this.cancel();
|
|
5001
|
+
return;
|
|
5002
|
+
}
|
|
5003
|
+
this.#end();
|
|
5004
|
+
if (next !== this.value()) {
|
|
5005
|
+
this.value.set(next);
|
|
5006
|
+
this.onChange(next);
|
|
5007
|
+
this.saved.emit(next);
|
|
5008
|
+
}
|
|
5009
|
+
this.onTouched();
|
|
5010
|
+
}
|
|
5011
|
+
cancel() {
|
|
5012
|
+
if (!this.editing())
|
|
5013
|
+
return;
|
|
5014
|
+
this.#end();
|
|
5015
|
+
this.onTouched();
|
|
5016
|
+
this.cancelled.emit();
|
|
5017
|
+
}
|
|
5018
|
+
onInput(event) {
|
|
5019
|
+
this.#draft.set(event.target.value);
|
|
5020
|
+
}
|
|
5021
|
+
onKeydown(event) {
|
|
5022
|
+
if (event.key === 'Escape') {
|
|
5023
|
+
event.preventDefault();
|
|
5024
|
+
event.stopPropagation();
|
|
5025
|
+
this.cancel();
|
|
5026
|
+
this.#focusTrigger();
|
|
5027
|
+
}
|
|
5028
|
+
else if (event.key === 'Enter' && (!this.multiline() || event.ctrlKey || event.metaKey)) {
|
|
5029
|
+
event.preventDefault();
|
|
5030
|
+
this.save();
|
|
5031
|
+
this.#focusTrigger();
|
|
5032
|
+
}
|
|
5033
|
+
}
|
|
5034
|
+
onBlur(event) {
|
|
5035
|
+
// Moving to the save/cancel buttons is not leaving the field.
|
|
5036
|
+
const next = event.relatedTarget;
|
|
5037
|
+
if (next && event.currentTarget.parentElement?.contains(next))
|
|
5038
|
+
return;
|
|
5039
|
+
if (this.saveOnBlur())
|
|
5040
|
+
this.save();
|
|
5041
|
+
else
|
|
5042
|
+
this.cancel();
|
|
5043
|
+
}
|
|
5044
|
+
onAction(kind) {
|
|
5045
|
+
if (kind === 'save')
|
|
5046
|
+
this.save();
|
|
5047
|
+
else
|
|
5048
|
+
this.cancel();
|
|
5049
|
+
this.#focusTrigger();
|
|
5050
|
+
}
|
|
5051
|
+
#begin() {
|
|
5052
|
+
this.#draft.set(this.value());
|
|
5053
|
+
afterNextRender(() => {
|
|
5054
|
+
const field = this.fieldRef()?.nativeElement;
|
|
5055
|
+
field?.focus();
|
|
5056
|
+
field?.select();
|
|
5057
|
+
}, { injector: this.#injector });
|
|
5058
|
+
}
|
|
5059
|
+
#end() {
|
|
5060
|
+
this.editing.set(false);
|
|
5061
|
+
}
|
|
5062
|
+
#focusTrigger() {
|
|
5063
|
+
afterNextRender(() => this.triggerRef()?.nativeElement.focus(), { injector: this.#injector });
|
|
5064
|
+
}
|
|
5065
|
+
// ── CVA ──────────────────────────────────────────────────────
|
|
5066
|
+
onChange = () => { };
|
|
5067
|
+
onTouched = () => { };
|
|
5068
|
+
writeValue(v) {
|
|
5069
|
+
this.value.set(v ?? '');
|
|
5070
|
+
}
|
|
5071
|
+
registerOnChange(fn) {
|
|
5072
|
+
this.onChange = fn;
|
|
5073
|
+
}
|
|
5074
|
+
registerOnTouched(fn) {
|
|
5075
|
+
this.onTouched = fn;
|
|
5076
|
+
}
|
|
5077
|
+
setDisabledState(disabled) {
|
|
5078
|
+
this.#cvaDisabled.set(disabled);
|
|
5079
|
+
}
|
|
5080
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: InlineEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5081
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: InlineEditComponent, isStandalone: true, selector: "ngx-ds-inline-edit", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, multiline: { classPropertyName: "multiline", publicName: "multiline", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, showActions: { classPropertyName: "showActions", publicName: "showActions", isSignal: true, isRequired: false, transformFunction: null }, saveOnBlur: { classPropertyName: "saveOnBlur", publicName: "saveOnBlur", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, editing: { classPropertyName: "editing", publicName: "editing", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", editing: "editingChange", saved: "saved", cancelled: "cancelled" }, providers: [
|
|
5082
|
+
{
|
|
5083
|
+
provide: NG_VALUE_ACCESSOR,
|
|
5084
|
+
useExisting: forwardRef(() => InlineEditComponent),
|
|
5085
|
+
multi: true,
|
|
5086
|
+
},
|
|
5087
|
+
], viewQueries: [{ propertyName: "fieldRef", first: true, predicate: ["field"], descendants: true, isSignal: true }, { propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"hostClasses()\">\n @if (editing()) {\n @if (multiline()) {\n <textarea\n #field\n class=\"ie__field ie__field--textarea\"\n rows=\"3\"\n [attr.aria-label]=\"label() || null\"\n [attr.aria-required]=\"required() || null\"\n [value]=\"draft()\"\n [placeholder]=\"placeholder()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur($event)\"\n ></textarea>\n } @else {\n <input\n #field\n class=\"ie__field\"\n type=\"text\"\n [attr.aria-label]=\"label() || null\"\n [attr.aria-required]=\"required() || null\"\n [value]=\"draft()\"\n [placeholder]=\"placeholder()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur($event)\"\n />\n }\n @if (showActions()) {\n <span class=\"ie__actions\">\n <button\n type=\"button\"\n class=\"ie__action ie__action--save\"\n [attr.aria-label]=\"i18n.save\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onAction('save')\"\n >\n <ngx-ds-icon [icon]=\"icons.Check\" [size]=\"iconSize()\" />\n </button>\n <button\n type=\"button\"\n class=\"ie__action\"\n [attr.aria-label]=\"i18n.cancel\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onAction('cancel')\"\n >\n <ngx-ds-icon [icon]=\"icons.X\" [size]=\"iconSize()\" />\n </button>\n </span>\n }\n } @else {\n <button\n #trigger\n type=\"button\"\n class=\"ie__trigger\"\n [disabled]=\"isDisabled() || null\"\n [attr.aria-label]=\"triggerLabel() + ': ' + (isEmpty() ? placeholder() : value())\"\n (click)=\"edit()\"\n >\n <span class=\"ie__text\" [class.ie__text--placeholder]=\"isEmpty()\">{{\n isEmpty() ? placeholder() : value()\n }}</span>\n <span class=\"ie__pencil\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"icons.Pencil\" [size]=\"iconSize()\" />\n </span>\n </button>\n }\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ie{display:flex;align-items:center;gap:.375rem;color:var(--text-base, #111827)}.ie--sm{--ie-font: .8125rem;--ie-pad: .25rem .375rem}.ie--md{--ie-font: .875rem;--ie-pad: .375rem .5rem}.ie--lg{--ie-font: 1rem;--ie-pad: .5rem .625rem}.ie--multiline{align-items:flex-start}.ie__trigger,.ie__field{box-sizing:border-box;width:100%;min-width:0;padding:var(--ie-pad);font:inherit;font-size:var(--ie-font);line-height:1.5;color:inherit;border:1.5px solid transparent;border-radius:.375rem}.ie__trigger{display:flex;align-items:flex-start;gap:.5rem;text-align:left;background:transparent;cursor:text;transition:background-color .15s ease,border-color .15s ease}.ie__trigger:hover:not(:disabled){background:var(--surface-hover, #f3f4f6)}.ie__trigger:hover:not(:disabled) .ie__pencil{opacity:1}.ie__trigger:focus-visible{outline:none;border-color:var(--primary-600, #4f46e5);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary-600, #4f46e5) 20%,transparent)}.ie__trigger:focus-visible .ie__pencil{opacity:1}.ie__trigger:disabled{cursor:not-allowed;color:var(--text-muted, #6b7280)}.ie__text{flex:1;min-width:0;white-space:pre-wrap;overflow-wrap:anywhere}.ie__text--placeholder{color:var(--text-placeholder, #6b7280)}.ie__pencil{display:inline-flex;align-self:center;color:var(--text-muted, #6b7280);opacity:0;transition:opacity .15s ease}.ie--multiline .ie__pencil{align-self:flex-start;margin-top:.2em}.ie__field{background:var(--surface-base, #fff);border-color:var(--primary-600, #4f46e5);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary-600, #4f46e5) 20%,transparent);outline:none}.ie__field::placeholder{color:var(--text-placeholder, #6b7280)}.ie__field--textarea{resize:vertical}.ie__actions{display:inline-flex;gap:.25rem;flex-shrink:0}.ie__action{display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;padding:0;color:var(--text-secondary, #4b5563);background:var(--surface-base, #fff);border:1px solid var(--border-base, #e5e7eb);border-radius:.375rem;cursor:pointer}.ie__action:hover{background:var(--surface-hover, #f3f4f6)}.ie__action:focus-visible{outline:2px solid var(--primary-600, #4f46e5);outline-offset:2px}.ie__action--save{color:var(--text-on-color, #fff);background:var(--fill-primary, #4f46e5);border-color:var(--fill-primary, #4f46e5)}.ie__action--save:hover{background:var(--primary-700, #4338ca)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5088
|
+
}
|
|
5089
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: InlineEditComponent, decorators: [{
|
|
5090
|
+
type: Component,
|
|
5091
|
+
args: [{ selector: 'ngx-ds-inline-edit', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
5092
|
+
{
|
|
5093
|
+
provide: NG_VALUE_ACCESSOR,
|
|
5094
|
+
useExisting: forwardRef(() => InlineEditComponent),
|
|
5095
|
+
multi: true,
|
|
5096
|
+
},
|
|
5097
|
+
], template: "<div [class]=\"hostClasses()\">\n @if (editing()) {\n @if (multiline()) {\n <textarea\n #field\n class=\"ie__field ie__field--textarea\"\n rows=\"3\"\n [attr.aria-label]=\"label() || null\"\n [attr.aria-required]=\"required() || null\"\n [value]=\"draft()\"\n [placeholder]=\"placeholder()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur($event)\"\n ></textarea>\n } @else {\n <input\n #field\n class=\"ie__field\"\n type=\"text\"\n [attr.aria-label]=\"label() || null\"\n [attr.aria-required]=\"required() || null\"\n [value]=\"draft()\"\n [placeholder]=\"placeholder()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur($event)\"\n />\n }\n @if (showActions()) {\n <span class=\"ie__actions\">\n <button\n type=\"button\"\n class=\"ie__action ie__action--save\"\n [attr.aria-label]=\"i18n.save\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onAction('save')\"\n >\n <ngx-ds-icon [icon]=\"icons.Check\" [size]=\"iconSize()\" />\n </button>\n <button\n type=\"button\"\n class=\"ie__action\"\n [attr.aria-label]=\"i18n.cancel\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onAction('cancel')\"\n >\n <ngx-ds-icon [icon]=\"icons.X\" [size]=\"iconSize()\" />\n </button>\n </span>\n }\n } @else {\n <button\n #trigger\n type=\"button\"\n class=\"ie__trigger\"\n [disabled]=\"isDisabled() || null\"\n [attr.aria-label]=\"triggerLabel() + ': ' + (isEmpty() ? placeholder() : value())\"\n (click)=\"edit()\"\n >\n <span class=\"ie__text\" [class.ie__text--placeholder]=\"isEmpty()\">{{\n isEmpty() ? placeholder() : value()\n }}</span>\n <span class=\"ie__pencil\" aria-hidden=\"true\">\n <ngx-ds-icon [icon]=\"icons.Pencil\" [size]=\"iconSize()\" />\n </span>\n </button>\n }\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ie{display:flex;align-items:center;gap:.375rem;color:var(--text-base, #111827)}.ie--sm{--ie-font: .8125rem;--ie-pad: .25rem .375rem}.ie--md{--ie-font: .875rem;--ie-pad: .375rem .5rem}.ie--lg{--ie-font: 1rem;--ie-pad: .5rem .625rem}.ie--multiline{align-items:flex-start}.ie__trigger,.ie__field{box-sizing:border-box;width:100%;min-width:0;padding:var(--ie-pad);font:inherit;font-size:var(--ie-font);line-height:1.5;color:inherit;border:1.5px solid transparent;border-radius:.375rem}.ie__trigger{display:flex;align-items:flex-start;gap:.5rem;text-align:left;background:transparent;cursor:text;transition:background-color .15s ease,border-color .15s ease}.ie__trigger:hover:not(:disabled){background:var(--surface-hover, #f3f4f6)}.ie__trigger:hover:not(:disabled) .ie__pencil{opacity:1}.ie__trigger:focus-visible{outline:none;border-color:var(--primary-600, #4f46e5);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary-600, #4f46e5) 20%,transparent)}.ie__trigger:focus-visible .ie__pencil{opacity:1}.ie__trigger:disabled{cursor:not-allowed;color:var(--text-muted, #6b7280)}.ie__text{flex:1;min-width:0;white-space:pre-wrap;overflow-wrap:anywhere}.ie__text--placeholder{color:var(--text-placeholder, #6b7280)}.ie__pencil{display:inline-flex;align-self:center;color:var(--text-muted, #6b7280);opacity:0;transition:opacity .15s ease}.ie--multiline .ie__pencil{align-self:flex-start;margin-top:.2em}.ie__field{background:var(--surface-base, #fff);border-color:var(--primary-600, #4f46e5);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary-600, #4f46e5) 20%,transparent);outline:none}.ie__field::placeholder{color:var(--text-placeholder, #6b7280)}.ie__field--textarea{resize:vertical}.ie__actions{display:inline-flex;gap:.25rem;flex-shrink:0}.ie__action{display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;padding:0;color:var(--text-secondary, #4b5563);background:var(--surface-base, #fff);border:1px solid var(--border-base, #e5e7eb);border-radius:.375rem;cursor:pointer}.ie__action:hover{background:var(--surface-hover, #f3f4f6)}.ie__action:focus-visible{outline:2px solid var(--primary-600, #4f46e5);outline-offset:2px}.ie__action--save{color:var(--text-on-color, #fff);background:var(--fill-primary, #4f46e5);border-color:var(--fill-primary, #4f46e5)}.ie__action--save:hover{background:var(--primary-700, #4338ca)}\n"] }]
|
|
5098
|
+
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], multiline: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiline", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], showActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "showActions", required: false }] }], saveOnBlur: [{ type: i0.Input, args: [{ isSignal: true, alias: "saveOnBlur", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], editing: [{ type: i0.Input, args: [{ isSignal: true, alias: "editing", required: false }] }, { type: i0.Output, args: ["editingChange"] }], saved: [{ type: i0.Output, args: ["saved"] }], cancelled: [{ type: i0.Output, args: ["cancelled"] }], fieldRef: [{ type: i0.ViewChild, args: ['field', { isSignal: true }] }], triggerRef: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }] } });
|
|
5099
|
+
|
|
5100
|
+
let nextId$3 = 0;
|
|
5101
|
+
/**
|
|
5102
|
+
* A select whose options form a tree. Single mode picks one node; `multiple` adds
|
|
5103
|
+
* checkboxes that, with `cascade`, check every leaf under a parent.
|
|
5104
|
+
*
|
|
5105
|
+
* Works with `[(value)]`, reactive forms and Signal Forms `[formField]`.
|
|
5106
|
+
*/
|
|
5107
|
+
class TreeSelectComponent {
|
|
5108
|
+
i18n = inject(NGX_DS_LABELS);
|
|
5109
|
+
#injector = inject(Injector);
|
|
5110
|
+
// ── Configuration ────────────────────────────────────────────
|
|
5111
|
+
nodes = input([], ...(ngDevMode ? [{ debugName: "nodes" }] : /* istanbul ignore next */ []));
|
|
5112
|
+
/** Checkboxes and an array value instead of a single id. */
|
|
5113
|
+
multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
|
|
5114
|
+
/**
|
|
5115
|
+
* With `multiple`, checking a parent checks every leaf under it, and the value
|
|
5116
|
+
* holds leaf ids only. With `false`, each node is checked on its own.
|
|
5117
|
+
*/
|
|
5118
|
+
cascade = input(true, ...(ngDevMode ? [{ debugName: "cascade" }] : /* istanbul ignore next */ []));
|
|
5119
|
+
/** In single mode, parents can be picked too. By default a click on them expands. */
|
|
5120
|
+
selectableParents = input(false, ...(ngDevMode ? [{ debugName: "selectableParents" }] : /* istanbul ignore next */ []));
|
|
5121
|
+
/** Adds a box that filters the tree by label, keeping the ancestors of matches. */
|
|
5122
|
+
searchable = input(false, ...(ngDevMode ? [{ debugName: "searchable" }] : /* istanbul ignore next */ []));
|
|
5123
|
+
placeholder = input(undefined, ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
5124
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
5125
|
+
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
5126
|
+
errorMessage = input('', ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
5127
|
+
/** Set by Signal Forms `[formField]`. Its errors show once the field is touched. */
|
|
5128
|
+
errors = input([], ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
|
|
5129
|
+
touched = input(false, ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
5130
|
+
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
5131
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
5132
|
+
// ── State ────────────────────────────────────────────────────
|
|
5133
|
+
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
5134
|
+
/** Ids of the expanded parents. */
|
|
5135
|
+
expanded = model([], ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
5136
|
+
id = `ngx-tree-select-${nextId$3++}`;
|
|
5137
|
+
panelId = `${this.id}-panel`;
|
|
5138
|
+
messageId = `${this.id}-message`;
|
|
5139
|
+
icons = { ChevronDown, ChevronRight, Check, Minus, X };
|
|
5140
|
+
#open = signal(false, ...(ngDevMode ? [{ debugName: "#open" }] : /* istanbul ignore next */ []));
|
|
5141
|
+
#search = signal('', ...(ngDevMode ? [{ debugName: "#search" }] : /* istanbul ignore next */ []));
|
|
5142
|
+
#cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "#cvaDisabled" }] : /* istanbul ignore next */ []));
|
|
5143
|
+
#active = signal(null, ...(ngDevMode ? [{ debugName: "#active" }] : /* istanbul ignore next */ []));
|
|
5144
|
+
search = this.#search.asReadonly();
|
|
5145
|
+
activeId = this.#active.asReadonly();
|
|
5146
|
+
triggerRef = viewChild('trigger', ...(ngDevMode ? [{ debugName: "triggerRef" }] : /* istanbul ignore next */ []));
|
|
5147
|
+
isDisabled = computed(() => this.disabled() || this.#cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
5148
|
+
/** Disabling the control while it is open hides the panel. */
|
|
5149
|
+
isOpen = computed(() => this.#open() && !this.isDisabled(), ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
5150
|
+
#index = computed(() => {
|
|
5151
|
+
const byId = new Map();
|
|
5152
|
+
const parentOf = new Map();
|
|
5153
|
+
const leavesOf = new Map();
|
|
5154
|
+
const walk = (node, parent) => {
|
|
5155
|
+
byId.set(node.id, node);
|
|
5156
|
+
parentOf.set(node.id, parent);
|
|
5157
|
+
const leaves = node.children?.length
|
|
5158
|
+
? node.children.flatMap((child) => walk(child, node.id))
|
|
5159
|
+
: [node];
|
|
5160
|
+
leavesOf.set(node.id, leaves);
|
|
5161
|
+
return leaves;
|
|
5162
|
+
};
|
|
5163
|
+
for (const node of this.nodes())
|
|
5164
|
+
walk(node, null);
|
|
5165
|
+
return { byId, parentOf, leavesOf };
|
|
5166
|
+
}, ...(ngDevMode ? [{ debugName: "#index" }] : /* istanbul ignore next */ []));
|
|
5167
|
+
selectedIds = computed(() => {
|
|
5168
|
+
const v = this.value();
|
|
5169
|
+
if (v === null || v === undefined)
|
|
5170
|
+
return [];
|
|
5171
|
+
return Array.isArray(v) ? v : [v];
|
|
5172
|
+
}, ...(ngDevMode ? [{ debugName: "selectedIds" }] : /* istanbul ignore next */ []));
|
|
5173
|
+
#selectedSet = computed(() => new Set(this.selectedIds()), ...(ngDevMode ? [{ debugName: "#selectedSet" }] : /* istanbul ignore next */ []));
|
|
5174
|
+
/** Selected nodes, in value order. Unknown ids are skipped. */
|
|
5175
|
+
selectedNodes = computed(() => {
|
|
5176
|
+
const { byId } = this.#index();
|
|
5177
|
+
return this.selectedIds()
|
|
5178
|
+
.map((id) => byId.get(id))
|
|
5179
|
+
.filter((n) => !!n);
|
|
5180
|
+
}, ...(ngDevMode ? [{ debugName: "selectedNodes" }] : /* istanbul ignore next */ []));
|
|
5181
|
+
/** The visible rows: expanded branches, or the matches and their ancestors while searching. */
|
|
5182
|
+
rows = computed(() => {
|
|
5183
|
+
const query = this.#search().trim().toLowerCase();
|
|
5184
|
+
const expanded = new Set(this.expanded());
|
|
5185
|
+
const matches = (n) => n.label.toLowerCase().includes(query);
|
|
5186
|
+
const subtreeMatch = new Map();
|
|
5187
|
+
const hasMatch = (n) => {
|
|
5188
|
+
let hit = subtreeMatch.get(n.id);
|
|
5189
|
+
if (hit === undefined) {
|
|
5190
|
+
hit = matches(n) || !!n.children?.some(hasMatch);
|
|
5191
|
+
subtreeMatch.set(n.id, hit);
|
|
5192
|
+
}
|
|
5193
|
+
return hit;
|
|
5194
|
+
};
|
|
5195
|
+
const out = [];
|
|
5196
|
+
const walk = (list, level, parentId, showAll) => {
|
|
5197
|
+
const visible = query && !showAll ? list.filter(hasMatch) : list;
|
|
5198
|
+
visible.forEach((node, i) => {
|
|
5199
|
+
const hasChildren = !!node.children?.length;
|
|
5200
|
+
const descendantMatch = !!query && hasChildren && !!node.children.some((c) => hasMatch(c));
|
|
5201
|
+
const isExpanded = hasChildren && (expanded.has(node.id) || descendantMatch);
|
|
5202
|
+
out.push({
|
|
5203
|
+
node,
|
|
5204
|
+
level,
|
|
5205
|
+
parentId,
|
|
5206
|
+
hasChildren,
|
|
5207
|
+
expanded: isExpanded,
|
|
5208
|
+
posinset: i + 1,
|
|
5209
|
+
setsize: visible.length,
|
|
5210
|
+
});
|
|
5211
|
+
if (isExpanded) {
|
|
5212
|
+
walk(node.children, level + 1, node.id, showAll || (!!query && matches(node)));
|
|
5213
|
+
}
|
|
5214
|
+
});
|
|
5215
|
+
};
|
|
5216
|
+
walk(this.nodes(), 1, null, false);
|
|
5217
|
+
return out;
|
|
5218
|
+
}, ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
5219
|
+
/** The row that takes Tab focus: the active one, else the first selected, else the first. */
|
|
5220
|
+
focusableId = computed(() => {
|
|
5221
|
+
const rows = this.rows();
|
|
5222
|
+
const active = this.#active();
|
|
5223
|
+
if (active !== null && rows.some((r) => r.node.id === active))
|
|
5224
|
+
return active;
|
|
5225
|
+
const selected = this.#selectedSet();
|
|
5226
|
+
return (rows.find((r) => selected.has(r.node.id)) ?? rows[0])?.node.id ?? null;
|
|
5227
|
+
}, ...(ngDevMode ? [{ debugName: "focusableId" }] : /* istanbul ignore next */ []));
|
|
5228
|
+
hasError = computed(() => fieldHasError(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "hasError" }] : /* istanbul ignore next */ []));
|
|
5229
|
+
errorText = computed(() => fieldErrorText(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
5230
|
+
triggerClasses = computed(() => {
|
|
5231
|
+
const cls = ['ts__trigger', `ts__trigger--${this.size()}`];
|
|
5232
|
+
if (this.isOpen())
|
|
5233
|
+
cls.push('ts__trigger--open');
|
|
5234
|
+
else if (this.hasError())
|
|
5235
|
+
cls.push('ts__trigger--error');
|
|
5236
|
+
if (this.isDisabled())
|
|
5237
|
+
cls.push('ts__trigger--disabled');
|
|
5238
|
+
return cls.join(' ');
|
|
5239
|
+
}, ...(ngDevMode ? [{ debugName: "triggerClasses" }] : /* istanbul ignore next */ []));
|
|
5240
|
+
constructor() {
|
|
5241
|
+
setupEscapeClose(() => {
|
|
5242
|
+
if (this.#open())
|
|
5243
|
+
this.close(true);
|
|
5244
|
+
});
|
|
5245
|
+
setupClickOutside(() => {
|
|
5246
|
+
if (this.#open())
|
|
5247
|
+
this.close(false);
|
|
5248
|
+
});
|
|
5249
|
+
}
|
|
5250
|
+
// ── Row state ────────────────────────────────────────────────
|
|
5251
|
+
checkState(node) {
|
|
5252
|
+
const selected = this.#selectedSet();
|
|
5253
|
+
if (!this.multiple() || !this.cascade() || !node.children?.length) {
|
|
5254
|
+
return selected.has(node.id) ? 'checked' : 'unchecked';
|
|
5255
|
+
}
|
|
5256
|
+
const leaves = this.#index().leavesOf.get(node.id) ?? [];
|
|
5257
|
+
const count = leaves.filter((l) => selected.has(l.id)).length;
|
|
5258
|
+
if (count === 0)
|
|
5259
|
+
return 'unchecked';
|
|
5260
|
+
return count === leaves.length ? 'checked' : 'mixed';
|
|
5261
|
+
}
|
|
5262
|
+
/** `aria-checked` in multiple mode. */
|
|
5263
|
+
ariaChecked(node) {
|
|
5264
|
+
const state = this.checkState(node);
|
|
5265
|
+
return state === 'checked' ? 'true' : state === 'mixed' ? 'mixed' : 'false';
|
|
5266
|
+
}
|
|
5267
|
+
rowDomId(index) {
|
|
5268
|
+
return `${this.id}-row-${index}`;
|
|
5269
|
+
}
|
|
5270
|
+
// ── Open / close ─────────────────────────────────────────────
|
|
5271
|
+
toggleOpen() {
|
|
5272
|
+
if (this.#open())
|
|
5273
|
+
this.close(false);
|
|
5274
|
+
else
|
|
5275
|
+
this.open();
|
|
5276
|
+
}
|
|
5277
|
+
open(focusTree = false) {
|
|
5278
|
+
if (this.isDisabled() || this.#open())
|
|
5279
|
+
return;
|
|
5280
|
+
this.#revealSelected();
|
|
5281
|
+
this.#active.set(null);
|
|
5282
|
+
this.#open.set(true);
|
|
5283
|
+
if (focusTree)
|
|
5284
|
+
this.#focusActiveAfterRender();
|
|
5285
|
+
}
|
|
5286
|
+
close(focusTrigger) {
|
|
5287
|
+
this.#open.set(false);
|
|
5288
|
+
this.#search.set('');
|
|
5289
|
+
this.#active.set(null);
|
|
5290
|
+
if (focusTrigger)
|
|
5291
|
+
this.triggerRef()?.nativeElement.focus();
|
|
5292
|
+
}
|
|
5293
|
+
/** Expands the ancestors of the selected nodes so they are visible on open. */
|
|
5294
|
+
#revealSelected() {
|
|
5295
|
+
const { parentOf } = this.#index();
|
|
5296
|
+
const next = new Set(this.expanded());
|
|
5297
|
+
const before = next.size;
|
|
5298
|
+
for (const id of this.selectedIds()) {
|
|
5299
|
+
let parent = parentOf.get(id) ?? null;
|
|
5300
|
+
while (parent !== null) {
|
|
5301
|
+
next.add(parent);
|
|
5302
|
+
parent = parentOf.get(parent) ?? null;
|
|
5303
|
+
}
|
|
5304
|
+
}
|
|
5305
|
+
if (next.size !== before)
|
|
5306
|
+
this.expanded.set([...next]);
|
|
5307
|
+
}
|
|
5308
|
+
// ── Actions ──────────────────────────────────────────────────
|
|
5309
|
+
toggleExpand(node, force) {
|
|
5310
|
+
if (!node.children?.length)
|
|
5311
|
+
return;
|
|
5312
|
+
const current = this.expanded();
|
|
5313
|
+
const isExpanded = current.includes(node.id);
|
|
5314
|
+
const next = force ?? !isExpanded;
|
|
5315
|
+
if (next === isExpanded)
|
|
5316
|
+
return;
|
|
5317
|
+
this.expanded.set(next ? [...current, node.id] : current.filter((id) => id !== node.id));
|
|
5318
|
+
}
|
|
5319
|
+
/** Click or Enter / Space on a row. */
|
|
5320
|
+
activate(row) {
|
|
5321
|
+
const { node } = row;
|
|
5322
|
+
this.#active.set(node.id);
|
|
5323
|
+
if (this.multiple()) {
|
|
5324
|
+
this.toggleCheck(node);
|
|
5325
|
+
}
|
|
5326
|
+
else if (row.hasChildren && !this.selectableParents()) {
|
|
5327
|
+
this.toggleExpand(node);
|
|
5328
|
+
}
|
|
5329
|
+
else {
|
|
5330
|
+
this.select(node);
|
|
5331
|
+
}
|
|
5332
|
+
}
|
|
5333
|
+
select(node) {
|
|
5334
|
+
if (node.disabled)
|
|
5335
|
+
return;
|
|
5336
|
+
this.#commit(node.id);
|
|
5337
|
+
this.close(true);
|
|
5338
|
+
}
|
|
5339
|
+
toggleCheck(node) {
|
|
5340
|
+
if (node.disabled)
|
|
5341
|
+
return;
|
|
5342
|
+
const selected = new Set(this.selectedIds());
|
|
5343
|
+
if (this.cascade() && node.children?.length) {
|
|
5344
|
+
const leaves = (this.#index().leavesOf.get(node.id) ?? []).filter((l) => !l.disabled);
|
|
5345
|
+
const allOn = leaves.every((l) => selected.has(l.id));
|
|
5346
|
+
for (const leaf of leaves) {
|
|
5347
|
+
if (allOn)
|
|
5348
|
+
selected.delete(leaf.id);
|
|
5349
|
+
else
|
|
5350
|
+
selected.add(leaf.id);
|
|
5351
|
+
}
|
|
5352
|
+
}
|
|
5353
|
+
else if (selected.has(node.id)) {
|
|
5354
|
+
selected.delete(node.id);
|
|
5355
|
+
}
|
|
5356
|
+
else {
|
|
5357
|
+
selected.add(node.id);
|
|
5358
|
+
}
|
|
5359
|
+
this.#commit([...selected]);
|
|
5360
|
+
}
|
|
5361
|
+
remove(id, event) {
|
|
5362
|
+
event.stopPropagation();
|
|
5363
|
+
this.#commit(this.selectedIds().filter((v) => v !== id));
|
|
5364
|
+
}
|
|
5365
|
+
#commit(next) {
|
|
5366
|
+
this.value.set(next);
|
|
5367
|
+
this.onChange(next);
|
|
5368
|
+
this.onTouched();
|
|
5369
|
+
}
|
|
5370
|
+
onSearch(event) {
|
|
5371
|
+
this.#search.set(event.target.value);
|
|
5372
|
+
this.#active.set(null);
|
|
5373
|
+
}
|
|
5374
|
+
// ── Keyboard ─────────────────────────────────────────────────
|
|
5375
|
+
onTriggerKeydown(event) {
|
|
5376
|
+
// Ignore keys from nested controls (chip remove buttons).
|
|
5377
|
+
if (event.target !== event.currentTarget)
|
|
5378
|
+
return;
|
|
5379
|
+
if (event.key === 'ArrowDown' || (isActivationKey(event) && !this.#open())) {
|
|
5380
|
+
event.preventDefault();
|
|
5381
|
+
if (this.#open())
|
|
5382
|
+
this.#focusActiveAfterRender();
|
|
5383
|
+
else
|
|
5384
|
+
this.open(true);
|
|
5385
|
+
}
|
|
5386
|
+
else if (isActivationKey(event)) {
|
|
5387
|
+
event.preventDefault();
|
|
5388
|
+
this.close(false);
|
|
5389
|
+
}
|
|
5390
|
+
}
|
|
5391
|
+
onSearchKeydown(event) {
|
|
5392
|
+
if (event.key !== 'ArrowDown')
|
|
5393
|
+
return;
|
|
5394
|
+
event.preventDefault();
|
|
5395
|
+
this.#focusActiveAfterRender();
|
|
5396
|
+
}
|
|
5397
|
+
onRowKeydown(event, row, index) {
|
|
5398
|
+
const rows = this.rows();
|
|
5399
|
+
let target = null;
|
|
5400
|
+
switch (event.key) {
|
|
5401
|
+
case 'ArrowDown':
|
|
5402
|
+
target = Math.min(index + 1, rows.length - 1);
|
|
5403
|
+
break;
|
|
5404
|
+
case 'ArrowUp':
|
|
5405
|
+
target = Math.max(index - 1, 0);
|
|
5406
|
+
break;
|
|
5407
|
+
case 'Home':
|
|
5408
|
+
target = 0;
|
|
5409
|
+
break;
|
|
5410
|
+
case 'End':
|
|
5411
|
+
target = rows.length - 1;
|
|
5412
|
+
break;
|
|
5413
|
+
case 'ArrowRight':
|
|
5414
|
+
if (row.hasChildren && !row.expanded)
|
|
5415
|
+
this.toggleExpand(row.node, true);
|
|
5416
|
+
else if (row.expanded)
|
|
5417
|
+
target = index + 1;
|
|
5418
|
+
break;
|
|
5419
|
+
case 'ArrowLeft':
|
|
5420
|
+
if (row.expanded && !this.#search().trim())
|
|
5421
|
+
this.toggleExpand(row.node, false);
|
|
5422
|
+
else if (row.parentId !== null)
|
|
5423
|
+
target = rows.findIndex((r) => r.node.id === row.parentId);
|
|
5424
|
+
break;
|
|
5425
|
+
case 'Enter':
|
|
5426
|
+
case ' ':
|
|
5427
|
+
this.activate(row);
|
|
5428
|
+
break;
|
|
5429
|
+
case 'Tab':
|
|
5430
|
+
this.close(false);
|
|
5431
|
+
return;
|
|
5432
|
+
default:
|
|
5433
|
+
return;
|
|
5434
|
+
}
|
|
5435
|
+
event.preventDefault();
|
|
5436
|
+
if (target !== null && rows[target]) {
|
|
5437
|
+
this.#active.set(rows[target].node.id);
|
|
5438
|
+
this.#focusActiveAfterRender();
|
|
5439
|
+
}
|
|
5440
|
+
}
|
|
5441
|
+
#focusActiveAfterRender() {
|
|
5442
|
+
afterNextRender(() => {
|
|
5443
|
+
const id = this.focusableId();
|
|
5444
|
+
const index = this.rows().findIndex((r) => r.node.id === id);
|
|
5445
|
+
if (index >= 0)
|
|
5446
|
+
document.getElementById(this.rowDomId(index))?.focus();
|
|
5447
|
+
}, { injector: this.#injector });
|
|
5448
|
+
}
|
|
5449
|
+
// ── CVA ──────────────────────────────────────────────────────
|
|
5450
|
+
onChange = () => { };
|
|
5451
|
+
onTouched = () => { };
|
|
5452
|
+
writeValue(v) {
|
|
5453
|
+
this.value.set(v ?? (this.multiple() ? [] : null));
|
|
5454
|
+
}
|
|
5455
|
+
registerOnChange(fn) {
|
|
5456
|
+
this.onChange = fn;
|
|
5457
|
+
}
|
|
5458
|
+
registerOnTouched(fn) {
|
|
5459
|
+
this.onTouched = fn;
|
|
5460
|
+
}
|
|
5461
|
+
setDisabledState(disabled) {
|
|
5462
|
+
this.#cvaDisabled.set(disabled);
|
|
5463
|
+
}
|
|
5464
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TreeSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5465
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TreeSelectComponent, isStandalone: true, selector: "ngx-ds-tree-select", inputs: { nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, cascade: { classPropertyName: "cascade", publicName: "cascade", isSignal: true, isRequired: false, transformFunction: null }, selectableParents: { classPropertyName: "selectableParents", publicName: "selectableParents", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", 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 }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", 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 }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", expanded: "expandedChange" }, providers: [
|
|
5466
|
+
{
|
|
5467
|
+
provide: NG_VALUE_ACCESSOR,
|
|
5468
|
+
useExisting: forwardRef(() => TreeSelectComponent),
|
|
5469
|
+
multi: true,
|
|
5470
|
+
},
|
|
5471
|
+
], viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (label()) {\n <label class=\"ts__label\" [id]=\"id + '-label'\" [for]=\"id\">{{ label() }}</label>\n}\n\n<div class=\"ts\">\n <!-- Trigger -->\n <div\n #trigger\n [class]=\"triggerClasses()\"\n [id]=\"id\"\n role=\"combobox\"\n aria-haspopup=\"tree\"\n [attr.aria-labelledby]=\"label() ? id + '-label' : null\"\n [attr.aria-label]=\"label() ? null : (placeholder() ?? i18n.selectPlaceholder)\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId : null\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n (click)=\"toggleOpen()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n <div class=\"ts__value\">\n @if (selectedNodes().length === 0) {\n <span class=\"ts__placeholder\">{{ placeholder() ?? i18n.selectPlaceholder }}</span>\n } @else if (multiple()) {\n @for (node of selectedNodes(); track node.id) {\n <span class=\"ts__chip\">\n {{ node.label }}\n @if (!isDisabled()) {\n <button\n type=\"button\"\n class=\"ts__chip-remove\"\n [attr.aria-label]=\"i18n.removeChip(node.label)\"\n (click)=\"remove(node.id, $event)\"\n >\n <ngx-ds-icon [icon]=\"icons.X\" [size]=\"12\" />\n </button>\n }\n </span>\n }\n } @else {\n <span class=\"ts__single\">{{ selectedNodes()[0].label }}</span>\n }\n </div>\n <ngx-ds-icon\n [icon]=\"icons.ChevronDown\"\n [size]=\"16\"\n class=\"ts__arrow\"\n [class.ts__arrow--open]=\"isOpen()\"\n />\n </div>\n\n <!-- Panel -->\n @if (isOpen()) {\n <div class=\"ts__dropdown\">\n @if (searchable()) {\n <div class=\"ts__search-wrap\">\n <input\n class=\"ts__search\"\n type=\"text\"\n [placeholder]=\"i18n.searchPlaceholder\"\n [attr.aria-label]=\"i18n.search\"\n [value]=\"search()\"\n (input)=\"onSearch($event)\"\n (keydown)=\"onSearchKeydown($event)\"\n />\n </div>\n }\n\n <div\n class=\"ts__tree\"\n role=\"tree\"\n [id]=\"panelId\"\n [attr.aria-label]=\"label() || placeholder() || i18n.selectPlaceholder\"\n [attr.aria-multiselectable]=\"multiple() || null\"\n >\n @for (row of rows(); track row.node.id; let i = $index) {\n @let state = checkState(row.node);\n <div\n class=\"ts__row\"\n role=\"treeitem\"\n [id]=\"rowDomId(i)\"\n [class.ts__row--selected]=\"!multiple() && state === 'checked'\"\n [class.ts__row--disabled]=\"row.node.disabled\"\n [style.padding-left.rem]=\"0.5 + (row.level - 1) * 1.25\"\n [attr.aria-level]=\"row.level\"\n [attr.aria-setsize]=\"row.setsize\"\n [attr.aria-posinset]=\"row.posinset\"\n [attr.aria-expanded]=\"row.hasChildren ? row.expanded : null\"\n [attr.aria-selected]=\"multiple() ? null : state === 'checked'\"\n [attr.aria-checked]=\"multiple() ? ariaChecked(row.node) : null\"\n [attr.aria-disabled]=\"row.node.disabled || null\"\n [attr.tabindex]=\"focusableId() === row.node.id ? 0 : -1\"\n (click)=\"activate(row)\"\n (keydown)=\"onRowKeydown($event, row, i)\"\n >\n <span\n class=\"ts__toggle\"\n [class.ts__toggle--expanded]=\"row.expanded\"\n [class.ts__toggle--hidden]=\"!row.hasChildren\"\n aria-hidden=\"true\"\n (click)=\"$event.stopPropagation(); toggleExpand(row.node)\"\n >\n <ngx-ds-icon [icon]=\"icons.ChevronRight\" [size]=\"14\" />\n </span>\n\n @if (multiple()) {\n <span\n class=\"ts__check\"\n [class.ts__check--on]=\"state !== 'unchecked'\"\n aria-hidden=\"true\"\n >\n @if (state === 'checked') {\n <ngx-ds-icon [icon]=\"icons.Check\" [size]=\"12\" />\n } @else if (state === 'mixed') {\n <ngx-ds-icon [icon]=\"icons.Minus\" [size]=\"12\" />\n }\n </span>\n }\n\n <span class=\"ts__row-label\">{{ row.node.label }}</span>\n\n @if (!multiple() && state === 'checked') {\n <ngx-ds-icon class=\"ts__row-mark\" [icon]=\"icons.Check\" [size]=\"14\" />\n }\n </div>\n } @empty {\n <div class=\"ts__empty\">{{ i18n.noResults }}</div>\n }\n </div>\n </div>\n }\n</div>\n\n@if (errorText()) {\n <p [id]=\"messageId\" role=\"alert\" class=\"ts__error\">{{ errorText() }}</p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ts__hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ts__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-base, #111827)}.ts{position:relative}.ts__trigger{display:flex;align-items:center;gap:.5rem;border:1px solid var(--border-input, #d1d5db);border-radius:.5rem;background:var(--surface-base, #ffffff);color:var(--text-base, #111827);cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease}.ts__trigger--sm{padding:.25rem .625rem;font-size:.8125rem;min-height:2rem}.ts__trigger--md{padding:.375rem .75rem;font-size:.875rem;min-height:2.5rem}.ts__trigger--lg{padding:.5rem 1rem;font-size:1rem;min-height:3rem}.ts__trigger--open,.ts__trigger:focus{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px var(--primary-100, #e0e7ff);outline:none}.ts__trigger--error{border-color:var(--danger-600, #dc2626)}.ts__trigger--disabled{cursor:not-allowed;opacity:.6;background:var(--surface-subtle, #f9fafb)}.ts__value{flex:1;display:flex;flex-wrap:wrap;gap:.25rem;min-width:0}.ts__placeholder{color:var(--text-placeholder, #6b7280)}.ts__single{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ts__chip{display:inline-flex;align-items:center;gap:.25rem;background:var(--primary-100, #e0e7ff);color:var(--primary-700, #4338ca);border-radius:.25rem;font-size:.75rem;font-weight:500;padding:.125rem .375rem}.ts__chip-remove{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;margin:-.25rem -.375rem -.25rem -.125rem;border-radius:.25rem;background:none;border:none;padding:0;cursor:pointer;color:inherit;opacity:.7;line-height:1}.ts__chip-remove:hover{opacity:1}.ts__arrow{flex-shrink:0;color:var(--text-placeholder, #6b7280);transition:transform .2s ease}.ts__arrow--open{transform:rotate(180deg)}.ts__dropdown{position:absolute;top:calc(100% + .25rem);left:0;right:0;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.5rem;box-shadow:0 4px 16px #0000001a;z-index:1000;overflow:hidden}.ts__search-wrap{padding:.5rem;border-bottom:1px solid var(--border-base, #e5e7eb)}.ts__search{width:100%;border:1px solid var(--border-input, #d1d5db);border-radius:.375rem;padding:.375rem .5rem;font-family:inherit;font-size:.8125rem;outline:none;background:var(--surface-subtle, #f9fafb);color:var(--text-base, #111827);box-sizing:border-box}.ts__search:focus{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 2px var(--primary-100, #e0e7ff)}.ts__tree{padding:.25rem;max-height:16rem;overflow-y:auto}.ts__row{display:flex;align-items:center;gap:.375rem;padding-top:.375rem;padding-bottom:.375rem;padding-right:.625rem;border-radius:.375rem;cursor:pointer;font-size:.875rem;color:var(--text-base, #111827);transition:background .1s ease}.ts__row:hover:not(.ts__row--disabled){background:var(--surface-hover, #f3f4f6)}.ts__row:focus-visible{outline:2px solid var(--primary-500, #6366f1);outline-offset:-2px}.ts__row--selected{background:var(--primary-50, #eef2ff);color:var(--primary-700, #4338ca)}.ts__row--disabled{opacity:.45;cursor:not-allowed}.ts__toggle{display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;flex-shrink:0;border-radius:.25rem;color:var(--text-muted, #6b7280);transition:transform .15s ease}.ts__toggle:hover{background:var(--surface-active, #e5e7eb)}.ts__toggle--expanded{transform:rotate(90deg)}.ts__toggle--hidden{visibility:hidden}.ts__check{display:inline-flex;align-items:center;justify-content:center;width:1rem;height:1rem;flex-shrink:0;border:1.5px solid var(--border-input, #d1d5db);border-radius:.25rem;background:var(--surface-base, #ffffff);color:var(--text-on-color, #ffffff)}.ts__check--on{border-color:var(--fill-primary, #4f46e5);background:var(--fill-primary, #4f46e5)}.ts__row-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ts__row-mark{flex-shrink:0}.ts__empty{padding:.75rem;text-align:center;font-size:.8125rem;color:var(--text-placeholder, #6b7280)}.ts__hint{margin:.375rem 0 0;font-size:.8125rem;color:var(--text-muted, #6b7280)}.ts__error{margin:.375rem 0 0;font-size:.8125rem;color:var(--danger-600, #dc2626)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5472
|
+
}
|
|
5473
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TreeSelectComponent, decorators: [{
|
|
5474
|
+
type: Component,
|
|
5475
|
+
args: [{ selector: 'ngx-ds-tree-select', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
5476
|
+
{
|
|
5477
|
+
provide: NG_VALUE_ACCESSOR,
|
|
5478
|
+
useExisting: forwardRef(() => TreeSelectComponent),
|
|
5479
|
+
multi: true,
|
|
5480
|
+
},
|
|
5481
|
+
], template: "@if (label()) {\n <label class=\"ts__label\" [id]=\"id + '-label'\" [for]=\"id\">{{ label() }}</label>\n}\n\n<div class=\"ts\">\n <!-- Trigger -->\n <div\n #trigger\n [class]=\"triggerClasses()\"\n [id]=\"id\"\n role=\"combobox\"\n aria-haspopup=\"tree\"\n [attr.aria-labelledby]=\"label() ? id + '-label' : null\"\n [attr.aria-label]=\"label() ? null : (placeholder() ?? i18n.selectPlaceholder)\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId : null\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-invalid]=\"hasError() || null\"\n [attr.aria-describedby]=\"errorText() || hint() ? messageId : null\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n (click)=\"toggleOpen()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n <div class=\"ts__value\">\n @if (selectedNodes().length === 0) {\n <span class=\"ts__placeholder\">{{ placeholder() ?? i18n.selectPlaceholder }}</span>\n } @else if (multiple()) {\n @for (node of selectedNodes(); track node.id) {\n <span class=\"ts__chip\">\n {{ node.label }}\n @if (!isDisabled()) {\n <button\n type=\"button\"\n class=\"ts__chip-remove\"\n [attr.aria-label]=\"i18n.removeChip(node.label)\"\n (click)=\"remove(node.id, $event)\"\n >\n <ngx-ds-icon [icon]=\"icons.X\" [size]=\"12\" />\n </button>\n }\n </span>\n }\n } @else {\n <span class=\"ts__single\">{{ selectedNodes()[0].label }}</span>\n }\n </div>\n <ngx-ds-icon\n [icon]=\"icons.ChevronDown\"\n [size]=\"16\"\n class=\"ts__arrow\"\n [class.ts__arrow--open]=\"isOpen()\"\n />\n </div>\n\n <!-- Panel -->\n @if (isOpen()) {\n <div class=\"ts__dropdown\">\n @if (searchable()) {\n <div class=\"ts__search-wrap\">\n <input\n class=\"ts__search\"\n type=\"text\"\n [placeholder]=\"i18n.searchPlaceholder\"\n [attr.aria-label]=\"i18n.search\"\n [value]=\"search()\"\n (input)=\"onSearch($event)\"\n (keydown)=\"onSearchKeydown($event)\"\n />\n </div>\n }\n\n <div\n class=\"ts__tree\"\n role=\"tree\"\n [id]=\"panelId\"\n [attr.aria-label]=\"label() || placeholder() || i18n.selectPlaceholder\"\n [attr.aria-multiselectable]=\"multiple() || null\"\n >\n @for (row of rows(); track row.node.id; let i = $index) {\n @let state = checkState(row.node);\n <div\n class=\"ts__row\"\n role=\"treeitem\"\n [id]=\"rowDomId(i)\"\n [class.ts__row--selected]=\"!multiple() && state === 'checked'\"\n [class.ts__row--disabled]=\"row.node.disabled\"\n [style.padding-left.rem]=\"0.5 + (row.level - 1) * 1.25\"\n [attr.aria-level]=\"row.level\"\n [attr.aria-setsize]=\"row.setsize\"\n [attr.aria-posinset]=\"row.posinset\"\n [attr.aria-expanded]=\"row.hasChildren ? row.expanded : null\"\n [attr.aria-selected]=\"multiple() ? null : state === 'checked'\"\n [attr.aria-checked]=\"multiple() ? ariaChecked(row.node) : null\"\n [attr.aria-disabled]=\"row.node.disabled || null\"\n [attr.tabindex]=\"focusableId() === row.node.id ? 0 : -1\"\n (click)=\"activate(row)\"\n (keydown)=\"onRowKeydown($event, row, i)\"\n >\n <span\n class=\"ts__toggle\"\n [class.ts__toggle--expanded]=\"row.expanded\"\n [class.ts__toggle--hidden]=\"!row.hasChildren\"\n aria-hidden=\"true\"\n (click)=\"$event.stopPropagation(); toggleExpand(row.node)\"\n >\n <ngx-ds-icon [icon]=\"icons.ChevronRight\" [size]=\"14\" />\n </span>\n\n @if (multiple()) {\n <span\n class=\"ts__check\"\n [class.ts__check--on]=\"state !== 'unchecked'\"\n aria-hidden=\"true\"\n >\n @if (state === 'checked') {\n <ngx-ds-icon [icon]=\"icons.Check\" [size]=\"12\" />\n } @else if (state === 'mixed') {\n <ngx-ds-icon [icon]=\"icons.Minus\" [size]=\"12\" />\n }\n </span>\n }\n\n <span class=\"ts__row-label\">{{ row.node.label }}</span>\n\n @if (!multiple() && state === 'checked') {\n <ngx-ds-icon class=\"ts__row-mark\" [icon]=\"icons.Check\" [size]=\"14\" />\n }\n </div>\n } @empty {\n <div class=\"ts__empty\">{{ i18n.noResults }}</div>\n }\n </div>\n </div>\n }\n</div>\n\n@if (errorText()) {\n <p [id]=\"messageId\" role=\"alert\" class=\"ts__error\">{{ errorText() }}</p>\n} @else if (hint()) {\n <p [id]=\"messageId\" class=\"ts__hint\">{{ hint() }}</p>\n}\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.ts__label{display:block;margin-bottom:.375rem;font-size:.875rem;font-weight:500;color:var(--text-base, #111827)}.ts{position:relative}.ts__trigger{display:flex;align-items:center;gap:.5rem;border:1px solid var(--border-input, #d1d5db);border-radius:.5rem;background:var(--surface-base, #ffffff);color:var(--text-base, #111827);cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease}.ts__trigger--sm{padding:.25rem .625rem;font-size:.8125rem;min-height:2rem}.ts__trigger--md{padding:.375rem .75rem;font-size:.875rem;min-height:2.5rem}.ts__trigger--lg{padding:.5rem 1rem;font-size:1rem;min-height:3rem}.ts__trigger--open,.ts__trigger:focus{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px var(--primary-100, #e0e7ff);outline:none}.ts__trigger--error{border-color:var(--danger-600, #dc2626)}.ts__trigger--disabled{cursor:not-allowed;opacity:.6;background:var(--surface-subtle, #f9fafb)}.ts__value{flex:1;display:flex;flex-wrap:wrap;gap:.25rem;min-width:0}.ts__placeholder{color:var(--text-placeholder, #6b7280)}.ts__single{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ts__chip{display:inline-flex;align-items:center;gap:.25rem;background:var(--primary-100, #e0e7ff);color:var(--primary-700, #4338ca);border-radius:.25rem;font-size:.75rem;font-weight:500;padding:.125rem .375rem}.ts__chip-remove{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;margin:-.25rem -.375rem -.25rem -.125rem;border-radius:.25rem;background:none;border:none;padding:0;cursor:pointer;color:inherit;opacity:.7;line-height:1}.ts__chip-remove:hover{opacity:1}.ts__arrow{flex-shrink:0;color:var(--text-placeholder, #6b7280);transition:transform .2s ease}.ts__arrow--open{transform:rotate(180deg)}.ts__dropdown{position:absolute;top:calc(100% + .25rem);left:0;right:0;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.5rem;box-shadow:0 4px 16px #0000001a;z-index:1000;overflow:hidden}.ts__search-wrap{padding:.5rem;border-bottom:1px solid var(--border-base, #e5e7eb)}.ts__search{width:100%;border:1px solid var(--border-input, #d1d5db);border-radius:.375rem;padding:.375rem .5rem;font-family:inherit;font-size:.8125rem;outline:none;background:var(--surface-subtle, #f9fafb);color:var(--text-base, #111827);box-sizing:border-box}.ts__search:focus{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 2px var(--primary-100, #e0e7ff)}.ts__tree{padding:.25rem;max-height:16rem;overflow-y:auto}.ts__row{display:flex;align-items:center;gap:.375rem;padding-top:.375rem;padding-bottom:.375rem;padding-right:.625rem;border-radius:.375rem;cursor:pointer;font-size:.875rem;color:var(--text-base, #111827);transition:background .1s ease}.ts__row:hover:not(.ts__row--disabled){background:var(--surface-hover, #f3f4f6)}.ts__row:focus-visible{outline:2px solid var(--primary-500, #6366f1);outline-offset:-2px}.ts__row--selected{background:var(--primary-50, #eef2ff);color:var(--primary-700, #4338ca)}.ts__row--disabled{opacity:.45;cursor:not-allowed}.ts__toggle{display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;flex-shrink:0;border-radius:.25rem;color:var(--text-muted, #6b7280);transition:transform .15s ease}.ts__toggle:hover{background:var(--surface-active, #e5e7eb)}.ts__toggle--expanded{transform:rotate(90deg)}.ts__toggle--hidden{visibility:hidden}.ts__check{display:inline-flex;align-items:center;justify-content:center;width:1rem;height:1rem;flex-shrink:0;border:1.5px solid var(--border-input, #d1d5db);border-radius:.25rem;background:var(--surface-base, #ffffff);color:var(--text-on-color, #ffffff)}.ts__check--on{border-color:var(--fill-primary, #4f46e5);background:var(--fill-primary, #4f46e5)}.ts__row-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ts__row-mark{flex-shrink:0}.ts__empty{padding:.75rem;text-align:center;font-size:.8125rem;color:var(--text-placeholder, #6b7280)}.ts__hint{margin:.375rem 0 0;font-size:.8125rem;color:var(--text-muted, #6b7280)}.ts__error{margin:.375rem 0 0;font-size:.8125rem;color:var(--danger-600, #dc2626)}\n"] }]
|
|
5482
|
+
}], ctorParameters: () => [], propDecorators: { nodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodes", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], cascade: [{ type: i0.Input, args: [{ isSignal: true, alias: "cascade", required: false }] }], selectableParents: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectableParents", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], 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 }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }], triggerRef: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }] } });
|
|
5483
|
+
|
|
4740
5484
|
class PaginationComponent {
|
|
4741
5485
|
i18n = inject(NGX_DS_LABELS);
|
|
4742
5486
|
totalPages = input.required(...(ngDevMode ? [{ debugName: "totalPages" }] : /* istanbul ignore next */ []));
|
|
@@ -4778,11 +5522,11 @@ class PaginationComponent {
|
|
|
4778
5522
|
this.go(this.currentPage() + 1);
|
|
4779
5523
|
}
|
|
4780
5524
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4781
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: PaginationComponent, isStandalone: true, selector: "ngx-ds-pagination", inputs: { totalPages: { classPropertyName: "totalPages", publicName: "totalPages", isSignal: true, isRequired: true, transformFunction: null }, siblings: { classPropertyName: "siblings", publicName: "siblings", isSignal: true, isRequired: false, transformFunction: null }, showBoundary: { classPropertyName: "showBoundary", publicName: "showBoundary", isSignal: true, isRequired: false, transformFunction: null }, currentPage: { classPropertyName: "currentPage", publicName: "currentPage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { currentPage: "currentPageChange", pageChange: "pageChange" }, ngImport: i0, template: "<nav class=\"pagination\" [attr.aria-label]=\"i18n.pagination\">\n <!-- Prev -->\n <ngx-ds-button\n size=\"sm\"\n variant=\"outline\"\n color=\"secondary\"\n [disabled]=\"currentPage() === 1\"\n (click)=\"prev()\"\n [
|
|
5525
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: PaginationComponent, isStandalone: true, selector: "ngx-ds-pagination", inputs: { totalPages: { classPropertyName: "totalPages", publicName: "totalPages", isSignal: true, isRequired: true, transformFunction: null }, siblings: { classPropertyName: "siblings", publicName: "siblings", isSignal: true, isRequired: false, transformFunction: null }, showBoundary: { classPropertyName: "showBoundary", publicName: "showBoundary", isSignal: true, isRequired: false, transformFunction: null }, currentPage: { classPropertyName: "currentPage", publicName: "currentPage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { currentPage: "currentPageChange", pageChange: "pageChange" }, ngImport: i0, template: "<nav class=\"pagination\" [attr.aria-label]=\"i18n.pagination\">\n <!-- Prev -->\n <ngx-ds-button\n size=\"sm\"\n variant=\"outline\"\n color=\"secondary\"\n [disabled]=\"currentPage() === 1\"\n (click)=\"prev()\"\n [ariaLabel]=\"i18n.prevPage\"\n >\n <span class=\"pagination__arrow pagination__arrow--prev\" aria-hidden=\"true\"></span>\n </ngx-ds-button>\n\n <!-- Pages -->\n @for (page of pages(); track $index) {\n @if (page === '...') {\n <span class=\"pagination__ellipsis\" aria-hidden=\"true\">\u2026</span>\n } @else {\n <ngx-ds-button\n size=\"sm\"\n [variant]=\"page === currentPage() ? 'solid' : 'outline'\"\n [color]=\"page === currentPage() ? 'primary' : 'secondary'\"\n [attr.aria-current]=\"page === currentPage() ? 'page' : null\"\n (click)=\"go(page)\"\n >{{ page }}</ngx-ds-button\n >\n }\n }\n\n <!-- Next -->\n <ngx-ds-button\n size=\"sm\"\n variant=\"outline\"\n color=\"secondary\"\n [disabled]=\"currentPage() === totalPages()\"\n (click)=\"next()\"\n [ariaLabel]=\"i18n.nextPage\"\n >\n <span class=\"pagination__arrow pagination__arrow--next\" aria-hidden=\"true\"></span>\n </ngx-ds-button>\n</nav>\n", styles: [".pagination{display:inline-flex;align-items:center;gap:.25rem;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.pagination ngx-ds-button ::ng-deep .btn{min-width:2rem;height:2rem;padding-inline:.375rem}.pagination__ellipsis{display:inline-flex;align-items:flex-end;justify-content:center;min-width:2rem;height:2rem;padding-bottom:.2rem;font-size:1rem;color:var(--text-placeholder, #6b7280);-webkit-user-select:none;user-select:none}.pagination__arrow{display:block;width:.45rem;height:.45rem;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor}.pagination__arrow--prev{transform:rotate(135deg) translate(-1px,-1px)}.pagination__arrow--next{transform:rotate(-45deg) translate(1px,-1px)}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "ngx-ds-button", inputs: ["variant", "size", "color", "iconLeft", "iconRight", "disabled", "loading", "rounded", "type", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4782
5526
|
}
|
|
4783
5527
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: PaginationComponent, decorators: [{
|
|
4784
5528
|
type: Component,
|
|
4785
|
-
args: [{ selector: 'ngx-ds-pagination', standalone: true, imports: [ButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav class=\"pagination\" [attr.aria-label]=\"i18n.pagination\">\n <!-- Prev -->\n <ngx-ds-button\n size=\"sm\"\n variant=\"outline\"\n color=\"secondary\"\n [disabled]=\"currentPage() === 1\"\n (click)=\"prev()\"\n [
|
|
5529
|
+
args: [{ selector: 'ngx-ds-pagination', standalone: true, imports: [ButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav class=\"pagination\" [attr.aria-label]=\"i18n.pagination\">\n <!-- Prev -->\n <ngx-ds-button\n size=\"sm\"\n variant=\"outline\"\n color=\"secondary\"\n [disabled]=\"currentPage() === 1\"\n (click)=\"prev()\"\n [ariaLabel]=\"i18n.prevPage\"\n >\n <span class=\"pagination__arrow pagination__arrow--prev\" aria-hidden=\"true\"></span>\n </ngx-ds-button>\n\n <!-- Pages -->\n @for (page of pages(); track $index) {\n @if (page === '...') {\n <span class=\"pagination__ellipsis\" aria-hidden=\"true\">\u2026</span>\n } @else {\n <ngx-ds-button\n size=\"sm\"\n [variant]=\"page === currentPage() ? 'solid' : 'outline'\"\n [color]=\"page === currentPage() ? 'primary' : 'secondary'\"\n [attr.aria-current]=\"page === currentPage() ? 'page' : null\"\n (click)=\"go(page)\"\n >{{ page }}</ngx-ds-button\n >\n }\n }\n\n <!-- Next -->\n <ngx-ds-button\n size=\"sm\"\n variant=\"outline\"\n color=\"secondary\"\n [disabled]=\"currentPage() === totalPages()\"\n (click)=\"next()\"\n [ariaLabel]=\"i18n.nextPage\"\n >\n <span class=\"pagination__arrow pagination__arrow--next\" aria-hidden=\"true\"></span>\n </ngx-ds-button>\n</nav>\n", styles: [".pagination{display:inline-flex;align-items:center;gap:.25rem;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.pagination ngx-ds-button ::ng-deep .btn{min-width:2rem;height:2rem;padding-inline:.375rem}.pagination__ellipsis{display:inline-flex;align-items:flex-end;justify-content:center;min-width:2rem;height:2rem;padding-bottom:.2rem;font-size:1rem;color:var(--text-placeholder, #6b7280);-webkit-user-select:none;user-select:none}.pagination__arrow{display:block;width:.45rem;height:.45rem;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor}.pagination__arrow--prev{transform:rotate(135deg) translate(-1px,-1px)}.pagination__arrow--next{transform:rotate(-45deg) translate(1px,-1px)}\n"] }]
|
|
4786
5530
|
}], propDecorators: { totalPages: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalPages", required: true }] }], siblings: [{ type: i0.Input, args: [{ isSignal: true, alias: "siblings", required: false }] }], showBoundary: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBoundary", required: false }] }], currentPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPage", required: false }] }, { type: i0.Output, args: ["currentPageChange"] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }] } });
|
|
4787
5531
|
|
|
4788
5532
|
class ToastComponent {
|
|
@@ -4849,11 +5593,11 @@ class ConfirmationComponent {
|
|
|
4849
5593
|
this.onCancel();
|
|
4850
5594
|
}
|
|
4851
5595
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ConfirmationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4852
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ConfirmationComponent, isStandalone: true, selector: "ngx-ds-confirmation", inputs: { closeOnBackdrop: { classPropertyName: "closeOnBackdrop", publicName: "closeOnBackdrop", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (state().isOpen) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- backdrop click is a mouse shortcut; keyboard users close with Escape -->\n <div\n class=\"confirmation-overlay\"\n (click)=\"$event.target === $event.currentTarget && onBackdropClick()\"\n >\n <div\n class=\"confirmation-modal\"\n [class.confirmation-modal--danger]=\"state().type === 'danger'\"\n [class.confirmation-modal--warning]=\"state().type === 'warning'\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"ngx-confirmation-title\"\n ngxFocusTrap\n tabindex=\"-1\"\n >\n <div class=\"confirmation-modal__header\">\n @if (state().type === 'danger') {\n <div class=\"confirmation-modal__icon confirmation-modal__icon--danger\">\n <svg fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n />\n </svg>\n </div>\n } @else if (state().type === 'warning') {\n <div class=\"confirmation-modal__icon confirmation-modal__icon--warning\">\n <svg fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n />\n </svg>\n </div>\n } @else {\n <div class=\"confirmation-modal__icon confirmation-modal__icon--info\">\n <svg fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n </div>\n }\n </div>\n\n <div class=\"confirmation-modal__body\">\n <h2 class=\"confirmation-modal__title\" id=\"ngx-confirmation-title\">{{ state().title }}</h2>\n <p class=\"confirmation-modal__message\">{{ state().message }}</p>\n </div>\n\n <div class=\"confirmation-modal__footer\">\n <ngx-ds-button variant=\"solid\" color=\"danger\" (click)=\"onCancel()\">{{\n state().cancelText\n }}</ngx-ds-button>\n <ngx-ds-button variant=\"solid\" color=\"primary\" (click)=\"onConfirm()\">{{\n state().confirmText\n }}</ngx-ds-button>\n </div>\n </div>\n </div>\n}\n", styles: [".confirmation-overlay{position:fixed;inset:0;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:10000;animation:fadeIn .2s ease-out;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.confirmation-modal{background-color:#fff;border-radius:.75rem;width:90%;max-width:28rem;box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a;animation:slideUp .2s ease-out;font-family:Poppins,sans-serif}@keyframes slideUp{0%{opacity:0;transform:translateY(1rem)}to{opacity:1;transform:translateY(0)}}.confirmation-modal__header{display:flex;justify-content:center;align-items:center;padding:2rem 1.5rem 1rem}.confirmation-modal__icon{width:4rem;height:4rem;flex-shrink:0;display:flex;align-items:center;justify-content:center}.confirmation-modal__icon--info{color:var(--info
|
|
5596
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ConfirmationComponent, isStandalone: true, selector: "ngx-ds-confirmation", inputs: { closeOnBackdrop: { classPropertyName: "closeOnBackdrop", publicName: "closeOnBackdrop", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (state().isOpen) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- backdrop click is a mouse shortcut; keyboard users close with Escape -->\n <div\n class=\"confirmation-overlay\"\n (click)=\"$event.target === $event.currentTarget && onBackdropClick()\"\n >\n <div\n class=\"confirmation-modal\"\n [class.confirmation-modal--danger]=\"state().type === 'danger'\"\n [class.confirmation-modal--warning]=\"state().type === 'warning'\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"ngx-confirmation-title\"\n ngxFocusTrap\n tabindex=\"-1\"\n >\n <div class=\"confirmation-modal__header\">\n @if (state().type === 'danger') {\n <div class=\"confirmation-modal__icon confirmation-modal__icon--danger\">\n <svg fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n />\n </svg>\n </div>\n } @else if (state().type === 'warning') {\n <div class=\"confirmation-modal__icon confirmation-modal__icon--warning\">\n <svg fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n />\n </svg>\n </div>\n } @else {\n <div class=\"confirmation-modal__icon confirmation-modal__icon--info\">\n <svg fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n </div>\n }\n </div>\n\n <div class=\"confirmation-modal__body\">\n <h2 class=\"confirmation-modal__title\" id=\"ngx-confirmation-title\">{{ state().title }}</h2>\n <p class=\"confirmation-modal__message\">{{ state().message }}</p>\n </div>\n\n <div class=\"confirmation-modal__footer\">\n <ngx-ds-button variant=\"solid\" color=\"danger\" (click)=\"onCancel()\">{{\n state().cancelText\n }}</ngx-ds-button>\n <ngx-ds-button variant=\"solid\" color=\"primary\" (click)=\"onConfirm()\">{{\n state().confirmText\n }}</ngx-ds-button>\n </div>\n </div>\n </div>\n}\n", styles: [".confirmation-overlay{position:fixed;inset:0;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:10000;animation:fadeIn .2s ease-out;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.confirmation-modal{background-color:#fff;border-radius:.75rem;width:90%;max-width:28rem;box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a;animation:slideUp .2s ease-out;font-family:Poppins,sans-serif}@keyframes slideUp{0%{opacity:0;transform:translateY(1rem)}to{opacity:1;transform:translateY(0)}}.confirmation-modal__header{display:flex;justify-content:center;align-items:center;padding:2rem 1.5rem 1rem}.confirmation-modal__icon{width:4rem;height:4rem;flex-shrink:0;display:flex;align-items:center;justify-content:center}.confirmation-modal__icon--info{color:var(--fill-info, #2563eb)}.confirmation-modal__icon--warning{color:var(--fill-warning, #b45309)}.confirmation-modal__icon--danger{color:var(--fill-danger, #dc2626)}.confirmation-modal__icon svg{width:100%;height:100%}.confirmation-modal__body{padding:0 1.5rem 1.5rem;text-align:center}.confirmation-modal__title{font-size:1.25rem;font-weight:700;color:var(--text-base, #111827);margin:0 0 .75rem;line-height:1.4}.confirmation-modal__message{font-size:.9375rem;color:var(--text-muted, #6b7280);margin:0;line-height:1.6}.confirmation-modal__footer{display:flex;gap:.75rem;justify-content:center;padding:1rem 1.5rem;border-top:1px solid var(--border-base, #e5e7eb)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ButtonComponent, selector: "ngx-ds-button", inputs: ["variant", "size", "color", "iconLeft", "iconRight", "disabled", "loading", "rounded", "type", "ariaLabel"] }, { kind: "directive", type: FocusTrapDirective, selector: "[ngxFocusTrap]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4853
5597
|
}
|
|
4854
5598
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ConfirmationComponent, decorators: [{
|
|
4855
5599
|
type: Component,
|
|
4856
|
-
args: [{ selector: 'ngx-ds-confirmation', standalone: true, imports: [CommonModule, ButtonComponent, FocusTrapDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (state().isOpen) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- backdrop click is a mouse shortcut; keyboard users close with Escape -->\n <div\n class=\"confirmation-overlay\"\n (click)=\"$event.target === $event.currentTarget && onBackdropClick()\"\n >\n <div\n class=\"confirmation-modal\"\n [class.confirmation-modal--danger]=\"state().type === 'danger'\"\n [class.confirmation-modal--warning]=\"state().type === 'warning'\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"ngx-confirmation-title\"\n ngxFocusTrap\n tabindex=\"-1\"\n >\n <div class=\"confirmation-modal__header\">\n @if (state().type === 'danger') {\n <div class=\"confirmation-modal__icon confirmation-modal__icon--danger\">\n <svg fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n />\n </svg>\n </div>\n } @else if (state().type === 'warning') {\n <div class=\"confirmation-modal__icon confirmation-modal__icon--warning\">\n <svg fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n />\n </svg>\n </div>\n } @else {\n <div class=\"confirmation-modal__icon confirmation-modal__icon--info\">\n <svg fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n </div>\n }\n </div>\n\n <div class=\"confirmation-modal__body\">\n <h2 class=\"confirmation-modal__title\" id=\"ngx-confirmation-title\">{{ state().title }}</h2>\n <p class=\"confirmation-modal__message\">{{ state().message }}</p>\n </div>\n\n <div class=\"confirmation-modal__footer\">\n <ngx-ds-button variant=\"solid\" color=\"danger\" (click)=\"onCancel()\">{{\n state().cancelText\n }}</ngx-ds-button>\n <ngx-ds-button variant=\"solid\" color=\"primary\" (click)=\"onConfirm()\">{{\n state().confirmText\n }}</ngx-ds-button>\n </div>\n </div>\n </div>\n}\n", styles: [".confirmation-overlay{position:fixed;inset:0;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:10000;animation:fadeIn .2s ease-out;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.confirmation-modal{background-color:#fff;border-radius:.75rem;width:90%;max-width:28rem;box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a;animation:slideUp .2s ease-out;font-family:Poppins,sans-serif}@keyframes slideUp{0%{opacity:0;transform:translateY(1rem)}to{opacity:1;transform:translateY(0)}}.confirmation-modal__header{display:flex;justify-content:center;align-items:center;padding:2rem 1.5rem 1rem}.confirmation-modal__icon{width:4rem;height:4rem;flex-shrink:0;display:flex;align-items:center;justify-content:center}.confirmation-modal__icon--info{color:var(--info
|
|
5600
|
+
args: [{ selector: 'ngx-ds-confirmation', standalone: true, imports: [CommonModule, ButtonComponent, FocusTrapDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (state().isOpen) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- backdrop click is a mouse shortcut; keyboard users close with Escape -->\n <div\n class=\"confirmation-overlay\"\n (click)=\"$event.target === $event.currentTarget && onBackdropClick()\"\n >\n <div\n class=\"confirmation-modal\"\n [class.confirmation-modal--danger]=\"state().type === 'danger'\"\n [class.confirmation-modal--warning]=\"state().type === 'warning'\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"ngx-confirmation-title\"\n ngxFocusTrap\n tabindex=\"-1\"\n >\n <div class=\"confirmation-modal__header\">\n @if (state().type === 'danger') {\n <div class=\"confirmation-modal__icon confirmation-modal__icon--danger\">\n <svg fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n />\n </svg>\n </div>\n } @else if (state().type === 'warning') {\n <div class=\"confirmation-modal__icon confirmation-modal__icon--warning\">\n <svg fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n />\n </svg>\n </div>\n } @else {\n <div class=\"confirmation-modal__icon confirmation-modal__icon--info\">\n <svg fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n </div>\n }\n </div>\n\n <div class=\"confirmation-modal__body\">\n <h2 class=\"confirmation-modal__title\" id=\"ngx-confirmation-title\">{{ state().title }}</h2>\n <p class=\"confirmation-modal__message\">{{ state().message }}</p>\n </div>\n\n <div class=\"confirmation-modal__footer\">\n <ngx-ds-button variant=\"solid\" color=\"danger\" (click)=\"onCancel()\">{{\n state().cancelText\n }}</ngx-ds-button>\n <ngx-ds-button variant=\"solid\" color=\"primary\" (click)=\"onConfirm()\">{{\n state().confirmText\n }}</ngx-ds-button>\n </div>\n </div>\n </div>\n}\n", styles: [".confirmation-overlay{position:fixed;inset:0;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:10000;animation:fadeIn .2s ease-out;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.confirmation-modal{background-color:#fff;border-radius:.75rem;width:90%;max-width:28rem;box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a;animation:slideUp .2s ease-out;font-family:Poppins,sans-serif}@keyframes slideUp{0%{opacity:0;transform:translateY(1rem)}to{opacity:1;transform:translateY(0)}}.confirmation-modal__header{display:flex;justify-content:center;align-items:center;padding:2rem 1.5rem 1rem}.confirmation-modal__icon{width:4rem;height:4rem;flex-shrink:0;display:flex;align-items:center;justify-content:center}.confirmation-modal__icon--info{color:var(--fill-info, #2563eb)}.confirmation-modal__icon--warning{color:var(--fill-warning, #b45309)}.confirmation-modal__icon--danger{color:var(--fill-danger, #dc2626)}.confirmation-modal__icon svg{width:100%;height:100%}.confirmation-modal__body{padding:0 1.5rem 1.5rem;text-align:center}.confirmation-modal__title{font-size:1.25rem;font-weight:700;color:var(--text-base, #111827);margin:0 0 .75rem;line-height:1.4}.confirmation-modal__message{font-size:.9375rem;color:var(--text-muted, #6b7280);margin:0;line-height:1.6}.confirmation-modal__footer{display:flex;gap:.75rem;justify-content:center;padding:1rem 1.5rem;border-top:1px solid var(--border-base, #e5e7eb)}\n"] }]
|
|
4857
5601
|
}], ctorParameters: () => [], propDecorators: { closeOnBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdrop", required: false }] }] } });
|
|
4858
5602
|
|
|
4859
5603
|
// ── Component ────────────────────────────────────────────────────────────────
|
|
@@ -5228,7 +5972,7 @@ class TableComponent {
|
|
|
5228
5972
|
this.addClick.emit();
|
|
5229
5973
|
}
|
|
5230
5974
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5231
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TableComponent, isStandalone: true, selector: "ngx-ds-table", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingRows: { classPropertyName: "loadingRows", publicName: "loadingRows", isSignal: true, isRequired: false, transformFunction: null }, clientSide: { classPropertyName: "clientSide", publicName: "clientSide", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, selectMode: { classPropertyName: "selectMode", publicName: "selectMode", isSignal: true, isRequired: false, transformFunction: null }, selectedRows: { classPropertyName: "selectedRows", publicName: "selectedRows", isSignal: true, isRequired: false, transformFunction: null }, rowKey: { classPropertyName: "rowKey", publicName: "rowKey", isSignal: true, isRequired: false, transformFunction: null }, sort: { classPropertyName: "sort", publicName: "sort", isSignal: true, isRequired: false, transformFunction: null }, paginated: { classPropertyName: "paginated", publicName: "paginated", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", 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 }, striped: { classPropertyName: "striped", publicName: "striped", isSignal: true, isRequired: false, transformFunction: null }, hoverable: { classPropertyName: "hoverable", publicName: "hoverable", isSignal: true, isRequired: false, transformFunction: null }, dense: { classPropertyName: "dense", publicName: "dense", 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 }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, emptyDescription: { classPropertyName: "emptyDescription", publicName: "emptyDescription", isSignal: true, isRequired: false, transformFunction: null }, emptyIcon: { classPropertyName: "emptyIcon", publicName: "emptyIcon", isSignal: true, isRequired: false, transformFunction: null }, emptyTemplate: { classPropertyName: "emptyTemplate", publicName: "emptyTemplate", isSignal: true, isRequired: false, transformFunction: null }, rowClickable: { classPropertyName: "rowClickable", publicName: "rowClickable", isSignal: true, isRequired: false, transformFunction: null }, addLabel: { classPropertyName: "addLabel", publicName: "addLabel", isSignal: true, isRequired: false, transformFunction: null }, showAddButton: { classPropertyName: "showAddButton", publicName: "showAddButton", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, actionsLabel: { classPropertyName: "actionsLabel", publicName: "actionsLabel", isSignal: true, isRequired: false, transformFunction: null }, actionsWidth: { classPropertyName: "actionsWidth", publicName: "actionsWidth", isSignal: true, isRequired: false, transformFunction: null }, globalFilter: { classPropertyName: "globalFilter", publicName: "globalFilter", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, filterKeys: { classPropertyName: "filterKeys", publicName: "filterKeys", isSignal: true, isRequired: false, transformFunction: null }, filterValue: { classPropertyName: "filterValue", publicName: "filterValue", isSignal: true, isRequired: false, transformFunction: null }, columnToggle: { classPropertyName: "columnToggle", publicName: "columnToggle", isSignal: true, isRequired: false, transformFunction: null }, visibleColumnKeys: { classPropertyName: "visibleColumnKeys", publicName: "visibleColumnKeys", isSignal: true, isRequired: false, transformFunction: null }, expandable: { classPropertyName: "expandable", publicName: "expandable", isSignal: true, isRequired: false, transformFunction: null }, expandTemplate: { classPropertyName: "expandTemplate", publicName: "expandTemplate", isSignal: true, isRequired: false, transformFunction: null }, singleExpand: { classPropertyName: "singleExpand", publicName: "singleExpand", isSignal: true, isRequired: false, transformFunction: null }, expandedRows: { classPropertyName: "expandedRows", publicName: "expandedRows", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedRows: "selectedRowsChange", filterValue: "filterValueChange", visibleColumnKeys: "visibleColumnKeysChange", expandedRows: "expandedRowsChange", sortChange: "sortChange", pageChange: "pageChange", selectionChange: "selectionChange", rowClick: "rowClick", addClick: "addClick", filterChange: "filterChange", columnVisibilityChange: "columnVisibilityChange", rowExpandChange: "rowExpandChange" }, ngImport: i0, template: "@if (globalFilter() || columnToggle() || showAddButton()) {\n <div class=\"ngx-table__toolbar\">\n @if (globalFilter()) {\n <ngx-ds-search-input\n class=\"ngx-table__toolbar-filter\"\n [value]=\"filterValue()\"\n (valueChange)=\"onFilterChange($event)\"\n [placeholder]=\"filterPlaceholder() ?? i18n.searchPlaceholder\"\n size=\"sm\"\n />\n }\n\n <div class=\"ngx-table__toolbar-actions\">\n @if (columnToggle()) {\n <div\n class=\"ngx-table__column-menu\"\n [class.ngx-table__column-menu--open]=\"isColumnMenuOpen()\"\n >\n <ngx-ds-icon-button\n [icon]=\"icons.Columns3\"\n [ariaLabel]=\"i18n.visibleColumns\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n (click)=\"toggleColumnMenu($event)\"\n />\n\n @if (isColumnMenuOpen()) {\n <div class=\"ngx-table__column-panel\">\n @for (col of hideableColumns(); track col.key) {\n <ngx-ds-checkbox\n [label]=\"col.label\"\n [checked]=\"isColumnVisible(col.key)\"\n (checkedChange)=\"toggleColumn(col.key)\"\n />\n }\n </div>\n }\n </div>\n }\n\n @if (showAddButton()) {\n <ngx-ds-button\n size=\"sm\"\n color=\"primary\"\n variant=\"solid\"\n [iconLeft]=\"icons.Plus\"\n (click)=\"onAddClick()\"\n >{{ addLabel() ?? i18n.tableAdd }}</ngx-ds-button\n >\n }\n </div>\n </div>\n}\n\n<div\n class=\"ngx-table__wrapper\"\n [class.ngx-table__wrapper--sticky-head]=\"stickyHeader()\"\n [class.ngx-table__wrapper--attached]=\"globalFilter() || columnToggle() || showAddButton()\"\n [style.maxHeight]=\"stickyHeader() && maxHeight() ? maxHeight() : null\"\n>\n <table\n class=\"ngx-table\"\n [class.ngx-table--striped]=\"striped()\"\n [class.ngx-table--hoverable]=\"hoverable()\"\n [class.ngx-table--dense]=\"dense()\"\n >\n <!-- \u2500\u2500 HEAD \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <thead class=\"ngx-table__head\">\n <tr class=\"ngx-table__row ngx-table__row--header\">\n @if (expandable()) {\n <th class=\"ngx-table__th ngx-table__th--expand\"></th>\n }\n\n @if (selectable()) {\n <th class=\"ngx-table__th ngx-table__th--checkbox\">\n @if (selectMode() === 'multi') {\n <ngx-ds-checkbox\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (checkedChange)=\"toggleAll($event)\"\n />\n }\n </th>\n }\n\n @for (col of visibleColumns(); track col.key) {\n <th\n class=\"ngx-table__th\"\n [class.ngx-table__th--sortable]=\"col.sortable\"\n [class.ngx-table__th--sorted]=\"isSortActive(col)\"\n [class.ngx-table__th--sticky]=\"col.sticky\"\n [style.width]=\"col.width ?? null\"\n [style.minWidth]=\"col.minWidth ?? null\"\n [style.maxWidth]=\"col.maxWidth ?? null\"\n [style.textAlign]=\"col.align ?? 'left'\"\n [attr.aria-sort]=\"\n isSortActive(col) ? (isSortAsc(col) ? 'ascending' : 'descending') : null\n \"\n (click)=\"col.sortable && onSort(col)\"\n >\n @if (col.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"col.headerTemplate\"\n [ngTemplateOutletContext]=\"{ column: col }\"\n />\n } @else {\n <span class=\"ngx-table__th-inner\">\n {{ col.label }}\n @if (col.sortable) {\n <span\n class=\"ngx-table__sort-icon\"\n [class.ngx-table__sort-icon--active]=\"isSortActive(col)\"\n >\n <ngx-ds-icon [icon]=\"sortIconFor(col)\" [size]=\"14\" />\n </span>\n }\n </span>\n }\n </th>\n }\n\n @if (hasActions()) {\n <th class=\"ngx-table__th ngx-table__th--actions\">...</th>\n }\n </tr>\n </thead>\n\n <!-- \u2500\u2500 BODY \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <tbody class=\"ngx-table__body\">\n @if (loading()) {\n @for (row of skeletonRowsArr(); track $index) {\n <tr class=\"ngx-table__row ngx-table__row--skeleton\">\n @for (col of skeletonColsArr(); track $index) {\n <td class=\"ngx-table__td\">\n <span class=\"ngx-table__skeleton-cell\"></span>\n </td>\n }\n </tr>\n }\n } @else if (processedData().length === 0) {\n <tr class=\"ngx-table__row ngx-table__row--empty\">\n <td [attr.colspan]=\"colSpanCount()\" class=\"ngx-table__td ngx-table__td--empty\">\n @if (emptyTemplate()) {\n <ng-container [ngTemplateOutlet]=\"emptyTemplate()!\" />\n } @else {\n <ngx-ds-empty-state\n [icon]=\"emptyIcon()\"\n [title]=\"emptyMessage() ?? i18n.tableEmpty\"\n [description]=\"emptyDescription() ?? i18n.tableEmptyDescription\"\n size=\"md\"\n >\n @if (showAddButton()) {\n <ngx-ds-button\n empty-action\n size=\"sm\"\n color=\"primary\"\n variant=\"solid\"\n [iconLeft]=\"icons.Plus\"\n (click)=\"onAddClick()\"\n >{{ addLabel() ?? i18n.tableAdd }}</ngx-ds-button\n >\n }\n </ngx-ds-empty-state>\n }\n </td>\n </tr>\n } @else {\n @for (row of processedData(); track rowTrack(row, $index)) {\n <tr\n class=\"ngx-table__row\"\n [class.ngx-table__row--odd]=\"$index % 2 === 1\"\n [class.ngx-table__row--selected]=\"isSelected(row)\"\n [class.ngx-table__row--clickable]=\"selectable() || rowClickable()\"\n (click)=\"onRowClick(row)\"\n >\n @if (expandable()) {\n <td class=\"ngx-table__td ngx-table__td--expand\" (click)=\"$event.stopPropagation()\">\n <span\n class=\"ngx-table__expand-icon\"\n [class.ngx-table__expand-icon--open]=\"isExpanded(row)\"\n >\n <ngx-ds-icon-button\n [icon]=\"icons.ChevronRight\"\n [ariaLabel]=\"i18n.expandRow\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n [bordered]=\"false\"\n [attr.aria-expanded]=\"isExpanded(row)\"\n (click)=\"toggleExpand(row, $event)\"\n />\n </span>\n </td>\n }\n\n @if (selectable()) {\n <td class=\"ngx-table__td ngx-table__td--checkbox\" (click)=\"$event.stopPropagation()\">\n @if (selectMode() === 'multi') {\n <ngx-ds-checkbox [checked]=\"isSelected(row)\" (checkedChange)=\"toggleRow(row)\" />\n } @else {\n <button\n type=\"button\"\n class=\"ngx-table__radio\"\n role=\"radio\"\n [attr.aria-label]=\"i18n.selectRow\"\n [attr.aria-checked]=\"isSelected(row)\"\n [class.ngx-table__radio--selected]=\"isSelected(row)\"\n (click)=\"toggleRow(row)\"\n ></button>\n }\n </td>\n }\n\n @for (col of visibleColumns(); track col.key) {\n <td\n class=\"ngx-table__td\"\n [class.ngx-table__td--sticky]=\"col.sticky\"\n [style.textAlign]=\"col.align ?? 'left'\"\n >\n @if (col.cellTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"col.cellTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: row,\n value: getCellValue(row, col),\n row: row,\n }\"\n />\n } @else if (col.type === 'boolean') {\n <span\n class=\"ngx-table__bool\"\n [class.ngx-table__bool--true]=\"getCellValue(row, col)\"\n >\n <ngx-ds-icon\n [icon]=\"getCellValue(row, col) ? icons.Check : icons.X\"\n [size]=\"16\"\n />\n </span>\n } @else if (col.type === 'badge') {\n <ngx-ds-badge\n [label]=\"formatCell(row, col)\"\n [color]=\"col.badgeColor ?? 'primary'\"\n [variant]=\"col.badgeVariant ?? 'soft'\"\n />\n } @else {\n {{ formatCell(row, col) }}\n }\n </td>\n }\n\n @if (hasActions()) {\n <td class=\"ngx-table__td ngx-table__td--actions\" (click)=\"$event.stopPropagation()\">\n <div\n class=\"ngx-table__action-menu\"\n [class.ngx-table__action-menu--open]=\"isMenuOpen(row)\"\n >\n <ngx-ds-icon-button\n [icon]=\"icons.MoreVertical\"\n [ariaLabel]=\"i18n.rowActions\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n [bordered]=\"false\"\n (click)=\"toggleMenu(row, $event)\"\n />\n\n @if (isMenuOpen(row)) {\n <div class=\"ngx-table__action-panel\">\n @for (action of actions(); track action.label) {\n @if (isActionVisible(action, row)) {\n <ngx-ds-menu-button\n [color]=\"action.color ?? 'default'\"\n size=\"md\"\n [iconLeft]=\"action.icon\"\n [fullWidth]=\"true\"\n [disabled]=\"isActionDisabled(action, row)\"\n (click)=\"onActionClick(action, row, $event)\"\n >{{ action.label }}</ngx-ds-menu-button\n >\n }\n }\n </div>\n }\n </div>\n </td>\n }\n </tr>\n\n @if (expandable() && isExpanded(row)) {\n <tr class=\"ngx-table__row ngx-table__row--detail\">\n <td [attr.colspan]=\"colSpanCount()\" class=\"ngx-table__td ngx-table__td--detail\">\n <div class=\"ngx-table__detail-content\">\n @if (expandTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"expandTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: row, row: row }\"\n />\n }\n </div>\n </td>\n </tr>\n }\n }\n }\n </tbody>\n </table>\n</div>\n\n<!-- \u2500\u2500 FOOTER \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (paginated()) {\n <div class=\"ngx-table__footer\">\n <div class=\"ngx-table__page-size\">\n <span class=\"ngx-table__label\">{{ i18n.rowsPerPage }}</span>\n <select\n class=\"ngx-table__page-size-select\"\n [value]=\"effectivePageSize()\"\n (change)=\"onPageSizeChange($event)\"\n >\n @for (opt of pageSizeOptions(); track opt) {\n <option [value]=\"opt\">{{ opt }}</option>\n }\n </select>\n </div>\n\n <span class=\"ngx-table__page-info\">\n @if (totalItems() > 0) {\n {{ i18n.pageRange(pageStart(), pageEnd(), totalItems()) }}\n } @else {\n {{ i18n.zeroResults }}\n }\n </span>\n\n <ngx-ds-pagination\n [totalPages]=\"totalPages()\"\n [currentPage]=\"effectivePage()\"\n (pageChange)=\"onPageChange($event)\"\n />\n </div>\n}\n", styles: [":host{display:block}.ngx-table__toolbar{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.625rem .875rem;border:1px solid var(--border-base, #e5e7eb);border-bottom:none;border-radius:.5rem .5rem 0 0;background:var(--surface-base, #ffffff)}.ngx-table__toolbar-filter{max-width:20rem;width:100%}.ngx-table__toolbar-actions{display:flex;align-items:center;gap:.5rem;margin-left:auto;flex-shrink:0}.ngx-table__column-menu{position:relative;flex-shrink:0}.ngx-table__column-panel{position:absolute;right:0;top:calc(100% + .25rem);z-index:100;min-width:12rem;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.5rem;box-shadow:0 4px 20px #0000001a,0 1px 4px #0000000f;padding:.5rem .625rem;display:flex;flex-direction:column;gap:.5rem}.ngx-table__wrapper{overflow-x:auto;border:1px solid var(--border-base, #e5e7eb);border-radius:.5rem .5rem 0 0}.ngx-table__wrapper--attached{border-radius:0}.ngx-table__wrapper--sticky-head{overflow-y:auto}.ngx-table__wrapper--sticky-head .ngx-table__th{position:sticky;top:0;z-index:2}.ngx-table{width:100%;border-collapse:collapse;font-size:.875rem;color:var(--text-base, #111827);background:var(--surface-base, #ffffff)}.ngx-table__head{background:var(--surface-subtle, #f9fafb)}.ngx-table__th{padding:.75rem 1rem;font-weight:600;font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted, #6b7280);border-bottom:2px solid var(--border-base, #e5e7eb);white-space:nowrap;-webkit-user-select:none;user-select:none;background:var(--surface-subtle, #f9fafb)}.ngx-table__th--checkbox{width:3rem;padding-inline:.875rem}.ngx-table__th--sortable{cursor:pointer;transition:background .15s ease,color .15s ease}.ngx-table__th--sortable:hover{background:var(--surface-hover, #f3f4f6);color:var(--text-base, #111827)}.ngx-table__th--sorted{color:var(--primary-500, #6366f1)}.ngx-table__th--sticky{position:sticky;left:0;z-index:3;box-shadow:2px 0 6px -2px #00000014}.ngx-table__th-inner{display:inline-flex;align-items:center;gap:.375rem}.ngx-table__sort-icon{display:inline-flex;align-items:center;color:var(--text-disabled, #d1d5db);transition:color .15s ease}.ngx-table__sort-icon--active{color:var(--primary-500, #6366f1)}.ngx-table__row{border-bottom:1px solid var(--border-base, #e5e7eb)}.ngx-table__row:last-child{border-bottom:none}.ngx-table__row--selected,.ngx-table__row--selected .ngx-table__td--sticky{background:var(--primary-50, #eef2ff)}.ngx-table__row--clickable{cursor:pointer}.ngx-table__row--skeleton,.ngx-table__row--empty{pointer-events:none}.ngx-table__td{padding:.6rem .875rem;vertical-align:middle;background:var(--surface-base, #ffffff)}.ngx-table__td--checkbox{width:3rem;padding-inline:.875rem}.ngx-table__td--sticky{position:sticky;left:0;z-index:1;box-shadow:2px 0 6px -2px #0000000f}.ngx-table__td--empty{text-align:center;padding:0;pointer-events:auto}.ngx-table--striped .ngx-table__row--odd,.ngx-table--striped .ngx-table__row--odd .ngx-table__td--sticky{background:var(--surface-subtle, #f9fafb)}.ngx-table--hoverable .ngx-table__row:not(.ngx-table__row--header):not(.ngx-table__row--skeleton):not(.ngx-table__row--empty){transition:background .12s ease}.ngx-table--hoverable .ngx-table__row:not(.ngx-table__row--header):not(.ngx-table__row--skeleton):not(.ngx-table__row--empty):hover:not(.ngx-table__row--selected){background:var(--surface-hover, #f3f4f6)}.ngx-table--hoverable .ngx-table__row:not(.ngx-table__row--header):not(.ngx-table__row--skeleton):not(.ngx-table__row--empty):hover:not(.ngx-table__row--selected) .ngx-table__td--sticky{background:var(--surface-hover, #f3f4f6)}.ngx-table--dense .ngx-table__th,.ngx-table--dense .ngx-table__td{padding-block:.5rem}.ngx-table__skeleton-cell{display:block;height:.875rem;border-radius:.25rem;width:65%;min-width:3rem;background:linear-gradient(90deg,var(--border-base, #e5e7eb) 25%,var(--surface-subtle, #f9fafb) 50%,var(--border-base, #e5e7eb) 75%);background-size:300% 100%;animation:table-shimmer 1.5s ease-in-out infinite}.ngx-table__td--checkbox .ngx-table__skeleton-cell{width:1.125rem;border-radius:.25rem}@keyframes table-shimmer{0%{background-position:100% 0}to{background-position:-100% 0}}.ngx-table__td--empty ngx-ds-empty-state{margin:auto}.ngx-table__bool{display:inline-flex;align-items:center;color:var(--danger-500, #ef4444)}.ngx-table__bool--true{color:var(--success-500, #10b981)}.ngx-table__th--actions{width:2.75rem;min-width:2.75rem;text-align:center;padding-inline:.375rem;letter-spacing:.05em}.ngx-table__td--actions{width:2.75rem;min-width:2.75rem;padding-inline:.375rem;text-align:center}.ngx-table__action-menu{position:relative;display:flex;align-items:center;justify-content:center}.ngx-table__action-panel{position:absolute;right:0;top:calc(100% + .25rem);z-index:100;min-width:11rem;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.5rem;box-shadow:0 4px 20px #0000001a,0 1px 4px #0000000f;padding:.25rem;display:flex;flex-direction:column;gap:.125rem}.ngx-table__action-menu--open ::ng-deep .icon-btn{background-color:var(--fill-neutral, #6b7280);color:var(--text-on-color, #fff)}.ngx-table__radio{display:block;padding:0;background:transparent;width:1.125rem;height:1.125rem;border-radius:50%;border:2px solid var(--border-strong, #9ca3af);cursor:pointer;transition:border-color .15s ease,background .15s ease;position:relative;flex-shrink:0}.ngx-table__radio--selected{border-color:var(--primary-500, #6366f1);background:var(--primary-500, #6366f1)}.ngx-table__radio--selected:after{content:\"\";position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:.375rem;height:.375rem;border-radius:50%;background:var(--text-on-color, #fff)}.ngx-table__radio:hover:not(.ngx-table__radio--selected){border-color:var(--primary-500, #6366f1)}.ngx-table__th--expand{width:2.25rem;min-width:2.25rem;padding-inline:.375rem}.ngx-table__td--expand{width:2.25rem;min-width:2.25rem;padding-inline:.375rem;text-align:center}.ngx-table__expand-icon{display:inline-flex;align-items:center;justify-content:center}.ngx-table__expand-icon ::ng-deep .icon-btn{transition:transform .15s ease}.ngx-table__expand-icon--open ::ng-deep .icon-btn{transform:rotate(90deg)}.ngx-table__row--detail{background:var(--surface-subtle, #f9fafb)}.ngx-table__td--detail{padding:0}.ngx-table__detail-content{padding:.875rem 1rem;animation:table-detail-in .18s ease-out}@keyframes table-detail-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.ngx-table__footer{display:flex;align-items:center;justify-content:flex-end;gap:1.25rem;padding:.75rem 1rem;border:1px solid var(--border-base, #e5e7eb);border-top:none;border-radius:0 0 .5rem .5rem;background:var(--surface-base, #ffffff);flex-wrap:wrap;min-height:3.25rem}.ngx-table__page-size{display:flex;align-items:center;gap:.5rem}.ngx-table__label{font-size:.8125rem;color:var(--text-muted, #6b7280);white-space:nowrap}.ngx-table__page-size-select{appearance:none;padding:.25rem 1.75rem .25rem .625rem;border:1px solid var(--border-base, #e5e7eb);border-radius:.375rem;font-size:.8125rem;color:var(--text-base, #111827);background:var(--surface-base, #ffffff) url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E\") no-repeat right .5rem center;cursor:pointer;outline:none;transition:border-color .15s ease,box-shadow .15s ease}.ngx-table__page-size-select:focus{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f626}.ngx-table__page-info{font-size:.8125rem;color:var(--text-muted, #6b7280);white-space:nowrap;margin-inline-end:auto}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }, { kind: "component", type: IconButtonComponent, selector: "ngx-ds-icon-button", inputs: ["icon", "ariaLabel", "variant", "size", "color", "rounded", "bordered", "disabled", "type"] }, { kind: "component", type: MenuButtonComponent, selector: "ngx-ds-menu-button", inputs: ["iconLeft", "iconRight", "color", "size", "disabled", "fullWidth", "type"] }, { kind: "component", type: BadgeComponent, selector: "ngx-ds-badge", inputs: ["label", "count", "max", "dot", "size", "color", "variant", "rounded"] }, { kind: "component", type: CheckboxComponent, selector: "ngx-ds-checkbox", inputs: ["label", "size", "color", "indeterminate", "labelPosition", "checked"], outputs: ["checkedChange"] }, { kind: "component", type: PaginationComponent, selector: "ngx-ds-pagination", inputs: ["totalPages", "siblings", "showBoundary", "currentPage"], outputs: ["currentPageChange", "pageChange"] }, { kind: "component", type: EmptyStateComponent, selector: "ngx-ds-empty-state", inputs: ["icon", "title", "description", "size"] }, { kind: "component", type: SearchInputComponent, selector: "ngx-ds-search-input", inputs: ["value", "placeholder", "ariaLabel", "size", "disabled", "loading", "clearable"], outputs: ["valueChange", "searchSubmit", "cleared"] }, { kind: "component", type: ButtonComponent, selector: "ngx-ds-button", inputs: ["variant", "size", "color", "iconLeft", "iconRight", "disabled", "loading", "rounded", "type"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5975
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TableComponent, isStandalone: true, selector: "ngx-ds-table", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingRows: { classPropertyName: "loadingRows", publicName: "loadingRows", isSignal: true, isRequired: false, transformFunction: null }, clientSide: { classPropertyName: "clientSide", publicName: "clientSide", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, selectMode: { classPropertyName: "selectMode", publicName: "selectMode", isSignal: true, isRequired: false, transformFunction: null }, selectedRows: { classPropertyName: "selectedRows", publicName: "selectedRows", isSignal: true, isRequired: false, transformFunction: null }, rowKey: { classPropertyName: "rowKey", publicName: "rowKey", isSignal: true, isRequired: false, transformFunction: null }, sort: { classPropertyName: "sort", publicName: "sort", isSignal: true, isRequired: false, transformFunction: null }, paginated: { classPropertyName: "paginated", publicName: "paginated", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", 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 }, striped: { classPropertyName: "striped", publicName: "striped", isSignal: true, isRequired: false, transformFunction: null }, hoverable: { classPropertyName: "hoverable", publicName: "hoverable", isSignal: true, isRequired: false, transformFunction: null }, dense: { classPropertyName: "dense", publicName: "dense", 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 }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, emptyDescription: { classPropertyName: "emptyDescription", publicName: "emptyDescription", isSignal: true, isRequired: false, transformFunction: null }, emptyIcon: { classPropertyName: "emptyIcon", publicName: "emptyIcon", isSignal: true, isRequired: false, transformFunction: null }, emptyTemplate: { classPropertyName: "emptyTemplate", publicName: "emptyTemplate", isSignal: true, isRequired: false, transformFunction: null }, rowClickable: { classPropertyName: "rowClickable", publicName: "rowClickable", isSignal: true, isRequired: false, transformFunction: null }, addLabel: { classPropertyName: "addLabel", publicName: "addLabel", isSignal: true, isRequired: false, transformFunction: null }, showAddButton: { classPropertyName: "showAddButton", publicName: "showAddButton", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, actionsLabel: { classPropertyName: "actionsLabel", publicName: "actionsLabel", isSignal: true, isRequired: false, transformFunction: null }, actionsWidth: { classPropertyName: "actionsWidth", publicName: "actionsWidth", isSignal: true, isRequired: false, transformFunction: null }, globalFilter: { classPropertyName: "globalFilter", publicName: "globalFilter", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, filterKeys: { classPropertyName: "filterKeys", publicName: "filterKeys", isSignal: true, isRequired: false, transformFunction: null }, filterValue: { classPropertyName: "filterValue", publicName: "filterValue", isSignal: true, isRequired: false, transformFunction: null }, columnToggle: { classPropertyName: "columnToggle", publicName: "columnToggle", isSignal: true, isRequired: false, transformFunction: null }, visibleColumnKeys: { classPropertyName: "visibleColumnKeys", publicName: "visibleColumnKeys", isSignal: true, isRequired: false, transformFunction: null }, expandable: { classPropertyName: "expandable", publicName: "expandable", isSignal: true, isRequired: false, transformFunction: null }, expandTemplate: { classPropertyName: "expandTemplate", publicName: "expandTemplate", isSignal: true, isRequired: false, transformFunction: null }, singleExpand: { classPropertyName: "singleExpand", publicName: "singleExpand", isSignal: true, isRequired: false, transformFunction: null }, expandedRows: { classPropertyName: "expandedRows", publicName: "expandedRows", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedRows: "selectedRowsChange", filterValue: "filterValueChange", visibleColumnKeys: "visibleColumnKeysChange", expandedRows: "expandedRowsChange", sortChange: "sortChange", pageChange: "pageChange", selectionChange: "selectionChange", rowClick: "rowClick", addClick: "addClick", filterChange: "filterChange", columnVisibilityChange: "columnVisibilityChange", rowExpandChange: "rowExpandChange" }, ngImport: i0, template: "@if (globalFilter() || columnToggle() || showAddButton()) {\n <div class=\"ngx-table__toolbar\">\n @if (globalFilter()) {\n <ngx-ds-search-input\n class=\"ngx-table__toolbar-filter\"\n [value]=\"filterValue()\"\n (valueChange)=\"onFilterChange($event)\"\n [placeholder]=\"filterPlaceholder() ?? i18n.searchPlaceholder\"\n size=\"sm\"\n />\n }\n\n <div class=\"ngx-table__toolbar-actions\">\n @if (columnToggle()) {\n <div\n class=\"ngx-table__column-menu\"\n [class.ngx-table__column-menu--open]=\"isColumnMenuOpen()\"\n >\n <ngx-ds-icon-button\n [icon]=\"icons.Columns3\"\n [ariaLabel]=\"i18n.visibleColumns\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n (click)=\"toggleColumnMenu($event)\"\n />\n\n @if (isColumnMenuOpen()) {\n <div class=\"ngx-table__column-panel\">\n @for (col of hideableColumns(); track col.key) {\n <ngx-ds-checkbox\n [label]=\"col.label\"\n [checked]=\"isColumnVisible(col.key)\"\n (checkedChange)=\"toggleColumn(col.key)\"\n />\n }\n </div>\n }\n </div>\n }\n\n @if (showAddButton()) {\n <ngx-ds-button\n size=\"sm\"\n color=\"primary\"\n variant=\"solid\"\n [iconLeft]=\"icons.Plus\"\n (click)=\"onAddClick()\"\n >{{ addLabel() ?? i18n.tableAdd }}</ngx-ds-button\n >\n }\n </div>\n </div>\n}\n\n<div\n class=\"ngx-table__wrapper\"\n [class.ngx-table__wrapper--sticky-head]=\"stickyHeader()\"\n [class.ngx-table__wrapper--attached]=\"globalFilter() || columnToggle() || showAddButton()\"\n [style.maxHeight]=\"stickyHeader() && maxHeight() ? maxHeight() : null\"\n [attr.tabindex]=\"stickyHeader() && maxHeight() ? 0 : null\"\n>\n <table\n class=\"ngx-table\"\n [class.ngx-table--striped]=\"striped()\"\n [class.ngx-table--hoverable]=\"hoverable()\"\n [class.ngx-table--dense]=\"dense()\"\n >\n <!-- \u2500\u2500 HEAD \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <thead class=\"ngx-table__head\">\n <tr class=\"ngx-table__row ngx-table__row--header\">\n @if (expandable()) {\n <th class=\"ngx-table__th ngx-table__th--expand\"></th>\n }\n\n @if (selectable()) {\n <th class=\"ngx-table__th ngx-table__th--checkbox\">\n @if (selectMode() === 'multi') {\n <ngx-ds-checkbox\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n [ariaLabel]=\"i18n.selectAll\"\n (checkedChange)=\"toggleAll($event)\"\n />\n }\n </th>\n }\n\n @for (col of visibleColumns(); track col.key) {\n <th\n class=\"ngx-table__th\"\n [class.ngx-table__th--sortable]=\"col.sortable\"\n [class.ngx-table__th--sorted]=\"isSortActive(col)\"\n [class.ngx-table__th--sticky]=\"col.sticky\"\n [style.width]=\"col.width ?? null\"\n [style.minWidth]=\"col.minWidth ?? null\"\n [style.maxWidth]=\"col.maxWidth ?? null\"\n [style.textAlign]=\"col.align ?? 'left'\"\n [attr.aria-sort]=\"\n isSortActive(col) ? (isSortAsc(col) ? 'ascending' : 'descending') : null\n \"\n (click)=\"col.sortable && onSort(col)\"\n >\n @if (col.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"col.headerTemplate\"\n [ngTemplateOutletContext]=\"{ column: col }\"\n />\n } @else {\n <span class=\"ngx-table__th-inner\">\n {{ col.label }}\n @if (col.sortable) {\n <span\n class=\"ngx-table__sort-icon\"\n [class.ngx-table__sort-icon--active]=\"isSortActive(col)\"\n >\n <ngx-ds-icon [icon]=\"sortIconFor(col)\" [size]=\"14\" />\n </span>\n }\n </span>\n }\n </th>\n }\n\n @if (hasActions()) {\n <th class=\"ngx-table__th ngx-table__th--actions\">...</th>\n }\n </tr>\n </thead>\n\n <!-- \u2500\u2500 BODY \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <tbody class=\"ngx-table__body\">\n @if (loading()) {\n @for (row of skeletonRowsArr(); track $index) {\n <tr class=\"ngx-table__row ngx-table__row--skeleton\">\n @for (col of skeletonColsArr(); track $index) {\n <td class=\"ngx-table__td\">\n <span class=\"ngx-table__skeleton-cell\"></span>\n </td>\n }\n </tr>\n }\n } @else if (processedData().length === 0) {\n <tr class=\"ngx-table__row ngx-table__row--empty\">\n <td [attr.colspan]=\"colSpanCount()\" class=\"ngx-table__td ngx-table__td--empty\">\n @if (emptyTemplate()) {\n <ng-container [ngTemplateOutlet]=\"emptyTemplate()!\" />\n } @else {\n <ngx-ds-empty-state\n [icon]=\"emptyIcon()\"\n [title]=\"emptyMessage() ?? i18n.tableEmpty\"\n [description]=\"emptyDescription() ?? i18n.tableEmptyDescription\"\n size=\"md\"\n >\n @if (showAddButton()) {\n <ngx-ds-button\n empty-action\n size=\"sm\"\n color=\"primary\"\n variant=\"solid\"\n [iconLeft]=\"icons.Plus\"\n (click)=\"onAddClick()\"\n >{{ addLabel() ?? i18n.tableAdd }}</ngx-ds-button\n >\n }\n </ngx-ds-empty-state>\n }\n </td>\n </tr>\n } @else {\n @for (row of processedData(); track rowTrack(row, $index)) {\n <tr\n class=\"ngx-table__row\"\n [class.ngx-table__row--odd]=\"$index % 2 === 1\"\n [class.ngx-table__row--selected]=\"isSelected(row)\"\n [class.ngx-table__row--clickable]=\"selectable() || rowClickable()\"\n (click)=\"onRowClick(row)\"\n >\n @if (expandable()) {\n <td class=\"ngx-table__td ngx-table__td--expand\" (click)=\"$event.stopPropagation()\">\n <span\n class=\"ngx-table__expand-icon\"\n [class.ngx-table__expand-icon--open]=\"isExpanded(row)\"\n >\n <ngx-ds-icon-button\n [icon]=\"icons.ChevronRight\"\n [ariaLabel]=\"i18n.expandRow\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n [bordered]=\"false\"\n [attr.aria-expanded]=\"isExpanded(row)\"\n (click)=\"toggleExpand(row, $event)\"\n />\n </span>\n </td>\n }\n\n @if (selectable()) {\n <td class=\"ngx-table__td ngx-table__td--checkbox\" (click)=\"$event.stopPropagation()\">\n @if (selectMode() === 'multi') {\n <ngx-ds-checkbox\n [checked]=\"isSelected(row)\"\n [ariaLabel]=\"i18n.selectRow\"\n (checkedChange)=\"toggleRow(row)\"\n />\n } @else {\n <button\n type=\"button\"\n class=\"ngx-table__radio\"\n role=\"radio\"\n [attr.aria-label]=\"i18n.selectRow\"\n [attr.aria-checked]=\"isSelected(row)\"\n [class.ngx-table__radio--selected]=\"isSelected(row)\"\n (click)=\"toggleRow(row)\"\n ></button>\n }\n </td>\n }\n\n @for (col of visibleColumns(); track col.key) {\n <td\n class=\"ngx-table__td\"\n [class.ngx-table__td--sticky]=\"col.sticky\"\n [style.textAlign]=\"col.align ?? 'left'\"\n >\n @if (col.cellTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"col.cellTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: row,\n value: getCellValue(row, col),\n row: row,\n }\"\n />\n } @else if (col.type === 'boolean') {\n <span\n class=\"ngx-table__bool\"\n [class.ngx-table__bool--true]=\"getCellValue(row, col)\"\n >\n <ngx-ds-icon\n [icon]=\"getCellValue(row, col) ? icons.Check : icons.X\"\n [size]=\"16\"\n />\n </span>\n } @else if (col.type === 'badge') {\n <ngx-ds-badge\n [label]=\"formatCell(row, col)\"\n [color]=\"col.badgeColor ?? 'primary'\"\n [variant]=\"col.badgeVariant ?? 'soft'\"\n />\n } @else {\n {{ formatCell(row, col) }}\n }\n </td>\n }\n\n @if (hasActions()) {\n <td class=\"ngx-table__td ngx-table__td--actions\" (click)=\"$event.stopPropagation()\">\n <div\n class=\"ngx-table__action-menu\"\n [class.ngx-table__action-menu--open]=\"isMenuOpen(row)\"\n >\n <ngx-ds-icon-button\n [icon]=\"icons.MoreVertical\"\n [ariaLabel]=\"i18n.rowActions\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n [bordered]=\"false\"\n (click)=\"toggleMenu(row, $event)\"\n />\n\n @if (isMenuOpen(row)) {\n <div class=\"ngx-table__action-panel\">\n @for (action of actions(); track action.label) {\n @if (isActionVisible(action, row)) {\n <ngx-ds-menu-button\n [color]=\"action.color ?? 'default'\"\n size=\"md\"\n [iconLeft]=\"action.icon\"\n [fullWidth]=\"true\"\n [disabled]=\"isActionDisabled(action, row)\"\n (click)=\"onActionClick(action, row, $event)\"\n >{{ action.label }}</ngx-ds-menu-button\n >\n }\n }\n </div>\n }\n </div>\n </td>\n }\n </tr>\n\n @if (expandable() && isExpanded(row)) {\n <tr class=\"ngx-table__row ngx-table__row--detail\">\n <td [attr.colspan]=\"colSpanCount()\" class=\"ngx-table__td ngx-table__td--detail\">\n <div class=\"ngx-table__detail-content\">\n @if (expandTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"expandTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: row, row: row }\"\n />\n }\n </div>\n </td>\n </tr>\n }\n }\n }\n </tbody>\n </table>\n</div>\n\n<!-- \u2500\u2500 FOOTER \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (paginated()) {\n <div class=\"ngx-table__footer\">\n <div class=\"ngx-table__page-size\">\n <span class=\"ngx-table__label\">{{ i18n.rowsPerPage }}</span>\n <select\n class=\"ngx-table__page-size-select\"\n [attr.aria-label]=\"i18n.rowsPerPage\"\n [value]=\"effectivePageSize()\"\n (change)=\"onPageSizeChange($event)\"\n >\n @for (opt of pageSizeOptions(); track opt) {\n <option [value]=\"opt\">{{ opt }}</option>\n }\n </select>\n </div>\n\n <span class=\"ngx-table__page-info\">\n @if (totalItems() > 0) {\n {{ i18n.pageRange(pageStart(), pageEnd(), totalItems()) }}\n } @else {\n {{ i18n.zeroResults }}\n }\n </span>\n\n <ngx-ds-pagination\n [totalPages]=\"totalPages()\"\n [currentPage]=\"effectivePage()\"\n (pageChange)=\"onPageChange($event)\"\n />\n </div>\n}\n", styles: [":host{display:block}.ngx-table__toolbar{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.625rem .875rem;border:1px solid var(--border-base, #e5e7eb);border-bottom:none;border-radius:.5rem .5rem 0 0;background:var(--surface-base, #ffffff)}.ngx-table__toolbar-filter{max-width:20rem;width:100%}.ngx-table__toolbar-actions{display:flex;align-items:center;gap:.5rem;margin-left:auto;flex-shrink:0}.ngx-table__column-menu{position:relative;flex-shrink:0}.ngx-table__column-panel{position:absolute;right:0;top:calc(100% + .25rem);z-index:100;min-width:12rem;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.5rem;box-shadow:0 4px 20px #0000001a,0 1px 4px #0000000f;padding:.5rem .625rem;display:flex;flex-direction:column;gap:.5rem}.ngx-table__wrapper{overflow-x:auto;border:1px solid var(--border-base, #e5e7eb);border-radius:.5rem .5rem 0 0}.ngx-table__wrapper--attached{border-radius:0}.ngx-table__wrapper--sticky-head{overflow-y:auto}.ngx-table__wrapper--sticky-head .ngx-table__th{position:sticky;top:0;z-index:2}.ngx-table{width:100%;border-collapse:collapse;font-size:.875rem;color:var(--text-base, #111827);background:var(--surface-base, #ffffff)}.ngx-table__head{background:var(--surface-subtle, #f9fafb)}.ngx-table__th{padding:.75rem 1rem;font-weight:600;font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted, #6b7280);border-bottom:2px solid var(--border-base, #e5e7eb);white-space:nowrap;-webkit-user-select:none;user-select:none;background:var(--surface-subtle, #f9fafb)}.ngx-table__th--checkbox{width:3rem;padding-inline:.875rem}.ngx-table__th--sortable{cursor:pointer;transition:background .15s ease,color .15s ease}.ngx-table__th--sortable:hover{background:var(--surface-hover, #f3f4f6);color:var(--text-base, #111827)}.ngx-table__th--sorted{color:var(--fill-primary, #4f46e5)}.ngx-table__th--sticky{position:sticky;left:0;z-index:3;box-shadow:2px 0 6px -2px #00000014}.ngx-table__th-inner{display:inline-flex;align-items:center;gap:.375rem}.ngx-table__sort-icon{display:inline-flex;align-items:center;color:var(--text-disabled, #d1d5db);transition:color .15s ease}.ngx-table__sort-icon--active{color:var(--fill-primary, #4f46e5)}.ngx-table__row{border-bottom:1px solid var(--border-base, #e5e7eb)}.ngx-table__row:last-child{border-bottom:none}.ngx-table__row--selected,.ngx-table__row--selected .ngx-table__td--sticky{background:var(--primary-50, #eef2ff)}.ngx-table__row--clickable{cursor:pointer}.ngx-table__row--skeleton,.ngx-table__row--empty{pointer-events:none}.ngx-table__td{padding:.6rem .875rem;vertical-align:middle;background:var(--surface-base, #ffffff)}.ngx-table__td--checkbox{width:3rem;padding-inline:.875rem}.ngx-table__td--sticky{position:sticky;left:0;z-index:1;box-shadow:2px 0 6px -2px #0000000f}.ngx-table__td--empty{text-align:center;padding:0;pointer-events:auto}.ngx-table--striped .ngx-table__row--odd,.ngx-table--striped .ngx-table__row--odd .ngx-table__td--sticky{background:var(--surface-subtle, #f9fafb)}.ngx-table--hoverable .ngx-table__row:not(.ngx-table__row--header):not(.ngx-table__row--skeleton):not(.ngx-table__row--empty){transition:background .12s ease}.ngx-table--hoverable .ngx-table__row:not(.ngx-table__row--header):not(.ngx-table__row--skeleton):not(.ngx-table__row--empty):hover:not(.ngx-table__row--selected){background:var(--surface-hover, #f3f4f6)}.ngx-table--hoverable .ngx-table__row:not(.ngx-table__row--header):not(.ngx-table__row--skeleton):not(.ngx-table__row--empty):hover:not(.ngx-table__row--selected) .ngx-table__td--sticky{background:var(--surface-hover, #f3f4f6)}.ngx-table--dense .ngx-table__th,.ngx-table--dense .ngx-table__td{padding-block:.5rem}.ngx-table__skeleton-cell{display:block;height:.875rem;border-radius:.25rem;width:65%;min-width:3rem;background:linear-gradient(90deg,var(--border-base, #e5e7eb) 25%,var(--surface-subtle, #f9fafb) 50%,var(--border-base, #e5e7eb) 75%);background-size:300% 100%;animation:table-shimmer 1.5s ease-in-out infinite}.ngx-table__td--checkbox .ngx-table__skeleton-cell{width:1.125rem;border-radius:.25rem}@keyframes table-shimmer{0%{background-position:100% 0}to{background-position:-100% 0}}.ngx-table__td--empty ngx-ds-empty-state{margin:auto}.ngx-table__bool{display:inline-flex;align-items:center;color:var(--fill-danger, #dc2626)}.ngx-table__bool--true{color:var(--fill-success, #047857)}.ngx-table__th--actions{width:2.75rem;min-width:2.75rem;text-align:center;padding-inline:.375rem;letter-spacing:.05em}.ngx-table__td--actions{width:2.75rem;min-width:2.75rem;padding-inline:.375rem;text-align:center}.ngx-table__action-menu{position:relative;display:flex;align-items:center;justify-content:center}.ngx-table__action-panel{position:absolute;right:0;top:calc(100% + .25rem);z-index:100;min-width:11rem;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.5rem;box-shadow:0 4px 20px #0000001a,0 1px 4px #0000000f;padding:.25rem;display:flex;flex-direction:column;gap:.125rem}.ngx-table__action-menu--open ::ng-deep .icon-btn{background-color:var(--fill-neutral, #6b7280);color:var(--text-on-color, #fff)}.ngx-table__radio{display:block;padding:0;background:transparent;width:1.125rem;height:1.125rem;border-radius:50%;border:2px solid var(--border-strong, #9ca3af);cursor:pointer;transition:border-color .15s ease,background .15s ease;position:relative;flex-shrink:0}.ngx-table__radio--selected{border-color:var(--primary-500, #6366f1);background:var(--primary-500, #6366f1)}.ngx-table__radio--selected:after{content:\"\";position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:.375rem;height:.375rem;border-radius:50%;background:var(--text-on-color, #fff)}.ngx-table__radio:hover:not(.ngx-table__radio--selected){border-color:var(--primary-500, #6366f1)}.ngx-table__th--expand{width:2.25rem;min-width:2.25rem;padding-inline:.375rem}.ngx-table__td--expand{width:2.25rem;min-width:2.25rem;padding-inline:.375rem;text-align:center}.ngx-table__expand-icon{display:inline-flex;align-items:center;justify-content:center}.ngx-table__expand-icon ::ng-deep .icon-btn{transition:transform .15s ease}.ngx-table__expand-icon--open ::ng-deep .icon-btn{transform:rotate(90deg)}.ngx-table__row--detail{background:var(--surface-subtle, #f9fafb)}.ngx-table__td--detail{padding:0}.ngx-table__detail-content{padding:.875rem 1rem;animation:table-detail-in .18s ease-out}@keyframes table-detail-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.ngx-table__footer{display:flex;align-items:center;justify-content:flex-end;gap:1.25rem;padding:.75rem 1rem;border:1px solid var(--border-base, #e5e7eb);border-top:none;border-radius:0 0 .5rem .5rem;background:var(--surface-base, #ffffff);flex-wrap:wrap;min-height:3.25rem}.ngx-table__page-size{display:flex;align-items:center;gap:.5rem}.ngx-table__label{font-size:.8125rem;color:var(--text-muted, #6b7280);white-space:nowrap}.ngx-table__page-size-select{appearance:none;padding:.25rem 1.75rem .25rem .625rem;border:1px solid var(--border-base, #e5e7eb);border-radius:.375rem;font-size:.8125rem;color:var(--text-base, #111827);background:var(--surface-base, #ffffff) url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E\") no-repeat right .5rem center;cursor:pointer;outline:none;transition:border-color .15s ease,box-shadow .15s ease}.ngx-table__page-size-select:focus{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f626}.ngx-table__page-info{font-size:.8125rem;color:var(--text-muted, #6b7280);white-space:nowrap;margin-inline-end:auto}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }, { kind: "component", type: IconButtonComponent, selector: "ngx-ds-icon-button", inputs: ["icon", "ariaLabel", "variant", "size", "color", "rounded", "bordered", "disabled", "type"] }, { kind: "component", type: MenuButtonComponent, selector: "ngx-ds-menu-button", inputs: ["iconLeft", "iconRight", "color", "size", "disabled", "fullWidth", "type"] }, { kind: "component", type: BadgeComponent, selector: "ngx-ds-badge", inputs: ["label", "count", "max", "dot", "size", "color", "variant", "rounded"] }, { kind: "component", type: CheckboxComponent, selector: "ngx-ds-checkbox", inputs: ["label", "ariaLabel", "size", "color", "indeterminate", "labelPosition", "checked"], outputs: ["checkedChange"] }, { kind: "component", type: PaginationComponent, selector: "ngx-ds-pagination", inputs: ["totalPages", "siblings", "showBoundary", "currentPage"], outputs: ["currentPageChange", "pageChange"] }, { kind: "component", type: EmptyStateComponent, selector: "ngx-ds-empty-state", inputs: ["icon", "title", "description", "size"] }, { kind: "component", type: SearchInputComponent, selector: "ngx-ds-search-input", inputs: ["value", "placeholder", "ariaLabel", "size", "disabled", "loading", "clearable"], outputs: ["valueChange", "searchSubmit", "cleared"] }, { kind: "component", type: ButtonComponent, selector: "ngx-ds-button", inputs: ["variant", "size", "color", "iconLeft", "iconRight", "disabled", "loading", "rounded", "type", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5232
5976
|
}
|
|
5233
5977
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TableComponent, decorators: [{
|
|
5234
5978
|
type: Component,
|
|
@@ -5243,7 +5987,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
5243
5987
|
EmptyStateComponent,
|
|
5244
5988
|
SearchInputComponent,
|
|
5245
5989
|
ButtonComponent,
|
|
5246
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (globalFilter() || columnToggle() || showAddButton()) {\n <div class=\"ngx-table__toolbar\">\n @if (globalFilter()) {\n <ngx-ds-search-input\n class=\"ngx-table__toolbar-filter\"\n [value]=\"filterValue()\"\n (valueChange)=\"onFilterChange($event)\"\n [placeholder]=\"filterPlaceholder() ?? i18n.searchPlaceholder\"\n size=\"sm\"\n />\n }\n\n <div class=\"ngx-table__toolbar-actions\">\n @if (columnToggle()) {\n <div\n class=\"ngx-table__column-menu\"\n [class.ngx-table__column-menu--open]=\"isColumnMenuOpen()\"\n >\n <ngx-ds-icon-button\n [icon]=\"icons.Columns3\"\n [ariaLabel]=\"i18n.visibleColumns\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n (click)=\"toggleColumnMenu($event)\"\n />\n\n @if (isColumnMenuOpen()) {\n <div class=\"ngx-table__column-panel\">\n @for (col of hideableColumns(); track col.key) {\n <ngx-ds-checkbox\n [label]=\"col.label\"\n [checked]=\"isColumnVisible(col.key)\"\n (checkedChange)=\"toggleColumn(col.key)\"\n />\n }\n </div>\n }\n </div>\n }\n\n @if (showAddButton()) {\n <ngx-ds-button\n size=\"sm\"\n color=\"primary\"\n variant=\"solid\"\n [iconLeft]=\"icons.Plus\"\n (click)=\"onAddClick()\"\n >{{ addLabel() ?? i18n.tableAdd }}</ngx-ds-button\n >\n }\n </div>\n </div>\n}\n\n<div\n class=\"ngx-table__wrapper\"\n [class.ngx-table__wrapper--sticky-head]=\"stickyHeader()\"\n [class.ngx-table__wrapper--attached]=\"globalFilter() || columnToggle() || showAddButton()\"\n [style.maxHeight]=\"stickyHeader() && maxHeight() ? maxHeight() : null\"\n>\n <table\n class=\"ngx-table\"\n [class.ngx-table--striped]=\"striped()\"\n [class.ngx-table--hoverable]=\"hoverable()\"\n [class.ngx-table--dense]=\"dense()\"\n >\n <!-- \u2500\u2500 HEAD \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <thead class=\"ngx-table__head\">\n <tr class=\"ngx-table__row ngx-table__row--header\">\n @if (expandable()) {\n <th class=\"ngx-table__th ngx-table__th--expand\"></th>\n }\n\n @if (selectable()) {\n <th class=\"ngx-table__th ngx-table__th--checkbox\">\n @if (selectMode() === 'multi') {\n <ngx-ds-checkbox\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (checkedChange)=\"toggleAll($event)\"\n />\n }\n </th>\n }\n\n @for (col of visibleColumns(); track col.key) {\n <th\n class=\"ngx-table__th\"\n [class.ngx-table__th--sortable]=\"col.sortable\"\n [class.ngx-table__th--sorted]=\"isSortActive(col)\"\n [class.ngx-table__th--sticky]=\"col.sticky\"\n [style.width]=\"col.width ?? null\"\n [style.minWidth]=\"col.minWidth ?? null\"\n [style.maxWidth]=\"col.maxWidth ?? null\"\n [style.textAlign]=\"col.align ?? 'left'\"\n [attr.aria-sort]=\"\n isSortActive(col) ? (isSortAsc(col) ? 'ascending' : 'descending') : null\n \"\n (click)=\"col.sortable && onSort(col)\"\n >\n @if (col.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"col.headerTemplate\"\n [ngTemplateOutletContext]=\"{ column: col }\"\n />\n } @else {\n <span class=\"ngx-table__th-inner\">\n {{ col.label }}\n @if (col.sortable) {\n <span\n class=\"ngx-table__sort-icon\"\n [class.ngx-table__sort-icon--active]=\"isSortActive(col)\"\n >\n <ngx-ds-icon [icon]=\"sortIconFor(col)\" [size]=\"14\" />\n </span>\n }\n </span>\n }\n </th>\n }\n\n @if (hasActions()) {\n <th class=\"ngx-table__th ngx-table__th--actions\">...</th>\n }\n </tr>\n </thead>\n\n <!-- \u2500\u2500 BODY \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <tbody class=\"ngx-table__body\">\n @if (loading()) {\n @for (row of skeletonRowsArr(); track $index) {\n <tr class=\"ngx-table__row ngx-table__row--skeleton\">\n @for (col of skeletonColsArr(); track $index) {\n <td class=\"ngx-table__td\">\n <span class=\"ngx-table__skeleton-cell\"></span>\n </td>\n }\n </tr>\n }\n } @else if (processedData().length === 0) {\n <tr class=\"ngx-table__row ngx-table__row--empty\">\n <td [attr.colspan]=\"colSpanCount()\" class=\"ngx-table__td ngx-table__td--empty\">\n @if (emptyTemplate()) {\n <ng-container [ngTemplateOutlet]=\"emptyTemplate()!\" />\n } @else {\n <ngx-ds-empty-state\n [icon]=\"emptyIcon()\"\n [title]=\"emptyMessage() ?? i18n.tableEmpty\"\n [description]=\"emptyDescription() ?? i18n.tableEmptyDescription\"\n size=\"md\"\n >\n @if (showAddButton()) {\n <ngx-ds-button\n empty-action\n size=\"sm\"\n color=\"primary\"\n variant=\"solid\"\n [iconLeft]=\"icons.Plus\"\n (click)=\"onAddClick()\"\n >{{ addLabel() ?? i18n.tableAdd }}</ngx-ds-button\n >\n }\n </ngx-ds-empty-state>\n }\n </td>\n </tr>\n } @else {\n @for (row of processedData(); track rowTrack(row, $index)) {\n <tr\n class=\"ngx-table__row\"\n [class.ngx-table__row--odd]=\"$index % 2 === 1\"\n [class.ngx-table__row--selected]=\"isSelected(row)\"\n [class.ngx-table__row--clickable]=\"selectable() || rowClickable()\"\n (click)=\"onRowClick(row)\"\n >\n @if (expandable()) {\n <td class=\"ngx-table__td ngx-table__td--expand\" (click)=\"$event.stopPropagation()\">\n <span\n class=\"ngx-table__expand-icon\"\n [class.ngx-table__expand-icon--open]=\"isExpanded(row)\"\n >\n <ngx-ds-icon-button\n [icon]=\"icons.ChevronRight\"\n [ariaLabel]=\"i18n.expandRow\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n [bordered]=\"false\"\n [attr.aria-expanded]=\"isExpanded(row)\"\n (click)=\"toggleExpand(row, $event)\"\n />\n </span>\n </td>\n }\n\n @if (selectable()) {\n <td class=\"ngx-table__td ngx-table__td--checkbox\" (click)=\"$event.stopPropagation()\">\n @if (selectMode() === 'multi') {\n <ngx-ds-checkbox [checked]=\"isSelected(row)\" (checkedChange)=\"toggleRow(row)\" />\n } @else {\n <button\n type=\"button\"\n class=\"ngx-table__radio\"\n role=\"radio\"\n [attr.aria-label]=\"i18n.selectRow\"\n [attr.aria-checked]=\"isSelected(row)\"\n [class.ngx-table__radio--selected]=\"isSelected(row)\"\n (click)=\"toggleRow(row)\"\n ></button>\n }\n </td>\n }\n\n @for (col of visibleColumns(); track col.key) {\n <td\n class=\"ngx-table__td\"\n [class.ngx-table__td--sticky]=\"col.sticky\"\n [style.textAlign]=\"col.align ?? 'left'\"\n >\n @if (col.cellTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"col.cellTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: row,\n value: getCellValue(row, col),\n row: row,\n }\"\n />\n } @else if (col.type === 'boolean') {\n <span\n class=\"ngx-table__bool\"\n [class.ngx-table__bool--true]=\"getCellValue(row, col)\"\n >\n <ngx-ds-icon\n [icon]=\"getCellValue(row, col) ? icons.Check : icons.X\"\n [size]=\"16\"\n />\n </span>\n } @else if (col.type === 'badge') {\n <ngx-ds-badge\n [label]=\"formatCell(row, col)\"\n [color]=\"col.badgeColor ?? 'primary'\"\n [variant]=\"col.badgeVariant ?? 'soft'\"\n />\n } @else {\n {{ formatCell(row, col) }}\n }\n </td>\n }\n\n @if (hasActions()) {\n <td class=\"ngx-table__td ngx-table__td--actions\" (click)=\"$event.stopPropagation()\">\n <div\n class=\"ngx-table__action-menu\"\n [class.ngx-table__action-menu--open]=\"isMenuOpen(row)\"\n >\n <ngx-ds-icon-button\n [icon]=\"icons.MoreVertical\"\n [ariaLabel]=\"i18n.rowActions\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n [bordered]=\"false\"\n (click)=\"toggleMenu(row, $event)\"\n />\n\n @if (isMenuOpen(row)) {\n <div class=\"ngx-table__action-panel\">\n @for (action of actions(); track action.label) {\n @if (isActionVisible(action, row)) {\n <ngx-ds-menu-button\n [color]=\"action.color ?? 'default'\"\n size=\"md\"\n [iconLeft]=\"action.icon\"\n [fullWidth]=\"true\"\n [disabled]=\"isActionDisabled(action, row)\"\n (click)=\"onActionClick(action, row, $event)\"\n >{{ action.label }}</ngx-ds-menu-button\n >\n }\n }\n </div>\n }\n </div>\n </td>\n }\n </tr>\n\n @if (expandable() && isExpanded(row)) {\n <tr class=\"ngx-table__row ngx-table__row--detail\">\n <td [attr.colspan]=\"colSpanCount()\" class=\"ngx-table__td ngx-table__td--detail\">\n <div class=\"ngx-table__detail-content\">\n @if (expandTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"expandTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: row, row: row }\"\n />\n }\n </div>\n </td>\n </tr>\n }\n }\n }\n </tbody>\n </table>\n</div>\n\n<!-- \u2500\u2500 FOOTER \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (paginated()) {\n <div class=\"ngx-table__footer\">\n <div class=\"ngx-table__page-size\">\n <span class=\"ngx-table__label\">{{ i18n.rowsPerPage }}</span>\n <select\n class=\"ngx-table__page-size-select\"\n [value]=\"effectivePageSize()\"\n (change)=\"onPageSizeChange($event)\"\n >\n @for (opt of pageSizeOptions(); track opt) {\n <option [value]=\"opt\">{{ opt }}</option>\n }\n </select>\n </div>\n\n <span class=\"ngx-table__page-info\">\n @if (totalItems() > 0) {\n {{ i18n.pageRange(pageStart(), pageEnd(), totalItems()) }}\n } @else {\n {{ i18n.zeroResults }}\n }\n </span>\n\n <ngx-ds-pagination\n [totalPages]=\"totalPages()\"\n [currentPage]=\"effectivePage()\"\n (pageChange)=\"onPageChange($event)\"\n />\n </div>\n}\n", styles: [":host{display:block}.ngx-table__toolbar{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.625rem .875rem;border:1px solid var(--border-base, #e5e7eb);border-bottom:none;border-radius:.5rem .5rem 0 0;background:var(--surface-base, #ffffff)}.ngx-table__toolbar-filter{max-width:20rem;width:100%}.ngx-table__toolbar-actions{display:flex;align-items:center;gap:.5rem;margin-left:auto;flex-shrink:0}.ngx-table__column-menu{position:relative;flex-shrink:0}.ngx-table__column-panel{position:absolute;right:0;top:calc(100% + .25rem);z-index:100;min-width:12rem;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.5rem;box-shadow:0 4px 20px #0000001a,0 1px 4px #0000000f;padding:.5rem .625rem;display:flex;flex-direction:column;gap:.5rem}.ngx-table__wrapper{overflow-x:auto;border:1px solid var(--border-base, #e5e7eb);border-radius:.5rem .5rem 0 0}.ngx-table__wrapper--attached{border-radius:0}.ngx-table__wrapper--sticky-head{overflow-y:auto}.ngx-table__wrapper--sticky-head .ngx-table__th{position:sticky;top:0;z-index:2}.ngx-table{width:100%;border-collapse:collapse;font-size:.875rem;color:var(--text-base, #111827);background:var(--surface-base, #ffffff)}.ngx-table__head{background:var(--surface-subtle, #f9fafb)}.ngx-table__th{padding:.75rem 1rem;font-weight:600;font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted, #6b7280);border-bottom:2px solid var(--border-base, #e5e7eb);white-space:nowrap;-webkit-user-select:none;user-select:none;background:var(--surface-subtle, #f9fafb)}.ngx-table__th--checkbox{width:3rem;padding-inline:.875rem}.ngx-table__th--sortable{cursor:pointer;transition:background .15s ease,color .15s ease}.ngx-table__th--sortable:hover{background:var(--surface-hover, #f3f4f6);color:var(--text-base, #111827)}.ngx-table__th--sorted{color:var(--primary-500, #6366f1)}.ngx-table__th--sticky{position:sticky;left:0;z-index:3;box-shadow:2px 0 6px -2px #00000014}.ngx-table__th-inner{display:inline-flex;align-items:center;gap:.375rem}.ngx-table__sort-icon{display:inline-flex;align-items:center;color:var(--text-disabled, #d1d5db);transition:color .15s ease}.ngx-table__sort-icon--active{color:var(--primary-500, #6366f1)}.ngx-table__row{border-bottom:1px solid var(--border-base, #e5e7eb)}.ngx-table__row:last-child{border-bottom:none}.ngx-table__row--selected,.ngx-table__row--selected .ngx-table__td--sticky{background:var(--primary-50, #eef2ff)}.ngx-table__row--clickable{cursor:pointer}.ngx-table__row--skeleton,.ngx-table__row--empty{pointer-events:none}.ngx-table__td{padding:.6rem .875rem;vertical-align:middle;background:var(--surface-base, #ffffff)}.ngx-table__td--checkbox{width:3rem;padding-inline:.875rem}.ngx-table__td--sticky{position:sticky;left:0;z-index:1;box-shadow:2px 0 6px -2px #0000000f}.ngx-table__td--empty{text-align:center;padding:0;pointer-events:auto}.ngx-table--striped .ngx-table__row--odd,.ngx-table--striped .ngx-table__row--odd .ngx-table__td--sticky{background:var(--surface-subtle, #f9fafb)}.ngx-table--hoverable .ngx-table__row:not(.ngx-table__row--header):not(.ngx-table__row--skeleton):not(.ngx-table__row--empty){transition:background .12s ease}.ngx-table--hoverable .ngx-table__row:not(.ngx-table__row--header):not(.ngx-table__row--skeleton):not(.ngx-table__row--empty):hover:not(.ngx-table__row--selected){background:var(--surface-hover, #f3f4f6)}.ngx-table--hoverable .ngx-table__row:not(.ngx-table__row--header):not(.ngx-table__row--skeleton):not(.ngx-table__row--empty):hover:not(.ngx-table__row--selected) .ngx-table__td--sticky{background:var(--surface-hover, #f3f4f6)}.ngx-table--dense .ngx-table__th,.ngx-table--dense .ngx-table__td{padding-block:.5rem}.ngx-table__skeleton-cell{display:block;height:.875rem;border-radius:.25rem;width:65%;min-width:3rem;background:linear-gradient(90deg,var(--border-base, #e5e7eb) 25%,var(--surface-subtle, #f9fafb) 50%,var(--border-base, #e5e7eb) 75%);background-size:300% 100%;animation:table-shimmer 1.5s ease-in-out infinite}.ngx-table__td--checkbox .ngx-table__skeleton-cell{width:1.125rem;border-radius:.25rem}@keyframes table-shimmer{0%{background-position:100% 0}to{background-position:-100% 0}}.ngx-table__td--empty ngx-ds-empty-state{margin:auto}.ngx-table__bool{display:inline-flex;align-items:center;color:var(--danger-500, #ef4444)}.ngx-table__bool--true{color:var(--success-500, #10b981)}.ngx-table__th--actions{width:2.75rem;min-width:2.75rem;text-align:center;padding-inline:.375rem;letter-spacing:.05em}.ngx-table__td--actions{width:2.75rem;min-width:2.75rem;padding-inline:.375rem;text-align:center}.ngx-table__action-menu{position:relative;display:flex;align-items:center;justify-content:center}.ngx-table__action-panel{position:absolute;right:0;top:calc(100% + .25rem);z-index:100;min-width:11rem;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.5rem;box-shadow:0 4px 20px #0000001a,0 1px 4px #0000000f;padding:.25rem;display:flex;flex-direction:column;gap:.125rem}.ngx-table__action-menu--open ::ng-deep .icon-btn{background-color:var(--fill-neutral, #6b7280);color:var(--text-on-color, #fff)}.ngx-table__radio{display:block;padding:0;background:transparent;width:1.125rem;height:1.125rem;border-radius:50%;border:2px solid var(--border-strong, #9ca3af);cursor:pointer;transition:border-color .15s ease,background .15s ease;position:relative;flex-shrink:0}.ngx-table__radio--selected{border-color:var(--primary-500, #6366f1);background:var(--primary-500, #6366f1)}.ngx-table__radio--selected:after{content:\"\";position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:.375rem;height:.375rem;border-radius:50%;background:var(--text-on-color, #fff)}.ngx-table__radio:hover:not(.ngx-table__radio--selected){border-color:var(--primary-500, #6366f1)}.ngx-table__th--expand{width:2.25rem;min-width:2.25rem;padding-inline:.375rem}.ngx-table__td--expand{width:2.25rem;min-width:2.25rem;padding-inline:.375rem;text-align:center}.ngx-table__expand-icon{display:inline-flex;align-items:center;justify-content:center}.ngx-table__expand-icon ::ng-deep .icon-btn{transition:transform .15s ease}.ngx-table__expand-icon--open ::ng-deep .icon-btn{transform:rotate(90deg)}.ngx-table__row--detail{background:var(--surface-subtle, #f9fafb)}.ngx-table__td--detail{padding:0}.ngx-table__detail-content{padding:.875rem 1rem;animation:table-detail-in .18s ease-out}@keyframes table-detail-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.ngx-table__footer{display:flex;align-items:center;justify-content:flex-end;gap:1.25rem;padding:.75rem 1rem;border:1px solid var(--border-base, #e5e7eb);border-top:none;border-radius:0 0 .5rem .5rem;background:var(--surface-base, #ffffff);flex-wrap:wrap;min-height:3.25rem}.ngx-table__page-size{display:flex;align-items:center;gap:.5rem}.ngx-table__label{font-size:.8125rem;color:var(--text-muted, #6b7280);white-space:nowrap}.ngx-table__page-size-select{appearance:none;padding:.25rem 1.75rem .25rem .625rem;border:1px solid var(--border-base, #e5e7eb);border-radius:.375rem;font-size:.8125rem;color:var(--text-base, #111827);background:var(--surface-base, #ffffff) url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E\") no-repeat right .5rem center;cursor:pointer;outline:none;transition:border-color .15s ease,box-shadow .15s ease}.ngx-table__page-size-select:focus{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f626}.ngx-table__page-info{font-size:.8125rem;color:var(--text-muted, #6b7280);white-space:nowrap;margin-inline-end:auto}\n"] }]
|
|
5990
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (globalFilter() || columnToggle() || showAddButton()) {\n <div class=\"ngx-table__toolbar\">\n @if (globalFilter()) {\n <ngx-ds-search-input\n class=\"ngx-table__toolbar-filter\"\n [value]=\"filterValue()\"\n (valueChange)=\"onFilterChange($event)\"\n [placeholder]=\"filterPlaceholder() ?? i18n.searchPlaceholder\"\n size=\"sm\"\n />\n }\n\n <div class=\"ngx-table__toolbar-actions\">\n @if (columnToggle()) {\n <div\n class=\"ngx-table__column-menu\"\n [class.ngx-table__column-menu--open]=\"isColumnMenuOpen()\"\n >\n <ngx-ds-icon-button\n [icon]=\"icons.Columns3\"\n [ariaLabel]=\"i18n.visibleColumns\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n (click)=\"toggleColumnMenu($event)\"\n />\n\n @if (isColumnMenuOpen()) {\n <div class=\"ngx-table__column-panel\">\n @for (col of hideableColumns(); track col.key) {\n <ngx-ds-checkbox\n [label]=\"col.label\"\n [checked]=\"isColumnVisible(col.key)\"\n (checkedChange)=\"toggleColumn(col.key)\"\n />\n }\n </div>\n }\n </div>\n }\n\n @if (showAddButton()) {\n <ngx-ds-button\n size=\"sm\"\n color=\"primary\"\n variant=\"solid\"\n [iconLeft]=\"icons.Plus\"\n (click)=\"onAddClick()\"\n >{{ addLabel() ?? i18n.tableAdd }}</ngx-ds-button\n >\n }\n </div>\n </div>\n}\n\n<div\n class=\"ngx-table__wrapper\"\n [class.ngx-table__wrapper--sticky-head]=\"stickyHeader()\"\n [class.ngx-table__wrapper--attached]=\"globalFilter() || columnToggle() || showAddButton()\"\n [style.maxHeight]=\"stickyHeader() && maxHeight() ? maxHeight() : null\"\n [attr.tabindex]=\"stickyHeader() && maxHeight() ? 0 : null\"\n>\n <table\n class=\"ngx-table\"\n [class.ngx-table--striped]=\"striped()\"\n [class.ngx-table--hoverable]=\"hoverable()\"\n [class.ngx-table--dense]=\"dense()\"\n >\n <!-- \u2500\u2500 HEAD \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <thead class=\"ngx-table__head\">\n <tr class=\"ngx-table__row ngx-table__row--header\">\n @if (expandable()) {\n <th class=\"ngx-table__th ngx-table__th--expand\"></th>\n }\n\n @if (selectable()) {\n <th class=\"ngx-table__th ngx-table__th--checkbox\">\n @if (selectMode() === 'multi') {\n <ngx-ds-checkbox\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n [ariaLabel]=\"i18n.selectAll\"\n (checkedChange)=\"toggleAll($event)\"\n />\n }\n </th>\n }\n\n @for (col of visibleColumns(); track col.key) {\n <th\n class=\"ngx-table__th\"\n [class.ngx-table__th--sortable]=\"col.sortable\"\n [class.ngx-table__th--sorted]=\"isSortActive(col)\"\n [class.ngx-table__th--sticky]=\"col.sticky\"\n [style.width]=\"col.width ?? null\"\n [style.minWidth]=\"col.minWidth ?? null\"\n [style.maxWidth]=\"col.maxWidth ?? null\"\n [style.textAlign]=\"col.align ?? 'left'\"\n [attr.aria-sort]=\"\n isSortActive(col) ? (isSortAsc(col) ? 'ascending' : 'descending') : null\n \"\n (click)=\"col.sortable && onSort(col)\"\n >\n @if (col.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"col.headerTemplate\"\n [ngTemplateOutletContext]=\"{ column: col }\"\n />\n } @else {\n <span class=\"ngx-table__th-inner\">\n {{ col.label }}\n @if (col.sortable) {\n <span\n class=\"ngx-table__sort-icon\"\n [class.ngx-table__sort-icon--active]=\"isSortActive(col)\"\n >\n <ngx-ds-icon [icon]=\"sortIconFor(col)\" [size]=\"14\" />\n </span>\n }\n </span>\n }\n </th>\n }\n\n @if (hasActions()) {\n <th class=\"ngx-table__th ngx-table__th--actions\">...</th>\n }\n </tr>\n </thead>\n\n <!-- \u2500\u2500 BODY \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <tbody class=\"ngx-table__body\">\n @if (loading()) {\n @for (row of skeletonRowsArr(); track $index) {\n <tr class=\"ngx-table__row ngx-table__row--skeleton\">\n @for (col of skeletonColsArr(); track $index) {\n <td class=\"ngx-table__td\">\n <span class=\"ngx-table__skeleton-cell\"></span>\n </td>\n }\n </tr>\n }\n } @else if (processedData().length === 0) {\n <tr class=\"ngx-table__row ngx-table__row--empty\">\n <td [attr.colspan]=\"colSpanCount()\" class=\"ngx-table__td ngx-table__td--empty\">\n @if (emptyTemplate()) {\n <ng-container [ngTemplateOutlet]=\"emptyTemplate()!\" />\n } @else {\n <ngx-ds-empty-state\n [icon]=\"emptyIcon()\"\n [title]=\"emptyMessage() ?? i18n.tableEmpty\"\n [description]=\"emptyDescription() ?? i18n.tableEmptyDescription\"\n size=\"md\"\n >\n @if (showAddButton()) {\n <ngx-ds-button\n empty-action\n size=\"sm\"\n color=\"primary\"\n variant=\"solid\"\n [iconLeft]=\"icons.Plus\"\n (click)=\"onAddClick()\"\n >{{ addLabel() ?? i18n.tableAdd }}</ngx-ds-button\n >\n }\n </ngx-ds-empty-state>\n }\n </td>\n </tr>\n } @else {\n @for (row of processedData(); track rowTrack(row, $index)) {\n <tr\n class=\"ngx-table__row\"\n [class.ngx-table__row--odd]=\"$index % 2 === 1\"\n [class.ngx-table__row--selected]=\"isSelected(row)\"\n [class.ngx-table__row--clickable]=\"selectable() || rowClickable()\"\n (click)=\"onRowClick(row)\"\n >\n @if (expandable()) {\n <td class=\"ngx-table__td ngx-table__td--expand\" (click)=\"$event.stopPropagation()\">\n <span\n class=\"ngx-table__expand-icon\"\n [class.ngx-table__expand-icon--open]=\"isExpanded(row)\"\n >\n <ngx-ds-icon-button\n [icon]=\"icons.ChevronRight\"\n [ariaLabel]=\"i18n.expandRow\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n [bordered]=\"false\"\n [attr.aria-expanded]=\"isExpanded(row)\"\n (click)=\"toggleExpand(row, $event)\"\n />\n </span>\n </td>\n }\n\n @if (selectable()) {\n <td class=\"ngx-table__td ngx-table__td--checkbox\" (click)=\"$event.stopPropagation()\">\n @if (selectMode() === 'multi') {\n <ngx-ds-checkbox\n [checked]=\"isSelected(row)\"\n [ariaLabel]=\"i18n.selectRow\"\n (checkedChange)=\"toggleRow(row)\"\n />\n } @else {\n <button\n type=\"button\"\n class=\"ngx-table__radio\"\n role=\"radio\"\n [attr.aria-label]=\"i18n.selectRow\"\n [attr.aria-checked]=\"isSelected(row)\"\n [class.ngx-table__radio--selected]=\"isSelected(row)\"\n (click)=\"toggleRow(row)\"\n ></button>\n }\n </td>\n }\n\n @for (col of visibleColumns(); track col.key) {\n <td\n class=\"ngx-table__td\"\n [class.ngx-table__td--sticky]=\"col.sticky\"\n [style.textAlign]=\"col.align ?? 'left'\"\n >\n @if (col.cellTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"col.cellTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: row,\n value: getCellValue(row, col),\n row: row,\n }\"\n />\n } @else if (col.type === 'boolean') {\n <span\n class=\"ngx-table__bool\"\n [class.ngx-table__bool--true]=\"getCellValue(row, col)\"\n >\n <ngx-ds-icon\n [icon]=\"getCellValue(row, col) ? icons.Check : icons.X\"\n [size]=\"16\"\n />\n </span>\n } @else if (col.type === 'badge') {\n <ngx-ds-badge\n [label]=\"formatCell(row, col)\"\n [color]=\"col.badgeColor ?? 'primary'\"\n [variant]=\"col.badgeVariant ?? 'soft'\"\n />\n } @else {\n {{ formatCell(row, col) }}\n }\n </td>\n }\n\n @if (hasActions()) {\n <td class=\"ngx-table__td ngx-table__td--actions\" (click)=\"$event.stopPropagation()\">\n <div\n class=\"ngx-table__action-menu\"\n [class.ngx-table__action-menu--open]=\"isMenuOpen(row)\"\n >\n <ngx-ds-icon-button\n [icon]=\"icons.MoreVertical\"\n [ariaLabel]=\"i18n.rowActions\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n [bordered]=\"false\"\n (click)=\"toggleMenu(row, $event)\"\n />\n\n @if (isMenuOpen(row)) {\n <div class=\"ngx-table__action-panel\">\n @for (action of actions(); track action.label) {\n @if (isActionVisible(action, row)) {\n <ngx-ds-menu-button\n [color]=\"action.color ?? 'default'\"\n size=\"md\"\n [iconLeft]=\"action.icon\"\n [fullWidth]=\"true\"\n [disabled]=\"isActionDisabled(action, row)\"\n (click)=\"onActionClick(action, row, $event)\"\n >{{ action.label }}</ngx-ds-menu-button\n >\n }\n }\n </div>\n }\n </div>\n </td>\n }\n </tr>\n\n @if (expandable() && isExpanded(row)) {\n <tr class=\"ngx-table__row ngx-table__row--detail\">\n <td [attr.colspan]=\"colSpanCount()\" class=\"ngx-table__td ngx-table__td--detail\">\n <div class=\"ngx-table__detail-content\">\n @if (expandTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"expandTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: row, row: row }\"\n />\n }\n </div>\n </td>\n </tr>\n }\n }\n }\n </tbody>\n </table>\n</div>\n\n<!-- \u2500\u2500 FOOTER \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (paginated()) {\n <div class=\"ngx-table__footer\">\n <div class=\"ngx-table__page-size\">\n <span class=\"ngx-table__label\">{{ i18n.rowsPerPage }}</span>\n <select\n class=\"ngx-table__page-size-select\"\n [attr.aria-label]=\"i18n.rowsPerPage\"\n [value]=\"effectivePageSize()\"\n (change)=\"onPageSizeChange($event)\"\n >\n @for (opt of pageSizeOptions(); track opt) {\n <option [value]=\"opt\">{{ opt }}</option>\n }\n </select>\n </div>\n\n <span class=\"ngx-table__page-info\">\n @if (totalItems() > 0) {\n {{ i18n.pageRange(pageStart(), pageEnd(), totalItems()) }}\n } @else {\n {{ i18n.zeroResults }}\n }\n </span>\n\n <ngx-ds-pagination\n [totalPages]=\"totalPages()\"\n [currentPage]=\"effectivePage()\"\n (pageChange)=\"onPageChange($event)\"\n />\n </div>\n}\n", styles: [":host{display:block}.ngx-table__toolbar{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.625rem .875rem;border:1px solid var(--border-base, #e5e7eb);border-bottom:none;border-radius:.5rem .5rem 0 0;background:var(--surface-base, #ffffff)}.ngx-table__toolbar-filter{max-width:20rem;width:100%}.ngx-table__toolbar-actions{display:flex;align-items:center;gap:.5rem;margin-left:auto;flex-shrink:0}.ngx-table__column-menu{position:relative;flex-shrink:0}.ngx-table__column-panel{position:absolute;right:0;top:calc(100% + .25rem);z-index:100;min-width:12rem;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.5rem;box-shadow:0 4px 20px #0000001a,0 1px 4px #0000000f;padding:.5rem .625rem;display:flex;flex-direction:column;gap:.5rem}.ngx-table__wrapper{overflow-x:auto;border:1px solid var(--border-base, #e5e7eb);border-radius:.5rem .5rem 0 0}.ngx-table__wrapper--attached{border-radius:0}.ngx-table__wrapper--sticky-head{overflow-y:auto}.ngx-table__wrapper--sticky-head .ngx-table__th{position:sticky;top:0;z-index:2}.ngx-table{width:100%;border-collapse:collapse;font-size:.875rem;color:var(--text-base, #111827);background:var(--surface-base, #ffffff)}.ngx-table__head{background:var(--surface-subtle, #f9fafb)}.ngx-table__th{padding:.75rem 1rem;font-weight:600;font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted, #6b7280);border-bottom:2px solid var(--border-base, #e5e7eb);white-space:nowrap;-webkit-user-select:none;user-select:none;background:var(--surface-subtle, #f9fafb)}.ngx-table__th--checkbox{width:3rem;padding-inline:.875rem}.ngx-table__th--sortable{cursor:pointer;transition:background .15s ease,color .15s ease}.ngx-table__th--sortable:hover{background:var(--surface-hover, #f3f4f6);color:var(--text-base, #111827)}.ngx-table__th--sorted{color:var(--fill-primary, #4f46e5)}.ngx-table__th--sticky{position:sticky;left:0;z-index:3;box-shadow:2px 0 6px -2px #00000014}.ngx-table__th-inner{display:inline-flex;align-items:center;gap:.375rem}.ngx-table__sort-icon{display:inline-flex;align-items:center;color:var(--text-disabled, #d1d5db);transition:color .15s ease}.ngx-table__sort-icon--active{color:var(--fill-primary, #4f46e5)}.ngx-table__row{border-bottom:1px solid var(--border-base, #e5e7eb)}.ngx-table__row:last-child{border-bottom:none}.ngx-table__row--selected,.ngx-table__row--selected .ngx-table__td--sticky{background:var(--primary-50, #eef2ff)}.ngx-table__row--clickable{cursor:pointer}.ngx-table__row--skeleton,.ngx-table__row--empty{pointer-events:none}.ngx-table__td{padding:.6rem .875rem;vertical-align:middle;background:var(--surface-base, #ffffff)}.ngx-table__td--checkbox{width:3rem;padding-inline:.875rem}.ngx-table__td--sticky{position:sticky;left:0;z-index:1;box-shadow:2px 0 6px -2px #0000000f}.ngx-table__td--empty{text-align:center;padding:0;pointer-events:auto}.ngx-table--striped .ngx-table__row--odd,.ngx-table--striped .ngx-table__row--odd .ngx-table__td--sticky{background:var(--surface-subtle, #f9fafb)}.ngx-table--hoverable .ngx-table__row:not(.ngx-table__row--header):not(.ngx-table__row--skeleton):not(.ngx-table__row--empty){transition:background .12s ease}.ngx-table--hoverable .ngx-table__row:not(.ngx-table__row--header):not(.ngx-table__row--skeleton):not(.ngx-table__row--empty):hover:not(.ngx-table__row--selected){background:var(--surface-hover, #f3f4f6)}.ngx-table--hoverable .ngx-table__row:not(.ngx-table__row--header):not(.ngx-table__row--skeleton):not(.ngx-table__row--empty):hover:not(.ngx-table__row--selected) .ngx-table__td--sticky{background:var(--surface-hover, #f3f4f6)}.ngx-table--dense .ngx-table__th,.ngx-table--dense .ngx-table__td{padding-block:.5rem}.ngx-table__skeleton-cell{display:block;height:.875rem;border-radius:.25rem;width:65%;min-width:3rem;background:linear-gradient(90deg,var(--border-base, #e5e7eb) 25%,var(--surface-subtle, #f9fafb) 50%,var(--border-base, #e5e7eb) 75%);background-size:300% 100%;animation:table-shimmer 1.5s ease-in-out infinite}.ngx-table__td--checkbox .ngx-table__skeleton-cell{width:1.125rem;border-radius:.25rem}@keyframes table-shimmer{0%{background-position:100% 0}to{background-position:-100% 0}}.ngx-table__td--empty ngx-ds-empty-state{margin:auto}.ngx-table__bool{display:inline-flex;align-items:center;color:var(--fill-danger, #dc2626)}.ngx-table__bool--true{color:var(--fill-success, #047857)}.ngx-table__th--actions{width:2.75rem;min-width:2.75rem;text-align:center;padding-inline:.375rem;letter-spacing:.05em}.ngx-table__td--actions{width:2.75rem;min-width:2.75rem;padding-inline:.375rem;text-align:center}.ngx-table__action-menu{position:relative;display:flex;align-items:center;justify-content:center}.ngx-table__action-panel{position:absolute;right:0;top:calc(100% + .25rem);z-index:100;min-width:11rem;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.5rem;box-shadow:0 4px 20px #0000001a,0 1px 4px #0000000f;padding:.25rem;display:flex;flex-direction:column;gap:.125rem}.ngx-table__action-menu--open ::ng-deep .icon-btn{background-color:var(--fill-neutral, #6b7280);color:var(--text-on-color, #fff)}.ngx-table__radio{display:block;padding:0;background:transparent;width:1.125rem;height:1.125rem;border-radius:50%;border:2px solid var(--border-strong, #9ca3af);cursor:pointer;transition:border-color .15s ease,background .15s ease;position:relative;flex-shrink:0}.ngx-table__radio--selected{border-color:var(--primary-500, #6366f1);background:var(--primary-500, #6366f1)}.ngx-table__radio--selected:after{content:\"\";position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:.375rem;height:.375rem;border-radius:50%;background:var(--text-on-color, #fff)}.ngx-table__radio:hover:not(.ngx-table__radio--selected){border-color:var(--primary-500, #6366f1)}.ngx-table__th--expand{width:2.25rem;min-width:2.25rem;padding-inline:.375rem}.ngx-table__td--expand{width:2.25rem;min-width:2.25rem;padding-inline:.375rem;text-align:center}.ngx-table__expand-icon{display:inline-flex;align-items:center;justify-content:center}.ngx-table__expand-icon ::ng-deep .icon-btn{transition:transform .15s ease}.ngx-table__expand-icon--open ::ng-deep .icon-btn{transform:rotate(90deg)}.ngx-table__row--detail{background:var(--surface-subtle, #f9fafb)}.ngx-table__td--detail{padding:0}.ngx-table__detail-content{padding:.875rem 1rem;animation:table-detail-in .18s ease-out}@keyframes table-detail-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.ngx-table__footer{display:flex;align-items:center;justify-content:flex-end;gap:1.25rem;padding:.75rem 1rem;border:1px solid var(--border-base, #e5e7eb);border-top:none;border-radius:0 0 .5rem .5rem;background:var(--surface-base, #ffffff);flex-wrap:wrap;min-height:3.25rem}.ngx-table__page-size{display:flex;align-items:center;gap:.5rem}.ngx-table__label{font-size:.8125rem;color:var(--text-muted, #6b7280);white-space:nowrap}.ngx-table__page-size-select{appearance:none;padding:.25rem 1.75rem .25rem .625rem;border:1px solid var(--border-base, #e5e7eb);border-radius:.375rem;font-size:.8125rem;color:var(--text-base, #111827);background:var(--surface-base, #ffffff) url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E\") no-repeat right .5rem center;cursor:pointer;outline:none;transition:border-color .15s ease,box-shadow .15s ease}.ngx-table__page-size-select:focus{border-color:var(--primary-500, #6366f1);box-shadow:0 0 0 3px #3b82f626}.ngx-table__page-info{font-size:.8125rem;color:var(--text-muted, #6b7280);white-space:nowrap;margin-inline-end:auto}\n"] }]
|
|
5247
5991
|
}], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], loadingRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingRows", required: false }] }], clientSide: [{ type: i0.Input, args: [{ isSignal: true, alias: "clientSide", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], selectMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectMode", required: false }] }], selectedRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedRows", required: false }] }, { type: i0.Output, args: ["selectedRowsChange"] }], rowKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowKey", required: false }] }], sort: [{ type: i0.Input, args: [{ isSignal: true, alias: "sort", required: false }] }], paginated: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginated", required: false }] }], page: [{ type: i0.Input, args: [{ isSignal: true, alias: "page", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }], striped: [{ type: i0.Input, args: [{ isSignal: true, alias: "striped", required: false }] }], hoverable: [{ type: i0.Input, args: [{ isSignal: true, alias: "hoverable", required: false }] }], dense: [{ type: i0.Input, args: [{ isSignal: true, alias: "dense", required: false }] }], stickyHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyHeader", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], emptyDescription: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyDescription", required: false }] }], emptyIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyIcon", required: false }] }], emptyTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyTemplate", required: false }] }], rowClickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowClickable", required: false }] }], addLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "addLabel", required: false }] }], showAddButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAddButton", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], actionsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionsLabel", required: false }] }], actionsWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionsWidth", required: false }] }], globalFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "globalFilter", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], filterKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterKeys", required: false }] }], filterValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterValue", required: false }] }, { type: i0.Output, args: ["filterValueChange"] }], columnToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnToggle", required: false }] }], visibleColumnKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "visibleColumnKeys", required: false }] }, { type: i0.Output, args: ["visibleColumnKeysChange"] }], expandable: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandable", required: false }] }], expandTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandTemplate", required: false }] }], singleExpand: [{ type: i0.Input, args: [{ isSignal: true, alias: "singleExpand", required: false }] }], expandedRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedRows", required: false }] }, { type: i0.Output, args: ["expandedRowsChange"] }], sortChange: [{ type: i0.Output, args: ["sortChange"] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], rowClick: [{ type: i0.Output, args: ["rowClick"] }], addClick: [{ type: i0.Output, args: ["addClick"] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }], columnVisibilityChange: [{ type: i0.Output, args: ["columnVisibilityChange"] }], rowExpandChange: [{ type: i0.Output, args: ["rowExpandChange"] }] } });
|
|
5248
5992
|
// ── Helpers ───────────────────────────────────────────────────────────────────
|
|
5249
5993
|
function deepGet(obj, path) {
|
|
@@ -5444,11 +6188,11 @@ class TabsComponent {
|
|
|
5444
6188
|
return this.active();
|
|
5445
6189
|
}
|
|
5446
6190
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5447
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TabsComponent, isStandalone: true, selector: "ngx-ds-tabs", inputs: { active: { classPropertyName: "active", publicName: "active", 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 }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { active: "activeChange" }, queries: [{ propertyName: "tabs", predicate: TabComponent, isSignal: true }], viewQueries: [{ propertyName: "tabButtons", predicate: ["tabBtn"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"tabs\">\n <div [class]=\"navClasses()\" role=\"tablist\">\n @for (tab of tabs(); track $index) {\n <button\n #tabBtn\n class=\"tabs__trigger\"\n role=\"tab\"\n [attr.id]=\"tabId($index)\"\n [class.tabs__trigger--active]=\"active() === $index\"\n [disabled]=\"tab.disabled() || null\"\n [attr.aria-selected]=\"active() === $index\"\n [attr.aria-disabled]=\"tab.disabled() || null\"\n [attr.aria-controls]=\"panelId($index)\"\n [attr.tabindex]=\"active() === $index ? 0 : -1\"\n (click)=\"select($index)\"\n (keydown)=\"onKeydown($event)\"\n >\n @if (tab.icon()) {\n <ngx-ds-icon\n class=\"tabs__icon\"\n [icon]=\"tab.icon()!\"\n [size]=\"iconSize()\"\n aria-hidden=\"true\"\n />\n }\n {{ tab.label() }}\n </button>\n }\n </div>\n\n <div class=\"tabs__content\">\n <ng-content />\n </div>\n</div>\n", styles: [".tabs{display:flex;flex-direction:column;width:100%}.tabs__nav{display:flex;overflow-x:auto;scrollbar-width:none}.tabs__nav::-webkit-scrollbar{display:none}.tabs__nav--line{border-bottom:1.5px solid var(--border-base, #e5e7eb);gap:.125rem}.tabs__nav--line .tabs__trigger{background:none;border:none;border-bottom:2px solid transparent;margin-bottom:-1.5px;border-radius:.25rem .25rem 0 0;color:var(--text-muted, #6b7280)}.tabs__nav--line .tabs__trigger:hover:not(:disabled){color:var(--text-base, #111827);background:#00000008}.tabs__nav--line .tabs__trigger--active{color:var(--primary
|
|
6191
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TabsComponent, isStandalone: true, selector: "ngx-ds-tabs", inputs: { active: { classPropertyName: "active", publicName: "active", 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 }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { active: "activeChange" }, queries: [{ propertyName: "tabs", predicate: TabComponent, isSignal: true }], viewQueries: [{ propertyName: "tabButtons", predicate: ["tabBtn"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"tabs\">\n <div [class]=\"navClasses()\" role=\"tablist\">\n @for (tab of tabs(); track $index) {\n <button\n #tabBtn\n class=\"tabs__trigger\"\n role=\"tab\"\n [attr.id]=\"tabId($index)\"\n [class.tabs__trigger--active]=\"active() === $index\"\n [disabled]=\"tab.disabled() || null\"\n [attr.aria-selected]=\"active() === $index\"\n [attr.aria-disabled]=\"tab.disabled() || null\"\n [attr.aria-controls]=\"panelId($index)\"\n [attr.tabindex]=\"active() === $index ? 0 : -1\"\n (click)=\"select($index)\"\n (keydown)=\"onKeydown($event)\"\n >\n @if (tab.icon()) {\n <ngx-ds-icon\n class=\"tabs__icon\"\n [icon]=\"tab.icon()!\"\n [size]=\"iconSize()\"\n aria-hidden=\"true\"\n />\n }\n {{ tab.label() }}\n </button>\n }\n </div>\n\n <div class=\"tabs__content\">\n <ng-content />\n </div>\n</div>\n", styles: [".tabs{display:flex;flex-direction:column;width:100%}.tabs__nav{display:flex;overflow-x:auto;scrollbar-width:none}.tabs__nav::-webkit-scrollbar{display:none}.tabs__nav--line{border-bottom:1.5px solid var(--border-base, #e5e7eb);gap:.125rem}.tabs__nav--line .tabs__trigger{background:none;border:none;border-bottom:2px solid transparent;margin-bottom:-1.5px;border-radius:.25rem .25rem 0 0;color:var(--text-muted, #6b7280)}.tabs__nav--line .tabs__trigger:hover:not(:disabled){color:var(--text-base, #111827);background:#00000008}.tabs__nav--line .tabs__trigger--active{color:var(--fill-primary, #4f46e5);border-bottom-color:var(--primary-500, #6366f1);font-weight:600}.tabs__nav--pill{background:var(--surface-muted, #f3f4f6);border-radius:.5rem;padding:.25rem;gap:.25rem}.tabs__nav--pill .tabs__trigger{background:none;border:none;border-radius:.375rem;color:var(--text-secondary, #374151)}.tabs__nav--pill .tabs__trigger:hover:not(:disabled){background:#0000000d;color:var(--text-base, #111827)}.tabs__nav--pill .tabs__trigger--active{background:var(--surface-base, #fff);color:var(--text-base, #111827);font-weight:600;box-shadow:0 1px 3px #0000001f,0 1px 2px #00000014}.tabs__nav--enclosed{border-bottom:1.5px solid var(--border-base, #e5e7eb);gap:.25rem}.tabs__nav--enclosed .tabs__trigger{background:var(--surface-subtle, #f9fafb);border:1.5px solid var(--border-base, #e5e7eb);border-bottom:none;border-radius:.375rem .375rem 0 0;margin-bottom:-1.5px;color:var(--text-muted, #6b7280)}.tabs__nav--enclosed .tabs__trigger:hover:not(:disabled){background:var(--surface-base, #fff);color:var(--text-base, #111827)}.tabs__nav--enclosed .tabs__trigger--active{background:var(--surface-base, #fff);color:var(--text-base, #111827);font-weight:600;border-color:var(--border-base, #e5e7eb);border-bottom-color:var(--surface-base, #fff)}.tabs__nav--sm .tabs__trigger{font-size:.75rem;padding:.375rem .75rem;gap:.25rem}.tabs__nav--md .tabs__trigger{font-size:.875rem;padding:.5rem 1rem;gap:.375rem}.tabs__nav--lg .tabs__trigger{font-size:1rem;padding:.625rem 1.25rem;gap:.5rem}.tabs__nav--full .tabs__trigger{flex:1;justify-content:center}.tabs__trigger{display:inline-flex;align-items:center;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;transition:color .15s ease,background .15s ease,border-color .15s ease,box-shadow .15s ease}.tabs__trigger:disabled{opacity:.4;cursor:not-allowed;pointer-events:none}.tabs__content{padding-top:1rem;font-size:.875rem;color:var(--text-secondary, #374151);line-height:1.6}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5448
6192
|
}
|
|
5449
6193
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TabsComponent, decorators: [{
|
|
5450
6194
|
type: Component,
|
|
5451
|
-
args: [{ selector: 'ngx-ds-tabs', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"tabs\">\n <div [class]=\"navClasses()\" role=\"tablist\">\n @for (tab of tabs(); track $index) {\n <button\n #tabBtn\n class=\"tabs__trigger\"\n role=\"tab\"\n [attr.id]=\"tabId($index)\"\n [class.tabs__trigger--active]=\"active() === $index\"\n [disabled]=\"tab.disabled() || null\"\n [attr.aria-selected]=\"active() === $index\"\n [attr.aria-disabled]=\"tab.disabled() || null\"\n [attr.aria-controls]=\"panelId($index)\"\n [attr.tabindex]=\"active() === $index ? 0 : -1\"\n (click)=\"select($index)\"\n (keydown)=\"onKeydown($event)\"\n >\n @if (tab.icon()) {\n <ngx-ds-icon\n class=\"tabs__icon\"\n [icon]=\"tab.icon()!\"\n [size]=\"iconSize()\"\n aria-hidden=\"true\"\n />\n }\n {{ tab.label() }}\n </button>\n }\n </div>\n\n <div class=\"tabs__content\">\n <ng-content />\n </div>\n</div>\n", styles: [".tabs{display:flex;flex-direction:column;width:100%}.tabs__nav{display:flex;overflow-x:auto;scrollbar-width:none}.tabs__nav::-webkit-scrollbar{display:none}.tabs__nav--line{border-bottom:1.5px solid var(--border-base, #e5e7eb);gap:.125rem}.tabs__nav--line .tabs__trigger{background:none;border:none;border-bottom:2px solid transparent;margin-bottom:-1.5px;border-radius:.25rem .25rem 0 0;color:var(--text-muted, #6b7280)}.tabs__nav--line .tabs__trigger:hover:not(:disabled){color:var(--text-base, #111827);background:#00000008}.tabs__nav--line .tabs__trigger--active{color:var(--primary
|
|
6195
|
+
args: [{ selector: 'ngx-ds-tabs', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"tabs\">\n <div [class]=\"navClasses()\" role=\"tablist\">\n @for (tab of tabs(); track $index) {\n <button\n #tabBtn\n class=\"tabs__trigger\"\n role=\"tab\"\n [attr.id]=\"tabId($index)\"\n [class.tabs__trigger--active]=\"active() === $index\"\n [disabled]=\"tab.disabled() || null\"\n [attr.aria-selected]=\"active() === $index\"\n [attr.aria-disabled]=\"tab.disabled() || null\"\n [attr.aria-controls]=\"panelId($index)\"\n [attr.tabindex]=\"active() === $index ? 0 : -1\"\n (click)=\"select($index)\"\n (keydown)=\"onKeydown($event)\"\n >\n @if (tab.icon()) {\n <ngx-ds-icon\n class=\"tabs__icon\"\n [icon]=\"tab.icon()!\"\n [size]=\"iconSize()\"\n aria-hidden=\"true\"\n />\n }\n {{ tab.label() }}\n </button>\n }\n </div>\n\n <div class=\"tabs__content\">\n <ng-content />\n </div>\n</div>\n", styles: [".tabs{display:flex;flex-direction:column;width:100%}.tabs__nav{display:flex;overflow-x:auto;scrollbar-width:none}.tabs__nav::-webkit-scrollbar{display:none}.tabs__nav--line{border-bottom:1.5px solid var(--border-base, #e5e7eb);gap:.125rem}.tabs__nav--line .tabs__trigger{background:none;border:none;border-bottom:2px solid transparent;margin-bottom:-1.5px;border-radius:.25rem .25rem 0 0;color:var(--text-muted, #6b7280)}.tabs__nav--line .tabs__trigger:hover:not(:disabled){color:var(--text-base, #111827);background:#00000008}.tabs__nav--line .tabs__trigger--active{color:var(--fill-primary, #4f46e5);border-bottom-color:var(--primary-500, #6366f1);font-weight:600}.tabs__nav--pill{background:var(--surface-muted, #f3f4f6);border-radius:.5rem;padding:.25rem;gap:.25rem}.tabs__nav--pill .tabs__trigger{background:none;border:none;border-radius:.375rem;color:var(--text-secondary, #374151)}.tabs__nav--pill .tabs__trigger:hover:not(:disabled){background:#0000000d;color:var(--text-base, #111827)}.tabs__nav--pill .tabs__trigger--active{background:var(--surface-base, #fff);color:var(--text-base, #111827);font-weight:600;box-shadow:0 1px 3px #0000001f,0 1px 2px #00000014}.tabs__nav--enclosed{border-bottom:1.5px solid var(--border-base, #e5e7eb);gap:.25rem}.tabs__nav--enclosed .tabs__trigger{background:var(--surface-subtle, #f9fafb);border:1.5px solid var(--border-base, #e5e7eb);border-bottom:none;border-radius:.375rem .375rem 0 0;margin-bottom:-1.5px;color:var(--text-muted, #6b7280)}.tabs__nav--enclosed .tabs__trigger:hover:not(:disabled){background:var(--surface-base, #fff);color:var(--text-base, #111827)}.tabs__nav--enclosed .tabs__trigger--active{background:var(--surface-base, #fff);color:var(--text-base, #111827);font-weight:600;border-color:var(--border-base, #e5e7eb);border-bottom-color:var(--surface-base, #fff)}.tabs__nav--sm .tabs__trigger{font-size:.75rem;padding:.375rem .75rem;gap:.25rem}.tabs__nav--md .tabs__trigger{font-size:.875rem;padding:.5rem 1rem;gap:.375rem}.tabs__nav--lg .tabs__trigger{font-size:1rem;padding:.625rem 1.25rem;gap:.5rem}.tabs__nav--full .tabs__trigger{flex:1;justify-content:center}.tabs__trigger{display:inline-flex;align-items:center;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;transition:color .15s ease,background .15s ease,border-color .15s ease,box-shadow .15s ease}.tabs__trigger:disabled{opacity:.4;cursor:not-allowed;pointer-events:none}.tabs__content{padding-top:1rem;font-size:.875rem;color:var(--text-secondary, #374151);line-height:1.6}\n"] }]
|
|
5452
6196
|
}], ctorParameters: () => [], propDecorators: { tabButtons: [{ type: i0.ViewChildren, args: ['tabBtn', { isSignal: true }] }], tabs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TabComponent), { isSignal: true }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }, { type: i0.Output, args: ["activeChange"] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }] } });
|
|
5453
6197
|
|
|
5454
6198
|
class DrawerComponent {
|
|
@@ -5555,11 +6299,11 @@ class StepperComponent {
|
|
|
5555
6299
|
}
|
|
5556
6300
|
}
|
|
5557
6301
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: StepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5558
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: StepperComponent, isStandalone: true, selector: "ngx-ds-stepper", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { active: "activeChange", stepChange: "stepChange" }, queries: [{ propertyName: "steps", predicate: StepComponent, isSignal: true }], ngImport: i0, template: "<div [class]=\"hostClasses()\">\n <div class=\"stepper__nav\" role=\"list\">\n @for (step of steps(); track $index) {\n <div\n class=\"stepper__item\"\n role=\"listitem\"\n [class.is-active]=\"isActive($index)\"\n [class.is-completed]=\"isCompleted($index)\"\n [class.is-error]=\"step.error()\"\n >\n <div class=\"stepper__track\">\n @if (orientation() === 'horizontal' && $index > 0) {\n <div class=\"stepper__line\" [class.stepper__line--done]=\"isCompleted($index - 1)\"></div>\n }\n\n <button\n class=\"stepper__bubble\"\n [attr.aria-current]=\"isActive($index) ? 'step' : null\"\n [attr.aria-label]=\"step.label()\"\n [disabled]=\"!clickable() || null\"\n (click)=\"goTo($index)\"\n >\n @if (step.error()) {\n <ngx-ds-icon [icon]=\"icons.X\" [size]=\"14\" />\n } @else if (isCompleted($index)) {\n <ngx-ds-icon [icon]=\"icons.Check\" [size]=\"14\" />\n } @else {\n {{ $index + 1 }}\n }\n </button>\n\n @if (!$last) {\n <div class=\"stepper__line\" [class.stepper__line--done]=\"isCompleted($index)\"></div>\n }\n </div>\n\n <div class=\"stepper__meta\">\n <span class=\"stepper__label\">{{ step.label() }}</span>\n @if (step.description()) {\n <span class=\"stepper__desc\">{{ step.description() }}</span>\n }\n </div>\n </div>\n }\n </div>\n\n <div class=\"stepper__content\">\n <ng-content />\n </div>\n</div>\n", styles: [".stepper{display:flex}.stepper--horizontal{flex-direction:column;gap:1.5rem}.stepper--horizontal .stepper__nav{display:flex;flex-direction:row;align-items:flex-start}.stepper--horizontal .stepper__item{display:flex;flex-direction:column;align-items:center;flex:1;min-width:0;text-align:center}.stepper--horizontal .stepper__track{display:flex;flex-direction:row;align-items:center;width:100%}.stepper--horizontal .stepper__meta{margin-top:.5rem}.stepper--vertical{flex-direction:row;gap:2rem;align-items:flex-start}.stepper--vertical .stepper__nav{display:flex;flex-direction:column;flex-shrink:0}.stepper--vertical .stepper__item{display:flex;flex-direction:row;gap:.875rem;min-height:3.5rem}.stepper--vertical .stepper__item:last-child{min-height:auto}.stepper--vertical .stepper__track{display:flex;flex-direction:column;align-items:center;flex-shrink:0}.stepper--vertical .stepper__meta{padding-top:.3rem;flex:1}.stepper__bubble{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:50%;flex-shrink:0;font-size:.8125rem;font-weight:600;border:2px solid var(--border-input, #d1d5db);background:var(--surface-base, #fff);color:var(--text-placeholder, #
|
|
6302
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: StepperComponent, isStandalone: true, selector: "ngx-ds-stepper", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { active: "activeChange", stepChange: "stepChange" }, queries: [{ propertyName: "steps", predicate: StepComponent, isSignal: true }], ngImport: i0, template: "<div [class]=\"hostClasses()\">\n <div class=\"stepper__nav\" role=\"list\">\n @for (step of steps(); track $index) {\n <div\n class=\"stepper__item\"\n role=\"listitem\"\n [class.is-active]=\"isActive($index)\"\n [class.is-completed]=\"isCompleted($index)\"\n [class.is-error]=\"step.error()\"\n >\n <div class=\"stepper__track\">\n @if (orientation() === 'horizontal' && $index > 0) {\n <div class=\"stepper__line\" [class.stepper__line--done]=\"isCompleted($index - 1)\"></div>\n }\n\n <button\n class=\"stepper__bubble\"\n [attr.aria-current]=\"isActive($index) ? 'step' : null\"\n [attr.aria-label]=\"$index + 1 + '. ' + step.label()\"\n [disabled]=\"!clickable() || null\"\n (click)=\"goTo($index)\"\n >\n @if (step.error()) {\n <ngx-ds-icon [icon]=\"icons.X\" [size]=\"14\" />\n } @else if (isCompleted($index)) {\n <ngx-ds-icon [icon]=\"icons.Check\" [size]=\"14\" />\n } @else {\n {{ $index + 1 }}\n }\n </button>\n\n @if (!$last) {\n <div class=\"stepper__line\" [class.stepper__line--done]=\"isCompleted($index)\"></div>\n }\n </div>\n\n <div class=\"stepper__meta\">\n <span class=\"stepper__label\">{{ step.label() }}</span>\n @if (step.description()) {\n <span class=\"stepper__desc\">{{ step.description() }}</span>\n }\n </div>\n </div>\n }\n </div>\n\n <div class=\"stepper__content\">\n <ng-content />\n </div>\n</div>\n", styles: [".stepper{display:flex}.stepper--horizontal{flex-direction:column;gap:1.5rem}.stepper--horizontal .stepper__nav{display:flex;flex-direction:row;align-items:flex-start}.stepper--horizontal .stepper__item{display:flex;flex-direction:column;align-items:center;flex:1;min-width:0;text-align:center}.stepper--horizontal .stepper__track{display:flex;flex-direction:row;align-items:center;width:100%}.stepper--horizontal .stepper__meta{margin-top:.5rem}.stepper--vertical{flex-direction:row;gap:2rem;align-items:flex-start}.stepper--vertical .stepper__nav{display:flex;flex-direction:column;flex-shrink:0}.stepper--vertical .stepper__item{display:flex;flex-direction:row;gap:.875rem;min-height:3.5rem}.stepper--vertical .stepper__item:last-child{min-height:auto}.stepper--vertical .stepper__track{display:flex;flex-direction:column;align-items:center;flex-shrink:0}.stepper--vertical .stepper__meta{padding-top:.3rem;flex:1}.stepper__bubble{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:50%;flex-shrink:0;font-size:.8125rem;font-weight:600;border:2px solid var(--border-input, #d1d5db);background:var(--surface-base, #fff);color:var(--text-placeholder, #6b7280);transition:background .2s ease,border-color .2s ease,color .2s ease;cursor:default;outline:none}.stepper__item.is-active .stepper__bubble{border-color:var(--primary-500, #6366f1);color:var(--fill-primary, #4f46e5)}.stepper__item.is-completed .stepper__bubble{border-color:var(--fill-primary, #4f46e5);background:var(--fill-primary, #4f46e5);color:var(--text-on-color, #fff)}.stepper__item.is-error .stepper__bubble{border-color:var(--fill-danger, #dc2626);background:var(--fill-danger, #dc2626);color:var(--text-on-color, #fff)}.stepper__bubble:not(:disabled){cursor:pointer}.stepper__bubble:not(:disabled):hover{opacity:.85}.stepper__bubble:not(:disabled):focus-visible{box-shadow:0 0 0 3px #3b82f64d}.stepper__line{background:var(--border-base, #e5e7eb);transition:background .3s ease}.stepper--horizontal .stepper__line{flex:1;height:2px}.stepper--vertical .stepper__line{flex:1;width:2px;min-height:1rem}.stepper__line--done{background:var(--primary-500, #6366f1)}.stepper__label{display:block;font-size:.8125rem;font-weight:500;color:var(--text-placeholder, #6b7280);transition:color .2s ease}.stepper__item.is-active .stepper__label{color:var(--text-base, #111827);font-weight:600}.stepper__item.is-completed .stepper__label{color:var(--text-secondary, #374151)}.stepper__item.is-error .stepper__label{color:var(--fill-danger, #dc2626)}.stepper__desc{display:block;font-size:.75rem;color:var(--text-placeholder, #6b7280);margin-top:.125rem;line-height:1.4}.stepper__item.is-active .stepper__desc{color:var(--text-muted, #6b7280)}.stepper__content{flex:1;min-width:0}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5559
6303
|
}
|
|
5560
6304
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: StepperComponent, decorators: [{
|
|
5561
6305
|
type: Component,
|
|
5562
|
-
args: [{ selector: 'ngx-ds-stepper', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"hostClasses()\">\n <div class=\"stepper__nav\" role=\"list\">\n @for (step of steps(); track $index) {\n <div\n class=\"stepper__item\"\n role=\"listitem\"\n [class.is-active]=\"isActive($index)\"\n [class.is-completed]=\"isCompleted($index)\"\n [class.is-error]=\"step.error()\"\n >\n <div class=\"stepper__track\">\n @if (orientation() === 'horizontal' && $index > 0) {\n <div class=\"stepper__line\" [class.stepper__line--done]=\"isCompleted($index - 1)\"></div>\n }\n\n <button\n class=\"stepper__bubble\"\n [attr.aria-current]=\"isActive($index) ? 'step' : null\"\n [attr.aria-label]=\"step.label()\"\n [disabled]=\"!clickable() || null\"\n (click)=\"goTo($index)\"\n >\n @if (step.error()) {\n <ngx-ds-icon [icon]=\"icons.X\" [size]=\"14\" />\n } @else if (isCompleted($index)) {\n <ngx-ds-icon [icon]=\"icons.Check\" [size]=\"14\" />\n } @else {\n {{ $index + 1 }}\n }\n </button>\n\n @if (!$last) {\n <div class=\"stepper__line\" [class.stepper__line--done]=\"isCompleted($index)\"></div>\n }\n </div>\n\n <div class=\"stepper__meta\">\n <span class=\"stepper__label\">{{ step.label() }}</span>\n @if (step.description()) {\n <span class=\"stepper__desc\">{{ step.description() }}</span>\n }\n </div>\n </div>\n }\n </div>\n\n <div class=\"stepper__content\">\n <ng-content />\n </div>\n</div>\n", styles: [".stepper{display:flex}.stepper--horizontal{flex-direction:column;gap:1.5rem}.stepper--horizontal .stepper__nav{display:flex;flex-direction:row;align-items:flex-start}.stepper--horizontal .stepper__item{display:flex;flex-direction:column;align-items:center;flex:1;min-width:0;text-align:center}.stepper--horizontal .stepper__track{display:flex;flex-direction:row;align-items:center;width:100%}.stepper--horizontal .stepper__meta{margin-top:.5rem}.stepper--vertical{flex-direction:row;gap:2rem;align-items:flex-start}.stepper--vertical .stepper__nav{display:flex;flex-direction:column;flex-shrink:0}.stepper--vertical .stepper__item{display:flex;flex-direction:row;gap:.875rem;min-height:3.5rem}.stepper--vertical .stepper__item:last-child{min-height:auto}.stepper--vertical .stepper__track{display:flex;flex-direction:column;align-items:center;flex-shrink:0}.stepper--vertical .stepper__meta{padding-top:.3rem;flex:1}.stepper__bubble{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:50%;flex-shrink:0;font-size:.8125rem;font-weight:600;border:2px solid var(--border-input, #d1d5db);background:var(--surface-base, #fff);color:var(--text-placeholder, #
|
|
6306
|
+
args: [{ selector: 'ngx-ds-stepper', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"hostClasses()\">\n <div class=\"stepper__nav\" role=\"list\">\n @for (step of steps(); track $index) {\n <div\n class=\"stepper__item\"\n role=\"listitem\"\n [class.is-active]=\"isActive($index)\"\n [class.is-completed]=\"isCompleted($index)\"\n [class.is-error]=\"step.error()\"\n >\n <div class=\"stepper__track\">\n @if (orientation() === 'horizontal' && $index > 0) {\n <div class=\"stepper__line\" [class.stepper__line--done]=\"isCompleted($index - 1)\"></div>\n }\n\n <button\n class=\"stepper__bubble\"\n [attr.aria-current]=\"isActive($index) ? 'step' : null\"\n [attr.aria-label]=\"$index + 1 + '. ' + step.label()\"\n [disabled]=\"!clickable() || null\"\n (click)=\"goTo($index)\"\n >\n @if (step.error()) {\n <ngx-ds-icon [icon]=\"icons.X\" [size]=\"14\" />\n } @else if (isCompleted($index)) {\n <ngx-ds-icon [icon]=\"icons.Check\" [size]=\"14\" />\n } @else {\n {{ $index + 1 }}\n }\n </button>\n\n @if (!$last) {\n <div class=\"stepper__line\" [class.stepper__line--done]=\"isCompleted($index)\"></div>\n }\n </div>\n\n <div class=\"stepper__meta\">\n <span class=\"stepper__label\">{{ step.label() }}</span>\n @if (step.description()) {\n <span class=\"stepper__desc\">{{ step.description() }}</span>\n }\n </div>\n </div>\n }\n </div>\n\n <div class=\"stepper__content\">\n <ng-content />\n </div>\n</div>\n", styles: [".stepper{display:flex}.stepper--horizontal{flex-direction:column;gap:1.5rem}.stepper--horizontal .stepper__nav{display:flex;flex-direction:row;align-items:flex-start}.stepper--horizontal .stepper__item{display:flex;flex-direction:column;align-items:center;flex:1;min-width:0;text-align:center}.stepper--horizontal .stepper__track{display:flex;flex-direction:row;align-items:center;width:100%}.stepper--horizontal .stepper__meta{margin-top:.5rem}.stepper--vertical{flex-direction:row;gap:2rem;align-items:flex-start}.stepper--vertical .stepper__nav{display:flex;flex-direction:column;flex-shrink:0}.stepper--vertical .stepper__item{display:flex;flex-direction:row;gap:.875rem;min-height:3.5rem}.stepper--vertical .stepper__item:last-child{min-height:auto}.stepper--vertical .stepper__track{display:flex;flex-direction:column;align-items:center;flex-shrink:0}.stepper--vertical .stepper__meta{padding-top:.3rem;flex:1}.stepper__bubble{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:50%;flex-shrink:0;font-size:.8125rem;font-weight:600;border:2px solid var(--border-input, #d1d5db);background:var(--surface-base, #fff);color:var(--text-placeholder, #6b7280);transition:background .2s ease,border-color .2s ease,color .2s ease;cursor:default;outline:none}.stepper__item.is-active .stepper__bubble{border-color:var(--primary-500, #6366f1);color:var(--fill-primary, #4f46e5)}.stepper__item.is-completed .stepper__bubble{border-color:var(--fill-primary, #4f46e5);background:var(--fill-primary, #4f46e5);color:var(--text-on-color, #fff)}.stepper__item.is-error .stepper__bubble{border-color:var(--fill-danger, #dc2626);background:var(--fill-danger, #dc2626);color:var(--text-on-color, #fff)}.stepper__bubble:not(:disabled){cursor:pointer}.stepper__bubble:not(:disabled):hover{opacity:.85}.stepper__bubble:not(:disabled):focus-visible{box-shadow:0 0 0 3px #3b82f64d}.stepper__line{background:var(--border-base, #e5e7eb);transition:background .3s ease}.stepper--horizontal .stepper__line{flex:1;height:2px}.stepper--vertical .stepper__line{flex:1;width:2px;min-height:1rem}.stepper__line--done{background:var(--primary-500, #6366f1)}.stepper__label{display:block;font-size:.8125rem;font-weight:500;color:var(--text-placeholder, #6b7280);transition:color .2s ease}.stepper__item.is-active .stepper__label{color:var(--text-base, #111827);font-weight:600}.stepper__item.is-completed .stepper__label{color:var(--text-secondary, #374151)}.stepper__item.is-error .stepper__label{color:var(--fill-danger, #dc2626)}.stepper__desc{display:block;font-size:.75rem;color:var(--text-placeholder, #6b7280);margin-top:.125rem;line-height:1.4}.stepper__item.is-active .stepper__desc{color:var(--text-muted, #6b7280)}.stepper__content{flex:1;min-width:0}\n"] }]
|
|
5563
6307
|
}], ctorParameters: () => [], propDecorators: { steps: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => StepComponent), { isSignal: true }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }, { type: i0.Output, args: ["activeChange"] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], clickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickable", required: false }] }], stepChange: [{ type: i0.Output, args: ["stepChange"] }] } });
|
|
5564
6308
|
|
|
5565
6309
|
const ACCORDION_CONTROLLER = new InjectionToken('ACCORDION_CONTROLLER');
|
|
@@ -5611,11 +6355,11 @@ class AccordionItemComponent {
|
|
|
5611
6355
|
this.controller?.itemOpened(this);
|
|
5612
6356
|
}
|
|
5613
6357
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: AccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5614
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: AccordionItemComponent, isStandalone: true, selector: "ngx-ds-accordion-item", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [class]=\"itemClasses()\">\n <!-- Trigger -->\n <button\n class=\"accordion-item__trigger\"\n type=\"button\"\n [attr.aria-expanded]=\"_open()\"\n [disabled]=\"disabled() || null\"\n (click)=\"toggle()\"\n >\n @if (icon()) {\n <ngx-ds-icon\n class=\"accordion-item__icon\"\n [icon]=\"icon()!\"\n [size]=\"iconSize()\"\n aria-hidden=\"true\"\n />\n }\n\n <span class=\"accordion-item__labels\">\n <span class=\"accordion-item__label\">{{ label() }}</span>\n @if (description()) {\n <span class=\"accordion-item__description\">{{ description() }}</span>\n }\n </span>\n\n <ngx-ds-icon\n class=\"accordion-item__chevron\"\n [icon]=\"chevronIcon\"\n [size]=\"iconSize()\"\n aria-hidden=\"true\"\n />\n </button>\n\n <!-- Panel (animated with grid-template-rows trick) -->\n <div class=\"accordion-item__panel\" [attr.aria-hidden]=\"!_open() || null\">\n <div class=\"accordion-item__panel-inner\">\n <div class=\"accordion-item__panel-content\">\n <ng-content />\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.accordion-item--default{border:1.5px solid var(--border-base, #e5e7eb);border-radius:.5rem;background:var(--surface-base, #fff);overflow:hidden}.accordion-item--default .accordion-item__trigger:hover:not(:disabled){background:var(--surface-subtle, #f9fafb)}.accordion-item--flush{border-bottom:1.5px solid var(--border-base, #e5e7eb)}.accordion-item--flush .accordion-item__trigger:hover:not(:disabled){background:var(--surface-subtle, #f9fafb)}.accordion-item--ghost{border-radius:.5rem;overflow:hidden}.accordion-item--ghost .accordion-item__trigger:hover:not(:disabled){background:var(--surface-muted, #f3f4f6)}.accordion-item--disabled{opacity:.5}.accordion-item--open .accordion-item__chevron{transform:rotate(180deg)}.accordion-item--open .accordion-item__panel{grid-template-rows:1fr}.accordion-item__trigger{width:100%;display:flex;align-items:center;gap:.75rem;text-align:left;background:transparent;border:none;cursor:pointer;transition:background .15s ease}.accordion-item__trigger:disabled{cursor:not-allowed}.accordion-item--sm .accordion-item__trigger{padding:.625rem .875rem;font-size:.8125rem}.accordion-item--md .accordion-item__trigger{padding:.875rem 1rem;font-size:.875rem}.accordion-item--lg .accordion-item__trigger{padding:1.125rem 1.25rem;font-size:1rem}.accordion-item__icon{flex-shrink:0;color:var(--text-muted, #6b7280)}.accordion-item__labels{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.accordion-item__label{font-weight:500;color:var(--text-base, #111827);line-height:1.4}.accordion-item__description{font-size:.75rem;color:var(--text-muted, #6b7280);line-height:1.4}.accordion-item__chevron{flex-shrink:0;color:var(--text-placeholder, #
|
|
6358
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: AccordionItemComponent, isStandalone: true, selector: "ngx-ds-accordion-item", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [class]=\"itemClasses()\">\n <!-- Trigger -->\n <button\n class=\"accordion-item__trigger\"\n type=\"button\"\n [attr.aria-expanded]=\"_open()\"\n [disabled]=\"disabled() || null\"\n (click)=\"toggle()\"\n >\n @if (icon()) {\n <ngx-ds-icon\n class=\"accordion-item__icon\"\n [icon]=\"icon()!\"\n [size]=\"iconSize()\"\n aria-hidden=\"true\"\n />\n }\n\n <span class=\"accordion-item__labels\">\n <span class=\"accordion-item__label\">{{ label() }}</span>\n @if (description()) {\n <span class=\"accordion-item__description\">{{ description() }}</span>\n }\n </span>\n\n <ngx-ds-icon\n class=\"accordion-item__chevron\"\n [icon]=\"chevronIcon\"\n [size]=\"iconSize()\"\n aria-hidden=\"true\"\n />\n </button>\n\n <!-- Panel (animated with grid-template-rows trick) -->\n <div class=\"accordion-item__panel\" [attr.aria-hidden]=\"!_open() || null\">\n <div class=\"accordion-item__panel-inner\">\n <div class=\"accordion-item__panel-content\">\n <ng-content />\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.accordion-item--default{border:1.5px solid var(--border-base, #e5e7eb);border-radius:.5rem;background:var(--surface-base, #fff);overflow:hidden}.accordion-item--default .accordion-item__trigger:hover:not(:disabled){background:var(--surface-subtle, #f9fafb)}.accordion-item--flush{border-bottom:1.5px solid var(--border-base, #e5e7eb)}.accordion-item--flush .accordion-item__trigger:hover:not(:disabled){background:var(--surface-subtle, #f9fafb)}.accordion-item--ghost{border-radius:.5rem;overflow:hidden}.accordion-item--ghost .accordion-item__trigger:hover:not(:disabled){background:var(--surface-muted, #f3f4f6)}.accordion-item--disabled{opacity:.5}.accordion-item--open .accordion-item__chevron{transform:rotate(180deg)}.accordion-item--open .accordion-item__panel{grid-template-rows:1fr}.accordion-item__trigger{width:100%;display:flex;align-items:center;gap:.75rem;text-align:left;background:transparent;border:none;cursor:pointer;transition:background .15s ease}.accordion-item__trigger:disabled{cursor:not-allowed}.accordion-item--sm .accordion-item__trigger{padding:.625rem .875rem;font-size:.8125rem}.accordion-item--md .accordion-item__trigger{padding:.875rem 1rem;font-size:.875rem}.accordion-item--lg .accordion-item__trigger{padding:1.125rem 1.25rem;font-size:1rem}.accordion-item__icon{flex-shrink:0;color:var(--text-muted, #6b7280)}.accordion-item__labels{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.accordion-item__label{font-weight:500;color:var(--text-base, #111827);line-height:1.4}.accordion-item__description{font-size:.75rem;color:var(--text-muted, #6b7280);line-height:1.4}.accordion-item__chevron{flex-shrink:0;color:var(--text-placeholder, #6b7280);transition:transform .25s ease}.accordion-item__panel{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s ease}.accordion-item__panel-inner{overflow:hidden;min-height:0}.accordion-item__panel-content{color:var(--text-secondary, #374151);line-height:1.6}.accordion-item--sm .accordion-item__panel-content{padding:0 .875rem .75rem;font-size:.8125rem}.accordion-item--md .accordion-item__panel-content{padding:0 1rem 1rem;font-size:.875rem}.accordion-item--lg .accordion-item__panel-content{padding:0 1.25rem 1.25rem;font-size:1rem}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5615
6359
|
}
|
|
5616
6360
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: AccordionItemComponent, decorators: [{
|
|
5617
6361
|
type: Component,
|
|
5618
|
-
args: [{ selector: 'ngx-ds-accordion-item', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"itemClasses()\">\n <!-- Trigger -->\n <button\n class=\"accordion-item__trigger\"\n type=\"button\"\n [attr.aria-expanded]=\"_open()\"\n [disabled]=\"disabled() || null\"\n (click)=\"toggle()\"\n >\n @if (icon()) {\n <ngx-ds-icon\n class=\"accordion-item__icon\"\n [icon]=\"icon()!\"\n [size]=\"iconSize()\"\n aria-hidden=\"true\"\n />\n }\n\n <span class=\"accordion-item__labels\">\n <span class=\"accordion-item__label\">{{ label() }}</span>\n @if (description()) {\n <span class=\"accordion-item__description\">{{ description() }}</span>\n }\n </span>\n\n <ngx-ds-icon\n class=\"accordion-item__chevron\"\n [icon]=\"chevronIcon\"\n [size]=\"iconSize()\"\n aria-hidden=\"true\"\n />\n </button>\n\n <!-- Panel (animated with grid-template-rows trick) -->\n <div class=\"accordion-item__panel\" [attr.aria-hidden]=\"!_open() || null\">\n <div class=\"accordion-item__panel-inner\">\n <div class=\"accordion-item__panel-content\">\n <ng-content />\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.accordion-item--default{border:1.5px solid var(--border-base, #e5e7eb);border-radius:.5rem;background:var(--surface-base, #fff);overflow:hidden}.accordion-item--default .accordion-item__trigger:hover:not(:disabled){background:var(--surface-subtle, #f9fafb)}.accordion-item--flush{border-bottom:1.5px solid var(--border-base, #e5e7eb)}.accordion-item--flush .accordion-item__trigger:hover:not(:disabled){background:var(--surface-subtle, #f9fafb)}.accordion-item--ghost{border-radius:.5rem;overflow:hidden}.accordion-item--ghost .accordion-item__trigger:hover:not(:disabled){background:var(--surface-muted, #f3f4f6)}.accordion-item--disabled{opacity:.5}.accordion-item--open .accordion-item__chevron{transform:rotate(180deg)}.accordion-item--open .accordion-item__panel{grid-template-rows:1fr}.accordion-item__trigger{width:100%;display:flex;align-items:center;gap:.75rem;text-align:left;background:transparent;border:none;cursor:pointer;transition:background .15s ease}.accordion-item__trigger:disabled{cursor:not-allowed}.accordion-item--sm .accordion-item__trigger{padding:.625rem .875rem;font-size:.8125rem}.accordion-item--md .accordion-item__trigger{padding:.875rem 1rem;font-size:.875rem}.accordion-item--lg .accordion-item__trigger{padding:1.125rem 1.25rem;font-size:1rem}.accordion-item__icon{flex-shrink:0;color:var(--text-muted, #6b7280)}.accordion-item__labels{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.accordion-item__label{font-weight:500;color:var(--text-base, #111827);line-height:1.4}.accordion-item__description{font-size:.75rem;color:var(--text-muted, #6b7280);line-height:1.4}.accordion-item__chevron{flex-shrink:0;color:var(--text-placeholder, #
|
|
6362
|
+
args: [{ selector: 'ngx-ds-accordion-item', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"itemClasses()\">\n <!-- Trigger -->\n <button\n class=\"accordion-item__trigger\"\n type=\"button\"\n [attr.aria-expanded]=\"_open()\"\n [disabled]=\"disabled() || null\"\n (click)=\"toggle()\"\n >\n @if (icon()) {\n <ngx-ds-icon\n class=\"accordion-item__icon\"\n [icon]=\"icon()!\"\n [size]=\"iconSize()\"\n aria-hidden=\"true\"\n />\n }\n\n <span class=\"accordion-item__labels\">\n <span class=\"accordion-item__label\">{{ label() }}</span>\n @if (description()) {\n <span class=\"accordion-item__description\">{{ description() }}</span>\n }\n </span>\n\n <ngx-ds-icon\n class=\"accordion-item__chevron\"\n [icon]=\"chevronIcon\"\n [size]=\"iconSize()\"\n aria-hidden=\"true\"\n />\n </button>\n\n <!-- Panel (animated with grid-template-rows trick) -->\n <div class=\"accordion-item__panel\" [attr.aria-hidden]=\"!_open() || null\">\n <div class=\"accordion-item__panel-inner\">\n <div class=\"accordion-item__panel-content\">\n <ng-content />\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.accordion-item--default{border:1.5px solid var(--border-base, #e5e7eb);border-radius:.5rem;background:var(--surface-base, #fff);overflow:hidden}.accordion-item--default .accordion-item__trigger:hover:not(:disabled){background:var(--surface-subtle, #f9fafb)}.accordion-item--flush{border-bottom:1.5px solid var(--border-base, #e5e7eb)}.accordion-item--flush .accordion-item__trigger:hover:not(:disabled){background:var(--surface-subtle, #f9fafb)}.accordion-item--ghost{border-radius:.5rem;overflow:hidden}.accordion-item--ghost .accordion-item__trigger:hover:not(:disabled){background:var(--surface-muted, #f3f4f6)}.accordion-item--disabled{opacity:.5}.accordion-item--open .accordion-item__chevron{transform:rotate(180deg)}.accordion-item--open .accordion-item__panel{grid-template-rows:1fr}.accordion-item__trigger{width:100%;display:flex;align-items:center;gap:.75rem;text-align:left;background:transparent;border:none;cursor:pointer;transition:background .15s ease}.accordion-item__trigger:disabled{cursor:not-allowed}.accordion-item--sm .accordion-item__trigger{padding:.625rem .875rem;font-size:.8125rem}.accordion-item--md .accordion-item__trigger{padding:.875rem 1rem;font-size:.875rem}.accordion-item--lg .accordion-item__trigger{padding:1.125rem 1.25rem;font-size:1rem}.accordion-item__icon{flex-shrink:0;color:var(--text-muted, #6b7280)}.accordion-item__labels{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.accordion-item__label{font-weight:500;color:var(--text-base, #111827);line-height:1.4}.accordion-item__description{font-size:.75rem;color:var(--text-muted, #6b7280);line-height:1.4}.accordion-item__chevron{flex-shrink:0;color:var(--text-placeholder, #6b7280);transition:transform .25s ease}.accordion-item__panel{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s ease}.accordion-item__panel-inner{overflow:hidden;min-height:0}.accordion-item__panel-content{color:var(--text-secondary, #374151);line-height:1.6}.accordion-item--sm .accordion-item__panel-content{padding:0 .875rem .75rem;font-size:.8125rem}.accordion-item--md .accordion-item__panel-content{padding:0 1rem 1rem;font-size:.875rem}.accordion-item--lg .accordion-item__panel-content{padding:0 1.25rem 1.25rem;font-size:1rem}\n"] }]
|
|
5619
6363
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
5620
6364
|
|
|
5621
6365
|
class AccordionComponent {
|
|
@@ -5653,6 +6397,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
5653
6397
|
args: [{ selector: 'ngx-ds-accordion', standalone: true, imports: [], template: '<ng-content />', changeDetection: ChangeDetectionStrategy.OnPush, host: { '[class]': 'hostClass()' }, providers: [{ provide: ACCORDION_CONTROLLER, useExisting: AccordionComponent }], styles: [":host{display:flex;flex-direction:column;width:100%;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.accordion--default{gap:.5rem}.accordion--flush{border:1.5px solid var(--border-base, #e5e7eb);border-radius:.5rem;overflow:hidden}.accordion--flush ngx-ds-accordion-item:last-child .accordion-item--flush{border-bottom:none}.accordion--ghost{gap:.25rem}\n"] }]
|
|
5654
6398
|
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => AccordionItemComponent), { isSignal: true }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
5655
6399
|
|
|
6400
|
+
// A projected trigger that is already interactive (e.g. <ngx-ds-button>) handles
|
|
6401
|
+
// focus and keyboard itself; the wrapper must not be a second, nested button.
|
|
6402
|
+
const INTERACTIVE = 'button, a[href], input, select, textarea, [tabindex]';
|
|
5656
6403
|
class PopoverComponent {
|
|
5657
6404
|
i18n = inject(NGX_DS_LABELS);
|
|
5658
6405
|
open = model(false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
@@ -5663,6 +6410,9 @@ class PopoverComponent {
|
|
|
5663
6410
|
ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
5664
6411
|
opened = output();
|
|
5665
6412
|
closed = output();
|
|
6413
|
+
triggerRef = viewChild.required('trigger');
|
|
6414
|
+
/** The interactive element projected as trigger, if any. */
|
|
6415
|
+
nativeTrigger = signal(null, ...(ngDevMode ? [{ debugName: "nativeTrigger" }] : /* istanbul ignore next */ []));
|
|
5666
6416
|
panelClasses = computed(() => `popover__panel popover__panel--${this.placement()}`, ...(ngDevMode ? [{ debugName: "panelClasses" }] : /* istanbul ignore next */ []));
|
|
5667
6417
|
toggle() {
|
|
5668
6418
|
if (this.disabled())
|
|
@@ -5673,7 +6423,25 @@ class PopoverComponent {
|
|
|
5673
6423
|
else
|
|
5674
6424
|
this.closed.emit();
|
|
5675
6425
|
}
|
|
6426
|
+
/** Keyboard toggle for a non-interactive trigger; native ones fire `click`. */
|
|
6427
|
+
onTriggerKey(event) {
|
|
6428
|
+
if (this.nativeTrigger())
|
|
6429
|
+
return;
|
|
6430
|
+
event.preventDefault();
|
|
6431
|
+
this.toggle();
|
|
6432
|
+
}
|
|
5676
6433
|
constructor() {
|
|
6434
|
+
afterNextRender(() => {
|
|
6435
|
+
const el = this.triggerRef().nativeElement.querySelector(INTERACTIVE);
|
|
6436
|
+
this.nativeTrigger.set(el);
|
|
6437
|
+
});
|
|
6438
|
+
effect(() => {
|
|
6439
|
+
const el = this.nativeTrigger();
|
|
6440
|
+
if (!el)
|
|
6441
|
+
return;
|
|
6442
|
+
el.setAttribute('aria-haspopup', 'dialog');
|
|
6443
|
+
el.setAttribute('aria-expanded', String(this.open()));
|
|
6444
|
+
});
|
|
5677
6445
|
setupEscapeClose(() => {
|
|
5678
6446
|
if (this.open() && this.closeOnEscape())
|
|
5679
6447
|
this.close();
|
|
@@ -5689,12 +6457,12 @@ class PopoverComponent {
|
|
|
5689
6457
|
this.closed.emit();
|
|
5690
6458
|
}
|
|
5691
6459
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: PopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5692
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: PopoverComponent, isStandalone: true, selector: "ngx-ds-popover", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, closeOnClickOutside: { classPropertyName: "closeOnClickOutside", publicName: "closeOnClickOutside", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", opened: "opened", closed: "closed" }, ngImport: i0, template: "<div class=\"popover\">\n <div\n class=\"popover__trigger\"\n role=\"button\"\n [attr.tabindex]=\"disabled() ? null : 0\"\n [attr.aria-expanded]=\"open()\"\n aria-haspopup=\"dialog\"\n (click)=\"toggle()\"\n (keydown.enter)=\"
|
|
6460
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: PopoverComponent, isStandalone: true, selector: "ngx-ds-popover", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, closeOnClickOutside: { classPropertyName: "closeOnClickOutside", publicName: "closeOnClickOutside", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", opened: "opened", closed: "closed" }, viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"popover\">\n <div\n #trigger\n class=\"popover__trigger\"\n [attr.role]=\"nativeTrigger() ? null : 'button'\"\n [attr.tabindex]=\"nativeTrigger() || disabled() ? null : 0\"\n [attr.aria-expanded]=\"nativeTrigger() ? null : open()\"\n [attr.aria-haspopup]=\"nativeTrigger() ? null : 'dialog'\"\n (click)=\"toggle()\"\n (keydown.enter)=\"onTriggerKey($event)\"\n (keydown.space)=\"onTriggerKey($event)\"\n >\n <ng-content select=\"[popover-trigger]\" />\n </div>\n\n @if (open()) {\n <div [class]=\"panelClasses()\" role=\"dialog\" [attr.aria-label]=\"ariaLabel() ?? i18n.popover\">\n <ng-content select=\"[popover-content]\" />\n </div>\n }\n</div>\n", styles: [":host{display:inline-block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.popover{position:relative;display:inline-block}.popover__trigger{display:inline-flex;cursor:pointer}.popover__panel{position:absolute;z-index:1000;min-width:200px;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.5rem;box-shadow:0 4px 16px #0000001f;padding:.75rem;animation:popoverIn .12s ease}.popover__panel--bottom{top:calc(100% + .5rem);left:50%;translate:-50% 0}.popover__panel--bottom-start{top:calc(100% + .5rem);left:0}.popover__panel--bottom-end{top:calc(100% + .5rem);right:0}.popover__panel--top{bottom:calc(100% + .5rem);left:50%;translate:-50% 0}.popover__panel--top-start{bottom:calc(100% + .5rem);left:0}.popover__panel--top-end{bottom:calc(100% + .5rem);right:0}.popover__panel--left{right:calc(100% + .5rem);top:50%;translate:0 -50%}.popover__panel--right{left:calc(100% + .5rem);top:50%;translate:0 -50%}@keyframes popoverIn{0%{opacity:0}to{opacity:1}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5693
6461
|
}
|
|
5694
6462
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: PopoverComponent, decorators: [{
|
|
5695
6463
|
type: Component,
|
|
5696
|
-
args: [{ selector: 'ngx-ds-popover', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"popover\">\n <div\n class=\"popover__trigger\"\n role=\"button\"\n [attr.tabindex]=\"disabled() ? null : 0\"\n [attr.aria-expanded]=\"open()\"\n aria-haspopup=\"dialog\"\n (click)=\"toggle()\"\n (keydown.enter)=\"
|
|
5697
|
-
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], closeOnClickOutside: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnClickOutside", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
6464
|
+
args: [{ selector: 'ngx-ds-popover', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"popover\">\n <div\n #trigger\n class=\"popover__trigger\"\n [attr.role]=\"nativeTrigger() ? null : 'button'\"\n [attr.tabindex]=\"nativeTrigger() || disabled() ? null : 0\"\n [attr.aria-expanded]=\"nativeTrigger() ? null : open()\"\n [attr.aria-haspopup]=\"nativeTrigger() ? null : 'dialog'\"\n (click)=\"toggle()\"\n (keydown.enter)=\"onTriggerKey($event)\"\n (keydown.space)=\"onTriggerKey($event)\"\n >\n <ng-content select=\"[popover-trigger]\" />\n </div>\n\n @if (open()) {\n <div [class]=\"panelClasses()\" role=\"dialog\" [attr.aria-label]=\"ariaLabel() ?? i18n.popover\">\n <ng-content select=\"[popover-content]\" />\n </div>\n }\n</div>\n", styles: [":host{display:inline-block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.popover{position:relative;display:inline-block}.popover__trigger{display:inline-flex;cursor:pointer}.popover__panel{position:absolute;z-index:1000;min-width:200px;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.5rem;box-shadow:0 4px 16px #0000001f;padding:.75rem;animation:popoverIn .12s ease}.popover__panel--bottom{top:calc(100% + .5rem);left:50%;translate:-50% 0}.popover__panel--bottom-start{top:calc(100% + .5rem);left:0}.popover__panel--bottom-end{top:calc(100% + .5rem);right:0}.popover__panel--top{bottom:calc(100% + .5rem);left:50%;translate:-50% 0}.popover__panel--top-start{bottom:calc(100% + .5rem);left:0}.popover__panel--top-end{bottom:calc(100% + .5rem);right:0}.popover__panel--left{right:calc(100% + .5rem);top:50%;translate:0 -50%}.popover__panel--right{left:calc(100% + .5rem);top:50%;translate:0 -50%}@keyframes popoverIn{0%{opacity:0}to{opacity:1}}\n"] }]
|
|
6465
|
+
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], closeOnClickOutside: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnClickOutside", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], triggerRef: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }] } });
|
|
5698
6466
|
|
|
5699
6467
|
class TimelineItemComponent {
|
|
5700
6468
|
title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
@@ -5704,11 +6472,11 @@ class TimelineItemComponent {
|
|
|
5704
6472
|
icon = input(null, ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
5705
6473
|
dotClasses = computed(() => `timeline-item__dot timeline-item__dot--${this.status()}`, ...(ngDevMode ? [{ debugName: "dotClasses" }] : /* istanbul ignore next */ []));
|
|
5706
6474
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TimelineItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5707
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TimelineItemComponent, isStandalone: true, selector: "ngx-ds-timeline-item", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, time: { classPropertyName: "time", publicName: "time", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<
|
|
6475
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TimelineItemComponent, isStandalone: true, selector: "ngx-ds-timeline-item", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, time: { classPropertyName: "time", publicName: "time", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "listitem" } }, ngImport: i0, template: "<div class=\"timeline-item\">\n <div class=\"timeline-item__rail\">\n <div [class]=\"dotClasses()\">\n @if (icon()) {\n <ngx-ds-icon [icon]=\"icon()!\" [size]=\"14\" />\n }\n </div>\n <div class=\"timeline-item__line\"></div>\n </div>\n\n <div class=\"timeline-item__body\">\n @if (time()) {\n <span class=\"timeline-item__time\">{{ time() }}</span>\n }\n @if (title()) {\n <p class=\"timeline-item__title\">{{ title() }}</p>\n }\n @if (description()) {\n <p class=\"timeline-item__description\">{{ description() }}</p>\n }\n <div class=\"timeline-item__content\">\n <ng-content />\n </div>\n </div>\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.timeline-item{display:flex;gap:1rem;padding-bottom:1.5rem}.timeline-item:last-child{padding-bottom:0}.timeline-item:last-child .timeline-item__line{display:none}.timeline-item__rail{display:flex;flex-direction:column;align-items:center;flex-shrink:0}.timeline-item__dot{width:2rem;height:2rem;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:.75rem;font-weight:700;border:2px solid transparent}.timeline-item__dot--completed{background:var(--success-100, #d1fae5);border-color:var(--success-500, #10b981);color:var(--success-700, #047857)}.timeline-item__dot--active{background:var(--primary-100, #e0e7ff);border-color:var(--primary-500, #6366f1);color:var(--primary-700, #4338ca);box-shadow:0 0 0 3px var(--primary-100, #e0e7ff)}.timeline-item__dot--pending{background:var(--surface-muted, #f3f4f6);border-color:var(--border-input, #d1d5db);color:var(--text-placeholder, #6b7280)}.timeline-item__dot--error{background:var(--danger-100, #fee2e2);border-color:var(--danger-500, #ef4444);color:var(--danger-700, #b91c1c)}.timeline-item__line{flex:1;width:2px;background:var(--border-base, #e5e7eb);margin-top:.25rem;min-height:1rem}.timeline-item__body{flex:1;padding-top:.25rem}.timeline-item__time{display:block;font-size:.75rem;color:var(--text-placeholder, #6b7280);margin-bottom:.125rem}.timeline-item__title{margin:0;font-size:.9375rem;font-weight:600;color:var(--text-base, #111827)}.timeline-item__description{margin:.25rem 0 0;font-size:.875rem;color:var(--text-muted, #6b7280)}.timeline-item__content:not(:has(*)){display:none}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5708
6476
|
}
|
|
5709
6477
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TimelineItemComponent, decorators: [{
|
|
5710
6478
|
type: Component,
|
|
5711
|
-
args: [{ selector: 'ngx-ds-timeline-item', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<
|
|
6479
|
+
args: [{ selector: 'ngx-ds-timeline-item', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'listitem' }, template: "<div class=\"timeline-item\">\n <div class=\"timeline-item__rail\">\n <div [class]=\"dotClasses()\">\n @if (icon()) {\n <ngx-ds-icon [icon]=\"icon()!\" [size]=\"14\" />\n }\n </div>\n <div class=\"timeline-item__line\"></div>\n </div>\n\n <div class=\"timeline-item__body\">\n @if (time()) {\n <span class=\"timeline-item__time\">{{ time() }}</span>\n }\n @if (title()) {\n <p class=\"timeline-item__title\">{{ title() }}</p>\n }\n @if (description()) {\n <p class=\"timeline-item__description\">{{ description() }}</p>\n }\n <div class=\"timeline-item__content\">\n <ng-content />\n </div>\n </div>\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.timeline-item{display:flex;gap:1rem;padding-bottom:1.5rem}.timeline-item:last-child{padding-bottom:0}.timeline-item:last-child .timeline-item__line{display:none}.timeline-item__rail{display:flex;flex-direction:column;align-items:center;flex-shrink:0}.timeline-item__dot{width:2rem;height:2rem;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:.75rem;font-weight:700;border:2px solid transparent}.timeline-item__dot--completed{background:var(--success-100, #d1fae5);border-color:var(--success-500, #10b981);color:var(--success-700, #047857)}.timeline-item__dot--active{background:var(--primary-100, #e0e7ff);border-color:var(--primary-500, #6366f1);color:var(--primary-700, #4338ca);box-shadow:0 0 0 3px var(--primary-100, #e0e7ff)}.timeline-item__dot--pending{background:var(--surface-muted, #f3f4f6);border-color:var(--border-input, #d1d5db);color:var(--text-placeholder, #6b7280)}.timeline-item__dot--error{background:var(--danger-100, #fee2e2);border-color:var(--danger-500, #ef4444);color:var(--danger-700, #b91c1c)}.timeline-item__line{flex:1;width:2px;background:var(--border-base, #e5e7eb);margin-top:.25rem;min-height:1rem}.timeline-item__body{flex:1;padding-top:.25rem}.timeline-item__time{display:block;font-size:.75rem;color:var(--text-placeholder, #6b7280);margin-bottom:.125rem}.timeline-item__title{margin:0;font-size:.9375rem;font-weight:600;color:var(--text-base, #111827)}.timeline-item__description{margin:.25rem 0 0;font-size:.875rem;color:var(--text-muted, #6b7280)}.timeline-item__content:not(:has(*)){display:none}\n"] }]
|
|
5712
6480
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], time: [{ type: i0.Input, args: [{ isSignal: true, alias: "time", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }] } });
|
|
5713
6481
|
|
|
5714
6482
|
class TimelineComponent {
|
|
@@ -5716,11 +6484,11 @@ class TimelineComponent {
|
|
|
5716
6484
|
items = contentChildren(TimelineItemComponent, ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
5717
6485
|
hostClasses = computed(() => `timeline timeline--${this.variant()}`, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
5718
6486
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TimelineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5719
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.12", type: TimelineComponent, isStandalone: true, selector: "ngx-ds-timeline", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "items", predicate: TimelineItemComponent, isSignal: true }], ngImport: i0, template: "<ol [class]=\"hostClasses()\">\n <ng-content />\n</ol>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.timeline{list-style:none;margin:0;padding:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6487
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.12", type: TimelineComponent, isStandalone: true, selector: "ngx-ds-timeline", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "items", predicate: TimelineItemComponent, isSignal: true }], ngImport: i0, template: "<ol [class]=\"hostClasses()\" role=\"list\">\n <ng-content />\n</ol>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.timeline{list-style:none;margin:0;padding:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5720
6488
|
}
|
|
5721
6489
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TimelineComponent, decorators: [{
|
|
5722
6490
|
type: Component,
|
|
5723
|
-
args: [{ selector: 'ngx-ds-timeline', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ol [class]=\"hostClasses()\">\n <ng-content />\n</ol>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.timeline{list-style:none;margin:0;padding:0}\n"] }]
|
|
6491
|
+
args: [{ selector: 'ngx-ds-timeline', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ol [class]=\"hostClasses()\" role=\"list\">\n <ng-content />\n</ol>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.timeline{list-style:none;margin:0;padding:0}\n"] }]
|
|
5724
6492
|
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TimelineItemComponent), { isSignal: true }] }] } });
|
|
5725
6493
|
|
|
5726
6494
|
class TreeNodeComponent {
|
|
@@ -5761,11 +6529,11 @@ class TreeNodeComponent {
|
|
|
5761
6529
|
this.nodeToggle.emit(node);
|
|
5762
6530
|
}
|
|
5763
6531
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TreeNodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5764
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TreeNodeComponent, isStandalone: true, selector: "ngx-ds-tree-node", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: true, transformFunction: null }, depth: { classPropertyName: "depth", publicName: "depth", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { nodeSelect: "nodeSelect", nodeToggle: "nodeToggle" }, ngImport: i0, template: "<li\n class=\"tree-node\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected()\"\n [attr.aria-expanded]=\"hasChildren() ? isExpanded() : null\"\n>\n <!-- Row -->\n <div\n [class]=\"rowClasses()\"\n [style.paddingLeft]=\"indent()\"\n tabindex=\"0\"\n (click)=\"select()\"\n (keydown.enter)=\"select()\"\n (keydown.space)=\"$event.preventDefault(); select()\"\n >\n <!-- Expand toggle -->\n <button\n type=\"button\"\n class=\"tree-node__toggle\"\n [class.tree-node__toggle--expanded]=\"isExpanded()\"\n [style.visibility]=\"hasChildren() ? 'visible' : 'hidden'\"\n (click)=\"toggle($event)\"\n [attr.aria-label]=\"isExpanded() ? i18n.collapse : i18n.expand\"\n >\n <ngx-ds-icon [icon]=\"ChevronRight\" [size]=\"14\" />\n </button>\n\n <span class=\"tree-node__label\">{{ node().label }}</span>\n </div>\n\n <!-- Children -->\n @if (hasChildren() && isExpanded()) {\n <ul class=\"tree-node__children\" role=\"group\">\n @for (child of node().children; track child.id) {\n <ngx-ds-tree-node\n [node]=\"child\"\n [depth]=\"depth() + 1\"\n [selected]=\"selected()\"\n [expanded]=\"expanded()\"\n [selectable]=\"selectable()\"\n (nodeSelect)=\"bubbleSelect($event)\"\n (nodeToggle)=\"bubbleToggle($event)\"\n />\n }\n </ul>\n }\n</li>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.tree-node{list-style:none}.tree-node__row{display:flex;align-items:center;gap:.25rem;padding:.375rem .5rem;border-radius:.375rem;cursor:pointer;transition:background .1s ease;-webkit-user-select:none;user-select:none}.tree-node__row:hover{background:var(--surface-hover, #f3f4f6)}.tree-node__row--selected{background:var(--primary-50, #eef2ff);color:var(--primary-700, #4338ca);font-weight:500}.tree-node__row--disabled{opacity:.4;cursor:not-allowed;pointer-events:none}.tree-node__toggle{display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:0;cursor:pointer;color:var(--text-placeholder, #
|
|
6532
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TreeNodeComponent, isStandalone: true, selector: "ngx-ds-tree-node", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: true, transformFunction: null }, depth: { classPropertyName: "depth", publicName: "depth", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { nodeSelect: "nodeSelect", nodeToggle: "nodeToggle" }, ngImport: i0, template: "<li\n class=\"tree-node\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected()\"\n [attr.aria-expanded]=\"hasChildren() ? isExpanded() : null\"\n>\n <!-- Row -->\n <div\n [class]=\"rowClasses()\"\n [style.paddingLeft]=\"indent()\"\n tabindex=\"0\"\n (click)=\"select()\"\n (keydown.enter)=\"select()\"\n (keydown.space)=\"$event.preventDefault(); select()\"\n >\n <!-- Expand toggle -->\n <button\n type=\"button\"\n class=\"tree-node__toggle\"\n [class.tree-node__toggle--expanded]=\"isExpanded()\"\n [style.visibility]=\"hasChildren() ? 'visible' : 'hidden'\"\n (click)=\"toggle($event)\"\n [attr.aria-label]=\"isExpanded() ? i18n.collapse : i18n.expand\"\n >\n <ngx-ds-icon [icon]=\"ChevronRight\" [size]=\"14\" />\n </button>\n\n <span class=\"tree-node__label\">{{ node().label }}</span>\n </div>\n\n <!-- Children -->\n @if (hasChildren() && isExpanded()) {\n <ul class=\"tree-node__children\" role=\"group\">\n @for (child of node().children; track child.id) {\n <ngx-ds-tree-node\n [node]=\"child\"\n [depth]=\"depth() + 1\"\n [selected]=\"selected()\"\n [expanded]=\"expanded()\"\n [selectable]=\"selectable()\"\n (nodeSelect)=\"bubbleSelect($event)\"\n (nodeToggle)=\"bubbleToggle($event)\"\n />\n }\n </ul>\n }\n</li>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.tree-node{list-style:none}.tree-node__row{display:flex;align-items:center;gap:.25rem;padding:.375rem .5rem;border-radius:.375rem;cursor:pointer;transition:background .1s ease;-webkit-user-select:none;user-select:none}.tree-node__row:hover{background:var(--surface-hover, #f3f4f6)}.tree-node__row--selected{background:var(--primary-50, #eef2ff);color:var(--primary-700, #4338ca);font-weight:500}.tree-node__row--disabled{opacity:.4;cursor:not-allowed;pointer-events:none}.tree-node__toggle{display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:0;cursor:pointer;color:var(--text-placeholder, #6b7280);flex-shrink:0;transition:transform .15s ease}.tree-node__toggle--expanded{transform:rotate(90deg)}.tree-node__label{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text-base, #111827);font-size:.875rem}.tree-node__row--selected .tree-node__label{color:inherit}.tree-node__children{list-style:none;margin:0;padding:0}\n"], dependencies: [{ kind: "component", type: TreeNodeComponent, selector: "ngx-ds-tree-node", inputs: ["node", "depth", "selected", "expanded", "selectable"], outputs: ["nodeSelect", "nodeToggle"] }, { kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5765
6533
|
}
|
|
5766
6534
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TreeNodeComponent, decorators: [{
|
|
5767
6535
|
type: Component,
|
|
5768
|
-
args: [{ selector: 'ngx-ds-tree-node', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<li\n class=\"tree-node\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected()\"\n [attr.aria-expanded]=\"hasChildren() ? isExpanded() : null\"\n>\n <!-- Row -->\n <div\n [class]=\"rowClasses()\"\n [style.paddingLeft]=\"indent()\"\n tabindex=\"0\"\n (click)=\"select()\"\n (keydown.enter)=\"select()\"\n (keydown.space)=\"$event.preventDefault(); select()\"\n >\n <!-- Expand toggle -->\n <button\n type=\"button\"\n class=\"tree-node__toggle\"\n [class.tree-node__toggle--expanded]=\"isExpanded()\"\n [style.visibility]=\"hasChildren() ? 'visible' : 'hidden'\"\n (click)=\"toggle($event)\"\n [attr.aria-label]=\"isExpanded() ? i18n.collapse : i18n.expand\"\n >\n <ngx-ds-icon [icon]=\"ChevronRight\" [size]=\"14\" />\n </button>\n\n <span class=\"tree-node__label\">{{ node().label }}</span>\n </div>\n\n <!-- Children -->\n @if (hasChildren() && isExpanded()) {\n <ul class=\"tree-node__children\" role=\"group\">\n @for (child of node().children; track child.id) {\n <ngx-ds-tree-node\n [node]=\"child\"\n [depth]=\"depth() + 1\"\n [selected]=\"selected()\"\n [expanded]=\"expanded()\"\n [selectable]=\"selectable()\"\n (nodeSelect)=\"bubbleSelect($event)\"\n (nodeToggle)=\"bubbleToggle($event)\"\n />\n }\n </ul>\n }\n</li>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.tree-node{list-style:none}.tree-node__row{display:flex;align-items:center;gap:.25rem;padding:.375rem .5rem;border-radius:.375rem;cursor:pointer;transition:background .1s ease;-webkit-user-select:none;user-select:none}.tree-node__row:hover{background:var(--surface-hover, #f3f4f6)}.tree-node__row--selected{background:var(--primary-50, #eef2ff);color:var(--primary-700, #4338ca);font-weight:500}.tree-node__row--disabled{opacity:.4;cursor:not-allowed;pointer-events:none}.tree-node__toggle{display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:0;cursor:pointer;color:var(--text-placeholder, #
|
|
6536
|
+
args: [{ selector: 'ngx-ds-tree-node', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<li\n class=\"tree-node\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected()\"\n [attr.aria-expanded]=\"hasChildren() ? isExpanded() : null\"\n>\n <!-- Row -->\n <div\n [class]=\"rowClasses()\"\n [style.paddingLeft]=\"indent()\"\n tabindex=\"0\"\n (click)=\"select()\"\n (keydown.enter)=\"select()\"\n (keydown.space)=\"$event.preventDefault(); select()\"\n >\n <!-- Expand toggle -->\n <button\n type=\"button\"\n class=\"tree-node__toggle\"\n [class.tree-node__toggle--expanded]=\"isExpanded()\"\n [style.visibility]=\"hasChildren() ? 'visible' : 'hidden'\"\n (click)=\"toggle($event)\"\n [attr.aria-label]=\"isExpanded() ? i18n.collapse : i18n.expand\"\n >\n <ngx-ds-icon [icon]=\"ChevronRight\" [size]=\"14\" />\n </button>\n\n <span class=\"tree-node__label\">{{ node().label }}</span>\n </div>\n\n <!-- Children -->\n @if (hasChildren() && isExpanded()) {\n <ul class=\"tree-node__children\" role=\"group\">\n @for (child of node().children; track child.id) {\n <ngx-ds-tree-node\n [node]=\"child\"\n [depth]=\"depth() + 1\"\n [selected]=\"selected()\"\n [expanded]=\"expanded()\"\n [selectable]=\"selectable()\"\n (nodeSelect)=\"bubbleSelect($event)\"\n (nodeToggle)=\"bubbleToggle($event)\"\n />\n }\n </ul>\n }\n</li>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.tree-node{list-style:none}.tree-node__row{display:flex;align-items:center;gap:.25rem;padding:.375rem .5rem;border-radius:.375rem;cursor:pointer;transition:background .1s ease;-webkit-user-select:none;user-select:none}.tree-node__row:hover{background:var(--surface-hover, #f3f4f6)}.tree-node__row--selected{background:var(--primary-50, #eef2ff);color:var(--primary-700, #4338ca);font-weight:500}.tree-node__row--disabled{opacity:.4;cursor:not-allowed;pointer-events:none}.tree-node__toggle{display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:0;cursor:pointer;color:var(--text-placeholder, #6b7280);flex-shrink:0;transition:transform .15s ease}.tree-node__toggle--expanded{transform:rotate(90deg)}.tree-node__label{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text-base, #111827);font-size:.875rem}.tree-node__row--selected .tree-node__label{color:inherit}.tree-node__children{list-style:none;margin:0;padding:0}\n"] }]
|
|
5769
6537
|
}], propDecorators: { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: true }] }], depth: [{ type: i0.Input, args: [{ isSignal: true, alias: "depth", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], nodeSelect: [{ type: i0.Output, args: ["nodeSelect"] }], nodeToggle: [{ type: i0.Output, args: ["nodeToggle"] }] } });
|
|
5770
6538
|
|
|
5771
6539
|
class TreeViewComponent {
|
|
@@ -5893,11 +6661,11 @@ class CalendarComponent {
|
|
|
5893
6661
|
};
|
|
5894
6662
|
}
|
|
5895
6663
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: CalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5896
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: CalendarComponent, isStandalone: true, selector: "ngx-ds-calendar", inputs: { value: { classPropertyName: "value", publicName: "value", 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 }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", minDate: "minDateChange", maxDate: "maxDateChange", disabled: "disabledChange", dateSelect: "dateSelect" }, viewQueries: [{ propertyName: "gridRef", first: true, predicate: ["grid"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"calendar\" [class.calendar--disabled]=\"disabled()\">\n <!-- Header -->\n <div class=\"calendar__header\">\n <button\n type=\"button\"\n class=\"calendar__nav-btn\"\n (click)=\"prevMonth()\"\n [attr.aria-label]=\"i18n.prevMonth\"\n >\n <ngx-ds-icon [icon]=\"ChevronLeft\" [size]=\"18\" />\n </button>\n <span class=\"calendar__title\">{{ title() }}</span>\n <button\n type=\"button\"\n class=\"calendar__nav-btn\"\n (click)=\"nextMonth()\"\n [attr.aria-label]=\"i18n.nextMonth\"\n >\n <ngx-ds-icon [icon]=\"ChevronRight\" [size]=\"18\" />\n </button>\n </div>\n\n <!-- Weekday headers -->\n <div class=\"calendar__weekdays\" aria-hidden=\"true\">\n @for (d of weekdays; track d) {\n <span class=\"calendar__weekday\">{{ d }}</span>\n }\n </div>\n\n <!-- Day grid (WAI-ARIA grid with roving tabindex) -->\n <div #grid class=\"calendar__grid\" role=\"grid\" [attr.aria-label]=\"title()\">\n @for (week of weeks(); track $index) {\n <div class=\"calendar__week\" role=\"row\">\n @for (cell of week; track cell.date.getTime()) {\n <button\n type=\"button\"\n class=\"calendar__day\"\n role=\"gridcell\"\n [class.calendar__day--other]=\"!cell.inMonth\"\n [class.calendar__day--today]=\"cell.isToday\"\n [class.calendar__day--selected]=\"cell.isSelected\"\n [class.calendar__day--disabled]=\"cell.isDisabled\"\n [disabled]=\"disabled() || null\"\n [attr.aria-disabled]=\"cell.isDisabled || null\"\n [attr.aria-label]=\"dayLabel(cell.date)\"\n [attr.aria-selected]=\"cell.isSelected\"\n [attr.aria-current]=\"cell.isToday ? 'date' : null\"\n [attr.tabindex]=\"isFocusTarget(cell) ? 0 : -1\"\n (click)=\"selectDay(cell)\"\n (keydown)=\"onDayKeydown($event, cell)\"\n >\n {{ cell.date.getDate() }}\n </button>\n }\n </div>\n }\n </div>\n</div>\n", styles: [":host{display:inline-block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.calendar{width:20rem;padding:1rem;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.75rem;box-shadow:0 2px 8px #0000000f}.calendar--disabled{opacity:.5;pointer-events:none}.calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.calendar__title{font-size:1rem;font-weight:600;color:var(--text-base, #111827)}.calendar__nav-btn{background:none;border:none;cursor:pointer;padding:.375rem;border-radius:.375rem;display:flex;align-items:center;color:var(--text-muted, #6b7280);transition:background .1s ease}.calendar__nav-btn:hover{background:var(--surface-hover, #f3f4f6);color:var(--text-base, #111827)}.calendar__weekdays{display:grid;grid-template-columns:repeat(7,1fr);margin-bottom:.25rem}.calendar__weekday{text-align:center;font-size:.75rem;font-weight:600;color:var(--text-placeholder, #
|
|
6664
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: CalendarComponent, isStandalone: true, selector: "ngx-ds-calendar", inputs: { value: { classPropertyName: "value", publicName: "value", 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 }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", minDate: "minDateChange", maxDate: "maxDateChange", disabled: "disabledChange", dateSelect: "dateSelect" }, viewQueries: [{ propertyName: "gridRef", first: true, predicate: ["grid"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"calendar\" [class.calendar--disabled]=\"disabled()\">\n <!-- Header -->\n <div class=\"calendar__header\">\n <button\n type=\"button\"\n class=\"calendar__nav-btn\"\n (click)=\"prevMonth()\"\n [attr.aria-label]=\"i18n.prevMonth\"\n >\n <ngx-ds-icon [icon]=\"ChevronLeft\" [size]=\"18\" />\n </button>\n <span class=\"calendar__title\">{{ title() }}</span>\n <button\n type=\"button\"\n class=\"calendar__nav-btn\"\n (click)=\"nextMonth()\"\n [attr.aria-label]=\"i18n.nextMonth\"\n >\n <ngx-ds-icon [icon]=\"ChevronRight\" [size]=\"18\" />\n </button>\n </div>\n\n <!-- Weekday headers -->\n <div class=\"calendar__weekdays\" aria-hidden=\"true\">\n @for (d of weekdays; track d) {\n <span class=\"calendar__weekday\">{{ d }}</span>\n }\n </div>\n\n <!-- Day grid (WAI-ARIA grid with roving tabindex) -->\n <div #grid class=\"calendar__grid\" role=\"grid\" [attr.aria-label]=\"title()\">\n @for (week of weeks(); track $index) {\n <div class=\"calendar__week\" role=\"row\">\n @for (cell of week; track cell.date.getTime()) {\n <button\n type=\"button\"\n class=\"calendar__day\"\n role=\"gridcell\"\n [class.calendar__day--other]=\"!cell.inMonth\"\n [class.calendar__day--today]=\"cell.isToday\"\n [class.calendar__day--selected]=\"cell.isSelected\"\n [class.calendar__day--disabled]=\"cell.isDisabled\"\n [disabled]=\"disabled() || null\"\n [attr.aria-disabled]=\"cell.isDisabled || null\"\n [attr.aria-label]=\"dayLabel(cell.date)\"\n [attr.aria-selected]=\"cell.isSelected\"\n [attr.aria-current]=\"cell.isToday ? 'date' : null\"\n [attr.tabindex]=\"isFocusTarget(cell) ? 0 : -1\"\n (click)=\"selectDay(cell)\"\n (keydown)=\"onDayKeydown($event, cell)\"\n >\n {{ cell.date.getDate() }}\n </button>\n }\n </div>\n }\n </div>\n</div>\n", styles: [":host{display:inline-block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.calendar{width:20rem;padding:1rem;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.75rem;box-shadow:0 2px 8px #0000000f}.calendar--disabled{opacity:.5;pointer-events:none}.calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.calendar__title{font-size:1rem;font-weight:600;color:var(--text-base, #111827)}.calendar__nav-btn{background:none;border:none;cursor:pointer;padding:.375rem;border-radius:.375rem;display:flex;align-items:center;color:var(--text-muted, #6b7280);transition:background .1s ease}.calendar__nav-btn:hover{background:var(--surface-hover, #f3f4f6);color:var(--text-base, #111827)}.calendar__weekdays{display:grid;grid-template-columns:repeat(7,1fr);margin-bottom:.25rem}.calendar__weekday{text-align:center;font-size:.75rem;font-weight:600;color:var(--text-placeholder, #6b7280);padding:.25rem 0}.calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:.125rem}.calendar__day{display:flex;align-items:center;justify-content:center;aspect-ratio:1;border:none;background:transparent;border-radius:.5rem;font-size:.875rem;font-family:inherit;cursor:pointer;color:var(--text-base, #111827);transition:background .1s ease,color .1s ease}.calendar__day:focus-visible{outline:2px solid var(--primary-300, #a5b4fc);outline-offset:1px}.calendar__day:hover:not(:disabled):not(.calendar__day--disabled):not(.calendar__day--selected){background:var(--surface-hover, #f3f4f6)}.calendar__day--other{color:var(--text-muted, #6b7280)}.calendar__day--today{color:var(--fill-primary, #4f46e5);font-weight:700}.calendar__day--selected{background:var(--fill-primary, #4f46e5);color:var(--text-on-color, #fff);font-weight:600}.calendar__day--disabled{opacity:.35;cursor:not-allowed}.calendar__week{display:contents}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5897
6665
|
}
|
|
5898
6666
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: CalendarComponent, decorators: [{
|
|
5899
6667
|
type: Component,
|
|
5900
|
-
args: [{ selector: 'ngx-ds-calendar', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"calendar\" [class.calendar--disabled]=\"disabled()\">\n <!-- Header -->\n <div class=\"calendar__header\">\n <button\n type=\"button\"\n class=\"calendar__nav-btn\"\n (click)=\"prevMonth()\"\n [attr.aria-label]=\"i18n.prevMonth\"\n >\n <ngx-ds-icon [icon]=\"ChevronLeft\" [size]=\"18\" />\n </button>\n <span class=\"calendar__title\">{{ title() }}</span>\n <button\n type=\"button\"\n class=\"calendar__nav-btn\"\n (click)=\"nextMonth()\"\n [attr.aria-label]=\"i18n.nextMonth\"\n >\n <ngx-ds-icon [icon]=\"ChevronRight\" [size]=\"18\" />\n </button>\n </div>\n\n <!-- Weekday headers -->\n <div class=\"calendar__weekdays\" aria-hidden=\"true\">\n @for (d of weekdays; track d) {\n <span class=\"calendar__weekday\">{{ d }}</span>\n }\n </div>\n\n <!-- Day grid (WAI-ARIA grid with roving tabindex) -->\n <div #grid class=\"calendar__grid\" role=\"grid\" [attr.aria-label]=\"title()\">\n @for (week of weeks(); track $index) {\n <div class=\"calendar__week\" role=\"row\">\n @for (cell of week; track cell.date.getTime()) {\n <button\n type=\"button\"\n class=\"calendar__day\"\n role=\"gridcell\"\n [class.calendar__day--other]=\"!cell.inMonth\"\n [class.calendar__day--today]=\"cell.isToday\"\n [class.calendar__day--selected]=\"cell.isSelected\"\n [class.calendar__day--disabled]=\"cell.isDisabled\"\n [disabled]=\"disabled() || null\"\n [attr.aria-disabled]=\"cell.isDisabled || null\"\n [attr.aria-label]=\"dayLabel(cell.date)\"\n [attr.aria-selected]=\"cell.isSelected\"\n [attr.aria-current]=\"cell.isToday ? 'date' : null\"\n [attr.tabindex]=\"isFocusTarget(cell) ? 0 : -1\"\n (click)=\"selectDay(cell)\"\n (keydown)=\"onDayKeydown($event, cell)\"\n >\n {{ cell.date.getDate() }}\n </button>\n }\n </div>\n }\n </div>\n</div>\n", styles: [":host{display:inline-block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.calendar{width:20rem;padding:1rem;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.75rem;box-shadow:0 2px 8px #0000000f}.calendar--disabled{opacity:.5;pointer-events:none}.calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.calendar__title{font-size:1rem;font-weight:600;color:var(--text-base, #111827)}.calendar__nav-btn{background:none;border:none;cursor:pointer;padding:.375rem;border-radius:.375rem;display:flex;align-items:center;color:var(--text-muted, #6b7280);transition:background .1s ease}.calendar__nav-btn:hover{background:var(--surface-hover, #f3f4f6);color:var(--text-base, #111827)}.calendar__weekdays{display:grid;grid-template-columns:repeat(7,1fr);margin-bottom:.25rem}.calendar__weekday{text-align:center;font-size:.75rem;font-weight:600;color:var(--text-placeholder, #
|
|
6668
|
+
args: [{ selector: 'ngx-ds-calendar', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"calendar\" [class.calendar--disabled]=\"disabled()\">\n <!-- Header -->\n <div class=\"calendar__header\">\n <button\n type=\"button\"\n class=\"calendar__nav-btn\"\n (click)=\"prevMonth()\"\n [attr.aria-label]=\"i18n.prevMonth\"\n >\n <ngx-ds-icon [icon]=\"ChevronLeft\" [size]=\"18\" />\n </button>\n <span class=\"calendar__title\">{{ title() }}</span>\n <button\n type=\"button\"\n class=\"calendar__nav-btn\"\n (click)=\"nextMonth()\"\n [attr.aria-label]=\"i18n.nextMonth\"\n >\n <ngx-ds-icon [icon]=\"ChevronRight\" [size]=\"18\" />\n </button>\n </div>\n\n <!-- Weekday headers -->\n <div class=\"calendar__weekdays\" aria-hidden=\"true\">\n @for (d of weekdays; track d) {\n <span class=\"calendar__weekday\">{{ d }}</span>\n }\n </div>\n\n <!-- Day grid (WAI-ARIA grid with roving tabindex) -->\n <div #grid class=\"calendar__grid\" role=\"grid\" [attr.aria-label]=\"title()\">\n @for (week of weeks(); track $index) {\n <div class=\"calendar__week\" role=\"row\">\n @for (cell of week; track cell.date.getTime()) {\n <button\n type=\"button\"\n class=\"calendar__day\"\n role=\"gridcell\"\n [class.calendar__day--other]=\"!cell.inMonth\"\n [class.calendar__day--today]=\"cell.isToday\"\n [class.calendar__day--selected]=\"cell.isSelected\"\n [class.calendar__day--disabled]=\"cell.isDisabled\"\n [disabled]=\"disabled() || null\"\n [attr.aria-disabled]=\"cell.isDisabled || null\"\n [attr.aria-label]=\"dayLabel(cell.date)\"\n [attr.aria-selected]=\"cell.isSelected\"\n [attr.aria-current]=\"cell.isToday ? 'date' : null\"\n [attr.tabindex]=\"isFocusTarget(cell) ? 0 : -1\"\n (click)=\"selectDay(cell)\"\n (keydown)=\"onDayKeydown($event, cell)\"\n >\n {{ cell.date.getDate() }}\n </button>\n }\n </div>\n }\n </div>\n</div>\n", styles: [":host{display:inline-block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.calendar{width:20rem;padding:1rem;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.75rem;box-shadow:0 2px 8px #0000000f}.calendar--disabled{opacity:.5;pointer-events:none}.calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.calendar__title{font-size:1rem;font-weight:600;color:var(--text-base, #111827)}.calendar__nav-btn{background:none;border:none;cursor:pointer;padding:.375rem;border-radius:.375rem;display:flex;align-items:center;color:var(--text-muted, #6b7280);transition:background .1s ease}.calendar__nav-btn:hover{background:var(--surface-hover, #f3f4f6);color:var(--text-base, #111827)}.calendar__weekdays{display:grid;grid-template-columns:repeat(7,1fr);margin-bottom:.25rem}.calendar__weekday{text-align:center;font-size:.75rem;font-weight:600;color:var(--text-placeholder, #6b7280);padding:.25rem 0}.calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:.125rem}.calendar__day{display:flex;align-items:center;justify-content:center;aspect-ratio:1;border:none;background:transparent;border-radius:.5rem;font-size:.875rem;font-family:inherit;cursor:pointer;color:var(--text-base, #111827);transition:background .1s ease,color .1s ease}.calendar__day:focus-visible{outline:2px solid var(--primary-300, #a5b4fc);outline-offset:1px}.calendar__day:hover:not(:disabled):not(.calendar__day--disabled):not(.calendar__day--selected){background:var(--surface-hover, #f3f4f6)}.calendar__day--other{color:var(--text-muted, #6b7280)}.calendar__day--today{color:var(--fill-primary, #4f46e5);font-weight:700}.calendar__day--selected{background:var(--fill-primary, #4f46e5);color:var(--text-on-color, #fff);font-weight:600}.calendar__day--disabled{opacity:.35;cursor:not-allowed}.calendar__week{display:contents}\n"] }]
|
|
5901
6669
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }, { type: i0.Output, args: ["minDateChange"] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }, { type: i0.Output, args: ["maxDateChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], dateSelect: [{ type: i0.Output, args: ["dateSelect"] }], gridRef: [{ type: i0.ViewChild, args: ['grid', { isSignal: true }] }] } });
|
|
5902
6670
|
|
|
5903
6671
|
let nextId$1 = 0;
|
|
@@ -5989,11 +6757,11 @@ class CommandPaletteComponent {
|
|
|
5989
6757
|
}
|
|
5990
6758
|
}
|
|
5991
6759
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: CommandPaletteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5992
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: CommandPaletteComponent, isStandalone: true, selector: "ngx-ds-command-palette", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, openShortcut: { classPropertyName: "openShortcut", publicName: "openShortcut", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", itemSelect: "itemSelect" }, host: { listeners: { "document:keydown": "onKeydown($event)" } }, ngImport: i0, template: "@if (open()) {\n <!-- Backdrop -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- backdrop click is a mouse shortcut; keyboard users close with Escape -->\n <div class=\"cp__backdrop\" (click)=\"close()\"></div>\n\n <!-- Dialog -->\n <div\n class=\"cp__dialog\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"i18n.commandPalette\"\n ngxFocusTrap\n tabindex=\"-1\"\n >\n <!-- Search bar -->\n <div class=\"cp__search-row\">\n <ngx-ds-icon [icon]=\"SearchIcon\" [size]=\"18\" class=\"cp__search-icon\" />\n <input\n type=\"text\"\n class=\"cp__search-input\"\n role=\"combobox\"\n aria-expanded=\"true\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n [placeholder]=\"placeholder() ?? i18n.commandPlaceholder\"\n [value]=\"query()\"\n (input)=\"onSearch($event)\"\n />\n <ngx-ds-kbd size=\"sm\">Esc</ngx-ds-kbd>\n </div>\n\n <!-- Results -->\n <div class=\"cp__results\" role=\"listbox\" [attr.id]=\"listboxId\">\n @if (filteredItems().length === 0) {\n <div class=\"cp__empty\">{{ i18n.noResultsFor(query()) }}</div>\n } @else {\n @for (group of categories(); track group.cat) {\n @if (group.cat) {\n <p class=\"cp__category\" role=\"presentation\">{{ group.cat }}</p>\n }\n @for (item of group.items; track item.id) {\n <button\n type=\"button\"\n class=\"cp__item\"\n role=\"option\"\n [attr.id]=\"optionId(item)\"\n [attr.aria-selected]=\"isActive(item)\"\n [class.cp__item--active]=\"isActive(item)\"\n [class.cp__item--disabled]=\"item.disabled\"\n [disabled]=\"item.disabled || null\"\n (click)=\"selectItem(item)\"\n >\n <span class=\"cp__item-body\">\n <span class=\"cp__item-label\">{{ item.label }}</span>\n @if (item.description) {\n <span class=\"cp__item-desc\">{{ item.description }}</span>\n }\n </span>\n @if (item.kbd?.length) {\n <span class=\"cp__item-kbd\">\n @for (k of item.kbd!; track k) {\n <ngx-ds-kbd size=\"sm\">{{ k }}</ngx-ds-kbd>\n }\n </span>\n }\n </button>\n }\n }\n }\n </div>\n\n <!-- Footer -->\n <div class=\"cp__footer\">\n <span\n ><ngx-ds-kbd size=\"sm\">\u2191</ngx-ds-kbd> <ngx-ds-kbd size=\"sm\">\u2193</ngx-ds-kbd>\n {{ i18n.hintNavigate }}</span\n >\n <span><ngx-ds-kbd size=\"sm\">\u21B5</ngx-ds-kbd> {{ i18n.hintSelect }}</span>\n <span><ngx-ds-kbd size=\"sm\">Esc</ngx-ds-kbd> {{ i18n.hintClose }}</span>\n </div>\n </div>\n}\n", styles: [":host{font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.cp__backdrop{position:fixed;inset:0;background:#00000073;z-index:9000;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:cpFadeIn .1s ease}.cp__dialog{position:fixed;top:15vh;left:50%;transform:translate(-50%);width:min(640px,92vw);background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.875rem;box-shadow:0 20px 60px #0003;z-index:9001;overflow:hidden;animation:cpSlideIn .15s ease}@keyframes cpFadeIn{0%{opacity:0}to{opacity:1}}@keyframes cpSlideIn{0%{opacity:0;transform:translate(-50%) translateY(-.5rem) scale(.97)}to{opacity:1;transform:translate(-50%) translateY(0) scale(1)}}.cp__search-row{display:flex;align-items:center;gap:.75rem;padding:1rem;border-bottom:1px solid var(--border-base, #e5e7eb)}.cp__search-icon{color:var(--text-placeholder, #
|
|
6760
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: CommandPaletteComponent, isStandalone: true, selector: "ngx-ds-command-palette", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, openShortcut: { classPropertyName: "openShortcut", publicName: "openShortcut", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", itemSelect: "itemSelect" }, host: { listeners: { "document:keydown": "onKeydown($event)" } }, ngImport: i0, template: "@if (open()) {\n <!-- Backdrop -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- backdrop click is a mouse shortcut; keyboard users close with Escape -->\n <div class=\"cp__backdrop\" (click)=\"close()\"></div>\n\n <!-- Dialog -->\n <div\n class=\"cp__dialog\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"i18n.commandPalette\"\n ngxFocusTrap\n tabindex=\"-1\"\n >\n <!-- Search bar -->\n <div class=\"cp__search-row\">\n <ngx-ds-icon [icon]=\"SearchIcon\" [size]=\"18\" class=\"cp__search-icon\" />\n <input\n type=\"text\"\n class=\"cp__search-input\"\n role=\"combobox\"\n aria-expanded=\"true\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n [placeholder]=\"placeholder() ?? i18n.commandPlaceholder\"\n [value]=\"query()\"\n (input)=\"onSearch($event)\"\n />\n <ngx-ds-kbd size=\"sm\">Esc</ngx-ds-kbd>\n </div>\n\n <!-- Results -->\n <div class=\"cp__results\" role=\"listbox\" [attr.id]=\"listboxId\">\n @if (filteredItems().length === 0) {\n <div class=\"cp__empty\">{{ i18n.noResultsFor(query()) }}</div>\n } @else {\n @for (group of categories(); track group.cat) {\n @if (group.cat) {\n <p class=\"cp__category\" role=\"presentation\">{{ group.cat }}</p>\n }\n @for (item of group.items; track item.id) {\n <button\n type=\"button\"\n class=\"cp__item\"\n role=\"option\"\n [attr.id]=\"optionId(item)\"\n [attr.aria-selected]=\"isActive(item)\"\n [class.cp__item--active]=\"isActive(item)\"\n [class.cp__item--disabled]=\"item.disabled\"\n [disabled]=\"item.disabled || null\"\n (click)=\"selectItem(item)\"\n >\n <span class=\"cp__item-body\">\n <span class=\"cp__item-label\">{{ item.label }}</span>\n @if (item.description) {\n <span class=\"cp__item-desc\">{{ item.description }}</span>\n }\n </span>\n @if (item.kbd?.length) {\n <span class=\"cp__item-kbd\">\n @for (k of item.kbd!; track k) {\n <ngx-ds-kbd size=\"sm\">{{ k }}</ngx-ds-kbd>\n }\n </span>\n }\n </button>\n }\n }\n }\n </div>\n\n <!-- Footer -->\n <div class=\"cp__footer\">\n <span\n ><ngx-ds-kbd size=\"sm\">\u2191</ngx-ds-kbd> <ngx-ds-kbd size=\"sm\">\u2193</ngx-ds-kbd>\n {{ i18n.hintNavigate }}</span\n >\n <span><ngx-ds-kbd size=\"sm\">\u21B5</ngx-ds-kbd> {{ i18n.hintSelect }}</span>\n <span><ngx-ds-kbd size=\"sm\">Esc</ngx-ds-kbd> {{ i18n.hintClose }}</span>\n </div>\n </div>\n}\n", styles: [":host{font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.cp__backdrop{position:fixed;inset:0;background:#00000073;z-index:9000;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:cpFadeIn .1s ease}.cp__dialog{position:fixed;top:15vh;left:50%;transform:translate(-50%);width:min(640px,92vw);background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.875rem;box-shadow:0 20px 60px #0003;z-index:9001;overflow:hidden;animation:cpSlideIn .15s ease}@keyframes cpFadeIn{0%{opacity:0}to{opacity:1}}@keyframes cpSlideIn{0%{opacity:0;transform:translate(-50%) translateY(-.5rem) scale(.97)}to{opacity:1;transform:translate(-50%) translateY(0) scale(1)}}.cp__search-row{display:flex;align-items:center;gap:.75rem;padding:1rem;border-bottom:1px solid var(--border-base, #e5e7eb)}.cp__search-icon{color:var(--text-placeholder, #6b7280);flex-shrink:0}.cp__search-input{flex:1;border:none;outline:none;font-family:inherit;font-size:1rem;color:var(--text-base, #111827);background:transparent}.cp__search-input::placeholder{color:var(--text-placeholder, #6b7280)}.cp__results{max-height:22rem;overflow-y:auto;padding:.375rem}.cp__category{margin:.5rem .375rem .25rem;font-size:.75rem;font-weight:600;color:var(--text-placeholder, #6b7280);letter-spacing:.05em;text-transform:uppercase}.cp__item{display:flex;align-items:center;width:100%;text-align:left;background:transparent;border:none;border-radius:.5rem;padding:.625rem .75rem;cursor:pointer;font-family:inherit;transition:background .1s ease;gap:.75rem}.cp__item:hover:not(:disabled),.cp__item--active{background:var(--surface-hover, #f3f4f6)}.cp__item--disabled{opacity:.4;cursor:not-allowed}.cp__item-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.cp__item-label{font-size:.9375rem;color:var(--text-base, #111827);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cp__item-desc{font-size:.8125rem;color:var(--text-placeholder, #6b7280)}.cp__item-kbd{display:flex;gap:.25rem;flex-shrink:0}.cp__empty{padding:2rem;text-align:center;font-size:.9375rem;color:var(--text-placeholder, #6b7280)}.cp__footer{display:flex;align-items:center;gap:1.25rem;padding:.625rem 1rem;border-top:1px solid var(--border-base, #e5e7eb);font-size:.75rem;color:var(--text-placeholder, #6b7280)}.cp__footer span{display:inline-flex;align-items:center;gap:.25rem}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }, { kind: "component", type: KbdComponent, selector: "ngx-ds-kbd", inputs: ["size"] }, { kind: "directive", type: FocusTrapDirective, selector: "[ngxFocusTrap]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5993
6761
|
}
|
|
5994
6762
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: CommandPaletteComponent, decorators: [{
|
|
5995
6763
|
type: Component,
|
|
5996
|
-
args: [{ selector: 'ngx-ds-command-palette', standalone: true, imports: [IconComponent, KbdComponent, FocusTrapDirective], changeDetection: ChangeDetectionStrategy.OnPush, host: { '(document:keydown)': 'onKeydown($event)' }, template: "@if (open()) {\n <!-- Backdrop -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- backdrop click is a mouse shortcut; keyboard users close with Escape -->\n <div class=\"cp__backdrop\" (click)=\"close()\"></div>\n\n <!-- Dialog -->\n <div\n class=\"cp__dialog\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"i18n.commandPalette\"\n ngxFocusTrap\n tabindex=\"-1\"\n >\n <!-- Search bar -->\n <div class=\"cp__search-row\">\n <ngx-ds-icon [icon]=\"SearchIcon\" [size]=\"18\" class=\"cp__search-icon\" />\n <input\n type=\"text\"\n class=\"cp__search-input\"\n role=\"combobox\"\n aria-expanded=\"true\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n [placeholder]=\"placeholder() ?? i18n.commandPlaceholder\"\n [value]=\"query()\"\n (input)=\"onSearch($event)\"\n />\n <ngx-ds-kbd size=\"sm\">Esc</ngx-ds-kbd>\n </div>\n\n <!-- Results -->\n <div class=\"cp__results\" role=\"listbox\" [attr.id]=\"listboxId\">\n @if (filteredItems().length === 0) {\n <div class=\"cp__empty\">{{ i18n.noResultsFor(query()) }}</div>\n } @else {\n @for (group of categories(); track group.cat) {\n @if (group.cat) {\n <p class=\"cp__category\" role=\"presentation\">{{ group.cat }}</p>\n }\n @for (item of group.items; track item.id) {\n <button\n type=\"button\"\n class=\"cp__item\"\n role=\"option\"\n [attr.id]=\"optionId(item)\"\n [attr.aria-selected]=\"isActive(item)\"\n [class.cp__item--active]=\"isActive(item)\"\n [class.cp__item--disabled]=\"item.disabled\"\n [disabled]=\"item.disabled || null\"\n (click)=\"selectItem(item)\"\n >\n <span class=\"cp__item-body\">\n <span class=\"cp__item-label\">{{ item.label }}</span>\n @if (item.description) {\n <span class=\"cp__item-desc\">{{ item.description }}</span>\n }\n </span>\n @if (item.kbd?.length) {\n <span class=\"cp__item-kbd\">\n @for (k of item.kbd!; track k) {\n <ngx-ds-kbd size=\"sm\">{{ k }}</ngx-ds-kbd>\n }\n </span>\n }\n </button>\n }\n }\n }\n </div>\n\n <!-- Footer -->\n <div class=\"cp__footer\">\n <span\n ><ngx-ds-kbd size=\"sm\">\u2191</ngx-ds-kbd> <ngx-ds-kbd size=\"sm\">\u2193</ngx-ds-kbd>\n {{ i18n.hintNavigate }}</span\n >\n <span><ngx-ds-kbd size=\"sm\">\u21B5</ngx-ds-kbd> {{ i18n.hintSelect }}</span>\n <span><ngx-ds-kbd size=\"sm\">Esc</ngx-ds-kbd> {{ i18n.hintClose }}</span>\n </div>\n </div>\n}\n", styles: [":host{font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.cp__backdrop{position:fixed;inset:0;background:#00000073;z-index:9000;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:cpFadeIn .1s ease}.cp__dialog{position:fixed;top:15vh;left:50%;transform:translate(-50%);width:min(640px,92vw);background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.875rem;box-shadow:0 20px 60px #0003;z-index:9001;overflow:hidden;animation:cpSlideIn .15s ease}@keyframes cpFadeIn{0%{opacity:0}to{opacity:1}}@keyframes cpSlideIn{0%{opacity:0;transform:translate(-50%) translateY(-.5rem) scale(.97)}to{opacity:1;transform:translate(-50%) translateY(0) scale(1)}}.cp__search-row{display:flex;align-items:center;gap:.75rem;padding:1rem;border-bottom:1px solid var(--border-base, #e5e7eb)}.cp__search-icon{color:var(--text-placeholder, #
|
|
6764
|
+
args: [{ selector: 'ngx-ds-command-palette', standalone: true, imports: [IconComponent, KbdComponent, FocusTrapDirective], changeDetection: ChangeDetectionStrategy.OnPush, host: { '(document:keydown)': 'onKeydown($event)' }, template: "@if (open()) {\n <!-- Backdrop -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- backdrop click is a mouse shortcut; keyboard users close with Escape -->\n <div class=\"cp__backdrop\" (click)=\"close()\"></div>\n\n <!-- Dialog -->\n <div\n class=\"cp__dialog\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"i18n.commandPalette\"\n ngxFocusTrap\n tabindex=\"-1\"\n >\n <!-- Search bar -->\n <div class=\"cp__search-row\">\n <ngx-ds-icon [icon]=\"SearchIcon\" [size]=\"18\" class=\"cp__search-icon\" />\n <input\n type=\"text\"\n class=\"cp__search-input\"\n role=\"combobox\"\n aria-expanded=\"true\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n [placeholder]=\"placeholder() ?? i18n.commandPlaceholder\"\n [value]=\"query()\"\n (input)=\"onSearch($event)\"\n />\n <ngx-ds-kbd size=\"sm\">Esc</ngx-ds-kbd>\n </div>\n\n <!-- Results -->\n <div class=\"cp__results\" role=\"listbox\" [attr.id]=\"listboxId\">\n @if (filteredItems().length === 0) {\n <div class=\"cp__empty\">{{ i18n.noResultsFor(query()) }}</div>\n } @else {\n @for (group of categories(); track group.cat) {\n @if (group.cat) {\n <p class=\"cp__category\" role=\"presentation\">{{ group.cat }}</p>\n }\n @for (item of group.items; track item.id) {\n <button\n type=\"button\"\n class=\"cp__item\"\n role=\"option\"\n [attr.id]=\"optionId(item)\"\n [attr.aria-selected]=\"isActive(item)\"\n [class.cp__item--active]=\"isActive(item)\"\n [class.cp__item--disabled]=\"item.disabled\"\n [disabled]=\"item.disabled || null\"\n (click)=\"selectItem(item)\"\n >\n <span class=\"cp__item-body\">\n <span class=\"cp__item-label\">{{ item.label }}</span>\n @if (item.description) {\n <span class=\"cp__item-desc\">{{ item.description }}</span>\n }\n </span>\n @if (item.kbd?.length) {\n <span class=\"cp__item-kbd\">\n @for (k of item.kbd!; track k) {\n <ngx-ds-kbd size=\"sm\">{{ k }}</ngx-ds-kbd>\n }\n </span>\n }\n </button>\n }\n }\n }\n </div>\n\n <!-- Footer -->\n <div class=\"cp__footer\">\n <span\n ><ngx-ds-kbd size=\"sm\">\u2191</ngx-ds-kbd> <ngx-ds-kbd size=\"sm\">\u2193</ngx-ds-kbd>\n {{ i18n.hintNavigate }}</span\n >\n <span><ngx-ds-kbd size=\"sm\">\u21B5</ngx-ds-kbd> {{ i18n.hintSelect }}</span>\n <span><ngx-ds-kbd size=\"sm\">Esc</ngx-ds-kbd> {{ i18n.hintClose }}</span>\n </div>\n </div>\n}\n", styles: [":host{font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.cp__backdrop{position:fixed;inset:0;background:#00000073;z-index:9000;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:cpFadeIn .1s ease}.cp__dialog{position:fixed;top:15vh;left:50%;transform:translate(-50%);width:min(640px,92vw);background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.875rem;box-shadow:0 20px 60px #0003;z-index:9001;overflow:hidden;animation:cpSlideIn .15s ease}@keyframes cpFadeIn{0%{opacity:0}to{opacity:1}}@keyframes cpSlideIn{0%{opacity:0;transform:translate(-50%) translateY(-.5rem) scale(.97)}to{opacity:1;transform:translate(-50%) translateY(0) scale(1)}}.cp__search-row{display:flex;align-items:center;gap:.75rem;padding:1rem;border-bottom:1px solid var(--border-base, #e5e7eb)}.cp__search-icon{color:var(--text-placeholder, #6b7280);flex-shrink:0}.cp__search-input{flex:1;border:none;outline:none;font-family:inherit;font-size:1rem;color:var(--text-base, #111827);background:transparent}.cp__search-input::placeholder{color:var(--text-placeholder, #6b7280)}.cp__results{max-height:22rem;overflow-y:auto;padding:.375rem}.cp__category{margin:.5rem .375rem .25rem;font-size:.75rem;font-weight:600;color:var(--text-placeholder, #6b7280);letter-spacing:.05em;text-transform:uppercase}.cp__item{display:flex;align-items:center;width:100%;text-align:left;background:transparent;border:none;border-radius:.5rem;padding:.625rem .75rem;cursor:pointer;font-family:inherit;transition:background .1s ease;gap:.75rem}.cp__item:hover:not(:disabled),.cp__item--active{background:var(--surface-hover, #f3f4f6)}.cp__item--disabled{opacity:.4;cursor:not-allowed}.cp__item-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.cp__item-label{font-size:.9375rem;color:var(--text-base, #111827);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cp__item-desc{font-size:.8125rem;color:var(--text-placeholder, #6b7280)}.cp__item-kbd{display:flex;gap:.25rem;flex-shrink:0}.cp__empty{padding:2rem;text-align:center;font-size:.9375rem;color:var(--text-placeholder, #6b7280)}.cp__footer{display:flex;align-items:center;gap:1.25rem;padding:.625rem 1rem;border-top:1px solid var(--border-base, #e5e7eb);font-size:.75rem;color:var(--text-placeholder, #6b7280)}.cp__footer span{display:inline-flex;align-items:center;gap:.25rem}\n"] }]
|
|
5997
6765
|
}], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], openShortcut: [{ type: i0.Input, args: [{ isSignal: true, alias: "openShortcut", required: false }] }], itemSelect: [{ type: i0.Output, args: ["itemSelect"] }] } });
|
|
5998
6766
|
|
|
5999
6767
|
const TYPE_ICONS = {
|
|
@@ -6052,11 +6820,11 @@ class NotificationItemComponent {
|
|
|
6052
6820
|
this.action.emit(this.notification());
|
|
6053
6821
|
}
|
|
6054
6822
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: NotificationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6055
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: NotificationItemComponent, isStandalone: true, selector: "ngx-ds-notification-item", inputs: { notification: { classPropertyName: "notification", publicName: "notification", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { markRead: "markRead", dismiss: "dismiss", action: "action" }, ngImport: i0, template: "<div [class]=\"hostClasses()\" tabindex=\"0\" (click)=\"onMarkRead()\" (keydown.enter)=\"onMarkRead()\">\n <!-- Unread dot -->\n @if (!notification().read) {\n <span class=\"notif-item__dot\" [attr.aria-label]=\"i18n.unread\"></span>\n }\n\n <!-- Type icon -->\n <div class=\"notif-item__icon-wrap\">\n <ngx-ds-icon [icon]=\"typeIcon()\" [size]=\"18\" class=\"notif-item__icon\" />\n </div>\n\n <!-- Content -->\n <div class=\"notif-item__body\">\n <p class=\"notif-item__title\">{{ notification().title }}</p>\n\n @if (notification().description) {\n <p class=\"notif-item__desc\">{{ notification().description }}</p>\n }\n\n <div class=\"notif-item__meta\">\n @if (timeLabel()) {\n <span class=\"notif-item__time\">{{ timeLabel() }}</span>\n }\n\n @if (notification().actionLabel) {\n <ngx-ds-button variant=\"outline\" size=\"sm\" color=\"primary\" (click)=\"onAction($event)\">\n {{ notification().actionLabel }}\n </ngx-ds-button>\n }\n </div>\n </div>\n\n <!-- Dismiss -->\n <ngx-ds-icon-button\n class=\"notif-item__dismiss\"\n [icon]=\"XIcon\"\n [ariaLabel]=\"i18n.dismissNotification\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n [bordered]=\"false\"\n (click)=\"onDismiss($event)\"\n />\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.notif-item{display:flex;align-items:flex-start;gap:.625rem;padding:.75rem 1rem;position:relative;cursor:pointer;transition:background .12s ease;border-bottom:1px solid var(--border-subtle, #f3f4f6)}.notif-item:last-child{border-bottom:none}.notif-item:hover{background:var(--surface-subtle, #f9fafb)}.notif-item--unread{background:var(--surface-subtle, #fafafa)}.notif-item__dot{position:absolute;top:1rem;left:.375rem;width:.5rem;height:.5rem;border-radius:50%;background:var(--primary-500, #6366f1);flex-shrink:0}.notif-item__icon-wrap{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:50%;flex-shrink:0;margin-top:.125rem}.notif-item--info .notif-item__icon-wrap{background:var(--info-100, #dbeafe)}.notif-item--success .notif-item__icon-wrap{background:var(--success-100, #d1fae5)}.notif-item--warning .notif-item__icon-wrap{background:var(--warning-100, #fef3c7)}.notif-item--error .notif-item__icon-wrap{background:var(--danger-100, #fee2e2)}.notif-item__icon{display:flex}.notif-item--info .notif-item__icon{color:var(--info-600, #2563eb)}.notif-item--success .notif-item__icon{color:var(--success-600, #059669)}.notif-item--warning .notif-item__icon{color:var(--warning-600, #d97706)}.notif-item--error .notif-item__icon{color:var(--danger-600, #dc2626)}.notif-item__body{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.notif-item__title{margin:0;font-size:.875rem;font-weight:500;color:var(--text-base, #111827);white-space:normal;line-height:1.4}.notif-item--unread .notif-item__title{font-weight:600}.notif-item__desc{margin:0;font-size:.8125rem;color:var(--text-muted, #6b7280);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.notif-item__meta{display:flex;align-items:center;gap:.75rem;margin-top:.25rem}.notif-item__time{font-size:.75rem;color:var(--text-placeholder, #
|
|
6823
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: NotificationItemComponent, isStandalone: true, selector: "ngx-ds-notification-item", inputs: { notification: { classPropertyName: "notification", publicName: "notification", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { markRead: "markRead", dismiss: "dismiss", action: "action" }, ngImport: i0, template: "<div [class]=\"hostClasses()\" tabindex=\"0\" (click)=\"onMarkRead()\" (keydown.enter)=\"onMarkRead()\">\n <!-- Unread dot -->\n @if (!notification().read) {\n <span class=\"notif-item__dot\" [attr.aria-label]=\"i18n.unread\"></span>\n }\n\n <!-- Type icon -->\n <div class=\"notif-item__icon-wrap\">\n <ngx-ds-icon [icon]=\"typeIcon()\" [size]=\"18\" class=\"notif-item__icon\" />\n </div>\n\n <!-- Content -->\n <div class=\"notif-item__body\">\n <p class=\"notif-item__title\">{{ notification().title }}</p>\n\n @if (notification().description) {\n <p class=\"notif-item__desc\">{{ notification().description }}</p>\n }\n\n <div class=\"notif-item__meta\">\n @if (timeLabel()) {\n <span class=\"notif-item__time\">{{ timeLabel() }}</span>\n }\n\n @if (notification().actionLabel) {\n <ngx-ds-button variant=\"outline\" size=\"sm\" color=\"primary\" (click)=\"onAction($event)\">\n {{ notification().actionLabel }}\n </ngx-ds-button>\n }\n </div>\n </div>\n\n <!-- Dismiss -->\n <ngx-ds-icon-button\n class=\"notif-item__dismiss\"\n [icon]=\"XIcon\"\n [ariaLabel]=\"i18n.dismissNotification\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n [bordered]=\"false\"\n (click)=\"onDismiss($event)\"\n />\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.notif-item{display:flex;align-items:flex-start;gap:.625rem;padding:.75rem 1rem;position:relative;cursor:pointer;transition:background .12s ease;border-bottom:1px solid var(--border-subtle, #f3f4f6)}.notif-item:last-child{border-bottom:none}.notif-item:hover{background:var(--surface-subtle, #f9fafb)}.notif-item--unread{background:var(--surface-subtle, #fafafa)}.notif-item__dot{position:absolute;top:1rem;left:.375rem;width:.5rem;height:.5rem;border-radius:50%;background:var(--primary-500, #6366f1);flex-shrink:0}.notif-item__icon-wrap{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:50%;flex-shrink:0;margin-top:.125rem}.notif-item--info .notif-item__icon-wrap{background:var(--info-100, #dbeafe)}.notif-item--success .notif-item__icon-wrap{background:var(--success-100, #d1fae5)}.notif-item--warning .notif-item__icon-wrap{background:var(--warning-100, #fef3c7)}.notif-item--error .notif-item__icon-wrap{background:var(--danger-100, #fee2e2)}.notif-item__icon{display:flex}.notif-item--info .notif-item__icon{color:var(--info-600, #2563eb)}.notif-item--success .notif-item__icon{color:var(--success-600, #059669)}.notif-item--warning .notif-item__icon{color:var(--warning-600, #d97706)}.notif-item--error .notif-item__icon{color:var(--danger-600, #dc2626)}.notif-item__body{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.notif-item__title{margin:0;font-size:.875rem;font-weight:500;color:var(--text-base, #111827);white-space:normal;line-height:1.4}.notif-item--unread .notif-item__title{font-weight:600}.notif-item__desc{margin:0;font-size:.8125rem;color:var(--text-muted, #6b7280);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.notif-item__meta{display:flex;align-items:center;gap:.75rem;margin-top:.25rem}.notif-item__time{font-size:.75rem;color:var(--text-placeholder, #6b7280)}.notif-item__dismiss{flex-shrink:0;opacity:0;transition:opacity .1s ease}.notif-item:hover .notif-item__dismiss{opacity:1}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "ngx-ds-button", inputs: ["variant", "size", "color", "iconLeft", "iconRight", "disabled", "loading", "rounded", "type", "ariaLabel"] }, { kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }, { kind: "component", type: IconButtonComponent, selector: "ngx-ds-icon-button", inputs: ["icon", "ariaLabel", "variant", "size", "color", "rounded", "bordered", "disabled", "type"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6056
6824
|
}
|
|
6057
6825
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: NotificationItemComponent, decorators: [{
|
|
6058
6826
|
type: Component,
|
|
6059
|
-
args: [{ selector: 'ngx-ds-notification-item', standalone: true, imports: [ButtonComponent, IconComponent, IconButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"hostClasses()\" tabindex=\"0\" (click)=\"onMarkRead()\" (keydown.enter)=\"onMarkRead()\">\n <!-- Unread dot -->\n @if (!notification().read) {\n <span class=\"notif-item__dot\" [attr.aria-label]=\"i18n.unread\"></span>\n }\n\n <!-- Type icon -->\n <div class=\"notif-item__icon-wrap\">\n <ngx-ds-icon [icon]=\"typeIcon()\" [size]=\"18\" class=\"notif-item__icon\" />\n </div>\n\n <!-- Content -->\n <div class=\"notif-item__body\">\n <p class=\"notif-item__title\">{{ notification().title }}</p>\n\n @if (notification().description) {\n <p class=\"notif-item__desc\">{{ notification().description }}</p>\n }\n\n <div class=\"notif-item__meta\">\n @if (timeLabel()) {\n <span class=\"notif-item__time\">{{ timeLabel() }}</span>\n }\n\n @if (notification().actionLabel) {\n <ngx-ds-button variant=\"outline\" size=\"sm\" color=\"primary\" (click)=\"onAction($event)\">\n {{ notification().actionLabel }}\n </ngx-ds-button>\n }\n </div>\n </div>\n\n <!-- Dismiss -->\n <ngx-ds-icon-button\n class=\"notif-item__dismiss\"\n [icon]=\"XIcon\"\n [ariaLabel]=\"i18n.dismissNotification\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n [bordered]=\"false\"\n (click)=\"onDismiss($event)\"\n />\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.notif-item{display:flex;align-items:flex-start;gap:.625rem;padding:.75rem 1rem;position:relative;cursor:pointer;transition:background .12s ease;border-bottom:1px solid var(--border-subtle, #f3f4f6)}.notif-item:last-child{border-bottom:none}.notif-item:hover{background:var(--surface-subtle, #f9fafb)}.notif-item--unread{background:var(--surface-subtle, #fafafa)}.notif-item__dot{position:absolute;top:1rem;left:.375rem;width:.5rem;height:.5rem;border-radius:50%;background:var(--primary-500, #6366f1);flex-shrink:0}.notif-item__icon-wrap{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:50%;flex-shrink:0;margin-top:.125rem}.notif-item--info .notif-item__icon-wrap{background:var(--info-100, #dbeafe)}.notif-item--success .notif-item__icon-wrap{background:var(--success-100, #d1fae5)}.notif-item--warning .notif-item__icon-wrap{background:var(--warning-100, #fef3c7)}.notif-item--error .notif-item__icon-wrap{background:var(--danger-100, #fee2e2)}.notif-item__icon{display:flex}.notif-item--info .notif-item__icon{color:var(--info-600, #2563eb)}.notif-item--success .notif-item__icon{color:var(--success-600, #059669)}.notif-item--warning .notif-item__icon{color:var(--warning-600, #d97706)}.notif-item--error .notif-item__icon{color:var(--danger-600, #dc2626)}.notif-item__body{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.notif-item__title{margin:0;font-size:.875rem;font-weight:500;color:var(--text-base, #111827);white-space:normal;line-height:1.4}.notif-item--unread .notif-item__title{font-weight:600}.notif-item__desc{margin:0;font-size:.8125rem;color:var(--text-muted, #6b7280);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.notif-item__meta{display:flex;align-items:center;gap:.75rem;margin-top:.25rem}.notif-item__time{font-size:.75rem;color:var(--text-placeholder, #
|
|
6827
|
+
args: [{ selector: 'ngx-ds-notification-item', standalone: true, imports: [ButtonComponent, IconComponent, IconButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"hostClasses()\" tabindex=\"0\" (click)=\"onMarkRead()\" (keydown.enter)=\"onMarkRead()\">\n <!-- Unread dot -->\n @if (!notification().read) {\n <span class=\"notif-item__dot\" [attr.aria-label]=\"i18n.unread\"></span>\n }\n\n <!-- Type icon -->\n <div class=\"notif-item__icon-wrap\">\n <ngx-ds-icon [icon]=\"typeIcon()\" [size]=\"18\" class=\"notif-item__icon\" />\n </div>\n\n <!-- Content -->\n <div class=\"notif-item__body\">\n <p class=\"notif-item__title\">{{ notification().title }}</p>\n\n @if (notification().description) {\n <p class=\"notif-item__desc\">{{ notification().description }}</p>\n }\n\n <div class=\"notif-item__meta\">\n @if (timeLabel()) {\n <span class=\"notif-item__time\">{{ timeLabel() }}</span>\n }\n\n @if (notification().actionLabel) {\n <ngx-ds-button variant=\"outline\" size=\"sm\" color=\"primary\" (click)=\"onAction($event)\">\n {{ notification().actionLabel }}\n </ngx-ds-button>\n }\n </div>\n </div>\n\n <!-- Dismiss -->\n <ngx-ds-icon-button\n class=\"notif-item__dismiss\"\n [icon]=\"XIcon\"\n [ariaLabel]=\"i18n.dismissNotification\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n [bordered]=\"false\"\n (click)=\"onDismiss($event)\"\n />\n</div>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.notif-item{display:flex;align-items:flex-start;gap:.625rem;padding:.75rem 1rem;position:relative;cursor:pointer;transition:background .12s ease;border-bottom:1px solid var(--border-subtle, #f3f4f6)}.notif-item:last-child{border-bottom:none}.notif-item:hover{background:var(--surface-subtle, #f9fafb)}.notif-item--unread{background:var(--surface-subtle, #fafafa)}.notif-item__dot{position:absolute;top:1rem;left:.375rem;width:.5rem;height:.5rem;border-radius:50%;background:var(--primary-500, #6366f1);flex-shrink:0}.notif-item__icon-wrap{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:50%;flex-shrink:0;margin-top:.125rem}.notif-item--info .notif-item__icon-wrap{background:var(--info-100, #dbeafe)}.notif-item--success .notif-item__icon-wrap{background:var(--success-100, #d1fae5)}.notif-item--warning .notif-item__icon-wrap{background:var(--warning-100, #fef3c7)}.notif-item--error .notif-item__icon-wrap{background:var(--danger-100, #fee2e2)}.notif-item__icon{display:flex}.notif-item--info .notif-item__icon{color:var(--info-600, #2563eb)}.notif-item--success .notif-item__icon{color:var(--success-600, #059669)}.notif-item--warning .notif-item__icon{color:var(--warning-600, #d97706)}.notif-item--error .notif-item__icon{color:var(--danger-600, #dc2626)}.notif-item__body{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.notif-item__title{margin:0;font-size:.875rem;font-weight:500;color:var(--text-base, #111827);white-space:normal;line-height:1.4}.notif-item--unread .notif-item__title{font-weight:600}.notif-item__desc{margin:0;font-size:.8125rem;color:var(--text-muted, #6b7280);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.notif-item__meta{display:flex;align-items:center;gap:.75rem;margin-top:.25rem}.notif-item__time{font-size:.75rem;color:var(--text-placeholder, #6b7280)}.notif-item__dismiss{flex-shrink:0;opacity:0;transition:opacity .1s ease}.notif-item:hover .notif-item__dismiss{opacity:1}\n"] }]
|
|
6060
6828
|
}], propDecorators: { notification: [{ type: i0.Input, args: [{ isSignal: true, alias: "notification", required: true }] }], markRead: [{ type: i0.Output, args: ["markRead"] }], dismiss: [{ type: i0.Output, args: ["dismiss"] }], action: [{ type: i0.Output, args: ["action"] }] } });
|
|
6061
6829
|
|
|
6062
6830
|
class NotificationCenterComponent {
|
|
@@ -6123,11 +6891,11 @@ class NotificationCenterComponent {
|
|
|
6123
6891
|
setupEscapeClose(() => this.#open.set(false));
|
|
6124
6892
|
}
|
|
6125
6893
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: NotificationCenterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6126
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: NotificationCenterComponent, isStandalone: true, selector: "ngx-ds-notification-center", inputs: { notifications: { classPropertyName: "notifications", publicName: "notifications", isSignal: true, isRequired: false, transformFunction: null }, panelTitle: { classPropertyName: "panelTitle", publicName: "panelTitle", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { markRead: "markRead", markAllRead: "markAllRead", dismiss: "dismiss", dismissAll: "dismissAll", action: "action" }, ngImport: i0, template: "<div class=\"nc\">\n <!-- \u2500\u2500 Bell trigger \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <div class=\"nc__bell-wrap\">\n <ngx-ds-icon-button\n [icon]=\"BellIcon\"\n [ariaLabel]=\"\n i18n.notifications + (unreadCount() > 0 ? ', ' + i18n.unreadCount(unreadCount()) : '')\n \"\n variant=\"outline\"\n [color]=\"isOpen() || hasUnread() ? 'primary' : 'secondary'\"\n size=\"md\"\n (click)=\"togglePanel()\"\n />\n @if (badgeLabel()) {\n <span class=\"nc__badge\">{{ badgeLabel() }}</span>\n }\n </div>\n\n <!-- \u2500\u2500 Panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n @if (isOpen()) {\n <div [class]=\"panelClasses()\" role=\"dialog\" [attr.aria-label]=\"i18n.notificationCenter\">\n <!-- Header -->\n <div class=\"nc__header\">\n <h3 class=\"nc__title\">{{ panelTitle() ?? i18n.notifications }}</h3>\n @if (unreadCount() > 0) {\n <span class=\"nc__unread-pill\">{{ i18n.unreadCount(unreadCount()) }}</span>\n }\n <div class=\"nc__header-actions\">\n @if (hasUnread()) {\n <ngx-ds-button variant=\"outline\" size=\"sm\" color=\"primary\" (click)=\"onMarkAllRead()\">\n {{ i18n.markAllRead }}\n </ngx-ds-button>\n }\n @if (notifications().length > 0) {\n <ngx-ds-button variant=\"outline\" size=\"sm\" color=\"danger\" (click)=\"onDismissAll()\">\n {{ i18n.clearAll }}\n </ngx-ds-button>\n }\n </div>\n </div>\n\n <!-- Filter tabs -->\n <div class=\"nc__filters\" role=\"tablist\">\n <ngx-ds-button\n role=\"tab\"\n [variant]=\"filter() === 'all' ? 'solid' : 'outline'\"\n [color]=\"filter() === 'all' ? 'primary' : 'secondary'\"\n size=\"sm\"\n (click)=\"setFilter('all')\"\n >\n {{ i18n.filterAll }}\n @if (notifications().length > 0) {\n <span class=\"nc__filter-count\">{{ notifications().length }}</span>\n }\n </ngx-ds-button>\n <ngx-ds-button\n role=\"tab\"\n [variant]=\"filter() === 'unread' ? 'solid' : 'outline'\"\n [color]=\"filter() === 'unread' ? 'primary' : 'secondary'\"\n size=\"sm\"\n (click)=\"setFilter('unread')\"\n >\n {{ i18n.filterUnread }}\n @if (unreadCount() > 0) {\n <span class=\"nc__filter-count\">{{ unreadCount() }}</span>\n }\n </ngx-ds-button>\n </div>\n\n <!-- List -->\n <div class=\"nc__list\" [style.maxHeight]=\"maxHeight()\">\n @if (isEmpty()) {\n <ngx-ds-empty-state\n [icon]=\"BellOffIcon\"\n [title]=\"filter() === 'unread' ? i18n.emptyUnread : i18n.emptyNotifications\"\n [description]=\"\n filter() === 'unread'\n ? i18n.emptyUnreadDescription\n : i18n.emptyNotificationsDescription\n \"\n size=\"sm\"\n />\n } @else {\n @for (n of displayedNotifications(); track n.id) {\n <ngx-ds-notification-item\n [notification]=\"n\"\n (markRead)=\"onMarkRead($event)\"\n (dismiss)=\"onDismiss($event)\"\n (action)=\"onAction($event)\"\n />\n }\n }\n </div>\n </div>\n }\n</div>\n", styles: [":host{display:inline-block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.nc{position:relative;display:inline-block}.nc__bell-wrap{position:relative;display:inline-flex}.nc__badge{position:absolute;top:-.35rem;right:-.35rem;min-width:1.125rem;height:1.125rem;padding:0 .25rem;background:var(--danger
|
|
6894
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: NotificationCenterComponent, isStandalone: true, selector: "ngx-ds-notification-center", inputs: { notifications: { classPropertyName: "notifications", publicName: "notifications", isSignal: true, isRequired: false, transformFunction: null }, panelTitle: { classPropertyName: "panelTitle", publicName: "panelTitle", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { markRead: "markRead", markAllRead: "markAllRead", dismiss: "dismiss", dismissAll: "dismissAll", action: "action" }, ngImport: i0, template: "<div class=\"nc\">\n <!-- \u2500\u2500 Bell trigger \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <div class=\"nc__bell-wrap\">\n <ngx-ds-icon-button\n [icon]=\"BellIcon\"\n [ariaLabel]=\"\n i18n.notifications + (unreadCount() > 0 ? ', ' + i18n.unreadCount(unreadCount()) : '')\n \"\n variant=\"outline\"\n [color]=\"isOpen() || hasUnread() ? 'primary' : 'secondary'\"\n size=\"md\"\n (click)=\"togglePanel()\"\n />\n @if (badgeLabel()) {\n <span class=\"nc__badge\">{{ badgeLabel() }}</span>\n }\n </div>\n\n <!-- \u2500\u2500 Panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n @if (isOpen()) {\n <div [class]=\"panelClasses()\" role=\"dialog\" [attr.aria-label]=\"i18n.notificationCenter\">\n <!-- Header -->\n <div class=\"nc__header\">\n <h3 class=\"nc__title\">{{ panelTitle() ?? i18n.notifications }}</h3>\n @if (unreadCount() > 0) {\n <span class=\"nc__unread-pill\">{{ i18n.unreadCount(unreadCount()) }}</span>\n }\n <div class=\"nc__header-actions\">\n @if (hasUnread()) {\n <ngx-ds-button variant=\"outline\" size=\"sm\" color=\"primary\" (click)=\"onMarkAllRead()\">\n {{ i18n.markAllRead }}\n </ngx-ds-button>\n }\n @if (notifications().length > 0) {\n <ngx-ds-button variant=\"outline\" size=\"sm\" color=\"danger\" (click)=\"onDismissAll()\">\n {{ i18n.clearAll }}\n </ngx-ds-button>\n }\n </div>\n </div>\n\n <!-- Filter tabs -->\n <div class=\"nc__filters\" role=\"tablist\">\n <ngx-ds-button\n role=\"tab\"\n [variant]=\"filter() === 'all' ? 'solid' : 'outline'\"\n [color]=\"filter() === 'all' ? 'primary' : 'secondary'\"\n size=\"sm\"\n (click)=\"setFilter('all')\"\n >\n {{ i18n.filterAll }}\n @if (notifications().length > 0) {\n <span class=\"nc__filter-count\">{{ notifications().length }}</span>\n }\n </ngx-ds-button>\n <ngx-ds-button\n role=\"tab\"\n [variant]=\"filter() === 'unread' ? 'solid' : 'outline'\"\n [color]=\"filter() === 'unread' ? 'primary' : 'secondary'\"\n size=\"sm\"\n (click)=\"setFilter('unread')\"\n >\n {{ i18n.filterUnread }}\n @if (unreadCount() > 0) {\n <span class=\"nc__filter-count\">{{ unreadCount() }}</span>\n }\n </ngx-ds-button>\n </div>\n\n <!-- List -->\n <div class=\"nc__list\" [style.maxHeight]=\"maxHeight()\">\n @if (isEmpty()) {\n <ngx-ds-empty-state\n [icon]=\"BellOffIcon\"\n [title]=\"filter() === 'unread' ? i18n.emptyUnread : i18n.emptyNotifications\"\n [description]=\"\n filter() === 'unread'\n ? i18n.emptyUnreadDescription\n : i18n.emptyNotificationsDescription\n \"\n size=\"sm\"\n />\n } @else {\n @for (n of displayedNotifications(); track n.id) {\n <ngx-ds-notification-item\n [notification]=\"n\"\n (markRead)=\"onMarkRead($event)\"\n (dismiss)=\"onDismiss($event)\"\n (action)=\"onAction($event)\"\n />\n }\n }\n </div>\n </div>\n }\n</div>\n", styles: [":host{display:inline-block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.nc{position:relative;display:inline-block}.nc__bell-wrap{position:relative;display:inline-flex}.nc__badge{position:absolute;top:-.35rem;right:-.35rem;min-width:1.125rem;height:1.125rem;padding:0 .25rem;background:var(--fill-danger, #dc2626);color:var(--text-on-color, #fff);border-radius:999px;font-size:.625rem;font-weight:700;display:flex;align-items:center;justify-content:center;line-height:1;border:2px solid var(--surface-base, #ffffff);box-sizing:border-box}.nc__panel{position:absolute;top:calc(100% + .5rem);width:24rem;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.875rem;box-shadow:0 8px 32px #0000001f;z-index:1000;overflow:hidden;animation:ncSlideIn .15s ease}.nc__panel--bottom-end{right:0}.nc__panel--bottom-start{left:0}@keyframes ncSlideIn{0%{opacity:0;transform:translateY(-.375rem) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.nc__header{display:flex;align-items:center;gap:.5rem;padding:1rem 1rem .625rem;border-bottom:1px solid var(--border-subtle, #f3f4f6)}.nc__title{margin:0;font-size:.9375rem;font-weight:600;color:var(--text-base, #111827);flex:1}.nc__unread-pill{font-size:.7rem;font-weight:700;background:var(--primary-100, #e0e7ff);color:var(--primary-700, #4338ca);border-radius:999px;padding:.1rem .5rem;white-space:nowrap}.nc__header-actions{display:flex;align-items:center;gap:.25rem}.nc__filters{display:flex;gap:.25rem;padding:.375rem .75rem;border-bottom:1px solid var(--border-subtle, #f3f4f6)}.nc__filter-count{display:inline-flex;align-items:center;justify-content:center;min-width:1.25rem;height:1.25rem;padding:0 .25rem;border-radius:999px;font-size:.7rem;font-weight:700;background:color-mix(in srgb,currentColor 15%,transparent);margin-left:.25rem}.nc__list{overflow-y:auto}.nc__list ngx-ds-empty-state{padding:1.5rem}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "ngx-ds-button", inputs: ["variant", "size", "color", "iconLeft", "iconRight", "disabled", "loading", "rounded", "type", "ariaLabel"] }, { kind: "component", type: IconButtonComponent, selector: "ngx-ds-icon-button", inputs: ["icon", "ariaLabel", "variant", "size", "color", "rounded", "bordered", "disabled", "type"] }, { kind: "component", type: EmptyStateComponent, selector: "ngx-ds-empty-state", inputs: ["icon", "title", "description", "size"] }, { kind: "component", type: NotificationItemComponent, selector: "ngx-ds-notification-item", inputs: ["notification"], outputs: ["markRead", "dismiss", "action"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6127
6895
|
}
|
|
6128
6896
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: NotificationCenterComponent, decorators: [{
|
|
6129
6897
|
type: Component,
|
|
6130
|
-
args: [{ selector: 'ngx-ds-notification-center', standalone: true, imports: [ButtonComponent, IconButtonComponent, EmptyStateComponent, NotificationItemComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"nc\">\n <!-- \u2500\u2500 Bell trigger \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <div class=\"nc__bell-wrap\">\n <ngx-ds-icon-button\n [icon]=\"BellIcon\"\n [ariaLabel]=\"\n i18n.notifications + (unreadCount() > 0 ? ', ' + i18n.unreadCount(unreadCount()) : '')\n \"\n variant=\"outline\"\n [color]=\"isOpen() || hasUnread() ? 'primary' : 'secondary'\"\n size=\"md\"\n (click)=\"togglePanel()\"\n />\n @if (badgeLabel()) {\n <span class=\"nc__badge\">{{ badgeLabel() }}</span>\n }\n </div>\n\n <!-- \u2500\u2500 Panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n @if (isOpen()) {\n <div [class]=\"panelClasses()\" role=\"dialog\" [attr.aria-label]=\"i18n.notificationCenter\">\n <!-- Header -->\n <div class=\"nc__header\">\n <h3 class=\"nc__title\">{{ panelTitle() ?? i18n.notifications }}</h3>\n @if (unreadCount() > 0) {\n <span class=\"nc__unread-pill\">{{ i18n.unreadCount(unreadCount()) }}</span>\n }\n <div class=\"nc__header-actions\">\n @if (hasUnread()) {\n <ngx-ds-button variant=\"outline\" size=\"sm\" color=\"primary\" (click)=\"onMarkAllRead()\">\n {{ i18n.markAllRead }}\n </ngx-ds-button>\n }\n @if (notifications().length > 0) {\n <ngx-ds-button variant=\"outline\" size=\"sm\" color=\"danger\" (click)=\"onDismissAll()\">\n {{ i18n.clearAll }}\n </ngx-ds-button>\n }\n </div>\n </div>\n\n <!-- Filter tabs -->\n <div class=\"nc__filters\" role=\"tablist\">\n <ngx-ds-button\n role=\"tab\"\n [variant]=\"filter() === 'all' ? 'solid' : 'outline'\"\n [color]=\"filter() === 'all' ? 'primary' : 'secondary'\"\n size=\"sm\"\n (click)=\"setFilter('all')\"\n >\n {{ i18n.filterAll }}\n @if (notifications().length > 0) {\n <span class=\"nc__filter-count\">{{ notifications().length }}</span>\n }\n </ngx-ds-button>\n <ngx-ds-button\n role=\"tab\"\n [variant]=\"filter() === 'unread' ? 'solid' : 'outline'\"\n [color]=\"filter() === 'unread' ? 'primary' : 'secondary'\"\n size=\"sm\"\n (click)=\"setFilter('unread')\"\n >\n {{ i18n.filterUnread }}\n @if (unreadCount() > 0) {\n <span class=\"nc__filter-count\">{{ unreadCount() }}</span>\n }\n </ngx-ds-button>\n </div>\n\n <!-- List -->\n <div class=\"nc__list\" [style.maxHeight]=\"maxHeight()\">\n @if (isEmpty()) {\n <ngx-ds-empty-state\n [icon]=\"BellOffIcon\"\n [title]=\"filter() === 'unread' ? i18n.emptyUnread : i18n.emptyNotifications\"\n [description]=\"\n filter() === 'unread'\n ? i18n.emptyUnreadDescription\n : i18n.emptyNotificationsDescription\n \"\n size=\"sm\"\n />\n } @else {\n @for (n of displayedNotifications(); track n.id) {\n <ngx-ds-notification-item\n [notification]=\"n\"\n (markRead)=\"onMarkRead($event)\"\n (dismiss)=\"onDismiss($event)\"\n (action)=\"onAction($event)\"\n />\n }\n }\n </div>\n </div>\n }\n</div>\n", styles: [":host{display:inline-block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.nc{position:relative;display:inline-block}.nc__bell-wrap{position:relative;display:inline-flex}.nc__badge{position:absolute;top:-.35rem;right:-.35rem;min-width:1.125rem;height:1.125rem;padding:0 .25rem;background:var(--danger
|
|
6898
|
+
args: [{ selector: 'ngx-ds-notification-center', standalone: true, imports: [ButtonComponent, IconButtonComponent, EmptyStateComponent, NotificationItemComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"nc\">\n <!-- \u2500\u2500 Bell trigger \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <div class=\"nc__bell-wrap\">\n <ngx-ds-icon-button\n [icon]=\"BellIcon\"\n [ariaLabel]=\"\n i18n.notifications + (unreadCount() > 0 ? ', ' + i18n.unreadCount(unreadCount()) : '')\n \"\n variant=\"outline\"\n [color]=\"isOpen() || hasUnread() ? 'primary' : 'secondary'\"\n size=\"md\"\n (click)=\"togglePanel()\"\n />\n @if (badgeLabel()) {\n <span class=\"nc__badge\">{{ badgeLabel() }}</span>\n }\n </div>\n\n <!-- \u2500\u2500 Panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n @if (isOpen()) {\n <div [class]=\"panelClasses()\" role=\"dialog\" [attr.aria-label]=\"i18n.notificationCenter\">\n <!-- Header -->\n <div class=\"nc__header\">\n <h3 class=\"nc__title\">{{ panelTitle() ?? i18n.notifications }}</h3>\n @if (unreadCount() > 0) {\n <span class=\"nc__unread-pill\">{{ i18n.unreadCount(unreadCount()) }}</span>\n }\n <div class=\"nc__header-actions\">\n @if (hasUnread()) {\n <ngx-ds-button variant=\"outline\" size=\"sm\" color=\"primary\" (click)=\"onMarkAllRead()\">\n {{ i18n.markAllRead }}\n </ngx-ds-button>\n }\n @if (notifications().length > 0) {\n <ngx-ds-button variant=\"outline\" size=\"sm\" color=\"danger\" (click)=\"onDismissAll()\">\n {{ i18n.clearAll }}\n </ngx-ds-button>\n }\n </div>\n </div>\n\n <!-- Filter tabs -->\n <div class=\"nc__filters\" role=\"tablist\">\n <ngx-ds-button\n role=\"tab\"\n [variant]=\"filter() === 'all' ? 'solid' : 'outline'\"\n [color]=\"filter() === 'all' ? 'primary' : 'secondary'\"\n size=\"sm\"\n (click)=\"setFilter('all')\"\n >\n {{ i18n.filterAll }}\n @if (notifications().length > 0) {\n <span class=\"nc__filter-count\">{{ notifications().length }}</span>\n }\n </ngx-ds-button>\n <ngx-ds-button\n role=\"tab\"\n [variant]=\"filter() === 'unread' ? 'solid' : 'outline'\"\n [color]=\"filter() === 'unread' ? 'primary' : 'secondary'\"\n size=\"sm\"\n (click)=\"setFilter('unread')\"\n >\n {{ i18n.filterUnread }}\n @if (unreadCount() > 0) {\n <span class=\"nc__filter-count\">{{ unreadCount() }}</span>\n }\n </ngx-ds-button>\n </div>\n\n <!-- List -->\n <div class=\"nc__list\" [style.maxHeight]=\"maxHeight()\">\n @if (isEmpty()) {\n <ngx-ds-empty-state\n [icon]=\"BellOffIcon\"\n [title]=\"filter() === 'unread' ? i18n.emptyUnread : i18n.emptyNotifications\"\n [description]=\"\n filter() === 'unread'\n ? i18n.emptyUnreadDescription\n : i18n.emptyNotificationsDescription\n \"\n size=\"sm\"\n />\n } @else {\n @for (n of displayedNotifications(); track n.id) {\n <ngx-ds-notification-item\n [notification]=\"n\"\n (markRead)=\"onMarkRead($event)\"\n (dismiss)=\"onDismiss($event)\"\n (action)=\"onAction($event)\"\n />\n }\n }\n </div>\n </div>\n }\n</div>\n", styles: [":host{display:inline-block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.nc{position:relative;display:inline-block}.nc__bell-wrap{position:relative;display:inline-flex}.nc__badge{position:absolute;top:-.35rem;right:-.35rem;min-width:1.125rem;height:1.125rem;padding:0 .25rem;background:var(--fill-danger, #dc2626);color:var(--text-on-color, #fff);border-radius:999px;font-size:.625rem;font-weight:700;display:flex;align-items:center;justify-content:center;line-height:1;border:2px solid var(--surface-base, #ffffff);box-sizing:border-box}.nc__panel{position:absolute;top:calc(100% + .5rem);width:24rem;background:var(--surface-base, #ffffff);border:1px solid var(--border-base, #e5e7eb);border-radius:.875rem;box-shadow:0 8px 32px #0000001f;z-index:1000;overflow:hidden;animation:ncSlideIn .15s ease}.nc__panel--bottom-end{right:0}.nc__panel--bottom-start{left:0}@keyframes ncSlideIn{0%{opacity:0;transform:translateY(-.375rem) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.nc__header{display:flex;align-items:center;gap:.5rem;padding:1rem 1rem .625rem;border-bottom:1px solid var(--border-subtle, #f3f4f6)}.nc__title{margin:0;font-size:.9375rem;font-weight:600;color:var(--text-base, #111827);flex:1}.nc__unread-pill{font-size:.7rem;font-weight:700;background:var(--primary-100, #e0e7ff);color:var(--primary-700, #4338ca);border-radius:999px;padding:.1rem .5rem;white-space:nowrap}.nc__header-actions{display:flex;align-items:center;gap:.25rem}.nc__filters{display:flex;gap:.25rem;padding:.375rem .75rem;border-bottom:1px solid var(--border-subtle, #f3f4f6)}.nc__filter-count{display:inline-flex;align-items:center;justify-content:center;min-width:1.25rem;height:1.25rem;padding:0 .25rem;border-radius:999px;font-size:.7rem;font-weight:700;background:color-mix(in srgb,currentColor 15%,transparent);margin-left:.25rem}.nc__list{overflow-y:auto}.nc__list ngx-ds-empty-state{padding:1.5rem}\n"] }]
|
|
6131
6899
|
}], ctorParameters: () => [], propDecorators: { notifications: [{ type: i0.Input, args: [{ isSignal: true, alias: "notifications", required: false }] }], panelTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelTitle", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], markRead: [{ type: i0.Output, args: ["markRead"] }], markAllRead: [{ type: i0.Output, args: ["markAllRead"] }], dismiss: [{ type: i0.Output, args: ["dismiss"] }], dismissAll: [{ type: i0.Output, args: ["dismissAll"] }], action: [{ type: i0.Output, args: ["action"] }] } });
|
|
6132
6900
|
|
|
6133
6901
|
class UserMenuComponent {
|
|
@@ -6144,11 +6912,11 @@ class UserMenuComponent {
|
|
|
6144
6912
|
this.popover().open.set(false);
|
|
6145
6913
|
}
|
|
6146
6914
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UserMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6147
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: UserMenuComponent, isStandalone: true, selector: "ngx-ds-user-menu", inputs: { user: { classPropertyName: "user", publicName: "user", isSignal: true, isRequired: true, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionClick: "actionClick" }, viewQueries: [{ propertyName: "popover", first: true, predicate: PopoverComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<ngx-ds-popover [placement]=\"placement()\">\n <!-- \u2500\u2500 Trigger \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <button popover-trigger type=\"button\" class=\"um__trigger\"
|
|
6915
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: UserMenuComponent, isStandalone: true, selector: "ngx-ds-user-menu", inputs: { user: { classPropertyName: "user", publicName: "user", isSignal: true, isRequired: true, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionClick: "actionClick" }, viewQueries: [{ propertyName: "popover", first: true, predicate: PopoverComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<ngx-ds-popover [placement]=\"placement()\">\n <!-- \u2500\u2500 Trigger \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <!-- Name as hidden text, not aria-label: the visible initials must not mismatch it. -->\n <button popover-trigger type=\"button\" class=\"um__trigger\">\n <span class=\"um__sr-only\">{{ user().name }}</span>\n <ngx-ds-avatar\n [src]=\"user().avatarSrc\"\n [alt]=\"user().name\"\n [initials]=\"user().initials ?? ''\"\n [color]=\"user().avatarColor ?? 'primary'\"\n [size]=\"size()\"\n aria-hidden=\"true\"\n />\n </button>\n\n <!-- \u2500\u2500 Panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <div popover-content class=\"um__panel\">\n <!-- Header: name + email only, no avatar -->\n <div class=\"um__header\">\n <p class=\"um__name\">{{ user().name }}</p>\n <p class=\"um__email\">{{ user().email }}</p>\n </div>\n\n <ngx-ds-divider />\n\n <!-- Action list -->\n <div class=\"um__actions\">\n @for (action of actions(); track action.id; let first = $first) {\n @if (action.separator && !first) {\n <ngx-ds-divider />\n }\n <ngx-ds-menu-button\n [iconLeft]=\"action.icon\"\n [color]=\"action.color ?? 'default'\"\n [disabled]=\"action.disabled ?? false\"\n [fullWidth]=\"true\"\n (click)=\"onAction(action)\"\n >\n {{ action.label }}\n </ngx-ds-menu-button>\n }\n </div>\n </div>\n</ngx-ds-popover>\n", styles: [":host{display:inline-block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.um__sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.um__trigger{display:inline-flex;background:none;border:none;padding:0;cursor:pointer;border-radius:50%;transition:opacity .15s ease}.um__trigger:hover{opacity:.85}.um__trigger:focus-visible{outline:2px solid var(--primary-500, #6366f1);outline-offset:3px}.um__panel{min-width:14rem;padding:.25rem 0}.um__header{padding:.75rem 1rem .625rem;display:flex;flex-direction:column;gap:.125rem}.um__name{margin:0;font-size:.875rem;font-weight:600;color:var(--text-base, #111827);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.um__email{margin:0;font-size:.75rem;color:var(--text-muted, #6b7280);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.um__actions{padding:.25rem .375rem;display:flex;flex-direction:column;gap:.125rem}\n"], dependencies: [{ kind: "component", type: PopoverComponent, selector: "ngx-ds-popover", inputs: ["open", "placement", "closeOnClickOutside", "closeOnEscape", "disabled", "ariaLabel"], outputs: ["openChange", "opened", "closed"] }, { kind: "component", type: AvatarComponent, selector: "ngx-ds-avatar", inputs: ["src", "alt", "initials", "size", "shape", "status", "color", "bordered"] }, { kind: "component", type: MenuButtonComponent, selector: "ngx-ds-menu-button", inputs: ["iconLeft", "iconRight", "color", "size", "disabled", "fullWidth", "type"] }, { kind: "component", type: DividerComponent, selector: "ngx-ds-divider", inputs: ["orientation", "variant", "label", "align", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6148
6916
|
}
|
|
6149
6917
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UserMenuComponent, decorators: [{
|
|
6150
6918
|
type: Component,
|
|
6151
|
-
args: [{ selector: 'ngx-ds-user-menu', standalone: true, imports: [PopoverComponent, AvatarComponent, MenuButtonComponent, DividerComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ngx-ds-popover [placement]=\"placement()\">\n <!-- \u2500\u2500 Trigger \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <button popover-trigger type=\"button\" class=\"um__trigger\"
|
|
6919
|
+
args: [{ selector: 'ngx-ds-user-menu', standalone: true, imports: [PopoverComponent, AvatarComponent, MenuButtonComponent, DividerComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ngx-ds-popover [placement]=\"placement()\">\n <!-- \u2500\u2500 Trigger \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <!-- Name as hidden text, not aria-label: the visible initials must not mismatch it. -->\n <button popover-trigger type=\"button\" class=\"um__trigger\">\n <span class=\"um__sr-only\">{{ user().name }}</span>\n <ngx-ds-avatar\n [src]=\"user().avatarSrc\"\n [alt]=\"user().name\"\n [initials]=\"user().initials ?? ''\"\n [color]=\"user().avatarColor ?? 'primary'\"\n [size]=\"size()\"\n aria-hidden=\"true\"\n />\n </button>\n\n <!-- \u2500\u2500 Panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <div popover-content class=\"um__panel\">\n <!-- Header: name + email only, no avatar -->\n <div class=\"um__header\">\n <p class=\"um__name\">{{ user().name }}</p>\n <p class=\"um__email\">{{ user().email }}</p>\n </div>\n\n <ngx-ds-divider />\n\n <!-- Action list -->\n <div class=\"um__actions\">\n @for (action of actions(); track action.id; let first = $first) {\n @if (action.separator && !first) {\n <ngx-ds-divider />\n }\n <ngx-ds-menu-button\n [iconLeft]=\"action.icon\"\n [color]=\"action.color ?? 'default'\"\n [disabled]=\"action.disabled ?? false\"\n [fullWidth]=\"true\"\n (click)=\"onAction(action)\"\n >\n {{ action.label }}\n </ngx-ds-menu-button>\n }\n </div>\n </div>\n</ngx-ds-popover>\n", styles: [":host{display:inline-block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.um__sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.um__trigger{display:inline-flex;background:none;border:none;padding:0;cursor:pointer;border-radius:50%;transition:opacity .15s ease}.um__trigger:hover{opacity:.85}.um__trigger:focus-visible{outline:2px solid var(--primary-500, #6366f1);outline-offset:3px}.um__panel{min-width:14rem;padding:.25rem 0}.um__header{padding:.75rem 1rem .625rem;display:flex;flex-direction:column;gap:.125rem}.um__name{margin:0;font-size:.875rem;font-weight:600;color:var(--text-base, #111827);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.um__email{margin:0;font-size:.75rem;color:var(--text-muted, #6b7280);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.um__actions{padding:.25rem .375rem;display:flex;flex-direction:column;gap:.125rem}\n"] }]
|
|
6152
6920
|
}], propDecorators: { user: [{ type: i0.Input, args: [{ isSignal: true, alias: "user", required: true }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], actionClick: [{ type: i0.Output, args: ["actionClick"] }], popover: [{ type: i0.ViewChild, args: [i0.forwardRef(() => PopoverComponent), { isSignal: true }] }] } });
|
|
6153
6921
|
|
|
6154
6922
|
class ContextMenuComponent {
|
|
@@ -6385,11 +7153,11 @@ class CarouselComponent {
|
|
|
6385
7153
|
this.itemClick.emit({ item, index });
|
|
6386
7154
|
}
|
|
6387
7155
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: CarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6388
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: CarouselComponent, isStandalone: true, selector: "ngx-ds-carousel", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, loop: { classPropertyName: "loop", publicName: "loop", isSignal: true, isRequired: false, transformFunction: null }, autoplay: { classPropertyName: "autoplay", publicName: "autoplay", isSignal: true, isRequired: false, transformFunction: null }, showArrows: { classPropertyName: "showArrows", publicName: "showArrows", isSignal: true, isRequired: false, transformFunction: null }, showIndicators: { classPropertyName: "showIndicators", publicName: "showIndicators", isSignal: true, isRequired: false, transformFunction: null }, aspectRatio: { classPropertyName: "aspectRatio", publicName: "aspectRatio", isSignal: true, isRequired: false, transformFunction: null }, fit: { classPropertyName: "fit", publicName: "fit", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { index: "indexChange", itemClick: "itemClick" }, ngImport: i0, template: "<section\n class=\"carousel\"\n role=\"region\"\n [attr.aria-roledescription]=\"i18n.carousel\"\n [attr.aria-label]=\"ariaLabel() || i18n.carousel\"\n (keydown)=\"onKeydown($event)\"\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n>\n <div\n class=\"carousel__viewport\"\n [style.aspect-ratio]=\"aspectRatio()\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerCancel()\"\n >\n <div\n class=\"carousel__track\"\n [style.transform]=\"trackTransform()\"\n [attr.aria-live]=\"isPlaying() ? 'off' : 'polite'\"\n >\n @for (item of items(); track $index; let i = $index) {\n <div\n class=\"carousel__slide\"\n role=\"group\"\n [attr.aria-roledescription]=\"i18n.slide\"\n [attr.aria-label]=\"i18n.slideOf(i + 1, count())\"\n [attr.aria-hidden]=\"i !== current() || null\"\n [attr.inert]=\"i !== current() ? '' : null\"\n >\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- optional mouse shortcut; itemClick is a convenience output -->\n <img\n class=\"carousel__image\"\n [class.carousel__image--contain]=\"fit() === 'contain'\"\n [src]=\"item.src\"\n [alt]=\"item.alt\"\n [attr.loading]=\"i === 0 ? null : 'lazy'\"\n draggable=\"false\"\n (click)=\"onItemClick(item, i)\"\n />\n @if (item.caption) {\n <p class=\"carousel__caption\">{{ item.caption }}</p>\n }\n </div>\n }\n </div>\n\n @if (showArrows() && count() > 1) {\n <button\n type=\"button\"\n class=\"carousel__arrow carousel__arrow--prev\"\n [disabled]=\"!canPrev()\"\n [attr.aria-label]=\"i18n.prevSlide\"\n (click)=\"prev()\"\n >\n <ngx-ds-icon [icon]=\"icons.ChevronLeft\" [size]=\"20\" />\n </button>\n <button\n type=\"button\"\n class=\"carousel__arrow carousel__arrow--next\"\n [disabled]=\"!canNext()\"\n [attr.aria-label]=\"i18n.nextSlide\"\n (click)=\"next()\"\n >\n <ngx-ds-icon [icon]=\"icons.ChevronRight\" [size]=\"20\" />\n </button>\n }\n </div>\n\n @if ((showIndicators() && count() > 1) || hasAutoplay()) {\n <div class=\"carousel__controls\">\n @if (hasAutoplay()) {\n <button\n type=\"button\"\n class=\"carousel__play\"\n [attr.aria-label]=\"isUserPaused() ? i18n.playAutoplay : i18n.pauseAutoplay\"\n (click)=\"toggleAutoplay()\"\n >\n <ngx-ds-icon [icon]=\"isUserPaused() ? icons.Play : icons.Pause\" [size]=\"14\" />\n </button>\n }\n @if (showIndicators() && count() > 1) {\n <div class=\"carousel__dots\">\n @for (item of items(); track $index; let i = $index) {\n <button\n type=\"button\"\n class=\"carousel__dot\"\n [class.carousel__dot--active]=\"i === current()\"\n [attr.aria-label]=\"i18n.goToSlide(i + 1)\"\n [attr.aria-current]=\"i === current() || null\"\n (click)=\"goTo(i)\"\n ></button>\n }\n </div>\n }\n </div>\n }\n</section>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.carousel{position:relative}.carousel__viewport{position:relative;overflow:hidden;background:var(--surface-muted, #f3f4f6);border-radius:.75rem;touch-action:pan-y}.carousel__track{display:flex;height:100%;transition:transform .4s ease}@media(prefers-reduced-motion:reduce){.carousel__track{transition:none}}.carousel__slide{position:relative;flex:0 0 100%;height:100%}.carousel__image{display:block;width:100%;height:100%;object-fit:cover;-webkit-user-select:none;user-select:none}.carousel__image--contain{object-fit:contain}.carousel__caption{position:absolute;inset:auto 0 0;margin:0;padding:2rem 1rem .875rem;font-size:.875rem;color:#fff;background:linear-gradient(to top,rgba(0,0,0,.6),transparent)}.carousel__arrow{position:absolute;top:50%;display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;padding:0;color:var(--text-base, #111827);background:#ffffffd9;border:none;border-radius:9999px;box-shadow:0 2px 8px #00000026;cursor:pointer;transform:translateY(-50%);transition:background .15s ease,opacity .15s ease}.carousel__arrow:hover:not(:disabled){background:#fff}.carousel__arrow:focus-visible{outline:2px solid var(--primary-500, #6366f1);outline-offset:2px}.carousel__arrow:disabled{opacity:.4;cursor:not-allowed}.carousel__arrow--prev{left:.75rem}.carousel__arrow--next{right:.75rem}.carousel__controls{display:flex;align-items:center;justify-content:center;gap:.75rem;margin-top:.75rem}.carousel__dots{display:flex;align-items:center;gap:.25rem}.carousel__dot{position:relative;width:1.5rem;height:1.5rem;padding:0;background:transparent;border:none;cursor:pointer}.carousel__dot:before{content:\"\";position:absolute;top:50%;left:50%;width:.5rem;height:.5rem;background:var(--border-strong, #d1d5db);border-radius:9999px;transform:translate(-50%,-50%);transition:width .2s ease,background .2s ease}.carousel__dot:hover:before{background:var(--text-placeholder, #
|
|
7156
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: CarouselComponent, isStandalone: true, selector: "ngx-ds-carousel", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, loop: { classPropertyName: "loop", publicName: "loop", isSignal: true, isRequired: false, transformFunction: null }, autoplay: { classPropertyName: "autoplay", publicName: "autoplay", isSignal: true, isRequired: false, transformFunction: null }, showArrows: { classPropertyName: "showArrows", publicName: "showArrows", isSignal: true, isRequired: false, transformFunction: null }, showIndicators: { classPropertyName: "showIndicators", publicName: "showIndicators", isSignal: true, isRequired: false, transformFunction: null }, aspectRatio: { classPropertyName: "aspectRatio", publicName: "aspectRatio", isSignal: true, isRequired: false, transformFunction: null }, fit: { classPropertyName: "fit", publicName: "fit", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { index: "indexChange", itemClick: "itemClick" }, ngImport: i0, template: "<section\n class=\"carousel\"\n role=\"region\"\n [attr.aria-roledescription]=\"i18n.carousel\"\n [attr.aria-label]=\"ariaLabel() || i18n.carousel\"\n (keydown)=\"onKeydown($event)\"\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n>\n <div\n class=\"carousel__viewport\"\n [style.aspect-ratio]=\"aspectRatio()\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerCancel()\"\n >\n <div\n class=\"carousel__track\"\n [style.transform]=\"trackTransform()\"\n [attr.aria-live]=\"isPlaying() ? 'off' : 'polite'\"\n >\n @for (item of items(); track $index; let i = $index) {\n <div\n class=\"carousel__slide\"\n role=\"group\"\n [attr.aria-roledescription]=\"i18n.slide\"\n [attr.aria-label]=\"i18n.slideOf(i + 1, count())\"\n [attr.aria-hidden]=\"i !== current() || null\"\n [attr.inert]=\"i !== current() ? '' : null\"\n >\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- optional mouse shortcut; itemClick is a convenience output -->\n <img\n class=\"carousel__image\"\n [class.carousel__image--contain]=\"fit() === 'contain'\"\n [src]=\"item.src\"\n [alt]=\"item.alt\"\n [attr.loading]=\"i === 0 ? null : 'lazy'\"\n draggable=\"false\"\n (click)=\"onItemClick(item, i)\"\n />\n @if (item.caption) {\n <p class=\"carousel__caption\">{{ item.caption }}</p>\n }\n </div>\n }\n </div>\n\n @if (showArrows() && count() > 1) {\n <button\n type=\"button\"\n class=\"carousel__arrow carousel__arrow--prev\"\n [disabled]=\"!canPrev()\"\n [attr.aria-label]=\"i18n.prevSlide\"\n (click)=\"prev()\"\n >\n <ngx-ds-icon [icon]=\"icons.ChevronLeft\" [size]=\"20\" />\n </button>\n <button\n type=\"button\"\n class=\"carousel__arrow carousel__arrow--next\"\n [disabled]=\"!canNext()\"\n [attr.aria-label]=\"i18n.nextSlide\"\n (click)=\"next()\"\n >\n <ngx-ds-icon [icon]=\"icons.ChevronRight\" [size]=\"20\" />\n </button>\n }\n </div>\n\n @if ((showIndicators() && count() > 1) || hasAutoplay()) {\n <div class=\"carousel__controls\">\n @if (hasAutoplay()) {\n <button\n type=\"button\"\n class=\"carousel__play\"\n [attr.aria-label]=\"isUserPaused() ? i18n.playAutoplay : i18n.pauseAutoplay\"\n (click)=\"toggleAutoplay()\"\n >\n <ngx-ds-icon [icon]=\"isUserPaused() ? icons.Play : icons.Pause\" [size]=\"14\" />\n </button>\n }\n @if (showIndicators() && count() > 1) {\n <div class=\"carousel__dots\">\n @for (item of items(); track $index; let i = $index) {\n <button\n type=\"button\"\n class=\"carousel__dot\"\n [class.carousel__dot--active]=\"i === current()\"\n [attr.aria-label]=\"i18n.goToSlide(i + 1)\"\n [attr.aria-current]=\"i === current() || null\"\n (click)=\"goTo(i)\"\n ></button>\n }\n </div>\n }\n </div>\n }\n</section>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.carousel{position:relative}.carousel__viewport{position:relative;overflow:hidden;background:var(--surface-muted, #f3f4f6);border-radius:.75rem;touch-action:pan-y}.carousel__track{display:flex;height:100%;transition:transform .4s ease}@media(prefers-reduced-motion:reduce){.carousel__track{transition:none}}.carousel__slide{position:relative;flex:0 0 100%;height:100%}.carousel__image{display:block;width:100%;height:100%;object-fit:cover;-webkit-user-select:none;user-select:none}.carousel__image--contain{object-fit:contain}.carousel__caption{position:absolute;inset:auto 0 0;margin:0;padding:2rem 1rem .875rem;font-size:.875rem;color:#fff;background:linear-gradient(to top,rgba(0,0,0,.6),transparent)}.carousel__arrow{position:absolute;top:50%;display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;padding:0;color:var(--text-base, #111827);background:#ffffffd9;border:none;border-radius:9999px;box-shadow:0 2px 8px #00000026;cursor:pointer;transform:translateY(-50%);transition:background .15s ease,opacity .15s ease}.carousel__arrow:hover:not(:disabled){background:#fff}.carousel__arrow:focus-visible{outline:2px solid var(--primary-500, #6366f1);outline-offset:2px}.carousel__arrow:disabled{opacity:.4;cursor:not-allowed}.carousel__arrow--prev{left:.75rem}.carousel__arrow--next{right:.75rem}.carousel__controls{display:flex;align-items:center;justify-content:center;gap:.75rem;margin-top:.75rem}.carousel__dots{display:flex;align-items:center;gap:.25rem}.carousel__dot{position:relative;width:1.5rem;height:1.5rem;padding:0;background:transparent;border:none;cursor:pointer}.carousel__dot:before{content:\"\";position:absolute;top:50%;left:50%;width:.5rem;height:.5rem;background:var(--border-strong, #d1d5db);border-radius:9999px;transform:translate(-50%,-50%);transition:width .2s ease,background .2s ease}.carousel__dot:hover:before{background:var(--text-placeholder, #6b7280)}.carousel__dot--active:before,.carousel__dot--active:hover:before{width:1.25rem;background:var(--primary-500, #6366f1)}.carousel__dot:focus-visible{outline:2px solid var(--primary-500, #6366f1);outline-offset:-2px;border-radius:9999px}.carousel__play{display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;padding:0;color:var(--text-secondary, #374151);background:var(--surface-muted, #f3f4f6);border:none;border-radius:9999px;cursor:pointer}.carousel__play:hover{background:var(--surface-hover, #e5e7eb)}.carousel__play:focus-visible{outline:2px solid var(--primary-500, #6366f1);outline-offset:2px}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6389
7157
|
}
|
|
6390
7158
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: CarouselComponent, decorators: [{
|
|
6391
7159
|
type: Component,
|
|
6392
|
-
args: [{ selector: 'ngx-ds-carousel', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<section\n class=\"carousel\"\n role=\"region\"\n [attr.aria-roledescription]=\"i18n.carousel\"\n [attr.aria-label]=\"ariaLabel() || i18n.carousel\"\n (keydown)=\"onKeydown($event)\"\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n>\n <div\n class=\"carousel__viewport\"\n [style.aspect-ratio]=\"aspectRatio()\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerCancel()\"\n >\n <div\n class=\"carousel__track\"\n [style.transform]=\"trackTransform()\"\n [attr.aria-live]=\"isPlaying() ? 'off' : 'polite'\"\n >\n @for (item of items(); track $index; let i = $index) {\n <div\n class=\"carousel__slide\"\n role=\"group\"\n [attr.aria-roledescription]=\"i18n.slide\"\n [attr.aria-label]=\"i18n.slideOf(i + 1, count())\"\n [attr.aria-hidden]=\"i !== current() || null\"\n [attr.inert]=\"i !== current() ? '' : null\"\n >\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- optional mouse shortcut; itemClick is a convenience output -->\n <img\n class=\"carousel__image\"\n [class.carousel__image--contain]=\"fit() === 'contain'\"\n [src]=\"item.src\"\n [alt]=\"item.alt\"\n [attr.loading]=\"i === 0 ? null : 'lazy'\"\n draggable=\"false\"\n (click)=\"onItemClick(item, i)\"\n />\n @if (item.caption) {\n <p class=\"carousel__caption\">{{ item.caption }}</p>\n }\n </div>\n }\n </div>\n\n @if (showArrows() && count() > 1) {\n <button\n type=\"button\"\n class=\"carousel__arrow carousel__arrow--prev\"\n [disabled]=\"!canPrev()\"\n [attr.aria-label]=\"i18n.prevSlide\"\n (click)=\"prev()\"\n >\n <ngx-ds-icon [icon]=\"icons.ChevronLeft\" [size]=\"20\" />\n </button>\n <button\n type=\"button\"\n class=\"carousel__arrow carousel__arrow--next\"\n [disabled]=\"!canNext()\"\n [attr.aria-label]=\"i18n.nextSlide\"\n (click)=\"next()\"\n >\n <ngx-ds-icon [icon]=\"icons.ChevronRight\" [size]=\"20\" />\n </button>\n }\n </div>\n\n @if ((showIndicators() && count() > 1) || hasAutoplay()) {\n <div class=\"carousel__controls\">\n @if (hasAutoplay()) {\n <button\n type=\"button\"\n class=\"carousel__play\"\n [attr.aria-label]=\"isUserPaused() ? i18n.playAutoplay : i18n.pauseAutoplay\"\n (click)=\"toggleAutoplay()\"\n >\n <ngx-ds-icon [icon]=\"isUserPaused() ? icons.Play : icons.Pause\" [size]=\"14\" />\n </button>\n }\n @if (showIndicators() && count() > 1) {\n <div class=\"carousel__dots\">\n @for (item of items(); track $index; let i = $index) {\n <button\n type=\"button\"\n class=\"carousel__dot\"\n [class.carousel__dot--active]=\"i === current()\"\n [attr.aria-label]=\"i18n.goToSlide(i + 1)\"\n [attr.aria-current]=\"i === current() || null\"\n (click)=\"goTo(i)\"\n ></button>\n }\n </div>\n }\n </div>\n }\n</section>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.carousel{position:relative}.carousel__viewport{position:relative;overflow:hidden;background:var(--surface-muted, #f3f4f6);border-radius:.75rem;touch-action:pan-y}.carousel__track{display:flex;height:100%;transition:transform .4s ease}@media(prefers-reduced-motion:reduce){.carousel__track{transition:none}}.carousel__slide{position:relative;flex:0 0 100%;height:100%}.carousel__image{display:block;width:100%;height:100%;object-fit:cover;-webkit-user-select:none;user-select:none}.carousel__image--contain{object-fit:contain}.carousel__caption{position:absolute;inset:auto 0 0;margin:0;padding:2rem 1rem .875rem;font-size:.875rem;color:#fff;background:linear-gradient(to top,rgba(0,0,0,.6),transparent)}.carousel__arrow{position:absolute;top:50%;display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;padding:0;color:var(--text-base, #111827);background:#ffffffd9;border:none;border-radius:9999px;box-shadow:0 2px 8px #00000026;cursor:pointer;transform:translateY(-50%);transition:background .15s ease,opacity .15s ease}.carousel__arrow:hover:not(:disabled){background:#fff}.carousel__arrow:focus-visible{outline:2px solid var(--primary-500, #6366f1);outline-offset:2px}.carousel__arrow:disabled{opacity:.4;cursor:not-allowed}.carousel__arrow--prev{left:.75rem}.carousel__arrow--next{right:.75rem}.carousel__controls{display:flex;align-items:center;justify-content:center;gap:.75rem;margin-top:.75rem}.carousel__dots{display:flex;align-items:center;gap:.25rem}.carousel__dot{position:relative;width:1.5rem;height:1.5rem;padding:0;background:transparent;border:none;cursor:pointer}.carousel__dot:before{content:\"\";position:absolute;top:50%;left:50%;width:.5rem;height:.5rem;background:var(--border-strong, #d1d5db);border-radius:9999px;transform:translate(-50%,-50%);transition:width .2s ease,background .2s ease}.carousel__dot:hover:before{background:var(--text-placeholder, #
|
|
7160
|
+
args: [{ selector: 'ngx-ds-carousel', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<section\n class=\"carousel\"\n role=\"region\"\n [attr.aria-roledescription]=\"i18n.carousel\"\n [attr.aria-label]=\"ariaLabel() || i18n.carousel\"\n (keydown)=\"onKeydown($event)\"\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n>\n <div\n class=\"carousel__viewport\"\n [style.aspect-ratio]=\"aspectRatio()\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerCancel()\"\n >\n <div\n class=\"carousel__track\"\n [style.transform]=\"trackTransform()\"\n [attr.aria-live]=\"isPlaying() ? 'off' : 'polite'\"\n >\n @for (item of items(); track $index; let i = $index) {\n <div\n class=\"carousel__slide\"\n role=\"group\"\n [attr.aria-roledescription]=\"i18n.slide\"\n [attr.aria-label]=\"i18n.slideOf(i + 1, count())\"\n [attr.aria-hidden]=\"i !== current() || null\"\n [attr.inert]=\"i !== current() ? '' : null\"\n >\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- optional mouse shortcut; itemClick is a convenience output -->\n <img\n class=\"carousel__image\"\n [class.carousel__image--contain]=\"fit() === 'contain'\"\n [src]=\"item.src\"\n [alt]=\"item.alt\"\n [attr.loading]=\"i === 0 ? null : 'lazy'\"\n draggable=\"false\"\n (click)=\"onItemClick(item, i)\"\n />\n @if (item.caption) {\n <p class=\"carousel__caption\">{{ item.caption }}</p>\n }\n </div>\n }\n </div>\n\n @if (showArrows() && count() > 1) {\n <button\n type=\"button\"\n class=\"carousel__arrow carousel__arrow--prev\"\n [disabled]=\"!canPrev()\"\n [attr.aria-label]=\"i18n.prevSlide\"\n (click)=\"prev()\"\n >\n <ngx-ds-icon [icon]=\"icons.ChevronLeft\" [size]=\"20\" />\n </button>\n <button\n type=\"button\"\n class=\"carousel__arrow carousel__arrow--next\"\n [disabled]=\"!canNext()\"\n [attr.aria-label]=\"i18n.nextSlide\"\n (click)=\"next()\"\n >\n <ngx-ds-icon [icon]=\"icons.ChevronRight\" [size]=\"20\" />\n </button>\n }\n </div>\n\n @if ((showIndicators() && count() > 1) || hasAutoplay()) {\n <div class=\"carousel__controls\">\n @if (hasAutoplay()) {\n <button\n type=\"button\"\n class=\"carousel__play\"\n [attr.aria-label]=\"isUserPaused() ? i18n.playAutoplay : i18n.pauseAutoplay\"\n (click)=\"toggleAutoplay()\"\n >\n <ngx-ds-icon [icon]=\"isUserPaused() ? icons.Play : icons.Pause\" [size]=\"14\" />\n </button>\n }\n @if (showIndicators() && count() > 1) {\n <div class=\"carousel__dots\">\n @for (item of items(); track $index; let i = $index) {\n <button\n type=\"button\"\n class=\"carousel__dot\"\n [class.carousel__dot--active]=\"i === current()\"\n [attr.aria-label]=\"i18n.goToSlide(i + 1)\"\n [attr.aria-current]=\"i === current() || null\"\n (click)=\"goTo(i)\"\n ></button>\n }\n </div>\n }\n </div>\n }\n</section>\n", styles: [":host{display:block;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif)}.carousel{position:relative}.carousel__viewport{position:relative;overflow:hidden;background:var(--surface-muted, #f3f4f6);border-radius:.75rem;touch-action:pan-y}.carousel__track{display:flex;height:100%;transition:transform .4s ease}@media(prefers-reduced-motion:reduce){.carousel__track{transition:none}}.carousel__slide{position:relative;flex:0 0 100%;height:100%}.carousel__image{display:block;width:100%;height:100%;object-fit:cover;-webkit-user-select:none;user-select:none}.carousel__image--contain{object-fit:contain}.carousel__caption{position:absolute;inset:auto 0 0;margin:0;padding:2rem 1rem .875rem;font-size:.875rem;color:#fff;background:linear-gradient(to top,rgba(0,0,0,.6),transparent)}.carousel__arrow{position:absolute;top:50%;display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;padding:0;color:var(--text-base, #111827);background:#ffffffd9;border:none;border-radius:9999px;box-shadow:0 2px 8px #00000026;cursor:pointer;transform:translateY(-50%);transition:background .15s ease,opacity .15s ease}.carousel__arrow:hover:not(:disabled){background:#fff}.carousel__arrow:focus-visible{outline:2px solid var(--primary-500, #6366f1);outline-offset:2px}.carousel__arrow:disabled{opacity:.4;cursor:not-allowed}.carousel__arrow--prev{left:.75rem}.carousel__arrow--next{right:.75rem}.carousel__controls{display:flex;align-items:center;justify-content:center;gap:.75rem;margin-top:.75rem}.carousel__dots{display:flex;align-items:center;gap:.25rem}.carousel__dot{position:relative;width:1.5rem;height:1.5rem;padding:0;background:transparent;border:none;cursor:pointer}.carousel__dot:before{content:\"\";position:absolute;top:50%;left:50%;width:.5rem;height:.5rem;background:var(--border-strong, #d1d5db);border-radius:9999px;transform:translate(-50%,-50%);transition:width .2s ease,background .2s ease}.carousel__dot:hover:before{background:var(--text-placeholder, #6b7280)}.carousel__dot--active:before,.carousel__dot--active:hover:before{width:1.25rem;background:var(--primary-500, #6366f1)}.carousel__dot:focus-visible{outline:2px solid var(--primary-500, #6366f1);outline-offset:-2px;border-radius:9999px}.carousel__play{display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;padding:0;color:var(--text-secondary, #374151);background:var(--surface-muted, #f3f4f6);border:none;border-radius:9999px;cursor:pointer}.carousel__play:hover{background:var(--surface-hover, #e5e7eb)}.carousel__play:focus-visible{outline:2px solid var(--primary-500, #6366f1);outline-offset:2px}\n"] }]
|
|
6393
7161
|
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: false }] }, { type: i0.Output, args: ["indexChange"] }], loop: [{ type: i0.Input, args: [{ isSignal: true, alias: "loop", required: false }] }], autoplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoplay", required: false }] }], showArrows: [{ type: i0.Input, args: [{ isSignal: true, alias: "showArrows", required: false }] }], showIndicators: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIndicators", required: false }] }], aspectRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "aspectRatio", required: false }] }], fit: [{ type: i0.Input, args: [{ isSignal: true, alias: "fit", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }] } });
|
|
6394
7162
|
|
|
6395
7163
|
/** Minimum horizontal drag, in px, that counts as a swipe. */
|
|
@@ -6597,5 +7365,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
6597
7365
|
* Generated bundle index. Do not edit.
|
|
6598
7366
|
*/
|
|
6599
7367
|
|
|
6600
|
-
export { ACCORDION_CONTROLLER, AccordionComponent, AccordionItemComponent, AlertComponent, AutocompleteComponent, AvatarComponent, AvatarGroupComponent, BadgeComponent, BreadcrumbComponent, ButtonComponent, ButtonGroupComponent, CalendarComponent, CardComponent, CarouselComponent, CheckboxComponent, ChipGroupComponent, ColorPickerComponent, CommandPaletteComponent, ConfirmationComponent, ConfirmationService, ContextMenuComponent, DateRangePickerComponent, DatepickerComponent, DividerComponent, DrawerComponent, DropdownComponent, EmptyStateComponent, FileUploadComponent, FocusTrapDirective, FormFieldComponent, IconButtonComponent, IconComponent, InputComponent, KbdComponent, LightboxComponent, MenuButtonComponent, MenuComponent, ModalComponent, MultiSelectComponent, NGX_DS_LABELS, NGX_DS_LABELS_EN, NGX_DS_LABELS_ES, NGX_DS_LOCALE, NotificationCenterComponent, NotificationItemComponent, NumberInputComponent, OtpInputComponent, PaginationComponent, PasswordStrengthComponent, PopoverComponent, ProgressBarComponent, RadioComponent, RangeSliderComponent, RatingComponent, SearchInputComponent, SegmentedControlComponent, SelectComponent, SidebarComponent, SkeletonComponent, SpinnerComponent, SplitterComponent, StepComponent, StepperComponent, SwitchComponent, TabComponent, TabContentDirective, TableComponent, TabsComponent, TagComponent, TagInputComponent, TextareaComponent, TimePickerComponent, TimelineComponent, TimelineItemComponent, ToastComponent, ToastrService, TooltipDirective, TreeNodeComponent, TreeViewComponent, UserMenuComponent, formatDayLabel, monthNames, parseTime, provideNgxDs, provideNgxDsLabels, provideNgxDsLocale, stepIndex, weekdayNames };
|
|
7368
|
+
export { ACCORDION_CONTROLLER, AccordionComponent, AccordionItemComponent, AlertComponent, AutocompleteComponent, AvatarComponent, AvatarGroupComponent, BadgeComponent, BreadcrumbComponent, ButtonComponent, ButtonGroupComponent, CalendarComponent, CardComponent, CarouselComponent, CheckboxComponent, ChipGroupComponent, ColorPickerComponent, CommandPaletteComponent, ConfirmationComponent, ConfirmationService, ContextMenuComponent, DateRangePickerComponent, DatepickerComponent, DividerComponent, DrawerComponent, DropdownComponent, EmptyStateComponent, FileUploadComponent, FocusTrapDirective, FormFieldComponent, IconButtonComponent, IconComponent, InlineEditComponent, InputComponent, KbdComponent, LightboxComponent, MenuButtonComponent, MenuComponent, ModalComponent, MultiSelectComponent, NGX_DS_LABELS, NGX_DS_LABELS_EN, NGX_DS_LABELS_ES, NGX_DS_LOCALE, NotificationCenterComponent, NotificationItemComponent, NumberInputComponent, OtpInputComponent, PRIMARY_STEPS, PaginationComponent, PasswordStrengthComponent, PopoverComponent, ProgressBarComponent, RadioComponent, RangeSliderComponent, RatingComponent, SearchInputComponent, SegmentedControlComponent, SelectComponent, SidebarComponent, SkeletonComponent, SpinnerComponent, SplitterComponent, StepComponent, StepperComponent, SwitchComponent, TabComponent, TabContentDirective, TableComponent, TabsComponent, TagComponent, TagInputComponent, TextareaComponent, TimePickerComponent, TimelineComponent, TimelineItemComponent, ToastComponent, ToastrService, TooltipDirective, TreeNodeComponent, TreeSelectComponent, TreeViewComponent, UserMenuComponent, applyPrimaryColor, contrastRatio, createPrimaryPalette, formatDayLabel, monthNames, parseHex, parseTime, primaryPaletteCss, provideNgxDs, provideNgxDsLabels, provideNgxDsLocale, stepIndex, weekdayNames };
|
|
6601
7369
|
//# sourceMappingURL=jdpo2008-ngx-ds.mjs.map
|