@star-ng/ui 0.0.0-stage → 0.2.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 +162 -2
- 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 +786 -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 +484 -0
- package/fesm2022/star-ng-ui-core.mjs.map +1 -0
- package/fesm2022/star-ng-ui-data-display.mjs +1870 -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 +886 -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 +2547 -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 +3531 -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 +285 -3
- 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 +124 -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 +5807 -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 +373 -0
- package/types/star-ng-ui-data-display.d.ts +438 -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 +170 -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 +563 -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 +885 -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 +343 -0
- package/types/star-ng-ui-utility.d.ts +533 -0
- package/types/star-ng-ui.d.ts +51 -0
|
@@ -0,0 +1,608 @@
|
|
|
1
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, Directive, ElementRef, TemplateRef, booleanAttribute, contentChild, inject, input, output } from "@angular/core";
|
|
4
|
+
import { STAR_UI_TEXT, starInlineKey } from "@star-ng/ui/core";
|
|
5
|
+
var StarDivider = class StarDivider {
|
|
6
|
+
layout = input("horizontal", ...ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []);
|
|
7
|
+
type = input("solid", ...ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []);
|
|
8
|
+
align = input("center", ...ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []);
|
|
9
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
10
|
+
minVersion: "12.0.0",
|
|
11
|
+
version: "22.2.6",
|
|
12
|
+
ngImport: i0,
|
|
13
|
+
type: StarDivider,
|
|
14
|
+
deps: [],
|
|
15
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
16
|
+
});
|
|
17
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
18
|
+
minVersion: "17.1.0",
|
|
19
|
+
version: "22.2.6",
|
|
20
|
+
type: StarDivider,
|
|
21
|
+
isStandalone: true,
|
|
22
|
+
selector: "star-divider",
|
|
23
|
+
inputs: {
|
|
24
|
+
layout: {
|
|
25
|
+
classPropertyName: "layout",
|
|
26
|
+
publicName: "layout",
|
|
27
|
+
isSignal: true,
|
|
28
|
+
isRequired: false,
|
|
29
|
+
transformFunction: null
|
|
30
|
+
},
|
|
31
|
+
type: {
|
|
32
|
+
classPropertyName: "type",
|
|
33
|
+
publicName: "type",
|
|
34
|
+
isSignal: true,
|
|
35
|
+
isRequired: false,
|
|
36
|
+
transformFunction: null
|
|
37
|
+
},
|
|
38
|
+
align: {
|
|
39
|
+
classPropertyName: "align",
|
|
40
|
+
publicName: "align",
|
|
41
|
+
isSignal: true,
|
|
42
|
+
isRequired: false,
|
|
43
|
+
transformFunction: null
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
host: {
|
|
47
|
+
attributes: { "role": "separator" },
|
|
48
|
+
properties: {
|
|
49
|
+
"attr.aria-orientation": "layout()",
|
|
50
|
+
"class": "'star-divider star-divider--' + layout() + ' star-divider--' + type() + ' star-divider--' + align()"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
ngImport: i0,
|
|
54
|
+
template: `<span class="star-divider__content"><ng-content /></span>`,
|
|
55
|
+
isInline: true,
|
|
56
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
60
|
+
minVersion: "12.0.0",
|
|
61
|
+
version: "22.2.6",
|
|
62
|
+
ngImport: i0,
|
|
63
|
+
type: StarDivider,
|
|
64
|
+
decorators: [{
|
|
65
|
+
type: Component,
|
|
66
|
+
args: [{
|
|
67
|
+
selector: "star-divider",
|
|
68
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
69
|
+
host: {
|
|
70
|
+
role: "separator",
|
|
71
|
+
"[attr.aria-orientation]": "layout()",
|
|
72
|
+
"[class]": "'star-divider star-divider--' + layout() + ' star-divider--' + type() + ' star-divider--' + align()"
|
|
73
|
+
},
|
|
74
|
+
template: `<span class="star-divider__content"><ng-content /></span>`
|
|
75
|
+
}]
|
|
76
|
+
}],
|
|
77
|
+
propDecorators: {
|
|
78
|
+
layout: [{
|
|
79
|
+
type: i0.Input,
|
|
80
|
+
args: [{
|
|
81
|
+
isSignal: true,
|
|
82
|
+
alias: "layout",
|
|
83
|
+
required: false
|
|
84
|
+
}]
|
|
85
|
+
}],
|
|
86
|
+
type: [{
|
|
87
|
+
type: i0.Input,
|
|
88
|
+
args: [{
|
|
89
|
+
isSignal: true,
|
|
90
|
+
alias: "type",
|
|
91
|
+
required: false
|
|
92
|
+
}]
|
|
93
|
+
}],
|
|
94
|
+
align: [{
|
|
95
|
+
type: i0.Input,
|
|
96
|
+
args: [{
|
|
97
|
+
isSignal: true,
|
|
98
|
+
alias: "align",
|
|
99
|
+
required: false
|
|
100
|
+
}]
|
|
101
|
+
}]
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
var StarToolbar = class StarToolbar {
|
|
105
|
+
host = inject(ElementRef);
|
|
106
|
+
ariaLabel = input.required(...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
107
|
+
controls() {
|
|
108
|
+
return [...this.host.nativeElement.querySelectorAll("button:not([disabled]), a[href], input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])")].filter((el) => !el.closest("[role=menu], .star-panel, .star-popover"));
|
|
109
|
+
}
|
|
110
|
+
onFocusIn(event) {
|
|
111
|
+
const controls = this.controls();
|
|
112
|
+
if (!controls.includes(event.target)) return;
|
|
113
|
+
for (const control of controls) control.tabIndex = control === event.target ? 0 : -1;
|
|
114
|
+
}
|
|
115
|
+
onKeydown(event) {
|
|
116
|
+
if (event.target instanceof HTMLInputElement && event.key !== "Tab") return;
|
|
117
|
+
const controls = this.controls();
|
|
118
|
+
const index = controls.indexOf(event.target);
|
|
119
|
+
if (index < 0) return;
|
|
120
|
+
const target = {
|
|
121
|
+
ArrowRight: (index + 1) % controls.length,
|
|
122
|
+
ArrowLeft: (index - 1 + controls.length) % controls.length,
|
|
123
|
+
Home: 0,
|
|
124
|
+
End: controls.length - 1
|
|
125
|
+
}[starInlineKey(event, this.host.nativeElement)];
|
|
126
|
+
if (target === void 0) return;
|
|
127
|
+
event.preventDefault();
|
|
128
|
+
controls[target].focus();
|
|
129
|
+
}
|
|
130
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
131
|
+
minVersion: "12.0.0",
|
|
132
|
+
version: "22.2.6",
|
|
133
|
+
ngImport: i0,
|
|
134
|
+
type: StarToolbar,
|
|
135
|
+
deps: [],
|
|
136
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
137
|
+
});
|
|
138
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
139
|
+
minVersion: "17.1.0",
|
|
140
|
+
version: "22.2.6",
|
|
141
|
+
type: StarToolbar,
|
|
142
|
+
isStandalone: true,
|
|
143
|
+
selector: "star-toolbar",
|
|
144
|
+
inputs: { ariaLabel: {
|
|
145
|
+
classPropertyName: "ariaLabel",
|
|
146
|
+
publicName: "ariaLabel",
|
|
147
|
+
isSignal: true,
|
|
148
|
+
isRequired: true,
|
|
149
|
+
transformFunction: null
|
|
150
|
+
} },
|
|
151
|
+
host: {
|
|
152
|
+
attributes: { "role": "toolbar" },
|
|
153
|
+
listeners: {
|
|
154
|
+
"keydown": "onKeydown($event)",
|
|
155
|
+
"focusin": "onFocusIn($event)"
|
|
156
|
+
},
|
|
157
|
+
properties: { "attr.aria-label": "ariaLabel()" },
|
|
158
|
+
classAttribute: "star-toolbar"
|
|
159
|
+
},
|
|
160
|
+
ngImport: i0,
|
|
161
|
+
template: `
|
|
162
|
+
<div class="star-toolbar__group"><ng-content select="[starToolbarStart]" /></div>
|
|
163
|
+
<div class="star-toolbar__group star-toolbar__group--center">
|
|
164
|
+
<ng-content select="[starToolbarCenter]" />
|
|
165
|
+
</div>
|
|
166
|
+
<div class="star-toolbar__group star-toolbar__group--end">
|
|
167
|
+
<ng-content select="[starToolbarEnd]" />
|
|
168
|
+
</div>
|
|
169
|
+
`,
|
|
170
|
+
isInline: true,
|
|
171
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
172
|
+
});
|
|
173
|
+
};
|
|
174
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
175
|
+
minVersion: "12.0.0",
|
|
176
|
+
version: "22.2.6",
|
|
177
|
+
ngImport: i0,
|
|
178
|
+
type: StarToolbar,
|
|
179
|
+
decorators: [{
|
|
180
|
+
type: Component,
|
|
181
|
+
args: [{
|
|
182
|
+
selector: "star-toolbar",
|
|
183
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
184
|
+
host: {
|
|
185
|
+
class: "star-toolbar",
|
|
186
|
+
role: "toolbar",
|
|
187
|
+
"[attr.aria-label]": "ariaLabel()",
|
|
188
|
+
"(keydown)": "onKeydown($event)",
|
|
189
|
+
"(focusin)": "onFocusIn($event)"
|
|
190
|
+
},
|
|
191
|
+
template: `
|
|
192
|
+
<div class="star-toolbar__group"><ng-content select="[starToolbarStart]" /></div>
|
|
193
|
+
<div class="star-toolbar__group star-toolbar__group--center">
|
|
194
|
+
<ng-content select="[starToolbarCenter]" />
|
|
195
|
+
</div>
|
|
196
|
+
<div class="star-toolbar__group star-toolbar__group--end">
|
|
197
|
+
<ng-content select="[starToolbarEnd]" />
|
|
198
|
+
</div>
|
|
199
|
+
`
|
|
200
|
+
}]
|
|
201
|
+
}],
|
|
202
|
+
propDecorators: { ariaLabel: [{
|
|
203
|
+
type: i0.Input,
|
|
204
|
+
args: [{
|
|
205
|
+
isSignal: true,
|
|
206
|
+
alias: "ariaLabel",
|
|
207
|
+
required: true
|
|
208
|
+
}]
|
|
209
|
+
}] }
|
|
210
|
+
});
|
|
211
|
+
var StarTimelineContent = class StarTimelineContent {
|
|
212
|
+
template = inject(TemplateRef);
|
|
213
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
214
|
+
minVersion: "12.0.0",
|
|
215
|
+
version: "22.2.6",
|
|
216
|
+
ngImport: i0,
|
|
217
|
+
type: StarTimelineContent,
|
|
218
|
+
deps: [],
|
|
219
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
220
|
+
});
|
|
221
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
222
|
+
minVersion: "14.0.0",
|
|
223
|
+
version: "22.2.6",
|
|
224
|
+
type: StarTimelineContent,
|
|
225
|
+
isStandalone: true,
|
|
226
|
+
selector: "ng-template[starTimelineContent]",
|
|
227
|
+
ngImport: i0
|
|
228
|
+
});
|
|
229
|
+
};
|
|
230
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
231
|
+
minVersion: "12.0.0",
|
|
232
|
+
version: "22.2.6",
|
|
233
|
+
ngImport: i0,
|
|
234
|
+
type: StarTimelineContent,
|
|
235
|
+
decorators: [{
|
|
236
|
+
type: Directive,
|
|
237
|
+
args: [{ selector: "ng-template[starTimelineContent]" }]
|
|
238
|
+
}]
|
|
239
|
+
});
|
|
240
|
+
var StarTimeline = class StarTimeline {
|
|
241
|
+
events = input([], ...ngDevMode ? [{ debugName: "events" }] : /* istanbul ignore next */ []);
|
|
242
|
+
layout = input("vertical", ...ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []);
|
|
243
|
+
align = input("left", ...ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []);
|
|
244
|
+
locale = input(void 0, ...ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []);
|
|
245
|
+
ariaLabel = input(null, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
246
|
+
content = contentChild(StarTimelineContent, ...ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []);
|
|
247
|
+
isoDate(date) {
|
|
248
|
+
return date instanceof Date ? date.toISOString() : null;
|
|
249
|
+
}
|
|
250
|
+
dateText(date) {
|
|
251
|
+
return date instanceof Date ? new Intl.DateTimeFormat(this.locale(), {
|
|
252
|
+
dateStyle: "medium",
|
|
253
|
+
timeStyle: "short"
|
|
254
|
+
}).format(date) : date;
|
|
255
|
+
}
|
|
256
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
257
|
+
minVersion: "12.0.0",
|
|
258
|
+
version: "22.2.6",
|
|
259
|
+
ngImport: i0,
|
|
260
|
+
type: StarTimeline,
|
|
261
|
+
deps: [],
|
|
262
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
263
|
+
});
|
|
264
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
265
|
+
minVersion: "17.0.0",
|
|
266
|
+
version: "22.2.6",
|
|
267
|
+
type: StarTimeline,
|
|
268
|
+
isStandalone: true,
|
|
269
|
+
selector: "star-timeline",
|
|
270
|
+
inputs: {
|
|
271
|
+
events: {
|
|
272
|
+
classPropertyName: "events",
|
|
273
|
+
publicName: "events",
|
|
274
|
+
isSignal: true,
|
|
275
|
+
isRequired: false,
|
|
276
|
+
transformFunction: null
|
|
277
|
+
},
|
|
278
|
+
layout: {
|
|
279
|
+
classPropertyName: "layout",
|
|
280
|
+
publicName: "layout",
|
|
281
|
+
isSignal: true,
|
|
282
|
+
isRequired: false,
|
|
283
|
+
transformFunction: null
|
|
284
|
+
},
|
|
285
|
+
align: {
|
|
286
|
+
classPropertyName: "align",
|
|
287
|
+
publicName: "align",
|
|
288
|
+
isSignal: true,
|
|
289
|
+
isRequired: false,
|
|
290
|
+
transformFunction: null
|
|
291
|
+
},
|
|
292
|
+
locale: {
|
|
293
|
+
classPropertyName: "locale",
|
|
294
|
+
publicName: "locale",
|
|
295
|
+
isSignal: true,
|
|
296
|
+
isRequired: false,
|
|
297
|
+
transformFunction: null
|
|
298
|
+
},
|
|
299
|
+
ariaLabel: {
|
|
300
|
+
classPropertyName: "ariaLabel",
|
|
301
|
+
publicName: "ariaLabel",
|
|
302
|
+
isSignal: true,
|
|
303
|
+
isRequired: false,
|
|
304
|
+
transformFunction: null
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
host: { properties: { "class": "'star-timeline star-timeline--' + layout() + ' star-timeline--' + align()" } },
|
|
308
|
+
queries: [{
|
|
309
|
+
propertyName: "content",
|
|
310
|
+
first: true,
|
|
311
|
+
predicate: StarTimelineContent,
|
|
312
|
+
descendants: true,
|
|
313
|
+
isSignal: true
|
|
314
|
+
}],
|
|
315
|
+
ngImport: i0,
|
|
316
|
+
template: `
|
|
317
|
+
<ol class="star-timeline__list" [attr.aria-label]="ariaLabel()">
|
|
318
|
+
@for (event of events(); track $index; let i = $index) {
|
|
319
|
+
<li
|
|
320
|
+
class="star-timeline__event"
|
|
321
|
+
[class]="'star-timeline__event star-timeline__event--' + (event.severity ?? 'primary')"
|
|
322
|
+
>
|
|
323
|
+
<span class="star-timeline__marker" aria-hidden="true">
|
|
324
|
+
@if (event.icon) {
|
|
325
|
+
<i [class]="event.icon"></i>
|
|
326
|
+
}
|
|
327
|
+
</span>
|
|
328
|
+
<div class="star-timeline__body">
|
|
329
|
+
@if (content(); as custom) {
|
|
330
|
+
<ng-container
|
|
331
|
+
*ngTemplateOutlet="custom.template; context: { $implicit: event, index: i }"
|
|
332
|
+
/>
|
|
333
|
+
} @else {
|
|
334
|
+
@if (event.date) {
|
|
335
|
+
<time class="star-timeline__date" [attr.datetime]="isoDate(event.date)">{{
|
|
336
|
+
dateText(event.date)
|
|
337
|
+
}}</time>
|
|
338
|
+
}
|
|
339
|
+
<p class="star-timeline__title">{{ event.title }}</p>
|
|
340
|
+
@if (event.description) {
|
|
341
|
+
<p class="star-timeline__desc">{{ event.description }}</p>
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
</div>
|
|
345
|
+
</li>
|
|
346
|
+
}
|
|
347
|
+
</ol>
|
|
348
|
+
`,
|
|
349
|
+
isInline: true,
|
|
350
|
+
dependencies: [{
|
|
351
|
+
kind: "directive",
|
|
352
|
+
type: NgTemplateOutlet,
|
|
353
|
+
selector: "[ngTemplateOutlet]",
|
|
354
|
+
inputs: [
|
|
355
|
+
"ngTemplateOutletContext",
|
|
356
|
+
"ngTemplateOutlet",
|
|
357
|
+
"ngTemplateOutletInjector"
|
|
358
|
+
]
|
|
359
|
+
}],
|
|
360
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
361
|
+
});
|
|
362
|
+
};
|
|
363
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
364
|
+
minVersion: "12.0.0",
|
|
365
|
+
version: "22.2.6",
|
|
366
|
+
ngImport: i0,
|
|
367
|
+
type: StarTimeline,
|
|
368
|
+
decorators: [{
|
|
369
|
+
type: Component,
|
|
370
|
+
args: [{
|
|
371
|
+
selector: "star-timeline",
|
|
372
|
+
imports: [NgTemplateOutlet],
|
|
373
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
374
|
+
host: { "[class]": "'star-timeline star-timeline--' + layout() + ' star-timeline--' + align()" },
|
|
375
|
+
template: `
|
|
376
|
+
<ol class="star-timeline__list" [attr.aria-label]="ariaLabel()">
|
|
377
|
+
@for (event of events(); track $index; let i = $index) {
|
|
378
|
+
<li
|
|
379
|
+
class="star-timeline__event"
|
|
380
|
+
[class]="'star-timeline__event star-timeline__event--' + (event.severity ?? 'primary')"
|
|
381
|
+
>
|
|
382
|
+
<span class="star-timeline__marker" aria-hidden="true">
|
|
383
|
+
@if (event.icon) {
|
|
384
|
+
<i [class]="event.icon"></i>
|
|
385
|
+
}
|
|
386
|
+
</span>
|
|
387
|
+
<div class="star-timeline__body">
|
|
388
|
+
@if (content(); as custom) {
|
|
389
|
+
<ng-container
|
|
390
|
+
*ngTemplateOutlet="custom.template; context: { $implicit: event, index: i }"
|
|
391
|
+
/>
|
|
392
|
+
} @else {
|
|
393
|
+
@if (event.date) {
|
|
394
|
+
<time class="star-timeline__date" [attr.datetime]="isoDate(event.date)">{{
|
|
395
|
+
dateText(event.date)
|
|
396
|
+
}}</time>
|
|
397
|
+
}
|
|
398
|
+
<p class="star-timeline__title">{{ event.title }}</p>
|
|
399
|
+
@if (event.description) {
|
|
400
|
+
<p class="star-timeline__desc">{{ event.description }}</p>
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
</div>
|
|
404
|
+
</li>
|
|
405
|
+
}
|
|
406
|
+
</ol>
|
|
407
|
+
`
|
|
408
|
+
}]
|
|
409
|
+
}],
|
|
410
|
+
propDecorators: {
|
|
411
|
+
events: [{
|
|
412
|
+
type: i0.Input,
|
|
413
|
+
args: [{
|
|
414
|
+
isSignal: true,
|
|
415
|
+
alias: "events",
|
|
416
|
+
required: false
|
|
417
|
+
}]
|
|
418
|
+
}],
|
|
419
|
+
layout: [{
|
|
420
|
+
type: i0.Input,
|
|
421
|
+
args: [{
|
|
422
|
+
isSignal: true,
|
|
423
|
+
alias: "layout",
|
|
424
|
+
required: false
|
|
425
|
+
}]
|
|
426
|
+
}],
|
|
427
|
+
align: [{
|
|
428
|
+
type: i0.Input,
|
|
429
|
+
args: [{
|
|
430
|
+
isSignal: true,
|
|
431
|
+
alias: "align",
|
|
432
|
+
required: false
|
|
433
|
+
}]
|
|
434
|
+
}],
|
|
435
|
+
locale: [{
|
|
436
|
+
type: i0.Input,
|
|
437
|
+
args: [{
|
|
438
|
+
isSignal: true,
|
|
439
|
+
alias: "locale",
|
|
440
|
+
required: false
|
|
441
|
+
}]
|
|
442
|
+
}],
|
|
443
|
+
ariaLabel: [{
|
|
444
|
+
type: i0.Input,
|
|
445
|
+
args: [{
|
|
446
|
+
isSignal: true,
|
|
447
|
+
alias: "ariaLabel",
|
|
448
|
+
required: false
|
|
449
|
+
}]
|
|
450
|
+
}],
|
|
451
|
+
content: [{
|
|
452
|
+
type: i0.ContentChild,
|
|
453
|
+
args: [i0.forwardRef(() => StarTimelineContent), { isSignal: true }]
|
|
454
|
+
}]
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
var StarChip = class StarChip {
|
|
458
|
+
text = inject(STAR_UI_TEXT);
|
|
459
|
+
label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
460
|
+
icon = input(null, ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
|
|
461
|
+
image = input(null, ...ngDevMode ? [{ debugName: "image" }] : /* istanbul ignore next */ []);
|
|
462
|
+
removable = input(false, {
|
|
463
|
+
...ngDevMode ? { debugName: "removable" } : /* istanbul ignore next */ {},
|
|
464
|
+
transform: booleanAttribute
|
|
465
|
+
});
|
|
466
|
+
removed = output();
|
|
467
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
468
|
+
minVersion: "12.0.0",
|
|
469
|
+
version: "22.2.6",
|
|
470
|
+
ngImport: i0,
|
|
471
|
+
type: StarChip,
|
|
472
|
+
deps: [],
|
|
473
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
474
|
+
});
|
|
475
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
476
|
+
minVersion: "17.0.0",
|
|
477
|
+
version: "22.2.6",
|
|
478
|
+
type: StarChip,
|
|
479
|
+
isStandalone: true,
|
|
480
|
+
selector: "star-chip",
|
|
481
|
+
inputs: {
|
|
482
|
+
label: {
|
|
483
|
+
classPropertyName: "label",
|
|
484
|
+
publicName: "label",
|
|
485
|
+
isSignal: true,
|
|
486
|
+
isRequired: false,
|
|
487
|
+
transformFunction: null
|
|
488
|
+
},
|
|
489
|
+
icon: {
|
|
490
|
+
classPropertyName: "icon",
|
|
491
|
+
publicName: "icon",
|
|
492
|
+
isSignal: true,
|
|
493
|
+
isRequired: false,
|
|
494
|
+
transformFunction: null
|
|
495
|
+
},
|
|
496
|
+
image: {
|
|
497
|
+
classPropertyName: "image",
|
|
498
|
+
publicName: "image",
|
|
499
|
+
isSignal: true,
|
|
500
|
+
isRequired: false,
|
|
501
|
+
transformFunction: null
|
|
502
|
+
},
|
|
503
|
+
removable: {
|
|
504
|
+
classPropertyName: "removable",
|
|
505
|
+
publicName: "removable",
|
|
506
|
+
isSignal: true,
|
|
507
|
+
isRequired: false,
|
|
508
|
+
transformFunction: null
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
outputs: { removed: "removed" },
|
|
512
|
+
host: { classAttribute: "star-chip" },
|
|
513
|
+
ngImport: i0,
|
|
514
|
+
template: `
|
|
515
|
+
@if (image()) {
|
|
516
|
+
<img class="star-chip__image" [src]="image()" alt="" />
|
|
517
|
+
} @else if (icon()) {
|
|
518
|
+
<i [class]="icon()" aria-hidden="true"></i>
|
|
519
|
+
}
|
|
520
|
+
<span>{{ label() }}<ng-content /></span>
|
|
521
|
+
@if (removable()) {
|
|
522
|
+
<button
|
|
523
|
+
type="button"
|
|
524
|
+
class="star-chip__remove"
|
|
525
|
+
[attr.aria-label]="text.removeItem(label())"
|
|
526
|
+
(click)="removed.emit()"
|
|
527
|
+
>
|
|
528
|
+
<i class="ph-bold ph-x" aria-hidden="true"></i>
|
|
529
|
+
</button>
|
|
530
|
+
}
|
|
531
|
+
`,
|
|
532
|
+
isInline: true,
|
|
533
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
534
|
+
});
|
|
535
|
+
};
|
|
536
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
537
|
+
minVersion: "12.0.0",
|
|
538
|
+
version: "22.2.6",
|
|
539
|
+
ngImport: i0,
|
|
540
|
+
type: StarChip,
|
|
541
|
+
decorators: [{
|
|
542
|
+
type: Component,
|
|
543
|
+
args: [{
|
|
544
|
+
selector: "star-chip",
|
|
545
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
546
|
+
host: { class: "star-chip" },
|
|
547
|
+
template: `
|
|
548
|
+
@if (image()) {
|
|
549
|
+
<img class="star-chip__image" [src]="image()" alt="" />
|
|
550
|
+
} @else if (icon()) {
|
|
551
|
+
<i [class]="icon()" aria-hidden="true"></i>
|
|
552
|
+
}
|
|
553
|
+
<span>{{ label() }}<ng-content /></span>
|
|
554
|
+
@if (removable()) {
|
|
555
|
+
<button
|
|
556
|
+
type="button"
|
|
557
|
+
class="star-chip__remove"
|
|
558
|
+
[attr.aria-label]="text.removeItem(label())"
|
|
559
|
+
(click)="removed.emit()"
|
|
560
|
+
>
|
|
561
|
+
<i class="ph-bold ph-x" aria-hidden="true"></i>
|
|
562
|
+
</button>
|
|
563
|
+
}
|
|
564
|
+
`
|
|
565
|
+
}]
|
|
566
|
+
}],
|
|
567
|
+
propDecorators: {
|
|
568
|
+
label: [{
|
|
569
|
+
type: i0.Input,
|
|
570
|
+
args: [{
|
|
571
|
+
isSignal: true,
|
|
572
|
+
alias: "label",
|
|
573
|
+
required: false
|
|
574
|
+
}]
|
|
575
|
+
}],
|
|
576
|
+
icon: [{
|
|
577
|
+
type: i0.Input,
|
|
578
|
+
args: [{
|
|
579
|
+
isSignal: true,
|
|
580
|
+
alias: "icon",
|
|
581
|
+
required: false
|
|
582
|
+
}]
|
|
583
|
+
}],
|
|
584
|
+
image: [{
|
|
585
|
+
type: i0.Input,
|
|
586
|
+
args: [{
|
|
587
|
+
isSignal: true,
|
|
588
|
+
alias: "image",
|
|
589
|
+
required: false
|
|
590
|
+
}]
|
|
591
|
+
}],
|
|
592
|
+
removable: [{
|
|
593
|
+
type: i0.Input,
|
|
594
|
+
args: [{
|
|
595
|
+
isSignal: true,
|
|
596
|
+
alias: "removable",
|
|
597
|
+
required: false
|
|
598
|
+
}]
|
|
599
|
+
}],
|
|
600
|
+
removed: [{
|
|
601
|
+
type: i0.Output,
|
|
602
|
+
args: ["removed"]
|
|
603
|
+
}]
|
|
604
|
+
}
|
|
605
|
+
});
|
|
606
|
+
export { StarChip, StarDivider, StarTimeline, StarTimelineContent, StarToolbar };
|
|
607
|
+
|
|
608
|
+
//# sourceMappingURL=star-ng-ui-layout.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"star-ng-ui-layout.mjs","names":[],"sources":["../../../projects/star-ng/layout/layout.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n contentChild,\n Directive,\n ElementRef,\n inject,\n input,\n output,\n TemplateRef,\n} from '@angular/core';\nimport { STAR_UI_TEXT, starInlineKey } from '@star-ng/ui/core';\n\n/**\n * Divider (PrimeNG `p-divider`): horizontal or vertical rule with an optional label.\n * `<star-divider>or</star-divider>`, `<star-divider layout=\"vertical\" />`\n */\n@Component({\n selector: 'star-divider',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n role: 'separator',\n '[attr.aria-orientation]': 'layout()',\n '[class]':\n \"'star-divider star-divider--' + layout() + ' star-divider--' + type() + ' star-divider--' + align()\",\n },\n template: `<span class=\"star-divider__content\"><ng-content /></span>`,\n})\nexport class StarDivider {\n readonly layout = input<'horizontal' | 'vertical'>('horizontal');\n readonly type = input<'solid' | 'dashed' | 'dotted'>('solid');\n readonly align = input<'start' | 'center' | 'end'>('center');\n}\n\n/**\n * Toolbar (PrimeNG `p-toolbar`): start, center and end groups, `role=\"toolbar\"` with\n * Arrow-key focus movement between its controls (Tab enters and leaves once).\n *\n * ```html\n * <star-toolbar ariaLabel=\"Order actions\">\n * <ng-container starToolbarStart>…</ng-container>\n * <ng-container starToolbarEnd>…</ng-container>\n * </star-toolbar>\n * ```\n */\n@Component({\n selector: 'star-toolbar',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'star-toolbar',\n role: 'toolbar',\n '[attr.aria-label]': 'ariaLabel()',\n '(keydown)': 'onKeydown($event)',\n '(focusin)': 'onFocusIn($event)',\n },\n template: `\n <div class=\"star-toolbar__group\"><ng-content select=\"[starToolbarStart]\" /></div>\n <div class=\"star-toolbar__group star-toolbar__group--center\">\n <ng-content select=\"[starToolbarCenter]\" />\n </div>\n <div class=\"star-toolbar__group star-toolbar__group--end\">\n <ng-content select=\"[starToolbarEnd]\" />\n </div>\n `,\n})\nexport class StarToolbar {\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly ariaLabel = input.required<string>();\n\n private controls(): HTMLElement[] {\n return [\n ...this.host.nativeElement.querySelectorAll<HTMLElement>(\n 'button:not([disabled]), a[href], input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])',\n ),\n ].filter((el) => !el.closest('[role=menu], .star-panel, .star-popover'));\n }\n\n /** Roving tabindex: only the focused control is in the Tab order. */\n protected onFocusIn(event: FocusEvent): void {\n const controls = this.controls();\n if (!controls.includes(event.target as HTMLElement)) return;\n for (const control of controls) control.tabIndex = control === event.target ? 0 : -1;\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (event.target instanceof HTMLInputElement && event.key !== 'Tab') return;\n const controls = this.controls();\n const index = controls.indexOf(event.target as HTMLElement);\n if (index < 0) return;\n const target = {\n ArrowRight: (index + 1) % controls.length,\n ArrowLeft: (index - 1 + controls.length) % controls.length,\n Home: 0,\n End: controls.length - 1,\n }[starInlineKey(event, this.host.nativeElement)];\n if (target === undefined) return;\n event.preventDefault();\n controls[target].focus();\n }\n}\n\nexport interface StarTimelineEvent {\n readonly title: string;\n readonly date?: string | Date;\n readonly description?: string;\n /** Phosphor icon class shown in the marker. */\n readonly icon?: string;\n readonly severity?: 'primary' | 'success' | 'info' | 'warn' | 'danger' | 'secondary';\n}\n\n/** Custom event body: `<ng-template starTimelineContent let-event>…</ng-template>`. */\n@Directive({ selector: 'ng-template[starTimelineContent]' })\nexport class StarTimelineContent {\n readonly template =\n inject<TemplateRef<{ $implicit: StarTimelineEvent; index: number }>>(TemplateRef);\n}\n\n/**\n * Timeline (PrimeNG `p-timeline`): ordered list of events with markers, dates and severity\n * colors; vertical (left or alternate) or horizontal.\n *\n * `<star-timeline [events]=\"history\" align=\"left\" />`\n */\n@Component({\n selector: 'star-timeline',\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': \"'star-timeline star-timeline--' + layout() + ' star-timeline--' + align()\",\n },\n template: `\n <ol class=\"star-timeline__list\" [attr.aria-label]=\"ariaLabel()\">\n @for (event of events(); track $index; let i = $index) {\n <li\n class=\"star-timeline__event\"\n [class]=\"'star-timeline__event star-timeline__event--' + (event.severity ?? 'primary')\"\n >\n <span class=\"star-timeline__marker\" aria-hidden=\"true\">\n @if (event.icon) {\n <i [class]=\"event.icon\"></i>\n }\n </span>\n <div class=\"star-timeline__body\">\n @if (content(); as custom) {\n <ng-container\n *ngTemplateOutlet=\"custom.template; context: { $implicit: event, index: i }\"\n />\n } @else {\n @if (event.date) {\n <time class=\"star-timeline__date\" [attr.datetime]=\"isoDate(event.date)\">{{\n dateText(event.date)\n }}</time>\n }\n <p class=\"star-timeline__title\">{{ event.title }}</p>\n @if (event.description) {\n <p class=\"star-timeline__desc\">{{ event.description }}</p>\n }\n }\n </div>\n </li>\n }\n </ol>\n `,\n})\nexport class StarTimeline {\n readonly events = input<readonly StarTimelineEvent[]>([]);\n readonly layout = input<'vertical' | 'horizontal'>('vertical');\n readonly align = input<'left' | 'alternate'>('left');\n readonly locale = input<string | undefined>(undefined);\n readonly ariaLabel = input<string | null>(null);\n protected readonly content = contentChild(StarTimelineContent);\n\n protected isoDate(date: string | Date): string | null {\n return date instanceof Date ? date.toISOString() : null;\n }\n protected dateText(date: string | Date): string {\n return date instanceof Date\n ? new Intl.DateTimeFormat(this.locale(), { dateStyle: 'medium', timeStyle: 'short' }).format(\n date,\n )\n : date;\n }\n}\n\n/**\n * Chip (PrimeNG `p-chip`): label with optional icon or image and a remove button.\n * `<star-chip label=\"Design\" icon=\"ph-bold ph-palette\" removable (removed)=\"drop()\" />`\n */\n@Component({\n selector: 'star-chip',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'star-chip' },\n template: `\n @if (image()) {\n <img class=\"star-chip__image\" [src]=\"image()\" alt=\"\" />\n } @else if (icon()) {\n <i [class]=\"icon()\" aria-hidden=\"true\"></i>\n }\n <span>{{ label() }}<ng-content /></span>\n @if (removable()) {\n <button\n type=\"button\"\n class=\"star-chip__remove\"\n [attr.aria-label]=\"text.removeItem(label())\"\n (click)=\"removed.emit()\"\n >\n <i class=\"ph-bold ph-x\" aria-hidden=\"true\"></i>\n </button>\n }\n `,\n})\nexport class StarChip {\n protected readonly text = inject(STAR_UI_TEXT);\n readonly label = input('');\n readonly icon = input<string | null>(null);\n readonly image = input<string | null>(null);\n readonly removable = input(false, { transform: booleanAttribute });\n readonly removed = output<void>();\n}\n"],"mappings":";;;;AA8BA,IAAa,cAAb,MAAa,YAAW;CACb,SAAS,MAAiC,cAAa,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CACvD,OAAO,MAAqC,SAAQ,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACpD,QAAQ,MAAkC,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAHjD,OAAA,OAAA,GAAA,mBAAA;EA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