@compsych-ui-components/angular 4.0.19 → 5.0.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/esm2022/index.js +7 -5
- package/esm2022/index.js.map +1 -1
- package/esm2022/lib/accordion/accordion-types.js +2 -0
- package/esm2022/lib/accordion/accordion-types.js.map +1 -0
- package/esm2022/lib/accordion/accordion.js +225 -31
- package/esm2022/lib/accordion/accordion.js.map +1 -1
- package/esm2022/lib/button/button.js +48 -9
- package/esm2022/lib/button/button.js.map +1 -1
- package/esm2022/lib/header-nav/header-nav.js +134 -0
- package/esm2022/lib/header-nav/header-nav.js.map +1 -0
- package/esm2022/lib/sidebar/sidebar.js +92 -0
- package/esm2022/lib/sidebar/sidebar.js.map +1 -0
- package/index.d.ts +9 -3
- package/lib/accordion/accordion-types.d.ts +14 -0
- package/lib/accordion/accordion.d.ts +35 -10
- package/lib/button/button.d.ts +6 -1
- package/lib/header-nav/header-nav.d.ts +90 -0
- package/lib/sidebar/sidebar.d.ts +44 -0
- package/package.json +1 -1
- package/esm2022/lib/accordion/accordion-item.js +0 -69
- package/esm2022/lib/accordion/accordion-item.js.map +0 -1
- package/lib/accordion/accordion-item.d.ts +0 -18
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
3
|
+
import { ButtonVariant } from '../button/button';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export type HeaderNavLevel = 'main' | 'sub-page' | 'not-logged';
|
|
6
|
+
/**
|
|
7
|
+
* A navigation item used for both breadcrumbs and action buttons.
|
|
8
|
+
* Use `id` to identify which item was clicked in the parent's `action` handler.
|
|
9
|
+
* - Breadcrumb: provide `id` and `label`.
|
|
10
|
+
* - Action button: provide `id`, `label`, and `variant`.
|
|
11
|
+
*/
|
|
12
|
+
export interface NavAction {
|
|
13
|
+
id: string;
|
|
14
|
+
label: string;
|
|
15
|
+
variant?: ButtonVariant;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Header Navigation — top app bar from the ComPsych Design System.
|
|
19
|
+
*
|
|
20
|
+
* Three levels × sidebar-open state:
|
|
21
|
+
* - `main` — menu toggle, brand logo + wordmark, logged-in action cluster.
|
|
22
|
+
* - `sub-page` — menu toggle, logo mark + breadcrumb trail, logged-in action cluster.
|
|
23
|
+
* - `not-logged` — menu toggle, brand, public action cluster (language, help, CTA).
|
|
24
|
+
*
|
|
25
|
+
* Pass `breadcrumbs` as an ordered list of `NavAction` items. The last item is
|
|
26
|
+
* rendered as the current-page indicator (non-interactive); all others are
|
|
27
|
+
* buttons that emit `action` with `{ type: 'breadcrumb', item }` on click.
|
|
28
|
+
* Use `item.id` in the handler to identify which crumb was clicked.
|
|
29
|
+
*/
|
|
30
|
+
export declare class HeaderNavComponent {
|
|
31
|
+
private readonly sanitizer;
|
|
32
|
+
/** Which header level to render. */
|
|
33
|
+
level: HeaderNavLevel;
|
|
34
|
+
/** Whether the paired sidebar is open — toggles the menu icon (☰ ↔ ✕). */
|
|
35
|
+
sidebarOpen: boolean;
|
|
36
|
+
/** Brand wordmark text shown on `main` and `not-logged` levels. */
|
|
37
|
+
brandLabel: string;
|
|
38
|
+
/**
|
|
39
|
+
* Ordered breadcrumb trail for `sub-page` level.
|
|
40
|
+
* Each item requires an `id` and `label`. The last item is rendered as the
|
|
41
|
+
* current page (non-interactive); all others emit `{ type: 'breadcrumb', item }`.
|
|
42
|
+
*/
|
|
43
|
+
breadcrumbs: NavAction[];
|
|
44
|
+
/** Notification badge count. Badge is hidden when 0. */
|
|
45
|
+
notificationCount: number;
|
|
46
|
+
/** Avatar initials for the logged-in user. */
|
|
47
|
+
avatarInitials: string;
|
|
48
|
+
/** Show the search icon button (logged-in levels). */
|
|
49
|
+
showSearch: boolean;
|
|
50
|
+
/** Show the notifications icon button (logged-in levels). */
|
|
51
|
+
showNotifications: boolean;
|
|
52
|
+
/** Show the documents icon button (logged-in levels). */
|
|
53
|
+
showDocuments: boolean;
|
|
54
|
+
/** Show the avatar button (logged-in levels). */
|
|
55
|
+
showAvatar: boolean;
|
|
56
|
+
/** Show the language icon button (not-logged level). */
|
|
57
|
+
showLanguage: boolean;
|
|
58
|
+
/** Show the help icon button (not-logged level). */
|
|
59
|
+
showHelp: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Additional configurable buttons rendered in the actions area.
|
|
62
|
+
* Each entry is `{ id, label, variant? }` where `variant` is a `ButtonVariant`
|
|
63
|
+
* (defaults to `'filled'`) and `id` is a required stable identifier.
|
|
64
|
+
* Clicking any of these emits `action` with `{ type: 'action-button', item }`.
|
|
65
|
+
*/
|
|
66
|
+
actionButtons: NavAction[];
|
|
67
|
+
/** Emitted for every interactive element. Emits a string id: the `NavAction` id for breadcrumb/action-button, or the action name for icon buttons. */
|
|
68
|
+
readonly action: EventEmitter<string>;
|
|
69
|
+
readonly searchIconSvg: SafeHtml;
|
|
70
|
+
readonly bellIconSvg: SafeHtml;
|
|
71
|
+
readonly fileTextIconSvg: SafeHtml;
|
|
72
|
+
readonly globeIconSvg: SafeHtml;
|
|
73
|
+
readonly helpIconSvg: SafeHtml;
|
|
74
|
+
constructor(sanitizer: DomSanitizer);
|
|
75
|
+
get isLoggedOut(): boolean;
|
|
76
|
+
get isSubPage(): boolean;
|
|
77
|
+
get menuIconSvg(): SafeHtml;
|
|
78
|
+
get badgeText(): string;
|
|
79
|
+
get notificationAriaLabel(): string;
|
|
80
|
+
/**
|
|
81
|
+
* Looks up a Lucide icon by name and injects explicit width/height attributes
|
|
82
|
+
* (20 × 20) so the SVG renders at the correct size when injected via [innerHTML].
|
|
83
|
+
* Angular's CSS encapsulation does not add _ngcontent attributes to dynamically
|
|
84
|
+
* injected content, so CSS descendant selectors targeting `svg` would not apply —
|
|
85
|
+
* explicit SVG attributes are the reliable solution.
|
|
86
|
+
*/
|
|
87
|
+
private trustedIcon;
|
|
88
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HeaderNavComponent, never>;
|
|
89
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HeaderNavComponent, "compsych-header-nav", never, { "level": { "alias": "level"; "required": false; }; "sidebarOpen": { "alias": "sidebarOpen"; "required": false; }; "brandLabel": { "alias": "brandLabel"; "required": false; }; "breadcrumbs": { "alias": "breadcrumbs"; "required": false; }; "notificationCount": { "alias": "notificationCount"; "required": false; }; "avatarInitials": { "alias": "avatarInitials"; "required": false; }; "showSearch": { "alias": "showSearch"; "required": false; }; "showNotifications": { "alias": "showNotifications"; "required": false; }; "showDocuments": { "alias": "showDocuments"; "required": false; }; "showAvatar": { "alias": "showAvatar"; "required": false; }; "showLanguage": { "alias": "showLanguage"; "required": false; }; "showHelp": { "alias": "showHelp"; "required": false; }; "actionButtons": { "alias": "actionButtons"; "required": false; }; }, { "action": "action"; }, never, never, true, never>;
|
|
90
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export interface SidebarItem {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
/** Lucide icon name (kebab-case). */
|
|
7
|
+
icon: string;
|
|
8
|
+
/** Nested items — renders an expandable group with a chevron. */
|
|
9
|
+
children?: SidebarItem[];
|
|
10
|
+
/** Render a divider above this item. */
|
|
11
|
+
dividerBefore?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Sidebar — vertical app navigation from the ComPsych Design System.
|
|
16
|
+
*
|
|
17
|
+
* Figma: Core Components — base 260:4700, parts 213:1585.
|
|
18
|
+
*
|
|
19
|
+
* Icon + label items with default / hover / selected / focus / disabled states,
|
|
20
|
+
* section dividers, expandable groups (chevron), and a pinned footer
|
|
21
|
+
* (location & language, logout). Data-driven via `items` / `footerItems`,
|
|
22
|
+
* defaulting to the design's content. All values are sys tokens.
|
|
23
|
+
*/
|
|
24
|
+
export declare class SidebarComponent {
|
|
25
|
+
private readonly sanitizer;
|
|
26
|
+
readonly items: import("@angular/core").InputSignal<SidebarItem[]>;
|
|
27
|
+
readonly footerItems: import("@angular/core").InputSignal<SidebarItem[]>;
|
|
28
|
+
/** Currently selected item id — supports two-way binding via [(activeId)]. */
|
|
29
|
+
readonly activeId: import("@angular/core").ModelSignal<string>;
|
|
30
|
+
private readonly expanded;
|
|
31
|
+
constructor(sanitizer: DomSanitizer);
|
|
32
|
+
isExpanded(id: string): boolean;
|
|
33
|
+
isActive(id: string): boolean;
|
|
34
|
+
onItemClick(item: SidebarItem): void;
|
|
35
|
+
/**
|
|
36
|
+
* Looks up a Lucide icon by name and injects explicit width/height attributes
|
|
37
|
+
* so the SVG renders at the correct size when injected via [innerHTML].
|
|
38
|
+
* Angular's CSS encapsulation does not add _ngcontent attributes to dynamically
|
|
39
|
+
* injected content, so explicit SVG attributes are the reliable solution.
|
|
40
|
+
*/
|
|
41
|
+
iconSvg(name: string, size?: number, strokeWidth?: number): SafeHtml;
|
|
42
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SidebarComponent, never>;
|
|
43
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SidebarComponent, "compsych-sidebar", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "footerItems": { "alias": "footerItems"; "required": false; "isSignal": true; }; "activeId": { "alias": "activeId"; "required": false; "isSignal": true; }; }, { "activeId": "activeIdChange"; }, never, never, true, never>;
|
|
44
|
+
}
|
package/package.json
CHANGED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output, } from '@angular/core';
|
|
2
|
-
import { NgIf } from '@angular/common';
|
|
3
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
4
|
-
import { LUCIDE_ICONS } from '@compsych-ui-components/shared/assets/lucide-icons.generated';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "@angular/platform-browser";
|
|
7
|
-
export class AccordionItemComponent {
|
|
8
|
-
sanitizer;
|
|
9
|
-
title = '';
|
|
10
|
-
set icon(name) {
|
|
11
|
-
const svg = LUCIDE_ICONS[name];
|
|
12
|
-
this.iconSvg = svg ? this.sanitizer.bypassSecurityTrustHtml(svg) : null;
|
|
13
|
-
}
|
|
14
|
-
iconSvg = null;
|
|
15
|
-
constructor(sanitizer) {
|
|
16
|
-
this.sanitizer = sanitizer;
|
|
17
|
-
}
|
|
18
|
-
get expanded() { return this._expanded; }
|
|
19
|
-
set expanded(value) { this._expanded = coerceBooleanProperty(value); }
|
|
20
|
-
_expanded = false;
|
|
21
|
-
expandedChange = new EventEmitter();
|
|
22
|
-
toggle() {
|
|
23
|
-
this._expanded = !this._expanded;
|
|
24
|
-
this.expandedChange.emit(this._expanded);
|
|
25
|
-
}
|
|
26
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: AccordionItemComponent, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
27
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.14", type: AccordionItemComponent, isStandalone: true, selector: "compsych-accordion-item", inputs: { title: "title", icon: "icon", expanded: "expanded" }, outputs: { expandedChange: "expandedChange" }, host: { classAttribute: "compsych-accordion-item" }, ngImport: i0, template: `
|
|
28
|
-
<button
|
|
29
|
-
class="trigger"
|
|
30
|
-
type="button"
|
|
31
|
-
[attr.aria-expanded]="expanded"
|
|
32
|
-
(click)="toggle()"
|
|
33
|
-
>
|
|
34
|
-
<span *ngIf="iconSvg" class="trigger-leading-icon" [innerHTML]="iconSvg" aria-hidden="true"></span>
|
|
35
|
-
<span class="trigger-label">{{ title }}</span>
|
|
36
|
-
<span class="trigger-toggle material-symbols-rounded" aria-hidden="true">{{ expanded ? 'remove' : 'add' }}</span>
|
|
37
|
-
</button>
|
|
38
|
-
<div *ngIf="expanded" class="content" role="region">
|
|
39
|
-
<ng-content />
|
|
40
|
-
</div>
|
|
41
|
-
`, isInline: true, styles: [":host{display:block;border-bottom:var(--sys-stroke-thin) solid var(--sys-outline-variant)}:host:first-child{border-top:var(--sys-stroke-thin) solid var(--sys-outline-variant)}.trigger{display:flex;align-items:center;gap:var(--sys-padding-8);width:100%;padding:var(--sys-padding-16) var(--sys-padding-24);background:none;border:none;cursor:pointer;text-align:left;color:var(--sys-on-surface);font-family:var(--sys-font-family);font-size:var(--sys-font-size);font-weight:var(--sys-font-weight);line-height:var(--sys-line-height);letter-spacing:var(--sys-tracking);position:relative;overflow:hidden;border-radius:0}.trigger:before{content:\"\";position:absolute;inset:0;background-color:currentColor;opacity:0;transition:opacity .15s ease;pointer-events:none}.trigger:hover:before{opacity:.08}.trigger:active:before{opacity:.1}.trigger-label{flex:1;min-width:0}.trigger-leading-icon{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;color:var(--sys-on-surface);flex-shrink:0}.trigger-leading-icon svg{width:100%;height:100%}.trigger-toggle{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:1.5rem;height:1.5rem;font-size:1rem;line-height:1;color:var(--sys-on-primary-fixed);background-color:var(--sys-primary-fixed-dim);border-radius:var(--sys-radius-full);box-sizing:border-box}.content{padding:0 var(--sys-padding-16) var(--sys-padding-16);color:var(--sys-on-surface-variant);font-family:var(--sys-font-family);font-size:var(--sys-font-size);font-weight:var(--sys-font-weight);line-height:var(--sys-line-height)}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
42
|
-
}
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: AccordionItemComponent, decorators: [{
|
|
44
|
-
type: Component,
|
|
45
|
-
args: [{ selector: 'compsych-accordion-item', standalone: true, imports: [NgIf], template: `
|
|
46
|
-
<button
|
|
47
|
-
class="trigger"
|
|
48
|
-
type="button"
|
|
49
|
-
[attr.aria-expanded]="expanded"
|
|
50
|
-
(click)="toggle()"
|
|
51
|
-
>
|
|
52
|
-
<span *ngIf="iconSvg" class="trigger-leading-icon" [innerHTML]="iconSvg" aria-hidden="true"></span>
|
|
53
|
-
<span class="trigger-label">{{ title }}</span>
|
|
54
|
-
<span class="trigger-toggle material-symbols-rounded" aria-hidden="true">{{ expanded ? 'remove' : 'add' }}</span>
|
|
55
|
-
</button>
|
|
56
|
-
<div *ngIf="expanded" class="content" role="region">
|
|
57
|
-
<ng-content />
|
|
58
|
-
</div>
|
|
59
|
-
`, host: { class: 'compsych-accordion-item' }, styles: [":host{display:block;border-bottom:var(--sys-stroke-thin) solid var(--sys-outline-variant)}:host:first-child{border-top:var(--sys-stroke-thin) solid var(--sys-outline-variant)}.trigger{display:flex;align-items:center;gap:var(--sys-padding-8);width:100%;padding:var(--sys-padding-16) var(--sys-padding-24);background:none;border:none;cursor:pointer;text-align:left;color:var(--sys-on-surface);font-family:var(--sys-font-family);font-size:var(--sys-font-size);font-weight:var(--sys-font-weight);line-height:var(--sys-line-height);letter-spacing:var(--sys-tracking);position:relative;overflow:hidden;border-radius:0}.trigger:before{content:\"\";position:absolute;inset:0;background-color:currentColor;opacity:0;transition:opacity .15s ease;pointer-events:none}.trigger:hover:before{opacity:.08}.trigger:active:before{opacity:.1}.trigger-label{flex:1;min-width:0}.trigger-leading-icon{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;color:var(--sys-on-surface);flex-shrink:0}.trigger-leading-icon svg{width:100%;height:100%}.trigger-toggle{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:1.5rem;height:1.5rem;font-size:1rem;line-height:1;color:var(--sys-on-primary-fixed);background-color:var(--sys-primary-fixed-dim);border-radius:var(--sys-radius-full);box-sizing:border-box}.content{padding:0 var(--sys-padding-16) var(--sys-padding-16);color:var(--sys-on-surface-variant);font-family:var(--sys-font-family);font-size:var(--sys-font-size);font-weight:var(--sys-font-weight);line-height:var(--sys-line-height)}\n"] }]
|
|
60
|
-
}], ctorParameters: () => [{ type: i1.DomSanitizer }], propDecorators: { title: [{
|
|
61
|
-
type: Input
|
|
62
|
-
}], icon: [{
|
|
63
|
-
type: Input
|
|
64
|
-
}], expanded: [{
|
|
65
|
-
type: Input
|
|
66
|
-
}], expandedChange: [{
|
|
67
|
-
type: Output
|
|
68
|
-
}] } });
|
|
69
|
-
//# sourceMappingURL=accordion-item.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accordion-item.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/accordion/accordion-item.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,YAAY,EACZ,KAAK,EACL,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,OAAO,EAAgB,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAC;;;AAwB5F,MAAM,OAAO,sBAAsB;IAWJ;IAVpB,KAAK,GAAG,EAAE,CAAC;IAEpB,IACI,IAAI,CAAC,IAAY;QACnB,MAAM,GAAG,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC1E,CAAC;IAED,OAAO,GAAoB,IAAI,CAAC;IAEhC,YAA6B,SAAuB;QAAvB,cAAS,GAAT,SAAS,CAAc;IAAG,CAAC;IAExD,IACI,QAAQ,KAAc,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IAClD,IAAI,QAAQ,CAAC,KAAmB,IAAI,IAAI,CAAC,SAAS,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC5E,SAAS,GAAG,KAAK,CAAC;IAEhB,cAAc,GAAG,IAAI,YAAY,EAAW,CAAC;IAEvD,MAAM;QACJ,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC;QACjC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC3C,CAAC;wGAvBU,sBAAsB;4FAAtB,sBAAsB,uPAlBvB;;;;;;;;;;;;;;GAcT,4mDAfS,IAAI;;4FAmBH,sBAAsB;kBAtBlC,SAAS;+BACE,yBAAyB,cACvB,IAAI,WACP,CAAC,IAAI,CAAC,YACL;;;;;;;;;;;;;;GAcT,QAEK,EAAE,KAAK,EAAE,yBAAyB,EAAE;;sBAGzC,KAAK;;sBAEL,KAAK;;sBAUL,KAAK;;sBAKL,MAAM","sourcesContent":["import {\n Component,\n EventEmitter,\n Input,\n Output,\n} from '@angular/core';\nimport { NgIf } from '@angular/common';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { LUCIDE_ICONS } from '@compsych-ui-components/shared/assets/lucide-icons.generated';\n\n@Component({\n selector: 'compsych-accordion-item',\n standalone: true,\n imports: [NgIf],\n template: `\n <button\n class=\"trigger\"\n type=\"button\"\n [attr.aria-expanded]=\"expanded\"\n (click)=\"toggle()\"\n >\n <span *ngIf=\"iconSvg\" class=\"trigger-leading-icon\" [innerHTML]=\"iconSvg\" aria-hidden=\"true\"></span>\n <span class=\"trigger-label\">{{ title }}</span>\n <span class=\"trigger-toggle material-symbols-rounded\" aria-hidden=\"true\">{{ expanded ? 'remove' : 'add' }}</span>\n </button>\n <div *ngIf=\"expanded\" class=\"content\" role=\"region\">\n <ng-content />\n </div>\n `,\n styleUrl: './accordion-item.css',\n host: { class: 'compsych-accordion-item' },\n})\nexport class AccordionItemComponent {\n @Input() title = '';\n\n @Input()\n set icon(name: string) {\n const svg = LUCIDE_ICONS[name];\n this.iconSvg = svg ? this.sanitizer.bypassSecurityTrustHtml(svg) : null;\n }\n\n iconSvg: SafeHtml | null = null;\n\n constructor(private readonly sanitizer: DomSanitizer) {}\n\n @Input()\n get expanded(): boolean { return this._expanded; }\n set expanded(value: BooleanInput) { this._expanded = coerceBooleanProperty(value); }\n private _expanded = false;\n\n @Output() expandedChange = new EventEmitter<boolean>();\n\n toggle(): void {\n this._expanded = !this._expanded;\n this.expandedChange.emit(this._expanded);\n }\n}\n"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
3
|
-
import { BooleanInput } from '@angular/cdk/coercion';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class AccordionItemComponent {
|
|
6
|
-
private readonly sanitizer;
|
|
7
|
-
title: string;
|
|
8
|
-
set icon(name: string);
|
|
9
|
-
iconSvg: SafeHtml | null;
|
|
10
|
-
constructor(sanitizer: DomSanitizer);
|
|
11
|
-
get expanded(): boolean;
|
|
12
|
-
set expanded(value: BooleanInput);
|
|
13
|
-
private _expanded;
|
|
14
|
-
expandedChange: EventEmitter<boolean>;
|
|
15
|
-
toggle(): void;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AccordionItemComponent, never>;
|
|
17
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AccordionItemComponent, "compsych-accordion-item", never, { "title": { "alias": "title"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "expanded": { "alias": "expanded"; "required": false; }; }, { "expandedChange": "expandedChange"; }, never, ["*"], true, never>;
|
|
18
|
-
}
|