ngx-strata 0.2.4 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/styles/components/avatar.scss +18 -5
- package/assets/styles/components/button.scss +9 -9
- package/assets/styles/components/divider.scss +5 -3
- package/assets/styles/components/item.scss +1 -0
- package/assets/styles/components/notification.scss +1 -1
- package/assets/styles/components/select.scss +7 -1
- package/assets/styles/components/sidemenu.scss +56 -2
- package/assets/styles/semantics/color-semantic.scss +38 -0
- package/dist/strata/strata.css +1 -1
- package/fesm2022/ngx-strata-src-lib-testing.mjs +33 -0
- package/fesm2022/ngx-strata-src-lib-testing.mjs.map +1 -0
- package/fesm2022/ngx-strata.mjs +208 -135
- package/fesm2022/ngx-strata.mjs.map +1 -1
- package/package.json +5 -1
- package/skills/ngx-strata/SKILL.md +1 -0
- package/skills/ngx-strata/components/action-menu.md +14 -3
- package/skills/ngx-strata/components/checkbox.md +3 -1
- package/skills/ngx-strata/components/item.md +4 -3
- package/skills/ngx-strata/components/sidemenu.md +27 -6
- package/skills/ngx-strata/components/testing.md +33 -0
- package/skills/ngx-strata/components/toggle.md +4 -1
- package/types/ngx-strata-src-lib-testing.d.ts +21 -0
- package/types/ngx-strata.d.ts +34 -21
package/fesm2022/ngx-strata.mjs
CHANGED
|
@@ -1,48 +1,15 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject,
|
|
3
|
-
import { computePosition, offset, arrow, autoUpdate, flip, shift, size } from '@floating-ui/dom';
|
|
2
|
+
import { inject, Injectable, provideAppInitializer, makeEnvironmentProviders, DOCUMENT, signal, computed, effect, InjectionToken, provideEnvironmentInitializer, ElementRef, input, model, output, Directive, Renderer2, Input, DestroyRef, HostListener, Component, contentChild, HostBinding, ViewContainerRef, viewChild, contentChildren, TemplateRef, Pipe, booleanAttribute, ContentChildren, Injector, LOCALE_ID } from '@angular/core';
|
|
4
3
|
import { Observable, tap, map, fromEvent, switchMap, filter } from 'rxjs';
|
|
5
4
|
import { HttpClient } from '@angular/common/http';
|
|
6
5
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
6
|
+
import { computePosition, offset, arrow, autoUpdate, flip, shift, size } from '@floating-ui/dom';
|
|
7
7
|
import { takeUntilDestroyed, toSignal, toObservable } from '@angular/core/rxjs-interop';
|
|
8
8
|
import * as i1 from '@angular/common';
|
|
9
9
|
import { CommonModule, NgTemplateOutlet, DecimalPipe, DOCUMENT as DOCUMENT$1, formatNumber, getLocaleNumberSymbol, NumberSymbol } from '@angular/common';
|
|
10
10
|
import * as i1$1 from '@angular/forms';
|
|
11
11
|
import { FormsModule } from '@angular/forms';
|
|
12
|
-
import { Router, NavigationEnd, RouterLinkActive } from '@angular/router';
|
|
13
|
-
|
|
14
|
-
class StrataActivatableDirective {
|
|
15
|
-
_elementRef = inject(ElementRef);
|
|
16
|
-
disabled = input(false, /* @ts-ignore */
|
|
17
|
-
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
18
|
-
interactable = model(true, /* @ts-ignore */
|
|
19
|
-
...(ngDevMode ? [{ debugName: "interactable" }] : /* istanbul ignore next */ []));
|
|
20
|
-
activated = output();
|
|
21
|
-
isFocusable = computed(() => this.interactable() && !this.disabled(), /* @ts-ignore */
|
|
22
|
-
...(ngDevMode ? [{ debugName: "isFocusable" }] : /* istanbul ignore next */ []));
|
|
23
|
-
onKeyDown(event) {
|
|
24
|
-
if (!this.isFocusable()) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
if (event.key === ' ' || event.key === 'Enter') {
|
|
28
|
-
event.preventDefault();
|
|
29
|
-
this.activated.emit(event);
|
|
30
|
-
this._elementRef.nativeElement.click();
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataActivatableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
34
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.1", type: StrataActivatableDirective, isStandalone: true, selector: "[stActivatable]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, interactable: { classPropertyName: "interactable", publicName: "interactable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { interactable: "interactableChange", activated: "activated" }, host: { listeners: { "keydown": "onKeyDown($event)" }, properties: { "attr.tabindex": "isFocusable() ? \"0\" : null" } }, ngImport: i0 });
|
|
35
|
-
}
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataActivatableDirective, decorators: [{
|
|
37
|
-
type: Directive,
|
|
38
|
-
args: [{
|
|
39
|
-
selector: '[stActivatable]',
|
|
40
|
-
host: {
|
|
41
|
-
'(keydown)': 'onKeyDown($event)',
|
|
42
|
-
'[attr.tabindex]': 'isFocusable() ? "0" : null'
|
|
43
|
-
}
|
|
44
|
-
}]
|
|
45
|
-
}], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], interactable: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactable", required: false }] }, { type: i0.Output, args: ["interactableChange"] }], activated: [{ type: i0.Output, args: ["activated"] }] } });
|
|
12
|
+
import { Router, NavigationEnd, RouterLink, RouterLinkActive } from '@angular/router';
|
|
46
13
|
|
|
47
14
|
class IconLoader {
|
|
48
15
|
}
|
|
@@ -252,7 +219,8 @@ const DEFAULT_CONFIG = {
|
|
|
252
219
|
shift: 'Shift',
|
|
253
220
|
alt: 'Alt'
|
|
254
221
|
},
|
|
255
|
-
overlayViewportBuffer: 16
|
|
222
|
+
overlayViewportBuffer: 16,
|
|
223
|
+
activationKeys: [' ', 'Space', 'Spacebar', 'Enter', 'NumpadEnter']
|
|
256
224
|
};
|
|
257
225
|
function provideStrata(config = {}) {
|
|
258
226
|
const mergedConfig = {
|
|
@@ -276,6 +244,43 @@ function provideStrata(config = {}) {
|
|
|
276
244
|
}
|
|
277
245
|
const STRATA_CONFIG = new InjectionToken('STRATA_CONFIG');
|
|
278
246
|
|
|
247
|
+
const DEFAULT_ACTIVATION_KEYS = [' ', 'Space', 'Spacebar', 'Enter', 'NumpadEnter'];
|
|
248
|
+
class StrataActivatableDirective {
|
|
249
|
+
_elementRef = inject(ElementRef);
|
|
250
|
+
_config = inject(STRATA_CONFIG, { optional: true });
|
|
251
|
+
disabled = input(false, /* @ts-ignore */
|
|
252
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
253
|
+
interactable = model(true, /* @ts-ignore */
|
|
254
|
+
...(ngDevMode ? [{ debugName: "interactable" }] : /* istanbul ignore next */ []));
|
|
255
|
+
activated = output();
|
|
256
|
+
isFocusable = computed(() => this.interactable() && !this.disabled(), /* @ts-ignore */
|
|
257
|
+
...(ngDevMode ? [{ debugName: "isFocusable" }] : /* istanbul ignore next */ []));
|
|
258
|
+
onKeyDown(event) {
|
|
259
|
+
if (!this.isFocusable()) {
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
const activationKeys = this._config?.activationKeys ?? DEFAULT_ACTIVATION_KEYS;
|
|
263
|
+
const isActivationKey = activationKeys.includes(event.key) || activationKeys.includes(event.code);
|
|
264
|
+
if (isActivationKey) {
|
|
265
|
+
event.preventDefault();
|
|
266
|
+
this.activated.emit(event);
|
|
267
|
+
this._elementRef.nativeElement.click();
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataActivatableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
271
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.1", type: StrataActivatableDirective, isStandalone: true, selector: "[stActivatable]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, interactable: { classPropertyName: "interactable", publicName: "interactable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { interactable: "interactableChange", activated: "activated" }, host: { listeners: { "keydown": "onKeyDown($event)" }, properties: { "attr.tabindex": "isFocusable() ? \"0\" : null" } }, ngImport: i0 });
|
|
272
|
+
}
|
|
273
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataActivatableDirective, decorators: [{
|
|
274
|
+
type: Directive,
|
|
275
|
+
args: [{
|
|
276
|
+
selector: '[stActivatable]',
|
|
277
|
+
host: {
|
|
278
|
+
'(keydown)': 'onKeyDown($event)',
|
|
279
|
+
'[attr.tabindex]': 'isFocusable() ? "0" : null'
|
|
280
|
+
}
|
|
281
|
+
}]
|
|
282
|
+
}], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], interactable: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactable", required: false }] }, { type: i0.Output, args: ["interactableChange"] }], activated: [{ type: i0.Output, args: ["activated"] }] } });
|
|
283
|
+
|
|
279
284
|
class StrataTooltipDirective {
|
|
280
285
|
document = inject(DOCUMENT);
|
|
281
286
|
element = inject(ElementRef);
|
|
@@ -585,6 +590,7 @@ class StrataButtonDirective {
|
|
|
585
590
|
...(ngDevMode ? [{ debugName: "iconAtEnd" }] : /* istanbul ignore next */ []));
|
|
586
591
|
iconOnly = signal(false, /* @ts-ignore */
|
|
587
592
|
...(ngDevMode ? [{ debugName: "iconOnly" }] : /* istanbul ignore next */ []));
|
|
593
|
+
observer;
|
|
588
594
|
get classes() {
|
|
589
595
|
return [
|
|
590
596
|
'st-button',
|
|
@@ -597,14 +603,39 @@ class StrataButtonDirective {
|
|
|
597
603
|
];
|
|
598
604
|
}
|
|
599
605
|
ngAfterContentInit() {
|
|
600
|
-
|
|
601
|
-
if (
|
|
606
|
+
this.updateIconState();
|
|
607
|
+
if (typeof MutationObserver !== 'undefined') {
|
|
608
|
+
this.observer = new MutationObserver(() => this.updateIconState());
|
|
609
|
+
this.observer.observe(this.host.nativeElement, { childList: true, subtree: true, characterData: true });
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
ngOnDestroy() {
|
|
613
|
+
this.observer?.disconnect();
|
|
614
|
+
}
|
|
615
|
+
updateIconState() {
|
|
616
|
+
const rawNodes = Array.from(this.host.nativeElement.childNodes);
|
|
617
|
+
const nodes = rawNodes.filter((node) => {
|
|
618
|
+
if (node.nodeType === Node.COMMENT_NODE) {
|
|
619
|
+
return false;
|
|
620
|
+
}
|
|
621
|
+
if (node.nodeType === Node.TEXT_NODE && !node.textContent?.trim()) {
|
|
622
|
+
return false;
|
|
623
|
+
}
|
|
624
|
+
return true;
|
|
625
|
+
});
|
|
626
|
+
if (nodes.length === 0) {
|
|
627
|
+
this.iconOnly.set(false);
|
|
628
|
+
this.iconAtStart.set(false);
|
|
629
|
+
this.iconAtEnd.set(false);
|
|
602
630
|
return;
|
|
603
631
|
}
|
|
604
632
|
if (nodes.length === 1 && this.nodeIsStIcon(nodes[0])) {
|
|
605
633
|
this.iconOnly.set(true);
|
|
634
|
+
this.iconAtStart.set(false);
|
|
635
|
+
this.iconAtEnd.set(false);
|
|
606
636
|
return;
|
|
607
637
|
}
|
|
638
|
+
this.iconOnly.set(false);
|
|
608
639
|
this.iconAtStart.set(this.nodeIsStIcon(nodes[0]));
|
|
609
640
|
this.iconAtEnd.set(this.nodeIsStIcon(nodes[nodes.length - 1]));
|
|
610
641
|
}
|
|
@@ -820,6 +851,9 @@ class StrataActionMenuComponent {
|
|
|
820
851
|
...(ngDevMode ? [{ debugName: "actionMenuItems" }] : /* istanbul ignore next */ []));
|
|
821
852
|
placement = input('bottom-end', /* @ts-ignore */
|
|
822
853
|
...(ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []));
|
|
854
|
+
closeOnOutsideClick = input(true, /* @ts-ignore */
|
|
855
|
+
...(ngDevMode ? [{ debugName: "closeOnOutsideClick" }] : /* istanbul ignore next */ []));
|
|
856
|
+
elementRef = inject(ElementRef);
|
|
823
857
|
renderer = inject(Renderer2);
|
|
824
858
|
menuOpen = signal(false, /* @ts-ignore */
|
|
825
859
|
...(ngDevMode ? [{ debugName: "menuOpen" }] : /* istanbul ignore next */ []));
|
|
@@ -836,6 +870,26 @@ class StrataActionMenuComponent {
|
|
|
836
870
|
unlisten();
|
|
837
871
|
});
|
|
838
872
|
});
|
|
873
|
+
effect((onCleanup) => {
|
|
874
|
+
if (!this.menuOpen() || !this.closeOnOutsideClick()) {
|
|
875
|
+
return;
|
|
876
|
+
}
|
|
877
|
+
const unlisten = this.renderer.listen('document', 'pointerdown', (event) => {
|
|
878
|
+
const target = event.target;
|
|
879
|
+
if (!target) {
|
|
880
|
+
return;
|
|
881
|
+
}
|
|
882
|
+
const hostEl = this.elementRef.nativeElement;
|
|
883
|
+
const cardEl = document.querySelector('.action-menu-card');
|
|
884
|
+
if (hostEl.contains(target) || (cardEl && cardEl.contains(target))) {
|
|
885
|
+
return;
|
|
886
|
+
}
|
|
887
|
+
this.menuOpen.set(false);
|
|
888
|
+
});
|
|
889
|
+
onCleanup(() => {
|
|
890
|
+
unlisten();
|
|
891
|
+
});
|
|
892
|
+
});
|
|
839
893
|
effect((onCleanup) => {
|
|
840
894
|
const subs = this.actionMenuItems().map((item) => item.menuItemClicked.subscribe((shouldClose) => {
|
|
841
895
|
if (shouldClose) {
|
|
@@ -848,7 +902,7 @@ class StrataActionMenuComponent {
|
|
|
848
902
|
});
|
|
849
903
|
}
|
|
850
904
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataActionMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
851
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataActionMenuComponent, isStandalone: true, selector: "st-action-menu", inputs: { placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "projectedButton", first: true, predicate: StrataButtonDirective, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "actionMenuItems", predicate: StrataActionMenuItemComponent, isSignal: true }], viewQueries: [{ propertyName: "defaultButton", first: true, predicate: StrataButtonDirective, descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<div [stOverlay]=\"menu\" [overlayOpen]=\"menuOpen()\" [overlayPlacement]=\"placement()\">\n <ng-content select=\"button[stButton]\"></ng-content>\n @if (!projectedButton()) {\n <button stButton><st-icon name=\"more\"></st-icon></button>\n }\n</div>\n\n<ng-template #menu>\n <st-card [padding]=\"false\" class=\"action-menu-card\"><ng-content select=\"st-action-menu-item\"></ng-content></st-card>\n</ng-template>\n", styles: ["st-card{width:fit-content}\n"], dependencies: [{ kind: "component", type: StrataCardComponent, selector: "st-card", inputs: ["elevated", "selectable", "padding", "variant"] }, { kind: "directive", type: StrataOverlayDirective, selector: "[stOverlay]", inputs: ["stOverlay", "overlayOpen", "overlayPlacement", "overlayOffset", "overlayFitViewport"], outputs: ["overlayOpenChange"] }, { kind: "component", type: StrataIconComponent, selector: "st-icon", inputs: ["name", "size"], outputs: ["sizeChange"] }, { kind: "directive", type: StrataButtonDirective, selector: "[stButton]", inputs: ["variant", "size", "fullWidth"] }] });
|
|
905
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataActionMenuComponent, isStandalone: true, selector: "st-action-menu", inputs: { placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, closeOnOutsideClick: { classPropertyName: "closeOnOutsideClick", publicName: "closeOnOutsideClick", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "projectedButton", first: true, predicate: StrataButtonDirective, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "actionMenuItems", predicate: StrataActionMenuItemComponent, isSignal: true }], viewQueries: [{ propertyName: "defaultButton", first: true, predicate: StrataButtonDirective, descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<div [stOverlay]=\"menu\" [overlayOpen]=\"menuOpen()\" [overlayPlacement]=\"placement()\">\n <ng-content select=\"button[stButton]\"></ng-content>\n @if (!projectedButton()) {\n <button stButton><st-icon name=\"more\"></st-icon></button>\n }\n</div>\n\n<ng-template #menu>\n <st-card [padding]=\"false\" class=\"action-menu-card\"><ng-content select=\"st-action-menu-item\"></ng-content></st-card>\n</ng-template>\n", styles: ["st-card{width:fit-content}\n"], dependencies: [{ kind: "component", type: StrataCardComponent, selector: "st-card", inputs: ["elevated", "selectable", "padding", "variant"] }, { kind: "directive", type: StrataOverlayDirective, selector: "[stOverlay]", inputs: ["stOverlay", "overlayOpen", "overlayPlacement", "overlayOffset", "overlayFitViewport"], outputs: ["overlayOpenChange"] }, { kind: "component", type: StrataIconComponent, selector: "st-icon", inputs: ["name", "size"], outputs: ["sizeChange"] }, { kind: "directive", type: StrataButtonDirective, selector: "[stButton]", inputs: ["variant", "size", "fullWidth"] }] });
|
|
852
906
|
}
|
|
853
907
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataActionMenuComponent, decorators: [{
|
|
854
908
|
type: Component,
|
|
@@ -858,7 +912,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
858
912
|
read: ElementRef
|
|
859
913
|
}, isSignal: true }] }], defaultButton: [{ type: i0.ViewChild, args: [i0.forwardRef(() => StrataButtonDirective), { ...{
|
|
860
914
|
read: ElementRef
|
|
861
|
-
}, isSignal: true }] }], actionMenuItems: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => StrataActionMenuItemComponent), { isSignal: true }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }] } });
|
|
915
|
+
}, isSignal: true }] }], actionMenuItems: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => StrataActionMenuItemComponent), { isSignal: true }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], closeOnOutsideClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnOutsideClick", required: false }] }] } });
|
|
862
916
|
|
|
863
917
|
class StrataTextStackComponent {
|
|
864
918
|
overflow = input('truncate', /* @ts-ignore */
|
|
@@ -1004,6 +1058,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
1004
1058
|
args: [{ selector: 'st-accordion-group', imports: [], template: "<ng-content></ng-content>\n" }]
|
|
1005
1059
|
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => StrataAccordionItemComponent), { isSignal: true }] }], allowMultipleOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowMultipleOpen", required: false }] }] } });
|
|
1006
1060
|
|
|
1061
|
+
class StrataAvatarStackComponent {
|
|
1062
|
+
size = input('md', /* @ts-ignore */
|
|
1063
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
1064
|
+
spacing = input('mid', /* @ts-ignore */
|
|
1065
|
+
...(ngDevMode ? [{ debugName: "spacing" }] : /* istanbul ignore next */ []));
|
|
1066
|
+
firstOnFront = input(false, /* @ts-ignore */
|
|
1067
|
+
...(ngDevMode ? [{ debugName: "firstOnFront" }] : /* istanbul ignore next */ []));
|
|
1068
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataAvatarStackComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1069
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: StrataAvatarStackComponent, isStandalone: true, selector: "st-avatar-stack", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, spacing: { classPropertyName: "spacing", publicName: "spacing", isSignal: true, isRequired: false, transformFunction: null }, firstOnFront: { classPropertyName: "firstOnFront", publicName: "firstOnFront", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.xs": "size() === \"xs\"", "class.sm": "size() === \"sm\"", "class.md": "size() === \"md\"", "class.lg": "size() === \"lg\"", "class.tight": "spacing() === \"tight\"", "class.mid": "spacing() === \"mid\"", "class.loose": "spacing() === \"loose\"", "class.first-on-front": "firstOnFront()" } }, ngImport: i0, template: "<ng-content></ng-content>\n" });
|
|
1070
|
+
}
|
|
1071
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataAvatarStackComponent, decorators: [{
|
|
1072
|
+
type: Component,
|
|
1073
|
+
args: [{ selector: 'st-avatar-stack', imports: [], host: {
|
|
1074
|
+
'[class.xs]': 'size() === "xs"',
|
|
1075
|
+
'[class.sm]': 'size() === "sm"',
|
|
1076
|
+
'[class.md]': 'size() === "md"',
|
|
1077
|
+
'[class.lg]': 'size() === "lg"',
|
|
1078
|
+
'[class.tight]': 'spacing() === "tight"',
|
|
1079
|
+
'[class.mid]': 'spacing() === "mid"',
|
|
1080
|
+
'[class.loose]': 'spacing() === "loose"',
|
|
1081
|
+
'[class.first-on-front]': 'firstOnFront()',
|
|
1082
|
+
}, template: "<ng-content></ng-content>\n" }]
|
|
1083
|
+
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], spacing: [{ type: i0.Input, args: [{ isSignal: true, alias: "spacing", required: false }] }], firstOnFront: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstOnFront", required: false }] }] } });
|
|
1084
|
+
|
|
1007
1085
|
class StrataAvatarComponent {
|
|
1008
1086
|
iconComponents = contentChildren(StrataIconComponent, { ...(ngDevMode ? { debugName: "iconComponents" } : /* istanbul ignore next */ {}), descendants: true });
|
|
1009
1087
|
text = input(null, /* @ts-ignore */
|
|
@@ -1031,93 +1109,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
1031
1109
|
args: ['class']
|
|
1032
1110
|
}] } });
|
|
1033
1111
|
|
|
1034
|
-
class StrataAvatarStackComponent {
|
|
1035
|
-
avatarRefs = contentChildren(StrataAvatarComponent, { ...(ngDevMode ? { debugName: "avatarRefs" } : /* istanbul ignore next */ {}), descendants: true,
|
|
1036
|
-
read: ElementRef });
|
|
1037
|
-
size = input('md', /* @ts-ignore */
|
|
1038
|
-
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
1039
|
-
spacing = input('mid', /* @ts-ignore */
|
|
1040
|
-
...(ngDevMode ? [{ debugName: "spacing" }] : /* istanbul ignore next */ []));
|
|
1041
|
-
firstOnFront = input(false, /* @ts-ignore */
|
|
1042
|
-
...(ngDevMode ? [{ debugName: "firstOnFront" }] : /* istanbul ignore next */ []));
|
|
1043
|
-
get xsClass() {
|
|
1044
|
-
return this.size() === 'xs';
|
|
1045
|
-
}
|
|
1046
|
-
get smClass() {
|
|
1047
|
-
return this.size() === 'sm';
|
|
1048
|
-
}
|
|
1049
|
-
get mdClass() {
|
|
1050
|
-
return this.size() === 'md';
|
|
1051
|
-
}
|
|
1052
|
-
get lgClass() {
|
|
1053
|
-
return this.size() === 'lg';
|
|
1054
|
-
}
|
|
1055
|
-
get firstOnFrontClass() {
|
|
1056
|
-
return this.firstOnFront();
|
|
1057
|
-
}
|
|
1058
|
-
get looseClass() {
|
|
1059
|
-
return this.spacing() === 'loose';
|
|
1060
|
-
}
|
|
1061
|
-
get midClass() {
|
|
1062
|
-
return this.spacing() === 'mid';
|
|
1063
|
-
}
|
|
1064
|
-
get tightClass() {
|
|
1065
|
-
return this.spacing() === 'tight';
|
|
1066
|
-
}
|
|
1067
|
-
ngAfterViewInit() {
|
|
1068
|
-
setTimeout(() => {
|
|
1069
|
-
this.avatarRefs().forEach((ref, index) => {
|
|
1070
|
-
if (this.firstOnFront()) {
|
|
1071
|
-
ref.nativeElement.style.setProperty('--z', (this.avatarRefs().length - index).toString());
|
|
1072
|
-
}
|
|
1073
|
-
});
|
|
1074
|
-
}, 1);
|
|
1075
|
-
}
|
|
1076
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataAvatarStackComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1077
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.1", type: StrataAvatarStackComponent, isStandalone: true, selector: "st-avatar-stack", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, spacing: { classPropertyName: "spacing", publicName: "spacing", isSignal: true, isRequired: false, transformFunction: null }, firstOnFront: { classPropertyName: "firstOnFront", publicName: "firstOnFront", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.xs": "this.xsClass", "class.sm": "this.smClass", "class.md": "this.mdClass", "class.lg": "this.lgClass", "class.first-on-front": "this.firstOnFrontClass", "class.loose": "this.looseClass", "class.mid": "this.midClass", "class.tight": "this.tightClass" } }, queries: [{ propertyName: "avatarRefs", predicate: StrataAvatarComponent, descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<ng-content></ng-content>\n" });
|
|
1078
|
-
}
|
|
1079
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataAvatarStackComponent, decorators: [{
|
|
1080
|
-
type: Component,
|
|
1081
|
-
args: [{ selector: 'st-avatar-stack', imports: [], template: "<ng-content></ng-content>\n" }]
|
|
1082
|
-
}], propDecorators: { avatarRefs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => StrataAvatarComponent), { ...{
|
|
1083
|
-
descendants: true,
|
|
1084
|
-
read: ElementRef
|
|
1085
|
-
}, isSignal: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], spacing: [{ type: i0.Input, args: [{ isSignal: true, alias: "spacing", required: false }] }], firstOnFront: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstOnFront", required: false }] }], xsClass: [{
|
|
1086
|
-
type: HostBinding,
|
|
1087
|
-
args: ['class.xs']
|
|
1088
|
-
}], smClass: [{
|
|
1089
|
-
type: HostBinding,
|
|
1090
|
-
args: ['class.sm']
|
|
1091
|
-
}], mdClass: [{
|
|
1092
|
-
type: HostBinding,
|
|
1093
|
-
args: ['class.md']
|
|
1094
|
-
}], lgClass: [{
|
|
1095
|
-
type: HostBinding,
|
|
1096
|
-
args: ['class.lg']
|
|
1097
|
-
}], firstOnFrontClass: [{
|
|
1098
|
-
type: HostBinding,
|
|
1099
|
-
args: ['class.first-on-front']
|
|
1100
|
-
}], looseClass: [{
|
|
1101
|
-
type: HostBinding,
|
|
1102
|
-
args: ['class.loose']
|
|
1103
|
-
}], midClass: [{
|
|
1104
|
-
type: HostBinding,
|
|
1105
|
-
args: ['class.mid']
|
|
1106
|
-
}], tightClass: [{
|
|
1107
|
-
type: HostBinding,
|
|
1108
|
-
args: ['class.tight']
|
|
1109
|
-
}] } });
|
|
1110
|
-
|
|
1111
1112
|
class StrataButtonGroupComponent {
|
|
1112
|
-
renderer = inject(Renderer2);
|
|
1113
1113
|
justification = input('start', /* @ts-ignore */
|
|
1114
1114
|
...(ngDevMode ? [{ debugName: "justification" }] : /* istanbul ignore next */ []));
|
|
1115
1115
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataButtonGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1116
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: StrataButtonGroupComponent, isStandalone: true, selector: "st-button-group", inputs: { justification: { classPropertyName: "justification", publicName: "justification", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-content select=\"[stButton], st-divider\" #buttons></ng-content>\n" });
|
|
1116
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: StrataButtonGroupComponent, isStandalone: true, selector: "st-button-group", inputs: { justification: { classPropertyName: "justification", publicName: "justification", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.justification": "justification()" } }, ngImport: i0, template: "<ng-content select=\"[stButton], st-divider\" #buttons></ng-content>\n" });
|
|
1117
1117
|
}
|
|
1118
1118
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataButtonGroupComponent, decorators: [{
|
|
1119
1119
|
type: Component,
|
|
1120
|
-
args: [{ selector: 'st-button-group', imports: [],
|
|
1120
|
+
args: [{ selector: 'st-button-group', imports: [], host: {
|
|
1121
|
+
'[attr.justification]': 'justification()',
|
|
1122
|
+
}, template: "<ng-content select=\"[stButton], st-divider\" #buttons></ng-content>\n" }]
|
|
1121
1123
|
}], propDecorators: { justification: [{ type: i0.Input, args: [{ isSignal: true, alias: "justification", required: false }] }] } });
|
|
1122
1124
|
|
|
1123
1125
|
class StrataNativeInputRefDirective {
|
|
@@ -1231,6 +1233,8 @@ class StrataSingleSelectComponent {
|
|
|
1231
1233
|
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
1232
1234
|
placement = input('bottom-start', /* @ts-ignore */
|
|
1233
1235
|
...(ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []));
|
|
1236
|
+
disabled = input(false, /* @ts-ignore */
|
|
1237
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1234
1238
|
fullWidth = input(false, /* @ts-ignore */
|
|
1235
1239
|
...(ngDevMode ? [{ debugName: "fullWidth" }] : /* istanbul ignore next */ []));
|
|
1236
1240
|
label = input(/* @ts-ignore */
|
|
@@ -1284,6 +1288,8 @@ class StrataSingleSelectComponent {
|
|
|
1284
1288
|
}
|
|
1285
1289
|
}
|
|
1286
1290
|
toggle(event) {
|
|
1291
|
+
if (this.disabled())
|
|
1292
|
+
return;
|
|
1287
1293
|
if (event) {
|
|
1288
1294
|
event.preventDefault();
|
|
1289
1295
|
event.stopPropagation();
|
|
@@ -1310,7 +1316,7 @@ class StrataSingleSelectComponent {
|
|
|
1310
1316
|
this.open.set(false);
|
|
1311
1317
|
}
|
|
1312
1318
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSingleSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1313
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataSingleSelectComponent, isStandalone: true, selector: "st-single-select", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, searchQuery: { classPropertyName: "searchQuery", publicName: "searchQuery", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selectedChange", searchQuery: "searchQueryChange", itemSelected: "itemSelected" }, queries: [{ propertyName: "selectItems", predicate: StrataSelectItemComponent, isSignal: true }, { propertyName: "triggerTemplate", first: true, predicate: StrataSelectTriggerDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "inputField", first: true, predicate: StrataInputFieldComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@if (label()) {\n<label class=\"st-label\" [for]=\"name()\"> {{ label() }}</label>\n}\n<div class=\"single-select-input\" [id]=\"name()\" #singleSelectInput (click)=\"toggle($event)\" [attr.data-open]=\"open()\"\n tabindex=\"0\" [stOverlay]=\"selector\" [overlayOpen]=\"open()\" [overlayPlacement]=\"placement()\">\n @if (selectedItem()) {\n @if (triggerTemplate()) {\n <ng-container *ngTemplateOutlet=\"triggerTemplate()!\"></ng-container>\n } @else {\n {{ selectedItem()!.text() }}\n }\n } @else {\n <span class=\"placeholder-text\">{{ placeholder() }}</span>\n }\n\n <st-icon name=\"expand-up-down\"></st-icon>\n</div>\n\n<ng-template #selector>\n <div class=\"single-select-selector\" #singleSelectSelector [class.full-width]=\"fullWidth()\">\n @if (searchable()) {\n <st-input-field>\n <input stInput #searchField type=\"text\" [value]=\"searchQuery() || ''\" (input)=\"searchQuery.set($any($event.target).value); onSearchChange(searchQuery())\" [placeholder]=\"searchPlaceholder()\" />\n <button stButton variant=\"ghost\" [class.visible]=\"searchQuery() !== undefined && searchQuery()!.length > 0\" suffix\n size=\"sm\" (click)=\"searchQuery.set(undefined); onSearchChange(undefined)\">\n x\n </button>\n </st-input-field>\n }\n <div class=\"single-select-items-container\">\n <ng-content select=\"st-select-item\"></ng-content>\n </div>\n </div>\n</ng-template>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: StrataIconComponent, selector: "st-icon", inputs: ["name", "size"], outputs: ["sizeChange"] }, { kind: "directive", type: StrataOverlayDirective, selector: "[stOverlay]", inputs: ["stOverlay", "overlayOpen", "overlayPlacement", "overlayOffset", "overlayFitViewport"], outputs: ["overlayOpenChange"] }, { kind: "component", type: StrataInputFieldComponent, selector: "st-input-field" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: StrataNativeInputRefDirective, selector: "input[stInput], textarea[stInput]" }, { kind: "directive", type: StrataButtonDirective, selector: "[stButton]", inputs: ["variant", "size", "fullWidth"] }] });
|
|
1319
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataSingleSelectComponent, isStandalone: true, selector: "st-single-select", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, searchQuery: { classPropertyName: "searchQuery", publicName: "searchQuery", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selectedChange", searchQuery: "searchQueryChange", itemSelected: "itemSelected" }, queries: [{ propertyName: "selectItems", predicate: StrataSelectItemComponent, isSignal: true }, { propertyName: "triggerTemplate", first: true, predicate: StrataSelectTriggerDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "inputField", first: true, predicate: StrataInputFieldComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@if (label()) {\n<label class=\"st-label\" [for]=\"name()\"> {{ label() }}</label>\n}\n<div class=\"single-select-input\" [class.disabled]=\"disabled()\" [id]=\"name()\" #singleSelectInput (click)=\"toggle($event)\" [attr.data-open]=\"open()\"\n tabindex=\"0\" [stOverlay]=\"selector\" [overlayOpen]=\"open()\" [overlayPlacement]=\"placement()\">\n @if (selectedItem()) {\n @if (triggerTemplate()) {\n <ng-container *ngTemplateOutlet=\"triggerTemplate()!\"></ng-container>\n } @else {\n {{ selectedItem()!.text() }}\n }\n } @else {\n <span class=\"placeholder-text\">{{ placeholder() }}</span>\n }\n\n <st-icon name=\"expand-up-down\"></st-icon>\n</div>\n\n<ng-template #selector>\n <div class=\"single-select-selector\" #singleSelectSelector [class.full-width]=\"fullWidth()\">\n @if (searchable()) {\n <st-input-field>\n <input stInput #searchField type=\"text\" [value]=\"searchQuery() || ''\" (input)=\"searchQuery.set($any($event.target).value); onSearchChange(searchQuery())\" [placeholder]=\"searchPlaceholder()\" />\n <button stButton variant=\"ghost\" [class.visible]=\"searchQuery() !== undefined && searchQuery()!.length > 0\" suffix\n size=\"sm\" (click)=\"searchQuery.set(undefined); onSearchChange(undefined)\">\n x\n </button>\n </st-input-field>\n }\n <div class=\"single-select-items-container\">\n <ng-content select=\"st-select-item\"></ng-content>\n </div>\n </div>\n</ng-template>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: StrataIconComponent, selector: "st-icon", inputs: ["name", "size"], outputs: ["sizeChange"] }, { kind: "directive", type: StrataOverlayDirective, selector: "[stOverlay]", inputs: ["stOverlay", "overlayOpen", "overlayPlacement", "overlayOffset", "overlayFitViewport"], outputs: ["overlayOpenChange"] }, { kind: "component", type: StrataInputFieldComponent, selector: "st-input-field" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: StrataNativeInputRefDirective, selector: "input[stInput], textarea[stInput]" }, { kind: "directive", type: StrataButtonDirective, selector: "[stButton]", inputs: ["variant", "size", "fullWidth"] }] });
|
|
1314
1320
|
}
|
|
1315
1321
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSingleSelectComponent, decorators: [{
|
|
1316
1322
|
type: Component,
|
|
@@ -1322,8 +1328,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
1322
1328
|
FormsModule,
|
|
1323
1329
|
StrataNativeInputRefDirective,
|
|
1324
1330
|
StrataButtonDirective,
|
|
1325
|
-
], template: "@if (label()) {\n<label class=\"st-label\" [for]=\"name()\"> {{ label() }}</label>\n}\n<div class=\"single-select-input\" [id]=\"name()\" #singleSelectInput (click)=\"toggle($event)\" [attr.data-open]=\"open()\"\n tabindex=\"0\" [stOverlay]=\"selector\" [overlayOpen]=\"open()\" [overlayPlacement]=\"placement()\">\n @if (selectedItem()) {\n @if (triggerTemplate()) {\n <ng-container *ngTemplateOutlet=\"triggerTemplate()!\"></ng-container>\n } @else {\n {{ selectedItem()!.text() }}\n }\n } @else {\n <span class=\"placeholder-text\">{{ placeholder() }}</span>\n }\n\n <st-icon name=\"expand-up-down\"></st-icon>\n</div>\n\n<ng-template #selector>\n <div class=\"single-select-selector\" #singleSelectSelector [class.full-width]=\"fullWidth()\">\n @if (searchable()) {\n <st-input-field>\n <input stInput #searchField type=\"text\" [value]=\"searchQuery() || ''\" (input)=\"searchQuery.set($any($event.target).value); onSearchChange(searchQuery())\" [placeholder]=\"searchPlaceholder()\" />\n <button stButton variant=\"ghost\" [class.visible]=\"searchQuery() !== undefined && searchQuery()!.length > 0\" suffix\n size=\"sm\" (click)=\"searchQuery.set(undefined); onSearchChange(undefined)\">\n x\n </button>\n </st-input-field>\n }\n <div class=\"single-select-items-container\">\n <ng-content select=\"st-select-item\"></ng-content>\n </div>\n </div>\n</ng-template>" }]
|
|
1326
|
-
}], ctorParameters: () => [], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }, { type: i0.Output, args: ["selectedChange"] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], searchQuery: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchQuery", required: false }] }, { type: i0.Output, args: ["searchQueryChange"] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], itemSelected: [{ type: i0.Output, args: ["itemSelected"] }], selectItems: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => StrataSelectItemComponent), { isSignal: true }] }], triggerTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StrataSelectTriggerDirective), { ...{ read: TemplateRef }, isSignal: true }] }], inputField: [{ type: i0.ViewChild, args: [i0.forwardRef(() => StrataInputFieldComponent), { isSignal: true }] }] } });
|
|
1331
|
+
], template: "@if (label()) {\n<label class=\"st-label\" [for]=\"name()\"> {{ label() }}</label>\n}\n<div class=\"single-select-input\" [class.disabled]=\"disabled()\" [id]=\"name()\" #singleSelectInput (click)=\"toggle($event)\" [attr.data-open]=\"open()\"\n tabindex=\"0\" [stOverlay]=\"selector\" [overlayOpen]=\"open()\" [overlayPlacement]=\"placement()\">\n @if (selectedItem()) {\n @if (triggerTemplate()) {\n <ng-container *ngTemplateOutlet=\"triggerTemplate()!\"></ng-container>\n } @else {\n {{ selectedItem()!.text() }}\n }\n } @else {\n <span class=\"placeholder-text\">{{ placeholder() }}</span>\n }\n\n <st-icon name=\"expand-up-down\"></st-icon>\n</div>\n\n<ng-template #selector>\n <div class=\"single-select-selector\" #singleSelectSelector [class.full-width]=\"fullWidth()\">\n @if (searchable()) {\n <st-input-field>\n <input stInput #searchField type=\"text\" [value]=\"searchQuery() || ''\" (input)=\"searchQuery.set($any($event.target).value); onSearchChange(searchQuery())\" [placeholder]=\"searchPlaceholder()\" />\n <button stButton variant=\"ghost\" [class.visible]=\"searchQuery() !== undefined && searchQuery()!.length > 0\" suffix\n size=\"sm\" (click)=\"searchQuery.set(undefined); onSearchChange(undefined)\">\n x\n </button>\n </st-input-field>\n }\n <div class=\"single-select-items-container\">\n <ng-content select=\"st-select-item\"></ng-content>\n </div>\n </div>\n</ng-template>" }]
|
|
1332
|
+
}], ctorParameters: () => [], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }, { type: i0.Output, args: ["selectedChange"] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], searchQuery: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchQuery", required: false }] }, { type: i0.Output, args: ["searchQueryChange"] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], itemSelected: [{ type: i0.Output, args: ["itemSelected"] }], selectItems: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => StrataSelectItemComponent), { isSignal: true }] }], triggerTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StrataSelectTriggerDirective), { ...{ read: TemplateRef }, isSignal: true }] }], inputField: [{ type: i0.ViewChild, args: [i0.forwardRef(() => StrataInputFieldComponent), { isSignal: true }] }] } });
|
|
1327
1333
|
|
|
1328
1334
|
class StrataDividerComponent {
|
|
1329
1335
|
label = input(/* @ts-ignore */
|
|
@@ -1938,17 +1944,25 @@ class StrataSidemenuSectionComponent {
|
|
|
1938
1944
|
label = input(/* @ts-ignore */
|
|
1939
1945
|
...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1940
1946
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSidemenuSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1941
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataSidemenuSectionComponent, isStandalone: true, selector: "st-sidemenu-section", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (label()) {\n<p class=\"st-sidemenu-section-header st-label\">{{ label() }}</p>\n}\n<div class=\"st-sidemenu-section-content\">\n <ng-content></ng-content>\n</div>", styles: [":host{--st-sidemenu-section-spacing: var(--st-size-sm, 16px);--st-sidemenu-section-header-padding: var(--st-size-xxs, 8px) var(--st-size-xs, 12px);--st-sidemenu-section-header-spacing: var(--st-size-xxxs, 4px);--st-sidemenu-section-gap: var(--st-size-xxxs, 4px);display:flex;flex-direction:column;width:100
|
|
1947
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataSidemenuSectionComponent, isStandalone: true, selector: "st-sidemenu-section", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (label()) {\n<p class=\"st-sidemenu-section-header st-label\">{{ label() }}</p>\n}\n<div class=\"st-sidemenu-section-content\">\n <ng-content></ng-content>\n</div>", styles: [":host{--st-sidemenu-section-spacing: var(--st-size-sm, 16px);--st-sidemenu-section-header-padding: var(--st-size-xxs, 8px) var(--st-size-xs, 12px);--st-sidemenu-section-header-spacing: var(--st-size-xxxs, 4px);--st-sidemenu-section-gap: var(--st-size-xxxs, 4px);display:flex;flex-direction:column;width:100%}:host:not(:last-child){margin-block-end:var(--st-sidemenu-section-spacing)}.st-sidemenu-section-header{padding:var(--st-sidemenu-section-header-padding);margin-block-end:var(--st-sidemenu-section-header-spacing)}.st-sidemenu-section-content{display:flex;flex-direction:column;gap:var(--st-sidemenu-section-gap)}\n"] });
|
|
1942
1948
|
}
|
|
1943
1949
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSidemenuSectionComponent, decorators: [{
|
|
1944
1950
|
type: Component,
|
|
1945
|
-
args: [{ selector: 'st-sidemenu-section', template: "@if (label()) {\n<p class=\"st-sidemenu-section-header st-label\">{{ label() }}</p>\n}\n<div class=\"st-sidemenu-section-content\">\n <ng-content></ng-content>\n</div>", styles: [":host{--st-sidemenu-section-spacing: var(--st-size-sm, 16px);--st-sidemenu-section-header-padding: var(--st-size-xxs, 8px) var(--st-size-xs, 12px);--st-sidemenu-section-header-spacing: var(--st-size-xxxs, 4px);--st-sidemenu-section-gap: var(--st-size-xxxs, 4px);display:flex;flex-direction:column;width:100
|
|
1951
|
+
args: [{ selector: 'st-sidemenu-section', template: "@if (label()) {\n<p class=\"st-sidemenu-section-header st-label\">{{ label() }}</p>\n}\n<div class=\"st-sidemenu-section-content\">\n <ng-content></ng-content>\n</div>", styles: [":host{--st-sidemenu-section-spacing: var(--st-size-sm, 16px);--st-sidemenu-section-header-padding: var(--st-size-xxs, 8px) var(--st-size-xs, 12px);--st-sidemenu-section-header-spacing: var(--st-size-xxxs, 4px);--st-sidemenu-section-gap: var(--st-size-xxxs, 4px);display:flex;flex-direction:column;width:100%}:host:not(:last-child){margin-block-end:var(--st-sidemenu-section-spacing)}.st-sidemenu-section-header{padding:var(--st-sidemenu-section-header-padding);margin-block-end:var(--st-sidemenu-section-header-spacing)}.st-sidemenu-section-content{display:flex;flex-direction:column;gap:var(--st-sidemenu-section-gap)}\n"] }]
|
|
1946
1952
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }] } });
|
|
1947
1953
|
|
|
1948
1954
|
class StrataSidemenuItemDirective {
|
|
1949
1955
|
active = input(false, /* @ts-ignore */
|
|
1950
1956
|
...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
1957
|
+
secondaryActionIcon = input(undefined, /* @ts-ignore */
|
|
1958
|
+
...(ngDevMode ? [{ debugName: "secondaryActionIcon" }] : /* istanbul ignore next */ []));
|
|
1959
|
+
secondaryAction = output();
|
|
1951
1960
|
elementRef = inject(ElementRef);
|
|
1961
|
+
renderer = inject(Renderer2);
|
|
1962
|
+
vcr = inject(ViewContainerRef);
|
|
1963
|
+
secondaryButtonEl = null;
|
|
1964
|
+
iconComponentRef = null;
|
|
1965
|
+
unlistenClick = null;
|
|
1952
1966
|
constructor() {
|
|
1953
1967
|
effect(() => {
|
|
1954
1968
|
if (this.active()) {
|
|
@@ -1958,20 +1972,64 @@ class StrataSidemenuItemDirective {
|
|
|
1958
1972
|
});
|
|
1959
1973
|
}
|
|
1960
1974
|
});
|
|
1975
|
+
effect(() => {
|
|
1976
|
+
const iconName = this.secondaryActionIcon();
|
|
1977
|
+
this.updateSecondaryButton(iconName);
|
|
1978
|
+
});
|
|
1979
|
+
}
|
|
1980
|
+
updateSecondaryButton(iconName) {
|
|
1981
|
+
if (!iconName) {
|
|
1982
|
+
this.removeSecondaryButton();
|
|
1983
|
+
return;
|
|
1984
|
+
}
|
|
1985
|
+
if (!this.secondaryButtonEl) {
|
|
1986
|
+
const btn = this.renderer.createElement('button');
|
|
1987
|
+
this.renderer.setAttribute(btn, 'type', 'button');
|
|
1988
|
+
this.renderer.addClass(btn, 'st-sidemenu-item-secondary-action');
|
|
1989
|
+
this.unlistenClick = this.renderer.listen(btn, 'click', (event) => {
|
|
1990
|
+
event.preventDefault();
|
|
1991
|
+
event.stopPropagation();
|
|
1992
|
+
this.secondaryAction.emit(event);
|
|
1993
|
+
});
|
|
1994
|
+
this.iconComponentRef = this.vcr.createComponent(StrataIconComponent);
|
|
1995
|
+
this.iconComponentRef.setInput('name', iconName);
|
|
1996
|
+
this.iconComponentRef.setInput('size', 'sm');
|
|
1997
|
+
this.renderer.insertBefore(btn, this.iconComponentRef.location.nativeElement, null);
|
|
1998
|
+
const hostEl = this.elementRef.nativeElement;
|
|
1999
|
+
this.renderer.appendChild(hostEl, btn);
|
|
2000
|
+
this.secondaryButtonEl = btn;
|
|
2001
|
+
}
|
|
2002
|
+
else if (this.iconComponentRef) {
|
|
2003
|
+
this.iconComponentRef.setInput('name', iconName);
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
removeSecondaryButton() {
|
|
2007
|
+
if (this.unlistenClick) {
|
|
2008
|
+
this.unlistenClick();
|
|
2009
|
+
this.unlistenClick = null;
|
|
2010
|
+
}
|
|
2011
|
+
if (this.iconComponentRef) {
|
|
2012
|
+
this.iconComponentRef.destroy();
|
|
2013
|
+
this.iconComponentRef = null;
|
|
2014
|
+
}
|
|
2015
|
+
if (this.secondaryButtonEl) {
|
|
2016
|
+
this.renderer.removeChild(this.elementRef.nativeElement, this.secondaryButtonEl);
|
|
2017
|
+
this.secondaryButtonEl = null;
|
|
2018
|
+
}
|
|
1961
2019
|
}
|
|
1962
2020
|
isSidemenuItem = true;
|
|
1963
2021
|
get isSelected() {
|
|
1964
2022
|
return this.active();
|
|
1965
2023
|
}
|
|
1966
2024
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSidemenuItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1967
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.1", type: StrataSidemenuItemDirective, isStandalone: true, selector: "[stSidemenuItem]", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.st-sidemenu-item": "this.isSidemenuItem", "class.selected": "this.isSelected" } }, ngImport: i0 });
|
|
2025
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.1", type: StrataSidemenuItemDirective, isStandalone: true, selector: "[stSidemenuItem]", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, secondaryActionIcon: { classPropertyName: "secondaryActionIcon", publicName: "secondaryActionIcon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { secondaryAction: "secondaryAction" }, host: { properties: { "class.st-sidemenu-item": "this.isSidemenuItem", "class.selected": "this.isSelected" } }, ngImport: i0 });
|
|
1968
2026
|
}
|
|
1969
2027
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSidemenuItemDirective, decorators: [{
|
|
1970
2028
|
type: Directive,
|
|
1971
2029
|
args: [{
|
|
1972
2030
|
selector: '[stSidemenuItem]'
|
|
1973
2031
|
}]
|
|
1974
|
-
}], ctorParameters: () => [], propDecorators: { active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], isSidemenuItem: [{
|
|
2032
|
+
}], ctorParameters: () => [], propDecorators: { active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], secondaryActionIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryActionIcon", required: false }] }], secondaryAction: [{ type: i0.Output, args: ["secondaryAction"] }], isSidemenuItem: [{
|
|
1975
2033
|
type: HostBinding,
|
|
1976
2034
|
args: ['class.st-sidemenu-item']
|
|
1977
2035
|
}], isSelected: [{
|
|
@@ -1982,6 +2040,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
1982
2040
|
class StrataSidemenuItemGroupComponent {
|
|
1983
2041
|
label = input.required(/* @ts-ignore */
|
|
1984
2042
|
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
2043
|
+
routerLink = input(undefined, /* @ts-ignore */
|
|
2044
|
+
...(ngDevMode ? [{ debugName: "routerLink" }] : /* istanbul ignore next */ []));
|
|
2045
|
+
href = input(undefined, /* @ts-ignore */
|
|
2046
|
+
...(ngDevMode ? [{ debugName: "href" }] : /* istanbul ignore next */ []));
|
|
2047
|
+
active = input(undefined, /* @ts-ignore */
|
|
2048
|
+
...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
1985
2049
|
expanded = signal(false, /* @ts-ignore */
|
|
1986
2050
|
...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
1987
2051
|
hasActiveChild = signal(false, /* @ts-ignore */
|
|
@@ -1989,6 +2053,12 @@ class StrataSidemenuItemGroupComponent {
|
|
|
1989
2053
|
router = inject(Router, { optional: true });
|
|
1990
2054
|
destroyRef = inject(DestroyRef);
|
|
1991
2055
|
routerLinks;
|
|
2056
|
+
get isHeaderActive() {
|
|
2057
|
+
return this.active() ?? this.hasActiveChild();
|
|
2058
|
+
}
|
|
2059
|
+
get isNavigable() {
|
|
2060
|
+
return this.routerLink() !== undefined || this.href() !== undefined;
|
|
2061
|
+
}
|
|
1992
2062
|
ngAfterContentInit() {
|
|
1993
2063
|
setTimeout(() => {
|
|
1994
2064
|
this.checkActiveState();
|
|
@@ -1997,14 +2067,17 @@ class StrataSidemenuItemGroupComponent {
|
|
|
1997
2067
|
this.router.events
|
|
1998
2068
|
.pipe(filter((e) => e instanceof NavigationEnd), takeUntilDestroyed(this.destroyRef))
|
|
1999
2069
|
.subscribe(() => {
|
|
2000
|
-
// Wait a tick for RouterLinkActive to update its isActive status
|
|
2001
2070
|
setTimeout(() => {
|
|
2002
2071
|
this.checkActiveState();
|
|
2003
2072
|
});
|
|
2004
2073
|
});
|
|
2005
2074
|
}
|
|
2006
2075
|
}
|
|
2007
|
-
toggle() {
|
|
2076
|
+
toggle(event) {
|
|
2077
|
+
if (event) {
|
|
2078
|
+
event.preventDefault();
|
|
2079
|
+
event.stopPropagation();
|
|
2080
|
+
}
|
|
2008
2081
|
this.expanded.update((e) => !e);
|
|
2009
2082
|
}
|
|
2010
2083
|
checkActiveState() {
|
|
@@ -2017,12 +2090,12 @@ class StrataSidemenuItemGroupComponent {
|
|
|
2017
2090
|
}
|
|
2018
2091
|
}
|
|
2019
2092
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSidemenuItemGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2020
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
2093
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataSidemenuItemGroupComponent, isStandalone: true, selector: "st-sidemenu-item-group", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "routerLinks", predicate: RouterLinkActive, descendants: true }], ngImport: i0, template: "@if (routerLink()) {\n <a\n stSidemenuItem\n [routerLink]=\"routerLink()\"\n routerLinkActive=\"selected\"\n [active]=\"isHeaderActive\"\n secondaryActionIcon=\"arrow-down\"\n [class.st-sidemenu-item-group-expanded]=\"expanded()\"\n (secondaryAction)=\"toggle($event)\">\n <span class=\"st-sidemenu-item-group-label\">{{ label() }}</span>\n </a>\n} @else if (href()) {\n <a\n stSidemenuItem\n [href]=\"href()\"\n [active]=\"isHeaderActive\"\n secondaryActionIcon=\"arrow-down\"\n [class.st-sidemenu-item-group-expanded]=\"expanded()\"\n (secondaryAction)=\"toggle($event)\">\n <span class=\"st-sidemenu-item-group-label\">{{ label() }}</span>\n </a>\n} @else {\n <button stSidemenuItem type=\"button\" [active]=\"isHeaderActive\" (click)=\"toggle()\">\n <span class=\"st-sidemenu-item-group-label\">{{ label() }}</span>\n <st-icon name=\"arrow-down\" size=\"sm\" class=\"st-sidemenu-item-group-icon\" [class.expanded]=\"expanded()\"></st-icon>\n </button>\n}\n\n\n<div class=\"st-sidemenu-item-group-content\" [hidden]=\"!expanded()\">\n <ng-content></ng-content>\n</div>\n\n", styles: [":host{--st-sidemenu-item-group-gap: var(--st-size-xxxs, 4px);--st-sidemenu-item-group-indent: var(--st-size-sm, 16px);--st-sidemenu-item-group-spacing: var(--st-size-xxxs, 4px);display:flex;flex-direction:column;width:100%}.st-sidemenu-item-group-icon{margin-left:auto;color:var(--st-color-text-secondary);transition:transform .2s ease}.st-sidemenu-item-group-icon.expanded{transform:rotate(180deg)}.st-sidemenu-item-group-content{display:flex;flex-direction:column;gap:var(--st-sidemenu-item-group-gap);padding-left:var(--st-sidemenu-item-group-indent);margin-top:var(--st-sidemenu-item-group-spacing)}.st-sidemenu-item-group-content[hidden]{display:none!important}\n"], dependencies: [{ kind: "directive", type: StrataSidemenuItemDirective, selector: "[stSidemenuItem]", inputs: ["active", "secondaryActionIcon"], outputs: ["secondaryAction"] }, { kind: "component", type: StrataIconComponent, selector: "st-icon", inputs: ["name", "size"], outputs: ["sizeChange"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
|
|
2021
2094
|
}
|
|
2022
2095
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSidemenuItemGroupComponent, decorators: [{
|
|
2023
2096
|
type: Component,
|
|
2024
|
-
args: [{ selector: 'st-sidemenu-item-group', imports: [StrataSidemenuItemDirective, StrataIconComponent], template: "<button stSidemenuItem type=\"button\" [active]=\"
|
|
2025
|
-
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], routerLinks: [{
|
|
2097
|
+
args: [{ selector: 'st-sidemenu-item-group', imports: [StrataSidemenuItemDirective, StrataIconComponent, RouterLink, RouterLinkActive], template: "@if (routerLink()) {\n <a\n stSidemenuItem\n [routerLink]=\"routerLink()\"\n routerLinkActive=\"selected\"\n [active]=\"isHeaderActive\"\n secondaryActionIcon=\"arrow-down\"\n [class.st-sidemenu-item-group-expanded]=\"expanded()\"\n (secondaryAction)=\"toggle($event)\">\n <span class=\"st-sidemenu-item-group-label\">{{ label() }}</span>\n </a>\n} @else if (href()) {\n <a\n stSidemenuItem\n [href]=\"href()\"\n [active]=\"isHeaderActive\"\n secondaryActionIcon=\"arrow-down\"\n [class.st-sidemenu-item-group-expanded]=\"expanded()\"\n (secondaryAction)=\"toggle($event)\">\n <span class=\"st-sidemenu-item-group-label\">{{ label() }}</span>\n </a>\n} @else {\n <button stSidemenuItem type=\"button\" [active]=\"isHeaderActive\" (click)=\"toggle()\">\n <span class=\"st-sidemenu-item-group-label\">{{ label() }}</span>\n <st-icon name=\"arrow-down\" size=\"sm\" class=\"st-sidemenu-item-group-icon\" [class.expanded]=\"expanded()\"></st-icon>\n </button>\n}\n\n\n<div class=\"st-sidemenu-item-group-content\" [hidden]=\"!expanded()\">\n <ng-content></ng-content>\n</div>\n\n", styles: [":host{--st-sidemenu-item-group-gap: var(--st-size-xxxs, 4px);--st-sidemenu-item-group-indent: var(--st-size-sm, 16px);--st-sidemenu-item-group-spacing: var(--st-size-xxxs, 4px);display:flex;flex-direction:column;width:100%}.st-sidemenu-item-group-icon{margin-left:auto;color:var(--st-color-text-secondary);transition:transform .2s ease}.st-sidemenu-item-group-icon.expanded{transform:rotate(180deg)}.st-sidemenu-item-group-content{display:flex;flex-direction:column;gap:var(--st-sidemenu-item-group-gap);padding-left:var(--st-sidemenu-item-group-indent);margin-top:var(--st-sidemenu-item-group-spacing)}.st-sidemenu-item-group-content[hidden]{display:none!important}\n"] }]
|
|
2098
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], routerLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLink", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], routerLinks: [{
|
|
2026
2099
|
type: ContentChildren,
|
|
2027
2100
|
args: [RouterLinkActive, { descendants: true }]
|
|
2028
2101
|
}] } });
|
|
@@ -2608,11 +2681,11 @@ class StrataMessageStateComponent {
|
|
|
2608
2681
|
primaryAction = output();
|
|
2609
2682
|
secondaryAction = output();
|
|
2610
2683
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataMessageStateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2611
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataMessageStateComponent, isStandalone: true, selector: "st-message-state", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: true, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, primaryActionText: { classPropertyName: "primaryActionText", publicName: "primaryActionText", isSignal: true, isRequired: false, transformFunction: null }, primaryActionTheme: { classPropertyName: "primaryActionTheme", publicName: "primaryActionTheme", isSignal: true, isRequired: false, transformFunction: null }, secondaryActionText: { classPropertyName: "secondaryActionText", publicName: "secondaryActionText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { primaryAction: "primaryAction", secondaryAction: "secondaryAction" }, ngImport: i0, template: "<div class=\"st-message-state-graphic\">\n <ng-content></ng-content>\n</div>\n\n<st-text-stack>\n <h3 class=\"st-message-state-header\">{{ header() }}</h3>\n @if (subtitle()) {\n <p class=\"st-message-state-subtitle\">{{ subtitle() }}</p>\n }\n</st-text-stack>\n\n@if (primaryActionText() || secondaryActionText()) {\n <div class=\"st-message-state-actions\">\n @if (secondaryActionText()) {\n <button \n stButton \n variant=\"secondary\" \n (click)=\"secondaryAction.emit()\">\n {{ secondaryActionText() }}\n </button>\n }\n @if (primaryActionText()) {\n <button \n stButton \n variant=\"primary\" \n [stTheme]=\"primaryActionTheme() || 'default'\" \n (click)=\"primaryAction.emit()\">\n {{ primaryActionText() }}\n </button>\n }\n </div>\n}\n", styles: [":host{--st-message-state-align-items: center;--st-message-state-text-align: center;--st-message-state-gap: var(--st-size-lg, 32px);--st-message-state-content-gap: var(--st-size-xxs, 8px);--st-message-state-actions-gap: var(--st-size-sm, 16px);--st-message-state-padding: var(--st-size-lg, 32px);display:flex;flex-direction:column;align-items:var(--st-message-state-align-items);text-align:var(--st-message-state-text-align);gap:var(--st-message-state-gap);padding:var(--st-message-state-padding);width:100%;box-sizing:border-box}.st-message-state-graphic{display:flex;justify-content:center;align-items:center}.st-message-state-content{display:flex;flex-direction:column;align-items:var(--st-message-state-align-items);gap:var(--st-message-state-content-gap);width:100%}.st-message-state-header{color:var(--st-color-text-primary);margin:0}.st-message-state-subtitle{color:var(--st-color-text-secondary);margin:0}.st-message-state-actions{display:flex;justify-content:center;gap:var(--st-message-state-actions-gap)}\n"], dependencies: [{ kind: "component", type: StrataTextStackComponent, selector: "st-text-stack", inputs: ["overflow"] }, { kind: "directive", type: StrataButtonDirective, selector: "[stButton]", inputs: ["variant", "size", "fullWidth"] }, { kind: "directive", type: StrataThemeDirective, selector: "[stTheme]", inputs: ["stTheme"] }] });
|
|
2684
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataMessageStateComponent, isStandalone: true, selector: "st-message-state", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: true, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, primaryActionText: { classPropertyName: "primaryActionText", publicName: "primaryActionText", isSignal: true, isRequired: false, transformFunction: null }, primaryActionTheme: { classPropertyName: "primaryActionTheme", publicName: "primaryActionTheme", isSignal: true, isRequired: false, transformFunction: null }, secondaryActionText: { classPropertyName: "secondaryActionText", publicName: "secondaryActionText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { primaryAction: "primaryAction", secondaryAction: "secondaryAction" }, ngImport: i0, template: "<div class=\"st-message-state-graphic\">\n <ng-content></ng-content>\n</div>\n\n<st-text-stack overflow=\"wrap\">\n <h3 class=\"st-message-state-header\">{{ header() }}</h3>\n @if (subtitle()) {\n <p class=\"st-message-state-subtitle\">{{ subtitle() }}</p>\n }\n</st-text-stack>\n\n@if (primaryActionText() || secondaryActionText()) {\n <div class=\"st-message-state-actions\">\n @if (secondaryActionText()) {\n <button \n stButton \n variant=\"secondary\" \n (click)=\"secondaryAction.emit()\">\n {{ secondaryActionText() }}\n </button>\n }\n @if (primaryActionText()) {\n <button \n stButton \n variant=\"primary\" \n [stTheme]=\"primaryActionTheme() || 'default'\" \n (click)=\"primaryAction.emit()\">\n {{ primaryActionText() }}\n </button>\n }\n </div>\n}\n", styles: [":host{--st-message-state-align-items: center;--st-message-state-text-align: center;--st-message-state-gap: var(--st-size-lg, 32px);--st-message-state-content-gap: var(--st-size-xxs, 8px);--st-message-state-actions-gap: var(--st-size-sm, 16px);--st-message-state-padding: var(--st-size-lg, 32px);display:flex;flex-direction:column;align-items:var(--st-message-state-align-items);text-align:var(--st-message-state-text-align);gap:var(--st-message-state-gap);padding:var(--st-message-state-padding);width:100%;box-sizing:border-box}.st-message-state-graphic{display:flex;justify-content:center;align-items:center}.st-message-state-content{display:flex;flex-direction:column;align-items:var(--st-message-state-align-items);gap:var(--st-message-state-content-gap);width:100%}.st-message-state-header{color:var(--st-color-text-primary);margin:0}.st-message-state-subtitle{color:var(--st-color-text-secondary);margin:0}.st-message-state-actions{display:flex;justify-content:center;gap:var(--st-message-state-actions-gap)}\n"], dependencies: [{ kind: "component", type: StrataTextStackComponent, selector: "st-text-stack", inputs: ["overflow"] }, { kind: "directive", type: StrataButtonDirective, selector: "[stButton]", inputs: ["variant", "size", "fullWidth"] }, { kind: "directive", type: StrataThemeDirective, selector: "[stTheme]", inputs: ["stTheme"] }] });
|
|
2612
2685
|
}
|
|
2613
2686
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataMessageStateComponent, decorators: [{
|
|
2614
2687
|
type: Component,
|
|
2615
|
-
args: [{ selector: 'st-message-state', imports: [StrataTextStackComponent, StrataButtonDirective, StrataThemeDirective], template: "<div class=\"st-message-state-graphic\">\n <ng-content></ng-content>\n</div>\n\n<st-text-stack>\n <h3 class=\"st-message-state-header\">{{ header() }}</h3>\n @if (subtitle()) {\n <p class=\"st-message-state-subtitle\">{{ subtitle() }}</p>\n }\n</st-text-stack>\n\n@if (primaryActionText() || secondaryActionText()) {\n <div class=\"st-message-state-actions\">\n @if (secondaryActionText()) {\n <button \n stButton \n variant=\"secondary\" \n (click)=\"secondaryAction.emit()\">\n {{ secondaryActionText() }}\n </button>\n }\n @if (primaryActionText()) {\n <button \n stButton \n variant=\"primary\" \n [stTheme]=\"primaryActionTheme() || 'default'\" \n (click)=\"primaryAction.emit()\">\n {{ primaryActionText() }}\n </button>\n }\n </div>\n}\n", styles: [":host{--st-message-state-align-items: center;--st-message-state-text-align: center;--st-message-state-gap: var(--st-size-lg, 32px);--st-message-state-content-gap: var(--st-size-xxs, 8px);--st-message-state-actions-gap: var(--st-size-sm, 16px);--st-message-state-padding: var(--st-size-lg, 32px);display:flex;flex-direction:column;align-items:var(--st-message-state-align-items);text-align:var(--st-message-state-text-align);gap:var(--st-message-state-gap);padding:var(--st-message-state-padding);width:100%;box-sizing:border-box}.st-message-state-graphic{display:flex;justify-content:center;align-items:center}.st-message-state-content{display:flex;flex-direction:column;align-items:var(--st-message-state-align-items);gap:var(--st-message-state-content-gap);width:100%}.st-message-state-header{color:var(--st-color-text-primary);margin:0}.st-message-state-subtitle{color:var(--st-color-text-secondary);margin:0}.st-message-state-actions{display:flex;justify-content:center;gap:var(--st-message-state-actions-gap)}\n"] }]
|
|
2688
|
+
args: [{ selector: 'st-message-state', imports: [StrataTextStackComponent, StrataButtonDirective, StrataThemeDirective], template: "<div class=\"st-message-state-graphic\">\n <ng-content></ng-content>\n</div>\n\n<st-text-stack overflow=\"wrap\">\n <h3 class=\"st-message-state-header\">{{ header() }}</h3>\n @if (subtitle()) {\n <p class=\"st-message-state-subtitle\">{{ subtitle() }}</p>\n }\n</st-text-stack>\n\n@if (primaryActionText() || secondaryActionText()) {\n <div class=\"st-message-state-actions\">\n @if (secondaryActionText()) {\n <button \n stButton \n variant=\"secondary\" \n (click)=\"secondaryAction.emit()\">\n {{ secondaryActionText() }}\n </button>\n }\n @if (primaryActionText()) {\n <button \n stButton \n variant=\"primary\" \n [stTheme]=\"primaryActionTheme() || 'default'\" \n (click)=\"primaryAction.emit()\">\n {{ primaryActionText() }}\n </button>\n }\n </div>\n}\n", styles: [":host{--st-message-state-align-items: center;--st-message-state-text-align: center;--st-message-state-gap: var(--st-size-lg, 32px);--st-message-state-content-gap: var(--st-size-xxs, 8px);--st-message-state-actions-gap: var(--st-size-sm, 16px);--st-message-state-padding: var(--st-size-lg, 32px);display:flex;flex-direction:column;align-items:var(--st-message-state-align-items);text-align:var(--st-message-state-text-align);gap:var(--st-message-state-gap);padding:var(--st-message-state-padding);width:100%;box-sizing:border-box}.st-message-state-graphic{display:flex;justify-content:center;align-items:center}.st-message-state-content{display:flex;flex-direction:column;align-items:var(--st-message-state-align-items);gap:var(--st-message-state-content-gap);width:100%}.st-message-state-header{color:var(--st-color-text-primary);margin:0}.st-message-state-subtitle{color:var(--st-color-text-secondary);margin:0}.st-message-state-actions{display:flex;justify-content:center;gap:var(--st-message-state-actions-gap)}\n"] }]
|
|
2616
2689
|
}], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: true }] }], subtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subtitle", required: false }] }], primaryActionText: [{ type: i0.Input, args: [{ isSignal: true, alias: "primaryActionText", required: false }] }], primaryActionTheme: [{ type: i0.Input, args: [{ isSignal: true, alias: "primaryActionTheme", required: false }] }], secondaryActionText: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryActionText", required: false }] }], primaryAction: [{ type: i0.Output, args: ["primaryAction"] }], secondaryAction: [{ type: i0.Output, args: ["secondaryAction"] }] } });
|
|
2617
2690
|
|
|
2618
2691
|
/*
|