@star-ng/ui 0.0.0-placeholder.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +147 -3
- package/fesm2022/star-ng-ui-accordion.mjs +376 -0
- package/fesm2022/star-ng-ui-accordion.mjs.map +1 -0
- package/fesm2022/star-ng-ui-autocomplete.mjs +782 -0
- package/fesm2022/star-ng-ui-autocomplete.mjs.map +1 -0
- package/fesm2022/star-ng-ui-avatar.mjs +154 -0
- package/fesm2022/star-ng-ui-avatar.mjs.map +1 -0
- package/fesm2022/star-ng-ui-badge.mjs +153 -0
- package/fesm2022/star-ng-ui-badge.mjs.map +1 -0
- package/fesm2022/star-ng-ui-breadcrumb.mjs +199 -0
- package/fesm2022/star-ng-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/star-ng-ui-button.mjs +282 -0
- package/fesm2022/star-ng-ui-button.mjs.map +1 -0
- package/fesm2022/star-ng-ui-card.mjs +112 -0
- package/fesm2022/star-ng-ui-card.mjs.map +1 -0
- package/fesm2022/star-ng-ui-chart.mjs +1904 -0
- package/fesm2022/star-ng-ui-chart.mjs.map +1 -0
- package/fesm2022/star-ng-ui-checkbox.mjs +345 -0
- package/fesm2022/star-ng-ui-checkbox.mjs.map +1 -0
- package/fesm2022/star-ng-ui-core.mjs +392 -0
- package/fesm2022/star-ng-ui-core.mjs.map +1 -0
- package/fesm2022/star-ng-ui-data-display.mjs +1556 -0
- package/fesm2022/star-ng-ui-data-display.mjs.map +1 -0
- package/fesm2022/star-ng-ui-date-picker.mjs +2786 -0
- package/fesm2022/star-ng-ui-date-picker.mjs.map +1 -0
- package/fesm2022/star-ng-ui-dialog.mjs +948 -0
- package/fesm2022/star-ng-ui-dialog.mjs.map +1 -0
- package/fesm2022/star-ng-ui-drawer.mjs +158 -0
- package/fesm2022/star-ng-ui-drawer.mjs.map +1 -0
- package/fesm2022/star-ng-ui-editor.mjs +416 -0
- package/fesm2022/star-ng-ui-editor.mjs.map +1 -0
- package/fesm2022/star-ng-ui-field.mjs +378 -0
- package/fesm2022/star-ng-ui-field.mjs.map +1 -0
- package/fesm2022/star-ng-ui-file-upload.mjs +762 -0
- package/fesm2022/star-ng-ui-file-upload.mjs.map +1 -0
- package/fesm2022/star-ng-ui-i18n-de.mjs +179 -0
- package/fesm2022/star-ng-ui-i18n-de.mjs.map +1 -0
- package/fesm2022/star-ng-ui-i18n-es.mjs +179 -0
- package/fesm2022/star-ng-ui-i18n-es.mjs.map +1 -0
- package/fesm2022/star-ng-ui-input-group.mjs +188 -0
- package/fesm2022/star-ng-ui-input-group.mjs.map +1 -0
- package/fesm2022/star-ng-ui-input-mask.mjs +434 -0
- package/fesm2022/star-ng-ui-input-mask.mjs.map +1 -0
- package/fesm2022/star-ng-ui-input-number.mjs +691 -0
- package/fesm2022/star-ng-ui-input-number.mjs.map +1 -0
- package/fesm2022/star-ng-ui-input-otp.mjs +343 -0
- package/fesm2022/star-ng-ui-input-otp.mjs.map +1 -0
- package/fesm2022/star-ng-ui-input-tags.mjs +616 -0
- package/fesm2022/star-ng-ui-input-tags.mjs.map +1 -0
- package/fesm2022/star-ng-ui-knob.mjs +514 -0
- package/fesm2022/star-ng-ui-knob.mjs.map +1 -0
- package/fesm2022/star-ng-ui-layout.mjs +608 -0
- package/fesm2022/star-ng-ui-layout.mjs.map +1 -0
- package/fesm2022/star-ng-ui-listbox.mjs +978 -0
- package/fesm2022/star-ng-ui-listbox.mjs.map +1 -0
- package/fesm2022/star-ng-ui-media.mjs +833 -0
- package/fesm2022/star-ng-ui-media.mjs.map +1 -0
- package/fesm2022/star-ng-ui-menu.mjs +1840 -0
- package/fesm2022/star-ng-ui-menu.mjs.map +1 -0
- package/fesm2022/star-ng-ui-message.mjs +191 -0
- package/fesm2022/star-ng-ui-message.mjs.map +1 -0
- package/fesm2022/star-ng-ui-paginator.mjs +387 -0
- package/fesm2022/star-ng-ui-paginator.mjs.map +1 -0
- package/fesm2022/star-ng-ui-panel.mjs +324 -0
- package/fesm2022/star-ng-ui-panel.mjs.map +1 -0
- package/fesm2022/star-ng-ui-password.mjs +517 -0
- package/fesm2022/star-ng-ui-password.mjs.map +1 -0
- package/fesm2022/star-ng-ui-popover.mjs +241 -0
- package/fesm2022/star-ng-ui-popover.mjs.map +1 -0
- package/fesm2022/star-ng-ui-progress-bar.mjs +183 -0
- package/fesm2022/star-ng-ui-progress-bar.mjs.map +1 -0
- package/fesm2022/star-ng-ui-radio.mjs +411 -0
- package/fesm2022/star-ng-ui-radio.mjs.map +1 -0
- package/fesm2022/star-ng-ui-rating.mjs +211 -0
- package/fesm2022/star-ng-ui-rating.mjs.map +1 -0
- package/fesm2022/star-ng-ui-select-button.mjs +613 -0
- package/fesm2022/star-ng-ui-select-button.mjs.map +1 -0
- package/fesm2022/star-ng-ui-select.mjs +2523 -0
- package/fesm2022/star-ng-ui-select.mjs.map +1 -0
- package/fesm2022/star-ng-ui-skeleton.mjs +160 -0
- package/fesm2022/star-ng-ui-skeleton.mjs.map +1 -0
- package/fesm2022/star-ng-ui-slider.mjs +552 -0
- package/fesm2022/star-ng-ui-slider.mjs.map +1 -0
- package/fesm2022/star-ng-ui-spinner.mjs +148 -0
- package/fesm2022/star-ng-ui-spinner.mjs.map +1 -0
- package/fesm2022/star-ng-ui-stepper.mjs +360 -0
- package/fesm2022/star-ng-ui-stepper.mjs.map +1 -0
- package/fesm2022/star-ng-ui-table.mjs +3477 -0
- package/fesm2022/star-ng-ui-table.mjs.map +1 -0
- package/fesm2022/star-ng-ui-tabs.mjs +464 -0
- package/fesm2022/star-ng-ui-tabs.mjs.map +1 -0
- package/fesm2022/star-ng-ui-tag.mjs +129 -0
- package/fesm2022/star-ng-ui-tag.mjs.map +1 -0
- package/fesm2022/star-ng-ui-theme-switch.mjs +105 -0
- package/fesm2022/star-ng-ui-theme-switch.mjs.map +1 -0
- package/fesm2022/star-ng-ui-theme.mjs +98 -0
- package/fesm2022/star-ng-ui-theme.mjs.map +1 -0
- package/fesm2022/star-ng-ui-toast.mjs +298 -0
- package/fesm2022/star-ng-ui-toast.mjs.map +1 -0
- package/fesm2022/star-ng-ui-toggle-switch.mjs +316 -0
- package/fesm2022/star-ng-ui-toggle-switch.mjs.map +1 -0
- package/fesm2022/star-ng-ui-tooltip.mjs +297 -0
- package/fesm2022/star-ng-ui-tooltip.mjs.map +1 -0
- package/fesm2022/star-ng-ui-transloco.mjs +40 -0
- package/fesm2022/star-ng-ui-transloco.mjs.map +1 -0
- package/fesm2022/star-ng-ui-tree.mjs +1446 -0
- package/fesm2022/star-ng-ui-tree.mjs.map +1 -0
- package/fesm2022/star-ng-ui-utility.mjs +2134 -0
- package/fesm2022/star-ng-ui-utility.mjs.map +1 -0
- package/fesm2022/star-ng-ui.mjs +51 -0
- package/package.json +281 -5
- package/styles/_base.scss +70 -0
- package/styles/_shared.scss +2 -0
- package/styles/_tokens.scss +190 -0
- package/styles/controls/_accordion.scss +75 -0
- package/styles/controls/_autocomplete.scss +44 -0
- package/styles/controls/_avatar.scss +39 -0
- package/styles/controls/_breadcrumb.scss +45 -0
- package/styles/controls/_button.scss +137 -0
- package/styles/controls/_card.scss +38 -0
- package/styles/controls/_chart.scss +214 -0
- package/styles/controls/_chip.scss +51 -0
- package/styles/controls/_choice.scss +153 -0
- package/styles/controls/_data-display.scss +118 -0
- package/styles/controls/_date-picker.scss +300 -0
- package/styles/controls/_dialog.scss +123 -0
- package/styles/controls/_drawer.scss +118 -0
- package/styles/controls/_editor.scss +74 -0
- package/styles/controls/_field.scss +92 -0
- package/styles/controls/_file-upload.scss +136 -0
- package/styles/controls/_input-group.scss +104 -0
- package/styles/controls/_input-mask.scss +46 -0
- package/styles/controls/_input-number.scss +125 -0
- package/styles/controls/_knob.scss +76 -0
- package/styles/controls/_layout.scss +182 -0
- package/styles/controls/_listbox.scss +38 -0
- package/styles/controls/_media.scss +222 -0
- package/styles/controls/_menu.scss +254 -0
- package/styles/controls/_message.scss +48 -0
- package/styles/controls/_org-chart.scss +128 -0
- package/styles/controls/_paginator.scss +59 -0
- package/styles/controls/_panel.scss +83 -0
- package/styles/controls/_popover.scss +40 -0
- package/styles/controls/_progress-bar.scss +74 -0
- package/styles/controls/_select-button.scss +61 -0
- package/styles/controls/_select.scss +216 -0
- package/styles/controls/_skeleton.scss +43 -0
- package/styles/controls/_slider.scss +163 -0
- package/styles/controls/_spinner.scss +34 -0
- package/styles/controls/_stepper.scss +109 -0
- package/styles/controls/_table.scss +523 -0
- package/styles/controls/_tabs.scss +93 -0
- package/styles/controls/_tag.scss +84 -0
- package/styles/controls/_toast.scss +141 -0
- package/styles/controls/_tooltip.scss +14 -0
- package/styles/controls/_tree.scss +113 -0
- package/styles/controls/_utility.scss +654 -0
- package/styles/star-ng.css +5803 -0
- package/styles/star-ng.min.css +1 -0
- package/styles/star-ng.scss +50 -0
- package/theme/star-theme-first-paint.js +1 -0
- package/types/star-ng-ui-accordion.d.ts +82 -0
- package/types/star-ng-ui-autocomplete.d.ts +171 -0
- package/types/star-ng-ui-avatar.d.ts +43 -0
- package/types/star-ng-ui-badge.d.ts +46 -0
- package/types/star-ng-ui-breadcrumb.d.ts +39 -0
- package/types/star-ng-ui-button.d.ts +79 -0
- package/types/star-ng-ui-card.d.ts +29 -0
- package/types/star-ng-ui-chart.d.ts +337 -0
- package/types/star-ng-ui-checkbox.d.ts +92 -0
- package/types/star-ng-ui-core.d.ts +310 -0
- package/types/star-ng-ui-data-display.d.ts +339 -0
- package/types/star-ng-ui-date-picker.d.ts +701 -0
- package/types/star-ng-ui-dialog.d.ts +254 -0
- package/types/star-ng-ui-drawer.d.ts +29 -0
- package/types/star-ng-ui-editor.d.ts +96 -0
- package/types/star-ng-ui-field.d.ts +146 -0
- package/types/star-ng-ui-file-upload.d.ts +192 -0
- package/types/star-ng-ui-i18n-de.d.ts +7 -0
- package/types/star-ng-ui-i18n-es.d.ts +7 -0
- package/types/star-ng-ui-input-group.d.ts +58 -0
- package/types/star-ng-ui-input-mask.d.ts +126 -0
- package/types/star-ng-ui-input-number.d.ts +193 -0
- package/types/star-ng-ui-input-otp.d.ts +86 -0
- package/types/star-ng-ui-input-tags.d.ts +159 -0
- package/types/star-ng-ui-knob.d.ts +121 -0
- package/types/star-ng-ui-layout.d.ts +154 -0
- package/types/star-ng-ui-listbox.d.ts +197 -0
- package/types/star-ng-ui-media.d.ts +161 -0
- package/types/star-ng-ui-menu.d.ts +332 -0
- package/types/star-ng-ui-message.d.ts +52 -0
- package/types/star-ng-ui-paginator.d.ts +85 -0
- package/types/star-ng-ui-panel.d.ts +65 -0
- package/types/star-ng-ui-password.d.ts +129 -0
- package/types/star-ng-ui-popover.d.ts +57 -0
- package/types/star-ng-ui-progress-bar.d.ts +49 -0
- package/types/star-ng-ui-radio.d.ts +116 -0
- package/types/star-ng-ui-rating.d.ts +52 -0
- package/types/star-ng-ui-select-button.d.ts +169 -0
- package/types/star-ng-ui-select.d.ts +540 -0
- package/types/star-ng-ui-skeleton.d.ts +47 -0
- package/types/star-ng-ui-slider.d.ts +145 -0
- package/types/star-ng-ui-spinner.d.ts +29 -0
- package/types/star-ng-ui-stepper.d.ts +89 -0
- package/types/star-ng-ui-table.d.ts +829 -0
- package/types/star-ng-ui-tabs.d.ts +109 -0
- package/types/star-ng-ui-tag.d.ts +35 -0
- package/types/star-ng-ui-theme-switch.d.ts +36 -0
- package/types/star-ng-ui-theme.d.ts +95 -0
- package/types/star-ng-ui-toast.d.ts +84 -0
- package/types/star-ng-ui-toggle-switch.d.ts +81 -0
- package/types/star-ng-ui-tooltip.d.ts +66 -0
- package/types/star-ng-ui-transloco.d.ts +14 -0
- package/types/star-ng-ui-tree.d.ts +310 -0
- package/types/star-ng-ui-utility.d.ts +533 -0
- package/types/star-ng-ui.d.ts +51 -0
|
@@ -0,0 +1,2134 @@
|
|
|
1
|
+
import * as i1 from "@angular/cdk/a11y";
|
|
2
|
+
import { CdkTrapFocus, _IdGenerator } from "@angular/cdk/a11y";
|
|
3
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, Directive, ElementRef, Injector, TemplateRef, afterNextRender, booleanAttribute, computed, contentChild, inject, input, model, output, signal, viewChild } from "@angular/core";
|
|
6
|
+
import { STAR_UI_TEXT, starIsRtl } from "@star-ng/ui/core";
|
|
7
|
+
import { StarSpinner } from "@star-ng/ui/spinner";
|
|
8
|
+
var StarInplaceDisplay = class StarInplaceDisplay {
|
|
9
|
+
template = inject(TemplateRef);
|
|
10
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
11
|
+
minVersion: "12.0.0",
|
|
12
|
+
version: "22.2.6",
|
|
13
|
+
ngImport: i0,
|
|
14
|
+
type: StarInplaceDisplay,
|
|
15
|
+
deps: [],
|
|
16
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
17
|
+
});
|
|
18
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
19
|
+
minVersion: "14.0.0",
|
|
20
|
+
version: "22.2.6",
|
|
21
|
+
type: StarInplaceDisplay,
|
|
22
|
+
isStandalone: true,
|
|
23
|
+
selector: "ng-template[starInplaceDisplay]",
|
|
24
|
+
ngImport: i0
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
28
|
+
minVersion: "12.0.0",
|
|
29
|
+
version: "22.2.6",
|
|
30
|
+
ngImport: i0,
|
|
31
|
+
type: StarInplaceDisplay,
|
|
32
|
+
decorators: [{
|
|
33
|
+
type: Directive,
|
|
34
|
+
args: [{ selector: "ng-template[starInplaceDisplay]" }]
|
|
35
|
+
}]
|
|
36
|
+
});
|
|
37
|
+
var StarInplaceContent = class StarInplaceContent {
|
|
38
|
+
template = inject(TemplateRef);
|
|
39
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
40
|
+
minVersion: "12.0.0",
|
|
41
|
+
version: "22.2.6",
|
|
42
|
+
ngImport: i0,
|
|
43
|
+
type: StarInplaceContent,
|
|
44
|
+
deps: [],
|
|
45
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
46
|
+
});
|
|
47
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
48
|
+
minVersion: "14.0.0",
|
|
49
|
+
version: "22.2.6",
|
|
50
|
+
type: StarInplaceContent,
|
|
51
|
+
isStandalone: true,
|
|
52
|
+
selector: "ng-template[starInplaceContent]",
|
|
53
|
+
ngImport: i0
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
57
|
+
minVersion: "12.0.0",
|
|
58
|
+
version: "22.2.6",
|
|
59
|
+
ngImport: i0,
|
|
60
|
+
type: StarInplaceContent,
|
|
61
|
+
decorators: [{
|
|
62
|
+
type: Directive,
|
|
63
|
+
args: [{ selector: "ng-template[starInplaceContent]" }]
|
|
64
|
+
}]
|
|
65
|
+
});
|
|
66
|
+
var StarInplace = class StarInplace {
|
|
67
|
+
text = inject(STAR_UI_TEXT);
|
|
68
|
+
host = inject(ElementRef);
|
|
69
|
+
injector = inject(Injector);
|
|
70
|
+
active = model(false, ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
|
|
71
|
+
disabled = input(false, {
|
|
72
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
73
|
+
transform: booleanAttribute
|
|
74
|
+
});
|
|
75
|
+
closable = input(false, {
|
|
76
|
+
...ngDevMode ? { debugName: "closable" } : /* istanbul ignore next */ {},
|
|
77
|
+
transform: booleanAttribute
|
|
78
|
+
});
|
|
79
|
+
ariaLabel = input(null, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
80
|
+
display = contentChild(StarInplaceDisplay, ...ngDevMode ? [{ debugName: "display" }] : /* istanbul ignore next */ []);
|
|
81
|
+
content = contentChild(StarInplaceContent, ...ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []);
|
|
82
|
+
activate() {
|
|
83
|
+
if (this.disabled() || this.active()) return;
|
|
84
|
+
this.active.set(true);
|
|
85
|
+
this.focusAfterRender("input, select, textarea, [tabindex]:not([tabindex=\"-1\"]), button");
|
|
86
|
+
}
|
|
87
|
+
deactivate() {
|
|
88
|
+
if (!this.active()) return;
|
|
89
|
+
this.active.set(false);
|
|
90
|
+
this.focusAfterRender(".star-inplace__display");
|
|
91
|
+
}
|
|
92
|
+
onEscape(event) {
|
|
93
|
+
if (!this.active()) return;
|
|
94
|
+
event.stopPropagation();
|
|
95
|
+
this.deactivate();
|
|
96
|
+
}
|
|
97
|
+
focusAfterRender(selector) {
|
|
98
|
+
afterNextRender(() => this.host.nativeElement.querySelector(selector)?.focus(), { injector: this.injector });
|
|
99
|
+
}
|
|
100
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
101
|
+
minVersion: "12.0.0",
|
|
102
|
+
version: "22.2.6",
|
|
103
|
+
ngImport: i0,
|
|
104
|
+
type: StarInplace,
|
|
105
|
+
deps: [],
|
|
106
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
107
|
+
});
|
|
108
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
109
|
+
minVersion: "17.0.0",
|
|
110
|
+
version: "22.2.6",
|
|
111
|
+
type: StarInplace,
|
|
112
|
+
isStandalone: true,
|
|
113
|
+
selector: "star-inplace",
|
|
114
|
+
inputs: {
|
|
115
|
+
active: {
|
|
116
|
+
classPropertyName: "active",
|
|
117
|
+
publicName: "active",
|
|
118
|
+
isSignal: true,
|
|
119
|
+
isRequired: false,
|
|
120
|
+
transformFunction: null
|
|
121
|
+
},
|
|
122
|
+
disabled: {
|
|
123
|
+
classPropertyName: "disabled",
|
|
124
|
+
publicName: "disabled",
|
|
125
|
+
isSignal: true,
|
|
126
|
+
isRequired: false,
|
|
127
|
+
transformFunction: null
|
|
128
|
+
},
|
|
129
|
+
closable: {
|
|
130
|
+
classPropertyName: "closable",
|
|
131
|
+
publicName: "closable",
|
|
132
|
+
isSignal: true,
|
|
133
|
+
isRequired: false,
|
|
134
|
+
transformFunction: null
|
|
135
|
+
},
|
|
136
|
+
ariaLabel: {
|
|
137
|
+
classPropertyName: "ariaLabel",
|
|
138
|
+
publicName: "ariaLabel",
|
|
139
|
+
isSignal: true,
|
|
140
|
+
isRequired: false,
|
|
141
|
+
transformFunction: null
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
outputs: { active: "activeChange" },
|
|
145
|
+
host: {
|
|
146
|
+
listeners: { "keydown.escape": "onEscape($event)" },
|
|
147
|
+
classAttribute: "star-inplace"
|
|
148
|
+
},
|
|
149
|
+
queries: [{
|
|
150
|
+
propertyName: "display",
|
|
151
|
+
first: true,
|
|
152
|
+
predicate: StarInplaceDisplay,
|
|
153
|
+
descendants: true,
|
|
154
|
+
isSignal: true
|
|
155
|
+
}, {
|
|
156
|
+
propertyName: "content",
|
|
157
|
+
first: true,
|
|
158
|
+
predicate: StarInplaceContent,
|
|
159
|
+
descendants: true,
|
|
160
|
+
isSignal: true
|
|
161
|
+
}],
|
|
162
|
+
ngImport: i0,
|
|
163
|
+
template: `
|
|
164
|
+
@if (active()) {
|
|
165
|
+
<span class="star-inplace__content">
|
|
166
|
+
@if (content(); as edit) {
|
|
167
|
+
<ng-container *ngTemplateOutlet="edit.template" />
|
|
168
|
+
}
|
|
169
|
+
@if (closable()) {
|
|
170
|
+
<button
|
|
171
|
+
type="button"
|
|
172
|
+
class="star-select__icon-btn"
|
|
173
|
+
[attr.aria-label]="text.close"
|
|
174
|
+
(click)="deactivate()"
|
|
175
|
+
>
|
|
176
|
+
<i class="ph-bold ph-check" aria-hidden="true"></i>
|
|
177
|
+
</button>
|
|
178
|
+
}
|
|
179
|
+
</span>
|
|
180
|
+
} @else {
|
|
181
|
+
<button
|
|
182
|
+
type="button"
|
|
183
|
+
class="star-inplace__display"
|
|
184
|
+
[disabled]="disabled()"
|
|
185
|
+
(click)="activate()"
|
|
186
|
+
>
|
|
187
|
+
<!-- The label is part of the name, so the visible value is too (WCAG 2.5.3). -->
|
|
188
|
+
@if (ariaLabel(); as label) {
|
|
189
|
+
<span class="star-sr-only">{{ label }}: </span>
|
|
190
|
+
}
|
|
191
|
+
@if (display(); as view) {
|
|
192
|
+
<ng-container *ngTemplateOutlet="view.template" />
|
|
193
|
+
}
|
|
194
|
+
<i class="ph-bold ph-pencil-simple star-inplace__icon" aria-hidden="true"></i>
|
|
195
|
+
</button>
|
|
196
|
+
}
|
|
197
|
+
`,
|
|
198
|
+
isInline: true,
|
|
199
|
+
dependencies: [{
|
|
200
|
+
kind: "directive",
|
|
201
|
+
type: NgTemplateOutlet,
|
|
202
|
+
selector: "[ngTemplateOutlet]",
|
|
203
|
+
inputs: [
|
|
204
|
+
"ngTemplateOutletContext",
|
|
205
|
+
"ngTemplateOutlet",
|
|
206
|
+
"ngTemplateOutletInjector"
|
|
207
|
+
]
|
|
208
|
+
}],
|
|
209
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
210
|
+
});
|
|
211
|
+
};
|
|
212
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
213
|
+
minVersion: "12.0.0",
|
|
214
|
+
version: "22.2.6",
|
|
215
|
+
ngImport: i0,
|
|
216
|
+
type: StarInplace,
|
|
217
|
+
decorators: [{
|
|
218
|
+
type: Component,
|
|
219
|
+
args: [{
|
|
220
|
+
selector: "star-inplace",
|
|
221
|
+
imports: [NgTemplateOutlet],
|
|
222
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
223
|
+
host: {
|
|
224
|
+
class: "star-inplace",
|
|
225
|
+
"(keydown.escape)": "onEscape($event)"
|
|
226
|
+
},
|
|
227
|
+
template: `
|
|
228
|
+
@if (active()) {
|
|
229
|
+
<span class="star-inplace__content">
|
|
230
|
+
@if (content(); as edit) {
|
|
231
|
+
<ng-container *ngTemplateOutlet="edit.template" />
|
|
232
|
+
}
|
|
233
|
+
@if (closable()) {
|
|
234
|
+
<button
|
|
235
|
+
type="button"
|
|
236
|
+
class="star-select__icon-btn"
|
|
237
|
+
[attr.aria-label]="text.close"
|
|
238
|
+
(click)="deactivate()"
|
|
239
|
+
>
|
|
240
|
+
<i class="ph-bold ph-check" aria-hidden="true"></i>
|
|
241
|
+
</button>
|
|
242
|
+
}
|
|
243
|
+
</span>
|
|
244
|
+
} @else {
|
|
245
|
+
<button
|
|
246
|
+
type="button"
|
|
247
|
+
class="star-inplace__display"
|
|
248
|
+
[disabled]="disabled()"
|
|
249
|
+
(click)="activate()"
|
|
250
|
+
>
|
|
251
|
+
<!-- The label is part of the name, so the visible value is too (WCAG 2.5.3). -->
|
|
252
|
+
@if (ariaLabel(); as label) {
|
|
253
|
+
<span class="star-sr-only">{{ label }}: </span>
|
|
254
|
+
}
|
|
255
|
+
@if (display(); as view) {
|
|
256
|
+
<ng-container *ngTemplateOutlet="view.template" />
|
|
257
|
+
}
|
|
258
|
+
<i class="ph-bold ph-pencil-simple star-inplace__icon" aria-hidden="true"></i>
|
|
259
|
+
</button>
|
|
260
|
+
}
|
|
261
|
+
`
|
|
262
|
+
}]
|
|
263
|
+
}],
|
|
264
|
+
propDecorators: {
|
|
265
|
+
active: [{
|
|
266
|
+
type: i0.Input,
|
|
267
|
+
args: [{
|
|
268
|
+
isSignal: true,
|
|
269
|
+
alias: "active",
|
|
270
|
+
required: false
|
|
271
|
+
}]
|
|
272
|
+
}, {
|
|
273
|
+
type: i0.Output,
|
|
274
|
+
args: ["activeChange"]
|
|
275
|
+
}],
|
|
276
|
+
disabled: [{
|
|
277
|
+
type: i0.Input,
|
|
278
|
+
args: [{
|
|
279
|
+
isSignal: true,
|
|
280
|
+
alias: "disabled",
|
|
281
|
+
required: false
|
|
282
|
+
}]
|
|
283
|
+
}],
|
|
284
|
+
closable: [{
|
|
285
|
+
type: i0.Input,
|
|
286
|
+
args: [{
|
|
287
|
+
isSignal: true,
|
|
288
|
+
alias: "closable",
|
|
289
|
+
required: false
|
|
290
|
+
}]
|
|
291
|
+
}],
|
|
292
|
+
ariaLabel: [{
|
|
293
|
+
type: i0.Input,
|
|
294
|
+
args: [{
|
|
295
|
+
isSignal: true,
|
|
296
|
+
alias: "ariaLabel",
|
|
297
|
+
required: false
|
|
298
|
+
}]
|
|
299
|
+
}],
|
|
300
|
+
display: [{
|
|
301
|
+
type: i0.ContentChild,
|
|
302
|
+
args: [i0.forwardRef(() => StarInplaceDisplay), { isSignal: true }]
|
|
303
|
+
}],
|
|
304
|
+
content: [{
|
|
305
|
+
type: i0.ContentChild,
|
|
306
|
+
args: [i0.forwardRef(() => StarInplaceContent), { isSignal: true }]
|
|
307
|
+
}]
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
var StarScrollPanel = class StarScrollPanel {
|
|
311
|
+
height = input(null, ...ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []);
|
|
312
|
+
maxHeight = input(null, ...ngDevMode ? [{ debugName: "maxHeight" }] : /* istanbul ignore next */ []);
|
|
313
|
+
ariaLabel = input(null, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
314
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
315
|
+
minVersion: "12.0.0",
|
|
316
|
+
version: "22.2.6",
|
|
317
|
+
ngImport: i0,
|
|
318
|
+
type: StarScrollPanel,
|
|
319
|
+
deps: [],
|
|
320
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
321
|
+
});
|
|
322
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
323
|
+
minVersion: "17.1.0",
|
|
324
|
+
version: "22.2.6",
|
|
325
|
+
type: StarScrollPanel,
|
|
326
|
+
isStandalone: true,
|
|
327
|
+
selector: "star-scroll-panel",
|
|
328
|
+
inputs: {
|
|
329
|
+
height: {
|
|
330
|
+
classPropertyName: "height",
|
|
331
|
+
publicName: "height",
|
|
332
|
+
isSignal: true,
|
|
333
|
+
isRequired: false,
|
|
334
|
+
transformFunction: null
|
|
335
|
+
},
|
|
336
|
+
maxHeight: {
|
|
337
|
+
classPropertyName: "maxHeight",
|
|
338
|
+
publicName: "maxHeight",
|
|
339
|
+
isSignal: true,
|
|
340
|
+
isRequired: false,
|
|
341
|
+
transformFunction: null
|
|
342
|
+
},
|
|
343
|
+
ariaLabel: {
|
|
344
|
+
classPropertyName: "ariaLabel",
|
|
345
|
+
publicName: "ariaLabel",
|
|
346
|
+
isSignal: true,
|
|
347
|
+
isRequired: false,
|
|
348
|
+
transformFunction: null
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
host: {
|
|
352
|
+
attributes: {
|
|
353
|
+
"role": "region",
|
|
354
|
+
"tabindex": "0"
|
|
355
|
+
},
|
|
356
|
+
properties: {
|
|
357
|
+
"style.height": "height()",
|
|
358
|
+
"style.max-height": "maxHeight()",
|
|
359
|
+
"attr.aria-label": "ariaLabel()"
|
|
360
|
+
},
|
|
361
|
+
classAttribute: "star-scroll-panel"
|
|
362
|
+
},
|
|
363
|
+
ngImport: i0,
|
|
364
|
+
template: `<ng-content />`,
|
|
365
|
+
isInline: true,
|
|
366
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
367
|
+
});
|
|
368
|
+
};
|
|
369
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
370
|
+
minVersion: "12.0.0",
|
|
371
|
+
version: "22.2.6",
|
|
372
|
+
ngImport: i0,
|
|
373
|
+
type: StarScrollPanel,
|
|
374
|
+
decorators: [{
|
|
375
|
+
type: Component,
|
|
376
|
+
args: [{
|
|
377
|
+
selector: "star-scroll-panel",
|
|
378
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
379
|
+
host: {
|
|
380
|
+
class: "star-scroll-panel",
|
|
381
|
+
role: "region",
|
|
382
|
+
tabindex: "0",
|
|
383
|
+
"[style.height]": "height()",
|
|
384
|
+
"[style.max-height]": "maxHeight()",
|
|
385
|
+
"[attr.aria-label]": "ariaLabel()"
|
|
386
|
+
},
|
|
387
|
+
template: `<ng-content />`
|
|
388
|
+
}]
|
|
389
|
+
}],
|
|
390
|
+
propDecorators: {
|
|
391
|
+
height: [{
|
|
392
|
+
type: i0.Input,
|
|
393
|
+
args: [{
|
|
394
|
+
isSignal: true,
|
|
395
|
+
alias: "height",
|
|
396
|
+
required: false
|
|
397
|
+
}]
|
|
398
|
+
}],
|
|
399
|
+
maxHeight: [{
|
|
400
|
+
type: i0.Input,
|
|
401
|
+
args: [{
|
|
402
|
+
isSignal: true,
|
|
403
|
+
alias: "maxHeight",
|
|
404
|
+
required: false
|
|
405
|
+
}]
|
|
406
|
+
}],
|
|
407
|
+
ariaLabel: [{
|
|
408
|
+
type: i0.Input,
|
|
409
|
+
args: [{
|
|
410
|
+
isSignal: true,
|
|
411
|
+
alias: "ariaLabel",
|
|
412
|
+
required: false
|
|
413
|
+
}]
|
|
414
|
+
}]
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
var StarFocusTrap = class StarFocusTrap {
|
|
418
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
419
|
+
minVersion: "12.0.0",
|
|
420
|
+
version: "22.2.6",
|
|
421
|
+
ngImport: i0,
|
|
422
|
+
type: StarFocusTrap,
|
|
423
|
+
deps: [],
|
|
424
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
425
|
+
});
|
|
426
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
427
|
+
minVersion: "14.0.0",
|
|
428
|
+
version: "22.2.6",
|
|
429
|
+
type: StarFocusTrap,
|
|
430
|
+
isStandalone: true,
|
|
431
|
+
selector: "[starFocusTrap]",
|
|
432
|
+
hostDirectives: [{
|
|
433
|
+
directive: i1.CdkTrapFocus,
|
|
434
|
+
inputs: [
|
|
435
|
+
"cdkTrapFocus",
|
|
436
|
+
"starFocusTrap",
|
|
437
|
+
"cdkTrapFocusAutoCapture",
|
|
438
|
+
"autoCapture"
|
|
439
|
+
]
|
|
440
|
+
}],
|
|
441
|
+
ngImport: i0
|
|
442
|
+
});
|
|
443
|
+
};
|
|
444
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
445
|
+
minVersion: "12.0.0",
|
|
446
|
+
version: "22.2.6",
|
|
447
|
+
ngImport: i0,
|
|
448
|
+
type: StarFocusTrap,
|
|
449
|
+
decorators: [{
|
|
450
|
+
type: Directive,
|
|
451
|
+
args: [{
|
|
452
|
+
selector: "[starFocusTrap]",
|
|
453
|
+
hostDirectives: [{
|
|
454
|
+
directive: CdkTrapFocus,
|
|
455
|
+
inputs: ["cdkTrapFocus: starFocusTrap", "cdkTrapFocusAutoCapture: autoCapture"]
|
|
456
|
+
}]
|
|
457
|
+
}]
|
|
458
|
+
}]
|
|
459
|
+
});
|
|
460
|
+
var StarFloatLabel = class StarFloatLabel {
|
|
461
|
+
label = input.required(...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
462
|
+
constructor() {
|
|
463
|
+
const host = inject(ElementRef).nativeElement;
|
|
464
|
+
afterNextRender(() => {
|
|
465
|
+
const control = host.querySelector("input, textarea");
|
|
466
|
+
if (control && !control.getAttribute("placeholder")) control.setAttribute("placeholder", " ");
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
470
|
+
minVersion: "12.0.0",
|
|
471
|
+
version: "22.2.6",
|
|
472
|
+
ngImport: i0,
|
|
473
|
+
type: StarFloatLabel,
|
|
474
|
+
deps: [],
|
|
475
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
476
|
+
});
|
|
477
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
478
|
+
minVersion: "17.1.0",
|
|
479
|
+
version: "22.2.6",
|
|
480
|
+
type: StarFloatLabel,
|
|
481
|
+
isStandalone: true,
|
|
482
|
+
selector: "star-float-label",
|
|
483
|
+
inputs: { label: {
|
|
484
|
+
classPropertyName: "label",
|
|
485
|
+
publicName: "label",
|
|
486
|
+
isSignal: true,
|
|
487
|
+
isRequired: true,
|
|
488
|
+
transformFunction: null
|
|
489
|
+
} },
|
|
490
|
+
host: { classAttribute: "star-float" },
|
|
491
|
+
ngImport: i0,
|
|
492
|
+
template: `
|
|
493
|
+
<!-- The control is projected into the label, so the label wraps it at run time. -->
|
|
494
|
+
<!-- eslint-disable-next-line @angular-eslint/template/label-has-associated-control -->
|
|
495
|
+
<label class="star-float__wrap">
|
|
496
|
+
<ng-content />
|
|
497
|
+
<span class="star-float__label">{{ label() }}</span>
|
|
498
|
+
</label>
|
|
499
|
+
`,
|
|
500
|
+
isInline: true,
|
|
501
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
502
|
+
});
|
|
503
|
+
};
|
|
504
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
505
|
+
minVersion: "12.0.0",
|
|
506
|
+
version: "22.2.6",
|
|
507
|
+
ngImport: i0,
|
|
508
|
+
type: StarFloatLabel,
|
|
509
|
+
decorators: [{
|
|
510
|
+
type: Component,
|
|
511
|
+
args: [{
|
|
512
|
+
selector: "star-float-label",
|
|
513
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
514
|
+
host: { class: "star-float" },
|
|
515
|
+
template: `
|
|
516
|
+
<!-- The control is projected into the label, so the label wraps it at run time. -->
|
|
517
|
+
<!-- eslint-disable-next-line @angular-eslint/template/label-has-associated-control -->
|
|
518
|
+
<label class="star-float__wrap">
|
|
519
|
+
<ng-content />
|
|
520
|
+
<span class="star-float__label">{{ label() }}</span>
|
|
521
|
+
</label>
|
|
522
|
+
`
|
|
523
|
+
}]
|
|
524
|
+
}],
|
|
525
|
+
ctorParameters: () => [],
|
|
526
|
+
propDecorators: { label: [{
|
|
527
|
+
type: i0.Input,
|
|
528
|
+
args: [{
|
|
529
|
+
isSignal: true,
|
|
530
|
+
alias: "label",
|
|
531
|
+
required: true
|
|
532
|
+
}]
|
|
533
|
+
}] }
|
|
534
|
+
});
|
|
535
|
+
var StarRipple = class StarRipple {
|
|
536
|
+
host = inject(ElementRef).nativeElement;
|
|
537
|
+
show(event) {
|
|
538
|
+
if (this.host.ownerDocument.defaultView?.matchMedia?.("(prefers-reduced-motion: reduce)").matches) return;
|
|
539
|
+
const box = this.host.getBoundingClientRect();
|
|
540
|
+
const size = Math.max(box.width, box.height) * 2;
|
|
541
|
+
const ink = this.host.ownerDocument.createElement("span");
|
|
542
|
+
ink.className = "star-ripple__ink";
|
|
543
|
+
ink.setAttribute("aria-hidden", "true");
|
|
544
|
+
ink.style.width = ink.style.height = `${size}px`;
|
|
545
|
+
ink.style.left = `${event.clientX - box.left - size / 2}px`;
|
|
546
|
+
ink.style.top = `${event.clientY - box.top - size / 2}px`;
|
|
547
|
+
ink.addEventListener("animationend", () => ink.remove());
|
|
548
|
+
this.host.append(ink);
|
|
549
|
+
}
|
|
550
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
551
|
+
minVersion: "12.0.0",
|
|
552
|
+
version: "22.2.6",
|
|
553
|
+
ngImport: i0,
|
|
554
|
+
type: StarRipple,
|
|
555
|
+
deps: [],
|
|
556
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
557
|
+
});
|
|
558
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
559
|
+
minVersion: "14.0.0",
|
|
560
|
+
version: "22.2.6",
|
|
561
|
+
type: StarRipple,
|
|
562
|
+
isStandalone: true,
|
|
563
|
+
selector: "[starRipple]",
|
|
564
|
+
host: {
|
|
565
|
+
listeners: { "pointerdown": "show($event)" },
|
|
566
|
+
classAttribute: "star-ripple"
|
|
567
|
+
},
|
|
568
|
+
ngImport: i0
|
|
569
|
+
});
|
|
570
|
+
};
|
|
571
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
572
|
+
minVersion: "12.0.0",
|
|
573
|
+
version: "22.2.6",
|
|
574
|
+
ngImport: i0,
|
|
575
|
+
type: StarRipple,
|
|
576
|
+
decorators: [{
|
|
577
|
+
type: Directive,
|
|
578
|
+
args: [{
|
|
579
|
+
selector: "[starRipple]",
|
|
580
|
+
host: {
|
|
581
|
+
class: "star-ripple",
|
|
582
|
+
"(pointerdown)": "show($event)"
|
|
583
|
+
}
|
|
584
|
+
}]
|
|
585
|
+
}]
|
|
586
|
+
});
|
|
587
|
+
var StarAnimateOnScroll = class StarAnimateOnScroll {
|
|
588
|
+
threshold = input(.15, ...ngDevMode ? [{ debugName: "threshold" }] : /* istanbul ignore next */ []);
|
|
589
|
+
shown = signal(false, ...ngDevMode ? [{ debugName: "shown" }] : /* istanbul ignore next */ []);
|
|
590
|
+
constructor() {
|
|
591
|
+
const host = inject(ElementRef).nativeElement;
|
|
592
|
+
const destroy = inject(DestroyRef);
|
|
593
|
+
afterNextRender(() => {
|
|
594
|
+
if (typeof IntersectionObserver === "undefined") {
|
|
595
|
+
this.shown.set(true);
|
|
596
|
+
return;
|
|
597
|
+
}
|
|
598
|
+
const observer = new IntersectionObserver((entries) => {
|
|
599
|
+
if (entries.some((entry) => entry.isIntersecting)) {
|
|
600
|
+
this.shown.set(true);
|
|
601
|
+
observer.disconnect();
|
|
602
|
+
}
|
|
603
|
+
}, { threshold: this.threshold() });
|
|
604
|
+
observer.observe(host);
|
|
605
|
+
destroy.onDestroy(() => observer.disconnect());
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
609
|
+
minVersion: "12.0.0",
|
|
610
|
+
version: "22.2.6",
|
|
611
|
+
ngImport: i0,
|
|
612
|
+
type: StarAnimateOnScroll,
|
|
613
|
+
deps: [],
|
|
614
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
615
|
+
});
|
|
616
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
617
|
+
minVersion: "17.1.0",
|
|
618
|
+
version: "22.2.6",
|
|
619
|
+
type: StarAnimateOnScroll,
|
|
620
|
+
isStandalone: true,
|
|
621
|
+
selector: "[starAnimateOnScroll]",
|
|
622
|
+
inputs: { threshold: {
|
|
623
|
+
classPropertyName: "threshold",
|
|
624
|
+
publicName: "threshold",
|
|
625
|
+
isSignal: true,
|
|
626
|
+
isRequired: false,
|
|
627
|
+
transformFunction: null
|
|
628
|
+
} },
|
|
629
|
+
host: {
|
|
630
|
+
properties: { "class.star-reveal--in": "shown()" },
|
|
631
|
+
classAttribute: "star-reveal"
|
|
632
|
+
},
|
|
633
|
+
ngImport: i0
|
|
634
|
+
});
|
|
635
|
+
};
|
|
636
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
637
|
+
minVersion: "12.0.0",
|
|
638
|
+
version: "22.2.6",
|
|
639
|
+
ngImport: i0,
|
|
640
|
+
type: StarAnimateOnScroll,
|
|
641
|
+
decorators: [{
|
|
642
|
+
type: Directive,
|
|
643
|
+
args: [{
|
|
644
|
+
selector: "[starAnimateOnScroll]",
|
|
645
|
+
host: {
|
|
646
|
+
class: "star-reveal",
|
|
647
|
+
"[class.star-reveal--in]": "shown()"
|
|
648
|
+
}
|
|
649
|
+
}]
|
|
650
|
+
}],
|
|
651
|
+
ctorParameters: () => [],
|
|
652
|
+
propDecorators: { threshold: [{
|
|
653
|
+
type: i0.Input,
|
|
654
|
+
args: [{
|
|
655
|
+
isSignal: true,
|
|
656
|
+
alias: "threshold",
|
|
657
|
+
required: false
|
|
658
|
+
}]
|
|
659
|
+
}] }
|
|
660
|
+
});
|
|
661
|
+
var StarImageCompare = class StarImageCompare {
|
|
662
|
+
text = inject(STAR_UI_TEXT);
|
|
663
|
+
rangeId = inject(_IdGenerator).getId("star-compare-");
|
|
664
|
+
leftSrc = input.required(...ngDevMode ? [{ debugName: "leftSrc" }] : /* istanbul ignore next */ []);
|
|
665
|
+
rightSrc = input.required(...ngDevMode ? [{ debugName: "rightSrc" }] : /* istanbul ignore next */ []);
|
|
666
|
+
leftAlt = input("", ...ngDevMode ? [{ debugName: "leftAlt" }] : /* istanbul ignore next */ []);
|
|
667
|
+
rightAlt = input("", ...ngDevMode ? [{ debugName: "rightAlt" }] : /* istanbul ignore next */ []);
|
|
668
|
+
ariaLabel = input(null, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
669
|
+
value = model(50, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
670
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
671
|
+
minVersion: "12.0.0",
|
|
672
|
+
version: "22.2.6",
|
|
673
|
+
ngImport: i0,
|
|
674
|
+
type: StarImageCompare,
|
|
675
|
+
deps: [],
|
|
676
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
677
|
+
});
|
|
678
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
679
|
+
minVersion: "17.1.0",
|
|
680
|
+
version: "22.2.6",
|
|
681
|
+
type: StarImageCompare,
|
|
682
|
+
isStandalone: true,
|
|
683
|
+
selector: "star-image-compare",
|
|
684
|
+
inputs: {
|
|
685
|
+
leftSrc: {
|
|
686
|
+
classPropertyName: "leftSrc",
|
|
687
|
+
publicName: "leftSrc",
|
|
688
|
+
isSignal: true,
|
|
689
|
+
isRequired: true,
|
|
690
|
+
transformFunction: null
|
|
691
|
+
},
|
|
692
|
+
rightSrc: {
|
|
693
|
+
classPropertyName: "rightSrc",
|
|
694
|
+
publicName: "rightSrc",
|
|
695
|
+
isSignal: true,
|
|
696
|
+
isRequired: true,
|
|
697
|
+
transformFunction: null
|
|
698
|
+
},
|
|
699
|
+
leftAlt: {
|
|
700
|
+
classPropertyName: "leftAlt",
|
|
701
|
+
publicName: "leftAlt",
|
|
702
|
+
isSignal: true,
|
|
703
|
+
isRequired: false,
|
|
704
|
+
transformFunction: null
|
|
705
|
+
},
|
|
706
|
+
rightAlt: {
|
|
707
|
+
classPropertyName: "rightAlt",
|
|
708
|
+
publicName: "rightAlt",
|
|
709
|
+
isSignal: true,
|
|
710
|
+
isRequired: false,
|
|
711
|
+
transformFunction: null
|
|
712
|
+
},
|
|
713
|
+
ariaLabel: {
|
|
714
|
+
classPropertyName: "ariaLabel",
|
|
715
|
+
publicName: "ariaLabel",
|
|
716
|
+
isSignal: true,
|
|
717
|
+
isRequired: false,
|
|
718
|
+
transformFunction: null
|
|
719
|
+
},
|
|
720
|
+
value: {
|
|
721
|
+
classPropertyName: "value",
|
|
722
|
+
publicName: "value",
|
|
723
|
+
isSignal: true,
|
|
724
|
+
isRequired: false,
|
|
725
|
+
transformFunction: null
|
|
726
|
+
}
|
|
727
|
+
},
|
|
728
|
+
outputs: { value: "valueChange" },
|
|
729
|
+
host: {
|
|
730
|
+
properties: { "style.--star-compare.%": "value()" },
|
|
731
|
+
classAttribute: "star-compare"
|
|
732
|
+
},
|
|
733
|
+
ngImport: i0,
|
|
734
|
+
template: `
|
|
735
|
+
<img class="star-compare__image" [src]="rightSrc()" [alt]="rightAlt()" />
|
|
736
|
+
<img
|
|
737
|
+
class="star-compare__image star-compare__image--left"
|
|
738
|
+
[src]="leftSrc()"
|
|
739
|
+
[alt]="leftAlt()"
|
|
740
|
+
/>
|
|
741
|
+
<span class="star-compare__divider" aria-hidden="true">
|
|
742
|
+
<i class="ph-bold ph-arrows-horizontal"></i>
|
|
743
|
+
</span>
|
|
744
|
+
<input
|
|
745
|
+
type="range"
|
|
746
|
+
class="star-compare__range"
|
|
747
|
+
min="0"
|
|
748
|
+
max="100"
|
|
749
|
+
step="1"
|
|
750
|
+
[id]="rangeId"
|
|
751
|
+
[value]="value()"
|
|
752
|
+
[attr.aria-label]="ariaLabel() ?? text.compareImages"
|
|
753
|
+
[attr.aria-valuetext]="value() + '%'"
|
|
754
|
+
(input)="value.set($any($event.target).valueAsNumber)"
|
|
755
|
+
/>
|
|
756
|
+
`,
|
|
757
|
+
isInline: true,
|
|
758
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
759
|
+
});
|
|
760
|
+
};
|
|
761
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
762
|
+
minVersion: "12.0.0",
|
|
763
|
+
version: "22.2.6",
|
|
764
|
+
ngImport: i0,
|
|
765
|
+
type: StarImageCompare,
|
|
766
|
+
decorators: [{
|
|
767
|
+
type: Component,
|
|
768
|
+
args: [{
|
|
769
|
+
selector: "star-image-compare",
|
|
770
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
771
|
+
host: {
|
|
772
|
+
class: "star-compare",
|
|
773
|
+
"[style.--star-compare.%]": "value()"
|
|
774
|
+
},
|
|
775
|
+
template: `
|
|
776
|
+
<img class="star-compare__image" [src]="rightSrc()" [alt]="rightAlt()" />
|
|
777
|
+
<img
|
|
778
|
+
class="star-compare__image star-compare__image--left"
|
|
779
|
+
[src]="leftSrc()"
|
|
780
|
+
[alt]="leftAlt()"
|
|
781
|
+
/>
|
|
782
|
+
<span class="star-compare__divider" aria-hidden="true">
|
|
783
|
+
<i class="ph-bold ph-arrows-horizontal"></i>
|
|
784
|
+
</span>
|
|
785
|
+
<input
|
|
786
|
+
type="range"
|
|
787
|
+
class="star-compare__range"
|
|
788
|
+
min="0"
|
|
789
|
+
max="100"
|
|
790
|
+
step="1"
|
|
791
|
+
[id]="rangeId"
|
|
792
|
+
[value]="value()"
|
|
793
|
+
[attr.aria-label]="ariaLabel() ?? text.compareImages"
|
|
794
|
+
[attr.aria-valuetext]="value() + '%'"
|
|
795
|
+
(input)="value.set($any($event.target).valueAsNumber)"
|
|
796
|
+
/>
|
|
797
|
+
`
|
|
798
|
+
}]
|
|
799
|
+
}],
|
|
800
|
+
propDecorators: {
|
|
801
|
+
leftSrc: [{
|
|
802
|
+
type: i0.Input,
|
|
803
|
+
args: [{
|
|
804
|
+
isSignal: true,
|
|
805
|
+
alias: "leftSrc",
|
|
806
|
+
required: true
|
|
807
|
+
}]
|
|
808
|
+
}],
|
|
809
|
+
rightSrc: [{
|
|
810
|
+
type: i0.Input,
|
|
811
|
+
args: [{
|
|
812
|
+
isSignal: true,
|
|
813
|
+
alias: "rightSrc",
|
|
814
|
+
required: true
|
|
815
|
+
}]
|
|
816
|
+
}],
|
|
817
|
+
leftAlt: [{
|
|
818
|
+
type: i0.Input,
|
|
819
|
+
args: [{
|
|
820
|
+
isSignal: true,
|
|
821
|
+
alias: "leftAlt",
|
|
822
|
+
required: false
|
|
823
|
+
}]
|
|
824
|
+
}],
|
|
825
|
+
rightAlt: [{
|
|
826
|
+
type: i0.Input,
|
|
827
|
+
args: [{
|
|
828
|
+
isSignal: true,
|
|
829
|
+
alias: "rightAlt",
|
|
830
|
+
required: false
|
|
831
|
+
}]
|
|
832
|
+
}],
|
|
833
|
+
ariaLabel: [{
|
|
834
|
+
type: i0.Input,
|
|
835
|
+
args: [{
|
|
836
|
+
isSignal: true,
|
|
837
|
+
alias: "ariaLabel",
|
|
838
|
+
required: false
|
|
839
|
+
}]
|
|
840
|
+
}],
|
|
841
|
+
value: [{
|
|
842
|
+
type: i0.Input,
|
|
843
|
+
args: [{
|
|
844
|
+
isSignal: true,
|
|
845
|
+
alias: "value",
|
|
846
|
+
required: false
|
|
847
|
+
}]
|
|
848
|
+
}, {
|
|
849
|
+
type: i0.Output,
|
|
850
|
+
args: ["valueChange"]
|
|
851
|
+
}]
|
|
852
|
+
}
|
|
853
|
+
});
|
|
854
|
+
var StarTerminal = class StarTerminal {
|
|
855
|
+
text = inject(STAR_UI_TEXT);
|
|
856
|
+
injector = inject(Injector);
|
|
857
|
+
inputId = inject(_IdGenerator).getId("star-terminal-");
|
|
858
|
+
prompt = input("$", ...ngDevMode ? [{ debugName: "prompt" }] : /* istanbul ignore next */ []);
|
|
859
|
+
welcome = input(null, ...ngDevMode ? [{ debugName: "welcome" }] : /* istanbul ignore next */ []);
|
|
860
|
+
ariaLabel = input(null, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
861
|
+
handler = input(null, ...ngDevMode ? [{ debugName: "handler" }] : /* istanbul ignore next */ []);
|
|
862
|
+
commandRun = output();
|
|
863
|
+
entries = signal([], ...ngDevMode ? [{ debugName: "entries" }] : /* istanbul ignore next */ []);
|
|
864
|
+
busy = signal(false, ...ngDevMode ? [{ debugName: "busy" }] : /* istanbul ignore next */ []);
|
|
865
|
+
input = viewChild.required("input", ...ngDevMode ? [{ debugName: "input" }] : /* istanbul ignore next */ []);
|
|
866
|
+
log = viewChild.required("log", ...ngDevMode ? [{ debugName: "log" }] : /* istanbul ignore next */ []);
|
|
867
|
+
recall = -1;
|
|
868
|
+
focus() {
|
|
869
|
+
if (this.input().nativeElement.ownerDocument.getSelection()?.toString()) return;
|
|
870
|
+
this.input().nativeElement.focus();
|
|
871
|
+
}
|
|
872
|
+
clear() {
|
|
873
|
+
this.entries.set([]);
|
|
874
|
+
}
|
|
875
|
+
async run(command) {
|
|
876
|
+
const text = command.trim();
|
|
877
|
+
if (!text || this.busy()) return;
|
|
878
|
+
this.recall = -1;
|
|
879
|
+
this.commandRun.emit(text);
|
|
880
|
+
const handler = this.handler();
|
|
881
|
+
const index = this.entries().length;
|
|
882
|
+
this.entries.update((entries) => [...entries, {
|
|
883
|
+
command: text,
|
|
884
|
+
response: handler ? null : ""
|
|
885
|
+
}]);
|
|
886
|
+
if (handler) {
|
|
887
|
+
this.busy.set(true);
|
|
888
|
+
let response;
|
|
889
|
+
let error = false;
|
|
890
|
+
try {
|
|
891
|
+
response = await handler(text);
|
|
892
|
+
} catch (cause) {
|
|
893
|
+
error = true;
|
|
894
|
+
response = cause instanceof Error ? cause.message : String(cause);
|
|
895
|
+
}
|
|
896
|
+
this.entries.update((entries) => entries.map((entry, i) => i === index ? {
|
|
897
|
+
...entry,
|
|
898
|
+
response,
|
|
899
|
+
error
|
|
900
|
+
} : entry));
|
|
901
|
+
this.busy.set(false);
|
|
902
|
+
}
|
|
903
|
+
afterNextRender(() => {
|
|
904
|
+
const log = this.log().nativeElement;
|
|
905
|
+
log.scrollTop = log.scrollHeight;
|
|
906
|
+
this.input().nativeElement.focus();
|
|
907
|
+
}, { injector: this.injector });
|
|
908
|
+
}
|
|
909
|
+
onKeydown(event, input) {
|
|
910
|
+
if (event.key === "Enter") {
|
|
911
|
+
const value = input.value;
|
|
912
|
+
input.value = "";
|
|
913
|
+
this.run(value);
|
|
914
|
+
return;
|
|
915
|
+
}
|
|
916
|
+
if (event.key !== "ArrowUp" && event.key !== "ArrowDown") return;
|
|
917
|
+
const history = this.entries().map((entry) => entry.command);
|
|
918
|
+
if (!history.length) return;
|
|
919
|
+
event.preventDefault();
|
|
920
|
+
if (event.key === "ArrowUp") this.recall = this.recall < 0 ? history.length - 1 : Math.max(0, this.recall - 1);
|
|
921
|
+
else this.recall = this.recall < 0 || this.recall >= history.length - 1 ? -1 : this.recall + 1;
|
|
922
|
+
input.value = this.recall < 0 ? "" : history[this.recall];
|
|
923
|
+
}
|
|
924
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
925
|
+
minVersion: "12.0.0",
|
|
926
|
+
version: "22.2.6",
|
|
927
|
+
ngImport: i0,
|
|
928
|
+
type: StarTerminal,
|
|
929
|
+
deps: [],
|
|
930
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
931
|
+
});
|
|
932
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
933
|
+
minVersion: "17.0.0",
|
|
934
|
+
version: "22.2.6",
|
|
935
|
+
type: StarTerminal,
|
|
936
|
+
isStandalone: true,
|
|
937
|
+
selector: "star-terminal",
|
|
938
|
+
inputs: {
|
|
939
|
+
prompt: {
|
|
940
|
+
classPropertyName: "prompt",
|
|
941
|
+
publicName: "prompt",
|
|
942
|
+
isSignal: true,
|
|
943
|
+
isRequired: false,
|
|
944
|
+
transformFunction: null
|
|
945
|
+
},
|
|
946
|
+
welcome: {
|
|
947
|
+
classPropertyName: "welcome",
|
|
948
|
+
publicName: "welcome",
|
|
949
|
+
isSignal: true,
|
|
950
|
+
isRequired: false,
|
|
951
|
+
transformFunction: null
|
|
952
|
+
},
|
|
953
|
+
ariaLabel: {
|
|
954
|
+
classPropertyName: "ariaLabel",
|
|
955
|
+
publicName: "ariaLabel",
|
|
956
|
+
isSignal: true,
|
|
957
|
+
isRequired: false,
|
|
958
|
+
transformFunction: null
|
|
959
|
+
},
|
|
960
|
+
handler: {
|
|
961
|
+
classPropertyName: "handler",
|
|
962
|
+
publicName: "handler",
|
|
963
|
+
isSignal: true,
|
|
964
|
+
isRequired: false,
|
|
965
|
+
transformFunction: null
|
|
966
|
+
}
|
|
967
|
+
},
|
|
968
|
+
outputs: { commandRun: "commandRun" },
|
|
969
|
+
host: {
|
|
970
|
+
listeners: { "click": "focus()" },
|
|
971
|
+
classAttribute: "star-terminal"
|
|
972
|
+
},
|
|
973
|
+
viewQueries: [{
|
|
974
|
+
propertyName: "input",
|
|
975
|
+
first: true,
|
|
976
|
+
predicate: ["input"],
|
|
977
|
+
descendants: true,
|
|
978
|
+
isSignal: true
|
|
979
|
+
}, {
|
|
980
|
+
propertyName: "log",
|
|
981
|
+
first: true,
|
|
982
|
+
predicate: ["log"],
|
|
983
|
+
descendants: true,
|
|
984
|
+
isSignal: true
|
|
985
|
+
}],
|
|
986
|
+
ngImport: i0,
|
|
987
|
+
template: `
|
|
988
|
+
<div
|
|
989
|
+
#log
|
|
990
|
+
class="star-terminal__log"
|
|
991
|
+
role="log"
|
|
992
|
+
aria-live="polite"
|
|
993
|
+
[attr.aria-label]="ariaLabel()"
|
|
994
|
+
>
|
|
995
|
+
@if (welcome()) {
|
|
996
|
+
<p class="star-terminal__welcome">{{ welcome() }}</p>
|
|
997
|
+
}
|
|
998
|
+
@for (entry of entries(); track $index) {
|
|
999
|
+
<p class="star-terminal__command">
|
|
1000
|
+
<span class="star-terminal__prompt" aria-hidden="true">{{ prompt() }}</span>
|
|
1001
|
+
{{ entry.command }}
|
|
1002
|
+
</p>
|
|
1003
|
+
@if (entry.response !== null) {
|
|
1004
|
+
<pre
|
|
1005
|
+
class="star-terminal__response"
|
|
1006
|
+
[class.star-terminal__response--error]="entry.error"
|
|
1007
|
+
>{{ entry.response }}</pre>
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
</div>
|
|
1011
|
+
<div class="star-terminal__line">
|
|
1012
|
+
<label class="star-terminal__prompt" [for]="inputId">{{ prompt() }}</label>
|
|
1013
|
+
<input
|
|
1014
|
+
#input
|
|
1015
|
+
type="text"
|
|
1016
|
+
class="star-terminal__input"
|
|
1017
|
+
autocomplete="off"
|
|
1018
|
+
autocapitalize="off"
|
|
1019
|
+
spellcheck="false"
|
|
1020
|
+
[id]="inputId"
|
|
1021
|
+
[attr.aria-label]="text.terminalCommand"
|
|
1022
|
+
[disabled]="busy()"
|
|
1023
|
+
(keydown)="onKeydown($event, input)"
|
|
1024
|
+
/>
|
|
1025
|
+
</div>
|
|
1026
|
+
`,
|
|
1027
|
+
isInline: true,
|
|
1028
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1029
|
+
});
|
|
1030
|
+
};
|
|
1031
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1032
|
+
minVersion: "12.0.0",
|
|
1033
|
+
version: "22.2.6",
|
|
1034
|
+
ngImport: i0,
|
|
1035
|
+
type: StarTerminal,
|
|
1036
|
+
decorators: [{
|
|
1037
|
+
type: Component,
|
|
1038
|
+
args: [{
|
|
1039
|
+
selector: "star-terminal",
|
|
1040
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1041
|
+
host: {
|
|
1042
|
+
class: "star-terminal",
|
|
1043
|
+
"(click)": "focus()"
|
|
1044
|
+
},
|
|
1045
|
+
template: `
|
|
1046
|
+
<div
|
|
1047
|
+
#log
|
|
1048
|
+
class="star-terminal__log"
|
|
1049
|
+
role="log"
|
|
1050
|
+
aria-live="polite"
|
|
1051
|
+
[attr.aria-label]="ariaLabel()"
|
|
1052
|
+
>
|
|
1053
|
+
@if (welcome()) {
|
|
1054
|
+
<p class="star-terminal__welcome">{{ welcome() }}</p>
|
|
1055
|
+
}
|
|
1056
|
+
@for (entry of entries(); track $index) {
|
|
1057
|
+
<p class="star-terminal__command">
|
|
1058
|
+
<span class="star-terminal__prompt" aria-hidden="true">{{ prompt() }}</span>
|
|
1059
|
+
{{ entry.command }}
|
|
1060
|
+
</p>
|
|
1061
|
+
@if (entry.response !== null) {
|
|
1062
|
+
<pre
|
|
1063
|
+
class="star-terminal__response"
|
|
1064
|
+
[class.star-terminal__response--error]="entry.error"
|
|
1065
|
+
>{{ entry.response }}</pre>
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
</div>
|
|
1069
|
+
<div class="star-terminal__line">
|
|
1070
|
+
<label class="star-terminal__prompt" [for]="inputId">{{ prompt() }}</label>
|
|
1071
|
+
<input
|
|
1072
|
+
#input
|
|
1073
|
+
type="text"
|
|
1074
|
+
class="star-terminal__input"
|
|
1075
|
+
autocomplete="off"
|
|
1076
|
+
autocapitalize="off"
|
|
1077
|
+
spellcheck="false"
|
|
1078
|
+
[id]="inputId"
|
|
1079
|
+
[attr.aria-label]="text.terminalCommand"
|
|
1080
|
+
[disabled]="busy()"
|
|
1081
|
+
(keydown)="onKeydown($event, input)"
|
|
1082
|
+
/>
|
|
1083
|
+
</div>
|
|
1084
|
+
`
|
|
1085
|
+
}]
|
|
1086
|
+
}],
|
|
1087
|
+
propDecorators: {
|
|
1088
|
+
prompt: [{
|
|
1089
|
+
type: i0.Input,
|
|
1090
|
+
args: [{
|
|
1091
|
+
isSignal: true,
|
|
1092
|
+
alias: "prompt",
|
|
1093
|
+
required: false
|
|
1094
|
+
}]
|
|
1095
|
+
}],
|
|
1096
|
+
welcome: [{
|
|
1097
|
+
type: i0.Input,
|
|
1098
|
+
args: [{
|
|
1099
|
+
isSignal: true,
|
|
1100
|
+
alias: "welcome",
|
|
1101
|
+
required: false
|
|
1102
|
+
}]
|
|
1103
|
+
}],
|
|
1104
|
+
ariaLabel: [{
|
|
1105
|
+
type: i0.Input,
|
|
1106
|
+
args: [{
|
|
1107
|
+
isSignal: true,
|
|
1108
|
+
alias: "ariaLabel",
|
|
1109
|
+
required: false
|
|
1110
|
+
}]
|
|
1111
|
+
}],
|
|
1112
|
+
handler: [{
|
|
1113
|
+
type: i0.Input,
|
|
1114
|
+
args: [{
|
|
1115
|
+
isSignal: true,
|
|
1116
|
+
alias: "handler",
|
|
1117
|
+
required: false
|
|
1118
|
+
}]
|
|
1119
|
+
}],
|
|
1120
|
+
commandRun: [{
|
|
1121
|
+
type: i0.Output,
|
|
1122
|
+
args: ["commandRun"]
|
|
1123
|
+
}],
|
|
1124
|
+
input: [{
|
|
1125
|
+
type: i0.ViewChild,
|
|
1126
|
+
args: ["input", { isSignal: true }]
|
|
1127
|
+
}],
|
|
1128
|
+
log: [{
|
|
1129
|
+
type: i0.ViewChild,
|
|
1130
|
+
args: ["log", { isSignal: true }]
|
|
1131
|
+
}]
|
|
1132
|
+
}
|
|
1133
|
+
});
|
|
1134
|
+
var StarSplitter = class StarSplitter {
|
|
1135
|
+
text = inject(STAR_UI_TEXT);
|
|
1136
|
+
host = inject(ElementRef);
|
|
1137
|
+
layout = input("horizontal", ...ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []);
|
|
1138
|
+
size = model(50, ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
1139
|
+
minSize = input(15, ...ngDevMode ? [{ debugName: "minSize" }] : /* istanbul ignore next */ []);
|
|
1140
|
+
ariaLabel = input(null, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
1141
|
+
clamp(value) {
|
|
1142
|
+
return Math.round(Math.min(100 - this.minSize(), Math.max(this.minSize(), value)) * 10) / 10;
|
|
1143
|
+
}
|
|
1144
|
+
startDrag(event) {
|
|
1145
|
+
const gutter = event.currentTarget;
|
|
1146
|
+
gutter.setPointerCapture?.(event.pointerId);
|
|
1147
|
+
const box = this.host.nativeElement.getBoundingClientRect();
|
|
1148
|
+
const rtl = starIsRtl(this.host.nativeElement);
|
|
1149
|
+
const move = (e) => {
|
|
1150
|
+
const ratio = this.layout() === "horizontal" ? (rtl ? box.right - e.clientX : e.clientX - box.left) / box.width : (e.clientY - box.top) / box.height;
|
|
1151
|
+
this.size.set(this.clamp(ratio * 100));
|
|
1152
|
+
};
|
|
1153
|
+
const stop = () => {
|
|
1154
|
+
gutter.removeEventListener("pointermove", move);
|
|
1155
|
+
gutter.removeEventListener("pointerup", stop);
|
|
1156
|
+
};
|
|
1157
|
+
gutter.addEventListener("pointermove", move);
|
|
1158
|
+
gutter.addEventListener("pointerup", stop);
|
|
1159
|
+
}
|
|
1160
|
+
onKeydown(event) {
|
|
1161
|
+
const horizontal = this.layout() === "horizontal";
|
|
1162
|
+
const flip = starIsRtl(this.host.nativeElement) ? -1 : 1;
|
|
1163
|
+
const delta = {
|
|
1164
|
+
ArrowLeft: horizontal ? -2 * flip : 0,
|
|
1165
|
+
ArrowRight: horizontal ? 2 * flip : 0,
|
|
1166
|
+
ArrowUp: horizontal ? 0 : -2,
|
|
1167
|
+
ArrowDown: horizontal ? 0 : 2
|
|
1168
|
+
}[event.key];
|
|
1169
|
+
if (delta) {
|
|
1170
|
+
event.preventDefault();
|
|
1171
|
+
this.size.set(this.clamp(this.size() + delta));
|
|
1172
|
+
} else if (event.key === "Home" || event.key === "End") {
|
|
1173
|
+
event.preventDefault();
|
|
1174
|
+
this.size.set(event.key === "Home" ? this.minSize() : 100 - this.minSize());
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1178
|
+
minVersion: "12.0.0",
|
|
1179
|
+
version: "22.2.6",
|
|
1180
|
+
ngImport: i0,
|
|
1181
|
+
type: StarSplitter,
|
|
1182
|
+
deps: [],
|
|
1183
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1184
|
+
});
|
|
1185
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1186
|
+
minVersion: "17.1.0",
|
|
1187
|
+
version: "22.2.6",
|
|
1188
|
+
type: StarSplitter,
|
|
1189
|
+
isStandalone: true,
|
|
1190
|
+
selector: "star-splitter",
|
|
1191
|
+
inputs: {
|
|
1192
|
+
layout: {
|
|
1193
|
+
classPropertyName: "layout",
|
|
1194
|
+
publicName: "layout",
|
|
1195
|
+
isSignal: true,
|
|
1196
|
+
isRequired: false,
|
|
1197
|
+
transformFunction: null
|
|
1198
|
+
},
|
|
1199
|
+
size: {
|
|
1200
|
+
classPropertyName: "size",
|
|
1201
|
+
publicName: "size",
|
|
1202
|
+
isSignal: true,
|
|
1203
|
+
isRequired: false,
|
|
1204
|
+
transformFunction: null
|
|
1205
|
+
},
|
|
1206
|
+
minSize: {
|
|
1207
|
+
classPropertyName: "minSize",
|
|
1208
|
+
publicName: "minSize",
|
|
1209
|
+
isSignal: true,
|
|
1210
|
+
isRequired: false,
|
|
1211
|
+
transformFunction: null
|
|
1212
|
+
},
|
|
1213
|
+
ariaLabel: {
|
|
1214
|
+
classPropertyName: "ariaLabel",
|
|
1215
|
+
publicName: "ariaLabel",
|
|
1216
|
+
isSignal: true,
|
|
1217
|
+
isRequired: false,
|
|
1218
|
+
transformFunction: null
|
|
1219
|
+
}
|
|
1220
|
+
},
|
|
1221
|
+
outputs: { size: "sizeChange" },
|
|
1222
|
+
host: { properties: {
|
|
1223
|
+
"class": "'star-splitter star-splitter--' + layout()",
|
|
1224
|
+
"style.--star-split": "size() + '%'"
|
|
1225
|
+
} },
|
|
1226
|
+
ngImport: i0,
|
|
1227
|
+
template: `
|
|
1228
|
+
<div class="star-splitter__pane"><ng-content select="[starSplitterStart]" /></div>
|
|
1229
|
+
<div
|
|
1230
|
+
class="star-splitter__gutter"
|
|
1231
|
+
role="separator"
|
|
1232
|
+
tabindex="0"
|
|
1233
|
+
[attr.aria-orientation]="layout() === 'horizontal' ? 'vertical' : 'horizontal'"
|
|
1234
|
+
[attr.aria-valuenow]="size()"
|
|
1235
|
+
[attr.aria-valuemin]="minSize()"
|
|
1236
|
+
[attr.aria-valuemax]="100 - minSize()"
|
|
1237
|
+
[attr.aria-label]="ariaLabel() ?? text.resizePanes"
|
|
1238
|
+
(pointerdown)="startDrag($event)"
|
|
1239
|
+
(keydown)="onKeydown($event)"
|
|
1240
|
+
>
|
|
1241
|
+
<span class="star-splitter__handle" aria-hidden="true"></span>
|
|
1242
|
+
</div>
|
|
1243
|
+
<div class="star-splitter__pane"><ng-content select="[starSplitterEnd]" /></div>
|
|
1244
|
+
`,
|
|
1245
|
+
isInline: true,
|
|
1246
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1247
|
+
});
|
|
1248
|
+
};
|
|
1249
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1250
|
+
minVersion: "12.0.0",
|
|
1251
|
+
version: "22.2.6",
|
|
1252
|
+
ngImport: i0,
|
|
1253
|
+
type: StarSplitter,
|
|
1254
|
+
decorators: [{
|
|
1255
|
+
type: Component,
|
|
1256
|
+
args: [{
|
|
1257
|
+
selector: "star-splitter",
|
|
1258
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1259
|
+
host: {
|
|
1260
|
+
"[class]": "'star-splitter star-splitter--' + layout()",
|
|
1261
|
+
"[style.--star-split]": "size() + '%'"
|
|
1262
|
+
},
|
|
1263
|
+
template: `
|
|
1264
|
+
<div class="star-splitter__pane"><ng-content select="[starSplitterStart]" /></div>
|
|
1265
|
+
<div
|
|
1266
|
+
class="star-splitter__gutter"
|
|
1267
|
+
role="separator"
|
|
1268
|
+
tabindex="0"
|
|
1269
|
+
[attr.aria-orientation]="layout() === 'horizontal' ? 'vertical' : 'horizontal'"
|
|
1270
|
+
[attr.aria-valuenow]="size()"
|
|
1271
|
+
[attr.aria-valuemin]="minSize()"
|
|
1272
|
+
[attr.aria-valuemax]="100 - minSize()"
|
|
1273
|
+
[attr.aria-label]="ariaLabel() ?? text.resizePanes"
|
|
1274
|
+
(pointerdown)="startDrag($event)"
|
|
1275
|
+
(keydown)="onKeydown($event)"
|
|
1276
|
+
>
|
|
1277
|
+
<span class="star-splitter__handle" aria-hidden="true"></span>
|
|
1278
|
+
</div>
|
|
1279
|
+
<div class="star-splitter__pane"><ng-content select="[starSplitterEnd]" /></div>
|
|
1280
|
+
`
|
|
1281
|
+
}]
|
|
1282
|
+
}],
|
|
1283
|
+
propDecorators: {
|
|
1284
|
+
layout: [{
|
|
1285
|
+
type: i0.Input,
|
|
1286
|
+
args: [{
|
|
1287
|
+
isSignal: true,
|
|
1288
|
+
alias: "layout",
|
|
1289
|
+
required: false
|
|
1290
|
+
}]
|
|
1291
|
+
}],
|
|
1292
|
+
size: [{
|
|
1293
|
+
type: i0.Input,
|
|
1294
|
+
args: [{
|
|
1295
|
+
isSignal: true,
|
|
1296
|
+
alias: "size",
|
|
1297
|
+
required: false
|
|
1298
|
+
}]
|
|
1299
|
+
}, {
|
|
1300
|
+
type: i0.Output,
|
|
1301
|
+
args: ["sizeChange"]
|
|
1302
|
+
}],
|
|
1303
|
+
minSize: [{
|
|
1304
|
+
type: i0.Input,
|
|
1305
|
+
args: [{
|
|
1306
|
+
isSignal: true,
|
|
1307
|
+
alias: "minSize",
|
|
1308
|
+
required: false
|
|
1309
|
+
}]
|
|
1310
|
+
}],
|
|
1311
|
+
ariaLabel: [{
|
|
1312
|
+
type: i0.Input,
|
|
1313
|
+
args: [{
|
|
1314
|
+
isSignal: true,
|
|
1315
|
+
alias: "ariaLabel",
|
|
1316
|
+
required: false
|
|
1317
|
+
}]
|
|
1318
|
+
}]
|
|
1319
|
+
}
|
|
1320
|
+
});
|
|
1321
|
+
var StarSpeedDial = class StarSpeedDial {
|
|
1322
|
+
text = inject(STAR_UI_TEXT);
|
|
1323
|
+
listId = inject(_IdGenerator).getId("star-speed-dial-");
|
|
1324
|
+
injector = inject(Injector);
|
|
1325
|
+
host = inject(ElementRef);
|
|
1326
|
+
items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
1327
|
+
direction = input("up", ...ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []);
|
|
1328
|
+
ariaLabel = input(null, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
1329
|
+
icon = input("ph-bold ph-plus", ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
|
|
1330
|
+
size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
1331
|
+
activeIndex = input(null, ...ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []);
|
|
1332
|
+
itemClick = output();
|
|
1333
|
+
defaultIcon = "ph-bold ph-plus";
|
|
1334
|
+
open = signal(false, ...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
|
|
1335
|
+
toggle(list) {
|
|
1336
|
+
this.open.update((open) => !open);
|
|
1337
|
+
if (this.open()) afterNextRender(() => list.querySelector("button")?.focus(), { injector: this.injector });
|
|
1338
|
+
}
|
|
1339
|
+
close(restoreFocus = false, fab) {
|
|
1340
|
+
if (!this.open()) return;
|
|
1341
|
+
this.open.set(false);
|
|
1342
|
+
if (restoreFocus) (fab ?? this.host.nativeElement.querySelector(".star-speed-dial__fab"))?.focus();
|
|
1343
|
+
}
|
|
1344
|
+
onArrow(event) {
|
|
1345
|
+
if (!this.open()) return;
|
|
1346
|
+
const rtl = starIsRtl(this.host.nativeElement);
|
|
1347
|
+
const direction = this.direction();
|
|
1348
|
+
const side = direction === "start" ? rtl ? "right" : "left" : direction === "end" ? rtl ? "left" : "right" : direction;
|
|
1349
|
+
const forward = {
|
|
1350
|
+
up: "ArrowUp",
|
|
1351
|
+
down: "ArrowDown",
|
|
1352
|
+
left: "ArrowLeft",
|
|
1353
|
+
right: "ArrowRight"
|
|
1354
|
+
}[side];
|
|
1355
|
+
const backward = {
|
|
1356
|
+
up: "ArrowDown",
|
|
1357
|
+
down: "ArrowUp",
|
|
1358
|
+
left: "ArrowRight",
|
|
1359
|
+
right: "ArrowLeft"
|
|
1360
|
+
}[side];
|
|
1361
|
+
if (event.key !== forward && event.key !== backward && event.key !== "Home" && event.key !== "End") return;
|
|
1362
|
+
const actions = [...this.host.nativeElement.querySelectorAll(".star-speed-dial__action:not(:disabled)")];
|
|
1363
|
+
if (!actions.length) return;
|
|
1364
|
+
event.preventDefault();
|
|
1365
|
+
const last = actions.length - 1;
|
|
1366
|
+
const current = actions.indexOf(this.host.nativeElement.ownerDocument.activeElement);
|
|
1367
|
+
let next;
|
|
1368
|
+
if (event.key === "Home") next = 0;
|
|
1369
|
+
else if (event.key === "End") next = last;
|
|
1370
|
+
else if (event.key === forward) next = current < 0 ? 0 : Math.min(last, current + 1);
|
|
1371
|
+
else next = current < 0 ? last : Math.max(0, current - 1);
|
|
1372
|
+
actions[next].focus();
|
|
1373
|
+
}
|
|
1374
|
+
run(item) {
|
|
1375
|
+
item.command?.(item);
|
|
1376
|
+
this.itemClick.emit(item);
|
|
1377
|
+
}
|
|
1378
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1379
|
+
minVersion: "12.0.0",
|
|
1380
|
+
version: "22.2.6",
|
|
1381
|
+
ngImport: i0,
|
|
1382
|
+
type: StarSpeedDial,
|
|
1383
|
+
deps: [],
|
|
1384
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1385
|
+
});
|
|
1386
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1387
|
+
minVersion: "17.0.0",
|
|
1388
|
+
version: "22.2.6",
|
|
1389
|
+
type: StarSpeedDial,
|
|
1390
|
+
isStandalone: true,
|
|
1391
|
+
selector: "star-speed-dial",
|
|
1392
|
+
inputs: {
|
|
1393
|
+
items: {
|
|
1394
|
+
classPropertyName: "items",
|
|
1395
|
+
publicName: "items",
|
|
1396
|
+
isSignal: true,
|
|
1397
|
+
isRequired: false,
|
|
1398
|
+
transformFunction: null
|
|
1399
|
+
},
|
|
1400
|
+
direction: {
|
|
1401
|
+
classPropertyName: "direction",
|
|
1402
|
+
publicName: "direction",
|
|
1403
|
+
isSignal: true,
|
|
1404
|
+
isRequired: false,
|
|
1405
|
+
transformFunction: null
|
|
1406
|
+
},
|
|
1407
|
+
ariaLabel: {
|
|
1408
|
+
classPropertyName: "ariaLabel",
|
|
1409
|
+
publicName: "ariaLabel",
|
|
1410
|
+
isSignal: true,
|
|
1411
|
+
isRequired: false,
|
|
1412
|
+
transformFunction: null
|
|
1413
|
+
},
|
|
1414
|
+
icon: {
|
|
1415
|
+
classPropertyName: "icon",
|
|
1416
|
+
publicName: "icon",
|
|
1417
|
+
isSignal: true,
|
|
1418
|
+
isRequired: false,
|
|
1419
|
+
transformFunction: null
|
|
1420
|
+
},
|
|
1421
|
+
size: {
|
|
1422
|
+
classPropertyName: "size",
|
|
1423
|
+
publicName: "size",
|
|
1424
|
+
isSignal: true,
|
|
1425
|
+
isRequired: false,
|
|
1426
|
+
transformFunction: null
|
|
1427
|
+
},
|
|
1428
|
+
activeIndex: {
|
|
1429
|
+
classPropertyName: "activeIndex",
|
|
1430
|
+
publicName: "activeIndex",
|
|
1431
|
+
isSignal: true,
|
|
1432
|
+
isRequired: false,
|
|
1433
|
+
transformFunction: null
|
|
1434
|
+
}
|
|
1435
|
+
},
|
|
1436
|
+
outputs: { itemClick: "itemClick" },
|
|
1437
|
+
host: {
|
|
1438
|
+
listeners: {
|
|
1439
|
+
"keydown.escape": "close(true)",
|
|
1440
|
+
"keydown": "onArrow($event)"
|
|
1441
|
+
},
|
|
1442
|
+
properties: {
|
|
1443
|
+
"class": "'star-speed-dial star-speed-dial--' + direction()",
|
|
1444
|
+
"class.star-speed-dial--open": "open()",
|
|
1445
|
+
"class.star-speed-dial--sm": "size() === 'sm'",
|
|
1446
|
+
"class.star-speed-dial--static": "icon() !== defaultIcon"
|
|
1447
|
+
}
|
|
1448
|
+
},
|
|
1449
|
+
ngImport: i0,
|
|
1450
|
+
template: `
|
|
1451
|
+
<button
|
|
1452
|
+
#fab
|
|
1453
|
+
type="button"
|
|
1454
|
+
class="star-speed-dial__fab"
|
|
1455
|
+
aria-haspopup="true"
|
|
1456
|
+
[attr.aria-expanded]="open()"
|
|
1457
|
+
[attr.aria-controls]="listId"
|
|
1458
|
+
[attr.aria-label]="ariaLabel() ?? text.actions"
|
|
1459
|
+
(click)="toggle(list)"
|
|
1460
|
+
>
|
|
1461
|
+
<i [class]="icon()" aria-hidden="true"></i>
|
|
1462
|
+
</button>
|
|
1463
|
+
<ul #list class="star-speed-dial__list" [id]="listId" [attr.inert]="open() ? null : ''">
|
|
1464
|
+
@for (item of items(); track $index; let i = $index) {
|
|
1465
|
+
<li [style.--star-i]="i">
|
|
1466
|
+
<button
|
|
1467
|
+
type="button"
|
|
1468
|
+
class="star-speed-dial__action"
|
|
1469
|
+
[class.star-speed-dial__action--active]="i === activeIndex()"
|
|
1470
|
+
[attr.aria-pressed]="activeIndex() === null ? null : i === activeIndex()"
|
|
1471
|
+
[attr.aria-label]="item.label"
|
|
1472
|
+
[attr.title]="item.label"
|
|
1473
|
+
[disabled]="item.disabled"
|
|
1474
|
+
(click)="run(item); close(true, fab)"
|
|
1475
|
+
>
|
|
1476
|
+
<i [class]="item.icon ?? 'ph-bold ph-circle'" aria-hidden="true"></i>
|
|
1477
|
+
</button>
|
|
1478
|
+
</li>
|
|
1479
|
+
}
|
|
1480
|
+
</ul>
|
|
1481
|
+
`,
|
|
1482
|
+
isInline: true,
|
|
1483
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1484
|
+
});
|
|
1485
|
+
};
|
|
1486
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1487
|
+
minVersion: "12.0.0",
|
|
1488
|
+
version: "22.2.6",
|
|
1489
|
+
ngImport: i0,
|
|
1490
|
+
type: StarSpeedDial,
|
|
1491
|
+
decorators: [{
|
|
1492
|
+
type: Component,
|
|
1493
|
+
args: [{
|
|
1494
|
+
selector: "star-speed-dial",
|
|
1495
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1496
|
+
host: {
|
|
1497
|
+
"[class]": "'star-speed-dial star-speed-dial--' + direction()",
|
|
1498
|
+
"[class.star-speed-dial--open]": "open()",
|
|
1499
|
+
"[class.star-speed-dial--sm]": "size() === 'sm'",
|
|
1500
|
+
"[class.star-speed-dial--static]": "icon() !== defaultIcon",
|
|
1501
|
+
"(keydown.escape)": "close(true)",
|
|
1502
|
+
"(keydown)": "onArrow($event)"
|
|
1503
|
+
},
|
|
1504
|
+
template: `
|
|
1505
|
+
<button
|
|
1506
|
+
#fab
|
|
1507
|
+
type="button"
|
|
1508
|
+
class="star-speed-dial__fab"
|
|
1509
|
+
aria-haspopup="true"
|
|
1510
|
+
[attr.aria-expanded]="open()"
|
|
1511
|
+
[attr.aria-controls]="listId"
|
|
1512
|
+
[attr.aria-label]="ariaLabel() ?? text.actions"
|
|
1513
|
+
(click)="toggle(list)"
|
|
1514
|
+
>
|
|
1515
|
+
<i [class]="icon()" aria-hidden="true"></i>
|
|
1516
|
+
</button>
|
|
1517
|
+
<ul #list class="star-speed-dial__list" [id]="listId" [attr.inert]="open() ? null : ''">
|
|
1518
|
+
@for (item of items(); track $index; let i = $index) {
|
|
1519
|
+
<li [style.--star-i]="i">
|
|
1520
|
+
<button
|
|
1521
|
+
type="button"
|
|
1522
|
+
class="star-speed-dial__action"
|
|
1523
|
+
[class.star-speed-dial__action--active]="i === activeIndex()"
|
|
1524
|
+
[attr.aria-pressed]="activeIndex() === null ? null : i === activeIndex()"
|
|
1525
|
+
[attr.aria-label]="item.label"
|
|
1526
|
+
[attr.title]="item.label"
|
|
1527
|
+
[disabled]="item.disabled"
|
|
1528
|
+
(click)="run(item); close(true, fab)"
|
|
1529
|
+
>
|
|
1530
|
+
<i [class]="item.icon ?? 'ph-bold ph-circle'" aria-hidden="true"></i>
|
|
1531
|
+
</button>
|
|
1532
|
+
</li>
|
|
1533
|
+
}
|
|
1534
|
+
</ul>
|
|
1535
|
+
`
|
|
1536
|
+
}]
|
|
1537
|
+
}],
|
|
1538
|
+
propDecorators: {
|
|
1539
|
+
items: [{
|
|
1540
|
+
type: i0.Input,
|
|
1541
|
+
args: [{
|
|
1542
|
+
isSignal: true,
|
|
1543
|
+
alias: "items",
|
|
1544
|
+
required: false
|
|
1545
|
+
}]
|
|
1546
|
+
}],
|
|
1547
|
+
direction: [{
|
|
1548
|
+
type: i0.Input,
|
|
1549
|
+
args: [{
|
|
1550
|
+
isSignal: true,
|
|
1551
|
+
alias: "direction",
|
|
1552
|
+
required: false
|
|
1553
|
+
}]
|
|
1554
|
+
}],
|
|
1555
|
+
ariaLabel: [{
|
|
1556
|
+
type: i0.Input,
|
|
1557
|
+
args: [{
|
|
1558
|
+
isSignal: true,
|
|
1559
|
+
alias: "ariaLabel",
|
|
1560
|
+
required: false
|
|
1561
|
+
}]
|
|
1562
|
+
}],
|
|
1563
|
+
icon: [{
|
|
1564
|
+
type: i0.Input,
|
|
1565
|
+
args: [{
|
|
1566
|
+
isSignal: true,
|
|
1567
|
+
alias: "icon",
|
|
1568
|
+
required: false
|
|
1569
|
+
}]
|
|
1570
|
+
}],
|
|
1571
|
+
size: [{
|
|
1572
|
+
type: i0.Input,
|
|
1573
|
+
args: [{
|
|
1574
|
+
isSignal: true,
|
|
1575
|
+
alias: "size",
|
|
1576
|
+
required: false
|
|
1577
|
+
}]
|
|
1578
|
+
}],
|
|
1579
|
+
activeIndex: [{
|
|
1580
|
+
type: i0.Input,
|
|
1581
|
+
args: [{
|
|
1582
|
+
isSignal: true,
|
|
1583
|
+
alias: "activeIndex",
|
|
1584
|
+
required: false
|
|
1585
|
+
}]
|
|
1586
|
+
}],
|
|
1587
|
+
itemClick: [{
|
|
1588
|
+
type: i0.Output,
|
|
1589
|
+
args: ["itemClick"]
|
|
1590
|
+
}]
|
|
1591
|
+
}
|
|
1592
|
+
});
|
|
1593
|
+
var StarDock = class StarDock {
|
|
1594
|
+
text = inject(STAR_UI_TEXT);
|
|
1595
|
+
items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
1596
|
+
position = input("bottom", ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
|
|
1597
|
+
ariaLabel = input(null, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
1598
|
+
itemClick = output();
|
|
1599
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1600
|
+
minVersion: "12.0.0",
|
|
1601
|
+
version: "22.2.6",
|
|
1602
|
+
ngImport: i0,
|
|
1603
|
+
type: StarDock,
|
|
1604
|
+
deps: [],
|
|
1605
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1606
|
+
});
|
|
1607
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1608
|
+
minVersion: "17.0.0",
|
|
1609
|
+
version: "22.2.6",
|
|
1610
|
+
type: StarDock,
|
|
1611
|
+
isStandalone: true,
|
|
1612
|
+
selector: "star-dock",
|
|
1613
|
+
inputs: {
|
|
1614
|
+
items: {
|
|
1615
|
+
classPropertyName: "items",
|
|
1616
|
+
publicName: "items",
|
|
1617
|
+
isSignal: true,
|
|
1618
|
+
isRequired: false,
|
|
1619
|
+
transformFunction: null
|
|
1620
|
+
},
|
|
1621
|
+
position: {
|
|
1622
|
+
classPropertyName: "position",
|
|
1623
|
+
publicName: "position",
|
|
1624
|
+
isSignal: true,
|
|
1625
|
+
isRequired: false,
|
|
1626
|
+
transformFunction: null
|
|
1627
|
+
},
|
|
1628
|
+
ariaLabel: {
|
|
1629
|
+
classPropertyName: "ariaLabel",
|
|
1630
|
+
publicName: "ariaLabel",
|
|
1631
|
+
isSignal: true,
|
|
1632
|
+
isRequired: false,
|
|
1633
|
+
transformFunction: null
|
|
1634
|
+
}
|
|
1635
|
+
},
|
|
1636
|
+
outputs: { itemClick: "itemClick" },
|
|
1637
|
+
host: { properties: { "class": "'star-dock star-dock--' + position()" } },
|
|
1638
|
+
ngImport: i0,
|
|
1639
|
+
template: `
|
|
1640
|
+
<nav [attr.aria-label]="ariaLabel() ?? text.dock">
|
|
1641
|
+
<ul class="star-dock__list">
|
|
1642
|
+
@for (item of items(); track $index) {
|
|
1643
|
+
<li>
|
|
1644
|
+
<button
|
|
1645
|
+
type="button"
|
|
1646
|
+
class="star-dock__item"
|
|
1647
|
+
[attr.aria-label]="item.label"
|
|
1648
|
+
[attr.title]="item.label"
|
|
1649
|
+
[disabled]="item.disabled"
|
|
1650
|
+
(click)="item.command?.(item); itemClick.emit(item)"
|
|
1651
|
+
>
|
|
1652
|
+
<i [class]="item.icon ?? 'ph-bold ph-app-window'" aria-hidden="true"></i>
|
|
1653
|
+
</button>
|
|
1654
|
+
</li>
|
|
1655
|
+
}
|
|
1656
|
+
</ul>
|
|
1657
|
+
</nav>
|
|
1658
|
+
`,
|
|
1659
|
+
isInline: true,
|
|
1660
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1661
|
+
});
|
|
1662
|
+
};
|
|
1663
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1664
|
+
minVersion: "12.0.0",
|
|
1665
|
+
version: "22.2.6",
|
|
1666
|
+
ngImport: i0,
|
|
1667
|
+
type: StarDock,
|
|
1668
|
+
decorators: [{
|
|
1669
|
+
type: Component,
|
|
1670
|
+
args: [{
|
|
1671
|
+
selector: "star-dock",
|
|
1672
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1673
|
+
host: { "[class]": "'star-dock star-dock--' + position()" },
|
|
1674
|
+
template: `
|
|
1675
|
+
<nav [attr.aria-label]="ariaLabel() ?? text.dock">
|
|
1676
|
+
<ul class="star-dock__list">
|
|
1677
|
+
@for (item of items(); track $index) {
|
|
1678
|
+
<li>
|
|
1679
|
+
<button
|
|
1680
|
+
type="button"
|
|
1681
|
+
class="star-dock__item"
|
|
1682
|
+
[attr.aria-label]="item.label"
|
|
1683
|
+
[attr.title]="item.label"
|
|
1684
|
+
[disabled]="item.disabled"
|
|
1685
|
+
(click)="item.command?.(item); itemClick.emit(item)"
|
|
1686
|
+
>
|
|
1687
|
+
<i [class]="item.icon ?? 'ph-bold ph-app-window'" aria-hidden="true"></i>
|
|
1688
|
+
</button>
|
|
1689
|
+
</li>
|
|
1690
|
+
}
|
|
1691
|
+
</ul>
|
|
1692
|
+
</nav>
|
|
1693
|
+
`
|
|
1694
|
+
}]
|
|
1695
|
+
}],
|
|
1696
|
+
propDecorators: {
|
|
1697
|
+
items: [{
|
|
1698
|
+
type: i0.Input,
|
|
1699
|
+
args: [{
|
|
1700
|
+
isSignal: true,
|
|
1701
|
+
alias: "items",
|
|
1702
|
+
required: false
|
|
1703
|
+
}]
|
|
1704
|
+
}],
|
|
1705
|
+
position: [{
|
|
1706
|
+
type: i0.Input,
|
|
1707
|
+
args: [{
|
|
1708
|
+
isSignal: true,
|
|
1709
|
+
alias: "position",
|
|
1710
|
+
required: false
|
|
1711
|
+
}]
|
|
1712
|
+
}],
|
|
1713
|
+
ariaLabel: [{
|
|
1714
|
+
type: i0.Input,
|
|
1715
|
+
args: [{
|
|
1716
|
+
isSignal: true,
|
|
1717
|
+
alias: "ariaLabel",
|
|
1718
|
+
required: false
|
|
1719
|
+
}]
|
|
1720
|
+
}],
|
|
1721
|
+
itemClick: [{
|
|
1722
|
+
type: i0.Output,
|
|
1723
|
+
args: ["itemClick"]
|
|
1724
|
+
}]
|
|
1725
|
+
}
|
|
1726
|
+
});
|
|
1727
|
+
var StarScrollTop = class StarScrollTop {
|
|
1728
|
+
text = inject(STAR_UI_TEXT);
|
|
1729
|
+
threshold = input(400, ...ngDevMode ? [{ debugName: "threshold" }] : /* istanbul ignore next */ []);
|
|
1730
|
+
target = input(null, ...ngDevMode ? [{ debugName: "target" }] : /* istanbul ignore next */ []);
|
|
1731
|
+
visible = signal(false, ...ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []);
|
|
1732
|
+
constructor() {
|
|
1733
|
+
const onScroll = (event) => {
|
|
1734
|
+
const el = this.target();
|
|
1735
|
+
if (el && event.target !== el) return;
|
|
1736
|
+
const top = el ? el.scrollTop : document.scrollingElement?.scrollTop ?? 0;
|
|
1737
|
+
this.visible.set(top > this.threshold());
|
|
1738
|
+
};
|
|
1739
|
+
document.addEventListener("scroll", onScroll, {
|
|
1740
|
+
capture: true,
|
|
1741
|
+
passive: true
|
|
1742
|
+
});
|
|
1743
|
+
inject(DestroyRef).onDestroy(() => document.removeEventListener("scroll", onScroll, { capture: true }));
|
|
1744
|
+
}
|
|
1745
|
+
toTop() {
|
|
1746
|
+
const reduce = matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
1747
|
+
(this.target() ?? document.scrollingElement ?? document.documentElement).scrollTo?.({
|
|
1748
|
+
top: 0,
|
|
1749
|
+
behavior: reduce ? "auto" : "smooth"
|
|
1750
|
+
});
|
|
1751
|
+
}
|
|
1752
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1753
|
+
minVersion: "12.0.0",
|
|
1754
|
+
version: "22.2.6",
|
|
1755
|
+
ngImport: i0,
|
|
1756
|
+
type: StarScrollTop,
|
|
1757
|
+
deps: [],
|
|
1758
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1759
|
+
});
|
|
1760
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1761
|
+
minVersion: "17.1.0",
|
|
1762
|
+
version: "22.2.6",
|
|
1763
|
+
type: StarScrollTop,
|
|
1764
|
+
isStandalone: true,
|
|
1765
|
+
selector: "star-scroll-top",
|
|
1766
|
+
inputs: {
|
|
1767
|
+
threshold: {
|
|
1768
|
+
classPropertyName: "threshold",
|
|
1769
|
+
publicName: "threshold",
|
|
1770
|
+
isSignal: true,
|
|
1771
|
+
isRequired: false,
|
|
1772
|
+
transformFunction: null
|
|
1773
|
+
},
|
|
1774
|
+
target: {
|
|
1775
|
+
classPropertyName: "target",
|
|
1776
|
+
publicName: "target",
|
|
1777
|
+
isSignal: true,
|
|
1778
|
+
isRequired: false,
|
|
1779
|
+
transformFunction: null
|
|
1780
|
+
}
|
|
1781
|
+
},
|
|
1782
|
+
host: {
|
|
1783
|
+
properties: { "class.star-scroll-top--visible": "visible()" },
|
|
1784
|
+
classAttribute: "star-scroll-top"
|
|
1785
|
+
},
|
|
1786
|
+
ngImport: i0,
|
|
1787
|
+
template: `
|
|
1788
|
+
<button
|
|
1789
|
+
type="button"
|
|
1790
|
+
class="star-scroll-top__btn"
|
|
1791
|
+
[attr.aria-label]="text.scrollToTop"
|
|
1792
|
+
[attr.tabindex]="visible() ? 0 : -1"
|
|
1793
|
+
(click)="toTop()"
|
|
1794
|
+
>
|
|
1795
|
+
<i class="ph-bold ph-arrow-up" aria-hidden="true"></i>
|
|
1796
|
+
</button>
|
|
1797
|
+
`,
|
|
1798
|
+
isInline: true,
|
|
1799
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1800
|
+
});
|
|
1801
|
+
};
|
|
1802
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1803
|
+
minVersion: "12.0.0",
|
|
1804
|
+
version: "22.2.6",
|
|
1805
|
+
ngImport: i0,
|
|
1806
|
+
type: StarScrollTop,
|
|
1807
|
+
decorators: [{
|
|
1808
|
+
type: Component,
|
|
1809
|
+
args: [{
|
|
1810
|
+
selector: "star-scroll-top",
|
|
1811
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1812
|
+
host: {
|
|
1813
|
+
class: "star-scroll-top",
|
|
1814
|
+
"[class.star-scroll-top--visible]": "visible()"
|
|
1815
|
+
},
|
|
1816
|
+
template: `
|
|
1817
|
+
<button
|
|
1818
|
+
type="button"
|
|
1819
|
+
class="star-scroll-top__btn"
|
|
1820
|
+
[attr.aria-label]="text.scrollToTop"
|
|
1821
|
+
[attr.tabindex]="visible() ? 0 : -1"
|
|
1822
|
+
(click)="toTop()"
|
|
1823
|
+
>
|
|
1824
|
+
<i class="ph-bold ph-arrow-up" aria-hidden="true"></i>
|
|
1825
|
+
</button>
|
|
1826
|
+
`
|
|
1827
|
+
}]
|
|
1828
|
+
}],
|
|
1829
|
+
ctorParameters: () => [],
|
|
1830
|
+
propDecorators: {
|
|
1831
|
+
threshold: [{
|
|
1832
|
+
type: i0.Input,
|
|
1833
|
+
args: [{
|
|
1834
|
+
isSignal: true,
|
|
1835
|
+
alias: "threshold",
|
|
1836
|
+
required: false
|
|
1837
|
+
}]
|
|
1838
|
+
}],
|
|
1839
|
+
target: [{
|
|
1840
|
+
type: i0.Input,
|
|
1841
|
+
args: [{
|
|
1842
|
+
isSignal: true,
|
|
1843
|
+
alias: "target",
|
|
1844
|
+
required: false
|
|
1845
|
+
}]
|
|
1846
|
+
}]
|
|
1847
|
+
}
|
|
1848
|
+
});
|
|
1849
|
+
var StarBlockUi = class StarBlockUi {
|
|
1850
|
+
blocked = input(false, {
|
|
1851
|
+
...ngDevMode ? { debugName: "blocked" } : /* istanbul ignore next */ {},
|
|
1852
|
+
transform: booleanAttribute
|
|
1853
|
+
});
|
|
1854
|
+
message = input("", ...ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []);
|
|
1855
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1856
|
+
minVersion: "12.0.0",
|
|
1857
|
+
version: "22.2.6",
|
|
1858
|
+
ngImport: i0,
|
|
1859
|
+
type: StarBlockUi,
|
|
1860
|
+
deps: [],
|
|
1861
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1862
|
+
});
|
|
1863
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1864
|
+
minVersion: "17.0.0",
|
|
1865
|
+
version: "22.2.6",
|
|
1866
|
+
type: StarBlockUi,
|
|
1867
|
+
isStandalone: true,
|
|
1868
|
+
selector: "star-block-ui",
|
|
1869
|
+
inputs: {
|
|
1870
|
+
blocked: {
|
|
1871
|
+
classPropertyName: "blocked",
|
|
1872
|
+
publicName: "blocked",
|
|
1873
|
+
isSignal: true,
|
|
1874
|
+
isRequired: false,
|
|
1875
|
+
transformFunction: null
|
|
1876
|
+
},
|
|
1877
|
+
message: {
|
|
1878
|
+
classPropertyName: "message",
|
|
1879
|
+
publicName: "message",
|
|
1880
|
+
isSignal: true,
|
|
1881
|
+
isRequired: false,
|
|
1882
|
+
transformFunction: null
|
|
1883
|
+
}
|
|
1884
|
+
},
|
|
1885
|
+
host: {
|
|
1886
|
+
properties: { "attr.aria-busy": "blocked() || null" },
|
|
1887
|
+
classAttribute: "star-block-ui"
|
|
1888
|
+
},
|
|
1889
|
+
ngImport: i0,
|
|
1890
|
+
template: `
|
|
1891
|
+
<div class="star-block-ui__content" [attr.inert]="blocked() ? '' : null"><ng-content /></div>
|
|
1892
|
+
@if (blocked()) {
|
|
1893
|
+
<div class="star-block-ui__mask">
|
|
1894
|
+
<star-spinner size="2rem" [ariaLabel]="message()" />
|
|
1895
|
+
@if (message()) {
|
|
1896
|
+
<span class="star-block-ui__message">{{ message() }}</span>
|
|
1897
|
+
}
|
|
1898
|
+
</div>
|
|
1899
|
+
}
|
|
1900
|
+
`,
|
|
1901
|
+
isInline: true,
|
|
1902
|
+
dependencies: [{
|
|
1903
|
+
kind: "component",
|
|
1904
|
+
type: StarSpinner,
|
|
1905
|
+
selector: "star-spinner",
|
|
1906
|
+
inputs: [
|
|
1907
|
+
"size",
|
|
1908
|
+
"strokeWidth",
|
|
1909
|
+
"ariaLabel"
|
|
1910
|
+
]
|
|
1911
|
+
}],
|
|
1912
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1913
|
+
});
|
|
1914
|
+
};
|
|
1915
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1916
|
+
minVersion: "12.0.0",
|
|
1917
|
+
version: "22.2.6",
|
|
1918
|
+
ngImport: i0,
|
|
1919
|
+
type: StarBlockUi,
|
|
1920
|
+
decorators: [{
|
|
1921
|
+
type: Component,
|
|
1922
|
+
args: [{
|
|
1923
|
+
selector: "star-block-ui",
|
|
1924
|
+
imports: [StarSpinner],
|
|
1925
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1926
|
+
host: {
|
|
1927
|
+
class: "star-block-ui",
|
|
1928
|
+
"[attr.aria-busy]": "blocked() || null"
|
|
1929
|
+
},
|
|
1930
|
+
template: `
|
|
1931
|
+
<div class="star-block-ui__content" [attr.inert]="blocked() ? '' : null"><ng-content /></div>
|
|
1932
|
+
@if (blocked()) {
|
|
1933
|
+
<div class="star-block-ui__mask">
|
|
1934
|
+
<star-spinner size="2rem" [ariaLabel]="message()" />
|
|
1935
|
+
@if (message()) {
|
|
1936
|
+
<span class="star-block-ui__message">{{ message() }}</span>
|
|
1937
|
+
}
|
|
1938
|
+
</div>
|
|
1939
|
+
}
|
|
1940
|
+
`
|
|
1941
|
+
}]
|
|
1942
|
+
}],
|
|
1943
|
+
propDecorators: {
|
|
1944
|
+
blocked: [{
|
|
1945
|
+
type: i0.Input,
|
|
1946
|
+
args: [{
|
|
1947
|
+
isSignal: true,
|
|
1948
|
+
alias: "blocked",
|
|
1949
|
+
required: false
|
|
1950
|
+
}]
|
|
1951
|
+
}],
|
|
1952
|
+
message: [{
|
|
1953
|
+
type: i0.Input,
|
|
1954
|
+
args: [{
|
|
1955
|
+
isSignal: true,
|
|
1956
|
+
alias: "message",
|
|
1957
|
+
required: false
|
|
1958
|
+
}]
|
|
1959
|
+
}]
|
|
1960
|
+
}
|
|
1961
|
+
});
|
|
1962
|
+
var StarMeterGroup = class StarMeterGroup {
|
|
1963
|
+
text = inject(STAR_UI_TEXT);
|
|
1964
|
+
items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
1965
|
+
max = input(null, ...ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []);
|
|
1966
|
+
unit = input("", ...ngDevMode ? [{ debugName: "unit" }] : /* istanbul ignore next */ []);
|
|
1967
|
+
ariaLabel = input(null, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
1968
|
+
total = computed(() => this.max() ?? (this.items().reduce((sum, item) => sum + item.value, 0) || 1), ...ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []);
|
|
1969
|
+
color(index) {
|
|
1970
|
+
return `var(--star-chart-${index % 8 + 1})`;
|
|
1971
|
+
}
|
|
1972
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1973
|
+
minVersion: "12.0.0",
|
|
1974
|
+
version: "22.2.6",
|
|
1975
|
+
ngImport: i0,
|
|
1976
|
+
type: StarMeterGroup,
|
|
1977
|
+
deps: [],
|
|
1978
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1979
|
+
});
|
|
1980
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1981
|
+
minVersion: "17.0.0",
|
|
1982
|
+
version: "22.2.6",
|
|
1983
|
+
type: StarMeterGroup,
|
|
1984
|
+
isStandalone: true,
|
|
1985
|
+
selector: "star-meter-group",
|
|
1986
|
+
inputs: {
|
|
1987
|
+
items: {
|
|
1988
|
+
classPropertyName: "items",
|
|
1989
|
+
publicName: "items",
|
|
1990
|
+
isSignal: true,
|
|
1991
|
+
isRequired: false,
|
|
1992
|
+
transformFunction: null
|
|
1993
|
+
},
|
|
1994
|
+
max: {
|
|
1995
|
+
classPropertyName: "max",
|
|
1996
|
+
publicName: "max",
|
|
1997
|
+
isSignal: true,
|
|
1998
|
+
isRequired: false,
|
|
1999
|
+
transformFunction: null
|
|
2000
|
+
},
|
|
2001
|
+
unit: {
|
|
2002
|
+
classPropertyName: "unit",
|
|
2003
|
+
publicName: "unit",
|
|
2004
|
+
isSignal: true,
|
|
2005
|
+
isRequired: false,
|
|
2006
|
+
transformFunction: null
|
|
2007
|
+
},
|
|
2008
|
+
ariaLabel: {
|
|
2009
|
+
classPropertyName: "ariaLabel",
|
|
2010
|
+
publicName: "ariaLabel",
|
|
2011
|
+
isSignal: true,
|
|
2012
|
+
isRequired: false,
|
|
2013
|
+
transformFunction: null
|
|
2014
|
+
}
|
|
2015
|
+
},
|
|
2016
|
+
host: {
|
|
2017
|
+
attributes: { "role": "group" },
|
|
2018
|
+
properties: { "attr.aria-label": "ariaLabel()" },
|
|
2019
|
+
classAttribute: "star-meter-group"
|
|
2020
|
+
},
|
|
2021
|
+
ngImport: i0,
|
|
2022
|
+
template: `
|
|
2023
|
+
<div class="star-meter-group__bar">
|
|
2024
|
+
@for (item of items(); track item.label; let i = $index) {
|
|
2025
|
+
<span
|
|
2026
|
+
class="star-meter-group__part"
|
|
2027
|
+
role="meter"
|
|
2028
|
+
[attr.aria-label]="item.label"
|
|
2029
|
+
aria-valuemin="0"
|
|
2030
|
+
[attr.aria-valuemax]="total()"
|
|
2031
|
+
[attr.aria-valuenow]="item.value"
|
|
2032
|
+
[attr.aria-valuetext]="
|
|
2033
|
+
text.meterValue(item.value + (unit() ? ' ' + unit() : ''), total())
|
|
2034
|
+
"
|
|
2035
|
+
[style.width.%]="(item.value / total()) * 100"
|
|
2036
|
+
[style.background]="color(i)"
|
|
2037
|
+
></span>
|
|
2038
|
+
}
|
|
2039
|
+
</div>
|
|
2040
|
+
<ul class="star-meter-group__legend" aria-hidden="true">
|
|
2041
|
+
@for (item of items(); track item.label; let i = $index) {
|
|
2042
|
+
<li>
|
|
2043
|
+
<span class="star-chart__swatch" [style.background]="color(i)"></span>
|
|
2044
|
+
{{ item.label }} <strong>{{ item.value }}{{ unit() ? ' ' + unit() : '' }}</strong>
|
|
2045
|
+
</li>
|
|
2046
|
+
}
|
|
2047
|
+
</ul>
|
|
2048
|
+
`,
|
|
2049
|
+
isInline: true,
|
|
2050
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
2051
|
+
});
|
|
2052
|
+
};
|
|
2053
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2054
|
+
minVersion: "12.0.0",
|
|
2055
|
+
version: "22.2.6",
|
|
2056
|
+
ngImport: i0,
|
|
2057
|
+
type: StarMeterGroup,
|
|
2058
|
+
decorators: [{
|
|
2059
|
+
type: Component,
|
|
2060
|
+
args: [{
|
|
2061
|
+
selector: "star-meter-group",
|
|
2062
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2063
|
+
host: {
|
|
2064
|
+
class: "star-meter-group",
|
|
2065
|
+
role: "group",
|
|
2066
|
+
"[attr.aria-label]": "ariaLabel()"
|
|
2067
|
+
},
|
|
2068
|
+
template: `
|
|
2069
|
+
<div class="star-meter-group__bar">
|
|
2070
|
+
@for (item of items(); track item.label; let i = $index) {
|
|
2071
|
+
<span
|
|
2072
|
+
class="star-meter-group__part"
|
|
2073
|
+
role="meter"
|
|
2074
|
+
[attr.aria-label]="item.label"
|
|
2075
|
+
aria-valuemin="0"
|
|
2076
|
+
[attr.aria-valuemax]="total()"
|
|
2077
|
+
[attr.aria-valuenow]="item.value"
|
|
2078
|
+
[attr.aria-valuetext]="
|
|
2079
|
+
text.meterValue(item.value + (unit() ? ' ' + unit() : ''), total())
|
|
2080
|
+
"
|
|
2081
|
+
[style.width.%]="(item.value / total()) * 100"
|
|
2082
|
+
[style.background]="color(i)"
|
|
2083
|
+
></span>
|
|
2084
|
+
}
|
|
2085
|
+
</div>
|
|
2086
|
+
<ul class="star-meter-group__legend" aria-hidden="true">
|
|
2087
|
+
@for (item of items(); track item.label; let i = $index) {
|
|
2088
|
+
<li>
|
|
2089
|
+
<span class="star-chart__swatch" [style.background]="color(i)"></span>
|
|
2090
|
+
{{ item.label }} <strong>{{ item.value }}{{ unit() ? ' ' + unit() : '' }}</strong>
|
|
2091
|
+
</li>
|
|
2092
|
+
}
|
|
2093
|
+
</ul>
|
|
2094
|
+
`
|
|
2095
|
+
}]
|
|
2096
|
+
}],
|
|
2097
|
+
propDecorators: {
|
|
2098
|
+
items: [{
|
|
2099
|
+
type: i0.Input,
|
|
2100
|
+
args: [{
|
|
2101
|
+
isSignal: true,
|
|
2102
|
+
alias: "items",
|
|
2103
|
+
required: false
|
|
2104
|
+
}]
|
|
2105
|
+
}],
|
|
2106
|
+
max: [{
|
|
2107
|
+
type: i0.Input,
|
|
2108
|
+
args: [{
|
|
2109
|
+
isSignal: true,
|
|
2110
|
+
alias: "max",
|
|
2111
|
+
required: false
|
|
2112
|
+
}]
|
|
2113
|
+
}],
|
|
2114
|
+
unit: [{
|
|
2115
|
+
type: i0.Input,
|
|
2116
|
+
args: [{
|
|
2117
|
+
isSignal: true,
|
|
2118
|
+
alias: "unit",
|
|
2119
|
+
required: false
|
|
2120
|
+
}]
|
|
2121
|
+
}],
|
|
2122
|
+
ariaLabel: [{
|
|
2123
|
+
type: i0.Input,
|
|
2124
|
+
args: [{
|
|
2125
|
+
isSignal: true,
|
|
2126
|
+
alias: "ariaLabel",
|
|
2127
|
+
required: false
|
|
2128
|
+
}]
|
|
2129
|
+
}]
|
|
2130
|
+
}
|
|
2131
|
+
});
|
|
2132
|
+
export { StarAnimateOnScroll, StarBlockUi, StarDock, StarFloatLabel, StarFocusTrap, StarImageCompare, StarInplace, StarInplaceContent, StarInplaceDisplay, StarMeterGroup, StarRipple, StarScrollPanel, StarScrollTop, StarSpeedDial, StarSplitter, StarTerminal };
|
|
2133
|
+
|
|
2134
|
+
//# sourceMappingURL=star-ng-ui-utility.mjs.map
|