@tectra-ng/ui 0.1.3 → 0.1.5
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/accordion/README.md +61 -0
- package/breadcrumb/README.md +57 -0
- package/carousel/README.md +53 -0
- package/fesm2022/tectra-ng-ui-accordion.mjs +980 -0
- package/fesm2022/tectra-ng-ui-accordion.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-autocomplete.mjs +2 -2
- package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-breadcrumb.mjs +382 -0
- package/fesm2022/tectra-ng-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-carousel.mjs +939 -0
- package/fesm2022/tectra-ng-ui-carousel.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-cascade-select.mjs +2 -2
- package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-chips-input.mjs +2 -2
- package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-color-picker.mjs +2 -2
- package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-field.mjs +1 -1
- package/fesm2022/tectra-ng-ui-field.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-file-upload.mjs +1452 -0
- package/fesm2022/tectra-ng-ui-file-upload.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-galleria.mjs +1140 -0
- package/fesm2022/tectra-ng-ui-galleria.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-image.mjs +759 -0
- package/fesm2022/tectra-ng-ui-image.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-input-group.mjs +2 -2
- package/fesm2022/tectra-ng-ui-input-group.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-input.mjs +2 -2
- package/fesm2022/tectra-ng-ui-input.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-listbox.mjs +2 -2
- package/fesm2022/tectra-ng-ui-listbox.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-menubar.mjs +742 -0
- package/fesm2022/tectra-ng-ui-menubar.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-multiselect.mjs +2 -2
- package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-panel-menu.mjs +610 -0
- package/fesm2022/tectra-ng-ui-panel-menu.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-scroll-panel.mjs +319 -0
- package/fesm2022/tectra-ng-ui-scroll-panel.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-select.mjs +2 -2
- package/fesm2022/tectra-ng-ui-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-splitter.mjs +750 -0
- package/fesm2022/tectra-ng-ui-splitter.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-stepper.mjs +1166 -0
- package/fesm2022/tectra-ng-ui-stepper.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-table.mjs +194 -50
- package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tabs.mjs +1218 -0
- package/fesm2022/tectra-ng-ui-tabs.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-textarea.mjs +4 -1
- package/fesm2022/tectra-ng-ui-textarea.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-toolbar.mjs +348 -0
- package/fesm2022/tectra-ng-ui-toolbar.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-tree-select.mjs +2 -2
- package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tree-table.mjs +80 -2
- package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -1
- package/field/README.md +1 -1
- package/file-upload/README.md +85 -0
- package/galleria/README.md +62 -0
- package/image/README.md +54 -0
- package/menubar/README.md +51 -0
- package/package.json +56 -4
- package/panel-menu/README.md +45 -0
- package/scroll-panel/README.md +35 -0
- package/splitter/README.md +62 -0
- package/stepper/README.md +66 -0
- package/table/README.md +1 -1
- package/tabs/README.md +69 -0
- package/toolbar/README.md +35 -0
- package/types/tectra-ng-ui-accordion.d.ts +304 -0
- package/types/tectra-ng-ui-accordion.d.ts.map +1 -0
- package/types/tectra-ng-ui-breadcrumb.d.ts +157 -0
- package/types/tectra-ng-ui-breadcrumb.d.ts.map +1 -0
- package/types/tectra-ng-ui-carousel.d.ts +263 -0
- package/types/tectra-ng-ui-carousel.d.ts.map +1 -0
- package/types/tectra-ng-ui-file-upload.d.ts +527 -0
- package/types/tectra-ng-ui-file-upload.d.ts.map +1 -0
- package/types/tectra-ng-ui-galleria.d.ts +407 -0
- package/types/tectra-ng-ui-galleria.d.ts.map +1 -0
- package/types/tectra-ng-ui-image.d.ts +259 -0
- package/types/tectra-ng-ui-image.d.ts.map +1 -0
- package/types/tectra-ng-ui-menubar.d.ts +201 -0
- package/types/tectra-ng-ui-menubar.d.ts.map +1 -0
- package/types/tectra-ng-ui-panel-menu.d.ts +244 -0
- package/types/tectra-ng-ui-panel-menu.d.ts.map +1 -0
- package/types/tectra-ng-ui-scroll-panel.d.ts +94 -0
- package/types/tectra-ng-ui-scroll-panel.d.ts.map +1 -0
- package/types/tectra-ng-ui-splitter.d.ts +226 -0
- package/types/tectra-ng-ui-splitter.d.ts.map +1 -0
- package/types/tectra-ng-ui-stepper.d.ts +446 -0
- package/types/tectra-ng-ui-stepper.d.ts.map +1 -0
- package/types/tectra-ng-ui-table.d.ts +2 -4
- package/types/tectra-ng-ui-table.d.ts.map +1 -1
- package/types/tectra-ng-ui-tabs.d.ts +420 -0
- package/types/tectra-ng-ui-tabs.d.ts.map +1 -0
- package/types/tectra-ng-ui-textarea.d.ts +1 -0
- package/types/tectra-ng-ui-textarea.d.ts.map +1 -1
- package/types/tectra-ng-ui-toolbar.d.ts +85 -0
- package/types/tectra-ng-ui-toolbar.d.ts.map +1 -0
- package/types/tectra-ng-ui-tree-table.d.ts.map +1 -1
|
@@ -0,0 +1,1166 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Directive, ElementRef, TemplateRef, ViewEncapsulation, booleanAttribute, computed, contentChild, contentChildren, inject, input, linkedSignal, model, viewChild } from "@angular/core";
|
|
3
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
4
|
+
import { uniqueId } from "@tectra-ng/core/a11y";
|
|
5
|
+
import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
|
|
6
|
+
import { optionalBoolean } from "@tectra-ng/core/utils";
|
|
7
|
+
import { toStyleObject } from "@tectra-ng/themes";
|
|
8
|
+
import { injectTranslations } from "@tectra-ng/core/i18n";
|
|
9
|
+
import { TxIcon, TxIconRegistry } from "@tectra-ng/icons";
|
|
10
|
+
var TxStepperRef = class {};
|
|
11
|
+
var TxStepContent = class TxStepContent {
|
|
12
|
+
templateRef = inject(TemplateRef);
|
|
13
|
+
static ngTemplateContextGuard(_directive, context) {
|
|
14
|
+
return !!context;
|
|
15
|
+
}
|
|
16
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
17
|
+
minVersion: "12.0.0",
|
|
18
|
+
version: "22.2.3",
|
|
19
|
+
ngImport: i0,
|
|
20
|
+
type: TxStepContent,
|
|
21
|
+
deps: [],
|
|
22
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
23
|
+
});
|
|
24
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
25
|
+
minVersion: "14.0.0",
|
|
26
|
+
version: "22.2.3",
|
|
27
|
+
type: TxStepContent,
|
|
28
|
+
isStandalone: true,
|
|
29
|
+
selector: "ng-template[txStepContent]",
|
|
30
|
+
ngImport: i0
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
34
|
+
minVersion: "12.0.0",
|
|
35
|
+
version: "22.2.3",
|
|
36
|
+
ngImport: i0,
|
|
37
|
+
type: TxStepContent,
|
|
38
|
+
decorators: [{
|
|
39
|
+
type: Directive,
|
|
40
|
+
args: [{ selector: "ng-template[txStepContent]" }]
|
|
41
|
+
}]
|
|
42
|
+
});
|
|
43
|
+
var TxStepPanelContent = class TxStepPanelContent {
|
|
44
|
+
templateRef = inject(TemplateRef);
|
|
45
|
+
static ngTemplateContextGuard(_directive, context) {
|
|
46
|
+
return !!context;
|
|
47
|
+
}
|
|
48
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
49
|
+
minVersion: "12.0.0",
|
|
50
|
+
version: "22.2.3",
|
|
51
|
+
ngImport: i0,
|
|
52
|
+
type: TxStepPanelContent,
|
|
53
|
+
deps: [],
|
|
54
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
55
|
+
});
|
|
56
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
57
|
+
minVersion: "14.0.0",
|
|
58
|
+
version: "22.2.3",
|
|
59
|
+
type: TxStepPanelContent,
|
|
60
|
+
isStandalone: true,
|
|
61
|
+
selector: "ng-template[txStepPanelContent]",
|
|
62
|
+
ngImport: i0
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
66
|
+
minVersion: "12.0.0",
|
|
67
|
+
version: "22.2.3",
|
|
68
|
+
ngImport: i0,
|
|
69
|
+
type: TxStepPanelContent,
|
|
70
|
+
decorators: [{
|
|
71
|
+
type: Directive,
|
|
72
|
+
args: [{ selector: "ng-template[txStepPanelContent]" }]
|
|
73
|
+
}]
|
|
74
|
+
});
|
|
75
|
+
var TxStepsItemTemplate = class TxStepsItemTemplate {
|
|
76
|
+
templateRef = inject(TemplateRef);
|
|
77
|
+
static ngTemplateContextGuard(_directive, context) {
|
|
78
|
+
return !!context;
|
|
79
|
+
}
|
|
80
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
81
|
+
minVersion: "12.0.0",
|
|
82
|
+
version: "22.2.3",
|
|
83
|
+
ngImport: i0,
|
|
84
|
+
type: TxStepsItemTemplate,
|
|
85
|
+
deps: [],
|
|
86
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
87
|
+
});
|
|
88
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
89
|
+
minVersion: "14.0.0",
|
|
90
|
+
version: "22.2.3",
|
|
91
|
+
type: TxStepsItemTemplate,
|
|
92
|
+
isStandalone: true,
|
|
93
|
+
selector: "ng-template[txStepsItem]",
|
|
94
|
+
ngImport: i0
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
98
|
+
minVersion: "12.0.0",
|
|
99
|
+
version: "22.2.3",
|
|
100
|
+
ngImport: i0,
|
|
101
|
+
type: TxStepsItemTemplate,
|
|
102
|
+
decorators: [{
|
|
103
|
+
type: Directive,
|
|
104
|
+
args: [{ selector: "ng-template[txStepsItem]" }]
|
|
105
|
+
}]
|
|
106
|
+
});
|
|
107
|
+
var TxStepItem = class TxStepItem {
|
|
108
|
+
stepper = inject(TxStepperRef);
|
|
109
|
+
value = input.required(...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
110
|
+
active = computed(() => this.stepper.isActive(this.value()), ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
|
|
111
|
+
completed = computed(() => this.stepper.isCompleted(this.value()), ...ngDevMode ? [{ debugName: "completed" }] : /* istanbul ignore next */ []);
|
|
112
|
+
last = computed(() => this.stepper.isLast(this.value()), ...ngDevMode ? [{ debugName: "last" }] : /* istanbul ignore next */ []);
|
|
113
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
114
|
+
minVersion: "12.0.0",
|
|
115
|
+
version: "22.2.3",
|
|
116
|
+
ngImport: i0,
|
|
117
|
+
type: TxStepItem,
|
|
118
|
+
deps: [],
|
|
119
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
120
|
+
});
|
|
121
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
122
|
+
minVersion: "17.1.0",
|
|
123
|
+
version: "22.2.3",
|
|
124
|
+
type: TxStepItem,
|
|
125
|
+
isStandalone: true,
|
|
126
|
+
selector: "tx-step-item",
|
|
127
|
+
inputs: { value: {
|
|
128
|
+
classPropertyName: "value",
|
|
129
|
+
publicName: "value",
|
|
130
|
+
isSignal: true,
|
|
131
|
+
isRequired: true,
|
|
132
|
+
transformFunction: null
|
|
133
|
+
} },
|
|
134
|
+
host: {
|
|
135
|
+
properties: {
|
|
136
|
+
"class": "stepper.passThrough().item?.class",
|
|
137
|
+
"style": "stepper.passThrough().item?.style",
|
|
138
|
+
"class.tx-step-item--active": "active()",
|
|
139
|
+
"class.tx-step-item--completed": "completed()",
|
|
140
|
+
"class.tx-step-item--last": "last()"
|
|
141
|
+
},
|
|
142
|
+
classAttribute: "tx-step-item"
|
|
143
|
+
},
|
|
144
|
+
ngImport: i0,
|
|
145
|
+
template: "<ng-content />",
|
|
146
|
+
isInline: true,
|
|
147
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
151
|
+
minVersion: "12.0.0",
|
|
152
|
+
version: "22.2.3",
|
|
153
|
+
ngImport: i0,
|
|
154
|
+
type: TxStepItem,
|
|
155
|
+
decorators: [{
|
|
156
|
+
type: Component,
|
|
157
|
+
args: [{
|
|
158
|
+
selector: "tx-step-item",
|
|
159
|
+
template: "<ng-content />",
|
|
160
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
161
|
+
host: {
|
|
162
|
+
class: "tx-step-item",
|
|
163
|
+
"[class]": "stepper.passThrough().item?.class",
|
|
164
|
+
"[style]": "stepper.passThrough().item?.style",
|
|
165
|
+
"[class.tx-step-item--active]": "active()",
|
|
166
|
+
"[class.tx-step-item--completed]": "completed()",
|
|
167
|
+
"[class.tx-step-item--last]": "last()"
|
|
168
|
+
}
|
|
169
|
+
}]
|
|
170
|
+
}],
|
|
171
|
+
propDecorators: { value: [{
|
|
172
|
+
type: i0.Input,
|
|
173
|
+
args: [{
|
|
174
|
+
isSignal: true,
|
|
175
|
+
alias: "value",
|
|
176
|
+
required: true
|
|
177
|
+
}]
|
|
178
|
+
}] }
|
|
179
|
+
});
|
|
180
|
+
var TxStep = class TxStep {
|
|
181
|
+
stepper = inject(TxStepperRef);
|
|
182
|
+
item = inject(TxStepItem, { optional: true });
|
|
183
|
+
value = input(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
184
|
+
disabled = input(false, {
|
|
185
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
186
|
+
transform: booleanAttribute
|
|
187
|
+
});
|
|
188
|
+
contentTemplate = contentChild(TxStepContent, ...ngDevMode ? [{ debugName: "contentTemplate" }] : /* istanbul ignore next */ []);
|
|
189
|
+
header = viewChild("header", ...ngDevMode ? [{ debugName: "header" }] : /* istanbul ignore next */ []);
|
|
190
|
+
inItem = !!this.item;
|
|
191
|
+
resolvedValue = computed(() => this.value() ?? this.item?.value(), ...ngDevMode ? [{ debugName: "resolvedValue" }] : /* istanbul ignore next */ []);
|
|
192
|
+
index = computed(() => this.stepper.indexOf(this.resolvedValue()), ...ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []);
|
|
193
|
+
active = computed(() => this.stepper.isActive(this.resolvedValue()), ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
|
|
194
|
+
completed = computed(() => this.stepper.isCompleted(this.resolvedValue()), ...ngDevMode ? [{ debugName: "completed" }] : /* istanbul ignore next */ []);
|
|
195
|
+
isDisabled = computed(() => this.disabled() || this.stepper.linear() && !this.active(), ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
|
|
196
|
+
showSeparator = computed(() => !this.inItem && !this.stepper.isLast(this.resolvedValue()), ...ngDevMode ? [{ debugName: "showSeparator" }] : /* istanbul ignore next */ []);
|
|
197
|
+
stepId = computed(() => this.stepper.stepId(this.resolvedValue()), ...ngDevMode ? [{ debugName: "stepId" }] : /* istanbul ignore next */ []);
|
|
198
|
+
panelId = computed(() => this.stepper.hasPanel(this.resolvedValue()) ? this.stepper.panelId(this.resolvedValue()) : null, ...ngDevMode ? [{ debugName: "panelId" }] : /* istanbul ignore next */ []);
|
|
199
|
+
tabIndex = computed(() => {
|
|
200
|
+
if (this.inItem || this.isDisabled()) return null;
|
|
201
|
+
return this.active() || this.stepper.activeIndex() < 0 && this.stepper.firstEnabled() === this.resolvedValue() ? 0 : -1;
|
|
202
|
+
}, ...ngDevMode ? [{ debugName: "tabIndex" }] : /* istanbul ignore next */ []);
|
|
203
|
+
context = computed(() => {
|
|
204
|
+
const value = this.resolvedValue() ?? "";
|
|
205
|
+
return {
|
|
206
|
+
$implicit: value,
|
|
207
|
+
value,
|
|
208
|
+
index: this.index(),
|
|
209
|
+
active: this.active(),
|
|
210
|
+
completed: this.completed(),
|
|
211
|
+
disabled: this.isDisabled(),
|
|
212
|
+
activate: (target) => this.stepper.activate(target)
|
|
213
|
+
};
|
|
214
|
+
}, ...ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []);
|
|
215
|
+
focus() {
|
|
216
|
+
this.header()?.nativeElement.focus();
|
|
217
|
+
}
|
|
218
|
+
select() {
|
|
219
|
+
const value = this.resolvedValue();
|
|
220
|
+
if (!this.isDisabled() && value !== void 0) this.stepper.activate(value);
|
|
221
|
+
}
|
|
222
|
+
onKeydown(event) {
|
|
223
|
+
if (!this.inItem && this.stepper.focusSibling(this.resolvedValue(), event.key)) event.preventDefault();
|
|
224
|
+
}
|
|
225
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
226
|
+
minVersion: "12.0.0",
|
|
227
|
+
version: "22.2.3",
|
|
228
|
+
ngImport: i0,
|
|
229
|
+
type: TxStep,
|
|
230
|
+
deps: [],
|
|
231
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
232
|
+
});
|
|
233
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
234
|
+
minVersion: "17.0.0",
|
|
235
|
+
version: "22.2.3",
|
|
236
|
+
type: TxStep,
|
|
237
|
+
isStandalone: true,
|
|
238
|
+
selector: "tx-step",
|
|
239
|
+
inputs: {
|
|
240
|
+
value: {
|
|
241
|
+
classPropertyName: "value",
|
|
242
|
+
publicName: "value",
|
|
243
|
+
isSignal: true,
|
|
244
|
+
isRequired: false,
|
|
245
|
+
transformFunction: null
|
|
246
|
+
},
|
|
247
|
+
disabled: {
|
|
248
|
+
classPropertyName: "disabled",
|
|
249
|
+
publicName: "disabled",
|
|
250
|
+
isSignal: true,
|
|
251
|
+
isRequired: false,
|
|
252
|
+
transformFunction: null
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
host: {
|
|
256
|
+
attributes: { "role": "presentation" },
|
|
257
|
+
properties: {
|
|
258
|
+
"class": "stepper.passThrough().step?.class",
|
|
259
|
+
"style": "stepper.passThrough().step?.style",
|
|
260
|
+
"class.tx-step--active": "active()",
|
|
261
|
+
"class.tx-step--completed": "completed()",
|
|
262
|
+
"class.tx-step--disabled": "disabled()"
|
|
263
|
+
},
|
|
264
|
+
classAttribute: "tx-step"
|
|
265
|
+
},
|
|
266
|
+
queries: [{
|
|
267
|
+
propertyName: "contentTemplate",
|
|
268
|
+
first: true,
|
|
269
|
+
predicate: TxStepContent,
|
|
270
|
+
descendants: true,
|
|
271
|
+
isSignal: true
|
|
272
|
+
}],
|
|
273
|
+
viewQueries: [{
|
|
274
|
+
propertyName: "header",
|
|
275
|
+
first: true,
|
|
276
|
+
predicate: ["header"],
|
|
277
|
+
descendants: true,
|
|
278
|
+
isSignal: true
|
|
279
|
+
}],
|
|
280
|
+
ngImport: i0,
|
|
281
|
+
template: "@if (contentTemplate(); as template) {\n <ng-container *ngTemplateOutlet=\"template.templateRef; context: context()\" />\n} @else {\n <button\n #header\n type=\"button\"\n class=\"tx-step__header\"\n [class]=\"stepper.passThrough().header?.class\"\n [style]=\"stepper.passThrough().header?.style\"\n [id]=\"stepId()\"\n [attr.role]=\"inItem ? null : 'tab'\"\n [attr.aria-selected]=\"inItem ? null : active()\"\n [attr.aria-expanded]=\"inItem && panelId() ? active() : null\"\n [attr.aria-controls]=\"panelId()\"\n [attr.aria-current]=\"active() ? 'step' : null\"\n [attr.tabindex]=\"tabIndex()\"\n [disabled]=\"isDisabled()\"\n (click)=\"select()\"\n (keydown)=\"onKeydown($event)\"\n >\n <span class=\"tx-step__number\" [class]=\"stepper.passThrough().number?.class\" [style]=\"stepper.passThrough().number?.style\">{{ index() + 1 }}</span>\n <span class=\"tx-step__title\" [class]=\"stepper.passThrough().title?.class\" [style]=\"stepper.passThrough().title?.style\"><ng-content /></span>\n </button>\n}\n@if (showSeparator()) {\n <span class=\"tx-stepper__separator\" aria-hidden=\"true\" [class]=\"stepper.passThrough().separator?.class\" [style]=\"stepper.passThrough().separator?.style\"></span>\n}\n",
|
|
282
|
+
dependencies: [{
|
|
283
|
+
kind: "directive",
|
|
284
|
+
type: NgTemplateOutlet,
|
|
285
|
+
selector: "[ngTemplateOutlet]",
|
|
286
|
+
inputs: [
|
|
287
|
+
"ngTemplateOutletContext",
|
|
288
|
+
"ngTemplateOutlet",
|
|
289
|
+
"ngTemplateOutletInjector"
|
|
290
|
+
]
|
|
291
|
+
}],
|
|
292
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
293
|
+
});
|
|
294
|
+
};
|
|
295
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
296
|
+
minVersion: "12.0.0",
|
|
297
|
+
version: "22.2.3",
|
|
298
|
+
ngImport: i0,
|
|
299
|
+
type: TxStep,
|
|
300
|
+
decorators: [{
|
|
301
|
+
type: Component,
|
|
302
|
+
args: [{
|
|
303
|
+
selector: "tx-step",
|
|
304
|
+
imports: [NgTemplateOutlet],
|
|
305
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
306
|
+
host: {
|
|
307
|
+
class: "tx-step",
|
|
308
|
+
role: "presentation",
|
|
309
|
+
"[class]": "stepper.passThrough().step?.class",
|
|
310
|
+
"[style]": "stepper.passThrough().step?.style",
|
|
311
|
+
"[class.tx-step--active]": "active()",
|
|
312
|
+
"[class.tx-step--completed]": "completed()",
|
|
313
|
+
"[class.tx-step--disabled]": "disabled()"
|
|
314
|
+
},
|
|
315
|
+
template: "@if (contentTemplate(); as template) {\n <ng-container *ngTemplateOutlet=\"template.templateRef; context: context()\" />\n} @else {\n <button\n #header\n type=\"button\"\n class=\"tx-step__header\"\n [class]=\"stepper.passThrough().header?.class\"\n [style]=\"stepper.passThrough().header?.style\"\n [id]=\"stepId()\"\n [attr.role]=\"inItem ? null : 'tab'\"\n [attr.aria-selected]=\"inItem ? null : active()\"\n [attr.aria-expanded]=\"inItem && panelId() ? active() : null\"\n [attr.aria-controls]=\"panelId()\"\n [attr.aria-current]=\"active() ? 'step' : null\"\n [attr.tabindex]=\"tabIndex()\"\n [disabled]=\"isDisabled()\"\n (click)=\"select()\"\n (keydown)=\"onKeydown($event)\"\n >\n <span class=\"tx-step__number\" [class]=\"stepper.passThrough().number?.class\" [style]=\"stepper.passThrough().number?.style\">{{ index() + 1 }}</span>\n <span class=\"tx-step__title\" [class]=\"stepper.passThrough().title?.class\" [style]=\"stepper.passThrough().title?.style\"><ng-content /></span>\n </button>\n}\n@if (showSeparator()) {\n <span class=\"tx-stepper__separator\" aria-hidden=\"true\" [class]=\"stepper.passThrough().separator?.class\" [style]=\"stepper.passThrough().separator?.style\"></span>\n}\n"
|
|
316
|
+
}]
|
|
317
|
+
}],
|
|
318
|
+
propDecorators: {
|
|
319
|
+
value: [{
|
|
320
|
+
type: i0.Input,
|
|
321
|
+
args: [{
|
|
322
|
+
isSignal: true,
|
|
323
|
+
alias: "value",
|
|
324
|
+
required: false
|
|
325
|
+
}]
|
|
326
|
+
}],
|
|
327
|
+
disabled: [{
|
|
328
|
+
type: i0.Input,
|
|
329
|
+
args: [{
|
|
330
|
+
isSignal: true,
|
|
331
|
+
alias: "disabled",
|
|
332
|
+
required: false
|
|
333
|
+
}]
|
|
334
|
+
}],
|
|
335
|
+
contentTemplate: [{
|
|
336
|
+
type: i0.ContentChild,
|
|
337
|
+
args: [i0.forwardRef(() => TxStepContent), { isSignal: true }]
|
|
338
|
+
}],
|
|
339
|
+
header: [{
|
|
340
|
+
type: i0.ViewChild,
|
|
341
|
+
args: ["header", { isSignal: true }]
|
|
342
|
+
}]
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
var TxStepList = class TxStepList {
|
|
346
|
+
stepper = inject(TxStepperRef);
|
|
347
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
348
|
+
minVersion: "12.0.0",
|
|
349
|
+
version: "22.2.3",
|
|
350
|
+
ngImport: i0,
|
|
351
|
+
type: TxStepList,
|
|
352
|
+
deps: [],
|
|
353
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
354
|
+
});
|
|
355
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
356
|
+
minVersion: "14.0.0",
|
|
357
|
+
version: "22.2.3",
|
|
358
|
+
type: TxStepList,
|
|
359
|
+
isStandalone: true,
|
|
360
|
+
selector: "tx-step-list",
|
|
361
|
+
host: {
|
|
362
|
+
attributes: {
|
|
363
|
+
"role": "tablist",
|
|
364
|
+
"aria-orientation": "horizontal"
|
|
365
|
+
},
|
|
366
|
+
properties: {
|
|
367
|
+
"class": "stepper.passThrough().list?.class",
|
|
368
|
+
"style": "stepper.passThrough().list?.style"
|
|
369
|
+
},
|
|
370
|
+
classAttribute: "tx-step-list"
|
|
371
|
+
},
|
|
372
|
+
ngImport: i0,
|
|
373
|
+
template: "<ng-content />",
|
|
374
|
+
isInline: true,
|
|
375
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
376
|
+
});
|
|
377
|
+
};
|
|
378
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
379
|
+
minVersion: "12.0.0",
|
|
380
|
+
version: "22.2.3",
|
|
381
|
+
ngImport: i0,
|
|
382
|
+
type: TxStepList,
|
|
383
|
+
decorators: [{
|
|
384
|
+
type: Component,
|
|
385
|
+
args: [{
|
|
386
|
+
selector: "tx-step-list",
|
|
387
|
+
template: "<ng-content />",
|
|
388
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
389
|
+
host: {
|
|
390
|
+
class: "tx-step-list",
|
|
391
|
+
role: "tablist",
|
|
392
|
+
"aria-orientation": "horizontal",
|
|
393
|
+
"[class]": "stepper.passThrough().list?.class",
|
|
394
|
+
"[style]": "stepper.passThrough().list?.style"
|
|
395
|
+
}
|
|
396
|
+
}]
|
|
397
|
+
}]
|
|
398
|
+
});
|
|
399
|
+
var TxStepPanels = class TxStepPanels {
|
|
400
|
+
stepper = inject(TxStepperRef);
|
|
401
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
402
|
+
minVersion: "12.0.0",
|
|
403
|
+
version: "22.2.3",
|
|
404
|
+
ngImport: i0,
|
|
405
|
+
type: TxStepPanels,
|
|
406
|
+
deps: [],
|
|
407
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
408
|
+
});
|
|
409
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
410
|
+
minVersion: "14.0.0",
|
|
411
|
+
version: "22.2.3",
|
|
412
|
+
type: TxStepPanels,
|
|
413
|
+
isStandalone: true,
|
|
414
|
+
selector: "tx-step-panels",
|
|
415
|
+
host: {
|
|
416
|
+
properties: {
|
|
417
|
+
"class": "stepper.passThrough().panels?.class",
|
|
418
|
+
"style": "stepper.passThrough().panels?.style"
|
|
419
|
+
},
|
|
420
|
+
classAttribute: "tx-step-panels"
|
|
421
|
+
},
|
|
422
|
+
ngImport: i0,
|
|
423
|
+
template: "<ng-content />",
|
|
424
|
+
isInline: true,
|
|
425
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
426
|
+
});
|
|
427
|
+
};
|
|
428
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
429
|
+
minVersion: "12.0.0",
|
|
430
|
+
version: "22.2.3",
|
|
431
|
+
ngImport: i0,
|
|
432
|
+
type: TxStepPanels,
|
|
433
|
+
decorators: [{
|
|
434
|
+
type: Component,
|
|
435
|
+
args: [{
|
|
436
|
+
selector: "tx-step-panels",
|
|
437
|
+
template: "<ng-content />",
|
|
438
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
439
|
+
host: {
|
|
440
|
+
class: "tx-step-panels",
|
|
441
|
+
"[class]": "stepper.passThrough().panels?.class",
|
|
442
|
+
"[style]": "stepper.passThrough().panels?.style"
|
|
443
|
+
}
|
|
444
|
+
}]
|
|
445
|
+
}]
|
|
446
|
+
});
|
|
447
|
+
var TxStepPanel = class TxStepPanel {
|
|
448
|
+
stepper = inject(TxStepperRef);
|
|
449
|
+
item = inject(TxStepItem, { optional: true });
|
|
450
|
+
value = input(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
451
|
+
contentTemplate = contentChild(TxStepPanelContent, ...ngDevMode ? [{ debugName: "contentTemplate" }] : /* istanbul ignore next */ []);
|
|
452
|
+
inItem = !!this.item;
|
|
453
|
+
resolvedValue = computed(() => this.value() ?? this.item?.value(), ...ngDevMode ? [{ debugName: "resolvedValue" }] : /* istanbul ignore next */ []);
|
|
454
|
+
active = computed(() => this.stepper.isActive(this.resolvedValue()), ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
|
|
455
|
+
panelId = computed(() => this.stepper.panelId(this.resolvedValue()), ...ngDevMode ? [{ debugName: "panelId" }] : /* istanbul ignore next */ []);
|
|
456
|
+
visited = linkedSignal({
|
|
457
|
+
...ngDevMode ? { debugName: "visited" } : /* istanbul ignore next */ {},
|
|
458
|
+
source: this.active,
|
|
459
|
+
computation: (active, previous) => active || (previous?.value ?? false)
|
|
460
|
+
});
|
|
461
|
+
context = computed(() => {
|
|
462
|
+
const activate = (target) => this.stepper.activate(target);
|
|
463
|
+
return {
|
|
464
|
+
$implicit: activate,
|
|
465
|
+
activate,
|
|
466
|
+
value: this.resolvedValue() ?? "",
|
|
467
|
+
index: this.stepper.indexOf(this.resolvedValue()),
|
|
468
|
+
active: this.active()
|
|
469
|
+
};
|
|
470
|
+
}, ...ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []);
|
|
471
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
472
|
+
minVersion: "12.0.0",
|
|
473
|
+
version: "22.2.3",
|
|
474
|
+
ngImport: i0,
|
|
475
|
+
type: TxStepPanel,
|
|
476
|
+
deps: [],
|
|
477
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
478
|
+
});
|
|
479
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
480
|
+
minVersion: "17.0.0",
|
|
481
|
+
version: "22.2.3",
|
|
482
|
+
type: TxStepPanel,
|
|
483
|
+
isStandalone: true,
|
|
484
|
+
selector: "tx-step-panel",
|
|
485
|
+
inputs: { value: {
|
|
486
|
+
classPropertyName: "value",
|
|
487
|
+
publicName: "value",
|
|
488
|
+
isSignal: true,
|
|
489
|
+
isRequired: false,
|
|
490
|
+
transformFunction: null
|
|
491
|
+
} },
|
|
492
|
+
host: {
|
|
493
|
+
properties: {
|
|
494
|
+
"class": "stepper.passThrough().panel?.class",
|
|
495
|
+
"style": "stepper.passThrough().panel?.style",
|
|
496
|
+
"class.tx-step-panel--active": "active()",
|
|
497
|
+
"id": "panelId()",
|
|
498
|
+
"attr.role": "inItem ? \"region\" : \"tabpanel\"",
|
|
499
|
+
"attr.aria-labelledby": "stepper.stepId(resolvedValue())",
|
|
500
|
+
"attr.hidden": "!inItem && !active() ? \"\" : null",
|
|
501
|
+
"attr.inert": "inItem && !active() ? \"\" : null"
|
|
502
|
+
},
|
|
503
|
+
classAttribute: "tx-step-panel"
|
|
504
|
+
},
|
|
505
|
+
queries: [{
|
|
506
|
+
propertyName: "contentTemplate",
|
|
507
|
+
first: true,
|
|
508
|
+
predicate: TxStepPanelContent,
|
|
509
|
+
descendants: true,
|
|
510
|
+
isSignal: true
|
|
511
|
+
}],
|
|
512
|
+
ngImport: i0,
|
|
513
|
+
template: "@if (inItem) {\n <div class=\"tx-step-panel__collapse\">\n <div class=\"tx-step-panel__wrapper\">\n <span class=\"tx-stepper__separator tx-step-panel__separator\" aria-hidden=\"true\" [class]=\"stepper.passThrough().separator?.class\" [style]=\"stepper.passThrough().separator?.style\"></span>\n <div class=\"tx-step-panel__content\">\n <ng-container *ngTemplateOutlet=\"body\" />\n </div>\n </div>\n </div>\n} @else {\n <ng-container *ngTemplateOutlet=\"body\" />\n}\n<ng-template #body>\n @if (contentTemplate(); as template) {\n @if (visited()) {\n <ng-container *ngTemplateOutlet=\"template.templateRef; context: context()\" />\n }\n }\n <ng-content />\n</ng-template>\n",
|
|
514
|
+
dependencies: [{
|
|
515
|
+
kind: "directive",
|
|
516
|
+
type: NgTemplateOutlet,
|
|
517
|
+
selector: "[ngTemplateOutlet]",
|
|
518
|
+
inputs: [
|
|
519
|
+
"ngTemplateOutletContext",
|
|
520
|
+
"ngTemplateOutlet",
|
|
521
|
+
"ngTemplateOutletInjector"
|
|
522
|
+
]
|
|
523
|
+
}],
|
|
524
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
525
|
+
});
|
|
526
|
+
};
|
|
527
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
528
|
+
minVersion: "12.0.0",
|
|
529
|
+
version: "22.2.3",
|
|
530
|
+
ngImport: i0,
|
|
531
|
+
type: TxStepPanel,
|
|
532
|
+
decorators: [{
|
|
533
|
+
type: Component,
|
|
534
|
+
args: [{
|
|
535
|
+
selector: "tx-step-panel",
|
|
536
|
+
imports: [NgTemplateOutlet],
|
|
537
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
538
|
+
host: {
|
|
539
|
+
class: "tx-step-panel",
|
|
540
|
+
"[class]": "stepper.passThrough().panel?.class",
|
|
541
|
+
"[style]": "stepper.passThrough().panel?.style",
|
|
542
|
+
"[class.tx-step-panel--active]": "active()",
|
|
543
|
+
"[id]": "panelId()",
|
|
544
|
+
"[attr.role]": "inItem ? \"region\" : \"tabpanel\"",
|
|
545
|
+
"[attr.aria-labelledby]": "stepper.stepId(resolvedValue())",
|
|
546
|
+
"[attr.hidden]": "!inItem && !active() ? \"\" : null",
|
|
547
|
+
"[attr.inert]": "inItem && !active() ? \"\" : null"
|
|
548
|
+
},
|
|
549
|
+
template: "@if (inItem) {\n <div class=\"tx-step-panel__collapse\">\n <div class=\"tx-step-panel__wrapper\">\n <span class=\"tx-stepper__separator tx-step-panel__separator\" aria-hidden=\"true\" [class]=\"stepper.passThrough().separator?.class\" [style]=\"stepper.passThrough().separator?.style\"></span>\n <div class=\"tx-step-panel__content\">\n <ng-container *ngTemplateOutlet=\"body\" />\n </div>\n </div>\n </div>\n} @else {\n <ng-container *ngTemplateOutlet=\"body\" />\n}\n<ng-template #body>\n @if (contentTemplate(); as template) {\n @if (visited()) {\n <ng-container *ngTemplateOutlet=\"template.templateRef; context: context()\" />\n }\n }\n <ng-content />\n</ng-template>\n"
|
|
550
|
+
}]
|
|
551
|
+
}],
|
|
552
|
+
propDecorators: {
|
|
553
|
+
value: [{
|
|
554
|
+
type: i0.Input,
|
|
555
|
+
args: [{
|
|
556
|
+
isSignal: true,
|
|
557
|
+
alias: "value",
|
|
558
|
+
required: false
|
|
559
|
+
}]
|
|
560
|
+
}],
|
|
561
|
+
contentTemplate: [{
|
|
562
|
+
type: i0.ContentChild,
|
|
563
|
+
args: [i0.forwardRef(() => TxStepPanelContent), { isSignal: true }]
|
|
564
|
+
}]
|
|
565
|
+
}
|
|
566
|
+
});
|
|
567
|
+
const NEXT_KEYS$1 = ["ArrowRight", "ArrowDown"];
|
|
568
|
+
const PREVIOUS_KEYS$1 = ["ArrowLeft", "ArrowUp"];
|
|
569
|
+
var TxStepper = class TxStepper extends TxStepperRef {
|
|
570
|
+
id = uniqueId("tx-stepper");
|
|
571
|
+
value = model(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
572
|
+
linear = input(false, {
|
|
573
|
+
...ngDevMode ? { debugName: "linear" } : /* istanbul ignore next */ {},
|
|
574
|
+
transform: booleanAttribute
|
|
575
|
+
});
|
|
576
|
+
dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
|
|
577
|
+
pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
|
|
578
|
+
ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
|
|
579
|
+
unstyled = input(void 0, {
|
|
580
|
+
...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
|
|
581
|
+
transform: optionalBoolean
|
|
582
|
+
});
|
|
583
|
+
steps = contentChildren(TxStep, {
|
|
584
|
+
...ngDevMode ? { debugName: "steps" } : /* istanbul ignore next */ {},
|
|
585
|
+
descendants: true
|
|
586
|
+
});
|
|
587
|
+
items = contentChildren(TxStepItem, {
|
|
588
|
+
...ngDevMode ? { debugName: "items" } : /* istanbul ignore next */ {},
|
|
589
|
+
descendants: true
|
|
590
|
+
});
|
|
591
|
+
panels = contentChildren(TxStepPanel, {
|
|
592
|
+
...ngDevMode ? { debugName: "panels" } : /* istanbul ignore next */ {},
|
|
593
|
+
descendants: true
|
|
594
|
+
});
|
|
595
|
+
isUnstyled = injectUnstyled(this.unstyled);
|
|
596
|
+
passThrough = injectPassThrough("stepper", this, this.pt, this.ptOptions);
|
|
597
|
+
hostStyle = computed(() => ({
|
|
598
|
+
...toStyleObject(this.dt(), "--tx-stepper"),
|
|
599
|
+
...this.passThrough().root?.style
|
|
600
|
+
}), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
|
|
601
|
+
vertical = computed(() => this.items().length > 0, ...ngDevMode ? [{ debugName: "vertical" }] : /* istanbul ignore next */ []);
|
|
602
|
+
values = computed(() => this.steps().map((step) => step.resolvedValue()), ...ngDevMode ? [{ debugName: "values" }] : /* istanbul ignore next */ []);
|
|
603
|
+
panelValues = computed(() => new Set(this.panels().map((panel) => panel.resolvedValue())), ...ngDevMode ? [{ debugName: "panelValues" }] : /* istanbul ignore next */ []);
|
|
604
|
+
activeIndex = computed(() => this.indexOf(this.value()), ...ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []);
|
|
605
|
+
indexOf(value) {
|
|
606
|
+
return value === void 0 ? -1 : this.values().indexOf(value);
|
|
607
|
+
}
|
|
608
|
+
isActive(value) {
|
|
609
|
+
return value !== void 0 && value === this.value();
|
|
610
|
+
}
|
|
611
|
+
isCompleted(value) {
|
|
612
|
+
const index = this.indexOf(value);
|
|
613
|
+
return index >= 0 && index < this.activeIndex();
|
|
614
|
+
}
|
|
615
|
+
isLast(value) {
|
|
616
|
+
const values = this.values();
|
|
617
|
+
return values.length > 0 && values[values.length - 1] === value;
|
|
618
|
+
}
|
|
619
|
+
hasPanel(value) {
|
|
620
|
+
return value !== void 0 && this.panelValues().has(value);
|
|
621
|
+
}
|
|
622
|
+
firstEnabled() {
|
|
623
|
+
return this.steps().find((step) => !step.isDisabled())?.resolvedValue();
|
|
624
|
+
}
|
|
625
|
+
activate(value) {
|
|
626
|
+
this.value.set(value);
|
|
627
|
+
}
|
|
628
|
+
stepId(value) {
|
|
629
|
+
return `${this.id}-step-${this.slug(value)}`;
|
|
630
|
+
}
|
|
631
|
+
panelId(value) {
|
|
632
|
+
return `${this.id}-panel-${this.slug(value)}`;
|
|
633
|
+
}
|
|
634
|
+
focusSibling(from, key) {
|
|
635
|
+
const enabled = this.steps().filter((step) => !step.inItem && !step.isDisabled());
|
|
636
|
+
if (!enabled.length) return false;
|
|
637
|
+
const current = enabled.findIndex((step) => step.resolvedValue() === from);
|
|
638
|
+
let target;
|
|
639
|
+
if (NEXT_KEYS$1.includes(key)) target = enabled[(current + 1) % enabled.length];
|
|
640
|
+
else if (PREVIOUS_KEYS$1.includes(key)) target = enabled[(current - 1 + enabled.length) % enabled.length];
|
|
641
|
+
else if (key === "Home") target = enabled[0];
|
|
642
|
+
else if (key === "End") target = enabled[enabled.length - 1];
|
|
643
|
+
target?.focus();
|
|
644
|
+
return !!target;
|
|
645
|
+
}
|
|
646
|
+
slug(value) {
|
|
647
|
+
return String(value ?? "").replace(/[^\w-]/g, "_");
|
|
648
|
+
}
|
|
649
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
650
|
+
minVersion: "12.0.0",
|
|
651
|
+
version: "22.2.3",
|
|
652
|
+
ngImport: i0,
|
|
653
|
+
type: TxStepper,
|
|
654
|
+
deps: null,
|
|
655
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
656
|
+
});
|
|
657
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
658
|
+
minVersion: "17.2.0",
|
|
659
|
+
version: "22.2.3",
|
|
660
|
+
type: TxStepper,
|
|
661
|
+
isStandalone: true,
|
|
662
|
+
selector: "tx-stepper",
|
|
663
|
+
inputs: {
|
|
664
|
+
value: {
|
|
665
|
+
classPropertyName: "value",
|
|
666
|
+
publicName: "value",
|
|
667
|
+
isSignal: true,
|
|
668
|
+
isRequired: false,
|
|
669
|
+
transformFunction: null
|
|
670
|
+
},
|
|
671
|
+
linear: {
|
|
672
|
+
classPropertyName: "linear",
|
|
673
|
+
publicName: "linear",
|
|
674
|
+
isSignal: true,
|
|
675
|
+
isRequired: false,
|
|
676
|
+
transformFunction: null
|
|
677
|
+
},
|
|
678
|
+
dt: {
|
|
679
|
+
classPropertyName: "dt",
|
|
680
|
+
publicName: "dt",
|
|
681
|
+
isSignal: true,
|
|
682
|
+
isRequired: false,
|
|
683
|
+
transformFunction: null
|
|
684
|
+
},
|
|
685
|
+
pt: {
|
|
686
|
+
classPropertyName: "pt",
|
|
687
|
+
publicName: "pt",
|
|
688
|
+
isSignal: true,
|
|
689
|
+
isRequired: false,
|
|
690
|
+
transformFunction: null
|
|
691
|
+
},
|
|
692
|
+
ptOptions: {
|
|
693
|
+
classPropertyName: "ptOptions",
|
|
694
|
+
publicName: "ptOptions",
|
|
695
|
+
isSignal: true,
|
|
696
|
+
isRequired: false,
|
|
697
|
+
transformFunction: null
|
|
698
|
+
},
|
|
699
|
+
unstyled: {
|
|
700
|
+
classPropertyName: "unstyled",
|
|
701
|
+
publicName: "unstyled",
|
|
702
|
+
isSignal: true,
|
|
703
|
+
isRequired: false,
|
|
704
|
+
transformFunction: null
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
outputs: { value: "valueChange" },
|
|
708
|
+
host: {
|
|
709
|
+
properties: {
|
|
710
|
+
"class": "passThrough().root?.class",
|
|
711
|
+
"style": "hostStyle()",
|
|
712
|
+
"attr.data-styled": "!isUnstyled() || null",
|
|
713
|
+
"class.tx-stepper--vertical": "vertical()",
|
|
714
|
+
"class.tx-stepper--linear": "linear()"
|
|
715
|
+
},
|
|
716
|
+
classAttribute: "tx-stepper"
|
|
717
|
+
},
|
|
718
|
+
providers: [{
|
|
719
|
+
provide: TxStepperRef,
|
|
720
|
+
useExisting: TxStepper
|
|
721
|
+
}],
|
|
722
|
+
queries: [
|
|
723
|
+
{
|
|
724
|
+
propertyName: "steps",
|
|
725
|
+
predicate: TxStep,
|
|
726
|
+
descendants: true,
|
|
727
|
+
isSignal: true
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
propertyName: "items",
|
|
731
|
+
predicate: TxStepItem,
|
|
732
|
+
descendants: true,
|
|
733
|
+
isSignal: true
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
propertyName: "panels",
|
|
737
|
+
predicate: TxStepPanel,
|
|
738
|
+
descendants: true,
|
|
739
|
+
isSignal: true
|
|
740
|
+
}
|
|
741
|
+
],
|
|
742
|
+
usesInheritance: true,
|
|
743
|
+
ngImport: i0,
|
|
744
|
+
template: "<ng-content />",
|
|
745
|
+
isInline: true,
|
|
746
|
+
styles: [".tx-stepper{display:block;min-width:0}.tx-stepper--vertical{display:flex;flex-direction:column}.tx-step-list{position:relative;display:flex;justify-content:space-between;align-items:center;overflow-x:auto}.tx-step{position:relative;display:flex;flex:1 1 auto;align-items:center;min-width:0}.tx-step:last-of-type,.tx-step-item .tx-step{flex:initial}.tx-step__header{display:inline-flex;align-items:center;min-width:0;margin:0;border:0;background:transparent;color:inherit;font:inherit;text-align:start;cursor:pointer}.tx-step__header:disabled{cursor:default}.tx-step--active .tx-step__header{cursor:default}.tx-step__title{display:block;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-step__number{position:relative;display:flex;flex-shrink:0;align-items:center;justify-content:center}.tx-stepper__separator{display:block;flex:1 1 0}.tx-step-item{display:flex;flex-direction:column;flex:initial}.tx-step-item--active{flex:1 1 auto}.tx-step-panel{display:block}.tx-step-panel[hidden]{display:none}.tx-step-item .tx-step-panel{display:grid;grid-template-rows:0fr}.tx-step-item--active .tx-step-panel{grid-template-rows:1fr}.tx-step-panel__collapse{min-height:0;overflow:hidden}.tx-step-item:not(.tx-step-item--active) .tx-step-panel__collapse{visibility:hidden}.tx-step-panel__wrapper{display:flex;min-height:0}.tx-step-panel__content{flex:1 1 auto;min-width:0}.tx-stepper[data-styled]{--_duration: var(--tx-stepper-transition-duration);--_panel-duration: var(--tx-stepper-panel-transition-duration);--_number: var(--tx-stepper-step-number-size);--_separator: var(--tx-stepper-separator-size);font-family:var(--tx-font-family)}.tx-stepper[data-styled] .tx-step{gap:var(--tx-stepper-step-gap);padding:var(--tx-stepper-step-padding)}.tx-stepper[data-styled] .tx-step__header{gap:var(--tx-stepper-step-header-gap);padding:var(--tx-stepper-step-header-padding);border-radius:var(--tx-stepper-step-header-border-radius);outline:0 solid transparent;transition:color var(--_duration),outline-color var(--_duration),box-shadow var(--_duration)}.tx-stepper[data-styled] .tx-step__header:focus-visible{outline:var(--tx-stepper-step-header-focus-ring-width) var(--tx-stepper-step-header-focus-ring-style) var(--tx-stepper-step-header-focus-ring-color);outline-offset:var(--tx-stepper-step-header-focus-ring-offset);box-shadow:var(--tx-stepper-step-header-focus-ring-shadow)}.tx-stepper[data-styled] .tx-step__title{color:var(--tx-stepper-step-title-color);font-size:var(--tx-stepper-step-title-font-size);font-weight:var(--tx-stepper-step-title-font-weight);transition:color var(--_duration)}.tx-stepper[data-styled] .tx-step__number{z-index:1;min-width:var(--_number);height:var(--_number);border:var(--tx-stepper-step-number-border-width) solid var(--tx-stepper-step-number-border-color);border-radius:var(--tx-stepper-step-number-border-radius);background:var(--tx-stepper-step-number-background);color:var(--tx-stepper-step-number-color);font-size:var(--tx-stepper-step-number-font-size);font-weight:var(--tx-stepper-step-number-font-weight);line-height:var(--_number);transition:color var(--_duration),background-color var(--_duration),border-color var(--_duration)}.tx-stepper[data-styled] .tx-step__number:after{content:\"\";position:absolute;inset:0;border-radius:inherit;box-shadow:var(--tx-stepper-step-number-shadow)}.tx-stepper[data-styled] .tx-step--active .tx-step__number{border-color:var(--tx-stepper-step-number-active-border-color);background:var(--tx-stepper-step-number-active-background);color:var(--tx-stepper-step-number-active-color)}.tx-stepper[data-styled] .tx-step--active .tx-step__title{color:var(--tx-stepper-step-title-active-color)}.tx-stepper[data-styled] .tx-step--disabled .tx-step__header{opacity:var(--tx-stepper-step-header-disabled-opacity)}.tx-stepper[data-styled] .tx-stepper__separator{width:100%;height:var(--_separator);background:var(--tx-stepper-separator-background);transition:background-color var(--_duration)}.tx-stepper[data-styled] .tx-step--completed .tx-stepper__separator,.tx-stepper[data-styled] .tx-step-item--completed .tx-stepper__separator{background:var(--tx-stepper-separator-active-background)}.tx-stepper[data-styled] .tx-step-panels{display:block;padding:var(--tx-stepper-steppanels-padding)}.tx-stepper[data-styled] .tx-step-panel{background:var(--tx-stepper-steppanel-background);color:var(--tx-stepper-steppanel-color)}.tx-stepper[data-styled] .tx-step-item .tx-step-panel{transition:grid-template-rows var(--_panel-duration) cubic-bezier(.2,0,0,1)}.tx-stepper[data-styled] .tx-step-item:not(.tx-step-item--active) .tx-step-panel__collapse{transition:visibility 0s linear var(--_panel-duration)}.tx-stepper[data-styled] .tx-step-panel__separator{flex:0 0 auto;width:var(--_separator);height:auto;margin:var(--tx-stepper-separator-margin);translate:calc(var(--_separator) / -2) 0}.tx-stepper[data-styled] .tx-step-item--last .tx-step-panel__separator{visibility:hidden}.tx-stepper[data-styled] .tx-step-panel__content{padding:var(--tx-stepper-steppanel-padding);margin-inline-start:var(--tx-stepper-steppanel-indent)}@media(prefers-reduced-motion:reduce){.tx-stepper[data-styled] .tx-step__header,.tx-stepper[data-styled] .tx-step__title,.tx-stepper[data-styled] .tx-step__number,.tx-stepper[data-styled] .tx-stepper__separator,.tx-stepper[data-styled] .tx-step-item .tx-step-panel,.tx-stepper[data-styled] .tx-step-item:not(.tx-step-item--active) .tx-step-panel__collapse{transition:none}}\n"],
|
|
747
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
748
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
749
|
+
});
|
|
750
|
+
};
|
|
751
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
752
|
+
minVersion: "12.0.0",
|
|
753
|
+
version: "22.2.3",
|
|
754
|
+
ngImport: i0,
|
|
755
|
+
type: TxStepper,
|
|
756
|
+
decorators: [{
|
|
757
|
+
type: Component,
|
|
758
|
+
args: [{
|
|
759
|
+
selector: "tx-stepper",
|
|
760
|
+
template: "<ng-content />",
|
|
761
|
+
encapsulation: ViewEncapsulation.None,
|
|
762
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
763
|
+
providers: [{
|
|
764
|
+
provide: TxStepperRef,
|
|
765
|
+
useExisting: TxStepper
|
|
766
|
+
}],
|
|
767
|
+
host: {
|
|
768
|
+
class: "tx-stepper",
|
|
769
|
+
"[class]": "passThrough().root?.class",
|
|
770
|
+
"[style]": "hostStyle()",
|
|
771
|
+
"[attr.data-styled]": "!isUnstyled() || null",
|
|
772
|
+
"[class.tx-stepper--vertical]": "vertical()",
|
|
773
|
+
"[class.tx-stepper--linear]": "linear()"
|
|
774
|
+
},
|
|
775
|
+
styles: [".tx-stepper{display:block;min-width:0}.tx-stepper--vertical{display:flex;flex-direction:column}.tx-step-list{position:relative;display:flex;justify-content:space-between;align-items:center;overflow-x:auto}.tx-step{position:relative;display:flex;flex:1 1 auto;align-items:center;min-width:0}.tx-step:last-of-type,.tx-step-item .tx-step{flex:initial}.tx-step__header{display:inline-flex;align-items:center;min-width:0;margin:0;border:0;background:transparent;color:inherit;font:inherit;text-align:start;cursor:pointer}.tx-step__header:disabled{cursor:default}.tx-step--active .tx-step__header{cursor:default}.tx-step__title{display:block;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-step__number{position:relative;display:flex;flex-shrink:0;align-items:center;justify-content:center}.tx-stepper__separator{display:block;flex:1 1 0}.tx-step-item{display:flex;flex-direction:column;flex:initial}.tx-step-item--active{flex:1 1 auto}.tx-step-panel{display:block}.tx-step-panel[hidden]{display:none}.tx-step-item .tx-step-panel{display:grid;grid-template-rows:0fr}.tx-step-item--active .tx-step-panel{grid-template-rows:1fr}.tx-step-panel__collapse{min-height:0;overflow:hidden}.tx-step-item:not(.tx-step-item--active) .tx-step-panel__collapse{visibility:hidden}.tx-step-panel__wrapper{display:flex;min-height:0}.tx-step-panel__content{flex:1 1 auto;min-width:0}.tx-stepper[data-styled]{--_duration: var(--tx-stepper-transition-duration);--_panel-duration: var(--tx-stepper-panel-transition-duration);--_number: var(--tx-stepper-step-number-size);--_separator: var(--tx-stepper-separator-size);font-family:var(--tx-font-family)}.tx-stepper[data-styled] .tx-step{gap:var(--tx-stepper-step-gap);padding:var(--tx-stepper-step-padding)}.tx-stepper[data-styled] .tx-step__header{gap:var(--tx-stepper-step-header-gap);padding:var(--tx-stepper-step-header-padding);border-radius:var(--tx-stepper-step-header-border-radius);outline:0 solid transparent;transition:color var(--_duration),outline-color var(--_duration),box-shadow var(--_duration)}.tx-stepper[data-styled] .tx-step__header:focus-visible{outline:var(--tx-stepper-step-header-focus-ring-width) var(--tx-stepper-step-header-focus-ring-style) var(--tx-stepper-step-header-focus-ring-color);outline-offset:var(--tx-stepper-step-header-focus-ring-offset);box-shadow:var(--tx-stepper-step-header-focus-ring-shadow)}.tx-stepper[data-styled] .tx-step__title{color:var(--tx-stepper-step-title-color);font-size:var(--tx-stepper-step-title-font-size);font-weight:var(--tx-stepper-step-title-font-weight);transition:color var(--_duration)}.tx-stepper[data-styled] .tx-step__number{z-index:1;min-width:var(--_number);height:var(--_number);border:var(--tx-stepper-step-number-border-width) solid var(--tx-stepper-step-number-border-color);border-radius:var(--tx-stepper-step-number-border-radius);background:var(--tx-stepper-step-number-background);color:var(--tx-stepper-step-number-color);font-size:var(--tx-stepper-step-number-font-size);font-weight:var(--tx-stepper-step-number-font-weight);line-height:var(--_number);transition:color var(--_duration),background-color var(--_duration),border-color var(--_duration)}.tx-stepper[data-styled] .tx-step__number:after{content:\"\";position:absolute;inset:0;border-radius:inherit;box-shadow:var(--tx-stepper-step-number-shadow)}.tx-stepper[data-styled] .tx-step--active .tx-step__number{border-color:var(--tx-stepper-step-number-active-border-color);background:var(--tx-stepper-step-number-active-background);color:var(--tx-stepper-step-number-active-color)}.tx-stepper[data-styled] .tx-step--active .tx-step__title{color:var(--tx-stepper-step-title-active-color)}.tx-stepper[data-styled] .tx-step--disabled .tx-step__header{opacity:var(--tx-stepper-step-header-disabled-opacity)}.tx-stepper[data-styled] .tx-stepper__separator{width:100%;height:var(--_separator);background:var(--tx-stepper-separator-background);transition:background-color var(--_duration)}.tx-stepper[data-styled] .tx-step--completed .tx-stepper__separator,.tx-stepper[data-styled] .tx-step-item--completed .tx-stepper__separator{background:var(--tx-stepper-separator-active-background)}.tx-stepper[data-styled] .tx-step-panels{display:block;padding:var(--tx-stepper-steppanels-padding)}.tx-stepper[data-styled] .tx-step-panel{background:var(--tx-stepper-steppanel-background);color:var(--tx-stepper-steppanel-color)}.tx-stepper[data-styled] .tx-step-item .tx-step-panel{transition:grid-template-rows var(--_panel-duration) cubic-bezier(.2,0,0,1)}.tx-stepper[data-styled] .tx-step-item:not(.tx-step-item--active) .tx-step-panel__collapse{transition:visibility 0s linear var(--_panel-duration)}.tx-stepper[data-styled] .tx-step-panel__separator{flex:0 0 auto;width:var(--_separator);height:auto;margin:var(--tx-stepper-separator-margin);translate:calc(var(--_separator) / -2) 0}.tx-stepper[data-styled] .tx-step-item--last .tx-step-panel__separator{visibility:hidden}.tx-stepper[data-styled] .tx-step-panel__content{padding:var(--tx-stepper-steppanel-padding);margin-inline-start:var(--tx-stepper-steppanel-indent)}@media(prefers-reduced-motion:reduce){.tx-stepper[data-styled] .tx-step__header,.tx-stepper[data-styled] .tx-step__title,.tx-stepper[data-styled] .tx-step__number,.tx-stepper[data-styled] .tx-stepper__separator,.tx-stepper[data-styled] .tx-step-item .tx-step-panel,.tx-stepper[data-styled] .tx-step-item:not(.tx-step-item--active) .tx-step-panel__collapse{transition:none}}\n"]
|
|
776
|
+
}]
|
|
777
|
+
}],
|
|
778
|
+
propDecorators: {
|
|
779
|
+
value: [{
|
|
780
|
+
type: i0.Input,
|
|
781
|
+
args: [{
|
|
782
|
+
isSignal: true,
|
|
783
|
+
alias: "value",
|
|
784
|
+
required: false
|
|
785
|
+
}]
|
|
786
|
+
}, {
|
|
787
|
+
type: i0.Output,
|
|
788
|
+
args: ["valueChange"]
|
|
789
|
+
}],
|
|
790
|
+
linear: [{
|
|
791
|
+
type: i0.Input,
|
|
792
|
+
args: [{
|
|
793
|
+
isSignal: true,
|
|
794
|
+
alias: "linear",
|
|
795
|
+
required: false
|
|
796
|
+
}]
|
|
797
|
+
}],
|
|
798
|
+
dt: [{
|
|
799
|
+
type: i0.Input,
|
|
800
|
+
args: [{
|
|
801
|
+
isSignal: true,
|
|
802
|
+
alias: "dt",
|
|
803
|
+
required: false
|
|
804
|
+
}]
|
|
805
|
+
}],
|
|
806
|
+
pt: [{
|
|
807
|
+
type: i0.Input,
|
|
808
|
+
args: [{
|
|
809
|
+
isSignal: true,
|
|
810
|
+
alias: "pt",
|
|
811
|
+
required: false
|
|
812
|
+
}]
|
|
813
|
+
}],
|
|
814
|
+
ptOptions: [{
|
|
815
|
+
type: i0.Input,
|
|
816
|
+
args: [{
|
|
817
|
+
isSignal: true,
|
|
818
|
+
alias: "ptOptions",
|
|
819
|
+
required: false
|
|
820
|
+
}]
|
|
821
|
+
}],
|
|
822
|
+
unstyled: [{
|
|
823
|
+
type: i0.Input,
|
|
824
|
+
args: [{
|
|
825
|
+
isSignal: true,
|
|
826
|
+
alias: "unstyled",
|
|
827
|
+
required: false
|
|
828
|
+
}]
|
|
829
|
+
}],
|
|
830
|
+
steps: [{
|
|
831
|
+
type: i0.ContentChildren,
|
|
832
|
+
args: [i0.forwardRef(() => TxStep), {
|
|
833
|
+
descendants: true,
|
|
834
|
+
isSignal: true
|
|
835
|
+
}]
|
|
836
|
+
}],
|
|
837
|
+
items: [{
|
|
838
|
+
type: i0.ContentChildren,
|
|
839
|
+
args: [i0.forwardRef(() => TxStepItem), {
|
|
840
|
+
descendants: true,
|
|
841
|
+
isSignal: true
|
|
842
|
+
}]
|
|
843
|
+
}],
|
|
844
|
+
panels: [{
|
|
845
|
+
type: i0.ContentChildren,
|
|
846
|
+
args: [i0.forwardRef(() => TxStepPanel), {
|
|
847
|
+
descendants: true,
|
|
848
|
+
isSignal: true
|
|
849
|
+
}]
|
|
850
|
+
}]
|
|
851
|
+
}
|
|
852
|
+
});
|
|
853
|
+
const NEXT_KEYS = ["ArrowRight", "ArrowDown"];
|
|
854
|
+
const PREVIOUS_KEYS = ["ArrowLeft", "ArrowUp"];
|
|
855
|
+
var TxSteps = class TxSteps {
|
|
856
|
+
txIconRegistry = inject(TxIconRegistry);
|
|
857
|
+
host = inject(ElementRef);
|
|
858
|
+
items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
859
|
+
activeIndex = model(0, ...ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []);
|
|
860
|
+
readonly = input(true, {
|
|
861
|
+
...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
|
|
862
|
+
transform: booleanAttribute
|
|
863
|
+
});
|
|
864
|
+
variant = input("default", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
|
|
865
|
+
ariaLabel = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
866
|
+
ariaLabelledBy = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
|
|
867
|
+
dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
|
|
868
|
+
pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
|
|
869
|
+
ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
|
|
870
|
+
unstyled = input(void 0, {
|
|
871
|
+
...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
|
|
872
|
+
transform: optionalBoolean
|
|
873
|
+
});
|
|
874
|
+
itemTemplate = contentChild(TxStepsItemTemplate, ...ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []);
|
|
875
|
+
t = injectTranslations();
|
|
876
|
+
isUnstyled = injectUnstyled(this.unstyled);
|
|
877
|
+
passThrough = injectPassThrough("steps", this, this.pt, this.ptOptions);
|
|
878
|
+
hostStyle = computed(() => ({
|
|
879
|
+
...toStyleObject(this.dt(), "--tx-steps"),
|
|
880
|
+
...this.passThrough().root?.style
|
|
881
|
+
}), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
|
|
882
|
+
entries = computed(() => {
|
|
883
|
+
const active = this.activeIndex();
|
|
884
|
+
const readonly = this.readonly();
|
|
885
|
+
return (this.items() ?? []).map((item, index) => {
|
|
886
|
+
const known = !!item.icon && this.txIconRegistry.has(item.icon);
|
|
887
|
+
return {
|
|
888
|
+
item,
|
|
889
|
+
index,
|
|
890
|
+
active: index === active,
|
|
891
|
+
done: index < active,
|
|
892
|
+
clickable: !readonly && !item.disabled && !!item.command,
|
|
893
|
+
icon: known ? item.icon ?? null : null,
|
|
894
|
+
iconClass: item.icon && !known ? item.icon : null,
|
|
895
|
+
context: {
|
|
896
|
+
$implicit: item,
|
|
897
|
+
index,
|
|
898
|
+
active: index === active,
|
|
899
|
+
done: index < active
|
|
900
|
+
}
|
|
901
|
+
};
|
|
902
|
+
});
|
|
903
|
+
}, ...ngDevMode ? [{ debugName: "entries" }] : /* istanbul ignore next */ []);
|
|
904
|
+
select(event, entry) {
|
|
905
|
+
if (!entry.clickable) return;
|
|
906
|
+
this.activeIndex.set(entry.index);
|
|
907
|
+
entry.item.command?.({
|
|
908
|
+
originalEvent: event,
|
|
909
|
+
item: entry.item,
|
|
910
|
+
index: entry.index
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
onKeydown(event) {
|
|
914
|
+
const buttons = Array.from(this.host.nativeElement.querySelectorAll("button.tx-steps__link"));
|
|
915
|
+
const current = buttons.indexOf(event.target);
|
|
916
|
+
let target;
|
|
917
|
+
if (NEXT_KEYS.includes(event.key)) target = buttons[(current + 1) % buttons.length];
|
|
918
|
+
else if (PREVIOUS_KEYS.includes(event.key)) target = buttons[(current - 1 + buttons.length) % buttons.length];
|
|
919
|
+
else if (event.key === "Home") target = buttons[0];
|
|
920
|
+
else if (event.key === "End") target = buttons[buttons.length - 1];
|
|
921
|
+
if (target) {
|
|
922
|
+
event.preventDefault();
|
|
923
|
+
target.focus();
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
927
|
+
minVersion: "12.0.0",
|
|
928
|
+
version: "22.2.3",
|
|
929
|
+
ngImport: i0,
|
|
930
|
+
type: TxSteps,
|
|
931
|
+
deps: [],
|
|
932
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
933
|
+
});
|
|
934
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
935
|
+
minVersion: "17.0.0",
|
|
936
|
+
version: "22.2.3",
|
|
937
|
+
type: TxSteps,
|
|
938
|
+
isStandalone: true,
|
|
939
|
+
selector: "tx-steps",
|
|
940
|
+
inputs: {
|
|
941
|
+
items: {
|
|
942
|
+
classPropertyName: "items",
|
|
943
|
+
publicName: "items",
|
|
944
|
+
isSignal: true,
|
|
945
|
+
isRequired: false,
|
|
946
|
+
transformFunction: null
|
|
947
|
+
},
|
|
948
|
+
activeIndex: {
|
|
949
|
+
classPropertyName: "activeIndex",
|
|
950
|
+
publicName: "activeIndex",
|
|
951
|
+
isSignal: true,
|
|
952
|
+
isRequired: false,
|
|
953
|
+
transformFunction: null
|
|
954
|
+
},
|
|
955
|
+
readonly: {
|
|
956
|
+
classPropertyName: "readonly",
|
|
957
|
+
publicName: "readonly",
|
|
958
|
+
isSignal: true,
|
|
959
|
+
isRequired: false,
|
|
960
|
+
transformFunction: null
|
|
961
|
+
},
|
|
962
|
+
variant: {
|
|
963
|
+
classPropertyName: "variant",
|
|
964
|
+
publicName: "variant",
|
|
965
|
+
isSignal: true,
|
|
966
|
+
isRequired: false,
|
|
967
|
+
transformFunction: null
|
|
968
|
+
},
|
|
969
|
+
ariaLabel: {
|
|
970
|
+
classPropertyName: "ariaLabel",
|
|
971
|
+
publicName: "ariaLabel",
|
|
972
|
+
isSignal: true,
|
|
973
|
+
isRequired: false,
|
|
974
|
+
transformFunction: null
|
|
975
|
+
},
|
|
976
|
+
ariaLabelledBy: {
|
|
977
|
+
classPropertyName: "ariaLabelledBy",
|
|
978
|
+
publicName: "ariaLabelledBy",
|
|
979
|
+
isSignal: true,
|
|
980
|
+
isRequired: false,
|
|
981
|
+
transformFunction: null
|
|
982
|
+
},
|
|
983
|
+
dt: {
|
|
984
|
+
classPropertyName: "dt",
|
|
985
|
+
publicName: "dt",
|
|
986
|
+
isSignal: true,
|
|
987
|
+
isRequired: false,
|
|
988
|
+
transformFunction: null
|
|
989
|
+
},
|
|
990
|
+
pt: {
|
|
991
|
+
classPropertyName: "pt",
|
|
992
|
+
publicName: "pt",
|
|
993
|
+
isSignal: true,
|
|
994
|
+
isRequired: false,
|
|
995
|
+
transformFunction: null
|
|
996
|
+
},
|
|
997
|
+
ptOptions: {
|
|
998
|
+
classPropertyName: "ptOptions",
|
|
999
|
+
publicName: "ptOptions",
|
|
1000
|
+
isSignal: true,
|
|
1001
|
+
isRequired: false,
|
|
1002
|
+
transformFunction: null
|
|
1003
|
+
},
|
|
1004
|
+
unstyled: {
|
|
1005
|
+
classPropertyName: "unstyled",
|
|
1006
|
+
publicName: "unstyled",
|
|
1007
|
+
isSignal: true,
|
|
1008
|
+
isRequired: false,
|
|
1009
|
+
transformFunction: null
|
|
1010
|
+
}
|
|
1011
|
+
},
|
|
1012
|
+
outputs: { activeIndex: "activeIndexChange" },
|
|
1013
|
+
host: {
|
|
1014
|
+
properties: {
|
|
1015
|
+
"class": "passThrough().root?.class",
|
|
1016
|
+
"style": "hostStyle()",
|
|
1017
|
+
"attr.data-styled": "!isUnstyled() || null",
|
|
1018
|
+
"attr.data-variant": "variant()",
|
|
1019
|
+
"class.tx-steps--readonly": "readonly()"
|
|
1020
|
+
},
|
|
1021
|
+
classAttribute: "tx-steps"
|
|
1022
|
+
},
|
|
1023
|
+
queries: [{
|
|
1024
|
+
propertyName: "itemTemplate",
|
|
1025
|
+
first: true,
|
|
1026
|
+
predicate: TxStepsItemTemplate,
|
|
1027
|
+
descendants: true,
|
|
1028
|
+
isSignal: true
|
|
1029
|
+
}],
|
|
1030
|
+
ngImport: i0,
|
|
1031
|
+
template: "<ol\n class=\"tx-steps__list\"\n [class]=\"passThrough().list?.class\"\n [style]=\"passThrough().list?.style\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n>\n @for (entry of entries(); track $index; let last = $last) {\n <li\n class=\"tx-steps__item\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n [class.tx-steps__item--active]=\"entry.active\"\n [class.tx-steps__item--done]=\"entry.done\"\n [class.tx-steps__item--disabled]=\"entry.item.disabled\"\n >\n @if (entry.clickable) {\n <button\n type=\"button\"\n class=\"tx-steps__link tx-steps__link--clickable\"\n [class]=\"passThrough().link?.class\"\n [style]=\"passThrough().link?.style\"\n [attr.aria-current]=\"entry.active ? 'step' : null\"\n (click)=\"select($event, entry)\"\n (keydown)=\"onKeydown($event)\"\n >\n <ng-container *ngTemplateOutlet=\"inner; context: { $implicit: entry }\" />\n </button>\n } @else {\n <span\n class=\"tx-steps__link\"\n [class]=\"passThrough().link?.class\"\n [style]=\"passThrough().link?.style\"\n [attr.aria-current]=\"entry.active ? 'step' : null\"\n [attr.aria-disabled]=\"entry.item.disabled ? 'true' : null\"\n >\n <ng-container *ngTemplateOutlet=\"inner; context: { $implicit: entry }\" />\n </span>\n }\n @if (variant() === 'track' && !last) {\n <span class=\"tx-steps__line\" aria-hidden=\"true\" [class]=\"passThrough().line?.class\" [style]=\"passThrough().line?.style\"></span>\n }\n </li>\n }\n</ol>\n\n<ng-template #inner let-entry>\n @if (itemTemplate(); as template) {\n <ng-container *ngTemplateOutlet=\"template.templateRef; context: entry.context\" />\n } @else {\n <span class=\"tx-steps__number\" aria-hidden=\"true\" [class]=\"passThrough().number?.class\" [style]=\"passThrough().number?.style\">\n @if (variant() === 'track' && entry.done) {\n <tx-icon [name]=\"'check'\" />\n } @else if (variant() === 'track' && entry.icon) {\n <tx-icon [name]=\"entry.icon\" />\n } @else if (variant() === 'track' && entry.iconClass) {\n <span [class]=\"entry.iconClass\"></span>\n } @else {\n {{ entry.index + 1 }}\n }\n </span>\n <span class=\"tx-steps__text\">\n <span class=\"tx-steps__label\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ entry.item.label }}</span>\n @if (variant() === 'track' && entry.item.description) {\n <span class=\"tx-steps__description\" [class]=\"passThrough().description?.class\" [style]=\"passThrough().description?.style\">{{\n entry.item.description\n }}</span>\n }\n </span>\n }\n @if (entry.done) {\n <span class=\"tx-steps__sr-only\">, {{ t().stepCompleted }}</span>\n }\n</ng-template>\n",
|
|
1032
|
+
styles: [":host{display:block;min-width:0}.tx-steps__list{display:flex;margin:0;padding:0;list-style:none}.tx-steps__item{position:relative;display:flex;min-width:0}.tx-steps__link{display:inline-flex;min-width:0;margin:0;border:0;background:transparent;color:inherit;font:inherit;text-decoration:none}.tx-steps__link--clickable{cursor:pointer}.tx-steps__number{position:relative;display:flex;flex-shrink:0;align-items:center;justify-content:center}.tx-steps__text{display:flex;flex-direction:column;min-width:0}.tx-steps__label,.tx-steps__description{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-steps__sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}:host([data-styled]){--_duration: var(--tx-steps-transition-duration);font-family:var(--tx-font-family)}:host([data-styled]) .tx-steps__link{border-radius:var(--tx-steps-item-link-border-radius);outline:0 solid transparent;transition:background-color var(--_duration),outline-color var(--_duration),box-shadow var(--_duration)}:host([data-styled]) .tx-steps__link:focus-visible{outline:var(--tx-steps-item-link-focus-ring-width) var(--tx-steps-item-link-focus-ring-style) var(--tx-steps-item-link-focus-ring-color);outline-offset:var(--tx-steps-item-link-focus-ring-offset);box-shadow:var(--tx-steps-item-link-focus-ring-shadow)}:host([data-styled][data-variant=default]){--_number: var(--tx-steps-item-number-size);--_separator: var(--tx-steps-separator-size)}:host([data-styled][data-variant=default]) .tx-steps__item{flex:1 1 auto;justify-content:center}:host([data-styled][data-variant=default]) .tx-steps__item:before{content:\"\";position:absolute;inset-inline:0;top:calc(var(--_number) / 2 - var(--_separator) / 2);height:var(--_separator);background:var(--tx-steps-separator-background)}:host([data-styled][data-variant=default]) .tx-steps__item:first-child:before{inset-inline-start:50%}:host([data-styled][data-variant=default]) .tx-steps__item:last-child:before{inset-inline-end:50%}:host([data-styled][data-variant=default]) .tx-steps__item:only-child:before{display:none}:host([data-styled][data-variant=default]) .tx-steps__link{flex-direction:column;align-items:center;gap:var(--tx-steps-item-link-gap);max-width:100%}:host([data-styled][data-variant=default]) .tx-steps__text{align-items:center;max-width:100%}:host([data-styled][data-variant=default]) .tx-steps__number{z-index:1;min-width:var(--_number);height:var(--_number);border:var(--tx-steps-item-number-border-width) solid var(--tx-steps-item-number-border-color);border-radius:var(--tx-steps-item-number-border-radius);background:var(--tx-steps-item-number-background);color:var(--tx-steps-item-number-color);font-size:var(--tx-steps-item-number-font-size);font-weight:var(--tx-steps-item-number-font-weight);line-height:var(--_number);transition:color var(--_duration),background-color var(--_duration),border-color var(--_duration)}:host([data-styled][data-variant=default]) .tx-steps__number:after{content:\"\";position:absolute;inset:0;border-radius:inherit;box-shadow:var(--tx-steps-item-number-shadow)}:host([data-styled][data-variant=default]) .tx-steps__label{color:var(--tx-steps-item-label-color);font-size:var(--tx-steps-item-label-font-size);font-weight:var(--tx-steps-item-label-font-weight);transition:color var(--_duration)}:host([data-styled][data-variant=default]) .tx-steps__item--active .tx-steps__number{border-color:var(--tx-steps-item-number-active-border-color);background:var(--tx-steps-item-number-active-background);color:var(--tx-steps-item-number-active-color)}:host([data-styled][data-variant=default]) .tx-steps__item--active .tx-steps__label{color:var(--tx-steps-item-label-active-color)}:host([data-styled][data-variant=track]){container-type:inline-size}:host([data-styled][data-variant=track]) .tx-steps__list{flex-direction:column;gap:var(--tx-steps-track-gap)}:host([data-styled][data-variant=track]) .tx-steps__item{align-items:center}:host([data-styled][data-variant=track]) .tx-steps__link{align-items:center;gap:var(--tx-steps-track-button-gap);padding:var(--tx-steps-track-button-padding);margin-inline:var(--tx-steps-track-button-offset);border-radius:var(--tx-steps-track-button-border-radius);text-align:start}:host([data-styled][data-variant=track]) .tx-steps__link--clickable:hover{background:var(--tx-steps-track-button-hover-background)}:host([data-styled][data-variant=track]) .tx-steps__number{width:var(--tx-steps-track-marker-size);height:var(--tx-steps-track-marker-size);border-radius:50%;background:var(--tx-steps-track-marker-background);box-shadow:inset 0 0 0 var(--tx-steps-track-marker-border-width) var(--tx-steps-track-marker-border-color);color:var(--tx-steps-track-marker-color);font-size:var(--tx-steps-track-marker-font-size);font-weight:var(--tx-steps-track-marker-font-weight);font-variant-numeric:tabular-nums;transition:color var(--_duration),background-color var(--_duration),box-shadow var(--_duration)}:host([data-styled][data-variant=track]) .tx-steps__text{gap:var(--tx-steps-track-text-gap)}:host([data-styled][data-variant=track]) .tx-steps__label{color:var(--tx-steps-track-label-color);font-size:var(--tx-steps-track-label-font-size);font-weight:var(--tx-steps-track-label-font-weight);line-height:1.25;transition:color var(--_duration)}:host([data-styled][data-variant=track]) .tx-steps__description{color:var(--tx-steps-track-description-color);font-size:var(--tx-steps-track-description-font-size);line-height:1.375}:host([data-styled][data-variant=track]) .tx-steps__line{display:none;flex:1 1 0;min-width:var(--tx-steps-track-line-min-width);height:var(--tx-steps-track-line-size);margin-inline:var(--tx-steps-track-line-margin);background:var(--tx-steps-track-line-background);transition:background-color var(--_duration)}:host([data-styled][data-variant=track]) .tx-steps__item--done .tx-steps__number{background:var(--tx-steps-track-done-marker-background);box-shadow:inset 0 0 0 var(--tx-steps-track-marker-border-width) var(--tx-steps-track-done-marker-border-color);color:var(--tx-steps-track-done-marker-color)}:host([data-styled][data-variant=track]) .tx-steps__item--done .tx-steps__label{color:var(--tx-steps-track-done-label-color)}:host([data-styled][data-variant=track]) .tx-steps__item--done .tx-steps__line{background:var(--tx-steps-track-done-line-background)}:host([data-styled][data-variant=track]) .tx-steps__item--active .tx-steps__number{background:var(--tx-steps-track-active-marker-background);box-shadow:none;color:var(--tx-steps-track-active-marker-color)}:host([data-styled][data-variant=track]) .tx-steps__item--active .tx-steps__label{color:var(--tx-steps-track-active-label-color)}:host([data-styled][data-variant=track]) .tx-steps__item--disabled .tx-steps__link{opacity:var(--tx-steps-track-disabled-opacity)}@container (width >= 560px){:host([data-styled][data-variant=track]) .tx-steps__list{flex-direction:row;align-items:center;gap:0}:host([data-styled][data-variant=track]) .tx-steps__item{flex:1 1 0}:host([data-styled][data-variant=track]) .tx-steps__item:last-child{flex:none}:host([data-styled][data-variant=track]) .tx-steps__line{display:block}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-steps__link,:host([data-styled]) .tx-steps__number,:host([data-styled]) .tx-steps__label,:host([data-styled]) .tx-steps__line{transition:none}}\n"],
|
|
1033
|
+
dependencies: [{
|
|
1034
|
+
kind: "directive",
|
|
1035
|
+
type: NgTemplateOutlet,
|
|
1036
|
+
selector: "[ngTemplateOutlet]",
|
|
1037
|
+
inputs: [
|
|
1038
|
+
"ngTemplateOutletContext",
|
|
1039
|
+
"ngTemplateOutlet",
|
|
1040
|
+
"ngTemplateOutletInjector"
|
|
1041
|
+
]
|
|
1042
|
+
}, {
|
|
1043
|
+
kind: "component",
|
|
1044
|
+
type: TxIcon,
|
|
1045
|
+
selector: "tx-icon",
|
|
1046
|
+
inputs: ["name"]
|
|
1047
|
+
}],
|
|
1048
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1049
|
+
});
|
|
1050
|
+
};
|
|
1051
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1052
|
+
minVersion: "12.0.0",
|
|
1053
|
+
version: "22.2.3",
|
|
1054
|
+
ngImport: i0,
|
|
1055
|
+
type: TxSteps,
|
|
1056
|
+
decorators: [{
|
|
1057
|
+
type: Component,
|
|
1058
|
+
args: [{
|
|
1059
|
+
selector: "tx-steps",
|
|
1060
|
+
imports: [NgTemplateOutlet, TxIcon],
|
|
1061
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1062
|
+
host: {
|
|
1063
|
+
class: "tx-steps",
|
|
1064
|
+
"[class]": "passThrough().root?.class",
|
|
1065
|
+
"[style]": "hostStyle()",
|
|
1066
|
+
"[attr.data-styled]": "!isUnstyled() || null",
|
|
1067
|
+
"[attr.data-variant]": "variant()",
|
|
1068
|
+
"[class.tx-steps--readonly]": "readonly()"
|
|
1069
|
+
},
|
|
1070
|
+
template: "<ol\n class=\"tx-steps__list\"\n [class]=\"passThrough().list?.class\"\n [style]=\"passThrough().list?.style\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n>\n @for (entry of entries(); track $index; let last = $last) {\n <li\n class=\"tx-steps__item\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n [class.tx-steps__item--active]=\"entry.active\"\n [class.tx-steps__item--done]=\"entry.done\"\n [class.tx-steps__item--disabled]=\"entry.item.disabled\"\n >\n @if (entry.clickable) {\n <button\n type=\"button\"\n class=\"tx-steps__link tx-steps__link--clickable\"\n [class]=\"passThrough().link?.class\"\n [style]=\"passThrough().link?.style\"\n [attr.aria-current]=\"entry.active ? 'step' : null\"\n (click)=\"select($event, entry)\"\n (keydown)=\"onKeydown($event)\"\n >\n <ng-container *ngTemplateOutlet=\"inner; context: { $implicit: entry }\" />\n </button>\n } @else {\n <span\n class=\"tx-steps__link\"\n [class]=\"passThrough().link?.class\"\n [style]=\"passThrough().link?.style\"\n [attr.aria-current]=\"entry.active ? 'step' : null\"\n [attr.aria-disabled]=\"entry.item.disabled ? 'true' : null\"\n >\n <ng-container *ngTemplateOutlet=\"inner; context: { $implicit: entry }\" />\n </span>\n }\n @if (variant() === 'track' && !last) {\n <span class=\"tx-steps__line\" aria-hidden=\"true\" [class]=\"passThrough().line?.class\" [style]=\"passThrough().line?.style\"></span>\n }\n </li>\n }\n</ol>\n\n<ng-template #inner let-entry>\n @if (itemTemplate(); as template) {\n <ng-container *ngTemplateOutlet=\"template.templateRef; context: entry.context\" />\n } @else {\n <span class=\"tx-steps__number\" aria-hidden=\"true\" [class]=\"passThrough().number?.class\" [style]=\"passThrough().number?.style\">\n @if (variant() === 'track' && entry.done) {\n <tx-icon [name]=\"'check'\" />\n } @else if (variant() === 'track' && entry.icon) {\n <tx-icon [name]=\"entry.icon\" />\n } @else if (variant() === 'track' && entry.iconClass) {\n <span [class]=\"entry.iconClass\"></span>\n } @else {\n {{ entry.index + 1 }}\n }\n </span>\n <span class=\"tx-steps__text\">\n <span class=\"tx-steps__label\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ entry.item.label }}</span>\n @if (variant() === 'track' && entry.item.description) {\n <span class=\"tx-steps__description\" [class]=\"passThrough().description?.class\" [style]=\"passThrough().description?.style\">{{\n entry.item.description\n }}</span>\n }\n </span>\n }\n @if (entry.done) {\n <span class=\"tx-steps__sr-only\">, {{ t().stepCompleted }}</span>\n }\n</ng-template>\n",
|
|
1071
|
+
styles: [":host{display:block;min-width:0}.tx-steps__list{display:flex;margin:0;padding:0;list-style:none}.tx-steps__item{position:relative;display:flex;min-width:0}.tx-steps__link{display:inline-flex;min-width:0;margin:0;border:0;background:transparent;color:inherit;font:inherit;text-decoration:none}.tx-steps__link--clickable{cursor:pointer}.tx-steps__number{position:relative;display:flex;flex-shrink:0;align-items:center;justify-content:center}.tx-steps__text{display:flex;flex-direction:column;min-width:0}.tx-steps__label,.tx-steps__description{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-steps__sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}:host([data-styled]){--_duration: var(--tx-steps-transition-duration);font-family:var(--tx-font-family)}:host([data-styled]) .tx-steps__link{border-radius:var(--tx-steps-item-link-border-radius);outline:0 solid transparent;transition:background-color var(--_duration),outline-color var(--_duration),box-shadow var(--_duration)}:host([data-styled]) .tx-steps__link:focus-visible{outline:var(--tx-steps-item-link-focus-ring-width) var(--tx-steps-item-link-focus-ring-style) var(--tx-steps-item-link-focus-ring-color);outline-offset:var(--tx-steps-item-link-focus-ring-offset);box-shadow:var(--tx-steps-item-link-focus-ring-shadow)}:host([data-styled][data-variant=default]){--_number: var(--tx-steps-item-number-size);--_separator: var(--tx-steps-separator-size)}:host([data-styled][data-variant=default]) .tx-steps__item{flex:1 1 auto;justify-content:center}:host([data-styled][data-variant=default]) .tx-steps__item:before{content:\"\";position:absolute;inset-inline:0;top:calc(var(--_number) / 2 - var(--_separator) / 2);height:var(--_separator);background:var(--tx-steps-separator-background)}:host([data-styled][data-variant=default]) .tx-steps__item:first-child:before{inset-inline-start:50%}:host([data-styled][data-variant=default]) .tx-steps__item:last-child:before{inset-inline-end:50%}:host([data-styled][data-variant=default]) .tx-steps__item:only-child:before{display:none}:host([data-styled][data-variant=default]) .tx-steps__link{flex-direction:column;align-items:center;gap:var(--tx-steps-item-link-gap);max-width:100%}:host([data-styled][data-variant=default]) .tx-steps__text{align-items:center;max-width:100%}:host([data-styled][data-variant=default]) .tx-steps__number{z-index:1;min-width:var(--_number);height:var(--_number);border:var(--tx-steps-item-number-border-width) solid var(--tx-steps-item-number-border-color);border-radius:var(--tx-steps-item-number-border-radius);background:var(--tx-steps-item-number-background);color:var(--tx-steps-item-number-color);font-size:var(--tx-steps-item-number-font-size);font-weight:var(--tx-steps-item-number-font-weight);line-height:var(--_number);transition:color var(--_duration),background-color var(--_duration),border-color var(--_duration)}:host([data-styled][data-variant=default]) .tx-steps__number:after{content:\"\";position:absolute;inset:0;border-radius:inherit;box-shadow:var(--tx-steps-item-number-shadow)}:host([data-styled][data-variant=default]) .tx-steps__label{color:var(--tx-steps-item-label-color);font-size:var(--tx-steps-item-label-font-size);font-weight:var(--tx-steps-item-label-font-weight);transition:color var(--_duration)}:host([data-styled][data-variant=default]) .tx-steps__item--active .tx-steps__number{border-color:var(--tx-steps-item-number-active-border-color);background:var(--tx-steps-item-number-active-background);color:var(--tx-steps-item-number-active-color)}:host([data-styled][data-variant=default]) .tx-steps__item--active .tx-steps__label{color:var(--tx-steps-item-label-active-color)}:host([data-styled][data-variant=track]){container-type:inline-size}:host([data-styled][data-variant=track]) .tx-steps__list{flex-direction:column;gap:var(--tx-steps-track-gap)}:host([data-styled][data-variant=track]) .tx-steps__item{align-items:center}:host([data-styled][data-variant=track]) .tx-steps__link{align-items:center;gap:var(--tx-steps-track-button-gap);padding:var(--tx-steps-track-button-padding);margin-inline:var(--tx-steps-track-button-offset);border-radius:var(--tx-steps-track-button-border-radius);text-align:start}:host([data-styled][data-variant=track]) .tx-steps__link--clickable:hover{background:var(--tx-steps-track-button-hover-background)}:host([data-styled][data-variant=track]) .tx-steps__number{width:var(--tx-steps-track-marker-size);height:var(--tx-steps-track-marker-size);border-radius:50%;background:var(--tx-steps-track-marker-background);box-shadow:inset 0 0 0 var(--tx-steps-track-marker-border-width) var(--tx-steps-track-marker-border-color);color:var(--tx-steps-track-marker-color);font-size:var(--tx-steps-track-marker-font-size);font-weight:var(--tx-steps-track-marker-font-weight);font-variant-numeric:tabular-nums;transition:color var(--_duration),background-color var(--_duration),box-shadow var(--_duration)}:host([data-styled][data-variant=track]) .tx-steps__text{gap:var(--tx-steps-track-text-gap)}:host([data-styled][data-variant=track]) .tx-steps__label{color:var(--tx-steps-track-label-color);font-size:var(--tx-steps-track-label-font-size);font-weight:var(--tx-steps-track-label-font-weight);line-height:1.25;transition:color var(--_duration)}:host([data-styled][data-variant=track]) .tx-steps__description{color:var(--tx-steps-track-description-color);font-size:var(--tx-steps-track-description-font-size);line-height:1.375}:host([data-styled][data-variant=track]) .tx-steps__line{display:none;flex:1 1 0;min-width:var(--tx-steps-track-line-min-width);height:var(--tx-steps-track-line-size);margin-inline:var(--tx-steps-track-line-margin);background:var(--tx-steps-track-line-background);transition:background-color var(--_duration)}:host([data-styled][data-variant=track]) .tx-steps__item--done .tx-steps__number{background:var(--tx-steps-track-done-marker-background);box-shadow:inset 0 0 0 var(--tx-steps-track-marker-border-width) var(--tx-steps-track-done-marker-border-color);color:var(--tx-steps-track-done-marker-color)}:host([data-styled][data-variant=track]) .tx-steps__item--done .tx-steps__label{color:var(--tx-steps-track-done-label-color)}:host([data-styled][data-variant=track]) .tx-steps__item--done .tx-steps__line{background:var(--tx-steps-track-done-line-background)}:host([data-styled][data-variant=track]) .tx-steps__item--active .tx-steps__number{background:var(--tx-steps-track-active-marker-background);box-shadow:none;color:var(--tx-steps-track-active-marker-color)}:host([data-styled][data-variant=track]) .tx-steps__item--active .tx-steps__label{color:var(--tx-steps-track-active-label-color)}:host([data-styled][data-variant=track]) .tx-steps__item--disabled .tx-steps__link{opacity:var(--tx-steps-track-disabled-opacity)}@container (width >= 560px){:host([data-styled][data-variant=track]) .tx-steps__list{flex-direction:row;align-items:center;gap:0}:host([data-styled][data-variant=track]) .tx-steps__item{flex:1 1 0}:host([data-styled][data-variant=track]) .tx-steps__item:last-child{flex:none}:host([data-styled][data-variant=track]) .tx-steps__line{display:block}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-steps__link,:host([data-styled]) .tx-steps__number,:host([data-styled]) .tx-steps__label,:host([data-styled]) .tx-steps__line{transition:none}}\n"]
|
|
1072
|
+
}]
|
|
1073
|
+
}],
|
|
1074
|
+
propDecorators: {
|
|
1075
|
+
items: [{
|
|
1076
|
+
type: i0.Input,
|
|
1077
|
+
args: [{
|
|
1078
|
+
isSignal: true,
|
|
1079
|
+
alias: "items",
|
|
1080
|
+
required: false
|
|
1081
|
+
}]
|
|
1082
|
+
}],
|
|
1083
|
+
activeIndex: [{
|
|
1084
|
+
type: i0.Input,
|
|
1085
|
+
args: [{
|
|
1086
|
+
isSignal: true,
|
|
1087
|
+
alias: "activeIndex",
|
|
1088
|
+
required: false
|
|
1089
|
+
}]
|
|
1090
|
+
}, {
|
|
1091
|
+
type: i0.Output,
|
|
1092
|
+
args: ["activeIndexChange"]
|
|
1093
|
+
}],
|
|
1094
|
+
readonly: [{
|
|
1095
|
+
type: i0.Input,
|
|
1096
|
+
args: [{
|
|
1097
|
+
isSignal: true,
|
|
1098
|
+
alias: "readonly",
|
|
1099
|
+
required: false
|
|
1100
|
+
}]
|
|
1101
|
+
}],
|
|
1102
|
+
variant: [{
|
|
1103
|
+
type: i0.Input,
|
|
1104
|
+
args: [{
|
|
1105
|
+
isSignal: true,
|
|
1106
|
+
alias: "variant",
|
|
1107
|
+
required: false
|
|
1108
|
+
}]
|
|
1109
|
+
}],
|
|
1110
|
+
ariaLabel: [{
|
|
1111
|
+
type: i0.Input,
|
|
1112
|
+
args: [{
|
|
1113
|
+
isSignal: true,
|
|
1114
|
+
alias: "ariaLabel",
|
|
1115
|
+
required: false
|
|
1116
|
+
}]
|
|
1117
|
+
}],
|
|
1118
|
+
ariaLabelledBy: [{
|
|
1119
|
+
type: i0.Input,
|
|
1120
|
+
args: [{
|
|
1121
|
+
isSignal: true,
|
|
1122
|
+
alias: "ariaLabelledBy",
|
|
1123
|
+
required: false
|
|
1124
|
+
}]
|
|
1125
|
+
}],
|
|
1126
|
+
dt: [{
|
|
1127
|
+
type: i0.Input,
|
|
1128
|
+
args: [{
|
|
1129
|
+
isSignal: true,
|
|
1130
|
+
alias: "dt",
|
|
1131
|
+
required: false
|
|
1132
|
+
}]
|
|
1133
|
+
}],
|
|
1134
|
+
pt: [{
|
|
1135
|
+
type: i0.Input,
|
|
1136
|
+
args: [{
|
|
1137
|
+
isSignal: true,
|
|
1138
|
+
alias: "pt",
|
|
1139
|
+
required: false
|
|
1140
|
+
}]
|
|
1141
|
+
}],
|
|
1142
|
+
ptOptions: [{
|
|
1143
|
+
type: i0.Input,
|
|
1144
|
+
args: [{
|
|
1145
|
+
isSignal: true,
|
|
1146
|
+
alias: "ptOptions",
|
|
1147
|
+
required: false
|
|
1148
|
+
}]
|
|
1149
|
+
}],
|
|
1150
|
+
unstyled: [{
|
|
1151
|
+
type: i0.Input,
|
|
1152
|
+
args: [{
|
|
1153
|
+
isSignal: true,
|
|
1154
|
+
alias: "unstyled",
|
|
1155
|
+
required: false
|
|
1156
|
+
}]
|
|
1157
|
+
}],
|
|
1158
|
+
itemTemplate: [{
|
|
1159
|
+
type: i0.ContentChild,
|
|
1160
|
+
args: [i0.forwardRef(() => TxStepsItemTemplate), { isSignal: true }]
|
|
1161
|
+
}]
|
|
1162
|
+
}
|
|
1163
|
+
});
|
|
1164
|
+
export { TxStep, TxStepContent, TxStepItem, TxStepList, TxStepPanel, TxStepPanelContent, TxStepPanels, TxStepper, TxStepperRef, TxSteps, TxStepsItemTemplate };
|
|
1165
|
+
|
|
1166
|
+
//# sourceMappingURL=tectra-ng-ui-stepper.mjs.map
|