@jdpo2008/ngx-ds 0.5.0 → 0.7.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 +18 -0
- package/fesm2022/jdpo2008-ngx-ds.mjs +966 -190
- package/fesm2022/jdpo2008-ngx-ds.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/ngx-ds.scss +2 -3
- package/types/jdpo2008-ngx-ds.d.ts +297 -49
- package/styles/_legacy.scss +0 -53
|
@@ -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
|
|
|
@@ -14,7 +14,7 @@ class ToastrService {
|
|
|
14
14
|
const toast = {
|
|
15
15
|
...options,
|
|
16
16
|
id,
|
|
17
|
-
type: options.type || 'info',
|
|
17
|
+
type: options.type === 'error' ? 'danger' : options.type || 'info',
|
|
18
18
|
duration: options.duration || 5000,
|
|
19
19
|
position: options.position || 'top-right',
|
|
20
20
|
timestamp: Date.now(),
|
|
@@ -31,8 +31,12 @@ class ToastrService {
|
|
|
31
31
|
success(message, title, duration) {
|
|
32
32
|
return this.show({ message, type: 'success', title, duration });
|
|
33
33
|
}
|
|
34
|
+
danger(message, title, duration) {
|
|
35
|
+
return this.show({ message, type: 'danger', title, duration });
|
|
36
|
+
}
|
|
37
|
+
/** @deprecated Use `danger()`. Will be removed in 1.0. */
|
|
34
38
|
error(message, title, duration) {
|
|
35
|
-
return this.
|
|
39
|
+
return this.danger(message, title, duration);
|
|
36
40
|
}
|
|
37
41
|
warning(message, title, duration) {
|
|
38
42
|
return this.show({ message, type: 'warning', title, duration });
|
|
@@ -87,6 +91,8 @@ const NGX_DS_LABELS_ES = {
|
|
|
87
91
|
rangeStart: 'Valor mínimo',
|
|
88
92
|
rangeEnd: 'Valor máximo',
|
|
89
93
|
removeTag: (label) => `Eliminar ${label}`,
|
|
94
|
+
edit: (label) => (label ? `Editar ${label}` : 'Editar'),
|
|
95
|
+
save: 'Guardar',
|
|
90
96
|
removeChip: (label) => `Quitar ${label}`,
|
|
91
97
|
rating: 'Valoración',
|
|
92
98
|
ratingStar: (n) => `${n} estrella${n > 1 ? 's' : ''}`,
|
|
@@ -202,6 +208,8 @@ const NGX_DS_LABELS_EN = {
|
|
|
202
208
|
rangeStart: 'Minimum value',
|
|
203
209
|
rangeEnd: 'Maximum value',
|
|
204
210
|
removeTag: (label) => `Remove ${label}`,
|
|
211
|
+
edit: (label) => (label ? `Edit ${label}` : 'Edit'),
|
|
212
|
+
save: 'Save',
|
|
205
213
|
removeChip: (label) => `Remove ${label}`,
|
|
206
214
|
rating: 'Rating',
|
|
207
215
|
ratingStar: (n) => `${n} star${n > 1 ? 's' : ''}`,
|
|
@@ -386,17 +394,167 @@ function formatDayLabel(date, locale) {
|
|
|
386
394
|
return date.toLocaleDateString(locale, { day: 'numeric', month: 'long', year: 'numeric' });
|
|
387
395
|
}
|
|
388
396
|
|
|
397
|
+
// Runtime primary colour: builds the --primary-* scale from one brand colour.
|
|
398
|
+
//
|
|
399
|
+
// The scale is computed in OKLCH. The brand colour is step 600 (the one behind
|
|
400
|
+
// --fill-primary) and the other steps keep the lightness/chroma ladder of the
|
|
401
|
+
// default indigo palette, so a brand colour of #4f46e5 reproduces the defaults.
|
|
402
|
+
/** Steps of `--primary-*` the components read, in the light and in the dark theme. */
|
|
403
|
+
const PRIMARY_STEPS = [50, 100, 200, 300, 400, 500, 600, 700];
|
|
404
|
+
// Lightness and chroma of each step of the reference ladder (Tailwind indigo in
|
|
405
|
+
// OKLCH), relative to step 600: lighter steps as a share of the way to white,
|
|
406
|
+
// darker ones as a share of the lightness of 600.
|
|
407
|
+
const L600 = 0.511;
|
|
408
|
+
const C600 = 0.262;
|
|
409
|
+
const LADDER = {
|
|
410
|
+
50: [0.962, 0.018],
|
|
411
|
+
100: [0.93, 0.034],
|
|
412
|
+
200: [0.87, 0.065],
|
|
413
|
+
300: [0.785, 0.115],
|
|
414
|
+
400: [0.673, 0.182],
|
|
415
|
+
500: [0.585, 0.233],
|
|
416
|
+
600: [L600, C600],
|
|
417
|
+
700: [0.457, 0.24],
|
|
418
|
+
800: [0.398, 0.195],
|
|
419
|
+
900: [0.359, 0.144],
|
|
420
|
+
950: [0.257, 0.09],
|
|
421
|
+
};
|
|
422
|
+
// The dark theme uses deep shades for the soft backgrounds (50–200) and lighter
|
|
423
|
+
// ones for the accents (500–700), same as _themes.scss.
|
|
424
|
+
const DARK_MAP = {
|
|
425
|
+
50: 950,
|
|
426
|
+
100: 900,
|
|
427
|
+
200: 800,
|
|
428
|
+
500: 400,
|
|
429
|
+
600: 500,
|
|
430
|
+
700: 300,
|
|
431
|
+
};
|
|
432
|
+
/** Parses `#rgb` or `#rrggbb`. Returns `null` for anything else. */
|
|
433
|
+
function parseHex(color) {
|
|
434
|
+
const m = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(color.trim());
|
|
435
|
+
if (!m)
|
|
436
|
+
return null;
|
|
437
|
+
const hex = m[1].length === 3 ? [...m[1]].map((c) => c + c).join('') : m[1];
|
|
438
|
+
return [0, 2, 4].map((i) => parseInt(hex.slice(i, i + 2), 16) / 255);
|
|
439
|
+
}
|
|
440
|
+
const toLinear = (c) => (c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4);
|
|
441
|
+
const fromLinear = (c) => (c <= 0.0031308 ? 12.92 * c : 1.055 * c ** (1 / 2.4) - 0.055);
|
|
442
|
+
function rgbToOklch([r, g, b]) {
|
|
443
|
+
const [lr, lg, lb] = [r, g, b].map(toLinear);
|
|
444
|
+
const l = Math.cbrt(0.4122214708 * lr + 0.5363325363 * lg + 0.0514459929 * lb);
|
|
445
|
+
const m = Math.cbrt(0.2119034982 * lr + 0.6806995451 * lg + 0.1073969566 * lb);
|
|
446
|
+
const s = Math.cbrt(0.0883024619 * lr + 0.2817188376 * lg + 0.6299787005 * lb);
|
|
447
|
+
const L = 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s;
|
|
448
|
+
const a = 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s;
|
|
449
|
+
const bb = 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s;
|
|
450
|
+
return [L, Math.hypot(a, bb), (Math.atan2(bb, a) * 180) / Math.PI];
|
|
451
|
+
}
|
|
452
|
+
/** Linear sRGB of an OKLCH colour; may fall outside [0, 1]. */
|
|
453
|
+
function oklchToLinear([L, C, H]) {
|
|
454
|
+
const a = C * Math.cos((H * Math.PI) / 180);
|
|
455
|
+
const b = C * Math.sin((H * Math.PI) / 180);
|
|
456
|
+
const l = (L + 0.3963377774 * a + 0.2158037573 * b) ** 3;
|
|
457
|
+
const m = (L - 0.1055613458 * a - 0.0638541728 * b) ** 3;
|
|
458
|
+
const s = (L - 0.0894841775 * a - 1.291485548 * b) ** 3;
|
|
459
|
+
return [
|
|
460
|
+
4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s,
|
|
461
|
+
-1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s,
|
|
462
|
+
-0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s,
|
|
463
|
+
];
|
|
464
|
+
}
|
|
465
|
+
const inGamut = (rgb) => rgb.every((c) => c >= -1e-4 && c <= 1 + 1e-4);
|
|
466
|
+
/** Hex of an OKLCH colour, lowering the chroma until it fits in sRGB. */
|
|
467
|
+
function oklchToHex([L, C, H]) {
|
|
468
|
+
let lo = 0;
|
|
469
|
+
let hi = C;
|
|
470
|
+
if (!inGamut(oklchToLinear([L, C, H]))) {
|
|
471
|
+
for (let i = 0; i < 20; i++) {
|
|
472
|
+
const mid = (lo + hi) / 2;
|
|
473
|
+
if (inGamut(oklchToLinear([L, mid, H])))
|
|
474
|
+
lo = mid;
|
|
475
|
+
else
|
|
476
|
+
hi = mid;
|
|
477
|
+
}
|
|
478
|
+
C = lo;
|
|
479
|
+
}
|
|
480
|
+
return ('#' +
|
|
481
|
+
oklchToLinear([L, C, H])
|
|
482
|
+
.map((c) => Math.round(Math.min(1, Math.max(0, fromLinear(c))) * 255))
|
|
483
|
+
.map((c) => c.toString(16).padStart(2, '0'))
|
|
484
|
+
.join(''));
|
|
485
|
+
}
|
|
486
|
+
/** WCAG 2 contrast ratio between two hex colours. */
|
|
487
|
+
function contrastRatio(a, b) {
|
|
488
|
+
const lum = (hex) => {
|
|
489
|
+
const [r, g, bl] = (parseHex(hex) ?? [0, 0, 0]).map(toLinear);
|
|
490
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * bl;
|
|
491
|
+
};
|
|
492
|
+
const [x, y] = [lum(a), lum(b)].sort((p, q) => q - p);
|
|
493
|
+
return (x + 0.05) / (y + 0.05);
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Builds the `--primary-*` scale from a brand colour (`#rgb` / `#rrggbb`), which
|
|
497
|
+
* becomes step 600 in the light theme. Throws on an invalid colour.
|
|
498
|
+
*/
|
|
499
|
+
function createPrimaryPalette(color) {
|
|
500
|
+
const rgb = parseHex(color);
|
|
501
|
+
if (!rgb)
|
|
502
|
+
throw new Error(`ngx-ds: invalid primary colour "${color}", use #rgb or #rrggbb.`);
|
|
503
|
+
const [l, c, h] = rgbToOklch(rgb);
|
|
504
|
+
const exact = '#' +
|
|
505
|
+
rgb
|
|
506
|
+
.map((v) => Math.round(v * 255)
|
|
507
|
+
.toString(16)
|
|
508
|
+
.padStart(2, '0'))
|
|
509
|
+
.join('');
|
|
510
|
+
const step = (n) => {
|
|
511
|
+
if (n === 600)
|
|
512
|
+
return exact;
|
|
513
|
+
const [refL, refC] = LADDER[n];
|
|
514
|
+
const L = refL > L600 ? l + ((refL - L600) / (1 - L600)) * (1 - l) : (refL / L600) * l;
|
|
515
|
+
return oklchToHex([L, (refC / C600) * c, h]);
|
|
516
|
+
};
|
|
517
|
+
const light = Object.fromEntries(PRIMARY_STEPS.map((n) => [n, step(n)]));
|
|
518
|
+
const dark = Object.fromEntries(Object.entries(DARK_MAP).map(([n, ref]) => [n, step(ref)]));
|
|
519
|
+
return { light, dark };
|
|
520
|
+
}
|
|
521
|
+
/** CSS that sets the palette on `:root`, with the dark overrides for `data-theme="dark"` / `.dark`. */
|
|
522
|
+
function primaryPaletteCss({ light, dark }) {
|
|
523
|
+
const decls = (steps) => Object.entries(steps)
|
|
524
|
+
.map(([n, hex]) => `--primary-${n}:${hex};`)
|
|
525
|
+
.join('');
|
|
526
|
+
return `:root{${decls(light)}}:root[data-theme='dark'],.dark{${decls(dark)}}`;
|
|
527
|
+
}
|
|
528
|
+
const STYLE_ID = 'ngx-ds-primary';
|
|
529
|
+
/**
|
|
530
|
+
* Applies a brand colour as the primary colour of every ngx-ds component, at runtime.
|
|
531
|
+
* Call it again to change it, or with `null` to go back to the default indigo.
|
|
532
|
+
*
|
|
533
|
+
* The styles are not in a cascade layer, so they win over the tokens in `ngx-ds.scss`.
|
|
534
|
+
*/
|
|
535
|
+
function applyPrimaryColor(color, doc = document) {
|
|
536
|
+
doc.getElementById(STYLE_ID)?.remove();
|
|
537
|
+
if (color === null)
|
|
538
|
+
return;
|
|
539
|
+
const style = doc.createElement('style');
|
|
540
|
+
style.id = STYLE_ID;
|
|
541
|
+
style.textContent = primaryPaletteCss(createPrimaryPalette(color));
|
|
542
|
+
doc.head.appendChild(style);
|
|
543
|
+
}
|
|
544
|
+
|
|
389
545
|
/**
|
|
390
546
|
* Configures ngx-ds in one call:
|
|
391
547
|
*
|
|
392
548
|
* ```ts
|
|
393
549
|
* bootstrapApplication(AppComponent, {
|
|
394
|
-
* providers: [
|
|
550
|
+
* providers: [
|
|
551
|
+
* provideNgxDs({ locale: 'en-US', theme: 'system', colors: { primary: '#0d9488' } }),
|
|
552
|
+
* ],
|
|
395
553
|
* });
|
|
396
554
|
* ```
|
|
397
555
|
*/
|
|
398
556
|
function provideNgxDs(config = {}) {
|
|
399
|
-
const { locale, labels, theme } = config;
|
|
557
|
+
const { locale, labels, theme, colors } = config;
|
|
400
558
|
const providers = [];
|
|
401
559
|
if (locale)
|
|
402
560
|
providers.push(provideNgxDsLocale(locale));
|
|
@@ -406,6 +564,9 @@ function provideNgxDs(config = {}) {
|
|
|
406
564
|
}
|
|
407
565
|
if (theme)
|
|
408
566
|
providers.push(provideAppInitializer(() => applyTheme(theme)));
|
|
567
|
+
const primary = colors?.primary;
|
|
568
|
+
if (primary)
|
|
569
|
+
providers.push(provideAppInitializer(() => applyPrimary(primary)));
|
|
409
570
|
return makeEnvironmentProviders(providers);
|
|
410
571
|
}
|
|
411
572
|
function applyTheme(theme) {
|
|
@@ -424,6 +585,17 @@ function applyTheme(theme) {
|
|
|
424
585
|
query.addEventListener('change', sync);
|
|
425
586
|
inject(DestroyRef).onDestroy(() => query.removeEventListener('change', sync));
|
|
426
587
|
}
|
|
588
|
+
function applyPrimary(color) {
|
|
589
|
+
applyPrimaryColor(color, inject(DOCUMENT));
|
|
590
|
+
if (!isDevMode())
|
|
591
|
+
return;
|
|
592
|
+
const fill = createPrimaryPalette(color).light[600];
|
|
593
|
+
const ratio = contrastRatio(fill, '#ffffff');
|
|
594
|
+
if (ratio < 4.5) {
|
|
595
|
+
console.warn(`ngx-ds: white text on the primary colour ${fill} has a contrast of ${ratio.toFixed(2)}:1, ` +
|
|
596
|
+
'below the 4.5:1 WCAG AA minimum. Use a darker colour.');
|
|
597
|
+
}
|
|
598
|
+
}
|
|
427
599
|
|
|
428
600
|
const FOCUSABLE_SELECTOR = [
|
|
429
601
|
'a[href]',
|
|
@@ -528,14 +700,14 @@ class SpinnerComponent {
|
|
|
528
700
|
return classes.join(' ');
|
|
529
701
|
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
530
702
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: SpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
531
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.12", type: SpinnerComponent, isStandalone: true, selector: "ngx-ds-spinner", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, 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"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
703
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.12", type: SpinnerComponent, isStandalone: true, selector: "ngx-ds-spinner", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, 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)}.spinner--info{border-color:var(--info-500, #3b82f6)}@keyframes ngx-spin{to{transform:rotate(360deg)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
532
704
|
}
|
|
533
705
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: SpinnerComponent, decorators: [{
|
|
534
706
|
type: Component,
|
|
535
|
-
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"] }]
|
|
707
|
+
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)}.spinner--info{border-color:var(--info-500, #3b82f6)}@keyframes ngx-spin{to{transform:rotate(360deg)}}\n"] }]
|
|
536
708
|
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }] } });
|
|
537
709
|
|
|
538
|
-
const ICON_SIZE$
|
|
710
|
+
const ICON_SIZE$f = { sm: 14, md: 16, lg: 20 };
|
|
539
711
|
const SPINNER_SIZE = { sm: 'xs', md: 'sm', lg: 'md' };
|
|
540
712
|
class ButtonComponent {
|
|
541
713
|
variant = input('solid', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
@@ -562,17 +734,17 @@ class ButtonComponent {
|
|
|
562
734
|
classes.push('btn--loading');
|
|
563
735
|
return classes.join(' ');
|
|
564
736
|
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
565
|
-
iconSize = computed(() => ICON_SIZE$
|
|
737
|
+
iconSize = computed(() => ICON_SIZE$f[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
566
738
|
spinnerSize = computed(() => SPINNER_SIZE[this.size()], ...(ngDevMode ? [{ debugName: "spinnerSize" }] : /* istanbul ignore next */ []));
|
|
567
739
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
568
|
-
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 });
|
|
740
|
+
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)}.btn--info.btn--solid{background-color:var(--fill-info, #2563eb);border-color:var(--fill-info, #2563eb);color:var(--text-on-color, #fff)}.btn--info.btn--solid:hover:not(:disabled){filter:brightness(.88)}.btn--info.btn--solid:active:not(:disabled){filter:brightness(.78)}.btn--info.btn--outline{background-color:transparent;border-color:var(--fill-info, #2563eb);color:var(--fill-info, #2563eb)}.btn--info.btn--outline:hover:not(:disabled){background-color:var(--fill-info, #2563eb);color:var(--text-on-color, #fff)}.btn--info.btn--outline:active:not(:disabled){background-color:var(--fill-info, #2563eb);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 });
|
|
569
741
|
}
|
|
570
742
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
571
743
|
type: Component,
|
|
572
|
-
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"] }]
|
|
744
|
+
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)}.btn--info.btn--solid{background-color:var(--fill-info, #2563eb);border-color:var(--fill-info, #2563eb);color:var(--text-on-color, #fff)}.btn--info.btn--solid:hover:not(:disabled){filter:brightness(.88)}.btn--info.btn--solid:active:not(:disabled){filter:brightness(.78)}.btn--info.btn--outline{background-color:transparent;border-color:var(--fill-info, #2563eb);color:var(--fill-info, #2563eb)}.btn--info.btn--outline:hover:not(:disabled){background-color:var(--fill-info, #2563eb);color:var(--text-on-color, #fff)}.btn--info.btn--outline:active:not(:disabled){background-color:var(--fill-info, #2563eb);filter:brightness(.88);color:var(--text-on-color, #fff)}\n"] }]
|
|
573
745
|
}], 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 }] }] } });
|
|
574
746
|
|
|
575
|
-
const ICON_SIZE$
|
|
747
|
+
const ICON_SIZE$e = { sm: 14, md: 18, lg: 22 };
|
|
576
748
|
class IconButtonComponent {
|
|
577
749
|
icon = input.required(...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
578
750
|
ariaLabel = input.required(...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
@@ -596,13 +768,13 @@ class IconButtonComponent {
|
|
|
596
768
|
classes.push('icon-btn--borderless');
|
|
597
769
|
return classes.join(' ');
|
|
598
770
|
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
599
|
-
iconSize = computed(() => ICON_SIZE$
|
|
771
|
+
iconSize = computed(() => ICON_SIZE$e[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
600
772
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: IconButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
601
|
-
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 });
|
|
773
|
+
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--info.icon-btn--solid{background-color:var(--info-500, #3b82f6);border-color:var(--info-500, #3b82f6);color:var(--text-on-color, #fff)}.icon-btn--info.icon-btn--solid:hover:not(:disabled){filter:brightness(.88)}.icon-btn--info.icon-btn--solid:active:not(:disabled){filter:brightness(.78)}.icon-btn--info.icon-btn--outline{background-color:transparent;border-color:var(--info-500, #3b82f6);color:var(--info-500, #3b82f6)}.icon-btn--info.icon-btn--outline:hover:not(:disabled){background-color:var(--info-500, #3b82f6);color:var(--text-on-color, #fff)}.icon-btn--info.icon-btn--outline:active:not(:disabled){background-color:var(--info-500, #3b82f6);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 });
|
|
602
774
|
}
|
|
603
775
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: IconButtonComponent, decorators: [{
|
|
604
776
|
type: Component,
|
|
605
|
-
args: [{ selector: 'ngx-ds-icon-button', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
|
|
777
|
+
args: [{ selector: 'ngx-ds-icon-button', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, 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--info.icon-btn--solid{background-color:var(--info-500, #3b82f6);border-color:var(--info-500, #3b82f6);color:var(--text-on-color, #fff)}.icon-btn--info.icon-btn--solid:hover:not(:disabled){filter:brightness(.88)}.icon-btn--info.icon-btn--solid:active:not(:disabled){filter:brightness(.78)}.icon-btn--info.icon-btn--outline{background-color:transparent;border-color:var(--info-500, #3b82f6);color:var(--info-500, #3b82f6)}.icon-btn--info.icon-btn--outline:hover:not(:disabled){background-color:var(--info-500, #3b82f6);color:var(--text-on-color, #fff)}.icon-btn--info.icon-btn--outline:active:not(:disabled){background-color:var(--info-500, #3b82f6);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"] }]
|
|
606
778
|
}], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: true }] }], 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 }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }] } });
|
|
607
779
|
|
|
608
780
|
class AvatarComponent {
|
|
@@ -624,11 +796,11 @@ class AvatarComponent {
|
|
|
624
796
|
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
625
797
|
displayInitials = computed(() => this.initials().slice(0, 2).toUpperCase(), ...(ngDevMode ? [{ debugName: "displayInitials" }] : /* istanbul ignore next */ []));
|
|
626
798
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: AvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
627
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: AvatarComponent, isStandalone: true, selector: "ngx-ds-avatar", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, initials: { classPropertyName: "initials", publicName: "initials", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<span [class]=\"hostClasses()\">\n @if (src()) {\n <img [src]=\"src()\" [alt]=\"alt()\" class=\"avatar__img\" />\n } @else {\n <span class=\"avatar__initials\">{{ displayInitials() }}</span>\n }\n\n @if (status()) {\n <span class=\"avatar__status avatar__status--{{ status() }}\" aria-hidden=\"true\"></span>\n }\n</span>\n", styles: [".avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;-webkit-user-select:none;user-select:none;background-color:var(--surface-active, #e5e7eb)}.avatar--circle{border-radius:9999px}.avatar--square{border-radius:.375rem}.avatar--xs{width:1.5rem;height:1.5rem}.avatar--xs .avatar__initials{font-size:.625rem}.avatar--xs.avatar--bordered{outline:1px solid var(--surface-base, #fff);outline-offset:1px}.avatar--xs .avatar__status{width:.5rem;height:.5rem}.avatar--sm{width:2rem;height:2rem}.avatar--sm .avatar__initials{font-size:.75rem}.avatar--sm.avatar--bordered{outline:1.5px solid var(--surface-base, #fff);outline-offset:1.5px}.avatar--sm .avatar__status{width:.625rem;height:.625rem}.avatar--md{width:2.5rem;height:2.5rem}.avatar--md .avatar__initials{font-size:.875rem}.avatar--md.avatar--bordered{outline:2px solid var(--surface-base, #fff);outline-offset:2px}.avatar--md .avatar__status{width:.75rem;height:.75rem}.avatar--lg{width:3rem;height:3rem}.avatar--lg .avatar__initials{font-size:1rem}.avatar--lg.avatar--bordered{outline:2px solid var(--surface-base, #fff);outline-offset:2px}.avatar--lg .avatar__status{width:.875rem;height:.875rem}.avatar--xl{width:4rem;height:4rem}.avatar--xl .avatar__initials{font-size:1.25rem}.avatar--xl.avatar--bordered{outline:2.5px solid var(--surface-base, #fff);outline-offset:2.5px}.avatar--xl .avatar__status{width:1rem;height:1rem}.avatar--neutral{background-color:var(--surface-active, #e5e7eb);color:var(--text-base, #111827)}.avatar--primary{background-color:var(--info-100, #dbeafe);color:var(--info-700, #1d4ed8)}.avatar--secondary{background-color:var(--surface-muted, #f3f4f6);color:var(--text-secondary, #374151)}.avatar--danger{background-color:var(--danger-100, #fee2e2);color:var(--danger-700, #b91c1c)}.avatar--success{background-color:var(--success-100, #d1fae5);color:var(--success-800, #065f46)}.avatar--warning{background-color:var(--warning-100, #fef3c7);color:var(--warning-800, #92400e)}.avatar__img{width:100%;height:100%;object-fit:cover}.avatar__initials{font-weight:600;line-height:1;letter-spacing:.02em}.avatar__status{position:absolute;bottom:0;right:0;border-radius:9999px;border:1.5px solid var(--surface-base, #fff)}.avatar__status--online{background-color:var(--success-500, #10b981)}.avatar__status--offline{background-color:var(--gray-400, #9ca3af)}.avatar__status--away{background-color:var(--warning-500, #f59e0b)}.avatar__status--busy{background-color:var(--danger-500, #ef4444)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
799
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: AvatarComponent, isStandalone: true, selector: "ngx-ds-avatar", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, initials: { classPropertyName: "initials", publicName: "initials", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<span [class]=\"hostClasses()\">\n @if (src()) {\n <img [src]=\"src()\" [alt]=\"alt()\" class=\"avatar__img\" />\n } @else {\n <span class=\"avatar__initials\">{{ displayInitials() }}</span>\n }\n\n @if (status()) {\n <span class=\"avatar__status avatar__status--{{ status() }}\" aria-hidden=\"true\"></span>\n }\n</span>\n", styles: [".avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;-webkit-user-select:none;user-select:none;background-color:var(--surface-active, #e5e7eb)}.avatar--circle{border-radius:9999px}.avatar--square{border-radius:.375rem}.avatar--xs{width:1.5rem;height:1.5rem}.avatar--xs .avatar__initials{font-size:.625rem}.avatar--xs.avatar--bordered{outline:1px solid var(--surface-base, #fff);outline-offset:1px}.avatar--xs .avatar__status{width:.5rem;height:.5rem}.avatar--sm{width:2rem;height:2rem}.avatar--sm .avatar__initials{font-size:.75rem}.avatar--sm.avatar--bordered{outline:1.5px solid var(--surface-base, #fff);outline-offset:1.5px}.avatar--sm .avatar__status{width:.625rem;height:.625rem}.avatar--md{width:2.5rem;height:2.5rem}.avatar--md .avatar__initials{font-size:.875rem}.avatar--md.avatar--bordered{outline:2px solid var(--surface-base, #fff);outline-offset:2px}.avatar--md .avatar__status{width:.75rem;height:.75rem}.avatar--lg{width:3rem;height:3rem}.avatar--lg .avatar__initials{font-size:1rem}.avatar--lg.avatar--bordered{outline:2px solid var(--surface-base, #fff);outline-offset:2px}.avatar--lg .avatar__status{width:.875rem;height:.875rem}.avatar--xl{width:4rem;height:4rem}.avatar--xl .avatar__initials{font-size:1.25rem}.avatar--xl.avatar--bordered{outline:2.5px solid var(--surface-base, #fff);outline-offset:2.5px}.avatar--xl .avatar__status{width:1rem;height:1rem}.avatar--neutral{background-color:var(--surface-active, #e5e7eb);color:var(--text-base, #111827)}.avatar--primary{background-color:var(--info-100, #dbeafe);color:var(--info-700, #1d4ed8)}.avatar--secondary{background-color:var(--surface-muted, #f3f4f6);color:var(--text-secondary, #374151)}.avatar--danger{background-color:var(--danger-100, #fee2e2);color:var(--danger-700, #b91c1c)}.avatar--success{background-color:var(--success-100, #d1fae5);color:var(--success-800, #065f46)}.avatar--warning{background-color:var(--warning-100, #fef3c7);color:var(--warning-800, #92400e)}.avatar--info{background-color:var(--info-100, #dbeafe);color:var(--info-800, #1e40af)}.avatar__img{width:100%;height:100%;object-fit:cover}.avatar__initials{font-weight:600;line-height:1;letter-spacing:.02em}.avatar__status{position:absolute;bottom:0;right:0;border-radius:9999px;border:1.5px solid var(--surface-base, #fff)}.avatar__status--online{background-color:var(--success-500, #10b981)}.avatar__status--offline{background-color:var(--gray-400, #9ca3af)}.avatar__status--away{background-color:var(--warning-500, #f59e0b)}.avatar__status--busy{background-color:var(--danger-500, #ef4444)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
628
800
|
}
|
|
629
801
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: AvatarComponent, decorators: [{
|
|
630
802
|
type: Component,
|
|
631
|
-
args: [{ selector: 'ngx-ds-avatar', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [class]=\"hostClasses()\">\n @if (src()) {\n <img [src]=\"src()\" [alt]=\"alt()\" class=\"avatar__img\" />\n } @else {\n <span class=\"avatar__initials\">{{ displayInitials() }}</span>\n }\n\n @if (status()) {\n <span class=\"avatar__status avatar__status--{{ status() }}\" aria-hidden=\"true\"></span>\n }\n</span>\n", styles: [".avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;-webkit-user-select:none;user-select:none;background-color:var(--surface-active, #e5e7eb)}.avatar--circle{border-radius:9999px}.avatar--square{border-radius:.375rem}.avatar--xs{width:1.5rem;height:1.5rem}.avatar--xs .avatar__initials{font-size:.625rem}.avatar--xs.avatar--bordered{outline:1px solid var(--surface-base, #fff);outline-offset:1px}.avatar--xs .avatar__status{width:.5rem;height:.5rem}.avatar--sm{width:2rem;height:2rem}.avatar--sm .avatar__initials{font-size:.75rem}.avatar--sm.avatar--bordered{outline:1.5px solid var(--surface-base, #fff);outline-offset:1.5px}.avatar--sm .avatar__status{width:.625rem;height:.625rem}.avatar--md{width:2.5rem;height:2.5rem}.avatar--md .avatar__initials{font-size:.875rem}.avatar--md.avatar--bordered{outline:2px solid var(--surface-base, #fff);outline-offset:2px}.avatar--md .avatar__status{width:.75rem;height:.75rem}.avatar--lg{width:3rem;height:3rem}.avatar--lg .avatar__initials{font-size:1rem}.avatar--lg.avatar--bordered{outline:2px solid var(--surface-base, #fff);outline-offset:2px}.avatar--lg .avatar__status{width:.875rem;height:.875rem}.avatar--xl{width:4rem;height:4rem}.avatar--xl .avatar__initials{font-size:1.25rem}.avatar--xl.avatar--bordered{outline:2.5px solid var(--surface-base, #fff);outline-offset:2.5px}.avatar--xl .avatar__status{width:1rem;height:1rem}.avatar--neutral{background-color:var(--surface-active, #e5e7eb);color:var(--text-base, #111827)}.avatar--primary{background-color:var(--info-100, #dbeafe);color:var(--info-700, #1d4ed8)}.avatar--secondary{background-color:var(--surface-muted, #f3f4f6);color:var(--text-secondary, #374151)}.avatar--danger{background-color:var(--danger-100, #fee2e2);color:var(--danger-700, #b91c1c)}.avatar--success{background-color:var(--success-100, #d1fae5);color:var(--success-800, #065f46)}.avatar--warning{background-color:var(--warning-100, #fef3c7);color:var(--warning-800, #92400e)}.avatar__img{width:100%;height:100%;object-fit:cover}.avatar__initials{font-weight:600;line-height:1;letter-spacing:.02em}.avatar__status{position:absolute;bottom:0;right:0;border-radius:9999px;border:1.5px solid var(--surface-base, #fff)}.avatar__status--online{background-color:var(--success-500, #10b981)}.avatar__status--offline{background-color:var(--gray-400, #9ca3af)}.avatar__status--away{background-color:var(--warning-500, #f59e0b)}.avatar__status--busy{background-color:var(--danger-500, #ef4444)}\n"] }]
|
|
803
|
+
args: [{ selector: 'ngx-ds-avatar', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [class]=\"hostClasses()\">\n @if (src()) {\n <img [src]=\"src()\" [alt]=\"alt()\" class=\"avatar__img\" />\n } @else {\n <span class=\"avatar__initials\">{{ displayInitials() }}</span>\n }\n\n @if (status()) {\n <span class=\"avatar__status avatar__status--{{ status() }}\" aria-hidden=\"true\"></span>\n }\n</span>\n", styles: [".avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;-webkit-user-select:none;user-select:none;background-color:var(--surface-active, #e5e7eb)}.avatar--circle{border-radius:9999px}.avatar--square{border-radius:.375rem}.avatar--xs{width:1.5rem;height:1.5rem}.avatar--xs .avatar__initials{font-size:.625rem}.avatar--xs.avatar--bordered{outline:1px solid var(--surface-base, #fff);outline-offset:1px}.avatar--xs .avatar__status{width:.5rem;height:.5rem}.avatar--sm{width:2rem;height:2rem}.avatar--sm .avatar__initials{font-size:.75rem}.avatar--sm.avatar--bordered{outline:1.5px solid var(--surface-base, #fff);outline-offset:1.5px}.avatar--sm .avatar__status{width:.625rem;height:.625rem}.avatar--md{width:2.5rem;height:2.5rem}.avatar--md .avatar__initials{font-size:.875rem}.avatar--md.avatar--bordered{outline:2px solid var(--surface-base, #fff);outline-offset:2px}.avatar--md .avatar__status{width:.75rem;height:.75rem}.avatar--lg{width:3rem;height:3rem}.avatar--lg .avatar__initials{font-size:1rem}.avatar--lg.avatar--bordered{outline:2px solid var(--surface-base, #fff);outline-offset:2px}.avatar--lg .avatar__status{width:.875rem;height:.875rem}.avatar--xl{width:4rem;height:4rem}.avatar--xl .avatar__initials{font-size:1.25rem}.avatar--xl.avatar--bordered{outline:2.5px solid var(--surface-base, #fff);outline-offset:2.5px}.avatar--xl .avatar__status{width:1rem;height:1rem}.avatar--neutral{background-color:var(--surface-active, #e5e7eb);color:var(--text-base, #111827)}.avatar--primary{background-color:var(--info-100, #dbeafe);color:var(--info-700, #1d4ed8)}.avatar--secondary{background-color:var(--surface-muted, #f3f4f6);color:var(--text-secondary, #374151)}.avatar--danger{background-color:var(--danger-100, #fee2e2);color:var(--danger-700, #b91c1c)}.avatar--success{background-color:var(--success-100, #d1fae5);color:var(--success-800, #065f46)}.avatar--warning{background-color:var(--warning-100, #fef3c7);color:var(--warning-800, #92400e)}.avatar--info{background-color:var(--info-100, #dbeafe);color:var(--info-800, #1e40af)}.avatar__img{width:100%;height:100%;object-fit:cover}.avatar__initials{font-weight:600;line-height:1;letter-spacing:.02em}.avatar__status{position:absolute;bottom:0;right:0;border-radius:9999px;border:1.5px solid var(--surface-base, #fff)}.avatar__status--online{background-color:var(--success-500, #10b981)}.avatar__status--offline{background-color:var(--gray-400, #9ca3af)}.avatar__status--away{background-color:var(--warning-500, #f59e0b)}.avatar__status--busy{background-color:var(--danger-500, #ef4444)}\n"] }]
|
|
632
804
|
}], propDecorators: { src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: false }] }], alt: [{ type: i0.Input, args: [{ isSignal: true, alias: "alt", required: false }] }], initials: [{ type: i0.Input, args: [{ isSignal: true, alias: "initials", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }] } });
|
|
633
805
|
|
|
634
806
|
class BadgeComponent {
|
|
@@ -663,14 +835,14 @@ class BadgeComponent {
|
|
|
663
835
|
return parts.join(' ');
|
|
664
836
|
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
665
837
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: BadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
666
|
-
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 });
|
|
838
|
+
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)}.badge--info.badge--solid{background-color:var(--fill-info, #2563eb);color:var(--text-on-color, #fff);border-color:var(--fill-info, #2563eb)}.badge--info.badge--soft{background-color:var(--info-50, #eff6ff);color:var(--info-700, #1d4ed8);border-color:transparent}.badge--info.badge--outline{background-color:transparent;color:var(--fill-info, #2563eb);border-color:var(--fill-info, #2563eb)}.badge--info.badge--dot{background-color:var(--fill-info, #2563eb);border-color:var(--fill-info, #2563eb)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
667
839
|
}
|
|
668
840
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: BadgeComponent, decorators: [{
|
|
669
841
|
type: Component,
|
|
670
|
-
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"] }]
|
|
842
|
+
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)}.badge--info.badge--solid{background-color:var(--fill-info, #2563eb);color:var(--text-on-color, #fff);border-color:var(--fill-info, #2563eb)}.badge--info.badge--soft{background-color:var(--info-50, #eff6ff);color:var(--info-700, #1d4ed8);border-color:transparent}.badge--info.badge--outline{background-color:transparent;color:var(--fill-info, #2563eb);border-color:var(--fill-info, #2563eb)}.badge--info.badge--dot{background-color:var(--fill-info, #2563eb);border-color:var(--fill-info, #2563eb)}\n"] }]
|
|
671
843
|
}], 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 }] }] } });
|
|
672
844
|
|
|
673
|
-
const ICON_SIZE$
|
|
845
|
+
const ICON_SIZE$d = { sm: 12, md: 14, lg: 16 };
|
|
674
846
|
class TagComponent {
|
|
675
847
|
i18n = inject(NGX_DS_LABELS);
|
|
676
848
|
label = input.required(...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
@@ -694,16 +866,16 @@ class TagComponent {
|
|
|
694
866
|
classes.push('tag--rounded');
|
|
695
867
|
return classes.join(' ');
|
|
696
868
|
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
697
|
-
iconSize = computed(() => ICON_SIZE$
|
|
869
|
+
iconSize = computed(() => ICON_SIZE$d[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
698
870
|
onDismiss() {
|
|
699
871
|
this.dismissed.emit();
|
|
700
872
|
}
|
|
701
873
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
702
|
-
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 });
|
|
874
|
+
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)}.tag--info.tag--solid{background-color:var(--fill-info, #2563eb);border-color:var(--fill-info, #2563eb);color:var(--text-on-color, #fff)}.tag--info.tag--outline{background-color:transparent;border-color:var(--fill-info, #2563eb);color:var(--fill-info, #2563eb)}.tag--info.tag--soft{background-color:var(--info-100, #dbeafe);border-color:var(--info-100, #dbeafe);color:var(--info-800, #1e40af)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ngx-ds-icon", inputs: ["icon", "size", "color", "strokeWidth", "absoluteStrokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
703
875
|
}
|
|
704
876
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TagComponent, decorators: [{
|
|
705
877
|
type: Component,
|
|
706
|
-
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"] }]
|
|
878
|
+
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)}.tag--info.tag--solid{background-color:var(--fill-info, #2563eb);border-color:var(--fill-info, #2563eb);color:var(--text-on-color, #fff)}.tag--info.tag--outline{background-color:transparent;border-color:var(--fill-info, #2563eb);color:var(--fill-info, #2563eb)}.tag--info.tag--soft{background-color:var(--info-100, #dbeafe);border-color:var(--info-100, #dbeafe);color:var(--info-800, #1e40af)}\n"] }]
|
|
707
879
|
}], 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"] }] } });
|
|
708
880
|
|
|
709
881
|
class ProgressBarComponent {
|
|
@@ -745,14 +917,14 @@ class ProgressBarComponent {
|
|
|
745
917
|
.join(' ');
|
|
746
918
|
}, ...(ngDevMode ? [{ debugName: "barClasses" }] : /* istanbul ignore next */ []));
|
|
747
919
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
748
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ProgressBarComponent, isStandalone: true, selector: "ngx-ds-progress-bar", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", 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 }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, showValue: { classPropertyName: "showValue", publicName: "showValue", isSignal: true, isRequired: false, transformFunction: null }, striped: { classPropertyName: "striped", publicName: "striped", isSignal: true, isRequired: false, transformFunction: null }, animated: { classPropertyName: "animated", publicName: "animated", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, 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"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
920
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ProgressBarComponent, isStandalone: true, selector: "ngx-ds-progress-bar", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", 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 }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, showValue: { classPropertyName: "showValue", publicName: "showValue", isSignal: true, isRequired: false, transformFunction: null }, striped: { classPropertyName: "striped", publicName: "striped", isSignal: true, isRequired: false, transformFunction: null }, animated: { classPropertyName: "animated", publicName: "animated", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, 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)}.progress--info .progress__bar{background-color:var(--info-500, #3b82f6)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
749
921
|
}
|
|
750
922
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ProgressBarComponent, decorators: [{
|
|
751
923
|
type: Component,
|
|
752
|
-
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"] }]
|
|
924
|
+
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)}.progress--info .progress__bar{background-color:var(--info-500, #3b82f6)}\n"] }]
|
|
753
925
|
}], 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 }] }] } });
|
|
754
926
|
|
|
755
|
-
const ICON_SIZE$
|
|
927
|
+
const ICON_SIZE$c = { sm: 14, md: 16, lg: 18 };
|
|
756
928
|
class MenuButtonComponent {
|
|
757
929
|
iconLeft = input(undefined, ...(ngDevMode ? [{ debugName: "iconLeft" }] : /* istanbul ignore next */ []));
|
|
758
930
|
iconRight = input(undefined, ...(ngDevMode ? [{ debugName: "iconRight" }] : /* istanbul ignore next */ []));
|
|
@@ -767,13 +939,13 @@ class MenuButtonComponent {
|
|
|
767
939
|
classes.push('menu-btn--full');
|
|
768
940
|
return classes.join(' ');
|
|
769
941
|
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
770
|
-
iconSize = computed(() => ICON_SIZE$
|
|
942
|
+
iconSize = computed(() => ICON_SIZE$c[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
771
943
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: MenuButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
772
|
-
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 });
|
|
944
|
+
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--info{color:var(--fill-info, #2563eb)}.menu-btn--info:hover:not(:disabled){background:var(--info-50, #eff6ff)}.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 });
|
|
773
945
|
}
|
|
774
946
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: MenuButtonComponent, decorators: [{
|
|
775
947
|
type: Component,
|
|
776
|
-
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"] }]
|
|
948
|
+
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--info{color:var(--fill-info, #2563eb)}.menu-btn--info:hover:not(:disabled){background:var(--info-50, #eff6ff)}.menu-btn__icon{flex-shrink:0}\n"] }]
|
|
777
949
|
}], 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 }] }] } });
|
|
778
950
|
|
|
779
951
|
class TooltipBoxComponent {
|
|
@@ -950,7 +1122,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
950
1122
|
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"] }]
|
|
951
1123
|
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
952
1124
|
|
|
953
|
-
let nextId$
|
|
1125
|
+
let nextId$l = 0;
|
|
954
1126
|
class CheckboxComponent {
|
|
955
1127
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
956
1128
|
/** Accessible name when there is no visible `label`. */
|
|
@@ -960,9 +1132,10 @@ class CheckboxComponent {
|
|
|
960
1132
|
indeterminate = input(false, ...(ngDevMode ? [{ debugName: "indeterminate" }] : /* istanbul ignore next */ []));
|
|
961
1133
|
labelPosition = input('right', ...(ngDevMode ? [{ debugName: "labelPosition" }] : /* istanbul ignore next */ []));
|
|
962
1134
|
checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
963
|
-
id = `ngx-checkbox-${nextId$
|
|
964
|
-
|
|
965
|
-
|
|
1135
|
+
id = `ngx-checkbox-${nextId$l++}`;
|
|
1136
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1137
|
+
#cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "#cvaDisabled" }] : /* istanbul ignore next */ []));
|
|
1138
|
+
isDisabled = computed(() => this.disabled() || this.#cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
966
1139
|
onChange = () => { };
|
|
967
1140
|
onTouched = () => { };
|
|
968
1141
|
hostClasses = computed(() => {
|
|
@@ -971,7 +1144,7 @@ class CheckboxComponent {
|
|
|
971
1144
|
classes.push('checkbox--checked');
|
|
972
1145
|
if (this.indeterminate() && !this.checked())
|
|
973
1146
|
classes.push('checkbox--indeterminate');
|
|
974
|
-
if (this
|
|
1147
|
+
if (this.isDisabled())
|
|
975
1148
|
classes.push('checkbox--disabled');
|
|
976
1149
|
return classes.join(' ');
|
|
977
1150
|
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
@@ -991,16 +1164,16 @@ class CheckboxComponent {
|
|
|
991
1164
|
this.onTouched = fn;
|
|
992
1165
|
}
|
|
993
1166
|
setDisabledState(disabled) {
|
|
994
|
-
this.#
|
|
1167
|
+
this.#cvaDisabled.set(disabled);
|
|
995
1168
|
}
|
|
996
1169
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
997
|
-
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: [
|
|
1170
|
+
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 }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, providers: [
|
|
998
1171
|
{
|
|
999
1172
|
provide: NG_VALUE_ACCESSOR,
|
|
1000
1173
|
useExisting: forwardRef(() => CheckboxComponent),
|
|
1001
1174
|
multi: true,
|
|
1002
1175
|
},
|
|
1003
|
-
], 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 });
|
|
1176
|
+
], 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)}.checkbox--info{--ngx-checkbox-color: var(--info-500, #3b82f6)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1004
1177
|
}
|
|
1005
1178
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
1006
1179
|
type: Component,
|
|
@@ -1010,10 +1183,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
1010
1183
|
useExisting: forwardRef(() => CheckboxComponent),
|
|
1011
1184
|
multi: true,
|
|
1012
1185
|
},
|
|
1013
|
-
], 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"] }]
|
|
1014
|
-
}], 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"] }] } });
|
|
1186
|
+
], 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)}.checkbox--info{--ngx-checkbox-color: var(--info-500, #3b82f6)}\n"] }]
|
|
1187
|
+
}], 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"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
1015
1188
|
|
|
1016
|
-
let nextId$
|
|
1189
|
+
let nextId$k = 0;
|
|
1017
1190
|
class RadioComponent {
|
|
1018
1191
|
value = input.required(...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1019
1192
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
@@ -1029,7 +1202,7 @@ class RadioComponent {
|
|
|
1029
1202
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1030
1203
|
/** Emits this radio's `value` when the user selects it. */
|
|
1031
1204
|
valueSelect = output();
|
|
1032
|
-
id = `ngx-radio-${nextId$
|
|
1205
|
+
id = `ngx-radio-${nextId$k++}`;
|
|
1033
1206
|
#modelValue = signal(null, ...(ngDevMode ? [{ debugName: "#modelValue" }] : /* istanbul ignore next */ []));
|
|
1034
1207
|
#formDisabled = signal(false, ...(ngDevMode ? [{ debugName: "#formDisabled" }] : /* istanbul ignore next */ []));
|
|
1035
1208
|
isDisabled = computed(() => this.disabled() || this.#formDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
@@ -1072,7 +1245,7 @@ class RadioComponent {
|
|
|
1072
1245
|
useExisting: forwardRef(() => RadioComponent),
|
|
1073
1246
|
multi: true,
|
|
1074
1247
|
},
|
|
1075
|
-
], ngImport: i0, 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"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1248
|
+
], ngImport: i0, 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)}.radio--info{--ngx-radio-color: var(--info-500, #3b82f6)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1076
1249
|
}
|
|
1077
1250
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: RadioComponent, decorators: [{
|
|
1078
1251
|
type: Component,
|
|
@@ -1082,10 +1255,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
1082
1255
|
useExisting: forwardRef(() => RadioComponent),
|
|
1083
1256
|
multi: true,
|
|
1084
1257
|
},
|
|
1085
|
-
], 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"] }]
|
|
1258
|
+
], 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)}.radio--info{--ngx-radio-color: var(--info-500, #3b82f6)}\n"] }]
|
|
1086
1259
|
}], 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"] }] } });
|
|
1087
1260
|
|
|
1088
|
-
let nextId$
|
|
1261
|
+
let nextId$j = 0;
|
|
1089
1262
|
class SwitchComponent {
|
|
1090
1263
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1091
1264
|
/** Accessible name when there is no visible `label`. */
|
|
@@ -1096,16 +1269,17 @@ class SwitchComponent {
|
|
|
1096
1269
|
labelOn = input('', ...(ngDevMode ? [{ debugName: "labelOn" }] : /* istanbul ignore next */ []));
|
|
1097
1270
|
labelOff = input('', ...(ngDevMode ? [{ debugName: "labelOff" }] : /* istanbul ignore next */ []));
|
|
1098
1271
|
checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
1099
|
-
id = `ngx-switch-${nextId$
|
|
1100
|
-
|
|
1101
|
-
|
|
1272
|
+
id = `ngx-switch-${nextId$j++}`;
|
|
1273
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1274
|
+
#cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "#cvaDisabled" }] : /* istanbul ignore next */ []));
|
|
1275
|
+
isDisabled = computed(() => this.disabled() || this.#cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
1102
1276
|
onChange = () => { };
|
|
1103
1277
|
onTouched = () => { };
|
|
1104
1278
|
hostClasses = computed(() => {
|
|
1105
1279
|
const classes = ['switch', `switch--${this.size()}`, `switch--${this.color()}`];
|
|
1106
1280
|
if (this.checked())
|
|
1107
1281
|
classes.push('switch--checked');
|
|
1108
|
-
if (this
|
|
1282
|
+
if (this.isDisabled())
|
|
1109
1283
|
classes.push('switch--disabled');
|
|
1110
1284
|
return classes.join(' ');
|
|
1111
1285
|
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
@@ -1126,16 +1300,16 @@ class SwitchComponent {
|
|
|
1126
1300
|
this.onTouched = fn;
|
|
1127
1301
|
}
|
|
1128
1302
|
setDisabledState(disabled) {
|
|
1129
|
-
this.#
|
|
1303
|
+
this.#cvaDisabled.set(disabled);
|
|
1130
1304
|
}
|
|
1131
1305
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: SwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1132
|
-
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: [
|
|
1306
|
+
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 }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, providers: [
|
|
1133
1307
|
{
|
|
1134
1308
|
provide: NG_VALUE_ACCESSOR,
|
|
1135
1309
|
useExisting: forwardRef(() => SwitchComponent),
|
|
1136
1310
|
multi: true,
|
|
1137
1311
|
},
|
|
1138
|
-
], 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 });
|
|
1312
|
+
], 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)}.switch--info{--ngx-switch-color: var(--info-500, #3b82f6)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1139
1313
|
}
|
|
1140
1314
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: SwitchComponent, decorators: [{
|
|
1141
1315
|
type: Component,
|
|
@@ -1145,8 +1319,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
1145
1319
|
useExisting: forwardRef(() => SwitchComponent),
|
|
1146
1320
|
multi: true,
|
|
1147
1321
|
},
|
|
1148
|
-
], 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"] }]
|
|
1149
|
-
}], 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"] }] } });
|
|
1322
|
+
], 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)}.switch--info{--ngx-switch-color: var(--info-500, #3b82f6)}\n"] }]
|
|
1323
|
+
}], 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"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
1150
1324
|
|
|
1151
1325
|
/**
|
|
1152
1326
|
* Whether a control shows its error state: always with an explicit `errorMessage`,
|
|
@@ -1167,8 +1341,8 @@ function fieldErrorText(explicit, errors, touched) {
|
|
|
1167
1341
|
return errors.find((e) => e.message)?.message ?? '';
|
|
1168
1342
|
}
|
|
1169
1343
|
|
|
1170
|
-
const ICON_SIZE$
|
|
1171
|
-
let nextId$
|
|
1344
|
+
const ICON_SIZE$b = { sm: 14, md: 16, lg: 18 };
|
|
1345
|
+
let nextId$i = 0;
|
|
1172
1346
|
class InputComponent {
|
|
1173
1347
|
i18n = inject(NGX_DS_LABELS);
|
|
1174
1348
|
// ── Configuration ────────────────────────────────────────────
|
|
@@ -1187,13 +1361,14 @@ class InputComponent {
|
|
|
1187
1361
|
readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
1188
1362
|
// ── Value — two-way bindable (signal forms) ──────────────────
|
|
1189
1363
|
value = model('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1190
|
-
id = `ngx-input-${nextId$
|
|
1364
|
+
id = `ngx-input-${nextId$i++}`;
|
|
1191
1365
|
messageId = `${this.id}-message`;
|
|
1192
1366
|
// ── Internal state ───────────────────────────────────────────
|
|
1193
|
-
|
|
1367
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1368
|
+
#cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "#cvaDisabled" }] : /* istanbul ignore next */ []));
|
|
1194
1369
|
#focused = signal(false, ...(ngDevMode ? [{ debugName: "#focused" }] : /* istanbul ignore next */ []));
|
|
1195
1370
|
#showPassword = signal(false, ...(ngDevMode ? [{ debugName: "#showPassword" }] : /* istanbul ignore next */ []));
|
|
1196
|
-
isDisabled = this
|
|
1371
|
+
isDisabled = computed(() => this.disabled() || this.#cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
1197
1372
|
isFocused = this.#focused.asReadonly();
|
|
1198
1373
|
eyeIcon = computed(() => (this.#showPassword() ? EyeOff : Eye), ...(ngDevMode ? [{ debugName: "eyeIcon" }] : /* istanbul ignore next */ []));
|
|
1199
1374
|
effectiveType = computed(() => this.type() === 'password' && this.#showPassword() ? 'text' : this.type(), ...(ngDevMode ? [{ debugName: "effectiveType" }] : /* istanbul ignore next */ []));
|
|
@@ -1201,7 +1376,7 @@ class InputComponent {
|
|
|
1201
1376
|
isFloating = computed(() => this.#focused() || this.value().length > 0, ...(ngDevMode ? [{ debugName: "isFloating" }] : /* istanbul ignore next */ []));
|
|
1202
1377
|
hasError = computed(() => fieldHasError(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "hasError" }] : /* istanbul ignore next */ []));
|
|
1203
1378
|
errorText = computed(() => fieldErrorText(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
1204
|
-
iconSize = computed(() => ICON_SIZE$
|
|
1379
|
+
iconSize = computed(() => ICON_SIZE$b[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
1205
1380
|
// In floating mode the placeholder only appears once the label has floated up
|
|
1206
1381
|
effectivePlaceholder = computed(() => this.floatingLabel() && this.label() && !this.isFloating() ? '' : this.placeholder(), ...(ngDevMode ? [{ debugName: "effectivePlaceholder" }] : /* istanbul ignore next */ []));
|
|
1207
1382
|
fieldClasses = computed(() => {
|
|
@@ -1258,10 +1433,10 @@ class InputComponent {
|
|
|
1258
1433
|
this.onTouched = fn;
|
|
1259
1434
|
}
|
|
1260
1435
|
setDisabledState(disabled) {
|
|
1261
|
-
this.#
|
|
1436
|
+
this.#cvaDisabled.set(disabled);
|
|
1262
1437
|
}
|
|
1263
1438
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1264
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: InputComponent, isStandalone: true, selector: "ngx-ds-input", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, floatingLabel: { classPropertyName: "floatingLabel", publicName: "floatingLabel", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", 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 }, iconLeft: { classPropertyName: "iconLeft", publicName: "iconLeft", isSignal: true, isRequired: false, transformFunction: null }, iconRight: { classPropertyName: "iconRight", publicName: "iconRight", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [
|
|
1439
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: InputComponent, isStandalone: true, selector: "ngx-ds-input", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, floatingLabel: { classPropertyName: "floatingLabel", publicName: "floatingLabel", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", 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 }, iconLeft: { classPropertyName: "iconLeft", publicName: "iconLeft", isSignal: true, isRequired: false, transformFunction: null }, iconRight: { classPropertyName: "iconRight", publicName: "iconRight", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [
|
|
1265
1440
|
{
|
|
1266
1441
|
provide: NG_VALUE_ACCESSOR,
|
|
1267
1442
|
useExisting: forwardRef(() => InputComponent),
|
|
@@ -1278,9 +1453,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
1278
1453
|
multi: true,
|
|
1279
1454
|
},
|
|
1280
1455
|
], 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"] }]
|
|
1281
|
-
}], 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"] }] } });
|
|
1456
|
+
}], 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"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
1282
1457
|
|
|
1283
|
-
let nextId$
|
|
1458
|
+
let nextId$h = 0;
|
|
1284
1459
|
class TextareaComponent {
|
|
1285
1460
|
// ── Configuration ────────────────────────────────────────────
|
|
1286
1461
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
@@ -1299,12 +1474,13 @@ class TextareaComponent {
|
|
|
1299
1474
|
showCount = input(false, ...(ngDevMode ? [{ debugName: "showCount" }] : /* istanbul ignore next */ []));
|
|
1300
1475
|
// ── Value ─────────────────────────────────────────────────────
|
|
1301
1476
|
value = model('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1302
|
-
id = `ngx-textarea-${nextId$
|
|
1477
|
+
id = `ngx-textarea-${nextId$h++}`;
|
|
1303
1478
|
messageId = `${this.id}-message`;
|
|
1304
1479
|
// ── Internal state ────────────────────────────────────────────
|
|
1305
|
-
|
|
1480
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1481
|
+
#cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "#cvaDisabled" }] : /* istanbul ignore next */ []));
|
|
1306
1482
|
#focused = signal(false, ...(ngDevMode ? [{ debugName: "#focused" }] : /* istanbul ignore next */ []));
|
|
1307
|
-
isDisabled = this
|
|
1483
|
+
isDisabled = computed(() => this.disabled() || this.#cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
1308
1484
|
isFocused = this.#focused.asReadonly();
|
|
1309
1485
|
// ── Derived ───────────────────────────────────────────────────
|
|
1310
1486
|
hasError = computed(() => fieldHasError(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "hasError" }] : /* istanbul ignore next */ []));
|
|
@@ -1362,10 +1538,10 @@ class TextareaComponent {
|
|
|
1362
1538
|
this.onTouched = fn;
|
|
1363
1539
|
}
|
|
1364
1540
|
setDisabledState(disabled) {
|
|
1365
|
-
this.#
|
|
1541
|
+
this.#cvaDisabled.set(disabled);
|
|
1366
1542
|
}
|
|
1367
1543
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1368
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TextareaComponent, isStandalone: true, selector: "ngx-ds-textarea", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, floatingLabel: { classPropertyName: "floatingLabel", publicName: "floatingLabel", 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 }, resize: { classPropertyName: "resize", publicName: "resize", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", 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 }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, showCount: { classPropertyName: "showCount", publicName: "showCount", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [
|
|
1544
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TextareaComponent, isStandalone: true, selector: "ngx-ds-textarea", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, floatingLabel: { classPropertyName: "floatingLabel", publicName: "floatingLabel", 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 }, resize: { classPropertyName: "resize", publicName: "resize", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", 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 }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, showCount: { classPropertyName: "showCount", publicName: "showCount", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [
|
|
1369
1545
|
{
|
|
1370
1546
|
provide: NG_VALUE_ACCESSOR,
|
|
1371
1547
|
useExisting: forwardRef(() => TextareaComponent),
|
|
@@ -1382,7 +1558,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
1382
1558
|
multi: true,
|
|
1383
1559
|
},
|
|
1384
1560
|
], 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"] }]
|
|
1385
|
-
}], 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"] }] } });
|
|
1561
|
+
}], 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"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
1386
1562
|
|
|
1387
1563
|
/**
|
|
1388
1564
|
* Escucha clicks en `document` e invoca el callback cuando el click ocurre
|
|
@@ -1457,8 +1633,8 @@ function moveOptionFocus(event) {
|
|
|
1457
1633
|
return true;
|
|
1458
1634
|
}
|
|
1459
1635
|
|
|
1460
|
-
const ICON_SIZE$
|
|
1461
|
-
let nextId$
|
|
1636
|
+
const ICON_SIZE$a = { sm: 14, md: 16, lg: 18 };
|
|
1637
|
+
let nextId$g = 0;
|
|
1462
1638
|
class SelectComponent {
|
|
1463
1639
|
i18n = inject(NGX_DS_LABELS);
|
|
1464
1640
|
// ── Configuration ──────────────────────────────────────────
|
|
@@ -1476,7 +1652,7 @@ class SelectComponent {
|
|
|
1476
1652
|
touched = input(false, ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
1477
1653
|
// ── Value ─────────────────────────────────────────────────
|
|
1478
1654
|
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1479
|
-
id = `ngx-select-${nextId$
|
|
1655
|
+
id = `ngx-select-${nextId$g++}`;
|
|
1480
1656
|
messageId = `${this.id}-message`;
|
|
1481
1657
|
// ── Icons ──────────────────────────────────────────────────
|
|
1482
1658
|
ChevronDown = ChevronDown;
|
|
@@ -1487,12 +1663,13 @@ class SelectComponent {
|
|
|
1487
1663
|
// ── Internal state ─────────────────────────────────────────
|
|
1488
1664
|
#open = signal(false, ...(ngDevMode ? [{ debugName: "#open" }] : /* istanbul ignore next */ []));
|
|
1489
1665
|
#search = signal('', ...(ngDevMode ? [{ debugName: "#search" }] : /* istanbul ignore next */ []));
|
|
1490
|
-
|
|
1666
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1667
|
+
#cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "#cvaDisabled" }] : /* istanbul ignore next */ []));
|
|
1491
1668
|
#focused = signal(false, ...(ngDevMode ? [{ debugName: "#focused" }] : /* istanbul ignore next */ []));
|
|
1492
1669
|
isOpen = this.#open.asReadonly();
|
|
1493
|
-
isDisabled = this
|
|
1670
|
+
isDisabled = computed(() => this.disabled() || this.#cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
1494
1671
|
searchText = this.#search.asReadonly();
|
|
1495
|
-
iconSize = computed(() => ICON_SIZE$
|
|
1672
|
+
iconSize = computed(() => ICON_SIZE$a[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
1496
1673
|
hasError = computed(() => fieldHasError(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "hasError" }] : /* istanbul ignore next */ []));
|
|
1497
1674
|
errorText = computed(() => fieldErrorText(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
1498
1675
|
// ── Derived ────────────────────────────────────────────────
|
|
@@ -1675,10 +1852,10 @@ class SelectComponent {
|
|
|
1675
1852
|
this.onTouched = fn;
|
|
1676
1853
|
}
|
|
1677
1854
|
setDisabledState(disabled) {
|
|
1678
|
-
this.#
|
|
1855
|
+
this.#cvaDisabled.set(disabled);
|
|
1679
1856
|
}
|
|
1680
1857
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1681
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: SelectComponent, isStandalone: true, selector: "ngx-ds-select", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, floatingLabel: { classPropertyName: "floatingLabel", publicName: "floatingLabel", 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 }, 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 }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [
|
|
1858
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: SelectComponent, isStandalone: true, selector: "ngx-ds-select", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, floatingLabel: { classPropertyName: "floatingLabel", publicName: "floatingLabel", 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 }, 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 }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [
|
|
1682
1859
|
{
|
|
1683
1860
|
provide: NG_VALUE_ACCESSOR,
|
|
1684
1861
|
useExisting: forwardRef(() => SelectComponent),
|
|
@@ -1695,10 +1872,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
1695
1872
|
multi: true,
|
|
1696
1873
|
},
|
|
1697
1874
|
], 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"] }]
|
|
1698
|
-
}], 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 }] }] } });
|
|
1875
|
+
}], 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"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], triggerRef: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }] } });
|
|
1699
1876
|
|
|
1700
|
-
const ICON_SIZE$
|
|
1701
|
-
let nextId$
|
|
1877
|
+
const ICON_SIZE$9 = { sm: 14, md: 16, lg: 18 };
|
|
1878
|
+
let nextId$f = 0;
|
|
1702
1879
|
class DropdownComponent {
|
|
1703
1880
|
i18n = inject(NGX_DS_LABELS);
|
|
1704
1881
|
// ── Configuration ──────────────────────────────────────────
|
|
@@ -1714,7 +1891,7 @@ class DropdownComponent {
|
|
|
1714
1891
|
touched = input(false, ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
1715
1892
|
// ── Value ─────────────────────────────────────────────────
|
|
1716
1893
|
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1717
|
-
id = `ngx-dropdown-${nextId$
|
|
1894
|
+
id = `ngx-dropdown-${nextId$f++}`;
|
|
1718
1895
|
messageId = `${this.id}-message`;
|
|
1719
1896
|
// ── Icons ──────────────────────────────────────────────────
|
|
1720
1897
|
ChevronDown = ChevronDown;
|
|
@@ -1723,11 +1900,12 @@ class DropdownComponent {
|
|
|
1723
1900
|
XIcon = X;
|
|
1724
1901
|
// ── Internal state ─────────────────────────────────────────
|
|
1725
1902
|
#open = signal(false, ...(ngDevMode ? [{ debugName: "#open" }] : /* istanbul ignore next */ []));
|
|
1726
|
-
|
|
1903
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1904
|
+
#cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "#cvaDisabled" }] : /* istanbul ignore next */ []));
|
|
1727
1905
|
#focused = signal(false, ...(ngDevMode ? [{ debugName: "#focused" }] : /* istanbul ignore next */ []));
|
|
1728
1906
|
isOpen = this.#open.asReadonly();
|
|
1729
|
-
isDisabled = this
|
|
1730
|
-
iconSize = computed(() => ICON_SIZE$
|
|
1907
|
+
isDisabled = computed(() => this.disabled() || this.#cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
1908
|
+
iconSize = computed(() => ICON_SIZE$9[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
1731
1909
|
hasError = computed(() => fieldHasError(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "hasError" }] : /* istanbul ignore next */ []));
|
|
1732
1910
|
errorText = computed(() => fieldErrorText(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
1733
1911
|
hasValue = computed(() => this.value() !== null && this.value() !== undefined, ...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
|
|
@@ -1847,10 +2025,10 @@ class DropdownComponent {
|
|
|
1847
2025
|
this.onTouched = fn;
|
|
1848
2026
|
}
|
|
1849
2027
|
setDisabledState(disabled) {
|
|
1850
|
-
this.#
|
|
2028
|
+
this.#cvaDisabled.set(disabled);
|
|
1851
2029
|
}
|
|
1852
2030
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1853
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: DropdownComponent, isStandalone: true, selector: "ngx-ds-dropdown", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, floatingLabel: { classPropertyName: "floatingLabel", publicName: "floatingLabel", 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 }, 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 }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [
|
|
2031
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: DropdownComponent, isStandalone: true, selector: "ngx-ds-dropdown", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, floatingLabel: { classPropertyName: "floatingLabel", publicName: "floatingLabel", 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 }, 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 }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [
|
|
1854
2032
|
{
|
|
1855
2033
|
provide: NG_VALUE_ACCESSOR,
|
|
1856
2034
|
useExisting: forwardRef(() => DropdownComponent),
|
|
@@ -1867,10 +2045,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
1867
2045
|
multi: true,
|
|
1868
2046
|
},
|
|
1869
2047
|
], 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"] }]
|
|
1870
|
-
}], 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 }] }] } });
|
|
2048
|
+
}], 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"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], triggerRef: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }] } });
|
|
1871
2049
|
|
|
1872
|
-
const ICON_SIZE$
|
|
1873
|
-
let nextId$
|
|
2050
|
+
const ICON_SIZE$8 = { sm: 14, md: 16, lg: 18 };
|
|
2051
|
+
let nextId$e = 0;
|
|
1874
2052
|
class AutocompleteComponent {
|
|
1875
2053
|
i18n = inject(NGX_DS_LABELS);
|
|
1876
2054
|
sanitizer = inject(DomSanitizer);
|
|
@@ -1902,7 +2080,7 @@ class AutocompleteComponent {
|
|
|
1902
2080
|
// ── Outputs ──────────────────────────────────────────────
|
|
1903
2081
|
/** Emits the current search string (debounced) — use for async data loading */
|
|
1904
2082
|
searchChange = output();
|
|
1905
|
-
id = `ngx-autocomplete-${nextId$
|
|
2083
|
+
id = `ngx-autocomplete-${nextId$e++}`;
|
|
1906
2084
|
messageId = `${this.id}-message`;
|
|
1907
2085
|
// ── Icons ────────────────────────────────────────────────
|
|
1908
2086
|
SearchIcon = Search;
|
|
@@ -1910,16 +2088,17 @@ class AutocompleteComponent {
|
|
|
1910
2088
|
// ── Internal state ────────────────────────────────────────
|
|
1911
2089
|
#open = signal(false, ...(ngDevMode ? [{ debugName: "#open" }] : /* istanbul ignore next */ []));
|
|
1912
2090
|
#inputText = signal('', ...(ngDevMode ? [{ debugName: "#inputText" }] : /* istanbul ignore next */ []));
|
|
1913
|
-
|
|
2091
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
2092
|
+
#cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "#cvaDisabled" }] : /* istanbul ignore next */ []));
|
|
1914
2093
|
#focused = signal(false, ...(ngDevMode ? [{ debugName: "#focused" }] : /* istanbul ignore next */ []));
|
|
1915
2094
|
isOpen = this.#open.asReadonly();
|
|
1916
2095
|
inputText = this.#inputText.asReadonly();
|
|
1917
|
-
isDisabled = this
|
|
2096
|
+
isDisabled = computed(() => this.disabled() || this.#cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
1918
2097
|
isFocused = this.#focused.asReadonly();
|
|
1919
2098
|
searchTimer = null;
|
|
1920
2099
|
inputEl = null;
|
|
1921
2100
|
// ── Derived ──────────────────────────────────────────────
|
|
1922
|
-
iconSize = computed(() => ICON_SIZE$
|
|
2101
|
+
iconSize = computed(() => ICON_SIZE$8[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
1923
2102
|
hasError = computed(() => fieldHasError(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "hasError" }] : /* istanbul ignore next */ []));
|
|
1924
2103
|
errorText = computed(() => fieldErrorText(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
1925
2104
|
hasValue = computed(() => this.value() !== null && this.value() !== undefined, ...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
|
|
@@ -2092,10 +2271,10 @@ class AutocompleteComponent {
|
|
|
2092
2271
|
this.onTouched = fn;
|
|
2093
2272
|
}
|
|
2094
2273
|
setDisabledState(disabled) {
|
|
2095
|
-
this.#
|
|
2274
|
+
this.#cvaDisabled.set(disabled);
|
|
2096
2275
|
}
|
|
2097
2276
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: AutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2098
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: AutocompleteComponent, isStandalone: true, selector: "ngx-ds-autocomplete", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, floatingLabel: { classPropertyName: "floatingLabel", publicName: "floatingLabel", 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 }, 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 }, iconLeft: { classPropertyName: "iconLeft", publicName: "iconLeft", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, minChars: { classPropertyName: "minChars", publicName: "minChars", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null }, allowCustom: { classPropertyName: "allowCustom", publicName: "allowCustom", isSignal: true, isRequired: false, transformFunction: null }, showAllOnFocus: { classPropertyName: "showAllOnFocus", publicName: "showAllOnFocus", isSignal: true, isRequired: false, transformFunction: null }, noResultsText: { classPropertyName: "noResultsText", publicName: "noResultsText", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", searchChange: "searchChange" }, providers: [
|
|
2277
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: AutocompleteComponent, isStandalone: true, selector: "ngx-ds-autocomplete", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, floatingLabel: { classPropertyName: "floatingLabel", publicName: "floatingLabel", 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 }, 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 }, iconLeft: { classPropertyName: "iconLeft", publicName: "iconLeft", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, minChars: { classPropertyName: "minChars", publicName: "minChars", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null }, allowCustom: { classPropertyName: "allowCustom", publicName: "allowCustom", isSignal: true, isRequired: false, transformFunction: null }, showAllOnFocus: { classPropertyName: "showAllOnFocus", publicName: "showAllOnFocus", isSignal: true, isRequired: false, transformFunction: null }, noResultsText: { classPropertyName: "noResultsText", publicName: "noResultsText", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", searchChange: "searchChange" }, providers: [
|
|
2099
2278
|
{
|
|
2100
2279
|
provide: NG_VALUE_ACCESSOR,
|
|
2101
2280
|
useExisting: forwardRef(() => AutocompleteComponent),
|
|
@@ -2112,7 +2291,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
2112
2291
|
multi: true,
|
|
2113
2292
|
},
|
|
2114
2293
|
], 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"] }]
|
|
2115
|
-
}], 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"] }] } });
|
|
2294
|
+
}], 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"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
2116
2295
|
|
|
2117
2296
|
/** True when both dates fall on the same calendar day. */
|
|
2118
2297
|
function isSameDay(a, b) {
|
|
@@ -2173,8 +2352,8 @@ function moveFocusDate(date, event, firstDayOfWeek = 1) {
|
|
|
2173
2352
|
}
|
|
2174
2353
|
}
|
|
2175
2354
|
|
|
2176
|
-
const ICON_SIZE$
|
|
2177
|
-
let nextId$
|
|
2355
|
+
const ICON_SIZE$7 = { sm: 14, md: 16, lg: 18 };
|
|
2356
|
+
let nextId$d = 0;
|
|
2178
2357
|
class DatepickerComponent {
|
|
2179
2358
|
i18n = inject(NGX_DS_LABELS);
|
|
2180
2359
|
// ── Configuration ─────────────────────────────────────────
|
|
@@ -2195,7 +2374,7 @@ class DatepickerComponent {
|
|
|
2195
2374
|
showToday = input(true, ...(ngDevMode ? [{ debugName: "showToday" }] : /* istanbul ignore next */ []));
|
|
2196
2375
|
// ── Value ────────────────────────────────────────────────
|
|
2197
2376
|
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2198
|
-
id = `ngx-datepicker-${nextId$
|
|
2377
|
+
id = `ngx-datepicker-${nextId$d++}`;
|
|
2199
2378
|
messageId = `${this.id}-message`;
|
|
2200
2379
|
// ── Icons ────────────────────────────────────────────────
|
|
2201
2380
|
CalendarIcon = Calendar;
|
|
@@ -2205,7 +2384,8 @@ class DatepickerComponent {
|
|
|
2205
2384
|
// ── Internal state ────────────────────────────────────────
|
|
2206
2385
|
#open = signal(false, ...(ngDevMode ? [{ debugName: "#open" }] : /* istanbul ignore next */ []));
|
|
2207
2386
|
#focused = signal(false, ...(ngDevMode ? [{ debugName: "#focused" }] : /* istanbul ignore next */ []));
|
|
2208
|
-
|
|
2387
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
2388
|
+
#cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "#cvaDisabled" }] : /* istanbul ignore next */ []));
|
|
2209
2389
|
/** Day that owns the roving tabindex in the grid; the visible month follows it. */
|
|
2210
2390
|
#focusedDate = signal(startOfDay(new Date()), ...(ngDevMode ? [{ debugName: "#focusedDate" }] : /* istanbul ignore next */ []));
|
|
2211
2391
|
#viewMonth = computed(() => this.#focusedDate().getMonth(), ...(ngDevMode ? [{ debugName: "#viewMonth" }] : /* istanbul ignore next */ []));
|
|
@@ -2215,10 +2395,10 @@ class DatepickerComponent {
|
|
|
2215
2395
|
#months = monthNames(this.#locale);
|
|
2216
2396
|
#weekdays = weekdayNames(this.#locale);
|
|
2217
2397
|
isOpen = this.#open.asReadonly();
|
|
2218
|
-
isDisabled = this
|
|
2398
|
+
isDisabled = computed(() => this.disabled() || this.#cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
2219
2399
|
isFocused = this.#focused.asReadonly();
|
|
2220
2400
|
// ── Derived ───────────────────────────────────────────────
|
|
2221
|
-
iconSize = computed(() => ICON_SIZE$
|
|
2401
|
+
iconSize = computed(() => ICON_SIZE$7[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
2222
2402
|
hasError = computed(() => fieldHasError(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "hasError" }] : /* istanbul ignore next */ []));
|
|
2223
2403
|
errorText = computed(() => fieldErrorText(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
2224
2404
|
hasValue = computed(() => this.value() !== null, ...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
|
|
@@ -2433,10 +2613,10 @@ class DatepickerComponent {
|
|
|
2433
2613
|
this.onTouched = fn;
|
|
2434
2614
|
}
|
|
2435
2615
|
setDisabledState(disabled) {
|
|
2436
|
-
this.#
|
|
2616
|
+
this.#cvaDisabled.set(disabled);
|
|
2437
2617
|
}
|
|
2438
2618
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2439
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: DatepickerComponent, isStandalone: true, selector: "ngx-ds-datepicker", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, floatingLabel: { classPropertyName: "floatingLabel", publicName: "floatingLabel", 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 }, 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 }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, disabledDates: { classPropertyName: "disabledDates", publicName: "disabledDates", isSignal: true, isRequired: false, transformFunction: null }, disabledDaysOfWeek: { classPropertyName: "disabledDaysOfWeek", publicName: "disabledDaysOfWeek", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, showToday: { classPropertyName: "showToday", publicName: "showToday", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [
|
|
2619
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: DatepickerComponent, isStandalone: true, selector: "ngx-ds-datepicker", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, floatingLabel: { classPropertyName: "floatingLabel", publicName: "floatingLabel", 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 }, 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 }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, disabledDates: { classPropertyName: "disabledDates", publicName: "disabledDates", isSignal: true, isRequired: false, transformFunction: null }, disabledDaysOfWeek: { classPropertyName: "disabledDaysOfWeek", publicName: "disabledDaysOfWeek", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, showToday: { classPropertyName: "showToday", publicName: "showToday", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [
|
|
2440
2620
|
{
|
|
2441
2621
|
provide: NG_VALUE_ACCESSOR,
|
|
2442
2622
|
useExisting: forwardRef(() => DatepickerComponent),
|
|
@@ -2453,7 +2633,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
2453
2633
|
multi: true,
|
|
2454
2634
|
},
|
|
2455
2635
|
], 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"] }]
|
|
2456
|
-
}], 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 }] }] } });
|
|
2636
|
+
}], 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"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], triggerRef: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], gridRef: [{ type: i0.ViewChild, args: ['grid', { isSignal: true }] }] } });
|
|
2457
2637
|
|
|
2458
2638
|
class PasswordStrengthComponent {
|
|
2459
2639
|
i18n = inject(NGX_DS_LABELS);
|
|
@@ -2549,7 +2729,10 @@ const TYPE_ICONS$1 = {
|
|
|
2549
2729
|
class AlertComponent {
|
|
2550
2730
|
i18n = inject(NGX_DS_LABELS);
|
|
2551
2731
|
title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
2552
|
-
|
|
2732
|
+
color = input('info', ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
2733
|
+
/** @deprecated Use `color`. Removed in 1.0. */
|
|
2734
|
+
type = input(undefined, ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
2735
|
+
effectiveColor = computed(() => this.type() ?? this.color(), ...(ngDevMode ? [{ debugName: "effectiveColor" }] : /* istanbul ignore next */ []));
|
|
2553
2736
|
variant = input('soft', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
2554
2737
|
showIcon = input(true, ...(ngDevMode ? [{ debugName: "showIcon" }] : /* istanbul ignore next */ []));
|
|
2555
2738
|
dismissible = input(false, ...(ngDevMode ? [{ debugName: "dismissible" }] : /* istanbul ignore next */ []));
|
|
@@ -2557,19 +2740,19 @@ class AlertComponent {
|
|
|
2557
2740
|
#closed = signal(false, ...(ngDevMode ? [{ debugName: "#closed" }] : /* istanbul ignore next */ []));
|
|
2558
2741
|
isClosed = this.#closed.asReadonly();
|
|
2559
2742
|
closeIcon = X;
|
|
2560
|
-
typeIcon = computed(() => TYPE_ICONS$1[this.
|
|
2561
|
-
hostClasses = computed(() => ['alert', `alert--${this.
|
|
2743
|
+
typeIcon = computed(() => TYPE_ICONS$1[this.effectiveColor()], ...(ngDevMode ? [{ debugName: "typeIcon" }] : /* istanbul ignore next */ []));
|
|
2744
|
+
hostClasses = computed(() => ['alert', `alert--${this.effectiveColor()}`, `alert--${this.variant()}`].join(' '), ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
2562
2745
|
close() {
|
|
2563
2746
|
this.#closed.set(true);
|
|
2564
2747
|
this.dismissed.emit();
|
|
2565
2748
|
}
|
|
2566
2749
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: AlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2567
|
-
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 });
|
|
2750
|
+
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 }, color: { classPropertyName: "color", publicName: "color", 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 });
|
|
2568
2751
|
}
|
|
2569
2752
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: AlertComponent, decorators: [{
|
|
2570
2753
|
type: Component,
|
|
2571
2754
|
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"] }]
|
|
2572
|
-
}], 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"] }] } });
|
|
2755
|
+
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", 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"] }] } });
|
|
2573
2756
|
|
|
2574
2757
|
class FileUploadComponent {
|
|
2575
2758
|
i18n = inject(NGX_DS_LABELS);
|
|
@@ -2697,7 +2880,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
2697
2880
|
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"] }]
|
|
2698
2881
|
}], 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"] }] } });
|
|
2699
2882
|
|
|
2700
|
-
const ICON_SIZE$
|
|
2883
|
+
const ICON_SIZE$6 = { sm: 14, md: 16, lg: 18 };
|
|
2701
2884
|
class SearchInputComponent {
|
|
2702
2885
|
i18n = inject(NGX_DS_LABELS);
|
|
2703
2886
|
value = model('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
@@ -2713,7 +2896,7 @@ class SearchInputComponent {
|
|
|
2713
2896
|
focused = signal(false, ...(ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []));
|
|
2714
2897
|
searchIcon = Search;
|
|
2715
2898
|
clearIcon = X;
|
|
2716
|
-
iconSize = computed(() => ICON_SIZE$
|
|
2899
|
+
iconSize = computed(() => ICON_SIZE$6[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
2717
2900
|
showClear = computed(() => this.clearable() && this.value().length > 0 && !this.disabled() && !this.loading(), ...(ngDevMode ? [{ debugName: "showClear" }] : /* istanbul ignore next */ []));
|
|
2718
2901
|
wrapperClasses = computed(() => {
|
|
2719
2902
|
const b = 'search-input';
|
|
@@ -2746,6 +2929,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
2746
2929
|
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"] }]
|
|
2747
2930
|
}], 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"] }] } });
|
|
2748
2931
|
|
|
2932
|
+
let nextId$c = 0;
|
|
2749
2933
|
const BOX_DIM = { sm: '2rem', md: '2.75rem', lg: '3.25rem' };
|
|
2750
2934
|
const BOX_FS = { sm: '0.875rem', md: '1rem', lg: '1.25rem' };
|
|
2751
2935
|
class OtpInputComponent {
|
|
@@ -2755,11 +2939,16 @@ class OtpInputComponent {
|
|
|
2755
2939
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
2756
2940
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
2757
2941
|
masked = input(false, ...(ngDevMode ? [{ debugName: "masked" }] : /* istanbul ignore next */ []));
|
|
2942
|
+
/** Message shown under the boxes. It also switches them to the error style. */
|
|
2943
|
+
errorMessage = input('', ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
2944
|
+
/** @deprecated Use `errorMessage`. Removed in 1.0. */
|
|
2758
2945
|
error = input(false, ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
|
|
2759
2946
|
/** Set by Signal Forms `[formField]`. Its errors show once the field is touched. */
|
|
2760
2947
|
errors = input([], ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
|
|
2761
2948
|
touched = input(false, ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
2762
|
-
hasError = computed(() => this.error() || fieldHasError(
|
|
2949
|
+
hasError = computed(() => this.error() || fieldHasError(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "hasError" }] : /* istanbul ignore next */ []));
|
|
2950
|
+
errorText = computed(() => fieldErrorText(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
2951
|
+
messageId = `ngx-otp-${nextId$c++}-message`;
|
|
2763
2952
|
value = model('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2764
2953
|
complete = output();
|
|
2765
2954
|
#formDisabled = signal(false, ...(ngDevMode ? [{ debugName: "#formDisabled" }] : /* istanbul ignore next */ []));
|
|
@@ -2876,13 +3065,13 @@ class OtpInputComponent {
|
|
|
2876
3065
|
this.#formDisabled.set(disabled);
|
|
2877
3066
|
}
|
|
2878
3067
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: OtpInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2879
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: OtpInputComponent, isStandalone: true, selector: "ngx-ds-otp-input", inputs: { length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", 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 }, masked: { classPropertyName: "masked", publicName: "masked", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", 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 }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", complete: "complete" }, providers: [
|
|
3068
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: OtpInputComponent, isStandalone: true, selector: "ngx-ds-otp-input", inputs: { length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", 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 }, masked: { classPropertyName: "masked", publicName: "masked", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", 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 }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", complete: "complete" }, providers: [
|
|
2880
3069
|
{
|
|
2881
3070
|
provide: NG_VALUE_ACCESSOR,
|
|
2882
3071
|
useExisting: forwardRef(() => OtpInputComponent),
|
|
2883
3072
|
multi: true,
|
|
2884
3073
|
},
|
|
2885
|
-
], 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 });
|
|
3074
|
+
], 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-describedby]=\"errorText() ? messageId : 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@if (errorText()) {\n <p [id]=\"messageId\" class=\"otp__message\" role=\"alert\">{{ errorText() }}</p>\n}\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}.otp__message{margin:.375rem 0 0;font-size:.75rem;line-height:1.4;color:var(--fill-danger, #dc2626)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2886
3075
|
}
|
|
2887
3076
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: OtpInputComponent, decorators: [{
|
|
2888
3077
|
type: Component,
|
|
@@ -2892,8 +3081,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
2892
3081
|
useExisting: forwardRef(() => OtpInputComponent),
|
|
2893
3082
|
multi: true,
|
|
2894
3083
|
},
|
|
2895
|
-
], 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"] }]
|
|
2896
|
-
}], 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 }] }] } });
|
|
3084
|
+
], 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-describedby]=\"errorText() ? messageId : 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@if (errorText()) {\n <p [id]=\"messageId\" class=\"otp__message\" role=\"alert\">{{ errorText() }}</p>\n}\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}.otp__message{margin:.375rem 0 0;font-size:.75rem;line-height:1.4;color:var(--fill-danger, #dc2626)}\n"] }]
|
|
3085
|
+
}], 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 }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", 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 }] }] } });
|
|
2897
3086
|
|
|
2898
3087
|
// Theme tokens (with fallbacks) so consumers can restyle the slider via CSS.
|
|
2899
3088
|
const TRACK_COLORS = {
|
|
@@ -2902,10 +3091,11 @@ const TRACK_COLORS = {
|
|
|
2902
3091
|
success: 'var(--success-500, #10b981)',
|
|
2903
3092
|
warning: 'var(--warning-500, #f59e0b)',
|
|
2904
3093
|
danger: 'var(--danger-500, #ef4444)',
|
|
3094
|
+
info: 'var(--info-500, #3b82f6)',
|
|
2905
3095
|
};
|
|
2906
|
-
let nextId$
|
|
3096
|
+
let nextId$b = 0;
|
|
2907
3097
|
class RangeSliderComponent {
|
|
2908
|
-
id = `ngx-range-slider-${nextId$
|
|
3098
|
+
id = `ngx-range-slider-${nextId$b++}`;
|
|
2909
3099
|
i18n = inject(NGX_DS_LABELS);
|
|
2910
3100
|
value = model(0, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2911
3101
|
// `undefined` is accepted so Signal Forms can bind the field's min/max.
|
|
@@ -3054,7 +3244,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
3054
3244
|
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"] }]
|
|
3055
3245
|
}], 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 }] }] } });
|
|
3056
3246
|
|
|
3057
|
-
const ICON_SIZE$
|
|
3247
|
+
const ICON_SIZE$5 = { sm: 12, md: 14, lg: 16 };
|
|
3058
3248
|
class BreadcrumbComponent {
|
|
3059
3249
|
i18n = inject(NGX_DS_LABELS);
|
|
3060
3250
|
items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
@@ -3065,7 +3255,7 @@ class BreadcrumbComponent {
|
|
|
3065
3255
|
separatorIsIcon = computed(() => typeof this.separator() !== 'string', ...(ngDevMode ? [{ debugName: "separatorIsIcon" }] : /* istanbul ignore next */ []));
|
|
3066
3256
|
separatorIcon = computed(() => typeof this.separator() === 'string' ? null : this.separator(), ...(ngDevMode ? [{ debugName: "separatorIcon" }] : /* istanbul ignore next */ []));
|
|
3067
3257
|
separatorChar = computed(() => typeof this.separator() === 'string' ? this.separator() : '', ...(ngDevMode ? [{ debugName: "separatorChar" }] : /* istanbul ignore next */ []));
|
|
3068
|
-
iconSize = computed(() => ICON_SIZE$
|
|
3258
|
+
iconSize = computed(() => ICON_SIZE$5[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
3069
3259
|
visibleItems = computed(() => {
|
|
3070
3260
|
const all = this.items();
|
|
3071
3261
|
const max = this.maxItems();
|
|
@@ -3168,7 +3358,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
3168
3358
|
}], 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 }] }] } });
|
|
3169
3359
|
|
|
3170
3360
|
const ICON_SIZES = { sm: 14, md: 16, lg: 18 };
|
|
3171
|
-
let nextId$
|
|
3361
|
+
let nextId$a = 0;
|
|
3172
3362
|
class NumberInputComponent {
|
|
3173
3363
|
i18n = inject(NGX_DS_LABELS);
|
|
3174
3364
|
value = model(0, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
@@ -3190,7 +3380,7 @@ class NumberInputComponent {
|
|
|
3190
3380
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
3191
3381
|
#formDisabled = signal(false, ...(ngDevMode ? [{ debugName: "#formDisabled" }] : /* istanbul ignore next */ []));
|
|
3192
3382
|
isDisabled = computed(() => this.disabled() || this.#formDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
3193
|
-
id = `ngx-number-${nextId$
|
|
3383
|
+
id = `ngx-number-${nextId$a++}`;
|
|
3194
3384
|
messageId = `${this.id}-message`;
|
|
3195
3385
|
PlusIcon = Plus;
|
|
3196
3386
|
MinusIcon = Minus;
|
|
@@ -3270,7 +3460,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
3270
3460
|
], 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"] }]
|
|
3271
3461
|
}], 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 }] }] } });
|
|
3272
3462
|
|
|
3273
|
-
let nextId$
|
|
3463
|
+
let nextId$9 = 0;
|
|
3274
3464
|
class MultiSelectComponent {
|
|
3275
3465
|
i18n = inject(NGX_DS_LABELS);
|
|
3276
3466
|
options = input([], ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
@@ -3286,7 +3476,7 @@ class MultiSelectComponent {
|
|
|
3286
3476
|
searchable = input(true, ...(ngDevMode ? [{ debugName: "searchable" }] : /* istanbul ignore next */ []));
|
|
3287
3477
|
maxSelected = input(null, ...(ngDevMode ? [{ debugName: "maxSelected" }] : /* istanbul ignore next */ []));
|
|
3288
3478
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
3289
|
-
id = `ngx-multi-${nextId$
|
|
3479
|
+
id = `ngx-multi-${nextId$9++}`;
|
|
3290
3480
|
messageId = `${this.id}-message`;
|
|
3291
3481
|
ChevronDownIcon = ChevronDown;
|
|
3292
3482
|
XIcon = X;
|
|
@@ -3526,7 +3716,10 @@ class ChipGroupComponent {
|
|
|
3526
3716
|
selected = model([], ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
|
|
3527
3717
|
selectable = input(true, ...(ngDevMode ? [{ debugName: "selectable" }] : /* istanbul ignore next */ []));
|
|
3528
3718
|
removable = input(false, ...(ngDevMode ? [{ debugName: "removable" }] : /* istanbul ignore next */ []));
|
|
3529
|
-
|
|
3719
|
+
multiple = input(true, ...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
|
|
3720
|
+
/** @deprecated Use `multiple`. Removed in 1.0. */
|
|
3721
|
+
multiSelect = input(undefined, ...(ngDevMode ? [{ debugName: "multiSelect" }] : /* istanbul ignore next */ []));
|
|
3722
|
+
isMultiple = computed(() => this.multiSelect() ?? this.multiple(), ...(ngDevMode ? [{ debugName: "isMultiple" }] : /* istanbul ignore next */ []));
|
|
3530
3723
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3531
3724
|
variant = input('soft', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
3532
3725
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
@@ -3534,7 +3727,7 @@ class ChipGroupComponent {
|
|
|
3534
3727
|
isDisabled = computed(() => this.disabled() || this.#formDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
3535
3728
|
removed = output();
|
|
3536
3729
|
XIcon = X;
|
|
3537
|
-
hostClasses = computed(() => `chip-group chip-group--${this.size()} chip-group--${this.variant()}`, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
3730
|
+
hostClasses = computed(() => `chip-group chip-group--${this.size()} chip-group--${this.variant() === 'filled' ? 'solid' : this.variant()}`, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
3538
3731
|
isSelected(chip) {
|
|
3539
3732
|
return this.selected().includes(chip.value);
|
|
3540
3733
|
}
|
|
@@ -3545,10 +3738,10 @@ class ChipGroupComponent {
|
|
|
3545
3738
|
const idx = current.indexOf(chip.value);
|
|
3546
3739
|
let next;
|
|
3547
3740
|
if (idx >= 0) {
|
|
3548
|
-
next = this.
|
|
3741
|
+
next = this.isMultiple() ? current.filter((v) => v !== chip.value) : [];
|
|
3549
3742
|
}
|
|
3550
3743
|
else {
|
|
3551
|
-
next = this.
|
|
3744
|
+
next = this.isMultiple() ? [...current, chip.value] : [chip.value];
|
|
3552
3745
|
}
|
|
3553
3746
|
this.selected.set(next);
|
|
3554
3747
|
this.#onChange(next);
|
|
@@ -3574,13 +3767,13 @@ class ChipGroupComponent {
|
|
|
3574
3767
|
this.#formDisabled.set(isDisabled);
|
|
3575
3768
|
}
|
|
3576
3769
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ChipGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3577
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ChipGroupComponent, isStandalone: true, selector: "ngx-ds-chip-group", inputs: { chips: { classPropertyName: "chips", publicName: "chips", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, multiSelect: { classPropertyName: "multiSelect", publicName: "multiSelect", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selectedChange", removed: "removed" }, providers: [
|
|
3770
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ChipGroupComponent, isStandalone: true, selector: "ngx-ds-chip-group", inputs: { chips: { classPropertyName: "chips", publicName: "chips", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, multiSelect: { classPropertyName: "multiSelect", publicName: "multiSelect", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selectedChange", removed: "removed" }, providers: [
|
|
3578
3771
|
{
|
|
3579
3772
|
provide: NG_VALUE_ACCESSOR,
|
|
3580
3773
|
useExisting: forwardRef(() => ChipGroupComponent),
|
|
3581
3774
|
multi: true,
|
|
3582
3775
|
},
|
|
3583
|
-
], 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--
|
|
3776
|
+
], 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--solid .chip{background:var(--surface-active, #e5e7eb);color:var(--text-secondary, #374151);border:1px solid transparent}.chip-group--solid .chip:hover:not(.chip--disabled){background:var(--border-input, #d1d5db)}.chip-group--solid .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 });
|
|
3584
3777
|
}
|
|
3585
3778
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ChipGroupComponent, decorators: [{
|
|
3586
3779
|
type: Component,
|
|
@@ -3590,10 +3783,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
3590
3783
|
useExisting: forwardRef(() => ChipGroupComponent),
|
|
3591
3784
|
multi: true,
|
|
3592
3785
|
},
|
|
3593
|
-
], 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--
|
|
3594
|
-
}], 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"] }] } });
|
|
3786
|
+
], 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--solid .chip{background:var(--surface-active, #e5e7eb);color:var(--text-secondary, #374151);border:1px solid transparent}.chip-group--solid .chip:hover:not(.chip--disabled){background:var(--border-input, #d1d5db)}.chip-group--solid .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"] }]
|
|
3787
|
+
}], 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 }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", 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"] }] } });
|
|
3595
3788
|
|
|
3596
|
-
let nextId$
|
|
3789
|
+
let nextId$8 = 0;
|
|
3597
3790
|
class DateRangePickerComponent {
|
|
3598
3791
|
i18n = inject(NGX_DS_LABELS);
|
|
3599
3792
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
@@ -3611,7 +3804,7 @@ class DateRangePickerComponent {
|
|
|
3611
3804
|
isDisabled = computed(() => this.disabled() || this.#formDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
3612
3805
|
start = model(null, ...(ngDevMode ? [{ debugName: "start" }] : /* istanbul ignore next */ []));
|
|
3613
3806
|
end = model(null, ...(ngDevMode ? [{ debugName: "end" }] : /* istanbul ignore next */ []));
|
|
3614
|
-
id = `ngx-drp-${nextId$
|
|
3807
|
+
id = `ngx-drp-${nextId$8++}`;
|
|
3615
3808
|
messageId = `${this.id}-message`;
|
|
3616
3809
|
CalendarIcon = Calendar;
|
|
3617
3810
|
ChevronLeft = ChevronLeft;
|
|
@@ -3931,10 +4124,10 @@ function hslToHex(h, s, l) {
|
|
|
3931
4124
|
};
|
|
3932
4125
|
return `#${f(0)}${f(8)}${f(4)}`;
|
|
3933
4126
|
}
|
|
3934
|
-
let nextId$
|
|
4127
|
+
let nextId$7 = 0;
|
|
3935
4128
|
class ColorPickerComponent {
|
|
3936
4129
|
i18n = inject(NGX_DS_LABELS);
|
|
3937
|
-
id = `ngx-color-picker-${nextId$
|
|
4130
|
+
id = `ngx-color-picker-${nextId$7++}`;
|
|
3938
4131
|
value = model('#6366f1', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3939
4132
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
3940
4133
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
@@ -4076,7 +4269,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
4076
4269
|
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"] }]
|
|
4077
4270
|
}], 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 }] }] } });
|
|
4078
4271
|
|
|
4079
|
-
const ICON_SIZE$
|
|
4272
|
+
const ICON_SIZE$4 = { sm: 14, md: 16, lg: 18 };
|
|
4080
4273
|
class MenuComponent {
|
|
4081
4274
|
items = input.required(...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
4082
4275
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
@@ -4088,7 +4281,7 @@ class MenuComponent {
|
|
|
4088
4281
|
activeIndex = signal(0, ...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
4089
4282
|
openSubmenu = signal(null, ...(ngDevMode ? [{ debugName: "openSubmenu" }] : /* istanbul ignore next */ []));
|
|
4090
4283
|
chevronRight = ChevronRight;
|
|
4091
|
-
iconSize = computed(() => ICON_SIZE$
|
|
4284
|
+
iconSize = computed(() => ICON_SIZE$4[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
4092
4285
|
constructor() {
|
|
4093
4286
|
afterNextRender(() => {
|
|
4094
4287
|
if (this.autofocus()) {
|
|
@@ -4182,18 +4375,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
4182
4375
|
}, 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"] }]
|
|
4183
4376
|
}], 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 }] }] } });
|
|
4184
4377
|
|
|
4185
|
-
let nextId$
|
|
4378
|
+
let nextId$6 = 0;
|
|
4186
4379
|
class FormFieldComponent {
|
|
4187
4380
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
4188
4381
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
4382
|
+
errorMessage = input('', ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
4383
|
+
/** @deprecated Use `errorMessage`. Removed in 1.0. */
|
|
4189
4384
|
error = input('', ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
|
|
4190
4385
|
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
4191
4386
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
4192
4387
|
for = input(null, ...(ngDevMode ? [{ debugName: "for" }] : /* istanbul ignore next */ []));
|
|
4193
|
-
generatedId = `ngx-ff-${nextId$
|
|
4388
|
+
generatedId = `ngx-ff-${nextId$6++}`;
|
|
4194
4389
|
fieldId = computed(() => this.for() ?? this.generatedId, ...(ngDevMode ? [{ debugName: "fieldId" }] : /* istanbul ignore next */ []));
|
|
4195
4390
|
hintId = computed(() => `${this.fieldId()}-hint`, ...(ngDevMode ? [{ debugName: "hintId" }] : /* istanbul ignore next */ []));
|
|
4196
4391
|
errorId = computed(() => `${this.fieldId()}-error`, ...(ngDevMode ? [{ debugName: "errorId" }] : /* istanbul ignore next */ []));
|
|
4392
|
+
errorText = computed(() => this.errorMessage() || this.error(), ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
4197
4393
|
host = inject((ElementRef));
|
|
4198
4394
|
renderer = inject(Renderer2);
|
|
4199
4395
|
constructor() {
|
|
@@ -4204,7 +4400,7 @@ class FormFieldComponent {
|
|
|
4204
4400
|
if (!control.getAttribute('id')) {
|
|
4205
4401
|
this.renderer.setAttribute(control, 'id', this.fieldId());
|
|
4206
4402
|
}
|
|
4207
|
-
const hasError = this.
|
|
4403
|
+
const hasError = this.errorText().length > 0;
|
|
4208
4404
|
const hasHint = this.hint().length > 0;
|
|
4209
4405
|
if (hasError) {
|
|
4210
4406
|
this.renderer.setAttribute(control, 'aria-describedby', this.errorId());
|
|
@@ -4221,14 +4417,14 @@ class FormFieldComponent {
|
|
|
4221
4417
|
});
|
|
4222
4418
|
}
|
|
4223
4419
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: FormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4224
|
-
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 (
|
|
4420
|
+
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 }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", 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 (errorText()) {\n <p [id]=\"errorId()\" class=\"ngx-ff__message ngx-ff__message--error\" role=\"alert\">\n {{ errorText() }}\n </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 });
|
|
4225
4421
|
}
|
|
4226
4422
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
4227
4423
|
type: Component,
|
|
4228
|
-
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 (
|
|
4229
|
-
}], 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 }] }] } });
|
|
4424
|
+
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 (errorText()) {\n <p [id]=\"errorId()\" class=\"ngx-ff__message ngx-ff__message--error\" role=\"alert\">\n {{ errorText() }}\n </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"] }]
|
|
4425
|
+
}], ctorParameters: () => [], propDecorators: { 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 }] }], 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 }] }] } });
|
|
4230
4426
|
|
|
4231
|
-
const ICON_SIZE$
|
|
4427
|
+
const ICON_SIZE$3 = { sm: 14, md: 16, lg: 18 };
|
|
4232
4428
|
const LAST_MINUTE = 23 * 60 + 59;
|
|
4233
4429
|
const pad = (n) => String(n).padStart(2, '0');
|
|
4234
4430
|
/** Parses `HH:mm` into minutes since midnight, or `null` when it is not a valid time. */
|
|
@@ -4243,7 +4439,7 @@ function parseTime(value) {
|
|
|
4243
4439
|
function formatTime(total) {
|
|
4244
4440
|
return `${pad(Math.floor(total / 60))}:${pad(total % 60)}`;
|
|
4245
4441
|
}
|
|
4246
|
-
let nextId$
|
|
4442
|
+
let nextId$5 = 0;
|
|
4247
4443
|
/**
|
|
4248
4444
|
* Time field with an hour / minute (and AM/PM) panel.
|
|
4249
4445
|
* The value is a 24-hour `HH:mm` string, like a native `<input type="time">`.
|
|
@@ -4271,17 +4467,18 @@ class TimePickerComponent {
|
|
|
4271
4467
|
// ── Value ────────────────────────────────────────────────
|
|
4272
4468
|
/** Selected time as `HH:mm` (24-hour), or `null`. */
|
|
4273
4469
|
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
4274
|
-
id = `ngx-time-picker-${nextId$
|
|
4470
|
+
id = `ngx-time-picker-${nextId$5++}`;
|
|
4275
4471
|
messageId = `${this.id}-message`;
|
|
4276
4472
|
ClockIcon = Clock;
|
|
4277
4473
|
XIcon = X;
|
|
4278
4474
|
// ── Internal state ────────────────────────────────────────
|
|
4279
4475
|
#open = signal(false, ...(ngDevMode ? [{ debugName: "#open" }] : /* istanbul ignore next */ []));
|
|
4280
4476
|
#focused = signal(false, ...(ngDevMode ? [{ debugName: "#focused" }] : /* istanbul ignore next */ []));
|
|
4281
|
-
|
|
4477
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
4478
|
+
#cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "#cvaDisabled" }] : /* istanbul ignore next */ []));
|
|
4282
4479
|
#injector = inject(Injector);
|
|
4283
4480
|
isOpen = this.#open.asReadonly();
|
|
4284
|
-
isDisabled = this
|
|
4481
|
+
isDisabled = computed(() => this.disabled() || this.#cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
4285
4482
|
isFocused = this.#focused.asReadonly();
|
|
4286
4483
|
#total = computed(() => parseTime(this.value()), ...(ngDevMode ? [{ debugName: "#total" }] : /* istanbul ignore next */ []));
|
|
4287
4484
|
#hour = computed(() => {
|
|
@@ -4304,7 +4501,7 @@ class TimePickerComponent {
|
|
|
4304
4501
|
return values;
|
|
4305
4502
|
}, ...(ngDevMode ? [{ debugName: "#minuteValues" }] : /* istanbul ignore next */ []));
|
|
4306
4503
|
// ── Derived ───────────────────────────────────────────────
|
|
4307
|
-
iconSize = computed(() => ICON_SIZE$
|
|
4504
|
+
iconSize = computed(() => ICON_SIZE$3[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
4308
4505
|
is12h = computed(() => this.hourFormat() === '12', ...(ngDevMode ? [{ debugName: "is12h" }] : /* istanbul ignore next */ []));
|
|
4309
4506
|
hasError = computed(() => fieldHasError(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "hasError" }] : /* istanbul ignore next */ []));
|
|
4310
4507
|
errorText = computed(() => fieldErrorText(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
@@ -4531,10 +4728,10 @@ class TimePickerComponent {
|
|
|
4531
4728
|
this.onTouched = fn;
|
|
4532
4729
|
}
|
|
4533
4730
|
setDisabledState(disabled) {
|
|
4534
|
-
this.#
|
|
4731
|
+
this.#cvaDisabled.set(disabled);
|
|
4535
4732
|
}
|
|
4536
4733
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TimePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4537
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TimePickerComponent, isStandalone: true, selector: "ngx-ds-time-picker", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, floatingLabel: { classPropertyName: "floatingLabel", publicName: "floatingLabel", 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 }, 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 }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: true, isRequired: false, transformFunction: null }, minuteStep: { classPropertyName: "minuteStep", publicName: "minuteStep", isSignal: true, isRequired: false, transformFunction: null }, minTime: { classPropertyName: "minTime", publicName: "minTime", isSignal: true, isRequired: false, transformFunction: null }, maxTime: { classPropertyName: "maxTime", publicName: "maxTime", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [
|
|
4734
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TimePickerComponent, isStandalone: true, selector: "ngx-ds-time-picker", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, floatingLabel: { classPropertyName: "floatingLabel", publicName: "floatingLabel", 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 }, 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 }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: true, isRequired: false, transformFunction: null }, minuteStep: { classPropertyName: "minuteStep", publicName: "minuteStep", isSignal: true, isRequired: false, transformFunction: null }, minTime: { classPropertyName: "minTime", publicName: "minTime", isSignal: true, isRequired: false, transformFunction: null }, maxTime: { classPropertyName: "maxTime", publicName: "maxTime", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [
|
|
4538
4735
|
{
|
|
4539
4736
|
provide: NG_VALUE_ACCESSOR,
|
|
4540
4737
|
useExisting: forwardRef(() => TimePickerComponent),
|
|
@@ -4551,9 +4748,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
4551
4748
|
multi: true,
|
|
4552
4749
|
},
|
|
4553
4750
|
], 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"] }]
|
|
4554
|
-
}], 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 }] }] } });
|
|
4751
|
+
}], 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"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], triggerRef: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], panelRef: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
|
|
4555
4752
|
|
|
4556
|
-
let nextId$
|
|
4753
|
+
let nextId$4 = 0;
|
|
4557
4754
|
function escapeRegExp(text) {
|
|
4558
4755
|
return text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
4559
4756
|
}
|
|
@@ -4581,14 +4778,15 @@ class TagInputComponent {
|
|
|
4581
4778
|
value = model([], ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
4582
4779
|
added = output();
|
|
4583
4780
|
removed = output();
|
|
4584
|
-
id = `ngx-tag-input-${nextId$
|
|
4781
|
+
id = `ngx-tag-input-${nextId$4++}`;
|
|
4585
4782
|
messageId = `${this.id}-message`;
|
|
4586
4783
|
native = viewChild.required('native');
|
|
4587
4784
|
// ── Internal state ───────────────────────────────────────────
|
|
4588
|
-
|
|
4785
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
4786
|
+
#cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "#cvaDisabled" }] : /* istanbul ignore next */ []));
|
|
4589
4787
|
#focused = signal(false, ...(ngDevMode ? [{ debugName: "#focused" }] : /* istanbul ignore next */ []));
|
|
4590
4788
|
text = signal('', ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
4591
|
-
isDisabled = this
|
|
4789
|
+
isDisabled = computed(() => this.disabled() || this.#cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
4592
4790
|
isFocused = this.#focused.asReadonly();
|
|
4593
4791
|
// ── Derived ──────────────────────────────────────────────────
|
|
4594
4792
|
isFull = computed(() => {
|
|
@@ -4625,7 +4823,7 @@ class TagInputComponent {
|
|
|
4625
4823
|
this.onTouched = fn;
|
|
4626
4824
|
}
|
|
4627
4825
|
setDisabledState(disabled) {
|
|
4628
|
-
this.#
|
|
4826
|
+
this.#cvaDisabled.set(disabled);
|
|
4629
4827
|
}
|
|
4630
4828
|
// ── Actions ──────────────────────────────────────────────────
|
|
4631
4829
|
/** Adds the given labels, skipping blanks, duplicates and anything past `maxTags`. */
|
|
@@ -4737,7 +4935,7 @@ class TagInputComponent {
|
|
|
4737
4935
|
this.onChange(next);
|
|
4738
4936
|
}
|
|
4739
4937
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TagInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4740
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TagInputComponent, isStandalone: true, selector: "ngx-ds-tag-input", 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 }, 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 }, separators: { classPropertyName: "separators", publicName: "separators", isSignal: true, isRequired: false, transformFunction: null }, maxTags: { classPropertyName: "maxTags", publicName: "maxTags", isSignal: true, isRequired: false, transformFunction: null }, allowDuplicates: { classPropertyName: "allowDuplicates", publicName: "allowDuplicates", isSignal: true, isRequired: false, transformFunction: null }, addOnBlur: { classPropertyName: "addOnBlur", publicName: "addOnBlur", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", added: "added", removed: "removed" }, providers: [
|
|
4938
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TagInputComponent, isStandalone: true, selector: "ngx-ds-tag-input", 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 }, 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 }, separators: { classPropertyName: "separators", publicName: "separators", isSignal: true, isRequired: false, transformFunction: null }, maxTags: { classPropertyName: "maxTags", publicName: "maxTags", isSignal: true, isRequired: false, transformFunction: null }, allowDuplicates: { classPropertyName: "allowDuplicates", publicName: "allowDuplicates", isSignal: true, isRequired: false, transformFunction: null }, addOnBlur: { classPropertyName: "addOnBlur", publicName: "addOnBlur", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", added: "added", removed: "removed" }, providers: [
|
|
4741
4939
|
{
|
|
4742
4940
|
provide: NG_VALUE_ACCESSOR,
|
|
4743
4941
|
useExisting: forwardRef(() => TagInputComponent),
|
|
@@ -4754,7 +4952,564 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
4754
4952
|
multi: true,
|
|
4755
4953
|
},
|
|
4756
4954
|
], 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"] }]
|
|
4757
|
-
}], 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 }] }] } });
|
|
4955
|
+
}], 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 }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
4956
|
+
|
|
4957
|
+
const ICON_SIZE$2 = { sm: 12, md: 14, lg: 16 };
|
|
4958
|
+
/**
|
|
4959
|
+
* Text that turns into a field on click. Enter (Ctrl/⌘+Enter when `multiline`) or
|
|
4960
|
+
* blur saves, Escape restores the previous value.
|
|
4961
|
+
*
|
|
4962
|
+
* Works with `[(value)]`, reactive forms and Signal Forms `[formField]`.
|
|
4963
|
+
*/
|
|
4964
|
+
class InlineEditComponent {
|
|
4965
|
+
i18n = inject(NGX_DS_LABELS);
|
|
4966
|
+
#injector = inject(Injector);
|
|
4967
|
+
// ── Configuration ────────────────────────────────────────────
|
|
4968
|
+
/** Names the field for assistive tech ("Edit <label>"). Not shown. */
|
|
4969
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
4970
|
+
/** Shown, muted, while the value is empty. */
|
|
4971
|
+
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
4972
|
+
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
4973
|
+
/** Uses a textarea. Enter adds a line, Ctrl/⌘+Enter saves. */
|
|
4974
|
+
multiline = input(false, ...(ngDevMode ? [{ debugName: "multiline" }] : /* istanbul ignore next */ []));
|
|
4975
|
+
/** An empty value is not saved: the previous one is restored. */
|
|
4976
|
+
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
4977
|
+
/** Shows save and cancel buttons while editing. */
|
|
4978
|
+
showActions = input(false, ...(ngDevMode ? [{ debugName: "showActions" }] : /* istanbul ignore next */ []));
|
|
4979
|
+
/** Saves when the field loses focus. With `false`, leaving the field cancels. */
|
|
4980
|
+
saveOnBlur = input(true, ...(ngDevMode ? [{ debugName: "saveOnBlur" }] : /* istanbul ignore next */ []));
|
|
4981
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
4982
|
+
// ── Value ─────────────────────────────────────────────────────
|
|
4983
|
+
value = model('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
4984
|
+
/** Whether the field is being edited. Bind it to start editing from outside. */
|
|
4985
|
+
editing = model(false, ...(ngDevMode ? [{ debugName: "editing" }] : /* istanbul ignore next */ []));
|
|
4986
|
+
/** Emits the new value when an edit is saved and the value changed. */
|
|
4987
|
+
saved = output();
|
|
4988
|
+
/** Emits when an edit is cancelled. */
|
|
4989
|
+
cancelled = output();
|
|
4990
|
+
fieldRef = viewChild('field', ...(ngDevMode ? [{ debugName: "fieldRef" }] : /* istanbul ignore next */ []));
|
|
4991
|
+
triggerRef = viewChild('trigger', ...(ngDevMode ? [{ debugName: "triggerRef" }] : /* istanbul ignore next */ []));
|
|
4992
|
+
#draft = signal('', ...(ngDevMode ? [{ debugName: "#draft" }] : /* istanbul ignore next */ []));
|
|
4993
|
+
#cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "#cvaDisabled" }] : /* istanbul ignore next */ []));
|
|
4994
|
+
draft = this.#draft.asReadonly();
|
|
4995
|
+
isDisabled = computed(() => this.disabled() || this.#cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
4996
|
+
isEmpty = computed(() => this.value().trim() === '', ...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
|
|
4997
|
+
iconSize = computed(() => ICON_SIZE$2[this.size()], ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
4998
|
+
triggerLabel = computed(() => this.i18n.edit(this.label()), ...(ngDevMode ? [{ debugName: "triggerLabel" }] : /* istanbul ignore next */ []));
|
|
4999
|
+
hostClasses = computed(() => [
|
|
5000
|
+
'ie',
|
|
5001
|
+
`ie--${this.size()}`,
|
|
5002
|
+
this.multiline() ? 'ie--multiline' : '',
|
|
5003
|
+
this.isDisabled() ? 'ie--disabled' : '',
|
|
5004
|
+
]
|
|
5005
|
+
.filter(Boolean)
|
|
5006
|
+
.join(' '), ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
5007
|
+
icons = { Pencil, Check, X };
|
|
5008
|
+
constructor() {
|
|
5009
|
+
// Entering edit mode, from a click or from a bound `[(editing)]`, starts a draft
|
|
5010
|
+
// from the current value and focuses the field.
|
|
5011
|
+
let wasEditing = false;
|
|
5012
|
+
effect(() => {
|
|
5013
|
+
const editing = this.editing();
|
|
5014
|
+
if (editing && !wasEditing)
|
|
5015
|
+
untracked(() => this.#begin());
|
|
5016
|
+
wasEditing = editing;
|
|
5017
|
+
});
|
|
5018
|
+
}
|
|
5019
|
+
// ── Actions ──────────────────────────────────────────────────
|
|
5020
|
+
edit() {
|
|
5021
|
+
if (this.isDisabled())
|
|
5022
|
+
return;
|
|
5023
|
+
this.editing.set(true);
|
|
5024
|
+
}
|
|
5025
|
+
save() {
|
|
5026
|
+
if (!this.editing())
|
|
5027
|
+
return;
|
|
5028
|
+
const next = this.multiline() ? this.#draft() : this.#draft().trim();
|
|
5029
|
+
if (this.required() && next.trim() === '') {
|
|
5030
|
+
this.cancel();
|
|
5031
|
+
return;
|
|
5032
|
+
}
|
|
5033
|
+
this.#end();
|
|
5034
|
+
if (next !== this.value()) {
|
|
5035
|
+
this.value.set(next);
|
|
5036
|
+
this.onChange(next);
|
|
5037
|
+
this.saved.emit(next);
|
|
5038
|
+
}
|
|
5039
|
+
this.onTouched();
|
|
5040
|
+
}
|
|
5041
|
+
cancel() {
|
|
5042
|
+
if (!this.editing())
|
|
5043
|
+
return;
|
|
5044
|
+
this.#end();
|
|
5045
|
+
this.onTouched();
|
|
5046
|
+
this.cancelled.emit();
|
|
5047
|
+
}
|
|
5048
|
+
onInput(event) {
|
|
5049
|
+
this.#draft.set(event.target.value);
|
|
5050
|
+
}
|
|
5051
|
+
onKeydown(event) {
|
|
5052
|
+
if (event.key === 'Escape') {
|
|
5053
|
+
event.preventDefault();
|
|
5054
|
+
event.stopPropagation();
|
|
5055
|
+
this.cancel();
|
|
5056
|
+
this.#focusTrigger();
|
|
5057
|
+
}
|
|
5058
|
+
else if (event.key === 'Enter' && (!this.multiline() || event.ctrlKey || event.metaKey)) {
|
|
5059
|
+
event.preventDefault();
|
|
5060
|
+
this.save();
|
|
5061
|
+
this.#focusTrigger();
|
|
5062
|
+
}
|
|
5063
|
+
}
|
|
5064
|
+
onBlur(event) {
|
|
5065
|
+
// Moving to the save/cancel buttons is not leaving the field.
|
|
5066
|
+
const next = event.relatedTarget;
|
|
5067
|
+
if (next && event.currentTarget.parentElement?.contains(next))
|
|
5068
|
+
return;
|
|
5069
|
+
if (this.saveOnBlur())
|
|
5070
|
+
this.save();
|
|
5071
|
+
else
|
|
5072
|
+
this.cancel();
|
|
5073
|
+
}
|
|
5074
|
+
onAction(kind) {
|
|
5075
|
+
if (kind === 'save')
|
|
5076
|
+
this.save();
|
|
5077
|
+
else
|
|
5078
|
+
this.cancel();
|
|
5079
|
+
this.#focusTrigger();
|
|
5080
|
+
}
|
|
5081
|
+
#begin() {
|
|
5082
|
+
this.#draft.set(this.value());
|
|
5083
|
+
afterNextRender(() => {
|
|
5084
|
+
const field = this.fieldRef()?.nativeElement;
|
|
5085
|
+
field?.focus();
|
|
5086
|
+
field?.select();
|
|
5087
|
+
}, { injector: this.#injector });
|
|
5088
|
+
}
|
|
5089
|
+
#end() {
|
|
5090
|
+
this.editing.set(false);
|
|
5091
|
+
}
|
|
5092
|
+
#focusTrigger() {
|
|
5093
|
+
afterNextRender(() => this.triggerRef()?.nativeElement.focus(), { injector: this.#injector });
|
|
5094
|
+
}
|
|
5095
|
+
// ── CVA ──────────────────────────────────────────────────────
|
|
5096
|
+
onChange = () => { };
|
|
5097
|
+
onTouched = () => { };
|
|
5098
|
+
writeValue(v) {
|
|
5099
|
+
this.value.set(v ?? '');
|
|
5100
|
+
}
|
|
5101
|
+
registerOnChange(fn) {
|
|
5102
|
+
this.onChange = fn;
|
|
5103
|
+
}
|
|
5104
|
+
registerOnTouched(fn) {
|
|
5105
|
+
this.onTouched = fn;
|
|
5106
|
+
}
|
|
5107
|
+
setDisabledState(disabled) {
|
|
5108
|
+
this.#cvaDisabled.set(disabled);
|
|
5109
|
+
}
|
|
5110
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: InlineEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5111
|
+
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: [
|
|
5112
|
+
{
|
|
5113
|
+
provide: NG_VALUE_ACCESSOR,
|
|
5114
|
+
useExisting: forwardRef(() => InlineEditComponent),
|
|
5115
|
+
multi: true,
|
|
5116
|
+
},
|
|
5117
|
+
], 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 });
|
|
5118
|
+
}
|
|
5119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: InlineEditComponent, decorators: [{
|
|
5120
|
+
type: Component,
|
|
5121
|
+
args: [{ selector: 'ngx-ds-inline-edit', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
5122
|
+
{
|
|
5123
|
+
provide: NG_VALUE_ACCESSOR,
|
|
5124
|
+
useExisting: forwardRef(() => InlineEditComponent),
|
|
5125
|
+
multi: true,
|
|
5126
|
+
},
|
|
5127
|
+
], 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"] }]
|
|
5128
|
+
}], 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 }] }] } });
|
|
5129
|
+
|
|
5130
|
+
let nextId$3 = 0;
|
|
5131
|
+
/**
|
|
5132
|
+
* A select whose options form a tree. Single mode picks one node; `multiple` adds
|
|
5133
|
+
* checkboxes that, with `cascade`, check every leaf under a parent.
|
|
5134
|
+
*
|
|
5135
|
+
* Works with `[(value)]`, reactive forms and Signal Forms `[formField]`.
|
|
5136
|
+
*/
|
|
5137
|
+
class TreeSelectComponent {
|
|
5138
|
+
i18n = inject(NGX_DS_LABELS);
|
|
5139
|
+
#injector = inject(Injector);
|
|
5140
|
+
// ── Configuration ────────────────────────────────────────────
|
|
5141
|
+
nodes = input([], ...(ngDevMode ? [{ debugName: "nodes" }] : /* istanbul ignore next */ []));
|
|
5142
|
+
/** Checkboxes and an array value instead of a single id. */
|
|
5143
|
+
multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
|
|
5144
|
+
/**
|
|
5145
|
+
* With `multiple`, checking a parent checks every leaf under it, and the value
|
|
5146
|
+
* holds leaf ids only. With `false`, each node is checked on its own.
|
|
5147
|
+
*/
|
|
5148
|
+
cascade = input(true, ...(ngDevMode ? [{ debugName: "cascade" }] : /* istanbul ignore next */ []));
|
|
5149
|
+
/** In single mode, parents can be picked too. By default a click on them expands. */
|
|
5150
|
+
selectableParents = input(false, ...(ngDevMode ? [{ debugName: "selectableParents" }] : /* istanbul ignore next */ []));
|
|
5151
|
+
/** Adds a box that filters the tree by label, keeping the ancestors of matches. */
|
|
5152
|
+
searchable = input(false, ...(ngDevMode ? [{ debugName: "searchable" }] : /* istanbul ignore next */ []));
|
|
5153
|
+
placeholder = input(undefined, ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
5154
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
5155
|
+
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
5156
|
+
errorMessage = input('', ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
5157
|
+
/** Set by Signal Forms `[formField]`. Its errors show once the field is touched. */
|
|
5158
|
+
errors = input([], ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
|
|
5159
|
+
touched = input(false, ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
5160
|
+
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
5161
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
5162
|
+
// ── State ────────────────────────────────────────────────────
|
|
5163
|
+
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
5164
|
+
/** Ids of the expanded parents. */
|
|
5165
|
+
expanded = model([], ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
5166
|
+
id = `ngx-tree-select-${nextId$3++}`;
|
|
5167
|
+
panelId = `${this.id}-panel`;
|
|
5168
|
+
messageId = `${this.id}-message`;
|
|
5169
|
+
icons = { ChevronDown, ChevronRight, Check, Minus, X };
|
|
5170
|
+
#open = signal(false, ...(ngDevMode ? [{ debugName: "#open" }] : /* istanbul ignore next */ []));
|
|
5171
|
+
#search = signal('', ...(ngDevMode ? [{ debugName: "#search" }] : /* istanbul ignore next */ []));
|
|
5172
|
+
#cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "#cvaDisabled" }] : /* istanbul ignore next */ []));
|
|
5173
|
+
#active = signal(null, ...(ngDevMode ? [{ debugName: "#active" }] : /* istanbul ignore next */ []));
|
|
5174
|
+
search = this.#search.asReadonly();
|
|
5175
|
+
activeId = this.#active.asReadonly();
|
|
5176
|
+
triggerRef = viewChild('trigger', ...(ngDevMode ? [{ debugName: "triggerRef" }] : /* istanbul ignore next */ []));
|
|
5177
|
+
isDisabled = computed(() => this.disabled() || this.#cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
5178
|
+
/** Disabling the control while it is open hides the panel. */
|
|
5179
|
+
isOpen = computed(() => this.#open() && !this.isDisabled(), ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
5180
|
+
#index = computed(() => {
|
|
5181
|
+
const byId = new Map();
|
|
5182
|
+
const parentOf = new Map();
|
|
5183
|
+
const leavesOf = new Map();
|
|
5184
|
+
const walk = (node, parent) => {
|
|
5185
|
+
byId.set(node.id, node);
|
|
5186
|
+
parentOf.set(node.id, parent);
|
|
5187
|
+
const leaves = node.children?.length
|
|
5188
|
+
? node.children.flatMap((child) => walk(child, node.id))
|
|
5189
|
+
: [node];
|
|
5190
|
+
leavesOf.set(node.id, leaves);
|
|
5191
|
+
return leaves;
|
|
5192
|
+
};
|
|
5193
|
+
for (const node of this.nodes())
|
|
5194
|
+
walk(node, null);
|
|
5195
|
+
return { byId, parentOf, leavesOf };
|
|
5196
|
+
}, ...(ngDevMode ? [{ debugName: "#index" }] : /* istanbul ignore next */ []));
|
|
5197
|
+
selectedIds = computed(() => {
|
|
5198
|
+
const v = this.value();
|
|
5199
|
+
if (v === null || v === undefined)
|
|
5200
|
+
return [];
|
|
5201
|
+
return Array.isArray(v) ? v : [v];
|
|
5202
|
+
}, ...(ngDevMode ? [{ debugName: "selectedIds" }] : /* istanbul ignore next */ []));
|
|
5203
|
+
#selectedSet = computed(() => new Set(this.selectedIds()), ...(ngDevMode ? [{ debugName: "#selectedSet" }] : /* istanbul ignore next */ []));
|
|
5204
|
+
/** Selected nodes, in value order. Unknown ids are skipped. */
|
|
5205
|
+
selectedNodes = computed(() => {
|
|
5206
|
+
const { byId } = this.#index();
|
|
5207
|
+
return this.selectedIds()
|
|
5208
|
+
.map((id) => byId.get(id))
|
|
5209
|
+
.filter((n) => !!n);
|
|
5210
|
+
}, ...(ngDevMode ? [{ debugName: "selectedNodes" }] : /* istanbul ignore next */ []));
|
|
5211
|
+
/** The visible rows: expanded branches, or the matches and their ancestors while searching. */
|
|
5212
|
+
rows = computed(() => {
|
|
5213
|
+
const query = this.#search().trim().toLowerCase();
|
|
5214
|
+
const expanded = new Set(this.expanded());
|
|
5215
|
+
const matches = (n) => n.label.toLowerCase().includes(query);
|
|
5216
|
+
const subtreeMatch = new Map();
|
|
5217
|
+
const hasMatch = (n) => {
|
|
5218
|
+
let hit = subtreeMatch.get(n.id);
|
|
5219
|
+
if (hit === undefined) {
|
|
5220
|
+
hit = matches(n) || !!n.children?.some(hasMatch);
|
|
5221
|
+
subtreeMatch.set(n.id, hit);
|
|
5222
|
+
}
|
|
5223
|
+
return hit;
|
|
5224
|
+
};
|
|
5225
|
+
const out = [];
|
|
5226
|
+
const walk = (list, level, parentId, showAll) => {
|
|
5227
|
+
const visible = query && !showAll ? list.filter(hasMatch) : list;
|
|
5228
|
+
visible.forEach((node, i) => {
|
|
5229
|
+
const hasChildren = !!node.children?.length;
|
|
5230
|
+
const descendantMatch = !!query && hasChildren && !!node.children.some((c) => hasMatch(c));
|
|
5231
|
+
const isExpanded = hasChildren && (expanded.has(node.id) || descendantMatch);
|
|
5232
|
+
out.push({
|
|
5233
|
+
node,
|
|
5234
|
+
level,
|
|
5235
|
+
parentId,
|
|
5236
|
+
hasChildren,
|
|
5237
|
+
expanded: isExpanded,
|
|
5238
|
+
posinset: i + 1,
|
|
5239
|
+
setsize: visible.length,
|
|
5240
|
+
});
|
|
5241
|
+
if (isExpanded) {
|
|
5242
|
+
walk(node.children, level + 1, node.id, showAll || (!!query && matches(node)));
|
|
5243
|
+
}
|
|
5244
|
+
});
|
|
5245
|
+
};
|
|
5246
|
+
walk(this.nodes(), 1, null, false);
|
|
5247
|
+
return out;
|
|
5248
|
+
}, ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
5249
|
+
/** The row that takes Tab focus: the active one, else the first selected, else the first. */
|
|
5250
|
+
focusableId = computed(() => {
|
|
5251
|
+
const rows = this.rows();
|
|
5252
|
+
const active = this.#active();
|
|
5253
|
+
if (active !== null && rows.some((r) => r.node.id === active))
|
|
5254
|
+
return active;
|
|
5255
|
+
const selected = this.#selectedSet();
|
|
5256
|
+
return (rows.find((r) => selected.has(r.node.id)) ?? rows[0])?.node.id ?? null;
|
|
5257
|
+
}, ...(ngDevMode ? [{ debugName: "focusableId" }] : /* istanbul ignore next */ []));
|
|
5258
|
+
hasError = computed(() => fieldHasError(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "hasError" }] : /* istanbul ignore next */ []));
|
|
5259
|
+
errorText = computed(() => fieldErrorText(this.errorMessage(), this.errors(), this.touched()), ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
5260
|
+
triggerClasses = computed(() => {
|
|
5261
|
+
const cls = ['ts__trigger', `ts__trigger--${this.size()}`];
|
|
5262
|
+
if (this.isOpen())
|
|
5263
|
+
cls.push('ts__trigger--open');
|
|
5264
|
+
else if (this.hasError())
|
|
5265
|
+
cls.push('ts__trigger--error');
|
|
5266
|
+
if (this.isDisabled())
|
|
5267
|
+
cls.push('ts__trigger--disabled');
|
|
5268
|
+
return cls.join(' ');
|
|
5269
|
+
}, ...(ngDevMode ? [{ debugName: "triggerClasses" }] : /* istanbul ignore next */ []));
|
|
5270
|
+
constructor() {
|
|
5271
|
+
setupEscapeClose(() => {
|
|
5272
|
+
if (this.#open())
|
|
5273
|
+
this.close(true);
|
|
5274
|
+
});
|
|
5275
|
+
setupClickOutside(() => {
|
|
5276
|
+
if (this.#open())
|
|
5277
|
+
this.close(false);
|
|
5278
|
+
});
|
|
5279
|
+
}
|
|
5280
|
+
// ── Row state ────────────────────────────────────────────────
|
|
5281
|
+
checkState(node) {
|
|
5282
|
+
const selected = this.#selectedSet();
|
|
5283
|
+
if (!this.multiple() || !this.cascade() || !node.children?.length) {
|
|
5284
|
+
return selected.has(node.id) ? 'checked' : 'unchecked';
|
|
5285
|
+
}
|
|
5286
|
+
const leaves = this.#index().leavesOf.get(node.id) ?? [];
|
|
5287
|
+
const count = leaves.filter((l) => selected.has(l.id)).length;
|
|
5288
|
+
if (count === 0)
|
|
5289
|
+
return 'unchecked';
|
|
5290
|
+
return count === leaves.length ? 'checked' : 'mixed';
|
|
5291
|
+
}
|
|
5292
|
+
/** `aria-checked` in multiple mode. */
|
|
5293
|
+
ariaChecked(node) {
|
|
5294
|
+
const state = this.checkState(node);
|
|
5295
|
+
return state === 'checked' ? 'true' : state === 'mixed' ? 'mixed' : 'false';
|
|
5296
|
+
}
|
|
5297
|
+
rowDomId(index) {
|
|
5298
|
+
return `${this.id}-row-${index}`;
|
|
5299
|
+
}
|
|
5300
|
+
// ── Open / close ─────────────────────────────────────────────
|
|
5301
|
+
toggleOpen() {
|
|
5302
|
+
if (this.#open())
|
|
5303
|
+
this.close(false);
|
|
5304
|
+
else
|
|
5305
|
+
this.open();
|
|
5306
|
+
}
|
|
5307
|
+
open(focusTree = false) {
|
|
5308
|
+
if (this.isDisabled() || this.#open())
|
|
5309
|
+
return;
|
|
5310
|
+
this.#revealSelected();
|
|
5311
|
+
this.#active.set(null);
|
|
5312
|
+
this.#open.set(true);
|
|
5313
|
+
if (focusTree)
|
|
5314
|
+
this.#focusActiveAfterRender();
|
|
5315
|
+
}
|
|
5316
|
+
close(focusTrigger) {
|
|
5317
|
+
this.#open.set(false);
|
|
5318
|
+
this.#search.set('');
|
|
5319
|
+
this.#active.set(null);
|
|
5320
|
+
if (focusTrigger)
|
|
5321
|
+
this.triggerRef()?.nativeElement.focus();
|
|
5322
|
+
}
|
|
5323
|
+
/** Expands the ancestors of the selected nodes so they are visible on open. */
|
|
5324
|
+
#revealSelected() {
|
|
5325
|
+
const { parentOf } = this.#index();
|
|
5326
|
+
const next = new Set(this.expanded());
|
|
5327
|
+
const before = next.size;
|
|
5328
|
+
for (const id of this.selectedIds()) {
|
|
5329
|
+
let parent = parentOf.get(id) ?? null;
|
|
5330
|
+
while (parent !== null) {
|
|
5331
|
+
next.add(parent);
|
|
5332
|
+
parent = parentOf.get(parent) ?? null;
|
|
5333
|
+
}
|
|
5334
|
+
}
|
|
5335
|
+
if (next.size !== before)
|
|
5336
|
+
this.expanded.set([...next]);
|
|
5337
|
+
}
|
|
5338
|
+
// ── Actions ──────────────────────────────────────────────────
|
|
5339
|
+
toggleExpand(node, force) {
|
|
5340
|
+
if (!node.children?.length)
|
|
5341
|
+
return;
|
|
5342
|
+
const current = this.expanded();
|
|
5343
|
+
const isExpanded = current.includes(node.id);
|
|
5344
|
+
const next = force ?? !isExpanded;
|
|
5345
|
+
if (next === isExpanded)
|
|
5346
|
+
return;
|
|
5347
|
+
this.expanded.set(next ? [...current, node.id] : current.filter((id) => id !== node.id));
|
|
5348
|
+
}
|
|
5349
|
+
/** Click or Enter / Space on a row. */
|
|
5350
|
+
activate(row) {
|
|
5351
|
+
const { node } = row;
|
|
5352
|
+
this.#active.set(node.id);
|
|
5353
|
+
if (this.multiple()) {
|
|
5354
|
+
this.toggleCheck(node);
|
|
5355
|
+
}
|
|
5356
|
+
else if (row.hasChildren && !this.selectableParents()) {
|
|
5357
|
+
this.toggleExpand(node);
|
|
5358
|
+
}
|
|
5359
|
+
else {
|
|
5360
|
+
this.select(node);
|
|
5361
|
+
}
|
|
5362
|
+
}
|
|
5363
|
+
select(node) {
|
|
5364
|
+
if (node.disabled)
|
|
5365
|
+
return;
|
|
5366
|
+
this.#commit(node.id);
|
|
5367
|
+
this.close(true);
|
|
5368
|
+
}
|
|
5369
|
+
toggleCheck(node) {
|
|
5370
|
+
if (node.disabled)
|
|
5371
|
+
return;
|
|
5372
|
+
const selected = new Set(this.selectedIds());
|
|
5373
|
+
if (this.cascade() && node.children?.length) {
|
|
5374
|
+
const leaves = (this.#index().leavesOf.get(node.id) ?? []).filter((l) => !l.disabled);
|
|
5375
|
+
const allOn = leaves.every((l) => selected.has(l.id));
|
|
5376
|
+
for (const leaf of leaves) {
|
|
5377
|
+
if (allOn)
|
|
5378
|
+
selected.delete(leaf.id);
|
|
5379
|
+
else
|
|
5380
|
+
selected.add(leaf.id);
|
|
5381
|
+
}
|
|
5382
|
+
}
|
|
5383
|
+
else if (selected.has(node.id)) {
|
|
5384
|
+
selected.delete(node.id);
|
|
5385
|
+
}
|
|
5386
|
+
else {
|
|
5387
|
+
selected.add(node.id);
|
|
5388
|
+
}
|
|
5389
|
+
this.#commit([...selected]);
|
|
5390
|
+
}
|
|
5391
|
+
remove(id, event) {
|
|
5392
|
+
event.stopPropagation();
|
|
5393
|
+
this.#commit(this.selectedIds().filter((v) => v !== id));
|
|
5394
|
+
}
|
|
5395
|
+
#commit(next) {
|
|
5396
|
+
this.value.set(next);
|
|
5397
|
+
this.onChange(next);
|
|
5398
|
+
this.onTouched();
|
|
5399
|
+
}
|
|
5400
|
+
onSearch(event) {
|
|
5401
|
+
this.#search.set(event.target.value);
|
|
5402
|
+
this.#active.set(null);
|
|
5403
|
+
}
|
|
5404
|
+
// ── Keyboard ─────────────────────────────────────────────────
|
|
5405
|
+
onTriggerKeydown(event) {
|
|
5406
|
+
// Ignore keys from nested controls (chip remove buttons).
|
|
5407
|
+
if (event.target !== event.currentTarget)
|
|
5408
|
+
return;
|
|
5409
|
+
if (event.key === 'ArrowDown' || (isActivationKey(event) && !this.#open())) {
|
|
5410
|
+
event.preventDefault();
|
|
5411
|
+
if (this.#open())
|
|
5412
|
+
this.#focusActiveAfterRender();
|
|
5413
|
+
else
|
|
5414
|
+
this.open(true);
|
|
5415
|
+
}
|
|
5416
|
+
else if (isActivationKey(event)) {
|
|
5417
|
+
event.preventDefault();
|
|
5418
|
+
this.close(false);
|
|
5419
|
+
}
|
|
5420
|
+
}
|
|
5421
|
+
onSearchKeydown(event) {
|
|
5422
|
+
if (event.key !== 'ArrowDown')
|
|
5423
|
+
return;
|
|
5424
|
+
event.preventDefault();
|
|
5425
|
+
this.#focusActiveAfterRender();
|
|
5426
|
+
}
|
|
5427
|
+
onRowKeydown(event, row, index) {
|
|
5428
|
+
const rows = this.rows();
|
|
5429
|
+
let target = null;
|
|
5430
|
+
switch (event.key) {
|
|
5431
|
+
case 'ArrowDown':
|
|
5432
|
+
target = Math.min(index + 1, rows.length - 1);
|
|
5433
|
+
break;
|
|
5434
|
+
case 'ArrowUp':
|
|
5435
|
+
target = Math.max(index - 1, 0);
|
|
5436
|
+
break;
|
|
5437
|
+
case 'Home':
|
|
5438
|
+
target = 0;
|
|
5439
|
+
break;
|
|
5440
|
+
case 'End':
|
|
5441
|
+
target = rows.length - 1;
|
|
5442
|
+
break;
|
|
5443
|
+
case 'ArrowRight':
|
|
5444
|
+
if (row.hasChildren && !row.expanded)
|
|
5445
|
+
this.toggleExpand(row.node, true);
|
|
5446
|
+
else if (row.expanded)
|
|
5447
|
+
target = index + 1;
|
|
5448
|
+
break;
|
|
5449
|
+
case 'ArrowLeft':
|
|
5450
|
+
if (row.expanded && !this.#search().trim())
|
|
5451
|
+
this.toggleExpand(row.node, false);
|
|
5452
|
+
else if (row.parentId !== null)
|
|
5453
|
+
target = rows.findIndex((r) => r.node.id === row.parentId);
|
|
5454
|
+
break;
|
|
5455
|
+
case 'Enter':
|
|
5456
|
+
case ' ':
|
|
5457
|
+
this.activate(row);
|
|
5458
|
+
break;
|
|
5459
|
+
case 'Tab':
|
|
5460
|
+
this.close(false);
|
|
5461
|
+
return;
|
|
5462
|
+
default:
|
|
5463
|
+
return;
|
|
5464
|
+
}
|
|
5465
|
+
event.preventDefault();
|
|
5466
|
+
if (target !== null && rows[target]) {
|
|
5467
|
+
this.#active.set(rows[target].node.id);
|
|
5468
|
+
this.#focusActiveAfterRender();
|
|
5469
|
+
}
|
|
5470
|
+
}
|
|
5471
|
+
#focusActiveAfterRender() {
|
|
5472
|
+
afterNextRender(() => {
|
|
5473
|
+
const id = this.focusableId();
|
|
5474
|
+
const index = this.rows().findIndex((r) => r.node.id === id);
|
|
5475
|
+
if (index >= 0)
|
|
5476
|
+
document.getElementById(this.rowDomId(index))?.focus();
|
|
5477
|
+
}, { injector: this.#injector });
|
|
5478
|
+
}
|
|
5479
|
+
// ── CVA ──────────────────────────────────────────────────────
|
|
5480
|
+
onChange = () => { };
|
|
5481
|
+
onTouched = () => { };
|
|
5482
|
+
writeValue(v) {
|
|
5483
|
+
this.value.set(v ?? (this.multiple() ? [] : null));
|
|
5484
|
+
}
|
|
5485
|
+
registerOnChange(fn) {
|
|
5486
|
+
this.onChange = fn;
|
|
5487
|
+
}
|
|
5488
|
+
registerOnTouched(fn) {
|
|
5489
|
+
this.onTouched = fn;
|
|
5490
|
+
}
|
|
5491
|
+
setDisabledState(disabled) {
|
|
5492
|
+
this.#cvaDisabled.set(disabled);
|
|
5493
|
+
}
|
|
5494
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TreeSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5495
|
+
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: [
|
|
5496
|
+
{
|
|
5497
|
+
provide: NG_VALUE_ACCESSOR,
|
|
5498
|
+
useExisting: forwardRef(() => TreeSelectComponent),
|
|
5499
|
+
multi: true,
|
|
5500
|
+
},
|
|
5501
|
+
], 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 });
|
|
5502
|
+
}
|
|
5503
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TreeSelectComponent, decorators: [{
|
|
5504
|
+
type: Component,
|
|
5505
|
+
args: [{ selector: 'ngx-ds-tree-select', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
5506
|
+
{
|
|
5507
|
+
provide: NG_VALUE_ACCESSOR,
|
|
5508
|
+
useExisting: forwardRef(() => TreeSelectComponent),
|
|
5509
|
+
multi: true,
|
|
5510
|
+
},
|
|
5511
|
+
], 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"] }]
|
|
5512
|
+
}], 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 }] }] } });
|
|
4758
5513
|
|
|
4759
5514
|
class PaginationComponent {
|
|
4760
5515
|
i18n = inject(NGX_DS_LABELS);
|
|
@@ -4825,11 +5580,11 @@ class ToastComponent {
|
|
|
4825
5580
|
}
|
|
4826
5581
|
getIconPath(type) {
|
|
4827
5582
|
const defaultType = 'info';
|
|
4828
|
-
const effectiveType = type || defaultType;
|
|
5583
|
+
const effectiveType = type === 'error' ? 'danger' : type || defaultType;
|
|
4829
5584
|
// Return icon SVG path based on type
|
|
4830
5585
|
const icons = {
|
|
4831
5586
|
success: 'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z',
|
|
4832
|
-
|
|
5587
|
+
danger: 'M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z',
|
|
4833
5588
|
warning: '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',
|
|
4834
5589
|
info: 'M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z',
|
|
4835
5590
|
};
|
|
@@ -4839,11 +5594,11 @@ class ToastComponent {
|
|
|
4839
5594
|
this.toastService.remove(id);
|
|
4840
5595
|
}
|
|
4841
5596
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4842
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ToastComponent, isStandalone: true, selector: "ngx-ds-toast", ngImport: i0, template: "@for (position of ['top-right', 'top-left', 'bottom-right', 'bottom-left']; track position) {\n @if (getToastsByPosition(position).length > 0) {\n <div class=\"toast-container\" [class]=\"'toast-container--' + position\">\n @for (toast of getToastsByPosition(position); track toast.id) {\n <div class=\"toast\" [class]=\"'toast--' + toast.type\">\n <div class=\"toast__icon\">\n <svg fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n [attr.d]=\"getIconPath(toast.type)\"\n />\n </svg>\n </div>\n\n <div class=\"toast__content\">\n @if (toast.title) {\n <div class=\"toast__title\">{{ toast.title }}</div>\n }\n <div class=\"toast__message\">{{ toast.message }}</div>\n </div>\n\n <button\n type=\"button\"\n class=\"toast__close\"\n (click)=\"onClose(toast.id)\"\n [attr.aria-label]=\"i18n.close\"\n >\n <svg fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n\n @if (toast.duration && toast.duration > 0) {\n <div class=\"toast__progress\" [style.animation-duration]=\"toast.duration + 'ms'\"></div>\n }\n </div>\n }\n </div>\n }\n}\n", styles: [".toast-container{position:fixed;z-index:10001;display:flex;flex-direction:column;gap:.75rem;pointer-events:none;max-width:24rem;width:calc(100% - 2rem);padding:1rem}.toast-container--top-right{top:0;right:0;align-items:flex-end}.toast-container--top-left{top:0;left:0;align-items:flex-start}.toast-container--bottom-right{bottom:0;right:0;align-items:flex-end}.toast-container--bottom-left{bottom:0;left:0;align-items:flex-start}.toast{position:relative;display:flex;align-items:center;gap:.75rem;background-color:var(--surface-subtle, #f9fafb);border-radius:.5rem;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;padding:.85rem;min-width:20rem;max-width:24rem;pointer-events:auto;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif);overflow:hidden}.toast-container--top-right .toast{animation:slideInRight .3s ease-out}@keyframes slideInRight{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}.toast-container--top-left .toast{animation:slideInLeft .3s ease-out}@keyframes slideInLeft{0%{opacity:0;transform:translate(-100%)}to{opacity:1;transform:translate(0)}}.toast-container--bottom-right .toast{animation:slideInBottomRight .3s ease-out}@keyframes slideInBottomRight{0%{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}.toast-container--bottom-left .toast{animation:slideInBottomLeft .3s ease-out}@keyframes slideInBottomLeft{0%{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}.toast__icon{width:2rem;height:2rem;flex-shrink:0}.toast__icon svg{width:100%;height:100%}.toast__content{flex:1;min-width:0}.toast__title{font-size:.875rem;font-weight:600;color:var(--text-base, #111827);line-height:1.4}.toast__message{font-size:.875rem;color:var(--text-muted, #6b7280);line-height:1.5;word-wrap:break-word}.toast__close{width:1rem;height:1rem;flex-shrink:0;display:flex;align-items:center;justify-content:center;background-color:transparent;border:none;color:var(--text-muted, #6b7280);cursor:pointer;padding:0;border-radius:.25rem;transition:all .15s ease;margin-top:-2.2rem;margin-right:-.4rem}.toast__close:hover{color:var(--text-muted, #6b7280);background-color:var(--surface-muted, #f3f4f6)}.toast__close:focus{outline:2px solid var(--primary-500, #6366f1);outline-offset:2px}.toast__close svg{width:100%;height:100%}.toast__progress{position:absolute;bottom:0;left:0;height:3px;background-color:var(--primary-600, #4f46e5);animation:progressDecrease linear forwards;opacity:.3}@keyframes progressDecrease{0%{width:100%}to{width:0%}}.toast--success{--toast-accent: var(--success-500, #10b981)}.toast--
|
|
5597
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ToastComponent, isStandalone: true, selector: "ngx-ds-toast", ngImport: i0, template: "@for (position of ['top-right', 'top-left', 'bottom-right', 'bottom-left']; track position) {\n @if (getToastsByPosition(position).length > 0) {\n <div class=\"toast-container\" [class]=\"'toast-container--' + position\">\n @for (toast of getToastsByPosition(position); track toast.id) {\n <div class=\"toast\" [class]=\"'toast--' + toast.type\">\n <div class=\"toast__icon\">\n <svg fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n [attr.d]=\"getIconPath(toast.type)\"\n />\n </svg>\n </div>\n\n <div class=\"toast__content\">\n @if (toast.title) {\n <div class=\"toast__title\">{{ toast.title }}</div>\n }\n <div class=\"toast__message\">{{ toast.message }}</div>\n </div>\n\n <button\n type=\"button\"\n class=\"toast__close\"\n (click)=\"onClose(toast.id)\"\n [attr.aria-label]=\"i18n.close\"\n >\n <svg fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n\n @if (toast.duration && toast.duration > 0) {\n <div class=\"toast__progress\" [style.animation-duration]=\"toast.duration + 'ms'\"></div>\n }\n </div>\n }\n </div>\n }\n}\n", styles: [".toast-container{position:fixed;z-index:10001;display:flex;flex-direction:column;gap:.75rem;pointer-events:none;max-width:24rem;width:calc(100% - 2rem);padding:1rem}.toast-container--top-right{top:0;right:0;align-items:flex-end}.toast-container--top-left{top:0;left:0;align-items:flex-start}.toast-container--bottom-right{bottom:0;right:0;align-items:flex-end}.toast-container--bottom-left{bottom:0;left:0;align-items:flex-start}.toast{position:relative;display:flex;align-items:center;gap:.75rem;background-color:var(--surface-subtle, #f9fafb);border-radius:.5rem;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;padding:.85rem;min-width:20rem;max-width:24rem;pointer-events:auto;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif);overflow:hidden}.toast-container--top-right .toast{animation:slideInRight .3s ease-out}@keyframes slideInRight{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}.toast-container--top-left .toast{animation:slideInLeft .3s ease-out}@keyframes slideInLeft{0%{opacity:0;transform:translate(-100%)}to{opacity:1;transform:translate(0)}}.toast-container--bottom-right .toast{animation:slideInBottomRight .3s ease-out}@keyframes slideInBottomRight{0%{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}.toast-container--bottom-left .toast{animation:slideInBottomLeft .3s ease-out}@keyframes slideInBottomLeft{0%{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}.toast__icon{width:2rem;height:2rem;flex-shrink:0}.toast__icon svg{width:100%;height:100%}.toast__content{flex:1;min-width:0}.toast__title{font-size:.875rem;font-weight:600;color:var(--text-base, #111827);line-height:1.4}.toast__message{font-size:.875rem;color:var(--text-muted, #6b7280);line-height:1.5;word-wrap:break-word}.toast__close{width:1rem;height:1rem;flex-shrink:0;display:flex;align-items:center;justify-content:center;background-color:transparent;border:none;color:var(--text-muted, #6b7280);cursor:pointer;padding:0;border-radius:.25rem;transition:all .15s ease;margin-top:-2.2rem;margin-right:-.4rem}.toast__close:hover{color:var(--text-muted, #6b7280);background-color:var(--surface-muted, #f3f4f6)}.toast__close:focus{outline:2px solid var(--primary-500, #6366f1);outline-offset:2px}.toast__close svg{width:100%;height:100%}.toast__progress{position:absolute;bottom:0;left:0;height:3px;background-color:var(--primary-600, #4f46e5);animation:progressDecrease linear forwards;opacity:.3}@keyframes progressDecrease{0%{width:100%}to{width:0%}}.toast--success{--toast-accent: var(--success-500, #10b981)}.toast--danger{--toast-accent: var(--danger-500, #ef4444)}.toast--warning{--toast-accent: var(--warning-500, #f59e0b)}.toast--info{--toast-accent: var(--info-500, #3b82f6)}.toast--success,.toast--danger,.toast--warning,.toast--info{border-left:4px solid var(--toast-accent)}.toast--success .toast__icon,.toast--danger .toast__icon,.toast--warning .toast__icon,.toast--info .toast__icon{color:var(--toast-accent)}.toast--success .toast__progress,.toast--danger .toast__progress,.toast--warning .toast__progress,.toast--info .toast__progress{background-color:var(--toast-accent)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4843
5598
|
}
|
|
4844
5599
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ToastComponent, decorators: [{
|
|
4845
5600
|
type: Component,
|
|
4846
|
-
args: [{ selector: 'ngx-ds-toast', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@for (position of ['top-right', 'top-left', 'bottom-right', 'bottom-left']; track position) {\n @if (getToastsByPosition(position).length > 0) {\n <div class=\"toast-container\" [class]=\"'toast-container--' + position\">\n @for (toast of getToastsByPosition(position); track toast.id) {\n <div class=\"toast\" [class]=\"'toast--' + toast.type\">\n <div class=\"toast__icon\">\n <svg fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n [attr.d]=\"getIconPath(toast.type)\"\n />\n </svg>\n </div>\n\n <div class=\"toast__content\">\n @if (toast.title) {\n <div class=\"toast__title\">{{ toast.title }}</div>\n }\n <div class=\"toast__message\">{{ toast.message }}</div>\n </div>\n\n <button\n type=\"button\"\n class=\"toast__close\"\n (click)=\"onClose(toast.id)\"\n [attr.aria-label]=\"i18n.close\"\n >\n <svg fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n\n @if (toast.duration && toast.duration > 0) {\n <div class=\"toast__progress\" [style.animation-duration]=\"toast.duration + 'ms'\"></div>\n }\n </div>\n }\n </div>\n }\n}\n", styles: [".toast-container{position:fixed;z-index:10001;display:flex;flex-direction:column;gap:.75rem;pointer-events:none;max-width:24rem;width:calc(100% - 2rem);padding:1rem}.toast-container--top-right{top:0;right:0;align-items:flex-end}.toast-container--top-left{top:0;left:0;align-items:flex-start}.toast-container--bottom-right{bottom:0;right:0;align-items:flex-end}.toast-container--bottom-left{bottom:0;left:0;align-items:flex-start}.toast{position:relative;display:flex;align-items:center;gap:.75rem;background-color:var(--surface-subtle, #f9fafb);border-radius:.5rem;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;padding:.85rem;min-width:20rem;max-width:24rem;pointer-events:auto;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif);overflow:hidden}.toast-container--top-right .toast{animation:slideInRight .3s ease-out}@keyframes slideInRight{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}.toast-container--top-left .toast{animation:slideInLeft .3s ease-out}@keyframes slideInLeft{0%{opacity:0;transform:translate(-100%)}to{opacity:1;transform:translate(0)}}.toast-container--bottom-right .toast{animation:slideInBottomRight .3s ease-out}@keyframes slideInBottomRight{0%{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}.toast-container--bottom-left .toast{animation:slideInBottomLeft .3s ease-out}@keyframes slideInBottomLeft{0%{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}.toast__icon{width:2rem;height:2rem;flex-shrink:0}.toast__icon svg{width:100%;height:100%}.toast__content{flex:1;min-width:0}.toast__title{font-size:.875rem;font-weight:600;color:var(--text-base, #111827);line-height:1.4}.toast__message{font-size:.875rem;color:var(--text-muted, #6b7280);line-height:1.5;word-wrap:break-word}.toast__close{width:1rem;height:1rem;flex-shrink:0;display:flex;align-items:center;justify-content:center;background-color:transparent;border:none;color:var(--text-muted, #6b7280);cursor:pointer;padding:0;border-radius:.25rem;transition:all .15s ease;margin-top:-2.2rem;margin-right:-.4rem}.toast__close:hover{color:var(--text-muted, #6b7280);background-color:var(--surface-muted, #f3f4f6)}.toast__close:focus{outline:2px solid var(--primary-500, #6366f1);outline-offset:2px}.toast__close svg{width:100%;height:100%}.toast__progress{position:absolute;bottom:0;left:0;height:3px;background-color:var(--primary-600, #4f46e5);animation:progressDecrease linear forwards;opacity:.3}@keyframes progressDecrease{0%{width:100%}to{width:0%}}.toast--success{--toast-accent: var(--success-500, #10b981)}.toast--
|
|
5601
|
+
args: [{ selector: 'ngx-ds-toast', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@for (position of ['top-right', 'top-left', 'bottom-right', 'bottom-left']; track position) {\n @if (getToastsByPosition(position).length > 0) {\n <div class=\"toast-container\" [class]=\"'toast-container--' + position\">\n @for (toast of getToastsByPosition(position); track toast.id) {\n <div class=\"toast\" [class]=\"'toast--' + toast.type\">\n <div class=\"toast__icon\">\n <svg fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n [attr.d]=\"getIconPath(toast.type)\"\n />\n </svg>\n </div>\n\n <div class=\"toast__content\">\n @if (toast.title) {\n <div class=\"toast__title\">{{ toast.title }}</div>\n }\n <div class=\"toast__message\">{{ toast.message }}</div>\n </div>\n\n <button\n type=\"button\"\n class=\"toast__close\"\n (click)=\"onClose(toast.id)\"\n [attr.aria-label]=\"i18n.close\"\n >\n <svg fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n\n @if (toast.duration && toast.duration > 0) {\n <div class=\"toast__progress\" [style.animation-duration]=\"toast.duration + 'ms'\"></div>\n }\n </div>\n }\n </div>\n }\n}\n", styles: [".toast-container{position:fixed;z-index:10001;display:flex;flex-direction:column;gap:.75rem;pointer-events:none;max-width:24rem;width:calc(100% - 2rem);padding:1rem}.toast-container--top-right{top:0;right:0;align-items:flex-end}.toast-container--top-left{top:0;left:0;align-items:flex-start}.toast-container--bottom-right{bottom:0;right:0;align-items:flex-end}.toast-container--bottom-left{bottom:0;left:0;align-items:flex-start}.toast{position:relative;display:flex;align-items:center;gap:.75rem;background-color:var(--surface-subtle, #f9fafb);border-radius:.5rem;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;padding:.85rem;min-width:20rem;max-width:24rem;pointer-events:auto;font-family:var(--ngx-primary-font-family, \"Poppins\", sans-serif);overflow:hidden}.toast-container--top-right .toast{animation:slideInRight .3s ease-out}@keyframes slideInRight{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}.toast-container--top-left .toast{animation:slideInLeft .3s ease-out}@keyframes slideInLeft{0%{opacity:0;transform:translate(-100%)}to{opacity:1;transform:translate(0)}}.toast-container--bottom-right .toast{animation:slideInBottomRight .3s ease-out}@keyframes slideInBottomRight{0%{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}.toast-container--bottom-left .toast{animation:slideInBottomLeft .3s ease-out}@keyframes slideInBottomLeft{0%{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}.toast__icon{width:2rem;height:2rem;flex-shrink:0}.toast__icon svg{width:100%;height:100%}.toast__content{flex:1;min-width:0}.toast__title{font-size:.875rem;font-weight:600;color:var(--text-base, #111827);line-height:1.4}.toast__message{font-size:.875rem;color:var(--text-muted, #6b7280);line-height:1.5;word-wrap:break-word}.toast__close{width:1rem;height:1rem;flex-shrink:0;display:flex;align-items:center;justify-content:center;background-color:transparent;border:none;color:var(--text-muted, #6b7280);cursor:pointer;padding:0;border-radius:.25rem;transition:all .15s ease;margin-top:-2.2rem;margin-right:-.4rem}.toast__close:hover{color:var(--text-muted, #6b7280);background-color:var(--surface-muted, #f3f4f6)}.toast__close:focus{outline:2px solid var(--primary-500, #6366f1);outline-offset:2px}.toast__close svg{width:100%;height:100%}.toast__progress{position:absolute;bottom:0;left:0;height:3px;background-color:var(--primary-600, #4f46e5);animation:progressDecrease linear forwards;opacity:.3}@keyframes progressDecrease{0%{width:100%}to{width:0%}}.toast--success{--toast-accent: var(--success-500, #10b981)}.toast--danger{--toast-accent: var(--danger-500, #ef4444)}.toast--warning{--toast-accent: var(--warning-500, #f59e0b)}.toast--info{--toast-accent: var(--info-500, #3b82f6)}.toast--success,.toast--danger,.toast--warning,.toast--info{border-left:4px solid var(--toast-accent)}.toast--success .toast__icon,.toast--danger .toast__icon,.toast--warning .toast__icon,.toast--info .toast__icon{color:var(--toast-accent)}.toast--success .toast__progress,.toast--danger .toast__progress,.toast--warning .toast__progress,.toast--info .toast__progress{background-color:var(--toast-accent)}\n"] }]
|
|
4847
5602
|
}] });
|
|
4848
5603
|
|
|
4849
5604
|
class ConfirmationComponent {
|
|
@@ -5247,7 +6002,7 @@ class TableComponent {
|
|
|
5247
6002
|
this.addClick.emit();
|
|
5248
6003
|
}
|
|
5249
6004
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5250
|
-
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 });
|
|
6005
|
+
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", "disabled"], 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 });
|
|
5251
6006
|
}
|
|
5252
6007
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TableComponent, decorators: [{
|
|
5253
6008
|
type: Component,
|
|
@@ -5291,7 +6046,11 @@ class ModalComponent {
|
|
|
5291
6046
|
open = model(false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
5292
6047
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
5293
6048
|
title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
5294
|
-
|
|
6049
|
+
/** Shows the close button in the header. */
|
|
6050
|
+
dismissible = input(true, ...(ngDevMode ? [{ debugName: "dismissible" }] : /* istanbul ignore next */ []));
|
|
6051
|
+
/** @deprecated Use `dismissible`. Removed in 1.0. */
|
|
6052
|
+
showClose = input(undefined, ...(ngDevMode ? [{ debugName: "showClose" }] : /* istanbul ignore next */ []));
|
|
6053
|
+
showCloseButton = computed(() => this.showClose() ?? this.dismissible(), ...(ngDevMode ? [{ debugName: "showCloseButton" }] : /* istanbul ignore next */ []));
|
|
5295
6054
|
closeOnBackdrop = input(true, ...(ngDevMode ? [{ debugName: "closeOnBackdrop" }] : /* istanbul ignore next */ []));
|
|
5296
6055
|
closeOnEscape = input(true, ...(ngDevMode ? [{ debugName: "closeOnEscape" }] : /* istanbul ignore next */ []));
|
|
5297
6056
|
// ── Outputs ──────────────────────────────────────────────────────────────
|
|
@@ -5319,12 +6078,12 @@ class ModalComponent {
|
|
|
5319
6078
|
this.close();
|
|
5320
6079
|
}
|
|
5321
6080
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5322
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ModalComponent, isStandalone: true, selector: "ngx-ds-modal", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, showClose: { classPropertyName: "showClose", publicName: "showClose", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdrop: { classPropertyName: "closeOnBackdrop", publicName: "closeOnBackdrop", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", closed: "closed" }, ngImport: i0, template: "@if (open()) {\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=\"modal-overlay\" (click)=\"$event.target === $event.currentTarget && onBackdropClick()\">\n <div\n [class]=\"panelClasses()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"title() || i18n.dialog\"\n ngxFocusTrap\n tabindex=\"-1\"\n >\n <!-- \u2500\u2500 Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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=\"modal__header\">\n @if (title()) {\n <h2 class=\"modal__title\">{{ title() }}</h2>\n }\n <ng-content select=\"[modal-header]\" />\n @if (
|
|
6081
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ModalComponent, isStandalone: true, selector: "ngx-ds-modal", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, showClose: { classPropertyName: "showClose", publicName: "showClose", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdrop: { classPropertyName: "closeOnBackdrop", publicName: "closeOnBackdrop", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", closed: "closed" }, ngImport: i0, template: "@if (open()) {\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=\"modal-overlay\" (click)=\"$event.target === $event.currentTarget && onBackdropClick()\">\n <div\n [class]=\"panelClasses()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"title() || i18n.dialog\"\n ngxFocusTrap\n tabindex=\"-1\"\n >\n <!-- \u2500\u2500 Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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=\"modal__header\">\n @if (title()) {\n <h2 class=\"modal__title\">{{ title() }}</h2>\n }\n <ng-content select=\"[modal-header]\" />\n @if (showCloseButton()) {\n <ngx-ds-icon-button\n class=\"modal__close\"\n [icon]=\"icons.X\"\n [ariaLabel]=\"i18n.close\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n [bordered]=\"false\"\n (click)=\"close()\"\n />\n }\n </div>\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 -->\n <div class=\"modal__body\">\n <ng-content />\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 -->\n <div class=\"modal__footer\">\n <ng-content select=\"[modal-footer]\" />\n </div>\n </div>\n </div>\n}\n", styles: [".modal-overlay{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:1rem;background:#00000073;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:modal-overlay-in .18s ease}.modal{position:relative;width:100%;max-height:calc(100dvh - 2rem);display:flex;flex-direction:column;background:var(--surface-base, #ffffff);border-radius:.75rem;box-shadow:0 20px 60px #00000026,0 4px 20px #00000014;overflow:hidden;animation:modal-panel-in .22s cubic-bezier(.34,1.4,.64,1)}.modal--sm{max-width:24rem}.modal--md{max-width:32rem}.modal--lg{max-width:48rem}.modal--xl{max-width:64rem}.modal--full{max-width:calc(100vw - 2rem);height:calc(100dvh - 2rem);border-radius:.5rem}.modal__header{display:flex;align-items:center;gap:.75rem;padding:1.25rem 1.5rem 1rem;border-bottom:1px solid var(--border-base, #e5e7eb);flex-shrink:0}.modal__title{flex:1;margin:0;font-size:1rem;font-weight:600;color:var(--text-base, #111827);line-height:1.4}.modal__close{margin-inline-start:auto;flex-shrink:0}.modal__body{flex:1;overflow-y:auto;padding:1.5rem;font-size:.875rem;color:var(--text-muted, #6b7280);line-height:1.6}.modal__footer{display:flex;align-items:center;justify-content:flex-end;gap:.75rem;padding:1rem 1.5rem;border-top:1px solid var(--border-base, #e5e7eb);flex-shrink:0;flex-wrap:wrap}.modal__footer:not(:has(*)){display:none}@keyframes modal-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes modal-panel-in{0%{opacity:0;transform:scale(.95) translateY(-.5rem)}to{opacity:1;transform:scale(1) translateY(0)}}\n"], dependencies: [{ kind: "component", type: IconButtonComponent, selector: "ngx-ds-icon-button", inputs: ["icon", "ariaLabel", "variant", "size", "color", "rounded", "bordered", "disabled", "type"] }, { kind: "directive", type: FocusTrapDirective, selector: "[ngxFocusTrap]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5323
6082
|
}
|
|
5324
6083
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ModalComponent, decorators: [{
|
|
5325
6084
|
type: Component,
|
|
5326
|
-
args: [{ selector: 'ngx-ds-modal', standalone: true, imports: [IconButtonComponent, FocusTrapDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (open()) {\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=\"modal-overlay\" (click)=\"$event.target === $event.currentTarget && onBackdropClick()\">\n <div\n [class]=\"panelClasses()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"title() || i18n.dialog\"\n ngxFocusTrap\n tabindex=\"-1\"\n >\n <!-- \u2500\u2500 Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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=\"modal__header\">\n @if (title()) {\n <h2 class=\"modal__title\">{{ title() }}</h2>\n }\n <ng-content select=\"[modal-header]\" />\n @if (
|
|
5327
|
-
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], showClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClose", required: false }] }], closeOnBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdrop", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
6085
|
+
args: [{ selector: 'ngx-ds-modal', standalone: true, imports: [IconButtonComponent, FocusTrapDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (open()) {\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=\"modal-overlay\" (click)=\"$event.target === $event.currentTarget && onBackdropClick()\">\n <div\n [class]=\"panelClasses()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"title() || i18n.dialog\"\n ngxFocusTrap\n tabindex=\"-1\"\n >\n <!-- \u2500\u2500 Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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=\"modal__header\">\n @if (title()) {\n <h2 class=\"modal__title\">{{ title() }}</h2>\n }\n <ng-content select=\"[modal-header]\" />\n @if (showCloseButton()) {\n <ngx-ds-icon-button\n class=\"modal__close\"\n [icon]=\"icons.X\"\n [ariaLabel]=\"i18n.close\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n [bordered]=\"false\"\n (click)=\"close()\"\n />\n }\n </div>\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 -->\n <div class=\"modal__body\">\n <ng-content />\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 -->\n <div class=\"modal__footer\">\n <ng-content select=\"[modal-footer]\" />\n </div>\n </div>\n </div>\n}\n", styles: [".modal-overlay{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:1rem;background:#00000073;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:modal-overlay-in .18s ease}.modal{position:relative;width:100%;max-height:calc(100dvh - 2rem);display:flex;flex-direction:column;background:var(--surface-base, #ffffff);border-radius:.75rem;box-shadow:0 20px 60px #00000026,0 4px 20px #00000014;overflow:hidden;animation:modal-panel-in .22s cubic-bezier(.34,1.4,.64,1)}.modal--sm{max-width:24rem}.modal--md{max-width:32rem}.modal--lg{max-width:48rem}.modal--xl{max-width:64rem}.modal--full{max-width:calc(100vw - 2rem);height:calc(100dvh - 2rem);border-radius:.5rem}.modal__header{display:flex;align-items:center;gap:.75rem;padding:1.25rem 1.5rem 1rem;border-bottom:1px solid var(--border-base, #e5e7eb);flex-shrink:0}.modal__title{flex:1;margin:0;font-size:1rem;font-weight:600;color:var(--text-base, #111827);line-height:1.4}.modal__close{margin-inline-start:auto;flex-shrink:0}.modal__body{flex:1;overflow-y:auto;padding:1.5rem;font-size:.875rem;color:var(--text-muted, #6b7280);line-height:1.6}.modal__footer{display:flex;align-items:center;justify-content:flex-end;gap:.75rem;padding:1rem 1.5rem;border-top:1px solid var(--border-base, #e5e7eb);flex-shrink:0;flex-wrap:wrap}.modal__footer:not(:has(*)){display:none}@keyframes modal-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes modal-panel-in{0%{opacity:0;transform:scale(.95) translateY(-.5rem)}to{opacity:1;transform:scale(1) translateY(0)}}\n"] }]
|
|
6086
|
+
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], showClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClose", required: false }] }], closeOnBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdrop", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
5328
6087
|
|
|
5329
6088
|
class TabContentDirective {
|
|
5330
6089
|
templateRef = inject(TemplateRef);
|
|
@@ -5479,7 +6238,11 @@ class DrawerComponent {
|
|
|
5479
6238
|
side = input('right', ...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
|
|
5480
6239
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
5481
6240
|
title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
5482
|
-
|
|
6241
|
+
/** Shows the close button in the header. */
|
|
6242
|
+
dismissible = input(true, ...(ngDevMode ? [{ debugName: "dismissible" }] : /* istanbul ignore next */ []));
|
|
6243
|
+
/** @deprecated Use `dismissible`. Removed in 1.0. */
|
|
6244
|
+
showClose = input(undefined, ...(ngDevMode ? [{ debugName: "showClose" }] : /* istanbul ignore next */ []));
|
|
6245
|
+
showCloseButton = computed(() => this.showClose() ?? this.dismissible(), ...(ngDevMode ? [{ debugName: "showCloseButton" }] : /* istanbul ignore next */ []));
|
|
5483
6246
|
closeOnBackdrop = input(true, ...(ngDevMode ? [{ debugName: "closeOnBackdrop" }] : /* istanbul ignore next */ []));
|
|
5484
6247
|
closeOnEscape = input(true, ...(ngDevMode ? [{ debugName: "closeOnEscape" }] : /* istanbul ignore next */ []));
|
|
5485
6248
|
// ── Outputs ──────────────────────────────────────────────────────────────
|
|
@@ -5507,12 +6270,12 @@ class DrawerComponent {
|
|
|
5507
6270
|
this.close();
|
|
5508
6271
|
}
|
|
5509
6272
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5510
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: DrawerComponent, isStandalone: true, selector: "ngx-ds-drawer", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, showClose: { classPropertyName: "showClose", publicName: "showClose", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdrop: { classPropertyName: "closeOnBackdrop", publicName: "closeOnBackdrop", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", closed: "closed" }, ngImport: i0, template: "@if (open()) {\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=\"drawer-overlay\" (click)=\"$event.target === $event.currentTarget && onBackdropClick()\">\n <div\n [class]=\"panelClasses()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"title() || i18n.drawer\"\n ngxFocusTrap\n tabindex=\"-1\"\n >\n <div class=\"drawer__header\">\n @if (title()) {\n <h2 class=\"drawer__title\">{{ title() }}</h2>\n }\n <ng-content select=\"[drawer-header]\" />\n @if (
|
|
6273
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: DrawerComponent, isStandalone: true, selector: "ngx-ds-drawer", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, showClose: { classPropertyName: "showClose", publicName: "showClose", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdrop: { classPropertyName: "closeOnBackdrop", publicName: "closeOnBackdrop", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", closed: "closed" }, ngImport: i0, template: "@if (open()) {\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=\"drawer-overlay\" (click)=\"$event.target === $event.currentTarget && onBackdropClick()\">\n <div\n [class]=\"panelClasses()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"title() || i18n.drawer\"\n ngxFocusTrap\n tabindex=\"-1\"\n >\n <div class=\"drawer__header\">\n @if (title()) {\n <h2 class=\"drawer__title\">{{ title() }}</h2>\n }\n <ng-content select=\"[drawer-header]\" />\n @if (showCloseButton()) {\n <ngx-ds-icon-button\n class=\"drawer__close\"\n [icon]=\"icons.X\"\n [ariaLabel]=\"i18n.close\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n [bordered]=\"false\"\n (click)=\"close()\"\n />\n }\n </div>\n\n <div class=\"drawer__body\">\n <ng-content />\n </div>\n\n <div class=\"drawer__footer\">\n <ng-content select=\"[drawer-footer]\" />\n </div>\n </div>\n </div>\n}\n", styles: [".drawer-overlay{position:fixed;inset:0;z-index:1000;background:#00000073;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:drawer-overlay-in .2s ease}.drawer{position:fixed;z-index:1001;display:flex;flex-direction:column;background:var(--surface-base, #ffffff);overflow:hidden}.drawer--right{top:0;right:0;bottom:0;border-left:1px solid var(--border-base, #e5e7eb);box-shadow:-4px 0 32px #0000001f,-1px 0 8px #0000000f;animation:drawer-slide-right .28s cubic-bezier(.32,.72,0,1)}.drawer--left{top:0;left:0;bottom:0;border-right:1px solid var(--border-base, #e5e7eb);box-shadow:4px 0 32px #0000001f,1px 0 8px #0000000f;animation:drawer-slide-left .28s cubic-bezier(.32,.72,0,1)}.drawer--top{top:0;left:0;right:0;border-bottom:1px solid var(--border-base, #e5e7eb);box-shadow:0 4px 32px #0000001f;animation:drawer-slide-top .28s cubic-bezier(.32,.72,0,1)}.drawer--bottom{bottom:0;left:0;right:0;border-top:1px solid var(--border-base, #e5e7eb);box-shadow:0 -4px 32px #0000001f;animation:drawer-slide-bottom .28s cubic-bezier(.32,.72,0,1)}.drawer--left.drawer--sm,.drawer--right.drawer--sm{width:16rem}.drawer--left.drawer--md,.drawer--right.drawer--md{width:24rem}.drawer--left.drawer--lg,.drawer--right.drawer--lg{width:36rem}.drawer--left.drawer--xl,.drawer--right.drawer--xl{width:48rem}.drawer--left.drawer--full,.drawer--right.drawer--full{width:100vw}.drawer--top.drawer--sm,.drawer--bottom.drawer--sm{height:12rem}.drawer--top.drawer--md,.drawer--bottom.drawer--md{height:18rem}.drawer--top.drawer--lg,.drawer--bottom.drawer--lg{height:24rem}.drawer--top.drawer--xl,.drawer--bottom.drawer--xl{height:32rem}.drawer--top.drawer--full,.drawer--bottom.drawer--full{height:100dvh}.drawer__header{display:flex;align-items:center;gap:.75rem;padding:1.25rem 1.5rem 1rem;border-bottom:1px solid var(--border-base, #e5e7eb);flex-shrink:0}.drawer__title{flex:1;margin:0;font-size:1rem;font-weight:600;color:var(--text-base, #111827);line-height:1.4}.drawer__close{margin-inline-start:auto;flex-shrink:0}.drawer__body{flex:1;overflow-y:auto;padding:1.5rem;font-size:.875rem;color:var(--text-muted, #6b7280);line-height:1.6}.drawer__footer{display:flex;align-items:center;justify-content:flex-end;gap:.75rem;padding:1rem 1.5rem;border-top:1px solid var(--border-base, #e5e7eb);flex-shrink:0;flex-wrap:wrap}.drawer__footer:not(:has(*)){display:none}@keyframes drawer-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes drawer-slide-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes drawer-slide-left{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes drawer-slide-top{0%{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes drawer-slide-bottom{0%{transform:translateY(100%)}to{transform:translateY(0)}}\n"], dependencies: [{ kind: "component", type: IconButtonComponent, selector: "ngx-ds-icon-button", inputs: ["icon", "ariaLabel", "variant", "size", "color", "rounded", "bordered", "disabled", "type"] }, { kind: "directive", type: FocusTrapDirective, selector: "[ngxFocusTrap]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5511
6274
|
}
|
|
5512
6275
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DrawerComponent, decorators: [{
|
|
5513
6276
|
type: Component,
|
|
5514
|
-
args: [{ selector: 'ngx-ds-drawer', standalone: true, imports: [IconButtonComponent, FocusTrapDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (open()) {\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=\"drawer-overlay\" (click)=\"$event.target === $event.currentTarget && onBackdropClick()\">\n <div\n [class]=\"panelClasses()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"title() || i18n.drawer\"\n ngxFocusTrap\n tabindex=\"-1\"\n >\n <div class=\"drawer__header\">\n @if (title()) {\n <h2 class=\"drawer__title\">{{ title() }}</h2>\n }\n <ng-content select=\"[drawer-header]\" />\n @if (
|
|
5515
|
-
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], showClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClose", required: false }] }], closeOnBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdrop", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
6277
|
+
args: [{ selector: 'ngx-ds-drawer', standalone: true, imports: [IconButtonComponent, FocusTrapDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (open()) {\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=\"drawer-overlay\" (click)=\"$event.target === $event.currentTarget && onBackdropClick()\">\n <div\n [class]=\"panelClasses()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"title() || i18n.drawer\"\n ngxFocusTrap\n tabindex=\"-1\"\n >\n <div class=\"drawer__header\">\n @if (title()) {\n <h2 class=\"drawer__title\">{{ title() }}</h2>\n }\n <ng-content select=\"[drawer-header]\" />\n @if (showCloseButton()) {\n <ngx-ds-icon-button\n class=\"drawer__close\"\n [icon]=\"icons.X\"\n [ariaLabel]=\"i18n.close\"\n variant=\"outline\"\n color=\"secondary\"\n size=\"sm\"\n [bordered]=\"false\"\n (click)=\"close()\"\n />\n }\n </div>\n\n <div class=\"drawer__body\">\n <ng-content />\n </div>\n\n <div class=\"drawer__footer\">\n <ng-content select=\"[drawer-footer]\" />\n </div>\n </div>\n </div>\n}\n", styles: [".drawer-overlay{position:fixed;inset:0;z-index:1000;background:#00000073;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:drawer-overlay-in .2s ease}.drawer{position:fixed;z-index:1001;display:flex;flex-direction:column;background:var(--surface-base, #ffffff);overflow:hidden}.drawer--right{top:0;right:0;bottom:0;border-left:1px solid var(--border-base, #e5e7eb);box-shadow:-4px 0 32px #0000001f,-1px 0 8px #0000000f;animation:drawer-slide-right .28s cubic-bezier(.32,.72,0,1)}.drawer--left{top:0;left:0;bottom:0;border-right:1px solid var(--border-base, #e5e7eb);box-shadow:4px 0 32px #0000001f,1px 0 8px #0000000f;animation:drawer-slide-left .28s cubic-bezier(.32,.72,0,1)}.drawer--top{top:0;left:0;right:0;border-bottom:1px solid var(--border-base, #e5e7eb);box-shadow:0 4px 32px #0000001f;animation:drawer-slide-top .28s cubic-bezier(.32,.72,0,1)}.drawer--bottom{bottom:0;left:0;right:0;border-top:1px solid var(--border-base, #e5e7eb);box-shadow:0 -4px 32px #0000001f;animation:drawer-slide-bottom .28s cubic-bezier(.32,.72,0,1)}.drawer--left.drawer--sm,.drawer--right.drawer--sm{width:16rem}.drawer--left.drawer--md,.drawer--right.drawer--md{width:24rem}.drawer--left.drawer--lg,.drawer--right.drawer--lg{width:36rem}.drawer--left.drawer--xl,.drawer--right.drawer--xl{width:48rem}.drawer--left.drawer--full,.drawer--right.drawer--full{width:100vw}.drawer--top.drawer--sm,.drawer--bottom.drawer--sm{height:12rem}.drawer--top.drawer--md,.drawer--bottom.drawer--md{height:18rem}.drawer--top.drawer--lg,.drawer--bottom.drawer--lg{height:24rem}.drawer--top.drawer--xl,.drawer--bottom.drawer--xl{height:32rem}.drawer--top.drawer--full,.drawer--bottom.drawer--full{height:100dvh}.drawer__header{display:flex;align-items:center;gap:.75rem;padding:1.25rem 1.5rem 1rem;border-bottom:1px solid var(--border-base, #e5e7eb);flex-shrink:0}.drawer__title{flex:1;margin:0;font-size:1rem;font-weight:600;color:var(--text-base, #111827);line-height:1.4}.drawer__close{margin-inline-start:auto;flex-shrink:0}.drawer__body{flex:1;overflow-y:auto;padding:1.5rem;font-size:.875rem;color:var(--text-muted, #6b7280);line-height:1.6}.drawer__footer{display:flex;align-items:center;justify-content:flex-end;gap:.75rem;padding:1rem 1.5rem;border-top:1px solid var(--border-base, #e5e7eb);flex-shrink:0;flex-wrap:wrap}.drawer__footer:not(:has(*)){display:none}@keyframes drawer-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes drawer-slide-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes drawer-slide-left{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes drawer-slide-top{0%{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes drawer-slide-bottom{0%{transform:translateY(100%)}to{transform:translateY(0)}}\n"] }]
|
|
6278
|
+
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], showClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClose", required: false }] }], closeOnBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdrop", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
5516
6279
|
|
|
5517
6280
|
class StepComponent {
|
|
5518
6281
|
label = input.required(...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
@@ -5679,7 +6442,9 @@ class PopoverComponent {
|
|
|
5679
6442
|
i18n = inject(NGX_DS_LABELS);
|
|
5680
6443
|
open = model(false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
5681
6444
|
placement = input('bottom', ...(ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []));
|
|
5682
|
-
|
|
6445
|
+
closeOnBackdrop = input(true, ...(ngDevMode ? [{ debugName: "closeOnBackdrop" }] : /* istanbul ignore next */ []));
|
|
6446
|
+
/** @deprecated Use `closeOnBackdrop`. Removed in 1.0. */
|
|
6447
|
+
closeOnClickOutside = input(undefined, ...(ngDevMode ? [{ debugName: "closeOnClickOutside" }] : /* istanbul ignore next */ []));
|
|
5683
6448
|
closeOnEscape = input(true, ...(ngDevMode ? [{ debugName: "closeOnEscape" }] : /* istanbul ignore next */ []));
|
|
5684
6449
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
5685
6450
|
ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
@@ -5722,7 +6487,7 @@ class PopoverComponent {
|
|
|
5722
6487
|
this.close();
|
|
5723
6488
|
});
|
|
5724
6489
|
setupClickOutside(() => {
|
|
5725
|
-
if (!this.open() || !this.closeOnClickOutside())
|
|
6490
|
+
if (!this.open() || !(this.closeOnClickOutside() ?? this.closeOnBackdrop()))
|
|
5726
6491
|
return;
|
|
5727
6492
|
this.close();
|
|
5728
6493
|
});
|
|
@@ -5732,12 +6497,12 @@ class PopoverComponent {
|
|
|
5732
6497
|
this.closed.emit();
|
|
5733
6498
|
}
|
|
5734
6499
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: PopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5735
|
-
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 });
|
|
6500
|
+
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 }, closeOnBackdrop: { classPropertyName: "closeOnBackdrop", publicName: "closeOnBackdrop", 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 });
|
|
5736
6501
|
}
|
|
5737
6502
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: PopoverComponent, decorators: [{
|
|
5738
6503
|
type: Component,
|
|
5739
6504
|
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"] }]
|
|
5740
|
-
}], 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 }] }] } });
|
|
6505
|
+
}], 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 }] }], closeOnBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdrop", 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 }] }] } });
|
|
5741
6506
|
|
|
5742
6507
|
class TimelineItemComponent {
|
|
5743
6508
|
title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
@@ -6043,7 +6808,7 @@ const TYPE_ICONS = {
|
|
|
6043
6808
|
info: Info,
|
|
6044
6809
|
success: CheckCircle,
|
|
6045
6810
|
warning: AlertTriangle,
|
|
6046
|
-
|
|
6811
|
+
danger: AlertCircle,
|
|
6047
6812
|
};
|
|
6048
6813
|
function relativeTime(value, locale, labels) {
|
|
6049
6814
|
if (!value)
|
|
@@ -6069,15 +6834,22 @@ class NotificationItemComponent {
|
|
|
6069
6834
|
i18n = inject(NGX_DS_LABELS);
|
|
6070
6835
|
notification = input.required(...(ngDevMode ? [{ debugName: "notification" }] : /* istanbul ignore next */ []));
|
|
6071
6836
|
markRead = output();
|
|
6837
|
+
dismissed = output();
|
|
6838
|
+
/** @deprecated Use `dismissed`. Removed in 1.0. */
|
|
6072
6839
|
dismiss = output();
|
|
6073
6840
|
action = output();
|
|
6074
6841
|
XIcon = X;
|
|
6075
|
-
|
|
6842
|
+
/** The notification type, with the deprecated `'error'` mapped to `'danger'`. */
|
|
6843
|
+
type = computed(() => {
|
|
6844
|
+
const type = this.notification().type;
|
|
6845
|
+
return type === 'error' ? 'danger' : type;
|
|
6846
|
+
}, ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
6847
|
+
typeIcon = computed(() => TYPE_ICONS[this.type()], ...(ngDevMode ? [{ debugName: "typeIcon" }] : /* istanbul ignore next */ []));
|
|
6076
6848
|
#locale = inject(NGX_DS_LOCALE);
|
|
6077
6849
|
timeLabel = computed(() => relativeTime(this.notification().time, this.#locale, this.i18n), ...(ngDevMode ? [{ debugName: "timeLabel" }] : /* istanbul ignore next */ []));
|
|
6078
6850
|
hostClasses = computed(() => {
|
|
6079
6851
|
const n = this.notification();
|
|
6080
|
-
const cls = [`notif-item notif-item--${
|
|
6852
|
+
const cls = [`notif-item notif-item--${this.type()}`];
|
|
6081
6853
|
if (!n.read)
|
|
6082
6854
|
cls.push('notif-item--unread');
|
|
6083
6855
|
return cls.join(' ');
|
|
@@ -6088,6 +6860,7 @@ class NotificationItemComponent {
|
|
|
6088
6860
|
}
|
|
6089
6861
|
onDismiss(event) {
|
|
6090
6862
|
event.stopPropagation();
|
|
6863
|
+
this.dismissed.emit(this.notification());
|
|
6091
6864
|
this.dismiss.emit(this.notification());
|
|
6092
6865
|
}
|
|
6093
6866
|
onAction(event) {
|
|
@@ -6095,12 +6868,12 @@ class NotificationItemComponent {
|
|
|
6095
6868
|
this.action.emit(this.notification());
|
|
6096
6869
|
}
|
|
6097
6870
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: NotificationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6098
|
-
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--
|
|
6871
|
+
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", dismissed: "dismissed", 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--danger .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--danger .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 });
|
|
6099
6872
|
}
|
|
6100
6873
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: NotificationItemComponent, decorators: [{
|
|
6101
6874
|
type: Component,
|
|
6102
|
-
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--
|
|
6103
|
-
}], 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"] }] } });
|
|
6875
|
+
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--danger .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--danger .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"] }]
|
|
6876
|
+
}], propDecorators: { notification: [{ type: i0.Input, args: [{ isSignal: true, alias: "notification", required: true }] }], markRead: [{ type: i0.Output, args: ["markRead"] }], dismissed: [{ type: i0.Output, args: ["dismissed"] }], dismiss: [{ type: i0.Output, args: ["dismiss"] }], action: [{ type: i0.Output, args: ["action"] }] } });
|
|
6104
6877
|
|
|
6105
6878
|
class NotificationCenterComponent {
|
|
6106
6879
|
i18n = inject(NGX_DS_LABELS);
|
|
@@ -6112,6 +6885,8 @@ class NotificationCenterComponent {
|
|
|
6112
6885
|
// ── Outputs ───────────────────────────────────────────────────────────────
|
|
6113
6886
|
markRead = output();
|
|
6114
6887
|
markAllRead = output();
|
|
6888
|
+
dismissed = output();
|
|
6889
|
+
/** @deprecated Use `dismissed`. Removed in 1.0. */
|
|
6115
6890
|
dismiss = output();
|
|
6116
6891
|
dismissAll = output();
|
|
6117
6892
|
action = output();
|
|
@@ -6149,6 +6924,7 @@ class NotificationCenterComponent {
|
|
|
6149
6924
|
this.markAllRead.emit();
|
|
6150
6925
|
}
|
|
6151
6926
|
onDismiss(n) {
|
|
6927
|
+
this.dismissed.emit(n);
|
|
6152
6928
|
this.dismiss.emit(n);
|
|
6153
6929
|
}
|
|
6154
6930
|
onDismissAll() {
|
|
@@ -6166,12 +6942,12 @@ class NotificationCenterComponent {
|
|
|
6166
6942
|
setupEscapeClose(() => this.#open.set(false));
|
|
6167
6943
|
}
|
|
6168
6944
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: NotificationCenterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6169
|
-
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 (
|
|
6945
|
+
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", dismissed: "dismissed", 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 (dismissed)=\"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", "dismissed", "dismiss", "action"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6170
6946
|
}
|
|
6171
6947
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: NotificationCenterComponent, decorators: [{
|
|
6172
6948
|
type: Component,
|
|
6173
|
-
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 (
|
|
6174
|
-
}], 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"] }] } });
|
|
6949
|
+
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 (dismissed)=\"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"] }]
|
|
6950
|
+
}], 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"] }], dismissed: [{ type: i0.Output, args: ["dismissed"] }], dismiss: [{ type: i0.Output, args: ["dismiss"] }], dismissAll: [{ type: i0.Output, args: ["dismissAll"] }], action: [{ type: i0.Output, args: ["action"] }] } });
|
|
6175
6951
|
|
|
6176
6952
|
class UserMenuComponent {
|
|
6177
6953
|
user = input.required(...(ngDevMode ? [{ debugName: "user" }] : /* istanbul ignore next */ []));
|
|
@@ -6187,7 +6963,7 @@ class UserMenuComponent {
|
|
|
6187
6963
|
this.popover().open.set(false);
|
|
6188
6964
|
}
|
|
6189
6965
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UserMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6190
|
-
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 });
|
|
6966
|
+
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", "closeOnBackdrop", "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 });
|
|
6191
6967
|
}
|
|
6192
6968
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UserMenuComponent, decorators: [{
|
|
6193
6969
|
type: Component,
|
|
@@ -6640,5 +7416,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
6640
7416
|
* Generated bundle index. Do not edit.
|
|
6641
7417
|
*/
|
|
6642
7418
|
|
|
6643
|
-
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,
|
|
7419
|
+
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, 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, createPrimaryPalette, parseTime, provideNgxDs, provideNgxDsLabels, provideNgxDsLocale, stepIndex };
|
|
6644
7420
|
//# sourceMappingURL=jdpo2008-ngx-ds.mjs.map
|