@neuravision/ng-construct 0.3.6 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2964,6 +2964,104 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
|
|
|
2964
2964
|
`, styles: [":host{display:block}\n"] }]
|
|
2965
2965
|
}], propDecorators: { activeTab: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeTab", required: false }] }, { type: i0.Output, args: ["activeTabChange"] }], panels: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => AfTabPanelComponent), { isSignal: true }] }], tabButtons: [{ type: i0.ViewChildren, args: ['tabButton', { isSignal: true }] }] } });
|
|
2966
2966
|
|
|
2967
|
+
/**
|
|
2968
|
+
* Router-based tab navigation component.
|
|
2969
|
+
*
|
|
2970
|
+
* Uses the `ct-tabs` CSS classes from the Construct Design System but renders
|
|
2971
|
+
* `<a routerLink>` elements for navigation. Active state is determined
|
|
2972
|
+
* automatically via `routerLinkActive`.
|
|
2973
|
+
*
|
|
2974
|
+
* For content-panel tabs (show/hide content without routing), use `<af-tabs>` instead.
|
|
2975
|
+
*
|
|
2976
|
+
* @example
|
|
2977
|
+
* <af-nav-tabs
|
|
2978
|
+
* [tabs]="[
|
|
2979
|
+
* { id: 'my', label: 'My Documents', routerLink: '/documents/my' },
|
|
2980
|
+
* { id: 'all', label: 'All Documents', routerLink: '/documents/all' }
|
|
2981
|
+
* ]">
|
|
2982
|
+
* </af-nav-tabs>
|
|
2983
|
+
*/
|
|
2984
|
+
class AfNavTabsComponent {
|
|
2985
|
+
/** Tab items to render. */
|
|
2986
|
+
tabs = input.required(...(ngDevMode ? [{ debugName: "tabs" }] : []));
|
|
2987
|
+
/** Visual variant. `'pill'` renders pill-shaped tabs with background. */
|
|
2988
|
+
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
2989
|
+
/** Size variant. */
|
|
2990
|
+
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
2991
|
+
/** Accessible label for the tab navigation. */
|
|
2992
|
+
ariaLabel = input('Sub navigation', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
2993
|
+
containerClasses = computed(() => {
|
|
2994
|
+
const classes = ['ct-tabs'];
|
|
2995
|
+
const v = this.variant();
|
|
2996
|
+
if (v === 'pill')
|
|
2997
|
+
classes.push('ct-tabs--pill');
|
|
2998
|
+
const s = this.size();
|
|
2999
|
+
if (s !== 'md')
|
|
3000
|
+
classes.push(`ct-tabs--${s}`);
|
|
3001
|
+
return classes.join(' ');
|
|
3002
|
+
}, ...(ngDevMode ? [{ debugName: "containerClasses" }] : []));
|
|
3003
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: AfNavTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3004
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.2", type: AfNavTabsComponent, isStandalone: true, selector: "af-nav-tabs", inputs: { tabs: { classPropertyName: "tabs", publicName: "tabs", 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 }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
3005
|
+
<nav [class]="containerClasses()" [attr.aria-label]="ariaLabel()">
|
|
3006
|
+
<ul class="ct-tabs__list">
|
|
3007
|
+
@for (tab of tabs(); track tab.id) {
|
|
3008
|
+
<li>
|
|
3009
|
+
@if (tab.disabled) {
|
|
3010
|
+
<span
|
|
3011
|
+
class="ct-tabs__trigger"
|
|
3012
|
+
aria-disabled="true"
|
|
3013
|
+
[attr.id]="'nav-tab-' + tab.id">
|
|
3014
|
+
{{ tab.label }}
|
|
3015
|
+
</span>
|
|
3016
|
+
} @else {
|
|
3017
|
+
<a
|
|
3018
|
+
class="ct-tabs__trigger"
|
|
3019
|
+
[routerLink]="tab.routerLink"
|
|
3020
|
+
routerLinkActive="ct-tabs__trigger--active"
|
|
3021
|
+
#rla="routerLinkActive"
|
|
3022
|
+
[attr.aria-current]="rla.isActive ? 'page' : null"
|
|
3023
|
+
[attr.id]="'nav-tab-' + tab.id">
|
|
3024
|
+
{{ tab.label }}
|
|
3025
|
+
</a>
|
|
3026
|
+
}
|
|
3027
|
+
</li>
|
|
3028
|
+
}
|
|
3029
|
+
</ul>
|
|
3030
|
+
</nav>
|
|
3031
|
+
`, isInline: true, styles: [":host{display:block}ul{list-style:none;margin:0;padding:0}li{display:contents}.ct-tabs__trigger--active{color:var(--color-text-primary)}.ct-tabs__trigger--active:after{background:var(--ct-tabs-indicator-color, var(--color-brand-primary))}.ct-tabs--pill .ct-tabs__trigger--active{background:var(--color-bg-elevated);box-shadow:var(--shadow-sm)}.ct-tabs--pill .ct-tabs__trigger--active:after{display:none}.ct-tabs__trigger[aria-disabled=true]{color:var(--color-text-muted);opacity:var(--opacity-disabled, .5);cursor:not-allowed;pointer-events:none}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3032
|
+
}
|
|
3033
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: AfNavTabsComponent, decorators: [{
|
|
3034
|
+
type: Component,
|
|
3035
|
+
args: [{ selector: 'af-nav-tabs', changeDetection: ChangeDetectionStrategy.OnPush, imports: [RouterLink, RouterLinkActive], template: `
|
|
3036
|
+
<nav [class]="containerClasses()" [attr.aria-label]="ariaLabel()">
|
|
3037
|
+
<ul class="ct-tabs__list">
|
|
3038
|
+
@for (tab of tabs(); track tab.id) {
|
|
3039
|
+
<li>
|
|
3040
|
+
@if (tab.disabled) {
|
|
3041
|
+
<span
|
|
3042
|
+
class="ct-tabs__trigger"
|
|
3043
|
+
aria-disabled="true"
|
|
3044
|
+
[attr.id]="'nav-tab-' + tab.id">
|
|
3045
|
+
{{ tab.label }}
|
|
3046
|
+
</span>
|
|
3047
|
+
} @else {
|
|
3048
|
+
<a
|
|
3049
|
+
class="ct-tabs__trigger"
|
|
3050
|
+
[routerLink]="tab.routerLink"
|
|
3051
|
+
routerLinkActive="ct-tabs__trigger--active"
|
|
3052
|
+
#rla="routerLinkActive"
|
|
3053
|
+
[attr.aria-current]="rla.isActive ? 'page' : null"
|
|
3054
|
+
[attr.id]="'nav-tab-' + tab.id">
|
|
3055
|
+
{{ tab.label }}
|
|
3056
|
+
</a>
|
|
3057
|
+
}
|
|
3058
|
+
</li>
|
|
3059
|
+
}
|
|
3060
|
+
</ul>
|
|
3061
|
+
</nav>
|
|
3062
|
+
`, styles: [":host{display:block}ul{list-style:none;margin:0;padding:0}li{display:contents}.ct-tabs__trigger--active{color:var(--color-text-primary)}.ct-tabs__trigger--active:after{background:var(--ct-tabs-indicator-color, var(--color-brand-primary))}.ct-tabs--pill .ct-tabs__trigger--active{background:var(--color-bg-elevated);box-shadow:var(--shadow-sm)}.ct-tabs--pill .ct-tabs__trigger--active:after{display:none}.ct-tabs__trigger[aria-disabled=true]{color:var(--color-text-muted);opacity:var(--opacity-disabled, .5);cursor:not-allowed;pointer-events:none}\n"] }]
|
|
3063
|
+
}], propDecorators: { tabs: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabs", required: true }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
3064
|
+
|
|
2967
3065
|
/**
|
|
2968
3066
|
* Dropdown menu component implementing the WAI-ARIA Menu Pattern.
|
|
2969
3067
|
*
|
|
@@ -3407,10 +3505,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
|
|
|
3407
3505
|
}], propDecorators: { currentPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPage", required: false }] }], totalPages: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalPages", required: false }] }], previousLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "previousLabel", required: false }] }], nextLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextLabel", required: false }] }], maxVisiblePages: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxVisiblePages", required: false }] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }] } });
|
|
3408
3506
|
|
|
3409
3507
|
/**
|
|
3410
|
-
* Breadcrumbs navigation component
|
|
3508
|
+
* Breadcrumbs navigation component with Angular Router support.
|
|
3509
|
+
*
|
|
3510
|
+
* Items with `routerLink` navigate via the Angular Router (no page reload).
|
|
3511
|
+
* Items with `url` render a plain `<a href>` (for external links).
|
|
3512
|
+
* The last item is always rendered as static text (current page).
|
|
3411
3513
|
*
|
|
3412
3514
|
* @example
|
|
3413
|
-
* <af-breadcrumbs [items]="
|
|
3515
|
+
* <af-breadcrumbs [items]="[
|
|
3516
|
+
* { label: 'Home', routerLink: '/' },
|
|
3517
|
+
* { label: 'Documents', routerLink: '/documents' },
|
|
3518
|
+
* { label: 'My Documents' }
|
|
3519
|
+
* ]"></af-breadcrumbs>
|
|
3414
3520
|
*/
|
|
3415
3521
|
class AfBreadcrumbsComponent {
|
|
3416
3522
|
/** Breadcrumb items */
|
|
@@ -3421,34 +3527,50 @@ class AfBreadcrumbsComponent {
|
|
|
3421
3527
|
<ol class="ct-breadcrumbs__list">
|
|
3422
3528
|
@for (item of items(); track $index; let isLast = $last) {
|
|
3423
3529
|
<li class="ct-breadcrumbs__item">
|
|
3424
|
-
@if (
|
|
3530
|
+
@if (isLast) {
|
|
3531
|
+
<span class="ct-breadcrumbs__current" aria-current="page">{{ item.label }}</span>
|
|
3532
|
+
} @else if (item.routerLink) {
|
|
3533
|
+
<a class="ct-breadcrumbs__link" [routerLink]="item.routerLink">
|
|
3534
|
+
{{ item.label }}
|
|
3535
|
+
</a>
|
|
3536
|
+
<span class="ct-breadcrumbs__separator" aria-hidden="true">/</span>
|
|
3537
|
+
} @else if (item.url) {
|
|
3425
3538
|
<a class="ct-breadcrumbs__link" [href]="item.url">
|
|
3426
3539
|
{{ item.label }}
|
|
3427
3540
|
</a>
|
|
3428
|
-
<span class="ct-breadcrumbs__separator">/</span>
|
|
3541
|
+
<span class="ct-breadcrumbs__separator" aria-hidden="true">/</span>
|
|
3429
3542
|
} @else {
|
|
3430
|
-
<span class="ct-
|
|
3543
|
+
<span class="ct-breadcrumbs__text">{{ item.label }}</span>
|
|
3544
|
+
<span class="ct-breadcrumbs__separator" aria-hidden="true">/</span>
|
|
3431
3545
|
}
|
|
3432
3546
|
</li>
|
|
3433
3547
|
}
|
|
3434
3548
|
</ol>
|
|
3435
3549
|
</nav>
|
|
3436
|
-
`, isInline: true, styles: [":host{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3550
|
+
`, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3437
3551
|
}
|
|
3438
3552
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: AfBreadcrumbsComponent, decorators: [{
|
|
3439
3553
|
type: Component,
|
|
3440
|
-
args: [{ selector: 'af-breadcrumbs', changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
3554
|
+
args: [{ selector: 'af-breadcrumbs', changeDetection: ChangeDetectionStrategy.OnPush, imports: [RouterLink], template: `
|
|
3441
3555
|
<nav class="ct-breadcrumbs" aria-label="Breadcrumb">
|
|
3442
3556
|
<ol class="ct-breadcrumbs__list">
|
|
3443
3557
|
@for (item of items(); track $index; let isLast = $last) {
|
|
3444
3558
|
<li class="ct-breadcrumbs__item">
|
|
3445
|
-
@if (
|
|
3559
|
+
@if (isLast) {
|
|
3560
|
+
<span class="ct-breadcrumbs__current" aria-current="page">{{ item.label }}</span>
|
|
3561
|
+
} @else if (item.routerLink) {
|
|
3562
|
+
<a class="ct-breadcrumbs__link" [routerLink]="item.routerLink">
|
|
3563
|
+
{{ item.label }}
|
|
3564
|
+
</a>
|
|
3565
|
+
<span class="ct-breadcrumbs__separator" aria-hidden="true">/</span>
|
|
3566
|
+
} @else if (item.url) {
|
|
3446
3567
|
<a class="ct-breadcrumbs__link" [href]="item.url">
|
|
3447
3568
|
{{ item.label }}
|
|
3448
3569
|
</a>
|
|
3449
|
-
<span class="ct-breadcrumbs__separator">/</span>
|
|
3570
|
+
<span class="ct-breadcrumbs__separator" aria-hidden="true">/</span>
|
|
3450
3571
|
} @else {
|
|
3451
|
-
<span class="ct-
|
|
3572
|
+
<span class="ct-breadcrumbs__text">{{ item.label }}</span>
|
|
3573
|
+
<span class="ct-breadcrumbs__separator" aria-hidden="true">/</span>
|
|
3452
3574
|
}
|
|
3453
3575
|
</li>
|
|
3454
3576
|
}
|
|
@@ -3917,6 +4039,214 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
|
|
|
3917
4039
|
`, styles: [":host{display:block}\n"] }]
|
|
3918
4040
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormat", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], dateChange: [{ type: i0.Output, args: ["dateChange"] }], inputRef: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], popoverRef: [{ type: i0.ViewChild, args: ['popover', { isSignal: true }] }] } });
|
|
3919
4041
|
|
|
4042
|
+
/**
|
|
4043
|
+
* Chip component for labels, tags, statuses, and interactive filters.
|
|
4044
|
+
*
|
|
4045
|
+
* @example Static chip
|
|
4046
|
+
* <af-chip variant="success" size="sm">Resolved</af-chip>
|
|
4047
|
+
*
|
|
4048
|
+
* @example Toggle chip with two-way binding
|
|
4049
|
+
* <af-chip selectable [(selected)]="isActive">Filter</af-chip>
|
|
4050
|
+
*
|
|
4051
|
+
* @example Removable chip
|
|
4052
|
+
* <af-chip removable (removed)="onRemove()">Status: Active</af-chip>
|
|
4053
|
+
*/
|
|
4054
|
+
class AfChipComponent {
|
|
4055
|
+
/** Semantic color variant. */
|
|
4056
|
+
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
4057
|
+
/** Visual style: subtle (filled background), outline, or solid. */
|
|
4058
|
+
appearance = input('subtle', ...(ngDevMode ? [{ debugName: "appearance" }] : []));
|
|
4059
|
+
/** Size of the chip. */
|
|
4060
|
+
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
4061
|
+
/** Opaque value for identifying this chip in lists or groups. */
|
|
4062
|
+
value = input(...(ngDevMode ? [undefined, { debugName: "value" }] : []));
|
|
4063
|
+
/** Enables toggle behavior with hover, active, focus styles, and keyboard support. */
|
|
4064
|
+
selectable = input(false, { ...(ngDevMode ? { debugName: "selectable" } : {}), transform: booleanAttribute });
|
|
4065
|
+
/** Selected state for toggle chips. Supports two-way binding via `[(selected)]`. */
|
|
4066
|
+
selected = model(false, ...(ngDevMode ? [{ debugName: "selected" }] : []));
|
|
4067
|
+
/** Disables the chip, preventing all interaction. */
|
|
4068
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
4069
|
+
/** Shows a remove button inside the chip. */
|
|
4070
|
+
removable = input(false, { ...(ngDevMode ? { debugName: "removable" } : {}), transform: booleanAttribute });
|
|
4071
|
+
/** Shows a dot status indicator instead of an icon. */
|
|
4072
|
+
dot = input(false, { ...(ngDevMode ? { debugName: "dot" } : {}), transform: booleanAttribute });
|
|
4073
|
+
/** Accessible label for icon-only or truncated chips. */
|
|
4074
|
+
ariaLabel = input(...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : []));
|
|
4075
|
+
/** Accessible label for the remove button. Should be localized by the consumer. */
|
|
4076
|
+
removeAriaLabel = input('Remove', ...(ngDevMode ? [{ debugName: "removeAriaLabel" }] : []));
|
|
4077
|
+
/** Emits the chip's `value` when the remove button is clicked or Delete/Backspace is pressed. */
|
|
4078
|
+
removed = output();
|
|
4079
|
+
chipRole = computed(() => {
|
|
4080
|
+
if (!this.selectable())
|
|
4081
|
+
return null;
|
|
4082
|
+
return this.removable() ? 'group' : 'button';
|
|
4083
|
+
}, ...(ngDevMode ? [{ debugName: "chipRole" }] : []));
|
|
4084
|
+
iconClasses = computed(() => {
|
|
4085
|
+
const classes = ['ct-chip__icon'];
|
|
4086
|
+
if (this.variant() !== 'default') {
|
|
4087
|
+
classes.push(`ct-chip__icon--${this.variant()}`);
|
|
4088
|
+
}
|
|
4089
|
+
return classes.join(' ');
|
|
4090
|
+
}, ...(ngDevMode ? [{ debugName: "iconClasses" }] : []));
|
|
4091
|
+
chipClasses = computed(() => {
|
|
4092
|
+
const classes = ['ct-chip'];
|
|
4093
|
+
if (this.size() !== 'md') {
|
|
4094
|
+
classes.push(`ct-chip--${this.size()}`);
|
|
4095
|
+
}
|
|
4096
|
+
if (this.appearance() !== 'subtle') {
|
|
4097
|
+
classes.push(`ct-chip--${this.appearance()}`);
|
|
4098
|
+
}
|
|
4099
|
+
if (this.variant() !== 'default') {
|
|
4100
|
+
classes.push(`ct-chip--${this.variant()}`);
|
|
4101
|
+
}
|
|
4102
|
+
if (this.selectable()) {
|
|
4103
|
+
classes.push('ct-chip--interactive');
|
|
4104
|
+
}
|
|
4105
|
+
if (this.selectable() && this.selected()) {
|
|
4106
|
+
classes.push('ct-chip--selected');
|
|
4107
|
+
}
|
|
4108
|
+
if (this.disabled()) {
|
|
4109
|
+
classes.push('ct-chip--disabled');
|
|
4110
|
+
}
|
|
4111
|
+
return classes.join(' ');
|
|
4112
|
+
}, ...(ngDevMode ? [{ debugName: "chipClasses" }] : []));
|
|
4113
|
+
handleClick() {
|
|
4114
|
+
if (!this.selectable() || this.disabled())
|
|
4115
|
+
return;
|
|
4116
|
+
this.selected.update(v => !v);
|
|
4117
|
+
}
|
|
4118
|
+
handleKeydown(event) {
|
|
4119
|
+
if (event.target.closest('.ct-chip__remove'))
|
|
4120
|
+
return;
|
|
4121
|
+
if (!this.selectable() || this.disabled())
|
|
4122
|
+
return;
|
|
4123
|
+
event.preventDefault();
|
|
4124
|
+
this.selected.update(v => !v);
|
|
4125
|
+
}
|
|
4126
|
+
handleRemoveKeydown(event) {
|
|
4127
|
+
if (!this.removable() || this.disabled())
|
|
4128
|
+
return;
|
|
4129
|
+
event.preventDefault();
|
|
4130
|
+
this.removed.emit(this.value());
|
|
4131
|
+
}
|
|
4132
|
+
handleRemove(event) {
|
|
4133
|
+
event.stopPropagation();
|
|
4134
|
+
this.removed.emit(this.value());
|
|
4135
|
+
}
|
|
4136
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: AfChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4137
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.2", type: AfChipComponent, isStandalone: true, selector: "af-chip", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, dot: { classPropertyName: "dot", publicName: "dot", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, removeAriaLabel: { classPropertyName: "removeAriaLabel", publicName: "removeAriaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selectedChange", removed: "removed" }, host: { listeners: { "click": "handleClick()", "keydown.enter": "handleKeydown($event)", "keydown.space": "handleKeydown($event)", "keydown.delete": "handleRemoveKeydown($event)", "keydown.backspace": "handleRemoveKeydown($event)" }, properties: { "class": "chipClasses()", "attr.role": "chipRole()", "attr.tabindex": "selectable() && !removable() && !disabled() ? \"0\" : null", "attr.aria-pressed": "selectable() && !removable() ? selected() : null", "attr.aria-disabled": "disabled() || null", "attr.aria-label": "ariaLabel() || null" } }, ngImport: i0, template: `
|
|
4138
|
+
<span
|
|
4139
|
+
class="ct-chip__action"
|
|
4140
|
+
[attr.role]="selectable() && removable() ? 'button' : null"
|
|
4141
|
+
[attr.tabindex]="selectable() && removable() && !disabled() ? '0' : null"
|
|
4142
|
+
[attr.aria-pressed]="selectable() && removable() ? selected() : null">
|
|
4143
|
+
@if (dot()) {
|
|
4144
|
+
<span class="ct-chip__dot" aria-hidden="true"></span>
|
|
4145
|
+
} @else {
|
|
4146
|
+
<span class="ct-chip__avatar">
|
|
4147
|
+
<ng-content select="[chipAvatar]" />
|
|
4148
|
+
</span>
|
|
4149
|
+
|
|
4150
|
+
<span [class]="iconClasses()" aria-hidden="true">
|
|
4151
|
+
<ng-content select="af-icon,[chipIcon]" />
|
|
4152
|
+
</span>
|
|
4153
|
+
}
|
|
4154
|
+
|
|
4155
|
+
<span class="ct-chip__label">
|
|
4156
|
+
<ng-content />
|
|
4157
|
+
</span>
|
|
4158
|
+
|
|
4159
|
+
@if (selectable()) {
|
|
4160
|
+
<span class="ct-chip__check" aria-hidden="true"></span>
|
|
4161
|
+
}
|
|
4162
|
+
</span>
|
|
4163
|
+
|
|
4164
|
+
@if (removable() && !disabled()) {
|
|
4165
|
+
<button
|
|
4166
|
+
type="button"
|
|
4167
|
+
class="ct-chip__remove"
|
|
4168
|
+
[attr.aria-label]="removeAriaLabel()"
|
|
4169
|
+
(click)="handleRemove($event)">
|
|
4170
|
+
<svg
|
|
4171
|
+
viewBox="0 0 24 24"
|
|
4172
|
+
width="16"
|
|
4173
|
+
height="16"
|
|
4174
|
+
fill="none"
|
|
4175
|
+
stroke="currentColor"
|
|
4176
|
+
stroke-width="2"
|
|
4177
|
+
stroke-linecap="round"
|
|
4178
|
+
aria-hidden="true">
|
|
4179
|
+
<line x1="18" y1="6" x2="6" y2="18" />
|
|
4180
|
+
<line x1="6" y1="6" x2="18" y2="18" />
|
|
4181
|
+
</svg>
|
|
4182
|
+
</button>
|
|
4183
|
+
}
|
|
4184
|
+
`, isInline: true, styles: [":host{display:inline-flex;align-items:center}.ct-chip__action{display:contents}.ct-chip__action:focus-visible{outline:none}:host:has(.ct-chip__action:focus-visible){outline:2px solid var(--color-focus-ring, Highlight);outline-offset:2px}.ct-chip__icon:not(:has(*)),.ct-chip__avatar:not(:has(*)){display:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4185
|
+
}
|
|
4186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: AfChipComponent, decorators: [{
|
|
4187
|
+
type: Component,
|
|
4188
|
+
args: [{ selector: 'af-chip', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
4189
|
+
'[class]': 'chipClasses()',
|
|
4190
|
+
'[attr.role]': 'chipRole()',
|
|
4191
|
+
'[attr.tabindex]': 'selectable() && !removable() && !disabled() ? "0" : null',
|
|
4192
|
+
'[attr.aria-pressed]': 'selectable() && !removable() ? selected() : null',
|
|
4193
|
+
'[attr.aria-disabled]': 'disabled() || null',
|
|
4194
|
+
'[attr.aria-label]': 'ariaLabel() || null',
|
|
4195
|
+
'(click)': 'handleClick()',
|
|
4196
|
+
'(keydown.enter)': 'handleKeydown($event)',
|
|
4197
|
+
'(keydown.space)': 'handleKeydown($event)',
|
|
4198
|
+
'(keydown.delete)': 'handleRemoveKeydown($event)',
|
|
4199
|
+
'(keydown.backspace)': 'handleRemoveKeydown($event)',
|
|
4200
|
+
}, template: `
|
|
4201
|
+
<span
|
|
4202
|
+
class="ct-chip__action"
|
|
4203
|
+
[attr.role]="selectable() && removable() ? 'button' : null"
|
|
4204
|
+
[attr.tabindex]="selectable() && removable() && !disabled() ? '0' : null"
|
|
4205
|
+
[attr.aria-pressed]="selectable() && removable() ? selected() : null">
|
|
4206
|
+
@if (dot()) {
|
|
4207
|
+
<span class="ct-chip__dot" aria-hidden="true"></span>
|
|
4208
|
+
} @else {
|
|
4209
|
+
<span class="ct-chip__avatar">
|
|
4210
|
+
<ng-content select="[chipAvatar]" />
|
|
4211
|
+
</span>
|
|
4212
|
+
|
|
4213
|
+
<span [class]="iconClasses()" aria-hidden="true">
|
|
4214
|
+
<ng-content select="af-icon,[chipIcon]" />
|
|
4215
|
+
</span>
|
|
4216
|
+
}
|
|
4217
|
+
|
|
4218
|
+
<span class="ct-chip__label">
|
|
4219
|
+
<ng-content />
|
|
4220
|
+
</span>
|
|
4221
|
+
|
|
4222
|
+
@if (selectable()) {
|
|
4223
|
+
<span class="ct-chip__check" aria-hidden="true"></span>
|
|
4224
|
+
}
|
|
4225
|
+
</span>
|
|
4226
|
+
|
|
4227
|
+
@if (removable() && !disabled()) {
|
|
4228
|
+
<button
|
|
4229
|
+
type="button"
|
|
4230
|
+
class="ct-chip__remove"
|
|
4231
|
+
[attr.aria-label]="removeAriaLabel()"
|
|
4232
|
+
(click)="handleRemove($event)">
|
|
4233
|
+
<svg
|
|
4234
|
+
viewBox="0 0 24 24"
|
|
4235
|
+
width="16"
|
|
4236
|
+
height="16"
|
|
4237
|
+
fill="none"
|
|
4238
|
+
stroke="currentColor"
|
|
4239
|
+
stroke-width="2"
|
|
4240
|
+
stroke-linecap="round"
|
|
4241
|
+
aria-hidden="true">
|
|
4242
|
+
<line x1="18" y1="6" x2="6" y2="18" />
|
|
4243
|
+
<line x1="6" y1="6" x2="18" y2="18" />
|
|
4244
|
+
</svg>
|
|
4245
|
+
</button>
|
|
4246
|
+
}
|
|
4247
|
+
`, styles: [":host{display:inline-flex;align-items:center}.ct-chip__action{display:contents}.ct-chip__action:focus-visible{outline:none}:host:has(.ct-chip__action:focus-visible){outline:2px solid var(--color-focus-ring, Highlight);outline-offset:2px}.ct-chip__icon:not(:has(*)),.ct-chip__avatar:not(:has(*)){display:none}\n"] }]
|
|
4248
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }, { type: i0.Output, args: ["selectedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], dot: [{ type: i0.Input, args: [{ isSignal: true, alias: "dot", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], removeAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeAriaLabel", required: false }] }], removed: [{ type: i0.Output, args: ["removed"] }] } });
|
|
4249
|
+
|
|
3920
4250
|
/**
|
|
3921
4251
|
* Chip input component for managing a list of string values.
|
|
3922
4252
|
*
|
|
@@ -8153,5 +8483,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
|
|
|
8153
8483
|
* Generated bundle index. Do not edit.
|
|
8154
8484
|
*/
|
|
8155
8485
|
|
|
8156
|
-
export { AfAccordionComponent, AfAccordionItemComponent, AfAlertComponent, AfAppShellComponent, AfAppShellPageHeaderComponent, AfAppShellV2Component, AfAppShellV2ToolbarComponent, AfAvatarComponent, AfBadgeComponent, AfBannerComponent, AfBreadcrumbsComponent, AfButtonComponent, AfCardComponent, AfCellDefDirective, AfCheckboxComponent, AfChipInputComponent, AfComboboxComponent, AfDataTableComponent, AfDatepickerComponent, AfDividerComponent, AfDrawerComponent, AfDropdownComponent, AfEmptyStateComponent, AfFieldComponent, AfFileUploadComponent, AfFormatLabelPipe, AfIconComponent, AfInputComponent, AfModalComponent, AfNavItemComponent, AfNavbarComponent, AfPaginationComponent, AfPopoverComponent, AfPopoverTriggerDirective, AfProgressBarComponent, AfRadioComponent, AfRadioGroupComponent, AfSelectComponent, AfSelectMenuComponent, AfSidebarComponent, AfSkeletonComponent, AfSkipLinkComponent, AfSliderComponent, AfSpinnerComponent, AfSwitchComponent, AfTabPanelComponent, AfTableBodyComponent, AfTableCellComponent, AfTableComponent, AfTableHeaderCellComponent, AfTableHeaderComponent, AfTableRowComponent, AfTabsComponent, AfTextareaComponent, AfToastContainerComponent, AfToastService, AfToggleGroupComponent, AfToolbarComponent, AfTooltipDirective };
|
|
8486
|
+
export { AfAccordionComponent, AfAccordionItemComponent, AfAlertComponent, AfAppShellComponent, AfAppShellPageHeaderComponent, AfAppShellV2Component, AfAppShellV2ToolbarComponent, AfAvatarComponent, AfBadgeComponent, AfBannerComponent, AfBreadcrumbsComponent, AfButtonComponent, AfCardComponent, AfCellDefDirective, AfCheckboxComponent, AfChipComponent, AfChipInputComponent, AfComboboxComponent, AfDataTableComponent, AfDatepickerComponent, AfDividerComponent, AfDrawerComponent, AfDropdownComponent, AfEmptyStateComponent, AfFieldComponent, AfFileUploadComponent, AfFormatLabelPipe, AfIconComponent, AfInputComponent, AfModalComponent, AfNavItemComponent, AfNavTabsComponent, AfNavbarComponent, AfPaginationComponent, AfPopoverComponent, AfPopoverTriggerDirective, AfProgressBarComponent, AfRadioComponent, AfRadioGroupComponent, AfSelectComponent, AfSelectMenuComponent, AfSidebarComponent, AfSkeletonComponent, AfSkipLinkComponent, AfSliderComponent, AfSpinnerComponent, AfSwitchComponent, AfTabPanelComponent, AfTableBodyComponent, AfTableCellComponent, AfTableComponent, AfTableHeaderCellComponent, AfTableHeaderComponent, AfTableRowComponent, AfTabsComponent, AfTextareaComponent, AfToastContainerComponent, AfToastService, AfToggleGroupComponent, AfToolbarComponent, AfTooltipDirective };
|
|
8157
8487
|
//# sourceMappingURL=neuravision-ng-construct.mjs.map
|