@masmarino/gabarit 0.2.0 → 0.4.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.
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, inject, input, computed, ChangeDetectionStrategy, Component, signal, viewChild, HostListener, booleanAttribute,
|
|
2
|
+
import { Injectable, inject, input, computed, ChangeDetectionStrategy, Component, output, signal, viewChild, HostListener, booleanAttribute, forwardRef, ElementRef, effect, contentChildren, viewChildren, InjectionToken, isDevMode, Injector, afterNextRender } from '@angular/core';
|
|
3
3
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
4
4
|
import { NgTemplateOutlet } from '@angular/common';
|
|
5
|
-
import
|
|
5
|
+
import * as i1 from '@angular/forms';
|
|
6
|
+
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
7
|
+
import { isObservable } from 'rxjs';
|
|
6
8
|
|
|
7
|
-
const GABARIT_VERSION = '0.
|
|
9
|
+
const GABARIT_VERSION = '0.4.0';
|
|
8
10
|
|
|
9
11
|
const BUILT_IN_ICONS = {
|
|
10
12
|
search: `<path d="m21 21-4.34-4.34" />
|
|
@@ -18,6 +20,13 @@ const BUILT_IN_ICONS = {
|
|
|
18
20
|
<path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" />
|
|
19
21
|
<path d="m2 2 20 20" />`,
|
|
20
22
|
'chevron-down': `<path d="m6 9 6 6 6-6" />`,
|
|
23
|
+
'chevrons-left': `<path d="m11 17-5-5 5-5" />
|
|
24
|
+
<path d="m18 17-5-5 5-5" />`,
|
|
25
|
+
'chevrons-right': `<path d="m6 17 5-5-5-5" />
|
|
26
|
+
<path d="m13 17 5-5-5-5" />`,
|
|
27
|
+
'ellipsis-vertical': `<circle cx="12" cy="12" r="1" />
|
|
28
|
+
<circle cx="12" cy="5" r="1" />
|
|
29
|
+
<circle cx="12" cy="19" r="1" />`,
|
|
21
30
|
check: `<path d="M20 6 9 17l-5-5" />`,
|
|
22
31
|
'check-circle': `<path d="m5 12 5 5 9-10" />`,
|
|
23
32
|
'alert-circle': `<path d="M12 7v6" />
|
|
@@ -75,7 +84,7 @@ class Icon {
|
|
|
75
84
|
[innerHTML]="content"
|
|
76
85
|
></svg>
|
|
77
86
|
}
|
|
78
|
-
`, isInline: true, styles: [":host{display:inline-flex;width:1.25em;height:1.25em}svg{width:100%;height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
87
|
+
`, isInline: true, styles: [":host{display:inline-flex;flex-shrink:0;width:1.25em;height:1.25em}svg{width:100%;height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
79
88
|
}
|
|
80
89
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: Icon, decorators: [{
|
|
81
90
|
type: Component,
|
|
@@ -95,10 +104,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
95
104
|
}
|
|
96
105
|
`, host: {
|
|
97
106
|
'[attr.aria-hidden]': '"true"',
|
|
98
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:inline-flex;width:1.25em;height:1.25em}svg{width:100%;height:100%}\n"] }]
|
|
107
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:inline-flex;flex-shrink:0;width:1.25em;height:1.25em}svg{width:100%;height:100%}\n"] }]
|
|
99
108
|
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }] } });
|
|
100
109
|
|
|
101
|
-
let nextId$
|
|
110
|
+
let nextId$3 = 0;
|
|
102
111
|
class AppShell {
|
|
103
112
|
navLabel = input.required(/* @ts-ignore */
|
|
104
113
|
...(ngDevMode ? [{ debugName: "navLabel" }] : /* istanbul ignore next */ []));
|
|
@@ -108,7 +117,16 @@ class AppShell {
|
|
|
108
117
|
...(ngDevMode ? [{ debugName: "openMenuLabel" }] : /* istanbul ignore next */ []));
|
|
109
118
|
closeMenuLabel = input.required(/* @ts-ignore */
|
|
110
119
|
...(ngDevMode ? [{ debugName: "closeMenuLabel" }] : /* istanbul ignore next */ []));
|
|
111
|
-
|
|
120
|
+
collapseLabel = input('', /* @ts-ignore */
|
|
121
|
+
...(ngDevMode ? [{ debugName: "collapseLabel" }] : /* istanbul ignore next */ []));
|
|
122
|
+
expandLabel = input('', /* @ts-ignore */
|
|
123
|
+
...(ngDevMode ? [{ debugName: "expandLabel" }] : /* istanbul ignore next */ []));
|
|
124
|
+
collapsed = input(false, /* @ts-ignore */
|
|
125
|
+
...(ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []));
|
|
126
|
+
collapsible = input(true, /* @ts-ignore */
|
|
127
|
+
...(ngDevMode ? [{ debugName: "collapsible" }] : /* istanbul ignore next */ []));
|
|
128
|
+
collapsedChange = output();
|
|
129
|
+
id = ++nextId$3;
|
|
112
130
|
mainId = `gbt-app-shell-main-${this.id}`;
|
|
113
131
|
navId = `gbt-app-shell-nav-${this.id}`;
|
|
114
132
|
menuOpen = signal(false, /* @ts-ignore */
|
|
@@ -133,6 +151,9 @@ class AppShell {
|
|
|
133
151
|
this.menuOpen.set(false);
|
|
134
152
|
this.toggleButton()?.nativeElement.focus();
|
|
135
153
|
}
|
|
154
|
+
toggleCollapsed() {
|
|
155
|
+
this.collapsedChange.emit(!this.collapsed());
|
|
156
|
+
}
|
|
136
157
|
onEscape() {
|
|
137
158
|
this.close();
|
|
138
159
|
}
|
|
@@ -157,12 +178,12 @@ class AppShell {
|
|
|
157
178
|
}
|
|
158
179
|
}
|
|
159
180
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AppShell, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
160
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: AppShell, isStandalone: true, selector: "gbt-app-shell", inputs: { navLabel: { classPropertyName: "navLabel", publicName: "navLabel", isSignal: true, isRequired: true, transformFunction: null }, skipLabel: { classPropertyName: "skipLabel", publicName: "skipLabel", isSignal: true, isRequired: true, transformFunction: null }, openMenuLabel: { classPropertyName: "openMenuLabel", publicName: "openMenuLabel", isSignal: true, isRequired: true, transformFunction: null }, closeMenuLabel: { classPropertyName: "closeMenuLabel", publicName: "closeMenuLabel", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "document:keydown.escape": "onEscape()" } }, viewQueries: [{ propertyName: "toggleButton", first: true, predicate: ["toggle"], descendants: true, isSignal: true }, { propertyName: "nav", first: true, predicate: ["nav"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"gbt-app-shell\">\n <a class=\"gbt-app-shell__skip\" [href]=\"'#' + mainId\">{{ skipLabel() }}</a>\n\n <nav\n #nav\n [id]=\"navId\"\n class=\"gbt-app-shell__nav\"\n [class.gbt-app-shell__nav--open]=\"menuOpen()\"\n [attr.aria-label]=\"navLabel()\"\n tabindex=\"-1\"\n (keydown)=\"onNavKeydown($event)\"\n >\n <div class=\"gbt-app-shell__brand\">\n <ng-content select=\"[shell-brand]\" />\n </div>\n <ng-content select=\"[shell-nav]\" />\n </nav>\n\n @if (menuOpen()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div class=\"gbt-app-shell__scrim\" (click)=\"close()\"></div>\n }\n\n <div class=\"gbt-app-shell__body\">\n <header class=\"gbt-app-shell__header\">\n <button\n #toggle\n type=\"button\"\n class=\"gbt-app-shell__toggle\"\n [attr.aria-expanded]=\"menuOpen()\"\n [attr.aria-controls]=\"navId\"\n [attr.aria-label]=\"menuLabel()\"\n (click)=\"toggleMenu()\"\n >\n <span class=\"gbt-app-shell__burger\" aria-hidden=\"true\"></span>\n </button>\n <ng-content select=\"[shell-header]\" />\n </header>\n\n <main [id]=\"mainId\" class=\"gbt-app-shell__content\" tabindex=\"-1\">\n <ng-content />\n </main>\n </div>\n</div>\n", styles: [":host{display:block}.gbt-app-shell{display:flex;min-height:100vh;background:var(--bg-panel)}.gbt-app-shell__skip{position:absolute;left:-9999px;top:0;z-index:1040;padding:.5rem .75rem;border-radius:var(--site-border-radius-sm);background:var(--primary);color:var(--text-on-primary);font-size:.875rem;text-decoration:none}.gbt-app-shell__skip:focus-visible{left:.5rem;top:.5rem;outline:2px solid var(--primary);outline-offset:2px}.gbt-app-shell__nav{display:flex;flex-direction:column;gap:.25rem;flex-shrink:0;box-sizing:border-box;width:220px;padding:1rem .75rem;background:var(--bg-panel);border-right:1px solid var(--border-color)}.gbt-app-shell__brand{margin-bottom:1rem}.gbt-app-shell__body{display:flex;flex-direction:column;flex:1;min-width:0}.gbt-app-shell__header{position:relative;z-index:1010;display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;border-bottom:1px solid var(--border-color)}.gbt-app-shell__toggle{display:none;flex-shrink:0;width:2.25rem;height:2.25rem;padding:0;border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);background:transparent;cursor:pointer}.gbt-app-shell__toggle:focus-visible{outline:2px solid var(--primary);outline-offset:2px}.gbt-app-shell__burger{display:block;position:relative;width:1rem;height:2px;margin:0 auto;background:var(--text-primary)}.gbt-app-shell__burger:before,.gbt-app-shell__burger:after{content:\"\";position:absolute;left:0;width:100%;height:2px;background:var(--text-primary)}.gbt-app-shell__burger:before{top:-5px}.gbt-app-shell__burger:after{top:5px}.gbt-app-shell__content{flex:1;min-width:0;padding:1rem}.gbt-app-shell__content:focus-visible{outline:2px solid var(--primary);outline-offset:-2px}@media(max-width:768px){.gbt-app-shell__toggle{display:block}.gbt-app-shell__nav{position:fixed;top:0;bottom:0;left:0;z-index:1030;transform:translate(-100%);transition:transform .16s ease-out}}@media(max-width:768px)and (prefers-reduced-motion:reduce){.gbt-app-shell__nav{transition:none}}@media(max-width:768px){.gbt-app-shell__nav--open{transform:translate(0)}.gbt-app-shell__scrim{position:fixed;inset:0;z-index:1020;background:#0006}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
181
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: AppShell, isStandalone: true, selector: "gbt-app-shell", inputs: { navLabel: { classPropertyName: "navLabel", publicName: "navLabel", isSignal: true, isRequired: true, transformFunction: null }, skipLabel: { classPropertyName: "skipLabel", publicName: "skipLabel", isSignal: true, isRequired: true, transformFunction: null }, openMenuLabel: { classPropertyName: "openMenuLabel", publicName: "openMenuLabel", isSignal: true, isRequired: true, transformFunction: null }, closeMenuLabel: { classPropertyName: "closeMenuLabel", publicName: "closeMenuLabel", isSignal: true, isRequired: true, transformFunction: null }, collapseLabel: { classPropertyName: "collapseLabel", publicName: "collapseLabel", isSignal: true, isRequired: false, transformFunction: null }, expandLabel: { classPropertyName: "expandLabel", publicName: "expandLabel", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsedChange: "collapsedChange" }, host: { listeners: { "document:keydown.escape": "onEscape()" } }, viewQueries: [{ propertyName: "toggleButton", first: true, predicate: ["toggle"], descendants: true, isSignal: true }, { propertyName: "nav", first: true, predicate: ["nav"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"gbt-app-shell\">\n <a class=\"gbt-app-shell__skip\" [href]=\"'#' + mainId\">{{ skipLabel() }}</a>\n\n <nav\n #nav\n [id]=\"navId\"\n class=\"gbt-app-shell__nav\"\n [class.gbt-app-shell__nav--open]=\"menuOpen()\"\n [class.gbt-app-shell__nav--collapsed]=\"collapsed()\"\n [attr.aria-label]=\"navLabel()\"\n tabindex=\"-1\"\n (keydown)=\"onNavKeydown($event)\"\n >\n <div class=\"gbt-app-shell__brand\">\n <ng-content select=\"[shell-brand]\" />\n </div>\n <ng-content select=\"[shell-nav]\" />\n @if (collapsible()) {\n <button\n type=\"button\"\n class=\"gbt-app-shell__collapse-toggle\"\n [class.gbt-app-shell__collapse-toggle--collapsed]=\"collapsed()\"\n [attr.aria-expanded]=\"!collapsed()\"\n [attr.aria-label]=\"collapsed() ? expandLabel() : collapseLabel()\"\n (click)=\"toggleCollapsed()\"\n >\n <gbt-icon name=\"chevrons-left\" />\n </button>\n }\n </nav>\n\n @if (menuOpen()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div class=\"gbt-app-shell__scrim\" (click)=\"close()\"></div>\n }\n\n <div class=\"gbt-app-shell__body\">\n <header class=\"gbt-app-shell__header\">\n <button\n #toggle\n type=\"button\"\n class=\"gbt-app-shell__toggle\"\n [attr.aria-expanded]=\"menuOpen()\"\n [attr.aria-controls]=\"navId\"\n [attr.aria-label]=\"menuLabel()\"\n (click)=\"toggleMenu()\"\n >\n <span class=\"gbt-app-shell__burger\" aria-hidden=\"true\"></span>\n </button>\n <ng-content select=\"[shell-header]\" />\n </header>\n\n <main [id]=\"mainId\" class=\"gbt-app-shell__content\" tabindex=\"-1\">\n <ng-content />\n </main>\n </div>\n</div>\n", styles: [":host{display:block}.gbt-app-shell{display:flex;min-height:100vh;background:var(--bg-panel)}.gbt-app-shell__skip{position:absolute;left:-9999px;top:0;z-index:1040;padding:.5rem .75rem;border-radius:var(--site-border-radius-sm);background:var(--primary);color:var(--text-on-primary);font-size:.875rem;text-decoration:none}.gbt-app-shell__skip:focus-visible{left:.5rem;top:.5rem;outline:2px solid var(--primary);outline-offset:2px}.gbt-app-shell__nav{display:flex;flex-direction:column;gap:.25rem;flex-shrink:0;box-sizing:border-box;width:220px;padding:1rem .75rem;background:var(--bg-panel);border-right:1px solid var(--border-color);overflow:hidden;transition:width .2s ease}@media(min-width:769px){.gbt-app-shell__nav--collapsed{width:64px}}.gbt-app-shell__brand{display:flex;align-items:center;gap:.625rem;margin-bottom:1rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.gbt-app-shell__collapse-toggle{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:.625rem;width:100%;margin-top:auto;padding:.5rem .75rem;border:none;border-radius:var(--site-border-radius-sm);background:transparent;color:var(--text-secondary);cursor:pointer}.gbt-app-shell__collapse-toggle:hover{background:var(--bg-hover)}.gbt-app-shell__collapse-toggle:focus-visible{outline:2px solid var(--primary);outline-offset:2px}.gbt-app-shell__collapse-toggle gbt-icon{transition:transform .2s ease}.gbt-app-shell__collapse-toggle--collapsed gbt-icon{transform:rotate(180deg)}.gbt-app-shell__body{display:flex;flex-direction:column;flex:1;min-width:0}.gbt-app-shell__header{position:relative;z-index:1010;display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;border-bottom:1px solid var(--border-color)}.gbt-app-shell__toggle{display:none;flex-shrink:0;width:2.25rem;height:2.25rem;padding:0;border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);background:transparent;cursor:pointer}.gbt-app-shell__toggle:focus-visible{outline:2px solid var(--primary);outline-offset:2px}.gbt-app-shell__burger{display:block;position:relative;width:1rem;height:2px;margin:0 auto;background:var(--text-primary)}.gbt-app-shell__burger:before,.gbt-app-shell__burger:after{content:\"\";position:absolute;left:0;width:100%;height:2px;background:var(--text-primary)}.gbt-app-shell__burger:before{top:-5px}.gbt-app-shell__burger:after{top:5px}.gbt-app-shell__content{flex:1;min-width:0;padding:1rem}.gbt-app-shell__content:focus-visible{outline:2px solid var(--primary);outline-offset:-2px}@media(max-width:768px){.gbt-app-shell__toggle{display:block}.gbt-app-shell__nav{position:fixed;top:0;bottom:0;left:0;z-index:1030;transform:translate(-100%);transition:transform .16s ease-out}}@media(max-width:768px)and (prefers-reduced-motion:reduce){.gbt-app-shell__nav{transition:none}}@media(max-width:768px){.gbt-app-shell__nav--open{transform:translate(0)}.gbt-app-shell__scrim{position:fixed;inset:0;z-index:1020;background:#0006}}@media(prefers-reduced-motion:reduce){.gbt-app-shell__nav{transition:none}.gbt-app-shell__collapse-toggle gbt-icon{transition:none}}\n"], dependencies: [{ kind: "component", type: Icon, selector: "gbt-icon", inputs: ["name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
161
182
|
}
|
|
162
183
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AppShell, decorators: [{
|
|
163
184
|
type: Component,
|
|
164
|
-
args: [{ selector: 'gbt-app-shell', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"gbt-app-shell\">\n <a class=\"gbt-app-shell__skip\" [href]=\"'#' + mainId\">{{ skipLabel() }}</a>\n\n <nav\n #nav\n [id]=\"navId\"\n class=\"gbt-app-shell__nav\"\n [class.gbt-app-shell__nav--open]=\"menuOpen()\"\n [attr.aria-label]=\"navLabel()\"\n tabindex=\"-1\"\n (keydown)=\"onNavKeydown($event)\"\n >\n <div class=\"gbt-app-shell__brand\">\n <ng-content select=\"[shell-brand]\" />\n </div>\n <ng-content select=\"[shell-nav]\" />\n </nav>\n\n @if (menuOpen()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div class=\"gbt-app-shell__scrim\" (click)=\"close()\"></div>\n }\n\n <div class=\"gbt-app-shell__body\">\n <header class=\"gbt-app-shell__header\">\n <button\n #toggle\n type=\"button\"\n class=\"gbt-app-shell__toggle\"\n [attr.aria-expanded]=\"menuOpen()\"\n [attr.aria-controls]=\"navId\"\n [attr.aria-label]=\"menuLabel()\"\n (click)=\"toggleMenu()\"\n >\n <span class=\"gbt-app-shell__burger\" aria-hidden=\"true\"></span>\n </button>\n <ng-content select=\"[shell-header]\" />\n </header>\n\n <main [id]=\"mainId\" class=\"gbt-app-shell__content\" tabindex=\"-1\">\n <ng-content />\n </main>\n </div>\n</div>\n", styles: [":host{display:block}.gbt-app-shell{display:flex;min-height:100vh;background:var(--bg-panel)}.gbt-app-shell__skip{position:absolute;left:-9999px;top:0;z-index:1040;padding:.5rem .75rem;border-radius:var(--site-border-radius-sm);background:var(--primary);color:var(--text-on-primary);font-size:.875rem;text-decoration:none}.gbt-app-shell__skip:focus-visible{left:.5rem;top:.5rem;outline:2px solid var(--primary);outline-offset:2px}.gbt-app-shell__nav{display:flex;flex-direction:column;gap:.25rem;flex-shrink:0;box-sizing:border-box;width:220px;padding:1rem .75rem;background:var(--bg-panel);border-right:1px solid var(--border-color)}.gbt-app-shell__brand{margin-bottom:1rem}.gbt-app-shell__body{display:flex;flex-direction:column;flex:1;min-width:0}.gbt-app-shell__header{position:relative;z-index:1010;display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;border-bottom:1px solid var(--border-color)}.gbt-app-shell__toggle{display:none;flex-shrink:0;width:2.25rem;height:2.25rem;padding:0;border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);background:transparent;cursor:pointer}.gbt-app-shell__toggle:focus-visible{outline:2px solid var(--primary);outline-offset:2px}.gbt-app-shell__burger{display:block;position:relative;width:1rem;height:2px;margin:0 auto;background:var(--text-primary)}.gbt-app-shell__burger:before,.gbt-app-shell__burger:after{content:\"\";position:absolute;left:0;width:100%;height:2px;background:var(--text-primary)}.gbt-app-shell__burger:before{top:-5px}.gbt-app-shell__burger:after{top:5px}.gbt-app-shell__content{flex:1;min-width:0;padding:1rem}.gbt-app-shell__content:focus-visible{outline:2px solid var(--primary);outline-offset:-2px}@media(max-width:768px){.gbt-app-shell__toggle{display:block}.gbt-app-shell__nav{position:fixed;top:0;bottom:0;left:0;z-index:1030;transform:translate(-100%);transition:transform .16s ease-out}}@media(max-width:768px)and (prefers-reduced-motion:reduce){.gbt-app-shell__nav{transition:none}}@media(max-width:768px){.gbt-app-shell__nav--open{transform:translate(0)}.gbt-app-shell__scrim{position:fixed;inset:0;z-index:1020;background:#0006}}\n"] }]
|
|
165
|
-
}], propDecorators: { navLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "navLabel", required: true }] }], skipLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "skipLabel", required: true }] }], openMenuLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "openMenuLabel", required: true }] }], closeMenuLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeMenuLabel", required: true }] }], toggleButton: [{ type: i0.ViewChild, args: ['toggle', { isSignal: true }] }], nav: [{ type: i0.ViewChild, args: ['nav', { isSignal: true }] }], onEscape: [{
|
|
185
|
+
args: [{ selector: 'gbt-app-shell', standalone: true, imports: [Icon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"gbt-app-shell\">\n <a class=\"gbt-app-shell__skip\" [href]=\"'#' + mainId\">{{ skipLabel() }}</a>\n\n <nav\n #nav\n [id]=\"navId\"\n class=\"gbt-app-shell__nav\"\n [class.gbt-app-shell__nav--open]=\"menuOpen()\"\n [class.gbt-app-shell__nav--collapsed]=\"collapsed()\"\n [attr.aria-label]=\"navLabel()\"\n tabindex=\"-1\"\n (keydown)=\"onNavKeydown($event)\"\n >\n <div class=\"gbt-app-shell__brand\">\n <ng-content select=\"[shell-brand]\" />\n </div>\n <ng-content select=\"[shell-nav]\" />\n @if (collapsible()) {\n <button\n type=\"button\"\n class=\"gbt-app-shell__collapse-toggle\"\n [class.gbt-app-shell__collapse-toggle--collapsed]=\"collapsed()\"\n [attr.aria-expanded]=\"!collapsed()\"\n [attr.aria-label]=\"collapsed() ? expandLabel() : collapseLabel()\"\n (click)=\"toggleCollapsed()\"\n >\n <gbt-icon name=\"chevrons-left\" />\n </button>\n }\n </nav>\n\n @if (menuOpen()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div class=\"gbt-app-shell__scrim\" (click)=\"close()\"></div>\n }\n\n <div class=\"gbt-app-shell__body\">\n <header class=\"gbt-app-shell__header\">\n <button\n #toggle\n type=\"button\"\n class=\"gbt-app-shell__toggle\"\n [attr.aria-expanded]=\"menuOpen()\"\n [attr.aria-controls]=\"navId\"\n [attr.aria-label]=\"menuLabel()\"\n (click)=\"toggleMenu()\"\n >\n <span class=\"gbt-app-shell__burger\" aria-hidden=\"true\"></span>\n </button>\n <ng-content select=\"[shell-header]\" />\n </header>\n\n <main [id]=\"mainId\" class=\"gbt-app-shell__content\" tabindex=\"-1\">\n <ng-content />\n </main>\n </div>\n</div>\n", styles: [":host{display:block}.gbt-app-shell{display:flex;min-height:100vh;background:var(--bg-panel)}.gbt-app-shell__skip{position:absolute;left:-9999px;top:0;z-index:1040;padding:.5rem .75rem;border-radius:var(--site-border-radius-sm);background:var(--primary);color:var(--text-on-primary);font-size:.875rem;text-decoration:none}.gbt-app-shell__skip:focus-visible{left:.5rem;top:.5rem;outline:2px solid var(--primary);outline-offset:2px}.gbt-app-shell__nav{display:flex;flex-direction:column;gap:.25rem;flex-shrink:0;box-sizing:border-box;width:220px;padding:1rem .75rem;background:var(--bg-panel);border-right:1px solid var(--border-color);overflow:hidden;transition:width .2s ease}@media(min-width:769px){.gbt-app-shell__nav--collapsed{width:64px}}.gbt-app-shell__brand{display:flex;align-items:center;gap:.625rem;margin-bottom:1rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.gbt-app-shell__collapse-toggle{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:.625rem;width:100%;margin-top:auto;padding:.5rem .75rem;border:none;border-radius:var(--site-border-radius-sm);background:transparent;color:var(--text-secondary);cursor:pointer}.gbt-app-shell__collapse-toggle:hover{background:var(--bg-hover)}.gbt-app-shell__collapse-toggle:focus-visible{outline:2px solid var(--primary);outline-offset:2px}.gbt-app-shell__collapse-toggle gbt-icon{transition:transform .2s ease}.gbt-app-shell__collapse-toggle--collapsed gbt-icon{transform:rotate(180deg)}.gbt-app-shell__body{display:flex;flex-direction:column;flex:1;min-width:0}.gbt-app-shell__header{position:relative;z-index:1010;display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;border-bottom:1px solid var(--border-color)}.gbt-app-shell__toggle{display:none;flex-shrink:0;width:2.25rem;height:2.25rem;padding:0;border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);background:transparent;cursor:pointer}.gbt-app-shell__toggle:focus-visible{outline:2px solid var(--primary);outline-offset:2px}.gbt-app-shell__burger{display:block;position:relative;width:1rem;height:2px;margin:0 auto;background:var(--text-primary)}.gbt-app-shell__burger:before,.gbt-app-shell__burger:after{content:\"\";position:absolute;left:0;width:100%;height:2px;background:var(--text-primary)}.gbt-app-shell__burger:before{top:-5px}.gbt-app-shell__burger:after{top:5px}.gbt-app-shell__content{flex:1;min-width:0;padding:1rem}.gbt-app-shell__content:focus-visible{outline:2px solid var(--primary);outline-offset:-2px}@media(max-width:768px){.gbt-app-shell__toggle{display:block}.gbt-app-shell__nav{position:fixed;top:0;bottom:0;left:0;z-index:1030;transform:translate(-100%);transition:transform .16s ease-out}}@media(max-width:768px)and (prefers-reduced-motion:reduce){.gbt-app-shell__nav{transition:none}}@media(max-width:768px){.gbt-app-shell__nav--open{transform:translate(0)}.gbt-app-shell__scrim{position:fixed;inset:0;z-index:1020;background:#0006}}@media(prefers-reduced-motion:reduce){.gbt-app-shell__nav{transition:none}.gbt-app-shell__collapse-toggle gbt-icon{transition:none}}\n"] }]
|
|
186
|
+
}], propDecorators: { navLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "navLabel", required: true }] }], skipLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "skipLabel", required: true }] }], openMenuLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "openMenuLabel", required: true }] }], closeMenuLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeMenuLabel", required: true }] }], collapseLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapseLabel", required: false }] }], expandLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandLabel", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], collapsedChange: [{ type: i0.Output, args: ["collapsedChange"] }], toggleButton: [{ type: i0.ViewChild, args: ['toggle', { isSignal: true }] }], nav: [{ type: i0.ViewChild, args: ['nav', { isSignal: true }] }], onEscape: [{
|
|
166
187
|
type: HostListener,
|
|
167
188
|
args: ['document:keydown.escape']
|
|
168
189
|
}] } });
|
|
@@ -285,7 +306,7 @@ class GbtInput {
|
|
|
285
306
|
useExisting: forwardRef(() => GbtInput),
|
|
286
307
|
multi: true,
|
|
287
308
|
},
|
|
288
|
-
], ngImport: i0, template: "<div class=\"gbt-input\">\n @if (label()) {\n <label [for]=\"id()\">{{ label() }}{{ required() ? ' *' : '' }}</label>\n }\n <div class=\"gbt-input__wrapper\">\n <input\n [id]=\"id()\"\n [type]=\"effectiveType()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [disabled]=\"isDisabled()\"\n [attr.autocomplete]=\"autocomplete()\"\n [value]=\"value()\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"errorMessage() ? id() + '-error' : null\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n />\n @if (type() === 'password') {\n <button\n type=\"button\"\n class=\"gbt-input__toggle\"\n (click)=\"togglePasswordVisibility()\"\n [attr.aria-label]=\"passwordVisible() ? hidePasswordLabel() : showPasswordLabel()\"\n >\n <gbt-icon [name]=\"passwordVisible() ? 'eye-off' : 'eye'\" aria-hidden=\"true\" />\n </button>\n }\n </div>\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-input__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n", styles: [":host{display:block}.gbt-input{display:flex;flex-direction:column;gap:.375rem}.gbt-input label{font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-input__wrapper{position:relative;display:flex;align-items:center}.gbt-input input{width:100%;padding:.5rem .75rem;font-family:var(--font-family);font-size:.875rem;color:var(--text-primary);background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);transition:border-color var(--site-transition-fast)}.gbt-input input:focus{outline:none;border-color:var(--primary)}.gbt-input input:focus-visible{outline:2px solid var(--primary);outline-offset:1px}.gbt-input input:disabled{background:var(--bg-panel);cursor:not-allowed}.gbt-input__toggle{position:absolute;right:.5rem;display:inline-flex;background:none;border:none;color:var(--text-discret);cursor:pointer}.gbt-input__toggle:before{content:\"\";position:absolute;inset:50% auto auto 50%;width:max(100%,24px);height:max(100%,24px);transform:translate(-50%,-50%)}.gbt-input__error{font-size:.75rem;color:var(--color-error-text)}\n"], dependencies: [{ kind: "component", type: Icon, selector: "gbt-icon", inputs: ["name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
309
|
+
], ngImport: i0, template: "<div class=\"gbt-input\">\n @if (label()) {\n <label [for]=\"id()\">{{ label() }}{{ required() ? ' *' : '' }}</label>\n }\n <div class=\"gbt-input__wrapper\">\n <input\n [id]=\"id()\"\n [type]=\"effectiveType()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [disabled]=\"isDisabled()\"\n [attr.autocomplete]=\"autocomplete()\"\n [value]=\"value()\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"errorMessage() ? id() + '-error' : null\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n />\n @if (type() === 'password') {\n <button\n type=\"button\"\n class=\"gbt-input__toggle\"\n (click)=\"togglePasswordVisibility()\"\n [attr.aria-label]=\"passwordVisible() ? hidePasswordLabel() : showPasswordLabel()\"\n >\n <gbt-icon [name]=\"passwordVisible() ? 'eye-off' : 'eye'\" aria-hidden=\"true\" />\n </button>\n }\n </div>\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-input__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n", styles: [":host{display:block}.gbt-input{display:flex;flex-direction:column;gap:.375rem}.gbt-input label{font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-input__wrapper{position:relative;display:flex;align-items:center}.gbt-input input{box-sizing:border-box;width:100%;padding:.5rem .75rem;font-family:var(--font-family);font-size:.875rem;color:var(--text-primary);background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);transition:border-color var(--site-transition-fast)}.gbt-input input:focus{outline:none;border-color:var(--primary)}.gbt-input input:focus-visible{outline:2px solid var(--primary);outline-offset:1px}.gbt-input input:disabled{background:var(--bg-panel);cursor:not-allowed}.gbt-input__toggle{position:absolute;right:.5rem;display:inline-flex;background:none;border:none;color:var(--text-discret);cursor:pointer}.gbt-input__toggle:before{content:\"\";position:absolute;inset:50% auto auto 50%;width:max(100%,24px);height:max(100%,24px);transform:translate(-50%,-50%)}.gbt-input__error{margin:0;font-size:.75rem;color:var(--color-error-text)}\n"], dependencies: [{ kind: "component", type: Icon, selector: "gbt-icon", inputs: ["name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
289
310
|
}
|
|
290
311
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: GbtInput, decorators: [{
|
|
291
312
|
type: Component,
|
|
@@ -295,7 +316,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
295
316
|
useExisting: forwardRef(() => GbtInput),
|
|
296
317
|
multi: true,
|
|
297
318
|
},
|
|
298
|
-
], template: "<div class=\"gbt-input\">\n @if (label()) {\n <label [for]=\"id()\">{{ label() }}{{ required() ? ' *' : '' }}</label>\n }\n <div class=\"gbt-input__wrapper\">\n <input\n [id]=\"id()\"\n [type]=\"effectiveType()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [disabled]=\"isDisabled()\"\n [attr.autocomplete]=\"autocomplete()\"\n [value]=\"value()\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"errorMessage() ? id() + '-error' : null\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n />\n @if (type() === 'password') {\n <button\n type=\"button\"\n class=\"gbt-input__toggle\"\n (click)=\"togglePasswordVisibility()\"\n [attr.aria-label]=\"passwordVisible() ? hidePasswordLabel() : showPasswordLabel()\"\n >\n <gbt-icon [name]=\"passwordVisible() ? 'eye-off' : 'eye'\" aria-hidden=\"true\" />\n </button>\n }\n </div>\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-input__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n", styles: [":host{display:block}.gbt-input{display:flex;flex-direction:column;gap:.375rem}.gbt-input label{font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-input__wrapper{position:relative;display:flex;align-items:center}.gbt-input input{width:100%;padding:.5rem .75rem;font-family:var(--font-family);font-size:.875rem;color:var(--text-primary);background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);transition:border-color var(--site-transition-fast)}.gbt-input input:focus{outline:none;border-color:var(--primary)}.gbt-input input:focus-visible{outline:2px solid var(--primary);outline-offset:1px}.gbt-input input:disabled{background:var(--bg-panel);cursor:not-allowed}.gbt-input__toggle{position:absolute;right:.5rem;display:inline-flex;background:none;border:none;color:var(--text-discret);cursor:pointer}.gbt-input__toggle:before{content:\"\";position:absolute;inset:50% auto auto 50%;width:max(100%,24px);height:max(100%,24px);transform:translate(-50%,-50%)}.gbt-input__error{font-size:.75rem;color:var(--color-error-text)}\n"] }]
|
|
319
|
+
], template: "<div class=\"gbt-input\">\n @if (label()) {\n <label [for]=\"id()\">{{ label() }}{{ required() ? ' *' : '' }}</label>\n }\n <div class=\"gbt-input__wrapper\">\n <input\n [id]=\"id()\"\n [type]=\"effectiveType()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [disabled]=\"isDisabled()\"\n [attr.autocomplete]=\"autocomplete()\"\n [value]=\"value()\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"errorMessage() ? id() + '-error' : null\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n />\n @if (type() === 'password') {\n <button\n type=\"button\"\n class=\"gbt-input__toggle\"\n (click)=\"togglePasswordVisibility()\"\n [attr.aria-label]=\"passwordVisible() ? hidePasswordLabel() : showPasswordLabel()\"\n >\n <gbt-icon [name]=\"passwordVisible() ? 'eye-off' : 'eye'\" aria-hidden=\"true\" />\n </button>\n }\n </div>\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-input__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n", styles: [":host{display:block}.gbt-input{display:flex;flex-direction:column;gap:.375rem}.gbt-input label{font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-input__wrapper{position:relative;display:flex;align-items:center}.gbt-input input{box-sizing:border-box;width:100%;padding:.5rem .75rem;font-family:var(--font-family);font-size:.875rem;color:var(--text-primary);background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);transition:border-color var(--site-transition-fast)}.gbt-input input:focus{outline:none;border-color:var(--primary)}.gbt-input input:focus-visible{outline:2px solid var(--primary);outline-offset:1px}.gbt-input input:disabled{background:var(--bg-panel);cursor:not-allowed}.gbt-input__toggle{position:absolute;right:.5rem;display:inline-flex;background:none;border:none;color:var(--text-discret);cursor:pointer}.gbt-input__toggle:before{content:\"\";position:absolute;inset:50% auto auto 50%;width:max(100%,24px);height:max(100%,24px);transform:translate(-50%,-50%)}.gbt-input__error{margin:0;font-size:.75rem;color:var(--color-error-text)}\n"] }]
|
|
299
320
|
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], showPasswordLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPasswordLabel", required: false }] }], hidePasswordLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "hidePasswordLabel", required: false }] }], committed: [{ type: i0.Output, args: ["committed"] }] } });
|
|
300
321
|
|
|
301
322
|
let nextCheckboxId = 0;
|
|
@@ -523,7 +544,7 @@ class Select {
|
|
|
523
544
|
useExisting: forwardRef(() => Select),
|
|
524
545
|
multi: true,
|
|
525
546
|
},
|
|
526
|
-
], ngImport: i0, template: "<div class=\"gbt-select\" [class.gbt-select--disabled]=\"isDisabled()\">\n @if (label()) {\n <label [id]=\"labelId()\" [for]=\"id()\" class=\"gbt-select__label\"\n >{{ label() }}{{ required() ? ' *' : '' }}</label\n >\n }\n\n <button\n type=\"button\"\n [id]=\"id()\"\n class=\"gbt-select__trigger\"\n [class.gbt-select__trigger--open]=\"open()\"\n [disabled]=\"isDisabled()\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"open() ? id() + '-listbox' : null\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n [attr.aria-labelledby]=\"label() ? labelId() + ' ' + id() : null\"\n [attr.aria-required]=\"required() ? true : null\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"errorMessage() ? id() + '-error' : null\"\n (click)=\"toggleOpen()\"\n >\n @if (triggerIcon(); as icon) {\n <gbt-icon [name]=\"icon\" class=\"gbt-select__trigger-icon\" aria-hidden=\"true\" />\n }\n <span\n class=\"gbt-select__trigger-label\"\n [class.gbt-select__trigger-label--placeholder]=\"selectedOptions().length === 0\"\n >\n {{ triggerLabel() }}\n </span>\n <gbt-icon name=\"chevron-down\" class=\"gbt-select__chevron\" aria-hidden=\"true\" />\n </button>\n @if (open() && panelStyle(); as style) {\n <ul\n [id]=\"id() + '-listbox'\"\n class=\"gbt-select__panel\"\n role=\"listbox\"\n [attr.aria-label]=\"label() || placeholder()\"\n [attr.aria-multiselectable]=\"multiple()\"\n [style.top]=\"style.top\"\n [style.left]=\"style.left\"\n [style.width]=\"style.width\"\n >\n @for (option of options(); track option.value; let i = $index) {\n <li role=\"presentation\">\n <button\n [id]=\"id() + '-option-' + i\"\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"gbt-select__option\"\n [class.gbt-select__option--selected]=\"isSelected(option.value)\"\n [class.gbt-select__option--active]=\"i === activeIndex()\"\n [attr.aria-selected]=\"isSelected(option.value)\"\n (click)=\"selectOption(option.value)\"\n (mouseenter)=\"activeIndex.set(i)\"\n >\n @if (option.icon) {\n <gbt-icon [name]=\"option.icon\" class=\"gbt-select__option-icon\" aria-hidden=\"true\" />\n }\n <span class=\"gbt-select__option-label\">{{ option.label }}</span>\n @if (isSelected(option.value)) {\n <gbt-icon name=\"check\" class=\"gbt-select__option-check\" aria-hidden=\"true\" />\n }\n </button>\n </li>\n }\n </ul>\n }\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-select__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n", styles: [":host{position:relative;display:inline-block;min-width:180px}.gbt-select{display:flex;flex-direction:column;gap:.375rem}.gbt-select--disabled{opacity:.5}.gbt-select__label{font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-select__trigger{display:flex;align-items:center;gap:8px;width:100%;height:40px;padding:0 10px;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);color:var(--text-primary);font-size:14px;cursor:pointer;transition:border-color .15s cubic-bezier(.4,0,.2,1),box-shadow .15s cubic-bezier(.4,0,.2,1)}.gbt-select__trigger:hover:not(:disabled){border-color:var(--border-color)}.gbt-select__trigger--open{border-color:var(--primary);box-shadow:0 0 0 4px color-mix(in srgb,var(--primary) 12%,transparent)}.gbt-select__trigger:disabled{cursor:not-allowed}.gbt-select__trigger-icon{flex-shrink:0;color:var(--text-secondary)}.gbt-select__trigger-label{flex:1;min-width:0;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gbt-select__trigger-label--placeholder{color:var(--text-discret)}.gbt-select__chevron{flex-shrink:0;color:var(--text-secondary);transition:transform .2s cubic-bezier(.4,0,.2,1)}.gbt-select__trigger--open .gbt-select__chevron{transform:rotate(180deg)}.gbt-select__panel{position:fixed;z-index:1000;margin:0;padding:6px;list-style:none;max-height:280px;overflow-y:auto;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);box-shadow:var(--site-shadow-lg);animation:gbt-select-scale-in .15s cubic-bezier(.34,1.56,.64,1) both}.gbt-select__panel::-webkit-scrollbar{width:6px}.gbt-select__panel::-webkit-scrollbar-track{background:transparent}.gbt-select__panel::-webkit-scrollbar-thumb{background:var(--bg-hover);border-radius:3px}.gbt-select__option{display:flex;align-items:center;gap:8px;width:100%;padding:8px 10px;background:transparent;border:none;border-radius:8px;color:var(--text-primary);font-size:14px;text-align:left;cursor:pointer;transition:background .12s cubic-bezier(.4,0,.2,1)}.gbt-select__option:hover,.gbt-select__option--active{background:var(--bg-hover)}.gbt-select__option--selected{color:var(--primary);font-weight:600}.gbt-select__option-icon{flex-shrink:0;color:var(--text-secondary)}.gbt-select__option--selected .gbt-select__option-icon{color:var(--primary)}.gbt-select__option-label{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gbt-select__option-check{flex-shrink:0;color:var(--primary)}@keyframes gbt-select-scale-in{0%{opacity:0;transform:scale(.97) translateY(-4px)}to{opacity:1;transform:scale(1) translateY(0)}}.gbt-select__error{font-size:.75rem;color:var(--color-error-text)}@media(prefers-reduced-motion:reduce){.gbt-select__panel{animation:none}.gbt-select__chevron{transition:none}}\n"], dependencies: [{ kind: "component", type: Icon, selector: "gbt-icon", inputs: ["name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
547
|
+
], ngImport: i0, template: "<div class=\"gbt-select\" [class.gbt-select--disabled]=\"isDisabled()\">\n @if (label()) {\n <label [id]=\"labelId()\" [for]=\"id()\" class=\"gbt-select__label\"\n >{{ label() }}{{ required() ? ' *' : '' }}</label\n >\n }\n\n <button\n type=\"button\"\n [id]=\"id()\"\n class=\"gbt-select__trigger\"\n [class.gbt-select__trigger--open]=\"open()\"\n [disabled]=\"isDisabled()\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"open() ? id() + '-listbox' : null\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n [attr.aria-labelledby]=\"label() ? labelId() + ' ' + id() : null\"\n [attr.aria-required]=\"required() ? true : null\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"errorMessage() ? id() + '-error' : null\"\n (click)=\"toggleOpen()\"\n >\n @if (triggerIcon(); as icon) {\n <gbt-icon [name]=\"icon\" class=\"gbt-select__trigger-icon\" aria-hidden=\"true\" />\n }\n <span\n class=\"gbt-select__trigger-label\"\n [class.gbt-select__trigger-label--placeholder]=\"selectedOptions().length === 0\"\n >\n {{ triggerLabel() }}\n </span>\n <gbt-icon name=\"chevron-down\" class=\"gbt-select__chevron\" aria-hidden=\"true\" />\n </button>\n @if (open() && panelStyle(); as style) {\n <ul\n [id]=\"id() + '-listbox'\"\n class=\"gbt-select__panel\"\n role=\"listbox\"\n [attr.aria-label]=\"label() || placeholder()\"\n [attr.aria-multiselectable]=\"multiple()\"\n [style.top]=\"style.top\"\n [style.left]=\"style.left\"\n [style.width]=\"style.width\"\n >\n @for (option of options(); track option.value; let i = $index) {\n <li role=\"presentation\">\n <button\n [id]=\"id() + '-option-' + i\"\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"gbt-select__option\"\n [class.gbt-select__option--selected]=\"isSelected(option.value)\"\n [class.gbt-select__option--active]=\"i === activeIndex()\"\n [attr.aria-selected]=\"isSelected(option.value)\"\n (click)=\"selectOption(option.value)\"\n (mouseenter)=\"activeIndex.set(i)\"\n >\n @if (option.icon) {\n <gbt-icon [name]=\"option.icon\" class=\"gbt-select__option-icon\" aria-hidden=\"true\" />\n }\n <span class=\"gbt-select__option-label\">{{ option.label }}</span>\n @if (isSelected(option.value)) {\n <gbt-icon name=\"check\" class=\"gbt-select__option-check\" aria-hidden=\"true\" />\n }\n </button>\n </li>\n }\n </ul>\n }\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-select__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n", styles: [":host{position:relative;display:inline-block;min-width:180px}.gbt-select{display:flex;flex-direction:column;gap:.375rem}.gbt-select--disabled{opacity:.5}.gbt-select__label{font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-select__trigger{box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;height:40px;padding:0 10px;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);color:var(--text-primary);font-size:14px;cursor:pointer;transition:border-color .15s cubic-bezier(.4,0,.2,1),box-shadow .15s cubic-bezier(.4,0,.2,1)}.gbt-select__trigger:hover:not(:disabled){border-color:var(--border-color)}.gbt-select__trigger--open{border-color:var(--primary);box-shadow:0 0 0 4px color-mix(in srgb,var(--primary) 12%,transparent)}.gbt-select__trigger:disabled{cursor:not-allowed}.gbt-select__trigger-icon{flex-shrink:0;color:var(--text-secondary)}.gbt-select__trigger-label{flex:1;min-width:0;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gbt-select__trigger-label--placeholder{color:var(--text-discret)}.gbt-select__chevron{flex-shrink:0;color:var(--text-secondary);transition:transform .2s cubic-bezier(.4,0,.2,1)}.gbt-select__trigger--open .gbt-select__chevron{transform:rotate(180deg)}.gbt-select__panel{position:fixed;z-index:1000;margin:0;padding:6px;list-style:none;max-height:280px;overflow-y:auto;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);box-shadow:var(--site-shadow-lg);animation:gbt-select-scale-in .15s cubic-bezier(.34,1.56,.64,1) both}.gbt-select__panel::-webkit-scrollbar{width:6px}.gbt-select__panel::-webkit-scrollbar-track{background:transparent}.gbt-select__panel::-webkit-scrollbar-thumb{background:var(--bg-hover);border-radius:3px}.gbt-select__option{box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;padding:8px 10px;background:transparent;border:none;border-radius:8px;color:var(--text-primary);font-size:14px;text-align:left;cursor:pointer;transition:background .12s cubic-bezier(.4,0,.2,1)}.gbt-select__option:hover,.gbt-select__option--active{background:var(--bg-hover)}.gbt-select__option--selected{color:var(--primary);font-weight:600}.gbt-select__option-icon{flex-shrink:0;color:var(--text-secondary)}.gbt-select__option--selected .gbt-select__option-icon{color:var(--primary)}.gbt-select__option-label{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gbt-select__option-check{flex-shrink:0;color:var(--primary)}@keyframes gbt-select-scale-in{0%{opacity:0;transform:scale(.97) translateY(-4px)}to{opacity:1;transform:scale(1) translateY(0)}}.gbt-select__error{margin:0;font-size:.75rem;color:var(--color-error-text)}@media(prefers-reduced-motion:reduce){.gbt-select__panel{animation:none}.gbt-select__chevron{transition:none}}\n"], dependencies: [{ kind: "component", type: Icon, selector: "gbt-icon", inputs: ["name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
527
548
|
}
|
|
528
549
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: Select, decorators: [{
|
|
529
550
|
type: Component,
|
|
@@ -538,7 +559,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
538
559
|
useExisting: forwardRef(() => Select),
|
|
539
560
|
multi: true,
|
|
540
561
|
},
|
|
541
|
-
], template: "<div class=\"gbt-select\" [class.gbt-select--disabled]=\"isDisabled()\">\n @if (label()) {\n <label [id]=\"labelId()\" [for]=\"id()\" class=\"gbt-select__label\"\n >{{ label() }}{{ required() ? ' *' : '' }}</label\n >\n }\n\n <button\n type=\"button\"\n [id]=\"id()\"\n class=\"gbt-select__trigger\"\n [class.gbt-select__trigger--open]=\"open()\"\n [disabled]=\"isDisabled()\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"open() ? id() + '-listbox' : null\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n [attr.aria-labelledby]=\"label() ? labelId() + ' ' + id() : null\"\n [attr.aria-required]=\"required() ? true : null\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"errorMessage() ? id() + '-error' : null\"\n (click)=\"toggleOpen()\"\n >\n @if (triggerIcon(); as icon) {\n <gbt-icon [name]=\"icon\" class=\"gbt-select__trigger-icon\" aria-hidden=\"true\" />\n }\n <span\n class=\"gbt-select__trigger-label\"\n [class.gbt-select__trigger-label--placeholder]=\"selectedOptions().length === 0\"\n >\n {{ triggerLabel() }}\n </span>\n <gbt-icon name=\"chevron-down\" class=\"gbt-select__chevron\" aria-hidden=\"true\" />\n </button>\n @if (open() && panelStyle(); as style) {\n <ul\n [id]=\"id() + '-listbox'\"\n class=\"gbt-select__panel\"\n role=\"listbox\"\n [attr.aria-label]=\"label() || placeholder()\"\n [attr.aria-multiselectable]=\"multiple()\"\n [style.top]=\"style.top\"\n [style.left]=\"style.left\"\n [style.width]=\"style.width\"\n >\n @for (option of options(); track option.value; let i = $index) {\n <li role=\"presentation\">\n <button\n [id]=\"id() + '-option-' + i\"\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"gbt-select__option\"\n [class.gbt-select__option--selected]=\"isSelected(option.value)\"\n [class.gbt-select__option--active]=\"i === activeIndex()\"\n [attr.aria-selected]=\"isSelected(option.value)\"\n (click)=\"selectOption(option.value)\"\n (mouseenter)=\"activeIndex.set(i)\"\n >\n @if (option.icon) {\n <gbt-icon [name]=\"option.icon\" class=\"gbt-select__option-icon\" aria-hidden=\"true\" />\n }\n <span class=\"gbt-select__option-label\">{{ option.label }}</span>\n @if (isSelected(option.value)) {\n <gbt-icon name=\"check\" class=\"gbt-select__option-check\" aria-hidden=\"true\" />\n }\n </button>\n </li>\n }\n </ul>\n }\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-select__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n", styles: [":host{position:relative;display:inline-block;min-width:180px}.gbt-select{display:flex;flex-direction:column;gap:.375rem}.gbt-select--disabled{opacity:.5}.gbt-select__label{font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-select__trigger{display:flex;align-items:center;gap:8px;width:100%;height:40px;padding:0 10px;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);color:var(--text-primary);font-size:14px;cursor:pointer;transition:border-color .15s cubic-bezier(.4,0,.2,1),box-shadow .15s cubic-bezier(.4,0,.2,1)}.gbt-select__trigger:hover:not(:disabled){border-color:var(--border-color)}.gbt-select__trigger--open{border-color:var(--primary);box-shadow:0 0 0 4px color-mix(in srgb,var(--primary) 12%,transparent)}.gbt-select__trigger:disabled{cursor:not-allowed}.gbt-select__trigger-icon{flex-shrink:0;color:var(--text-secondary)}.gbt-select__trigger-label{flex:1;min-width:0;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gbt-select__trigger-label--placeholder{color:var(--text-discret)}.gbt-select__chevron{flex-shrink:0;color:var(--text-secondary);transition:transform .2s cubic-bezier(.4,0,.2,1)}.gbt-select__trigger--open .gbt-select__chevron{transform:rotate(180deg)}.gbt-select__panel{position:fixed;z-index:1000;margin:0;padding:6px;list-style:none;max-height:280px;overflow-y:auto;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);box-shadow:var(--site-shadow-lg);animation:gbt-select-scale-in .15s cubic-bezier(.34,1.56,.64,1) both}.gbt-select__panel::-webkit-scrollbar{width:6px}.gbt-select__panel::-webkit-scrollbar-track{background:transparent}.gbt-select__panel::-webkit-scrollbar-thumb{background:var(--bg-hover);border-radius:3px}.gbt-select__option{display:flex;align-items:center;gap:8px;width:100%;padding:8px 10px;background:transparent;border:none;border-radius:8px;color:var(--text-primary);font-size:14px;text-align:left;cursor:pointer;transition:background .12s cubic-bezier(.4,0,.2,1)}.gbt-select__option:hover,.gbt-select__option--active{background:var(--bg-hover)}.gbt-select__option--selected{color:var(--primary);font-weight:600}.gbt-select__option-icon{flex-shrink:0;color:var(--text-secondary)}.gbt-select__option--selected .gbt-select__option-icon{color:var(--primary)}.gbt-select__option-label{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gbt-select__option-check{flex-shrink:0;color:var(--primary)}@keyframes gbt-select-scale-in{0%{opacity:0;transform:scale(.97) translateY(-4px)}to{opacity:1;transform:scale(1) translateY(0)}}.gbt-select__error{font-size:.75rem;color:var(--color-error-text)}@media(prefers-reduced-motion:reduce){.gbt-select__panel{animation:none}.gbt-select__chevron{transition:none}}\n"] }]
|
|
562
|
+
], template: "<div class=\"gbt-select\" [class.gbt-select--disabled]=\"isDisabled()\">\n @if (label()) {\n <label [id]=\"labelId()\" [for]=\"id()\" class=\"gbt-select__label\"\n >{{ label() }}{{ required() ? ' *' : '' }}</label\n >\n }\n\n <button\n type=\"button\"\n [id]=\"id()\"\n class=\"gbt-select__trigger\"\n [class.gbt-select__trigger--open]=\"open()\"\n [disabled]=\"isDisabled()\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"open() ? id() + '-listbox' : null\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n [attr.aria-labelledby]=\"label() ? labelId() + ' ' + id() : null\"\n [attr.aria-required]=\"required() ? true : null\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"errorMessage() ? id() + '-error' : null\"\n (click)=\"toggleOpen()\"\n >\n @if (triggerIcon(); as icon) {\n <gbt-icon [name]=\"icon\" class=\"gbt-select__trigger-icon\" aria-hidden=\"true\" />\n }\n <span\n class=\"gbt-select__trigger-label\"\n [class.gbt-select__trigger-label--placeholder]=\"selectedOptions().length === 0\"\n >\n {{ triggerLabel() }}\n </span>\n <gbt-icon name=\"chevron-down\" class=\"gbt-select__chevron\" aria-hidden=\"true\" />\n </button>\n @if (open() && panelStyle(); as style) {\n <ul\n [id]=\"id() + '-listbox'\"\n class=\"gbt-select__panel\"\n role=\"listbox\"\n [attr.aria-label]=\"label() || placeholder()\"\n [attr.aria-multiselectable]=\"multiple()\"\n [style.top]=\"style.top\"\n [style.left]=\"style.left\"\n [style.width]=\"style.width\"\n >\n @for (option of options(); track option.value; let i = $index) {\n <li role=\"presentation\">\n <button\n [id]=\"id() + '-option-' + i\"\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"gbt-select__option\"\n [class.gbt-select__option--selected]=\"isSelected(option.value)\"\n [class.gbt-select__option--active]=\"i === activeIndex()\"\n [attr.aria-selected]=\"isSelected(option.value)\"\n (click)=\"selectOption(option.value)\"\n (mouseenter)=\"activeIndex.set(i)\"\n >\n @if (option.icon) {\n <gbt-icon [name]=\"option.icon\" class=\"gbt-select__option-icon\" aria-hidden=\"true\" />\n }\n <span class=\"gbt-select__option-label\">{{ option.label }}</span>\n @if (isSelected(option.value)) {\n <gbt-icon name=\"check\" class=\"gbt-select__option-check\" aria-hidden=\"true\" />\n }\n </button>\n </li>\n }\n </ul>\n }\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-select__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n", styles: [":host{position:relative;display:inline-block;min-width:180px}.gbt-select{display:flex;flex-direction:column;gap:.375rem}.gbt-select--disabled{opacity:.5}.gbt-select__label{font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-select__trigger{box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;height:40px;padding:0 10px;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);color:var(--text-primary);font-size:14px;cursor:pointer;transition:border-color .15s cubic-bezier(.4,0,.2,1),box-shadow .15s cubic-bezier(.4,0,.2,1)}.gbt-select__trigger:hover:not(:disabled){border-color:var(--border-color)}.gbt-select__trigger--open{border-color:var(--primary);box-shadow:0 0 0 4px color-mix(in srgb,var(--primary) 12%,transparent)}.gbt-select__trigger:disabled{cursor:not-allowed}.gbt-select__trigger-icon{flex-shrink:0;color:var(--text-secondary)}.gbt-select__trigger-label{flex:1;min-width:0;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gbt-select__trigger-label--placeholder{color:var(--text-discret)}.gbt-select__chevron{flex-shrink:0;color:var(--text-secondary);transition:transform .2s cubic-bezier(.4,0,.2,1)}.gbt-select__trigger--open .gbt-select__chevron{transform:rotate(180deg)}.gbt-select__panel{position:fixed;z-index:1000;margin:0;padding:6px;list-style:none;max-height:280px;overflow-y:auto;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);box-shadow:var(--site-shadow-lg);animation:gbt-select-scale-in .15s cubic-bezier(.34,1.56,.64,1) both}.gbt-select__panel::-webkit-scrollbar{width:6px}.gbt-select__panel::-webkit-scrollbar-track{background:transparent}.gbt-select__panel::-webkit-scrollbar-thumb{background:var(--bg-hover);border-radius:3px}.gbt-select__option{box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;padding:8px 10px;background:transparent;border:none;border-radius:8px;color:var(--text-primary);font-size:14px;text-align:left;cursor:pointer;transition:background .12s cubic-bezier(.4,0,.2,1)}.gbt-select__option:hover,.gbt-select__option--active{background:var(--bg-hover)}.gbt-select__option--selected{color:var(--primary);font-weight:600}.gbt-select__option-icon{flex-shrink:0;color:var(--text-secondary)}.gbt-select__option--selected .gbt-select__option-icon{color:var(--primary)}.gbt-select__option-label{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gbt-select__option-check{flex-shrink:0;color:var(--primary)}@keyframes gbt-select-scale-in{0%{opacity:0;transform:scale(.97) translateY(-4px)}to{opacity:1;transform:scale(1) translateY(0)}}.gbt-select__error{margin:0;font-size:.75rem;color:var(--color-error-text)}@media(prefers-reduced-motion:reduce){.gbt-select__panel{animation:none}.gbt-select__chevron{transition:none}}\n"] }]
|
|
542
563
|
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], selectedCountLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedCountLabel", required: false }] }] } });
|
|
543
564
|
|
|
544
565
|
class Modal {
|
|
@@ -604,11 +625,11 @@ class Modal {
|
|
|
604
625
|
}
|
|
605
626
|
}
|
|
606
627
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: Modal, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
607
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: Modal, isStandalone: true, selector: "gbt-modal", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: true, transformFunction: null }, heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, headingLevel: { classPropertyName: "headingLevel", publicName: "headingLevel", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { listeners: { "document:keydown.escape": "onEscape()" } }, viewQueries: [{ propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (isOpen()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div class=\"gbt-modal__backdrop\" (click)=\"onBackdropClick($event)\">\n <div\n class=\"gbt-modal__dialog\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"heading() || null\"\n tabindex=\"-1\"\n #dialog\n (keydown)=\"onDialogKeydown($event)\"\n >\n <header class=\"gbt-modal__header\">\n @switch (headingLevel()) {\n @case (1) {\n <h1 class=\"gbt-modal__title\">{{ heading() }}</h1>\n }\n @case (3) {\n <h3 class=\"gbt-modal__title\">{{ heading() }}</h3>\n }\n @case (4) {\n <h4 class=\"gbt-modal__title\">{{ heading() }}</h4>\n }\n @case (5) {\n <h5 class=\"gbt-modal__title\">{{ heading() }}</h5>\n }\n @case (6) {\n <h6 class=\"gbt-modal__title\">{{ heading() }}</h6>\n }\n @default {\n <h2 class=\"gbt-modal__title\">{{ heading() }}</h2>\n }\n }\n <button\n type=\"button\"\n class=\"gbt-modal__close\"\n (click)=\"closed.emit()\"\n [attr.aria-label]=\"closeLabel()\"\n >\n <gbt-icon name=\"x\" aria-hidden=\"true\" />\n </button>\n </header>\n <div class=\"gbt-modal__body\">\n <ng-content />\n </div>\n </div>\n </div>\n}\n", styles: [".gbt-modal__backdrop{position:fixed;inset:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:
|
|
628
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: Modal, isStandalone: true, selector: "gbt-modal", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: true, transformFunction: null }, heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, headingLevel: { classPropertyName: "headingLevel", publicName: "headingLevel", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { listeners: { "document:keydown.escape": "onEscape()" } }, viewQueries: [{ propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (isOpen()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div class=\"gbt-modal__backdrop\" (click)=\"onBackdropClick($event)\">\n <div\n class=\"gbt-modal__dialog\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"heading() || null\"\n tabindex=\"-1\"\n #dialog\n (keydown)=\"onDialogKeydown($event)\"\n >\n <header class=\"gbt-modal__header\">\n @switch (headingLevel()) {\n @case (1) {\n <h1 class=\"gbt-modal__title\">{{ heading() }}</h1>\n }\n @case (3) {\n <h3 class=\"gbt-modal__title\">{{ heading() }}</h3>\n }\n @case (4) {\n <h4 class=\"gbt-modal__title\">{{ heading() }}</h4>\n }\n @case (5) {\n <h5 class=\"gbt-modal__title\">{{ heading() }}</h5>\n }\n @case (6) {\n <h6 class=\"gbt-modal__title\">{{ heading() }}</h6>\n }\n @default {\n <h2 class=\"gbt-modal__title\">{{ heading() }}</h2>\n }\n }\n <button\n type=\"button\"\n class=\"gbt-modal__close\"\n (click)=\"closed.emit()\"\n [attr.aria-label]=\"closeLabel()\"\n >\n <gbt-icon name=\"x\" aria-hidden=\"true\" />\n </button>\n </header>\n <div class=\"gbt-modal__body\">\n <ng-content />\n </div>\n </div>\n </div>\n}\n", styles: [".gbt-modal__backdrop{position:fixed;inset:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:1200}.gbt-modal__dialog{background:var(--bg-principal);border-radius:var(--site-border-radius);box-shadow:var(--site-shadow-lg);width:min(90vw,480px);max-height:90vh;overflow-y:auto}.gbt-modal__dialog:focus{outline:none}.gbt-modal__dialog:focus-visible{outline:2px solid var(--primary);outline-offset:2px}.gbt-modal__header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.25rem;border-bottom:1px solid var(--border-color)}.gbt-modal__header .gbt-modal__title{font-size:1rem;font-weight:600;color:var(--text-primary);margin:0}.gbt-modal__close{position:relative;display:inline-flex;background:none;border:none;color:var(--text-discret);cursor:pointer}.gbt-modal__close:before{content:\"\";position:absolute;inset:50% auto auto 50%;width:max(100%,24px);height:max(100%,24px);transform:translate(-50%,-50%)}.gbt-modal__body{padding:1.25rem;display:flex;flex-direction:column;gap:1rem}.gbt-modal__body>form{display:flex;flex-direction:column;gap:1rem}\n"], dependencies: [{ kind: "component", type: Icon, selector: "gbt-icon", inputs: ["name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
608
629
|
}
|
|
609
630
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: Modal, decorators: [{
|
|
610
631
|
type: Component,
|
|
611
|
-
args: [{ selector: 'gbt-modal', standalone: true, imports: [Icon], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (isOpen()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div class=\"gbt-modal__backdrop\" (click)=\"onBackdropClick($event)\">\n <div\n class=\"gbt-modal__dialog\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"heading() || null\"\n tabindex=\"-1\"\n #dialog\n (keydown)=\"onDialogKeydown($event)\"\n >\n <header class=\"gbt-modal__header\">\n @switch (headingLevel()) {\n @case (1) {\n <h1 class=\"gbt-modal__title\">{{ heading() }}</h1>\n }\n @case (3) {\n <h3 class=\"gbt-modal__title\">{{ heading() }}</h3>\n }\n @case (4) {\n <h4 class=\"gbt-modal__title\">{{ heading() }}</h4>\n }\n @case (5) {\n <h5 class=\"gbt-modal__title\">{{ heading() }}</h5>\n }\n @case (6) {\n <h6 class=\"gbt-modal__title\">{{ heading() }}</h6>\n }\n @default {\n <h2 class=\"gbt-modal__title\">{{ heading() }}</h2>\n }\n }\n <button\n type=\"button\"\n class=\"gbt-modal__close\"\n (click)=\"closed.emit()\"\n [attr.aria-label]=\"closeLabel()\"\n >\n <gbt-icon name=\"x\" aria-hidden=\"true\" />\n </button>\n </header>\n <div class=\"gbt-modal__body\">\n <ng-content />\n </div>\n </div>\n </div>\n}\n", styles: [".gbt-modal__backdrop{position:fixed;inset:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:
|
|
632
|
+
args: [{ selector: 'gbt-modal', standalone: true, imports: [Icon], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (isOpen()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div class=\"gbt-modal__backdrop\" (click)=\"onBackdropClick($event)\">\n <div\n class=\"gbt-modal__dialog\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"heading() || null\"\n tabindex=\"-1\"\n #dialog\n (keydown)=\"onDialogKeydown($event)\"\n >\n <header class=\"gbt-modal__header\">\n @switch (headingLevel()) {\n @case (1) {\n <h1 class=\"gbt-modal__title\">{{ heading() }}</h1>\n }\n @case (3) {\n <h3 class=\"gbt-modal__title\">{{ heading() }}</h3>\n }\n @case (4) {\n <h4 class=\"gbt-modal__title\">{{ heading() }}</h4>\n }\n @case (5) {\n <h5 class=\"gbt-modal__title\">{{ heading() }}</h5>\n }\n @case (6) {\n <h6 class=\"gbt-modal__title\">{{ heading() }}</h6>\n }\n @default {\n <h2 class=\"gbt-modal__title\">{{ heading() }}</h2>\n }\n }\n <button\n type=\"button\"\n class=\"gbt-modal__close\"\n (click)=\"closed.emit()\"\n [attr.aria-label]=\"closeLabel()\"\n >\n <gbt-icon name=\"x\" aria-hidden=\"true\" />\n </button>\n </header>\n <div class=\"gbt-modal__body\">\n <ng-content />\n </div>\n </div>\n </div>\n}\n", styles: [".gbt-modal__backdrop{position:fixed;inset:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:1200}.gbt-modal__dialog{background:var(--bg-principal);border-radius:var(--site-border-radius);box-shadow:var(--site-shadow-lg);width:min(90vw,480px);max-height:90vh;overflow-y:auto}.gbt-modal__dialog:focus{outline:none}.gbt-modal__dialog:focus-visible{outline:2px solid var(--primary);outline-offset:2px}.gbt-modal__header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.25rem;border-bottom:1px solid var(--border-color)}.gbt-modal__header .gbt-modal__title{font-size:1rem;font-weight:600;color:var(--text-primary);margin:0}.gbt-modal__close{position:relative;display:inline-flex;background:none;border:none;color:var(--text-discret);cursor:pointer}.gbt-modal__close:before{content:\"\";position:absolute;inset:50% auto auto 50%;width:max(100%,24px);height:max(100%,24px);transform:translate(-50%,-50%)}.gbt-modal__body{padding:1.25rem;display:flex;flex-direction:column;gap:1rem}.gbt-modal__body>form{display:flex;flex-direction:column;gap:1rem}\n"] }]
|
|
612
633
|
}], ctorParameters: () => [], propDecorators: { isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: true }] }], heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], headingLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "headingLevel", required: false }] }], closeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLabel", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], dialog: [{ type: i0.ViewChild, args: ['dialog', { isSignal: true }] }], onEscape: [{
|
|
613
634
|
type: HostListener,
|
|
614
635
|
args: ['document:keydown.escape']
|
|
@@ -819,14 +840,14 @@ class SearchBar {
|
|
|
819
840
|
this.searchQuery.set(this.keepQueryOnSelect() ? this.displayFn()(item) : '');
|
|
820
841
|
}
|
|
821
842
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SearchBar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
822
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: SearchBar, isStandalone: true, selector: "gbt-search-bar", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, results: { classPropertyName: "results", publicName: "results", isSignal: true, isRequired: false, transformFunction: null }, groupedResults: { classPropertyName: "groupedResults", publicName: "groupedResults", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, displayFn: { classPropertyName: "displayFn", publicName: "displayFn", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null }, keepQueryOnSelect: { classPropertyName: "keepQueryOnSelect", publicName: "keepQueryOnSelect", isSignal: true, isRequired: false, transformFunction: null }, noResultsMessage: { classPropertyName: "noResultsMessage", publicName: "noResultsMessage", isSignal: true, isRequired: false, transformFunction: null }, noResultsHint: { classPropertyName: "noResultsHint", publicName: "noResultsHint", isSignal: true, isRequired: false, transformFunction: null }, clearLabel: { classPropertyName: "clearLabel", publicName: "clearLabel", isSignal: true, isRequired: false, transformFunction: null }, resultsAnnouncement: { classPropertyName: "resultsAnnouncement", publicName: "resultsAnnouncement", isSignal: true, isRequired: false, transformFunction: null }, navigateHint: { classPropertyName: "navigateHint", publicName: "navigateHint", isSignal: true, isRequired: false, transformFunction: null }, selectHint: { classPropertyName: "selectHint", publicName: "selectHint", isSignal: true, isRequired: false, transformFunction: null }, closeHint: { classPropertyName: "closeHint", publicName: "closeHint", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { queryChange: "queryChange", itemSelected: "itemSelected", clear: "clear" }, host: { listeners: { "keydown": "onNavigationKeydown($event)", "document:click": "handleClickOutside($event)" } }, viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n<div class=\"gbt-sb-trigger\" [class.gbt-sb-trigger--open]=\"isFocused()\" (click)=\"focusSearch()\">\n <gbt-icon name=\"search\" class=\"gbt-sb-trigger__icon\" aria-hidden=\"true\" />\n <input\n #searchInput\n type=\"text\"\n role=\"combobox\"\n class=\"gbt-sb-trigger__input\"\n [placeholder]=\"placeholder()\"\n [attr.aria-label]=\"ariaLabel() || placeholder()\"\n [value]=\"searchQuery()\"\n [attr.aria-expanded]=\"showOverlay()\"\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"showOverlay() ? panelId() : null\"\n [attr.aria-activedescendant]=\"activeItemDomId()\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (input)=\"onInput($event)\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n />\n @if (searchQuery().length > 0) {\n <button\n type=\"button\"\n class=\"gbt-sb-trigger__clear\"\n (click)=\"onClear()\"\n [attr.aria-label]=\"clearLabel()\"\n >\n <gbt-icon name=\"x\" aria-hidden=\"true\" />\n </button>\n }\n</div>\n@if (showOverlay()) {\n <div role=\"status\" aria-live=\"polite\" aria-atomic=\"true\" class=\"sr-only\">\n {{ resultsAnnouncement()(resultCount()) }}\n </div>\n}\n@if (showOverlay()) {\n <div class=\"gbt-sb-backdrop\" (click)=\"blurSearch()\" aria-hidden=\"true\"></div>\n <ng-template #footer>\n <div class=\"gbt-sb-footer\" aria-hidden=\"true\">\n <span class=\"gbt-sb-footer__hint\">\n <kbd class=\"gbt-sb-kbd gbt-sb-kbd--sm\">\u2191</kbd>\n <kbd class=\"gbt-sb-kbd gbt-sb-kbd--sm\">\u2193</kbd>\n {{ navigateHint() }}\n </span>\n <span class=\"gbt-sb-footer__hint\">\n <kbd class=\"gbt-sb-kbd gbt-sb-kbd--sm\">\u21B5</kbd>\n {{ selectHint() }}\n </span>\n <span class=\"gbt-sb-footer__hint\">\n <kbd class=\"gbt-sb-kbd gbt-sb-kbd--sm\">Esc</kbd>\n {{ closeHint() }}\n </span>\n </div>\n </ng-template>\n @if (hasNoResults()) {\n <div [id]=\"panelId()\" class=\"gbt-sb-panel\">\n <div class=\"gbt-sb-state\" role=\"status\">\n <gbt-icon name=\"search\" class=\"gbt-sb-state__icon\" aria-hidden=\"true\" />\n <span>{{ noResultsMessage() }}</span>\n <p class=\"gbt-sb-state__hint\">{{ noResultsHint() }}</p>\n </div>\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </div>\n } @else {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div\n [id]=\"panelId()\"\n class=\"gbt-sb-panel\"\n role=\"listbox\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (hasGroupedResults()) {\n <div class=\"gbt-sb-list\">\n @for (category of indexedGroupedResults(); track category.label) {\n @if (category.items.length > 0) {\n <div class=\"gbt-sb-group-label\">\n @if (category.icon) {\n <gbt-icon [name]=\"category.icon\" aria-hidden=\"true\" />\n }\n {{ category.label }}\n <span class=\"gbt-sb-group-count\" aria-hidden=\"true\">{{\n category.items.length\n }}</span>\n </div>\n @for (entry of category.indexedItems; track entry.index) {\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n [id]=\"itemDomId(entry.index)\"\n class=\"gbt-sb-item\"\n [attr.aria-selected]=\"entry.index === activeIndex()\"\n [class.gbt-sb-item--active]=\"entry.index === activeIndex()\"\n (click)=\"onSelect(entry.item)\"\n (mouseenter)=\"activeIndex.set(entry.index)\"\n >\n @if (itemTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: entry.item }\"\n ></ng-container>\n } @else {\n @if (category.icon) {\n <gbt-icon\n [name]=\"category.icon\"\n class=\"gbt-sb-item__icon\"\n aria-hidden=\"true\"\n />\n }\n <span class=\"gbt-sb-item__label\">{{ entry.formatted }}</span>\n }\n </button>\n }\n }\n }\n </div>\n } @else if (results() && results()!.length > 0) {\n <div class=\"gbt-sb-list\">\n @for (entry of indexedResults(); track entry.index) {\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n [id]=\"itemDomId(entry.index)\"\n class=\"gbt-sb-item\"\n [attr.aria-selected]=\"entry.index === activeIndex()\"\n [class.gbt-sb-item--active]=\"entry.index === activeIndex()\"\n (click)=\"onSelect(entry.item)\"\n (mouseenter)=\"activeIndex.set(entry.index)\"\n >\n @if (itemTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: entry.item }\"\n ></ng-container>\n } @else {\n <span class=\"gbt-sb-item__label\">{{ entry.formatted }}</span>\n }\n </button>\n }\n </div>\n }\n\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </div>\n }\n}\n", styles: [":host{position:relative;display:block}.gbt-sb-trigger{position:relative;z-index:1000;box-sizing:border-box;display:flex;align-items:center;gap:8px;height:40px;width:340px;padding:0 12px;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:16px;transition:width .35s cubic-bezier(.34,1.56,.64,1),border-color .2s cubic-bezier(.4,0,.2,1),box-shadow .2s cubic-bezier(.4,0,.2,1);cursor:text}.gbt-sb-trigger--open{width:420px;border-color:var(--primary);box-shadow:0 0 0 4px color-mix(in srgb,var(--primary) 12%,transparent)}.gbt-sb-trigger__icon{flex-shrink:0;color:var(--text-secondary);transition:color .2s cubic-bezier(.4,0,.2,1),transform .3s cubic-bezier(.34,1.56,.64,1)}.gbt-sb-trigger--open .gbt-sb-trigger__icon{color:var(--primary);transform:scale(1.1) rotate(5deg)}.gbt-sb-trigger__input{flex:1;min-width:0;border:none;outline:none;background:transparent;color:var(--text-primary);font-size:14px;line-height:1.5}.gbt-sb-trigger__input::placeholder{color:var(--text-secondary)}.gbt-sb-trigger__input:focus-visible{outline:2px solid var(--primary);outline-offset:2px;border-radius:4px}.gbt-sb-trigger__clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;background:transparent;border:none;border-radius:6px;color:var(--text-secondary);cursor:pointer;transition:background .15s cubic-bezier(.4,0,.2,1),color .15s cubic-bezier(.4,0,.2,1)}.gbt-sb-trigger__clear:hover{background:var(--bg-hover);color:var(--text-primary)}.gbt-sb-trigger__clear:active{transform:scale(.9)}.gbt-sb-backdrop{position:fixed;inset:0;background:#0000004d;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);z-index:999;animation:gbt-search-bar-fade-in .2s cubic-bezier(.4,0,.2,1) both}.gbt-sb-panel{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);width:420px;max-height:460px;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius);box-shadow:0 16px 48px #0000002e,0 4px 12px #00000014;overflow:hidden;display:flex;flex-direction:column;z-index:1001;animation:gbt-search-bar-scale-in .25s cubic-bezier(.34,1.56,.64,1) both}.gbt-sb-list{flex:1;overflow-y:auto;padding:6px;display:flex;flex-direction:column}.gbt-sb-list::-webkit-scrollbar{width:6px}.gbt-sb-list::-webkit-scrollbar-track{background:transparent}.gbt-sb-list::-webkit-scrollbar-thumb{background:var(--bg-hover);border-radius:3px}.gbt-sb-list::-webkit-scrollbar-thumb:hover{background:var(--border-color)}.gbt-sb-group-label{display:flex;align-items:center;gap:6px;padding:10px 10px 4px;color:var(--text-secondary);font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.5px}.gbt-sb-group-count{margin-left:auto;padding:1px 7px;background:var(--bg-hover);border-radius:10px;font-size:11px;font-weight:600;color:var(--text-secondary)}.gbt-sb-item{display:flex;align-items:center;gap:10px;width:100%;padding:9px 10px;background:transparent;border:none;border-radius:8px;text-align:left;cursor:pointer;transition:background .12s cubic-bezier(.4,0,.2,1)}.gbt-sb-item:hover{background:var(--bg-hover)}.gbt-sb-item--active{background:color-mix(in srgb,var(--primary) 9%,transparent)}.gbt-sb-item__icon{flex-shrink:0;color:var(--text-secondary);transition:color .15s cubic-bezier(.4,0,.2,1)}.gbt-sb-item--active .gbt-sb-item__icon{color:var(--primary)}.gbt-sb-item__label{flex:1;font-size:14px;font-weight:500;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gbt-sb-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px 24px;gap:12px;text-align:center}.gbt-sb-state span{color:var(--text-primary);font-size:14px;font-weight:500}.gbt-sb-state__icon{color:var(--text-secondary);opacity:.4}.gbt-sb-state__hint{margin:0;color:var(--text-secondary);font-size:12px}.gbt-sb-kbd{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 5px;background:var(--bg-hover);border:1px solid var(--border-color);border-bottom-width:2px;border-radius:5px;color:var(--text-secondary);font-size:11px;font-family:SF Mono,Monaco,Consolas,monospace;font-weight:500;line-height:1}.gbt-sb-kbd--sm{min-width:18px;height:18px;font-size:10px;border-radius:4px}.gbt-sb-footer{flex-shrink:0;display:flex;align-items:center;gap:16px;padding:8px 12px;border-top:1px solid var(--border-color);background:var(--bg-hover)}.gbt-sb-footer__hint{display:flex;align-items:center;gap:4px;color:var(--text-secondary);font-size:11px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@keyframes gbt-search-bar-fade-in{0%{opacity:0}to{opacity:1}}@keyframes gbt-search-bar-scale-in{0%{opacity:0;transform:translate(-50%) scale(.96) translateY(-6px)}to{opacity:1;transform:translate(-50%) scale(1) translateY(0)}}@media(prefers-reduced-motion:reduce){.gbt-sb-trigger{transition:border-color .15s,box-shadow .15s}.gbt-sb-trigger__icon{transition:color .15s;transform:none!important}.gbt-sb-trigger__clear{transition:none}.gbt-sb-trigger__clear:active{transform:none}.gbt-sb-backdrop,.gbt-sb-panel{animation:none}}@media screen and (max-width:800px){.gbt-sb-trigger,.gbt-sb-trigger--open{width:100%}.gbt-sb-panel{width:calc(100vw - 32px);max-height:360px}.gbt-sb-state{padding:32px 16px}}\n"], dependencies: [{ kind: "component", type: Icon, selector: "gbt-icon", inputs: ["name"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
843
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: SearchBar, isStandalone: true, selector: "gbt-search-bar", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, results: { classPropertyName: "results", publicName: "results", isSignal: true, isRequired: false, transformFunction: null }, groupedResults: { classPropertyName: "groupedResults", publicName: "groupedResults", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, displayFn: { classPropertyName: "displayFn", publicName: "displayFn", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null }, keepQueryOnSelect: { classPropertyName: "keepQueryOnSelect", publicName: "keepQueryOnSelect", isSignal: true, isRequired: false, transformFunction: null }, noResultsMessage: { classPropertyName: "noResultsMessage", publicName: "noResultsMessage", isSignal: true, isRequired: false, transformFunction: null }, noResultsHint: { classPropertyName: "noResultsHint", publicName: "noResultsHint", isSignal: true, isRequired: false, transformFunction: null }, clearLabel: { classPropertyName: "clearLabel", publicName: "clearLabel", isSignal: true, isRequired: false, transformFunction: null }, resultsAnnouncement: { classPropertyName: "resultsAnnouncement", publicName: "resultsAnnouncement", isSignal: true, isRequired: false, transformFunction: null }, navigateHint: { classPropertyName: "navigateHint", publicName: "navigateHint", isSignal: true, isRequired: false, transformFunction: null }, selectHint: { classPropertyName: "selectHint", publicName: "selectHint", isSignal: true, isRequired: false, transformFunction: null }, closeHint: { classPropertyName: "closeHint", publicName: "closeHint", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { queryChange: "queryChange", itemSelected: "itemSelected", clear: "clear" }, host: { listeners: { "keydown": "onNavigationKeydown($event)", "document:click": "handleClickOutside($event)" } }, viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n<div class=\"gbt-sb-trigger\" [class.gbt-sb-trigger--open]=\"isFocused()\" (click)=\"focusSearch()\">\n <gbt-icon name=\"search\" class=\"gbt-sb-trigger__icon\" aria-hidden=\"true\" />\n <input\n #searchInput\n type=\"text\"\n role=\"combobox\"\n class=\"gbt-sb-trigger__input\"\n [placeholder]=\"placeholder()\"\n [attr.aria-label]=\"ariaLabel() || placeholder()\"\n [value]=\"searchQuery()\"\n [attr.aria-expanded]=\"showOverlay()\"\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"showOverlay() ? panelId() : null\"\n [attr.aria-activedescendant]=\"activeItemDomId()\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (input)=\"onInput($event)\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n />\n @if (searchQuery().length > 0) {\n <button\n type=\"button\"\n class=\"gbt-sb-trigger__clear\"\n (click)=\"onClear()\"\n [attr.aria-label]=\"clearLabel()\"\n >\n <gbt-icon name=\"x\" aria-hidden=\"true\" />\n </button>\n }\n</div>\n@if (showOverlay()) {\n <div role=\"status\" aria-live=\"polite\" aria-atomic=\"true\" class=\"sr-only\">\n {{ resultsAnnouncement()(resultCount()) }}\n </div>\n}\n@if (showOverlay()) {\n <div class=\"gbt-sb-backdrop\" (click)=\"blurSearch()\" aria-hidden=\"true\"></div>\n <ng-template #footer>\n <div class=\"gbt-sb-footer\" aria-hidden=\"true\">\n <span class=\"gbt-sb-footer__hint\">\n <kbd class=\"gbt-sb-kbd gbt-sb-kbd--sm\">\u2191</kbd>\n <kbd class=\"gbt-sb-kbd gbt-sb-kbd--sm\">\u2193</kbd>\n {{ navigateHint() }}\n </span>\n <span class=\"gbt-sb-footer__hint\">\n <kbd class=\"gbt-sb-kbd gbt-sb-kbd--sm\">\u21B5</kbd>\n {{ selectHint() }}\n </span>\n <span class=\"gbt-sb-footer__hint\">\n <kbd class=\"gbt-sb-kbd gbt-sb-kbd--sm\">Esc</kbd>\n {{ closeHint() }}\n </span>\n </div>\n </ng-template>\n @if (hasNoResults()) {\n <div [id]=\"panelId()\" class=\"gbt-sb-panel\">\n <div class=\"gbt-sb-state\" role=\"status\">\n <gbt-icon name=\"search\" class=\"gbt-sb-state__icon\" aria-hidden=\"true\" />\n <span>{{ noResultsMessage() }}</span>\n <p class=\"gbt-sb-state__hint\">{{ noResultsHint() }}</p>\n </div>\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </div>\n } @else {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div\n [id]=\"panelId()\"\n class=\"gbt-sb-panel\"\n role=\"listbox\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (hasGroupedResults()) {\n <div class=\"gbt-sb-list\">\n @for (category of indexedGroupedResults(); track category.label) {\n @if (category.items.length > 0) {\n <div class=\"gbt-sb-group-label\">\n @if (category.icon) {\n <gbt-icon [name]=\"category.icon\" aria-hidden=\"true\" />\n }\n {{ category.label }}\n <span class=\"gbt-sb-group-count\" aria-hidden=\"true\">{{\n category.items.length\n }}</span>\n </div>\n @for (entry of category.indexedItems; track entry.index) {\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n [id]=\"itemDomId(entry.index)\"\n class=\"gbt-sb-item\"\n [attr.aria-selected]=\"entry.index === activeIndex()\"\n [class.gbt-sb-item--active]=\"entry.index === activeIndex()\"\n (click)=\"onSelect(entry.item)\"\n (mouseenter)=\"activeIndex.set(entry.index)\"\n >\n @if (itemTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: entry.item }\"\n ></ng-container>\n } @else {\n @if (category.icon) {\n <gbt-icon\n [name]=\"category.icon\"\n class=\"gbt-sb-item__icon\"\n aria-hidden=\"true\"\n />\n }\n <span class=\"gbt-sb-item__label\">{{ entry.formatted }}</span>\n }\n </button>\n }\n }\n }\n </div>\n } @else if (results() && results()!.length > 0) {\n <div class=\"gbt-sb-list\">\n @for (entry of indexedResults(); track entry.index) {\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n [id]=\"itemDomId(entry.index)\"\n class=\"gbt-sb-item\"\n [attr.aria-selected]=\"entry.index === activeIndex()\"\n [class.gbt-sb-item--active]=\"entry.index === activeIndex()\"\n (click)=\"onSelect(entry.item)\"\n (mouseenter)=\"activeIndex.set(entry.index)\"\n >\n @if (itemTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: entry.item }\"\n ></ng-container>\n } @else {\n <span class=\"gbt-sb-item__label\">{{ entry.formatted }}</span>\n }\n </button>\n }\n </div>\n }\n\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </div>\n }\n}\n", styles: [":host{position:relative;display:block}.gbt-sb-trigger{position:relative;z-index:1000;box-sizing:border-box;display:flex;align-items:center;gap:8px;height:40px;width:340px;padding:0 12px;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:16px;transition:width .35s cubic-bezier(.34,1.56,.64,1),border-color .2s cubic-bezier(.4,0,.2,1),box-shadow .2s cubic-bezier(.4,0,.2,1);cursor:text}.gbt-sb-trigger--open{width:420px;border-color:var(--primary);box-shadow:0 0 0 4px color-mix(in srgb,var(--primary) 12%,transparent)}.gbt-sb-trigger__icon{flex-shrink:0;color:var(--text-secondary);transition:color .2s cubic-bezier(.4,0,.2,1),transform .3s cubic-bezier(.34,1.56,.64,1)}.gbt-sb-trigger--open .gbt-sb-trigger__icon{color:var(--primary);transform:scale(1.1) rotate(5deg)}.gbt-sb-trigger__input{flex:1;min-width:0;border:none;outline:none;background:transparent;color:var(--text-primary);font-size:14px;line-height:1.5}.gbt-sb-trigger__input::placeholder{color:var(--text-secondary)}.gbt-sb-trigger__clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;background:transparent;border:none;border-radius:6px;color:var(--text-secondary);cursor:pointer;transition:background .15s cubic-bezier(.4,0,.2,1),color .15s cubic-bezier(.4,0,.2,1)}.gbt-sb-trigger__clear:hover{background:var(--bg-hover);color:var(--text-primary)}.gbt-sb-trigger__clear:active{transform:scale(.9)}.gbt-sb-backdrop{position:fixed;inset:0;background:#0000004d;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);z-index:999;animation:gbt-search-bar-fade-in .2s cubic-bezier(.4,0,.2,1) both}.gbt-sb-panel{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);width:420px;max-height:460px;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius);box-shadow:0 16px 48px #0000002e,0 4px 12px #00000014;overflow:hidden;display:flex;flex-direction:column;z-index:1001;animation:gbt-search-bar-scale-in .25s cubic-bezier(.34,1.56,.64,1) both}.gbt-sb-list{flex:1;overflow-y:auto;padding:6px;display:flex;flex-direction:column}.gbt-sb-list::-webkit-scrollbar{width:6px}.gbt-sb-list::-webkit-scrollbar-track{background:transparent}.gbt-sb-list::-webkit-scrollbar-thumb{background:var(--bg-hover);border-radius:3px}.gbt-sb-list::-webkit-scrollbar-thumb:hover{background:var(--border-color)}.gbt-sb-group-label{display:flex;align-items:center;gap:6px;padding:10px 10px 4px;color:var(--text-secondary);font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.5px}.gbt-sb-group-count{margin-left:auto;padding:1px 7px;background:var(--bg-hover);border-radius:10px;font-size:11px;font-weight:600;color:var(--text-secondary)}.gbt-sb-item{box-sizing:border-box;display:flex;align-items:center;gap:10px;width:100%;padding:9px 10px;background:transparent;border:none;border-radius:8px;text-align:left;cursor:pointer;transition:background .12s cubic-bezier(.4,0,.2,1)}.gbt-sb-item:hover{background:var(--bg-hover)}.gbt-sb-item--active{background:color-mix(in srgb,var(--primary) 9%,transparent)}.gbt-sb-item__icon{flex-shrink:0;color:var(--text-secondary);transition:color .15s cubic-bezier(.4,0,.2,1)}.gbt-sb-item--active .gbt-sb-item__icon{color:var(--primary)}.gbt-sb-item__label{flex:1;font-size:14px;font-weight:500;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gbt-sb-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px 24px;gap:12px;text-align:center}.gbt-sb-state span{color:var(--text-primary);font-size:14px;font-weight:500}.gbt-sb-state__icon{color:var(--text-secondary);opacity:.4}.gbt-sb-state__hint{margin:0;color:var(--text-secondary);font-size:12px}.gbt-sb-kbd{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 5px;background:var(--bg-hover);border:1px solid var(--border-color);border-bottom-width:2px;border-radius:5px;color:var(--text-secondary);font-size:11px;font-family:SF Mono,Monaco,Consolas,monospace;font-weight:500;line-height:1}.gbt-sb-kbd--sm{min-width:18px;height:18px;font-size:10px;border-radius:4px}.gbt-sb-footer{flex-shrink:0;display:flex;align-items:center;gap:16px;padding:8px 12px;border-top:1px solid var(--border-color);background:var(--bg-hover)}.gbt-sb-footer__hint{display:flex;align-items:center;gap:4px;color:var(--text-secondary);font-size:11px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@keyframes gbt-search-bar-fade-in{0%{opacity:0}to{opacity:1}}@keyframes gbt-search-bar-scale-in{0%{opacity:0;transform:translate(-50%) scale(.96) translateY(-6px)}to{opacity:1;transform:translate(-50%) scale(1) translateY(0)}}@media(prefers-reduced-motion:reduce){.gbt-sb-trigger{transition:border-color .15s,box-shadow .15s}.gbt-sb-trigger__icon{transition:color .15s;transform:none!important}.gbt-sb-trigger__clear{transition:none}.gbt-sb-trigger__clear:active{transform:none}.gbt-sb-backdrop,.gbt-sb-panel{animation:none}}@media screen and (max-width:800px){.gbt-sb-trigger,.gbt-sb-trigger--open{width:100%}.gbt-sb-panel{width:calc(100vw - 32px);max-height:360px}.gbt-sb-state{padding:32px 16px}}\n"], dependencies: [{ kind: "component", type: Icon, selector: "gbt-icon", inputs: ["name"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
823
844
|
}
|
|
824
845
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SearchBar, decorators: [{
|
|
825
846
|
type: Component,
|
|
826
847
|
args: [{ selector: 'gbt-search-bar', standalone: true, imports: [Icon, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
827
848
|
'(keydown)': 'onNavigationKeydown($event)',
|
|
828
849
|
'(document:click)': 'handleClickOutside($event)',
|
|
829
|
-
}, template: "<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n<div class=\"gbt-sb-trigger\" [class.gbt-sb-trigger--open]=\"isFocused()\" (click)=\"focusSearch()\">\n <gbt-icon name=\"search\" class=\"gbt-sb-trigger__icon\" aria-hidden=\"true\" />\n <input\n #searchInput\n type=\"text\"\n role=\"combobox\"\n class=\"gbt-sb-trigger__input\"\n [placeholder]=\"placeholder()\"\n [attr.aria-label]=\"ariaLabel() || placeholder()\"\n [value]=\"searchQuery()\"\n [attr.aria-expanded]=\"showOverlay()\"\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"showOverlay() ? panelId() : null\"\n [attr.aria-activedescendant]=\"activeItemDomId()\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (input)=\"onInput($event)\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n />\n @if (searchQuery().length > 0) {\n <button\n type=\"button\"\n class=\"gbt-sb-trigger__clear\"\n (click)=\"onClear()\"\n [attr.aria-label]=\"clearLabel()\"\n >\n <gbt-icon name=\"x\" aria-hidden=\"true\" />\n </button>\n }\n</div>\n@if (showOverlay()) {\n <div role=\"status\" aria-live=\"polite\" aria-atomic=\"true\" class=\"sr-only\">\n {{ resultsAnnouncement()(resultCount()) }}\n </div>\n}\n@if (showOverlay()) {\n <div class=\"gbt-sb-backdrop\" (click)=\"blurSearch()\" aria-hidden=\"true\"></div>\n <ng-template #footer>\n <div class=\"gbt-sb-footer\" aria-hidden=\"true\">\n <span class=\"gbt-sb-footer__hint\">\n <kbd class=\"gbt-sb-kbd gbt-sb-kbd--sm\">\u2191</kbd>\n <kbd class=\"gbt-sb-kbd gbt-sb-kbd--sm\">\u2193</kbd>\n {{ navigateHint() }}\n </span>\n <span class=\"gbt-sb-footer__hint\">\n <kbd class=\"gbt-sb-kbd gbt-sb-kbd--sm\">\u21B5</kbd>\n {{ selectHint() }}\n </span>\n <span class=\"gbt-sb-footer__hint\">\n <kbd class=\"gbt-sb-kbd gbt-sb-kbd--sm\">Esc</kbd>\n {{ closeHint() }}\n </span>\n </div>\n </ng-template>\n @if (hasNoResults()) {\n <div [id]=\"panelId()\" class=\"gbt-sb-panel\">\n <div class=\"gbt-sb-state\" role=\"status\">\n <gbt-icon name=\"search\" class=\"gbt-sb-state__icon\" aria-hidden=\"true\" />\n <span>{{ noResultsMessage() }}</span>\n <p class=\"gbt-sb-state__hint\">{{ noResultsHint() }}</p>\n </div>\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </div>\n } @else {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div\n [id]=\"panelId()\"\n class=\"gbt-sb-panel\"\n role=\"listbox\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (hasGroupedResults()) {\n <div class=\"gbt-sb-list\">\n @for (category of indexedGroupedResults(); track category.label) {\n @if (category.items.length > 0) {\n <div class=\"gbt-sb-group-label\">\n @if (category.icon) {\n <gbt-icon [name]=\"category.icon\" aria-hidden=\"true\" />\n }\n {{ category.label }}\n <span class=\"gbt-sb-group-count\" aria-hidden=\"true\">{{\n category.items.length\n }}</span>\n </div>\n @for (entry of category.indexedItems; track entry.index) {\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n [id]=\"itemDomId(entry.index)\"\n class=\"gbt-sb-item\"\n [attr.aria-selected]=\"entry.index === activeIndex()\"\n [class.gbt-sb-item--active]=\"entry.index === activeIndex()\"\n (click)=\"onSelect(entry.item)\"\n (mouseenter)=\"activeIndex.set(entry.index)\"\n >\n @if (itemTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: entry.item }\"\n ></ng-container>\n } @else {\n @if (category.icon) {\n <gbt-icon\n [name]=\"category.icon\"\n class=\"gbt-sb-item__icon\"\n aria-hidden=\"true\"\n />\n }\n <span class=\"gbt-sb-item__label\">{{ entry.formatted }}</span>\n }\n </button>\n }\n }\n }\n </div>\n } @else if (results() && results()!.length > 0) {\n <div class=\"gbt-sb-list\">\n @for (entry of indexedResults(); track entry.index) {\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n [id]=\"itemDomId(entry.index)\"\n class=\"gbt-sb-item\"\n [attr.aria-selected]=\"entry.index === activeIndex()\"\n [class.gbt-sb-item--active]=\"entry.index === activeIndex()\"\n (click)=\"onSelect(entry.item)\"\n (mouseenter)=\"activeIndex.set(entry.index)\"\n >\n @if (itemTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: entry.item }\"\n ></ng-container>\n } @else {\n <span class=\"gbt-sb-item__label\">{{ entry.formatted }}</span>\n }\n </button>\n }\n </div>\n }\n\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </div>\n }\n}\n", styles: [":host{position:relative;display:block}.gbt-sb-trigger{position:relative;z-index:1000;box-sizing:border-box;display:flex;align-items:center;gap:8px;height:40px;width:340px;padding:0 12px;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:16px;transition:width .35s cubic-bezier(.34,1.56,.64,1),border-color .2s cubic-bezier(.4,0,.2,1),box-shadow .2s cubic-bezier(.4,0,.2,1);cursor:text}.gbt-sb-trigger--open{width:420px;border-color:var(--primary);box-shadow:0 0 0 4px color-mix(in srgb,var(--primary) 12%,transparent)}.gbt-sb-trigger__icon{flex-shrink:0;color:var(--text-secondary);transition:color .2s cubic-bezier(.4,0,.2,1),transform .3s cubic-bezier(.34,1.56,.64,1)}.gbt-sb-trigger--open .gbt-sb-trigger__icon{color:var(--primary);transform:scale(1.1) rotate(5deg)}.gbt-sb-trigger__input{flex:1;min-width:0;border:none;outline:none;background:transparent;color:var(--text-primary);font-size:14px;line-height:1.5}.gbt-sb-trigger__input::placeholder{color:var(--text-secondary)}.gbt-sb-trigger__input:focus-visible{outline:2px solid var(--primary);outline-offset:2px;border-radius:4px}.gbt-sb-trigger__clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;background:transparent;border:none;border-radius:6px;color:var(--text-secondary);cursor:pointer;transition:background .15s cubic-bezier(.4,0,.2,1),color .15s cubic-bezier(.4,0,.2,1)}.gbt-sb-trigger__clear:hover{background:var(--bg-hover);color:var(--text-primary)}.gbt-sb-trigger__clear:active{transform:scale(.9)}.gbt-sb-backdrop{position:fixed;inset:0;background:#0000004d;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);z-index:999;animation:gbt-search-bar-fade-in .2s cubic-bezier(.4,0,.2,1) both}.gbt-sb-panel{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);width:420px;max-height:460px;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius);box-shadow:0 16px 48px #0000002e,0 4px 12px #00000014;overflow:hidden;display:flex;flex-direction:column;z-index:1001;animation:gbt-search-bar-scale-in .25s cubic-bezier(.34,1.56,.64,1) both}.gbt-sb-list{flex:1;overflow-y:auto;padding:6px;display:flex;flex-direction:column}.gbt-sb-list::-webkit-scrollbar{width:6px}.gbt-sb-list::-webkit-scrollbar-track{background:transparent}.gbt-sb-list::-webkit-scrollbar-thumb{background:var(--bg-hover);border-radius:3px}.gbt-sb-list::-webkit-scrollbar-thumb:hover{background:var(--border-color)}.gbt-sb-group-label{display:flex;align-items:center;gap:6px;padding:10px 10px 4px;color:var(--text-secondary);font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.5px}.gbt-sb-group-count{margin-left:auto;padding:1px 7px;background:var(--bg-hover);border-radius:10px;font-size:11px;font-weight:600;color:var(--text-secondary)}.gbt-sb-item{display:flex;align-items:center;gap:10px;width:100%;padding:9px 10px;background:transparent;border:none;border-radius:8px;text-align:left;cursor:pointer;transition:background .12s cubic-bezier(.4,0,.2,1)}.gbt-sb-item:hover{background:var(--bg-hover)}.gbt-sb-item--active{background:color-mix(in srgb,var(--primary) 9%,transparent)}.gbt-sb-item__icon{flex-shrink:0;color:var(--text-secondary);transition:color .15s cubic-bezier(.4,0,.2,1)}.gbt-sb-item--active .gbt-sb-item__icon{color:var(--primary)}.gbt-sb-item__label{flex:1;font-size:14px;font-weight:500;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gbt-sb-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px 24px;gap:12px;text-align:center}.gbt-sb-state span{color:var(--text-primary);font-size:14px;font-weight:500}.gbt-sb-state__icon{color:var(--text-secondary);opacity:.4}.gbt-sb-state__hint{margin:0;color:var(--text-secondary);font-size:12px}.gbt-sb-kbd{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 5px;background:var(--bg-hover);border:1px solid var(--border-color);border-bottom-width:2px;border-radius:5px;color:var(--text-secondary);font-size:11px;font-family:SF Mono,Monaco,Consolas,monospace;font-weight:500;line-height:1}.gbt-sb-kbd--sm{min-width:18px;height:18px;font-size:10px;border-radius:4px}.gbt-sb-footer{flex-shrink:0;display:flex;align-items:center;gap:16px;padding:8px 12px;border-top:1px solid var(--border-color);background:var(--bg-hover)}.gbt-sb-footer__hint{display:flex;align-items:center;gap:4px;color:var(--text-secondary);font-size:11px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@keyframes gbt-search-bar-fade-in{0%{opacity:0}to{opacity:1}}@keyframes gbt-search-bar-scale-in{0%{opacity:0;transform:translate(-50%) scale(.96) translateY(-6px)}to{opacity:1;transform:translate(-50%) scale(1) translateY(0)}}@media(prefers-reduced-motion:reduce){.gbt-sb-trigger{transition:border-color .15s,box-shadow .15s}.gbt-sb-trigger__icon{transition:color .15s;transform:none!important}.gbt-sb-trigger__clear{transition:none}.gbt-sb-trigger__clear:active{transform:none}.gbt-sb-backdrop,.gbt-sb-panel{animation:none}}@media screen and (max-width:800px){.gbt-sb-trigger,.gbt-sb-trigger--open{width:100%}.gbt-sb-panel{width:calc(100vw - 32px);max-height:360px}.gbt-sb-state{padding:32px 16px}}\n"] }]
|
|
850
|
+
}, template: "<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n<div class=\"gbt-sb-trigger\" [class.gbt-sb-trigger--open]=\"isFocused()\" (click)=\"focusSearch()\">\n <gbt-icon name=\"search\" class=\"gbt-sb-trigger__icon\" aria-hidden=\"true\" />\n <input\n #searchInput\n type=\"text\"\n role=\"combobox\"\n class=\"gbt-sb-trigger__input\"\n [placeholder]=\"placeholder()\"\n [attr.aria-label]=\"ariaLabel() || placeholder()\"\n [value]=\"searchQuery()\"\n [attr.aria-expanded]=\"showOverlay()\"\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"showOverlay() ? panelId() : null\"\n [attr.aria-activedescendant]=\"activeItemDomId()\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (input)=\"onInput($event)\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n />\n @if (searchQuery().length > 0) {\n <button\n type=\"button\"\n class=\"gbt-sb-trigger__clear\"\n (click)=\"onClear()\"\n [attr.aria-label]=\"clearLabel()\"\n >\n <gbt-icon name=\"x\" aria-hidden=\"true\" />\n </button>\n }\n</div>\n@if (showOverlay()) {\n <div role=\"status\" aria-live=\"polite\" aria-atomic=\"true\" class=\"sr-only\">\n {{ resultsAnnouncement()(resultCount()) }}\n </div>\n}\n@if (showOverlay()) {\n <div class=\"gbt-sb-backdrop\" (click)=\"blurSearch()\" aria-hidden=\"true\"></div>\n <ng-template #footer>\n <div class=\"gbt-sb-footer\" aria-hidden=\"true\">\n <span class=\"gbt-sb-footer__hint\">\n <kbd class=\"gbt-sb-kbd gbt-sb-kbd--sm\">\u2191</kbd>\n <kbd class=\"gbt-sb-kbd gbt-sb-kbd--sm\">\u2193</kbd>\n {{ navigateHint() }}\n </span>\n <span class=\"gbt-sb-footer__hint\">\n <kbd class=\"gbt-sb-kbd gbt-sb-kbd--sm\">\u21B5</kbd>\n {{ selectHint() }}\n </span>\n <span class=\"gbt-sb-footer__hint\">\n <kbd class=\"gbt-sb-kbd gbt-sb-kbd--sm\">Esc</kbd>\n {{ closeHint() }}\n </span>\n </div>\n </ng-template>\n @if (hasNoResults()) {\n <div [id]=\"panelId()\" class=\"gbt-sb-panel\">\n <div class=\"gbt-sb-state\" role=\"status\">\n <gbt-icon name=\"search\" class=\"gbt-sb-state__icon\" aria-hidden=\"true\" />\n <span>{{ noResultsMessage() }}</span>\n <p class=\"gbt-sb-state__hint\">{{ noResultsHint() }}</p>\n </div>\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </div>\n } @else {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div\n [id]=\"panelId()\"\n class=\"gbt-sb-panel\"\n role=\"listbox\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (hasGroupedResults()) {\n <div class=\"gbt-sb-list\">\n @for (category of indexedGroupedResults(); track category.label) {\n @if (category.items.length > 0) {\n <div class=\"gbt-sb-group-label\">\n @if (category.icon) {\n <gbt-icon [name]=\"category.icon\" aria-hidden=\"true\" />\n }\n {{ category.label }}\n <span class=\"gbt-sb-group-count\" aria-hidden=\"true\">{{\n category.items.length\n }}</span>\n </div>\n @for (entry of category.indexedItems; track entry.index) {\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n [id]=\"itemDomId(entry.index)\"\n class=\"gbt-sb-item\"\n [attr.aria-selected]=\"entry.index === activeIndex()\"\n [class.gbt-sb-item--active]=\"entry.index === activeIndex()\"\n (click)=\"onSelect(entry.item)\"\n (mouseenter)=\"activeIndex.set(entry.index)\"\n >\n @if (itemTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: entry.item }\"\n ></ng-container>\n } @else {\n @if (category.icon) {\n <gbt-icon\n [name]=\"category.icon\"\n class=\"gbt-sb-item__icon\"\n aria-hidden=\"true\"\n />\n }\n <span class=\"gbt-sb-item__label\">{{ entry.formatted }}</span>\n }\n </button>\n }\n }\n }\n </div>\n } @else if (results() && results()!.length > 0) {\n <div class=\"gbt-sb-list\">\n @for (entry of indexedResults(); track entry.index) {\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n [id]=\"itemDomId(entry.index)\"\n class=\"gbt-sb-item\"\n [attr.aria-selected]=\"entry.index === activeIndex()\"\n [class.gbt-sb-item--active]=\"entry.index === activeIndex()\"\n (click)=\"onSelect(entry.item)\"\n (mouseenter)=\"activeIndex.set(entry.index)\"\n >\n @if (itemTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: entry.item }\"\n ></ng-container>\n } @else {\n <span class=\"gbt-sb-item__label\">{{ entry.formatted }}</span>\n }\n </button>\n }\n </div>\n }\n\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </div>\n }\n}\n", styles: [":host{position:relative;display:block}.gbt-sb-trigger{position:relative;z-index:1000;box-sizing:border-box;display:flex;align-items:center;gap:8px;height:40px;width:340px;padding:0 12px;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:16px;transition:width .35s cubic-bezier(.34,1.56,.64,1),border-color .2s cubic-bezier(.4,0,.2,1),box-shadow .2s cubic-bezier(.4,0,.2,1);cursor:text}.gbt-sb-trigger--open{width:420px;border-color:var(--primary);box-shadow:0 0 0 4px color-mix(in srgb,var(--primary) 12%,transparent)}.gbt-sb-trigger__icon{flex-shrink:0;color:var(--text-secondary);transition:color .2s cubic-bezier(.4,0,.2,1),transform .3s cubic-bezier(.34,1.56,.64,1)}.gbt-sb-trigger--open .gbt-sb-trigger__icon{color:var(--primary);transform:scale(1.1) rotate(5deg)}.gbt-sb-trigger__input{flex:1;min-width:0;border:none;outline:none;background:transparent;color:var(--text-primary);font-size:14px;line-height:1.5}.gbt-sb-trigger__input::placeholder{color:var(--text-secondary)}.gbt-sb-trigger__clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;background:transparent;border:none;border-radius:6px;color:var(--text-secondary);cursor:pointer;transition:background .15s cubic-bezier(.4,0,.2,1),color .15s cubic-bezier(.4,0,.2,1)}.gbt-sb-trigger__clear:hover{background:var(--bg-hover);color:var(--text-primary)}.gbt-sb-trigger__clear:active{transform:scale(.9)}.gbt-sb-backdrop{position:fixed;inset:0;background:#0000004d;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);z-index:999;animation:gbt-search-bar-fade-in .2s cubic-bezier(.4,0,.2,1) both}.gbt-sb-panel{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);width:420px;max-height:460px;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius);box-shadow:0 16px 48px #0000002e,0 4px 12px #00000014;overflow:hidden;display:flex;flex-direction:column;z-index:1001;animation:gbt-search-bar-scale-in .25s cubic-bezier(.34,1.56,.64,1) both}.gbt-sb-list{flex:1;overflow-y:auto;padding:6px;display:flex;flex-direction:column}.gbt-sb-list::-webkit-scrollbar{width:6px}.gbt-sb-list::-webkit-scrollbar-track{background:transparent}.gbt-sb-list::-webkit-scrollbar-thumb{background:var(--bg-hover);border-radius:3px}.gbt-sb-list::-webkit-scrollbar-thumb:hover{background:var(--border-color)}.gbt-sb-group-label{display:flex;align-items:center;gap:6px;padding:10px 10px 4px;color:var(--text-secondary);font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.5px}.gbt-sb-group-count{margin-left:auto;padding:1px 7px;background:var(--bg-hover);border-radius:10px;font-size:11px;font-weight:600;color:var(--text-secondary)}.gbt-sb-item{box-sizing:border-box;display:flex;align-items:center;gap:10px;width:100%;padding:9px 10px;background:transparent;border:none;border-radius:8px;text-align:left;cursor:pointer;transition:background .12s cubic-bezier(.4,0,.2,1)}.gbt-sb-item:hover{background:var(--bg-hover)}.gbt-sb-item--active{background:color-mix(in srgb,var(--primary) 9%,transparent)}.gbt-sb-item__icon{flex-shrink:0;color:var(--text-secondary);transition:color .15s cubic-bezier(.4,0,.2,1)}.gbt-sb-item--active .gbt-sb-item__icon{color:var(--primary)}.gbt-sb-item__label{flex:1;font-size:14px;font-weight:500;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gbt-sb-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px 24px;gap:12px;text-align:center}.gbt-sb-state span{color:var(--text-primary);font-size:14px;font-weight:500}.gbt-sb-state__icon{color:var(--text-secondary);opacity:.4}.gbt-sb-state__hint{margin:0;color:var(--text-secondary);font-size:12px}.gbt-sb-kbd{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 5px;background:var(--bg-hover);border:1px solid var(--border-color);border-bottom-width:2px;border-radius:5px;color:var(--text-secondary);font-size:11px;font-family:SF Mono,Monaco,Consolas,monospace;font-weight:500;line-height:1}.gbt-sb-kbd--sm{min-width:18px;height:18px;font-size:10px;border-radius:4px}.gbt-sb-footer{flex-shrink:0;display:flex;align-items:center;gap:16px;padding:8px 12px;border-top:1px solid var(--border-color);background:var(--bg-hover)}.gbt-sb-footer__hint{display:flex;align-items:center;gap:4px;color:var(--text-secondary);font-size:11px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@keyframes gbt-search-bar-fade-in{0%{opacity:0}to{opacity:1}}@keyframes gbt-search-bar-scale-in{0%{opacity:0;transform:translate(-50%) scale(.96) translateY(-6px)}to{opacity:1;transform:translate(-50%) scale(1) translateY(0)}}@media(prefers-reduced-motion:reduce){.gbt-sb-trigger{transition:border-color .15s,box-shadow .15s}.gbt-sb-trigger__icon{transition:color .15s;transform:none!important}.gbt-sb-trigger__clear{transition:none}.gbt-sb-trigger__clear:active{transform:none}.gbt-sb-backdrop,.gbt-sb-panel{animation:none}}@media screen and (max-width:800px){.gbt-sb-trigger,.gbt-sb-trigger--open{width:100%}.gbt-sb-panel{width:calc(100vw - 32px);max-height:360px}.gbt-sb-state{padding:32px 16px}}\n"] }]
|
|
830
851
|
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], results: [{ type: i0.Input, args: [{ isSignal: true, alias: "results", required: false }] }], groupedResults: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupedResults", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], displayFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayFn", required: false }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], keepQueryOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepQueryOnSelect", required: false }] }], noResultsMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "noResultsMessage", required: false }] }], noResultsHint: [{ type: i0.Input, args: [{ isSignal: true, alias: "noResultsHint", required: false }] }], clearLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearLabel", required: false }] }], resultsAnnouncement: [{ type: i0.Input, args: [{ isSignal: true, alias: "resultsAnnouncement", required: false }] }], navigateHint: [{ type: i0.Input, args: [{ isSignal: true, alias: "navigateHint", required: false }] }], selectHint: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectHint", required: false }] }], closeHint: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeHint", required: false }] }], queryChange: [{ type: i0.Output, args: ["queryChange"] }], itemSelected: [{ type: i0.Output, args: ["itemSelected"] }], clear: [{ type: i0.Output, args: ["clear"] }], searchInput: [{ type: i0.ViewChild, args: ['searchInput', { isSignal: true }] }] } });
|
|
831
852
|
|
|
832
853
|
class Tab {
|
|
@@ -2290,6 +2311,9 @@ class Menu {
|
|
|
2290
2311
|
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
2291
2312
|
align = input('start', /* @ts-ignore */
|
|
2292
2313
|
...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
2314
|
+
triggerIcon = input(null, /* @ts-ignore */
|
|
2315
|
+
...(ngDevMode ? [{ debugName: "triggerIcon" }] : /* istanbul ignore next */ []));
|
|
2316
|
+
opened = output();
|
|
2293
2317
|
open = signal(false, /* @ts-ignore */
|
|
2294
2318
|
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
2295
2319
|
position = signal(null, /* @ts-ignore */
|
|
@@ -2303,6 +2327,7 @@ class Menu {
|
|
|
2303
2327
|
if (this.open()) {
|
|
2304
2328
|
this.updatePosition();
|
|
2305
2329
|
this.focusAfterRender('first');
|
|
2330
|
+
this.opened.emit();
|
|
2306
2331
|
}
|
|
2307
2332
|
}
|
|
2308
2333
|
close(returnFocus) {
|
|
@@ -2321,6 +2346,7 @@ class Menu {
|
|
|
2321
2346
|
if (!this.open()) {
|
|
2322
2347
|
this.open.set(true);
|
|
2323
2348
|
this.updatePosition();
|
|
2349
|
+
this.opened.emit();
|
|
2324
2350
|
}
|
|
2325
2351
|
this.focusAfterRender(target);
|
|
2326
2352
|
}
|
|
@@ -2393,7 +2419,7 @@ class Menu {
|
|
|
2393
2419
|
}, { injector: this.injector });
|
|
2394
2420
|
}
|
|
2395
2421
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: Menu, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2396
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: Menu, isStandalone: true, selector: "gbt-menu", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:click": "onDocumentClick($event)", "focusout": "onFocusOut($event)", "window:scroll": "updatePosition()", "window:resize": "updatePosition()" } }, viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "list", first: true, predicate: ["list"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"gbt-menu\">\n <button\n #trigger\n type=\"button\"\n class=\"gbt-menu__trigger\"\n [class.gbt-menu__trigger--open]=\"open()\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"open()\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n <span class=\"gbt-menu__label\">{{ label() }}</span>\n
|
|
2422
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: Menu, isStandalone: true, selector: "gbt-menu", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, triggerIcon: { classPropertyName: "triggerIcon", publicName: "triggerIcon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "opened" }, host: { listeners: { "document:click": "onDocumentClick($event)", "focusout": "onFocusOut($event)", "window:scroll": "updatePosition()", "window:resize": "updatePosition()" } }, viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "list", first: true, predicate: ["list"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"gbt-menu\">\n <button\n #trigger\n type=\"button\"\n class=\"gbt-menu__trigger\"\n [class.gbt-menu__trigger--open]=\"open()\"\n [class.gbt-menu__trigger--icon-only]=\"triggerIcon()\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-label]=\"triggerIcon() ? label() : null\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n @if (triggerIcon(); as icon) {\n <gbt-icon [name]=\"icon\" aria-hidden=\"true\" />\n } @else {\n <span class=\"gbt-menu__label\">{{ label() }}</span>\n <gbt-icon name=\"chevron-down\" class=\"gbt-menu__chevron\" aria-hidden=\"true\" />\n }\n </button>\n\n @if (open() && position(); as pos) {\n <div\n #list\n class=\"gbt-menu__list\"\n role=\"menu\"\n tabindex=\"-1\"\n [attr.aria-label]=\"label()\"\n [style.top]=\"pos.top\"\n [style.left]=\"pos.left\"\n [style.right]=\"pos.right\"\n (keydown)=\"onListKeydown($event)\"\n (click)=\"onListClick()\"\n >\n <ng-content />\n </div>\n }\n</div>\n", styles: [":host{display:inline-block}.gbt-menu{position:relative;display:inline-block}.gbt-menu__trigger{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;background:transparent;border:1px solid transparent;border-radius:var(--site-border-radius-sm);color:var(--text-primary);font-size:.875rem;cursor:pointer;transition:background .12s cubic-bezier(.4,0,.2,1)}.gbt-menu__trigger:hover{background:var(--bg-hover)}.gbt-menu__trigger:focus-visible{outline:2px solid var(--primary);outline-offset:2px}.gbt-menu__trigger--open{background:var(--bg-hover)}.gbt-menu__trigger--icon-only{padding:.5rem;gap:0}.gbt-menu__chevron{flex-shrink:0;color:var(--text-secondary);transition:transform .2s cubic-bezier(.4,0,.2,1)}.gbt-menu__trigger--open .gbt-menu__chevron{transform:rotate(180deg)}.gbt-menu__list{position:fixed;z-index:1000;display:flex;flex-direction:column;min-width:180px;padding:6px;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);box-shadow:var(--site-shadow-lg);animation:gbt-menu-scale-in .15s cubic-bezier(.34,1.56,.64,1) both}@keyframes gbt-menu-scale-in{0%{opacity:0;transform:scale(.97) translateY(-4px)}to{opacity:1;transform:scale(1) translateY(0)}}@media(prefers-reduced-motion:reduce){.gbt-menu__list{animation:none}.gbt-menu__chevron{transition:none}}\n"], dependencies: [{ kind: "component", type: Icon, selector: "gbt-icon", inputs: ["name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2397
2423
|
}
|
|
2398
2424
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: Menu, decorators: [{
|
|
2399
2425
|
type: Component,
|
|
@@ -2402,8 +2428,68 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
2402
2428
|
'(focusout)': 'onFocusOut($event)',
|
|
2403
2429
|
'(window:scroll)': 'updatePosition()',
|
|
2404
2430
|
'(window:resize)': 'updatePosition()',
|
|
2405
|
-
}, template: "<div class=\"gbt-menu\">\n <button\n #trigger\n type=\"button\"\n class=\"gbt-menu__trigger\"\n [class.gbt-menu__trigger--open]=\"open()\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"open()\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n <span class=\"gbt-menu__label\">{{ label() }}</span>\n
|
|
2406
|
-
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], trigger: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], list: [{ type: i0.ViewChild, args: ['list', { isSignal: true }] }] } });
|
|
2431
|
+
}, template: "<div class=\"gbt-menu\">\n <button\n #trigger\n type=\"button\"\n class=\"gbt-menu__trigger\"\n [class.gbt-menu__trigger--open]=\"open()\"\n [class.gbt-menu__trigger--icon-only]=\"triggerIcon()\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-label]=\"triggerIcon() ? label() : null\"\n (click)=\"toggle()\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n @if (triggerIcon(); as icon) {\n <gbt-icon [name]=\"icon\" aria-hidden=\"true\" />\n } @else {\n <span class=\"gbt-menu__label\">{{ label() }}</span>\n <gbt-icon name=\"chevron-down\" class=\"gbt-menu__chevron\" aria-hidden=\"true\" />\n }\n </button>\n\n @if (open() && position(); as pos) {\n <div\n #list\n class=\"gbt-menu__list\"\n role=\"menu\"\n tabindex=\"-1\"\n [attr.aria-label]=\"label()\"\n [style.top]=\"pos.top\"\n [style.left]=\"pos.left\"\n [style.right]=\"pos.right\"\n (keydown)=\"onListKeydown($event)\"\n (click)=\"onListClick()\"\n >\n <ng-content />\n </div>\n }\n</div>\n", styles: [":host{display:inline-block}.gbt-menu{position:relative;display:inline-block}.gbt-menu__trigger{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;background:transparent;border:1px solid transparent;border-radius:var(--site-border-radius-sm);color:var(--text-primary);font-size:.875rem;cursor:pointer;transition:background .12s cubic-bezier(.4,0,.2,1)}.gbt-menu__trigger:hover{background:var(--bg-hover)}.gbt-menu__trigger:focus-visible{outline:2px solid var(--primary);outline-offset:2px}.gbt-menu__trigger--open{background:var(--bg-hover)}.gbt-menu__trigger--icon-only{padding:.5rem;gap:0}.gbt-menu__chevron{flex-shrink:0;color:var(--text-secondary);transition:transform .2s cubic-bezier(.4,0,.2,1)}.gbt-menu__trigger--open .gbt-menu__chevron{transform:rotate(180deg)}.gbt-menu__list{position:fixed;z-index:1000;display:flex;flex-direction:column;min-width:180px;padding:6px;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);box-shadow:var(--site-shadow-lg);animation:gbt-menu-scale-in .15s cubic-bezier(.34,1.56,.64,1) both}@keyframes gbt-menu-scale-in{0%{opacity:0;transform:scale(.97) translateY(-4px)}to{opacity:1;transform:scale(1) translateY(0)}}@media(prefers-reduced-motion:reduce){.gbt-menu__list{animation:none}.gbt-menu__chevron{transition:none}}\n"] }]
|
|
2432
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], triggerIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerIcon", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], trigger: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], list: [{ type: i0.ViewChild, args: ['list', { isSignal: true }] }] } });
|
|
2433
|
+
|
|
2434
|
+
class Breadcrumb {
|
|
2435
|
+
ariaLabel = input.required(/* @ts-ignore */
|
|
2436
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
2437
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: Breadcrumb, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2438
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", type: Breadcrumb, isStandalone: true, selector: "gbt-breadcrumb", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<nav [attr.aria-label]=\"ariaLabel()\" class=\"gbt-breadcrumb\">\n <ol class=\"gbt-breadcrumb__list\">\n <ng-content select=\"[breadcrumb-ancestor]\" />\n <li class=\"gbt-breadcrumb__current\" aria-current=\"page\"><ng-content /></li>\n </ol>\n</nav>\n", styles: [":host{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2439
|
+
}
|
|
2440
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: Breadcrumb, decorators: [{
|
|
2441
|
+
type: Component,
|
|
2442
|
+
args: [{ selector: 'gbt-breadcrumb', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav [attr.aria-label]=\"ariaLabel()\" class=\"gbt-breadcrumb\">\n <ol class=\"gbt-breadcrumb__list\">\n <ng-content select=\"[breadcrumb-ancestor]\" />\n <li class=\"gbt-breadcrumb__current\" aria-current=\"page\"><ng-content /></li>\n </ol>\n</nav>\n", styles: [":host{display:block}\n"] }]
|
|
2443
|
+
}], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: true }] }] } });
|
|
2444
|
+
|
|
2445
|
+
class ConfirmDangerModal {
|
|
2446
|
+
isOpen = input.required(/* @ts-ignore */
|
|
2447
|
+
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
2448
|
+
heading = input.required(/* @ts-ignore */
|
|
2449
|
+
...(ngDevMode ? [{ debugName: "heading" }] : /* istanbul ignore next */ []));
|
|
2450
|
+
message = input.required(/* @ts-ignore */
|
|
2451
|
+
...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
|
|
2452
|
+
confirmText = input.required(/* @ts-ignore */
|
|
2453
|
+
...(ngDevMode ? [{ debugName: "confirmText" }] : /* istanbul ignore next */ []));
|
|
2454
|
+
confirmInputLabel = input('Type to confirm', /* @ts-ignore */
|
|
2455
|
+
...(ngDevMode ? [{ debugName: "confirmInputLabel" }] : /* istanbul ignore next */ []));
|
|
2456
|
+
confirmLabel = input('Confirm', /* @ts-ignore */
|
|
2457
|
+
...(ngDevMode ? [{ debugName: "confirmLabel" }] : /* istanbul ignore next */ []));
|
|
2458
|
+
cancelLabel = input('Cancel', /* @ts-ignore */
|
|
2459
|
+
...(ngDevMode ? [{ debugName: "cancelLabel" }] : /* istanbul ignore next */ []));
|
|
2460
|
+
closeLabel = input('Close', /* @ts-ignore */
|
|
2461
|
+
...(ngDevMode ? [{ debugName: "closeLabel" }] : /* istanbul ignore next */ []));
|
|
2462
|
+
confirmed = output();
|
|
2463
|
+
closed = output();
|
|
2464
|
+
typed = signal('', /* @ts-ignore */
|
|
2465
|
+
...(ngDevMode ? [{ debugName: "typed" }] : /* istanbul ignore next */ []));
|
|
2466
|
+
canConfirm = computed(() => this.typed().length > 0 && this.typed() === this.confirmText(), /* @ts-ignore */
|
|
2467
|
+
...(ngDevMode ? [{ debugName: "canConfirm" }] : /* istanbul ignore next */ []));
|
|
2468
|
+
constructor() {
|
|
2469
|
+
// Cleared whenever the modal transitions to closed (Cancel, Escape,
|
|
2470
|
+
// backdrop, or the consumer setting isOpen false after a successful
|
|
2471
|
+
// confirm) — a later reopen must never show the previous attempt's text.
|
|
2472
|
+
effect(() => {
|
|
2473
|
+
if (!this.isOpen()) {
|
|
2474
|
+
this.typed.set('');
|
|
2475
|
+
}
|
|
2476
|
+
});
|
|
2477
|
+
}
|
|
2478
|
+
confirm() {
|
|
2479
|
+
if (this.canConfirm()) {
|
|
2480
|
+
this.confirmed.emit();
|
|
2481
|
+
}
|
|
2482
|
+
}
|
|
2483
|
+
cancel() {
|
|
2484
|
+
this.closed.emit();
|
|
2485
|
+
}
|
|
2486
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: ConfirmDangerModal, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2487
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", type: ConfirmDangerModal, isStandalone: true, selector: "gbt-confirm-danger-modal", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: true, transformFunction: null }, heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: true, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, confirmText: { classPropertyName: "confirmText", publicName: "confirmText", isSignal: true, isRequired: true, transformFunction: null }, confirmInputLabel: { classPropertyName: "confirmInputLabel", publicName: "confirmInputLabel", isSignal: true, isRequired: false, transformFunction: null }, confirmLabel: { classPropertyName: "confirmLabel", publicName: "confirmLabel", isSignal: true, isRequired: false, transformFunction: null }, cancelLabel: { classPropertyName: "cancelLabel", publicName: "cancelLabel", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { confirmed: "confirmed", closed: "closed" }, ngImport: i0, template: "<gbt-modal\n [isOpen]=\"isOpen()\"\n [heading]=\"heading()\"\n [closeLabel]=\"closeLabel()\"\n (closed)=\"cancel()\"\n>\n <p class=\"gbt-confirm-danger-modal__message\">{{ message() }}</p>\n <gbt-input\n [label]=\"confirmInputLabel()\"\n [ngModel]=\"typed()\"\n (ngModelChange)=\"typed.set($event)\"\n />\n <div class=\"gbt-confirm-danger-modal__actions\">\n <gbt-button variant=\"secondary\" [text]=\"cancelLabel()\" (clicked)=\"cancel()\" />\n <gbt-button\n variant=\"danger\"\n [text]=\"confirmLabel()\"\n [disabled]=\"!canConfirm()\"\n (clicked)=\"confirm()\"\n />\n </div>\n</gbt-modal>\n", styles: [".gbt-confirm-danger-modal__message{margin:0;color:var(--text-secondary)}.gbt-confirm-danger-modal__actions{display:flex;justify-content:flex-end;gap:.5rem}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: Modal, selector: "gbt-modal", inputs: ["isOpen", "heading", "headingLevel", "closeLabel"], outputs: ["closed"] }, { kind: "component", type: GbtInput, selector: "gbt-input", inputs: ["id", "label", "type", "required", "disabled", "placeholder", "errorMessage", "autocomplete", "showPasswordLabel", "hidePasswordLabel"], outputs: ["committed"] }, { kind: "component", type: Button, selector: "gbt-button", inputs: ["variant", "size", "type", "text", "iconName", "ariaLabel", "loading", "loadingLabel", "disabled"], outputs: ["clicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2488
|
+
}
|
|
2489
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: ConfirmDangerModal, decorators: [{
|
|
2490
|
+
type: Component,
|
|
2491
|
+
args: [{ selector: 'gbt-confirm-danger-modal', standalone: true, imports: [FormsModule, Modal, GbtInput, Button], changeDetection: ChangeDetectionStrategy.OnPush, template: "<gbt-modal\n [isOpen]=\"isOpen()\"\n [heading]=\"heading()\"\n [closeLabel]=\"closeLabel()\"\n (closed)=\"cancel()\"\n>\n <p class=\"gbt-confirm-danger-modal__message\">{{ message() }}</p>\n <gbt-input\n [label]=\"confirmInputLabel()\"\n [ngModel]=\"typed()\"\n (ngModelChange)=\"typed.set($event)\"\n />\n <div class=\"gbt-confirm-danger-modal__actions\">\n <gbt-button variant=\"secondary\" [text]=\"cancelLabel()\" (clicked)=\"cancel()\" />\n <gbt-button\n variant=\"danger\"\n [text]=\"confirmLabel()\"\n [disabled]=\"!canConfirm()\"\n (clicked)=\"confirm()\"\n />\n </div>\n</gbt-modal>\n", styles: [".gbt-confirm-danger-modal__message{margin:0;color:var(--text-secondary)}.gbt-confirm-danger-modal__actions{display:flex;justify-content:flex-end;gap:.5rem}\n"] }]
|
|
2492
|
+
}], ctorParameters: () => [], propDecorators: { isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: true }] }], heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: true }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: true }] }], confirmText: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirmText", required: true }] }], confirmInputLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirmInputLabel", required: false }] }], confirmLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirmLabel", required: false }] }], cancelLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelLabel", required: false }] }], closeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLabel", required: false }] }], confirmed: [{ type: i0.Output, args: ["confirmed"] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
2407
2493
|
|
|
2408
2494
|
const DEFAULT_DURATION_MS = 5000;
|
|
2409
2495
|
const ASSERTIVE_VARIANTS = new Set(['warning', 'error']);
|
|
@@ -2459,24 +2545,24 @@ class Toaster {
|
|
|
2459
2545
|
return VARIANT_ICONS[variant];
|
|
2460
2546
|
}
|
|
2461
2547
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: Toaster, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2462
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: Toaster, isStandalone: true, selector: "gbt-toaster", inputs: { toasts: { classPropertyName: "toasts", publicName: "toasts", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dismissed: "dismissed" }, ngImport: i0, template: "<div class=\"gbt-toaster\" [attr.data-position]=\"position()\">\n @for (toast of toasts(); track toast.id) {\n <div\n class=\"gbt-toaster__item\"\n [attr.data-variant]=\"toast.variant\"\n [attr.role]=\"roleFor(toast.variant)\"\n aria-atomic=\"true\"\n >\n <span class=\"gbt-toaster__icon\">\n <gbt-icon [name]=\"iconFor(toast.variant)\" aria-hidden=\"true\" />\n </span>\n <p class=\"gbt-toaster__message\">{{ toast.message }}</p>\n <button\n type=\"button\"\n class=\"gbt-toaster__close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"dismissed.emit(toast.id)\"\n >\n <gbt-icon name=\"x\" aria-hidden=\"true\" />\n </button>\n </div>\n }\n</div>\n", styles: [".gbt-toaster{position:fixed;z-index:
|
|
2548
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: Toaster, isStandalone: true, selector: "gbt-toaster", inputs: { toasts: { classPropertyName: "toasts", publicName: "toasts", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dismissed: "dismissed" }, ngImport: i0, template: "<div class=\"gbt-toaster\" [attr.data-position]=\"position()\">\n @for (toast of toasts(); track toast.id) {\n <div\n class=\"gbt-toaster__item\"\n [attr.data-variant]=\"toast.variant\"\n [attr.role]=\"roleFor(toast.variant)\"\n aria-atomic=\"true\"\n >\n <span class=\"gbt-toaster__icon\">\n <gbt-icon [name]=\"iconFor(toast.variant)\" aria-hidden=\"true\" />\n </span>\n <p class=\"gbt-toaster__message\">{{ toast.message }}</p>\n <button\n type=\"button\"\n class=\"gbt-toaster__close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"dismissed.emit(toast.id)\"\n >\n <gbt-icon name=\"x\" aria-hidden=\"true\" />\n </button>\n </div>\n }\n</div>\n", styles: [".gbt-toaster{position:fixed;z-index:1300;display:flex;flex-direction:column;gap:.5rem;max-width:min(90vw,360px);pointer-events:none}.gbt-toaster[data-position=top-right]{top:1rem;right:1rem;align-items:flex-end}.gbt-toaster[data-position=top-left]{top:1rem;left:1rem;align-items:flex-start}.gbt-toaster[data-position=top-center]{top:1rem;left:50%;align-items:center;transform:translate(-50%)}.gbt-toaster[data-position=bottom-right]{right:1rem;bottom:1rem;flex-direction:column-reverse;align-items:flex-end}.gbt-toaster[data-position=bottom-left]{bottom:1rem;left:1rem;flex-direction:column-reverse;align-items:flex-start}.gbt-toaster[data-position=bottom-center]{bottom:1rem;left:50%;flex-direction:column-reverse;align-items:center;transform:translate(-50%)}.gbt-toaster__item{box-sizing:border-box;display:flex;align-items:flex-start;gap:.625rem;width:100%;padding:.75rem 1rem;pointer-events:auto;background:var(--bg-inverse);border:none;border-radius:var(--site-border-radius);box-shadow:var(--site-shadow-lg);animation:gbt-toaster-in var(--site-transition-base)}.gbt-toaster__item[data-variant=success] .gbt-toaster__icon{background:var(--color-success-vivid-base)}.gbt-toaster__item[data-variant=warning] .gbt-toaster__icon{background:var(--color-warning-vivid-base)}.gbt-toaster__item[data-variant=error] .gbt-toaster__icon{background:var(--color-error-vivid-base)}.gbt-toaster__item[data-variant=info] .gbt-toaster__icon{background:var(--color-info-vivid-base)}.gbt-toaster__icon{display:inline-flex;flex:none;align-items:center;justify-content:center;width:1.875rem;height:1.875rem;margin-top:.0625rem;color:var(--text-on-color);border-radius:50%}.gbt-toaster__icon gbt-icon{width:1.125em;height:1.125em}.gbt-toaster__message{flex:1 1 auto;margin:.3125rem 0;color:var(--text-on-color);font-size:.875rem;line-height:1.4}.gbt-toaster__close{position:relative;display:inline-flex;flex:none;align-self:flex-start;margin-top:.3125rem;background:none;border:none;border-radius:50%;color:var(--text-on-color);opacity:.7;cursor:pointer;transition:opacity var(--site-transition-fast)}.gbt-toaster__close:hover,.gbt-toaster__close:focus-visible{opacity:1}.gbt-toaster__close:focus-visible{outline:2px solid var(--text-on-color);outline-offset:2px}.gbt-toaster__close:before{content:\"\";position:absolute;inset:50% auto auto 50%;width:max(100%,24px);height:max(100%,24px);transform:translate(-50%,-50%)}@keyframes gbt-toaster-in{0%{opacity:0;transform:translateY(4px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}\n"], dependencies: [{ kind: "component", type: Icon, selector: "gbt-icon", inputs: ["name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2463
2549
|
}
|
|
2464
2550
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: Toaster, decorators: [{
|
|
2465
2551
|
type: Component,
|
|
2466
|
-
args: [{ selector: 'gbt-toaster', standalone: true, imports: [Icon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"gbt-toaster\" [attr.data-position]=\"position()\">\n @for (toast of toasts(); track toast.id) {\n <div\n class=\"gbt-toaster__item\"\n [attr.data-variant]=\"toast.variant\"\n [attr.role]=\"roleFor(toast.variant)\"\n aria-atomic=\"true\"\n >\n <span class=\"gbt-toaster__icon\">\n <gbt-icon [name]=\"iconFor(toast.variant)\" aria-hidden=\"true\" />\n </span>\n <p class=\"gbt-toaster__message\">{{ toast.message }}</p>\n <button\n type=\"button\"\n class=\"gbt-toaster__close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"dismissed.emit(toast.id)\"\n >\n <gbt-icon name=\"x\" aria-hidden=\"true\" />\n </button>\n </div>\n }\n</div>\n", styles: [".gbt-toaster{position:fixed;z-index:
|
|
2552
|
+
args: [{ selector: 'gbt-toaster', standalone: true, imports: [Icon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"gbt-toaster\" [attr.data-position]=\"position()\">\n @for (toast of toasts(); track toast.id) {\n <div\n class=\"gbt-toaster__item\"\n [attr.data-variant]=\"toast.variant\"\n [attr.role]=\"roleFor(toast.variant)\"\n aria-atomic=\"true\"\n >\n <span class=\"gbt-toaster__icon\">\n <gbt-icon [name]=\"iconFor(toast.variant)\" aria-hidden=\"true\" />\n </span>\n <p class=\"gbt-toaster__message\">{{ toast.message }}</p>\n <button\n type=\"button\"\n class=\"gbt-toaster__close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"dismissed.emit(toast.id)\"\n >\n <gbt-icon name=\"x\" aria-hidden=\"true\" />\n </button>\n </div>\n }\n</div>\n", styles: [".gbt-toaster{position:fixed;z-index:1300;display:flex;flex-direction:column;gap:.5rem;max-width:min(90vw,360px);pointer-events:none}.gbt-toaster[data-position=top-right]{top:1rem;right:1rem;align-items:flex-end}.gbt-toaster[data-position=top-left]{top:1rem;left:1rem;align-items:flex-start}.gbt-toaster[data-position=top-center]{top:1rem;left:50%;align-items:center;transform:translate(-50%)}.gbt-toaster[data-position=bottom-right]{right:1rem;bottom:1rem;flex-direction:column-reverse;align-items:flex-end}.gbt-toaster[data-position=bottom-left]{bottom:1rem;left:1rem;flex-direction:column-reverse;align-items:flex-start}.gbt-toaster[data-position=bottom-center]{bottom:1rem;left:50%;flex-direction:column-reverse;align-items:center;transform:translate(-50%)}.gbt-toaster__item{box-sizing:border-box;display:flex;align-items:flex-start;gap:.625rem;width:100%;padding:.75rem 1rem;pointer-events:auto;background:var(--bg-inverse);border:none;border-radius:var(--site-border-radius);box-shadow:var(--site-shadow-lg);animation:gbt-toaster-in var(--site-transition-base)}.gbt-toaster__item[data-variant=success] .gbt-toaster__icon{background:var(--color-success-vivid-base)}.gbt-toaster__item[data-variant=warning] .gbt-toaster__icon{background:var(--color-warning-vivid-base)}.gbt-toaster__item[data-variant=error] .gbt-toaster__icon{background:var(--color-error-vivid-base)}.gbt-toaster__item[data-variant=info] .gbt-toaster__icon{background:var(--color-info-vivid-base)}.gbt-toaster__icon{display:inline-flex;flex:none;align-items:center;justify-content:center;width:1.875rem;height:1.875rem;margin-top:.0625rem;color:var(--text-on-color);border-radius:50%}.gbt-toaster__icon gbt-icon{width:1.125em;height:1.125em}.gbt-toaster__message{flex:1 1 auto;margin:.3125rem 0;color:var(--text-on-color);font-size:.875rem;line-height:1.4}.gbt-toaster__close{position:relative;display:inline-flex;flex:none;align-self:flex-start;margin-top:.3125rem;background:none;border:none;border-radius:50%;color:var(--text-on-color);opacity:.7;cursor:pointer;transition:opacity var(--site-transition-fast)}.gbt-toaster__close:hover,.gbt-toaster__close:focus-visible{opacity:1}.gbt-toaster__close:focus-visible{outline:2px solid var(--text-on-color);outline-offset:2px}.gbt-toaster__close:before{content:\"\";position:absolute;inset:50% auto auto 50%;width:max(100%,24px);height:max(100%,24px);transform:translate(-50%,-50%)}@keyframes gbt-toaster-in{0%{opacity:0;transform:translateY(4px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}\n"] }]
|
|
2467
2553
|
}], ctorParameters: () => [], propDecorators: { toasts: [{ type: i0.Input, args: [{ isSignal: true, alias: "toasts", required: true }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], closeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLabel", required: false }] }], dismissed: [{ type: i0.Output, args: ["dismissed"] }] } });
|
|
2468
2554
|
|
|
2469
2555
|
const SHOW_DELAY_MS = 400;
|
|
2470
2556
|
const FADE_MS = 120;
|
|
2471
2557
|
const GAP_PX = 8;
|
|
2472
|
-
let nextId = 0;
|
|
2558
|
+
let nextId$2 = 0;
|
|
2473
2559
|
class Tooltip {
|
|
2474
2560
|
elementRef = inject((ElementRef));
|
|
2475
2561
|
text = input.required(/* @ts-ignore */
|
|
2476
2562
|
...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
2477
2563
|
position = input('top', /* @ts-ignore */
|
|
2478
2564
|
...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
2479
|
-
tooltipId = `gbt-tooltip-${++nextId}`;
|
|
2565
|
+
tooltipId = `gbt-tooltip-${++nextId$2}`;
|
|
2480
2566
|
visible = signal(false, /* @ts-ignore */
|
|
2481
2567
|
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
2482
2568
|
closing = signal(false, /* @ts-ignore */
|
|
@@ -2561,9 +2647,417 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
2561
2647
|
}, template: "<ng-content />\n@if (visible() && coords(); as pos) {\n <span\n class=\"gbt-tooltip__bubble\"\n [class.gbt-tooltip__bubble--leaving]=\"closing()\"\n role=\"tooltip\"\n [id]=\"tooltipId\"\n [attr.data-position]=\"position()\"\n [style.top.px]=\"pos.top\"\n [style.left.px]=\"pos.left\"\n >\n {{ text() }}\n </span>\n}", styles: [".gbt-tooltip-host{display:inline-block}.gbt-tooltip__bubble{position:fixed;z-index:1100;max-width:240px;padding:.375rem .625rem;background:var(--bg-inverse);color:var(--text-on-color);text-align:center;white-space:normal;border:1px solid rgba(255,255,255,.15);border-radius:var(--site-border-radius-sm);box-shadow:var(--site-shadow-md);font-size:.8125rem;line-height:1.3;pointer-events:none}.gbt-tooltip__bubble[data-position=top]{transform:translate(-50%,-100%)}.gbt-tooltip__bubble[data-position=bottom]{transform:translate(-50%)}.gbt-tooltip__bubble[data-position=left]{transform:translate(-100%,-50%)}.gbt-tooltip__bubble[data-position=right]{transform:translateY(-50%)}.gbt-tooltip__bubble{animation:gbt-tooltip-fade-in .12s ease-out}.gbt-tooltip__bubble.gbt-tooltip__bubble--leaving{animation:gbt-tooltip-fade-out .12s ease-in forwards}@keyframes gbt-tooltip-fade-in{0%{opacity:0}to{opacity:1}}@keyframes gbt-tooltip-fade-out{0%{opacity:1}to{opacity:0}}\n"] }]
|
|
2562
2648
|
}], propDecorators: { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: true }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }] } });
|
|
2563
2649
|
|
|
2650
|
+
let nextId$1 = 0;
|
|
2651
|
+
class RadioGroup {
|
|
2652
|
+
id = input(`gbt-radio-group-${++nextId$1}`, /* @ts-ignore */
|
|
2653
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
2654
|
+
label = input.required(/* @ts-ignore */
|
|
2655
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
2656
|
+
options = input.required(/* @ts-ignore */
|
|
2657
|
+
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
2658
|
+
orientation = input('vertical', /* @ts-ignore */
|
|
2659
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
2660
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2661
|
+
required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2662
|
+
errorMessage = input(null, /* @ts-ignore */
|
|
2663
|
+
...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
2664
|
+
selected = signal(null, /* @ts-ignore */
|
|
2665
|
+
...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
|
|
2666
|
+
formDisabled = signal(false, /* @ts-ignore */
|
|
2667
|
+
...(ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []));
|
|
2668
|
+
isDisabled = computed(() => this.disabled() || this.formDisabled(), /* @ts-ignore */
|
|
2669
|
+
...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
2670
|
+
onChange = () => { };
|
|
2671
|
+
onTouched = () => { };
|
|
2672
|
+
writeValue(value) {
|
|
2673
|
+
this.selected.set(value);
|
|
2674
|
+
}
|
|
2675
|
+
registerOnChange(fn) {
|
|
2676
|
+
this.onChange = fn;
|
|
2677
|
+
}
|
|
2678
|
+
registerOnTouched(fn) {
|
|
2679
|
+
this.onTouched = fn;
|
|
2680
|
+
}
|
|
2681
|
+
setDisabledState(isDisabled) {
|
|
2682
|
+
this.formDisabled.set(isDisabled);
|
|
2683
|
+
}
|
|
2684
|
+
isSelected(value) {
|
|
2685
|
+
return this.selected() === value;
|
|
2686
|
+
}
|
|
2687
|
+
selectOption(value) {
|
|
2688
|
+
this.selected.set(value);
|
|
2689
|
+
this.onChange(value);
|
|
2690
|
+
this.onTouched();
|
|
2691
|
+
}
|
|
2692
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: RadioGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2693
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: RadioGroup, isStandalone: true, selector: "gbt-radio-group", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
2694
|
+
{
|
|
2695
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2696
|
+
useExisting: forwardRef(() => RadioGroup),
|
|
2697
|
+
multi: true,
|
|
2698
|
+
},
|
|
2699
|
+
], ngImport: i0, template: "<fieldset\n class=\"gbt-radio-group\"\n [attr.data-orientation]=\"orientation()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"errorMessage() ? id() + '-error' : null\"\n>\n <legend class=\"gbt-radio-group__legend\">{{ label() }}{{ required() ? ' *' : '' }}</legend>\n <div class=\"gbt-radio-group__options\">\n @for (option of options(); track option.value; let i = $index) {\n <label class=\"gbt-radio-group__option\">\n <input\n type=\"radio\"\n [id]=\"id() + '-' + i\"\n [name]=\"id()\"\n [value]=\"option.value\"\n [checked]=\"isSelected(option.value)\"\n [disabled]=\"isDisabled() || !!option.disabled\"\n (change)=\"selectOption(option.value)\"\n />\n <span>{{ option.label }}</span>\n </label>\n }\n </div>\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-radio-group__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</fieldset>\n", styles: [".gbt-radio-group{display:flex;flex-direction:column;gap:.5rem;margin:0;padding:0;border:none}.gbt-radio-group:disabled,.gbt-radio-group[disabled]{opacity:.5}.gbt-radio-group__legend{padding:0;font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-radio-group__options{display:flex;flex-direction:column;gap:.5rem}.gbt-radio-group[data-orientation=horizontal] .gbt-radio-group__options{flex-direction:row;flex-wrap:wrap;gap:1.25rem}.gbt-radio-group__option{position:relative;display:inline-flex;align-items:center;gap:.5rem;font-size:.875rem;color:var(--text-primary);cursor:pointer}.gbt-radio-group__option:before{content:\"\";position:absolute;inset:50% auto auto 50%;width:max(100%,24px);height:max(100%,24px);transform:translate(-50%,-50%)}.gbt-radio-group__option:has(input:disabled){cursor:not-allowed;opacity:.5}.gbt-radio-group__option input{width:1rem;height:1rem;accent-color:var(--primary)}.gbt-radio-group__error{margin:0;font-size:.75rem;color:var(--color-error-text)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2700
|
+
}
|
|
2701
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: RadioGroup, decorators: [{
|
|
2702
|
+
type: Component,
|
|
2703
|
+
args: [{ selector: 'gbt-radio-group', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
2704
|
+
{
|
|
2705
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2706
|
+
useExisting: forwardRef(() => RadioGroup),
|
|
2707
|
+
multi: true,
|
|
2708
|
+
},
|
|
2709
|
+
], template: "<fieldset\n class=\"gbt-radio-group\"\n [attr.data-orientation]=\"orientation()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"errorMessage() ? id() + '-error' : null\"\n>\n <legend class=\"gbt-radio-group__legend\">{{ label() }}{{ required() ? ' *' : '' }}</legend>\n <div class=\"gbt-radio-group__options\">\n @for (option of options(); track option.value; let i = $index) {\n <label class=\"gbt-radio-group__option\">\n <input\n type=\"radio\"\n [id]=\"id() + '-' + i\"\n [name]=\"id()\"\n [value]=\"option.value\"\n [checked]=\"isSelected(option.value)\"\n [disabled]=\"isDisabled() || !!option.disabled\"\n (change)=\"selectOption(option.value)\"\n />\n <span>{{ option.label }}</span>\n </label>\n }\n </div>\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-radio-group__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</fieldset>\n", styles: [".gbt-radio-group{display:flex;flex-direction:column;gap:.5rem;margin:0;padding:0;border:none}.gbt-radio-group:disabled,.gbt-radio-group[disabled]{opacity:.5}.gbt-radio-group__legend{padding:0;font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-radio-group__options{display:flex;flex-direction:column;gap:.5rem}.gbt-radio-group[data-orientation=horizontal] .gbt-radio-group__options{flex-direction:row;flex-wrap:wrap;gap:1.25rem}.gbt-radio-group__option{position:relative;display:inline-flex;align-items:center;gap:.5rem;font-size:.875rem;color:var(--text-primary);cursor:pointer}.gbt-radio-group__option:before{content:\"\";position:absolute;inset:50% auto auto 50%;width:max(100%,24px);height:max(100%,24px);transform:translate(-50%,-50%)}.gbt-radio-group__option:has(input:disabled){cursor:not-allowed;opacity:.5}.gbt-radio-group__option input{width:1rem;height:1rem;accent-color:var(--primary)}.gbt-radio-group__error{margin:0;font-size:.75rem;color:var(--color-error-text)}\n"] }]
|
|
2710
|
+
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }] } });
|
|
2711
|
+
|
|
2712
|
+
let nextSwitchId = 0;
|
|
2713
|
+
class Switch {
|
|
2714
|
+
id = input(`gbt-switch-${++nextSwitchId}`, /* @ts-ignore */
|
|
2715
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
2716
|
+
label = input('', /* @ts-ignore */
|
|
2717
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
2718
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2719
|
+
checked = signal(false, /* @ts-ignore */
|
|
2720
|
+
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
2721
|
+
formDisabled = signal(false, /* @ts-ignore */
|
|
2722
|
+
...(ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []));
|
|
2723
|
+
isDisabled = computed(() => this.disabled() || this.formDisabled(), /* @ts-ignore */
|
|
2724
|
+
...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
2725
|
+
onChange = () => { };
|
|
2726
|
+
onTouched = () => { };
|
|
2727
|
+
writeValue(value) {
|
|
2728
|
+
this.checked.set(!!value);
|
|
2729
|
+
}
|
|
2730
|
+
registerOnChange(fn) {
|
|
2731
|
+
this.onChange = fn;
|
|
2732
|
+
}
|
|
2733
|
+
registerOnTouched(fn) {
|
|
2734
|
+
this.onTouched = fn;
|
|
2735
|
+
}
|
|
2736
|
+
setDisabledState(isDisabled) {
|
|
2737
|
+
this.formDisabled.set(isDisabled);
|
|
2738
|
+
}
|
|
2739
|
+
onToggle(event) {
|
|
2740
|
+
const value = event.target.checked;
|
|
2741
|
+
this.checked.set(value);
|
|
2742
|
+
this.onChange(value);
|
|
2743
|
+
this.onTouched();
|
|
2744
|
+
}
|
|
2745
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: Switch, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2746
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", type: Switch, isStandalone: true, selector: "gbt-switch", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
2747
|
+
{
|
|
2748
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2749
|
+
useExisting: forwardRef(() => Switch),
|
|
2750
|
+
multi: true,
|
|
2751
|
+
},
|
|
2752
|
+
], ngImport: i0, template: "<label class=\"gbt-switch\" [class.gbt-switch--disabled]=\"isDisabled()\">\n <input\n type=\"checkbox\"\n role=\"switch\"\n class=\"gbt-switch__input\"\n [id]=\"id()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n (change)=\"onToggle($event)\"\n />\n <span class=\"gbt-switch__track\">\n <span class=\"gbt-switch__thumb\"></span>\n </span>\n <span>{{ label() }}</span>\n</label>\n", styles: [".gbt-switch{position:relative;display:inline-flex;align-items:center;gap:.5rem;font-size:.875rem;color:var(--text-primary);cursor:pointer}.gbt-switch:before{content:\"\";position:absolute;inset:50% auto auto 50%;width:max(100%,24px);height:max(100%,24px);transform:translate(-50%,-50%)}.gbt-switch--disabled{cursor:not-allowed;opacity:.5}.gbt-switch__input{position:absolute;width:2.25rem;height:1.25rem;margin:0;opacity:0;cursor:inherit}.gbt-switch__track{position:relative;display:inline-flex;flex-shrink:0;align-items:center;width:2.25rem;height:1.25rem;background:var(--border-color);border-radius:999px;transition:background .15s ease}.gbt-switch__input:checked+.gbt-switch__track{background:var(--primary)}.gbt-switch__input:focus-visible+.gbt-switch__track{outline:2px solid var(--primary);outline-offset:2px}.gbt-switch__thumb{position:absolute;top:.125rem;left:.125rem;width:1rem;height:1rem;background:var(--bg-principal);border-radius:50%;box-shadow:var(--site-shadow-sm);transition:transform .15s ease}.gbt-switch__input:checked~.gbt-switch__track .gbt-switch__thumb{transform:translate(1rem)}@media(prefers-reduced-motion:reduce){.gbt-switch__track,.gbt-switch__thumb{transition:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2753
|
+
}
|
|
2754
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: Switch, decorators: [{
|
|
2755
|
+
type: Component,
|
|
2756
|
+
args: [{ selector: 'gbt-switch', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
2757
|
+
{
|
|
2758
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2759
|
+
useExisting: forwardRef(() => Switch),
|
|
2760
|
+
multi: true,
|
|
2761
|
+
},
|
|
2762
|
+
], template: "<label class=\"gbt-switch\" [class.gbt-switch--disabled]=\"isDisabled()\">\n <input\n type=\"checkbox\"\n role=\"switch\"\n class=\"gbt-switch__input\"\n [id]=\"id()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n (change)=\"onToggle($event)\"\n />\n <span class=\"gbt-switch__track\">\n <span class=\"gbt-switch__thumb\"></span>\n </span>\n <span>{{ label() }}</span>\n</label>\n", styles: [".gbt-switch{position:relative;display:inline-flex;align-items:center;gap:.5rem;font-size:.875rem;color:var(--text-primary);cursor:pointer}.gbt-switch:before{content:\"\";position:absolute;inset:50% auto auto 50%;width:max(100%,24px);height:max(100%,24px);transform:translate(-50%,-50%)}.gbt-switch--disabled{cursor:not-allowed;opacity:.5}.gbt-switch__input{position:absolute;width:2.25rem;height:1.25rem;margin:0;opacity:0;cursor:inherit}.gbt-switch__track{position:relative;display:inline-flex;flex-shrink:0;align-items:center;width:2.25rem;height:1.25rem;background:var(--border-color);border-radius:999px;transition:background .15s ease}.gbt-switch__input:checked+.gbt-switch__track{background:var(--primary)}.gbt-switch__input:focus-visible+.gbt-switch__track{outline:2px solid var(--primary);outline-offset:2px}.gbt-switch__thumb{position:absolute;top:.125rem;left:.125rem;width:1rem;height:1rem;background:var(--bg-principal);border-radius:50%;box-shadow:var(--site-shadow-sm);transition:transform .15s ease}.gbt-switch__input:checked~.gbt-switch__track .gbt-switch__thumb{transform:translate(1rem)}@media(prefers-reduced-motion:reduce){.gbt-switch__track,.gbt-switch__thumb{transition:none}}\n"] }]
|
|
2763
|
+
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
2764
|
+
|
|
2765
|
+
let nextId = 0;
|
|
2766
|
+
class Textarea {
|
|
2767
|
+
id = input(`gbt-textarea-${++nextId}`, /* @ts-ignore */
|
|
2768
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
2769
|
+
label = input('', /* @ts-ignore */
|
|
2770
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
2771
|
+
required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2772
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2773
|
+
placeholder = input('', /* @ts-ignore */
|
|
2774
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
2775
|
+
errorMessage = input(null, /* @ts-ignore */
|
|
2776
|
+
...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
2777
|
+
rows = input(3, /* @ts-ignore */
|
|
2778
|
+
...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
2779
|
+
committed = output();
|
|
2780
|
+
value = signal('', /* @ts-ignore */
|
|
2781
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2782
|
+
formDisabled = signal(false, /* @ts-ignore */
|
|
2783
|
+
...(ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []));
|
|
2784
|
+
isDisabled = computed(() => this.disabled() || this.formDisabled(), /* @ts-ignore */
|
|
2785
|
+
...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
2786
|
+
onChange = () => { };
|
|
2787
|
+
onTouched = () => { };
|
|
2788
|
+
writeValue(value) {
|
|
2789
|
+
this.value.set(value ?? '');
|
|
2790
|
+
}
|
|
2791
|
+
registerOnChange(fn) {
|
|
2792
|
+
this.onChange = fn;
|
|
2793
|
+
}
|
|
2794
|
+
registerOnTouched(fn) {
|
|
2795
|
+
this.onTouched = fn;
|
|
2796
|
+
}
|
|
2797
|
+
setDisabledState(isDisabled) {
|
|
2798
|
+
this.formDisabled.set(isDisabled);
|
|
2799
|
+
}
|
|
2800
|
+
onInput(event) {
|
|
2801
|
+
const value = event.target.value;
|
|
2802
|
+
this.value.set(value);
|
|
2803
|
+
this.onChange(value);
|
|
2804
|
+
}
|
|
2805
|
+
onBlur() {
|
|
2806
|
+
this.onTouched();
|
|
2807
|
+
this.committed.emit(this.value());
|
|
2808
|
+
}
|
|
2809
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: Textarea, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2810
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: Textarea, isStandalone: true, selector: "gbt-textarea", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { committed: "committed" }, providers: [
|
|
2811
|
+
{
|
|
2812
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2813
|
+
useExisting: forwardRef(() => Textarea),
|
|
2814
|
+
multi: true,
|
|
2815
|
+
},
|
|
2816
|
+
], ngImport: i0, template: "<div class=\"gbt-textarea\">\n @if (label()) {\n <label [for]=\"id()\">{{ label() }}{{ required() ? ' *' : '' }}</label>\n }\n <textarea\n [id]=\"id()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [disabled]=\"isDisabled()\"\n [rows]=\"rows()\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"errorMessage() ? id() + '-error' : null\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n >{{ value() }}</textarea\n >\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-textarea__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n", styles: [":host{display:block}.gbt-textarea{display:flex;flex-direction:column;gap:.375rem}.gbt-textarea label{font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-textarea textarea{box-sizing:border-box;width:100%;padding:.5rem .75rem;font-family:var(--font-family);font-size:.875rem;color:var(--text-primary);background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);resize:vertical;transition:border-color var(--site-transition-fast)}.gbt-textarea textarea:focus{outline:none;border-color:var(--primary)}.gbt-textarea textarea:focus-visible{outline:2px solid var(--primary);outline-offset:1px}.gbt-textarea textarea:disabled{background:var(--bg-panel);cursor:not-allowed;resize:none}.gbt-textarea__error{margin:0;font-size:.75rem;color:var(--color-error-text)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2817
|
+
}
|
|
2818
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: Textarea, decorators: [{
|
|
2819
|
+
type: Component,
|
|
2820
|
+
args: [{ selector: 'gbt-textarea', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
2821
|
+
{
|
|
2822
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2823
|
+
useExisting: forwardRef(() => Textarea),
|
|
2824
|
+
multi: true,
|
|
2825
|
+
},
|
|
2826
|
+
], template: "<div class=\"gbt-textarea\">\n @if (label()) {\n <label [for]=\"id()\">{{ label() }}{{ required() ? ' *' : '' }}</label>\n }\n <textarea\n [id]=\"id()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [disabled]=\"isDisabled()\"\n [rows]=\"rows()\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"errorMessage() ? id() + '-error' : null\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n >{{ value() }}</textarea\n >\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-textarea__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n", styles: [":host{display:block}.gbt-textarea{display:flex;flex-direction:column;gap:.375rem}.gbt-textarea label{font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-textarea textarea{box-sizing:border-box;width:100%;padding:.5rem .75rem;font-family:var(--font-family);font-size:.875rem;color:var(--text-primary);background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);resize:vertical;transition:border-color var(--site-transition-fast)}.gbt-textarea textarea:focus{outline:none;border-color:var(--primary)}.gbt-textarea textarea:focus-visible{outline:2px solid var(--primary);outline-offset:1px}.gbt-textarea textarea:disabled{background:var(--bg-panel);cursor:not-allowed;resize:none}.gbt-textarea__error{margin:0;font-size:.75rem;color:var(--color-error-text)}\n"] }]
|
|
2827
|
+
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], committed: [{ type: i0.Output, args: ["committed"] }] } });
|
|
2828
|
+
|
|
2829
|
+
let nextAutocompleteId = 0;
|
|
2830
|
+
class Autocomplete {
|
|
2831
|
+
elementRef = inject(ElementRef);
|
|
2832
|
+
id = input(`gbt-autocomplete-${++nextAutocompleteId}`, /* @ts-ignore */
|
|
2833
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
2834
|
+
label = input('', /* @ts-ignore */
|
|
2835
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
2836
|
+
placeholder = input('', /* @ts-ignore */
|
|
2837
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
2838
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2839
|
+
required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2840
|
+
errorMessage = input(null, /* @ts-ignore */
|
|
2841
|
+
...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
2842
|
+
search = input.required(/* @ts-ignore */
|
|
2843
|
+
...(ngDevMode ? [{ debugName: "search" }] : /* istanbul ignore next */ []));
|
|
2844
|
+
displayFn = input((item) => String(item), /* @ts-ignore */
|
|
2845
|
+
...(ngDevMode ? [{ debugName: "displayFn" }] : /* istanbul ignore next */ []));
|
|
2846
|
+
itemTemplate = input(/* @ts-ignore */
|
|
2847
|
+
...(ngDevMode ? [undefined, { debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
|
|
2848
|
+
debounceMs = input(300, /* @ts-ignore */
|
|
2849
|
+
...(ngDevMode ? [{ debugName: "debounceMs" }] : /* istanbul ignore next */ []));
|
|
2850
|
+
minLength = input(1, /* @ts-ignore */
|
|
2851
|
+
...(ngDevMode ? [{ debugName: "minLength" }] : /* istanbul ignore next */ []));
|
|
2852
|
+
loadingMessage = input('Searching…', /* @ts-ignore */
|
|
2853
|
+
...(ngDevMode ? [{ debugName: "loadingMessage" }] : /* istanbul ignore next */ []));
|
|
2854
|
+
noResultsMessage = input('No results', /* @ts-ignore */
|
|
2855
|
+
...(ngDevMode ? [{ debugName: "noResultsMessage" }] : /* istanbul ignore next */ []));
|
|
2856
|
+
searchErrorMessage = input('Search failed', /* @ts-ignore */
|
|
2857
|
+
...(ngDevMode ? [{ debugName: "searchErrorMessage" }] : /* istanbul ignore next */ []));
|
|
2858
|
+
resultsAnnouncement = input((count) => `${count} result${count !== 1 ? 's' : ''}`, /* @ts-ignore */
|
|
2859
|
+
...(ngDevMode ? [{ debugName: "resultsAnnouncement" }] : /* istanbul ignore next */ []));
|
|
2860
|
+
itemSelected = output();
|
|
2861
|
+
query = signal('', /* @ts-ignore */
|
|
2862
|
+
...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
|
|
2863
|
+
open = signal(false, /* @ts-ignore */
|
|
2864
|
+
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
2865
|
+
results = signal([], /* @ts-ignore */
|
|
2866
|
+
...(ngDevMode ? [{ debugName: "results" }] : /* istanbul ignore next */ []));
|
|
2867
|
+
loading = signal(false, /* @ts-ignore */
|
|
2868
|
+
...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
2869
|
+
searchFailed = signal(false, /* @ts-ignore */
|
|
2870
|
+
...(ngDevMode ? [{ debugName: "searchFailed" }] : /* istanbul ignore next */ []));
|
|
2871
|
+
activeIndex = signal(0, /* @ts-ignore */
|
|
2872
|
+
...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
2873
|
+
selectedItem = signal(null, /* @ts-ignore */
|
|
2874
|
+
...(ngDevMode ? [{ debugName: "selectedItem" }] : /* istanbul ignore next */ []));
|
|
2875
|
+
panelStyle = signal(null, /* @ts-ignore */
|
|
2876
|
+
...(ngDevMode ? [{ debugName: "panelStyle" }] : /* istanbul ignore next */ []));
|
|
2877
|
+
formDisabled = signal(false, /* @ts-ignore */
|
|
2878
|
+
...(ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []));
|
|
2879
|
+
isDisabled = computed(() => this.disabled() || this.formDisabled(), /* @ts-ignore */
|
|
2880
|
+
...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
2881
|
+
hasNoResults = computed(() => this.open() && !this.loading() && !this.searchFailed() && this.results().length === 0, /* @ts-ignore */
|
|
2882
|
+
...(ngDevMode ? [{ debugName: "hasNoResults" }] : /* istanbul ignore next */ []));
|
|
2883
|
+
activeOptionId = computed(() => this.open() && this.results().length > 0 ? `${this.id()}-option-${this.activeIndex()}` : null, /* @ts-ignore */
|
|
2884
|
+
...(ngDevMode ? [{ debugName: "activeOptionId" }] : /* istanbul ignore next */ []));
|
|
2885
|
+
onChange = () => { };
|
|
2886
|
+
onTouched = () => { };
|
|
2887
|
+
requestSeq = 0;
|
|
2888
|
+
debounceHandle;
|
|
2889
|
+
subscription;
|
|
2890
|
+
setDisabledState(isDisabled) {
|
|
2891
|
+
this.formDisabled.set(isDisabled);
|
|
2892
|
+
}
|
|
2893
|
+
writeValue(value) {
|
|
2894
|
+
this.selectedItem.set(value);
|
|
2895
|
+
this.query.set(value === null || value === undefined ? '' : this.displayFn()(value));
|
|
2896
|
+
}
|
|
2897
|
+
registerOnChange(fn) {
|
|
2898
|
+
this.onChange = fn;
|
|
2899
|
+
}
|
|
2900
|
+
registerOnTouched(fn) {
|
|
2901
|
+
this.onTouched = fn;
|
|
2902
|
+
}
|
|
2903
|
+
onInput(event) {
|
|
2904
|
+
const value = event.target.value;
|
|
2905
|
+
this.query.set(value);
|
|
2906
|
+
this.activeIndex.set(0);
|
|
2907
|
+
if (this.selectedItem() !== null) {
|
|
2908
|
+
this.selectedItem.set(null);
|
|
2909
|
+
this.onChange(null);
|
|
2910
|
+
}
|
|
2911
|
+
this.scheduleSearch(value);
|
|
2912
|
+
}
|
|
2913
|
+
onFocus() {
|
|
2914
|
+
if (this.query().trim().length >= this.minLength() &&
|
|
2915
|
+
(this.results().length > 0 || this.searchFailed())) {
|
|
2916
|
+
this.open.set(true);
|
|
2917
|
+
this.updatePanelPosition();
|
|
2918
|
+
}
|
|
2919
|
+
}
|
|
2920
|
+
onBlur() {
|
|
2921
|
+
this.onTouched();
|
|
2922
|
+
setTimeout(() => {
|
|
2923
|
+
if (!this.elementRef.nativeElement.contains(document.activeElement)) {
|
|
2924
|
+
this.open.set(false);
|
|
2925
|
+
}
|
|
2926
|
+
}, 200);
|
|
2927
|
+
}
|
|
2928
|
+
scheduleSearch(value) {
|
|
2929
|
+
clearTimeout(this.debounceHandle);
|
|
2930
|
+
if (value.trim().length < this.minLength()) {
|
|
2931
|
+
this.requestSeq++;
|
|
2932
|
+
this.subscription?.unsubscribe();
|
|
2933
|
+
this.open.set(false);
|
|
2934
|
+
this.results.set([]);
|
|
2935
|
+
this.loading.set(false);
|
|
2936
|
+
this.searchFailed.set(false);
|
|
2937
|
+
return;
|
|
2938
|
+
}
|
|
2939
|
+
this.debounceHandle = setTimeout(() => this.runSearch(value), this.debounceMs());
|
|
2940
|
+
}
|
|
2941
|
+
runSearch(query) {
|
|
2942
|
+
const seq = ++this.requestSeq;
|
|
2943
|
+
this.subscription?.unsubscribe();
|
|
2944
|
+
this.loading.set(true);
|
|
2945
|
+
this.searchFailed.set(false);
|
|
2946
|
+
this.open.set(true);
|
|
2947
|
+
this.updatePanelPosition();
|
|
2948
|
+
const applyResults = (items) => {
|
|
2949
|
+
if (seq !== this.requestSeq)
|
|
2950
|
+
return;
|
|
2951
|
+
this.results.set(items);
|
|
2952
|
+
this.loading.set(false);
|
|
2953
|
+
this.activeIndex.set(0);
|
|
2954
|
+
this.updatePanelPosition();
|
|
2955
|
+
};
|
|
2956
|
+
const applyError = () => {
|
|
2957
|
+
if (seq !== this.requestSeq)
|
|
2958
|
+
return;
|
|
2959
|
+
this.results.set([]);
|
|
2960
|
+
this.loading.set(false);
|
|
2961
|
+
this.searchFailed.set(true);
|
|
2962
|
+
this.updatePanelPosition();
|
|
2963
|
+
};
|
|
2964
|
+
const result = this.search()(query);
|
|
2965
|
+
if (isObservable(result)) {
|
|
2966
|
+
this.subscription = result.subscribe({ next: applyResults, error: applyError });
|
|
2967
|
+
}
|
|
2968
|
+
else {
|
|
2969
|
+
result.then(applyResults, applyError);
|
|
2970
|
+
}
|
|
2971
|
+
}
|
|
2972
|
+
updatePanelPosition() {
|
|
2973
|
+
if (!this.open()) {
|
|
2974
|
+
return;
|
|
2975
|
+
}
|
|
2976
|
+
const trigger = this.elementRef.nativeElement.querySelector('.gbt-autocomplete__input');
|
|
2977
|
+
if (!trigger) {
|
|
2978
|
+
return;
|
|
2979
|
+
}
|
|
2980
|
+
const rect = trigger.getBoundingClientRect();
|
|
2981
|
+
this.panelStyle.set({
|
|
2982
|
+
top: `${rect.bottom + 6}px`,
|
|
2983
|
+
left: `${rect.left}px`,
|
|
2984
|
+
width: `${rect.width}px`,
|
|
2985
|
+
});
|
|
2986
|
+
}
|
|
2987
|
+
selectOption(item) {
|
|
2988
|
+
this.selectedItem.set(item);
|
|
2989
|
+
this.query.set(this.displayFn()(item));
|
|
2990
|
+
this.results.set([]);
|
|
2991
|
+
this.open.set(false);
|
|
2992
|
+
this.onChange(item);
|
|
2993
|
+
this.onTouched();
|
|
2994
|
+
this.itemSelected.emit(item);
|
|
2995
|
+
}
|
|
2996
|
+
onKeydown(event) {
|
|
2997
|
+
if (this.isDisabled()) {
|
|
2998
|
+
return;
|
|
2999
|
+
}
|
|
3000
|
+
if (event.key === 'Escape') {
|
|
3001
|
+
if (this.open()) {
|
|
3002
|
+
event.preventDefault();
|
|
3003
|
+
event.stopPropagation();
|
|
3004
|
+
this.open.set(false);
|
|
3005
|
+
}
|
|
3006
|
+
return;
|
|
3007
|
+
}
|
|
3008
|
+
if (!this.open() || this.results().length === 0) {
|
|
3009
|
+
return;
|
|
3010
|
+
}
|
|
3011
|
+
const results = this.results();
|
|
3012
|
+
switch (event.key) {
|
|
3013
|
+
case 'ArrowDown':
|
|
3014
|
+
event.preventDefault();
|
|
3015
|
+
this.activeIndex.update((i) => Math.min(i + 1, results.length - 1));
|
|
3016
|
+
break;
|
|
3017
|
+
case 'ArrowUp':
|
|
3018
|
+
event.preventDefault();
|
|
3019
|
+
this.activeIndex.update((i) => Math.max(i - 1, 0));
|
|
3020
|
+
break;
|
|
3021
|
+
case 'Enter': {
|
|
3022
|
+
event.preventDefault();
|
|
3023
|
+
const active = results[this.activeIndex()];
|
|
3024
|
+
if (active) {
|
|
3025
|
+
this.selectOption(active);
|
|
3026
|
+
}
|
|
3027
|
+
break;
|
|
3028
|
+
}
|
|
3029
|
+
}
|
|
3030
|
+
}
|
|
3031
|
+
ngOnDestroy() {
|
|
3032
|
+
clearTimeout(this.debounceHandle);
|
|
3033
|
+
this.subscription?.unsubscribe();
|
|
3034
|
+
}
|
|
3035
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: Autocomplete, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3036
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: Autocomplete, isStandalone: true, selector: "gbt-autocomplete", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, search: { classPropertyName: "search", publicName: "search", isSignal: true, isRequired: true, transformFunction: null }, displayFn: { classPropertyName: "displayFn", publicName: "displayFn", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, loadingMessage: { classPropertyName: "loadingMessage", publicName: "loadingMessage", isSignal: true, isRequired: false, transformFunction: null }, noResultsMessage: { classPropertyName: "noResultsMessage", publicName: "noResultsMessage", isSignal: true, isRequired: false, transformFunction: null }, searchErrorMessage: { classPropertyName: "searchErrorMessage", publicName: "searchErrorMessage", isSignal: true, isRequired: false, transformFunction: null }, resultsAnnouncement: { classPropertyName: "resultsAnnouncement", publicName: "resultsAnnouncement", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemSelected: "itemSelected" }, host: { listeners: { "window:scroll": "updatePanelPosition()", "window:resize": "updatePanelPosition()" } }, providers: [
|
|
3037
|
+
{
|
|
3038
|
+
provide: NG_VALUE_ACCESSOR,
|
|
3039
|
+
useExisting: forwardRef(() => Autocomplete),
|
|
3040
|
+
multi: true,
|
|
3041
|
+
},
|
|
3042
|
+
], ngImport: i0, template: "<div class=\"gbt-autocomplete\" [class.gbt-autocomplete--disabled]=\"isDisabled()\">\n @if (label()) {\n <label [for]=\"id()\" class=\"gbt-autocomplete__label\"\n >{{ label() }}{{ required() ? ' *' : '' }}</label\n >\n }\n\n <input\n [id]=\"id()\"\n type=\"text\"\n class=\"gbt-autocomplete__input\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"open() ? id() + '-listbox' : null\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n [attr.aria-required]=\"required() ? true : null\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"errorMessage() ? id() + '-error' : null\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"isDisabled()\"\n [value]=\"query()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeydown($event)\"\n />\n\n @if (open()) {\n <div role=\"status\" aria-live=\"polite\" aria-atomic=\"true\" class=\"sr-only\">\n @if (loading()) {\n {{ loadingMessage() }}\n } @else if (searchFailed()) {\n {{ searchErrorMessage() }}\n } @else {\n {{ resultsAnnouncement()(results().length) }}\n }\n </div>\n }\n\n @if (open() && panelStyle(); as style) {\n <div\n class=\"gbt-autocomplete__panel\"\n [style.top]=\"style.top\"\n [style.left]=\"style.left\"\n [style.width]=\"style.width\"\n (mousedown)=\"$event.preventDefault()\"\n >\n @if (loading()) {\n <div class=\"gbt-autocomplete__state\" role=\"status\">\n <span>{{ loadingMessage() }}</span>\n </div>\n } @else if (searchFailed()) {\n <div class=\"gbt-autocomplete__state gbt-autocomplete__state--error\" role=\"alert\">\n <span>{{ searchErrorMessage() }}</span>\n </div>\n } @else if (hasNoResults()) {\n <div class=\"gbt-autocomplete__state\" role=\"status\">\n <span>{{ noResultsMessage() }}</span>\n </div>\n } @else {\n <ul\n [id]=\"id() + '-listbox'\"\n class=\"gbt-autocomplete__list\"\n role=\"listbox\"\n [attr.aria-label]=\"label() || placeholder()\"\n >\n @for (item of results(); track $index; let i = $index) {\n <li role=\"presentation\">\n <button\n [id]=\"id() + '-option-' + i\"\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"gbt-autocomplete__option\"\n [class.gbt-autocomplete__option--active]=\"i === activeIndex()\"\n [attr.aria-selected]=\"i === activeIndex()\"\n (click)=\"selectOption(item)\"\n (mouseenter)=\"activeIndex.set(i)\"\n >\n @if (itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n } @else {\n <span class=\"gbt-autocomplete__option-label\">{{ displayFn()(item) }}</span>\n }\n </button>\n </li>\n }\n </ul>\n }\n </div>\n }\n\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-autocomplete__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n", styles: [":host{display:block}.gbt-autocomplete{position:relative;display:flex;flex-direction:column;gap:.375rem}.gbt-autocomplete--disabled{opacity:.5}.gbt-autocomplete__label{font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-autocomplete__input{box-sizing:border-box;width:100%;padding:.5rem .75rem;font-family:var(--font-family);font-size:.875rem;color:var(--text-primary);background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);transition:border-color var(--site-transition-fast)}.gbt-autocomplete__input:focus{outline:none;border-color:var(--primary)}.gbt-autocomplete__input:focus-visible{outline:2px solid var(--primary);outline-offset:1px}.gbt-autocomplete__input:disabled{background:var(--bg-panel);cursor:not-allowed}.gbt-autocomplete__panel{box-sizing:border-box;position:fixed;z-index:1000;margin:0;padding:6px;max-height:280px;overflow-y:auto;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);box-shadow:var(--site-shadow-lg);animation:gbt-autocomplete-scale-in .15s cubic-bezier(.34,1.56,.64,1) both}.gbt-autocomplete__panel::-webkit-scrollbar{width:6px}.gbt-autocomplete__panel::-webkit-scrollbar-track{background:transparent}.gbt-autocomplete__panel::-webkit-scrollbar-thumb{background:var(--bg-hover);border-radius:3px}.gbt-autocomplete__list{margin:0;padding:0;list-style:none}.gbt-autocomplete__option{box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;padding:8px 10px;background:transparent;border:none;border-radius:8px;color:var(--text-primary);font-size:14px;text-align:left;cursor:pointer;transition:background .12s cubic-bezier(.4,0,.2,1)}.gbt-autocomplete__option:hover,.gbt-autocomplete__option--active{background:var(--bg-hover)}.gbt-autocomplete__option-label{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gbt-autocomplete__state{padding:.75rem;font-size:.8125rem;color:var(--text-secondary);text-align:center}.gbt-autocomplete__state--error{color:var(--color-error-text)}@keyframes gbt-autocomplete-scale-in{0%{opacity:0;transform:scale(.97) translateY(-4px)}to{opacity:1;transform:scale(1) translateY(0)}}.gbt-autocomplete__error{margin:0;font-size:.75rem;color:var(--color-error-text)}@media(prefers-reduced-motion:reduce){.gbt-autocomplete__panel{animation:none}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3043
|
+
}
|
|
3044
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: Autocomplete, decorators: [{
|
|
3045
|
+
type: Component,
|
|
3046
|
+
args: [{ selector: 'gbt-autocomplete', standalone: true, imports: [NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
3047
|
+
'(window:scroll)': 'updatePanelPosition()',
|
|
3048
|
+
'(window:resize)': 'updatePanelPosition()',
|
|
3049
|
+
}, providers: [
|
|
3050
|
+
{
|
|
3051
|
+
provide: NG_VALUE_ACCESSOR,
|
|
3052
|
+
useExisting: forwardRef(() => Autocomplete),
|
|
3053
|
+
multi: true,
|
|
3054
|
+
},
|
|
3055
|
+
], template: "<div class=\"gbt-autocomplete\" [class.gbt-autocomplete--disabled]=\"isDisabled()\">\n @if (label()) {\n <label [for]=\"id()\" class=\"gbt-autocomplete__label\"\n >{{ label() }}{{ required() ? ' *' : '' }}</label\n >\n }\n\n <input\n [id]=\"id()\"\n type=\"text\"\n class=\"gbt-autocomplete__input\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"open() ? id() + '-listbox' : null\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n [attr.aria-required]=\"required() ? true : null\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n [attr.aria-describedby]=\"errorMessage() ? id() + '-error' : null\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"isDisabled()\"\n [value]=\"query()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeydown($event)\"\n />\n\n @if (open()) {\n <div role=\"status\" aria-live=\"polite\" aria-atomic=\"true\" class=\"sr-only\">\n @if (loading()) {\n {{ loadingMessage() }}\n } @else if (searchFailed()) {\n {{ searchErrorMessage() }}\n } @else {\n {{ resultsAnnouncement()(results().length) }}\n }\n </div>\n }\n\n @if (open() && panelStyle(); as style) {\n <div\n class=\"gbt-autocomplete__panel\"\n [style.top]=\"style.top\"\n [style.left]=\"style.left\"\n [style.width]=\"style.width\"\n (mousedown)=\"$event.preventDefault()\"\n >\n @if (loading()) {\n <div class=\"gbt-autocomplete__state\" role=\"status\">\n <span>{{ loadingMessage() }}</span>\n </div>\n } @else if (searchFailed()) {\n <div class=\"gbt-autocomplete__state gbt-autocomplete__state--error\" role=\"alert\">\n <span>{{ searchErrorMessage() }}</span>\n </div>\n } @else if (hasNoResults()) {\n <div class=\"gbt-autocomplete__state\" role=\"status\">\n <span>{{ noResultsMessage() }}</span>\n </div>\n } @else {\n <ul\n [id]=\"id() + '-listbox'\"\n class=\"gbt-autocomplete__list\"\n role=\"listbox\"\n [attr.aria-label]=\"label() || placeholder()\"\n >\n @for (item of results(); track $index; let i = $index) {\n <li role=\"presentation\">\n <button\n [id]=\"id() + '-option-' + i\"\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"gbt-autocomplete__option\"\n [class.gbt-autocomplete__option--active]=\"i === activeIndex()\"\n [attr.aria-selected]=\"i === activeIndex()\"\n (click)=\"selectOption(item)\"\n (mouseenter)=\"activeIndex.set(i)\"\n >\n @if (itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n } @else {\n <span class=\"gbt-autocomplete__option-label\">{{ displayFn()(item) }}</span>\n }\n </button>\n </li>\n }\n </ul>\n }\n </div>\n }\n\n @if (errorMessage()) {\n <p [id]=\"id() + '-error'\" class=\"gbt-autocomplete__error\" role=\"alert\">{{ errorMessage() }}</p>\n }\n</div>\n", styles: [":host{display:block}.gbt-autocomplete{position:relative;display:flex;flex-direction:column;gap:.375rem}.gbt-autocomplete--disabled{opacity:.5}.gbt-autocomplete__label{font-size:.8125rem;font-weight:600;color:var(--text-secondary)}.gbt-autocomplete__input{box-sizing:border-box;width:100%;padding:.5rem .75rem;font-family:var(--font-family);font-size:.875rem;color:var(--text-primary);background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);transition:border-color var(--site-transition-fast)}.gbt-autocomplete__input:focus{outline:none;border-color:var(--primary)}.gbt-autocomplete__input:focus-visible{outline:2px solid var(--primary);outline-offset:1px}.gbt-autocomplete__input:disabled{background:var(--bg-panel);cursor:not-allowed}.gbt-autocomplete__panel{box-sizing:border-box;position:fixed;z-index:1000;margin:0;padding:6px;max-height:280px;overflow-y:auto;background:var(--bg-principal);border:1px solid var(--border-color);border-radius:var(--site-border-radius-sm);box-shadow:var(--site-shadow-lg);animation:gbt-autocomplete-scale-in .15s cubic-bezier(.34,1.56,.64,1) both}.gbt-autocomplete__panel::-webkit-scrollbar{width:6px}.gbt-autocomplete__panel::-webkit-scrollbar-track{background:transparent}.gbt-autocomplete__panel::-webkit-scrollbar-thumb{background:var(--bg-hover);border-radius:3px}.gbt-autocomplete__list{margin:0;padding:0;list-style:none}.gbt-autocomplete__option{box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;padding:8px 10px;background:transparent;border:none;border-radius:8px;color:var(--text-primary);font-size:14px;text-align:left;cursor:pointer;transition:background .12s cubic-bezier(.4,0,.2,1)}.gbt-autocomplete__option:hover,.gbt-autocomplete__option--active{background:var(--bg-hover)}.gbt-autocomplete__option-label{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gbt-autocomplete__state{padding:.75rem;font-size:.8125rem;color:var(--text-secondary);text-align:center}.gbt-autocomplete__state--error{color:var(--color-error-text)}@keyframes gbt-autocomplete-scale-in{0%{opacity:0;transform:scale(.97) translateY(-4px)}to{opacity:1;transform:scale(1) translateY(0)}}.gbt-autocomplete__error{margin:0;font-size:.75rem;color:var(--color-error-text)}@media(prefers-reduced-motion:reduce){.gbt-autocomplete__panel{animation:none}}\n"] }]
|
|
3056
|
+
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], 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 }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], search: [{ type: i0.Input, args: [{ isSignal: true, alias: "search", required: true }] }], displayFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayFn", required: false }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], debounceMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceMs", required: false }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }], loadingMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingMessage", required: false }] }], noResultsMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "noResultsMessage", required: false }] }], searchErrorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchErrorMessage", required: false }] }], resultsAnnouncement: [{ type: i0.Input, args: [{ isSignal: true, alias: "resultsAnnouncement", required: false }] }], itemSelected: [{ type: i0.Output, args: ["itemSelected"] }] } });
|
|
3057
|
+
|
|
2564
3058
|
/**
|
|
2565
3059
|
* Generated bundle index. Do not edit.
|
|
2566
3060
|
*/
|
|
2567
3061
|
|
|
2568
|
-
export { AppShell, BarChart, BarSeries, Button, CHART_CONTEXT, Card, ChartAxis, ChartEmpty, ChartFrame, ChartLegend, ChartTable, ChartTooltip, Checkbox, DimensionCard, FunnelChart, GABARIT_VERSION, GaugeBar, GbtInput, Icon, IconRegistry, LineChart, LineSeries, Menu, Modal, SearchBar, Select, Sparkline, Tab, Table, Tabs, TimelineChart, TimelineSeries, Toaster, Tooltip, areaPath, bandScale, formatCompact, formatDuration, formatNumber, formatPercent, linePath, linearScale, nearestIndex, niceTicks, niceXDomain, niceYDomain, timeScale, timeTicks };
|
|
3062
|
+
export { AppShell, Autocomplete, BarChart, BarSeries, Breadcrumb, Button, CHART_CONTEXT, Card, ChartAxis, ChartEmpty, ChartFrame, ChartLegend, ChartTable, ChartTooltip, Checkbox, ConfirmDangerModal, DimensionCard, FunnelChart, GABARIT_VERSION, GaugeBar, GbtInput, Icon, IconRegistry, LineChart, LineSeries, Menu, Modal, RadioGroup, SearchBar, Select, Sparkline, Switch, Tab, Table, Tabs, Textarea, TimelineChart, TimelineSeries, Toaster, Tooltip, areaPath, bandScale, formatCompact, formatDuration, formatNumber, formatPercent, linePath, linearScale, nearestIndex, niceTicks, niceXDomain, niceYDomain, timeScale, timeTicks };
|
|
2569
3063
|
//# sourceMappingURL=masmarino-gabarit.mjs.map
|