@cngx/common 0.1.0-rc.7 → 0.1.0-rc.8
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/card/README.md +2 -1
- package/data/README.md +10 -1
- package/dialog/README.md +23 -1
- package/fesm2022/cngx-common-a11y.mjs +125 -111
- package/fesm2022/cngx-common-a11y.mjs.map +1 -1
- package/fesm2022/cngx-common-audio.mjs +47 -5
- package/fesm2022/cngx-common-audio.mjs.map +1 -1
- package/fesm2022/cngx-common-card.mjs +300 -46
- package/fesm2022/cngx-common-card.mjs.map +1 -1
- package/fesm2022/cngx-common-chart.mjs +1176 -453
- package/fesm2022/cngx-common-chart.mjs.map +1 -1
- package/fesm2022/cngx-common-command.mjs +37 -10
- package/fesm2022/cngx-common-command.mjs.map +1 -1
- package/fesm2022/cngx-common-data.mjs +1318 -469
- package/fesm2022/cngx-common-data.mjs.map +1 -1
- package/fesm2022/cngx-common-dialog.mjs +151 -14
- package/fesm2022/cngx-common-dialog.mjs.map +1 -1
- package/fesm2022/cngx-common-display.mjs +340 -73
- package/fesm2022/cngx-common-display.mjs.map +1 -1
- package/fesm2022/cngx-common-interactive.mjs +1744 -952
- package/fesm2022/cngx-common-interactive.mjs.map +1 -1
- package/fesm2022/cngx-common-layout.mjs +841 -114
- package/fesm2022/cngx-common-layout.mjs.map +1 -1
- package/fesm2022/cngx-common-popover.mjs +350 -60
- package/fesm2022/cngx-common-popover.mjs.map +1 -1
- package/fesm2022/cngx-common-stepper.mjs +727 -317
- package/fesm2022/cngx-common-stepper.mjs.map +1 -1
- package/fesm2022/cngx-common-tabs.mjs +1601 -1243
- package/fesm2022/cngx-common-tabs.mjs.map +1 -1
- package/fesm2022/cngx-common-timeline.mjs +137 -53
- package/fesm2022/cngx-common-timeline.mjs.map +1 -1
- package/fesm2022/cngx-common.mjs +1 -1
- package/interactive/README.md +15 -4
- package/layout/README.md +21 -1
- package/package.json +3 -3
- package/popover/README.md +18 -2
- package/stepper/README.md +6 -4
- package/theming/components/cngx-accordion.css +1 -1
- package/theming/components/cngx-backdrop.css +12 -0
- package/theming/components/cngx-button-toggle.css +29 -3
- package/theming/components/cngx-data-grid.css +168 -1
- package/theming/components/cngx-dialog.css +13 -0
- package/theming/components/cngx-listbox.css +21 -12
- package/theming/components/cngx-menu.css +56 -16
- package/theming/components/cngx-popover.css +24 -0
- package/theming/components/cngx-recycler-placeholder.css +196 -0
- package/theming/components/cngx-ripple.css +1 -1
- package/theming/components/cngx-slider.css +32 -1
- package/theming/components/cngx-tooltip.css +12 -0
- package/timeline/README.md +155 -0
- package/types/cngx-common-a11y.d.ts +42 -18
- package/types/cngx-common-card.d.ts +201 -17
- package/types/cngx-common-chart.d.ts +343 -47
- package/types/cngx-common-command.d.ts +31 -8
- package/types/cngx-common-data.d.ts +581 -68
- package/types/cngx-common-dialog.d.ts +158 -3
- package/types/cngx-common-display.d.ts +356 -142
- package/types/cngx-common-interactive.d.ts +859 -210
- package/types/cngx-common-layout.d.ts +567 -28
- package/types/cngx-common-popover.d.ts +262 -39
- package/types/cngx-common-stepper.d.ts +366 -116
- package/types/cngx-common-tabs.d.ts +214 -50
- package/types/cngx-common-timeline.d.ts +82 -16
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { linkedSignal, InjectionToken, input, ViewEncapsulation, ChangeDetectionStrategy, Component, makeEnvironmentProviders, SkipSelf, Optional, inject, Directive, ElementRef, contentChild,
|
|
3
|
-
import { coerceBooleanProperty } from '@cngx/core/utils';
|
|
2
|
+
import { linkedSignal, InjectionToken, input, ViewEncapsulation, ChangeDetectionStrategy, Component, computed, makeEnvironmentProviders, SkipSelf, Optional, inject, Directive, ElementRef, contentChild, isDevMode, afterNextRender, TemplateRef } from '@angular/core';
|
|
3
|
+
import { memoize, coerceBooleanProperty, dateTimeFormatterFor, createNestedOverrideMerge, coerceSignal } from '@cngx/core/utils';
|
|
4
4
|
import { NgTemplateOutlet } from '@angular/common';
|
|
5
|
+
import { formatMessage, createNestedLanguageSection } from '@cngx/core/i18n';
|
|
5
6
|
|
|
6
7
|
function pad2(value) {
|
|
7
8
|
return value < 10 ? `0${value}` : `${value}`;
|
|
@@ -15,9 +16,24 @@ function groupByDay(date) {
|
|
|
15
16
|
start: new Date(year, month, day),
|
|
16
17
|
};
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
const ISO_FIRST_DAY = 1;
|
|
20
|
+
/**
|
|
21
|
+
* First day of the week for a locale, `1` (Monday) to `7` (Sunday); ISO
|
|
22
|
+
* Monday without week info.
|
|
23
|
+
*/
|
|
24
|
+
const firstDayOfWeek = memoize((locale) => {
|
|
25
|
+
let intlLocale;
|
|
26
|
+
try {
|
|
27
|
+
intlLocale = new Intl.Locale(locale);
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
return ISO_FIRST_DAY;
|
|
31
|
+
}
|
|
32
|
+
return (intlLocale.getWeekInfo?.() ?? intlLocale.weekInfo)?.firstDay ?? ISO_FIRST_DAY;
|
|
33
|
+
}, { cacheLimit: 32 });
|
|
34
|
+
function groupByWeek(date, firstDay) {
|
|
35
|
+
// `firstDay` counts Monday as 1 and Sunday as 7; `getDay()` counts Sunday as 0.
|
|
36
|
+
const offset = (date.getDay() - (firstDay % 7) + 7) % 7;
|
|
21
37
|
const start = new Date(date.getFullYear(), date.getMonth(), date.getDate() - offset);
|
|
22
38
|
return {
|
|
23
39
|
key: `W${start.getFullYear()}-${pad2(start.getMonth() + 1)}-${pad2(start.getDate())}`,
|
|
@@ -32,13 +48,13 @@ function groupByMonth(date) {
|
|
|
32
48
|
function groupByNone(date) {
|
|
33
49
|
return { key: 'all', start: date };
|
|
34
50
|
}
|
|
35
|
-
function resolveGrouper(mode) {
|
|
51
|
+
function resolveGrouper(mode, firstDay) {
|
|
36
52
|
if (typeof mode === 'function') {
|
|
37
53
|
return mode;
|
|
38
54
|
}
|
|
39
55
|
switch (mode) {
|
|
40
56
|
case 'week':
|
|
41
|
-
return groupByWeek;
|
|
57
|
+
return (date) => groupByWeek(date, firstDay);
|
|
42
58
|
case 'month':
|
|
43
59
|
return groupByMonth;
|
|
44
60
|
case 'none':
|
|
@@ -100,7 +116,10 @@ function groupsEqual(a, b) {
|
|
|
100
116
|
* @since 0.1.0
|
|
101
117
|
*/
|
|
102
118
|
function createTimelineGrouping(options) {
|
|
103
|
-
const { items, dateAccessor, groupBy, direction } = options;
|
|
119
|
+
const { items, dateAccessor, groupBy, direction, locale } = options;
|
|
120
|
+
// Dev-only diagnostic; once per grouping instance so a recompute over the
|
|
121
|
+
// same bad data does not spam the console.
|
|
122
|
+
let warnedInvalidDate = false;
|
|
104
123
|
// `linkedSignal` rather than `computed`: append-stability needs the
|
|
105
124
|
// previous bands to hand their references back, and this is the sanctioned
|
|
106
125
|
// way to read them. A closure cache mutated inside a `computed` would make
|
|
@@ -108,9 +127,22 @@ function createTimelineGrouping(options) {
|
|
|
108
127
|
// run, not only on its inputs.
|
|
109
128
|
const groups = linkedSignal({ ...(ngDevMode ? { debugName: "groups" } : /* istanbul ignore next */ {}), source: () => {
|
|
110
129
|
const source = items();
|
|
111
|
-
const
|
|
130
|
+
const firstDay = locale ? firstDayOfWeek(locale()) : ISO_FIRST_DAY;
|
|
131
|
+
const grouper = resolveGrouper(groupBy?.() ?? 'day', firstDay);
|
|
112
132
|
const sign = (direction?.() ?? 'desc') === 'asc' ? 1 : -1;
|
|
113
133
|
const dated = source.map((item) => ({ item, date: toDate(dateAccessor(item)) }));
|
|
134
|
+
// An unparsable value does not throw - NaN dates all bucket under one
|
|
135
|
+
// band whose header renders "Invalid Date". Surface the mistake in dev
|
|
136
|
+
// instead of leaving that header as the only clue.
|
|
137
|
+
if (typeof ngDevMode !== 'undefined' &&
|
|
138
|
+
ngDevMode &&
|
|
139
|
+
!warnedInvalidDate &&
|
|
140
|
+
dated.some((entry) => Number.isNaN(entry.date.getTime()))) {
|
|
141
|
+
warnedInvalidDate = true;
|
|
142
|
+
console.warn('createTimelineGrouping: dateAccessor produced an invalid date for at least one ' +
|
|
143
|
+
'item. Those items cluster into a single band whose header renders ' +
|
|
144
|
+
'"Invalid Date" - check the accessor and the raw values it reads.');
|
|
145
|
+
}
|
|
114
146
|
dated.sort((a, b) => sign * (a.date.getTime() - b.date.getTime()));
|
|
115
147
|
// Map preserves insertion order, so buckets come out already sorted.
|
|
116
148
|
const buckets = new Map();
|
|
@@ -224,7 +256,7 @@ class CngxTimelineMarker {
|
|
|
224
256
|
*/
|
|
225
257
|
busy = input(false, { ...(ngDevMode ? { debugName: "busy" } : /* istanbul ignore next */ {}), transform: coerceBooleanProperty });
|
|
226
258
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxTimelineMarker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
227
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.4", type: CngxTimelineMarker, isStandalone: true, selector: "cngx-timeline-marker", inputs: { status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, busy: { classPropertyName: "busy", publicName: "busy", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-hidden": "true" }, properties: { "attr.data-status": "status()", "class.cngx-timeline-marker--busy": "busy()" }, classAttribute: "cngx-timeline-marker" }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: ["@layer cngx.tokens{@property --cngx-timeline-rail-inset{syntax: \"<length>\"; inherits: true; initial-value: 6px;}@property --cngx-timeline-marker-size{syntax: \"<length>\"; inherits: true; initial-value: 12px;}@property --cngx-timeline-marker-glyph-size{syntax: \"<percentage>\"; inherits: true; initial-value: 60%;}@property --cngx-timeline-item-inline-size{syntax: \"<length>\"; inherits: true; initial-value: 192px;}@property --cngx-timeline-connector-width{syntax: \"<length>\"; inherits: true; initial-value: 2px;}@property --cngx-timeline-marker-ring-width{syntax: \"<length>\"; inherits: true; initial-value: 3px;}@property --cngx-timeline-connector-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.88 .005 250);}@property --cngx-timeline-surface{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-timeline-marker-fg{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-timeline-meta-size{syntax: \"*\"; inherits: true; initial-value: .8125rem;}@property --cngx-timeline-text-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.2 .01 250);}@property --cngx-timeline-muted-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.5 .01 250);}@property --cngx-timeline-done-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.6 .15 145);}@property --cngx-timeline-active-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-timeline-upcoming-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.5 .01 250);}@property --cngx-timeline-rejected-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.6 .18 25);}@property --cngx-timeline-pulse-duration{syntax: \"<time>\"; inherits: true; initial-value: 1.6s;}}:root{--cngx-timeline-connector-color: var(--cngx-color-border, oklch(.88 .005 250));--cngx-timeline-surface: var(--cngx-color-surface, oklch(1 0 0));--cngx-timeline-text-color: var(--cngx-color-text, oklch(.2 .01 250));--cngx-timeline-muted-color: var(--cngx-color-text-muted, oklch(.5 .01 250));--cngx-timeline-done-color: var(--cngx-color-success, oklch(.6 .15 145));--cngx-timeline-active-color: var(--cngx-color-primary, oklch(.66 .19 50));--cngx-timeline-upcoming-color: var(--cngx-color-text-muted, oklch(.5 .01 250));--cngx-timeline-rejected-color: var(--cngx-color-danger, oklch(.6 .18 25))}\n", "@layer cngx.components{@scope(.cngx-timeline-marker){:scope{display:inline-flex;align-items:center;justify-content:center;flex:none;inline-size:var(--cngx-timeline-marker-size, 12px);block-size:var(--cngx-timeline-marker-size, 12px);border-radius:50%;overflow:hidden;background:var(--cngx-timeline-connector-color, oklch(.88 .005 250));box-shadow:0 0 0 var(--cngx-timeline-connector-width, 2px) var(--cngx-timeline-surface, oklch(1 0 0));color:var(--cngx-timeline-marker-fg, oklch(1 0 0));font-size:.625em;line-height:1}:scope>img,:scope>picture{inline-size:100%;block-size:100%;object-fit:cover;border-radius:inherit}:scope>svg{inline-size:var(--cngx-timeline-marker-glyph-size, 60%);block-size:var(--cngx-timeline-marker-glyph-size, 60%)}:scope[data-status=done]{background:var(--cngx-timeline-done-color, oklch(.6 .15 145))}:scope[data-status=active]{background:var(--cngx-timeline-active-color, oklch(.66 .19 50))}:scope[data-status=rejected]{background:var(--cngx-timeline-rejected-color, oklch(.6 .18 25))}:scope[data-status=upcoming]{background:var(--cngx-timeline-surface, oklch(1 0 0));border:var(--cngx-timeline-connector-width, 2px) dashed var(--cngx-timeline-upcoming-color, oklch(.5 .01 250));color:var(--cngx-timeline-upcoming-color, oklch(.5 .01 250))}}}@layer cngx.components{@scope(.cngx-timeline-marker--busy){:scope{animation:cngx-timeline-marker-pulse var(--cngx-timeline-pulse-duration, 1.6s) ease-in-out infinite}}}@keyframes cngx-timeline-marker-pulse{0%,to{box-shadow:0 0 0 var(--cngx-timeline-connector-width, 2px) var(--cngx-timeline-surface, oklch(1 0 0)),0 0 0 var(--cngx-timeline-connector-width, 2px) transparent}50%{box-shadow:0 0 0 var(--cngx-timeline-connector-width, 2px) var(--cngx-timeline-surface, oklch(1 0 0)),0 0 0 calc(var(--cngx-timeline-connector-width, 2px) + var(--cngx-timeline-marker-ring-width, 3px)) color-mix(in oklch,currentColor 35%,transparent)}}@media(prefers-reduced-motion:reduce){.cngx-timeline-marker--busy{animation:none}}@media(forced-colors:active){.cngx-timeline-marker:not([data-status=upcoming]){box-sizing:border-box;border:var(--cngx-timeline-connector-width, 2px) solid CanvasText}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
259
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.4", type: CngxTimelineMarker, isStandalone: true, selector: "cngx-timeline-marker", inputs: { status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, busy: { classPropertyName: "busy", publicName: "busy", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-hidden": "true" }, properties: { "attr.data-status": "status()", "class.cngx-timeline-marker--busy": "busy()" }, classAttribute: "cngx-timeline-marker" }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: ["@layer cngx.tokens{@property --cngx-timeline-rail-inset{syntax: \"<length>\"; inherits: true; initial-value: 6px;}@property --cngx-timeline-marker-size{syntax: \"<length>\"; inherits: true; initial-value: 12px;}@property --cngx-timeline-marker-glyph-size{syntax: \"<percentage>\"; inherits: true; initial-value: 60%;}@property --cngx-timeline-item-inline-size{syntax: \"<length>\"; inherits: true; initial-value: 192px;}@property --cngx-timeline-connector-width{syntax: \"<length>\"; inherits: true; initial-value: 2px;}@property --cngx-timeline-marker-ring-width{syntax: \"<length>\"; inherits: true; initial-value: 3px;}@property --cngx-timeline-connector-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.88 .005 250);}@property --cngx-timeline-surface{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-timeline-marker-fg{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-timeline-meta-size{syntax: \"*\"; inherits: true; initial-value: .8125rem;}@property --cngx-timeline-text-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.2 .01 250);}@property --cngx-timeline-muted-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.5 .01 250);}@property --cngx-timeline-done-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.6 .15 145);}@property --cngx-timeline-active-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-timeline-upcoming-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.5 .01 250);}@property --cngx-timeline-rejected-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.6 .18 25);}@property --cngx-timeline-pulse-duration{syntax: \"<time>\"; inherits: true; initial-value: 1.6s;}}:root{--cngx-timeline-connector-color: var(--cngx-color-border, oklch(.88 .005 250));--cngx-timeline-surface: var(--cngx-color-surface, oklch(1 0 0));--cngx-timeline-text-color: var(--cngx-color-text, oklch(.2 .01 250));--cngx-timeline-muted-color: var(--cngx-color-text-muted, oklch(.5 .01 250));--cngx-timeline-done-color: var(--cngx-color-success, oklch(.6 .15 145));--cngx-timeline-active-color: var(--cngx-color-primary, oklch(.66 .19 50));--cngx-timeline-upcoming-color: var(--cngx-color-text-muted, oklch(.5 .01 250));--cngx-timeline-rejected-color: var(--cngx-color-danger, oklch(.6 .18 25))}\n", "@layer cngx.components{@scope(.cngx-timeline-marker){:scope{display:inline-flex;align-items:center;justify-content:center;flex:none;inline-size:var(--cngx-timeline-marker-size, 12px);block-size:var(--cngx-timeline-marker-size, 12px);border-radius:50%;overflow:hidden;background:var(--cngx-timeline-connector-color, oklch(.88 .005 250));box-shadow:0 0 0 var(--cngx-timeline-connector-width, 2px) var(--cngx-timeline-surface, oklch(1 0 0));color:var(--cngx-timeline-marker-fg, oklch(1 0 0));font-size:.625em;line-height:1}:scope>img,:scope>picture{inline-size:100%;block-size:100%;object-fit:cover;border-radius:inherit}:scope>svg{inline-size:var(--cngx-timeline-marker-glyph-size, 60%);block-size:var(--cngx-timeline-marker-glyph-size, 60%)}:scope[data-status=done]{background:var(--cngx-timeline-done-color, oklch(.6 .15 145))}:scope[data-status=active]{background:var(--cngx-timeline-active-color, oklch(.66 .19 50))}:scope[data-status=rejected]{background:var(--cngx-timeline-rejected-color, oklch(.6 .18 25))}:scope[data-status=upcoming]{background:var(--cngx-timeline-surface, oklch(1 0 0));border:var(--cngx-timeline-connector-width, 2px) dashed var(--cngx-timeline-upcoming-color, oklch(.5 .01 250));color:var(--cngx-timeline-upcoming-color, oklch(.5 .01 250))}}}@layer cngx.components{@scope(.cngx-timeline-marker--busy){:scope{animation:cngx-timeline-marker-pulse var(--cngx-timeline-pulse-duration, 1.6s) ease-in-out infinite}}}@keyframes cngx-timeline-marker-pulse{0%,to{box-shadow:0 0 0 var(--cngx-timeline-connector-width, 2px) var(--cngx-timeline-surface, oklch(1 0 0)),0 0 0 var(--cngx-timeline-connector-width, 2px) transparent}50%{box-shadow:0 0 0 var(--cngx-timeline-connector-width, 2px) var(--cngx-timeline-surface, oklch(1 0 0)),0 0 0 calc(var(--cngx-timeline-connector-width, 2px) + var(--cngx-timeline-marker-ring-width, 3px)) color-mix(in oklch,currentColor 35%,transparent)}}@media(prefers-reduced-motion:reduce){.cngx-timeline-marker--busy{animation:none}}@media(forced-colors:active){.cngx-timeline-marker:not([data-status=upcoming]){box-sizing:border-box;border:var(--cngx-timeline-connector-width, 2px) solid CanvasText}.cngx-timeline-marker[data-status=done]:empty{background:CanvasText}.cngx-timeline-marker[data-status=active]:empty{background:Highlight;border-color:Highlight}.cngx-timeline-marker[data-status=rejected]:empty{border:3px double CanvasText}.cngx-timeline-marker[data-status=upcoming]:empty{box-sizing:border-box;border:var(--cngx-timeline-connector-width, 2px) dashed CanvasText}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
228
260
|
}
|
|
229
261
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxTimelineMarker, decorators: [{
|
|
230
262
|
type: Component,
|
|
@@ -233,7 +265,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
233
265
|
'aria-hidden': 'true',
|
|
234
266
|
'[attr.data-status]': 'status()',
|
|
235
267
|
'[class.cngx-timeline-marker--busy]': 'busy()',
|
|
236
|
-
}, template: `<ng-content />`, styles: ["@layer cngx.tokens{@property --cngx-timeline-rail-inset{syntax: \"<length>\"; inherits: true; initial-value: 6px;}@property --cngx-timeline-marker-size{syntax: \"<length>\"; inherits: true; initial-value: 12px;}@property --cngx-timeline-marker-glyph-size{syntax: \"<percentage>\"; inherits: true; initial-value: 60%;}@property --cngx-timeline-item-inline-size{syntax: \"<length>\"; inherits: true; initial-value: 192px;}@property --cngx-timeline-connector-width{syntax: \"<length>\"; inherits: true; initial-value: 2px;}@property --cngx-timeline-marker-ring-width{syntax: \"<length>\"; inherits: true; initial-value: 3px;}@property --cngx-timeline-connector-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.88 .005 250);}@property --cngx-timeline-surface{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-timeline-marker-fg{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-timeline-meta-size{syntax: \"*\"; inherits: true; initial-value: .8125rem;}@property --cngx-timeline-text-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.2 .01 250);}@property --cngx-timeline-muted-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.5 .01 250);}@property --cngx-timeline-done-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.6 .15 145);}@property --cngx-timeline-active-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-timeline-upcoming-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.5 .01 250);}@property --cngx-timeline-rejected-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.6 .18 25);}@property --cngx-timeline-pulse-duration{syntax: \"<time>\"; inherits: true; initial-value: 1.6s;}}:root{--cngx-timeline-connector-color: var(--cngx-color-border, oklch(.88 .005 250));--cngx-timeline-surface: var(--cngx-color-surface, oklch(1 0 0));--cngx-timeline-text-color: var(--cngx-color-text, oklch(.2 .01 250));--cngx-timeline-muted-color: var(--cngx-color-text-muted, oklch(.5 .01 250));--cngx-timeline-done-color: var(--cngx-color-success, oklch(.6 .15 145));--cngx-timeline-active-color: var(--cngx-color-primary, oklch(.66 .19 50));--cngx-timeline-upcoming-color: var(--cngx-color-text-muted, oklch(.5 .01 250));--cngx-timeline-rejected-color: var(--cngx-color-danger, oklch(.6 .18 25))}\n", "@layer cngx.components{@scope(.cngx-timeline-marker){:scope{display:inline-flex;align-items:center;justify-content:center;flex:none;inline-size:var(--cngx-timeline-marker-size, 12px);block-size:var(--cngx-timeline-marker-size, 12px);border-radius:50%;overflow:hidden;background:var(--cngx-timeline-connector-color, oklch(.88 .005 250));box-shadow:0 0 0 var(--cngx-timeline-connector-width, 2px) var(--cngx-timeline-surface, oklch(1 0 0));color:var(--cngx-timeline-marker-fg, oklch(1 0 0));font-size:.625em;line-height:1}:scope>img,:scope>picture{inline-size:100%;block-size:100%;object-fit:cover;border-radius:inherit}:scope>svg{inline-size:var(--cngx-timeline-marker-glyph-size, 60%);block-size:var(--cngx-timeline-marker-glyph-size, 60%)}:scope[data-status=done]{background:var(--cngx-timeline-done-color, oklch(.6 .15 145))}:scope[data-status=active]{background:var(--cngx-timeline-active-color, oklch(.66 .19 50))}:scope[data-status=rejected]{background:var(--cngx-timeline-rejected-color, oklch(.6 .18 25))}:scope[data-status=upcoming]{background:var(--cngx-timeline-surface, oklch(1 0 0));border:var(--cngx-timeline-connector-width, 2px) dashed var(--cngx-timeline-upcoming-color, oklch(.5 .01 250));color:var(--cngx-timeline-upcoming-color, oklch(.5 .01 250))}}}@layer cngx.components{@scope(.cngx-timeline-marker--busy){:scope{animation:cngx-timeline-marker-pulse var(--cngx-timeline-pulse-duration, 1.6s) ease-in-out infinite}}}@keyframes cngx-timeline-marker-pulse{0%,to{box-shadow:0 0 0 var(--cngx-timeline-connector-width, 2px) var(--cngx-timeline-surface, oklch(1 0 0)),0 0 0 var(--cngx-timeline-connector-width, 2px) transparent}50%{box-shadow:0 0 0 var(--cngx-timeline-connector-width, 2px) var(--cngx-timeline-surface, oklch(1 0 0)),0 0 0 calc(var(--cngx-timeline-connector-width, 2px) + var(--cngx-timeline-marker-ring-width, 3px)) color-mix(in oklch,currentColor 35%,transparent)}}@media(prefers-reduced-motion:reduce){.cngx-timeline-marker--busy{animation:none}}@media(forced-colors:active){.cngx-timeline-marker:not([data-status=upcoming]){box-sizing:border-box;border:var(--cngx-timeline-connector-width, 2px) solid CanvasText}}\n"] }]
|
|
268
|
+
}, template: `<ng-content />`, styles: ["@layer cngx.tokens{@property --cngx-timeline-rail-inset{syntax: \"<length>\"; inherits: true; initial-value: 6px;}@property --cngx-timeline-marker-size{syntax: \"<length>\"; inherits: true; initial-value: 12px;}@property --cngx-timeline-marker-glyph-size{syntax: \"<percentage>\"; inherits: true; initial-value: 60%;}@property --cngx-timeline-item-inline-size{syntax: \"<length>\"; inherits: true; initial-value: 192px;}@property --cngx-timeline-connector-width{syntax: \"<length>\"; inherits: true; initial-value: 2px;}@property --cngx-timeline-marker-ring-width{syntax: \"<length>\"; inherits: true; initial-value: 3px;}@property --cngx-timeline-connector-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.88 .005 250);}@property --cngx-timeline-surface{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-timeline-marker-fg{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-timeline-meta-size{syntax: \"*\"; inherits: true; initial-value: .8125rem;}@property --cngx-timeline-text-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.2 .01 250);}@property --cngx-timeline-muted-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.5 .01 250);}@property --cngx-timeline-done-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.6 .15 145);}@property --cngx-timeline-active-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-timeline-upcoming-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.5 .01 250);}@property --cngx-timeline-rejected-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.6 .18 25);}@property --cngx-timeline-pulse-duration{syntax: \"<time>\"; inherits: true; initial-value: 1.6s;}}:root{--cngx-timeline-connector-color: var(--cngx-color-border, oklch(.88 .005 250));--cngx-timeline-surface: var(--cngx-color-surface, oklch(1 0 0));--cngx-timeline-text-color: var(--cngx-color-text, oklch(.2 .01 250));--cngx-timeline-muted-color: var(--cngx-color-text-muted, oklch(.5 .01 250));--cngx-timeline-done-color: var(--cngx-color-success, oklch(.6 .15 145));--cngx-timeline-active-color: var(--cngx-color-primary, oklch(.66 .19 50));--cngx-timeline-upcoming-color: var(--cngx-color-text-muted, oklch(.5 .01 250));--cngx-timeline-rejected-color: var(--cngx-color-danger, oklch(.6 .18 25))}\n", "@layer cngx.components{@scope(.cngx-timeline-marker){:scope{display:inline-flex;align-items:center;justify-content:center;flex:none;inline-size:var(--cngx-timeline-marker-size, 12px);block-size:var(--cngx-timeline-marker-size, 12px);border-radius:50%;overflow:hidden;background:var(--cngx-timeline-connector-color, oklch(.88 .005 250));box-shadow:0 0 0 var(--cngx-timeline-connector-width, 2px) var(--cngx-timeline-surface, oklch(1 0 0));color:var(--cngx-timeline-marker-fg, oklch(1 0 0));font-size:.625em;line-height:1}:scope>img,:scope>picture{inline-size:100%;block-size:100%;object-fit:cover;border-radius:inherit}:scope>svg{inline-size:var(--cngx-timeline-marker-glyph-size, 60%);block-size:var(--cngx-timeline-marker-glyph-size, 60%)}:scope[data-status=done]{background:var(--cngx-timeline-done-color, oklch(.6 .15 145))}:scope[data-status=active]{background:var(--cngx-timeline-active-color, oklch(.66 .19 50))}:scope[data-status=rejected]{background:var(--cngx-timeline-rejected-color, oklch(.6 .18 25))}:scope[data-status=upcoming]{background:var(--cngx-timeline-surface, oklch(1 0 0));border:var(--cngx-timeline-connector-width, 2px) dashed var(--cngx-timeline-upcoming-color, oklch(.5 .01 250));color:var(--cngx-timeline-upcoming-color, oklch(.5 .01 250))}}}@layer cngx.components{@scope(.cngx-timeline-marker--busy){:scope{animation:cngx-timeline-marker-pulse var(--cngx-timeline-pulse-duration, 1.6s) ease-in-out infinite}}}@keyframes cngx-timeline-marker-pulse{0%,to{box-shadow:0 0 0 var(--cngx-timeline-connector-width, 2px) var(--cngx-timeline-surface, oklch(1 0 0)),0 0 0 var(--cngx-timeline-connector-width, 2px) transparent}50%{box-shadow:0 0 0 var(--cngx-timeline-connector-width, 2px) var(--cngx-timeline-surface, oklch(1 0 0)),0 0 0 calc(var(--cngx-timeline-connector-width, 2px) + var(--cngx-timeline-marker-ring-width, 3px)) color-mix(in oklch,currentColor 35%,transparent)}}@media(prefers-reduced-motion:reduce){.cngx-timeline-marker--busy{animation:none}}@media(forced-colors:active){.cngx-timeline-marker:not([data-status=upcoming]){box-sizing:border-box;border:var(--cngx-timeline-connector-width, 2px) solid CanvasText}.cngx-timeline-marker[data-status=done]:empty{background:CanvasText}.cngx-timeline-marker[data-status=active]:empty{background:Highlight;border-color:Highlight}.cngx-timeline-marker[data-status=rejected]:empty{border:3px double CanvasText}.cngx-timeline-marker[data-status=upcoming]:empty{box-sizing:border-box;border:var(--cngx-timeline-connector-width, 2px) dashed CanvasText}}\n"] }]
|
|
237
269
|
}], propDecorators: { status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], busy: [{ type: i0.Input, args: [{ isSignal: true, alias: "busy", required: false }] }] } });
|
|
238
270
|
|
|
239
271
|
/**
|
|
@@ -308,29 +340,80 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
308
340
|
*/
|
|
309
341
|
const CNGX_TIMELINE_MARKER_HOST = new InjectionToken('CngxTimelineMarkerHost');
|
|
310
342
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
343
|
+
/**
|
|
344
|
+
* The English timeline section: the single source of the timeline's English
|
|
345
|
+
* copy. `CNGX_TIMELINE_CONFIG` defaults its `labels` to it.
|
|
346
|
+
*
|
|
347
|
+
* @category common/timeline
|
|
348
|
+
* @since 0.1.0
|
|
349
|
+
* @relatedTo CNGX_TIMELINE_CONFIG
|
|
350
|
+
*/
|
|
351
|
+
const CNGX_TIMELINE_LANGUAGE_EN = {
|
|
352
|
+
timelineRegion: 'Timeline',
|
|
353
|
+
retry: 'Retry',
|
|
354
|
+
errorFallback: 'Could not load the timeline.',
|
|
355
|
+
emptyFallback: 'No events yet',
|
|
356
|
+
loading: 'Loading timeline',
|
|
357
|
+
refreshing: 'Updating…',
|
|
358
|
+
itemBusy: 'Updating',
|
|
359
|
+
itemErrorFallback: 'Could not load this event.',
|
|
360
|
+
status: {
|
|
361
|
+
done: 'Completed',
|
|
362
|
+
active: 'In progress',
|
|
363
|
+
upcoming: 'Upcoming',
|
|
364
|
+
rejected: 'Rejected',
|
|
328
365
|
},
|
|
366
|
+
groupHeader: '{date}',
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
const DATE_FORMAT = {};
|
|
370
|
+
/** @internal Turns a timeline section into the config labels. */
|
|
371
|
+
function timelineLabelsFrom(section) {
|
|
372
|
+
return {
|
|
373
|
+
timelineRegion: section.timelineRegion,
|
|
374
|
+
retry: section.retry,
|
|
375
|
+
errorFallback: section.errorFallback,
|
|
376
|
+
emptyFallback: section.emptyFallback,
|
|
377
|
+
loading: section.loading,
|
|
378
|
+
refreshing: section.refreshing,
|
|
379
|
+
itemBusy: section.itemBusy,
|
|
380
|
+
itemErrorFallback: section.itemErrorFallback,
|
|
381
|
+
status: section.status,
|
|
382
|
+
groupLabel: (group, locale) => formatMessage(section.groupHeader, { date: dateTimeFormatterFor(locale, DATE_FORMAT).format(group.start) }, locale),
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
const LABELS_BY_SECTION = new WeakMap();
|
|
386
|
+
/**
|
|
387
|
+
* @internal The labels of one section object, built once: an equal section
|
|
388
|
+
* yields the identical labels, so readers compare by reference. The locale
|
|
389
|
+
* reaches `groupLabel` as its argument, so the labels do not depend on it.
|
|
390
|
+
*/
|
|
391
|
+
function labelsOf(section) {
|
|
392
|
+
let labels = LABELS_BY_SECTION.get(section);
|
|
393
|
+
if (!labels) {
|
|
394
|
+
labels = timelineLabelsFrom(section);
|
|
395
|
+
LABELS_BY_SECTION.set(section, labels);
|
|
396
|
+
}
|
|
397
|
+
return labels;
|
|
398
|
+
}
|
|
399
|
+
const TIMELINE_CONFIG_DEFAULTS = {
|
|
400
|
+
labels: timelineLabelsFrom(CNGX_TIMELINE_LANGUAGE_EN),
|
|
329
401
|
templates: {},
|
|
330
402
|
};
|
|
403
|
+
/** @internal The timeline section of the active pack over the English section. */
|
|
404
|
+
const injectTimelineSection = createNestedLanguageSection('timeline', CNGX_TIMELINE_LANGUAGE_EN, 'status');
|
|
405
|
+
/**
|
|
406
|
+
* @internal The defaults with `labels` read from the timeline section of the
|
|
407
|
+
* active language pack. Runs in an injection context.
|
|
408
|
+
*/
|
|
409
|
+
function timelineConfigDefaultsFromPack() {
|
|
410
|
+
const section = injectTimelineSection();
|
|
411
|
+
return { ...TIMELINE_CONFIG_DEFAULTS, labels: computed(() => labelsOf(section())) };
|
|
412
|
+
}
|
|
331
413
|
/**
|
|
332
414
|
* DI token for the resolved timeline config. \
|
|
333
|
-
* `providedIn: 'root'` with the library defaults
|
|
415
|
+
* `providedIn: 'root'` with the library defaults, `labels` read from the
|
|
416
|
+
* timeline section of the active language pack; override via
|
|
334
417
|
* {@link provideTimelineConfig} (root) or {@link provideTimelineConfigAt}
|
|
335
418
|
* (component scope).
|
|
336
419
|
*
|
|
@@ -343,19 +426,24 @@ const TIMELINE_CONFIG_DEFAULTS = {
|
|
|
343
426
|
*/
|
|
344
427
|
const CNGX_TIMELINE_CONFIG = new InjectionToken('CngxTimelineConfig', {
|
|
345
428
|
providedIn: 'root',
|
|
346
|
-
factory:
|
|
429
|
+
factory: timelineConfigDefaultsFromPack,
|
|
347
430
|
});
|
|
348
431
|
/**
|
|
349
|
-
*
|
|
350
|
-
*
|
|
351
|
-
|
|
432
|
+
* @internal Shared empty bundle for a config without `labels`. One identity,
|
|
433
|
+
* so every `coerceSignal` over it resolves to the same cached source.
|
|
434
|
+
*/
|
|
435
|
+
const TIMELINE_NO_LABELS = {};
|
|
436
|
+
/**
|
|
437
|
+
* Merge label overrides into the cascade. Keys left out keep the language
|
|
438
|
+
* pack's copy, or the English library default, so a consumer translates
|
|
439
|
+
* what they need and nothing more. Pass a `Signal` to switch the language at runtime.
|
|
352
440
|
*
|
|
353
441
|
* ```ts
|
|
354
442
|
* provideTimelineConfig(
|
|
355
443
|
* withTimelineLabels({
|
|
356
444
|
* retry: 'Erneut versuchen',
|
|
357
445
|
* emptyFallback: 'Noch keine Ereignisse.',
|
|
358
|
-
* groupLabel: (group) => group.start.toLocaleDateString('
|
|
446
|
+
* groupLabel: (group, locale) => group.start.toLocaleDateString(locale, { dateStyle: 'medium' }),
|
|
359
447
|
* }),
|
|
360
448
|
* )
|
|
361
449
|
* ```
|
|
@@ -365,14 +453,10 @@ const CNGX_TIMELINE_CONFIG = new InjectionToken('CngxTimelineConfig', {
|
|
|
365
453
|
function withTimelineLabels(labels) {
|
|
366
454
|
return (config) => ({
|
|
367
455
|
...config,
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
// spread would let a consumer who renames one status silently
|
|
373
|
-
// silence the other three.
|
|
374
|
-
status: { ...config.labels?.status, ...labels.status },
|
|
375
|
-
},
|
|
456
|
+
// One level deeper than the rest: `status` is a map, and a shallow
|
|
457
|
+
// spread would let a consumer who renames one status silently
|
|
458
|
+
// silence the other three.
|
|
459
|
+
labels: createNestedOverrideMerge(config.labels ?? TIMELINE_NO_LABELS, labels, 'status'),
|
|
376
460
|
});
|
|
377
461
|
}
|
|
378
462
|
/**
|
|
@@ -410,7 +494,7 @@ function provideTimelineConfig(...features) {
|
|
|
410
494
|
return makeEnvironmentProviders([
|
|
411
495
|
{
|
|
412
496
|
provide: CNGX_TIMELINE_CONFIG,
|
|
413
|
-
|
|
497
|
+
useFactory: () => applyFeatures(timelineConfigDefaultsFromPack(), features),
|
|
414
498
|
},
|
|
415
499
|
]);
|
|
416
500
|
}
|
|
@@ -435,7 +519,7 @@ function provideTimelineConfigAt(...features) {
|
|
|
435
519
|
return [
|
|
436
520
|
{
|
|
437
521
|
provide: CNGX_TIMELINE_CONFIG,
|
|
438
|
-
useFactory: (parent) => applyFeatures(parent ??
|
|
522
|
+
useFactory: (parent) => applyFeatures(parent ?? timelineConfigDefaultsFromPack(), features),
|
|
439
523
|
deps: [[new SkipSelf(), new Optional(), CNGX_TIMELINE_CONFIG]],
|
|
440
524
|
},
|
|
441
525
|
];
|
|
@@ -622,7 +706,7 @@ const FOCUSABLE = 'a[href], button, input, select, textarea, summary, [tabindex]
|
|
|
622
706
|
* @since 0.1.0
|
|
623
707
|
*/
|
|
624
708
|
class CngxTimelineItem {
|
|
625
|
-
|
|
709
|
+
labels = coerceSignal(injectTimelineConfig().labels ?? TIMELINE_NO_LABELS);
|
|
626
710
|
host = inject(ElementRef);
|
|
627
711
|
/**
|
|
628
712
|
* Where the event sits in the history. Drives the marker and rail
|
|
@@ -690,15 +774,15 @@ class CngxTimelineItem {
|
|
|
690
774
|
* announces the `rejected` it shows, not the editorial status it kept.
|
|
691
775
|
*/
|
|
692
776
|
statusText = computed(() => {
|
|
693
|
-
const labels = this.
|
|
777
|
+
const labels = this.labels();
|
|
694
778
|
if (this.busy()) {
|
|
695
|
-
return labels
|
|
779
|
+
return labels.itemBusy ?? '';
|
|
696
780
|
}
|
|
697
781
|
const status = this.markerStatus();
|
|
698
|
-
return status ? (labels
|
|
782
|
+
return status ? (labels.status?.[status] ?? '') : '';
|
|
699
783
|
}, ...(ngDevMode ? [{ debugName: "statusText" }] : /* istanbul ignore next */ []));
|
|
700
784
|
/** @internal Visible inline error, blank unless this row failed. */
|
|
701
|
-
errorText = computed(() => this.failed() ? (this.
|
|
785
|
+
errorText = computed(() => this.failed() ? (this.labels().itemErrorFallback ?? '') : '', ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
702
786
|
constructor() {
|
|
703
787
|
if (isDevMode()) {
|
|
704
788
|
// afterNextRender, not an effect: this is a one-shot authoring check
|
|
@@ -740,7 +824,7 @@ class CngxTimelineItem {
|
|
|
740
824
|
@if (statusText(); as text) {
|
|
741
825
|
<span class="cngx-timeline-item__sr">{{ text }}</span>
|
|
742
826
|
}
|
|
743
|
-
`, isInline: true, styles: ["@layer cngx.tokens{@property --cngx-timeline-rail-inset{syntax: \"<length>\"; inherits: true; initial-value: 6px;}@property --cngx-timeline-marker-size{syntax: \"<length>\"; inherits: true; initial-value: 12px;}@property --cngx-timeline-marker-glyph-size{syntax: \"<percentage>\"; inherits: true; initial-value: 60%;}@property --cngx-timeline-item-inline-size{syntax: \"<length>\"; inherits: true; initial-value: 192px;}@property --cngx-timeline-connector-width{syntax: \"<length>\"; inherits: true; initial-value: 2px;}@property --cngx-timeline-marker-ring-width{syntax: \"<length>\"; inherits: true; initial-value: 3px;}@property --cngx-timeline-connector-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.88 .005 250);}@property --cngx-timeline-surface{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-timeline-marker-fg{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-timeline-meta-size{syntax: \"*\"; inherits: true; initial-value: .8125rem;}@property --cngx-timeline-text-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.2 .01 250);}@property --cngx-timeline-muted-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.5 .01 250);}@property --cngx-timeline-done-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.6 .15 145);}@property --cngx-timeline-active-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-timeline-upcoming-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.5 .01 250);}@property --cngx-timeline-rejected-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.6 .18 25);}@property --cngx-timeline-pulse-duration{syntax: \"<time>\"; inherits: true; initial-value: 1.6s;}}:root{--cngx-timeline-connector-color: var(--cngx-color-border, oklch(.88 .005 250));--cngx-timeline-surface: var(--cngx-color-surface, oklch(1 0 0));--cngx-timeline-text-color: var(--cngx-color-text, oklch(.2 .01 250));--cngx-timeline-muted-color: var(--cngx-color-text-muted, oklch(.5 .01 250));--cngx-timeline-done-color: var(--cngx-color-success, oklch(.6 .15 145));--cngx-timeline-active-color: var(--cngx-color-primary, oklch(.66 .19 50));--cngx-timeline-upcoming-color: var(--cngx-color-text-muted, oklch(.5 .01 250));--cngx-timeline-rejected-color: var(--cngx-color-danger, oklch(.6 .18 25))}\n", "@layer cngx.tokens{@property --cngx-timeline-gap{syntax: \"<length>\"; inherits: true; initial-value: 8px;}@property --cngx-timeline-row-gap{syntax: \"<length>\"; inherits: true; initial-value: 4px;}@property --cngx-timeline-content-padding{syntax: \"<length>\"; inherits: true; initial-value: 4px;}}@layer cngx.components{@scope(.cngx-timeline-item){:scope{--cngx-timeline-gap: var(--cngx-space-sm, 8px);--cngx-timeline-row-gap: var(--cngx-space-xs, 4px);--cngx-timeline-content-padding: var(--cngx-space-xs, 4px);--cngx-timeline-rail-inset: calc(var(--cngx-timeline-marker-size, 12px) / 2);display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);grid-template-areas:\"marker time\" \"rail body\";column-gap:var(--cngx-timeline-gap, 8px);row-gap:var(--cngx-timeline-row-gap, 4px);color:var(--cngx-timeline-text-color, oklch(.2 .01 250))}.cngx-timeline-marker{grid-area:marker}.cngx-timeline-connector{grid-area:rail}.cngx-timeline-item__time{grid-area:time;color:var(--cngx-timeline-muted-color, oklch(.5 .01 250));font-size:var(--cngx-timeline-meta-size, .8125rem);line-height:1.4}.cngx-timeline-item__opposite{grid-area:opposite;align-self:start;color:var(--cngx-timeline-muted-color, oklch(.5 .01 250));font-size:var(--cngx-timeline-meta-size, .8125rem);line-height:1.4;text-align:end}.cngx-timeline-item__body{grid-area:body;padding:var(--cngx-timeline-content-padding, 4px);padding-block-end:var(--cngx-timeline-row-gap, 4px);min-inline-size:0}.cngx-timeline-item__error{margin:0;color:var(--cngx-timeline-rejected-color, oklch(.6 .18 25));font-size:var(--cngx-timeline-meta-size, .8125rem);line-height:1.4}.cngx-timeline-item__sr{position:absolute;inline-size:1px;block-size:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:scope[data-failed] .cngx-timeline-item__time{color:var(--cngx-timeline-rejected-color, oklch(.6 .18 25))}}[data-mode=activity] .cngx-timeline-item:not([data-orientation=horizontal] *){grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:\"marker body time\" \"rail body time\"}[data-mode=activity] .cngx-timeline-item .cngx-timeline-item__time{align-self:start;text-align:end;white-space:nowrap}[data-row-side=end] .cngx-timeline-item:not([data-mode=activity] *):not([data-orientation=horizontal] *){grid-template-columns:minmax(0,1fr) auto;grid-template-areas:\"time marker\" \"body rail\"}[data-row-side=end] .cngx-timeline-item:is([data-mode=activity] *):not([data-orientation=horizontal] *){grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:\"time body marker\" \"time body rail\"}[data-row-side=end] .cngx-timeline-item:not([data-mode=activity] *) .cngx-timeline-item__time{text-align:end}[data-row-side=end] .cngx-timeline-item:is([data-mode=activity] *) .cngx-timeline-item__time{text-align:start}[data-row-side=end] .cngx-timeline-item .cngx-timeline-item__opposite{text-align:start}.cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *){grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);grid-template-areas:\"opposite marker body\" \"time rail body\"}[data-row-side=end] .cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *){grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);grid-template-areas:\"body marker opposite\" \"body rail time\"}@container cngx-timeline (max-inline-size: 32rem){.cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *),[data-row-side=end] .cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *){grid-template-columns:auto minmax(0,1fr);grid-template-areas:\"marker time\" \"rail body\"}.cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]),[data-row-side=end] .cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]){grid-template-columns:auto auto minmax(0,1fr);grid-template-areas:\"opposite marker body\" \"time rail body\"}[data-row-side=end] .cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *) .cngx-timeline-item__time{text-align:start}[data-row-side=end] .cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *) .cngx-timeline-item__opposite{text-align:end}}.cngx-timeline-item:not([data-placement=alternate] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]){grid-template-columns:auto auto minmax(0,1fr);grid-template-areas:\"opposite marker time\" \"opposite rail body\"}.cngx-timeline-item:is([data-mode=activity] *):not([data-placement=alternate] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]){grid-template-columns:auto auto minmax(0,1fr) auto;grid-template-areas:\"opposite marker body time\" \"opposite rail body time\"}[data-row-side=end] .cngx-timeline-item:not([data-mode=activity] *):not([data-placement=alternate] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]){grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:\"time marker opposite\" \"body rail opposite\"}[data-row-side=end] .cngx-timeline-item:is([data-mode=activity] *):not([data-placement=alternate] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]){grid-template-columns:auto minmax(0,1fr) auto auto;grid-template-areas:\"time body marker opposite\" \"time body rail opposite\"}[data-rail=continuous] .cngx-timeline-item .cngx-timeline-connector:not([data-position=last]):not([data-position=only]):not([data-orientation=horizontal] *){block-size:calc(100% + var(--cngx-timeline-item-gap, 16px))}[data-rail=continuous] .cngx-timeline-item .cngx-timeline-connector:not([data-position=last]):not([data-position=only]):is([data-orientation=horizontal] *){inline-size:calc(100% + var(--cngx-timeline-item-gap, 16px))}.cngx-timeline-item:is([data-orientation=horizontal] *){flex:none;inline-size:var(--cngx-timeline-item-inline-size, 12rem);grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr);grid-template-areas:\"marker rail\" \"time time\" \"body body\"}.cngx-timeline-item:is([data-orientation=horizontal] *) .cngx-timeline-item__time{text-align:start;white-space:normal}.cngx-timeline-item:is([data-orientation=horizontal] *) .cngx-timeline-item__opposite{text-align:start}[data-row-side=end] .cngx-timeline-item:is([data-orientation=horizontal] *){grid-template-rows:minmax(0,1fr) auto auto;grid-template-areas:\"body body\" \"time time\" \"marker rail\"}.cngx-timeline-item:is([data-orientation=horizontal] *):is([data-placement=alternate] *){grid-template-rows:minmax(0,1fr) auto minmax(0,1fr);grid-template-areas:\"opposite time\" \"marker rail\" \"body body\"}[data-row-side=end] .cngx-timeline-item:is([data-orientation=horizontal] *):is([data-placement=alternate] *){grid-template-rows:minmax(0,1fr) auto minmax(0,1fr);grid-template-areas:\"body body\" \"marker rail\" \"opposite time\"}.cngx-timeline-item:is([data-orientation=horizontal] *):not([data-placement=alternate] *):has(>[cngxTimelineOpposite]){grid-template-rows:auto auto auto minmax(0,1fr);grid-template-areas:\"opposite opposite\" \"marker rail\" \"time time\" \"body body\"}[data-row-side=end] .cngx-timeline-item:is([data-orientation=horizontal] *):not([data-placement=alternate] *):has(>[cngxTimelineOpposite]){grid-template-rows:minmax(0,1fr) auto auto auto;grid-template-areas:\"body body\" \"time time\" \"marker rail\" \"opposite opposite\"}}\n"], dependencies: [{ kind: "component", type: CngxTimelineMarker, selector: "cngx-timeline-marker", inputs: ["status", "busy"] }, { kind: "component", type: CngxTimelineConnector, selector: "cngx-timeline-connector", inputs: ["status", "position"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
827
|
+
`, isInline: true, styles: ["@layer cngx.tokens{@property --cngx-timeline-rail-inset{syntax: \"<length>\"; inherits: true; initial-value: 6px;}@property --cngx-timeline-marker-size{syntax: \"<length>\"; inherits: true; initial-value: 12px;}@property --cngx-timeline-marker-glyph-size{syntax: \"<percentage>\"; inherits: true; initial-value: 60%;}@property --cngx-timeline-item-inline-size{syntax: \"<length>\"; inherits: true; initial-value: 192px;}@property --cngx-timeline-connector-width{syntax: \"<length>\"; inherits: true; initial-value: 2px;}@property --cngx-timeline-marker-ring-width{syntax: \"<length>\"; inherits: true; initial-value: 3px;}@property --cngx-timeline-connector-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.88 .005 250);}@property --cngx-timeline-surface{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-timeline-marker-fg{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-timeline-meta-size{syntax: \"*\"; inherits: true; initial-value: .8125rem;}@property --cngx-timeline-text-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.2 .01 250);}@property --cngx-timeline-muted-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.5 .01 250);}@property --cngx-timeline-done-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.6 .15 145);}@property --cngx-timeline-active-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-timeline-upcoming-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.5 .01 250);}@property --cngx-timeline-rejected-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.6 .18 25);}@property --cngx-timeline-pulse-duration{syntax: \"<time>\"; inherits: true; initial-value: 1.6s;}}:root{--cngx-timeline-connector-color: var(--cngx-color-border, oklch(.88 .005 250));--cngx-timeline-surface: var(--cngx-color-surface, oklch(1 0 0));--cngx-timeline-text-color: var(--cngx-color-text, oklch(.2 .01 250));--cngx-timeline-muted-color: var(--cngx-color-text-muted, oklch(.5 .01 250));--cngx-timeline-done-color: var(--cngx-color-success, oklch(.6 .15 145));--cngx-timeline-active-color: var(--cngx-color-primary, oklch(.66 .19 50));--cngx-timeline-upcoming-color: var(--cngx-color-text-muted, oklch(.5 .01 250));--cngx-timeline-rejected-color: var(--cngx-color-danger, oklch(.6 .18 25))}\n", "@layer cngx.tokens{@property --cngx-timeline-gap{syntax: \"<length>\"; inherits: true; initial-value: 8px;}@property --cngx-timeline-row-gap{syntax: \"<length>\"; inherits: true; initial-value: 4px;}@property --cngx-timeline-content-padding{syntax: \"<length>\"; inherits: true; initial-value: 4px;}}@layer cngx.components{@scope(.cngx-timeline-item){:scope{--cngx-timeline-gap: var(--cngx-space-sm, 8px);--cngx-timeline-row-gap: var(--cngx-space-xs, 4px);--cngx-timeline-content-padding: var(--cngx-space-xs, 4px);--cngx-timeline-rail-inset: calc(var(--cngx-timeline-marker-size, 12px) / 2);display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);grid-template-areas:\"marker time\" \"rail body\";column-gap:var(--cngx-timeline-gap, 8px);row-gap:var(--cngx-timeline-row-gap, 4px);color:var(--cngx-timeline-text-color, oklch(.2 .01 250))}.cngx-timeline-marker{grid-area:marker}.cngx-timeline-connector{grid-area:rail}.cngx-timeline-item__time{grid-area:time;color:var(--cngx-timeline-muted-color, oklch(.5 .01 250));font-size:var(--cngx-timeline-meta-size, .8125rem);line-height:1.4}.cngx-timeline-item__opposite{grid-area:opposite;align-self:start;color:var(--cngx-timeline-muted-color, oklch(.5 .01 250));font-size:var(--cngx-timeline-meta-size, .8125rem);line-height:1.4;text-align:end}.cngx-timeline-item__body{grid-area:body;padding:var(--cngx-timeline-content-padding, 4px);padding-block-end:var(--cngx-timeline-row-gap, 4px);min-inline-size:0}.cngx-timeline-item__error{margin:0;color:var(--cngx-timeline-rejected-color, oklch(.6 .18 25));font-size:var(--cngx-timeline-meta-size, .8125rem);line-height:1.4}.cngx-timeline-item__sr{position:absolute;inline-size:1px;block-size:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:scope[data-failed] .cngx-timeline-item__time{color:var(--cngx-timeline-rejected-color, oklch(.6 .18 25))}}[data-mode=activity] .cngx-timeline-item:not([data-orientation=horizontal] *){grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:\"marker body time\" \"rail body time\"}[data-mode=activity] .cngx-timeline-item .cngx-timeline-item__time{align-self:start;text-align:end;white-space:nowrap}[data-row-side=end] .cngx-timeline-item:not([data-mode=activity] *):not([data-orientation=horizontal] *){grid-template-columns:minmax(0,1fr) auto;grid-template-areas:\"time marker\" \"body rail\"}[data-row-side=end] .cngx-timeline-item:is([data-mode=activity] *):not([data-orientation=horizontal] *){grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:\"time body marker\" \"time body rail\"}[data-row-side=end] .cngx-timeline-item:not([data-mode=activity] *) .cngx-timeline-item__time{text-align:end}[data-row-side=end] .cngx-timeline-item:is([data-mode=activity] *) .cngx-timeline-item__time{text-align:start}[data-row-side=end] .cngx-timeline-item .cngx-timeline-item__opposite{text-align:start}.cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *){grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);grid-template-areas:\"opposite marker body\" \"time rail body\"}[data-row-side=end] .cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *){grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);grid-template-areas:\"body marker opposite\" \"body rail time\"}@container cngx-timeline (max-inline-size: 30rem){.cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *),[data-row-side=end] .cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *){grid-template-columns:auto minmax(0,1fr);grid-template-areas:\"marker time\" \"rail body\"}.cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]),[data-row-side=end] .cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]){grid-template-columns:auto auto minmax(0,1fr);grid-template-areas:\"opposite marker body\" \"time rail body\"}[data-row-side=end] .cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *) .cngx-timeline-item__time{text-align:start}[data-row-side=end] .cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *) .cngx-timeline-item__opposite{text-align:end}}.cngx-timeline-item:not([data-placement=alternate] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]){grid-template-columns:auto auto minmax(0,1fr);grid-template-areas:\"opposite marker time\" \"opposite rail body\"}.cngx-timeline-item:is([data-mode=activity] *):not([data-placement=alternate] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]){grid-template-columns:auto auto minmax(0,1fr) auto;grid-template-areas:\"opposite marker body time\" \"opposite rail body time\"}[data-row-side=end] .cngx-timeline-item:not([data-mode=activity] *):not([data-placement=alternate] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]){grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:\"time marker opposite\" \"body rail opposite\"}[data-row-side=end] .cngx-timeline-item:is([data-mode=activity] *):not([data-placement=alternate] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]){grid-template-columns:auto minmax(0,1fr) auto auto;grid-template-areas:\"time body marker opposite\" \"time body rail opposite\"}[data-rail=continuous] .cngx-timeline-item .cngx-timeline-connector:not([data-position=last]):not([data-position=only]):not([data-orientation=horizontal] *){block-size:calc(100% + var(--cngx-timeline-item-gap, 16px))}[data-rail=continuous] .cngx-timeline-item .cngx-timeline-connector:not([data-position=last]):not([data-position=only]):is([data-orientation=horizontal] *){inline-size:calc(100% + var(--cngx-timeline-item-gap, 16px))}.cngx-timeline-item:is([data-orientation=horizontal] *){flex:none;inline-size:var(--cngx-timeline-item-inline-size, 12rem);grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr);grid-template-areas:\"marker rail\" \"time time\" \"body body\"}.cngx-timeline-item:is([data-orientation=horizontal] *) .cngx-timeline-item__time{text-align:start;white-space:normal}.cngx-timeline-item:is([data-orientation=horizontal] *) .cngx-timeline-item__opposite{text-align:start}[data-row-side=end] .cngx-timeline-item:is([data-orientation=horizontal] *){grid-template-rows:minmax(0,1fr) auto auto;grid-template-areas:\"body body\" \"time time\" \"marker rail\"}.cngx-timeline-item:is([data-orientation=horizontal] *):is([data-placement=alternate] *){grid-template-rows:minmax(0,1fr) auto minmax(0,1fr);grid-template-areas:\"opposite time\" \"marker rail\" \"body body\"}[data-row-side=end] .cngx-timeline-item:is([data-orientation=horizontal] *):is([data-placement=alternate] *){grid-template-rows:minmax(0,1fr) auto minmax(0,1fr);grid-template-areas:\"body body\" \"marker rail\" \"opposite time\"}.cngx-timeline-item:is([data-orientation=horizontal] *):not([data-placement=alternate] *):has(>[cngxTimelineOpposite]){grid-template-rows:auto auto auto minmax(0,1fr);grid-template-areas:\"opposite opposite\" \"marker rail\" \"time time\" \"body body\"}[data-row-side=end] .cngx-timeline-item:is([data-orientation=horizontal] *):not([data-placement=alternate] *):has(>[cngxTimelineOpposite]){grid-template-rows:minmax(0,1fr) auto auto auto;grid-template-areas:\"body body\" \"time time\" \"marker rail\" \"opposite opposite\"}}\n"], dependencies: [{ kind: "component", type: CngxTimelineMarker, selector: "cngx-timeline-marker", inputs: ["status", "busy"] }, { kind: "component", type: CngxTimelineConnector, selector: "cngx-timeline-connector", inputs: ["status", "position"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
744
828
|
}
|
|
745
829
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxTimelineItem, decorators: [{
|
|
746
830
|
type: Component,
|
|
@@ -772,7 +856,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
772
856
|
@if (statusText(); as text) {
|
|
773
857
|
<span class="cngx-timeline-item__sr">{{ text }}</span>
|
|
774
858
|
}
|
|
775
|
-
`, styles: ["@layer cngx.tokens{@property --cngx-timeline-rail-inset{syntax: \"<length>\"; inherits: true; initial-value: 6px;}@property --cngx-timeline-marker-size{syntax: \"<length>\"; inherits: true; initial-value: 12px;}@property --cngx-timeline-marker-glyph-size{syntax: \"<percentage>\"; inherits: true; initial-value: 60%;}@property --cngx-timeline-item-inline-size{syntax: \"<length>\"; inherits: true; initial-value: 192px;}@property --cngx-timeline-connector-width{syntax: \"<length>\"; inherits: true; initial-value: 2px;}@property --cngx-timeline-marker-ring-width{syntax: \"<length>\"; inherits: true; initial-value: 3px;}@property --cngx-timeline-connector-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.88 .005 250);}@property --cngx-timeline-surface{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-timeline-marker-fg{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-timeline-meta-size{syntax: \"*\"; inherits: true; initial-value: .8125rem;}@property --cngx-timeline-text-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.2 .01 250);}@property --cngx-timeline-muted-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.5 .01 250);}@property --cngx-timeline-done-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.6 .15 145);}@property --cngx-timeline-active-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-timeline-upcoming-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.5 .01 250);}@property --cngx-timeline-rejected-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.6 .18 25);}@property --cngx-timeline-pulse-duration{syntax: \"<time>\"; inherits: true; initial-value: 1.6s;}}:root{--cngx-timeline-connector-color: var(--cngx-color-border, oklch(.88 .005 250));--cngx-timeline-surface: var(--cngx-color-surface, oklch(1 0 0));--cngx-timeline-text-color: var(--cngx-color-text, oklch(.2 .01 250));--cngx-timeline-muted-color: var(--cngx-color-text-muted, oklch(.5 .01 250));--cngx-timeline-done-color: var(--cngx-color-success, oklch(.6 .15 145));--cngx-timeline-active-color: var(--cngx-color-primary, oklch(.66 .19 50));--cngx-timeline-upcoming-color: var(--cngx-color-text-muted, oklch(.5 .01 250));--cngx-timeline-rejected-color: var(--cngx-color-danger, oklch(.6 .18 25))}\n", "@layer cngx.tokens{@property --cngx-timeline-gap{syntax: \"<length>\"; inherits: true; initial-value: 8px;}@property --cngx-timeline-row-gap{syntax: \"<length>\"; inherits: true; initial-value: 4px;}@property --cngx-timeline-content-padding{syntax: \"<length>\"; inherits: true; initial-value: 4px;}}@layer cngx.components{@scope(.cngx-timeline-item){:scope{--cngx-timeline-gap: var(--cngx-space-sm, 8px);--cngx-timeline-row-gap: var(--cngx-space-xs, 4px);--cngx-timeline-content-padding: var(--cngx-space-xs, 4px);--cngx-timeline-rail-inset: calc(var(--cngx-timeline-marker-size, 12px) / 2);display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);grid-template-areas:\"marker time\" \"rail body\";column-gap:var(--cngx-timeline-gap, 8px);row-gap:var(--cngx-timeline-row-gap, 4px);color:var(--cngx-timeline-text-color, oklch(.2 .01 250))}.cngx-timeline-marker{grid-area:marker}.cngx-timeline-connector{grid-area:rail}.cngx-timeline-item__time{grid-area:time;color:var(--cngx-timeline-muted-color, oklch(.5 .01 250));font-size:var(--cngx-timeline-meta-size, .8125rem);line-height:1.4}.cngx-timeline-item__opposite{grid-area:opposite;align-self:start;color:var(--cngx-timeline-muted-color, oklch(.5 .01 250));font-size:var(--cngx-timeline-meta-size, .8125rem);line-height:1.4;text-align:end}.cngx-timeline-item__body{grid-area:body;padding:var(--cngx-timeline-content-padding, 4px);padding-block-end:var(--cngx-timeline-row-gap, 4px);min-inline-size:0}.cngx-timeline-item__error{margin:0;color:var(--cngx-timeline-rejected-color, oklch(.6 .18 25));font-size:var(--cngx-timeline-meta-size, .8125rem);line-height:1.4}.cngx-timeline-item__sr{position:absolute;inline-size:1px;block-size:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:scope[data-failed] .cngx-timeline-item__time{color:var(--cngx-timeline-rejected-color, oklch(.6 .18 25))}}[data-mode=activity] .cngx-timeline-item:not([data-orientation=horizontal] *){grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:\"marker body time\" \"rail body time\"}[data-mode=activity] .cngx-timeline-item .cngx-timeline-item__time{align-self:start;text-align:end;white-space:nowrap}[data-row-side=end] .cngx-timeline-item:not([data-mode=activity] *):not([data-orientation=horizontal] *){grid-template-columns:minmax(0,1fr) auto;grid-template-areas:\"time marker\" \"body rail\"}[data-row-side=end] .cngx-timeline-item:is([data-mode=activity] *):not([data-orientation=horizontal] *){grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:\"time body marker\" \"time body rail\"}[data-row-side=end] .cngx-timeline-item:not([data-mode=activity] *) .cngx-timeline-item__time{text-align:end}[data-row-side=end] .cngx-timeline-item:is([data-mode=activity] *) .cngx-timeline-item__time{text-align:start}[data-row-side=end] .cngx-timeline-item .cngx-timeline-item__opposite{text-align:start}.cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *){grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);grid-template-areas:\"opposite marker body\" \"time rail body\"}[data-row-side=end] .cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *){grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);grid-template-areas:\"body marker opposite\" \"body rail time\"}@container cngx-timeline (max-inline-size: 32rem){.cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *),[data-row-side=end] .cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *){grid-template-columns:auto minmax(0,1fr);grid-template-areas:\"marker time\" \"rail body\"}.cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]),[data-row-side=end] .cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]){grid-template-columns:auto auto minmax(0,1fr);grid-template-areas:\"opposite marker body\" \"time rail body\"}[data-row-side=end] .cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *) .cngx-timeline-item__time{text-align:start}[data-row-side=end] .cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *) .cngx-timeline-item__opposite{text-align:end}}.cngx-timeline-item:not([data-placement=alternate] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]){grid-template-columns:auto auto minmax(0,1fr);grid-template-areas:\"opposite marker time\" \"opposite rail body\"}.cngx-timeline-item:is([data-mode=activity] *):not([data-placement=alternate] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]){grid-template-columns:auto auto minmax(0,1fr) auto;grid-template-areas:\"opposite marker body time\" \"opposite rail body time\"}[data-row-side=end] .cngx-timeline-item:not([data-mode=activity] *):not([data-placement=alternate] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]){grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:\"time marker opposite\" \"body rail opposite\"}[data-row-side=end] .cngx-timeline-item:is([data-mode=activity] *):not([data-placement=alternate] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]){grid-template-columns:auto minmax(0,1fr) auto auto;grid-template-areas:\"time body marker opposite\" \"time body rail opposite\"}[data-rail=continuous] .cngx-timeline-item .cngx-timeline-connector:not([data-position=last]):not([data-position=only]):not([data-orientation=horizontal] *){block-size:calc(100% + var(--cngx-timeline-item-gap, 16px))}[data-rail=continuous] .cngx-timeline-item .cngx-timeline-connector:not([data-position=last]):not([data-position=only]):is([data-orientation=horizontal] *){inline-size:calc(100% + var(--cngx-timeline-item-gap, 16px))}.cngx-timeline-item:is([data-orientation=horizontal] *){flex:none;inline-size:var(--cngx-timeline-item-inline-size, 12rem);grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr);grid-template-areas:\"marker rail\" \"time time\" \"body body\"}.cngx-timeline-item:is([data-orientation=horizontal] *) .cngx-timeline-item__time{text-align:start;white-space:normal}.cngx-timeline-item:is([data-orientation=horizontal] *) .cngx-timeline-item__opposite{text-align:start}[data-row-side=end] .cngx-timeline-item:is([data-orientation=horizontal] *){grid-template-rows:minmax(0,1fr) auto auto;grid-template-areas:\"body body\" \"time time\" \"marker rail\"}.cngx-timeline-item:is([data-orientation=horizontal] *):is([data-placement=alternate] *){grid-template-rows:minmax(0,1fr) auto minmax(0,1fr);grid-template-areas:\"opposite time\" \"marker rail\" \"body body\"}[data-row-side=end] .cngx-timeline-item:is([data-orientation=horizontal] *):is([data-placement=alternate] *){grid-template-rows:minmax(0,1fr) auto minmax(0,1fr);grid-template-areas:\"body body\" \"marker rail\" \"opposite time\"}.cngx-timeline-item:is([data-orientation=horizontal] *):not([data-placement=alternate] *):has(>[cngxTimelineOpposite]){grid-template-rows:auto auto auto minmax(0,1fr);grid-template-areas:\"opposite opposite\" \"marker rail\" \"time time\" \"body body\"}[data-row-side=end] .cngx-timeline-item:is([data-orientation=horizontal] *):not([data-placement=alternate] *):has(>[cngxTimelineOpposite]){grid-template-rows:minmax(0,1fr) auto auto auto;grid-template-areas:\"body body\" \"time time\" \"marker rail\" \"opposite opposite\"}}\n"] }]
|
|
859
|
+
`, styles: ["@layer cngx.tokens{@property --cngx-timeline-rail-inset{syntax: \"<length>\"; inherits: true; initial-value: 6px;}@property --cngx-timeline-marker-size{syntax: \"<length>\"; inherits: true; initial-value: 12px;}@property --cngx-timeline-marker-glyph-size{syntax: \"<percentage>\"; inherits: true; initial-value: 60%;}@property --cngx-timeline-item-inline-size{syntax: \"<length>\"; inherits: true; initial-value: 192px;}@property --cngx-timeline-connector-width{syntax: \"<length>\"; inherits: true; initial-value: 2px;}@property --cngx-timeline-marker-ring-width{syntax: \"<length>\"; inherits: true; initial-value: 3px;}@property --cngx-timeline-connector-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.88 .005 250);}@property --cngx-timeline-surface{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-timeline-marker-fg{syntax: \"<color>\"; inherits: true; initial-value: oklch(1 0 0);}@property --cngx-timeline-meta-size{syntax: \"*\"; inherits: true; initial-value: .8125rem;}@property --cngx-timeline-text-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.2 .01 250);}@property --cngx-timeline-muted-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.5 .01 250);}@property --cngx-timeline-done-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.6 .15 145);}@property --cngx-timeline-active-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.66 .19 50);}@property --cngx-timeline-upcoming-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.5 .01 250);}@property --cngx-timeline-rejected-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.6 .18 25);}@property --cngx-timeline-pulse-duration{syntax: \"<time>\"; inherits: true; initial-value: 1.6s;}}:root{--cngx-timeline-connector-color: var(--cngx-color-border, oklch(.88 .005 250));--cngx-timeline-surface: var(--cngx-color-surface, oklch(1 0 0));--cngx-timeline-text-color: var(--cngx-color-text, oklch(.2 .01 250));--cngx-timeline-muted-color: var(--cngx-color-text-muted, oklch(.5 .01 250));--cngx-timeline-done-color: var(--cngx-color-success, oklch(.6 .15 145));--cngx-timeline-active-color: var(--cngx-color-primary, oklch(.66 .19 50));--cngx-timeline-upcoming-color: var(--cngx-color-text-muted, oklch(.5 .01 250));--cngx-timeline-rejected-color: var(--cngx-color-danger, oklch(.6 .18 25))}\n", "@layer cngx.tokens{@property --cngx-timeline-gap{syntax: \"<length>\"; inherits: true; initial-value: 8px;}@property --cngx-timeline-row-gap{syntax: \"<length>\"; inherits: true; initial-value: 4px;}@property --cngx-timeline-content-padding{syntax: \"<length>\"; inherits: true; initial-value: 4px;}}@layer cngx.components{@scope(.cngx-timeline-item){:scope{--cngx-timeline-gap: var(--cngx-space-sm, 8px);--cngx-timeline-row-gap: var(--cngx-space-xs, 4px);--cngx-timeline-content-padding: var(--cngx-space-xs, 4px);--cngx-timeline-rail-inset: calc(var(--cngx-timeline-marker-size, 12px) / 2);display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);grid-template-areas:\"marker time\" \"rail body\";column-gap:var(--cngx-timeline-gap, 8px);row-gap:var(--cngx-timeline-row-gap, 4px);color:var(--cngx-timeline-text-color, oklch(.2 .01 250))}.cngx-timeline-marker{grid-area:marker}.cngx-timeline-connector{grid-area:rail}.cngx-timeline-item__time{grid-area:time;color:var(--cngx-timeline-muted-color, oklch(.5 .01 250));font-size:var(--cngx-timeline-meta-size, .8125rem);line-height:1.4}.cngx-timeline-item__opposite{grid-area:opposite;align-self:start;color:var(--cngx-timeline-muted-color, oklch(.5 .01 250));font-size:var(--cngx-timeline-meta-size, .8125rem);line-height:1.4;text-align:end}.cngx-timeline-item__body{grid-area:body;padding:var(--cngx-timeline-content-padding, 4px);padding-block-end:var(--cngx-timeline-row-gap, 4px);min-inline-size:0}.cngx-timeline-item__error{margin:0;color:var(--cngx-timeline-rejected-color, oklch(.6 .18 25));font-size:var(--cngx-timeline-meta-size, .8125rem);line-height:1.4}.cngx-timeline-item__sr{position:absolute;inline-size:1px;block-size:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:scope[data-failed] .cngx-timeline-item__time{color:var(--cngx-timeline-rejected-color, oklch(.6 .18 25))}}[data-mode=activity] .cngx-timeline-item:not([data-orientation=horizontal] *){grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:\"marker body time\" \"rail body time\"}[data-mode=activity] .cngx-timeline-item .cngx-timeline-item__time{align-self:start;text-align:end;white-space:nowrap}[data-row-side=end] .cngx-timeline-item:not([data-mode=activity] *):not([data-orientation=horizontal] *){grid-template-columns:minmax(0,1fr) auto;grid-template-areas:\"time marker\" \"body rail\"}[data-row-side=end] .cngx-timeline-item:is([data-mode=activity] *):not([data-orientation=horizontal] *){grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:\"time body marker\" \"time body rail\"}[data-row-side=end] .cngx-timeline-item:not([data-mode=activity] *) .cngx-timeline-item__time{text-align:end}[data-row-side=end] .cngx-timeline-item:is([data-mode=activity] *) .cngx-timeline-item__time{text-align:start}[data-row-side=end] .cngx-timeline-item .cngx-timeline-item__opposite{text-align:start}.cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *){grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);grid-template-areas:\"opposite marker body\" \"time rail body\"}[data-row-side=end] .cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *){grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);grid-template-areas:\"body marker opposite\" \"body rail time\"}@container cngx-timeline (max-inline-size: 30rem){.cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *),[data-row-side=end] .cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *){grid-template-columns:auto minmax(0,1fr);grid-template-areas:\"marker time\" \"rail body\"}.cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]),[data-row-side=end] .cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]){grid-template-columns:auto auto minmax(0,1fr);grid-template-areas:\"opposite marker body\" \"time rail body\"}[data-row-side=end] .cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *) .cngx-timeline-item__time{text-align:start}[data-row-side=end] .cngx-timeline-item:is([data-placement=alternate] *):not([data-mode=activity] *) .cngx-timeline-item__opposite{text-align:end}}.cngx-timeline-item:not([data-placement=alternate] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]){grid-template-columns:auto auto minmax(0,1fr);grid-template-areas:\"opposite marker time\" \"opposite rail body\"}.cngx-timeline-item:is([data-mode=activity] *):not([data-placement=alternate] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]){grid-template-columns:auto auto minmax(0,1fr) auto;grid-template-areas:\"opposite marker body time\" \"opposite rail body time\"}[data-row-side=end] .cngx-timeline-item:not([data-mode=activity] *):not([data-placement=alternate] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]){grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:\"time marker opposite\" \"body rail opposite\"}[data-row-side=end] .cngx-timeline-item:is([data-mode=activity] *):not([data-placement=alternate] *):not([data-orientation=horizontal] *):has(>[cngxTimelineOpposite]){grid-template-columns:auto minmax(0,1fr) auto auto;grid-template-areas:\"time body marker opposite\" \"time body rail opposite\"}[data-rail=continuous] .cngx-timeline-item .cngx-timeline-connector:not([data-position=last]):not([data-position=only]):not([data-orientation=horizontal] *){block-size:calc(100% + var(--cngx-timeline-item-gap, 16px))}[data-rail=continuous] .cngx-timeline-item .cngx-timeline-connector:not([data-position=last]):not([data-position=only]):is([data-orientation=horizontal] *){inline-size:calc(100% + var(--cngx-timeline-item-gap, 16px))}.cngx-timeline-item:is([data-orientation=horizontal] *){flex:none;inline-size:var(--cngx-timeline-item-inline-size, 12rem);grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr);grid-template-areas:\"marker rail\" \"time time\" \"body body\"}.cngx-timeline-item:is([data-orientation=horizontal] *) .cngx-timeline-item__time{text-align:start;white-space:normal}.cngx-timeline-item:is([data-orientation=horizontal] *) .cngx-timeline-item__opposite{text-align:start}[data-row-side=end] .cngx-timeline-item:is([data-orientation=horizontal] *){grid-template-rows:minmax(0,1fr) auto auto;grid-template-areas:\"body body\" \"time time\" \"marker rail\"}.cngx-timeline-item:is([data-orientation=horizontal] *):is([data-placement=alternate] *){grid-template-rows:minmax(0,1fr) auto minmax(0,1fr);grid-template-areas:\"opposite time\" \"marker rail\" \"body body\"}[data-row-side=end] .cngx-timeline-item:is([data-orientation=horizontal] *):is([data-placement=alternate] *){grid-template-rows:minmax(0,1fr) auto minmax(0,1fr);grid-template-areas:\"body body\" \"marker rail\" \"opposite time\"}.cngx-timeline-item:is([data-orientation=horizontal] *):not([data-placement=alternate] *):has(>[cngxTimelineOpposite]){grid-template-rows:auto auto auto minmax(0,1fr);grid-template-areas:\"opposite opposite\" \"marker rail\" \"time time\" \"body body\"}[data-row-side=end] .cngx-timeline-item:is([data-orientation=horizontal] *):not([data-placement=alternate] *):has(>[cngxTimelineOpposite]){grid-template-rows:minmax(0,1fr) auto auto auto;grid-template-areas:\"body body\" \"time time\" \"marker rail\" \"opposite opposite\"}}\n"] }]
|
|
776
860
|
}], ctorParameters: () => [], propDecorators: { status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: false }] }], ownMarker: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CngxTimelineMarkerContent), { isSignal: true }] }] } });
|
|
777
861
|
|
|
778
862
|
/**
|
|
@@ -841,7 +925,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
841
925
|
/**
|
|
842
926
|
* The per-group header. Falls back to
|
|
843
927
|
* `CNGX_TIMELINE_CONFIG.labels.groupLabel`, which formats the group's
|
|
844
|
-
* start date in the
|
|
928
|
+
* start date in the app locale.
|
|
845
929
|
*
|
|
846
930
|
* The element this renders into is what the group's `aria-labelledby`
|
|
847
931
|
* points at, so a header that renders nothing leaves the group unnamed.
|
|
@@ -1082,5 +1166,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
1082
1166
|
* Generated bundle index. Do not edit.
|
|
1083
1167
|
*/
|
|
1084
1168
|
|
|
1085
|
-
export { CNGX_TIMELINE_CONFIG, CNGX_TIMELINE_GROUPING_FACTORY, CNGX_TIMELINE_MARKER_HOST, CngxTimelineConnector, CngxTimelineContent, CngxTimelineDateHeader, CngxTimelineEmpty, CngxTimelineError, CngxTimelineItem, CngxTimelineItemTpl, CngxTimelineLoadingTail, CngxTimelineMarker, CngxTimelineMarkerContent, CngxTimelineMarkerTpl, CngxTimelineOpposite, CngxTimelineRetryButton, CngxTimelineSkeleton, CngxTimelineTime, createTimelineGrouping, injectTimelineConfig, provideTimelineConfig, provideTimelineConfigAt, withTimelineLabels, withTimelineTemplates };
|
|
1169
|
+
export { CNGX_TIMELINE_CONFIG, CNGX_TIMELINE_GROUPING_FACTORY, CNGX_TIMELINE_LANGUAGE_EN, CNGX_TIMELINE_MARKER_HOST, CngxTimelineConnector, CngxTimelineContent, CngxTimelineDateHeader, CngxTimelineEmpty, CngxTimelineError, CngxTimelineItem, CngxTimelineItemTpl, CngxTimelineLoadingTail, CngxTimelineMarker, CngxTimelineMarkerContent, CngxTimelineMarkerTpl, CngxTimelineOpposite, CngxTimelineRetryButton, CngxTimelineSkeleton, CngxTimelineTime, createTimelineGrouping, injectTimelineConfig, provideTimelineConfig, provideTimelineConfigAt, withTimelineLabels, withTimelineTemplates };
|
|
1086
1170
|
//# sourceMappingURL=cngx-common-timeline.mjs.map
|