ngx-strata 0.2.0 → 0.2.1
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/_breadcrumb.scss +68 -0
- package/assets/styles/components/action-menu.scss +12 -1
- package/assets/styles/components/card.scss +1 -1
- package/assets/styles/components/icon.scss +5 -0
- package/assets/styles/components/item.scss +11 -1
- package/assets/styles/components/overlay.scss +4 -0
- package/assets/styles/components/segmented-control.scss +17 -2
- package/assets/styles/components/select.scss +16 -26
- package/assets/styles/components/sidemenu.scss +7 -0
- package/assets/styles/components/toggle.scss +40 -13
- package/assets/styles/public-api.scss +1 -0
- package/assets/styles/typography.scss +0 -1
- package/dist/strata/strata.css +1 -1
- package/fesm2022/ngx-strata.mjs +362 -229
- package/fesm2022/ngx-strata.mjs.map +1 -1
- package/package.json +1 -1
- package/skills/ngx-strata/SKILL.md +106 -0
- package/skills/ngx-strata/components/accordion.md +38 -0
- package/skills/ngx-strata/components/action-menu.md +36 -0
- package/skills/ngx-strata/components/alert.md +28 -0
- package/skills/ngx-strata/components/avatar.md +33 -0
- package/skills/ngx-strata/components/breadcrumb.md +32 -0
- package/skills/ngx-strata/components/button.md +34 -0
- package/skills/ngx-strata/components/card.md +24 -0
- package/skills/ngx-strata/components/checkbox.md +22 -0
- package/skills/ngx-strata/components/divider.md +19 -0
- package/skills/ngx-strata/components/icon.md +21 -0
- package/skills/ngx-strata/components/input-field.md +29 -0
- package/skills/ngx-strata/components/item.md +31 -0
- package/skills/ngx-strata/components/kbd.md +18 -0
- package/skills/ngx-strata/components/message-state.md +32 -0
- package/skills/ngx-strata/components/modal.md +86 -0
- package/skills/ngx-strata/components/notification.md +46 -0
- package/skills/ngx-strata/components/number-display.md +26 -0
- package/skills/ngx-strata/components/overlay.md +20 -0
- package/skills/ngx-strata/components/pagination.md +23 -0
- package/skills/ngx-strata/components/progress.md +46 -0
- package/skills/ngx-strata/components/radio.md +29 -0
- package/skills/ngx-strata/components/segmented-control.md +38 -0
- package/skills/ngx-strata/components/shell.md +18 -0
- package/skills/ngx-strata/components/sidemenu.md +41 -0
- package/skills/ngx-strata/components/single-select.md +45 -0
- package/skills/ngx-strata/components/slider.md +24 -0
- package/skills/ngx-strata/components/spinner.md +17 -0
- package/skills/ngx-strata/components/tabs.md +27 -0
- package/skills/ngx-strata/components/tag.md +17 -0
- package/skills/ngx-strata/components/text-stack.md +21 -0
- package/skills/ngx-strata/components/theming.md +19 -0
- package/skills/ngx-strata/components/toggle.md +22 -0
- package/types/ngx-strata.d.ts +102 -67
package/fesm2022/ngx-strata.mjs
CHANGED
|
@@ -1,16 +1,46 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { inject, ElementRef, input, model, output, computed, Directive, Injectable, provideAppInitializer, makeEnvironmentProviders, InjectionToken, DOCUMENT, Input, Inject, signal, effect, DestroyRef, HostListener, Component, contentChild, HostBinding, ViewContainerRef, viewChild, contentChildren, Renderer2, TemplateRef, Pipe, booleanAttribute, ContentChildren, Injector, LOCALE_ID } from '@angular/core';
|
|
3
3
|
import { computePosition, offset, arrow, autoUpdate, flip, shift } from '@floating-ui/dom';
|
|
4
|
-
import { Observable, tap, map, fromEvent,
|
|
4
|
+
import { Observable, tap, map, fromEvent, switchMap, filter } from 'rxjs';
|
|
5
5
|
import { HttpClient } from '@angular/common/http';
|
|
6
6
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
7
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
8
|
-
import * as i1 from '@angular/
|
|
7
|
+
import { takeUntilDestroyed, toSignal, toObservable } from '@angular/core/rxjs-interop';
|
|
8
|
+
import * as i1 from '@angular/common';
|
|
9
|
+
import { CommonModule, NgTemplateOutlet, DecimalPipe, formatNumber, getLocaleNumberSymbol, NumberSymbol } from '@angular/common';
|
|
10
|
+
import * as i1$1 from '@angular/forms';
|
|
9
11
|
import { FormsModule } from '@angular/forms';
|
|
10
|
-
import * as i2 from '@angular/common';
|
|
11
|
-
import { NgTemplateOutlet, CommonModule, DecimalPipe, formatNumber, getLocaleNumberSymbol, NumberSymbol } from '@angular/common';
|
|
12
12
|
import { Router, NavigationEnd, RouterLinkActive } from '@angular/router';
|
|
13
13
|
|
|
14
|
+
class StrataActivatableDirective {
|
|
15
|
+
_elementRef = inject(ElementRef);
|
|
16
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
17
|
+
interactable = model(true, ...(ngDevMode ? [{ debugName: "interactable" }] : []));
|
|
18
|
+
activated = output();
|
|
19
|
+
isFocusable = computed(() => this.interactable() && !this.disabled(), ...(ngDevMode ? [{ debugName: "isFocusable" }] : []));
|
|
20
|
+
onKeyDown(event) {
|
|
21
|
+
if (!this.isFocusable()) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (event.key === ' ' || event.key === 'Enter') {
|
|
25
|
+
event.preventDefault();
|
|
26
|
+
this.activated.emit(event);
|
|
27
|
+
this._elementRef.nativeElement.click();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataActivatableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
31
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", 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 });
|
|
32
|
+
}
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataActivatableDirective, decorators: [{
|
|
34
|
+
type: Directive,
|
|
35
|
+
args: [{
|
|
36
|
+
selector: '[stActivatable]',
|
|
37
|
+
host: {
|
|
38
|
+
'(keydown)': 'onKeyDown($event)',
|
|
39
|
+
'[attr.tabindex]': 'isFocusable() ? "0" : null',
|
|
40
|
+
},
|
|
41
|
+
}]
|
|
42
|
+
}], 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"] }] } });
|
|
43
|
+
|
|
14
44
|
class IconLoader {
|
|
15
45
|
}
|
|
16
46
|
|
|
@@ -467,41 +497,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
467
497
|
}] } });
|
|
468
498
|
|
|
469
499
|
class StrataToggleComponent {
|
|
500
|
+
_activatable = inject(StrataActivatableDirective);
|
|
470
501
|
checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : []));
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
get isChecked() {
|
|
476
|
-
return this.checked();
|
|
477
|
-
}
|
|
478
|
-
onCheckChanged() {
|
|
502
|
+
label = input(undefined, ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
503
|
+
labelPosition = input('after', ...(ngDevMode ? [{ debugName: "labelPosition" }] : []));
|
|
504
|
+
disabled = this._activatable.disabled;
|
|
505
|
+
onCheckChanged(event) {
|
|
479
506
|
if (this.disabled()) {
|
|
480
507
|
return;
|
|
481
508
|
}
|
|
509
|
+
if (event) {
|
|
510
|
+
event.stopPropagation();
|
|
511
|
+
}
|
|
482
512
|
this.checked.set(!this.checked());
|
|
483
513
|
}
|
|
484
514
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
485
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
515
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: StrataToggleComponent, isStandalone: true, selector: "st-toggle", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, host: { attributes: { "role": "switch" }, listeners: { "click": "onCheckChanged($event)" }, properties: { "attr.aria-checked": "checked()", "attr.aria-disabled": "disabled()", "attr.data-checked": "checked()", "attr.data-disabled": "disabled()", "class.st-toggle-label-before": "labelPosition() === 'before'", "class.st-toggle-label-after": "labelPosition() === 'after'" } }, hostDirectives: [{ directive: StrataActivatableDirective, inputs: ["disabled", "disabled"], outputs: ["activated", "activated"] }], ngImport: i0, template: "<div class=\"st-toggle-track\">\n <div class=\"toggle-handle\"></div>\n</div>\n@if (label()) {\n <span class=\"st-toggle-label\">{{ label() }}</span>\n}\n<ng-content></ng-content>\n" });
|
|
486
516
|
}
|
|
487
517
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataToggleComponent, decorators: [{
|
|
488
518
|
type: Component,
|
|
489
|
-
args: [{ selector: 'st-toggle', imports: [],
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
519
|
+
args: [{ selector: 'st-toggle', imports: [], hostDirectives: [
|
|
520
|
+
{
|
|
521
|
+
directive: StrataActivatableDirective,
|
|
522
|
+
inputs: ['disabled'],
|
|
523
|
+
outputs: ['activated'],
|
|
524
|
+
},
|
|
525
|
+
], host: {
|
|
526
|
+
'(click)': 'onCheckChanged($event)',
|
|
527
|
+
role: 'switch',
|
|
528
|
+
'[attr.aria-checked]': 'checked()',
|
|
529
|
+
'[attr.aria-disabled]': 'disabled()',
|
|
530
|
+
'[attr.data-checked]': 'checked()',
|
|
531
|
+
'[attr.data-disabled]': 'disabled()',
|
|
532
|
+
'[class.st-toggle-label-before]': "labelPosition() === 'before'",
|
|
533
|
+
'[class.st-toggle-label-after]': "labelPosition() === 'after'",
|
|
534
|
+
}, template: "<div class=\"st-toggle-track\">\n <div class=\"toggle-handle\"></div>\n</div>\n@if (label()) {\n <span class=\"st-toggle-label\">{{ label() }}</span>\n}\n<ng-content></ng-content>\n" }]
|
|
535
|
+
}], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }] } });
|
|
500
536
|
|
|
501
537
|
class StrataActionMenuItemComponent {
|
|
502
538
|
checkbox = contentChild(StrataCheckboxComponent, { ...(ngDevMode ? { debugName: "checkbox" } : {}), read: ElementRef });
|
|
503
539
|
toggle = contentChild(StrataToggleComponent, { ...(ngDevMode ? { debugName: "toggle" } : {}), read: ElementRef });
|
|
504
540
|
closeMenuOnClick = input(true, ...(ngDevMode ? [{ debugName: "closeMenuOnClick" }] : []));
|
|
541
|
+
active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : []));
|
|
542
|
+
get isActive() {
|
|
543
|
+
return this.active();
|
|
544
|
+
}
|
|
505
545
|
menuItemClicked = output();
|
|
506
546
|
elementRef = inject(ElementRef);
|
|
507
547
|
onHostClick(event) {
|
|
@@ -511,12 +551,15 @@ class StrataActionMenuItemComponent {
|
|
|
511
551
|
this.toggle()?.nativeElement.click();
|
|
512
552
|
}
|
|
513
553
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataActionMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
514
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.0", type: StrataActionMenuItemComponent, isStandalone: true, selector: "st-action-menu-item", inputs: { closeMenuOnClick: { classPropertyName: "closeMenuOnClick", publicName: "closeMenuOnClick", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuItemClicked: "menuItemClicked" }, host: { listeners: { "click": "onHostClick($event)" } }, queries: [{ propertyName: "checkbox", first: true, predicate: StrataCheckboxComponent, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "toggle", first: true, predicate: StrataToggleComponent, descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<span class=\"item-start\">\n <ng-content select=\"[area='start']\"></ng-content\n></span>\n<span class=\"item-default\"> <ng-content></ng-content></span>\n<span class=\"item-end\">\n <ng-content select=\"[area='end']\"></ng-content>\n</span>\n", styles: [":host{height:48px}\n"] });
|
|
554
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.0", type: StrataActionMenuItemComponent, isStandalone: true, selector: "st-action-menu-item", inputs: { closeMenuOnClick: { classPropertyName: "closeMenuOnClick", publicName: "closeMenuOnClick", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuItemClicked: "menuItemClicked" }, host: { listeners: { "click": "onHostClick($event)" }, properties: { "class.active": "this.isActive" } }, queries: [{ propertyName: "checkbox", first: true, predicate: StrataCheckboxComponent, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "toggle", first: true, predicate: StrataToggleComponent, descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<span class=\"item-start\">\n <ng-content select=\"[area='start']\"></ng-content\n></span>\n<span class=\"item-default\"> <ng-content></ng-content></span>\n<span class=\"item-end\">\n <ng-content select=\"[area='end']\"></ng-content>\n</span>\n", styles: [":host{height:48px}\n"] });
|
|
515
555
|
}
|
|
516
556
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataActionMenuItemComponent, decorators: [{
|
|
517
557
|
type: Component,
|
|
518
558
|
args: [{ selector: 'st-action-menu-item', imports: [], template: "<span class=\"item-start\">\n <ng-content select=\"[area='start']\"></ng-content\n></span>\n<span class=\"item-default\"> <ng-content></ng-content></span>\n<span class=\"item-end\">\n <ng-content select=\"[area='end']\"></ng-content>\n</span>\n", styles: [":host{height:48px}\n"] }]
|
|
519
|
-
}], propDecorators: { checkbox: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StrataCheckboxComponent), { ...{ read: ElementRef }, isSignal: true }] }], toggle: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StrataToggleComponent), { ...{ read: ElementRef }, isSignal: true }] }], closeMenuOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeMenuOnClick", required: false }] }],
|
|
559
|
+
}], propDecorators: { checkbox: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StrataCheckboxComponent), { ...{ read: ElementRef }, isSignal: true }] }], toggle: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StrataToggleComponent), { ...{ read: ElementRef }, isSignal: true }] }], closeMenuOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeMenuOnClick", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], isActive: [{
|
|
560
|
+
type: HostBinding,
|
|
561
|
+
args: ['class.active']
|
|
562
|
+
}], menuItemClicked: [{ type: i0.Output, args: ["menuItemClicked"] }], onHostClick: [{
|
|
520
563
|
type: HostListener,
|
|
521
564
|
args: ['click', ['$event']]
|
|
522
565
|
}] } });
|
|
@@ -638,62 +681,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
638
681
|
}] } });
|
|
639
682
|
|
|
640
683
|
class StrataIconComponent {
|
|
641
|
-
defaultIcon = 'question';
|
|
642
|
-
name = input.required(...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
643
|
-
size = model('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
644
|
-
get sizeClass() {
|
|
645
|
-
return this.size() === 'xs';
|
|
646
|
-
}
|
|
647
|
-
get sizeSmClass() {
|
|
648
|
-
return this.size() === 'sm';
|
|
649
|
-
}
|
|
650
|
-
get sizeMdClass() {
|
|
651
|
-
return this.size() === 'md';
|
|
652
|
-
}
|
|
653
|
-
get sizeLgClass() {
|
|
654
|
-
return this.size() === 'lg';
|
|
655
|
-
}
|
|
656
|
-
svgMarkdown;
|
|
657
|
-
iconSubscription;
|
|
658
684
|
iconRegistry = inject(IconRegistry);
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
ngOnChanges() {
|
|
665
|
-
const name = this.name();
|
|
666
|
-
if (!name) {
|
|
667
|
-
this.setIcon(this.defaultIcon);
|
|
668
|
-
}
|
|
669
|
-
else {
|
|
670
|
-
this.setIcon(name);
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
setIcon(iconName) {
|
|
674
|
-
this.iconSubscription = this.iconRegistry.getIcon(iconName).subscribe((value) => {
|
|
675
|
-
this.svgMarkdown = value;
|
|
676
|
-
});
|
|
677
|
-
}
|
|
685
|
+
name = input('question', ...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
686
|
+
size = model('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
687
|
+
svgMarkdown = toSignal(toObservable(this.name).pipe(switchMap((name) => this.iconRegistry.getIcon(name || 'question'))));
|
|
678
688
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
679
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type: StrataIconComponent, isStandalone: true, selector: "st-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired:
|
|
689
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type: StrataIconComponent, isStandalone: true, selector: "st-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { size: "sizeChange" }, host: { properties: { "class.xs": "size() === \"xs\"", "class.sm": "size() === \"sm\"", "class.md": "size() === \"md\"", "class.lg": "size() === \"lg\"" } }, ngImport: i0, template: "<span [innerHTML]=\"svgMarkdown()\"></span>\n" });
|
|
680
690
|
}
|
|
681
691
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataIconComponent, decorators: [{
|
|
682
692
|
type: Component,
|
|
683
|
-
args: [{ selector: 'st-icon', imports: [],
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
}], sizeMdClass: [{
|
|
691
|
-
type: HostBinding,
|
|
692
|
-
args: ['class.md']
|
|
693
|
-
}], sizeLgClass: [{
|
|
694
|
-
type: HostBinding,
|
|
695
|
-
args: ['class.lg']
|
|
696
|
-
}] } });
|
|
693
|
+
args: [{ selector: 'st-icon', imports: [], host: {
|
|
694
|
+
'[class.xs]': 'size() === "xs"',
|
|
695
|
+
'[class.sm]': 'size() === "sm"',
|
|
696
|
+
'[class.md]': 'size() === "md"',
|
|
697
|
+
'[class.lg]': 'size() === "lg"',
|
|
698
|
+
}, template: "<span [innerHTML]=\"svgMarkdown()\"></span>\n" }]
|
|
699
|
+
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }, { type: i0.Output, args: ["sizeChange"] }] } });
|
|
697
700
|
|
|
698
701
|
class StrataOverlayDirective {
|
|
699
702
|
stOverlay = input.required(...(ngDevMode ? [{ debugName: "stOverlay" }] : []));
|
|
@@ -704,6 +707,7 @@ class StrataOverlayDirective {
|
|
|
704
707
|
viewContainerRef = inject(ViewContainerRef);
|
|
705
708
|
overlayEl;
|
|
706
709
|
cleanup;
|
|
710
|
+
viewRef;
|
|
707
711
|
ngOnChanges() {
|
|
708
712
|
if (this.overlayOpen()) {
|
|
709
713
|
this.create();
|
|
@@ -715,9 +719,9 @@ class StrataOverlayDirective {
|
|
|
715
719
|
async create() {
|
|
716
720
|
if (this.overlayEl)
|
|
717
721
|
return;
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
this.overlayEl =
|
|
722
|
+
this.viewRef = this.viewContainerRef.createEmbeddedView(this.stOverlay());
|
|
723
|
+
this.viewRef.detectChanges();
|
|
724
|
+
this.overlayEl = this.viewRef.rootNodes[0];
|
|
721
725
|
document.body.appendChild(this.overlayEl);
|
|
722
726
|
this.cleanup = autoUpdate(this.element.nativeElement, this.overlayEl, () => this.updatePosition());
|
|
723
727
|
}
|
|
@@ -726,15 +730,17 @@ class StrataOverlayDirective {
|
|
|
726
730
|
return;
|
|
727
731
|
const { x, y } = await computePosition(this.element.nativeElement, this.overlayEl, {
|
|
728
732
|
placement: this.overlayPlacement(),
|
|
733
|
+
strategy: 'fixed',
|
|
729
734
|
middleware: [offset(this.overlayOffset()), flip(), shift()],
|
|
730
735
|
});
|
|
731
736
|
if (!this.overlayEl)
|
|
732
737
|
return;
|
|
733
738
|
const { width } = this.element.nativeElement.getBoundingClientRect();
|
|
734
739
|
Object.assign(this.overlayEl.style, {
|
|
735
|
-
position: '
|
|
740
|
+
position: 'fixed',
|
|
736
741
|
left: `${x}px`,
|
|
737
742
|
top: `${y}px`,
|
|
743
|
+
zIndex: '10000',
|
|
738
744
|
});
|
|
739
745
|
this.overlayEl.style.setProperty('--st-overlay-anchor-element-width', `${width}px`);
|
|
740
746
|
}
|
|
@@ -743,6 +749,10 @@ class StrataOverlayDirective {
|
|
|
743
749
|
this.cleanup();
|
|
744
750
|
if (this.overlayEl)
|
|
745
751
|
this.overlayEl.remove();
|
|
752
|
+
if (this.viewRef) {
|
|
753
|
+
this.viewRef.destroy();
|
|
754
|
+
this.viewRef = undefined;
|
|
755
|
+
}
|
|
746
756
|
this.overlayEl = undefined;
|
|
747
757
|
}
|
|
748
758
|
ngOnDestroy() {
|
|
@@ -833,6 +843,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
833
843
|
args: [{ selector: 'st-alert', imports: [StrataIconComponent, StrataButtonDirective, StrataTextStackComponent], template: "<div class=\"st-alert-container\">\n @if (iconName()) {\n <div class=\"st-alert-icon\">\n <st-icon [name]=\"iconName()!\"></st-icon>\n </div>\n }\n\n <div class=\"st-alert-content\">\n <st-text-stack overflow=\"wrap\">\n @if (header()) {\n <p class=\"st-body-bold st-alert-header\">{{ header() }}</p>\n }\n <p class=\"st-alert-message\">{{ message() }}</p>\n </st-text-stack>\n </div>\n\n\n\n\n <div class=\"st-alert-actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n\n @if (dismissible()) {\n <button stButton variant=\"ghost\" size=\"sm\" class=\"st-alert-dismiss\" (click)=\"dismiss.emit()\"\n aria-label=\"Dismiss alert\">\n <st-icon name=\"close\"></st-icon>\n </button>\n }\n</div>" }]
|
|
834
844
|
}], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: true }] }], iconName: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconName", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], dismiss: [{ type: i0.Output, args: ["dismiss"] }] } });
|
|
835
845
|
|
|
846
|
+
class StrataBreadcrumbItemComponent {
|
|
847
|
+
text = input.required(...(ngDevMode ? [{ debugName: "text" }] : []));
|
|
848
|
+
icon = input(...(ngDevMode ? [undefined, { debugName: "icon" }] : []));
|
|
849
|
+
interactable = input(false, ...(ngDevMode ? [{ debugName: "interactable" }] : []));
|
|
850
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
851
|
+
activated = output();
|
|
852
|
+
separatorIcon = signal(undefined, ...(ngDevMode ? [{ debugName: "separatorIcon" }] : []));
|
|
853
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataBreadcrumbItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
854
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: StrataBreadcrumbItemComponent, isStandalone: true, selector: "st-breadcrumb-item", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, interactable: { classPropertyName: "interactable", publicName: "interactable", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activated: "activated" }, host: { classAttribute: "st-breadcrumb-item" }, ngImport: i0, template: "<li class=\"st-breadcrumb-item-container\">\n <div class=\"st-breadcrumb-item-content\"\n stActivatable\n [interactable]=\"interactable()\"\n [disabled]=\"disabled()\"\n (click)=\"activated.emit($event)\">\n @if (icon()) {\n <st-icon [name]=\"icon()!\" size=\"sm\" class=\"st-breadcrumb-item-icon\"></st-icon>\n }\n <span class=\"st-breadcrumb-item-text\">{{ text() }}</span>\n </div>\n\n @if (separatorIcon()) {\n <st-icon [name]=\"separatorIcon()!\" size=\"sm\" class=\"st-breadcrumb-separator\"></st-icon>\n }\n</li>\n", dependencies: [{ kind: "component", type: StrataIconComponent, selector: "st-icon", inputs: ["name", "size"], outputs: ["sizeChange"] }, { kind: "directive", type: StrataActivatableDirective, selector: "[stActivatable]", inputs: ["disabled", "interactable"], outputs: ["interactableChange", "activated"] }] });
|
|
855
|
+
}
|
|
856
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataBreadcrumbItemComponent, decorators: [{
|
|
857
|
+
type: Component,
|
|
858
|
+
args: [{ selector: 'st-breadcrumb-item', imports: [StrataIconComponent, StrataActivatableDirective], host: {
|
|
859
|
+
'class': 'st-breadcrumb-item',
|
|
860
|
+
}, template: "<li class=\"st-breadcrumb-item-container\">\n <div class=\"st-breadcrumb-item-content\"\n stActivatable\n [interactable]=\"interactable()\"\n [disabled]=\"disabled()\"\n (click)=\"activated.emit($event)\">\n @if (icon()) {\n <st-icon [name]=\"icon()!\" size=\"sm\" class=\"st-breadcrumb-item-icon\"></st-icon>\n }\n <span class=\"st-breadcrumb-item-text\">{{ text() }}</span>\n </div>\n\n @if (separatorIcon()) {\n <st-icon [name]=\"separatorIcon()!\" size=\"sm\" class=\"st-breadcrumb-separator\"></st-icon>\n }\n</li>\n" }]
|
|
861
|
+
}], propDecorators: { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: true }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], interactable: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactable", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], activated: [{ type: i0.Output, args: ["activated"] }] } });
|
|
862
|
+
|
|
863
|
+
class StrataBreadcrumbComponent {
|
|
864
|
+
separatorIcon = input('arrow-right', ...(ngDevMode ? [{ debugName: "separatorIcon" }] : []));
|
|
865
|
+
items = contentChildren(StrataBreadcrumbItemComponent, { ...(ngDevMode ? { debugName: "items" } : {}), descendants: true });
|
|
866
|
+
constructor() {
|
|
867
|
+
effect(() => {
|
|
868
|
+
const items = this.items();
|
|
869
|
+
const separator = this.separatorIcon();
|
|
870
|
+
items.forEach((item, index) => {
|
|
871
|
+
const isLast = index === items.length - 1;
|
|
872
|
+
item.separatorIcon.set(isLast ? undefined : separator);
|
|
873
|
+
});
|
|
874
|
+
});
|
|
875
|
+
}
|
|
876
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataBreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
877
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.0", type: StrataBreadcrumbComponent, isStandalone: true, selector: "st-breadcrumb", inputs: { separatorIcon: { classPropertyName: "separatorIcon", publicName: "separatorIcon", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "st-breadcrumb" }, queries: [{ propertyName: "items", predicate: StrataBreadcrumbItemComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<nav aria-label=\"Breadcrumb\">\n <ol class=\"st-breadcrumb-list\">\n <ng-content></ng-content>\n </ol>\n</nav>\n" });
|
|
878
|
+
}
|
|
879
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataBreadcrumbComponent, decorators: [{
|
|
880
|
+
type: Component,
|
|
881
|
+
args: [{ selector: 'st-breadcrumb', imports: [], host: {
|
|
882
|
+
'class': 'st-breadcrumb',
|
|
883
|
+
}, template: "<nav aria-label=\"Breadcrumb\">\n <ol class=\"st-breadcrumb-list\">\n <ng-content></ng-content>\n </ol>\n</nav>\n" }]
|
|
884
|
+
}], ctorParameters: () => [], propDecorators: { separatorIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "separatorIcon", required: false }] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => StrataBreadcrumbItemComponent), { ...{ descendants: true }, isSignal: true }] }] } });
|
|
885
|
+
|
|
836
886
|
class StrataAccordionItemComponent {
|
|
837
887
|
title = input.required(...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
838
888
|
open = model(false, ...(ngDevMode ? [{ debugName: "open" }] : []));
|
|
@@ -1049,7 +1099,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1049
1099
|
descendants: true,
|
|
1050
1100
|
}, isSignal: true }] }] } });
|
|
1051
1101
|
|
|
1052
|
-
class
|
|
1102
|
+
class StrataSelectItemComponent {
|
|
1103
|
+
value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
1104
|
+
text = input.required(...(ngDevMode ? [{ debugName: "text" }] : []));
|
|
1105
|
+
itemClicked = output();
|
|
1106
|
+
hidden = signal(false, ...(ngDevMode ? [{ debugName: "hidden" }] : []));
|
|
1107
|
+
elementRef = inject(ElementRef);
|
|
1108
|
+
get display() {
|
|
1109
|
+
return this.hidden() ? 'none' : 'block';
|
|
1110
|
+
}
|
|
1111
|
+
onClick(event) {
|
|
1112
|
+
this.itemClicked.emit(this);
|
|
1113
|
+
event.stopPropagation();
|
|
1114
|
+
}
|
|
1115
|
+
onMouseOver(event) {
|
|
1116
|
+
event.stopPropagation();
|
|
1117
|
+
event.stopImmediatePropagation();
|
|
1118
|
+
event.preventDefault();
|
|
1119
|
+
}
|
|
1120
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataSelectItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1121
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type: StrataSelectItemComponent, isStandalone: true, selector: "st-select-item", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { itemClicked: "itemClicked" }, host: { listeners: { "click": "onClick($event)", "mouseover": "onMouseOver($event)" }, properties: { "style.display": "this.display" }, classAttribute: "single-select-item" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
|
|
1122
|
+
}
|
|
1123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataSelectItemComponent, decorators: [{
|
|
1124
|
+
type: Component,
|
|
1125
|
+
args: [{
|
|
1126
|
+
selector: 'st-select-item',
|
|
1127
|
+
imports: [],
|
|
1128
|
+
template: '<ng-content></ng-content>',
|
|
1129
|
+
host: {
|
|
1130
|
+
class: 'single-select-item',
|
|
1131
|
+
},
|
|
1132
|
+
}]
|
|
1133
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: true }] }], itemClicked: [{ type: i0.Output, args: ["itemClicked"] }], display: [{
|
|
1134
|
+
type: HostBinding,
|
|
1135
|
+
args: ['style.display']
|
|
1136
|
+
}], onClick: [{
|
|
1137
|
+
type: HostListener,
|
|
1138
|
+
args: ['click', ['$event']]
|
|
1139
|
+
}], onMouseOver: [{
|
|
1140
|
+
type: HostListener,
|
|
1141
|
+
args: ['mouseover', ['$event']]
|
|
1142
|
+
}] } });
|
|
1143
|
+
|
|
1144
|
+
class StrataSelectTriggerDirective {
|
|
1145
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataSelectTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1146
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.0", type: StrataSelectTriggerDirective, isStandalone: true, selector: "[stSelectTrigger]", ngImport: i0 });
|
|
1147
|
+
}
|
|
1148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataSelectTriggerDirective, decorators: [{
|
|
1149
|
+
type: Directive,
|
|
1150
|
+
args: [{
|
|
1151
|
+
selector: '[stSelectTrigger]',
|
|
1152
|
+
}]
|
|
1153
|
+
}] });
|
|
1154
|
+
|
|
1155
|
+
class StrataSingleSelectComponent {
|
|
1053
1156
|
open = signal(false, ...(ngDevMode ? [{ debugName: "open" }] : []));
|
|
1054
1157
|
placeholder = input('Select', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
1055
1158
|
placement = input('bottom-start', ...(ngDevMode ? [{ debugName: "placement" }] : []));
|
|
@@ -1057,23 +1160,45 @@ class StrataDropdownComponent {
|
|
|
1057
1160
|
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
1058
1161
|
name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : []));
|
|
1059
1162
|
selected = model(...(ngDevMode ? [undefined, { debugName: "selected" }] : []));
|
|
1060
|
-
|
|
1163
|
+
selectedItem = computed(() => {
|
|
1164
|
+
const val = this.selected();
|
|
1165
|
+
if (val === undefined)
|
|
1166
|
+
return undefined;
|
|
1167
|
+
return this.selectItems().find(item => item.value() === val);
|
|
1168
|
+
}, ...(ngDevMode ? [{ debugName: "selectedItem" }] : []));
|
|
1061
1169
|
searchable = input(false, ...(ngDevMode ? [{ debugName: "searchable" }] : []));
|
|
1062
1170
|
searchQuery = model(...(ngDevMode ? [undefined, { debugName: "searchQuery" }] : []));
|
|
1063
1171
|
searchPlaceholder = input('Search', ...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : []));
|
|
1064
|
-
dropdownItems = input.required(...(ngDevMode ? [{ debugName: "dropdownItems" }] : []));
|
|
1065
|
-
shownItems = computed(() => {
|
|
1066
|
-
if (!this.searchQuery()) {
|
|
1067
|
-
return this.dropdownItems();
|
|
1068
|
-
}
|
|
1069
|
-
return this.dropdownItems().filter((item) => item.text.toLowerCase().includes(this.searchQuery().toLowerCase().trim()));
|
|
1070
|
-
}, ...(ngDevMode ? [{ debugName: "shownItems" }] : []));
|
|
1071
1172
|
itemSelected = output();
|
|
1173
|
+
selectItems = contentChildren(StrataSelectItemComponent, ...(ngDevMode ? [{ debugName: "selectItems" }] : []));
|
|
1174
|
+
triggerTemplate = contentChild(StrataSelectTriggerDirective, { ...(ngDevMode ? { debugName: "triggerTemplate" } : {}), read: TemplateRef });
|
|
1072
1175
|
inputField = viewChild(StrataInputFieldComponent, ...(ngDevMode ? [{ debugName: "inputField" }] : []));
|
|
1073
|
-
|
|
1074
|
-
|
|
1176
|
+
destroyRef = inject(DestroyRef);
|
|
1177
|
+
constructor() {
|
|
1178
|
+
effect((onCleanup) => {
|
|
1179
|
+
const items = this.selectItems();
|
|
1180
|
+
const subs = items.map((item) => item.itemClicked.subscribe((clickedItem) => {
|
|
1181
|
+
this.onItemClick(clickedItem);
|
|
1182
|
+
}));
|
|
1183
|
+
onCleanup(() => {
|
|
1184
|
+
subs.forEach((sub) => sub.unsubscribe());
|
|
1185
|
+
});
|
|
1186
|
+
});
|
|
1075
1187
|
}
|
|
1076
|
-
|
|
1188
|
+
onSearchChange(query) {
|
|
1189
|
+
const q = query?.toLowerCase().trim() || '';
|
|
1190
|
+
const items = this.selectItems();
|
|
1191
|
+
for (const item of items) {
|
|
1192
|
+
if (!q) {
|
|
1193
|
+
item.hidden.set(false);
|
|
1194
|
+
}
|
|
1195
|
+
else {
|
|
1196
|
+
const match = item.text().toLowerCase().includes(q);
|
|
1197
|
+
item.hidden.set(!match);
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
toggle(event) {
|
|
1077
1202
|
if (event) {
|
|
1078
1203
|
event.preventDefault();
|
|
1079
1204
|
event.stopPropagation();
|
|
@@ -1085,16 +1210,10 @@ class StrataDropdownComponent {
|
|
|
1085
1210
|
this.show();
|
|
1086
1211
|
}
|
|
1087
1212
|
}
|
|
1088
|
-
onItemClick(item
|
|
1089
|
-
this.
|
|
1090
|
-
|
|
1091
|
-
this.
|
|
1092
|
-
this.itemSelected.emit(item);
|
|
1093
|
-
}
|
|
1094
|
-
onItemHover(mouseEvent) {
|
|
1095
|
-
mouseEvent.stopPropagation();
|
|
1096
|
-
mouseEvent.stopImmediatePropagation();
|
|
1097
|
-
mouseEvent.preventDefault();
|
|
1213
|
+
onItemClick(item) {
|
|
1214
|
+
this.hide();
|
|
1215
|
+
this.selected.set(item.value());
|
|
1216
|
+
this.itemSelected.emit(item.value());
|
|
1098
1217
|
}
|
|
1099
1218
|
show() {
|
|
1100
1219
|
this.open.set(true);
|
|
@@ -1105,23 +1224,21 @@ class StrataDropdownComponent {
|
|
|
1105
1224
|
hide() {
|
|
1106
1225
|
this.open.set(false);
|
|
1107
1226
|
}
|
|
1108
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type:
|
|
1109
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type:
|
|
1227
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataSingleSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1228
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", 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 <ng-content select=\"st-select-item\"></ng-content>\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"], 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"] }] });
|
|
1110
1229
|
}
|
|
1111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type:
|
|
1230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataSingleSelectComponent, decorators: [{
|
|
1112
1231
|
type: Component,
|
|
1113
|
-
args: [{ selector: 'st-
|
|
1232
|
+
args: [{ selector: 'st-single-select', imports: [
|
|
1233
|
+
CommonModule,
|
|
1114
1234
|
StrataIconComponent,
|
|
1115
1235
|
StrataOverlayDirective,
|
|
1116
1236
|
StrataInputFieldComponent,
|
|
1117
1237
|
FormsModule,
|
|
1118
1238
|
StrataNativeInputRefDirective,
|
|
1119
1239
|
StrataButtonDirective,
|
|
1120
|
-
], template: "@if (label()) {\n
|
|
1121
|
-
}], 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"] }],
|
|
1122
|
-
type: HostBinding,
|
|
1123
|
-
args: ['class']
|
|
1124
|
-
}] } });
|
|
1240
|
+
], 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 <ng-content select=\"st-select-item\"></ng-content>\n </div>\n</ng-template>" }]
|
|
1241
|
+
}], 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 }] }] } });
|
|
1125
1242
|
|
|
1126
1243
|
class StrataDividerComponent {
|
|
1127
1244
|
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
@@ -1190,40 +1307,100 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1190
1307
|
args: [{ selector: 'st-kbd', imports: [], template: "@for (key of resolvedKeys(); track key) {\n<kbd class=\"st-kbd-key st-mono-s\">{{ key }}</kbd>\n}", styles: [":host{--st-kbd-bg: transparent;--st-kbd-border: var(--st-color-text-secondary);--st-kbd-text: var(--st-color-text-secondary);display:inline-flex;align-items:center;gap:4px}:host .st-kbd-key{font-style:normal;line-height:1;padding:3px 6px;border-radius:var(--st-border-radius-sm);background:var(--st-kbd-bg);border:1px solid var(--st-kbd-border);color:var(--st-kbd-text);white-space:nowrap;-webkit-user-select:none;user-select:none}\n"] }]
|
|
1191
1308
|
}], propDecorators: { keys: [{ type: i0.Input, args: [{ isSignal: true, alias: "keys", required: false }] }] } });
|
|
1192
1309
|
|
|
1310
|
+
class StrataRadioComponent {
|
|
1311
|
+
value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
1312
|
+
label = input(undefined, ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
1313
|
+
checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : []));
|
|
1314
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
1315
|
+
select = output();
|
|
1316
|
+
get isChecked() {
|
|
1317
|
+
return this.checked();
|
|
1318
|
+
}
|
|
1319
|
+
get isDisabled() {
|
|
1320
|
+
return this.disabled();
|
|
1321
|
+
}
|
|
1322
|
+
onClick(event) {
|
|
1323
|
+
if (this.disabled()) {
|
|
1324
|
+
return;
|
|
1325
|
+
}
|
|
1326
|
+
event.stopImmediatePropagation();
|
|
1327
|
+
this.select.emit();
|
|
1328
|
+
this.checked.set(true);
|
|
1329
|
+
}
|
|
1330
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataRadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1331
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: StrataRadioComponent, isStandalone: true, selector: "st-radio", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", select: "select" }, host: { listeners: { "click": "onClick($event)" }, properties: { "attr.data-checked": "this.isChecked", "attr.data-disabled": "this.isDisabled" } }, ngImport: i0, template: "<input type=\"radio\" [checked]=\"checked()\" [disabled]=\"disabled()\" />\n<div class=\"radio-visual\"></div>\n@if (label()) {\n <label>{{ label() }}</label>\n}\n" });
|
|
1332
|
+
}
|
|
1333
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataRadioComponent, decorators: [{
|
|
1334
|
+
type: Component,
|
|
1335
|
+
args: [{ selector: 'st-radio', imports: [], template: "<input type=\"radio\" [checked]=\"checked()\" [disabled]=\"disabled()\" />\n<div class=\"radio-visual\"></div>\n@if (label()) {\n <label>{{ label() }}</label>\n}\n" }]
|
|
1336
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], select: [{ type: i0.Output, args: ["select"] }], isChecked: [{
|
|
1337
|
+
type: HostBinding,
|
|
1338
|
+
args: ['attr.data-checked']
|
|
1339
|
+
}], isDisabled: [{
|
|
1340
|
+
type: HostBinding,
|
|
1341
|
+
args: ['attr.data-disabled']
|
|
1342
|
+
}], onClick: [{
|
|
1343
|
+
type: HostListener,
|
|
1344
|
+
args: ['click', ['$event']]
|
|
1345
|
+
}] } });
|
|
1346
|
+
|
|
1193
1347
|
class StrataItemComponent {
|
|
1194
1348
|
element = inject(ElementRef);
|
|
1195
|
-
|
|
1349
|
+
_activatable = inject(StrataActivatableDirective);
|
|
1350
|
+
checkbox = contentChild(StrataCheckboxComponent, { ...(ngDevMode ? { debugName: "checkbox" } : {}), read: ElementRef });
|
|
1351
|
+
toggle = contentChild(StrataToggleComponent, { ...(ngDevMode ? { debugName: "toggle" } : {}), read: ElementRef });
|
|
1352
|
+
radio = contentChild(StrataRadioComponent, { ...(ngDevMode ? { debugName: "radio" } : {}), read: ElementRef });
|
|
1353
|
+
interactable = this._activatable.interactable;
|
|
1354
|
+
disabled = this._activatable.disabled;
|
|
1355
|
+
constructor() {
|
|
1356
|
+
this.interactable.set(false);
|
|
1357
|
+
}
|
|
1196
1358
|
get isInteractable() {
|
|
1197
|
-
return this.
|
|
1359
|
+
return this._activatable.isFocusable();
|
|
1198
1360
|
}
|
|
1199
|
-
get
|
|
1200
|
-
return this.
|
|
1361
|
+
get isDisabledClass() {
|
|
1362
|
+
return this.disabled();
|
|
1201
1363
|
}
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
keyboardEvent.preventDefault();
|
|
1206
|
-
this.element.nativeElement.click();
|
|
1364
|
+
onHostClick(event) {
|
|
1365
|
+
if (this.disabled() || !this.interactable()) {
|
|
1366
|
+
return;
|
|
1207
1367
|
}
|
|
1368
|
+
// Only trigger if we didn't click an interactive element within the item
|
|
1369
|
+
const target = event.target;
|
|
1370
|
+
const isControl = target.closest('st-checkbox, st-toggle, st-radio');
|
|
1371
|
+
if (!isControl) {
|
|
1372
|
+
this.onActivated();
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
onActivated() {
|
|
1376
|
+
if (this.disabled())
|
|
1377
|
+
return;
|
|
1378
|
+
// Trigger children if they exist
|
|
1379
|
+
this.checkbox()?.nativeElement.click();
|
|
1380
|
+
this.toggle()?.nativeElement.click();
|
|
1381
|
+
this.radio()?.nativeElement.click();
|
|
1208
1382
|
}
|
|
1209
1383
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1210
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
1384
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.0", type: StrataItemComponent, isStandalone: true, selector: "st-item", host: { listeners: { "click": "onHostClick($event)" }, properties: { "class.interactable": "this.isInteractable", "class.disabled": "this.isDisabledClass" } }, queries: [{ propertyName: "checkbox", first: true, predicate: StrataCheckboxComponent, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "toggle", first: true, predicate: StrataToggleComponent, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "radio", first: true, predicate: StrataRadioComponent, descendants: true, read: ElementRef, isSignal: true }], hostDirectives: [{ directive: StrataActivatableDirective, inputs: ["disabled", "disabled", "interactable", "interactable"], outputs: ["activated", "activated"] }], ngImport: i0, template: "<span class=\"item-start\">\n <ng-content select=\"[area='start']\"></ng-content\n></span>\n<span class=\"item-default\"> <ng-content></ng-content></span>\n<span class=\"item-end\">\n <ng-content select=\"[area='end']\"></ng-content>\n</span>\n", styles: [""] });
|
|
1211
1385
|
}
|
|
1212
1386
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataItemComponent, decorators: [{
|
|
1213
1387
|
type: Component,
|
|
1214
|
-
args: [{ selector: 'st-item', imports: [],
|
|
1215
|
-
|
|
1388
|
+
args: [{ selector: 'st-item', imports: [], hostDirectives: [
|
|
1389
|
+
{
|
|
1390
|
+
directive: StrataActivatableDirective,
|
|
1391
|
+
inputs: ['disabled', 'interactable'],
|
|
1392
|
+
outputs: ['activated'],
|
|
1393
|
+
},
|
|
1394
|
+
], template: "<span class=\"item-start\">\n <ng-content select=\"[area='start']\"></ng-content\n></span>\n<span class=\"item-default\"> <ng-content></ng-content></span>\n<span class=\"item-end\">\n <ng-content select=\"[area='end']\"></ng-content>\n</span>\n" }]
|
|
1395
|
+
}], ctorParameters: () => [], propDecorators: { checkbox: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StrataCheckboxComponent), { ...{ read: ElementRef }, isSignal: true }] }], toggle: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StrataToggleComponent), { ...{ read: ElementRef }, isSignal: true }] }], radio: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StrataRadioComponent), { ...{ read: ElementRef }, isSignal: true }] }], isInteractable: [{
|
|
1216
1396
|
type: HostBinding,
|
|
1217
1397
|
args: ['class.interactable']
|
|
1218
|
-
}],
|
|
1398
|
+
}], isDisabledClass: [{
|
|
1219
1399
|
type: HostBinding,
|
|
1220
|
-
args: ['
|
|
1221
|
-
}],
|
|
1222
|
-
type: HostListener,
|
|
1223
|
-
args: ['keydown.enter', ['$event']]
|
|
1224
|
-
}, {
|
|
1400
|
+
args: ['class.disabled']
|
|
1401
|
+
}], onHostClick: [{
|
|
1225
1402
|
type: HostListener,
|
|
1226
|
-
args: ['
|
|
1403
|
+
args: ['click', ['$event']]
|
|
1227
1404
|
}] } });
|
|
1228
1405
|
|
|
1229
1406
|
class StrataItemListComponent {
|
|
@@ -1234,7 +1411,7 @@ class StrataItemListComponent {
|
|
|
1234
1411
|
return [this.dividers() ? 'with-dividers' : ''];
|
|
1235
1412
|
}
|
|
1236
1413
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataItemListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1237
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: StrataItemListComponent, isStandalone: true, selector: "st-item-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, dividers: { classPropertyName: "dividers", publicName: "dividers", isSignal: true, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "@for (item of items(); track item; let last = $last) {\n <ng-template #defaultItemTemplate>\n <st-item>{{ item }}</st-item>\n </ng-template>\n <ng-container\n [ngTemplateOutlet]=\"template() || defaultItemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n}\n", dependencies: [{ kind: "component", type: StrataItemComponent, selector: "st-item"
|
|
1414
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: StrataItemListComponent, isStandalone: true, selector: "st-item-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, dividers: { classPropertyName: "dividers", publicName: "dividers", isSignal: true, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "@for (item of items(); track item; let last = $last) {\n <ng-template #defaultItemTemplate>\n <st-item>{{ item }}</st-item>\n </ng-template>\n <ng-container\n [ngTemplateOutlet]=\"template() || defaultItemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n}\n", dependencies: [{ kind: "component", type: StrataItemComponent, selector: "st-item" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: CommonModule }] });
|
|
1238
1415
|
}
|
|
1239
1416
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataItemListComponent, decorators: [{
|
|
1240
1417
|
type: Component,
|
|
@@ -1468,43 +1645,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1468
1645
|
args: ['style.--st-progress-percentage']
|
|
1469
1646
|
}] } });
|
|
1470
1647
|
|
|
1471
|
-
class StrataRadioComponent {
|
|
1472
|
-
value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
1473
|
-
label = input(undefined, ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
1474
|
-
checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : []));
|
|
1475
|
-
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
1476
|
-
select = output();
|
|
1477
|
-
get isChecked() {
|
|
1478
|
-
return this.checked();
|
|
1479
|
-
}
|
|
1480
|
-
get isDisabled() {
|
|
1481
|
-
return this.disabled();
|
|
1482
|
-
}
|
|
1483
|
-
onClick(event) {
|
|
1484
|
-
if (this.disabled()) {
|
|
1485
|
-
return;
|
|
1486
|
-
}
|
|
1487
|
-
event.stopImmediatePropagation();
|
|
1488
|
-
this.select.emit();
|
|
1489
|
-
this.checked.set(true);
|
|
1490
|
-
}
|
|
1491
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataRadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1492
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: StrataRadioComponent, isStandalone: true, selector: "st-radio", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", select: "select" }, host: { listeners: { "click": "onClick($event)" }, properties: { "attr.data-checked": "this.isChecked", "attr.data-disabled": "this.isDisabled" } }, ngImport: i0, template: "<input type=\"radio\" [checked]=\"checked()\" [disabled]=\"disabled()\" />\n<div class=\"radio-visual\"></div>\n@if (label()) {\n <label>{{ label() }}</label>\n}\n" });
|
|
1493
|
-
}
|
|
1494
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataRadioComponent, decorators: [{
|
|
1495
|
-
type: Component,
|
|
1496
|
-
args: [{ selector: 'st-radio', imports: [], template: "<input type=\"radio\" [checked]=\"checked()\" [disabled]=\"disabled()\" />\n<div class=\"radio-visual\"></div>\n@if (label()) {\n <label>{{ label() }}</label>\n}\n" }]
|
|
1497
|
-
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], select: [{ type: i0.Output, args: ["select"] }], isChecked: [{
|
|
1498
|
-
type: HostBinding,
|
|
1499
|
-
args: ['attr.data-checked']
|
|
1500
|
-
}], isDisabled: [{
|
|
1501
|
-
type: HostBinding,
|
|
1502
|
-
args: ['attr.data-disabled']
|
|
1503
|
-
}], onClick: [{
|
|
1504
|
-
type: HostListener,
|
|
1505
|
-
args: ['click', ['$event']]
|
|
1506
|
-
}] } });
|
|
1507
|
-
|
|
1508
1648
|
class StrataRadioGroupComponent {
|
|
1509
1649
|
value = model('', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
1510
1650
|
radios = contentChildren(StrataRadioComponent, { ...(ngDevMode ? { debugName: "radios" } : {}), descendants: true });
|
|
@@ -1650,11 +1790,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1650
1790
|
|
|
1651
1791
|
class StrataSidemenuComponent {
|
|
1652
1792
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataSidemenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1653
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.0", type: StrataSidemenuComponent, isStandalone: true, selector: "st-sidemenu", ngImport: i0, template: "<div class=\"st-sidemenu-header\">\n <ng-content select=\"[st-sidemenu-header]\"></ng-content>\n</div>\n<div class=\"st-sidemenu-content\">\n <ng-content></ng-content>\n</div>\n<div class=\"st-sidemenu-footer\">\n <ng-content select=\"[st-sidemenu-footer]\"></ng-content>\n</div>\n", styles: [":host{--st-sidemenu-min-width: 200px;--st-sidemenu-padding: var(--st-size-xs, 12px);--st-sidemenu-header-spacing: var(--st-size-sm, 16px);--st-sidemenu-footer-spacing: var(--st-size-sm, 16px);display:flex;flex-direction:column;height:100%;width:max-content;min-width:var(--st-sidemenu-min-width);box-sizing:border-box}:host .st-sidemenu-header{display:flex;flex-direction:column;margin-bottom:var(--st-sidemenu-header-spacing)}:host .st-sidemenu-header:empty{display:none;margin-bottom:0}:host .st-sidemenu-content{display:flex;flex-direction:column;flex:1;overflow-y:auto;padding:var(--st-sidemenu-padding)}:host .st-sidemenu-footer{display:flex;flex-direction:column;margin-top:auto;padding-top:var(--st-sidemenu-footer-spacing)}:host .st-sidemenu-footer:empty{display:none;padding-top:0}\n"] });
|
|
1793
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.0", type: StrataSidemenuComponent, isStandalone: true, selector: "st-sidemenu", ngImport: i0, template: "<div class=\"st-sidemenu-header\">\n <ng-content select=\"[st-sidemenu-header]\"></ng-content>\n</div>\n<div class=\"st-sidemenu-content\">\n <ng-content></ng-content>\n</div>\n<div class=\"st-sidemenu-footer\">\n <ng-content select=\"[st-sidemenu-footer]\"></ng-content>\n</div>\n", styles: [":host{--st-sidemenu-min-width: 200px;--st-sidemenu-padding: var(--st-size-xs, 12px);--st-sidemenu-header-spacing: var(--st-size-sm, 16px);--st-sidemenu-footer-spacing: var(--st-size-sm, 16px);--st-sidemenu-bg: var(--st-color-bg-default);display:flex;flex-direction:column;height:100%;width:max-content;min-width:var(--st-sidemenu-min-width);box-sizing:border-box;background-color:var(--st-sidemenu-bg)}:host .st-sidemenu-header{display:flex;flex-direction:column;margin-bottom:var(--st-sidemenu-header-spacing)}:host .st-sidemenu-header:empty{display:none;margin-bottom:0}:host .st-sidemenu-content{display:flex;flex-direction:column;flex:1;overflow-y:auto;padding:var(--st-sidemenu-padding)}:host .st-sidemenu-footer{display:flex;flex-direction:column;margin-top:auto;padding-top:var(--st-sidemenu-footer-spacing)}:host .st-sidemenu-footer:empty{display:none;padding-top:0}\n"] });
|
|
1654
1794
|
}
|
|
1655
1795
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataSidemenuComponent, decorators: [{
|
|
1656
1796
|
type: Component,
|
|
1657
|
-
args: [{ selector: 'st-sidemenu', template: "<div class=\"st-sidemenu-header\">\n <ng-content select=\"[st-sidemenu-header]\"></ng-content>\n</div>\n<div class=\"st-sidemenu-content\">\n <ng-content></ng-content>\n</div>\n<div class=\"st-sidemenu-footer\">\n <ng-content select=\"[st-sidemenu-footer]\"></ng-content>\n</div>\n", styles: [":host{--st-sidemenu-min-width: 200px;--st-sidemenu-padding: var(--st-size-xs, 12px);--st-sidemenu-header-spacing: var(--st-size-sm, 16px);--st-sidemenu-footer-spacing: var(--st-size-sm, 16px);display:flex;flex-direction:column;height:100%;width:max-content;min-width:var(--st-sidemenu-min-width);box-sizing:border-box}:host .st-sidemenu-header{display:flex;flex-direction:column;margin-bottom:var(--st-sidemenu-header-spacing)}:host .st-sidemenu-header:empty{display:none;margin-bottom:0}:host .st-sidemenu-content{display:flex;flex-direction:column;flex:1;overflow-y:auto;padding:var(--st-sidemenu-padding)}:host .st-sidemenu-footer{display:flex;flex-direction:column;margin-top:auto;padding-top:var(--st-sidemenu-footer-spacing)}:host .st-sidemenu-footer:empty{display:none;padding-top:0}\n"] }]
|
|
1797
|
+
args: [{ selector: 'st-sidemenu', template: "<div class=\"st-sidemenu-header\">\n <ng-content select=\"[st-sidemenu-header]\"></ng-content>\n</div>\n<div class=\"st-sidemenu-content\">\n <ng-content></ng-content>\n</div>\n<div class=\"st-sidemenu-footer\">\n <ng-content select=\"[st-sidemenu-footer]\"></ng-content>\n</div>\n", styles: [":host{--st-sidemenu-min-width: 200px;--st-sidemenu-padding: var(--st-size-xs, 12px);--st-sidemenu-header-spacing: var(--st-size-sm, 16px);--st-sidemenu-footer-spacing: var(--st-size-sm, 16px);--st-sidemenu-bg: var(--st-color-bg-default);display:flex;flex-direction:column;height:100%;width:max-content;min-width:var(--st-sidemenu-min-width);box-sizing:border-box;background-color:var(--st-sidemenu-bg)}:host .st-sidemenu-header{display:flex;flex-direction:column;margin-bottom:var(--st-sidemenu-header-spacing)}:host .st-sidemenu-header:empty{display:none;margin-bottom:0}:host .st-sidemenu-content{display:flex;flex-direction:column;flex:1;overflow-y:auto;padding:var(--st-sidemenu-padding)}:host .st-sidemenu-footer{display:flex;flex-direction:column;margin-top:auto;padding-top:var(--st-sidemenu-footer-spacing)}:host .st-sidemenu-footer:empty{display:none;padding-top:0}\n"] }]
|
|
1658
1798
|
}] });
|
|
1659
1799
|
|
|
1660
1800
|
class StrataSidemenuSectionComponent {
|
|
@@ -1791,7 +1931,7 @@ class StrataSliderComponent {
|
|
|
1791
1931
|
return parseFloat(size);
|
|
1792
1932
|
}
|
|
1793
1933
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataSliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1794
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.0", type: StrataSliderComponent, isStandalone: true, selector: "st-slider", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, minimum: { classPropertyName: "minimum", publicName: "minimum", isSignal: true, isRequired: true, transformFunction: null }, maximum: { classPropertyName: "maximum", publicName: "maximum", isSignal: true, isRequired: true, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, viewQueries: [{ propertyName: "wrapper", first: true, predicate: ["wrapper"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n #wrapper\n class=\"range-wrapper\"\n [style.--steps]=\"steps()\"\n [class.stepped]=\"isStepped()\"\n>\n <input\n type=\"range\"\n [(ngModel)]=\"value\"\n [min]=\"minimum()\"\n [max]=\"maximum()\"\n [step]=\"computedStep()\"\n />\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { 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"] }] });
|
|
1934
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.0", type: StrataSliderComponent, isStandalone: true, selector: "st-slider", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, minimum: { classPropertyName: "minimum", publicName: "minimum", isSignal: true, isRequired: true, transformFunction: null }, maximum: { classPropertyName: "maximum", publicName: "maximum", isSignal: true, isRequired: true, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, viewQueries: [{ propertyName: "wrapper", first: true, predicate: ["wrapper"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n #wrapper\n class=\"range-wrapper\"\n [style.--steps]=\"steps()\"\n [class.stepped]=\"isStepped()\"\n>\n <input\n type=\"range\"\n [(ngModel)]=\"value\"\n [min]=\"minimum()\"\n [max]=\"maximum()\"\n [step]=\"computedStep()\"\n />\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
1795
1935
|
}
|
|
1796
1936
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataSliderComponent, decorators: [{
|
|
1797
1937
|
type: Component,
|
|
@@ -1984,39 +2124,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1984
2124
|
}]
|
|
1985
2125
|
}], ctorParameters: () => [], propDecorators: { stTheme: [{ type: i0.Input, args: [{ isSignal: true, alias: "stTheme", required: true }] }] } });
|
|
1986
2126
|
|
|
1987
|
-
class Stack {
|
|
1988
|
-
items = [];
|
|
1989
|
-
push(item) {
|
|
1990
|
-
this.items.push(item);
|
|
1991
|
-
}
|
|
1992
|
-
pop() {
|
|
1993
|
-
const lastItem = this.items.pop();
|
|
1994
|
-
if (lastItem === undefined) {
|
|
1995
|
-
throw new Error();
|
|
1996
|
-
}
|
|
1997
|
-
return lastItem;
|
|
1998
|
-
}
|
|
1999
|
-
peek() {
|
|
2000
|
-
return this.items[this.items.length - 1];
|
|
2001
|
-
}
|
|
2002
|
-
empty() {
|
|
2003
|
-
return this.items.length === 0;
|
|
2004
|
-
}
|
|
2005
|
-
size() {
|
|
2006
|
-
return this.items.length;
|
|
2007
|
-
}
|
|
2008
|
-
}
|
|
2009
|
-
|
|
2010
2127
|
class ModalService {
|
|
2011
|
-
|
|
2012
|
-
|
|
2128
|
+
_modals = signal([], ...(ngDevMode ? [{ debugName: "_modals" }] : []));
|
|
2129
|
+
modals = this._modals.asReadonly();
|
|
2013
2130
|
showModal(config) {
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
});
|
|
2019
|
-
this.currentModals.next(this.stack);
|
|
2131
|
+
if (!config.size) {
|
|
2132
|
+
config.size = 'md';
|
|
2133
|
+
}
|
|
2134
|
+
this._modals.update((prev) => [...prev, config]);
|
|
2020
2135
|
}
|
|
2021
2136
|
showAlert(config, callback) {
|
|
2022
2137
|
this.showModal({
|
|
@@ -2036,10 +2151,26 @@ class ModalService {
|
|
|
2036
2151
|
});
|
|
2037
2152
|
}
|
|
2038
2153
|
closeCurrentModal(value) {
|
|
2039
|
-
const
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2154
|
+
const currentStack = this._modals();
|
|
2155
|
+
if (currentStack.length === 0) {
|
|
2156
|
+
return;
|
|
2157
|
+
}
|
|
2158
|
+
const modalToClose = currentStack[currentStack.length - 1];
|
|
2159
|
+
this.close(modalToClose, value);
|
|
2160
|
+
}
|
|
2161
|
+
close(config, value) {
|
|
2162
|
+
const currentStack = this._modals();
|
|
2163
|
+
const index = currentStack.lastIndexOf(config);
|
|
2164
|
+
if (index === -1) {
|
|
2165
|
+
return;
|
|
2166
|
+
}
|
|
2167
|
+
this._modals.update((prev) => {
|
|
2168
|
+
const next = [...prev];
|
|
2169
|
+
next.splice(index, 1);
|
|
2170
|
+
return next;
|
|
2171
|
+
});
|
|
2172
|
+
if (config.onModalClosed) {
|
|
2173
|
+
config.onModalClosed(value);
|
|
2043
2174
|
}
|
|
2044
2175
|
}
|
|
2045
2176
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -2086,6 +2217,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
2086
2217
|
], template: "<div class=\"alert-content\">\n @if (icon() !== undefined) {\n <st-avatar size=\"lg\" [stTheme]=\"theme()\">\n <st-icon [name]=\"computedIcon()\"></st-icon>\n </st-avatar>\n }\n\n <p class=\"alert-title\">{{ title() }}</p>\n @if (message()) {\n <p class=\"alert-message\">{{ message() }}</p>\n }\n</div>\n<st-button-group justification=\"expand\">\n @if (cancelButton()) {\n <button stButton (click)=\"onCancel()\">{{ cancelButton() }}</button>\n }\n <button stButton [stTheme]=\"theme()\" variant=\"primary\" (click)=\"onAffirmation()\">{{ affirmativeButton() }}</button>\n</st-button-group>\n" }]
|
|
2087
2218
|
}], ctorParameters: () => [{ type: ModalService }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: false }] }], affirmativeButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "affirmativeButton", required: true }] }], cancelButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelButton", required: false }] }] } });
|
|
2088
2219
|
|
|
2220
|
+
class StrataModalRef {
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2089
2223
|
class StrataModalHeaderComponent {
|
|
2090
2224
|
modalService = inject(ModalService);
|
|
2091
2225
|
title = input(null, ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
@@ -2103,6 +2237,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
2103
2237
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], showCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCloseButton", required: false }] }] } });
|
|
2104
2238
|
|
|
2105
2239
|
class StrataModalComponent {
|
|
2240
|
+
modalService = inject(ModalService);
|
|
2241
|
+
injector = inject(Injector);
|
|
2106
2242
|
modalContents = viewChild.required('modalBody', {
|
|
2107
2243
|
read: ViewContainerRef,
|
|
2108
2244
|
});
|
|
@@ -2115,7 +2251,16 @@ class StrataModalComponent {
|
|
|
2115
2251
|
if (this.size() === undefined) {
|
|
2116
2252
|
this.size.set('md');
|
|
2117
2253
|
}
|
|
2118
|
-
const
|
|
2254
|
+
const modalRef = {
|
|
2255
|
+
close: (value) => this.modalService.close(this.configuration(), value),
|
|
2256
|
+
};
|
|
2257
|
+
const customInjector = Injector.create({
|
|
2258
|
+
providers: [{ provide: StrataModalRef, useValue: modalRef }],
|
|
2259
|
+
parent: this.injector,
|
|
2260
|
+
});
|
|
2261
|
+
const injectedComponent = this.modalContents().createComponent(this.configuration().component, {
|
|
2262
|
+
injector: customInjector,
|
|
2263
|
+
});
|
|
2119
2264
|
if (this.configuration().inputs) {
|
|
2120
2265
|
this.setInputsOnInjectedComponent(injectedComponent, this.configuration().inputs);
|
|
2121
2266
|
}
|
|
@@ -2143,36 +2288,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
2143
2288
|
|
|
2144
2289
|
class StrataModalContainerComponent {
|
|
2145
2290
|
modalService;
|
|
2146
|
-
injectedComponent;
|
|
2147
|
-
currentModal = null;
|
|
2148
|
-
stack = new Stack();
|
|
2149
|
-
subscription;
|
|
2150
2291
|
constructor(modalService) {
|
|
2151
2292
|
this.modalService = modalService;
|
|
2152
|
-
this.subscription = this.modalService['currentModals'].asObservable().subscribe((modalStack) => {
|
|
2153
|
-
this.stack = modalStack;
|
|
2154
|
-
});
|
|
2155
|
-
}
|
|
2156
|
-
ngOnDestroy() {
|
|
2157
|
-
this.subscription.unsubscribe();
|
|
2158
2293
|
}
|
|
2159
2294
|
onBackdropClick(event) {
|
|
2160
2295
|
event.stopPropagation();
|
|
2161
|
-
const
|
|
2162
|
-
|
|
2296
|
+
const modals = this.modalService.modals();
|
|
2297
|
+
const currentModal = modals[modals.length - 1];
|
|
2298
|
+
if (!currentModal || currentModal.disableBackdropClosure) {
|
|
2163
2299
|
return;
|
|
2164
2300
|
}
|
|
2165
2301
|
this.modalService.closeCurrentModal();
|
|
2166
2302
|
}
|
|
2167
|
-
stackTrack(index, item) {
|
|
2168
|
-
return item.id;
|
|
2169
|
-
}
|
|
2170
2303
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataModalContainerComponent, deps: [{ token: ModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2171
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: StrataModalContainerComponent, isStandalone: true, selector: "st-modal-container", ngImport: i0, template: "<div class=\"modal-wrapper\">\n @for (modal of
|
|
2304
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: StrataModalContainerComponent, isStandalone: true, selector: "st-modal-container", ngImport: i0, template: "<div class=\"modal-wrapper\">\n @for (modal of modalService.modals(); track modal; let last = $last) {\n <st-modal [ngClass]=\"{ 'hidden-under-other-modal': !last }\" [configuration]=\"modal\" [size]=\"modal.size\"> </st-modal>\n }\n</div>\n@if (modalService.modals().length > 0) {\n <div class=\"st-internal-backdrop active\" (click)=\"onBackdropClick($event)\"></div>\n}\n", dependencies: [{ kind: "component", type: StrataModalComponent, selector: "st-modal", inputs: ["configuration", "size"], outputs: ["sizeChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
2172
2305
|
}
|
|
2173
2306
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataModalContainerComponent, decorators: [{
|
|
2174
2307
|
type: Component,
|
|
2175
|
-
args: [{ selector: 'st-modal-container', imports: [StrataModalComponent, CommonModule], template: "<div class=\"modal-wrapper\">\n @for (modal of
|
|
2308
|
+
args: [{ selector: 'st-modal-container', imports: [StrataModalComponent, CommonModule], template: "<div class=\"modal-wrapper\">\n @for (modal of modalService.modals(); track modal; let last = $last) {\n <st-modal [ngClass]=\"{ 'hidden-under-other-modal': !last }\" [configuration]=\"modal\" [size]=\"modal.size\"> </st-modal>\n }\n</div>\n@if (modalService.modals().length > 0) {\n <div class=\"st-internal-backdrop active\" (click)=\"onBackdropClick($event)\"></div>\n}\n" }]
|
|
2176
2309
|
}], ctorParameters: () => [{ type: ModalService }] });
|
|
2177
2310
|
|
|
2178
2311
|
const DEFAULT_THEME = 'info';
|
|
@@ -2258,7 +2391,7 @@ class StrataNumberDisplayComponent {
|
|
|
2258
2391
|
deemphasizeDecimals = input(true, ...(ngDevMode ? [{ debugName: "deemphasizeDecimals" }] : []));
|
|
2259
2392
|
decimalPoint = computed(() => getLocaleNumberSymbol(this.locale, NumberSymbol.Decimal), ...(ngDevMode ? [{ debugName: "decimalPoint" }] : []));
|
|
2260
2393
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataNumberDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2261
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: StrataNumberDisplayComponent, isStandalone: true, selector: "st-number-display", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, decimals: { classPropertyName: "decimals", publicName: "decimals", isSignal: true, isRequired: false, transformFunction: null }, changedValue: { classPropertyName: "changedValue", publicName: "changedValue", isSignal: true, isRequired: false, transformFunction: null }, showPlus: { classPropertyName: "showPlus", publicName: "showPlus", isSignal: true, isRequired: false, transformFunction: null }, deemphasizeDecimals: { classPropertyName: "deemphasizeDecimals", publicName: "deemphasizeDecimals", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<p\n [ngClass]=\"{\n positive: changedValue() && value() > 0,\n negative: changedValue() && value() < 0,\n }\"\n>\n @if (showPlus() && this.value() > 0) {\n +\n }\n <span class=\"integer-value\">{{ separatedDigits().integer }}</span>\n @if (separatedDigits().decimals) {\n <span\n class=\"decimal-number\"\n [ngClass]=\"{ deemphasize: deemphasizeDecimals }\"\n >{{ decimalPoint() }}{{ separatedDigits().decimals }}</span\n >\n }\n</p>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type:
|
|
2394
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: StrataNumberDisplayComponent, isStandalone: true, selector: "st-number-display", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, decimals: { classPropertyName: "decimals", publicName: "decimals", isSignal: true, isRequired: false, transformFunction: null }, changedValue: { classPropertyName: "changedValue", publicName: "changedValue", isSignal: true, isRequired: false, transformFunction: null }, showPlus: { classPropertyName: "showPlus", publicName: "showPlus", isSignal: true, isRequired: false, transformFunction: null }, deemphasizeDecimals: { classPropertyName: "deemphasizeDecimals", publicName: "deemphasizeDecimals", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<p\n [ngClass]=\"{\n positive: changedValue() && value() > 0,\n negative: changedValue() && value() < 0,\n }\"\n>\n @if (showPlus() && this.value() > 0) {\n +\n }\n <span class=\"integer-value\">{{ separatedDigits().integer }}</span>\n @if (separatedDigits().decimals) {\n <span\n class=\"decimal-number\"\n [ngClass]=\"{ deemphasize: deemphasizeDecimals }\"\n >{{ decimalPoint() }}{{ separatedDigits().decimals }}</span\n >\n }\n</p>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
2262
2395
|
}
|
|
2263
2396
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataNumberDisplayComponent, decorators: [{
|
|
2264
2397
|
type: Component,
|
|
@@ -2298,5 +2431,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
2298
2431
|
* Generated bundle index. Do not edit.
|
|
2299
2432
|
*/
|
|
2300
2433
|
|
|
2301
|
-
export { CapitalizePipe, DEFAULT_DURATION, DEFAULT_THEME, DarkmodeService, HotkeyService, HttpIconLoader, IconLoader, IconRegistry, IconRegistryService, ModalService, NotificationService, STRATA_CONFIG, StrataAccordionGroupComponent, StrataAccordionItemComponent, StrataActionMenuComponent, StrataActionMenuItemComponent, StrataAlertComponent, StrataAlertContentComponent, StrataAutoResizeDirective, StrataAvatarComponent, StrataAvatarStackComponent, StrataButtonDirective, StrataButtonGroupComponent, StrataCardComponent, StrataCheckboxComponent, StrataDividerComponent,
|
|
2434
|
+
export { CapitalizePipe, DEFAULT_DURATION, DEFAULT_THEME, DarkmodeService, HotkeyService, HttpIconLoader, IconLoader, IconRegistry, IconRegistryService, ModalService, NotificationService, STRATA_CONFIG, StrataAccordionGroupComponent, StrataAccordionItemComponent, StrataActionMenuComponent, StrataActionMenuItemComponent, StrataActivatableDirective, StrataAlertComponent, StrataAlertContentComponent, StrataAutoResizeDirective, StrataAvatarComponent, StrataAvatarStackComponent, StrataBreadcrumbComponent, StrataBreadcrumbItemComponent, StrataButtonDirective, StrataButtonGroupComponent, StrataCardComponent, StrataCheckboxComponent, StrataDividerComponent, StrataIconComponent, StrataInputFieldComponent, StrataItemComponent, StrataItemListComponent, StrataKbdComponent, StrataMessageStateComponent, StrataModalComponent, StrataModalContainerComponent, StrataModalHeaderComponent, StrataModalRef, StrataNativeInputRefDirective, StrataNotificationComponent, StrataNotificationContainerComponent, StrataNumberDisplayComponent, StrataOverlayDirective, StrataPaginationComponent, StrataProgressLinearComponent, StrataProgressRadialComponent, StrataRadioComponent, StrataRadioGroupComponent, StrataSegmentedControlComponent, StrataSegmentedControlItemComponent, StrataSelectItemComponent, StrataSelectTriggerDirective, StrataShellComponent, StrataSidemenuComponent, StrataSidemenuItemDirective, StrataSidemenuItemGroupComponent, StrataSidemenuSectionComponent, StrataSingleSelectComponent, StrataSliderComponent, StrataSpinnerComponent, StrataTabItemComponent, StrataTabsComponent, StrataTagComponent, StrataTextStackComponent, StrataThemeDirective, StrataToggleComponent, StrataTooltipDirective, provideBaseIcons, provideIcons, provideStrata };
|
|
2302
2435
|
//# sourceMappingURL=ngx-strata.mjs.map
|