@cdevhub/ngx-tw 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +134 -0
- package/fesm2022/cdevhub-ngx-tw-accordion.mjs +108 -0
- package/fesm2022/cdevhub-ngx-tw-accordion.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-alert.mjs +240 -0
- package/fesm2022/cdevhub-ngx-tw-alert.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-avatar.mjs +287 -0
- package/fesm2022/cdevhub-ngx-tw-avatar.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-badge.mjs +332 -0
- package/fesm2022/cdevhub-ngx-tw-badge.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs +452 -0
- package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-button.mjs +227 -0
- package/fesm2022/cdevhub-ngx-tw-button.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs +417 -0
- package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-calendar-testing.mjs +232 -0
- package/fesm2022/cdevhub-ngx-tw-calendar-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-calendar.mjs +4482 -0
- package/fesm2022/cdevhub-ngx-tw-calendar.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-card.mjs +157 -0
- package/fesm2022/cdevhub-ngx-tw-card.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-carousel.mjs +1454 -0
- package/fesm2022/cdevhub-ngx-tw-carousel.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-checkbox.mjs +593 -0
- package/fesm2022/cdevhub-ngx-tw-checkbox.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-code-block.mjs +228 -0
- package/fesm2022/cdevhub-ngx-tw-code-block.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-collapsible.mjs +510 -0
- package/fesm2022/cdevhub-ngx-tw-collapsible.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs +1721 -0
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-command-palette.mjs +721 -0
- package/fesm2022/cdevhub-ngx-tw-command-palette.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-core.mjs +861 -0
- package/fesm2022/cdevhub-ngx-tw-core.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs +1558 -0
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs +1833 -0
- package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-dialog.mjs +693 -0
- package/fesm2022/cdevhub-ngx-tw-dialog.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-empty-state.mjs +331 -0
- package/fesm2022/cdevhub-ngx-tw-empty-state.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-flip-card.mjs +289 -0
- package/fesm2022/cdevhub-ngx-tw-flip-card.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-form-field.mjs +572 -0
- package/fesm2022/cdevhub-ngx-tw-form-field.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-icon-lucide.mjs +36 -0
- package/fesm2022/cdevhub-ngx-tw-icon-lucide.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-icon.mjs +278 -0
- package/fesm2022/cdevhub-ngx-tw-icon.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-input.mjs +355 -0
- package/fesm2022/cdevhub-ngx-tw-input.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-item.mjs +241 -0
- package/fesm2022/cdevhub-ngx-tw-item.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-menu.mjs +433 -0
- package/fesm2022/cdevhub-ngx-tw-menu.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs +691 -0
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-popover.mjs +678 -0
- package/fesm2022/cdevhub-ngx-tw-popover.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs +335 -0
- package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-radio.mjs +708 -0
- package/fesm2022/cdevhub-ngx-tw-radio.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs +319 -0
- package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-select.mjs +1722 -0
- package/fesm2022/cdevhub-ngx-tw-select.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-separator.mjs +115 -0
- package/fesm2022/cdevhub-ngx-tw-separator.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-sheet.mjs +768 -0
- package/fesm2022/cdevhub-ngx-tw-sheet.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-skeleton.mjs +149 -0
- package/fesm2022/cdevhub-ngx-tw-skeleton.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-slider.mjs +1147 -0
- package/fesm2022/cdevhub-ngx-tw-slider.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-sort.mjs +346 -0
- package/fesm2022/cdevhub-ngx-tw-sort.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-spinner.mjs +186 -0
- package/fesm2022/cdevhub-ngx-tw-spinner.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-split.mjs +1082 -0
- package/fesm2022/cdevhub-ngx-tw-split.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-stat.mjs +579 -0
- package/fesm2022/cdevhub-ngx-tw-stat.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-stepper.mjs +443 -0
- package/fesm2022/cdevhub-ngx-tw-stepper.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-switch.mjs +391 -0
- package/fesm2022/cdevhub-ngx-tw-switch.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs +315 -0
- package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-table.mjs +994 -0
- package/fesm2022/cdevhub-ngx-tw-table.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-tabs.mjs +508 -0
- package/fesm2022/cdevhub-ngx-tw-tabs.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-textarea.mjs +147 -0
- package/fesm2022/cdevhub-ngx-tw-textarea.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-theme.mjs +178 -0
- package/fesm2022/cdevhub-ngx-tw-theme.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-time-picker.mjs +1344 -0
- package/fesm2022/cdevhub-ngx-tw-time-picker.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-timeline.mjs +1136 -0
- package/fesm2022/cdevhub-ngx-tw-timeline.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-toast.mjs +1311 -0
- package/fesm2022/cdevhub-ngx-tw-toast.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-tooltip.mjs +533 -0
- package/fesm2022/cdevhub-ngx-tw-tooltip.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw.mjs +61 -0
- package/fesm2022/cdevhub-ngx-tw.mjs.map +1 -0
- package/package.json +265 -0
- package/theme/_base.css +394 -0
- package/theme/_dark.css +510 -0
- package/theme/_high-contrast.css +290 -0
- package/theme/_semantic.css +317 -0
- package/theme/_typography.css +9 -0
- package/theme/index.css +54 -0
- package/types/cdevhub-ngx-tw-accordion.d.ts +48 -0
- package/types/cdevhub-ngx-tw-alert.d.ts +67 -0
- package/types/cdevhub-ngx-tw-avatar.d.ts +79 -0
- package/types/cdevhub-ngx-tw-badge.d.ts +94 -0
- package/types/cdevhub-ngx-tw-breadcrumbs.d.ts +227 -0
- package/types/cdevhub-ngx-tw-button.d.ts +74 -0
- package/types/cdevhub-ngx-tw-calendar-luxon.d.ts +200 -0
- package/types/cdevhub-ngx-tw-calendar-testing.d.ts +113 -0
- package/types/cdevhub-ngx-tw-calendar.d.ts +1704 -0
- package/types/cdevhub-ngx-tw-card.d.ts +48 -0
- package/types/cdevhub-ngx-tw-carousel.d.ts +406 -0
- package/types/cdevhub-ngx-tw-checkbox.d.ts +136 -0
- package/types/cdevhub-ngx-tw-code-block.d.ts +93 -0
- package/types/cdevhub-ngx-tw-collapsible.d.ts +151 -0
- package/types/cdevhub-ngx-tw-combobox.d.ts +389 -0
- package/types/cdevhub-ngx-tw-command-palette.d.ts +215 -0
- package/types/cdevhub-ngx-tw-core.d.ts +719 -0
- package/types/cdevhub-ngx-tw-date-picker.d.ts +317 -0
- package/types/cdevhub-ngx-tw-date-range-picker.d.ts +313 -0
- package/types/cdevhub-ngx-tw-dialog.d.ts +303 -0
- package/types/cdevhub-ngx-tw-empty-state.d.ts +104 -0
- package/types/cdevhub-ngx-tw-flip-card.d.ts +95 -0
- package/types/cdevhub-ngx-tw-form-field.d.ts +210 -0
- package/types/cdevhub-ngx-tw-icon-lucide.d.ts +29 -0
- package/types/cdevhub-ngx-tw-icon.d.ts +134 -0
- package/types/cdevhub-ngx-tw-input.d.ts +110 -0
- package/types/cdevhub-ngx-tw-item.d.ts +70 -0
- package/types/cdevhub-ngx-tw-menu.d.ts +99 -0
- package/types/cdevhub-ngx-tw-paginator.d.ts +305 -0
- package/types/cdevhub-ngx-tw-popover.d.ts +157 -0
- package/types/cdevhub-ngx-tw-progress-bar.d.ts +100 -0
- package/types/cdevhub-ngx-tw-radio.d.ts +174 -0
- package/types/cdevhub-ngx-tw-segmented-control.d.ts +66 -0
- package/types/cdevhub-ngx-tw-select.d.ts +384 -0
- package/types/cdevhub-ngx-tw-separator.d.ts +28 -0
- package/types/cdevhub-ngx-tw-sheet.d.ts +335 -0
- package/types/cdevhub-ngx-tw-skeleton.d.ts +52 -0
- package/types/cdevhub-ngx-tw-slider.d.ts +258 -0
- package/types/cdevhub-ngx-tw-sort.d.ts +136 -0
- package/types/cdevhub-ngx-tw-spinner.d.ts +50 -0
- package/types/cdevhub-ngx-tw-split.d.ts +265 -0
- package/types/cdevhub-ngx-tw-stat.d.ts +140 -0
- package/types/cdevhub-ngx-tw-stepper.d.ts +127 -0
- package/types/cdevhub-ngx-tw-switch.d.ts +88 -0
- package/types/cdevhub-ngx-tw-tab-nav.d.ts +107 -0
- package/types/cdevhub-ngx-tw-table.d.ts +479 -0
- package/types/cdevhub-ngx-tw-tabs.d.ts +121 -0
- package/types/cdevhub-ngx-tw-textarea.d.ts +62 -0
- package/types/cdevhub-ngx-tw-theme.d.ts +106 -0
- package/types/cdevhub-ngx-tw-time-picker.d.ts +303 -0
- package/types/cdevhub-ngx-tw-timeline.d.ts +278 -0
- package/types/cdevhub-ngx-tw-toast.d.ts +388 -0
- package/types/cdevhub-ngx-tw-tooltip.d.ts +95 -0
- package/types/cdevhub-ngx-tw.d.ts +49 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { InjectionToken, AfterContentInit, EnvironmentProviders } from '@angular/core';
|
|
3
|
+
import { TwOrientation, TwSize, TwColor } from '@cdevhub/ngx-tw/core';
|
|
4
|
+
|
|
5
|
+
/** Marker geometry of a `tw-timeline-item`. */
|
|
6
|
+
type TimelineMarker = 'dot' | 'circle';
|
|
7
|
+
/** Semantic state of a `tw-timeline-item`. Drives marker fill, ring, and trailing-connector color. */
|
|
8
|
+
type TimelineState = 'reached' | 'pending' | 'current' | 'error';
|
|
9
|
+
/** Vertical layout strategy of a `tw-timeline`. Ignored for `orientation: 'horizontal'`. */
|
|
10
|
+
type TimelineAlign = 'left' | 'right' | 'alternate' | 'split';
|
|
11
|
+
/** Connector line style. */
|
|
12
|
+
type TimelineLineStyle = 'solid' | 'dashed';
|
|
13
|
+
/** Visibility policy for the horizontal-overflow chevron buttons. */
|
|
14
|
+
type TimelineScrollControls = 'auto' | 'always' | 'never';
|
|
15
|
+
/** Localisable labels for the horizontal-overflow chevron buttons on `tw-timeline`. */
|
|
16
|
+
interface TwTimelineScrollLabels {
|
|
17
|
+
/** Accessible label for the previous-scroll chevron. Used as `aria-label`. Defaults to `'Scroll to previous events'`. */
|
|
18
|
+
scrollPrevious: string;
|
|
19
|
+
/** Accessible label for the next-scroll chevron. Used as `aria-label`. Defaults to `'Scroll to next events'`. */
|
|
20
|
+
scrollNext: string;
|
|
21
|
+
}
|
|
22
|
+
/** Default English labels used when `TW_TIMELINE_SCROLL_LABELS` is not provided. */
|
|
23
|
+
declare const DEFAULT_TW_TIMELINE_SCROLL_LABELS: TwTimelineScrollLabels;
|
|
24
|
+
/**
|
|
25
|
+
* Injection token carrying localisable `aria-label` strings for the timeline's
|
|
26
|
+
* horizontal-overflow chevron buttons. The container uses these labels exclusively
|
|
27
|
+
* on the prev/next buttons; they do not affect any other rendered text.
|
|
28
|
+
*
|
|
29
|
+
* Provide via `provideTwTimelineScrollLabels({ ... })` at the root or feature level.
|
|
30
|
+
* If both keys are present they override the English defaults; if only one is present
|
|
31
|
+
* the other falls back to the English default.
|
|
32
|
+
*
|
|
33
|
+
* First concrete token under the `TW_TIMELINE_I18N` reservation in
|
|
34
|
+
* `docs/requirements/timeline.requirements.md` § 11.2.
|
|
35
|
+
*/
|
|
36
|
+
declare const TW_TIMELINE_SCROLL_LABELS: InjectionToken<Partial<TwTimelineScrollLabels>>;
|
|
37
|
+
/**
|
|
38
|
+
* Configures the localised labels used by `tw-timeline` overflow chevrons.
|
|
39
|
+
* Add to `bootstrapApplication`'s `providers` (or any feature/route provider array).
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* bootstrapApplication(App, {
|
|
44
|
+
* providers: [
|
|
45
|
+
* provideTwTimelineScrollLabels({
|
|
46
|
+
* scrollPrevious: 'Vorherige Ereignisse',
|
|
47
|
+
* scrollNext: 'Nächste Ereignisse',
|
|
48
|
+
* }),
|
|
49
|
+
* ],
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
declare function provideTwTimelineScrollLabels(labels: Partial<TwTimelineScrollLabels>): EnvironmentProviders;
|
|
54
|
+
/**
|
|
55
|
+
* Marker-slot directive. Apply on any element projected inside a `<tw-timeline-item>`
|
|
56
|
+
* to render that element inside the marker bubble (only when `marker="circle"`).
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```html
|
|
60
|
+
* <tw-timeline-item marker="circle" color="success">
|
|
61
|
+
* <tw-icon twTimelineMarker name="check" />
|
|
62
|
+
* <p class="text-sm">Done</p>
|
|
63
|
+
* </tw-timeline-item>
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
declare class TimelineMarkerDirective {
|
|
67
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TimelineMarkerDirective, never>;
|
|
68
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TimelineMarkerDirective, "[twTimelineMarker]", never, {}, {}, never, never, true, never>;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Timestamp-slot directive. Replaces the rendered `timestamp` / `dateTime`
|
|
72
|
+
* output. Use for relative-time components ("2 hours ago").
|
|
73
|
+
*/
|
|
74
|
+
declare class TimelineTimestampDirective {
|
|
75
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TimelineTimestampDirective, never>;
|
|
76
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TimelineTimestampDirective, "[twTimelineTimestamp]", never, {}, {}, never, never, true, never>;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Opposite-slot directive. Renders on the side opposite the body in
|
|
80
|
+
* `align="alternate"` / `align="split"` (vertical orientation only).
|
|
81
|
+
*/
|
|
82
|
+
declare class TimelineOppositeDirective {
|
|
83
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TimelineOppositeDirective, never>;
|
|
84
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TimelineOppositeDirective, "[twTimelineOpposite]", never, {}, {}, never, never, true, never>;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Presentational chronological-sequence layout primitive. Renders a list of
|
|
88
|
+
* `<tw-timeline-item>` children connected by a line that runs through their
|
|
89
|
+
* markers. The container owns orientation, alignment, density, and line-style
|
|
90
|
+
* decisions; items style their own marker, state, and connector colors.
|
|
91
|
+
*
|
|
92
|
+
* **Not interactive.** Unlike `tw-stepper`, the timeline does not install a
|
|
93
|
+
* keyboard map, does not own panels, does not trap focus, and item hosts are
|
|
94
|
+
* not focusable. Consumers needing row-level activation project an
|
|
95
|
+
* interactive primitive (`<tw-item interactive>`, `<button>`, an anchor) inside
|
|
96
|
+
* the default slot.
|
|
97
|
+
*/
|
|
98
|
+
declare class TimelineComponent {
|
|
99
|
+
/** Axis along which items are laid out. `'vertical'` stacks items top-to-bottom; `'horizontal'` lays them out left-to-right (RTL-aware). Defaults to `'vertical'`. */
|
|
100
|
+
readonly orientation: _angular_core.InputSignal<TwOrientation>;
|
|
101
|
+
/** Vertical layout strategy. `'left'` / `'right'` place the marker on that side; `'alternate'` centers the marker and flips the body left ↔ right per item; `'split'` centers the marker with body on the right and the opposite slot on the left. Ignored when orientation is `'horizontal'`. Defaults to `'left'`. */
|
|
102
|
+
readonly align: _angular_core.InputSignal<TimelineAlign>;
|
|
103
|
+
/** Density and typography scale. Controls marker diameter, gap between items, and body typography step. Defaults to `'md'`. */
|
|
104
|
+
readonly size: _angular_core.InputSignal<TwSize>;
|
|
105
|
+
/** Connector line style applied to every gap between items. Defaults to `'solid'`. */
|
|
106
|
+
readonly lineStyle: _angular_core.InputSignal<TimelineLineStyle>;
|
|
107
|
+
/**
|
|
108
|
+
* Visibility policy for the horizontal-overflow chevron buttons. `'auto'`
|
|
109
|
+
* shows them only when the inner scroll region can scroll in that direction;
|
|
110
|
+
* `'always'` renders both regardless of scroll state (disabled when at an
|
|
111
|
+
* edge); `'never'` hides them entirely (consumer manages overflow
|
|
112
|
+
* externally). Ignored when orientation is `'vertical'`. Defaults to
|
|
113
|
+
* `'auto'`.
|
|
114
|
+
*
|
|
115
|
+
* Counts as the 5th container input, justified by the "Overflow-control axis
|
|
116
|
+
* on layout primitives" cap exception: a layout primitive whose primary axes
|
|
117
|
+
* (orientation, alignment, size, line/style) already saturate ≤ 4 inputs MAY
|
|
118
|
+
* add a single additional input that toggles overflow-navigation
|
|
119
|
+
* affordances when overflow is a real concern for at least one axis value.
|
|
120
|
+
* The added input MUST be a single tri-state and MUST be inert on axis
|
|
121
|
+
* values where overflow cannot occur (here: `orientation === 'vertical'`).
|
|
122
|
+
*/
|
|
123
|
+
readonly scrollControls: _angular_core.InputSignal<TimelineScrollControls>;
|
|
124
|
+
/** @internal Static class string for the horizontal scroll viewport — see `HORIZONTAL_VIEWPORT_CLASSES`. */
|
|
125
|
+
protected readonly horizontalViewportClasses: string;
|
|
126
|
+
/** @internal Projected `tw-timeline-item` children in DOM order. */
|
|
127
|
+
readonly items: _angular_core.Signal<readonly TimelineItemComponent[]>;
|
|
128
|
+
private readonly _destroyRef;
|
|
129
|
+
private readonly _directionality;
|
|
130
|
+
private readonly _viewportRef;
|
|
131
|
+
private readonly _scrollLabelsOverride;
|
|
132
|
+
/** @internal Live `dir` from CDK `Directionality`. */
|
|
133
|
+
private readonly _cdkDir;
|
|
134
|
+
/** @internal True when the host renders inside a `dir="rtl"` ancestor. */
|
|
135
|
+
readonly _isRtl: _angular_core.Signal<boolean>;
|
|
136
|
+
/**
|
|
137
|
+
* @internal Defaults to `false` until the first measurement runs in
|
|
138
|
+
* `afterNextRender`. This avoids a one-frame "enabled-then-disabled" flash
|
|
139
|
+
* where the buttons appear live before the scroll state has been read.
|
|
140
|
+
*/
|
|
141
|
+
readonly _canScrollPrev: _angular_core.WritableSignal<boolean>;
|
|
142
|
+
readonly _canScrollNext: _angular_core.WritableSignal<boolean>;
|
|
143
|
+
/** @internal Resolved label record. Falls back to English defaults for any missing key. */
|
|
144
|
+
readonly scrollLabels: _angular_core.Signal<TwTimelineScrollLabels>;
|
|
145
|
+
/** @internal True when the prev button should be aria-hidden + visually suppressed. */
|
|
146
|
+
readonly _prevButtonHidden: _angular_core.Signal<boolean>;
|
|
147
|
+
/** @internal True when the next button should be aria-hidden + visually suppressed. */
|
|
148
|
+
readonly _nextButtonHidden: _angular_core.Signal<boolean>;
|
|
149
|
+
/** @internal Native `disabled` attribute. Always true for hidden buttons (defensive); also true for `'always'` policy when can't scroll. */
|
|
150
|
+
readonly _prevButtonDisabled: _angular_core.Signal<boolean>;
|
|
151
|
+
readonly _nextButtonDisabled: _angular_core.Signal<boolean>;
|
|
152
|
+
/**
|
|
153
|
+
* @internal Final class string for the prev chevron — combines the shared
|
|
154
|
+
* `CHEVRON_CLASSES`, the directional anchor (`left-0` in LTR, `right-0` in
|
|
155
|
+
* RTL), and the visibility variant driven by `scrollControls`.
|
|
156
|
+
*/
|
|
157
|
+
readonly prevChevronClasses: _angular_core.Signal<string>;
|
|
158
|
+
readonly nextChevronClasses: _angular_core.Signal<string>;
|
|
159
|
+
private _chevronClasses;
|
|
160
|
+
private _resizeObserver;
|
|
161
|
+
constructor();
|
|
162
|
+
private _setupScrollDetection;
|
|
163
|
+
/** @internal Wired to the viewport's `(scroll)` event. */
|
|
164
|
+
_onScroll(): void;
|
|
165
|
+
private _updateScrollState;
|
|
166
|
+
/** Page-scroll amount: 75% of the visible width, leaving ~25% overlap for context. */
|
|
167
|
+
private _pageScrollAmount;
|
|
168
|
+
/** @internal Click handler for the prev chevron. */
|
|
169
|
+
_scrollPrev(): void;
|
|
170
|
+
/** @internal Click handler for the next chevron. */
|
|
171
|
+
_scrollNext(): void;
|
|
172
|
+
private readonly variantResult;
|
|
173
|
+
readonly rootClasses: _angular_core.Signal<string>;
|
|
174
|
+
/** @internal Item slot classes shared with `TimelineItemComponent`. */
|
|
175
|
+
readonly itemSlotClasses: _angular_core.Signal<string>;
|
|
176
|
+
readonly markerSideSlotClasses: _angular_core.Signal<string>;
|
|
177
|
+
readonly markerSlotClasses: _angular_core.Signal<string>;
|
|
178
|
+
readonly connectorLeadingSlotClasses: _angular_core.Signal<string>;
|
|
179
|
+
readonly connectorTrailingSlotClasses: _angular_core.Signal<string>;
|
|
180
|
+
readonly bodySlotClasses: _angular_core.Signal<string>;
|
|
181
|
+
readonly oppositeSlotClasses: _angular_core.Signal<string>;
|
|
182
|
+
readonly numberSlotClasses: _angular_core.Signal<string>;
|
|
183
|
+
readonly timestampSlotClasses: _angular_core.Signal<string>;
|
|
184
|
+
/** @internal Variant builder reused by items so per-item state can recompose without rebuilding the base tv() result. */
|
|
185
|
+
readonly itemMarkerVariant: (state: TimelineState, marker: TimelineMarker) => string;
|
|
186
|
+
/** @internal Variant builder for the auto-number slot (state drives text color). */
|
|
187
|
+
readonly itemNumberVariant: (state: TimelineState) => string;
|
|
188
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TimelineComponent, never>;
|
|
189
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TimelineComponent, "tw-timeline", never, { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "lineStyle": { "alias": "lineStyle"; "required": false; "isSignal": true; }; "scrollControls": { "alias": "scrollControls"; "required": false; "isSignal": true; }; }, {}, ["items"], ["*"], true, never>;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* A single event in a `tw-timeline`. Renders a marker (dot or circle) plus
|
|
193
|
+
* content. Connectors leading into and out of the marker are emitted by this
|
|
194
|
+
* component and conditionally elided when the item is first or last in the
|
|
195
|
+
* timeline. The item is not focusable — row activation belongs to projected
|
|
196
|
+
* interactive children.
|
|
197
|
+
*/
|
|
198
|
+
declare class TimelineItemComponent implements AfterContentInit {
|
|
199
|
+
/** Semantic color for the marker fill and the trailing connector when the item is in a reached state. Ignored when state is `'error'` (which forces the error palette). Defaults to `'primary'`. */
|
|
200
|
+
readonly color: _angular_core.InputSignal<TwColor>;
|
|
201
|
+
/** Marker geometry. `'dot'` is a small filled circle. `'circle'` is a larger ring that may contain a projected icon, avatar, or an auto-computed 1-based index. Defaults to `'dot'`. */
|
|
202
|
+
readonly marker: _angular_core.InputSignal<TimelineMarker>;
|
|
203
|
+
/** Semantic state of the event. Drives marker fill, ring, and trailing-connector color, and applies `aria-current="step"` when `'current'`. Defaults to `'reached'`. */
|
|
204
|
+
readonly state: _angular_core.InputSignal<TimelineState>;
|
|
205
|
+
/** Timestamp shown in the timestamp slot. A `Date` is formatted via `Intl.DateTimeFormat(undefined, { dateStyle: 'medium', timeStyle: 'short' })`; a string is rendered verbatim; `null` omits the timestamp element. Overridden by projected `[twTimelineTimestamp]` content when present. Defaults to `null`. */
|
|
206
|
+
readonly timestamp: _angular_core.InputSignal<string | Date | null>;
|
|
207
|
+
/** Machine-readable ISO 8601 datetime for the rendered `<time datetime="…">` attribute. Derived from `timestamp` when it is a `Date` and this input is `null`; required (explicit) when `timestamp` is a string and machine-readability is desired. When `null` with a string timestamp, the timestamp renders as a `<span>` instead. Defaults to `null`. */
|
|
208
|
+
readonly dateTime: _angular_core.InputSignal<string | null>;
|
|
209
|
+
/** @internal Direct parent timeline. A `tw-timeline-item` outside a `tw-timeline` is a programmer error — the DI failure throws naturally. */
|
|
210
|
+
readonly timeline: TimelineComponent;
|
|
211
|
+
/** @internal */
|
|
212
|
+
readonly markerSlot: _angular_core.Signal<TimelineMarkerDirective | undefined>;
|
|
213
|
+
/** @internal */
|
|
214
|
+
readonly timestampSlot: _angular_core.Signal<TimelineTimestampDirective | undefined>;
|
|
215
|
+
/** @internal */
|
|
216
|
+
readonly oppositeSlot: _angular_core.Signal<TimelineOppositeDirective | undefined>;
|
|
217
|
+
readonly hasMarkerSlot: _angular_core.Signal<boolean>;
|
|
218
|
+
readonly hasTimestampSlot: _angular_core.Signal<boolean>;
|
|
219
|
+
readonly hasOppositeSlot: _angular_core.Signal<boolean>;
|
|
220
|
+
/** @internal 0-based index in the parent timeline's content. -1 until contentChildren materialises. */
|
|
221
|
+
readonly index: _angular_core.Signal<number>;
|
|
222
|
+
readonly isFirst: _angular_core.Signal<boolean>;
|
|
223
|
+
readonly isLast: _angular_core.Signal<boolean>;
|
|
224
|
+
/**
|
|
225
|
+
* Leading-connector visibility. In vertical orientation the marker sits at
|
|
226
|
+
* the top of the body and only the trailing segment is rendered. In
|
|
227
|
+
* horizontal orientation the marker must stay centered in its row even at
|
|
228
|
+
* the ends of the timeline, so the leading segment is always rendered — as a
|
|
229
|
+
* coloured line for non-first items, as an invisible spacer for the first.
|
|
230
|
+
*/
|
|
231
|
+
readonly renderLeadingConnector: _angular_core.Signal<boolean>;
|
|
232
|
+
/**
|
|
233
|
+
* Trailing-connector visibility. Rendered for every item in horizontal
|
|
234
|
+
* orientation (as a spacer on the last item) so all markers stay centered.
|
|
235
|
+
* In vertical orientation it is suppressed on the last item — the timeline
|
|
236
|
+
* ends with the marker, no trailing segment.
|
|
237
|
+
*/
|
|
238
|
+
readonly renderTrailingConnector: _angular_core.Signal<boolean>;
|
|
239
|
+
/** @internal `error` state forces the error palette regardless of the color input. */
|
|
240
|
+
readonly resolvedColor: _angular_core.Signal<TwColor>;
|
|
241
|
+
/** @internal Previous item's state (drives the leading connector color so a line between two items reads as one color). */
|
|
242
|
+
readonly previousState: _angular_core.Signal<TimelineState>;
|
|
243
|
+
/** @internal Previous item's resolved color, for the same reason as `previousState`. */
|
|
244
|
+
readonly previousColor: _angular_core.Signal<TwColor>;
|
|
245
|
+
readonly stateLabel: _angular_core.Signal<string | null>;
|
|
246
|
+
readonly formattedTimestamp: _angular_core.Signal<string>;
|
|
247
|
+
readonly resolvedDateTime: _angular_core.Signal<string | null>;
|
|
248
|
+
/** @internal True when the layout needs a third (opposite) column. */
|
|
249
|
+
readonly hasOppositeColumn: _angular_core.Signal<boolean>;
|
|
250
|
+
/** @internal Order of the marker side wrapper. Always center column (2) in three-column layouts; in two-column vertical layouts the order varies. Horizontal layouts use CSS grid placement (`row-start-*`) instead, so flex-order utilities are noise — return ''. */
|
|
251
|
+
private readonly markerOrderClass;
|
|
252
|
+
/** @internal Order of the body wrapper. Alternate flips body left/right per item. Horizontal layouts use CSS grid placement (`row-start-*`) instead, so flex-order utilities are noise — return ''. */
|
|
253
|
+
private readonly bodyOrderClass;
|
|
254
|
+
/** @internal Order of the opposite wrapper. Always left of the marker except on odd-indexed alternate items. */
|
|
255
|
+
private readonly oppositeOrderClass;
|
|
256
|
+
/** @internal Width affordance for the marker side. Vertical needs a fixed-ish column; horizontal needs to span the row. */
|
|
257
|
+
private readonly markerSideSizeClass;
|
|
258
|
+
/** @internal Width affordance for the body in alternate/split layouts so the marker stays centered. */
|
|
259
|
+
private readonly bodyFlexClass;
|
|
260
|
+
/** @internal Width affordance for the opposite column (mirrors the body to keep the marker centered). */
|
|
261
|
+
private readonly oppositeFlexClass;
|
|
262
|
+
readonly itemClasses: _angular_core.Signal<string>;
|
|
263
|
+
readonly markerSideClasses: _angular_core.Signal<string>;
|
|
264
|
+
readonly markerClasses: _angular_core.Signal<string>;
|
|
265
|
+
readonly leadingConnectorClasses: _angular_core.Signal<string>;
|
|
266
|
+
readonly trailingConnectorClasses: _angular_core.Signal<string>;
|
|
267
|
+
readonly bodyClasses: _angular_core.Signal<string>;
|
|
268
|
+
readonly oppositeClasses: _angular_core.Signal<string>;
|
|
269
|
+
readonly numberClasses: _angular_core.Signal<string>;
|
|
270
|
+
readonly timestampClasses: _angular_core.Signal<string>;
|
|
271
|
+
readonly enterAnimationClass: _angular_core.Signal<"timeline-item-enter-horizontal" | "timeline-item-enter">;
|
|
272
|
+
ngAfterContentInit(): void;
|
|
273
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TimelineItemComponent, never>;
|
|
274
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TimelineItemComponent, "tw-timeline-item", never, { "color": { "alias": "color"; "required": false; "isSignal": true; }; "marker": { "alias": "marker"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "timestamp": { "alias": "timestamp"; "required": false; "isSignal": true; }; "dateTime": { "alias": "dateTime"; "required": false; "isSignal": true; }; }, {}, ["markerSlot", "timestampSlot", "oppositeSlot"], ["[twTimelineMarker]", "*", "[twTimelineTimestamp]", "[twTimelineOpposite]"], true, never>;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export { DEFAULT_TW_TIMELINE_SCROLL_LABELS, TW_TIMELINE_SCROLL_LABELS, TimelineComponent, TimelineItemComponent, TimelineMarkerDirective, TimelineOppositeDirective, TimelineTimestampDirective, provideTwTimelineScrollLabels };
|
|
278
|
+
export type { TimelineAlign, TimelineLineStyle, TimelineMarker, TimelineScrollControls, TimelineState, TwTimelineScrollLabels };
|