@tectra-ng/ui 0.1.2 → 0.1.3
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/README.md +36 -19
- package/analog-clock/README.md +31 -0
- package/countdown/README.md +45 -0
- package/datepicker/README.md +109 -0
- package/export/README.md +79 -0
- package/export-font/OFL.txt +93 -0
- package/export-font/README.md +7 -0
- package/fesm2022/tectra-ng-ui-analog-clock.mjs +386 -0
- package/fesm2022/tectra-ng-ui-analog-clock.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-countdown.mjs +513 -0
- package/fesm2022/tectra-ng-ui-countdown.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-datepicker.mjs +2640 -0
- package/fesm2022/tectra-ng-ui-datepicker.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-export-font.mjs +7 -0
- package/fesm2022/tectra-ng-ui-export-font.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-export.mjs +2574 -0
- package/fesm2022/tectra-ng-ui-export.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-label.mjs +4 -4
- package/fesm2022/tectra-ng-ui-label.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-month-calendar.mjs +601 -0
- package/fesm2022/tectra-ng-ui-month-calendar.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-sparkline.mjs +240 -0
- package/fesm2022/tectra-ng-ui-sparkline.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-stat-tiles.mjs +661 -0
- package/fesm2022/tectra-ng-ui-stat-tiles.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-table.mjs +1 -21
- package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-timeline.mjs +407 -0
- package/fesm2022/tectra-ng-ui-timeline.mjs.map +1 -0
- package/month-calendar/README.md +46 -0
- package/package.json +40 -4
- package/sparkline/README.md +27 -0
- package/stat-tiles/README.md +53 -0
- package/timeline/README.md +42 -0
- package/types/tectra-ng-ui-analog-clock.d.ts +127 -0
- package/types/tectra-ng-ui-analog-clock.d.ts.map +1 -0
- package/types/tectra-ng-ui-countdown.d.ts +150 -0
- package/types/tectra-ng-ui-countdown.d.ts.map +1 -0
- package/types/tectra-ng-ui-datepicker.d.ts +801 -0
- package/types/tectra-ng-ui-datepicker.d.ts.map +1 -0
- package/types/tectra-ng-ui-export-font.d.ts +5 -0
- package/types/tectra-ng-ui-export-font.d.ts.map +1 -0
- package/types/tectra-ng-ui-export.d.ts +427 -0
- package/types/tectra-ng-ui-export.d.ts.map +1 -0
- package/types/tectra-ng-ui-month-calendar.d.ts +287 -0
- package/types/tectra-ng-ui-month-calendar.d.ts.map +1 -0
- package/types/tectra-ng-ui-sparkline.d.ts +80 -0
- package/types/tectra-ng-ui-sparkline.d.ts.map +1 -0
- package/types/tectra-ng-ui-stat-tiles.d.ts +287 -0
- package/types/tectra-ng-ui-stat-tiles.d.ts.map +1 -0
- package/types/tectra-ng-ui-timeline.d.ts +129 -0
- package/types/tectra-ng-ui-timeline.d.ts.map +1 -0
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Directive, TemplateRef, computed, contentChild, inject, input } from "@angular/core";
|
|
3
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
4
|
+
import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
|
|
5
|
+
import { optionalBoolean } from "@tectra-ng/core/utils";
|
|
6
|
+
import { toStyleObject } from "@tectra-ng/themes";
|
|
7
|
+
var TxTimelineContent = class TxTimelineContent {
|
|
8
|
+
templateRef = inject(TemplateRef);
|
|
9
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
10
|
+
minVersion: "12.0.0",
|
|
11
|
+
version: "22.2.3",
|
|
12
|
+
ngImport: i0,
|
|
13
|
+
type: TxTimelineContent,
|
|
14
|
+
deps: [],
|
|
15
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
16
|
+
});
|
|
17
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
18
|
+
minVersion: "14.0.0",
|
|
19
|
+
version: "22.2.3",
|
|
20
|
+
type: TxTimelineContent,
|
|
21
|
+
isStandalone: true,
|
|
22
|
+
selector: "ng-template[txTimelineContent]",
|
|
23
|
+
ngImport: i0
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
27
|
+
minVersion: "12.0.0",
|
|
28
|
+
version: "22.2.3",
|
|
29
|
+
ngImport: i0,
|
|
30
|
+
type: TxTimelineContent,
|
|
31
|
+
decorators: [{
|
|
32
|
+
type: Directive,
|
|
33
|
+
args: [{ selector: "ng-template[txTimelineContent]" }]
|
|
34
|
+
}]
|
|
35
|
+
});
|
|
36
|
+
var TxTimelineOpposite = class TxTimelineOpposite {
|
|
37
|
+
templateRef = inject(TemplateRef);
|
|
38
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
39
|
+
minVersion: "12.0.0",
|
|
40
|
+
version: "22.2.3",
|
|
41
|
+
ngImport: i0,
|
|
42
|
+
type: TxTimelineOpposite,
|
|
43
|
+
deps: [],
|
|
44
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
45
|
+
});
|
|
46
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
47
|
+
minVersion: "14.0.0",
|
|
48
|
+
version: "22.2.3",
|
|
49
|
+
type: TxTimelineOpposite,
|
|
50
|
+
isStandalone: true,
|
|
51
|
+
selector: "ng-template[txTimelineOpposite]",
|
|
52
|
+
ngImport: i0
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
56
|
+
minVersion: "12.0.0",
|
|
57
|
+
version: "22.2.3",
|
|
58
|
+
ngImport: i0,
|
|
59
|
+
type: TxTimelineOpposite,
|
|
60
|
+
decorators: [{
|
|
61
|
+
type: Directive,
|
|
62
|
+
args: [{ selector: "ng-template[txTimelineOpposite]" }]
|
|
63
|
+
}]
|
|
64
|
+
});
|
|
65
|
+
var TxTimelineMarker = class TxTimelineMarker {
|
|
66
|
+
templateRef = inject(TemplateRef);
|
|
67
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
68
|
+
minVersion: "12.0.0",
|
|
69
|
+
version: "22.2.3",
|
|
70
|
+
ngImport: i0,
|
|
71
|
+
type: TxTimelineMarker,
|
|
72
|
+
deps: [],
|
|
73
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
74
|
+
});
|
|
75
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
76
|
+
minVersion: "14.0.0",
|
|
77
|
+
version: "22.2.3",
|
|
78
|
+
type: TxTimelineMarker,
|
|
79
|
+
isStandalone: true,
|
|
80
|
+
selector: "ng-template[txTimelineMarker]",
|
|
81
|
+
ngImport: i0
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
85
|
+
minVersion: "12.0.0",
|
|
86
|
+
version: "22.2.3",
|
|
87
|
+
ngImport: i0,
|
|
88
|
+
type: TxTimelineMarker,
|
|
89
|
+
decorators: [{
|
|
90
|
+
type: Directive,
|
|
91
|
+
args: [{ selector: "ng-template[txTimelineMarker]" }]
|
|
92
|
+
}]
|
|
93
|
+
});
|
|
94
|
+
var TxTimelineConnector = class TxTimelineConnector {
|
|
95
|
+
templateRef = inject(TemplateRef);
|
|
96
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
97
|
+
minVersion: "12.0.0",
|
|
98
|
+
version: "22.2.3",
|
|
99
|
+
ngImport: i0,
|
|
100
|
+
type: TxTimelineConnector,
|
|
101
|
+
deps: [],
|
|
102
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
103
|
+
});
|
|
104
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
105
|
+
minVersion: "14.0.0",
|
|
106
|
+
version: "22.2.3",
|
|
107
|
+
type: TxTimelineConnector,
|
|
108
|
+
isStandalone: true,
|
|
109
|
+
selector: "ng-template[txTimelineConnector]",
|
|
110
|
+
ngImport: i0
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
114
|
+
minVersion: "12.0.0",
|
|
115
|
+
version: "22.2.3",
|
|
116
|
+
ngImport: i0,
|
|
117
|
+
type: TxTimelineConnector,
|
|
118
|
+
decorators: [{
|
|
119
|
+
type: Directive,
|
|
120
|
+
args: [{ selector: "ng-template[txTimelineConnector]" }]
|
|
121
|
+
}]
|
|
122
|
+
});
|
|
123
|
+
var TxTimeline = class TxTimeline {
|
|
124
|
+
value = input([], ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
125
|
+
layout = input("vertical", ...ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []);
|
|
126
|
+
align = input(void 0, ...ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []);
|
|
127
|
+
ariaLabel = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
128
|
+
ariaLabelledBy = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
|
|
129
|
+
dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
|
|
130
|
+
pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
|
|
131
|
+
ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
|
|
132
|
+
unstyled = input(void 0, {
|
|
133
|
+
...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
|
|
134
|
+
transform: optionalBoolean
|
|
135
|
+
});
|
|
136
|
+
contentTemplate = contentChild(TxTimelineContent, ...ngDevMode ? [{ debugName: "contentTemplate" }] : /* istanbul ignore next */ []);
|
|
137
|
+
oppositeTemplate = contentChild(TxTimelineOpposite, ...ngDevMode ? [{ debugName: "oppositeTemplate" }] : /* istanbul ignore next */ []);
|
|
138
|
+
markerTemplate = contentChild(TxTimelineMarker, ...ngDevMode ? [{ debugName: "markerTemplate" }] : /* istanbul ignore next */ []);
|
|
139
|
+
connectorTemplate = contentChild(TxTimelineConnector, ...ngDevMode ? [{ debugName: "connectorTemplate" }] : /* istanbul ignore next */ []);
|
|
140
|
+
isUnstyled = injectUnstyled(this.unstyled);
|
|
141
|
+
passThrough = injectPassThrough("timeline", this, this.pt, this.ptOptions);
|
|
142
|
+
hostStyle = computed(() => ({
|
|
143
|
+
...toStyleObject(this.dt(), "--tx-timeline"),
|
|
144
|
+
...this.passThrough().root?.style
|
|
145
|
+
}), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
|
|
146
|
+
resolvedAlign = computed(() => this.align() ?? (this.layout() === "horizontal" ? "top" : "left"), ...ngDevMode ? [{ debugName: "resolvedAlign" }] : /* istanbul ignore next */ []);
|
|
147
|
+
events = computed(() => {
|
|
148
|
+
const items = this.value() ?? [];
|
|
149
|
+
return items.map((item, index) => ({
|
|
150
|
+
$implicit: item,
|
|
151
|
+
index,
|
|
152
|
+
first: index === 0,
|
|
153
|
+
last: index === items.length - 1
|
|
154
|
+
}));
|
|
155
|
+
}, ...ngDevMode ? [{ debugName: "events" }] : /* istanbul ignore next */ []);
|
|
156
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
157
|
+
minVersion: "12.0.0",
|
|
158
|
+
version: "22.2.3",
|
|
159
|
+
ngImport: i0,
|
|
160
|
+
type: TxTimeline,
|
|
161
|
+
deps: [],
|
|
162
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
163
|
+
});
|
|
164
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
165
|
+
minVersion: "17.0.0",
|
|
166
|
+
version: "22.2.3",
|
|
167
|
+
type: TxTimeline,
|
|
168
|
+
isStandalone: true,
|
|
169
|
+
selector: "tx-timeline",
|
|
170
|
+
inputs: {
|
|
171
|
+
value: {
|
|
172
|
+
classPropertyName: "value",
|
|
173
|
+
publicName: "value",
|
|
174
|
+
isSignal: true,
|
|
175
|
+
isRequired: false,
|
|
176
|
+
transformFunction: null
|
|
177
|
+
},
|
|
178
|
+
layout: {
|
|
179
|
+
classPropertyName: "layout",
|
|
180
|
+
publicName: "layout",
|
|
181
|
+
isSignal: true,
|
|
182
|
+
isRequired: false,
|
|
183
|
+
transformFunction: null
|
|
184
|
+
},
|
|
185
|
+
align: {
|
|
186
|
+
classPropertyName: "align",
|
|
187
|
+
publicName: "align",
|
|
188
|
+
isSignal: true,
|
|
189
|
+
isRequired: false,
|
|
190
|
+
transformFunction: null
|
|
191
|
+
},
|
|
192
|
+
ariaLabel: {
|
|
193
|
+
classPropertyName: "ariaLabel",
|
|
194
|
+
publicName: "ariaLabel",
|
|
195
|
+
isSignal: true,
|
|
196
|
+
isRequired: false,
|
|
197
|
+
transformFunction: null
|
|
198
|
+
},
|
|
199
|
+
ariaLabelledBy: {
|
|
200
|
+
classPropertyName: "ariaLabelledBy",
|
|
201
|
+
publicName: "ariaLabelledBy",
|
|
202
|
+
isSignal: true,
|
|
203
|
+
isRequired: false,
|
|
204
|
+
transformFunction: null
|
|
205
|
+
},
|
|
206
|
+
dt: {
|
|
207
|
+
classPropertyName: "dt",
|
|
208
|
+
publicName: "dt",
|
|
209
|
+
isSignal: true,
|
|
210
|
+
isRequired: false,
|
|
211
|
+
transformFunction: null
|
|
212
|
+
},
|
|
213
|
+
pt: {
|
|
214
|
+
classPropertyName: "pt",
|
|
215
|
+
publicName: "pt",
|
|
216
|
+
isSignal: true,
|
|
217
|
+
isRequired: false,
|
|
218
|
+
transformFunction: null
|
|
219
|
+
},
|
|
220
|
+
ptOptions: {
|
|
221
|
+
classPropertyName: "ptOptions",
|
|
222
|
+
publicName: "ptOptions",
|
|
223
|
+
isSignal: true,
|
|
224
|
+
isRequired: false,
|
|
225
|
+
transformFunction: null
|
|
226
|
+
},
|
|
227
|
+
unstyled: {
|
|
228
|
+
classPropertyName: "unstyled",
|
|
229
|
+
publicName: "unstyled",
|
|
230
|
+
isSignal: true,
|
|
231
|
+
isRequired: false,
|
|
232
|
+
transformFunction: null
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
host: {
|
|
236
|
+
properties: {
|
|
237
|
+
"class": "passThrough().root?.class",
|
|
238
|
+
"style": "hostStyle()",
|
|
239
|
+
"attr.data-styled": "!isUnstyled() || null",
|
|
240
|
+
"attr.data-layout": "layout()",
|
|
241
|
+
"attr.data-align": "resolvedAlign()"
|
|
242
|
+
},
|
|
243
|
+
classAttribute: "tx-timeline"
|
|
244
|
+
},
|
|
245
|
+
queries: [
|
|
246
|
+
{
|
|
247
|
+
propertyName: "contentTemplate",
|
|
248
|
+
first: true,
|
|
249
|
+
predicate: TxTimelineContent,
|
|
250
|
+
descendants: true,
|
|
251
|
+
isSignal: true
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
propertyName: "oppositeTemplate",
|
|
255
|
+
first: true,
|
|
256
|
+
predicate: TxTimelineOpposite,
|
|
257
|
+
descendants: true,
|
|
258
|
+
isSignal: true
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
propertyName: "markerTemplate",
|
|
262
|
+
first: true,
|
|
263
|
+
predicate: TxTimelineMarker,
|
|
264
|
+
descendants: true,
|
|
265
|
+
isSignal: true
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
propertyName: "connectorTemplate",
|
|
269
|
+
first: true,
|
|
270
|
+
predicate: TxTimelineConnector,
|
|
271
|
+
descendants: true,
|
|
272
|
+
isSignal: true
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
ngImport: i0,
|
|
276
|
+
template: "<ol\n class=\"tx-timeline__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 (event of events(); track $index) {\n <li class=\"tx-timeline__event\" [class]=\"passThrough().event?.class\" [style]=\"passThrough().event?.style\">\n <div\n class=\"tx-timeline__opposite\"\n [class]=\"passThrough().eventOpposite?.class\"\n [style]=\"passThrough().eventOpposite?.style\"\n >\n @if (oppositeTemplate(); as opposite) {\n <ng-container *ngTemplateOutlet=\"opposite.templateRef; context: event\" />\n }\n </div>\n <div\n class=\"tx-timeline__separator\"\n [class]=\"passThrough().eventSeparator?.class\"\n [style]=\"passThrough().eventSeparator?.style\"\n >\n @if (markerTemplate(); as marker) {\n <ng-container *ngTemplateOutlet=\"marker.templateRef; context: event\" />\n } @else {\n <span\n class=\"tx-timeline__marker\"\n aria-hidden=\"true\"\n [class]=\"passThrough().eventMarker?.class\"\n [style]=\"passThrough().eventMarker?.style\"\n ></span>\n }\n @if (!event.last) {\n @if (connectorTemplate(); as connector) {\n <ng-container *ngTemplateOutlet=\"connector.templateRef; context: event\" />\n } @else {\n <span\n class=\"tx-timeline__connector\"\n aria-hidden=\"true\"\n [class]=\"passThrough().eventConnector?.class\"\n [style]=\"passThrough().eventConnector?.style\"\n ></span>\n }\n }\n </div>\n <div\n class=\"tx-timeline__content\"\n [class]=\"passThrough().eventContent?.class\"\n [style]=\"passThrough().eventContent?.style\"\n >\n @if (contentTemplate(); as content) {\n <ng-container *ngTemplateOutlet=\"content.templateRef; context: event\" />\n }\n </div>\n </li>\n }\n</ol>\n",
|
|
277
|
+
styles: [":host{display:block}:host([data-styled]) .tx-timeline__list{display:flex;flex-direction:column;flex-grow:1;margin:0;padding:0;list-style:none}:host([data-styled]) .tx-timeline__event{position:relative;display:flex;min-height:var(--tx-timeline-event-min-height)}:host([data-styled]) .tx-timeline__event:last-child{min-height:0}:host([data-styled]) .tx-timeline__opposite,:host([data-styled]) .tx-timeline__content{flex:1}:host([data-styled]) .tx-timeline__separator{display:flex;flex:0;flex-direction:column;align-items:center}:host([data-styled]) .tx-timeline__marker{position:relative;display:inline-flex;align-self:baseline;align-items:center;justify-content:center;box-sizing:border-box;flex-shrink:0;width:var(--tx-timeline-event-marker-size);height:var(--tx-timeline-event-marker-size);border:var(--tx-timeline-event-marker-border-width) solid var(--tx-timeline-event-marker-border-color);border-radius:var(--tx-timeline-event-marker-border-radius);background:var(--tx-timeline-event-marker-background)}:host([data-styled]) .tx-timeline__marker:before{width:var(--tx-timeline-event-marker-content-size);height:var(--tx-timeline-event-marker-content-size);border-radius:var(--tx-timeline-event-marker-content-border-radius);background:var(--tx-timeline-event-marker-content-background);content:\"\"}:host([data-styled]) .tx-timeline__marker:after{position:absolute;width:100%;height:100%;border-radius:var(--tx-timeline-event-marker-border-radius);box-shadow:var(--tx-timeline-event-marker-content-inset-shadow);content:\"\"}:host([data-styled]) .tx-timeline__connector{flex-grow:1;background:var(--tx-timeline-event-connector-color)}:host([data-styled][data-layout=vertical]) .tx-timeline__opposite,:host([data-styled][data-layout=vertical]) .tx-timeline__content{padding:var(--tx-timeline-vertical-event-content-padding)}:host([data-styled][data-layout=vertical]) .tx-timeline__connector{width:var(--tx-timeline-event-connector-size)}:host([data-styled][data-layout=vertical][data-align=left]) .tx-timeline__opposite{text-align:end}:host([data-styled][data-layout=vertical][data-align=left]) .tx-timeline__content{text-align:start}:host([data-styled][data-layout=vertical][data-align=right]) .tx-timeline__event{flex-direction:row-reverse}:host([data-styled][data-layout=vertical][data-align=right]) .tx-timeline__opposite{text-align:start}:host([data-styled][data-layout=vertical][data-align=right]) .tx-timeline__content{text-align:end}:host([data-styled][data-layout=vertical][data-align=alternate]) .tx-timeline__event:nth-child(odd) .tx-timeline__opposite{text-align:end}:host([data-styled][data-layout=vertical][data-align=alternate]) .tx-timeline__event:nth-child(odd) .tx-timeline__content{text-align:start}:host([data-styled][data-layout=vertical][data-align=alternate]) .tx-timeline__event:nth-child(2n){flex-direction:row-reverse}:host([data-styled][data-layout=vertical][data-align=alternate]) .tx-timeline__event:nth-child(2n) .tx-timeline__opposite{text-align:start}:host([data-styled][data-layout=vertical][data-align=alternate]) .tx-timeline__event:nth-child(2n) .tx-timeline__content{text-align:end}:host([data-styled][data-layout=horizontal]) .tx-timeline__list{flex-direction:row}:host([data-styled][data-layout=horizontal]) .tx-timeline__event{flex:1;flex-direction:column}:host([data-styled][data-layout=horizontal]) .tx-timeline__event:last-child{flex:0}:host([data-styled][data-layout=horizontal]) .tx-timeline__separator{flex-direction:row}:host([data-styled][data-layout=horizontal]) .tx-timeline__connector{width:100%;height:var(--tx-timeline-event-connector-size)}:host([data-styled][data-layout=horizontal]) .tx-timeline__opposite,:host([data-styled][data-layout=horizontal]) .tx-timeline__content{padding:var(--tx-timeline-horizontal-event-content-padding)}:host([data-styled][data-layout=horizontal][data-align=bottom]) .tx-timeline__event,:host([data-styled][data-layout=horizontal][data-align=alternate]) .tx-timeline__event:nth-child(2n){flex-direction:column-reverse}\n"],
|
|
278
|
+
dependencies: [{
|
|
279
|
+
kind: "directive",
|
|
280
|
+
type: NgTemplateOutlet,
|
|
281
|
+
selector: "[ngTemplateOutlet]",
|
|
282
|
+
inputs: [
|
|
283
|
+
"ngTemplateOutletContext",
|
|
284
|
+
"ngTemplateOutlet",
|
|
285
|
+
"ngTemplateOutletInjector"
|
|
286
|
+
]
|
|
287
|
+
}],
|
|
288
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
289
|
+
});
|
|
290
|
+
};
|
|
291
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
292
|
+
minVersion: "12.0.0",
|
|
293
|
+
version: "22.2.3",
|
|
294
|
+
ngImport: i0,
|
|
295
|
+
type: TxTimeline,
|
|
296
|
+
decorators: [{
|
|
297
|
+
type: Component,
|
|
298
|
+
args: [{
|
|
299
|
+
selector: "tx-timeline",
|
|
300
|
+
imports: [NgTemplateOutlet],
|
|
301
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
302
|
+
host: {
|
|
303
|
+
class: "tx-timeline",
|
|
304
|
+
"[class]": "passThrough().root?.class",
|
|
305
|
+
"[style]": "hostStyle()",
|
|
306
|
+
"[attr.data-styled]": "!isUnstyled() || null",
|
|
307
|
+
"[attr.data-layout]": "layout()",
|
|
308
|
+
"[attr.data-align]": "resolvedAlign()"
|
|
309
|
+
},
|
|
310
|
+
template: "<ol\n class=\"tx-timeline__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 (event of events(); track $index) {\n <li class=\"tx-timeline__event\" [class]=\"passThrough().event?.class\" [style]=\"passThrough().event?.style\">\n <div\n class=\"tx-timeline__opposite\"\n [class]=\"passThrough().eventOpposite?.class\"\n [style]=\"passThrough().eventOpposite?.style\"\n >\n @if (oppositeTemplate(); as opposite) {\n <ng-container *ngTemplateOutlet=\"opposite.templateRef; context: event\" />\n }\n </div>\n <div\n class=\"tx-timeline__separator\"\n [class]=\"passThrough().eventSeparator?.class\"\n [style]=\"passThrough().eventSeparator?.style\"\n >\n @if (markerTemplate(); as marker) {\n <ng-container *ngTemplateOutlet=\"marker.templateRef; context: event\" />\n } @else {\n <span\n class=\"tx-timeline__marker\"\n aria-hidden=\"true\"\n [class]=\"passThrough().eventMarker?.class\"\n [style]=\"passThrough().eventMarker?.style\"\n ></span>\n }\n @if (!event.last) {\n @if (connectorTemplate(); as connector) {\n <ng-container *ngTemplateOutlet=\"connector.templateRef; context: event\" />\n } @else {\n <span\n class=\"tx-timeline__connector\"\n aria-hidden=\"true\"\n [class]=\"passThrough().eventConnector?.class\"\n [style]=\"passThrough().eventConnector?.style\"\n ></span>\n }\n }\n </div>\n <div\n class=\"tx-timeline__content\"\n [class]=\"passThrough().eventContent?.class\"\n [style]=\"passThrough().eventContent?.style\"\n >\n @if (contentTemplate(); as content) {\n <ng-container *ngTemplateOutlet=\"content.templateRef; context: event\" />\n }\n </div>\n </li>\n }\n</ol>\n",
|
|
311
|
+
styles: [":host{display:block}:host([data-styled]) .tx-timeline__list{display:flex;flex-direction:column;flex-grow:1;margin:0;padding:0;list-style:none}:host([data-styled]) .tx-timeline__event{position:relative;display:flex;min-height:var(--tx-timeline-event-min-height)}:host([data-styled]) .tx-timeline__event:last-child{min-height:0}:host([data-styled]) .tx-timeline__opposite,:host([data-styled]) .tx-timeline__content{flex:1}:host([data-styled]) .tx-timeline__separator{display:flex;flex:0;flex-direction:column;align-items:center}:host([data-styled]) .tx-timeline__marker{position:relative;display:inline-flex;align-self:baseline;align-items:center;justify-content:center;box-sizing:border-box;flex-shrink:0;width:var(--tx-timeline-event-marker-size);height:var(--tx-timeline-event-marker-size);border:var(--tx-timeline-event-marker-border-width) solid var(--tx-timeline-event-marker-border-color);border-radius:var(--tx-timeline-event-marker-border-radius);background:var(--tx-timeline-event-marker-background)}:host([data-styled]) .tx-timeline__marker:before{width:var(--tx-timeline-event-marker-content-size);height:var(--tx-timeline-event-marker-content-size);border-radius:var(--tx-timeline-event-marker-content-border-radius);background:var(--tx-timeline-event-marker-content-background);content:\"\"}:host([data-styled]) .tx-timeline__marker:after{position:absolute;width:100%;height:100%;border-radius:var(--tx-timeline-event-marker-border-radius);box-shadow:var(--tx-timeline-event-marker-content-inset-shadow);content:\"\"}:host([data-styled]) .tx-timeline__connector{flex-grow:1;background:var(--tx-timeline-event-connector-color)}:host([data-styled][data-layout=vertical]) .tx-timeline__opposite,:host([data-styled][data-layout=vertical]) .tx-timeline__content{padding:var(--tx-timeline-vertical-event-content-padding)}:host([data-styled][data-layout=vertical]) .tx-timeline__connector{width:var(--tx-timeline-event-connector-size)}:host([data-styled][data-layout=vertical][data-align=left]) .tx-timeline__opposite{text-align:end}:host([data-styled][data-layout=vertical][data-align=left]) .tx-timeline__content{text-align:start}:host([data-styled][data-layout=vertical][data-align=right]) .tx-timeline__event{flex-direction:row-reverse}:host([data-styled][data-layout=vertical][data-align=right]) .tx-timeline__opposite{text-align:start}:host([data-styled][data-layout=vertical][data-align=right]) .tx-timeline__content{text-align:end}:host([data-styled][data-layout=vertical][data-align=alternate]) .tx-timeline__event:nth-child(odd) .tx-timeline__opposite{text-align:end}:host([data-styled][data-layout=vertical][data-align=alternate]) .tx-timeline__event:nth-child(odd) .tx-timeline__content{text-align:start}:host([data-styled][data-layout=vertical][data-align=alternate]) .tx-timeline__event:nth-child(2n){flex-direction:row-reverse}:host([data-styled][data-layout=vertical][data-align=alternate]) .tx-timeline__event:nth-child(2n) .tx-timeline__opposite{text-align:start}:host([data-styled][data-layout=vertical][data-align=alternate]) .tx-timeline__event:nth-child(2n) .tx-timeline__content{text-align:end}:host([data-styled][data-layout=horizontal]) .tx-timeline__list{flex-direction:row}:host([data-styled][data-layout=horizontal]) .tx-timeline__event{flex:1;flex-direction:column}:host([data-styled][data-layout=horizontal]) .tx-timeline__event:last-child{flex:0}:host([data-styled][data-layout=horizontal]) .tx-timeline__separator{flex-direction:row}:host([data-styled][data-layout=horizontal]) .tx-timeline__connector{width:100%;height:var(--tx-timeline-event-connector-size)}:host([data-styled][data-layout=horizontal]) .tx-timeline__opposite,:host([data-styled][data-layout=horizontal]) .tx-timeline__content{padding:var(--tx-timeline-horizontal-event-content-padding)}:host([data-styled][data-layout=horizontal][data-align=bottom]) .tx-timeline__event,:host([data-styled][data-layout=horizontal][data-align=alternate]) .tx-timeline__event:nth-child(2n){flex-direction:column-reverse}\n"]
|
|
312
|
+
}]
|
|
313
|
+
}],
|
|
314
|
+
propDecorators: {
|
|
315
|
+
value: [{
|
|
316
|
+
type: i0.Input,
|
|
317
|
+
args: [{
|
|
318
|
+
isSignal: true,
|
|
319
|
+
alias: "value",
|
|
320
|
+
required: false
|
|
321
|
+
}]
|
|
322
|
+
}],
|
|
323
|
+
layout: [{
|
|
324
|
+
type: i0.Input,
|
|
325
|
+
args: [{
|
|
326
|
+
isSignal: true,
|
|
327
|
+
alias: "layout",
|
|
328
|
+
required: false
|
|
329
|
+
}]
|
|
330
|
+
}],
|
|
331
|
+
align: [{
|
|
332
|
+
type: i0.Input,
|
|
333
|
+
args: [{
|
|
334
|
+
isSignal: true,
|
|
335
|
+
alias: "align",
|
|
336
|
+
required: false
|
|
337
|
+
}]
|
|
338
|
+
}],
|
|
339
|
+
ariaLabel: [{
|
|
340
|
+
type: i0.Input,
|
|
341
|
+
args: [{
|
|
342
|
+
isSignal: true,
|
|
343
|
+
alias: "ariaLabel",
|
|
344
|
+
required: false
|
|
345
|
+
}]
|
|
346
|
+
}],
|
|
347
|
+
ariaLabelledBy: [{
|
|
348
|
+
type: i0.Input,
|
|
349
|
+
args: [{
|
|
350
|
+
isSignal: true,
|
|
351
|
+
alias: "ariaLabelledBy",
|
|
352
|
+
required: false
|
|
353
|
+
}]
|
|
354
|
+
}],
|
|
355
|
+
dt: [{
|
|
356
|
+
type: i0.Input,
|
|
357
|
+
args: [{
|
|
358
|
+
isSignal: true,
|
|
359
|
+
alias: "dt",
|
|
360
|
+
required: false
|
|
361
|
+
}]
|
|
362
|
+
}],
|
|
363
|
+
pt: [{
|
|
364
|
+
type: i0.Input,
|
|
365
|
+
args: [{
|
|
366
|
+
isSignal: true,
|
|
367
|
+
alias: "pt",
|
|
368
|
+
required: false
|
|
369
|
+
}]
|
|
370
|
+
}],
|
|
371
|
+
ptOptions: [{
|
|
372
|
+
type: i0.Input,
|
|
373
|
+
args: [{
|
|
374
|
+
isSignal: true,
|
|
375
|
+
alias: "ptOptions",
|
|
376
|
+
required: false
|
|
377
|
+
}]
|
|
378
|
+
}],
|
|
379
|
+
unstyled: [{
|
|
380
|
+
type: i0.Input,
|
|
381
|
+
args: [{
|
|
382
|
+
isSignal: true,
|
|
383
|
+
alias: "unstyled",
|
|
384
|
+
required: false
|
|
385
|
+
}]
|
|
386
|
+
}],
|
|
387
|
+
contentTemplate: [{
|
|
388
|
+
type: i0.ContentChild,
|
|
389
|
+
args: [i0.forwardRef(() => TxTimelineContent), { isSignal: true }]
|
|
390
|
+
}],
|
|
391
|
+
oppositeTemplate: [{
|
|
392
|
+
type: i0.ContentChild,
|
|
393
|
+
args: [i0.forwardRef(() => TxTimelineOpposite), { isSignal: true }]
|
|
394
|
+
}],
|
|
395
|
+
markerTemplate: [{
|
|
396
|
+
type: i0.ContentChild,
|
|
397
|
+
args: [i0.forwardRef(() => TxTimelineMarker), { isSignal: true }]
|
|
398
|
+
}],
|
|
399
|
+
connectorTemplate: [{
|
|
400
|
+
type: i0.ContentChild,
|
|
401
|
+
args: [i0.forwardRef(() => TxTimelineConnector), { isSignal: true }]
|
|
402
|
+
}]
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
export { TxTimeline, TxTimelineConnector, TxTimelineContent, TxTimelineMarker, TxTimelineOpposite };
|
|
406
|
+
|
|
407
|
+
//# sourceMappingURL=tectra-ng-ui-timeline.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tectra-ng-ui-timeline.mjs","names":[],"sources":["../../../../packages/ui/timeline/src/timeline.templates.ts","../../../../packages/ui/timeline/src/timeline.component.ts","../../../../packages/ui/timeline/src/timeline.component.html"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\nimport { TxTimelineEventContext } from './timeline.types';\n\n@Directive({ selector: 'ng-template[txTimelineContent]' })\nexport class TxTimelineContent<T = unknown> {\n readonly templateRef = inject<TemplateRef<TxTimelineEventContext<T>>>(TemplateRef);\n}\n\n@Directive({ selector: 'ng-template[txTimelineOpposite]' })\nexport class TxTimelineOpposite<T = unknown> {\n readonly templateRef = inject<TemplateRef<TxTimelineEventContext<T>>>(TemplateRef);\n}\n\n@Directive({ selector: 'ng-template[txTimelineMarker]' })\nexport class TxTimelineMarker<T = unknown> {\n readonly templateRef = inject<TemplateRef<TxTimelineEventContext<T>>>(TemplateRef);\n}\n\n@Directive({ selector: 'ng-template[txTimelineConnector]' })\nexport class TxTimelineConnector<T = unknown> {\n readonly templateRef = inject<TemplateRef<TxTimelineEventContext<T>>>(TemplateRef);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, contentChild, input } from '@angular/core';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraDeepPartial, TectraTimelineTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxTimelineConnector, TxTimelineContent, TxTimelineMarker, TxTimelineOpposite } from './timeline.templates';\nimport { TxTimelineAlign, TxTimelineEventContext, TxTimelineLayout, TxTimelinePart } from './timeline.types';\n\n@Component({\n selector: 'tx-timeline',\n imports: [NgTemplateOutlet],\n templateUrl: './timeline.component.html',\n styleUrl: './timeline.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-timeline',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-layout]': 'layout()',\n '[attr.data-align]': 'resolvedAlign()',\n },\n})\nexport class TxTimeline<T = unknown> {\n readonly value = input<readonly T[] | null | undefined>([]);\n readonly layout = input<TxTimelineLayout>('vertical');\n readonly align = input<TxTimelineAlign | undefined>(undefined);\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly ariaLabelledBy = input<string | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraTimelineTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxTimelinePart, TxTimeline<T>> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n protected readonly contentTemplate = contentChild(TxTimelineContent);\n protected readonly oppositeTemplate = contentChild(TxTimelineOpposite);\n protected readonly markerTemplate = contentChild(TxTimelineMarker);\n protected readonly connectorTemplate = contentChild(TxTimelineConnector);\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('timeline', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-timeline'), ...this.passThrough().root?.style }));\n readonly resolvedAlign = computed<TxTimelineAlign>(() => this.align() ?? (this.layout() === 'horizontal' ? 'top' : 'left'));\n\n protected readonly events = computed(() => {\n const items = this.value() ?? [];\n return items.map<TxTimelineEventContext<T>>((item, index) => ({\n $implicit: item,\n index,\n first: index === 0,\n last: index === items.length - 1,\n }));\n });\n}\n","<ol\n class=\"tx-timeline__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 (event of events(); track $index) {\n <li class=\"tx-timeline__event\" [class]=\"passThrough().event?.class\" [style]=\"passThrough().event?.style\">\n <div\n class=\"tx-timeline__opposite\"\n [class]=\"passThrough().eventOpposite?.class\"\n [style]=\"passThrough().eventOpposite?.style\"\n >\n @if (oppositeTemplate(); as opposite) {\n <ng-container *ngTemplateOutlet=\"opposite.templateRef; context: event\" />\n }\n </div>\n <div\n class=\"tx-timeline__separator\"\n [class]=\"passThrough().eventSeparator?.class\"\n [style]=\"passThrough().eventSeparator?.style\"\n >\n @if (markerTemplate(); as marker) {\n <ng-container *ngTemplateOutlet=\"marker.templateRef; context: event\" />\n } @else {\n <span\n class=\"tx-timeline__marker\"\n aria-hidden=\"true\"\n [class]=\"passThrough().eventMarker?.class\"\n [style]=\"passThrough().eventMarker?.style\"\n ></span>\n }\n @if (!event.last) {\n @if (connectorTemplate(); as connector) {\n <ng-container *ngTemplateOutlet=\"connector.templateRef; context: event\" />\n } @else {\n <span\n class=\"tx-timeline__connector\"\n aria-hidden=\"true\"\n [class]=\"passThrough().eventConnector?.class\"\n [style]=\"passThrough().eventConnector?.style\"\n ></span>\n }\n }\n </div>\n <div\n class=\"tx-timeline__content\"\n [class]=\"passThrough().eventContent?.class\"\n [style]=\"passThrough().eventContent?.style\"\n >\n @if (contentTemplate(); as content) {\n <ng-container *ngTemplateOutlet=\"content.templateRef; context: event\" />\n }\n </div>\n </li>\n }\n</ol>\n"],"mappings":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A,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,IAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,IAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,iBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,iBAAiB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,kBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAChB,kBAAkB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,gBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBACpB,gBAAgB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,mBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBACb,mBAAmB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Month calendar
|
|
2
|
+
|
|
3
|
+
A month grid that draws events as continuous bars across days, with day markers, a `+N` link for the events that do not fit and keyboard navigation. Give it events and markers, handle day and event clicks — for schedules, deadlines, shifts or bookings. Below 560px of its own width it turns into a compact grid with coloured dots.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<tx-month-calendar [month]="month()" [events]="events()" [selectedDate]="selected()" (dayClick)="selected.set($event)" (eventClick)="open($event)" />
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Inputs
|
|
10
|
+
| Name | Description |
|
|
11
|
+
|---|---|
|
|
12
|
+
| month | Any date inside the month to show; the month of creation by default |
|
|
13
|
+
| events | Bars: `{ id, start, end?, title, tone, avatar?, data? }`; `start` / `end` are `Date` or `'yyyy-MM-dd'` (local days), `end` is the inclusive last day; `tone` is `primary`, `info`, `success`, `warn`, `danger` or `neutral`; `avatar` `{ src?, name? }` shows at the start of the bar |
|
|
14
|
+
| markers | Pills in a day header (a dot in the compact grid): `{ date, tone, label, icon? }` |
|
|
15
|
+
| selectedDate | Highlighted day: a `Date` or `'yyyy-MM-dd'`; it gets the keyboard focus |
|
|
16
|
+
| weekStartsOn | First day of the week: 0 Sunday … 6 Saturday; locale default |
|
|
17
|
+
| maxLanes | Bar rows per week; the rest goes to the `+N` link of the day |
|
|
18
|
+
| labels | Own texts `{ more, today, region }`: `more` with a `{count}` placeholder, `today` added to the name of today, `region` the name of the grid; translated by default |
|
|
19
|
+
| locale | BCP 47 locale for weekday names and day names; the kit locale by default |
|
|
20
|
+
| today | The day treated as today (the day of creation by default); pass it from a clock if the page stays open over midnight |
|
|
21
|
+
| dt | Design tokens of this instance (`monthCalendar`) |
|
|
22
|
+
| pt | Classes and styles of the parts: `root`, `grid`, `head`, `weekday`, `week`, `cell`, `day`, `number`, `marker`, `event`, `more` |
|
|
23
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
24
|
+
| unstyled | Removes the tectra styles |
|
|
25
|
+
|
|
26
|
+
## Outputs
|
|
27
|
+
| Name | Description |
|
|
28
|
+
|---|---|
|
|
29
|
+
| dayClick | A day or its `+N` link was clicked; the day `Date` |
|
|
30
|
+
| eventClick | A bar was clicked; the event |
|
|
31
|
+
|
|
32
|
+
## Slots
|
|
33
|
+
| Name | Description |
|
|
34
|
+
|---|---|
|
|
35
|
+
| txMonthCalendarEvent | `<ng-template txMonthCalendarEvent let-event let-segment="segment">` — content of a bar; `segment` has `lane`, `column`, `span`, `startsHere`, `endsHere` |
|
|
36
|
+
|
|
37
|
+
## Keyboard
|
|
38
|
+
| Key | Action |
|
|
39
|
+
|---|---|
|
|
40
|
+
| Tab | Moves to the selected day (or today, or the first day of the month) |
|
|
41
|
+
| Arrow keys | Previous / next day, same day of the previous / next week |
|
|
42
|
+
| Enter / Space | Clicks the focused day |
|
|
43
|
+
|
|
44
|
+
## Accessibility
|
|
45
|
+
|
|
46
|
+
The month is a `grid` of `gridcell`s with one focusable day (roving focus). Each day is named by its full date, "Today", its markers and its events ("4 events, Sprint, Review…"); the bars and `+N` links are mouse shortcuts hidden from screen readers, so nothing is lost and Enter on a day does what `+N` does. Days of other months and weekend names use the muted text colour, which keeps AA contrast. The selected day has `aria-selected`, today `aria-current="date"`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tectra-ng/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Angular UI components for tectra: signals, OnPush, accessible and themable, one entry point per component.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://tectra-ng.com",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"@angular/forms": "^22.0.0",
|
|
26
26
|
"@angular/router": "^22.0.0",
|
|
27
27
|
"rxjs": "^7.8.0",
|
|
28
|
-
"@tectra-ng/core": "^0.1.
|
|
29
|
-
"@tectra-ng/icons": "^0.1.
|
|
30
|
-
"@tectra-ng/themes": "^0.1.
|
|
28
|
+
"@tectra-ng/core": "^0.1.3",
|
|
29
|
+
"@tectra-ng/icons": "^0.1.3",
|
|
30
|
+
"@tectra-ng/themes": "^0.1.3"
|
|
31
31
|
},
|
|
32
32
|
"peerDependenciesMeta": {
|
|
33
33
|
"@angular/router": {
|
|
@@ -51,6 +51,10 @@
|
|
|
51
51
|
"types": "./types/tectra-ng-ui-amount.d.ts",
|
|
52
52
|
"default": "./fesm2022/tectra-ng-ui-amount.mjs"
|
|
53
53
|
},
|
|
54
|
+
"./analog-clock": {
|
|
55
|
+
"types": "./types/tectra-ng-ui-analog-clock.d.ts",
|
|
56
|
+
"default": "./fesm2022/tectra-ng-ui-analog-clock.mjs"
|
|
57
|
+
},
|
|
54
58
|
"./autocomplete": {
|
|
55
59
|
"types": "./types/tectra-ng-ui-autocomplete.d.ts",
|
|
56
60
|
"default": "./fesm2022/tectra-ng-ui-autocomplete.mjs"
|
|
@@ -99,6 +103,10 @@
|
|
|
99
103
|
"types": "./types/tectra-ng-ui-confirm.d.ts",
|
|
100
104
|
"default": "./fesm2022/tectra-ng-ui-confirm.mjs"
|
|
101
105
|
},
|
|
106
|
+
"./countdown": {
|
|
107
|
+
"types": "./types/tectra-ng-ui-countdown.d.ts",
|
|
108
|
+
"default": "./fesm2022/tectra-ng-ui-countdown.mjs"
|
|
109
|
+
},
|
|
102
110
|
"./country": {
|
|
103
111
|
"types": "./types/tectra-ng-ui-country.d.ts",
|
|
104
112
|
"default": "./fesm2022/tectra-ng-ui-country.mjs"
|
|
@@ -111,6 +119,10 @@
|
|
|
111
119
|
"types": "./types/tectra-ng-ui-data-view.d.ts",
|
|
112
120
|
"default": "./fesm2022/tectra-ng-ui-data-view.mjs"
|
|
113
121
|
},
|
|
122
|
+
"./datepicker": {
|
|
123
|
+
"types": "./types/tectra-ng-ui-datepicker.d.ts",
|
|
124
|
+
"default": "./fesm2022/tectra-ng-ui-datepicker.mjs"
|
|
125
|
+
},
|
|
114
126
|
"./dialog": {
|
|
115
127
|
"types": "./types/tectra-ng-ui-dialog.d.ts",
|
|
116
128
|
"default": "./fesm2022/tectra-ng-ui-dialog.mjs"
|
|
@@ -127,6 +139,14 @@
|
|
|
127
139
|
"types": "./types/tectra-ng-ui-email-suggestion.d.ts",
|
|
128
140
|
"default": "./fesm2022/tectra-ng-ui-email-suggestion.mjs"
|
|
129
141
|
},
|
|
142
|
+
"./export": {
|
|
143
|
+
"types": "./types/tectra-ng-ui-export.d.ts",
|
|
144
|
+
"default": "./fesm2022/tectra-ng-ui-export.mjs"
|
|
145
|
+
},
|
|
146
|
+
"./export-font": {
|
|
147
|
+
"types": "./types/tectra-ng-ui-export-font.d.ts",
|
|
148
|
+
"default": "./fesm2022/tectra-ng-ui-export-font.mjs"
|
|
149
|
+
},
|
|
130
150
|
"./field": {
|
|
131
151
|
"types": "./types/tectra-ng-ui-field.d.ts",
|
|
132
152
|
"default": "./fesm2022/tectra-ng-ui-field.mjs"
|
|
@@ -195,6 +215,10 @@
|
|
|
195
215
|
"types": "./types/tectra-ng-ui-message.d.ts",
|
|
196
216
|
"default": "./fesm2022/tectra-ng-ui-message.mjs"
|
|
197
217
|
},
|
|
218
|
+
"./month-calendar": {
|
|
219
|
+
"types": "./types/tectra-ng-ui-month-calendar.d.ts",
|
|
220
|
+
"default": "./fesm2022/tectra-ng-ui-month-calendar.mjs"
|
|
221
|
+
},
|
|
198
222
|
"./multiselect": {
|
|
199
223
|
"types": "./types/tectra-ng-ui-multiselect.d.ts",
|
|
200
224
|
"default": "./fesm2022/tectra-ng-ui-multiselect.mjs"
|
|
@@ -255,6 +279,10 @@
|
|
|
255
279
|
"types": "./types/tectra-ng-ui-slider.d.ts",
|
|
256
280
|
"default": "./fesm2022/tectra-ng-ui-slider.mjs"
|
|
257
281
|
},
|
|
282
|
+
"./sparkline": {
|
|
283
|
+
"types": "./types/tectra-ng-ui-sparkline.d.ts",
|
|
284
|
+
"default": "./fesm2022/tectra-ng-ui-sparkline.mjs"
|
|
285
|
+
},
|
|
258
286
|
"./speed-dial": {
|
|
259
287
|
"types": "./types/tectra-ng-ui-speed-dial.d.ts",
|
|
260
288
|
"default": "./fesm2022/tectra-ng-ui-speed-dial.mjs"
|
|
@@ -263,6 +291,10 @@
|
|
|
263
291
|
"types": "./types/tectra-ng-ui-split-button.d.ts",
|
|
264
292
|
"default": "./fesm2022/tectra-ng-ui-split-button.mjs"
|
|
265
293
|
},
|
|
294
|
+
"./stat-tiles": {
|
|
295
|
+
"types": "./types/tectra-ng-ui-stat-tiles.d.ts",
|
|
296
|
+
"default": "./fesm2022/tectra-ng-ui-stat-tiles.mjs"
|
|
297
|
+
},
|
|
266
298
|
"./status-icon": {
|
|
267
299
|
"types": "./types/tectra-ng-ui-status-icon.d.ts",
|
|
268
300
|
"default": "./fesm2022/tectra-ng-ui-status-icon.mjs"
|
|
@@ -279,6 +311,10 @@
|
|
|
279
311
|
"types": "./types/tectra-ng-ui-textarea.d.ts",
|
|
280
312
|
"default": "./fesm2022/tectra-ng-ui-textarea.mjs"
|
|
281
313
|
},
|
|
314
|
+
"./timeline": {
|
|
315
|
+
"types": "./types/tectra-ng-ui-timeline.d.ts",
|
|
316
|
+
"default": "./fesm2022/tectra-ng-ui-timeline.mjs"
|
|
317
|
+
},
|
|
282
318
|
"./toast": {
|
|
283
319
|
"types": "./types/tectra-ng-ui-toast.d.ts",
|
|
284
320
|
"default": "./fesm2022/tectra-ng-ui-toast.mjs"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Sparkline
|
|
2
|
+
|
|
3
|
+
A tiny trend line — an SVG line with a soft filled area — for a list of numbers. Use it in stat tiles, table cells or cards where a full chart is too much.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<tx-sparkline [values]="visitsByDay" tone="success" />
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Inputs
|
|
10
|
+
| Name | Description |
|
|
11
|
+
|---|---|
|
|
12
|
+
| values | Numbers in order; fewer than two finite numbers draw nothing |
|
|
13
|
+
| tone | Line and area colour: `primary`, `info`, `success`, `warn` or `danger` |
|
|
14
|
+
| ariaLabel | Text for screen readers, e.g. "Visits went up 12% this week"; without it the sparkline is hidden from them |
|
|
15
|
+
| dt | Design tokens of this instance (`sparkline`) |
|
|
16
|
+
| pt | Classes and styles of the parts: `root`, `svg`, `area`, `line` |
|
|
17
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
18
|
+
| unstyled | Removes the tectra styles |
|
|
19
|
+
|
|
20
|
+
## Keyboard
|
|
21
|
+
| Key | Action |
|
|
22
|
+
|---|---|
|
|
23
|
+
| — | Not focusable |
|
|
24
|
+
|
|
25
|
+
## Notes
|
|
26
|
+
|
|
27
|
+
The line is scaled between the smallest and the largest value, so it shows the shape of the trend, not absolute values; there are no axes or tooltips. The host is a full-width block, `height` token high (31.5px); set a size on the host to change it — the SVG stretches and the line keeps its width. `sparklinePoints(values)` returns the points in a 120 × 36 box.
|