ngx-strata 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/styles/base.scss +4 -0
- package/assets/styles/components/_breadcrumb.scss +68 -0
- package/assets/styles/components/action-menu.scss +13 -1
- package/assets/styles/components/card.scss +3 -2
- package/assets/styles/components/icon.scss +5 -0
- package/assets/styles/components/item.scss +11 -1
- package/assets/styles/components/modal.scss +26 -0
- 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/tag.scss +1 -1
- package/assets/styles/components/toggle.scss +40 -13
- package/assets/styles/public-api.scss +1 -0
- package/assets/styles/shadows.scss +1 -0
- package/assets/styles/typography.scss +0 -1
- package/dist/strata/strata.css +1 -1
- package/fesm2022/ngx-strata.mjs +947 -645
- package/fesm2022/ngx-strata.mjs.map +1 -1
- package/package.json +5 -4
- 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 +30 -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 +96 -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 +121 -88
package/fesm2022/ngx-strata.mjs
CHANGED
|
@@ -1,26 +1,56 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { inject, ElementRef, input, model, output, computed, Directive, Injectable, provideAppInitializer, makeEnvironmentProviders, InjectionToken, DOCUMENT, Renderer2, Input, signal, effect, DestroyRef, HostListener, Component, contentChild, HostBinding, ViewContainerRef, viewChild, contentChildren, 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, DOCUMENT as DOCUMENT$1, 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, /* @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"] }] } });
|
|
46
|
+
|
|
14
47
|
class IconLoader {
|
|
15
48
|
}
|
|
16
49
|
|
|
17
50
|
class IconRegistryService {
|
|
18
|
-
iconLoader;
|
|
51
|
+
iconLoader = inject(IconLoader);
|
|
19
52
|
icons = {};
|
|
20
53
|
svgs = {};
|
|
21
|
-
constructor(iconLoader) {
|
|
22
|
-
this.iconLoader = iconLoader;
|
|
23
|
-
}
|
|
24
54
|
registerIcons(iconConfigs) {
|
|
25
55
|
iconConfigs.forEach((config) => this.registerIcon(config));
|
|
26
56
|
}
|
|
@@ -48,52 +78,52 @@ class IconRegistryService {
|
|
|
48
78
|
this.svgs[name] = svg;
|
|
49
79
|
}));
|
|
50
80
|
}
|
|
51
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
52
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
81
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: IconRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
82
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: IconRegistryService, providedIn: 'root' });
|
|
53
83
|
}
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: IconRegistryService, decorators: [{
|
|
55
85
|
type: Injectable,
|
|
56
86
|
args: [{
|
|
57
|
-
providedIn: 'root'
|
|
87
|
+
providedIn: 'root'
|
|
58
88
|
}]
|
|
59
|
-
}]
|
|
89
|
+
}] });
|
|
60
90
|
|
|
61
91
|
const baseIconConfigs = [
|
|
62
92
|
{
|
|
63
93
|
name: 'question',
|
|
64
|
-
url: 'assets/icons/question.svg'
|
|
94
|
+
url: 'assets/icons/question.svg'
|
|
65
95
|
},
|
|
66
96
|
{
|
|
67
97
|
name: 'arrow-right',
|
|
68
|
-
url: 'assets/icons/arrow-right.svg'
|
|
98
|
+
url: 'assets/icons/arrow-right.svg'
|
|
69
99
|
},
|
|
70
100
|
{
|
|
71
101
|
name: 'arrow-left',
|
|
72
|
-
url: 'assets/icons/arrow-left.svg'
|
|
102
|
+
url: 'assets/icons/arrow-left.svg'
|
|
73
103
|
},
|
|
74
104
|
{
|
|
75
105
|
name: 'arrow-up',
|
|
76
|
-
url: 'assets/icons/arrow-up.svg'
|
|
106
|
+
url: 'assets/icons/arrow-up.svg'
|
|
77
107
|
},
|
|
78
108
|
{
|
|
79
109
|
name: 'arrow-down',
|
|
80
|
-
url: 'assets/icons/arrow-down.svg'
|
|
110
|
+
url: 'assets/icons/arrow-down.svg'
|
|
81
111
|
},
|
|
82
112
|
{
|
|
83
113
|
name: 'close',
|
|
84
|
-
url: 'assets/icons/close.svg'
|
|
114
|
+
url: 'assets/icons/close.svg'
|
|
85
115
|
},
|
|
86
116
|
{
|
|
87
117
|
name: 'expand-up-down',
|
|
88
|
-
url: 'assets/icons/expand-up-down.svg'
|
|
118
|
+
url: 'assets/icons/expand-up-down.svg'
|
|
89
119
|
},
|
|
90
120
|
{
|
|
91
121
|
name: 'clipboard',
|
|
92
|
-
url: 'assets/icons/clipboard.svg'
|
|
122
|
+
url: 'assets/icons/clipboard.svg'
|
|
93
123
|
},
|
|
94
124
|
{
|
|
95
125
|
name: 'more',
|
|
96
|
-
url: 'assets/icons/more.svg'
|
|
126
|
+
url: 'assets/icons/more.svg'
|
|
97
127
|
},
|
|
98
128
|
];
|
|
99
129
|
|
|
@@ -120,10 +150,10 @@ class HttpIconLoader {
|
|
|
120
150
|
.get(url, { responseType: 'text' })
|
|
121
151
|
.pipe(map((raw) => this.sanitizer.bypassSecurityTrustHtml(raw)));
|
|
122
152
|
}
|
|
123
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
124
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
153
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: HttpIconLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
154
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: HttpIconLoader, providedIn: 'root' });
|
|
125
155
|
}
|
|
126
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
156
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: HttpIconLoader, decorators: [{
|
|
127
157
|
type: Injectable,
|
|
128
158
|
args: [{ providedIn: 'root' }]
|
|
129
159
|
}] });
|
|
@@ -131,7 +161,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
131
161
|
function provideIconLoader() {
|
|
132
162
|
return {
|
|
133
163
|
provide: IconLoader,
|
|
134
|
-
useExisting: HttpIconLoader
|
|
164
|
+
useExisting: HttpIconLoader
|
|
135
165
|
};
|
|
136
166
|
}
|
|
137
167
|
|
|
@@ -141,7 +171,7 @@ class IconRegistry {
|
|
|
141
171
|
function provideIconRegistry() {
|
|
142
172
|
return {
|
|
143
173
|
provide: IconRegistry,
|
|
144
|
-
useExisting: IconRegistryService
|
|
174
|
+
useExisting: IconRegistryService
|
|
145
175
|
};
|
|
146
176
|
}
|
|
147
177
|
|
|
@@ -153,21 +183,21 @@ const DEFAULT_CONFIG = {
|
|
|
153
183
|
meta: '⌘',
|
|
154
184
|
ctrl: 'Ctrl',
|
|
155
185
|
shift: 'Shift',
|
|
156
|
-
alt: 'Alt'
|
|
157
|
-
}
|
|
186
|
+
alt: 'Alt'
|
|
187
|
+
}
|
|
158
188
|
};
|
|
159
189
|
function provideStrata(config = {}) {
|
|
160
190
|
const mergedConfig = {
|
|
161
191
|
...DEFAULT_CONFIG,
|
|
162
192
|
...config,
|
|
163
|
-
shortcutLabels: { ...DEFAULT_CONFIG.shortcutLabels, ...config.shortcutLabels }
|
|
193
|
+
shortcutLabels: { ...DEFAULT_CONFIG.shortcutLabels, ...config.shortcutLabels }
|
|
164
194
|
};
|
|
165
195
|
const providers = [
|
|
166
196
|
provideIconLoader(),
|
|
167
197
|
provideIconRegistry(),
|
|
168
198
|
{
|
|
169
199
|
provide: STRATA_CONFIG,
|
|
170
|
-
useValue: mergedConfig
|
|
200
|
+
useValue: mergedConfig
|
|
171
201
|
},
|
|
172
202
|
];
|
|
173
203
|
if (mergedConfig.includeBaseIcons) {
|
|
@@ -178,10 +208,11 @@ function provideStrata(config = {}) {
|
|
|
178
208
|
const STRATA_CONFIG = new InjectionToken('STRATA_CONFIG');
|
|
179
209
|
|
|
180
210
|
class StrataTooltipDirective {
|
|
181
|
-
document;
|
|
182
|
-
element;
|
|
183
|
-
renderer;
|
|
184
|
-
stSimpleTooltip = input.required(
|
|
211
|
+
document = inject(DOCUMENT);
|
|
212
|
+
element = inject(ElementRef);
|
|
213
|
+
renderer = inject(Renderer2);
|
|
214
|
+
stSimpleTooltip = input.required(/* @ts-ignore */
|
|
215
|
+
...(ngDevMode ? [{ debugName: "stSimpleTooltip" }] : /* istanbul ignore next */ []));
|
|
185
216
|
tooltipEnabled = true;
|
|
186
217
|
tooltipPlacement = 'top';
|
|
187
218
|
tooltipAlwaysShow = false;
|
|
@@ -190,11 +221,6 @@ class StrataTooltipDirective {
|
|
|
190
221
|
eventListeners;
|
|
191
222
|
autoUpdateCleanupFunction;
|
|
192
223
|
config = inject(STRATA_CONFIG);
|
|
193
|
-
constructor(document, element, renderer) {
|
|
194
|
-
this.document = document;
|
|
195
|
-
this.element = element;
|
|
196
|
-
this.renderer = renderer;
|
|
197
|
-
}
|
|
198
224
|
ngOnInit() {
|
|
199
225
|
if (!this.stSimpleTooltip() || this.stSimpleTooltip() === '' || !this.tooltipEnabled) {
|
|
200
226
|
return;
|
|
@@ -230,17 +256,17 @@ class StrataTooltipDirective {
|
|
|
230
256
|
doPosition() {
|
|
231
257
|
computePosition(this.element.nativeElement, this.tooltipContentElement, {
|
|
232
258
|
placement: this.tooltipPlacement,
|
|
233
|
-
middleware: [offset(6), arrow({ element: this.arrowElement })]
|
|
259
|
+
middleware: [offset(6), arrow({ element: this.arrowElement })]
|
|
234
260
|
}).then(({ x, y, middlewareData }) => {
|
|
235
261
|
Object.assign(this.tooltipContentElement.style, {
|
|
236
262
|
left: `${x}px`,
|
|
237
|
-
top: `${y}px
|
|
263
|
+
top: `${y}px`
|
|
238
264
|
});
|
|
239
265
|
if (middlewareData.arrow) {
|
|
240
266
|
const { x, y } = middlewareData.arrow;
|
|
241
267
|
Object.assign(this.arrowElement.style, {
|
|
242
268
|
left: x != null ? `${x}px` : '',
|
|
243
|
-
top: y != null ? `${y}px` : ''
|
|
269
|
+
top: y != null ? `${y}px` : ''
|
|
244
270
|
});
|
|
245
271
|
}
|
|
246
272
|
});
|
|
@@ -276,18 +302,15 @@ class StrataTooltipDirective {
|
|
|
276
302
|
this.autoUpdateCleanupFunction();
|
|
277
303
|
}
|
|
278
304
|
}
|
|
279
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
280
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
305
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
306
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.1", type: StrataTooltipDirective, isStandalone: true, selector: "[stSimpleTooltip]", inputs: { stSimpleTooltip: { classPropertyName: "stSimpleTooltip", publicName: "stSimpleTooltip", isSignal: true, isRequired: true, transformFunction: null }, tooltipEnabled: { classPropertyName: "tooltipEnabled", publicName: "tooltipEnabled", isSignal: false, isRequired: false, transformFunction: null }, tooltipPlacement: { classPropertyName: "tooltipPlacement", publicName: "tooltipPlacement", isSignal: false, isRequired: false, transformFunction: null }, tooltipAlwaysShow: { classPropertyName: "tooltipAlwaysShow", publicName: "tooltipAlwaysShow", isSignal: false, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
281
307
|
}
|
|
282
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
308
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataTooltipDirective, decorators: [{
|
|
283
309
|
type: Directive,
|
|
284
310
|
args: [{
|
|
285
|
-
selector: '[stSimpleTooltip]'
|
|
311
|
+
selector: '[stSimpleTooltip]'
|
|
286
312
|
}]
|
|
287
|
-
}],
|
|
288
|
-
type: Inject,
|
|
289
|
-
args: [DOCUMENT]
|
|
290
|
-
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { stSimpleTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "stSimpleTooltip", required: true }] }], tooltipEnabled: [{
|
|
313
|
+
}], propDecorators: { stSimpleTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "stSimpleTooltip", required: true }] }], tooltipEnabled: [{
|
|
291
314
|
type: Input
|
|
292
315
|
}], tooltipPlacement: [{
|
|
293
316
|
type: Input
|
|
@@ -299,10 +322,14 @@ class DarkmodeService {
|
|
|
299
322
|
STORAGE_KEY = 'strata-darkmode';
|
|
300
323
|
document = inject(DOCUMENT);
|
|
301
324
|
osPrefersDark;
|
|
302
|
-
setting = signal('SYSTEM',
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
325
|
+
setting = signal('SYSTEM', /* @ts-ignore */
|
|
326
|
+
...(ngDevMode ? [{ debugName: "setting" }] : /* istanbul ignore next */ []));
|
|
327
|
+
darkmode = signal('LIGHT', /* @ts-ignore */
|
|
328
|
+
...(ngDevMode ? [{ debugName: "darkmode" }] : /* istanbul ignore next */ []));
|
|
329
|
+
currentMode = computed(() => this.darkmode(), /* @ts-ignore */
|
|
330
|
+
...(ngDevMode ? [{ debugName: "currentMode" }] : /* istanbul ignore next */ []));
|
|
331
|
+
currentSetting = computed(() => this.setting(), /* @ts-ignore */
|
|
332
|
+
...(ngDevMode ? [{ debugName: "currentSetting" }] : /* istanbul ignore next */ []));
|
|
306
333
|
constructor() {
|
|
307
334
|
effect(() => this.updateDarkmodeTagOnDOM(this.darkmode()));
|
|
308
335
|
this.setting.set(this.getSettingFromStorage());
|
|
@@ -348,13 +375,13 @@ class DarkmodeService {
|
|
|
348
375
|
getSettingFromStorage() {
|
|
349
376
|
return localStorage.getItem(this.STORAGE_KEY) ?? 'SYSTEM';
|
|
350
377
|
}
|
|
351
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
352
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
378
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: DarkmodeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
379
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: DarkmodeService, providedIn: 'root' });
|
|
353
380
|
}
|
|
354
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
381
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: DarkmodeService, decorators: [{
|
|
355
382
|
type: Injectable,
|
|
356
383
|
args: [{
|
|
357
|
-
providedIn: 'root'
|
|
384
|
+
providedIn: 'root'
|
|
358
385
|
}]
|
|
359
386
|
}], ctorParameters: () => [] });
|
|
360
387
|
|
|
@@ -385,7 +412,7 @@ class HotkeyService {
|
|
|
385
412
|
this.registrations.set(id, {
|
|
386
413
|
combos,
|
|
387
414
|
handler,
|
|
388
|
-
options: { allowInInput: false, ...options }
|
|
415
|
+
options: { allowInInput: false, ...options }
|
|
389
416
|
});
|
|
390
417
|
return () => this.registrations.delete(id);
|
|
391
418
|
}
|
|
@@ -415,7 +442,7 @@ class HotkeyService {
|
|
|
415
442
|
meta: parts.includes('meta'),
|
|
416
443
|
ctrl: parts.includes('ctrl'),
|
|
417
444
|
shift: parts.includes('shift'),
|
|
418
|
-
alt: parts.includes('alt')
|
|
445
|
+
alt: parts.includes('alt')
|
|
419
446
|
};
|
|
420
447
|
}
|
|
421
448
|
/**
|
|
@@ -439,26 +466,29 @@ class HotkeyService {
|
|
|
439
466
|
const tag = target.tagName.toLowerCase();
|
|
440
467
|
return tag === 'input' || tag === 'textarea' || target.isContentEditable;
|
|
441
468
|
}
|
|
442
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
443
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
469
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: HotkeyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
470
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: HotkeyService, providedIn: 'root' });
|
|
444
471
|
}
|
|
445
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
472
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: HotkeyService, decorators: [{
|
|
446
473
|
type: Injectable,
|
|
447
474
|
args: [{ providedIn: 'root' }]
|
|
448
475
|
}], ctorParameters: () => [] });
|
|
449
476
|
|
|
450
477
|
class StrataCheckboxComponent {
|
|
451
|
-
value = model(false,
|
|
452
|
-
|
|
453
|
-
|
|
478
|
+
value = model(false, /* @ts-ignore */
|
|
479
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
480
|
+
label = input(undefined, /* @ts-ignore */
|
|
481
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
482
|
+
name = input(undefined, /* @ts-ignore */
|
|
483
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
454
484
|
onClick(event) {
|
|
455
485
|
event.stopImmediatePropagation();
|
|
456
486
|
this.value.set(!this.value());
|
|
457
487
|
}
|
|
458
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
459
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
488
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
489
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataCheckboxComponent, isStandalone: true, selector: "st-checkbox", inputs: { value: { classPropertyName: "value", publicName: "value", 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 } }, outputs: { value: "valueChange" }, host: { listeners: { "click": "onClick($event)" } }, ngImport: i0, template: "<input type=\"checkbox\" [checked]=\"value()\" />\n<div class=\"checkbox-visual\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n >\n <path\n d=\"M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z\"\n ></path>\n </svg>\n</div>\n@if (label()) {\n <label [for]=\"name()\"> {{ label() }}</label>\n}\n" });
|
|
460
490
|
}
|
|
461
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
491
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataCheckboxComponent, decorators: [{
|
|
462
492
|
type: Component,
|
|
463
493
|
args: [{ selector: 'st-checkbox', imports: [], template: "<input type=\"checkbox\" [checked]=\"value()\" />\n<div class=\"checkbox-visual\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n >\n <path\n d=\"M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z\"\n ></path>\n </svg>\n</div>\n@if (label()) {\n <label [for]=\"name()\"> {{ label() }}</label>\n}\n" }]
|
|
464
494
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], onClick: [{
|
|
@@ -467,41 +497,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
467
497
|
}] } });
|
|
468
498
|
|
|
469
499
|
class StrataToggleComponent {
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
onCheckChanged() {
|
|
500
|
+
_activatable = inject(StrataActivatableDirective);
|
|
501
|
+
checked = model(false, /* @ts-ignore */
|
|
502
|
+
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
503
|
+
label = input(undefined, /* @ts-ignore */
|
|
504
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
505
|
+
labelPosition = input('after', /* @ts-ignore */
|
|
506
|
+
...(ngDevMode ? [{ debugName: "labelPosition" }] : /* istanbul ignore next */ []));
|
|
507
|
+
disabled = this._activatable.disabled;
|
|
508
|
+
onCheckChanged(event) {
|
|
479
509
|
if (this.disabled()) {
|
|
480
510
|
return;
|
|
481
511
|
}
|
|
512
|
+
if (event) {
|
|
513
|
+
event.stopPropagation();
|
|
514
|
+
}
|
|
482
515
|
this.checked.set(!this.checked());
|
|
483
516
|
}
|
|
484
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
485
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
517
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
518
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", 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
519
|
}
|
|
487
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
520
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataToggleComponent, decorators: [{
|
|
488
521
|
type: Component,
|
|
489
|
-
args: [{ selector: 'st-toggle', imports: [],
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
522
|
+
args: [{ selector: 'st-toggle', imports: [], hostDirectives: [
|
|
523
|
+
{
|
|
524
|
+
directive: StrataActivatableDirective,
|
|
525
|
+
inputs: ['disabled'],
|
|
526
|
+
outputs: ['activated']
|
|
527
|
+
},
|
|
528
|
+
], host: {
|
|
529
|
+
'(click)': 'onCheckChanged($event)',
|
|
530
|
+
role: 'switch',
|
|
531
|
+
'[attr.aria-checked]': 'checked()',
|
|
532
|
+
'[attr.aria-disabled]': 'disabled()',
|
|
533
|
+
'[attr.data-checked]': 'checked()',
|
|
534
|
+
'[attr.data-disabled]': 'disabled()',
|
|
535
|
+
'[class.st-toggle-label-before]': "labelPosition() === 'before'",
|
|
536
|
+
'[class.st-toggle-label-after]': "labelPosition() === 'after'"
|
|
537
|
+
}, 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" }]
|
|
538
|
+
}], 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
539
|
|
|
501
540
|
class StrataActionMenuItemComponent {
|
|
502
|
-
checkbox = contentChild(StrataCheckboxComponent, { ...(ngDevMode ? { debugName: "checkbox" } : {}), read: ElementRef });
|
|
503
|
-
toggle = contentChild(StrataToggleComponent, { ...(ngDevMode ? { debugName: "toggle" } : {}), read: ElementRef });
|
|
504
|
-
closeMenuOnClick = input(true,
|
|
541
|
+
checkbox = contentChild(StrataCheckboxComponent, { ...(ngDevMode ? { debugName: "checkbox" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
542
|
+
toggle = contentChild(StrataToggleComponent, { ...(ngDevMode ? { debugName: "toggle" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
543
|
+
closeMenuOnClick = input(true, /* @ts-ignore */
|
|
544
|
+
...(ngDevMode ? [{ debugName: "closeMenuOnClick" }] : /* istanbul ignore next */ []));
|
|
545
|
+
active = input(false, /* @ts-ignore */
|
|
546
|
+
...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
547
|
+
get isActive() {
|
|
548
|
+
return this.active();
|
|
549
|
+
}
|
|
505
550
|
menuItemClicked = output();
|
|
506
551
|
elementRef = inject(ElementRef);
|
|
507
552
|
onHostClick(event) {
|
|
@@ -510,25 +555,34 @@ class StrataActionMenuItemComponent {
|
|
|
510
555
|
this.checkbox()?.nativeElement.click();
|
|
511
556
|
this.toggle()?.nativeElement.click();
|
|
512
557
|
}
|
|
513
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
514
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
558
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataActionMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
559
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.1", 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
560
|
}
|
|
516
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
561
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataActionMenuItemComponent, decorators: [{
|
|
517
562
|
type: Component,
|
|
518
563
|
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 }] }],
|
|
564
|
+
}], 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: [{
|
|
565
|
+
type: HostBinding,
|
|
566
|
+
args: ['class.active']
|
|
567
|
+
}], menuItemClicked: [{ type: i0.Output, args: ["menuItemClicked"] }], onHostClick: [{
|
|
520
568
|
type: HostListener,
|
|
521
569
|
args: ['click', ['$event']]
|
|
522
570
|
}] } });
|
|
523
571
|
|
|
524
572
|
class StrataButtonDirective {
|
|
525
573
|
host = inject(ElementRef);
|
|
526
|
-
variant = input('secondary',
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
574
|
+
variant = input('secondary', /* @ts-ignore */
|
|
575
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
576
|
+
size = input('md', /* @ts-ignore */
|
|
577
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
578
|
+
fullWidth = input(false, /* @ts-ignore */
|
|
579
|
+
...(ngDevMode ? [{ debugName: "fullWidth" }] : /* istanbul ignore next */ []));
|
|
580
|
+
iconAtStart = signal(false, /* @ts-ignore */
|
|
581
|
+
...(ngDevMode ? [{ debugName: "iconAtStart" }] : /* istanbul ignore next */ []));
|
|
582
|
+
iconAtEnd = signal(false, /* @ts-ignore */
|
|
583
|
+
...(ngDevMode ? [{ debugName: "iconAtEnd" }] : /* istanbul ignore next */ []));
|
|
584
|
+
iconOnly = signal(false, /* @ts-ignore */
|
|
585
|
+
...(ngDevMode ? [{ debugName: "iconOnly" }] : /* istanbul ignore next */ []));
|
|
532
586
|
get classes() {
|
|
533
587
|
return [
|
|
534
588
|
'st-button',
|
|
@@ -562,13 +616,13 @@ class StrataButtonDirective {
|
|
|
562
616
|
}
|
|
563
617
|
return false;
|
|
564
618
|
}
|
|
565
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
566
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
619
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
620
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.1", type: StrataButtonDirective, isStandalone: true, selector: "[stButton]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.classes" } }, ngImport: i0 });
|
|
567
621
|
}
|
|
568
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
622
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataButtonDirective, decorators: [{
|
|
569
623
|
type: Directive,
|
|
570
624
|
args: [{
|
|
571
|
-
selector: '[stButton]'
|
|
625
|
+
selector: '[stButton]'
|
|
572
626
|
}]
|
|
573
627
|
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], classes: [{
|
|
574
628
|
type: HostBinding,
|
|
@@ -577,10 +631,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
577
631
|
|
|
578
632
|
class StrataCardComponent {
|
|
579
633
|
elementRef = inject(ElementRef);
|
|
580
|
-
elevated = input(false,
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
634
|
+
elevated = input(false, /* @ts-ignore */
|
|
635
|
+
...(ngDevMode ? [{ debugName: "elevated" }] : /* istanbul ignore next */ []));
|
|
636
|
+
selectable = input(false, /* @ts-ignore */
|
|
637
|
+
...(ngDevMode ? [{ debugName: "selectable" }] : /* istanbul ignore next */ []));
|
|
638
|
+
padding = input(true, /* @ts-ignore */
|
|
639
|
+
...(ngDevMode ? [{ debugName: "padding" }] : /* istanbul ignore next */ []));
|
|
640
|
+
variant = input('elevated', /* @ts-ignore */
|
|
641
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
584
642
|
get withPadding() {
|
|
585
643
|
return this.padding();
|
|
586
644
|
}
|
|
@@ -605,10 +663,10 @@ class StrataCardComponent {
|
|
|
605
663
|
this.elementRef.nativeElement.click();
|
|
606
664
|
}
|
|
607
665
|
}
|
|
608
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
609
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
666
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
667
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: StrataCardComponent, isStandalone: true, selector: "st-card", inputs: { elevated: { classPropertyName: "elevated", publicName: "elevated", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown.enter": "handleKeyboardEvent($event)", "keydown.space": "handleKeyboardEvent($event)" }, properties: { "class.with-padding": "this.withPadding", "class.selectable": "this.isSelectable", "attr.tabindex": "this.tabIndex", "class.elevated": "this.isElevated", "class.flat": "this.isFlat", "class.outline": "this.isOutline" } }, ngImport: i0, template: "<div class=\"cover-area\">\n <ng-content select=\"[area='cover']\"></ng-content>\n</div>\n<div class=\"card-content\">\n <ng-content></ng-content>\n</div>\n" });
|
|
610
668
|
}
|
|
611
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
669
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataCardComponent, decorators: [{
|
|
612
670
|
type: Component,
|
|
613
671
|
args: [{ selector: 'st-card', imports: [], template: "<div class=\"cover-area\">\n <ng-content select=\"[area='cover']\"></ng-content>\n</div>\n<div class=\"card-content\">\n <ng-content></ng-content>\n</div>\n" }]
|
|
614
672
|
}], propDecorators: { elevated: [{ type: i0.Input, args: [{ isSignal: true, alias: "elevated", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], withPadding: [{
|
|
@@ -638,72 +696,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
638
696
|
}] } });
|
|
639
697
|
|
|
640
698
|
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
699
|
iconRegistry = inject(IconRegistry);
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
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
|
-
}
|
|
678
|
-
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: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { size: "sizeChange" }, host: { properties: { "class.xs": "this.sizeClass", "class.sm": "this.sizeSmClass", "class.md": "this.sizeMdClass", "class.lg": "this.sizeLgClass" } }, usesOnChanges: true, ngImport: i0, template: "<span [innerHTML]=\"svgMarkdown\"></span>\n" });
|
|
700
|
+
name = input('question', /* @ts-ignore */
|
|
701
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
702
|
+
size = model('md', /* @ts-ignore */
|
|
703
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
704
|
+
svgMarkdown = toSignal(toObservable(this.name).pipe(switchMap((name) => this.iconRegistry.getIcon(name || 'question'))));
|
|
705
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
706
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", 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
707
|
}
|
|
681
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
708
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataIconComponent, decorators: [{
|
|
682
709
|
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
|
-
}] } });
|
|
710
|
+
args: [{ selector: 'st-icon', imports: [], host: {
|
|
711
|
+
'[class.xs]': 'size() === "xs"',
|
|
712
|
+
'[class.sm]': 'size() === "sm"',
|
|
713
|
+
'[class.md]': 'size() === "md"',
|
|
714
|
+
'[class.lg]': 'size() === "lg"'
|
|
715
|
+
}, template: "<span [innerHTML]=\"svgMarkdown()\"></span>\n" }]
|
|
716
|
+
}], 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
717
|
|
|
698
718
|
class StrataOverlayDirective {
|
|
699
|
-
stOverlay = input.required(
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
719
|
+
stOverlay = input.required(/* @ts-ignore */
|
|
720
|
+
...(ngDevMode ? [{ debugName: "stOverlay" }] : /* istanbul ignore next */ []));
|
|
721
|
+
overlayOpen = model(false, /* @ts-ignore */
|
|
722
|
+
...(ngDevMode ? [{ debugName: "overlayOpen" }] : /* istanbul ignore next */ []));
|
|
723
|
+
overlayPlacement = input('bottom', /* @ts-ignore */
|
|
724
|
+
...(ngDevMode ? [{ debugName: "overlayPlacement" }] : /* istanbul ignore next */ []));
|
|
725
|
+
overlayOffset = input(8, /* @ts-ignore */
|
|
726
|
+
...(ngDevMode ? [{ debugName: "overlayOffset" }] : /* istanbul ignore next */ []));
|
|
703
727
|
element = inject(ElementRef);
|
|
704
728
|
viewContainerRef = inject(ViewContainerRef);
|
|
705
729
|
overlayEl;
|
|
706
730
|
cleanup;
|
|
731
|
+
viewRef;
|
|
707
732
|
ngOnChanges() {
|
|
708
733
|
if (this.overlayOpen()) {
|
|
709
734
|
this.create();
|
|
@@ -715,9 +740,9 @@ class StrataOverlayDirective {
|
|
|
715
740
|
async create() {
|
|
716
741
|
if (this.overlayEl)
|
|
717
742
|
return;
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
this.overlayEl =
|
|
743
|
+
this.viewRef = this.viewContainerRef.createEmbeddedView(this.stOverlay());
|
|
744
|
+
this.viewRef.detectChanges();
|
|
745
|
+
this.overlayEl = this.viewRef.rootNodes[0];
|
|
721
746
|
document.body.appendChild(this.overlayEl);
|
|
722
747
|
this.cleanup = autoUpdate(this.element.nativeElement, this.overlayEl, () => this.updatePosition());
|
|
723
748
|
}
|
|
@@ -726,15 +751,17 @@ class StrataOverlayDirective {
|
|
|
726
751
|
return;
|
|
727
752
|
const { x, y } = await computePosition(this.element.nativeElement, this.overlayEl, {
|
|
728
753
|
placement: this.overlayPlacement(),
|
|
729
|
-
|
|
754
|
+
strategy: 'fixed',
|
|
755
|
+
middleware: [offset(this.overlayOffset()), flip(), shift()]
|
|
730
756
|
});
|
|
731
757
|
if (!this.overlayEl)
|
|
732
758
|
return;
|
|
733
759
|
const { width } = this.element.nativeElement.getBoundingClientRect();
|
|
734
760
|
Object.assign(this.overlayEl.style, {
|
|
735
|
-
position: '
|
|
761
|
+
position: 'fixed',
|
|
736
762
|
left: `${x}px`,
|
|
737
763
|
top: `${y}px`,
|
|
764
|
+
zIndex: '10000'
|
|
738
765
|
});
|
|
739
766
|
this.overlayEl.style.setProperty('--st-overlay-anchor-element-width', `${width}px`);
|
|
740
767
|
}
|
|
@@ -743,29 +770,36 @@ class StrataOverlayDirective {
|
|
|
743
770
|
this.cleanup();
|
|
744
771
|
if (this.overlayEl)
|
|
745
772
|
this.overlayEl.remove();
|
|
773
|
+
if (this.viewRef) {
|
|
774
|
+
this.viewRef.destroy();
|
|
775
|
+
this.viewRef = undefined;
|
|
776
|
+
}
|
|
746
777
|
this.overlayEl = undefined;
|
|
747
778
|
}
|
|
748
779
|
ngOnDestroy() {
|
|
749
780
|
this.destroy();
|
|
750
781
|
}
|
|
751
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
752
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
782
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataOverlayDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
783
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.1", type: StrataOverlayDirective, isStandalone: true, selector: "[stOverlay]", inputs: { stOverlay: { classPropertyName: "stOverlay", publicName: "stOverlay", isSignal: true, isRequired: true, transformFunction: null }, overlayOpen: { classPropertyName: "overlayOpen", publicName: "overlayOpen", isSignal: true, isRequired: false, transformFunction: null }, overlayPlacement: { classPropertyName: "overlayPlacement", publicName: "overlayPlacement", isSignal: true, isRequired: false, transformFunction: null }, overlayOffset: { classPropertyName: "overlayOffset", publicName: "overlayOffset", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { overlayOpen: "overlayOpenChange" }, usesOnChanges: true, ngImport: i0 });
|
|
753
784
|
}
|
|
754
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
785
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataOverlayDirective, decorators: [{
|
|
755
786
|
type: Directive,
|
|
756
787
|
args: [{
|
|
757
|
-
selector: '[stOverlay]'
|
|
788
|
+
selector: '[stOverlay]'
|
|
758
789
|
}]
|
|
759
790
|
}], propDecorators: { stOverlay: [{ type: i0.Input, args: [{ isSignal: true, alias: "stOverlay", required: true }] }], overlayOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayOpen", required: false }] }, { type: i0.Output, args: ["overlayOpenChange"] }], overlayPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayPlacement", required: false }] }], overlayOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayOffset", required: false }] }] } });
|
|
760
791
|
|
|
761
792
|
class StrataActionMenuComponent {
|
|
762
|
-
projectedButton = contentChild(StrataButtonDirective, { ...(ngDevMode ? { debugName: "projectedButton" } : {}), descendants: true,
|
|
793
|
+
projectedButton = contentChild(StrataButtonDirective, { ...(ngDevMode ? { debugName: "projectedButton" } : /* istanbul ignore next */ {}), descendants: true,
|
|
763
794
|
read: ElementRef });
|
|
764
|
-
defaultButton = viewChild(StrataButtonDirective, { ...(ngDevMode ? { debugName: "defaultButton" } : {}), read: ElementRef });
|
|
765
|
-
actionMenuItems = contentChildren(StrataActionMenuItemComponent,
|
|
766
|
-
|
|
795
|
+
defaultButton = viewChild(StrataButtonDirective, { ...(ngDevMode ? { debugName: "defaultButton" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
796
|
+
actionMenuItems = contentChildren(StrataActionMenuItemComponent, /* @ts-ignore */
|
|
797
|
+
...(ngDevMode ? [{ debugName: "actionMenuItems" }] : /* istanbul ignore next */ []));
|
|
798
|
+
placement = input('bottom-end', /* @ts-ignore */
|
|
799
|
+
...(ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []));
|
|
767
800
|
renderer = inject(Renderer2);
|
|
768
|
-
menuOpen = signal(false,
|
|
801
|
+
menuOpen = signal(false, /* @ts-ignore */
|
|
802
|
+
...(ngDevMode ? [{ debugName: "menuOpen" }] : /* istanbul ignore next */ []));
|
|
769
803
|
constructor() {
|
|
770
804
|
effect((onCleanup) => {
|
|
771
805
|
const button = this.projectedButton() ?? this.defaultButton();
|
|
@@ -790,28 +824,29 @@ class StrataActionMenuComponent {
|
|
|
790
824
|
});
|
|
791
825
|
});
|
|
792
826
|
}
|
|
793
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
794
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
827
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataActionMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
828
|
+
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"], outputs: ["overlayOpenChange"] }, { kind: "component", type: StrataIconComponent, selector: "st-icon", inputs: ["name", "size"], outputs: ["sizeChange"] }, { kind: "directive", type: StrataButtonDirective, selector: "[stButton]", inputs: ["variant", "size", "fullWidth"] }] });
|
|
795
829
|
}
|
|
796
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
830
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataActionMenuComponent, decorators: [{
|
|
797
831
|
type: Component,
|
|
798
832
|
args: [{ selector: 'st-action-menu', imports: [StrataCardComponent, StrataOverlayDirective, StrataIconComponent, StrataButtonDirective], 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"] }]
|
|
799
833
|
}], ctorParameters: () => [], propDecorators: { projectedButton: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StrataButtonDirective), { ...{
|
|
800
834
|
descendants: true,
|
|
801
|
-
read: ElementRef
|
|
835
|
+
read: ElementRef
|
|
802
836
|
}, isSignal: true }] }], defaultButton: [{ type: i0.ViewChild, args: [i0.forwardRef(() => StrataButtonDirective), { ...{
|
|
803
|
-
read: ElementRef
|
|
837
|
+
read: ElementRef
|
|
804
838
|
}, isSignal: true }] }], actionMenuItems: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => StrataActionMenuItemComponent), { isSignal: true }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }] } });
|
|
805
839
|
|
|
806
840
|
class StrataTextStackComponent {
|
|
807
|
-
overflow = input('truncate',
|
|
841
|
+
overflow = input('truncate', /* @ts-ignore */
|
|
842
|
+
...(ngDevMode ? [{ debugName: "overflow" }] : /* istanbul ignore next */ []));
|
|
808
843
|
get cssClasses() {
|
|
809
844
|
return [this.overflow()];
|
|
810
845
|
}
|
|
811
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
812
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
846
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataTextStackComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
847
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: StrataTextStackComponent, isStandalone: true, selector: "st-text-stack", inputs: { overflow: { classPropertyName: "overflow", publicName: "overflow", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.cssClasses" } }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""] });
|
|
813
848
|
}
|
|
814
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
849
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataTextStackComponent, decorators: [{
|
|
815
850
|
type: Component,
|
|
816
851
|
args: [{ selector: 'st-text-stack', imports: [], template: "<ng-content></ng-content>\n" }]
|
|
817
852
|
}], propDecorators: { overflow: [{ type: i0.Input, args: [{ isSignal: true, alias: "overflow", required: false }] }], cssClasses: [{
|
|
@@ -820,22 +855,74 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
820
855
|
}] } });
|
|
821
856
|
|
|
822
857
|
class StrataAlertComponent {
|
|
823
|
-
header = input(undefined,
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
858
|
+
header = input(undefined, /* @ts-ignore */
|
|
859
|
+
...(ngDevMode ? [{ debugName: "header" }] : /* istanbul ignore next */ []));
|
|
860
|
+
message = input.required(/* @ts-ignore */
|
|
861
|
+
...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
|
|
862
|
+
iconName = input(undefined, /* @ts-ignore */
|
|
863
|
+
...(ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []));
|
|
864
|
+
dismissible = input(false, /* @ts-ignore */
|
|
865
|
+
...(ngDevMode ? [{ debugName: "dismissible" }] : /* istanbul ignore next */ []));
|
|
827
866
|
dismiss = output();
|
|
828
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
829
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
867
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
868
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataAlertComponent, isStandalone: true, selector: "st-alert", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dismiss: "dismiss" }, ngImport: i0, 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>", dependencies: [{ kind: "component", type: StrataIconComponent, selector: "st-icon", inputs: ["name", "size"], outputs: ["sizeChange"] }, { kind: "directive", type: StrataButtonDirective, selector: "[stButton]", inputs: ["variant", "size", "fullWidth"] }, { kind: "component", type: StrataTextStackComponent, selector: "st-text-stack", inputs: ["overflow"] }] });
|
|
830
869
|
}
|
|
831
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
870
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataAlertComponent, decorators: [{
|
|
832
871
|
type: Component,
|
|
833
872
|
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
873
|
}], 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
874
|
|
|
875
|
+
class StrataBreadcrumbItemComponent {
|
|
876
|
+
text = input.required(/* @ts-ignore */
|
|
877
|
+
...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
878
|
+
icon = input(/* @ts-ignore */
|
|
879
|
+
...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
880
|
+
interactable = input(false, /* @ts-ignore */
|
|
881
|
+
...(ngDevMode ? [{ debugName: "interactable" }] : /* istanbul ignore next */ []));
|
|
882
|
+
disabled = input(false, /* @ts-ignore */
|
|
883
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
884
|
+
activated = output();
|
|
885
|
+
separatorIcon = signal(undefined, /* @ts-ignore */
|
|
886
|
+
...(ngDevMode ? [{ debugName: "separatorIcon" }] : /* istanbul ignore next */ []));
|
|
887
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataBreadcrumbItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
888
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", 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"] }] });
|
|
889
|
+
}
|
|
890
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataBreadcrumbItemComponent, decorators: [{
|
|
891
|
+
type: Component,
|
|
892
|
+
args: [{ selector: 'st-breadcrumb-item', imports: [StrataIconComponent, StrataActivatableDirective], host: {
|
|
893
|
+
'class': 'st-breadcrumb-item'
|
|
894
|
+
}, 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" }]
|
|
895
|
+
}], 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"] }] } });
|
|
896
|
+
|
|
897
|
+
class StrataBreadcrumbComponent {
|
|
898
|
+
separatorIcon = input('arrow-right', /* @ts-ignore */
|
|
899
|
+
...(ngDevMode ? [{ debugName: "separatorIcon" }] : /* istanbul ignore next */ []));
|
|
900
|
+
items = contentChildren(StrataBreadcrumbItemComponent, { ...(ngDevMode ? { debugName: "items" } : /* istanbul ignore next */ {}), descendants: true });
|
|
901
|
+
constructor() {
|
|
902
|
+
effect(() => {
|
|
903
|
+
const items = this.items();
|
|
904
|
+
const separator = this.separatorIcon();
|
|
905
|
+
items.forEach((item, index) => {
|
|
906
|
+
const isLast = index === items.length - 1;
|
|
907
|
+
item.separatorIcon.set(isLast ? undefined : separator);
|
|
908
|
+
});
|
|
909
|
+
});
|
|
910
|
+
}
|
|
911
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataBreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
912
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.1", 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" });
|
|
913
|
+
}
|
|
914
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataBreadcrumbComponent, decorators: [{
|
|
915
|
+
type: Component,
|
|
916
|
+
args: [{ selector: 'st-breadcrumb', imports: [], host: {
|
|
917
|
+
'class': 'st-breadcrumb'
|
|
918
|
+
}, template: "<nav aria-label=\"Breadcrumb\">\n <ol class=\"st-breadcrumb-list\">\n <ng-content></ng-content>\n </ol>\n</nav>\n" }]
|
|
919
|
+
}], 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 }] }] } });
|
|
920
|
+
|
|
836
921
|
class StrataAccordionItemComponent {
|
|
837
|
-
title = input.required(
|
|
838
|
-
|
|
922
|
+
title = input.required(/* @ts-ignore */
|
|
923
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
924
|
+
open = model(false, /* @ts-ignore */
|
|
925
|
+
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
839
926
|
toggled = output();
|
|
840
927
|
constructor() {
|
|
841
928
|
let firstRun = true;
|
|
@@ -851,10 +938,10 @@ class StrataAccordionItemComponent {
|
|
|
851
938
|
get isOpen() {
|
|
852
939
|
return this.open();
|
|
853
940
|
}
|
|
854
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
855
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
941
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataAccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
942
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: StrataAccordionItemComponent, isStandalone: true, selector: "st-accordion-item", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", toggled: "toggled" }, host: { properties: { "attr.open": "this.isOpen" } }, ngImport: i0, template: "<div class=\"accordion-header\" (click)=\"this.open.set(!this.open())\">\n {{ title() }}\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n >\n <path\n d=\"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z\"\n ></path>\n </svg>\n</div>\n\n<div class=\"accordion-content\">\n <ng-content></ng-content>\n</div>\n" });
|
|
856
943
|
}
|
|
857
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
944
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataAccordionItemComponent, decorators: [{
|
|
858
945
|
type: Component,
|
|
859
946
|
args: [{ selector: 'st-accordion-item', imports: [], template: "<div class=\"accordion-header\" (click)=\"this.open.set(!this.open())\">\n {{ title() }}\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n >\n <path\n d=\"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z\"\n ></path>\n </svg>\n</div>\n\n<div class=\"accordion-content\">\n <ng-content></ng-content>\n</div>\n" }]
|
|
860
947
|
}], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], toggled: [{ type: i0.Output, args: ["toggled"] }], isOpen: [{
|
|
@@ -863,8 +950,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
863
950
|
}] } });
|
|
864
951
|
|
|
865
952
|
class StrataAccordionGroupComponent {
|
|
866
|
-
items = contentChildren(StrataAccordionItemComponent,
|
|
867
|
-
|
|
953
|
+
items = contentChildren(StrataAccordionItemComponent, /* @ts-ignore */
|
|
954
|
+
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
955
|
+
allowMultipleOpen = input(false, /* @ts-ignore */
|
|
956
|
+
...(ngDevMode ? [{ debugName: "allowMultipleOpen" }] : /* istanbul ignore next */ []));
|
|
868
957
|
constructor() {
|
|
869
958
|
effect((onCleanup) => {
|
|
870
959
|
const subs = this.items().map((item) => item.toggled.subscribe((open) => {
|
|
@@ -884,18 +973,20 @@ class StrataAccordionGroupComponent {
|
|
|
884
973
|
}
|
|
885
974
|
});
|
|
886
975
|
}
|
|
887
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
888
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
976
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataAccordionGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
977
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.1", type: StrataAccordionGroupComponent, isStandalone: true, selector: "st-accordion-group", inputs: { allowMultipleOpen: { classPropertyName: "allowMultipleOpen", publicName: "allowMultipleOpen", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "items", predicate: StrataAccordionItemComponent, isSignal: true }], ngImport: i0, template: "<ng-content></ng-content>\n" });
|
|
889
978
|
}
|
|
890
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
979
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataAccordionGroupComponent, decorators: [{
|
|
891
980
|
type: Component,
|
|
892
981
|
args: [{ selector: 'st-accordion-group', imports: [], template: "<ng-content></ng-content>\n" }]
|
|
893
982
|
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => StrataAccordionItemComponent), { isSignal: true }] }], allowMultipleOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowMultipleOpen", required: false }] }] } });
|
|
894
983
|
|
|
895
984
|
class StrataAvatarComponent {
|
|
896
|
-
iconComponents = contentChildren(StrataIconComponent, { ...(ngDevMode ? { debugName: "iconComponents" } : {}), descendants: true });
|
|
897
|
-
text = input(null,
|
|
898
|
-
|
|
985
|
+
iconComponents = contentChildren(StrataIconComponent, { ...(ngDevMode ? { debugName: "iconComponents" } : /* istanbul ignore next */ {}), descendants: true });
|
|
986
|
+
text = input(null, /* @ts-ignore */
|
|
987
|
+
...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
988
|
+
size = model('md', /* @ts-ignore */
|
|
989
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
899
990
|
get elementClasses() {
|
|
900
991
|
return [this.size()];
|
|
901
992
|
}
|
|
@@ -906,10 +997,10 @@ class StrataAvatarComponent {
|
|
|
906
997
|
});
|
|
907
998
|
});
|
|
908
999
|
}
|
|
909
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
910
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1000
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataAvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1001
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataAvatarComponent, isStandalone: true, selector: "st-avatar", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { size: "sizeChange" }, host: { properties: { "class": "this.elementClasses" } }, queries: [{ propertyName: "iconComponents", predicate: StrataIconComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@if (text() !== null) {\n <span>{{ text() }}</span>\n}\n<ng-content></ng-content>\n" });
|
|
911
1002
|
}
|
|
912
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1003
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataAvatarComponent, decorators: [{
|
|
913
1004
|
type: Component,
|
|
914
1005
|
args: [{ selector: 'st-avatar', imports: [], template: "@if (text() !== null) {\n <span>{{ text() }}</span>\n}\n<ng-content></ng-content>\n" }]
|
|
915
1006
|
}], propDecorators: { iconComponents: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => StrataIconComponent), { ...{ descendants: true }, isSignal: true }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }, { type: i0.Output, args: ["sizeChange"] }], elementClasses: [{
|
|
@@ -918,11 +1009,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
918
1009
|
}] } });
|
|
919
1010
|
|
|
920
1011
|
class StrataAvatarStackComponent {
|
|
921
|
-
avatarRefs = contentChildren(StrataAvatarComponent, { ...(ngDevMode ? { debugName: "avatarRefs" } : {}), descendants: true,
|
|
1012
|
+
avatarRefs = contentChildren(StrataAvatarComponent, { ...(ngDevMode ? { debugName: "avatarRefs" } : /* istanbul ignore next */ {}), descendants: true,
|
|
922
1013
|
read: ElementRef });
|
|
923
|
-
size = input('md',
|
|
924
|
-
|
|
925
|
-
|
|
1014
|
+
size = input('md', /* @ts-ignore */
|
|
1015
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
1016
|
+
spacing = input('mid', /* @ts-ignore */
|
|
1017
|
+
...(ngDevMode ? [{ debugName: "spacing" }] : /* istanbul ignore next */ []));
|
|
1018
|
+
firstOnFront = input(false, /* @ts-ignore */
|
|
1019
|
+
...(ngDevMode ? [{ debugName: "firstOnFront" }] : /* istanbul ignore next */ []));
|
|
926
1020
|
get xsClass() {
|
|
927
1021
|
return this.size() === 'xs';
|
|
928
1022
|
}
|
|
@@ -956,15 +1050,15 @@ class StrataAvatarStackComponent {
|
|
|
956
1050
|
});
|
|
957
1051
|
}, 1);
|
|
958
1052
|
}
|
|
959
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
960
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
1053
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataAvatarStackComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1054
|
+
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" });
|
|
961
1055
|
}
|
|
962
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1056
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataAvatarStackComponent, decorators: [{
|
|
963
1057
|
type: Component,
|
|
964
1058
|
args: [{ selector: 'st-avatar-stack', imports: [], template: "<ng-content></ng-content>\n" }]
|
|
965
1059
|
}], propDecorators: { avatarRefs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => StrataAvatarComponent), { ...{
|
|
966
1060
|
descendants: true,
|
|
967
|
-
read: ElementRef
|
|
1061
|
+
read: ElementRef
|
|
968
1062
|
}, 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: [{
|
|
969
1063
|
type: HostBinding,
|
|
970
1064
|
args: ['class.xs']
|
|
@@ -993,31 +1087,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
993
1087
|
|
|
994
1088
|
class StrataButtonGroupComponent {
|
|
995
1089
|
renderer = inject(Renderer2);
|
|
996
|
-
justification = input('start',
|
|
997
|
-
|
|
998
|
-
static
|
|
1090
|
+
justification = input('start', /* @ts-ignore */
|
|
1091
|
+
...(ngDevMode ? [{ debugName: "justification" }] : /* istanbul ignore next */ []));
|
|
1092
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataButtonGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1093
|
+
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" });
|
|
999
1094
|
}
|
|
1000
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1095
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataButtonGroupComponent, decorators: [{
|
|
1001
1096
|
type: Component,
|
|
1002
1097
|
args: [{ selector: 'st-button-group', imports: [], template: "<ng-content select=\"[stButton], st-divider\" #buttons></ng-content>\n" }]
|
|
1003
1098
|
}], propDecorators: { justification: [{ type: i0.Input, args: [{ isSignal: true, alias: "justification", required: false }] }] } });
|
|
1004
1099
|
|
|
1005
1100
|
class StrataNativeInputRefDirective {
|
|
1006
1101
|
el = inject((ElementRef));
|
|
1007
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1008
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1102
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataNativeInputRefDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1103
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.1", type: StrataNativeInputRefDirective, isStandalone: true, selector: "input[stInput], textarea[stInput]", ngImport: i0 });
|
|
1009
1104
|
}
|
|
1010
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataNativeInputRefDirective, decorators: [{
|
|
1011
1106
|
type: Directive,
|
|
1012
1107
|
args: [{
|
|
1013
|
-
selector: 'input[stInput], textarea[stInput]'
|
|
1108
|
+
selector: 'input[stInput], textarea[stInput]'
|
|
1014
1109
|
}]
|
|
1015
1110
|
}] });
|
|
1016
1111
|
|
|
1017
1112
|
class StrataInputFieldComponent {
|
|
1018
|
-
iconComponents = contentChildren(StrataIconComponent, { ...(ngDevMode ? { debugName: "iconComponents" } : {}), descendants: true });
|
|
1019
|
-
inputField = contentChild(StrataNativeInputRefDirective, { ...(ngDevMode ? { debugName: "inputField" } : {}), descendants: true });
|
|
1020
|
-
pendingFocus = signal(false,
|
|
1113
|
+
iconComponents = contentChildren(StrataIconComponent, { ...(ngDevMode ? { debugName: "iconComponents" } : /* istanbul ignore next */ {}), descendants: true });
|
|
1114
|
+
inputField = contentChild(StrataNativeInputRefDirective, { ...(ngDevMode ? { debugName: "inputField" } : /* istanbul ignore next */ {}), descendants: true });
|
|
1115
|
+
pendingFocus = signal(false, /* @ts-ignore */
|
|
1116
|
+
...(ngDevMode ? [{ debugName: "pendingFocus" }] : /* istanbul ignore next */ []));
|
|
1021
1117
|
constructor() {
|
|
1022
1118
|
effect(() => {
|
|
1023
1119
|
const input = this.inputField();
|
|
@@ -1039,41 +1135,132 @@ class StrataInputFieldComponent {
|
|
|
1039
1135
|
get nativeInput() {
|
|
1040
1136
|
return this.inputField()?.el.nativeElement;
|
|
1041
1137
|
}
|
|
1042
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1043
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
1138
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataInputFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1139
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.1", type: StrataInputFieldComponent, isStandalone: true, selector: "st-input-field", queries: [{ propertyName: "iconComponents", predicate: StrataIconComponent, descendants: true, isSignal: true }, { propertyName: "inputField", first: true, predicate: StrataNativeInputRefDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-content select=\"label\"></ng-content>\n<div class=\"st-input-wrapper\">\n <div class=\"affix\">\n <ng-content select=\"[prefix]\"></ng-content>\n </div>\n <ng-content select=\"input,textarea\"></ng-content>\n <div class=\"affix\">\n <ng-content select=\"[suffix]\"></ng-content>\n </div>\n</div>\n" });
|
|
1044
1140
|
}
|
|
1045
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataInputFieldComponent, decorators: [{
|
|
1046
1142
|
type: Component,
|
|
1047
1143
|
args: [{ selector: 'st-input-field', imports: [], template: "<ng-content select=\"label\"></ng-content>\n<div class=\"st-input-wrapper\">\n <div class=\"affix\">\n <ng-content select=\"[prefix]\"></ng-content>\n </div>\n <ng-content select=\"input,textarea\"></ng-content>\n <div class=\"affix\">\n <ng-content select=\"[suffix]\"></ng-content>\n </div>\n</div>\n" }]
|
|
1048
1144
|
}], ctorParameters: () => [], propDecorators: { iconComponents: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => StrataIconComponent), { ...{ descendants: true }, isSignal: true }] }], inputField: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StrataNativeInputRefDirective), { ...{
|
|
1049
|
-
descendants: true
|
|
1145
|
+
descendants: true
|
|
1050
1146
|
}, isSignal: true }] }] } });
|
|
1051
1147
|
|
|
1052
|
-
class
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1148
|
+
class StrataSelectItemComponent {
|
|
1149
|
+
value = input.required(/* @ts-ignore */
|
|
1150
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1151
|
+
text = input.required(/* @ts-ignore */
|
|
1152
|
+
...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
1153
|
+
itemClicked = output();
|
|
1154
|
+
hidden = signal(false, /* @ts-ignore */
|
|
1155
|
+
...(ngDevMode ? [{ debugName: "hidden" }] : /* istanbul ignore next */ []));
|
|
1156
|
+
elementRef = inject(ElementRef);
|
|
1157
|
+
get display() {
|
|
1158
|
+
return this.hidden() ? 'none' : 'block';
|
|
1159
|
+
}
|
|
1160
|
+
onClick(event) {
|
|
1161
|
+
this.itemClicked.emit(this);
|
|
1162
|
+
event.stopPropagation();
|
|
1163
|
+
}
|
|
1164
|
+
onMouseOver(event) {
|
|
1165
|
+
event.stopPropagation();
|
|
1166
|
+
event.stopImmediatePropagation();
|
|
1167
|
+
event.preventDefault();
|
|
1168
|
+
}
|
|
1169
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSelectItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1170
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", 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 });
|
|
1171
|
+
}
|
|
1172
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSelectItemComponent, decorators: [{
|
|
1173
|
+
type: Component,
|
|
1174
|
+
args: [{
|
|
1175
|
+
selector: 'st-select-item',
|
|
1176
|
+
imports: [],
|
|
1177
|
+
template: '<ng-content></ng-content>',
|
|
1178
|
+
host: {
|
|
1179
|
+
class: 'single-select-item'
|
|
1180
|
+
}
|
|
1181
|
+
}]
|
|
1182
|
+
}], 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: [{
|
|
1183
|
+
type: HostBinding,
|
|
1184
|
+
args: ['style.display']
|
|
1185
|
+
}], onClick: [{
|
|
1186
|
+
type: HostListener,
|
|
1187
|
+
args: ['click', ['$event']]
|
|
1188
|
+
}], onMouseOver: [{
|
|
1189
|
+
type: HostListener,
|
|
1190
|
+
args: ['mouseover', ['$event']]
|
|
1191
|
+
}] } });
|
|
1192
|
+
|
|
1193
|
+
class StrataSelectTriggerDirective {
|
|
1194
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSelectTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1195
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.1", type: StrataSelectTriggerDirective, isStandalone: true, selector: "[stSelectTrigger]", ngImport: i0 });
|
|
1196
|
+
}
|
|
1197
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSelectTriggerDirective, decorators: [{
|
|
1198
|
+
type: Directive,
|
|
1199
|
+
args: [{
|
|
1200
|
+
selector: '[stSelectTrigger]'
|
|
1201
|
+
}]
|
|
1202
|
+
}] });
|
|
1203
|
+
|
|
1204
|
+
class StrataSingleSelectComponent {
|
|
1205
|
+
open = signal(false, /* @ts-ignore */
|
|
1206
|
+
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
1207
|
+
placeholder = input('Select', /* @ts-ignore */
|
|
1208
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
1209
|
+
placement = input('bottom-start', /* @ts-ignore */
|
|
1210
|
+
...(ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []));
|
|
1211
|
+
fullWidth = input(false, /* @ts-ignore */
|
|
1212
|
+
...(ngDevMode ? [{ debugName: "fullWidth" }] : /* istanbul ignore next */ []));
|
|
1213
|
+
label = input(/* @ts-ignore */
|
|
1214
|
+
...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1215
|
+
name = input(/* @ts-ignore */
|
|
1216
|
+
...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
|
|
1217
|
+
selected = model(/* @ts-ignore */
|
|
1218
|
+
...(ngDevMode ? [undefined, { debugName: "selected" }] : /* istanbul ignore next */ []));
|
|
1219
|
+
selectedItem = computed(() => {
|
|
1220
|
+
const val = this.selected();
|
|
1221
|
+
if (val === undefined)
|
|
1222
|
+
return undefined;
|
|
1223
|
+
return this.selectItems().find(item => item.value() === val);
|
|
1224
|
+
}, /* @ts-ignore */
|
|
1225
|
+
...(ngDevMode ? [{ debugName: "selectedItem" }] : /* istanbul ignore next */ []));
|
|
1226
|
+
searchable = input(false, /* @ts-ignore */
|
|
1227
|
+
...(ngDevMode ? [{ debugName: "searchable" }] : /* istanbul ignore next */ []));
|
|
1228
|
+
searchQuery = model(/* @ts-ignore */
|
|
1229
|
+
...(ngDevMode ? [undefined, { debugName: "searchQuery" }] : /* istanbul ignore next */ []));
|
|
1230
|
+
searchPlaceholder = input('Search', /* @ts-ignore */
|
|
1231
|
+
...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []));
|
|
1071
1232
|
itemSelected = output();
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1233
|
+
selectItems = contentChildren(StrataSelectItemComponent, /* @ts-ignore */
|
|
1234
|
+
...(ngDevMode ? [{ debugName: "selectItems" }] : /* istanbul ignore next */ []));
|
|
1235
|
+
triggerTemplate = contentChild(StrataSelectTriggerDirective, { ...(ngDevMode ? { debugName: "triggerTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
1236
|
+
inputField = viewChild(StrataInputFieldComponent, /* @ts-ignore */
|
|
1237
|
+
...(ngDevMode ? [{ debugName: "inputField" }] : /* istanbul ignore next */ []));
|
|
1238
|
+
destroyRef = inject(DestroyRef);
|
|
1239
|
+
constructor() {
|
|
1240
|
+
effect((onCleanup) => {
|
|
1241
|
+
const items = this.selectItems();
|
|
1242
|
+
const subs = items.map((item) => item.itemClicked.subscribe((clickedItem) => {
|
|
1243
|
+
this.onItemClick(clickedItem);
|
|
1244
|
+
}));
|
|
1245
|
+
onCleanup(() => {
|
|
1246
|
+
subs.forEach((sub) => sub.unsubscribe());
|
|
1247
|
+
});
|
|
1248
|
+
});
|
|
1249
|
+
}
|
|
1250
|
+
onSearchChange(query) {
|
|
1251
|
+
const q = query?.toLowerCase().trim() || '';
|
|
1252
|
+
const items = this.selectItems();
|
|
1253
|
+
for (const item of items) {
|
|
1254
|
+
if (!q) {
|
|
1255
|
+
item.hidden.set(false);
|
|
1256
|
+
}
|
|
1257
|
+
else {
|
|
1258
|
+
const match = item.text().toLowerCase().includes(q);
|
|
1259
|
+
item.hidden.set(!match);
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1075
1262
|
}
|
|
1076
|
-
|
|
1263
|
+
toggle(event) {
|
|
1077
1264
|
if (event) {
|
|
1078
1265
|
event.preventDefault();
|
|
1079
1266
|
event.stopPropagation();
|
|
@@ -1085,16 +1272,10 @@ class StrataDropdownComponent {
|
|
|
1085
1272
|
this.show();
|
|
1086
1273
|
}
|
|
1087
1274
|
}
|
|
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();
|
|
1275
|
+
onItemClick(item) {
|
|
1276
|
+
this.hide();
|
|
1277
|
+
this.selected.set(item.value());
|
|
1278
|
+
this.itemSelected.emit(item.value());
|
|
1098
1279
|
}
|
|
1099
1280
|
show() {
|
|
1100
1281
|
this.open.set(true);
|
|
@@ -1105,50 +1286,52 @@ class StrataDropdownComponent {
|
|
|
1105
1286
|
hide() {
|
|
1106
1287
|
this.open.set(false);
|
|
1107
1288
|
}
|
|
1108
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1109
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1289
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSingleSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1290
|
+
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 <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
1291
|
}
|
|
1111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1292
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSingleSelectComponent, decorators: [{
|
|
1112
1293
|
type: Component,
|
|
1113
|
-
args: [{ selector: 'st-
|
|
1294
|
+
args: [{ selector: 'st-single-select', imports: [
|
|
1295
|
+
CommonModule,
|
|
1114
1296
|
StrataIconComponent,
|
|
1115
1297
|
StrataOverlayDirective,
|
|
1116
1298
|
StrataInputFieldComponent,
|
|
1117
1299
|
FormsModule,
|
|
1118
1300
|
StrataNativeInputRefDirective,
|
|
1119
1301
|
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
|
-
}] } });
|
|
1302
|
+
], 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>" }]
|
|
1303
|
+
}], 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
1304
|
|
|
1126
1305
|
class StrataDividerComponent {
|
|
1127
|
-
label = input(
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1306
|
+
label = input(/* @ts-ignore */
|
|
1307
|
+
...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1308
|
+
margin = input(true, /* @ts-ignore */
|
|
1309
|
+
...(ngDevMode ? [{ debugName: "margin" }] : /* istanbul ignore next */ []));
|
|
1310
|
+
vertical = input(false, /* @ts-ignore */
|
|
1311
|
+
...(ngDevMode ? [{ debugName: "vertical" }] : /* istanbul ignore next */ []));
|
|
1312
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataDividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1313
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataDividerComponent, isStandalone: true, selector: "st-divider", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, margin: { classPropertyName: "margin", publicName: "margin", isSignal: true, isRequired: false, transformFunction: null }, vertical: { classPropertyName: "vertical", publicName: "vertical", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (!label() || vertical()) {\n <div class=\"divider-line\" [class.divider-margin]=\"margin()\" [class.vertical]=\"vertical()\"></div>\n} @else {\n <div class=\"divider-line-with-text\" [class.divider-margin]=\"margin()\">\n <div class=\"divider-line\"></div>\n <span>{{ label() }}</span>\n <div class=\"divider-line\"></div>\n </div>\n}\n" });
|
|
1132
1314
|
}
|
|
1133
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1315
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataDividerComponent, decorators: [{
|
|
1134
1316
|
type: Component,
|
|
1135
1317
|
args: [{ selector: 'st-divider', imports: [], template: "@if (!label() || vertical()) {\n <div class=\"divider-line\" [class.divider-margin]=\"margin()\" [class.vertical]=\"vertical()\"></div>\n} @else {\n <div class=\"divider-line-with-text\" [class.divider-margin]=\"margin()\">\n <div class=\"divider-line\"></div>\n <span>{{ label() }}</span>\n <div class=\"divider-line\"></div>\n </div>\n}\n" }]
|
|
1136
1318
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], margin: [{ type: i0.Input, args: [{ isSignal: true, alias: "margin", required: false }] }], vertical: [{ type: i0.Input, args: [{ isSignal: true, alias: "vertical", required: false }] }] } });
|
|
1137
1319
|
|
|
1138
1320
|
class StrataTagComponent {
|
|
1139
|
-
size = input('md',
|
|
1321
|
+
size = input('md', /* @ts-ignore */
|
|
1322
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
1140
1323
|
get class() {
|
|
1141
1324
|
return this.size();
|
|
1142
1325
|
}
|
|
1143
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1144
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
1326
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataTagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1327
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: StrataTagComponent, isStandalone: true, selector: "st-tag", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.class" } }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
|
|
1145
1328
|
}
|
|
1146
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1329
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataTagComponent, decorators: [{
|
|
1147
1330
|
type: Component,
|
|
1148
1331
|
args: [{
|
|
1149
1332
|
selector: 'st-tag',
|
|
1150
1333
|
imports: [],
|
|
1151
|
-
template: '<ng-content></ng-content>'
|
|
1334
|
+
template: '<ng-content></ng-content>'
|
|
1152
1335
|
}]
|
|
1153
1336
|
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], class: [{
|
|
1154
1337
|
type: HostBinding,
|
|
@@ -1161,7 +1344,8 @@ class StrataKbdComponent {
|
|
|
1161
1344
|
* The sequence of keys to display.
|
|
1162
1345
|
* Can be an array like `['⌘', 'K']` or a string combo like `'meta+k'`.
|
|
1163
1346
|
*/
|
|
1164
|
-
keys = input([],
|
|
1347
|
+
keys = input([], /* @ts-ignore */
|
|
1348
|
+
...(ngDevMode ? [{ debugName: "keys" }] : /* istanbul ignore next */ []));
|
|
1165
1349
|
resolvedKeys = computed(() => {
|
|
1166
1350
|
const rawKeys = this.keys();
|
|
1167
1351
|
const labels = this.config.shortcutLabels;
|
|
@@ -1181,62 +1365,130 @@ class StrataKbdComponent {
|
|
|
1181
1365
|
return rawKeys.split('+').map(parseKey);
|
|
1182
1366
|
}
|
|
1183
1367
|
return Array.isArray(rawKeys) ? rawKeys.map(parseKey) : [];
|
|
1184
|
-
},
|
|
1185
|
-
|
|
1186
|
-
static
|
|
1368
|
+
}, /* @ts-ignore */
|
|
1369
|
+
...(ngDevMode ? [{ debugName: "resolvedKeys" }] : /* istanbul ignore next */ []));
|
|
1370
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataKbdComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1371
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataKbdComponent, isStandalone: true, selector: "st-kbd", inputs: { keys: { classPropertyName: "keys", publicName: "keys", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, 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"] });
|
|
1187
1372
|
}
|
|
1188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataKbdComponent, decorators: [{
|
|
1189
1374
|
type: Component,
|
|
1190
1375
|
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
1376
|
}], propDecorators: { keys: [{ type: i0.Input, args: [{ isSignal: true, alias: "keys", required: false }] }] } });
|
|
1192
1377
|
|
|
1378
|
+
class StrataRadioComponent {
|
|
1379
|
+
value = input.required(/* @ts-ignore */
|
|
1380
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1381
|
+
label = input(undefined, /* @ts-ignore */
|
|
1382
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1383
|
+
checked = model(false, /* @ts-ignore */
|
|
1384
|
+
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
1385
|
+
disabled = input(false, /* @ts-ignore */
|
|
1386
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1387
|
+
selected = output();
|
|
1388
|
+
get isChecked() {
|
|
1389
|
+
return this.checked();
|
|
1390
|
+
}
|
|
1391
|
+
get isDisabled() {
|
|
1392
|
+
return this.disabled();
|
|
1393
|
+
}
|
|
1394
|
+
onClick(event) {
|
|
1395
|
+
if (this.disabled()) {
|
|
1396
|
+
return;
|
|
1397
|
+
}
|
|
1398
|
+
event.stopImmediatePropagation();
|
|
1399
|
+
this.selected.emit();
|
|
1400
|
+
this.checked.set(true);
|
|
1401
|
+
}
|
|
1402
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataRadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1403
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", 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", selected: "selected" }, 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" });
|
|
1404
|
+
}
|
|
1405
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataRadioComponent, decorators: [{
|
|
1406
|
+
type: Component,
|
|
1407
|
+
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" }]
|
|
1408
|
+
}], 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 }] }], selected: [{ type: i0.Output, args: ["selected"] }], isChecked: [{
|
|
1409
|
+
type: HostBinding,
|
|
1410
|
+
args: ['attr.data-checked']
|
|
1411
|
+
}], isDisabled: [{
|
|
1412
|
+
type: HostBinding,
|
|
1413
|
+
args: ['attr.data-disabled']
|
|
1414
|
+
}], onClick: [{
|
|
1415
|
+
type: HostListener,
|
|
1416
|
+
args: ['click', ['$event']]
|
|
1417
|
+
}] } });
|
|
1418
|
+
|
|
1193
1419
|
class StrataItemComponent {
|
|
1194
1420
|
element = inject(ElementRef);
|
|
1195
|
-
|
|
1421
|
+
_activatable = inject(StrataActivatableDirective);
|
|
1422
|
+
checkbox = contentChild(StrataCheckboxComponent, { ...(ngDevMode ? { debugName: "checkbox" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
1423
|
+
toggle = contentChild(StrataToggleComponent, { ...(ngDevMode ? { debugName: "toggle" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
1424
|
+
radio = contentChild(StrataRadioComponent, { ...(ngDevMode ? { debugName: "radio" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
1425
|
+
interactable = this._activatable.interactable;
|
|
1426
|
+
disabled = this._activatable.disabled;
|
|
1427
|
+
constructor() {
|
|
1428
|
+
this.interactable.set(false);
|
|
1429
|
+
}
|
|
1196
1430
|
get isInteractable() {
|
|
1197
|
-
return this.
|
|
1431
|
+
return this._activatable.isFocusable();
|
|
1198
1432
|
}
|
|
1199
|
-
get
|
|
1200
|
-
return this.
|
|
1433
|
+
get isDisabledClass() {
|
|
1434
|
+
return this.disabled();
|
|
1201
1435
|
}
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1436
|
+
onHostClick(event) {
|
|
1437
|
+
if (this.disabled() || !this.interactable()) {
|
|
1438
|
+
return;
|
|
1439
|
+
}
|
|
1440
|
+
// Only trigger if we didn't click an interactive element within the item
|
|
1441
|
+
const target = event.target;
|
|
1442
|
+
const isControl = target.closest('st-checkbox, st-toggle, st-radio');
|
|
1443
|
+
if (!isControl) {
|
|
1444
|
+
this.onActivated();
|
|
1207
1445
|
}
|
|
1208
1446
|
}
|
|
1209
|
-
|
|
1210
|
-
|
|
1447
|
+
onActivated() {
|
|
1448
|
+
if (this.disabled())
|
|
1449
|
+
return;
|
|
1450
|
+
// Trigger children if they exist
|
|
1451
|
+
this.checkbox()?.nativeElement.click();
|
|
1452
|
+
this.toggle()?.nativeElement.click();
|
|
1453
|
+
this.radio()?.nativeElement.click();
|
|
1454
|
+
}
|
|
1455
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1456
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.1", 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
1457
|
}
|
|
1212
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1458
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataItemComponent, decorators: [{
|
|
1213
1459
|
type: Component,
|
|
1214
|
-
args: [{ selector: 'st-item', imports: [],
|
|
1215
|
-
|
|
1460
|
+
args: [{ selector: 'st-item', imports: [], hostDirectives: [
|
|
1461
|
+
{
|
|
1462
|
+
directive: StrataActivatableDirective,
|
|
1463
|
+
inputs: ['disabled', 'interactable'],
|
|
1464
|
+
outputs: ['activated']
|
|
1465
|
+
},
|
|
1466
|
+
], 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" }]
|
|
1467
|
+
}], 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
1468
|
type: HostBinding,
|
|
1217
1469
|
args: ['class.interactable']
|
|
1218
|
-
}],
|
|
1470
|
+
}], isDisabledClass: [{
|
|
1219
1471
|
type: HostBinding,
|
|
1220
|
-
args: ['
|
|
1221
|
-
}],
|
|
1222
|
-
type: HostListener,
|
|
1223
|
-
args: ['keydown.enter', ['$event']]
|
|
1224
|
-
}, {
|
|
1472
|
+
args: ['class.disabled']
|
|
1473
|
+
}], onHostClick: [{
|
|
1225
1474
|
type: HostListener,
|
|
1226
|
-
args: ['
|
|
1475
|
+
args: ['click', ['$event']]
|
|
1227
1476
|
}] } });
|
|
1228
1477
|
|
|
1229
1478
|
class StrataItemListComponent {
|
|
1230
|
-
items = input.required(
|
|
1231
|
-
|
|
1232
|
-
|
|
1479
|
+
items = input.required(/* @ts-ignore */
|
|
1480
|
+
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
1481
|
+
dividers = input(true, /* @ts-ignore */
|
|
1482
|
+
...(ngDevMode ? [{ debugName: "dividers" }] : /* istanbul ignore next */ []));
|
|
1483
|
+
template = input(/* @ts-ignore */
|
|
1484
|
+
...(ngDevMode ? [undefined, { debugName: "template" }] : /* istanbul ignore next */ []));
|
|
1233
1485
|
get hostClasses() {
|
|
1234
1486
|
return [this.dividers() ? 'with-dividers' : ''];
|
|
1235
1487
|
}
|
|
1236
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1237
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1488
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataItemListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1489
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", 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
1490
|
}
|
|
1239
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1491
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataItemListComponent, decorators: [{
|
|
1240
1492
|
type: Component,
|
|
1241
1493
|
args: [{ selector: 'st-item-list', imports: [StrataItemComponent, NgTemplateOutlet, CommonModule], 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" }]
|
|
1242
1494
|
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], dividers: [{ type: i0.Input, args: [{ isSignal: true, alias: "dividers", required: false }] }], template: [{ type: i0.Input, args: [{ isSignal: true, alias: "template", required: false }] }], hostClasses: [{
|
|
@@ -1245,8 +1497,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1245
1497
|
}] } });
|
|
1246
1498
|
|
|
1247
1499
|
class StrataAutoResizeDirective {
|
|
1248
|
-
minimumRows = input(1,
|
|
1249
|
-
|
|
1500
|
+
minimumRows = input(1, /* @ts-ignore */
|
|
1501
|
+
...(ngDevMode ? [{ debugName: "minimumRows" }] : /* istanbul ignore next */ []));
|
|
1502
|
+
maximumRows = input(/* @ts-ignore */
|
|
1503
|
+
...(ngDevMode ? [undefined, { debugName: "maximumRows" }] : /* istanbul ignore next */ []));
|
|
1250
1504
|
lineHeight = 0;
|
|
1251
1505
|
element = inject(ElementRef);
|
|
1252
1506
|
onInput() {
|
|
@@ -1286,13 +1540,13 @@ class StrataAutoResizeDirective {
|
|
|
1286
1540
|
textarea.style.height = `${newHeight}px`;
|
|
1287
1541
|
textarea.style.overflowY = scrollHeight > maxHeight ? 'auto' : 'hidden';
|
|
1288
1542
|
}
|
|
1289
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1290
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1543
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataAutoResizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1544
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.1", type: StrataAutoResizeDirective, isStandalone: true, selector: "[stAutoResize]", inputs: { minimumRows: { classPropertyName: "minimumRows", publicName: "minimumRows", isSignal: true, isRequired: false, transformFunction: null }, maximumRows: { classPropertyName: "maximumRows", publicName: "maximumRows", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "input": "onInput()", "window:resize": "onWindowResize()" } }, usesOnChanges: true, ngImport: i0 });
|
|
1291
1545
|
}
|
|
1292
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1546
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataAutoResizeDirective, decorators: [{
|
|
1293
1547
|
type: Directive,
|
|
1294
1548
|
args: [{
|
|
1295
|
-
selector: '[stAutoResize]'
|
|
1549
|
+
selector: '[stAutoResize]'
|
|
1296
1550
|
}]
|
|
1297
1551
|
}], propDecorators: { minimumRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "minimumRows", required: false }] }], maximumRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximumRows", required: false }] }], onInput: [{
|
|
1298
1552
|
type: HostListener,
|
|
@@ -1303,11 +1557,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1303
1557
|
}] } });
|
|
1304
1558
|
|
|
1305
1559
|
class StrataPaginationComponent {
|
|
1306
|
-
currentPage = model(1,
|
|
1307
|
-
|
|
1560
|
+
currentPage = model(1, /* @ts-ignore */
|
|
1561
|
+
...(ngDevMode ? [{ debugName: "currentPage" }] : /* istanbul ignore next */ []));
|
|
1562
|
+
totalPages = input.required(/* @ts-ignore */
|
|
1563
|
+
...(ngDevMode ? [{ debugName: "totalPages" }] : /* istanbul ignore next */ []));
|
|
1308
1564
|
pageSelected = output();
|
|
1309
|
-
pageButtons = computed(() => this.calculatePageButtons(this.currentPage(), this.totalPages()),
|
|
1310
|
-
|
|
1565
|
+
pageButtons = computed(() => this.calculatePageButtons(this.currentPage(), this.totalPages()), /* @ts-ignore */
|
|
1566
|
+
...(ngDevMode ? [{ debugName: "pageButtons" }] : /* istanbul ignore next */ []));
|
|
1567
|
+
hideNextPreviousAtStartEnd = input(false, /* @ts-ignore */
|
|
1568
|
+
...(ngDevMode ? [{ debugName: "hideNextPreviousAtStartEnd" }] : /* istanbul ignore next */ []));
|
|
1311
1569
|
changePage(newPage) {
|
|
1312
1570
|
this.currentPage.set(newPage);
|
|
1313
1571
|
this.pageSelected.emit(this.currentPage());
|
|
@@ -1368,13 +1626,13 @@ class StrataPaginationComponent {
|
|
|
1368
1626
|
return {
|
|
1369
1627
|
page: page,
|
|
1370
1628
|
text: page + '',
|
|
1371
|
-
clickable: true
|
|
1629
|
+
clickable: true
|
|
1372
1630
|
};
|
|
1373
1631
|
}
|
|
1374
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1375
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1632
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1633
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataPaginationComponent, isStandalone: true, selector: "st-pagination", inputs: { currentPage: { classPropertyName: "currentPage", publicName: "currentPage", isSignal: true, isRequired: false, transformFunction: null }, totalPages: { classPropertyName: "totalPages", publicName: "totalPages", isSignal: true, isRequired: true, transformFunction: null }, hideNextPreviousAtStartEnd: { classPropertyName: "hideNextPreviousAtStartEnd", publicName: "hideNextPreviousAtStartEnd", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { currentPage: "currentPageChange", pageSelected: "pageSelected" }, ngImport: i0, template: "<button\n [disabled]=\"currentPage() === 1\"\n [class.clickable]=\"true\"\n [class.hideOnDisabled]=\"hideNextPreviousAtStartEnd()\"\n (click)=\"changePage(currentPage() - 1)\"\n>\n Previous\n</button>\n@for (page of pageButtons(); track page) {\n <button\n [class.selected]=\"page.page === currentPage()\"\n [class.clickable]=\"page.clickable\"\n (click)=\"page.page ? changePage(page.page) : null\"\n >\n {{ page.text }}\n </button>\n}\n<button\n [disabled]=\"currentPage() === totalPages()\"\n (click)=\"changePage(currentPage() + 1)\"\n [class.clickable]=\"true\"\n [class.hideOnDisabled]=\"hideNextPreviousAtStartEnd()\"\n>\n Next\n</button>\n" });
|
|
1376
1634
|
}
|
|
1377
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1635
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataPaginationComponent, decorators: [{
|
|
1378
1636
|
type: Component,
|
|
1379
1637
|
args: [{ selector: 'st-pagination', imports: [], template: "<button\n [disabled]=\"currentPage() === 1\"\n [class.clickable]=\"true\"\n [class.hideOnDisabled]=\"hideNextPreviousAtStartEnd()\"\n (click)=\"changePage(currentPage() - 1)\"\n>\n Previous\n</button>\n@for (page of pageButtons(); track page) {\n <button\n [class.selected]=\"page.page === currentPage()\"\n [class.clickable]=\"page.clickable\"\n (click)=\"page.page ? changePage(page.page) : null\"\n >\n {{ page.text }}\n </button>\n}\n<button\n [disabled]=\"currentPage() === totalPages()\"\n (click)=\"changePage(currentPage() + 1)\"\n [class.clickable]=\"true\"\n [class.hideOnDisabled]=\"hideNextPreviousAtStartEnd()\"\n>\n Next\n</button>\n" }]
|
|
1380
1638
|
}], propDecorators: { currentPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPage", required: false }] }, { type: i0.Output, args: ["currentPageChange"] }], totalPages: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalPages", required: true }] }], pageSelected: [{ type: i0.Output, args: ["pageSelected"] }], hideNextPreviousAtStartEnd: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideNextPreviousAtStartEnd", required: false }] }] } });
|
|
@@ -1386,25 +1644,31 @@ class CapitalizePipe {
|
|
|
1386
1644
|
transform(value, ..._args) {
|
|
1387
1645
|
return CapitalizePipe.capitalize(value);
|
|
1388
1646
|
}
|
|
1389
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1390
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
1647
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: CapitalizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1648
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: CapitalizePipe, isStandalone: true, name: "capitalize" });
|
|
1391
1649
|
}
|
|
1392
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1650
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: CapitalizePipe, decorators: [{
|
|
1393
1651
|
type: Pipe,
|
|
1394
1652
|
args: [{
|
|
1395
1653
|
name: 'capitalize',
|
|
1396
1654
|
standalone: true,
|
|
1397
|
-
pure: true
|
|
1655
|
+
pure: true
|
|
1398
1656
|
}]
|
|
1399
1657
|
}] });
|
|
1400
1658
|
|
|
1401
1659
|
class StrataProgressLinearComponent {
|
|
1402
|
-
min = input(0,
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1660
|
+
min = input(0, /* @ts-ignore */
|
|
1661
|
+
...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
|
|
1662
|
+
max = input(100, /* @ts-ignore */
|
|
1663
|
+
...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
1664
|
+
value = input.required(/* @ts-ignore */
|
|
1665
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1666
|
+
showLabel = input(true, /* @ts-ignore */
|
|
1667
|
+
...(ngDevMode ? [{ debugName: "showLabel" }] : /* istanbul ignore next */ []));
|
|
1668
|
+
labelFormat = input('percentage', /* @ts-ignore */
|
|
1669
|
+
...(ngDevMode ? [{ debugName: "labelFormat" }] : /* istanbul ignore next */ []));
|
|
1670
|
+
growDirection = input('right', /* @ts-ignore */
|
|
1671
|
+
...(ngDevMode ? [{ debugName: "growDirection" }] : /* istanbul ignore next */ []));
|
|
1408
1672
|
percentage = computed(() => {
|
|
1409
1673
|
if (this.max() <= this.min()) {
|
|
1410
1674
|
return 0;
|
|
@@ -1413,17 +1677,18 @@ class StrataProgressLinearComponent {
|
|
|
1413
1677
|
const progressedValue = clampedValue - this.min();
|
|
1414
1678
|
const progressableValues = this.max() - this.min();
|
|
1415
1679
|
return (progressedValue / progressableValues) * 100;
|
|
1416
|
-
},
|
|
1680
|
+
}, /* @ts-ignore */
|
|
1681
|
+
...(ngDevMode ? [{ debugName: "percentage" }] : /* istanbul ignore next */ []));
|
|
1417
1682
|
get cssClasses() {
|
|
1418
1683
|
return [`grow-${this.growDirection()}`];
|
|
1419
1684
|
}
|
|
1420
1685
|
get percentageProperty() {
|
|
1421
1686
|
return this.percentage();
|
|
1422
1687
|
}
|
|
1423
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1424
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1688
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataProgressLinearComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1689
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataProgressLinearComponent, isStandalone: true, selector: "st-progress-linear", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, labelFormat: { classPropertyName: "labelFormat", publicName: "labelFormat", isSignal: true, isRequired: false, transformFunction: null }, growDirection: { classPropertyName: "growDirection", publicName: "growDirection", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.cssClasses", "style.--st-progress-percentage": "this.percentageProperty" } }, ngImport: i0, template: "<div class=\"linear-container\">\n <div class=\"linear-bar\" [style.width.%]=\"percentage()\"></div>\n</div>\n\n<ng-container [ngTemplateOutlet]=\"label\"></ng-container>\n\n<ng-template #label>\n @if (showLabel()) {\n <span class=\"label\">\n @switch (labelFormat()) {\n @case (\"percentage\") {\n {{ percentage() | number: \"1.0-0\" }}%\n }\n @case (\"value\") {\n {{ value() | number: \"1.0-0\" }}\n }\n }\n </span>\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: DecimalPipe, name: "number" }] });
|
|
1425
1690
|
}
|
|
1426
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1691
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataProgressLinearComponent, decorators: [{
|
|
1427
1692
|
type: Component,
|
|
1428
1693
|
args: [{ selector: 'st-progress-linear', imports: [DecimalPipe, NgTemplateOutlet], template: "<div class=\"linear-container\">\n <div class=\"linear-bar\" [style.width.%]=\"percentage()\"></div>\n</div>\n\n<ng-container [ngTemplateOutlet]=\"label\"></ng-container>\n\n<ng-template #label>\n @if (showLabel()) {\n <span class=\"label\">\n @switch (labelFormat()) {\n @case (\"percentage\") {\n {{ percentage() | number: \"1.0-0\" }}%\n }\n @case (\"value\") {\n {{ value() | number: \"1.0-0\" }}\n }\n }\n </span>\n }\n</ng-template>\n" }]
|
|
1429
1694
|
}], propDecorators: { min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], showLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabel", required: false }] }], labelFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelFormat", required: false }] }], growDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "growDirection", required: false }] }], cssClasses: [{
|
|
@@ -1435,13 +1700,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1435
1700
|
}] } });
|
|
1436
1701
|
|
|
1437
1702
|
class StrataProgressRadialComponent {
|
|
1438
|
-
min = input(0,
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1703
|
+
min = input(0, /* @ts-ignore */
|
|
1704
|
+
...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
|
|
1705
|
+
max = input(100, /* @ts-ignore */
|
|
1706
|
+
...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
1707
|
+
value = input.required(/* @ts-ignore */
|
|
1708
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1709
|
+
showLabel = input(true, /* @ts-ignore */
|
|
1710
|
+
...(ngDevMode ? [{ debugName: "showLabel" }] : /* istanbul ignore next */ []));
|
|
1711
|
+
labelFormat = input('percentage', /* @ts-ignore */
|
|
1712
|
+
...(ngDevMode ? [{ debugName: "labelFormat" }] : /* istanbul ignore next */ []));
|
|
1713
|
+
size = input(120, /* @ts-ignore */
|
|
1714
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
1715
|
+
strokeWidth = input(10, /* @ts-ignore */
|
|
1716
|
+
...(ngDevMode ? [{ debugName: "strokeWidth" }] : /* istanbul ignore next */ []));
|
|
1445
1717
|
percentage = computed(() => {
|
|
1446
1718
|
if (this.max() <= this.min()) {
|
|
1447
1719
|
return 0;
|
|
@@ -1450,17 +1722,21 @@ class StrataProgressRadialComponent {
|
|
|
1450
1722
|
const progressedValue = clampedValue - this.min();
|
|
1451
1723
|
const progressableValues = this.max() - this.min();
|
|
1452
1724
|
return (progressedValue / progressableValues) * 100;
|
|
1453
|
-
},
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1725
|
+
}, /* @ts-ignore */
|
|
1726
|
+
...(ngDevMode ? [{ debugName: "percentage" }] : /* istanbul ignore next */ []));
|
|
1727
|
+
radius = computed(() => (this.size() - this.strokeWidth()) / 2, /* @ts-ignore */
|
|
1728
|
+
...(ngDevMode ? [{ debugName: "radius" }] : /* istanbul ignore next */ []));
|
|
1729
|
+
circumference = computed(() => 2 * Math.PI * this.radius(), /* @ts-ignore */
|
|
1730
|
+
...(ngDevMode ? [{ debugName: "circumference" }] : /* istanbul ignore next */ []));
|
|
1731
|
+
dashOffset = computed(() => this.circumference() * (1 - this.percentage() / 100), /* @ts-ignore */
|
|
1732
|
+
...(ngDevMode ? [{ debugName: "dashOffset" }] : /* istanbul ignore next */ []));
|
|
1457
1733
|
get percentageProperty() {
|
|
1458
1734
|
return this.percentage();
|
|
1459
1735
|
}
|
|
1460
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1461
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1736
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataProgressRadialComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1737
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataProgressRadialComponent, isStandalone: true, selector: "st-progress-radial", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, labelFormat: { classPropertyName: "labelFormat", publicName: "labelFormat", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, strokeWidth: { classPropertyName: "strokeWidth", publicName: "strokeWidth", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--st-progress-percentage": "this.percentageProperty" } }, ngImport: i0, template: "<div class=\"radial-container\">\n <svg width=\"100%\" height=\"100%\">\n <circle class=\"background\"></circle>\n\n <circle class=\"progress\" stroke-linecap=\"round\"></circle>\n </svg>\n\n <ng-container [ngTemplateOutlet]=\"label\"></ng-container>\n</div>\n\n<ng-template #label>\n @if (showLabel()) {\n <span class=\"label\">\n @switch (labelFormat()) {\n @case (\"percentage\") {\n {{ percentage() | number: \"1.0-0\" }}%\n }\n @case (\"value\") {\n {{ value() | number: \"1.0-0\" }}\n }\n }\n </span>\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: DecimalPipe, name: "number" }] });
|
|
1462
1738
|
}
|
|
1463
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1739
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataProgressRadialComponent, decorators: [{
|
|
1464
1740
|
type: Component,
|
|
1465
1741
|
args: [{ selector: 'st-progress-radial', imports: [DecimalPipe, NgTemplateOutlet], template: "<div class=\"radial-container\">\n <svg width=\"100%\" height=\"100%\">\n <circle class=\"background\"></circle>\n\n <circle class=\"progress\" stroke-linecap=\"round\"></circle>\n </svg>\n\n <ng-container [ngTemplateOutlet]=\"label\"></ng-container>\n</div>\n\n<ng-template #label>\n @if (showLabel()) {\n <span class=\"label\">\n @switch (labelFormat()) {\n @case (\"percentage\") {\n {{ percentage() | number: \"1.0-0\" }}%\n }\n @case (\"value\") {\n {{ value() | number: \"1.0-0\" }}\n }\n }\n </span>\n }\n</ng-template>\n" }]
|
|
1466
1742
|
}], propDecorators: { min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], showLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabel", required: false }] }], labelFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelFormat", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], strokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "strokeWidth", required: false }] }], percentageProperty: [{
|
|
@@ -1468,46 +1744,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1468
1744
|
args: ['style.--st-progress-percentage']
|
|
1469
1745
|
}] } });
|
|
1470
1746
|
|
|
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
1747
|
class StrataRadioGroupComponent {
|
|
1509
|
-
value = model('',
|
|
1510
|
-
|
|
1748
|
+
value = model('', /* @ts-ignore */
|
|
1749
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1750
|
+
radios = contentChildren(StrataRadioComponent, { ...(ngDevMode ? { debugName: "radios" } : /* istanbul ignore next */ {}), descendants: true });
|
|
1511
1751
|
constructor() {
|
|
1512
1752
|
// Sync group value -> children checked state
|
|
1513
1753
|
effect(() => {
|
|
@@ -1519,7 +1759,7 @@ class StrataRadioGroupComponent {
|
|
|
1519
1759
|
// Handle child selection -> update group value
|
|
1520
1760
|
effect((onCleanup) => {
|
|
1521
1761
|
const radios = this.radios();
|
|
1522
|
-
const subs = radios.map((radio) => radio.
|
|
1762
|
+
const subs = radios.map((radio) => radio.selected.subscribe(() => {
|
|
1523
1763
|
this.value.set(radio.value());
|
|
1524
1764
|
}));
|
|
1525
1765
|
onCleanup(() => {
|
|
@@ -1527,22 +1767,25 @@ class StrataRadioGroupComponent {
|
|
|
1527
1767
|
});
|
|
1528
1768
|
});
|
|
1529
1769
|
}
|
|
1530
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1531
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
1770
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataRadioGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1771
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.1", type: StrataRadioGroupComponent, isStandalone: true, selector: "st-radio-group", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, queries: [{ propertyName: "radios", predicate: StrataRadioComponent, descendants: true, isSignal: true }], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
|
|
1532
1772
|
}
|
|
1533
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1773
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataRadioGroupComponent, decorators: [{
|
|
1534
1774
|
type: Component,
|
|
1535
1775
|
args: [{
|
|
1536
1776
|
selector: 'st-radio-group',
|
|
1537
1777
|
imports: [],
|
|
1538
|
-
template: `<ng-content></ng-content
|
|
1778
|
+
template: `<ng-content></ng-content>`
|
|
1539
1779
|
}]
|
|
1540
1780
|
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], radios: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => StrataRadioComponent), { ...{ descendants: true }, isSignal: true }] }] } });
|
|
1541
1781
|
|
|
1542
1782
|
class StrataSegmentedControlItemComponent {
|
|
1543
|
-
text = input.required(
|
|
1544
|
-
|
|
1545
|
-
|
|
1783
|
+
text = input.required(/* @ts-ignore */
|
|
1784
|
+
...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
1785
|
+
selected = model(false, /* @ts-ignore */
|
|
1786
|
+
...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
|
|
1787
|
+
disabled = input(false, /* @ts-ignore */
|
|
1788
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1546
1789
|
selectionChanged = output();
|
|
1547
1790
|
get tabIndex() {
|
|
1548
1791
|
return this.selected() || this.disabled() ? null : 0;
|
|
@@ -1554,13 +1797,13 @@ class StrataSegmentedControlItemComponent {
|
|
|
1554
1797
|
this.selected.set(true);
|
|
1555
1798
|
this.selectionChanged.emit();
|
|
1556
1799
|
}
|
|
1557
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1558
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
1800
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSegmentedControlItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1801
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: StrataSegmentedControlItemComponent, isStandalone: true, selector: "st-segmented-control-item", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selectedChange", selectionChanged: "selectionChanged" }, host: { listeners: { "click": "onClick()" }, properties: { "attr.tabindex": "this.tabIndex", "attr.disabled": "this.disabledAttribute" } }, ngImport: i0, template: "{{ text() }}\n", styles: [""] });
|
|
1559
1802
|
}
|
|
1560
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1803
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSegmentedControlItemComponent, decorators: [{
|
|
1561
1804
|
type: Component,
|
|
1562
1805
|
args: [{ selector: 'st-segmented-control-item', imports: [], host: {
|
|
1563
|
-
'(click)': 'onClick()'
|
|
1806
|
+
'(click)': 'onClick()'
|
|
1564
1807
|
}, template: "{{ text() }}\n" }]
|
|
1565
1808
|
}], propDecorators: { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: true }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }, { type: i0.Output, args: ["selectedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], selectionChanged: [{ type: i0.Output, args: ["selectionChanged"] }], tabIndex: [{
|
|
1566
1809
|
type: HostBinding,
|
|
@@ -1573,19 +1816,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1573
1816
|
class StrataSegmentedControlComponent {
|
|
1574
1817
|
elementRef = inject(ElementRef);
|
|
1575
1818
|
destroyRef = inject(DestroyRef);
|
|
1576
|
-
fullWidth = input(false, { ...(ngDevMode ? { debugName: "fullWidth" } : {}), transform: booleanAttribute });
|
|
1577
|
-
segmentItems = contentChildren(StrataSegmentedControlItemComponent,
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1819
|
+
fullWidth = input(false, { ...(ngDevMode ? { debugName: "fullWidth" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1820
|
+
segmentItems = contentChildren(StrataSegmentedControlItemComponent, /* @ts-ignore */
|
|
1821
|
+
...(ngDevMode ? [{ debugName: "segmentItems" }] : /* istanbul ignore next */ []));
|
|
1822
|
+
segmentItemsRefs = contentChildren(StrataSegmentedControlItemComponent, { ...(ngDevMode ? { debugName: "segmentItemsRefs" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
1823
|
+
selectedItem = signal(null, /* @ts-ignore */
|
|
1824
|
+
...(ngDevMode ? [{ debugName: "selectedItem" }] : /* istanbul ignore next */ []));
|
|
1825
|
+
selectedIndex = signal(0, /* @ts-ignore */
|
|
1826
|
+
...(ngDevMode ? [{ debugName: "selectedIndex" }] : /* istanbul ignore next */ []));
|
|
1827
|
+
offsets = signal([], /* @ts-ignore */
|
|
1828
|
+
...(ngDevMode ? [{ debugName: "offsets" }] : /* istanbul ignore next */ []));
|
|
1829
|
+
itemWidths = signal([], /* @ts-ignore */
|
|
1830
|
+
...(ngDevMode ? [{ debugName: "itemWidths" }] : /* istanbul ignore next */ []));
|
|
1831
|
+
tops = signal([], /* @ts-ignore */
|
|
1832
|
+
...(ngDevMode ? [{ debugName: "tops" }] : /* istanbul ignore next */ []));
|
|
1833
|
+
heights = signal([], /* @ts-ignore */
|
|
1834
|
+
...(ngDevMode ? [{ debugName: "heights" }] : /* istanbul ignore next */ []));
|
|
1835
|
+
offset = computed(() => this.offsets()[this.selectedIndex()] ?? 0, /* @ts-ignore */
|
|
1836
|
+
...(ngDevMode ? [{ debugName: "offset" }] : /* istanbul ignore next */ []));
|
|
1837
|
+
indicatorWidth = computed(() => this.itemWidths()[this.selectedIndex()] ?? 0, /* @ts-ignore */
|
|
1838
|
+
...(ngDevMode ? [{ debugName: "indicatorWidth" }] : /* istanbul ignore next */ []));
|
|
1839
|
+
indicatorTop = computed(() => this.tops()[this.selectedIndex()] ?? 0, /* @ts-ignore */
|
|
1840
|
+
...(ngDevMode ? [{ debugName: "indicatorTop" }] : /* istanbul ignore next */ []));
|
|
1841
|
+
indicatorHeight = computed(() => this.heights()[this.selectedIndex()] ?? 0, /* @ts-ignore */
|
|
1842
|
+
...(ngDevMode ? [{ debugName: "indicatorHeight" }] : /* istanbul ignore next */ []));
|
|
1589
1843
|
ngAfterViewInit() {
|
|
1590
1844
|
if (this.segmentItems().length === 0) {
|
|
1591
1845
|
return;
|
|
@@ -1636,46 +1890,48 @@ class StrataSegmentedControlComponent {
|
|
|
1636
1890
|
this.tops.set(tops);
|
|
1637
1891
|
this.heights.set(heights);
|
|
1638
1892
|
}
|
|
1639
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1640
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
1893
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSegmentedControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1894
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.1", type: StrataSegmentedControlComponent, isStandalone: true, selector: "st-segmented-control", inputs: { fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.st-segmented-control-full-width": "fullWidth()" } }, queries: [{ propertyName: "segmentItems", predicate: StrataSegmentedControlItemComponent, isSignal: true }, { propertyName: "segmentItemsRefs", predicate: StrataSegmentedControlItemComponent, read: ElementRef, isSignal: true }], ngImport: i0, template: "<ng-content select=\"st-segmented-control-item\"></ng-content>\n<div class=\"selection-item\" id=\"selection-indicator\" \n [style.left]=\"this.offset() + 'px'\"\n [style.top]=\"this.indicatorTop() + 'px'\"\n [style.width]=\"this.indicatorWidth() + 'px'\"\n [style.height]=\"this.indicatorHeight() + 'px'\">\n {{ this.selectedItem()?.text() }}\n</div>\n" });
|
|
1641
1895
|
}
|
|
1642
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1896
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSegmentedControlComponent, decorators: [{
|
|
1643
1897
|
type: Component,
|
|
1644
1898
|
args: [{ selector: 'st-segmented-control', imports: [], host: {
|
|
1645
|
-
'[class.st-segmented-control-full-width]': 'fullWidth()'
|
|
1899
|
+
'[class.st-segmented-control-full-width]': 'fullWidth()'
|
|
1646
1900
|
}, template: "<ng-content select=\"st-segmented-control-item\"></ng-content>\n<div class=\"selection-item\" id=\"selection-indicator\" \n [style.left]=\"this.offset() + 'px'\"\n [style.top]=\"this.indicatorTop() + 'px'\"\n [style.width]=\"this.indicatorWidth() + 'px'\"\n [style.height]=\"this.indicatorHeight() + 'px'\">\n {{ this.selectedItem()?.text() }}\n</div>\n" }]
|
|
1647
1901
|
}], ctorParameters: () => [], propDecorators: { fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], segmentItems: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => StrataSegmentedControlItemComponent), { isSignal: true }] }], segmentItemsRefs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => StrataSegmentedControlItemComponent), { ...{
|
|
1648
|
-
read: ElementRef
|
|
1902
|
+
read: ElementRef
|
|
1649
1903
|
}, isSignal: true }] }] } });
|
|
1650
1904
|
|
|
1651
1905
|
class StrataSidemenuComponent {
|
|
1652
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1653
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1906
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSidemenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1907
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.1", 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
1908
|
}
|
|
1655
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1909
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSidemenuComponent, decorators: [{
|
|
1656
1910
|
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"] }]
|
|
1911
|
+
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
1912
|
}] });
|
|
1659
1913
|
|
|
1660
1914
|
class StrataSidemenuSectionComponent {
|
|
1661
|
-
label = input(
|
|
1662
|
-
|
|
1663
|
-
static
|
|
1915
|
+
label = input(/* @ts-ignore */
|
|
1916
|
+
...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1917
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSidemenuSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1918
|
+
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%;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"] });
|
|
1664
1919
|
}
|
|
1665
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1920
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSidemenuSectionComponent, decorators: [{
|
|
1666
1921
|
type: Component,
|
|
1667
1922
|
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%;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"] }]
|
|
1668
1923
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }] } });
|
|
1669
1924
|
|
|
1670
1925
|
class StrataSidemenuItemDirective {
|
|
1671
|
-
active = input(false,
|
|
1926
|
+
active = input(false, /* @ts-ignore */
|
|
1927
|
+
...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
1672
1928
|
elementRef = inject(ElementRef);
|
|
1673
1929
|
constructor() {
|
|
1674
1930
|
effect(() => {
|
|
1675
1931
|
if (this.active()) {
|
|
1676
1932
|
this.elementRef.nativeElement.scrollIntoView({
|
|
1677
1933
|
block: 'nearest',
|
|
1678
|
-
inline: 'nearest'
|
|
1934
|
+
inline: 'nearest'
|
|
1679
1935
|
});
|
|
1680
1936
|
}
|
|
1681
1937
|
});
|
|
@@ -1684,10 +1940,10 @@ class StrataSidemenuItemDirective {
|
|
|
1684
1940
|
get isSelected() {
|
|
1685
1941
|
return this.active();
|
|
1686
1942
|
}
|
|
1687
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1688
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1943
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSidemenuItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1944
|
+
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 });
|
|
1689
1945
|
}
|
|
1690
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1946
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSidemenuItemDirective, decorators: [{
|
|
1691
1947
|
type: Directive,
|
|
1692
1948
|
args: [{
|
|
1693
1949
|
selector: '[stSidemenuItem]'
|
|
@@ -1701,9 +1957,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1701
1957
|
}] } });
|
|
1702
1958
|
|
|
1703
1959
|
class StrataSidemenuItemGroupComponent {
|
|
1704
|
-
label = input.required(
|
|
1705
|
-
|
|
1706
|
-
|
|
1960
|
+
label = input.required(/* @ts-ignore */
|
|
1961
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1962
|
+
expanded = signal(false, /* @ts-ignore */
|
|
1963
|
+
...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
1964
|
+
hasActiveChild = signal(false, /* @ts-ignore */
|
|
1965
|
+
...(ngDevMode ? [{ debugName: "hasActiveChild" }] : /* istanbul ignore next */ []));
|
|
1707
1966
|
router = inject(Router, { optional: true });
|
|
1708
1967
|
destroyRef = inject(DestroyRef);
|
|
1709
1968
|
routerLinks;
|
|
@@ -1734,10 +1993,10 @@ class StrataSidemenuItemGroupComponent {
|
|
|
1734
1993
|
this.expanded.set(true);
|
|
1735
1994
|
}
|
|
1736
1995
|
}
|
|
1737
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1738
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
1996
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSidemenuItemGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1997
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.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 } }, queries: [{ propertyName: "routerLinks", predicate: RouterLinkActive, descendants: true }], ngImport: i0, template: "<button stSidemenuItem type=\"button\" [active]=\"hasActiveChild()\" (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<div class=\"st-sidemenu-item-group-content\" [hidden]=\"!expanded()\">\n <ng-content></ng-content>\n</div>\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"] }, { kind: "component", type: StrataIconComponent, selector: "st-icon", inputs: ["name", "size"], outputs: ["sizeChange"] }] });
|
|
1739
1998
|
}
|
|
1740
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1999
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSidemenuItemGroupComponent, decorators: [{
|
|
1741
2000
|
type: Component,
|
|
1742
2001
|
args: [{ selector: 'st-sidemenu-item-group', imports: [StrataSidemenuItemDirective, StrataIconComponent], template: "<button stSidemenuItem type=\"button\" [active]=\"hasActiveChild()\" (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<div class=\"st-sidemenu-item-group-content\" [hidden]=\"!expanded()\">\n <ng-content></ng-content>\n</div>\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"] }]
|
|
1743
2002
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], routerLinks: [{
|
|
@@ -1748,19 +2007,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1748
2007
|
class StrataSliderComponent {
|
|
1749
2008
|
wrapper = viewChild.required('wrapper');
|
|
1750
2009
|
resizeObserver;
|
|
1751
|
-
value = model(
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
2010
|
+
value = model(/* @ts-ignore */
|
|
2011
|
+
...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2012
|
+
minimum = input.required(/* @ts-ignore */
|
|
2013
|
+
...(ngDevMode ? [{ debugName: "minimum" }] : /* istanbul ignore next */ []));
|
|
2014
|
+
maximum = input.required(/* @ts-ignore */
|
|
2015
|
+
...(ngDevMode ? [{ debugName: "maximum" }] : /* istanbul ignore next */ []));
|
|
2016
|
+
step = input(/* @ts-ignore */
|
|
2017
|
+
...(ngDevMode ? [undefined, { debugName: "step" }] : /* istanbul ignore next */ []));
|
|
2018
|
+
computedStep = computed(() => this.step() === 'none' || this.step() === undefined ? 'any' : this.step(), /* @ts-ignore */
|
|
2019
|
+
...(ngDevMode ? [{ debugName: "computedStep" }] : /* istanbul ignore next */ []));
|
|
1756
2020
|
steps = computed(() => {
|
|
1757
2021
|
const step = this.computedStep();
|
|
1758
2022
|
if (step === 'any' || step === undefined) {
|
|
1759
2023
|
return 0;
|
|
1760
2024
|
}
|
|
1761
2025
|
return Math.floor((this.maximum() - this.minimum()) / step) + 1;
|
|
1762
|
-
},
|
|
1763
|
-
|
|
2026
|
+
}, /* @ts-ignore */
|
|
2027
|
+
...(ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []));
|
|
2028
|
+
isStepped = computed(() => this.computedStep() !== 'any' && this.computedStep() !== undefined && this.computedStep() !== 0, /* @ts-ignore */
|
|
2029
|
+
...(ngDevMode ? [{ debugName: "isStepped" }] : /* istanbul ignore next */ []));
|
|
1764
2030
|
ngAfterViewInit() {
|
|
1765
2031
|
this.resizeObserver = new ResizeObserver(() => {
|
|
1766
2032
|
this.updateTickMath();
|
|
@@ -1790,23 +2056,24 @@ class StrataSliderComponent {
|
|
|
1790
2056
|
const size = styles.getPropertyValue('--st-slider-thumb-size');
|
|
1791
2057
|
return parseFloat(size);
|
|
1792
2058
|
}
|
|
1793
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1794
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
2059
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2060
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.1", 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]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.RangeValueAccessor, selector: "input[type=range]:not([ngNoCva])[formControlName],input[type=range]:not([ngNoCva])[formControl],input[type=range]:not([ngNoCva])[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
2061
|
}
|
|
1796
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2062
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSliderComponent, decorators: [{
|
|
1797
2063
|
type: Component,
|
|
1798
2064
|
args: [{ selector: 'st-slider', imports: [FormsModule], 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" }]
|
|
1799
2065
|
}], propDecorators: { wrapper: [{ type: i0.ViewChild, args: ['wrapper', { isSignal: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], minimum: [{ type: i0.Input, args: [{ isSignal: true, alias: "minimum", required: true }] }], maximum: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximum", required: true }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }] } });
|
|
1800
2066
|
|
|
1801
2067
|
class StrataSpinnerComponent {
|
|
1802
|
-
size = input('md',
|
|
2068
|
+
size = input('md', /* @ts-ignore */
|
|
2069
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
1803
2070
|
get cssClasses() {
|
|
1804
2071
|
return [this.size()];
|
|
1805
2072
|
}
|
|
1806
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1807
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
2073
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2074
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: StrataSpinnerComponent, isStandalone: true, selector: "st-spinner", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.cssClasses" } }, ngImport: i0, template: "<span class=\"st-spinner\"></span>\n" });
|
|
1808
2075
|
}
|
|
1809
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2076
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataSpinnerComponent, decorators: [{
|
|
1810
2077
|
type: Component,
|
|
1811
2078
|
args: [{ selector: 'st-spinner', imports: [], template: "<span class=\"st-spinner\"></span>\n" }]
|
|
1812
2079
|
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], cssClasses: [{
|
|
@@ -1819,15 +2086,18 @@ class StrataTabItemComponent {
|
|
|
1819
2086
|
* The text label for the tab.
|
|
1820
2087
|
* Can also be provided via content projection.
|
|
1821
2088
|
*/
|
|
1822
|
-
text = input(
|
|
2089
|
+
text = input(/* @ts-ignore */
|
|
2090
|
+
...(ngDevMode ? [undefined, { debugName: "text" }] : /* istanbul ignore next */ []));
|
|
1823
2091
|
/**
|
|
1824
2092
|
* Whether the tab is currently selected.
|
|
1825
2093
|
*/
|
|
1826
|
-
selected = model(false,
|
|
2094
|
+
selected = model(false, /* @ts-ignore */
|
|
2095
|
+
...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
|
|
1827
2096
|
/**
|
|
1828
2097
|
* Whether the tab is disabled.
|
|
1829
2098
|
*/
|
|
1830
|
-
disabled = input(false,
|
|
2099
|
+
disabled = input(false, /* @ts-ignore */
|
|
2100
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1831
2101
|
/**
|
|
1832
2102
|
* Emitted when the tab is clicked.
|
|
1833
2103
|
*/
|
|
@@ -1854,14 +2124,14 @@ class StrataTabItemComponent {
|
|
|
1854
2124
|
this.selected.set(true);
|
|
1855
2125
|
this.selectionChanged.emit();
|
|
1856
2126
|
}
|
|
1857
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1858
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2127
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataTabItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2128
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataTabItemComponent, isStandalone: true, selector: "st-tab-item", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selectedChange", selectionChanged: "selectionChanged" }, host: { attributes: { "role": "tab" }, listeners: { "click": "onClick()" }, properties: { "attr.aria-selected": "this.isSelected", "attr.aria-disabled": "this.isDisabled", "attr.tabindex": "this.tabIndex", "class.active": "this.activeClass", "class.disabled": "this.disabledClass" } }, ngImport: i0, template: "@if (text()) {\n {{ text() }}\n} @else {\n <ng-content></ng-content>\n}\n" });
|
|
1859
2129
|
}
|
|
1860
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataTabItemComponent, decorators: [{
|
|
1861
2131
|
type: Component,
|
|
1862
2132
|
args: [{ selector: 'st-tab-item', imports: [], host: {
|
|
1863
2133
|
'role': 'tab',
|
|
1864
|
-
'(click)': 'onClick()'
|
|
2134
|
+
'(click)': 'onClick()'
|
|
1865
2135
|
}, template: "@if (text()) {\n {{ text() }}\n} @else {\n <ng-content></ng-content>\n}\n" }]
|
|
1866
2136
|
}], propDecorators: { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }, { type: i0.Output, args: ["selectedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], selectionChanged: [{ type: i0.Output, args: ["selectionChanged"] }], isSelected: [{
|
|
1867
2137
|
type: HostBinding,
|
|
@@ -1881,12 +2151,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1881
2151
|
}] } });
|
|
1882
2152
|
|
|
1883
2153
|
class StrataTabsComponent {
|
|
1884
|
-
tabItems = contentChildren(StrataTabItemComponent, { ...(ngDevMode ? { debugName: "tabItems" } : {}), descendants: true });
|
|
1885
|
-
tabItemsRefs = contentChildren(StrataTabItemComponent, { ...(ngDevMode ? { debugName: "tabItemsRefs" } : {}), descendants: true,
|
|
2154
|
+
tabItems = contentChildren(StrataTabItemComponent, { ...(ngDevMode ? { debugName: "tabItems" } : /* istanbul ignore next */ {}), descendants: true });
|
|
2155
|
+
tabItemsRefs = contentChildren(StrataTabItemComponent, { ...(ngDevMode ? { debugName: "tabItemsRefs" } : /* istanbul ignore next */ {}), descendants: true,
|
|
1886
2156
|
read: ElementRef });
|
|
1887
|
-
indicator = viewChild('indicator',
|
|
1888
|
-
|
|
1889
|
-
|
|
2157
|
+
indicator = viewChild('indicator', /* @ts-ignore */
|
|
2158
|
+
...(ngDevMode ? [{ debugName: "indicator" }] : /* istanbul ignore next */ []));
|
|
2159
|
+
selectedTab = signal(null, /* @ts-ignore */
|
|
2160
|
+
...(ngDevMode ? [{ debugName: "selectedTab" }] : /* istanbul ignore next */ []));
|
|
2161
|
+
selectedIndex = signal(0, /* @ts-ignore */
|
|
2162
|
+
...(ngDevMode ? [{ debugName: "selectedIndex" }] : /* istanbul ignore next */ []));
|
|
1890
2163
|
resizeObserver;
|
|
1891
2164
|
constructor() {
|
|
1892
2165
|
// Coordinate child selection
|
|
@@ -1945,78 +2218,42 @@ class StrataTabsComponent {
|
|
|
1945
2218
|
this.selectedTab.set(tab);
|
|
1946
2219
|
this.selectedIndex.set(index);
|
|
1947
2220
|
}
|
|
1948
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1949
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
2221
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2222
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.1", type: StrataTabsComponent, isStandalone: true, selector: "st-tabs", host: { classAttribute: "st-tabs-host" }, queries: [{ propertyName: "tabItems", predicate: StrataTabItemComponent, descendants: true, isSignal: true }, { propertyName: "tabItemsRefs", predicate: StrataTabItemComponent, descendants: true, read: ElementRef, isSignal: true }], viewQueries: [{ propertyName: "indicator", first: true, predicate: ["indicator"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"tabs-container\" role=\"tablist\">\n <ng-content></ng-content>\n <div #indicator class=\"selection-indicator\"></div>\n</div>\n" });
|
|
1950
2223
|
}
|
|
1951
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2224
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataTabsComponent, decorators: [{
|
|
1952
2225
|
type: Component,
|
|
1953
2226
|
args: [{ selector: 'st-tabs', imports: [], host: {
|
|
1954
|
-
'class': 'st-tabs-host'
|
|
2227
|
+
'class': 'st-tabs-host'
|
|
1955
2228
|
}, template: "<div class=\"tabs-container\" role=\"tablist\">\n <ng-content></ng-content>\n <div #indicator class=\"selection-indicator\"></div>\n</div>\n" }]
|
|
1956
2229
|
}], ctorParameters: () => [], propDecorators: { tabItems: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => StrataTabItemComponent), { ...{ descendants: true }, isSignal: true }] }], tabItemsRefs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => StrataTabItemComponent), { ...{
|
|
1957
2230
|
descendants: true,
|
|
1958
|
-
read: ElementRef
|
|
2231
|
+
read: ElementRef
|
|
1959
2232
|
}, isSignal: true }] }], indicator: [{ type: i0.ViewChild, args: ['indicator', { isSignal: true }] }] } });
|
|
1960
2233
|
|
|
1961
|
-
class
|
|
1962
|
-
|
|
1963
|
-
|
|
2234
|
+
class ModalService {
|
|
2235
|
+
_modals = signal([], /* @ts-ignore */
|
|
2236
|
+
...(ngDevMode ? [{ debugName: "_modals" }] : /* istanbul ignore next */ []));
|
|
2237
|
+
modals = this._modals.asReadonly();
|
|
2238
|
+
document = inject(DOCUMENT$1);
|
|
1964
2239
|
constructor() {
|
|
1965
2240
|
effect(() => {
|
|
1966
|
-
const
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
if (cls.startsWith('st-theme-')) {
|
|
1971
|
-
el.classList.remove(cls);
|
|
2241
|
+
const body = this.document?.body;
|
|
2242
|
+
if (body) {
|
|
2243
|
+
if (this.modals().length > 0) {
|
|
2244
|
+
body.classList.add('st-scroll-lock');
|
|
1972
2245
|
}
|
|
1973
|
-
|
|
1974
|
-
|
|
2246
|
+
else {
|
|
2247
|
+
body.classList.remove('st-scroll-lock');
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
1975
2250
|
});
|
|
1976
2251
|
}
|
|
1977
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataThemeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1978
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: StrataThemeDirective, isStandalone: true, selector: "[stTheme]", inputs: { stTheme: { classPropertyName: "stTheme", publicName: "stTheme", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
1979
|
-
}
|
|
1980
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: StrataThemeDirective, decorators: [{
|
|
1981
|
-
type: Directive,
|
|
1982
|
-
args: [{
|
|
1983
|
-
selector: '[stTheme]',
|
|
1984
|
-
}]
|
|
1985
|
-
}], ctorParameters: () => [], propDecorators: { stTheme: [{ type: i0.Input, args: [{ isSignal: true, alias: "stTheme", required: true }] }] } });
|
|
1986
|
-
|
|
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
|
-
class ModalService {
|
|
2011
|
-
stack = new Stack();
|
|
2012
|
-
currentModals = new BehaviorSubject(this.stack);
|
|
2013
2252
|
showModal(config) {
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
});
|
|
2019
|
-
this.currentModals.next(this.stack);
|
|
2253
|
+
if (!config.size) {
|
|
2254
|
+
config.size = 'md';
|
|
2255
|
+
}
|
|
2256
|
+
this._modals.update((prev) => [...prev, config]);
|
|
2020
2257
|
}
|
|
2021
2258
|
showAlert(config, callback) {
|
|
2022
2259
|
this.showModal({
|
|
@@ -2031,51 +2268,98 @@ class ModalService {
|
|
|
2031
2268
|
affirmativeButton: config.affirmativeButton,
|
|
2032
2269
|
cancelButton: config.cancelButton,
|
|
2033
2270
|
theme: config.theme,
|
|
2034
|
-
icon: config.icon
|
|
2035
|
-
}
|
|
2271
|
+
icon: config.icon
|
|
2272
|
+
}
|
|
2036
2273
|
});
|
|
2037
2274
|
}
|
|
2038
2275
|
closeCurrentModal(value) {
|
|
2039
|
-
const
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
currentModal.onModalClosed(value);
|
|
2276
|
+
const currentStack = this._modals();
|
|
2277
|
+
if (currentStack.length === 0) {
|
|
2278
|
+
return;
|
|
2043
2279
|
}
|
|
2280
|
+
const modalToClose = currentStack[currentStack.length - 1];
|
|
2281
|
+
this.close(modalToClose, value);
|
|
2044
2282
|
}
|
|
2045
|
-
|
|
2046
|
-
|
|
2283
|
+
close(config, value) {
|
|
2284
|
+
const currentStack = this._modals();
|
|
2285
|
+
const index = currentStack.lastIndexOf(config);
|
|
2286
|
+
if (index === -1) {
|
|
2287
|
+
return;
|
|
2288
|
+
}
|
|
2289
|
+
this._modals.update((prev) => {
|
|
2290
|
+
const next = [...prev];
|
|
2291
|
+
next.splice(index, 1);
|
|
2292
|
+
return next;
|
|
2293
|
+
});
|
|
2294
|
+
if (config.onModalClosed) {
|
|
2295
|
+
config.onModalClosed(value);
|
|
2296
|
+
}
|
|
2297
|
+
}
|
|
2298
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: ModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2299
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: ModalService, providedIn: 'root' });
|
|
2047
2300
|
}
|
|
2048
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2301
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: ModalService, decorators: [{
|
|
2049
2302
|
type: Injectable,
|
|
2050
2303
|
args: [{
|
|
2051
|
-
providedIn: 'root'
|
|
2304
|
+
providedIn: 'root'
|
|
2052
2305
|
}]
|
|
2053
|
-
}] });
|
|
2306
|
+
}], ctorParameters: () => [] });
|
|
2307
|
+
|
|
2308
|
+
class StrataThemeDirective {
|
|
2309
|
+
element = inject(ElementRef);
|
|
2310
|
+
stTheme = input.required(/* @ts-ignore */
|
|
2311
|
+
...(ngDevMode ? [{ debugName: "stTheme" }] : /* istanbul ignore next */ []));
|
|
2312
|
+
constructor() {
|
|
2313
|
+
effect(() => {
|
|
2314
|
+
const theme = this.stTheme();
|
|
2315
|
+
const el = this.element.nativeElement;
|
|
2316
|
+
// remove previous theme classes
|
|
2317
|
+
el.classList.forEach((cls) => {
|
|
2318
|
+
if (cls.startsWith('st-theme-')) {
|
|
2319
|
+
el.classList.remove(cls);
|
|
2320
|
+
}
|
|
2321
|
+
});
|
|
2322
|
+
el.classList.add(`st-theme-${theme}`);
|
|
2323
|
+
});
|
|
2324
|
+
}
|
|
2325
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataThemeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2326
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.1", type: StrataThemeDirective, isStandalone: true, selector: "[stTheme]", inputs: { stTheme: { classPropertyName: "stTheme", publicName: "stTheme", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
2327
|
+
}
|
|
2328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataThemeDirective, decorators: [{
|
|
2329
|
+
type: Directive,
|
|
2330
|
+
args: [{
|
|
2331
|
+
selector: '[stTheme]'
|
|
2332
|
+
}]
|
|
2333
|
+
}], ctorParameters: () => [], propDecorators: { stTheme: [{ type: i0.Input, args: [{ isSignal: true, alias: "stTheme", required: true }] }] } });
|
|
2054
2334
|
|
|
2055
2335
|
class StrataAlertContentComponent {
|
|
2056
|
-
modalService;
|
|
2057
|
-
title = input.required(
|
|
2058
|
-
|
|
2059
|
-
|
|
2336
|
+
modalService = inject(ModalService);
|
|
2337
|
+
title = input.required(/* @ts-ignore */
|
|
2338
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
2339
|
+
message = input(/* @ts-ignore */
|
|
2340
|
+
...(ngDevMode ? [undefined, { debugName: "message" }] : /* istanbul ignore next */ []));
|
|
2341
|
+
icon = input(undefined, /* @ts-ignore */
|
|
2342
|
+
...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
2060
2343
|
computedIcon = computed(() => {
|
|
2061
2344
|
return this.icon() ?? '';
|
|
2062
|
-
},
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2345
|
+
}, /* @ts-ignore */
|
|
2346
|
+
...(ngDevMode ? [{ debugName: "computedIcon" }] : /* istanbul ignore next */ []));
|
|
2347
|
+
theme = input('info', /* @ts-ignore */
|
|
2348
|
+
...(ngDevMode ? [{ debugName: "theme" }] : /* istanbul ignore next */ []));
|
|
2349
|
+
affirmativeButton = input.required(/* @ts-ignore */
|
|
2350
|
+
...(ngDevMode ? [{ debugName: "affirmativeButton" }] : /* istanbul ignore next */ []));
|
|
2351
|
+
cancelButton = input(undefined, /* @ts-ignore */
|
|
2352
|
+
...(ngDevMode ? [{ debugName: "cancelButton" }] : /* istanbul ignore next */ []));
|
|
2069
2353
|
onAffirmation() {
|
|
2070
2354
|
this.modalService.closeCurrentModal(true);
|
|
2071
2355
|
}
|
|
2072
2356
|
onCancel() {
|
|
2073
2357
|
this.modalService.closeCurrentModal(false);
|
|
2074
2358
|
}
|
|
2075
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2076
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2359
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataAlertContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2360
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataAlertContentComponent, isStandalone: true, selector: "st-alert-content", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null }, affirmativeButton: { classPropertyName: "affirmativeButton", publicName: "affirmativeButton", isSignal: true, isRequired: true, transformFunction: null }, cancelButton: { classPropertyName: "cancelButton", publicName: "cancelButton", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, 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", dependencies: [{ kind: "component", type: StrataAvatarComponent, selector: "st-avatar", inputs: ["text", "size"], outputs: ["sizeChange"] }, { kind: "component", type: StrataIconComponent, selector: "st-icon", inputs: ["name", "size"], outputs: ["sizeChange"] }, { kind: "directive", type: StrataThemeDirective, selector: "[stTheme]", inputs: ["stTheme"] }, { kind: "component", type: StrataButtonGroupComponent, selector: "st-button-group", inputs: ["justification"] }, { kind: "directive", type: StrataButtonDirective, selector: "[stButton]", inputs: ["variant", "size", "fullWidth"] }] });
|
|
2077
2361
|
}
|
|
2078
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2362
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataAlertContentComponent, decorators: [{
|
|
2079
2363
|
type: Component,
|
|
2080
2364
|
args: [{ selector: 'st-alert-content', imports: [
|
|
2081
2365
|
StrataAvatarComponent,
|
|
@@ -2084,30 +2368,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
2084
2368
|
StrataButtonGroupComponent,
|
|
2085
2369
|
StrataButtonDirective,
|
|
2086
2370
|
], 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
|
-
}],
|
|
2371
|
+
}], 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 }] }] } });
|
|
2372
|
+
|
|
2373
|
+
class StrataModalRef {
|
|
2374
|
+
}
|
|
2088
2375
|
|
|
2089
2376
|
class StrataModalHeaderComponent {
|
|
2090
2377
|
modalService = inject(ModalService);
|
|
2091
|
-
title = input(null,
|
|
2092
|
-
|
|
2378
|
+
title = input(null, /* @ts-ignore */
|
|
2379
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
2380
|
+
showCloseButton = input(true, /* @ts-ignore */
|
|
2381
|
+
...(ngDevMode ? [{ debugName: "showCloseButton" }] : /* istanbul ignore next */ []));
|
|
2093
2382
|
onCloseButtonClicked(event) {
|
|
2094
2383
|
this.modalService.closeCurrentModal();
|
|
2095
2384
|
event.stopPropagation();
|
|
2096
2385
|
}
|
|
2097
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2098
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2386
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataModalHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2387
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataModalHeaderComponent, isStandalone: true, selector: "st-modal-header", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (title()) {\n<span class=\"st-body-l-bold\">{{ title() }}</span>\n}\n@if (showCloseButton()) {\n<button stButton (click)=\"onCloseButtonClicked($event)\" variant=\"ghost\">\n <st-icon name=\"close\" size=\"sm\"></st-icon>\n</button>\n}", dependencies: [{ kind: "directive", type: StrataButtonDirective, selector: "[stButton]", inputs: ["variant", "size", "fullWidth"] }, { kind: "component", type: StrataIconComponent, selector: "st-icon", inputs: ["name", "size"], outputs: ["sizeChange"] }] });
|
|
2099
2388
|
}
|
|
2100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2389
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataModalHeaderComponent, decorators: [{
|
|
2101
2390
|
type: Component,
|
|
2102
2391
|
args: [{ selector: 'st-modal-header', imports: [StrataButtonDirective, StrataIconComponent], template: "@if (title()) {\n<span class=\"st-body-l-bold\">{{ title() }}</span>\n}\n@if (showCloseButton()) {\n<button stButton (click)=\"onCloseButtonClicked($event)\" variant=\"ghost\">\n <st-icon name=\"close\" size=\"sm\"></st-icon>\n</button>\n}" }]
|
|
2103
2392
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], showCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCloseButton", required: false }] }] } });
|
|
2104
2393
|
|
|
2105
2394
|
class StrataModalComponent {
|
|
2395
|
+
modalService = inject(ModalService);
|
|
2396
|
+
injector = inject(Injector);
|
|
2106
2397
|
modalContents = viewChild.required('modalBody', {
|
|
2107
|
-
read: ViewContainerRef
|
|
2398
|
+
read: ViewContainerRef
|
|
2108
2399
|
});
|
|
2109
|
-
configuration = input.required(
|
|
2110
|
-
|
|
2400
|
+
configuration = input.required(/* @ts-ignore */
|
|
2401
|
+
...(ngDevMode ? [{ debugName: "configuration" }] : /* istanbul ignore next */ []));
|
|
2402
|
+
size = model('md', /* @ts-ignore */
|
|
2403
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
2111
2404
|
get sizeClass() {
|
|
2112
2405
|
return `st-modal-size-${this.size()}`;
|
|
2113
2406
|
}
|
|
@@ -2115,7 +2408,16 @@ class StrataModalComponent {
|
|
|
2115
2408
|
if (this.size() === undefined) {
|
|
2116
2409
|
this.size.set('md');
|
|
2117
2410
|
}
|
|
2118
|
-
const
|
|
2411
|
+
const modalRef = {
|
|
2412
|
+
close: (value) => this.modalService.close(this.configuration(), value)
|
|
2413
|
+
};
|
|
2414
|
+
const customInjector = Injector.create({
|
|
2415
|
+
providers: [{ provide: StrataModalRef, useValue: modalRef }],
|
|
2416
|
+
parent: this.injector
|
|
2417
|
+
});
|
|
2418
|
+
const injectedComponent = this.modalContents().createComponent(this.configuration().component, {
|
|
2419
|
+
injector: customInjector
|
|
2420
|
+
});
|
|
2119
2421
|
if (this.configuration().inputs) {
|
|
2120
2422
|
this.setInputsOnInjectedComponent(injectedComponent, this.configuration().inputs);
|
|
2121
2423
|
}
|
|
@@ -2128,58 +2430,44 @@ class StrataModalComponent {
|
|
|
2128
2430
|
onCardClick(event) {
|
|
2129
2431
|
event.stopPropagation();
|
|
2130
2432
|
}
|
|
2131
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2132
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2433
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2434
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataModalComponent, isStandalone: true, selector: "st-modal", inputs: { configuration: { classPropertyName: "configuration", publicName: "configuration", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { size: "sizeChange" }, host: { properties: { "class": "this.sizeClass" } }, viewQueries: [{ propertyName: "modalContents", first: true, predicate: ["modalBody"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "@if (configuration().title || !configuration().hideCloseButton) {\n <st-modal-header\n [title]=\"configuration().title\"\n [showCloseButton]=\"configuration().hideCloseButton === true ? false : true\"\n (click)=\"onCardClick($event)\"></st-modal-header>\n}\n\n<div class=\"modal-content\">\n <ng-template #modalBody></ng-template>\n</div>\n", dependencies: [{ kind: "component", type: StrataModalHeaderComponent, selector: "st-modal-header", inputs: ["title", "showCloseButton"] }] });
|
|
2133
2435
|
}
|
|
2134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2436
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataModalComponent, decorators: [{
|
|
2135
2437
|
type: Component,
|
|
2136
2438
|
args: [{ selector: 'st-modal', imports: [StrataModalHeaderComponent], template: "@if (configuration().title || !configuration().hideCloseButton) {\n <st-modal-header\n [title]=\"configuration().title\"\n [showCloseButton]=\"configuration().hideCloseButton === true ? false : true\"\n (click)=\"onCardClick($event)\"></st-modal-header>\n}\n\n<div class=\"modal-content\">\n <ng-template #modalBody></ng-template>\n</div>\n" }]
|
|
2137
2439
|
}], propDecorators: { modalContents: [{ type: i0.ViewChild, args: ['modalBody', { ...{
|
|
2138
|
-
read: ViewContainerRef
|
|
2440
|
+
read: ViewContainerRef
|
|
2139
2441
|
}, isSignal: true }] }], configuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "configuration", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }, { type: i0.Output, args: ["sizeChange"] }], sizeClass: [{
|
|
2140
2442
|
type: HostBinding,
|
|
2141
2443
|
args: ['class']
|
|
2142
2444
|
}] } });
|
|
2143
2445
|
|
|
2144
2446
|
class StrataModalContainerComponent {
|
|
2145
|
-
modalService;
|
|
2146
|
-
injectedComponent;
|
|
2147
|
-
currentModal = null;
|
|
2148
|
-
stack = new Stack();
|
|
2149
|
-
subscription;
|
|
2150
|
-
constructor(modalService) {
|
|
2151
|
-
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
|
-
}
|
|
2447
|
+
modalService = inject(ModalService);
|
|
2159
2448
|
onBackdropClick(event) {
|
|
2160
2449
|
event.stopPropagation();
|
|
2161
|
-
const
|
|
2162
|
-
|
|
2450
|
+
const modals = this.modalService.modals();
|
|
2451
|
+
const currentModal = modals[modals.length - 1];
|
|
2452
|
+
if (!currentModal || currentModal.disableBackdropClosure) {
|
|
2163
2453
|
return;
|
|
2164
2454
|
}
|
|
2165
2455
|
this.modalService.closeCurrentModal();
|
|
2166
2456
|
}
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
}
|
|
2170
|
-
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 stack.items; track modal.id; let last = $last) {\n <st-modal [ngClass]=\"{ 'hidden-under-other-modal': !last }\" [configuration]=\"modal\" [size]=\"modal.size\"> </st-modal>\n }\n</div>\n@if (!stack.empty()) {\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: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
2457
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataModalContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2458
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", 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
2459
|
}
|
|
2173
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2460
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataModalContainerComponent, decorators: [{
|
|
2174
2461
|
type: Component,
|
|
2175
|
-
args: [{ selector: 'st-modal-container', imports: [StrataModalComponent, CommonModule], template: "<div class=\"modal-wrapper\">\n @for (modal of
|
|
2176
|
-
}]
|
|
2462
|
+
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" }]
|
|
2463
|
+
}] });
|
|
2177
2464
|
|
|
2178
2465
|
const DEFAULT_THEME = 'info';
|
|
2179
2466
|
const DEFAULT_DURATION = 3000;
|
|
2180
2467
|
|
|
2181
2468
|
class NotificationService {
|
|
2182
|
-
notificationStack = signal([],
|
|
2469
|
+
notificationStack = signal([], /* @ts-ignore */
|
|
2470
|
+
...(ngDevMode ? [{ debugName: "notificationStack" }] : /* istanbul ignore next */ []));
|
|
2183
2471
|
showNotification(config) {
|
|
2184
2472
|
const newNotificationId = crypto.randomUUID();
|
|
2185
2473
|
const duration = config.duration ?? DEFAULT_DURATION;
|
|
@@ -2191,7 +2479,7 @@ class NotificationService {
|
|
|
2191
2479
|
message: config.message,
|
|
2192
2480
|
duration: duration,
|
|
2193
2481
|
theme: config.theme ?? DEFAULT_THEME,
|
|
2194
|
-
icon: config.icon
|
|
2482
|
+
icon: config.icon
|
|
2195
2483
|
}
|
|
2196
2484
|
]);
|
|
2197
2485
|
this.hideNotification(newNotificationId, duration);
|
|
@@ -2202,23 +2490,23 @@ class NotificationService {
|
|
|
2202
2490
|
this.notificationStack.set(currentStack);
|
|
2203
2491
|
}, duration);
|
|
2204
2492
|
}
|
|
2205
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2206
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2493
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2494
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NotificationService, providedIn: 'root' });
|
|
2207
2495
|
}
|
|
2208
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2496
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NotificationService, decorators: [{
|
|
2209
2497
|
type: Injectable,
|
|
2210
2498
|
args: [{
|
|
2211
|
-
providedIn: 'root'
|
|
2499
|
+
providedIn: 'root'
|
|
2212
2500
|
}]
|
|
2213
2501
|
}] });
|
|
2214
2502
|
|
|
2215
2503
|
class StrataNotificationComponent {
|
|
2216
2504
|
icon;
|
|
2217
2505
|
message;
|
|
2218
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2219
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2506
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataNotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2507
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataNotificationComponent, isStandalone: true, selector: "st-notification", inputs: { icon: "icon", message: "message" }, ngImport: i0, template: "@if (icon) {\n <st-icon [name]=\"icon\"></st-icon>\n}\n{{ message }}\n", dependencies: [{ kind: "component", type: StrataIconComponent, selector: "st-icon", inputs: ["name", "size"], outputs: ["sizeChange"] }] });
|
|
2220
2508
|
}
|
|
2221
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2509
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataNotificationComponent, decorators: [{
|
|
2222
2510
|
type: Component,
|
|
2223
2511
|
args: [{ selector: 'st-notification', imports: [StrataIconComponent], template: "@if (icon) {\n <st-icon [name]=\"icon\"></st-icon>\n}\n{{ message }}\n" }]
|
|
2224
2512
|
}], propDecorators: { icon: [{
|
|
@@ -2230,62 +2518,76 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
2230
2518
|
class StrataNotificationContainerComponent {
|
|
2231
2519
|
notificationService = inject(NotificationService);
|
|
2232
2520
|
notifications = this.notificationService.notificationStack;
|
|
2233
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2234
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2521
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataNotificationContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2522
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataNotificationContainerComponent, isStandalone: true, selector: "st-notification-container", ngImport: i0, template: "@for (notification of notifications(); track notification.id) {\n <st-notification [icon]=\"notification.icon\" [message]=\"notification.message\" [stTheme]=\"notification.theme ?? 'info'\">\n </st-notification>\n}\n", dependencies: [{ kind: "component", type: StrataNotificationComponent, selector: "st-notification", inputs: ["icon", "message"] }, { kind: "directive", type: StrataThemeDirective, selector: "[stTheme]", inputs: ["stTheme"] }] });
|
|
2235
2523
|
}
|
|
2236
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2524
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataNotificationContainerComponent, decorators: [{
|
|
2237
2525
|
type: Component,
|
|
2238
2526
|
args: [{ selector: 'st-notification-container', imports: [StrataNotificationComponent, StrataThemeDirective], template: "@for (notification of notifications(); track notification.id) {\n <st-notification [icon]=\"notification.icon\" [message]=\"notification.message\" [stTheme]=\"notification.theme ?? 'info'\">\n </st-notification>\n}\n" }]
|
|
2239
2527
|
}] });
|
|
2240
2528
|
|
|
2241
2529
|
class StrataNumberDisplayComponent {
|
|
2242
2530
|
locale = inject(LOCALE_ID);
|
|
2243
|
-
value = input.required(
|
|
2244
|
-
|
|
2531
|
+
value = input.required(/* @ts-ignore */
|
|
2532
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2533
|
+
decimals = input(2, /* @ts-ignore */
|
|
2534
|
+
...(ngDevMode ? [{ debugName: "decimals" }] : /* istanbul ignore next */ []));
|
|
2245
2535
|
digitsInfo = computed(() => {
|
|
2246
2536
|
return `1.${this.decimals()}-${this.decimals()}`;
|
|
2247
|
-
},
|
|
2248
|
-
|
|
2537
|
+
}, /* @ts-ignore */
|
|
2538
|
+
...(ngDevMode ? [{ debugName: "digitsInfo" }] : /* istanbul ignore next */ []));
|
|
2539
|
+
formattedNumber = computed(() => formatNumber(this.value(), this.locale, this.digitsInfo()), /* @ts-ignore */
|
|
2540
|
+
...(ngDevMode ? [{ debugName: "formattedNumber" }] : /* istanbul ignore next */ []));
|
|
2249
2541
|
separatedDigits = computed(() => {
|
|
2250
2542
|
const parts = this.formattedNumber().split(this.decimalPoint());
|
|
2251
2543
|
return {
|
|
2252
2544
|
integer: parts[0],
|
|
2253
|
-
decimals: parts[1] ?? undefined
|
|
2545
|
+
decimals: parts[1] ?? undefined
|
|
2254
2546
|
};
|
|
2255
|
-
},
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
}
|
|
2263
|
-
|
|
2547
|
+
}, /* @ts-ignore */
|
|
2548
|
+
...(ngDevMode ? [{ debugName: "separatedDigits" }] : /* istanbul ignore next */ []));
|
|
2549
|
+
changedValue = input(false, /* @ts-ignore */
|
|
2550
|
+
...(ngDevMode ? [{ debugName: "changedValue" }] : /* istanbul ignore next */ []));
|
|
2551
|
+
showPlus = input(false, /* @ts-ignore */
|
|
2552
|
+
...(ngDevMode ? [{ debugName: "showPlus" }] : /* istanbul ignore next */ []));
|
|
2553
|
+
deemphasizeDecimals = input(true, /* @ts-ignore */
|
|
2554
|
+
...(ngDevMode ? [{ debugName: "deemphasizeDecimals" }] : /* istanbul ignore next */ []));
|
|
2555
|
+
decimalPoint = computed(() => getLocaleNumberSymbol(this.locale, NumberSymbol.Decimal), /* @ts-ignore */
|
|
2556
|
+
...(ngDevMode ? [{ debugName: "decimalPoint" }] : /* istanbul ignore next */ []));
|
|
2557
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataNumberDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2558
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", 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"] }] });
|
|
2559
|
+
}
|
|
2560
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataNumberDisplayComponent, decorators: [{
|
|
2264
2561
|
type: Component,
|
|
2265
2562
|
args: [{ selector: 'st-number-display', imports: [CommonModule], 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" }]
|
|
2266
2563
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], decimals: [{ type: i0.Input, args: [{ isSignal: true, alias: "decimals", required: false }] }], changedValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "changedValue", required: false }] }], showPlus: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPlus", required: false }] }], deemphasizeDecimals: [{ type: i0.Input, args: [{ isSignal: true, alias: "deemphasizeDecimals", required: false }] }] } });
|
|
2267
2564
|
|
|
2268
2565
|
class StrataShellComponent {
|
|
2269
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2270
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2566
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataShellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2567
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.1", type: StrataShellComponent, isStandalone: true, selector: "st-shell", ngImport: i0, template: "<st-notification-container></st-notification-container>\n<st-modal-container></st-modal-container>\n<ng-content></ng-content>", dependencies: [{ kind: "component", type: StrataModalContainerComponent, selector: "st-modal-container" }, { kind: "component", type: StrataNotificationContainerComponent, selector: "st-notification-container" }] });
|
|
2271
2568
|
}
|
|
2272
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2569
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataShellComponent, decorators: [{
|
|
2273
2570
|
type: Component,
|
|
2274
2571
|
args: [{ selector: 'st-shell', imports: [StrataModalContainerComponent, StrataNotificationContainerComponent], template: "<st-notification-container></st-notification-container>\n<st-modal-container></st-modal-container>\n<ng-content></ng-content>" }]
|
|
2275
2572
|
}] });
|
|
2276
2573
|
|
|
2277
2574
|
class StrataMessageStateComponent {
|
|
2278
|
-
header = input.required(
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2575
|
+
header = input.required(/* @ts-ignore */
|
|
2576
|
+
...(ngDevMode ? [{ debugName: "header" }] : /* istanbul ignore next */ []));
|
|
2577
|
+
subtitle = input(undefined, /* @ts-ignore */
|
|
2578
|
+
...(ngDevMode ? [{ debugName: "subtitle" }] : /* istanbul ignore next */ []));
|
|
2579
|
+
primaryActionText = input(undefined, /* @ts-ignore */
|
|
2580
|
+
...(ngDevMode ? [{ debugName: "primaryActionText" }] : /* istanbul ignore next */ []));
|
|
2581
|
+
primaryActionTheme = input(undefined, /* @ts-ignore */
|
|
2582
|
+
...(ngDevMode ? [{ debugName: "primaryActionTheme" }] : /* istanbul ignore next */ []));
|
|
2583
|
+
secondaryActionText = input(undefined, /* @ts-ignore */
|
|
2584
|
+
...(ngDevMode ? [{ debugName: "secondaryActionText" }] : /* istanbul ignore next */ []));
|
|
2283
2585
|
primaryAction = output();
|
|
2284
2586
|
secondaryAction = output();
|
|
2285
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2286
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2587
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataMessageStateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2588
|
+
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"] }] });
|
|
2287
2589
|
}
|
|
2288
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2590
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataMessageStateComponent, decorators: [{
|
|
2289
2591
|
type: Component,
|
|
2290
2592
|
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"] }]
|
|
2291
2593
|
}], 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"] }] } });
|
|
@@ -2298,5 +2600,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
2298
2600
|
* Generated bundle index. Do not edit.
|
|
2299
2601
|
*/
|
|
2300
2602
|
|
|
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,
|
|
2603
|
+
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
2604
|
//# sourceMappingURL=ngx-strata.mjs.map
|