@cngx/common 0.1.0-rc.5 → 0.1.0-rc.7
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/chart/README.md +85 -0
- package/command/README.md +157 -0
- package/data/README.md +23 -0
- package/fesm2022/cngx-common-a11y.mjs +247 -85
- package/fesm2022/cngx-common-a11y.mjs.map +1 -1
- package/fesm2022/cngx-common-audio.mjs +37 -37
- package/fesm2022/cngx-common-audio.mjs.map +1 -1
- package/fesm2022/cngx-common-card.mjs +13 -9
- package/fesm2022/cngx-common-card.mjs.map +1 -1
- package/fesm2022/cngx-common-chart.mjs +3404 -1392
- package/fesm2022/cngx-common-chart.mjs.map +1 -1
- package/fesm2022/cngx-common-command.mjs +144 -0
- package/fesm2022/cngx-common-command.mjs.map +1 -0
- package/fesm2022/cngx-common-data.mjs +304 -213
- package/fesm2022/cngx-common-data.mjs.map +1 -1
- package/fesm2022/cngx-common-dialog.mjs +369 -100
- package/fesm2022/cngx-common-dialog.mjs.map +1 -1
- package/fesm2022/cngx-common-display.mjs +144 -30
- package/fesm2022/cngx-common-display.mjs.map +1 -1
- package/fesm2022/cngx-common-interactive.mjs +1089 -459
- package/fesm2022/cngx-common-interactive.mjs.map +1 -1
- package/fesm2022/cngx-common-layout.mjs +113 -61
- package/fesm2022/cngx-common-layout.mjs.map +1 -1
- package/fesm2022/cngx-common-popover.mjs +430 -54
- package/fesm2022/cngx-common-popover.mjs.map +1 -1
- package/fesm2022/cngx-common-stepper.mjs +107 -49
- package/fesm2022/cngx-common-stepper.mjs.map +1 -1
- package/fesm2022/cngx-common-tabs.mjs +1170 -752
- package/fesm2022/cngx-common-tabs.mjs.map +1 -1
- package/fesm2022/cngx-common-timeline.mjs +1086 -0
- package/fesm2022/cngx-common-timeline.mjs.map +1 -0
- package/fesm2022/cngx-common.mjs +2 -2
- package/fesm2022/cngx-common.mjs.map +1 -1
- package/package.json +11 -1
- package/stepper/README.md +1 -1
- package/theming/components/cngx-accordion.css +20 -6
- package/theming/components/cngx-badge.css +22 -0
- package/theming/components/cngx-bottom-sheet.css +14 -2
- package/theming/components/cngx-breadcrumb.css +9 -1
- package/theming/components/cngx-button-toggle.css +44 -2
- package/theming/components/cngx-data-grid.css +69 -4
- package/theming/components/cngx-dialog.css +12 -0
- package/theming/components/cngx-divider.css +12 -0
- package/theming/components/cngx-listbox.css +27 -0
- package/theming/components/cngx-menu.css +36 -0
- package/theming/components/cngx-ripple.css +1 -1
- package/theming/components/cngx-slider.css +1 -1
- package/theming/components/cngx-tooltip.css +11 -0
- package/types/cngx-common-a11y.d.ts +63 -17
- package/types/cngx-common-audio.d.ts +32 -32
- package/types/cngx-common-card.d.ts +10 -3
- package/types/cngx-common-chart.d.ts +1281 -141
- package/types/cngx-common-command.d.ts +167 -0
- package/types/cngx-common-data.d.ts +264 -98
- package/types/cngx-common-dialog.d.ts +214 -25
- package/types/cngx-common-display.d.ts +83 -13
- package/types/cngx-common-interactive.d.ts +708 -174
- package/types/cngx-common-layout.d.ts +48 -1
- package/types/cngx-common-popover.d.ts +120 -3
- package/types/cngx-common-stepper.d.ts +55 -5
- package/types/cngx-common-tabs.d.ts +386 -25
- package/types/cngx-common-timeline.d.ts +1059 -0
- package/types/cngx-common.d.ts +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cngx-common-timeline.mjs","sources":["../../../projects/common/timeline/grouping.ts","../../../projects/common/timeline/marker.component.ts","../../../projects/common/timeline/connector.component.ts","../../../projects/common/timeline/marker-host.token.ts","../../../projects/common/timeline/timeline-config.ts","../../../projects/common/timeline/timeline-item.component.ts","../../../projects/common/timeline/template-slots.ts","../../../projects/common/timeline/public-api.ts","../../../projects/common/timeline/cngx-common-timeline.ts"],"sourcesContent":["import { InjectionToken, linkedSignal, type Signal } from '@angular/core';\n\n/**\n * One rendered band of a timeline - a calendar bucket plus the items that\n * fall into it, already sorted.\n *\n * The group carries no label: formatting a date is a locale concern that\n * belongs to the `*cngxTimelineDateHeader` slot (or the config's\n * `groupLabel` fallback), not to the presenter. `key` is stable and\n * collision-free across the built-in groupers, so it doubles as the\n * `@for` track expression and as the `aria-labelledby` id seed.\n *\n * @category common/timeline\n */\nexport interface TimelineGroup<T> {\n /** Stable bucket identity, e.g. `2026-07-27` for `day`. */\n readonly key: string;\n /**\n * Local start-of-bucket instant - midnight for `day`, the Monday for\n * `week`, the first of the month for `month`. For `'none'` it is the\n * date of the first item in sort order.\n */\n readonly start: Date;\n /** Items in this bucket, in the resolved sort direction. */\n readonly items: readonly T[];\n}\n\n/**\n * What a {@link TimelineGroupingFn} returns for a single item: the bucket\n * it belongs to, and the instant that bucket starts at.\n *\n * @category common/timeline\n */\nexport interface TimelineGroupKey {\n readonly key: string;\n readonly start: Date;\n}\n\n/**\n * Escape hatch for consumer-defined bucketing - UTC days, fiscal quarters,\n * sprint windows, \"today / this week / earlier\". Receives the coerced date\n * and the item it came from, so a grouper may key off payload fields\n * (tenant, channel) as well as time.\n *\n * Called once per item per recomputation; keep it pure and cheap.\n *\n * @category common/timeline\n */\nexport type TimelineGroupingFn<T> = (date: Date, item: T) => TimelineGroupKey;\n\n/**\n * Built-in bucketing modes plus the {@link TimelineGroupingFn} escape\n * hatch. The three calendar modes read **local** date fields, so they stay\n * correct across DST transitions where a day is 23 or 25 hours long -\n * epoch division would silently split or merge those days.\n *\n * `'none'` collapses everything into one synthetic group, which is how the\n * organism renders an ungrouped `role=\"list\"` without a second code path.\n *\n * @category common/timeline\n */\nexport type TimelineGroupBy<T> = 'day' | 'week' | 'month' | 'none' | TimelineGroupingFn<T>;\n\n/**\n * Sort direction for the whole timeline. `'desc'` (default) is\n * newest-first, the activity-feed convention; `'asc'` is oldest-first,\n * which reads better for narrative histories.\n *\n * @category common/timeline\n */\nexport type TimelineDirection = 'asc' | 'desc';\n\n/**\n * Pulls the timestamp out of a consumer item. Anything the `Date`\n * constructor accepts works, so ISO strings straight off an API response\n * need no pre-mapping.\n *\n * @category common/timeline\n */\nexport type TimelineDateAccessor<T> = (item: T) => Date | string | number;\n\n/**\n * Inputs to {@link createTimelineGrouping}. Every reactive knob is a\n * zero-arg accessor, so a `Signal` (or an `input()`) can be passed\n * directly and a constant is just `() => 'day'`.\n *\n * @category common/timeline\n */\nexport interface TimelineGroupingOptions<T> {\n /** Source list. Read inside the `groups` computation, so it is tracked. */\n readonly items: () => readonly T[];\n /**\n * Timestamp accessor. Not a signal itself, but it is called inside the\n * `groups` computation, so a caller that closes over one - as the organism\n * does over its `[dateAccessor]` input - has those reads tracked like any\n * other and re-groups when the accessor is rebound.\n */\n readonly dateAccessor: TimelineDateAccessor<T>;\n /** Bucketing mode. Defaults to `'day'`. */\n readonly groupBy?: () => TimelineGroupBy<T>;\n /** Sort direction. Defaults to `'desc'`. */\n readonly direction?: () => TimelineDirection;\n}\n\n/**\n * What {@link createTimelineGrouping} hands back. An object rather than a\n * bare `Signal` because the v2 live cursor extends this surface - callers\n * written against v1 keep compiling.\n *\n * @category common/timeline\n */\nexport interface TimelineGrouping<T> {\n readonly groups: Signal<readonly TimelineGroup<T>[]>;\n}\n\ninterface Bucket<T> {\n readonly start: Date;\n readonly items: T[];\n}\n\nfunction pad2(value: number): string {\n return value < 10 ? `0${value}` : `${value}`;\n}\n\nfunction groupByDay(date: Date): TimelineGroupKey {\n const year = date.getFullYear();\n const month = date.getMonth();\n const day = date.getDate();\n return {\n key: `${year}-${pad2(month + 1)}-${pad2(day)}`,\n start: new Date(year, month, day),\n };\n}\n\nfunction groupByWeek(date: Date): TimelineGroupKey {\n // ISO weeks start on Monday; `getDay()` starts on Sunday.\n const offset = (date.getDay() + 6) % 7;\n const start = new Date(date.getFullYear(), date.getMonth(), date.getDate() - offset);\n return {\n key: `W${start.getFullYear()}-${pad2(start.getMonth() + 1)}-${pad2(start.getDate())}`,\n start,\n };\n}\n\nfunction groupByMonth(date: Date): TimelineGroupKey {\n const year = date.getFullYear();\n const month = date.getMonth();\n return { key: `${year}-${pad2(month + 1)}`, start: new Date(year, month, 1) };\n}\n\nfunction groupByNone(date: Date): TimelineGroupKey {\n return { key: 'all', start: date };\n}\n\nfunction resolveGrouper<T>(mode: TimelineGroupBy<T>): TimelineGroupingFn<T> {\n if (typeof mode === 'function') {\n return mode;\n }\n switch (mode) {\n case 'week':\n return groupByWeek;\n case 'month':\n return groupByMonth;\n case 'none':\n return groupByNone;\n default:\n return groupByDay;\n }\n}\n\nfunction toDate(value: Date | string | number): Date {\n return value instanceof Date ? value : new Date(value);\n}\n\nfunction sameItems<T>(previous: readonly T[], next: readonly T[]): boolean {\n return previous.length === next.length && previous.every((item, i) => item === next[i]);\n}\n\nfunction groupsEqual<T>(a: readonly TimelineGroup<T>[], b: readonly TimelineGroup<T>[]): boolean {\n return a.length === b.length && a.every((group, index) => group === b[index]);\n}\n\n/**\n * Derives grouped, sorted timeline bands from a flat item list.\n *\n * Pure derivation: bands come out of one `linkedSignal` over the `items`\n * accessor. Nothing is synced, nothing is written back, and the presenter\n * never mutates its input array. The previous bands are read through the\n * `computation` callback rather than a closure cache, so the result depends\n * on the inputs and the prior value alone - never on how many times it ran.\n *\n * Three properties make it usable as the organism's only data path:\n *\n * - **Defensive sort.** Consumer data does not have to arrive sorted. The\n * presenter sorts by the accessor date on every run using a stable sort,\n * so items sharing a timestamp keep their input order in both\n * directions.\n * - **Local-calendar bucketing.** `day` / `week` / `month` read local date\n * fields rather than dividing the epoch, which is what keeps 23-hour and\n * 25-hour DST days intact. Consumers who want UTC (or any other rule)\n * pass a {@link TimelineGroupingFn}.\n * - **Append-stability.** Groups whose items are *the same objects* hand\n * back the same band reference, and the signal carries a structural\n * `equal`. Reuse is deliberately keyed on reference identity rather than\n * on an id: a refetch returns new objects at the same ids, and reusing\n * there would pin the band to a stale payload. Appending therefore leaves\n * every other band's\n * `@for` block untouched instead of re-rendering the whole timeline.\n *\n * Reach for the DI token {@link CNGX_TIMELINE_GROUPING_FACTORY} rather\n * than this function directly when the caller is a component - that is\n * what makes the bucketing swappable per app or per component.\n *\n * ```ts\n * const grouping = createTimelineGrouping({\n * items: this.events,\n * dateAccessor: (event) => event.occurredAt,\n * groupBy: this.groupBy,\n * });\n * ```\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/grouping.ts\n * @since 0.1.0\n */\nexport function createTimelineGrouping<T>(\n options: TimelineGroupingOptions<T>,\n): TimelineGrouping<T> {\n const { items, dateAccessor, groupBy, direction } = options;\n\n // `linkedSignal` rather than `computed`: append-stability needs the\n // previous bands to hand their references back, and this is the sanctioned\n // way to read them. A closure cache mutated inside a `computed` would make\n // the computation impure - its output would depend on how many times it had\n // run, not only on its inputs.\n const groups = linkedSignal<readonly TimelineGroup<T>[], readonly TimelineGroup<T>[]>({\n source: () => {\n const source = items();\n const grouper = resolveGrouper(groupBy?.() ?? 'day');\n const sign = (direction?.() ?? 'desc') === 'asc' ? 1 : -1;\n\n const dated = source.map((item) => ({ item, date: toDate(dateAccessor(item)) }));\n dated.sort((a, b) => sign * (a.date.getTime() - b.date.getTime()));\n\n // Map preserves insertion order, so buckets come out already sorted.\n const buckets = new Map<string, Bucket<T>>();\n for (const entry of dated) {\n const { key, start } = grouper(entry.date, entry.item);\n const bucket = buckets.get(key);\n if (bucket) {\n bucket.items.push(entry.item);\n } else {\n buckets.set(key, { start, items: [entry.item] });\n }\n }\n\n return Array.from(buckets, ([key, bucket]) => ({\n key,\n start: bucket.start,\n items: bucket.items as readonly T[],\n }));\n },\n computation: (fresh, previous) => {\n const previousByKey = new Map((previous?.value ?? []).map((group) => [group.key, group]));\n return fresh.map((group) => {\n const prior = previousByKey.get(group.key);\n // Reference identity only. Matching ids are NOT enough: a refetch\n // returns fresh objects at the same ids with changed content, and\n // handing back the prior band there would render the old payload\n // forever. Reference equality is the only signal that says \"these\n // are literally the same items\", which is what reuse requires.\n const reusable =\n prior?.start.getTime() === group.start.getTime() &&\n sameItems(prior.items, group.items);\n return reusable ? prior : group;\n });\n },\n equal: groupsEqual,\n });\n\n return { groups };\n}\n\n/**\n * Signature of {@link createTimelineGrouping}, carried as a named type so\n * a DI override matches it exactly.\n *\n * @category common/timeline\n */\nexport type CngxTimelineGroupingFactory = <T>(\n options: TimelineGroupingOptions<T>,\n) => TimelineGrouping<T>;\n\n/**\n * Resolves the presenter `<cngx-timeline>` builds its bands with.\n * Defaults to {@link createTimelineGrouping}.\n *\n * Override app-wide via\n * `providers: [{ provide: CNGX_TIMELINE_GROUPING_FACTORY, useValue: myFactory }]`\n * to change bucketing everywhere (fiscal calendars, \"today / earlier\"\n * relative bands, server-supplied grouping), or per component via\n * `viewProviders` for a one-off. An override wraps rather than replaces\n * in most cases - call `createTimelineGrouping` inside your factory and\n * post-process its `groups`.\n *\n * Same shape as `CNGX_SELECTION_CONTROLLER_FACTORY`: the internals of a\n * component are swappable without forking the component.\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/grouping.ts\n * @relatedTo createTimelineGrouping\n * @since 0.1.0\n */\nexport const CNGX_TIMELINE_GROUPING_FACTORY = new InjectionToken<CngxTimelineGroupingFactory>(\n 'CngxTimelineGroupingFactory',\n {\n providedIn: 'root',\n factory: () => createTimelineGrouping,\n },\n);\n","import { ChangeDetectionStrategy, Component, input, ViewEncapsulation } from '@angular/core';\nimport { coerceBooleanProperty } from '@cngx/core/utils';\n\n/**\n * Process vocabulary shared by the timeline marker, the connector and\n * `CngxTimelineItem`.\n *\n * Deliberately narrow: it describes where an event sits in a history, not\n * what the user may do about it. A timeline that needed `disabled`,\n * `editable` or `current` would be a stepper, and steppers live in\n * `@cngx/common/stepper` with their own flow logic.\n *\n * @category common/timeline\n */\nexport type TimelineStatus = 'done' | 'active' | 'upcoming' | 'rejected';\n\n/**\n * The dot on the timeline rail - a status-coloured slot host for whatever\n * the consumer projects into it (nothing, a glyph, an icon, an avatar).\n *\n * Purely decorative and marked `aria-hidden`: the status it paints is\n * already carried semantically by the owning `CngxTimelineItem`, and\n * announcing it twice is worse than not announcing it here at all. That\n * also means colour is never this atom's only signal - the item's ARIA is.\n *\n * Usable standalone. It ships its own token SET rules, so a marker\n * dropped into a hand-rolled layout renders at the right size and tracks\n * `[data-density]` with no timeline organism above it.\n *\n * ### Bare dot\n * ```html\n * <cngx-timeline-marker status=\"done\" />\n * ```\n *\n * ### With a projected glyph\n * ```html\n * <cngx-timeline-marker status=\"rejected\">!</cngx-timeline-marker>\n * ```\n *\n * ### Pending\n * ```html\n * <cngx-timeline-marker status=\"active\" busy />\n * ```\n *\n * @category common/timeline\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/marker.component.ts\n * @relatedTo CngxTimelineConnector\n * @since 0.1.0\n */\n@Component({\n selector: 'cngx-timeline-marker',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'cngx-timeline-marker',\n 'aria-hidden': 'true',\n '[attr.data-status]': 'status()',\n '[class.cngx-timeline-marker--busy]': 'busy()',\n },\n template: `<ng-content />`,\n styleUrls: ['./timeline-tokens.css', './marker.component.css'],\n})\nexport class CngxTimelineMarker {\n /**\n * Where the event sits in the history. Drives the dot colour and, for\n * `upcoming`, its hollow fill. Left unset the marker paints in the\n * neutral rail colour.\n */\n readonly status = input<TimelineStatus | undefined>(undefined);\n\n /**\n * Whether the marker pulses to signal work in flight - typically bound\n * from an item's own `[state]` being `pending`.\n *\n * The pulse is a `box-shadow` animation rather than a `transform` or a\n * size change: the marker sits in a grid track the rail is aligned to,\n * so anything that altered its box would drag the rail with it every\n * frame. Suppressed under `prefers-reduced-motion`.\n */\n readonly busy = input(false, { transform: coerceBooleanProperty });\n}\n","import { ChangeDetectionStrategy, Component, input, ViewEncapsulation } from '@angular/core';\n\nimport type { TimelineStatus } from './marker.component';\n\n/**\n * Where a connector segment sits in its run, which decides which ends get\n * clipped back to the adjacent marker's centre.\n *\n * `'only'` renders nothing at all - a single-item timeline has no rail to\n * draw.\n *\n * @category common/timeline\n */\nexport type TimelineConnectorPosition = 'middle' | 'first' | 'last' | 'only';\n\n/**\n * The rail segment between two markers.\n *\n * Decorative and `aria-hidden`: it repeats a sequence the DOM order\n * already carries, so announcing it would only add noise. It is\n * status-capable all the same, because the *visual* run of a history is\n * where a rejected step or a not-yet-reached tail reads fastest - a\n * dashed segment for `upcoming` and a danger-toned one for `rejected`,\n * so the distinction survives without colour.\n *\n * Drawn with `border-inline-start` and clipped with block-direction\n * margins - logical properties throughout, so the rail lands on the\n * correct side under `dir=\"rtl\"` with no override.\n *\n * ### Between two items\n * ```html\n * <cngx-timeline-connector status=\"done\" />\n * ```\n *\n * ### Last item in the run\n * ```html\n * <cngx-timeline-connector position=\"last\" />\n * ```\n *\n * @category common/timeline\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/connector.component.ts\n * @relatedTo CngxTimelineMarker\n * @since 0.1.0\n */\n@Component({\n selector: 'cngx-timeline-connector',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'cngx-timeline-connector',\n 'aria-hidden': 'true',\n '[attr.data-status]': 'status()',\n '[attr.data-position]': 'position()',\n },\n template: '',\n styleUrls: ['./timeline-tokens.css', './connector.component.css'],\n})\nexport class CngxTimelineConnector {\n /**\n * Status of the segment. `upcoming` renders dashed, `rejected` in the\n * danger tone, `done` and `active` solid in their own tones. Left unset\n * the rail paints in the neutral border colour.\n */\n readonly status = input<TimelineStatus | undefined>(undefined);\n\n /**\n * Position in the run. `'first'` clips the head back to the marker\n * centre, `'last'` clips the tail, `'only'` hides the segment\n * entirely. Defaults to `'middle'` - a full-height segment.\n */\n readonly position = input<TimelineConnectorPosition>('middle');\n}\n","import { InjectionToken, type Signal, type TemplateRef } from '@angular/core';\n\nimport type { CngxTimelineMarkerContext } from './template-slots';\n\n/**\n * The contract a timeline exposes to the rows beneath it, so an app-wide\n * marker template can reach a dot the organism does not itself render.\n *\n * `<cngx-timeline>` is data-driven in v1: the consumer owns the whole row\n * template and writes `<cngx-timeline-item>` themselves, which means the\n * organism has no handle on the marker inside it. Passing the resolved\n * template through DI is what closes that gap without the row having to\n * thread it down by hand.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineMarkerHost {\n /** Resolved `*cngxTimelineMarkerTpl`, already through the config cascade. */\n readonly markerTpl: Signal<TemplateRef<CngxTimelineMarkerContext<unknown>> | null>;\n}\n\n/**\n * DI token for {@link CngxTimelineMarkerHost}. Provided by `<cngx-timeline>`;\n * injected optionally by `CngxTimelineItem`, which falls back to its own\n * `[cngxTimelineMarkerContent]` projection when no timeline is above it.\n *\n * A token rather than an injected parent class: the row must stay usable\n * standalone, and a concrete parent type would make the two mutually\n * dependent and block the decompose schematic.\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/marker-host.token.ts\n * @relatedTo CngxTimelineMarkerTpl, CngxTimelineItem\n * @since 0.1.0\n */\nexport const CNGX_TIMELINE_MARKER_HOST = new InjectionToken<CngxTimelineMarkerHost>(\n 'CngxTimelineMarkerHost',\n);\n","import {\n type EnvironmentProviders,\n inject,\n InjectionToken,\n makeEnvironmentProviders,\n Optional,\n type Provider,\n SkipSelf,\n type TemplateRef,\n} from '@angular/core';\n\nimport type { TimelineGroup } from './grouping';\nimport type { TimelineStatus } from './marker.component';\nimport type {\n CngxTimelineDateHeaderContext,\n CngxTimelineEmptyContext,\n CngxTimelineErrorContext,\n CngxTimelineItemContext,\n CngxTimelineMarkerContext,\n CngxTimelineRetryButtonContext,\n} from './template-slots';\n\n/**\n * Every user-visible string the timeline can render without a consumer\n * slot, plus the group-header formatter.\n *\n * Library defaults are English. Localise by passing\n * {@link withTimelineLabels} to {@link provideTimelineConfig} once at\n * bootstrap - the timeline itself hardcodes nothing, so a missing\n * translation shows up as English text rather than as a blank surface.\n *\n * Each of these is a *fallback*: the matching template slot\n * (`*cngxTimelineError`, `*cngxTimelineEmpty`, ...) wins whenever it is\n * present.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineLabels {\n /**\n * Accessible name for the timeline list itself, read when focus or a\n * screen-reader cursor enters the region. Default `'Timeline'`. A\n * per-instance `[aria-label]` / `[aria-labelledby]` wins.\n */\n readonly timelineRegion?: string;\n /**\n * Label on the built-in retry control rendered in the error surface.\n * Default `'Retry'`. Superseded by `*cngxTimelineRetryButton`.\n */\n readonly retry?: string;\n /**\n * Body text for the error surface when no `*cngxTimelineError` slot is\n * bound. Default `'Could not load the timeline.'`\n */\n readonly errorFallback?: string;\n /**\n * Body text for the empty surface when no `*cngxTimelineEmpty` slot is\n * bound. Default `'No events yet.'`\n */\n readonly emptyFallback?: string;\n /**\n * Accessible name for the loading body, so the skeleton is announced\n * as something other than silence. Default `'Loading timeline'`.\n */\n readonly loading?: string;\n /**\n * Text for the refreshing tail appended below the list while a\n * background reload is in flight. Default `'Updating…'`. Superseded by\n * `*cngxTimelineLoadingTail`.\n */\n readonly refreshing?: string;\n /**\n * Screen-reader text for a single item whose own `[state]` is pending.\n * Paired with `aria-busy` on that item. Default `'Updating'`.\n */\n readonly itemBusy?: string;\n /**\n * Inline error text for a single item whose own `[state]` failed, used\n * when the consumer renders no per-item error content. Default\n * `'Could not load this event.'`\n */\n readonly itemErrorFallback?: string;\n /**\n * Screen-reader wording for each process status. The marker paints the\n * status visually and the dot is `aria-hidden`, so this map is the only\n * channel that carries it to assistive tech - leaving a key blank\n * silences that status rather than merely restyling it.\n *\n * Defaults: `Completed` / `In progress` / `Upcoming` / `Rejected`.\n * Partial - {@link withTimelineLabels} merges it key by key, so\n * renaming one status leaves the other three at their defaults.\n */\n readonly status?: Readonly<Partial<Record<TimelineStatus, string>>>;\n /**\n * Formats a group's header when no `*cngxTimelineDateHeader` slot is\n * bound. Receives the whole group so a consumer can fold the item\n * count into the header. Defaults to the group's start date in the\n * browser locale - a date, unlike the strings above, has no sensible\n * English-only default.\n */\n readonly groupLabel?: (group: TimelineGroup<unknown>) => string;\n}\n\n/**\n * App-wide template defaults for the timeline's slot regions - the middle\n * tier of the family-standard 3-stage cascade\n * (per-instance directive > this field > built-in markup).\n *\n * Set them with {@link withTimelineTemplates}. Keys are typed against\n * `unknown` items because the config is app-wide while the slots are\n * generic; a `TemplateRef` for a concrete item type assigns in fine.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineTemplates {\n /** Default row template (`*cngxTimelineItem`). */\n readonly item?: TemplateRef<CngxTimelineItemContext<unknown>>;\n /** Default per-group date header (`*cngxTimelineDateHeader`). */\n readonly dateHeader?: TemplateRef<CngxTimelineDateHeaderContext<unknown>>;\n /** Default marker content (`*cngxTimelineMarkerTpl`). */\n readonly marker?: TemplateRef<CngxTimelineMarkerContext<unknown>>;\n /** Default empty surface (`*cngxTimelineEmpty`). */\n readonly empty?: TemplateRef<CngxTimelineEmptyContext>;\n /** Default error surface (`*cngxTimelineError`). */\n readonly error?: TemplateRef<CngxTimelineErrorContext>;\n /** Default retry control (`*cngxTimelineRetryButton`). */\n readonly retryButton?: TemplateRef<CngxTimelineRetryButtonContext>;\n /** Default refreshing tail (`*cngxTimelineLoadingTail`). */\n readonly loadingTail?: TemplateRef<void>;\n /** Default placeholder row for the first-load body (`*cngxTimelineSkeleton`). */\n readonly skeleton?: TemplateRef<void>;\n}\n\n/**\n * Timeline config surface. Resolution priority: \\\n * per-instance Input → `provideTimelineConfigAt` (viewProviders) →\n * `provideTimelineConfig` (root) → library default.\n *\n * Deliberately small: the timeline has no behavioural switches to\n * configure, so this carries text and templates only. Bucketing is\n * swapped through {@link CNGX_TIMELINE_GROUPING_FACTORY} instead, and\n * everything visual through the slot directives.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineConfig {\n readonly labels?: CngxTimelineLabels;\n readonly templates?: CngxTimelineTemplates;\n}\n\nconst TIMELINE_CONFIG_DEFAULTS: Required<CngxTimelineConfig> = {\n labels: {\n timelineRegion: 'Timeline',\n retry: 'Retry',\n errorFallback: 'Could not load the timeline.',\n emptyFallback: 'No events yet.',\n loading: 'Loading timeline',\n refreshing: 'Updating…',\n itemBusy: 'Updating',\n itemErrorFallback: 'Could not load this event.',\n status: {\n done: 'Completed',\n active: 'In progress',\n upcoming: 'Upcoming',\n rejected: 'Rejected',\n },\n groupLabel: (group) => group.start.toLocaleDateString(),\n },\n templates: {},\n};\n\n/**\n * DI token for the resolved timeline config. \\\n * `providedIn: 'root'` with the library defaults; override via\n * {@link provideTimelineConfig} (root) or {@link provideTimelineConfigAt}\n * (component scope).\n *\n * @category common/timeline\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/timeline-config.ts\n * @relatedTo provideTimelineConfig\n * @relatedTo withTimelineLabels\n * @since 0.1.0\n */\nexport const CNGX_TIMELINE_CONFIG = new InjectionToken<CngxTimelineConfig>('CngxTimelineConfig', {\n providedIn: 'root',\n factory: () => TIMELINE_CONFIG_DEFAULTS,\n});\n\n/**\n * Signature of every `with*` timeline config builder - a pure\n * config-to-config mutator, folded left over the library defaults.\n *\n * @category common/timeline\n */\nexport type CngxTimelineConfigFeature = (config: CngxTimelineConfig) => CngxTimelineConfig;\n\n/**\n * Merge label overrides into the cascade. Keys left out keep their\n * English library default, so a consumer translates what they need and\n * nothing more.\n *\n * ```ts\n * provideTimelineConfig(\n * withTimelineLabels({\n * retry: 'Erneut versuchen',\n * emptyFallback: 'Noch keine Ereignisse.',\n * groupLabel: (group) => group.start.toLocaleDateString('de-AT'),\n * }),\n * )\n * ```\n *\n * @category common/timeline\n */\nexport function withTimelineLabels(labels: CngxTimelineLabels): CngxTimelineConfigFeature {\n return (config) => ({\n ...config,\n labels: {\n ...config.labels,\n ...labels,\n // One level deeper than the rest: `status` is a map, and a shallow\n // spread would let a consumer who renames one status silently\n // silence the other three.\n status: { ...config.labels?.status, ...labels.status },\n },\n });\n}\n\n/**\n * Merge app-wide slot template defaults into the cascade. Keys left out\n * keep whatever an earlier feature set, and a per-instance slot directive\n * still wins over anything set here.\n *\n * One bag rather than a `with*Template` builder per slot, matching how the\n * select family carries its own slot defaults - the timeline has eight\n * slots and near-identical builders would only add surface.\n *\n * ```ts\n * readonly emptyTpl = viewChild.required<TemplateRef<CngxTimelineEmptyContext>>('emptyTpl', {\n * read: TemplateRef,\n * });\n *\n * providers: [provideTimelineConfig(withTimelineTemplates({ empty: this.emptyTpl() }))]\n * ```\n *\n * @category common/timeline\n */\nexport function withTimelineTemplates(\n templates: CngxTimelineTemplates,\n): CngxTimelineConfigFeature {\n return (config) => ({ ...config, templates: { ...config.templates, ...templates } });\n}\n\nfunction applyFeatures(\n base: CngxTimelineConfig,\n features: readonly CngxTimelineConfigFeature[],\n): CngxTimelineConfig {\n return features.reduce<CngxTimelineConfig>((config, feature) => feature(config), base);\n}\n\n/**\n * Root-level provider. Apply once in `bootstrapApplication` /\n * `appConfig.providers`.\n *\n * @category common/timeline\n */\nexport function provideTimelineConfig(\n ...features: readonly CngxTimelineConfigFeature[]\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: CNGX_TIMELINE_CONFIG,\n useValue: applyFeatures(TIMELINE_CONFIG_DEFAULTS, features),\n },\n ]);\n}\n\n/**\n * Component-scoped override. Returns `Provider[]` rather than\n * {@link EnvironmentProviders} because `viewProviders` rejects opaque\n * environment providers.\n *\n * Features merge onto the parent config - an enclosing scope, or the root\n * provider, or the library defaults when neither is present - so a region\n * can re-phrase one label without resetting every other one the app set.\n *\n * ```ts\n * @Component({\n * viewProviders: [...provideTimelineConfigAt(withTimelineLabels({ retry: 'Again' }))],\n * })\n * ```\n *\n * @category common/timeline\n */\nexport function provideTimelineConfigAt(\n ...features: readonly CngxTimelineConfigFeature[]\n): Provider[] {\n return [\n {\n provide: CNGX_TIMELINE_CONFIG,\n useFactory: (parent: CngxTimelineConfig | null) =>\n applyFeatures(parent ?? TIMELINE_CONFIG_DEFAULTS, features),\n deps: [[new SkipSelf(), new Optional(), CNGX_TIMELINE_CONFIG]],\n },\n ];\n}\n\n/**\n * Read the resolved timeline config. Runs in an injection context.\n *\n * @category common/timeline\n */\nexport function injectTimelineConfig(): CngxTimelineConfig {\n return inject(CNGX_TIMELINE_CONFIG);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n Directive,\n ElementRef,\n inject,\n input,\n isDevMode,\n ViewEncapsulation,\n} from '@angular/core';\nimport { type CngxAsyncState } from '@cngx/core/utils';\n\nimport { CngxTimelineConnector, type TimelineConnectorPosition } from './connector.component';\nimport { CNGX_TIMELINE_MARKER_HOST } from './marker-host.token';\nimport { CngxTimelineMarker, type TimelineStatus } from './marker.component';\nimport { injectTimelineConfig } from './timeline-config';\n\n/**\n * Marks the element that holds an item's timestamp, so the item can place\n * it in the raster the active mode calls for - above the body in\n * `narrative`, trailing it in `activity`.\n *\n * Pair it with `<cngx-time>` from `@cngx/common/display` for relative\n * formatting; the timeline neither formats nor ticks.\n *\n * @category common/timeline\n */\n@Directive({\n selector: '[cngxTimelineTime]',\n standalone: true,\n host: { class: 'cngx-timeline-item__time' },\n})\nexport class CngxTimelineTime {}\n\n/**\n * Marks content that belongs on the far side of the rail from the row's\n * body - the year label opposite a card, the timestamp across a centred\n * rail.\n *\n * Per-row content, so it is a projection slot rather than a timeline-wide\n * template: the row template already owns it, and the config cascade is\n * for surfaces the whole timeline shares.\n *\n * The extra grid track only exists for rows that actually project into it\n * (`:has(> [cngxTimelineOpposite])`), so markup that predates this slot\n * keeps its raster to the pixel. Placement follows the row: opposite content\n * sits across the rail from the body under `start`, `end` and `alternate`\n * alike.\n *\n * ```html\n * <cngx-timeline-item status=\"done\">\n * <span cngxTimelineOpposite>2019</span>\n * <p>Founded</p>\n * </cngx-timeline-item>\n * ```\n *\n * **Keep the content non-interactive.** The slot projects ahead of the body,\n * so it is read first in every layout. For a year or a short label that is\n * the right reading order whichever side the rail is on. A link or a button\n * would take focus before the row it belongs to, and no placement of the\n * grid can fix that, because the paint follows `[data-row-side]` while the\n * DOM order does not.\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/timeline-item.component.ts\n * @relatedTo CngxTimelineItem, CngxTimelineTime\n * @since 0.1.0\n */\n@Directive({\n selector: '[cngxTimelineOpposite]',\n standalone: true,\n host: { class: 'cngx-timeline-item__opposite' },\n})\nexport class CngxTimelineOpposite {}\n\n/**\n * Marks content to render inside this row's marker dot - a glyph, an icon,\n * an avatar.\n *\n * The per-row counterpart to the timeline-wide `*cngxTimelineMarkerTpl`, and\n * the only route when the row stands on its own. It also *wins* over that\n * template when both are present: most-local-wins, the same direction as\n * every other slot in the family, so one row can carry a different glyph\n * without the timeline's default being torn out for the rest.\n *\n * Whatever renders here is inside an `aria-hidden` element - decoration only.\n *\n * @category common/timeline\n */\n@Directive({\n selector: '[cngxTimelineMarkerContent]',\n standalone: true,\n})\nexport class CngxTimelineMarkerContent {}\n\n/**\n * Marks the element that holds an item's body. Optional - anything\n * projected without a slot directive lands in the body too. Reach for it\n * when the item also projects a timestamp and the source order would\n * otherwise be ambiguous.\n *\n * @category common/timeline\n */\n@Directive({\n selector: '[cngxTimelineContent]',\n standalone: true,\n host: { class: 'cngx-timeline-item__content' },\n})\nexport class CngxTimelineContent {}\n\n/**\n * @internal Enough of the tabbable surface to catch the mistake this warns\n * about. Not a general focus-order utility - `[tabindex]` matches a negative\n * value too, which is deliberately over-eager for a dev-only check.\n */\nconst FOCUSABLE =\n 'a[href], button, input, select, textarea, summary, [tabindex], [contenteditable]';\n\n/**\n * One event on the timeline: a marker, the rail segment below it, an\n * optional timestamp, and the projected body.\n *\n * A terminal composable unit, not a fragment of the organism. It ships\n * its own token SET rules and defaults to the `narrative` raster, so\n * dropping one into a hand-rolled layout renders a complete, density-\n * correct item with no `<cngx-timeline>` above it. Inside the organism it\n * inherits `[data-mode]` and re-rasters itself.\n *\n * **Two independent state channels.** `status` is where the event sits in\n * a history (`done` / `active` / `upcoming` / `rejected`) - editorial, set\n * by the consumer. `state` is whether *this row's own* data is currently\n * loading or failed. They compose: a `done` item whose `state` errored\n * paints as rejected and announces the failure, without losing the\n * editorial status once the retry succeeds.\n *\n * **What it announces.** The marker and rail are `aria-hidden`, so colour is\n * never the only channel - the status reaches assistive tech through a\n * screen-reader-only line fed from `CNGX_TIMELINE_CONFIG.labels.status`, and\n * a failed row through a visible inline error. Both are read as the row's own\n * content, in DOM order, rather than through `aria-describedby`: the host is\n * a plain element with no role, so a description pointed at its own\n * descendants would resolve nowhere and duplicate the text for anyone\n * browsing it. Neither element is rendered while it has nothing to say.\n *\n * ### Standalone\n * ```html\n * <cngx-timeline-item status=\"done\">\n * <cngx-time cngxTimelineTime [date]=\"event.at\" />\n * <p>Deployment finished</p>\n * </cngx-timeline-item>\n * ```\n *\n * ### With its own async state\n * ```html\n * <cngx-timeline-item [state]=\"rowState\" position=\"last\">\n * <p>{{ rowState.data()?.summary }}</p>\n * </cngx-timeline-item>\n * ```\n *\n * @category common/timeline\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/timeline-item.component.ts\n * @relatedTo CngxTimelineMarker, CngxTimelineConnector, CNGX_TIMELINE_CONFIG\n * <example-url>http://localhost:4200/#/ui/timeline/basics/standalone-atoms</example-url>\n * <example-url>http://localhost:4200/#/ui/timeline/basics/custom-date-header-and-marker</example-url>\n * <example-url>http://localhost:4200/#/ui/timeline/basics/marker-precedence</example-url>\n * <example-url>http://localhost:4200/#/ui/timeline/layout/media-markers</example-url>\n * <example-url>http://localhost:4200/#/ui/timeline/layout/placement-end</example-url>\n * @since 0.1.0\n */\n@Component({\n selector: 'cngx-timeline-item',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxTimelineMarker, CngxTimelineConnector, NgTemplateOutlet],\n host: {\n class: 'cngx-timeline-item',\n '[attr.data-status]': 'status()',\n '[attr.data-failed]': 'failed() ? \"\" : null',\n '[attr.aria-busy]': 'ariaBusy()',\n },\n template: `\n <cngx-timeline-marker [status]=\"markerStatus()\" [busy]=\"busy()\">\n @if (markerTpl(); as tpl) {\n <ng-container\n *ngTemplateOutlet=\"tpl; context: { $implicit: item(), status: markerStatus() }\"\n />\n } @else {\n <ng-content select=\"[cngxTimelineMarkerContent]\" />\n }\n </cngx-timeline-marker>\n <cngx-timeline-connector [status]=\"markerStatus()\" [position]=\"position()\" />\n <ng-content select=\"[cngxTimelineOpposite]\" />\n <ng-content select=\"[cngxTimelineTime]\" />\n <div class=\"cngx-timeline-item__body\">\n <ng-content select=\"[cngxTimelineContent]\" />\n <ng-content />\n @if (errorText(); as text) {\n <p class=\"cngx-timeline-item__error\">{{ text }}</p>\n }\n </div>\n @if (statusText(); as text) {\n <span class=\"cngx-timeline-item__sr\">{{ text }}</span>\n }\n `,\n styleUrls: ['./timeline-tokens.css', './timeline-item.component.css'],\n})\nexport class CngxTimelineItem {\n private readonly config = injectTimelineConfig();\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Where the event sits in the history. Drives the marker and rail\n * colours and the screen-reader status line. Purely editorial - it\n * carries no flow logic, because a timeline is a record and a guided\n * process is a stepper.\n */\n readonly status = input<TimelineStatus | undefined>(undefined);\n\n /**\n * This row's own async state, for a body that loads, mutates or fails\n * independently of the list around it.\n *\n * Optional by construction and tolerant of a bare `state` attribute\n * (the empty string coerces to `undefined`), so the item never forces a\n * binding a consumer may not have.\n */\n readonly state = input<\n CngxAsyncState<unknown> | undefined,\n CngxAsyncState<unknown> | '' | undefined\n >(undefined, { transform: (value) => (typeof value === 'string' ? undefined : value) });\n\n /**\n * Position in the run, forwarded to the rail. `'last'` and `'only'`\n * stop the rail at this item so the timeline does not trail off into\n * empty space. The organism sets it; standalone items default to\n * `'middle'`.\n */\n readonly position = input<TimelineConnectorPosition>('middle');\n\n /**\n * The event this row stands for. Only ever read as the `$implicit` of an\n * app-wide `*cngxTimelineMarkerTpl`, so bind it when the app sets one and\n * that template needs the payload; leave it off otherwise.\n */\n readonly item = input<unknown>(undefined);\n\n /**\n * @internal The timeline-wide marker template, when a `<cngx-timeline>` is\n * above this row. Absent standalone.\n */\n private readonly hostMarkerTpl =\n inject(CNGX_TIMELINE_MARKER_HOST, { optional: true })?.markerTpl ?? (() => null);\n\n /** @internal Set when this row projects its own marker content. */\n private readonly ownMarker = contentChild(CngxTimelineMarkerContent);\n\n /**\n * @internal The timeline-wide template is the *default*, so a row that\n * projects its own marker content overrides it - most-local-wins, the\n * same direction as every other slot in the family. Resolving to `null`\n * rather than branching on `<ng-content>` keeps the projection static:\n * content lands in the DOM once and renders whatever it was given.\n */\n protected readonly markerTpl = computed(() => (this.ownMarker() ? null : this.hostMarkerTpl()));\n\n /** @internal Work in flight on this row's own state. */\n protected readonly busy = computed(() => {\n const status = this.state()?.status();\n return status === 'loading' || status === 'pending';\n });\n\n /** @internal This row's own state failed. */\n protected readonly failed = computed(() => this.state()?.status() === 'error');\n\n /** @internal `aria-busy` reflects the row's own work, not the list's. */\n protected readonly ariaBusy = computed(() => (this.busy() ? 'true' : null));\n\n /**\n * @internal A failed row paints as rejected regardless of its editorial\n * status - a failure is the more urgent fact, and `status` is left\n * untouched so the row returns to its own colour once a retry lands.\n */\n protected readonly markerStatus = computed<TimelineStatus | undefined>(() =>\n this.failed() ? 'rejected' : this.status(),\n );\n\n /**\n * @internal Busy outranks everything: a row still loading has nothing\n * settled to report. Otherwise this reads `markerStatus`, not `status`,\n * so the announcement can never contradict the paint - a failed row\n * announces the `rejected` it shows, not the editorial status it kept.\n */\n protected readonly statusText = computed(() => {\n const labels = this.config.labels;\n if (this.busy()) {\n return labels?.itemBusy ?? '';\n }\n const status = this.markerStatus();\n return status ? (labels?.status?.[status] ?? '') : '';\n });\n\n /** @internal Visible inline error, blank unless this row failed. */\n protected readonly errorText = computed(() =>\n this.failed() ? (this.config.labels?.itemErrorFallback ?? '') : '',\n );\n\n constructor() {\n if (isDevMode()) {\n // afterNextRender, not an effect: this is a one-shot authoring check\n // on projected content, and the reactive graph has no business\n // carrying it. Runs once per row, after its content exists.\n afterNextRender(() => {\n const opposite = this.host.nativeElement.querySelector(':scope > [cngxTimelineOpposite]');\n if (opposite?.querySelector(FOCUSABLE)) {\n console.warn(\n '[cngx-timeline-item] focusable content inside [cngxTimelineOpposite]. ' +\n 'The slot projects ahead of the row body, so under placement=\"end\" or ' +\n '\"alternate\" it takes focus before the row it belongs to while painting ' +\n 'on the far side of the rail. Keep opposite content non-interactive and ' +\n 'put controls in the body.',\n this.host.nativeElement,\n );\n }\n });\n }\n }\n}\n","import { Directive, inject, input, TemplateRef } from '@angular/core';\nimport type { EmptyReason } from '@cngx/common/card';\n\nimport type { TimelineGroup } from './grouping';\nimport type { TimelineStatus } from './marker.component';\n\n/**\n * Context for `*cngxTimelineItem` - the item itself plus where it sits.\n *\n * `first` and `last` are positions **within the group**, not within the\n * whole timeline, because that is what a consumer needs to decide whether\n * to draw a trailing rail.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineItemContext<T> {\n readonly $implicit: T;\n /** Index within the group. */\n readonly index: number;\n /** First item of its group. */\n readonly first: boolean;\n /** Last item of its group. */\n readonly last: boolean;\n /** The group this item was bucketed into. */\n readonly group: TimelineGroup<T>;\n}\n\n/**\n * The row template. The one slot with no built-in fallback: only the\n * consumer knows what an event of theirs looks like.\n *\n * Bind the same array the timeline gets and the `let-` variables come out\n * typed - `[cngxTimelineItem]` exists to pin `T`, nothing more:\n *\n * ```html\n * <cngx-timeline [items]=\"events()\" [dateAccessor]=\"at\">\n * <ng-template [cngxTimelineItem]=\"events()\" let-event let-last=\"last\">\n * <cngx-timeline-item [position]=\"last ? 'last' : 'middle'\">\n * <cngx-time cngxTimelineTime [date]=\"event.at\" />\n * <p>{{ event.summary }}</p>\n * </cngx-timeline-item>\n * </ng-template>\n * </cngx-timeline>\n * ```\n *\n * Named `CngxTimelineItemTpl` so it does not collide with the\n * `CngxTimelineItem` component; the selector stays `cngxTimelineItem`,\n * which is what consumers write.\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineItem, CngxTimelineDateHeader\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineItem]',\n standalone: true,\n exportAs: 'cngxTimelineItem',\n})\nexport class CngxTimelineItemTpl<T = unknown> {\n /**\n * Type carrier, never read at runtime. Angular cannot infer a structural\n * directive's context generic from a sibling input on the host component,\n * so `T` has to be pinned on the directive itself; binding the same array\n * the timeline renders does that, and `ngTemplateContextGuard` below then\n * types every `let-` variable. This is `NgForOf`'s `ngForOf` mechanism,\n * not a cngx invention.\n *\n * Optional, and tolerant of the bare `cngxTimelineItem` attribute every\n * v1 consumer writes: an unbound attribute binds the empty string, which\n * `strictTemplates` would otherwise reject against an array type. The\n * empty string coerces to `undefined` and `T` falls back to `unknown` -\n * the Bridge-Input shape the library uses wherever an attribute doubles\n * as an opt-in.\n *\n * Nothing enforces that the array bound here is the array bound to\n * `[items]`; a mismatch only mistypes the `let-` variables, which the\n * template type-checker then rejects at the use site.\n */\n readonly cngxTimelineItem = input<readonly T[] | undefined, readonly T[] | '' | undefined>(\n undefined,\n { transform: (value) => (typeof value === 'string' ? undefined : value) },\n );\n\n readonly templateRef = inject<TemplateRef<CngxTimelineItemContext<T>>>(TemplateRef);\n\n static ngTemplateContextGuard<T>(\n _dir: CngxTimelineItemTpl<T>,\n ctx: unknown,\n ): ctx is CngxTimelineItemContext<T> {\n return true;\n }\n}\n\n/**\n * Context for `*cngxTimelineDateHeader` - the whole group, so a header can\n * show its item count alongside the date.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineDateHeaderContext<T> {\n readonly $implicit: TimelineGroup<T>;\n}\n\n/**\n * The per-group header. Falls back to\n * `CNGX_TIMELINE_CONFIG.labels.groupLabel`, which formats the group's\n * start date in the browser locale.\n *\n * The element this renders into is what the group's `aria-labelledby`\n * points at, so a header that renders nothing leaves the group unnamed.\n *\n * ```html\n * <ng-template [cngxTimelineDateHeader]=\"events()\" let-group>\n * <h3>{{ format(group.start) }} ({{ group.items.length }})</h3>\n * </ng-template>\n * ```\n *\n * @category common/timeline\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineItemTpl\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineDateHeader]',\n standalone: true,\n exportAs: 'cngxTimelineDateHeader',\n})\nexport class CngxTimelineDateHeader<T = unknown> {\n /**\n * Type carrier for the group's item type, never read at runtime. Bind the\n * same array the timeline gets and `let-group` types as\n * `TimelineGroup<T>`. See {@link CngxTimelineItemTpl.cngxTimelineItem}.\n */\n readonly cngxTimelineDateHeader = input<readonly T[] | undefined, readonly T[] | '' | undefined>(\n undefined,\n { transform: (value) => (typeof value === 'string' ? undefined : value) },\n );\n\n readonly templateRef = inject<TemplateRef<CngxTimelineDateHeaderContext<T>>>(TemplateRef);\n\n static ngTemplateContextGuard<T>(\n _dir: CngxTimelineDateHeader<T>,\n ctx: unknown,\n ): ctx is CngxTimelineDateHeaderContext<T> {\n return true;\n }\n}\n\n/**\n * Context for `*cngxTimelineMarkerTpl` - the item and the status the\n * organism resolved for it.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineMarkerContext<T> {\n readonly $implicit: T;\n readonly status: TimelineStatus | undefined;\n}\n\n/**\n * What goes inside the marker dot - an icon, an avatar, a type glyph.\n * Falls back to a bare coloured dot.\n *\n * Applies to every row. A single row overrides it by projecting its own\n * `[cngxTimelineMarkerContent]`, which wins over this template.\n *\n * Whatever renders here is inside an `aria-hidden` element, so it must\n * not be the only carrier of anything: the status reaches assistive tech\n * through `CNGX_TIMELINE_CONFIG.labels.status`.\n *\n * Keeps `Tpl` in class *and* selector to stay clear of\n * `CngxTimelineMarker`, the component it renders into.\n *\n * @category common/timeline\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineMarker\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineMarkerTpl]',\n standalone: true,\n exportAs: 'cngxTimelineMarkerTpl',\n})\nexport class CngxTimelineMarkerTpl<T = unknown> {\n /**\n * Type carrier for the item type, never read at runtime. Bind the same\n * array the timeline gets and `let-event` types as `T`. See\n * {@link CngxTimelineItemTpl.cngxTimelineItem}.\n */\n readonly cngxTimelineMarkerTpl = input<readonly T[] | undefined, readonly T[] | '' | undefined>(\n undefined,\n { transform: (value) => (typeof value === 'string' ? undefined : value) },\n );\n\n readonly templateRef = inject<TemplateRef<CngxTimelineMarkerContext<T>>>(TemplateRef);\n\n static ngTemplateContextGuard<T>(\n _dir: CngxTimelineMarkerTpl<T>,\n ctx: unknown,\n ): ctx is CngxTimelineMarkerContext<T> {\n return true;\n }\n}\n\n/**\n * Context for `*cngxTimelineEmpty` - why the timeline is empty.\n *\n * The distinction is the point: \"nothing has happened yet\" and \"your\n * filter matched nothing\" call for different copy and different actions.\n * Vocabulary shared with `CngxCardGrid` so an app writes one empty-state\n * component and reuses it.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineEmptyContext {\n readonly $implicit: EmptyReason;\n}\n\n/**\n * The empty surface. Falls back to\n * `CNGX_TIMELINE_CONFIG.labels.emptyFallback`.\n *\n * ```html\n * <ng-template cngxTimelineEmpty let-reason>\n * @if (reason === 'no-results') { <p>No events match this filter.</p> }\n * @else { <p>Nothing has happened yet.</p> }\n * </ng-template>\n * ```\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineError\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineEmpty]',\n standalone: true,\n exportAs: 'cngxTimelineEmpty',\n})\nexport class CngxTimelineEmpty {\n readonly templateRef = inject<TemplateRef<CngxTimelineEmptyContext>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _dir: CngxTimelineEmpty,\n ctx: unknown,\n ): ctx is CngxTimelineEmptyContext {\n return true;\n }\n}\n\n/**\n * Context for `*cngxTimelineError` - the raw error plus the retry the\n * organism owns.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineErrorContext {\n readonly $implicit: unknown;\n /** Re-drives the consumer's source; emits the organism's `retry` output. */\n readonly retry: () => void;\n}\n\n/**\n * The whole error surface, replacing message and retry control together.\n * Reach for `*cngxTimelineRetryButton` instead when only the button needs\n * restyling. Falls back to\n * `CNGX_TIMELINE_CONFIG.labels.errorFallback` plus a plain retry button.\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineRetryButton, CngxTimelineEmpty\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineError]',\n standalone: true,\n exportAs: 'cngxTimelineError',\n})\nexport class CngxTimelineError {\n readonly templateRef = inject<TemplateRef<CngxTimelineErrorContext>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _dir: CngxTimelineError,\n ctx: unknown,\n ): ctx is CngxTimelineErrorContext {\n return true;\n }\n}\n\n/**\n * Context for `*cngxTimelineRetryButton` - the retry callback.\n *\n * @category common/timeline\n */\nexport interface CngxTimelineRetryButtonContext {\n readonly $implicit: () => void;\n}\n\n/**\n * Just the retry control inside the default error surface, for apps that\n * want their own button component without rewriting the error copy.\n *\n * Whatever renders here has to be operable: the library ships no button\n * component, so a consumer template is responsible for its own `type`,\n * accessible name and click wiring.\n *\n * ```html\n * <ng-template cngxTimelineRetryButton let-retry>\n * <button type=\"button\" (click)=\"retry()\">Try again</button>\n * </ng-template>\n * ```\n *\n * @category common/timeline\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineError\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineRetryButton]',\n standalone: true,\n exportAs: 'cngxTimelineRetryButton',\n})\nexport class CngxTimelineRetryButton {\n readonly templateRef = inject<TemplateRef<CngxTimelineRetryButtonContext>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _dir: CngxTimelineRetryButton,\n ctx: unknown,\n ): ctx is CngxTimelineRetryButtonContext {\n return true;\n }\n}\n\n/**\n * The tail appended below the list while a background refresh runs, with\n * the already-loaded items still on screen. Falls back to\n * `CNGX_TIMELINE_CONFIG.labels.refreshing`.\n *\n * Contextless on purpose - a refresh has nothing to say beyond the fact\n * that it is happening.\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineError\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineLoadingTail]',\n standalone: true,\n exportAs: 'cngxTimelineLoadingTail',\n})\nexport class CngxTimelineLoadingTail {\n readonly templateRef = inject<TemplateRef<void>>(TemplateRef);\n}\n\n/**\n * One placeholder row in the first-load body, replacing the built-in\n * marker-rail-and-two-bars shape. Rendered `[skeletonRowCount]` times.\n *\n * Contextless, and deliberately so: a placeholder stands in for a row whose\n * data has not arrived, so there is nothing to hand it. Bind this when the\n * real rows are taller or busier than the default shape and the swap to\n * content would otherwise reflow the page.\n *\n * Whatever renders here sits inside an `aria-hidden` wrapper - the load is\n * announced through the timeline's live region, not through the placeholder.\n *\n * @category common/timeline\n * @github https://github.com/cngxjs/cngx/blob/main/projects/common/timeline/template-slots.ts\n * @relatedTo CngxTimelineLoadingTail\n * @since 0.1.0\n */\n@Directive({\n selector: 'ng-template[cngxTimelineSkeleton]',\n standalone: true,\n exportAs: 'cngxTimelineSkeleton',\n})\nexport class CngxTimelineSkeleton {\n readonly templateRef = inject<TemplateRef<void>>(TemplateRef);\n}\n","/**\n * @module @cngx/common/timeline\n */\nexport {\n CNGX_TIMELINE_GROUPING_FACTORY,\n createTimelineGrouping,\n type CngxTimelineGroupingFactory,\n type TimelineDateAccessor,\n type TimelineDirection,\n type TimelineGroup,\n type TimelineGroupBy,\n type TimelineGroupingFn,\n type TimelineGroupingOptions,\n type TimelineGroupKey,\n type TimelineGrouping,\n} from './grouping';\nexport { CngxTimelineMarker, type TimelineStatus } from './marker.component';\nexport {\n CngxTimelineConnector,\n type TimelineConnectorPosition,\n} from './connector.component';\nexport {\n CngxTimelineContent,\n CngxTimelineItem,\n CngxTimelineMarkerContent,\n CngxTimelineOpposite,\n CngxTimelineTime,\n} from './timeline-item.component';\nexport {\n CNGX_TIMELINE_MARKER_HOST,\n type CngxTimelineMarkerHost,\n} from './marker-host.token';\nexport {\n CngxTimelineDateHeader,\n CngxTimelineEmpty,\n CngxTimelineError,\n CngxTimelineItemTpl,\n CngxTimelineLoadingTail,\n CngxTimelineMarkerTpl,\n CngxTimelineRetryButton,\n CngxTimelineSkeleton,\n type CngxTimelineDateHeaderContext,\n type CngxTimelineEmptyContext,\n type CngxTimelineErrorContext,\n type CngxTimelineItemContext,\n type CngxTimelineMarkerContext,\n type CngxTimelineRetryButtonContext,\n} from './template-slots';\nexport {\n CNGX_TIMELINE_CONFIG,\n injectTimelineConfig,\n provideTimelineConfig,\n provideTimelineConfigAt,\n withTimelineLabels,\n withTimelineTemplates,\n type CngxTimelineConfig,\n type CngxTimelineConfigFeature,\n type CngxTimelineLabels,\n type CngxTimelineTemplates,\n} from './timeline-config';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAwHA,SAAS,IAAI,CAAC,KAAa,EAAA;AACzB,IAAA,OAAO,KAAK,GAAG,EAAE,GAAG,CAAA,CAAA,EAAI,KAAK,CAAA,CAAE,GAAG,CAAA,EAAG,KAAK,EAAE;AAC9C;AAEA,SAAS,UAAU,CAAC,IAAU,EAAA;AAC5B,IAAA,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE;AAC/B,IAAA,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE;AAC7B,IAAA,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE;IAC1B,OAAO;AACL,QAAA,GAAG,EAAE,CAAA,EAAG,IAAI,CAAA,CAAA,EAA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;;AC5XD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/fesm2022/cngx-common.mjs
CHANGED
|
@@ -7,8 +7,8 @@ export * from '@cngx/common/dialog';
|
|
|
7
7
|
export * from '@cngx/common/popover';
|
|
8
8
|
import { makeVersion } from '@cngx/utils';
|
|
9
9
|
|
|
10
|
-
/** @internal
|
|
11
|
-
const VERSION = makeVersion('0.1.0-rc.
|
|
10
|
+
/** @internal - replaced at publish time, not part of consumer API. */
|
|
11
|
+
const VERSION = makeVersion('0.1.0-rc.7');
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Public API Surface of @cngx/common
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cngx-common.mjs","sources":["../../../projects/common/version.ts","../../../projects/common/public-api.ts","../../../projects/common/cngx-common.ts"],"sourcesContent":["import { makeVersion } from '@cngx/utils';\n\n/** @internal
|
|
1
|
+
{"version":3,"file":"cngx-common.mjs","sources":["../../../projects/common/version.ts","../../../projects/common/public-api.ts","../../../projects/common/cngx-common.ts"],"sourcesContent":["import { makeVersion } from '@cngx/utils';\n\n/** @internal - replaced at publish time, not part of consumer API. */\nexport const VERSION = makeVersion('0.0.0-PLACEHOLDER');\n","/**\n * Public API Surface of @cngx/common\n *\n * Re-exports all secondary entry points for backwards compatibility.\n * Prefer importing from specific entry points:\n * @cngx/common/a11y\n * @cngx/common/display\n * @cngx/common/interactive\n * @cngx/common/layout\n * @cngx/common/data\n * @cngx/common/dialog\n * @cngx/common/popover\n *\n * @module @cngx/common\n */\n\nexport * from '@cngx/common/a11y';\nexport * from '@cngx/common/display';\nexport * from '@cngx/common/interactive';\nexport * from '@cngx/common/layout';\nexport * from '@cngx/common/data';\nexport * from '@cngx/common/dialog';\nexport * from '@cngx/common/popover';\n\nexport { VERSION } from './version';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAEA;MACa,OAAO,GAAG,WAAW,CAAC,mBAAmB;;ACHtD;;;;;;;;;;;;;;AAcG;;ACdH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cngx/common",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.7",
|
|
4
4
|
"description": "Atoms and molecules (a11y, interactive, layout, dialog, popover, display) for the CNGX Angular component library.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cngx",
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"directory": "projects/common"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
+
"@cngx/utils": "0.1.0-rc.7",
|
|
27
|
+
"@cngx/core": "0.1.0-rc.7",
|
|
26
28
|
"@angular/cdk": "^21.2.0",
|
|
27
29
|
"@angular/common": "^21.2.0",
|
|
28
30
|
"@angular/core": "^21.2.0",
|
|
@@ -67,6 +69,10 @@
|
|
|
67
69
|
"types": "./types/cngx-common-chart.d.ts",
|
|
68
70
|
"default": "./fesm2022/cngx-common-chart.mjs"
|
|
69
71
|
},
|
|
72
|
+
"./command": {
|
|
73
|
+
"types": "./types/cngx-common-command.d.ts",
|
|
74
|
+
"default": "./fesm2022/cngx-common-command.mjs"
|
|
75
|
+
},
|
|
70
76
|
"./data": {
|
|
71
77
|
"types": "./types/cngx-common-data.d.ts",
|
|
72
78
|
"default": "./fesm2022/cngx-common-data.mjs"
|
|
@@ -98,6 +104,10 @@
|
|
|
98
104
|
"./tabs": {
|
|
99
105
|
"types": "./types/cngx-common-tabs.d.ts",
|
|
100
106
|
"default": "./fesm2022/cngx-common-tabs.mjs"
|
|
107
|
+
},
|
|
108
|
+
"./timeline": {
|
|
109
|
+
"types": "./types/cngx-common-timeline.d.ts",
|
|
110
|
+
"default": "./fesm2022/cngx-common-timeline.mjs"
|
|
101
111
|
}
|
|
102
112
|
},
|
|
103
113
|
"module": "fesm2022/cngx-common.mjs",
|
package/stepper/README.md
CHANGED
|
@@ -15,7 +15,7 @@ The presenter is a pure-derivation host directive - every visible piece of state
|
|
|
15
15
|
| Export | Selector | Description |
|
|
16
16
|
|-|-|-|
|
|
17
17
|
| `CngxStepperPresenter` | `[cngxStepper]` | The brain. Owns active step, linear, orientation, commit lifecycle. Composed via `hostDirectives` by `<cngx-stepper>` and `<cngx-mat-stepper>` - never instantiated directly by consumers. |
|
|
18
|
-
| `CngxStep` | `[cngxStep]` | Step atom - registers itself with the enclosing presenter (or `CngxStepGroup`)
|
|
18
|
+
| `CngxStep` | `[cngxStep]` | Step atom - registers itself with the enclosing presenter (or `CngxStepGroup`) on init (so a bound `[id]` is honored), unregisters on destroy. Carries `id`, `label`, `disabled`, `state`, optional `errorAggregator`. |
|
|
19
19
|
| `CngxStepGroup` | `[cngxStepGroup]` | Group atom - nests child `cngxStep`s under a labelled cluster. Aggregates child status (`success` / `error` / `pending`) for the strip's group-header rendering. |
|
|
20
20
|
| `CngxStepLabel` | `ng-template[cngxStepLabel]` | Per-step label override (replaces the default `node.label()` text rendering). |
|
|
21
21
|
| `CngxStepContent` | `ng-template[cngxStepContent]` | Per-step panel body. The cngx-side organisms render this template inside the step's panel region. |
|
|
@@ -30,11 +30,12 @@
|
|
|
30
30
|
@layer cngx.tokens {
|
|
31
31
|
/**
|
|
32
32
|
* Header button padding. The pixel `initial-value` is only the un-set
|
|
33
|
-
* fallback;
|
|
34
|
-
*
|
|
35
|
-
* `
|
|
36
|
-
*
|
|
37
|
-
*
|
|
33
|
+
* fallback; the standalone `[cngxAccordion]` host SETs this from
|
|
34
|
+
* `--cngx-space-*` (below) so a global `[data-density]` re-scales a bare
|
|
35
|
+
* `@cngx/common` accordion, and the `@cngx/ui/accordion` organism SETs the
|
|
36
|
+
* same tokens at its group default. Never put `var()` in the `initial-value`
|
|
37
|
+
* (it is invalid, and a registered initial-value defeats any `var()` fallback
|
|
38
|
+
* - reference_property_color_initial_defeats_fallback); derive via a host SET.
|
|
38
39
|
* @group Header
|
|
39
40
|
*/
|
|
40
41
|
@property --cngx-accordion-header-padding {
|
|
@@ -86,6 +87,16 @@
|
|
|
86
87
|
|
|
87
88
|
@layer cngx.components {
|
|
88
89
|
[cngxAccordion] {
|
|
90
|
+
/* Derive header + region padding from the scale so a bare @cngx/common
|
|
91
|
+
accordion densifies at its own default host - standalone use must not
|
|
92
|
+
depend on the @cngx/ui/accordion organism (which SETs the same tokens at
|
|
93
|
+
its group default). Both @property tokens are inherits:true, so this host
|
|
94
|
+
SET reaches the header / region descendants. 0.75rem 1rem -> sm md. */
|
|
95
|
+
--cngx-accordion-header-padding: var(--cngx-space-sm, 8px) var(--cngx-space-md, 16px);
|
|
96
|
+
--cngx-accordion-region-padding: var(--cngx-space-sm, 8px) var(--cngx-space-md, 16px);
|
|
97
|
+
/* Label/twisty gap on the header button - derived from the scale too, via
|
|
98
|
+
the same token the @cngx/ui organism uses. 0.5rem -> sm. */
|
|
99
|
+
--cngx-accordion-header-gap: var(--cngx-space-sm, 8px);
|
|
89
100
|
display: block;
|
|
90
101
|
border: 1px solid var(--cngx-accordion-border-color, oklch(0.88 0.005 250));
|
|
91
102
|
border-radius: var(--cngx-radius-md, 0.375rem);
|
|
@@ -96,9 +107,12 @@
|
|
|
96
107
|
display: flex;
|
|
97
108
|
align-items: center;
|
|
98
109
|
justify-content: space-between;
|
|
99
|
-
gap: 0.5rem;
|
|
110
|
+
gap: var(--cngx-accordion-header-gap, 0.5rem);
|
|
100
111
|
inline-size: 100%;
|
|
101
112
|
padding: var(--cngx-accordion-header-padding, 0.75rem 1rem);
|
|
113
|
+
/* Floor the header row height to the pointer-derived target on a coarse
|
|
114
|
+
pointer; inert (0px) on a fine pointer. */
|
|
115
|
+
min-block-size: var(--cngx-target-min, 0px);
|
|
102
116
|
border: 0;
|
|
103
117
|
border-block-end: 1px solid var(--cngx-accordion-border-color, oklch(0.88 0.005 250));
|
|
104
118
|
background: var(--cngx-color-surface, oklch(1 0 0));
|
|
@@ -279,6 +279,12 @@
|
|
|
279
279
|
line-height: 1;
|
|
280
280
|
pointer-events: none;
|
|
281
281
|
user-select: none;
|
|
282
|
+
/* The count is a single self-contained run (`"99+"`, `formatCount`
|
|
283
|
+
caps at max+). isolate fences its bidi boundary against surrounding
|
|
284
|
+
RTL text without forcing a direction (metric bucket-A), so an
|
|
285
|
+
RTL-locale digit run keeps its own resolved order.
|
|
286
|
+
Consumer opt-out: set --cngx-badge-bidi: normal. */
|
|
287
|
+
unicode-bidi: var(--cngx-badge-bidi, isolate);
|
|
282
288
|
}
|
|
283
289
|
|
|
284
290
|
/* Dot mode - no text, fixed size */
|
|
@@ -344,3 +350,19 @@
|
|
|
344
350
|
}
|
|
345
351
|
}
|
|
346
352
|
}
|
|
353
|
+
|
|
354
|
+
/* forced-colors (WHCM): a badge indicator is a background-filled pill with no
|
|
355
|
+
* border by default; the fill flattens to Canvas, so a corner-anchored count
|
|
356
|
+
* loses its pill outline and a textless --dot indicator disappears entirely.
|
|
357
|
+
* Give every indicator a forced outline so the overlay stays bounded (no
|
|
358
|
+
* layout shift, unlike a border), and fill the dot with system ink so a
|
|
359
|
+
* textless status survives. Unlayered + direct selectors (outside @scope) to
|
|
360
|
+
* beat the layered component rule and sidestep the @scope/layer cascade trap. */
|
|
361
|
+
@media (forced-colors: active) {
|
|
362
|
+
.cngx-badge-indicator {
|
|
363
|
+
outline: 1px solid CanvasText;
|
|
364
|
+
}
|
|
365
|
+
.cngx-badge-indicator--dot {
|
|
366
|
+
background: CanvasText;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
@@ -175,8 +175,8 @@
|
|
|
175
175
|
--cngx-dialog-max-height: var(--cngx-bottom-sheet-max-height, 80vh);
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
/* Drag handle. */
|
|
179
|
-
:scope::before {
|
|
178
|
+
/* Drag handle - gated on the [showHandle] modifier class. */
|
|
179
|
+
:scope.cngx-bottom-sheet--handle::before {
|
|
180
180
|
content: '';
|
|
181
181
|
display: block;
|
|
182
182
|
width: var(--cngx-bottom-sheet-handle-width, 40px);
|
|
@@ -206,3 +206,15 @@
|
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
+
|
|
210
|
+
/* forced-colors (WHCM): the drag-handle pill (::before) is a background-color
|
|
211
|
+
* bar with no border, so it flattens to Canvas and the drag affordance vanishes.
|
|
212
|
+
* Re-draw it with CanvasText ink. The sheet surface itself is bounded by the
|
|
213
|
+
* dialog[cngxDialog] forced-colors border (the sheet carries cngxDialog).
|
|
214
|
+
* Unlayered + direct selector (outside @scope) to beat the layered component
|
|
215
|
+
* rule. */
|
|
216
|
+
@media (forced-colors: active) {
|
|
217
|
+
dialog.cngx-bottom-sheet.cngx-bottom-sheet--handle::before {
|
|
218
|
+
background: CanvasText;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
@property --cngx-breadcrumb-gap {
|
|
35
35
|
syntax: '<length>';
|
|
36
36
|
inherits: true;
|
|
37
|
-
initial-value:
|
|
37
|
+
initial-value: 8px;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
/**
|
|
@@ -87,6 +87,14 @@
|
|
|
87
87
|
color: var(--cngx-color-primary, oklch(0.66 0.19 50));
|
|
88
88
|
text-decoration: none;
|
|
89
89
|
font-size: var(--cngx-font-size-sm, 0.8125rem);
|
|
90
|
+
|
|
91
|
+
/* Touch-target floor - a crumb is a discrete nav tap target. An inline
|
|
92
|
+
<a> ignores min-block-size, so switch to inline-flex and centre the
|
|
93
|
+
label, then floor the hit box on the block axis. Inert at 0px on a
|
|
94
|
+
fine pointer, so the trail keeps its natural line height. */
|
|
95
|
+
display: inline-flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
min-block-size: var(--cngx-target-min, 0px);
|
|
90
98
|
}
|
|
91
99
|
|
|
92
100
|
[cngxBreadcrumbItem]:hover {
|
|
@@ -11,7 +11,10 @@
|
|
|
11
11
|
*
|
|
12
12
|
* - `--checked` - primary fill, on-primary text, primary border
|
|
13
13
|
* - `--disabled` - opacity 0.5, `cursor: not-allowed`
|
|
14
|
-
* - `:hover:not(--disabled)` - 8% primary tint over the surface
|
|
14
|
+
* - `:hover:not(--disabled):not(--checked)` - 8% primary tint over the surface
|
|
15
|
+
* - `--checked:hover:not(--disabled)` - primary fill darkened for feedback,
|
|
16
|
+
* keeping the on-primary text contrast (an unguarded plain hover would drop
|
|
17
|
+
* a checked segment to the pale tint under near-white text)
|
|
15
18
|
*
|
|
16
19
|
* **Segmented-control geometry**
|
|
17
20
|
*
|
|
@@ -60,6 +63,10 @@
|
|
|
60
63
|
display: inline-flex;
|
|
61
64
|
align-items: center;
|
|
62
65
|
justify-content: center;
|
|
66
|
+
/* Touch-target floor - segmented-control buttons are primary tap
|
|
67
|
+
targets; lift each to the pointer-derived hit-area minimum on
|
|
68
|
+
the block axis. Inert at 0px on a fine pointer. */
|
|
69
|
+
min-block-size: var(--cngx-target-min, 0px);
|
|
63
70
|
gap: 0.375rem;
|
|
64
71
|
padding: var(--cngx-button-toggle-padding-block, 0.4rem) var(--cngx-button-toggle-padding-inline, 0.875rem);
|
|
65
72
|
border: 1px solid var(--cngx-color-border, oklch(0.88 0.005 250));
|
|
@@ -87,7 +94,13 @@
|
|
|
87
94
|
border-end-end-radius: var(--cngx-radius-md, 0.375rem);
|
|
88
95
|
}
|
|
89
96
|
|
|
90
|
-
:
|
|
97
|
+
/* Hover on an UNCHECKED segment: 8% primary tint over the surface. The
|
|
98
|
+
* `:not(--checked)` guard is load-bearing - this rule sets only the
|
|
99
|
+
* background, and it out-specifies the checked rule below (0,3,0 vs 0,2,0),
|
|
100
|
+
* so without the guard a hovered checked segment would drop to the pale
|
|
101
|
+
* tint while keeping its on-primary (near-white) text: white-on-pale, an
|
|
102
|
+
* invisible label. Checked hover is handled by its own rule. */
|
|
103
|
+
:scope:hover:not(.cngx-button-toggle--disabled):not(.cngx-button-toggle--checked) {
|
|
91
104
|
background: color-mix(in oklch, var(--cngx-color-primary, oklch(0.66 0.19 50)) 8%, var(--cngx-color-surface, oklch(1 0 0)));
|
|
92
105
|
}
|
|
93
106
|
|
|
@@ -97,9 +110,38 @@
|
|
|
97
110
|
border-color: var(--cngx-color-primary, oklch(0.66 0.19 50));
|
|
98
111
|
}
|
|
99
112
|
|
|
113
|
+
/* Hover on a CHECKED segment: keep the primary fill (so the on-primary text
|
|
114
|
+
* stays legible) and darken it a touch for feedback. Darkening toward black
|
|
115
|
+
* only deepens the fill, so the on-primary text contrast is preserved in
|
|
116
|
+
* light and dark. */
|
|
117
|
+
:scope.cngx-button-toggle--checked:hover:not(.cngx-button-toggle--disabled) {
|
|
118
|
+
background: color-mix(in oklch, var(--cngx-color-primary, oklch(0.66 0.19 50)) 88%, black);
|
|
119
|
+
border-color: color-mix(in oklch, var(--cngx-color-primary, oklch(0.66 0.19 50)) 88%, black);
|
|
120
|
+
}
|
|
121
|
+
|
|
100
122
|
:scope.cngx-button-toggle--disabled {
|
|
101
123
|
opacity: 0.5;
|
|
102
124
|
cursor: not-allowed;
|
|
103
125
|
}
|
|
104
126
|
}
|
|
105
127
|
}
|
|
128
|
+
|
|
129
|
+
/* forced-colors (WHCM): the checked segment is a primary background fill (with a
|
|
130
|
+
* primary border-color and on-primary text); the fill flattens to Canvas and the
|
|
131
|
+
* border/text force to the same system colours as an unchecked segment, so the
|
|
132
|
+
* pressed state is lost. Re-signal with the system Highlight pair. Two rules are
|
|
133
|
+
* load-bearing here: (1) the host is a `<button>`, and the UA forces a
|
|
134
|
+
* form-control's background to ButtonFace with a priority that beats an author
|
|
135
|
+
* `background: Highlight`, so `forced-color-adjust: none` is required to opt this
|
|
136
|
+
* segment out of the forcing and let the Highlight through; (2) the base rule is
|
|
137
|
+
* `:scope.cngx-button-toggle--checked` (specificity 0,2,0), so the override
|
|
138
|
+
* repeats the host class (`.cngx-button-toggle.cngx-button-toggle--checked`) to
|
|
139
|
+
* match it. Unlayered + direct selector (outside @scope). */
|
|
140
|
+
@media (forced-colors: active) {
|
|
141
|
+
.cngx-button-toggle.cngx-button-toggle--checked {
|
|
142
|
+
forced-color-adjust: none;
|
|
143
|
+
background: Highlight !important;
|
|
144
|
+
color: HighlightText !important;
|
|
145
|
+
border-color: Highlight !important;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -83,7 +83,6 @@
|
|
|
83
83
|
@property --cngx-dga-fs {
|
|
84
84
|
syntax: '*';
|
|
85
85
|
inherits: true;
|
|
86
|
-
initial-value: inherit;
|
|
87
86
|
}
|
|
88
87
|
|
|
89
88
|
/**
|
|
@@ -129,7 +128,7 @@
|
|
|
129
128
|
@property --cngx-dga-col-sm {
|
|
130
129
|
syntax: '<length>';
|
|
131
130
|
inherits: true;
|
|
132
|
-
initial-value:
|
|
131
|
+
initial-value: 80px;
|
|
133
132
|
}
|
|
134
133
|
|
|
135
134
|
/**
|
|
@@ -139,7 +138,7 @@
|
|
|
139
138
|
@property --cngx-dga-col-md {
|
|
140
139
|
syntax: '<length>';
|
|
141
140
|
inherits: true;
|
|
142
|
-
initial-value:
|
|
141
|
+
initial-value: 112px;
|
|
143
142
|
}
|
|
144
143
|
|
|
145
144
|
/**
|
|
@@ -149,6 +148,72 @@
|
|
|
149
148
|
@property --cngx-dga-col-lg {
|
|
150
149
|
syntax: '<length>';
|
|
151
150
|
inherits: true;
|
|
152
|
-
initial-value:
|
|
151
|
+
initial-value: 160px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Opt-in maximum block size. Unset (`none`) leaves the grid content-height; a
|
|
156
|
+
* length caps it, turning the host into a vertical scrollport that pins the
|
|
157
|
+
* column head (`data-grid-accordion.component.css`). The pinned head is gated by
|
|
158
|
+
* a style query on this token, so registering a resolvable `none` initial is what
|
|
159
|
+
* makes bounded vs unbounded distinguishable to that query.
|
|
160
|
+
* @group Grid
|
|
161
|
+
*/
|
|
162
|
+
@property --cngx-dga-max-block-size {
|
|
163
|
+
syntax: '<length> | none';
|
|
164
|
+
inherits: true;
|
|
165
|
+
initial-value: none;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Stacking order of the pinned column head over the rows scrolling beneath it
|
|
170
|
+
* (bounded mode only).
|
|
171
|
+
* @group Grid
|
|
172
|
+
*/
|
|
173
|
+
@property --cngx-dga-head-z {
|
|
174
|
+
syntax: '<integer>';
|
|
175
|
+
inherits: true;
|
|
176
|
+
initial-value: 2;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Opaque fill behind the pinned column head so scrolling rows never show through
|
|
181
|
+
* (bounded mode only). Universal syntax with NO initial-value, so the use-site
|
|
182
|
+
* fallback to the foundation surface token stays live - a fixed colour initial
|
|
183
|
+
* would defeat it (reference_property_color_initial_defeats_fallback) and render
|
|
184
|
+
* a light head in dark mode. The unskinned base reads it as the head's fill; the
|
|
185
|
+
* content skins paint `.cngx-dga-header` background directly, so this token is the
|
|
186
|
+
* base default they may override, not one they currently set.
|
|
187
|
+
* @group Surface
|
|
188
|
+
*/
|
|
189
|
+
@property --cngx-dga-head-bg {
|
|
190
|
+
syntax: '*';
|
|
191
|
+
inherits: true;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Stacking order of the pinned footer over the rows scrolling beneath it
|
|
196
|
+
* (bounded mode only).
|
|
197
|
+
* @group Grid
|
|
198
|
+
*/
|
|
199
|
+
@property --cngx-dga-foot-z {
|
|
200
|
+
syntax: '<integer>';
|
|
201
|
+
inherits: true;
|
|
202
|
+
initial-value: 2;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Opaque fill behind the pinned footer so scrolling rows never show through
|
|
207
|
+
* (bounded mode only). Universal syntax with NO initial-value, so the use-site
|
|
208
|
+
* fallback to the foundation surface token stays live - a fixed colour initial
|
|
209
|
+
* would defeat it (reference_property_color_initial_defeats_fallback). The unskinned
|
|
210
|
+
* base reads it as the footer's fill; the content skins paint `.cngx-dga-footer`
|
|
211
|
+
* background directly, so this token is the base default they may override, not one
|
|
212
|
+
* they currently set.
|
|
213
|
+
* @group Surface
|
|
214
|
+
*/
|
|
215
|
+
@property --cngx-dga-foot-bg {
|
|
216
|
+
syntax: '*';
|
|
217
|
+
inherits: true;
|
|
153
218
|
}
|
|
154
219
|
}
|
|
@@ -360,3 +360,15 @@
|
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
|
+
|
|
364
|
+
/* forced-colors (WHCM): the dialog border defaults to `none`, so its sole
|
|
365
|
+
* boundary is the elevation box-shadow, which is forced to none - and the
|
|
366
|
+
* surface flattens to Canvas, leaving the modal edgeless against the page.
|
|
367
|
+
* Re-draw a real edge with a system-colour border. Unlayered + direct selector
|
|
368
|
+
* (outside @scope) to beat the layered component rule and sidestep the
|
|
369
|
+
* @scope/layer cascade trap. */
|
|
370
|
+
@media (forced-colors: active) {
|
|
371
|
+
dialog[cngxDialog] {
|
|
372
|
+
border: 1px solid ButtonBorder;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
@@ -147,3 +147,15 @@
|
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
+
|
|
151
|
+
/* forced-colors (WHCM): the divider line is painted with background-color on a
|
|
152
|
+
* 1px-thin block (both the horizontal and vertical variants), and the forced
|
|
153
|
+
* palette flattens it to Canvas - the separator vanishes. Re-draw it in the
|
|
154
|
+
* system foreground ink so the line survives (a bare <hr> gets its border
|
|
155
|
+
* forced the same way). Unlayered + direct selector (outside @scope) to beat
|
|
156
|
+
* the layered component rule and sidestep the @scope/layer cascade trap. */
|
|
157
|
+
@media (forced-colors: active) {
|
|
158
|
+
.cngx-divider {
|
|
159
|
+
background: CanvasText;
|
|
160
|
+
}
|
|
161
|
+
}
|