@cngx/ui 0.0.1-rc.0 → 0.1.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -48
- package/action-button/README.md +9 -11
- package/empty-state/README.md +11 -26
- package/feedback/README.md +3 -3
- package/fesm2022/cngx-ui-action-button.mjs +30 -26
- package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
- package/fesm2022/cngx-ui-empty-state.mjs +26 -21
- package/fesm2022/cngx-ui-empty-state.mjs.map +1 -1
- package/fesm2022/cngx-ui-feedback.mjs +498 -261
- package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
- package/fesm2022/cngx-ui-layout.mjs +32 -5
- package/fesm2022/cngx-ui-layout.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-stepper.mjs +79 -104
- package/fesm2022/cngx-ui-mat-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-tabs.mjs +111 -83
- package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-material.mjs +14 -3
- package/fesm2022/cngx-ui-material.mjs.map +1 -1
- package/fesm2022/cngx-ui-overlay.mjs +22 -3
- package/fesm2022/cngx-ui-overlay.mjs.map +1 -1
- package/fesm2022/cngx-ui-sidenav.mjs +107 -28
- package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
- package/fesm2022/cngx-ui-skeleton.mjs +61 -20
- package/fesm2022/cngx-ui-skeleton.mjs.map +1 -1
- package/fesm2022/cngx-ui-speak.mjs +14 -5
- package/fesm2022/cngx-ui-speak.mjs.map +1 -1
- package/fesm2022/cngx-ui-stepper.mjs +484 -161
- package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-tabs.mjs +75 -39
- package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui.mjs +2 -1
- package/fesm2022/cngx-ui.mjs.map +1 -1
- package/layout/README.md +9 -44
- package/mat-stepper/README.md +7 -10
- package/mat-tabs/README.md +13 -13
- package/mat-tabs/styles/mat-tabs.css +339 -213
- package/material/README.md +19 -19
- package/overlay/README.md +11 -11
- package/package.json +5 -4
- package/sidenav/README.md +4 -19
- package/skeleton/README.md +3 -17
- package/speak/README.md +15 -15
- package/stepper/README.md +139 -5
- package/tabs/README.md +4 -4
- package/theming/system-tokens.css +29 -0
- package/types/cngx-ui-action-button.d.ts +28 -13
- package/types/cngx-ui-empty-state.d.ts +21 -9
- package/types/cngx-ui-feedback.d.ts +437 -121
- package/types/cngx-ui-layout.d.ts +38 -8
- package/types/cngx-ui-mat-stepper.d.ts +58 -43
- package/types/cngx-ui-mat-tabs.d.ts +122 -72
- package/types/cngx-ui-material.d.ts +12 -1
- package/types/cngx-ui-overlay.d.ts +25 -4
- package/types/cngx-ui-sidenav.d.ts +106 -12
- package/types/cngx-ui-skeleton.d.ts +62 -8
- package/types/cngx-ui-speak.d.ts +10 -2
- package/types/cngx-ui-stepper.d.ts +280 -56
- package/types/cngx-ui-tabs.d.ts +38 -10
- package/types/cngx-ui.d.ts +1 -0
- package/speak/speak-button-theme.scss +0 -78
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cngx-ui-tabs.mjs","sources":["../../../projects/ui/tabs/tab-group.component.ts","../../../projects/ui/tabs/tab-group.component.html","../../../projects/ui/tabs/tab-overflow.component.ts","../../../projects/ui/tabs/tab-overflow.component.html","../../../projects/ui/tabs/public-api.ts","../../../projects/ui/tabs/cngx-ui-tabs.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n contentChild,\n contentChildren,\n ElementRef,\n inject,\n Injector,\n input,\n type Signal,\n type TemplateRef,\n} from '@angular/core';\n\nimport {\n CngxFocusRestore,\n CngxLiveRegion,\n CngxRovingItem,\n CngxRovingTabindex,\n} from '@cngx/common/a11y';\nimport {\n CNGX_DIRECTIVE_BY_ID_MAP_FACTORY,\n CNGX_ORGANISM_SCROLL_SYNC_FACTORY,\n CNGX_TABS_GLYPHS,\n CNGX_TAB_GROUP_HOST,\n CNGX_TAB_PANEL_HOST,\n CngxTab,\n CngxTabBusySpinner,\n CngxTabErrorBadge,\n CngxTabGroupPresenter,\n CngxTabRejectionIcon,\n createTabGroupAnnouncements,\n createTabGroupTemplateBindings,\n injectTabsConfig,\n injectTabsI18n,\n type CngxTabBusySpinnerContext,\n type CngxTabErrorBadgeContext,\n type CngxTabGroupAnnouncements,\n type CngxTabGroupTemplateBindings,\n type CngxTabHandle,\n type CngxTabPanelHost,\n type CngxTabRejectionIconContext,\n} from '@cngx/common/tabs';\n\n/**\n * CNGX tab-group organism. Thin shell over {@link CngxTabGroupPresenter}\n * + `CngxRovingTabindex` + `CngxFocusRestore` via `hostDirectives`.\n * Material variant lives at `[cngxMatTabs]` in `@cngx/ui/mat-tabs`.\n *\n * All ARIA attrs are signal-driven — never one-shot bindings.\n * `CngxLiveRegion` is mounted as a child `<span>` rather than a\n * host directive: its `role=\"status\"` would clobber the wrapper's\n * `role=\"group\"` landmark.\n */\n@Component({\n selector: 'cngx-tab-group',\n exportAs: 'cngxTabGroup',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet, CngxLiveRegion, CngxRovingItem],\n styleUrls: [\n '../../common/tabs/styles/tabs-base.css',\n './tab-group.component.css',\n ],\n hostDirectives: [\n {\n directive: CngxTabGroupPresenter,\n inputs: [\n 'activeIndex',\n 'orientation',\n 'loop',\n 'commitAction',\n 'commitMode',\n ],\n outputs: ['activeIndexChange'],\n },\n {\n directive: CngxRovingTabindex,\n inputs: ['orientation', 'loop'],\n },\n { directive: CngxFocusRestore },\n ],\n providers: [{ provide: CNGX_TAB_PANEL_HOST, useExisting: CngxTabGroup }],\n templateUrl: './tab-group.component.html',\n host: {\n role: 'group',\n '[attr.aria-roledescription]': 'announcements.tabsRoleDescription()',\n '[attr.aria-orientation]': 'presenter.orientation()',\n '[attr.data-orientation]': 'presenter.orientation()',\n '[attr.aria-label]': 'announcements.resolvedAriaLabel()',\n '[attr.aria-labelledby]': 'ariaLabelledBy()',\n '[class.cngx-tabs]': 'true',\n },\n})\nexport class CngxTabGroup implements CngxTabPanelHost {\n readonly ariaLabel = input<string | undefined>(undefined, {\n alias: 'aria-label',\n });\n readonly ariaLabelledBy = input<string | undefined>(undefined, {\n alias: 'aria-labelledby',\n });\n\n protected readonly presenter = inject(CNGX_TAB_GROUP_HOST);\n protected readonly i18n = injectTabsI18n();\n protected readonly config = injectTabsConfig();\n /** Default-glyph table for the template's fallback spans. Pillar 1. */\n protected readonly glyphs = CNGX_TABS_GLYPHS;\n private readonly hostElement: HTMLElement = inject<ElementRef<HTMLElement>>(\n ElementRef,\n ).nativeElement;\n private readonly injector = inject(Injector);\n private readonly tabDirectives = contentChildren(CngxTab, {\n descendants: true,\n });\n\n /**\n * Per-instance skin slots. Resolved via 3-stage cascade in {@link templates}:\n * `*cngxTab*` directive > `CNGX_TABS_CONFIG.templates.<key>` > built-in.\n * AOT (NG8110) requires `contentChild()` to be a direct field initialiser\n * on the variant — cascade resolution is delegated to the factory.\n */\n private readonly errorBadgeSlot = contentChild(CngxTabErrorBadge);\n private readonly rejectionIconSlot = contentChild(CngxTabRejectionIcon);\n private readonly busySpinnerSlot = contentChild(CngxTabBusySpinner);\n\n /**\n * AT-announcement bundle from `@cngx/common/tabs/announcements/`.\n * Owns role descriptions, resolved aria-label, live-region phrasing,\n * and the prior-active-index `linkedSignal` driving the success-arm\n * direction prefix.\n */\n protected readonly announcements: CngxTabGroupAnnouncements =\n createTabGroupAnnouncements({\n presenter: this.presenter,\n i18n: this.i18n,\n config: this.config,\n ariaLabel: this.ariaLabel,\n ariaLabelledBy: this.ariaLabelledBy,\n });\n\n constructor() {\n // Self-healing scroll loop: activeId change -> scrollIntoView ->\n // overflow IO sees new visibility -> More dropdown self-trims.\n // Policy is swappable via CNGX_ORGANISM_SCROLL_SYNC_FACTORY.\n inject(CNGX_ORGANISM_SCROLL_SYNC_FACTORY)({\n activeId: this.presenter.activeId,\n hostElement: this.hostElement,\n injector: this.injector,\n });\n }\n\n // Map<id, CngxTab> for O(1) labelTemplateFor / contentTemplateFor.\n // Structural equal on id-set + directive identity prevents cascade\n // on shape-stable contentChildren re-emissions.\n private readonly tabDirectiveById = inject(CNGX_DIRECTIVE_BY_ID_MAP_FACTORY)({\n source: this.tabDirectives,\n });\n\n /**\n * Resolved 3-stage cascade for `errorBadge`, `rejectionIcon`, `busySpinner`.\n * `null` -> render built-in default span.\n */\n protected readonly templates: CngxTabGroupTemplateBindings =\n createTabGroupTemplateBindings({\n errorBadgeSlot: this.errorBadgeSlot,\n rejectionIconSlot: this.rejectionIconSlot,\n busySpinnerSlot: this.busySpinnerSlot,\n config: this.config,\n });\n\n readonly tabs: Signal<readonly CngxTabHandle[]> = this.presenter.tabs;\n readonly activeIndex: Signal<number> = this.presenter.activeIndex;\n readonly activeId: Signal<string | null> = this.presenter.activeId;\n readonly orientation: Signal<'horizontal' | 'vertical'> =\n this.presenter.orientation;\n\n protected isSelected(tab: CngxTabHandle): boolean {\n return tab.id === this.activeId();\n }\n\n protected isTabBusy(tab: CngxTabHandle): boolean {\n if (this.presenter.commitState.status() !== 'pending') {\n return false;\n }\n const intended = this.presenter.intendedIndex();\n if (intended === undefined) {\n return false;\n }\n return this.tabs()[intended]?.id === tab.id;\n }\n\n protected tabHeaderId(tab: CngxTabHandle): string {\n return `${tab.id}-header`;\n }\n\n protected tabPanelId(tab: CngxTabHandle): string {\n return `${tab.id}-panel`;\n }\n\n protected tabDescriptorId(tab: CngxTabHandle): string {\n return `${tab.id}-desc`;\n }\n\n /** `true` when a bound error-aggregator opted in to revealing errors. */\n protected showErrorBadge(tab: CngxTabHandle): boolean {\n return !!tab.errorAggregator()?.shouldShow();\n }\n\n /**\n * Stable per-tab `*cngxTabErrorBadge` context cache. Context is\n * `{ tab }` only (no reactive fields), so a `WeakMap` keeps the\n * reference stable and lets `*ngTemplateOutlet`'s `Object.is`\n * input-diff short-circuit the embedded-view rebind.\n */\n private readonly errorBadgeContextCache = new WeakMap<\n CngxTabHandle,\n CngxTabErrorBadgeContext\n >();\n\n /** `WeakMap`-cached context for `*cngxTabErrorBadge`. Stable ref per tab. */\n protected errorBadgeContextFor(tab: CngxTabHandle): CngxTabErrorBadgeContext {\n let ctx = this.errorBadgeContextCache.get(tab);\n if (!ctx) {\n ctx = { tab };\n this.errorBadgeContextCache.set(tab, ctx);\n }\n return ctx;\n }\n\n /**\n * Context for `*cngxTabBusySpinner`. Allocates fresh per CD —\n * `intendedIndex` is reactive, and `*ngTemplateOutlet` only\n * re-evaluates `let-*` bindings when the context reference changes\n * (`Object.is` input-diff); a cached mutated object would leave\n * consumer bindings stale. `intendedIndex` is non-undefined by gate\n * — `isTabBusy(tab)` returning `true` requires it.\n */\n protected busySpinnerContextFor(\n tab: CngxTabHandle,\n ): CngxTabBusySpinnerContext {\n return { tab, intendedIndex: this.presenter.intendedIndex() ?? -1 };\n }\n\n /**\n * Context for `*cngxTabRejectionIcon`. `originLabel` matches the\n * `liveAnnouncement` priority chain so visual + SR phrasing align.\n * Allocates fresh per CD for the same reason as\n * {@link busySpinnerContextFor}.\n */\n protected rejectionIconContextFor(\n failedIndex: number,\n ): CngxTabRejectionIconContext {\n const originIdx = this.presenter.originIndexDuringCommit();\n const originLabel =\n originIdx !== undefined ? this.presenter.tabs()[originIdx]?.label() : undefined;\n return { failedIndex, originLabel };\n }\n\n protected handleHeaderClick(tab: CngxTabHandle): void {\n if (tab.disabled()) {\n return;\n }\n const idx = this.tabs().findIndex((t) => t.id === tab.id);\n if (idx >= 0) {\n this.presenter.select(idx);\n }\n }\n\n // CngxTabPanelHost contract — presenter owns clamping, disabled-skip,\n // commit-action gating.\n selectById(id: string): void {\n this.presenter.selectById(id);\n }\n\n /**\n * Clear the presenter's `lastFailedIndex` rejection flag — exposed\n * so template-ref consumers (`#tg=\"cngxTabGroup\"`) can dismiss the\n * decoration without injecting the host token.\n */\n clearLastFailed(): void {\n this.presenter.clearLastFailed();\n }\n\n labelTemplateFor(id: string): TemplateRef<unknown> | null {\n return (\n this.tabDirectiveById().get(id)?.labelTemplate()?.templateRef ?? null\n );\n }\n\n contentTemplateFor(id: string): TemplateRef<unknown> | null {\n return (\n this.tabDirectiveById().get(id)?.contentTemplate()?.templateRef ?? null\n );\n }\n}\n","<div class=\"cngx-tabs__strip-wrapper\">\n@let failedIdx = presenter.lastFailedIndex();\n<div\n class=\"cngx-tabs__strip\"\n role=\"tablist\"\n [attr.aria-orientation]=\"presenter.orientation()\"\n>\n @for (tab of tabs(); track tab.id; let i = $index) {\n <button\n type=\"button\"\n cngxRovingItem\n class=\"cngx-tabs__tab\"\n [class.cngx-tab--rejected]=\"failedIdx === i\"\n role=\"tab\"\n [id]=\"tabHeaderId(tab)\"\n [attr.aria-label]=\"announcements.tabAriaLabel(tab, i + 1)\"\n [attr.aria-selected]=\"isSelected(tab) ? 'true' : 'false'\"\n [attr.aria-controls]=\"tabPanelId(tab)\"\n [attr.aria-disabled]=\"tab.disabled() ? 'true' : null\"\n [attr.aria-busy]=\"isTabBusy(tab) ? 'true' : null\"\n [attr.aria-describedby]=\"tabDescriptorId(tab)\"\n [cngxRovingItemDisabled]=\"tab.disabled()\"\n (click)=\"handleHeaderClick(tab)\"\n >\n <span class=\"cngx-tabs__label\">\n @let labelTpl = labelTemplateFor(tab.id);\n @if (labelTpl) {\n <ng-container *ngTemplateOutlet=\"labelTpl\"></ng-container>\n } @else {\n {{ tab.label() }}\n }\n </span>\n @if (showErrorBadge(tab)) {\n @let errorBadgeTpl = templates.errorBadge();\n @if (errorBadgeTpl) {\n <ng-container\n *ngTemplateOutlet=\"\n errorBadgeTpl;\n context: errorBadgeContextFor(tab)\n \"\n ></ng-container>\n } @else {\n <span class=\"cngx-tabs__badge\" aria-hidden=\"true\">{{\n glyphs.errorBadge\n }}</span>\n }\n }\n @if (failedIdx === i) {\n @let rejectionIconTpl = templates.rejectionIcon();\n @if (rejectionIconTpl) {\n <ng-container\n *ngTemplateOutlet=\"\n rejectionIconTpl;\n context: rejectionIconContextFor(i)\n \"\n ></ng-container>\n } @else {\n <span class=\"cngx-tabs__rejection-icon\" aria-hidden=\"true\">{{\n glyphs.rejectionIcon\n }}</span>\n }\n }\n @if (isTabBusy(tab)) {\n @let busySpinnerTpl = templates.busySpinner();\n @if (busySpinnerTpl) {\n <ng-container\n *ngTemplateOutlet=\"\n busySpinnerTpl;\n context: busySpinnerContextFor(tab)\n \"\n ></ng-container>\n } @else {\n <span class=\"cngx-tabs__busy-spinner\" aria-hidden=\"true\"></span>\n }\n }\n <span class=\"cngx-sr-only\" [id]=\"tabDescriptorId(tab)\">{{\n announcements.statusPhrase(tab)\n }}</span>\n </button>\n }\n</div>\n<ng-content select=\"cngx-tab-overflow\"></ng-content>\n</div>\n\n<div class=\"cngx-tabs__panels\">\n @for (tab of tabs(); track tab.id) {\n <div\n class=\"cngx-tabs__panel\"\n role=\"tabpanel\"\n [id]=\"tabPanelId(tab)\"\n [attr.aria-labelledby]=\"tabHeaderId(tab)\"\n [attr.aria-roledescription]=\"announcements.tabPanelRoleDescription()\"\n [hidden]=\"!isSelected(tab)\"\n >\n @let contentTpl = contentTemplateFor(tab.id);\n @if (contentTpl) {\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container>\n }\n </div>\n }\n</div>\n\n<span class=\"cngx-tabs__live-region cngx-sr-only\" cngxLiveRegion>{{\n announcements.liveAnnouncement()\n}}</span>\n\n<!--\n Generic slot for opt-in skin sub-components other than the\n overflow molecule (which projects into the strip-wrapper via the\n named `select=\"cngx-tab-overflow\"` slot above). Projected content\n sees `CNGX_TAB_PANEL_HOST` via the organism's provider, so\n molecules inject the contract without reaching for the concrete\n `CngxTabGroup` class.\n-->\n<ng-content></ng-content>\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n isDevMode,\n linkedSignal,\n untracked,\n viewChild,\n} from '@angular/core';\n\nimport { CngxActiveDescendant } from '@cngx/common/a11y';\nimport { CngxClickOutside } from '@cngx/common/interactive';\nimport { CngxPopover, CngxPopoverTrigger } from '@cngx/common/popover';\nimport {\n CNGX_DOM_ANCHOR_RETRY_FACTORY,\n CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY,\n CNGX_TAB_PANEL_HOST,\n CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY,\n CngxTabOverflowItem,\n CngxTabOverflowTrigger,\n createTabOverflowTemplateBindings,\n injectTabsConfig,\n injectTabsI18n,\n tabOverflowOptionId,\n type CngxDomAnchorRetryHandle,\n type CngxTabHandle,\n type CngxTabPanelHost,\n} from '@cngx/common/tabs';\n\n/** Structural equal for `hiddenTabs` — same ids in same order. */\nfunction tabIdListEqual(\n a: readonly CngxTabHandle[],\n b: readonly CngxTabHandle[],\n): boolean {\n if (a === b) {\n return true;\n }\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; i++) {\n if (a[i].id !== b[i].id) {\n return false;\n }\n }\n return true;\n}\n\n/** Auto-open keys for the trigger button (APG combobox). */\nconst NAV_OPEN_KEYS = new Set(['ArrowDown', 'ArrowUp', 'Home', 'End']);\n\n/**\n * Structural equal for `visibilityState`. Without this, the\n * `update((prev) => new Map(prev))` cycle in `handleIntersections`\n * cascades into `hiddenTabs` on every IO fire even when no tab\n * actually flipped visibility.\n */\nfunction mapBoolEqual(\n a: ReadonlyMap<string, boolean>,\n b: ReadonlyMap<string, boolean>,\n): boolean {\n if (a === b) {\n return true;\n }\n if (a.size !== b.size) {\n return false;\n }\n for (const [key, value] of a) {\n if (b.get(key) !== value) {\n return false;\n }\n }\n return true;\n}\n\n\n/**\n * Opt-in overflow indicator for `<cngx-tab-group>`. Surfaces clipped\n * tab buttons through a \"More\" `CngxPopover` dropdown. Talks to the\n * organism only via {@link CNGX_TAB_PANEL_HOST}.\n *\n * Visibility is tracked through a native `IntersectionObserver`\n * rooted on the parent strip — `CngxIntersectionObserver` doesn't\n * fit (single-element scope, can't reach sibling `viewChildren`).\n * `threshold: 0` — only fully-clipped tabs surface. Combined with\n * the organism's `scrollIntoView` effect this forms the self-healing\n * loop: pick hidden tab -> strip scrolls -> IO fires -> `hiddenTabs`\n * self-trims.\n */\n@Component({\n selector: 'cngx-tab-overflow',\n exportAs: 'cngxTabOverflow',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgTemplateOutlet,\n CngxActiveDescendant,\n CngxClickOutside,\n CngxPopover,\n CngxPopoverTrigger,\n ],\n templateUrl: './tab-overflow.component.html',\n styleUrls: ['./tab-overflow.component.css'],\n host: {\n '[class.cngx-tab-overflow]': 'true',\n },\n})\nexport class CngxTabOverflow {\n // Projected via <ng-content>, so DI walks up to the parent's injector.\n // `{ host: true }` would scope to the molecule and miss the provider.\n protected readonly panelHost: CngxTabPanelHost = inject(CNGX_TAB_PANEL_HOST);\n protected readonly i18n = injectTabsI18n();\n protected readonly popover = viewChild.required(CngxPopover);\n private readonly adRef = viewChild.required(CngxActiveDescendant);\n\n private readonly hostElement: HTMLElement = inject<ElementRef<HTMLElement>>(\n ElementRef,\n ).nativeElement;\n private readonly destroyRef = inject(DestroyRef);\n\n // DOM-resolution strategy. Default factory targets the cngx-native\n // strip selectors; Material/custom variants swap via providers.\n private readonly adapter = inject(\n CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY,\n )();\n\n // tab id -> visibility. `undefined` = not yet observed (treat as\n // visible — prevents More-button flash on first render).\n // `linkedSignal` prunes stale ids when the tabs list changes;\n // observer re-attach lives in the effect below. `mapBoolEqual`\n // suppresses identity-only re-emissions from the IO callback.\n private readonly visibilityState = linkedSignal<\n readonly CngxTabHandle[],\n ReadonlyMap<string, boolean>\n >({\n source: () => this.panelHost.tabs(),\n computation: (tabs, prev) => {\n if (!prev) {\n return new Map();\n }\n const liveIds = new Set(tabs.map((t) => t.id));\n const next = new Map<string, boolean>();\n for (const [id, vis] of prev.value) {\n if (liveIds.has(id)) {\n next.set(id, vis);\n }\n }\n return next;\n },\n equal: mapBoolEqual,\n });\n\n protected readonly hiddenTabs = computed<readonly CngxTabHandle[]>(\n () => {\n const visMap = this.visibilityState();\n return this.panelHost.tabs().filter((t) => visMap.get(t.id) === false);\n },\n { equal: tabIdListEqual },\n );\n\n protected readonly hasHiddenTabs = computed(\n () => this.hiddenTabs().length > 0,\n { equal: Object.is },\n );\n\n // Counter projected into trigger label + aria-label. Explicit\n // computed isolates `Object.is` distinct-gate from `hiddenTabs`\n // identity churn — prevents flicker on length-equal re-emissions.\n protected readonly hiddenCount = computed(() => this.hiddenTabs().length);\n\n // ARIA menu-button pattern: <button aria-haspopup=\"menu\"> + popover\n // role=\"menu\". Quick-jump navigation (selectById is not a value\n // commit), so menu/menuitem is correct — listbox/option implies\n // persistent aria-selected. WAI-ARIA 1.2 §combobox forbids\n // aria-haspopup=\"menu\", so combobox is deliberately not used.\n protected readonly adItemId = tabOverflowOptionId;\n\n // Read first — TS field-init order; downstream fields snapshot off this.\n private readonly tabsConfig = injectTabsConfig();\n\n // 3-stage cascade: directive > config.templates.overflow* > built-in.\n // `contentChild` must be a field-direct initializer (Angular AOT).\n private readonly triggerSlot = contentChild(CngxTabOverflowTrigger);\n private readonly itemSlot = contentChild(CngxTabOverflowItem);\n protected readonly templates = createTabOverflowTemplateBindings({\n triggerSlot: this.triggerSlot,\n itemSlot: this.itemSlot,\n config: this.tabsConfig,\n hiddenCount: this.hiddenCount,\n hiddenTabs: this.hiddenTabs,\n pickTab: (tab) => this.pickTab(tab),\n });\n\n private observer: IntersectionObserver | null = null;\n // Variant-agnostic target -> id lookup. cngx-native uses\n // `${id}-header`, Material `mat-tab-group-N-label-M`.\n private readonly targetToHandleId = new WeakMap<HTMLElement, string>();\n\n // IO-debounce knobs — see `CngxTabsConfig.overflowStabilizeMs` /\n // `.overflowMaxDeferMs` for semantics. Captured once at construction.\n private readonly stabilizeMs = this.tabsConfig.overflowStabilizeMs ?? 100;\n private readonly maxDeferMs = this.tabsConfig.overflowMaxDeferMs ?? 250;\n private stabilizeHandle: ReturnType<typeof setTimeout> | null = null;\n private pendingEntries: IntersectionObserverEntry[] = [];\n // performance.now() of the first entry since the last commit; null\n // between commits. Drives the max-defer cap.\n private firstPendingAt: number | null = null;\n\n // rAF-scheduled IO attach retry. `display: none` toggles do NOT\n // recover — unmount/remount is required to re-arm. Policy swap\n // via CNGX_DOM_ANCHOR_RETRY_FACTORY.\n private readonly attachRetry: CngxDomAnchorRetryHandle =\n inject(CNGX_DOM_ANCHOR_RETRY_FACTORY)({\n attempt: () => {\n const root = this.resolveStrip();\n if (!root) {\n return null;\n }\n // threshold: 0 — any visible pixel = \"in the strip\". Drives\n // the self-healing loop with the organism's scrollIntoView.\n this.observer = new IntersectionObserver(\n (entries) => this.handleIntersections(entries),\n { root, threshold: 0 },\n );\n this.observeCurrentTabs();\n return true;\n },\n maxAttempts: 60,\n schedule: (cb) => {\n const handle = requestAnimationFrame(cb);\n return () => cancelAnimationFrame(handle);\n },\n onGiveUp: () => {\n if (isDevMode()) {\n console.warn(\n '[CngxTabOverflow] Strip wrapper not found after 60 attach ' +\n 'attempts; the More popover will not surface clipped tabs. ' +\n 'Verify the molecule is projected inside <cngx-tab-group> ' +\n 'via its <ng-content> slot.',\n );\n }\n },\n });\n\n constructor() {\n afterNextRender(() => this.attachRetry.start());\n\n // Re-observe on tab-list change. Stale-id pruning is derived in\n // `visibilityState`'s linkedSignal source.\n effect(() => {\n this.panelHost.tabs();\n untracked(() => {\n if (!this.observer) {\n return;\n }\n this.observer.disconnect();\n this.observeCurrentTabs();\n });\n });\n\n inject(CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY)(\n this.popover,\n this.adRef,\n );\n\n this.destroyRef.onDestroy(() => {\n this.attachRetry.cancel();\n if (this.stabilizeHandle !== null) {\n clearTimeout(this.stabilizeHandle);\n this.stabilizeHandle = null;\n }\n this.firstPendingAt = null;\n this.pendingEntries.length = 0;\n this.observer?.disconnect();\n this.observer = null;\n });\n }\n\n protected pickTab(tab: CngxTabHandle): void {\n this.panelHost.selectById(tab.id);\n this.popover().hide();\n }\n\n /** AD `(activated)` — Enter / Space on a highlighted option picks. */\n protected handleAdActivated(value: unknown): void {\n const tab = value as CngxTabHandle;\n if (tab?.id) {\n this.pickTab(tab);\n }\n }\n\n /**\n * Auto-opens popover on nav-key when collapsed. AD's host listener\n * fires first, so `activeIndex` is already set when this runs.\n * No-op while open — AD owns navigation.\n */\n protected handleTriggerKeydown(event: KeyboardEvent): void {\n if (this.popover().isVisible() || !this.hasHiddenTabs()) {\n return;\n }\n if (NAV_OPEN_KEYS.has(event.key)) {\n this.popover().show();\n }\n }\n\n private observeCurrentTabs(): void {\n if (!this.observer) {\n return;\n }\n const root = this.resolveStrip();\n if (!root) {\n return;\n }\n const tabs = this.panelHost.tabs();\n for (let idx = 0; idx < tabs.length; idx++) {\n const button = this.adapter.resolveTabButton(tabs[idx], root, idx);\n if (button) {\n this.targetToHandleId.set(button, tabs[idx].id);\n this.observer.observe(button);\n }\n }\n }\n\n private handleIntersections(entries: IntersectionObserverEntry[]): void {\n // Buffer entries; signal write deferred to commitPendingVisibility\n // once IO settles for stabilizeMs (capped by maxDeferMs).\n for (const entry of entries) {\n this.pendingEntries.push(entry);\n }\n const now = performance.now();\n this.firstPendingAt ??= now;\n if (this.stabilizeHandle !== null) {\n clearTimeout(this.stabilizeHandle);\n }\n // Wait min(stabilizeMs, remaining max-defer). Math.max(0, …)\n // guards a negative remaining after a long task.\n const elapsed = now - this.firstPendingAt;\n const maxDeferRemaining = this.maxDeferMs - elapsed;\n const wait = Math.max(\n 0,\n Math.min(this.stabilizeMs, maxDeferRemaining),\n );\n this.stabilizeHandle = setTimeout(\n () => this.commitPendingVisibility(),\n wait,\n );\n }\n\n private commitPendingVisibility(): void {\n this.stabilizeHandle = null;\n this.firstPendingAt = null;\n const entries = this.pendingEntries;\n if (entries.length === 0) {\n return;\n }\n this.pendingEntries = [];\n this.visibilityState.update((prev) => {\n const next = new Map(prev);\n for (const entry of entries) {\n const target = entry.target as HTMLElement;\n const tabId = this.targetToHandleId.get(target);\n if (tabId === undefined) {\n // Stale registration during disconnect/observeCurrentTabs\n // churn — skip rather than mis-key.\n continue;\n }\n // threshold: 0 — partially-clipped stays visible; only\n // fully-clipped surfaces as hidden.\n next.set(tabId, entry.isIntersecting);\n }\n return next;\n });\n }\n\n /**\n * IO-root resolution via the injected adapter. Returns `null`\n * before the molecule is anchored — the rAF retry loop re-polls.\n */\n private resolveStrip(): HTMLElement | null {\n return this.adapter.resolveStripRoot(this.panelHost, this.hostElement);\n }\n}\n","<button\n type=\"button\"\n class=\"cngx-tab-overflow__trigger\"\n cngxActiveDescendant\n #ad=\"cngxActiveDescendant\"\n [items]=\"templates.adItems()\"\n [cngxPopoverTrigger]=\"overflowPopover\"\n [haspopup]=\"'menu'\"\n [hidden]=\"!hasHiddenTabs()\"\n [attr.aria-label]=\"i18n.moreTabsLabel(hiddenCount())\"\n (activated)=\"handleAdActivated($event)\"\n (keydown)=\"handleTriggerKeydown($event)\"\n (click)=\"overflowPopover.toggle()\"\n>\n @let triggerTpl = templates.triggerTemplate();\n @if (triggerTpl) {\n <ng-container\n *ngTemplateOutlet=\"triggerTpl; context: templates.triggerContext()\"\n />\n } @else {\n {{ i18n.moreTabsLabel(hiddenCount()) }}\n }\n</button>\n\n<div\n cngxPopover\n #overflowPopover=\"cngxPopover\"\n cngxClickOutside\n [eventType]=\"'click'\"\n [enabled]=\"overflowPopover.isVisible()\"\n (clickOutside)=\"overflowPopover.hide()\"\n role=\"menu\"\n class=\"cngx-tab-overflow__panel\"\n placement=\"bottom-end\"\n panelClass=\"cngx-tab-overflow__panel-surface\"\n [attr.aria-label]=\"i18n.moreTabsLabel(hiddenCount())\"\n>\n <!--\n `role=\"presentation\"` flattens the <ul> away from the\n accessibility tree so each <li role=\"menuitem\"> is exposed as a\n direct child of the role=\"menu\" landmark on the popover surface.\n Each item carries a stable id derived from the tab handle id;\n CngxActiveDescendant on the trigger steers `aria-activedescendant`\n at one of these ids while the user navigates with\n ArrowUp/Down/Home/End/typeahead. The popover is a quick-jump\n navigation surface — selecting an item triggers `selectById`,\n not a value commit — so menu/menuitem is the spec-correct pattern\n (listbox/option carries `aria-selected` semantics that do not\n apply to a transient navigation popup).\n -->\n <ul class=\"cngx-tab-overflow__list\" role=\"presentation\">\n @for (tab of hiddenTabs(); track tab.id; let i = $index) {\n <li\n role=\"menuitem\"\n class=\"cngx-tab-overflow__item\"\n [class.cngx-tab-overflow__item--active]=\"ad.activeId() === adItemId(tab)\"\n [id]=\"adItemId(tab)\"\n [attr.data-tab-id]=\"tab.id\"\n [attr.aria-disabled]=\"tab.disabled() ? 'true' : 'false'\"\n (click)=\"!tab.disabled() && pickTab(tab)\"\n >\n @let itemTpl = templates.itemTemplate();\n @if (itemTpl) {\n <ng-container\n *ngTemplateOutlet=\"itemTpl; context: templates.buildItemContext(tab, i)\"\n />\n } @else {\n {{ tab.label() ?? tab.id }}\n }\n </li>\n }\n </ul>\n</div>\n","/**\n * @module @cngx/ui/tabs\n */\nexport { CngxTabGroup } from './tab-group.component';\nexport { CngxTabOverflow } from './tab-overflow.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AA4CA;;;;;;;;;AASG;MAyCU,YAAY,CAAA;IACd,SAAS,GAAG,KAAK,CAAqB,SAAS,iFACtD,KAAK,EAAE,YAAY,EAAA,CACnB;IACO,cAAc,GAAG,KAAK,CAAqB,SAAS,sFAC3D,KAAK,EAAE,iBAAiB,EAAA,CACxB;AAEiB,IAAA,SAAS,GAAG,MAAM,CAAC,mBAAmB,CAAC;IACvC,IAAI,GAAG,cAAc,EAAE;IACvB,MAAM,GAAG,gBAAgB,EAAE;;IAE3B,MAAM,GAAG,gBAAgB;AAC3B,IAAA,WAAW,GAAg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EG;;;;"}
|
|
1
|
+
{"version":3,"file":"cngx-ui-tabs.mjs","sources":["../../../projects/ui/tabs/tab-group.component.ts","../../../projects/ui/tabs/tab-group.component.html","../../../projects/ui/tabs/tab-overflow.component.ts","../../../projects/ui/tabs/tab-overflow.component.html","../../../projects/ui/tabs/public-api.ts","../../../projects/ui/tabs/cngx-ui-tabs.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n contentChild,\n contentChildren,\n ElementRef,\n inject,\n Injector,\n input,\n type Signal,\n type TemplateRef,\n} from '@angular/core';\n\nimport {\n CngxFocusRestore,\n CngxLiveRegion,\n CngxRovingItem,\n CngxRovingTabindex,\n} from '@cngx/common/a11y';\nimport {\n CNGX_DIRECTIVE_BY_ID_MAP_FACTORY,\n CNGX_ORGANISM_SCROLL_SYNC_FACTORY,\n CNGX_TABS_GLYPHS,\n CNGX_TAB_GROUP_HOST,\n CNGX_TAB_PANEL_HOST,\n CngxTab,\n CngxTabBusySpinner,\n CngxTabErrorBadge,\n CngxTabGroupPresenter,\n CngxTabRejectionIcon,\n createTabGroupAnnouncements,\n createTabGroupTemplateBindings,\n injectTabsConfig,\n injectTabsI18n,\n type CngxTabBusySpinnerContext,\n type CngxTabErrorBadgeContext,\n type CngxTabGroupAnnouncements,\n type CngxTabGroupTemplateBindings,\n type CngxTabHandle,\n type CngxTabPanelHost,\n type CngxTabRejectionIconContext,\n} from '@cngx/common/tabs';\n\n/**\n * CNGX tab-group organism. Thin shell over {@link CngxTabGroupPresenter}\n * + `CngxRovingTabindex` + `CngxFocusRestore` via `hostDirectives`.\n * Material variant lives at `[cngxMatTabs]` in `@cngx/ui/mat-tabs`.\n *\n * All ARIA attrs are signal-driven - never one-shot bindings.\n * `CngxLiveRegion` is mounted as a child `<span>` rather than a\n * host directive: its `role=\"status\"` would clobber the wrapper's\n * `role=\"group\"` landmark.\n *\n * @playground Form error aggregation ./examples/form-errors/form-errors.component.ts\n * @see {@link CngxMatTabs} for the Material `<mat-tab-group>` variant with `[cngxMatTabError]`.\n *\n * @category ui/tabs\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/tabs/tab-group.component.ts\n * @since 0.1.0\n * @relatedTo CngxTabOverflow, CngxTabGroupPresenter, CngxTab, CngxRovingTabindex, CngxFocusRestore\n * <example-url>http://localhost:4200/#/ui/tabs/tab-commit-action/optimistic-pessimistic-commits-with-bridge-directives</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-error-aggregation/per-tab-error-badges</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-group-vertical/vertical-sidebar-tabs</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-group/three-tab-navigation</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-overflow/8-tabs-in-a-narrow-container</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-busy-spinner-via-code-cngxtabbusyspinner-code</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-error-badge-via-code-cngxtaberrorbadge-code</example-url>\n * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/rejection-decoration-via-code-cngxtabrejectionicon-code</example-url>\n */\n@Component({\n selector: 'cngx-tab-group',\n exportAs: 'cngxTabGroup',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet, CngxLiveRegion, CngxRovingItem],\n styleUrls: ['../../common/tabs/styles/tabs-base.css', './tab-group.component.css'],\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [\n {\n directive: CngxTabGroupPresenter,\n inputs: ['activeIndex', 'orientation', 'loop', 'commitAction', 'commitMode'],\n outputs: ['activeIndexChange'],\n },\n {\n directive: CngxRovingTabindex,\n inputs: ['orientation', 'loop'],\n },\n { directive: CngxFocusRestore },\n ],\n providers: [{ provide: CNGX_TAB_PANEL_HOST, useExisting: CngxTabGroup }],\n templateUrl: './tab-group.component.html',\n host: {\n class: 'cngx-tab-group',\n role: 'group',\n '[attr.aria-roledescription]': 'announcements.tabsRoleDescription()',\n '[attr.aria-orientation]': 'presenter.orientation()',\n '[attr.data-orientation]': 'presenter.orientation()',\n '[attr.aria-label]': 'announcements.resolvedAriaLabel()',\n '[attr.aria-labelledby]': 'ariaLabelledBy()',\n '[class.cngx-tabs]': 'true',\n },\n})\nexport class CngxTabGroup implements CngxTabPanelHost {\n readonly ariaLabel = input<string | undefined>(undefined, {\n alias: 'aria-label',\n });\n readonly ariaLabelledBy = input<string | undefined>(undefined, {\n alias: 'aria-labelledby',\n });\n\n protected readonly presenter = inject(CNGX_TAB_GROUP_HOST);\n protected readonly i18n = injectTabsI18n();\n protected readonly config = injectTabsConfig();\n /** Default-glyph table for the template's fallback spans. Pillar 1. */\n protected readonly glyphs = CNGX_TABS_GLYPHS;\n private readonly hostElement: HTMLElement =\n inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private readonly injector = inject(Injector);\n private readonly tabDirectives = contentChildren(CngxTab, {\n descendants: true,\n });\n\n /**\n * Per-instance skin slots. Resolved via 3-stage cascade in {@link templates}:\n * `*cngxTab*` directive > `CNGX_TABS_CONFIG.templates.<key>` > built-in.\n * AOT (NG8110) requires `contentChild()` to be a direct field initialiser\n * on the variant - cascade resolution is delegated to the factory.\n */\n private readonly errorBadgeSlot = contentChild(CngxTabErrorBadge);\n private readonly rejectionIconSlot = contentChild(CngxTabRejectionIcon);\n private readonly busySpinnerSlot = contentChild(CngxTabBusySpinner);\n\n /**\n * AT-announcement bundle from `@cngx/common/tabs/announcements/`.\n * Owns role descriptions, resolved aria-label, live-region phrasing,\n * and the prior-active-index `linkedSignal` driving the success-arm\n * direction prefix.\n */\n protected readonly announcements: CngxTabGroupAnnouncements = createTabGroupAnnouncements({\n presenter: this.presenter,\n i18n: this.i18n,\n config: this.config,\n ariaLabel: this.ariaLabel,\n ariaLabelledBy: this.ariaLabelledBy,\n });\n\n constructor() {\n // Self-healing scroll loop: activeId change -> scrollIntoView ->\n // overflow IO sees new visibility -> More dropdown self-trims.\n // Policy is swappable via CNGX_ORGANISM_SCROLL_SYNC_FACTORY.\n inject(CNGX_ORGANISM_SCROLL_SYNC_FACTORY)({\n activeId: this.presenter.activeId,\n hostElement: this.hostElement,\n injector: this.injector,\n });\n }\n\n // Map<id, CngxTab> for O(1) labelTemplateFor / contentTemplateFor.\n // Structural equal on id-set + directive identity prevents cascade\n // on shape-stable contentChildren re-emissions.\n private readonly tabDirectiveById = inject(CNGX_DIRECTIVE_BY_ID_MAP_FACTORY)({\n source: this.tabDirectives,\n });\n\n /**\n * Resolved 3-stage cascade for `errorBadge`, `rejectionIcon`, `busySpinner`.\n * `null` -> render built-in default span.\n */\n protected readonly templates: CngxTabGroupTemplateBindings = createTabGroupTemplateBindings({\n errorBadgeSlot: this.errorBadgeSlot,\n rejectionIconSlot: this.rejectionIconSlot,\n busySpinnerSlot: this.busySpinnerSlot,\n config: this.config,\n });\n\n readonly tabs: Signal<readonly CngxTabHandle[]> = this.presenter.tabs;\n readonly activeIndex: Signal<number> = this.presenter.activeIndex;\n readonly activeId: Signal<string | null> = this.presenter.activeId;\n readonly orientation: Signal<'horizontal' | 'vertical'> = this.presenter.orientation;\n\n protected isSelected(tab: CngxTabHandle): boolean {\n return tab.id === this.activeId();\n }\n\n protected isTabBusy(tab: CngxTabHandle): boolean {\n if (this.presenter.commitState.status() !== 'pending') {\n return false;\n }\n const intended = this.presenter.intendedIndex();\n if (intended === undefined) {\n return false;\n }\n return this.tabs()[intended]?.id === tab.id;\n }\n\n protected tabHeaderId(tab: CngxTabHandle): string {\n return `${tab.id}-header`;\n }\n\n protected tabPanelId(tab: CngxTabHandle): string {\n return `${tab.id}-panel`;\n }\n\n protected tabDescriptorId(tab: CngxTabHandle): string {\n return `${tab.id}-desc`;\n }\n\n /** `true` when a bound error-aggregator opted in to revealing errors. */\n protected showErrorBadge(tab: CngxTabHandle): boolean {\n return !!tab.errorAggregator()?.shouldShow();\n }\n\n /**\n * Stable per-tab `*cngxTabErrorBadge` context cache. Context is\n * `{ tab }` only (no reactive fields), so a `WeakMap` keeps the\n * reference stable and lets `*ngTemplateOutlet`'s `Object.is`\n * input-diff short-circuit the embedded-view rebind.\n */\n private readonly errorBadgeContextCache = new WeakMap<CngxTabHandle, CngxTabErrorBadgeContext>();\n\n /** `WeakMap`-cached context for `*cngxTabErrorBadge`. Stable ref per tab. */\n protected errorBadgeContextFor(tab: CngxTabHandle): CngxTabErrorBadgeContext {\n let ctx = this.errorBadgeContextCache.get(tab);\n if (!ctx) {\n ctx = { tab };\n this.errorBadgeContextCache.set(tab, ctx);\n }\n return ctx;\n }\n\n /**\n * Context for `*cngxTabBusySpinner`. Allocates fresh per CD -\n * `intendedIndex` is reactive, and `*ngTemplateOutlet` only\n * re-evaluates `let-*` bindings when the context reference changes\n * (`Object.is` input-diff); a cached mutated object would leave\n * consumer bindings stale. `intendedIndex` is non-undefined by gate\n * - `isTabBusy(tab)` returning `true` requires it.\n */\n protected busySpinnerContextFor(tab: CngxTabHandle): CngxTabBusySpinnerContext {\n return { tab, intendedIndex: this.presenter.intendedIndex() ?? -1 };\n }\n\n /**\n * Context for `*cngxTabRejectionIcon`. `originLabel` matches the\n * `liveAnnouncement` priority chain so visual + SR phrasing align.\n * Allocates fresh per CD for the same reason as\n * {@link busySpinnerContextFor}.\n */\n protected rejectionIconContextFor(failedIndex: number): CngxTabRejectionIconContext {\n const originIdx = this.presenter.originIndexDuringCommit();\n const originLabel =\n originIdx !== undefined ? this.presenter.tabs()[originIdx]?.label() : undefined;\n return { failedIndex, originLabel };\n }\n\n protected handleHeaderClick(tab: CngxTabHandle): void {\n if (tab.disabled()) {\n return;\n }\n const idx = this.tabs().findIndex((t) => t.id === tab.id);\n if (idx >= 0) {\n this.presenter.select(idx);\n }\n }\n\n // CngxTabPanelHost contract - presenter owns clamping, disabled-skip,\n // commit-action gating.\n selectById(id: string): void {\n this.presenter.selectById(id);\n }\n\n /**\n * Clear the presenter's `lastFailedIndex` rejection flag - exposed\n * so template-ref consumers (`#tg=\"cngxTabGroup\"`) can dismiss the\n * decoration without injecting the host token.\n */\n clearLastFailed(): void {\n this.presenter.clearLastFailed();\n }\n\n labelTemplateFor(id: string): TemplateRef<unknown> | null {\n return this.tabDirectiveById().get(id)?.labelTemplate()?.templateRef ?? null;\n }\n\n contentTemplateFor(id: string): TemplateRef<unknown> | null {\n return this.tabDirectiveById().get(id)?.contentTemplate()?.templateRef ?? null;\n }\n}\n","<div class=\"cngx-tabs__strip-wrapper\">\n@let failedIdx = presenter.lastFailedIndex();\n<div\n class=\"cngx-tabs__strip\"\n role=\"tablist\"\n [attr.aria-orientation]=\"presenter.orientation()\"\n>\n @for (tab of tabs(); track tab.id; let i = $index) {\n <button\n type=\"button\"\n cngxRovingItem\n class=\"cngx-tabs__tab\"\n [class.cngx-tab--rejected]=\"failedIdx === i\"\n role=\"tab\"\n [id]=\"tabHeaderId(tab)\"\n [attr.aria-label]=\"announcements.tabAriaLabel(tab, i + 1)\"\n [attr.aria-selected]=\"isSelected(tab) ? 'true' : 'false'\"\n [attr.aria-controls]=\"tabPanelId(tab)\"\n [attr.aria-disabled]=\"tab.disabled() ? 'true' : null\"\n [attr.aria-busy]=\"isTabBusy(tab) ? 'true' : null\"\n [attr.aria-describedby]=\"tabDescriptorId(tab)\"\n [cngxRovingItemDisabled]=\"tab.disabled()\"\n (click)=\"handleHeaderClick(tab)\"\n >\n <span class=\"cngx-tabs__label\">\n @let labelTpl = labelTemplateFor(tab.id);\n @if (labelTpl) {\n <ng-container *ngTemplateOutlet=\"labelTpl\"></ng-container>\n } @else {\n {{ tab.label() }}\n }\n </span>\n @if (showErrorBadge(tab)) {\n @let errorBadgeTpl = templates.errorBadge();\n @if (errorBadgeTpl) {\n <ng-container\n *ngTemplateOutlet=\"\n errorBadgeTpl;\n context: errorBadgeContextFor(tab)\n \"\n ></ng-container>\n } @else {\n <span class=\"cngx-tabs__badge\" aria-hidden=\"true\">{{\n glyphs.errorBadge\n }}</span>\n }\n }\n @if (failedIdx === i) {\n @let rejectionIconTpl = templates.rejectionIcon();\n @if (rejectionIconTpl) {\n <ng-container\n *ngTemplateOutlet=\"\n rejectionIconTpl;\n context: rejectionIconContextFor(i)\n \"\n ></ng-container>\n } @else {\n <span class=\"cngx-tabs__rejection-icon\" aria-hidden=\"true\">{{\n glyphs.rejectionIcon\n }}</span>\n }\n }\n @if (isTabBusy(tab)) {\n @let busySpinnerTpl = templates.busySpinner();\n @if (busySpinnerTpl) {\n <ng-container\n *ngTemplateOutlet=\"\n busySpinnerTpl;\n context: busySpinnerContextFor(tab)\n \"\n ></ng-container>\n } @else {\n <span class=\"cngx-tabs__busy-spinner\" aria-hidden=\"true\"></span>\n }\n }\n <span class=\"cngx-sr-only\" [id]=\"tabDescriptorId(tab)\">{{\n announcements.statusPhrase(tab)\n }}</span>\n </button>\n }\n</div>\n<ng-content select=\"cngx-tab-overflow\"></ng-content>\n</div>\n\n<div class=\"cngx-tabs__panels\">\n @for (tab of tabs(); track tab.id) {\n <div\n class=\"cngx-tabs__panel\"\n role=\"tabpanel\"\n [id]=\"tabPanelId(tab)\"\n [attr.aria-labelledby]=\"tabHeaderId(tab)\"\n [attr.aria-roledescription]=\"announcements.tabPanelRoleDescription()\"\n [hidden]=\"!isSelected(tab)\"\n >\n @let contentTpl = contentTemplateFor(tab.id);\n @if (contentTpl) {\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container>\n }\n </div>\n }\n</div>\n\n<span class=\"cngx-tabs__live-region cngx-sr-only\" cngxLiveRegion>{{\n announcements.liveAnnouncement()\n}}</span>\n\n<!--\n Generic slot for opt-in skin sub-components other than the\n overflow molecule (which projects into the strip-wrapper via the\n named `select=\"cngx-tab-overflow\"` slot above). Projected content\n sees `CNGX_TAB_PANEL_HOST` via the organism's provider, so\n molecules inject the contract without reaching for the concrete\n `CngxTabGroup` class.\n-->\n<ng-content></ng-content>\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n contentChild,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n isDevMode,\n linkedSignal,\n untracked,\n viewChild,\n} from '@angular/core';\n\nimport { CngxActiveDescendant } from '@cngx/common/a11y';\nimport { CngxClickOutside } from '@cngx/common/interactive';\nimport { CngxPopover, CngxPopoverTrigger } from '@cngx/common/popover';\nimport {\n CNGX_DOM_ANCHOR_RETRY_FACTORY,\n CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY,\n CNGX_TAB_PANEL_HOST,\n CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY,\n CngxTabOverflowItem,\n CngxTabOverflowTrigger,\n createTabOverflowTemplateBindings,\n injectTabsConfig,\n injectTabsI18n,\n tabOverflowOptionId,\n type CngxDomAnchorRetryHandle,\n type CngxTabHandle,\n type CngxTabPanelHost,\n} from '@cngx/common/tabs';\n\n/**\n * Structural equal for `hiddenTabs` - same ids in same order.\n *\n * @internal\n */\nfunction tabIdListEqual(a: readonly CngxTabHandle[], b: readonly CngxTabHandle[]): boolean {\n if (a === b) {\n return true;\n }\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; i++) {\n if (a[i].id !== b[i].id) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Auto-open keys for the trigger button (APG combobox).\n *\n * @internal\n */\nconst NAV_OPEN_KEYS = new Set(['ArrowDown', 'ArrowUp', 'Home', 'End']);\n\n/**\n * Structural equal for `visibilityState`. Without this, the\n * `update((prev) => new Map(prev))` cycle in `handleIntersections`\n * cascades into `hiddenTabs` on every IO fire even when no tab\n * actually flipped visibility.\n *\n * @internal\n */\nfunction mapBoolEqual(a: ReadonlyMap<string, boolean>, b: ReadonlyMap<string, boolean>): boolean {\n if (a === b) {\n return true;\n }\n if (a.size !== b.size) {\n return false;\n }\n for (const [key, value] of a) {\n if (b.get(key) !== value) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Opt-in overflow indicator for `<cngx-tab-group>`. Surfaces clipped\n * tab buttons through a \"More\" `CngxPopover` dropdown. Talks to the\n * organism only via {@link CNGX_TAB_PANEL_HOST}.\n *\n * Visibility is tracked through a native `IntersectionObserver`\n * rooted on the parent strip - `CngxIntersectionObserver` doesn't\n * fit (single-element scope, can't reach sibling `viewChildren`).\n * `threshold: 0` - only fully-clipped tabs surface. Combined with\n * the organism's `scrollIntoView` effect this forms the self-healing\n * loop: pick hidden tab -> strip scrolls -> IO fires -> `hiddenTabs`\n * self-trims.\n *\n * @playground Overflow showcase ./examples/overflow-showcase/overflow-showcase.component.ts\n *\n * @category ui/tabs\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/tabs/tab-overflow.component.ts\n * @since 0.1.0\n * @relatedTo CngxTabGroup, CngxPopover, CngxActiveDescendant\n * <example-url>http://localhost:4200/#/ui/tabs/tab-overflow/8-tabs-in-a-narrow-container</example-url>\n */\n@Component({\n selector: 'cngx-tab-overflow',\n exportAs: 'cngxTabOverflow',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgTemplateOutlet,\n CngxActiveDescendant,\n CngxClickOutside,\n CngxPopover,\n CngxPopoverTrigger,\n ],\n templateUrl: './tab-overflow.component.html',\n styleUrls: ['./tab-overflow.component.css'],\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class.cngx-tab-overflow]': 'true',\n },\n})\nexport class CngxTabOverflow {\n // Projected via <ng-content>, so DI walks up to the parent's injector.\n // `{ host: true }` would scope to the molecule and miss the provider.\n protected readonly panelHost: CngxTabPanelHost = inject(CNGX_TAB_PANEL_HOST);\n protected readonly i18n = injectTabsI18n();\n protected readonly popover = viewChild.required(CngxPopover);\n private readonly adRef = viewChild.required(CngxActiveDescendant);\n\n private readonly hostElement: HTMLElement =\n inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private readonly destroyRef = inject(DestroyRef);\n\n // DOM-resolution strategy. Default factory targets the cngx-native\n // strip selectors; Material/custom variants swap via providers.\n private readonly adapter = inject(CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY)();\n\n // tab id -> visibility. `undefined` = not yet observed (treat as\n // visible - prevents More-button flash on first render).\n // `linkedSignal` prunes stale ids when the tabs list changes;\n // observer re-attach lives in the effect below. `mapBoolEqual`\n // suppresses identity-only re-emissions from the IO callback.\n private readonly visibilityState = linkedSignal<\n readonly CngxTabHandle[],\n ReadonlyMap<string, boolean>\n >({\n source: () => this.panelHost.tabs(),\n computation: (tabs, prev) => {\n if (!prev) {\n return new Map();\n }\n const liveIds = new Set(tabs.map((t) => t.id));\n const next = new Map<string, boolean>();\n for (const [id, vis] of prev.value) {\n if (liveIds.has(id)) {\n next.set(id, vis);\n }\n }\n return next;\n },\n equal: mapBoolEqual,\n });\n\n protected readonly hiddenTabs = computed<readonly CngxTabHandle[]>(\n () => {\n const visMap = this.visibilityState();\n return this.panelHost.tabs().filter((t) => visMap.get(t.id) === false);\n },\n { equal: tabIdListEqual },\n );\n\n protected readonly hasHiddenTabs = computed(() => this.hiddenTabs().length > 0, {\n equal: Object.is,\n });\n\n // Counter projected into trigger label + aria-label. Explicit\n // computed isolates `Object.is` distinct-gate from `hiddenTabs`\n // identity churn - prevents flicker on length-equal re-emissions.\n protected readonly hiddenCount = computed(() => this.hiddenTabs().length);\n\n // ARIA menu-button pattern: <button aria-haspopup=\"menu\"> + popover\n // role=\"menu\". Quick-jump navigation (selectById is not a value\n // commit), so menu/menuitem is correct - listbox/option implies\n // persistent aria-selected. WAI-ARIA 1.2 §combobox forbids\n // aria-haspopup=\"menu\", so combobox is deliberately not used.\n protected readonly adItemId = tabOverflowOptionId;\n\n // Read first - TS field-init order; downstream fields snapshot off this.\n private readonly tabsConfig = injectTabsConfig();\n\n // 3-stage cascade: directive > config.templates.overflow* > built-in.\n // `contentChild` must be a field-direct initializer (Angular AOT).\n private readonly triggerSlot = contentChild(CngxTabOverflowTrigger);\n private readonly itemSlot = contentChild(CngxTabOverflowItem);\n protected readonly templates = createTabOverflowTemplateBindings({\n triggerSlot: this.triggerSlot,\n itemSlot: this.itemSlot,\n config: this.tabsConfig,\n hiddenCount: this.hiddenCount,\n hiddenTabs: this.hiddenTabs,\n pickTab: (tab) => this.pickTab(tab),\n });\n\n private observer: IntersectionObserver | null = null;\n // Variant-agnostic target -> id lookup. cngx-native uses\n // `${id}-header`, Material `mat-tab-group-N-label-M`.\n private readonly targetToHandleId = new WeakMap<HTMLElement, string>();\n\n // IO-debounce knobs - see `CngxTabsConfig.overflowStabilizeMs` /\n // `.overflowMaxDeferMs` for semantics. Captured once at construction.\n private readonly stabilizeMs = this.tabsConfig.overflowStabilizeMs ?? 100;\n private readonly maxDeferMs = this.tabsConfig.overflowMaxDeferMs ?? 250;\n private stabilizeHandle: ReturnType<typeof setTimeout> | null = null;\n private pendingEntries: IntersectionObserverEntry[] = [];\n // performance.now() of the first entry since the last commit; null\n // between commits. Drives the max-defer cap.\n private firstPendingAt: number | null = null;\n\n // rAF-scheduled IO attach retry. `display: none` toggles do NOT\n // recover - unmount/remount is required to re-arm. Policy swap\n // via CNGX_DOM_ANCHOR_RETRY_FACTORY.\n private readonly attachRetry: CngxDomAnchorRetryHandle = inject(CNGX_DOM_ANCHOR_RETRY_FACTORY)({\n attempt: () => {\n const root = this.resolveStrip();\n if (!root) {\n return null;\n }\n // threshold: 0 - any visible pixel = \"in the strip\". Drives\n // the self-healing loop with the organism's scrollIntoView.\n this.observer = new IntersectionObserver((entries) => this.handleIntersections(entries), {\n root,\n threshold: 0,\n });\n this.observeCurrentTabs();\n return true;\n },\n maxAttempts: 60,\n schedule: (cb) => {\n const handle = requestAnimationFrame(cb);\n return () => cancelAnimationFrame(handle);\n },\n onGiveUp: () => {\n if (isDevMode()) {\n console.warn(\n '[CngxTabOverflow] Strip wrapper not found after 60 attach ' +\n 'attempts; the More popover will not surface clipped tabs. ' +\n 'Verify the molecule is projected inside <cngx-tab-group> ' +\n 'via its <ng-content> slot.',\n );\n }\n },\n });\n\n constructor() {\n afterNextRender(() => this.attachRetry.start());\n\n // Re-observe on tab-list change. Stale-id pruning is derived in\n // `visibilityState`'s linkedSignal source.\n effect(() => {\n this.panelHost.tabs();\n untracked(() => {\n if (!this.observer) {\n return;\n }\n this.observer.disconnect();\n this.observeCurrentTabs();\n });\n });\n\n inject(CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY)(this.popover, this.adRef);\n\n this.destroyRef.onDestroy(() => {\n this.attachRetry.cancel();\n if (this.stabilizeHandle !== null) {\n clearTimeout(this.stabilizeHandle);\n this.stabilizeHandle = null;\n }\n this.firstPendingAt = null;\n this.pendingEntries.length = 0;\n this.observer?.disconnect();\n this.observer = null;\n });\n }\n\n protected pickTab(tab: CngxTabHandle): void {\n this.panelHost.selectById(tab.id);\n this.popover().hide();\n }\n\n /** AD `(activated)` - Enter / Space on a highlighted option picks. */\n protected handleAdActivated(value: unknown): void {\n const tab = value as CngxTabHandle;\n if (tab?.id) {\n this.pickTab(tab);\n }\n }\n\n /**\n * Auto-opens popover on nav-key when collapsed. AD's host listener\n * fires first, so `activeIndex` is already set when this runs.\n * No-op while open - AD owns navigation.\n */\n protected handleTriggerKeydown(event: KeyboardEvent): void {\n if (this.popover().isVisible() || !this.hasHiddenTabs()) {\n return;\n }\n if (NAV_OPEN_KEYS.has(event.key)) {\n this.popover().show();\n }\n }\n\n private observeCurrentTabs(): void {\n if (!this.observer) {\n return;\n }\n const root = this.resolveStrip();\n if (!root) {\n return;\n }\n const tabs = this.panelHost.tabs();\n for (let idx = 0; idx < tabs.length; idx++) {\n const button = this.adapter.resolveTabButton(tabs[idx], root, idx);\n if (button) {\n this.targetToHandleId.set(button, tabs[idx].id);\n this.observer.observe(button);\n }\n }\n }\n\n private handleIntersections(entries: IntersectionObserverEntry[]): void {\n // Buffer entries; signal write deferred to commitPendingVisibility\n // once IO settles for stabilizeMs (capped by maxDeferMs).\n for (const entry of entries) {\n this.pendingEntries.push(entry);\n }\n const now = performance.now();\n this.firstPendingAt ??= now;\n if (this.stabilizeHandle !== null) {\n clearTimeout(this.stabilizeHandle);\n }\n // Wait min(stabilizeMs, remaining max-defer). Math.max(0, …)\n // guards a negative remaining after a long task.\n const elapsed = now - this.firstPendingAt;\n const maxDeferRemaining = this.maxDeferMs - elapsed;\n const wait = Math.max(0, Math.min(this.stabilizeMs, maxDeferRemaining));\n this.stabilizeHandle = setTimeout(() => this.commitPendingVisibility(), wait);\n }\n\n private commitPendingVisibility(): void {\n this.stabilizeHandle = null;\n this.firstPendingAt = null;\n const entries = this.pendingEntries;\n if (entries.length === 0) {\n return;\n }\n this.pendingEntries = [];\n this.visibilityState.update((prev) => {\n const next = new Map(prev);\n for (const entry of entries) {\n const target = entry.target as HTMLElement;\n const tabId = this.targetToHandleId.get(target);\n if (tabId === undefined) {\n // Stale registration during disconnect/observeCurrentTabs\n // churn - skip rather than mis-key.\n continue;\n }\n // threshold: 0 - partially-clipped stays visible; only\n // fully-clipped surfaces as hidden.\n next.set(tabId, entry.isIntersecting);\n }\n return next;\n });\n }\n\n /**\n * IO-root resolution via the injected adapter. Returns `null`\n * before the molecule is anchored - the rAF retry loop re-polls.\n */\n private resolveStrip(): HTMLElement | null {\n return this.adapter.resolveStripRoot(this.panelHost, this.hostElement);\n }\n}\n","<button\n type=\"button\"\n class=\"cngx-tab-overflow__trigger\"\n cngxActiveDescendant\n #ad=\"cngxActiveDescendant\"\n [items]=\"templates.adItems()\"\n [cngxPopoverTrigger]=\"overflowPopover\"\n [haspopup]=\"'menu'\"\n [hidden]=\"!hasHiddenTabs()\"\n [attr.aria-label]=\"i18n.moreTabsLabel(hiddenCount())\"\n (activated)=\"handleAdActivated($event)\"\n (keydown)=\"handleTriggerKeydown($event)\"\n (click)=\"overflowPopover.toggle()\"\n>\n @let triggerTpl = templates.triggerTemplate();\n @if (triggerTpl) {\n <ng-container\n *ngTemplateOutlet=\"triggerTpl; context: templates.triggerContext()\"\n />\n } @else {\n {{ i18n.moreTabsLabel(hiddenCount()) }}\n }\n</button>\n\n<div\n cngxPopover\n #overflowPopover=\"cngxPopover\"\n cngxClickOutside\n [eventType]=\"'click'\"\n [enabled]=\"overflowPopover.isVisible()\"\n (clickOutside)=\"overflowPopover.hide()\"\n role=\"menu\"\n class=\"cngx-tab-overflow__panel\"\n placement=\"bottom-end\"\n panelClass=\"cngx-tab-overflow__panel-surface\"\n [attr.aria-label]=\"i18n.moreTabsLabel(hiddenCount())\"\n>\n <!--\n `role=\"presentation\"` flattens the <ul> away from the\n accessibility tree so each <li role=\"menuitem\"> is exposed as a\n direct child of the role=\"menu\" landmark on the popover surface.\n Each item carries a stable id derived from the tab handle id;\n CngxActiveDescendant on the trigger steers `aria-activedescendant`\n at one of these ids while the user navigates with\n ArrowUp/Down/Home/End/typeahead. The popover is a quick-jump\n navigation surface — selecting an item triggers `selectById`,\n not a value commit — so menu/menuitem is the spec-correct pattern\n (listbox/option carries `aria-selected` semantics that do not\n apply to a transient navigation popup).\n -->\n <ul class=\"cngx-tab-overflow__list\" role=\"presentation\">\n @for (tab of hiddenTabs(); track tab.id; let i = $index) {\n <li\n role=\"menuitem\"\n class=\"cngx-tab-overflow__item\"\n [class.cngx-tab-overflow__item--active]=\"ad.activeId() === adItemId(tab)\"\n [id]=\"adItemId(tab)\"\n [attr.data-tab-id]=\"tab.id\"\n [attr.aria-disabled]=\"tab.disabled() ? 'true' : 'false'\"\n (click)=\"!tab.disabled() && pickTab(tab)\"\n >\n @let itemTpl = templates.itemTemplate();\n @if (itemTpl) {\n <ng-container\n *ngTemplateOutlet=\"itemTpl; context: templates.buildItemContext(tab, i)\"\n />\n } @else {\n {{ tab.label() ?? tab.id }}\n }\n </li>\n }\n </ul>\n</div>\n","/**\n * @module @cngx/ui/tabs\n */\nexport { CngxTabGroup } from './tab-group.component';\nexport { CngxTabOverflow } from './tab-overflow.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"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AAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,cAAA,EAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,WAAW,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MACf,oBAAoB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAiEpB,sBAAsB,0FACzB,mBAAmB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEzM9D;;AAEG;;ACFH;;AAEG;;;;"}
|
package/fesm2022/cngx-ui.mjs
CHANGED
|
@@ -13,7 +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
|
-
|
|
16
|
+
/** @internal — replaced at publish time, not part of consumer API. */
|
|
17
|
+
const VERSION = makeVersion('0.1.0-rc.0');
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
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\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-stepper\n * @cngx/ui/mat-tabs\n * @cngx/ui/material\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;
|
|
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-stepper\n * @cngx/ui/mat-tabs\n * @cngx/ui/material\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/layout/README.md
CHANGED
|
@@ -46,37 +46,19 @@ CSS Grid layout component with column control.
|
|
|
46
46
|
|
|
47
47
|
Flex-based stack layout component with named gap tokens and alignment control.
|
|
48
48
|
|
|
49
|
-
| Input
|
|
50
|
-
|
|
51
|
-
| direction | `'row' \| 'column'` | `'column'` | Flex direction
|
|
49
|
+
| Input | Type | Default | Description |
|
|
50
|
+
|-|-|-|-|
|
|
51
|
+
| direction | `'row' \| 'column'` | `'column'` | Flex direction - stack items vertically (column) or horizontally (row). |
|
|
52
52
|
| gap | `'none' \| 'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl'` | `'md'` | Named gap token that resolves via CSS custom properties (`--cngx-gap-*`). Defaults: xs=4px, sm=8px, md=16px, lg=24px, xl=32px. |
|
|
53
53
|
| align | `'start' \| 'center' \| 'end' \| 'stretch'` | `'stretch'` | Cross-axis alignment. Maps to `align-items`: `flex-start`, `center`, `flex-end`, or `stretch`. |
|
|
54
54
|
|
|
55
|
-
### Gap Defaults
|
|
56
55
|
|
|
57
|
-
| Token | Value | CSS Variable |
|
|
58
|
-
| ----- | ----- | --------------- |
|
|
59
|
-
| none | 0 | N/A |
|
|
60
|
-
| xs | 4px | `--cngx-gap-xs` |
|
|
61
|
-
| sm | 8px | `--cngx-gap-sm` |
|
|
62
|
-
| md | 16px | `--cngx-gap-md` |
|
|
63
|
-
| lg | 24px | `--cngx-gap-lg` |
|
|
64
|
-
| xl | 32px | `--cngx-gap-xl` |
|
|
65
|
-
|
|
66
|
-
Override at any scope:
|
|
67
|
-
|
|
68
|
-
```scss
|
|
69
|
-
:host {
|
|
70
|
-
--cngx-gap-md: 20px; // override default 16px
|
|
71
|
-
--cngx-gap-lg: 32px; // override default 24px
|
|
72
|
-
}
|
|
73
|
-
```
|
|
74
56
|
|
|
75
57
|
## Composition Pattern
|
|
76
58
|
|
|
77
59
|
Stack and Grid are orthogonal and compose cleanly:
|
|
78
60
|
|
|
79
|
-
```
|
|
61
|
+
```html
|
|
80
62
|
<cngx-stack direction="column" gap="xl">
|
|
81
63
|
<h1>Dashboard</h1>
|
|
82
64
|
|
|
@@ -100,34 +82,17 @@ Stack and Grid are orthogonal and compose cleanly:
|
|
|
100
82
|
|
|
101
83
|
Both components use `display: flex` / `display: grid` at `:host` scope and `display: contents` for the wrapper. No additional DOM nesting.
|
|
102
84
|
|
|
103
|
-
Override flex/grid properties directly or via inputs:
|
|
104
85
|
|
|
105
|
-
```scss
|
|
106
|
-
// Direct override
|
|
107
|
-
cngx-grid {
|
|
108
|
-
grid-auto-rows: minmax(100px, auto);
|
|
109
|
-
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
cngx-stack {
|
|
113
|
-
flex-wrap: wrap;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// Via CSS variables
|
|
117
|
-
:host {
|
|
118
|
-
--cngx-gap-md: 20px;
|
|
119
|
-
}
|
|
120
|
-
```
|
|
121
86
|
|
|
122
87
|
## Accessibility
|
|
123
88
|
|
|
124
|
-
Both components are purely structural
|
|
89
|
+
Both components are purely structural - no ARIA roles, no focus management. They inherit accessibility properties from their children. A grid of cards, for example, relies on each card's own `role="article"` or `role="button"`.
|
|
125
90
|
|
|
126
91
|
## Performance
|
|
127
92
|
|
|
128
|
-
- **Zero JavaScript state**
|
|
129
|
-
- **Display: contents**
|
|
130
|
-
- **No animation overhead**
|
|
131
|
-
- **Signal-free**
|
|
93
|
+
- **Zero JavaScript state** - Pure CSS grid/flex
|
|
94
|
+
- **Display: contents** - No extra DOM layer
|
|
95
|
+
- **No animation overhead** - Static layout, no transitions
|
|
96
|
+
- **Signal-free** - No change detection overhead for layout itself
|
|
132
97
|
|
|
133
98
|
Use these components as the foundation for responsive layouts without JavaScript weight.
|
package/mat-stepper/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @cngx/ui/mat-stepper
|
|
2
2
|
|
|
3
|
-
Material-twin `<cngx-mat-stepper>` organism. Wraps Angular Material's `<mat-stepper>` while sharing the same `CngxStepperPresenter` brain (from `@cngx/common/stepper`) as `<cngx-stepper>`. Material consumers gain commit-action lifecycle, router sync, and error aggregation **for free**
|
|
3
|
+
Material-twin `<cngx-mat-stepper>` organism. Wraps Angular Material's `<mat-stepper>` while sharing the same `CngxStepperPresenter` brain (from `@cngx/common/stepper`) as `<cngx-stepper>`. Material consumers gain commit-action lifecycle, router sync, and error aggregation **for free** - same brain, different skin.
|
|
4
4
|
|
|
5
5
|
## What it does
|
|
6
6
|
|
|
@@ -9,16 +9,16 @@ The `<cngx-mat-stepper>` organism is a thin wrapper around `<mat-stepper>`:
|
|
|
9
9
|
- Composes `CngxStepperPresenter` via `hostDirectives` (presenter contract identical to `<cngx-stepper>`).
|
|
10
10
|
- Renders Material's `<mat-stepper>` in its template; iterates `presenter.flatSteps()` to synthesize one `<mat-step>` per registered `<cngxStep>` atom.
|
|
11
11
|
- Bidirectional sync between `presenter.activeStepIndex` and `MatStepper.selectedIndex` via a single `effect()` whose Material writes are wrapped in `untracked()` (no reactivity loops, per `reference_signal_architecture` rule 2).
|
|
12
|
-
- Material owns its own keyboard nav (`MatStepperHeader` ARIA) and focus management
|
|
13
|
-
- Group nodes flatten
|
|
12
|
+
- Material owns its own keyboard nav (`MatStepperHeader` ARIA) and focus management - this organism deliberately does NOT compose `CngxRovingTabindex` / `CngxFocusRestore` (which would conflict with Material's internals).
|
|
13
|
+
- Group nodes flatten - Material's `<mat-step>` doesn't support nesting; depth is preserved as a `data-step-depth` attribute on the rendered label for CSS hooks.
|
|
14
14
|
|
|
15
15
|
## Exports
|
|
16
16
|
|
|
17
|
-
| Export
|
|
18
|
-
|
|
17
|
+
| Export | Selector | Description |
|
|
18
|
+
|-|-|-|
|
|
19
19
|
| `CngxMatStepper` | `cngx-mat-stepper` | The Material-twin organism. Composes `CngxStepperPresenter` via `hostDirectives`. |
|
|
20
20
|
|
|
21
|
-
**Only `<cngxStep>` atoms are accepted as content.** Native `<mat-step>` siblings are NOT supported
|
|
21
|
+
**Only `<cngxStep>` atoms are accepted as content.** Native `<mat-step>` siblings are NOT supported - see `.internal/architektur/stepper-accepted-debt.md §1` for the structural rationale (Angular content-projection DI ordering blocks the adoption pattern; both attempted plans archived under `.internal/architektur/plans/halted/`).
|
|
22
22
|
|
|
23
23
|
## Bidirectional sync
|
|
24
24
|
|
|
@@ -27,8 +27,5 @@ The organism's constructor wires two effects (after `afterNextRender` ensures `v
|
|
|
27
27
|
1. **presenter → Material**: an `effect()` reads `presenter.activeStepIndex()` and writes `matStepper.selectedIndex` inside `untracked()`. Equality guard suppresses redundant writes.
|
|
28
28
|
2. **Material → presenter**: subscribes to `matStepper.selectionChange` via `takeUntilDestroyed`, calls `presenter.select(event.selectedIndex)` when the values diverge.
|
|
29
29
|
|
|
30
|
-
Material's commit-action gate works because `presenter.select()` routes through the commit handler
|
|
30
|
+
Material's commit-action gate works because `presenter.select()` routes through the commit handler - pessimistic mode keeps Material's `selectedIndex` on origin until success.
|
|
31
31
|
|
|
32
|
-
## Theming
|
|
33
|
-
|
|
34
|
-
Material's own theming applies — `<mat-stepper>` reads `--mat-sys-*` tokens. `<cngx-mat-stepper>` adds no skin of its own; the host element is `display: contents` so the rendered `<mat-stepper>` flows through the consumer's Material theme.
|
package/mat-tabs/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @cngx/ui/mat-tabs
|
|
2
2
|
|
|
3
3
|
Material instrumentation directive for `<mat-tab-group>`. One attribute
|
|
4
|
-
upgrade
|
|
4
|
+
upgrade - composes `CngxTabGroupPresenter` via `hostDirectives`, so
|
|
5
5
|
consumers gain commit-action lifecycle, `CNGX_STATEFUL` provision (and
|
|
6
6
|
therefore `<cngx-toast-on />` / `<cngx-banner-on />` composition), and
|
|
7
7
|
the cngx tab-handle registry without rewriting their template.
|
|
@@ -13,19 +13,19 @@ the cngx tab-handle registry without rewriting their template.
|
|
|
13
13
|
</mat-tab-group>
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
See
|
|
16
|
+
See compodocx for the full API surface (inputs, outputs, methods).
|
|
17
17
|
|
|
18
18
|
## Styling
|
|
19
19
|
|
|
20
20
|
The Material sticky-error skin (`.cngx-mat-tab--error`) is shipped as a
|
|
21
|
-
**standalone stylesheet asset**, not bundled via component metadata
|
|
21
|
+
**standalone stylesheet asset**, not bundled via component metadata -
|
|
22
22
|
Angular only honours `styleUrls` on `@Component`, not on `@Directive`,
|
|
23
23
|
and `[cngxMatTabs]` instruments raw `<mat-tab-group>` (no template
|
|
24
24
|
surface of its own). The consumer imports the file once in the app's
|
|
25
25
|
global stylesheet:
|
|
26
26
|
|
|
27
27
|
```css
|
|
28
|
-
/*
|
|
28
|
+
/* examples/src/styles.scss or your equivalent global stylesheet */
|
|
29
29
|
@import '@cngx/ui/mat-tabs/styles/mat-tabs.css';
|
|
30
30
|
```
|
|
31
31
|
|
|
@@ -51,8 +51,8 @@ themes (`@angular/material/prebuilt-themes/*.css`).
|
|
|
51
51
|
Theme via `--mat-sys-*` (Material design tokens) by default; override
|
|
52
52
|
per-instance or globally via `--cngx-mat-tab-error-*`:
|
|
53
53
|
|
|
54
|
-
| Variable
|
|
55
|
-
|
|
54
|
+
| Variable | Default | Purpose |
|
|
55
|
+
|-|-|-|
|
|
56
56
|
| `--cngx-mat-tab-error-color` | `var(--mat-sys-error, #c62828)` | Foreground / outline colour |
|
|
57
57
|
| `--cngx-mat-tab-error-outline` | `2px solid currentColor` | Full `outline` shorthand |
|
|
58
58
|
| `--cngx-mat-tab-error-outline-offset` | `1px` | Gap between outline and tab edge |
|
|
@@ -72,7 +72,7 @@ the matching `.mat-mdc-tab` button via `Renderer2`:
|
|
|
72
72
|
- **Cleared** on programmatic `presenter.clearLastFailed()` call.
|
|
73
73
|
|
|
74
74
|
The decoration adds `class="cngx-mat-tab--error"` and
|
|
75
|
-
`aria-invalid="true"`
|
|
75
|
+
`aria-invalid="true"` - consumers using AT pick up the standard ARIA
|
|
76
76
|
signal automatically. For a richer announcement phrase, compose
|
|
77
77
|
`<cngx-toast-on />` next to `[cngxMatTabs]` on the `<mat-tab-group>`
|
|
78
78
|
element; the bridge reads the same `CNGX_STATEFUL` source as the
|
|
@@ -83,15 +83,15 @@ decoration.
|
|
|
83
83
|
`[cngxMatTabError]` binds a `CngxErrorAggregatorContract` to a
|
|
84
84
|
single `<mat-tab>`. The contract carries its own reactive surface
|
|
85
85
|
(`shouldShow`, `announcement` are Signals); consumers pass the
|
|
86
|
-
aggregator instance directly
|
|
86
|
+
aggregator instance directly - no outer Signal wrapper required.
|
|
87
87
|
When the bound aggregator's `shouldShow()` flips `true` the
|
|
88
88
|
matching Material tab button gains:
|
|
89
89
|
|
|
90
|
-
- A `cngx-mat-tab--has-errors` class
|
|
90
|
+
- A `cngx-mat-tab--has-errors` class - visual badge (`!` glyph at
|
|
91
91
|
the trailing-top corner of the button).
|
|
92
92
|
- A child `<span class="cngx-sr-only" id="<handle-id>-errors">`
|
|
93
93
|
carrying the aggregator's `announcement()` phrase.
|
|
94
|
-
- An `aria-describedby` token referencing that span
|
|
94
|
+
- An `aria-describedby` token referencing that span - the directive
|
|
95
95
|
preserves any prior `aria-describedby` value and appends only its
|
|
96
96
|
own token.
|
|
97
97
|
|
|
@@ -106,7 +106,7 @@ matching Material tab button gains:
|
|
|
106
106
|
|
|
107
107
|
The aggregators come from `injectErrorAggregator()` (in
|
|
108
108
|
`@cngx/common/interactive`). The visual is **independent** of the
|
|
109
|
-
commit-action rejection lifecycle
|
|
109
|
+
commit-action rejection lifecycle - a tab can carry both
|
|
110
110
|
`--error` and `--has-errors` simultaneously, and the CSS skin offsets
|
|
111
111
|
the `--has-errors` badge slightly when both classes co-occur so the
|
|
112
112
|
two signals read as distinct.
|
|
@@ -137,7 +137,7 @@ Material's built-in horizontal scroll buttons (`<` / `>`) remain
|
|
|
137
137
|
visible alongside the More button. The More button is laid out as a
|
|
138
138
|
flex sibling of `.mat-mdc-tab-label-container` inside
|
|
139
139
|
`.mat-mdc-tab-header`, so the available width is split across the
|
|
140
|
-
pagination arrows, the label-container, and the More button
|
|
140
|
+
pagination arrows, the label-container, and the More button - and
|
|
141
141
|
the `IntersectionObserver` rooted on the label-container picks up
|
|
142
142
|
the new container width automatically (`hiddenTabs` re-derives as
|
|
143
143
|
the container shrinks).
|
|
@@ -159,5 +159,5 @@ The directive's afterNextRender block sets `position: relative` on
|
|
|
159
159
|
`.mat-mdc-tab-header` only when the header's computed `position` is
|
|
160
160
|
not already a positioning context (`relative` / `absolute` /
|
|
161
161
|
`fixed` / `sticky`). Consumers who themed the header with their own
|
|
162
|
-
non-static positioning keep their value
|
|
162
|
+
non-static positioning keep their value - the directive does not
|
|
163
163
|
overwrite.
|