@cngx/ui 0.1.0-rc.6 → 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/README.md +112 -0
- package/a11y/README.md +81 -0
- package/context-menu/README.md +98 -0
- package/data-grid-accordion/README.md +27 -0
- package/feedback/README.md +2 -0
- package/fesm2022/cngx-ui-a11y.mjs +320 -0
- package/fesm2022/cngx-ui-a11y.mjs.map +1 -0
- package/fesm2022/cngx-ui-accordion.mjs +17 -6
- package/fesm2022/cngx-ui-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-action-button.mjs +5 -2
- package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
- package/fesm2022/cngx-ui-breadcrumb.mjs +11 -6
- package/fesm2022/cngx-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/cngx-ui-chart-panel.mjs +429 -0
- package/fesm2022/cngx-ui-chart-panel.mjs.map +1 -0
- package/fesm2022/cngx-ui-collection.mjs +15 -6
- package/fesm2022/cngx-ui-collection.mjs.map +1 -1
- package/fesm2022/cngx-ui-command-palette.mjs +1005 -0
- package/fesm2022/cngx-ui-command-palette.mjs.map +1 -0
- package/fesm2022/cngx-ui-context-menu.mjs +742 -0
- package/fesm2022/cngx-ui-context-menu.mjs.map +1 -0
- package/fesm2022/cngx-ui-data-grid-accordion.mjs +88 -18
- package/fesm2022/cngx-ui-data-grid-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-feedback.mjs +97 -106
- package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
- package/fesm2022/cngx-ui-layout.mjs +18 -9
- package/fesm2022/cngx-ui-layout.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-accordion.mjs +9 -9
- package/fesm2022/cngx-ui-mat-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-tabs.mjs +64 -70
- package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-paginator.mjs +18 -8
- package/fesm2022/cngx-ui-paginator.mjs.map +1 -1
- package/fesm2022/cngx-ui-sidenav.mjs +2 -2
- package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
- package/fesm2022/cngx-ui-skeleton.mjs +20 -7
- package/fesm2022/cngx-ui-skeleton.mjs.map +1 -1
- package/fesm2022/cngx-ui-speak.mjs +2 -2
- package/fesm2022/cngx-ui-speak.mjs.map +1 -1
- package/fesm2022/cngx-ui-stat-card.mjs +618 -0
- package/fesm2022/cngx-ui-stat-card.mjs.map +1 -0
- package/fesm2022/cngx-ui-stepper.mjs +30 -12
- package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-tabs.mjs +36 -19
- package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-timeline.mjs +495 -0
- package/fesm2022/cngx-ui-timeline.mjs.map +1 -0
- package/fesm2022/cngx-ui-toc.mjs +704 -0
- package/fesm2022/cngx-ui-toc.mjs.map +1 -0
- package/fesm2022/cngx-ui.mjs +2 -2
- package/fesm2022/cngx-ui.mjs.map +1 -1
- package/mat-accordion/README.md +1 -1
- package/mat-tabs/styles/mat-tabs.css +20 -17
- package/package.json +32 -1
- package/skeleton/README.md +2 -0
- package/stepper/README.md +2 -2
- package/timeline/README.md +350 -0
- package/toc/README.md +183 -0
- package/types/cngx-ui-a11y.d.ts +303 -0
- package/types/cngx-ui-accordion.d.ts +9 -4
- package/types/cngx-ui-action-button.d.ts +3 -0
- package/types/cngx-ui-breadcrumb.d.ts +5 -0
- package/types/cngx-ui-chart-panel.d.ts +278 -0
- package/types/cngx-ui-collection.d.ts +12 -3
- package/types/cngx-ui-command-palette.d.ts +451 -0
- package/types/cngx-ui-context-menu.d.ts +467 -0
- package/types/cngx-ui-data-grid-accordion.d.ts +72 -15
- package/types/cngx-ui-feedback.d.ts +71 -18
- package/types/cngx-ui-layout.d.ts +8 -3
- package/types/cngx-ui-mat-accordion.d.ts +3 -3
- package/types/cngx-ui-mat-tabs.d.ts +11 -9
- package/types/cngx-ui-paginator.d.ts +13 -3
- package/types/cngx-ui-skeleton.d.ts +13 -1
- package/types/cngx-ui-stat-card.d.ts +327 -0
- package/types/cngx-ui-stepper.d.ts +15 -2
- package/types/cngx-ui-tabs.d.ts +20 -4
- package/types/cngx-ui-timeline.d.ts +479 -0
- package/types/cngx-ui-toc.d.ts +514 -0
- package/types/cngx-ui.d.ts +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cngx-ui-toc.mjs","sources":["../../../projects/ui/toc/config/toc.config.defaults.ts","../../../projects/ui/toc/config/inject-toc-config.ts","../../../projects/ui/toc/toc-item-slot.ts","../../../projects/ui/toc/toc-token.ts","../../../projects/ui/toc/toc.component.ts","../../../projects/ui/toc/toc.component.html","../../../projects/ui/toc/toc-router-sync.directive.ts","../../../projects/ui/toc/config/features.ts","../../../projects/ui/toc/config/provide-toc-config.ts","../../../projects/ui/toc/public-api.ts","../../../projects/ui/toc/cngx-ui-toc.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nimport type { CngxTocConfig } from './toc.config';\n\n/**\n * Library defaults for the toc configuration cascade. English by default per\n * `feedback_en_default_locale`; locale overrides ride the `withTocAriaLabels`\n * feature. The spy defaults (`rootMargin` / `threshold`) mirror\n * `CngxScrollSpy`'s own input defaults so an un-configured toc tracks\n * scrolling identically to a hand-wired spy.\n *\n * Exported for intra-lib consumers (`provideTocConfig` deep-merges with this\n * base) but **NOT** re-exported from `public-api.ts` - downstream consumers\n * reach the defaults via `inject(CNGX_TOC_CONFIG)` so `provideTocConfig` /\n * `provideTocConfigAt` overrides take precedence.\n *\n * @internal\n */\nexport const CNGX_TOC_DEFAULTS: CngxTocConfig = {\n ariaLabels: {\n nav: 'On this page',\n },\n scrollBehavior: 'smooth',\n spy: {\n rootMargin: '0px',\n threshold: 0.3,\n },\n};\n\n/**\n * App-wide configuration cascade for the table-of-contents organism. Resolves\n * in priority order:\n *\n * 1. Per-instance Input binding.\n * 2. `provideTocConfigAt(...)` in a parent component's `viewProviders`.\n * 3. `provideTocConfig(...)` at the application root.\n * 4. Library defaults (this token's `factory`).\n *\n * `providedIn: 'root'` with a default factory means consumers never need to\n * provide the token explicitly - `inject(CNGX_TOC_CONFIG)` always resolves.\n * Consumers who want overrides call `provideTocConfig(...)` in\n * `bootstrapApplication` providers (root cascade) or `provideTocConfigAt(...)`\n * in a component's `viewProviders` (sub-tree cascade).\n *\n * @category ui/toc\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/toc/config/toc.config.defaults.ts\n * @since 0.1.0\n */\nexport const CNGX_TOC_CONFIG = new InjectionToken<CngxTocConfig>('CNGX_TOC_CONFIG', {\n providedIn: 'root',\n factory: () => CNGX_TOC_DEFAULTS,\n});\n","import { inject } from '@angular/core';\n\nimport type { CngxTocConfig } from './toc.config';\nimport { CNGX_TOC_CONFIG } from './toc.config.defaults';\n\n/**\n * Convenience accessor for the toc configuration cascade. Runs in injection\n * context; resolves through the priority chain (per-instance Input ->\n * `provideTocConfigAt` -> `provideTocConfig` -> library defaults). Equivalent\n * to `inject(CNGX_TOC_CONFIG)` - the helper exists so consumers don't import\n * the token directly. Mirrors `injectBreadcrumbConfig`.\n *\n * ```ts\n * export class CngxToc {\n * private readonly cfg = injectTocConfig();\n * protected readonly navLabel = computed(() => this.cfg.ariaLabels?.nav ?? 'On this page');\n * }\n * ```\n *\n * @category ui/toc\n * @since 0.1.0\n */\nexport function injectTocConfig(): CngxTocConfig {\n return inject(CNGX_TOC_CONFIG);\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\nimport type { CngxTocItemContext } from './toc.types';\n\n/**\n * Per-item template slot for `CngxToc`. Project an `<ng-template cngxTocItem>`\n * inside `<cngx-toc>` to replace the built-in plain-label rendering with\n * custom markup - the `let-` variables come out typed via\n * `ngTemplateContextGuard`:\n *\n * ```html\n * <cngx-toc [items]=\"toc\" contentRoot=\"#article\">\n * <ng-template cngxTocItem let-item let-active=\"active\" let-depth=\"depth\">\n * <span [class.is-active]=\"active\">{{ item.label }}</span>\n * @if (depth === 0) { <cngx-badge>{{ item.children?.length }}</cngx-badge> }\n * </ng-template>\n * </cngx-toc>\n * ```\n *\n * Named `CngxTocItemSlot` (not `*Directive`) per the repo's no-artifact-suffix\n * rule; the selector stays `cngxTocItem`, which is what consumers write.\n * Resolves ahead of `CNGX_TOC_CONFIG.templates.item` and the built-in label.\n *\n * @category ui/toc\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/toc/toc-item-slot.ts\n * @since 0.1.0\n * @relatedTo CngxToc\n * <example-url>http://localhost:4200/#/ui/toc/slots/custom-item-template</example-url>\n */\n@Directive({\n selector: 'ng-template[cngxTocItem]',\n standalone: true,\n exportAs: 'cngxTocItem',\n})\nexport class CngxTocItemSlot {\n readonly templateRef = inject<TemplateRef<CngxTocItemContext>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _dir: CngxTocItemSlot,\n ctx: unknown,\n ): ctx is CngxTocItemContext {\n return true;\n }\n}\n","import { InjectionToken, type OutputRef, type Signal } from '@angular/core';\n\nimport type { CngxTocItem } from './toc.types';\n\n/**\n * Minimal contract a toc rail exposes to its collaborators (the opt-in\n * `CngxTocRouterSync` fragment directive): the active-section signal it\n * derives, the activation output it emits, and the imperative `scrollTo`\n * it owns. Injected via {@link CNGX_TOC} + `useExisting`, never by injecting\n * the concrete `CngxToc` class - that would create a cyclic type dependency\n * and block the decompose brain/skin split.\n *\n * Direction mirrors `CNGX_SIDENAV`, not `CNGX_BREADCRUMB_ITEMS_SOURCE`: the\n * rail owns the state (`activeId`, `scrollTo`) and the collaborator consumes\n * it, so the toc *provides* the token and the sync directive *injects* it.\n *\n * @category ui/toc\n * @since 0.1.0\n * @relatedTo CngxToc, CngxTocRouterSync\n */\nexport interface CngxTocContract {\n /** The section currently most visible, or `null` before the spy resolves. */\n readonly activeId: Signal<string | null>;\n /** Fires when a link is activated (click / Enter), carrying its item. */\n readonly activated: OutputRef<CngxTocItem>;\n /** Scroll the section with this id into view and move focus to it. */\n scrollTo(id: string): void;\n}\n\n/**\n * Contract token for a toc rail. `CngxToc` provides it via\n * `{ provide: CNGX_TOC, useExisting: CngxToc }`, so a collaborator injects the\n * narrow {@link CngxTocContract} instead of the concrete class.\n *\n * @category ui/toc\n * @since 0.1.0\n * @relatedTo CngxToc, CngxTocRouterSync\n */\nexport const CNGX_TOC = new InjectionToken<CngxTocContract>('CNGX_TOC');\n","import { DOCUMENT, isPlatformBrowser, NgTemplateOutlet } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n effect,\n inject,\n input,\n output,\n PLATFORM_ID,\n signal,\n ViewEncapsulation,\n viewChild,\n type Signal,\n} from '@angular/core';\nimport { CngxScrollSpy, injectMediaQuery } from '@cngx/common/layout';\n\nimport { injectTocConfig } from './config/inject-toc-config';\nimport { CngxTocItemSlot } from './toc-item-slot';\nimport { CNGX_TOC, type CngxTocContract } from './toc-token';\nimport type { CngxTocItem } from './toc.types';\n\n/** Shared empty result so the no-active-section trail is reference-stable. */\nconst EMPTY_IDS: readonly string[] = [];\n\n/** Shared empty outline so the pre-scan / no-headings state is reference-stable. */\nconst EMPTY_ITEMS: readonly CngxTocItem[] = [];\n\n/** Mutable node used while building the discovered tree, before it is frozen to CngxTocItem. */\ninterface MutableItem {\n id: string;\n label: string;\n children: MutableItem[];\n}\n\n/** Element-wise string-array compare - the shared comparator for both the flat-id list and the active trail. */\nfunction idsEqual(a: readonly string[], b: readonly string[]): boolean {\n return a.length === b.length && a.every((value, index) => value === b[index]);\n}\n\n/**\n * Structural compare of two discovered outlines (id + label + nesting). Guards\n * the `discovered` signal so a re-scan of unchanged headings keeps the same\n * reference and never re-stamps the outline outlet.\n */\nfunction itemsEqual(a: readonly CngxTocItem[], b: readonly CngxTocItem[]): boolean {\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; i++) {\n const x = a[i];\n const y = b[i];\n if (x.id !== y.id || x.label !== y.label) {\n return false;\n }\n if (!itemsEqual(x.children ?? EMPTY_ITEMS, y.children ?? EMPTY_ITEMS)) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * \"On this page\" navigation rail. Renders a `<nav>` of anchor links from a\n * {@link CngxTocItem} outline, tracks the most-visible section through an\n * internal {@link CngxScrollSpy}, and communicates the active link via\n * `aria-current` inside the `computed()` graph. Nested items render as\n * indented sub-lists; native link semantics and tab order stay intact (a toc\n * is a navigation landmark of links, not a treeview).\n *\n * Composition over configuration: the spy is bound in this component's own\n * template rather than via `hostDirectives`, because the organism - not the\n * consumer - owns the flat id list the spy observes, and `[cngxScrollSpy]` is\n * a required input. The spy resolves its targets through `getElementById`, so\n * its host placement is irrelevant to its function.\n *\n * @category ui/toc\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/toc/toc.component.ts\n * @since 0.1.0\n * @relatedTo CngxScrollSpy, CngxTocRouterSync, CngxSidenav\n * <example-url>http://localhost:4200/#/ui/toc/basic/on-this-page-rail</example-url>\n * <example-url>http://localhost:4200/#/ui/toc/auto/heading-auto-discovery</example-url>\n */\n@Component({\n selector: 'cngx-toc',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NgTemplateOutlet, CngxScrollSpy],\n providers: [{ provide: CNGX_TOC, useExisting: CngxToc }],\n templateUrl: './toc.component.html',\n styleUrl: './toc.component.css',\n})\nexport class CngxToc implements CngxTocContract {\n private readonly doc = inject(DOCUMENT);\n private readonly cfg = injectTocConfig();\n private readonly reducedMotion = injectMediaQuery('(prefers-reduced-motion: reduce)');\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n /**\n * The outline to render. Tree-shaped; nested `children` become sub-lists.\n * Ignored when `[autoDiscover]` is set - the headings under `contentRoot`\n * become the outline instead.\n */\n readonly items = input<readonly CngxTocItem[]>(EMPTY_ITEMS);\n /**\n * Derive the outline from the heading elements under `contentRoot` instead\n * of a hand-maintained `[items]` array. Headings nest by their level\n * (`h2 > h3`), and a heading with no `id` gets a slugified one written onto\n * it so the link can target it. Scans once after the first render; call\n * {@link refresh} after you inject or remove sections at runtime.\n */\n readonly autoDiscover = input(false, { transform: booleanAttribute });\n /** Which headings `[autoDiscover]` collects, in CSS-selector form. */\n readonly headingSelector = input<string>('h2, h3');\n /**\n * CSS selector for the scroll container the spy observes. `null` (default)\n * uses the viewport. Forwarded to the spy's `[root]`; also the root the\n * `[autoDiscover]` scan walks for headings.\n */\n readonly contentRoot = input<string | null>(null);\n /** Root margin forwarded to the spy. Defaults to the config cascade. */\n readonly rootMargin = input<string>(this.cfg.spy?.rootMargin ?? '0px');\n /** Minimum visibility ratio forwarded to the spy. Defaults to the config cascade. */\n readonly threshold = input<number>(this.cfg.spy?.threshold ?? 0.3);\n\n /** Fires when a link is activated (click / Enter). */\n readonly activated = output<CngxTocItem>();\n\n private readonly spy = viewChild(CngxScrollSpy);\n private readonly itemSlot = contentChild(CngxTocItemSlot);\n\n /** Headings discovered by the last `[autoDiscover]` scan. */\n private readonly discovered = signal<readonly CngxTocItem[]>(EMPTY_ITEMS, { equal: itemsEqual });\n\n /** The outline actually rendered: the discovered headings when `[autoDiscover]` is on, else `[items]`. */\n protected readonly resolvedItems = computed(() =>\n this.autoDiscover() ? this.discovered() : this.items(),\n );\n\n /** Accessible name of the `nav` landmark, from the config cascade. */\n protected readonly navLabel = computed(() => this.cfg.ariaLabels?.nav ?? 'On this page');\n\n /**\n * Depth-first flat id list feeding `[cngxScrollSpy]`. `equal: idsEqual`\n * keeps the reference stable across same-shape re-sets so a re-render does\n * not re-create the observer.\n */\n protected readonly flatIds = computed(() => this.collectIds(this.resolvedItems()), {\n equal: idsEqual,\n });\n\n constructor() {\n // Re-scan whenever the discovery inputs change. The DOM read + discovered\n // write are deferred to a microtask so no signal is written during effect\n // execution (Pillar 1) and the just-rendered content has settled - the same\n // queueMicrotask discipline the panel-lifecycle focus restore uses.\n effect(() => {\n if (!this.autoDiscover()) {\n return;\n }\n this.contentRoot();\n this.headingSelector();\n queueMicrotask(() => this.refresh());\n });\n }\n\n /**\n * The active section, or `null`. `viewChild` is a view query, so `spy()` is\n * `undefined` during the creation pass; `?? null` makes that an explicit\n * value every downstream computed is defined at.\n */\n readonly activeId: Signal<string | null> = computed(() => this.spy()?.activeId() ?? null);\n\n /**\n * Ancestor-id chain of the active leaf - the parent links that get\n * `data-active-trail`. Same `equal` as `flatIds`: an array-valued computed\n * feeding an attribute binding must not allocate a fresh array every spy\n * tick (reference_signal_architecture Equality Rule).\n */\n protected readonly activeTrail = computed(() => this.computeTrail(), { equal: idsEqual });\n\n /** Resolved item template: instance slot -> config default -> built-in label. */\n protected readonly resolvedItemTpl = computed(\n () => this.itemSlot()?.templateRef ?? this.cfg.templates?.item ?? null,\n );\n\n /**\n * Scroll the section with this id into view and move focus to it. Honours\n * `prefers-reduced-motion` - the configured `scrollBehavior` is swapped for\n * `'auto'` (instant) whenever reduced motion is requested. A visual-only\n * jump is a silent state change for screen-reader users, so focus follows\n * the scroll (Pillar 2).\n */\n scrollTo(id: string): void {\n const target = this.doc.getElementById(id);\n if (target === null) {\n return;\n }\n const behavior = this.reducedMotion() ? 'auto' : (this.cfg.scrollBehavior ?? 'smooth');\n target.scrollIntoView({ behavior });\n this.focusTarget(target);\n }\n\n /** Click / Enter handler: takes over the native anchor jump, scrolls, and announces the activation. */\n protected handleActivate(item: CngxTocItem, event?: Event): void {\n event?.preventDefault();\n this.scrollTo(item.id);\n this.activated.emit(item);\n }\n\n /**\n * Move focus to the scrolled-to section. `preventScroll` keeps `focus()`\n * from fighting the smooth `scrollIntoView` above with a second instant\n * jump. Section elements are consumer-owned DOM, so `tabindex=\"-1\"` is set\n * imperatively only when the element is not focusable by default and the\n * consumer set no `tabindex` - an author-set value is never overwritten.\n * That persistent attribute on borrowed DOM is the entry's tracked debt.\n */\n private focusTarget(target: HTMLElement): void {\n const needsTabindex = !target.hasAttribute('tabindex') && !this.isFocusableByDefault(target);\n if (needsTabindex) {\n target.setAttribute('tabindex', '-1');\n }\n target.focus({ preventScroll: true });\n }\n\n /** Elements that take focus without an author `tabindex`. */\n private isFocusableByDefault(el: HTMLElement): boolean {\n return /^(a|button|input|select|textarea|summary|iframe)$/i.test(el.tagName);\n }\n\n /** Depth-first collect of every id in the outline. */\n private collectIds(items: readonly CngxTocItem[], acc: string[] = []): string[] {\n for (const item of items) {\n acc.push(item.id);\n if (item.children?.length) {\n this.collectIds(item.children, acc);\n }\n }\n return acc;\n }\n\n /** Ancestor ids of the active leaf (path from root, excluding the leaf itself). */\n private computeTrail(): readonly string[] {\n const id = this.activeId();\n if (id === null) {\n return EMPTY_IDS;\n }\n const path = this.pathTo(id, this.resolvedItems());\n return path ? path.slice(0, -1) : EMPTY_IDS;\n }\n\n /** Root-to-target id path, or `null` when the id is not in the outline. */\n private pathTo(target: string, items: readonly CngxTocItem[]): readonly string[] | null {\n for (const item of items) {\n if (item.id === target) {\n return [item.id];\n }\n const childPath = item.children?.length ? this.pathTo(target, item.children) : null;\n if (childPath) {\n return [item.id, ...childPath];\n }\n }\n return null;\n }\n\n /**\n * Re-run the `[autoDiscover]` heading scan. No-op unless `[autoDiscover]` is\n * set and we are on the browser. Call it after injecting or removing sections\n * at runtime - discovery is one-shot by design, not a live observer.\n */\n refresh(): void {\n if (!this.autoDiscover() || !this.isBrowser) {\n return;\n }\n this.discovered.set(this.scanHeadings());\n }\n\n /** Walk the headings under `contentRoot` into a level-nested outline. */\n private scanHeadings(): readonly CngxTocItem[] {\n const rootSelector = this.contentRoot();\n let root: ParentNode = this.doc;\n if (rootSelector) {\n const matched = this.doc.querySelector(rootSelector);\n // A set-but-unmatched root scans nothing, not the whole document -\n // falling back to `doc` would sweep site chrome into the outline.\n if (matched === null) {\n return EMPTY_ITEMS;\n }\n root = matched;\n }\n const headings = Array.from(root.querySelectorAll<HTMLElement>(this.headingSelector()));\n if (headings.length === 0) {\n return EMPTY_ITEMS;\n }\n\n const roots: MutableItem[] = [];\n const stack: { level: number; node: MutableItem }[] = [];\n const used = new Set<string>();\n\n for (const el of headings) {\n const level = this.headingLevel(el);\n const node: MutableItem = { id: this.ensureId(el, used), label: this.headingLabel(el), children: [] };\n while (stack.length > 0 && stack[stack.length - 1].level >= level) {\n stack.pop();\n }\n const parent = stack[stack.length - 1];\n if (parent) {\n parent.node.children.push(node);\n } else {\n roots.push(node);\n }\n stack.push({ level, node });\n }\n\n return roots.map((node) => this.freeze(node));\n }\n\n /** Numeric level of a heading element (`h2` -> 2). Non-heading matches read as level 1. */\n private headingLevel(el: HTMLElement): number {\n const match = /^h([1-6])$/i.exec(el.tagName);\n return match ? Number(match[1]) : 1;\n }\n\n /** Visible text of a heading, collapsed to a single spaced line. */\n private headingLabel(el: HTMLElement): string {\n return (el.textContent ?? '').replace(/\\s+/g, ' ').trim();\n }\n\n /**\n * Return the heading's id, generating and writing a slug when it has none.\n * The write mutates consumer-owned DOM (tracked debt); an author-set id is\n * kept verbatim. Collisions against prior scan ids and existing document ids\n * get a `-2`, `-3`, ... suffix.\n */\n private ensureId(el: HTMLElement, used: Set<string>): string {\n if (el.id) {\n used.add(el.id);\n return el.id;\n }\n const base = this.slugify(this.headingLabel(el)) || 'section';\n let candidate = base;\n let n = 2;\n while (used.has(candidate) || this.doc.getElementById(candidate) !== null) {\n candidate = `${base}-${n++}`;\n }\n used.add(candidate);\n el.setAttribute('id', candidate);\n return candidate;\n }\n\n /** Lowercase, strip diacritics-free non-alphanumerics to hyphens, collapse and trim. */\n private slugify(text: string): string {\n return text\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/^-+|-+$/g, '');\n }\n\n /** Freeze a mutable node into a CngxTocItem, dropping empty children arrays. */\n private freeze(node: MutableItem): CngxTocItem {\n if (node.children.length === 0) {\n return { id: node.id, label: node.label };\n }\n return { id: node.id, label: node.label, children: node.children.map((child) => this.freeze(child)) };\n }\n}\n","<nav\n class=\"cngx-toc__nav\"\n [attr.aria-label]=\"navLabel()\"\n [cngxScrollSpy]=\"flatIds()\"\n [root]=\"contentRoot()\"\n [rootMargin]=\"rootMargin()\"\n [threshold]=\"threshold()\"\n>\n <ng-container *ngTemplateOutlet=\"list; context: { $implicit: resolvedItems(), depth: 0 }\" />\n</nav>\n\n<ng-template #list let-nodes let-depth=\"depth\">\n <ul class=\"cngx-toc__list\" [style.--cngx-toc-depth]=\"depth\">\n @for (item of nodes; track item.id) {\n <li class=\"cngx-toc__item\" [attr.data-active-trail]=\"activeTrail().includes(item.id) ? '' : null\">\n <a\n class=\"cngx-toc__link\"\n [href]=\"'#' + item.id\"\n [attr.aria-current]=\"activeId() === item.id ? 'location' : null\"\n (click)=\"handleActivate(item, $event)\"\n >\n @if (resolvedItemTpl(); as tpl) {\n <ng-container\n *ngTemplateOutlet=\"\n tpl;\n context: { $implicit: item, active: activeId() === item.id, depth: depth }\n \"\n />\n } @else {\n {{ item.label }}\n }\n </a>\n @if (item.children?.length) {\n <ng-container\n *ngTemplateOutlet=\"list; context: { $implicit: item.children, depth: depth + 1 }\"\n />\n }\n </li>\n }\n </ul>\n</ng-template>\n","import { afterNextRender, Directive, inject } from '@angular/core';\nimport { outputToObservable, takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';\nimport { ActivatedRoute, Router } from '@angular/router';\n\nimport { CNGX_TOC } from './toc-token';\n\n/**\n * Dev-warning emitted when `@angular/router` is absent. A deliberate small\n * local copy of the `@cngx/common/layout` kernel's warning rather than a\n * shared import - sharing would force the helper onto a `public-api.ts`, and\n * `warn*` matches no approved public-API prefix (same call the tabs and\n * sidenav sync directives make).\n *\n * @internal\n */\nfunction warnRouterAbsent(directive: string, enables: string): void {\n console.warn(\n `${directive}: no Router available - directive is a no-op. ` +\n `Provide @angular/router via provideRouter(...) to enable ${enables}.`,\n );\n}\n\n/**\n * Deep-links a `CngxToc` into the URL fragment. Opt-in via\n * `[cngxTocRouterSync]` on the same host as `<cngx-toc>`: activating a link\n * writes `#<section-id>` (replacing the history entry, so a scroll-driven rail\n * never floods the back stack), and a deep link like `/guide#pricing` scrolls\n * to that section once on load.\n *\n * Reaches the rail through the {@link CNGX_TOC} contract token, never the\n * concrete `CngxToc` class. The activation subscription is torn down with the\n * directive via `takeUntilDestroyed` - an `OutputRef` subscription would\n * otherwise outlive route changes. Without `@angular/router` the directive\n * dev-warns once and no-ops.\n *\n * @category ui/toc\n * @docsKind primary\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/toc/toc-router-sync.directive.ts\n * @since 0.1.0\n * @relatedTo CngxToc, CNGX_TOC\n * <example-url>http://localhost:4200/#/ui/toc/router/fragment-deep-link</example-url>\n */\n@Directive({\n selector: '[cngxTocRouterSync]',\n exportAs: 'cngxTocRouterSync',\n standalone: true,\n})\nexport class CngxTocRouterSync {\n private readonly toc = inject(CNGX_TOC, { host: true });\n private readonly router = inject(Router, { optional: true });\n private readonly route = inject(ActivatedRoute, { optional: true });\n\n constructor() {\n if (!this.router || !this.route) {\n afterNextRender(() => warnRouterAbsent('CngxTocRouterSync', 'fragment deep-linking'));\n return;\n }\n const router = this.router;\n\n // Write the fragment on every activation. replaceUrl keeps a scroll-driven\n // rail from pushing a history entry per section.\n outputToObservable(this.toc.activated)\n .pipe(takeUntilDestroyed())\n .subscribe((item) => {\n void router.navigate([], { fragment: item.id, replaceUrl: true });\n });\n\n // One-shot deep-link scroll: read the fragment present at load and bring\n // that section into view after the first render.\n const fragment = toSignal(this.route.fragment, {\n initialValue: this.route.snapshot.fragment,\n });\n afterNextRender(() => {\n const initial = fragment();\n if (initial) {\n this.toc.scrollTo(initial);\n }\n });\n }\n}\n","import type { CngxTocConfig } from './toc.config';\nimport type { CngxTocConfigFeature } from './provide-toc-config';\n\n/**\n * Override the toc's ARIA-string fallback - the accessible name of the `nav`\n * landmark that wraps the link list (default `'On this page'`).\n *\n * ```ts\n * provideTocConfig(withTocAriaLabels({ nav: 'Auf dieser Seite' }));\n * ```\n *\n * @category ui/toc\n * @since 0.1.0\n */\nexport function withTocAriaLabels(\n payload: NonNullable<CngxTocConfig['ariaLabels']>,\n): CngxTocConfigFeature {\n return { kind: 'ariaLabels', payload };\n}\n\n/**\n * Set the app-wide default scroll behaviour used when a link is activated.\n * `'smooth'` by default; the organism still swaps to `'auto'` at runtime\n * whenever `prefers-reduced-motion: reduce` matches, so this only chooses the\n * motion-allowed behaviour.\n *\n * ```ts\n * provideTocConfig(withTocScrollBehavior('auto'));\n * ```\n *\n * @category ui/toc\n * @since 0.1.0\n */\nexport function withTocScrollBehavior(\n scrollBehavior: NonNullable<CngxTocConfig['scrollBehavior']>,\n): CngxTocConfigFeature {\n return { kind: 'scrollBehavior', payload: { scrollBehavior } };\n}\n\n/**\n * Move the app-wide `CngxScrollSpy` defaults - the `rootMargin` and\n * `threshold` the rail forwards to its internal spy. Per-instance\n * `[rootMargin]` / `[threshold]` bindings still win; this only sets the\n * cascade default (e.g. a fixed-header offset every toc should share).\n *\n * ```ts\n * provideTocConfig(withTocSpy({ rootMargin: '-80px 0px 0px 0px' }));\n * ```\n *\n * @category ui/toc\n * @since 0.1.0\n */\nexport function withTocSpy(payload: NonNullable<CngxTocConfig['spy']>): CngxTocConfigFeature {\n return { kind: 'spy', payload };\n}\n\n/**\n * Register a global default item template. Resolves after a per-instance\n * `*cngxTocItem` slot and before the built-in plain-label rendering, so every\n * un-slotted toc renders the same custom item markup.\n *\n * ```ts\n * @Component({\n * viewProviders: [provideTocConfigAt(withTocTemplates({ item: myItemTpl }))],\n * })\n * ```\n *\n * @category ui/toc\n * @since 0.1.0\n */\nexport function withTocTemplates(\n payload: NonNullable<CngxTocConfig['templates']>,\n): CngxTocConfigFeature {\n return { kind: 'templates', payload };\n}\n","import {\n inject,\n makeEnvironmentProviders,\n type EnvironmentProviders,\n type Provider,\n} from '@angular/core';\n\nimport type { CngxTocConfig } from './toc.config';\nimport { CNGX_TOC_CONFIG, CNGX_TOC_DEFAULTS } from './toc.config.defaults';\n\n/**\n * Discriminated-union shape returned by the toc config features -\n * `withTocAriaLabels`, `withTocScrollBehavior`, `withTocSpy`, and\n * `withTocTemplates`. The\n * reducer in `provideTocConfig` / `provideTocConfigAt` matches on `kind` and\n * merges `payload` into the corresponding config sub-tree. Mirrors\n * `CngxBreadcrumbConfigFeature` so the consumer's mental model is one across\n * feature areas.\n *\n * @category ui/toc\n * @since 0.1.0\n */\nexport type CngxTocConfigFeature =\n | {\n readonly kind: 'ariaLabels';\n readonly payload: NonNullable<CngxTocConfig['ariaLabels']>;\n }\n | {\n readonly kind: 'scrollBehavior';\n readonly payload: { readonly scrollBehavior: NonNullable<CngxTocConfig['scrollBehavior']> };\n }\n | {\n readonly kind: 'spy';\n readonly payload: NonNullable<CngxTocConfig['spy']>;\n }\n | {\n readonly kind: 'templates';\n readonly payload: NonNullable<CngxTocConfig['templates']>;\n };\n\n/**\n * Reduces a list of feature objects into a partial config - last write wins\n * per sub-tree. Inner objects are spread-merged so partial overrides compose\n * cleanly with prior writes.\n *\n * @internal\n */\nfunction reduceFeatures(features: readonly CngxTocConfigFeature[]): Partial<CngxTocConfig> {\n const out: {\n ariaLabels?: NonNullable<CngxTocConfig['ariaLabels']>;\n scrollBehavior?: NonNullable<CngxTocConfig['scrollBehavior']>;\n spy?: NonNullable<CngxTocConfig['spy']>;\n templates?: NonNullable<CngxTocConfig['templates']>;\n } = {};\n for (const f of features) {\n switch (f.kind) {\n case 'ariaLabels':\n out.ariaLabels = { ...out.ariaLabels, ...f.payload };\n break;\n case 'scrollBehavior':\n out.scrollBehavior = f.payload.scrollBehavior;\n break;\n case 'spy':\n out.spy = { ...out.spy, ...f.payload };\n break;\n case 'templates':\n out.templates = { ...out.templates, ...f.payload };\n break;\n }\n }\n return out;\n}\n\n/**\n * Deep merge: the nested sub-trees (`ariaLabels` / `spy` / `templates`) are\n * spread-merged so a partial fills in missing keys without nuking unrelated\n * sub-trees; the flat scalar `scrollBehavior` takes the partial when present,\n * else the base. Inner objects are flat (one level), so a single spread per\n * key suffices.\n *\n * @internal\n */\nfunction mergeConfig(\n base: CngxTocConfig,\n partial: Partial<CngxTocConfig>,\n): CngxTocConfig {\n return {\n ariaLabels: { ...base.ariaLabels, ...partial.ariaLabels },\n scrollBehavior: partial.scrollBehavior ?? base.scrollBehavior,\n spy: { ...base.spy, ...partial.spy },\n templates: { ...base.templates, ...partial.templates },\n };\n}\n\n/**\n * Application-root configuration cascade for the toc organism. Pass any\n * combination of `withTocAriaLabels`, `withTocScrollBehavior`, `withTocSpy`,\n * and `withTocTemplates` features in `bootstrapApplication`'s providers array.\n *\n * Resolution priority (high -> low):\n * 1. Per-instance Input binding.\n * 2. `provideTocConfigAt(...)` in a parent component's `viewProviders`.\n * 3. `provideTocConfig(...)` at the application root.\n * 4. Library defaults (`CNGX_TOC_DEFAULTS`).\n *\n * The provider deep-merges supplied features with the library defaults so\n * consumers only declare keys they want to override.\n *\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideTocConfig(\n * withTocAriaLabels({ nav: 'On this page' }),\n * withTocScrollBehavior('smooth'),\n * ),\n * ],\n * });\n * ```\n *\n * @category ui/toc\n * @since 0.1.0\n */\nexport function provideTocConfig(...features: CngxTocConfigFeature[]): EnvironmentProviders {\n // Empty-features: skip the override so the root factory's CNGX_TOC_DEFAULTS\n // reference flows through untouched. A fresh mergeConfig(...) would allocate\n // identical content under a new reference and bust identity comparisons.\n if (features.length === 0) {\n return makeEnvironmentProviders([]);\n }\n const partial = reduceFeatures(features);\n return makeEnvironmentProviders([\n {\n provide: CNGX_TOC_CONFIG,\n useValue: mergeConfig(CNGX_TOC_DEFAULTS, partial),\n },\n ]);\n}\n\n/**\n * Component-scoped configuration cascade for the toc organism. Pass any\n * combination of feature factories in a parent component's `viewProviders`\n * array.\n *\n * Unlike `provideTocConfig` (root-only), `provideTocConfigAt` injects the\n * parent injector's `CNGX_TOC_CONFIG` value (resolves through the priority\n * chain) and deep-merges the supplied features on top. Descendant toc\n * instances see the merged config; sibling sub-trees keep the inherited value.\n *\n * ```ts\n * @Component({\n * viewProviders: [provideTocConfigAt(withTocScrollBehavior('auto'))],\n * template: '<cngx-toc [items]=\"toc\" contentRoot=\"#article\" />',\n * })\n * class Guide {}\n * ```\n *\n * @category ui/toc\n * @since 0.1.0\n */\nexport function provideTocConfigAt(...features: CngxTocConfigFeature[]): Provider[] {\n // Empty-features call: parent value flows through untouched. Skipping the\n // factory preserves reference identity through the sub-tree.\n if (features.length === 0) {\n return [];\n }\n const partial = reduceFeatures(features);\n return [\n {\n provide: CNGX_TOC_CONFIG,\n useFactory: () => {\n const parent = inject(CNGX_TOC_CONFIG, { skipSelf: true });\n return mergeConfig(parent, partial);\n },\n },\n ];\n}\n","/**\n * @module @cngx/ui/toc\n */\n\nexport { CngxToc } from './toc.component';\nexport { CngxTocRouterSync } from './toc-router-sync.directive';\nexport { CngxTocItemSlot } from './toc-item-slot';\nexport { CNGX_TOC, type CngxTocContract } from './toc-token';\nexport type { CngxTocItem, CngxTocItemContext } from './toc.types';\nexport type { CngxTocConfig } from './config/toc.config';\nexport { CNGX_TOC_CONFIG } from './config/toc.config.defaults';\nexport {\n withTocAriaLabels,\n withTocScrollBehavior,\n withTocSpy,\n withTocTemplates,\n} from './config/features';\nexport {\n provideTocConfig,\n provideTocConfigAt,\n type CngxTocConfigFeature,\n} from './config/provide-toc-config';\nexport { injectTocConfig } from './config/inject-toc-config';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAIA;;;;;;;;;;;;;AAaG;AACI,MAAM,iBAAiB,GAAkB;AAC9C,IAAA,UAAU,EAAE;AACV,QAAA,GAAG,EAAE,cAAc;AACpB,KAAA;AACD,IAAA,cAAc,EAAE,QAAQ;AACxB,IAAA,GAAG,EAAE;AACH,QAAA,UAAU,EAAE,KAAK;AACjB,QAAA,SAAS,EAAE,GAAG;AACf,KAAA;CACF;AAED;;;;;;;;;;;;;;;;;;AAkBG;MACU,eAAe,GAAG,IAAI,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C,EAAE;AACzB,QAAA,OAAO,wBAAwB,CAAC,EAAE,CAAC;IACrC;AACA,IAAA,MAAM,OAAO,GAAG,cAAc,CAAC,QAAQ,CAAC;AACxC,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA;AACE,YAAA,OAAO,EAAE,eAAe;AACxB,YAAA,QAAQ,EAAE,WAAW,CAAC,iBAAiB,EAAE,OAAO,CAAC;AAClD,SAAA;AACF,KAAA,CAAC;AACJ;AAEA;;;;;;;;;;;;;;;;;;;;AAoBG;AACG,SAAU,kBAAkB,CAAC,GAAG,QAAgC,EAAA;;;AAGpE,IAAA,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AACzB,QAAA,OAAO,EAAE;IACX;AACA,IAAA,MAAM,OAAO,GAAG,cAAc,CAAC,QAAQ,CAAC;IACxC,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,eAAe;YACxB,UAAU,EAAE,MAAK;AACf,gBAAA,MAAM,MAAM,GAAG,MAAM,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAC1D,gBAAA,OAAO,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC;YACrC,CAAC;AACF,SAAA;KACF;AACH;;AC/KA;;AAEG;;ACFH;;AAEG;;;;"}
|
package/fesm2022/cngx-ui.mjs
CHANGED
|
@@ -13,8 +13,8 @@ export { CngxFailed, CngxPending, CngxSucceeded } from '@cngx/common/interactive
|
|
|
13
13
|
* @cngx/ui/layout – CngxStack, CngxGrid
|
|
14
14
|
* @cngx/ui/overlay – CngxOverlay, CngxOverlayRef
|
|
15
15
|
*/
|
|
16
|
-
/** @internal
|
|
17
|
-
const VERSION = makeVersion('0.1.0-rc.
|
|
16
|
+
/** @internal - replaced at publish time, not part of consumer API. */
|
|
17
|
+
const VERSION = makeVersion('0.1.0-rc.7');
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Public API Surface of @cngx/ui
|
package/fesm2022/cngx-ui.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cngx-ui.mjs","sources":["../../../projects/ui/ui.ts","../../../projects/ui/public-api.ts","../../../projects/ui/cngx-ui.ts"],"sourcesContent":["/**\n * @cngx/ui\n *\n * UI components for cngx composable Angular extensions.\n * Secondary entry points:\n * @cngx/ui/layout – CngxStack, CngxGrid\n * @cngx/ui/overlay – CngxOverlay, CngxOverlayRef\n */\n\nimport { makeVersion } from '@cngx/utils';\n\n/** @internal
|
|
1
|
+
{"version":3,"file":"cngx-ui.mjs","sources":["../../../projects/ui/ui.ts","../../../projects/ui/public-api.ts","../../../projects/ui/cngx-ui.ts"],"sourcesContent":["/**\n * @cngx/ui\n *\n * UI components for cngx composable Angular extensions.\n * Secondary entry points:\n * @cngx/ui/layout – CngxStack, CngxGrid\n * @cngx/ui/overlay – CngxOverlay, CngxOverlayRef\n */\n\nimport { 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/ui\n *\n * Re-exports all secondary entry points for backwards compatibility.\n * Prefer importing from specific entry points:\n * @cngx/ui/action-button\n * @cngx/ui/empty-state\n * @cngx/ui/feedback\n * @cngx/ui/layout\n * @cngx/ui/mat-paginator\n * @cngx/ui/mat-stepper\n * @cngx/ui/mat-tabs\n * @cngx/ui/overlay\n * @cngx/ui/sidenav\n * @cngx/ui/skeleton\n * @cngx/ui/speak\n * @cngx/ui/stepper\n * @cngx/ui/tabs\n *\n * @module @cngx/ui\n */\n\nexport * from './ui';\nexport * from '@cngx/ui/action-button';\nexport * from '@cngx/ui/sidenav';\nexport * from '@cngx/ui/skeleton';\nexport * from '@cngx/ui/speak';\n\n// Re-export from @cngx/common/interactive for backwards compatibility\nexport { CngxPending, CngxSucceeded, CngxFailed } from '@cngx/common/interactive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAIH;MACa,OAAO,GAAG,WAAW,CAAC,mBAAmB;;ACZtD;;;;;;;;;;;;;;;;;;;;AAoBG;;ACpBH;;AAEG;;;;"}
|
package/mat-accordion/README.md
CHANGED
|
@@ -41,7 +41,7 @@ Bind `[(openIds)]` to a `ReadonlySet<string>` signal and `[multi]` to pick singl
|
|
|
41
41
|
```ts
|
|
42
42
|
protected readonly openIds = signal<ReadonlySet<string>>(new Set());
|
|
43
43
|
|
|
44
|
-
// Programmatic control
|
|
44
|
+
// Programmatic control - collapse everything:
|
|
45
45
|
this.openIds.set(new Set());
|
|
46
46
|
```
|
|
47
47
|
|
|
@@ -42,10 +42,13 @@
|
|
|
42
42
|
*
|
|
43
43
|
* **Material wiring**
|
|
44
44
|
*
|
|
45
|
-
* Every `--cngx-mat-tab-*` token
|
|
46
|
-
* oklch initial value, so a registered
|
|
47
|
-
* `var()` fallback - this stylesheet
|
|
48
|
-
* fallbacks of its own. The
|
|
45
|
+
* Every `--cngx-mat-tab-*` token except the has-errors glyph size is
|
|
46
|
+
* `@property`-registered with a literal oklch initial value, so a registered
|
|
47
|
+
* value always wins over an inline `var()` fallback - this stylesheet
|
|
48
|
+
* therefore carries no `--mat-sys-*` fallbacks of its own. The one exception,
|
|
49
|
+
* `--cngx-mat-tab-has-errors-glyph-size`, is deliberately left unregistered so
|
|
50
|
+
* its `rem` fallback scales with text-only zoom (see its note below). The
|
|
51
|
+
* Material alignment is delivered by the
|
|
49
52
|
* `@cngx/themes/material/tabs-theme` bridge (`@include tabs.theme($theme)`),
|
|
50
53
|
* which sets the colour tokens on `.mat-mdc-tab-group`:
|
|
51
54
|
*
|
|
@@ -132,15 +135,17 @@
|
|
|
132
135
|
initial-value: 6px;
|
|
133
136
|
}
|
|
134
137
|
|
|
135
|
-
|
|
136
|
-
* Diameter of the `has-errors` glyph disc.
|
|
137
|
-
* @
|
|
138
|
+
/*
|
|
139
|
+
* Diameter of the `has-errors` glyph disc. Intentionally NOT
|
|
140
|
+
* @property-registered - the one exception to the all-tokens-registered
|
|
141
|
+
* note above. A registered `<length>` computes a `rem` value to an absolute
|
|
142
|
+
* px once, pinning the badge to a fixed size and defeating text-only zoom.
|
|
143
|
+
* Left unregistered so the `var(--..., 1rem)` fallbacks at the glyph rule
|
|
144
|
+
* scale the disc and glyph together with the root font-size. Still
|
|
145
|
+
* consumer-overridable - set `--cngx-mat-tab-has-errors-glyph-size` on any
|
|
146
|
+
* ancestor and the `var()` use-sites pick it up; it just no longer appears on
|
|
147
|
+
* the compodoc Theming tab (unregistered tokens carry no typed metadata).
|
|
138
148
|
*/
|
|
139
|
-
@property --cngx-mat-tab-has-errors-glyph-size {
|
|
140
|
-
syntax: '<length>';
|
|
141
|
-
inherits: false;
|
|
142
|
-
initial-value: 16px;
|
|
143
|
-
}
|
|
144
149
|
|
|
145
150
|
/**
|
|
146
151
|
* Background of the `has-errors` glyph disc. Wired to `--mat-sys-error`
|
|
@@ -296,21 +301,20 @@
|
|
|
296
301
|
content: '!';
|
|
297
302
|
position: absolute;
|
|
298
303
|
top: var(--cngx-mat-tab-has-errors-glyph-offset, 4px);
|
|
299
|
-
right: var(--cngx-mat-tab-has-errors-glyph-offset, 4px);
|
|
300
304
|
inset-inline-end: var(--cngx-mat-tab-has-errors-glyph-offset, 4px);
|
|
301
305
|
inset-inline-start: auto;
|
|
302
306
|
bottom: auto;
|
|
303
307
|
display: inline-flex;
|
|
304
308
|
align-items: center;
|
|
305
309
|
justify-content: center;
|
|
306
|
-
width: var(--cngx-mat-tab-has-errors-glyph-size,
|
|
307
|
-
height: var(--cngx-mat-tab-has-errors-glyph-size,
|
|
310
|
+
width: var(--cngx-mat-tab-has-errors-glyph-size, 1rem);
|
|
311
|
+
height: var(--cngx-mat-tab-has-errors-glyph-size, 1rem);
|
|
308
312
|
margin: 0;
|
|
309
313
|
border: 0;
|
|
310
314
|
border-radius: 50%;
|
|
311
315
|
background: var(--cngx-mat-tab-has-errors-color, oklch(0.45 0.15 25));
|
|
312
316
|
color: var(--cngx-mat-tab-has-errors-glyph-color, oklch(1 0 0));
|
|
313
|
-
font-size: calc(var(--cngx-mat-tab-has-errors-glyph-size,
|
|
317
|
+
font-size: calc(var(--cngx-mat-tab-has-errors-glyph-size, 1rem) * 0.75);
|
|
314
318
|
font-weight: var(--cngx-mat-tab-has-errors-font-weight, 700);
|
|
315
319
|
line-height: 1;
|
|
316
320
|
pointer-events: none;
|
|
@@ -326,7 +330,6 @@
|
|
|
326
330
|
.mat-mdc-tab.cngx-mat-tab--error.cngx-mat-tab--has-errors::before,
|
|
327
331
|
.mat-mdc-tab-link.cngx-mat-tab--error.cngx-mat-tab--has-errors::before {
|
|
328
332
|
top: var(--cngx-mat-tab-has-errors-glyph-offset-stacked, 6px);
|
|
329
|
-
right: var(--cngx-mat-tab-has-errors-glyph-offset-stacked, 6px);
|
|
330
333
|
inset-inline-end: var(--cngx-mat-tab-has-errors-glyph-offset-stacked, 6px);
|
|
331
334
|
}
|
|
332
335
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cngx/ui",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.7",
|
|
4
4
|
"description": "Organism layer (layout, overlay, feedback, stepper, tabs) for the CNGX Angular component library. Material opt-in (mat-stepper, mat-tabs, material).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cngx",
|
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
"directory": "projects/ui"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
+
"@cngx/utils": "0.1.0-rc.7",
|
|
28
|
+
"@cngx/core": "0.1.0-rc.7",
|
|
29
|
+
"@cngx/common": "0.1.0-rc.7",
|
|
27
30
|
"@angular/cdk": "^21.2.0",
|
|
28
31
|
"@angular/common": "^21.2.0",
|
|
29
32
|
"@angular/core": "^21.2.0"
|
|
@@ -41,6 +44,10 @@
|
|
|
41
44
|
"types": "./types/cngx-ui.d.ts",
|
|
42
45
|
"default": "./fesm2022/cngx-ui.mjs"
|
|
43
46
|
},
|
|
47
|
+
"./a11y": {
|
|
48
|
+
"types": "./types/cngx-ui-a11y.d.ts",
|
|
49
|
+
"default": "./fesm2022/cngx-ui-a11y.mjs"
|
|
50
|
+
},
|
|
44
51
|
"./accordion": {
|
|
45
52
|
"types": "./types/cngx-ui-accordion.d.ts",
|
|
46
53
|
"default": "./fesm2022/cngx-ui-accordion.mjs"
|
|
@@ -53,10 +60,22 @@
|
|
|
53
60
|
"types": "./types/cngx-ui-breadcrumb.d.ts",
|
|
54
61
|
"default": "./fesm2022/cngx-ui-breadcrumb.mjs"
|
|
55
62
|
},
|
|
63
|
+
"./chart-panel": {
|
|
64
|
+
"types": "./types/cngx-ui-chart-panel.d.ts",
|
|
65
|
+
"default": "./fesm2022/cngx-ui-chart-panel.mjs"
|
|
66
|
+
},
|
|
56
67
|
"./collection": {
|
|
57
68
|
"types": "./types/cngx-ui-collection.d.ts",
|
|
58
69
|
"default": "./fesm2022/cngx-ui-collection.mjs"
|
|
59
70
|
},
|
|
71
|
+
"./command-palette": {
|
|
72
|
+
"types": "./types/cngx-ui-command-palette.d.ts",
|
|
73
|
+
"default": "./fesm2022/cngx-ui-command-palette.mjs"
|
|
74
|
+
},
|
|
75
|
+
"./context-menu": {
|
|
76
|
+
"types": "./types/cngx-ui-context-menu.d.ts",
|
|
77
|
+
"default": "./fesm2022/cngx-ui-context-menu.mjs"
|
|
78
|
+
},
|
|
60
79
|
"./data-grid-accordion": {
|
|
61
80
|
"types": "./types/cngx-ui-data-grid-accordion.d.ts",
|
|
62
81
|
"default": "./fesm2022/cngx-ui-data-grid-accordion.mjs"
|
|
@@ -109,6 +128,10 @@
|
|
|
109
128
|
"types": "./types/cngx-ui-speak.d.ts",
|
|
110
129
|
"default": "./fesm2022/cngx-ui-speak.mjs"
|
|
111
130
|
},
|
|
131
|
+
"./stat-card": {
|
|
132
|
+
"types": "./types/cngx-ui-stat-card.d.ts",
|
|
133
|
+
"default": "./fesm2022/cngx-ui-stat-card.mjs"
|
|
134
|
+
},
|
|
112
135
|
"./stepper": {
|
|
113
136
|
"types": "./types/cngx-ui-stepper.d.ts",
|
|
114
137
|
"default": "./fesm2022/cngx-ui-stepper.mjs"
|
|
@@ -116,6 +139,14 @@
|
|
|
116
139
|
"./tabs": {
|
|
117
140
|
"types": "./types/cngx-ui-tabs.d.ts",
|
|
118
141
|
"default": "./fesm2022/cngx-ui-tabs.mjs"
|
|
142
|
+
},
|
|
143
|
+
"./timeline": {
|
|
144
|
+
"types": "./types/cngx-ui-timeline.d.ts",
|
|
145
|
+
"default": "./fesm2022/cngx-ui-timeline.mjs"
|
|
146
|
+
},
|
|
147
|
+
"./toc": {
|
|
148
|
+
"types": "./types/cngx-ui-toc.d.ts",
|
|
149
|
+
"default": "./fesm2022/cngx-ui-toc.mjs"
|
|
119
150
|
}
|
|
120
151
|
},
|
|
121
152
|
"module": "fesm2022/cngx-ui.mjs",
|
package/skeleton/README.md
CHANGED
|
@@ -39,6 +39,7 @@ export class ExampleComponent {
|
|
|
39
39
|
- **Repetition:** Repeats placeholder template via `[count]` input
|
|
40
40
|
- **Shimmer animation:** Optional shimmer effect that respects `prefers-reduced-motion`
|
|
41
41
|
- **Async state integration:** Automatically hides when data arrives (via `[state]` input)
|
|
42
|
+
- **Flash suppression:** Debounces its first-load placeholder through `createVisibilityGate`, so a load faster than `CNGX_LOADING_CONFIG.showDelay` never flashes a skeleton and a shown skeleton stays for at least `minDwell`
|
|
42
43
|
- **DOM efficiency:** Uses `display: contents` - no wrapper overhead
|
|
43
44
|
- **ARIA:** Sets `aria-busy="true"` while loading
|
|
44
45
|
|
|
@@ -55,6 +56,7 @@ The component is composable with `CngxSkeletonPlaceholder` directive (content pr
|
|
|
55
56
|
`CngxSkeletonContainer` composes:
|
|
56
57
|
|
|
57
58
|
- **Async state integration:** Reads from `CngxAsyncState<T>` via `state()` input
|
|
59
|
+
- **Visibility gate:** `createVisibilityGate` from `@cngx/core/utils` for the show-delay / min-dwell flash suppression
|
|
58
60
|
- **Placeholder projection:** `CngxSkeletonPlaceholder` directive for template marking
|
|
59
61
|
- **Reduced motion detection:** Inline `matchMedia` listener for `prefers-reduced-motion`
|
|
60
62
|
|
package/stepper/README.md
CHANGED
|
@@ -37,9 +37,9 @@ The organism's body is template + reactive ARIA only. All state lives in the pre
|
|
|
37
37
|
The organism is W3C step-pattern compliant:
|
|
38
38
|
|
|
39
39
|
- Host element: `role="group"` + `aria-roledescription` (configurable via `withStepperFallbackLabels({ stepRoleDescription })`) + `aria-orientation` + `data-orientation` (for CSS hooks) + `aria-label` / `aria-labelledby`.
|
|
40
|
-
- Step button: `aria-current="step"` (when active) + `aria-controls="<step-id>-panel"` + `aria-disabled` (when disabled) + `aria-busy="true"` (during commit-action pending) + `aria-describedby="<step-id>-desc"` (
|
|
40
|
+
- Step button: `aria-current="step"` (when active) + `aria-controls="<step-id>-panel"` + `aria-disabled` (when disabled) + `aria-busy="true"` (during commit-action pending) + `aria-describedby="<step-id>-desc"` (the reference is emitted only while the step's SR status phrase is non-empty; the sr-only descriptor span itself always stays in the DOM).
|
|
41
41
|
- Step panel: `role="region"` + `aria-labelledby="<step-id>-header"` + `[hidden]="!isActive"`.
|
|
42
|
-
- Group header: `role="group"` + `aria-roledescription="step group"` + `data-step-depth` + `data-state` + `aria-describedby` (rolls up children's aggregated status).
|
|
42
|
+
- Group header: `role="group"` + `aria-roledescription="step group"` + `data-step-depth` + `data-state` + `aria-describedby` (rolls up children's aggregated status; the reference is gated off while no status applies).
|
|
43
43
|
- Live region: planned for Phase 3 commit-lifecycle SR announcements; deliberately NOT composed via `hostDirectives` because `CngxLiveRegion` would clobber the host's `role="group"` landmark.
|
|
44
44
|
|
|
45
45
|
## Skins
|