@cdevhub/ngx-tw 0.6.1 → 0.7.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/fesm2022/cdevhub-ngx-tw-alert.mjs +8 -1
- package/fesm2022/cdevhub-ngx-tw-alert.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-badge.mjs +18 -8
- package/fesm2022/cdevhub-ngx-tw-badge.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-button.mjs +14 -8
- package/fesm2022/cdevhub-ngx-tw-button.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-card.mjs +7 -7
- package/fesm2022/cdevhub-ngx-tw-card.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-checkbox.mjs +2 -2
- package/fesm2022/cdevhub-ngx-tw-checkbox.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-collapsible.mjs +7 -7
- package/fesm2022/cdevhub-ngx-tw-collapsible.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs +8 -8
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs +8 -8
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs +8 -8
- package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-form-field.mjs +16 -16
- package/fesm2022/cdevhub-ngx-tw-form-field.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-input.mjs +1 -1
- package/fesm2022/cdevhub-ngx-tw-input.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs +7 -7
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-popover.mjs +10 -4
- package/fesm2022/cdevhub-ngx-tw-popover.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-radio.mjs +2 -2
- package/fesm2022/cdevhub-ngx-tw-radio.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-select.mjs +7 -7
- package/fesm2022/cdevhub-ngx-tw-select.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-separator.mjs +7 -7
- package/fesm2022/cdevhub-ngx-tw-separator.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-slider.mjs +21 -21
- package/fesm2022/cdevhub-ngx-tw-slider.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-switch.mjs +1 -1
- package/fesm2022/cdevhub-ngx-tw-switch.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tabs.mjs +29 -9
- package/fesm2022/cdevhub-ngx-tw-tabs.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tags-input.mjs +8 -8
- package/fesm2022/cdevhub-ngx-tw-tags-input.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-theme.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-time-picker.mjs +8 -8
- package/fesm2022/cdevhub-ngx-tw-time-picker.mjs.map +1 -1
- package/index.json +1 -1
- package/package.json +1 -1
- package/types/cdevhub-ngx-tw-tabs.d.ts +23 -3
- package/types/cdevhub-ngx-tw-theme.d.ts +18 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdevhub-ngx-tw-paginator.mjs","sources":["../../../projects/ngx-tw/paginator/paginator.ts","../../../projects/ngx-tw/paginator/paginator.html","../../../projects/ngx-tw/paginator/cdevhub-ngx-tw-paginator.ts"],"sourcesContent":["import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n isDevMode,\n model,\n output,\n TemplateRef,\n untracked,\n viewChildren,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { type FocusableOption, FocusKeyManager, LiveAnnouncer } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { tv } from 'tailwind-variants';\nimport type { TwColor, TwSize } from '@cdevhub/ngx-tw/core';\n\n// ── Public types ──────────────────────────────────────────────────\n\n/** Rendering type. `'basic'` shows prev/next + page info only. `'numbered'` shows page buttons with ellipsis range. */\nexport type TwPaginatorType = 'basic' | 'numbered';\n\n/** Layout density. `'compact'` stacks regions left-to-right. `'spread'` distributes regions across the full container width. */\nexport type TwPaginatorLayout = 'compact' | 'spread';\n\n/** Responsive mode. `'auto'` collapses numbered pages to basic visuals on narrow containers via CSS container queries. `'off'` disables collapsing. */\nexport type TwPaginatorResponsive = 'auto' | 'off';\n\n/** Named slot accepted by `*twPaginatorLabel`. */\nexport type TwPaginatorLabelSlot =\n | 'pageInfo'\n | 'previous'\n | 'next'\n | 'first'\n | 'last'\n | 'pageSizeLabel';\n\n/**\n * String labels used throughout the paginator.\n *\n * Every member is optional. This interface only ever reaches consumers through\n * `input<Partial<TwPaginatorLabels>>`, and unset keys fall back to the English\n * defaults — so a consumer holding an i18n bundle typed as `TwPaginatorLabels`\n * must not be forced to restate all fourteen keys, and adding a label in a\n * future minor must not break them on a non-major release.\n */\nexport interface TwPaginatorLabels {\n /** Accessible name for the `<nav>` landmark. */\n ariaLabel?: string;\n /** Label on the Previous button. */\n previous?: string;\n /** Label on the Next button. */\n next?: string;\n /** Label on the First-page button. */\n first?: string;\n /** Label on the Last-page button. */\n last?: string;\n /** Visible label before the current-page indicator. Used as `\"{pageInfo} {page}{pageInfoSeparator}{totalPages}\"`. */\n pageInfo?: string;\n /** Text that joins the current page and total. */\n pageInfoSeparator?: string;\n /** Range-style page info template. Variables: `{start}`, `{end}`, `{total}`. */\n pageRange?: string;\n /** Visible label next to the page-size selector. */\n pageSizeLabel?: string;\n /** `LiveAnnouncer` template used on every page change. Variables: `{page}`, `{totalPages}`, `{start}`, `{end}`, `{total}`. */\n announcement?: string;\n /** Accessible label per numbered page button. Variable: `{page}`. */\n pageButtonAriaLabel?: string;\n /** Accessible label for the current numbered page button. Variable: `{page}`. */\n currentPageAriaLabel?: string;\n /** Accessible label applied to ellipsis items. */\n ellipsis?: string;\n /** Rendered when `hideOnEmpty` is `false` and `totalItems === 0`. */\n empty?: string;\n}\n\n/** Emitted by `pageChange`. */\nexport interface TwPaginatorPageChangeEvent {\n /** The new 1-based page. */\n page: number;\n /** The new items-per-page. */\n pageSize: number;\n /** The previous 1-based page. */\n previousPage: number;\n /** The previous items-per-page. */\n previousPageSize: number;\n /** Total number of items. */\n totalItems: number;\n /** Total number of pages given the current `totalItems` and `pageSize`. */\n totalPages: number;\n /** 1-based index of the first item on the new page (inclusive). */\n start: number;\n /** 1-based index of the last item on the new page (inclusive). */\n end: number;\n /** What triggered the change. */\n source: 'click' | 'keyboard' | 'pageSizeChange' | 'programmatic';\n}\n\n/** Template context provided to every `*twPaginatorLabel` and `*twPaginatorEmpty` template. */\nexport interface TwPaginatorLabelContext {\n /** 1-based current page. */\n page: number;\n /** Total pages. */\n totalPages: number;\n /** 1-based index of the first item on the current page (inclusive). */\n start: number;\n /** 1-based index of the last item on the current page (inclusive). */\n end: number;\n /** Total number of items. */\n totalItems: number;\n /** Current items per page. */\n pageSize: number;\n /** Whether the paginator is globally disabled. */\n disabled: boolean;\n}\n\n/** Template context provided to `*twPaginatorPageSizeSelector`. */\nexport interface TwPaginatorPageSizeSelectorContext {\n /** Current page size. */\n pageSize: number;\n /** Available page-size options. */\n options: readonly number[];\n /** Updates the page size and re-anchors the current page to keep the same first visible item. */\n setPageSize: (size: number) => void;\n}\n\n// ── Internal types ────────────────────────────────────────────────\n\ntype PaginationRangeItem = number | 'ellipsis-left' | 'ellipsis-right';\n\ntype PageChangeSource = TwPaginatorPageChangeEvent['source'];\n\n// ── Default labels ────────────────────────────────────────────────\n\n/** English defaults. `Required<>` so every key reads back as a plain `string`. */\nconst DEFAULT_LABELS: Readonly<Required<TwPaginatorLabels>> = {\n ariaLabel: 'Pagination',\n previous: 'Previous',\n next: 'Next',\n first: 'First page',\n last: 'Last page',\n pageInfo: 'Page',\n pageInfoSeparator: ' of ',\n pageRange: '{start}\\u2013{end} of {total}',\n pageSizeLabel: 'Items per page:',\n announcement: 'Page {page} of {totalPages}',\n pageButtonAriaLabel: 'Go to page {page}',\n currentPageAriaLabel: 'Page {page}, current page',\n ellipsis: 'More pages',\n empty: 'No results',\n};\n\n// ── Static active-page class maps (Tailwind v4 requires statically written class strings) ──\n// Mirrors the checkbox SOLID_BOX / SOLID_ICON split: a per-color background + border map\n// and a per-color on-color text map. `text-on-{color}` keeps the active button readable\n// against any consumer theme without hardcoding `text-white` (would fail for warning's\n// dark-on-amber convention) or `text-black`. The legacy `--color-on-*` alias tokens still\n// resolve to the canonical solid-fg slot per `theme/_semantic.css` lines 284-296.\n\nconst PAGE_BUTTON_ACTIVE_BG: Record<TwColor, string> = {\n primary: 'bg-primary-600 hover:bg-primary-700 border-primary-600 focus-visible:outline-primary-500',\n secondary: 'bg-secondary-600 hover:bg-secondary-700 border-secondary-600 focus-visible:outline-secondary-500',\n accent: 'bg-accent-600 hover:bg-accent-700 border-accent-600 focus-visible:outline-accent-500',\n neutral: 'bg-fg hover:bg-fg border-fg focus-visible:outline-fg',\n info: 'bg-info-600 hover:bg-info-700 border-info-600 focus-visible:outline-info-500',\n success: 'bg-success-600 hover:bg-success-700 border-success-600 focus-visible:outline-success-500',\n // Warning keeps -500 because the amber-500/amber-950 pairing meets contrast — see\n // `theme/_semantic.css` warning role comment (\"yellow signage convention\").\n warning: 'bg-warning-500 hover:bg-warning-600 border-warning-500 focus-visible:outline-warning-500',\n error: 'bg-error-600 hover:bg-error-700 border-error-600 focus-visible:outline-error-500',\n};\n\nconst PAGE_BUTTON_ACTIVE_FG: Record<TwColor, string> = {\n primary: 'text-on-primary',\n secondary: 'text-on-secondary',\n accent: 'text-on-accent',\n neutral: 'text-on-neutral',\n info: 'text-on-info',\n success: 'text-on-success',\n warning: 'text-on-warning',\n error: 'text-on-error',\n};\n\n// ── Pure helpers (exported for unit testing only — not re-exported from index.ts) ──\n\n/**\n * Builds the visible page range for the numbered paginator, inserting ellipsis\n * sentinels where ranges are collapsed. Port of the shadcn/Radix algorithm.\n *\n * @internal exported for unit tests; not part of the public API.\n */\nexport function buildPaginationRange(\n currentPage: number,\n totalPages: number,\n siblingCount: number,\n boundaryCount: number,\n): PaginationRangeItem[] {\n const total = Math.max(0, Math.floor(totalPages));\n if (total <= 0) return [];\n\n const siblings = Math.max(0, Math.floor(siblingCount));\n const boundaries = Math.max(0, Math.floor(boundaryCount));\n const current = Math.min(Math.max(1, Math.floor(currentPage)), total);\n\n // If all pages fit without ellipses, show them all.\n const totalPageButtons = boundaries * 2 + siblings * 2 + 3;\n if (total <= totalPageButtons) {\n return range(1, total);\n }\n\n const leftBoundary = range(1, Math.min(boundaries, total));\n const rightBoundary = range(Math.max(total - boundaries + 1, 1), total);\n\n const leftSibling = Math.max(current - siblings, boundaries + 2);\n const rightSibling = Math.min(current + siblings, total - boundaries - 1);\n\n const showLeftEllipsis = leftSibling > boundaries + 2;\n const showRightEllipsis = rightSibling < total - boundaries - 1;\n\n const middle: PaginationRangeItem[] = [];\n if (showLeftEllipsis) {\n middle.push('ellipsis-left');\n } else {\n // Fill the gap between left boundary and leftSibling with explicit numbers.\n for (let i = boundaries + 1; i < leftSibling; i++) middle.push(i);\n }\n\n for (let i = leftSibling; i <= rightSibling; i++) middle.push(i);\n\n if (showRightEllipsis) {\n middle.push('ellipsis-right');\n } else {\n for (let i = rightSibling + 1; i <= total - boundaries; i++) middle.push(i);\n }\n\n return [...leftBoundary, ...middle, ...rightBoundary];\n}\n\nfunction range(start: number, end: number): number[] {\n if (end < start) return [];\n const out: number[] = new Array(end - start + 1);\n for (let i = 0; i < out.length; i++) out[i] = start + i;\n return out;\n}\n\n/** Replaces `{key}` placeholders in `template` with values from `vars`. */\nfunction formatLabel(\n template: string,\n vars: Readonly<Record<string, string | number>>,\n): string {\n // Defence in depth. `resolvedLabels()` already filters explicitly-undefined\n // consumer keys, so a non-string cannot reach here through the public\n // `labels` input today. The guard exists so a future regression in that\n // merge degrades to a missing label instead of throwing inside a `computed`\n // and taking the render down.\n if (typeof template !== 'string') return '';\n return template.replace(/\\{(\\w+)\\}/g, (match, key: string) =>\n Object.prototype.hasOwnProperty.call(vars, key) ? String(vars[key]) : match,\n );\n}\n\n// ── tv() config ───────────────────────────────────────────────────\n\nconst paginatorVariants = tv(\n {\n slots: {\n root: 'flex w-full',\n inner: 'flex items-center gap-3 flex-wrap w-full min-w-0',\n pageSizeGroup: 'flex items-center gap-2 shrink-0',\n pageSizeLabel: 'text-sm text-fg-muted whitespace-nowrap',\n pageSizeSelect:\n 'rounded-md border border-border bg-surface text-fg cursor-pointer transition-colors duration-normal motion-reduce:transition-none hover:bg-surface-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500 disabled:opacity-50 disabled:pointer-events-none',\n pageInfo: 'text-sm text-fg-muted whitespace-nowrap',\n navGroup: 'flex items-center gap-1',\n pageList: 'flex items-center gap-1',\n navButton:\n 'inline-flex items-center justify-center rounded-md border border-border bg-surface text-fg transition-colors duration-normal motion-reduce:transition-none cursor-pointer hover:bg-surface-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500 disabled:opacity-50 disabled:pointer-events-none disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed',\n pageButton:\n 'inline-flex items-center justify-center rounded-md border border-transparent text-fg transition-colors duration-normal motion-reduce:transition-none cursor-pointer hover:bg-surface-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500 disabled:opacity-50 disabled:pointer-events-none disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed',\n ellipsis:\n 'inline-flex items-center justify-center text-fg-subtle select-none pointer-events-none',\n emptyState: 'text-sm text-fg-muted',\n icon: 'size-4 shrink-0',\n },\n variants: {\n // Heights are pinned to the control scale (docs/vertical-rhythm.md):\n // 24 / 32 / 36 / 44 / 48. Vertical padding is deleted deliberately — the\n // buttons centre via `inline-flex items-center justify-center` and the\n // native `<select>` centres its own text, so any surviving `py-*` would\n // only fight the pinned height under `box-sizing: border-box`. `min-w-*`\n // tracks the height so number buttons stay square until the digits\n // widen them. `ellipsis` moves in lockstep or the numbered row\n // reintroduces a height divergence inside the component.\n size: {\n xs: {\n navButton: 'px-2 text-xs min-w-6 h-6',\n pageButton: 'px-2 text-xs min-w-6 h-6',\n pageSizeSelect: 'px-2 text-xs h-6',\n ellipsis: 'min-w-6 h-6 text-xs',\n // `size-3.5` (14px) half-step: neither size-3 nor size-4 aligns with\n // text-xs glyph metrics inside a 24px nav button.\n icon: 'size-3.5',\n },\n sm: {\n navButton: 'px-2.5 text-sm min-w-8 h-8',\n pageButton: 'px-2.5 text-sm min-w-8 h-8',\n pageSizeSelect: 'px-2.5 text-sm h-8',\n ellipsis: 'min-w-8 h-8 text-sm',\n icon: 'size-4',\n },\n md: {\n navButton: 'px-3 text-sm min-w-9 h-9',\n pageButton: 'px-3 text-sm min-w-9 h-9',\n pageSizeSelect: 'px-3 text-sm h-9',\n ellipsis: 'min-w-9 h-9 text-sm',\n icon: 'size-4',\n },\n lg: {\n navButton: 'px-4 text-base min-w-11 h-11',\n pageButton: 'px-4 text-base min-w-11 h-11',\n pageSizeSelect: 'px-4 text-base h-11',\n ellipsis: 'min-w-11 h-11 text-base',\n icon: 'size-5',\n },\n xl: {\n navButton: 'px-5 text-base min-w-12 h-12',\n pageButton: 'px-5 text-base min-w-12 h-12',\n pageSizeSelect: 'px-5 text-base h-12',\n ellipsis: 'min-w-12 h-12 text-base',\n icon: 'size-5',\n },\n },\n layout: {\n compact: { inner: 'justify-start' },\n spread: { inner: 'justify-between' },\n },\n type: {\n basic: { pageList: 'hidden' },\n numbered: {},\n },\n responsive: {\n auto: { root: '@container' },\n off: {},\n },\n disabled: {\n true: { root: 'opacity-50 pointer-events-none' },\n false: {},\n },\n },\n compoundVariants: [\n // Auto-collapse numbered page list under 30rem container width.\n {\n type: 'numbered',\n responsive: 'auto',\n class: { pageList: 'hidden @[30rem]:flex' },\n },\n ],\n defaultVariants: {\n size: 'md',\n layout: 'compact',\n type: 'numbered',\n responsive: 'auto',\n disabled: false,\n },\n },\n { twMerge: true },\n);\n\n// ── Template directives ───────────────────────────────────────────\n\n/**\n * Structural directive on an `<ng-template>` that replaces a specific label slot.\n * Usage: `<ng-template twPaginatorLabel slot=\"pageInfo\" let-ctx> … </ng-template>`.\n */\n@Directive({ selector: 'ng-template[twPaginatorLabel]' })\nexport class PaginatorLabelDirective {\n /** The label slot this template overrides. */\n readonly slot = input.required<TwPaginatorLabelSlot>();\n\n /** @internal */\n readonly templateRef = inject(TemplateRef<{ $implicit: TwPaginatorLabelContext }>);\n\n /** @internal */\n static ngTemplateContextGuard(\n _dir: PaginatorLabelDirective,\n _ctx: unknown,\n ): _ctx is { $implicit: TwPaginatorLabelContext } {\n return true;\n }\n}\n\n/**\n * Structural directive on an `<ng-template>` that renders when `totalItems === 0`\n * and `hideOnEmpty` is `false`. When absent, `labels.empty` renders as fallback.\n */\n@Directive({ selector: 'ng-template[twPaginatorEmpty]' })\nexport class PaginatorEmptyDirective {\n /** @internal */\n readonly templateRef = inject(TemplateRef<{ $implicit: TwPaginatorLabelContext }>);\n\n /** @internal */\n static ngTemplateContextGuard(\n _dir: PaginatorEmptyDirective,\n _ctx: unknown,\n ): _ctx is { $implicit: TwPaginatorLabelContext } {\n return true;\n }\n}\n\n/**\n * Structural directive on an `<ng-template>` that replaces the default page-size\n * selector UI entirely. Context `$implicit` exposes `{ pageSize, options, setPageSize }`.\n */\n@Directive({ selector: 'ng-template[twPaginatorPageSizeSelector]' })\nexport class PaginatorPageSizeSelectorDirective {\n /** @internal */\n readonly templateRef = inject(\n TemplateRef<{ $implicit: TwPaginatorPageSizeSelectorContext }>,\n );\n\n /** @internal */\n static ngTemplateContextGuard(\n _dir: PaginatorPageSizeSelectorDirective,\n _ctx: unknown,\n ): _ctx is { $implicit: TwPaginatorPageSizeSelectorContext } {\n return true;\n }\n}\n\n// ── PaginatorFocusableDirective ───────────────────────────────────\n\n/**\n * @internal Wraps every nav-group focusable (first/prev/page/next/last) as a CDK\n * `FocusableOption` so `FocusKeyManager` can drive roving focus across the group.\n * Applied via attribute selector on the existing `data-tw-paginator-focusable`\n * marker so the spec's button queries continue to match.\n */\n// Selector deliberately matches the existing `data-tw-paginator-focusable`\n// data-attribute marker emitted in the template; camelCasing would break the\n// spec's button queries. See the JSDoc above this declaration.\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[data-tw-paginator-focusable]',\n})\nexport class PaginatorFocusableDirective implements FocusableOption {\n readonly elementRef = inject(ElementRef<HTMLElement>);\n\n /** When true, the element is skipped by `FocusKeyManager` roving focus. Defaults to `false`. */\n readonly isDisabled = input(false);\n\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n /**\n * `FocusableOption.disabled` resolver. NOTE: returning the signal function\n * itself would always be truthy, so `FocusKeyManager` would skip every\n * element. Call the signal here so the manager sees the actual value.\n */\n get disabled(): boolean {\n return this.isDisabled();\n }\n}\n\n// ── PaginatorComponent ────────────────────────────────────────────\n\nlet nextPaginatorId = 0;\n\n@Component({\n selector: 'tw-paginator',\n exportAs: 'twPaginator',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet, PaginatorFocusableDirective],\n templateUrl: './paginator.html',\n host: {\n '[attr.role]': 'shouldRender() ? \"navigation\" : null',\n '[class]': 'rootClasses()',\n '[attr.aria-label]': 'shouldRender() ? resolvedAriaLabel() : null',\n '[style.container-name]': 'containerName()',\n },\n})\nexport class PaginatorComponent {\n // ── Inputs ──\n\n /** Total number of items across all pages. Defaults to `0`. */\n readonly totalItems = input<number>(0);\n\n /** Items per page. Two-way bindable via `[(pageSize)]`; writes back when the user picks a different size in the page-size selector. Defaults to `10`. */\n readonly pageSize = model<number>(10);\n\n /** 1-based current page. Two-way bindable via `[(page)]`; writes back when the user navigates, and whenever the value is clamped into the valid `1…totalPages` range. Defaults to `1`. */\n readonly page = model<number>(1);\n\n /** Rendering type. Defaults to `'numbered'`. */\n readonly type = input<TwPaginatorType>('numbered');\n\n /** Layout density. Defaults to `'compact'`. */\n readonly layout = input<TwPaginatorLayout>('compact');\n\n /** Controls padding, font size, and icon size. Defaults to `'md'`. */\n readonly size = input<TwSize>('md');\n\n /** Semantic color used for the active page indicator. Defaults to `'primary'`. */\n readonly color = input<TwColor>('primary');\n\n /** How many sibling pages to show on each side of the current page. Defaults to `1`. */\n readonly siblingCount = input<number>(1);\n\n /** How many pages to always show at the start and end boundaries. Defaults to `1`. */\n readonly boundaryCount = input<number>(1);\n\n /** When true, renders jump-to-first and jump-to-last buttons. Defaults to `true` — first/last jumps are the standard pagination affordance for any list large enough to need a paginator; the special case is a compact paginator that opts out. */\n readonly showFirstLastButtons = input<boolean>(true);\n\n /** When true, renders the page-size selector region. Defaults to `false`. */\n readonly showPageSizeSelector = input<boolean>(false);\n\n /** Options for the default page-size selector. Ignored when `*twPaginatorPageSizeSelector` is projected. Defaults to `[10, 25, 50, 100]`. */\n readonly pageSizeOptions = input<readonly number[]>([10, 25, 50, 100]);\n\n /** When true, renders the page-info text region. Defaults to `true` — showing \"X–Y of Z\" is the expected pagination context; the special case is an ultra-compact paginator in tight UI that opts out. */\n readonly showPageInfo = input<boolean>(true);\n\n /** When true, renders nothing when `totalItems === 0`. Defaults to `true` — hiding the paginator on empty data is the expected UX; the special case is a layout that opts out to reserve the paginator's vertical space. */\n readonly hideOnEmpty = input<boolean>(true);\n\n /** When true, renders nothing when `totalPages <= 1`. Defaults to `false`. */\n readonly hideOnSinglePage = input<boolean>(false);\n\n /** Responsive collapse mode. Defaults to `'auto'`. */\n readonly responsive = input<TwPaginatorResponsive>('auto');\n\n /** When true, every button is disabled. Defaults to `false`. */\n readonly disabled = input<boolean>(false);\n\n /** Partial string labels object for i18n. Unset keys fall back to English defaults. Defaults to `{}`. */\n readonly labels = input<Partial<TwPaginatorLabels>>({});\n\n /** When provided, buttons render as anchor links using the returned `href`. Defaults to `undefined` (renders as buttons). */\n readonly linkFactory = input<((page: number) => string) | undefined>(undefined);\n\n /**\n * Overrides `labels.ariaLabel` for the root `<nav>` element. Bound as `aria-label`.\n * Defaults to `undefined` (the resolved `labels.ariaLabel` is used).\n *\n * The host renders as a `navigation` landmark, so a page showing more than one\n * paginator (the common \"controls above and below a table\" shape) MUST give each\n * one a distinct name here — two landmarks of the same role sharing an accessible\n * name are indistinguishable to a screen-reader landmark list (axe:\n * `landmark-unique`).\n */\n readonly customAriaLabel = input<string | undefined>(undefined, {\n alias: 'aria-label',\n });\n\n // ── Outputs ──\n\n /** Fires when `page` or `pageSize` changes. Payload includes derived helpers (`start`, `end`, `totalPages`, `source`). Use `[(page)]` / `[(pageSize)]` for two-way binding; subscribe to this for the rich event payload. */\n readonly paginated = output<TwPaginatorPageChangeEvent>();\n\n // ── Projected templates ──\n\n /** @internal */\n readonly labelDirectives = contentChildren(PaginatorLabelDirective);\n\n /** @internal */\n readonly emptyDirective = contentChild(PaginatorEmptyDirective);\n\n /** @internal */\n readonly pageSizeSelectorDirective = contentChild(\n PaginatorPageSizeSelectorDirective,\n );\n\n // ── Injected services ──\n\n private readonly _liveAnnouncer = inject(LiveAnnouncer);\n private readonly _elementRef = inject(ElementRef<HTMLElement>);\n /**\n * Optional so a consumer that never imports `BidiModule` still gets a working\n * paginator — the key manager falls back to `'ltr'` when the token is absent.\n */\n private readonly _directionality = inject(Directionality, { optional: true });\n\n // ── View children ──\n\n /** @internal All nav-group focusables (first/prev/page/next/last) for `FocusKeyManager`. */\n readonly focusableItems = viewChildren(PaginatorFocusableDirective);\n\n // ── IDs ──\n\n private readonly _componentId = `tw-paginator-${nextPaginatorId++}`;\n\n /** @internal */\n readonly pageSizeSelectId = `${this._componentId}-size`;\n\n // ── Derived state ──\n\n /** @internal Effective page size, coerced to at least 1. */\n readonly effectivePageSize = computed(() => Math.max(1, this.pageSize()));\n\n /** @internal Total number of pages; always ≥ 1 to keep clamping math well-defined. */\n readonly totalPages = computed(() => {\n const total = this.totalItems();\n if (total <= 0) return 1;\n return Math.max(1, Math.ceil(total / this.effectivePageSize()));\n });\n\n /** @internal Current page clamped into `[1, totalPages]`. */\n readonly clampedPage = computed(() =>\n Math.min(Math.max(1, this.page()), this.totalPages()),\n );\n\n /** @internal 1-based start item index on the current page. `0` when empty. */\n readonly startItem = computed(() => {\n if (this.totalItems() <= 0) return 0;\n return (this.clampedPage() - 1) * this.effectivePageSize() + 1;\n });\n\n /** @internal 1-based end item index on the current page. `0` when empty. */\n readonly endItem = computed(() => {\n if (this.totalItems() <= 0) return 0;\n return Math.min(\n this.clampedPage() * this.effectivePageSize(),\n this.totalItems(),\n );\n });\n\n /** @internal Visible page range for the numbered type. */\n readonly range = computed(() =>\n buildPaginationRange(\n this.clampedPage(),\n this.totalPages(),\n this.siblingCount(),\n this.boundaryCount(),\n ),\n );\n\n /**\n * @internal Merged labels.\n *\n * Explicitly-undefined keys are dropped before merging. Root `tsconfig.json`\n * does not set `exactOptionalPropertyTypes`, so\n * `[labels]=\"{ pageButtonAriaLabel: i18n.pageBtn }\"` type-checks even when\n * the i18n bundle has no such key — and a plain spread would then overwrite\n * the default with `undefined`, which reaches `formatLabel()` and throws\n * `Cannot read properties of undefined (reading 'replace')` inside a\n * `computed`, taking the whole page down on first render. Same filter\n * `table.ts` and `timeline.ts` already use; `Required<>` then guarantees the\n * template a string for every label.\n */\n readonly resolvedLabels = computed<Required<TwPaginatorLabels>>(() => {\n const overrides = Object.fromEntries(\n Object.entries(this.labels() ?? {}).filter(([, value]) => value !== undefined),\n );\n return { ...DEFAULT_LABELS, ...overrides } as Required<TwPaginatorLabels>;\n });\n\n /** @internal Resolved aria-label for the root. */\n readonly resolvedAriaLabel = computed(\n () => this.customAriaLabel() ?? this.resolvedLabels().ariaLabel,\n );\n\n /** @internal `container-name` for the CSS container query (set only when responsive=\"auto\"). */\n readonly containerName = computed(() =>\n this.responsive() === 'auto' ? 'paginator' : null,\n );\n\n readonly isEmpty = computed(() => this.totalItems() <= 0);\n\n readonly isAtFirstPage = computed(() => this.clampedPage() <= 1);\n\n readonly isAtLastPage = computed(\n () => this.clampedPage() >= this.totalPages(),\n );\n\n /** @internal Target page for the Previous button (clamped to `[1, totalPages]`). */\n readonly previousTarget = computed(() => Math.max(1, this.clampedPage() - 1));\n\n /** @internal Target page for the Next button (clamped to `[1, totalPages]`). */\n readonly nextTarget = computed(() =>\n Math.min(this.totalPages(), this.clampedPage() + 1),\n );\n\n /** @internal Whether the component should render at all. */\n readonly shouldRender = computed(() => {\n if (this.isEmpty() && this.hideOnEmpty()) return false;\n if (this.hideOnSinglePage() && this.totalPages() <= 1 && !this.isEmpty())\n return false;\n return true;\n });\n\n // ── Variant class computation ──\n\n private readonly _variantResult = computed(() =>\n paginatorVariants({\n size: this.size(),\n layout: this.layout(),\n type: this.type(),\n responsive: this.responsive(),\n disabled: this.disabled(),\n }),\n );\n\n readonly rootClasses = computed(() => this._variantResult().root());\n readonly innerClasses = computed(() => this._variantResult().inner());\n readonly pageSizeGroupClasses = computed(() =>\n this._variantResult().pageSizeGroup(),\n );\n readonly pageSizeLabelClasses = computed(() =>\n this._variantResult().pageSizeLabel(),\n );\n readonly pageSizeSelectClasses = computed(() =>\n this._variantResult().pageSizeSelect(),\n );\n readonly pageInfoClasses = computed(() => this._variantResult().pageInfo());\n readonly navGroupClasses = computed(() => this._variantResult().navGroup());\n readonly pageListClasses = computed(() => this._variantResult().pageList());\n readonly navButtonClasses = computed(() => this._variantResult().navButton());\n readonly ellipsisClasses = computed(() => this._variantResult().ellipsis());\n readonly emptyStateClasses = computed(() => this._variantResult().emptyState());\n readonly iconClasses = computed(() => this._variantResult().icon());\n\n /** @internal Applies active-color classes to the current page button. */\n pageButtonClasses(active: boolean): string {\n const base = this._variantResult().pageButton();\n if (!active) return base;\n const color = this.color();\n return `${base} ${PAGE_BUTTON_ACTIVE_BG[color]} ${PAGE_BUTTON_ACTIVE_FG[color]}`;\n }\n\n // ── Projected template lookup ──\n\n /** @internal */\n labelTemplateFor(\n slot: TwPaginatorLabelSlot,\n ): TemplateRef<{ $implicit: TwPaginatorLabelContext }> | null {\n const match = this.labelDirectives().find((d) => d.slot() === slot);\n return match ? match.templateRef : null;\n }\n\n /** @internal Template-context wrapper so projected templates receive `$implicit: TwPaginatorLabelContext`. */\n readonly labelContext = computed<{ $implicit: TwPaginatorLabelContext }>(() => ({\n $implicit: {\n page: this.clampedPage(),\n totalPages: this.totalPages(),\n start: this.startItem(),\n end: this.endItem(),\n totalItems: this.totalItems(),\n pageSize: this.effectivePageSize(),\n disabled: this.disabled(),\n },\n }));\n\n /** @internal */\n readonly pageSizeContext = computed<{\n $implicit: TwPaginatorPageSizeSelectorContext;\n }>(() => ({\n $implicit: {\n pageSize: this.effectivePageSize(),\n options: this.pageSizeOptions(),\n setPageSize: (n: number) => this._setPageSize(n),\n },\n }));\n\n // ── Rendered strings ──\n\n /** @internal Default page-info string (type-aware). */\n readonly formattedPageInfo = computed(() => {\n const labels = this.resolvedLabels();\n if (this.isEmpty()) return labels.empty;\n if (this.type() === 'basic') {\n return formatLabel(labels.pageRange, {\n start: this.startItem(),\n end: this.endItem(),\n total: this.totalItems(),\n });\n }\n return `${labels.pageInfo} ${this.clampedPage()}${labels.pageInfoSeparator}${this.totalPages()}`;\n });\n\n /** @internal ARIA label for a numbered page button. */\n formatPageButtonLabel(page: number): string {\n return formatLabel(this.resolvedLabels().pageButtonAriaLabel, { page });\n }\n\n /** @internal ARIA label for the current page button. */\n formatCurrentPageLabel(page: number): string {\n return formatLabel(this.resolvedLabels().currentPageAriaLabel, { page });\n }\n\n /** @internal Returns the anchor href for a page when `linkFactory` is set and the page is navigable. */\n hrefFor(page: number): string | null {\n const lf = this.linkFactory();\n if (!lf) return null;\n if (this.disabled()) return null;\n return lf(Math.min(Math.max(1, page), this.totalPages()));\n }\n\n // ── State bookkeeping (for emission) ──\n\n private _previousPage = this.page();\n private _previousPageSize = this.pageSize();\n private _pendingSource: PageChangeSource | null = null;\n private _initialized = false;\n\n // ── Keyboard navigation (CDK FocusKeyManager) ──\n\n /** @internal */\n private _keyManager: FocusKeyManager<PaginatorFocusableDirective> | null = null;\n\n constructor() {\n afterNextRender(() => {\n this._initialized = true;\n if (isDevMode()) {\n this._runDevWarnings();\n }\n });\n\n // Emit pageChange whenever page or pageSize changes (after initial render).\n // When an out-of-range page is detected, clamp and emit with source 'programmatic'.\n //\n // DOCUMENTED no-write-in-effect exception (see CLAUDE.md). This effect reads\n // `page()` *and* writes `page.set(clamped)` — an intrinsic cycle, because the\n // clamp must fire both when `totalPages` shrinks AND when the consumer assigns\n // an out-of-range page (so `page` must stay a tracked dependency). The cycle is\n // bounded by the `clamped !== newPage` guard: the write re-triggers the effect\n // exactly once, the re-run sees an in-range value, and it settles. It never\n // loops/freezes. The `untracked()` wrapper does NOT break this cycle (page is\n // tracked above); its job is to keep the signal reads inside `_emitChange` /\n // `_announce` from registering as effect dependencies.\n effect(() => {\n const newPage = this.page();\n const newSize = this.pageSize();\n const tp = this.totalPages();\n\n untracked(() => {\n const oldPage = this._previousPage;\n const oldSize = this._previousPageSize;\n\n // Clamp out-of-bounds page — do this first, then allow a follow-up tick to emit.\n const clamped = Math.min(Math.max(1, newPage), tp);\n if (clamped !== newPage) {\n // Set pending source only if nothing else is pending (preserve originator).\n if (this._pendingSource === null) this._pendingSource = 'programmatic';\n this.page.set(clamped);\n return;\n }\n\n if (newPage === oldPage && newSize === oldSize) {\n // No effective change (first run after init).\n return;\n }\n\n this._previousPage = newPage;\n this._previousPageSize = newSize;\n\n if (!this._initialized) return;\n\n const source = this._pendingSource ?? 'programmatic';\n this._pendingSource = null;\n this._emitChange(newPage, newSize, oldPage, oldSize, source);\n this._announce(newPage);\n });\n });\n\n // Rebuild the FocusKeyManager whenever the focusable set changes (e.g. the\n // numbered page list re-renders when total or current page shifts) or the\n // app flips `dir` at runtime. No `.withWrap()` — paginators should NOT loop\n // from page 1 ArrowLeft to the last page; that would be disorienting, and\n // this is a deliberate divergence from `tabs`/`tab-nav`, which do wrap.\n //\n // The orientation is fed from the live layout direction rather than a\n // hardcoded `'ltr'`: CDK's ListKeyManager maps ArrowLeft to\n // `setPreviousItemActive()` under `'ltr'` and `setNextItemActive()` under\n // `'rtl'`, so pinning `'ltr'` inverts ArrowLeft/ArrowRight in RTL locales —\n // the arrow steps backwards in DOM order but forwards visually.\n // `Directionality.valueSignal` is read directly (CDK 22+) so this effect\n // re-runs on a direction change without a manual subscription mirror; that\n // is the same behaviour `tab-nav` gets from its `Directionality.change`\n // subscription, with less boilerplate.\n //\n // The `disabled` getter on `PaginatorFocusableDirective` resolves the\n // `isDisabled()` signal so the manager skips disabled controls.\n // `onCleanup` fires both on rebuild AND on component destroy, so no separate\n // `_destroyRef.onDestroy` is needed.\n effect((onCleanup) => {\n const items = this.focusableItems();\n const direction = this._directionality?.valueSignal() ?? 'ltr';\n if (items.length === 0) {\n this._keyManager = null;\n return;\n }\n const manager = new FocusKeyManager(items)\n .withHorizontalOrientation(direction)\n .withHomeAndEnd();\n this._keyManager = manager;\n\n onCleanup(() => {\n manager.destroy();\n });\n });\n }\n\n // ── User-facing action methods ──\n\n /** @internal Navigate to a specific page (click/keyboard handler). */\n goTo(target: number, source: Exclude<PageChangeSource, 'pageSizeChange'>): void {\n if (this.disabled()) return;\n const tp = this.totalPages();\n const next = Math.min(Math.max(1, target), tp);\n if (next === this.clampedPage()) return;\n this._pendingSource = source;\n this.page.set(next);\n }\n\n /** @internal Click handler for anchor-link mode. Suppresses navigation for disabled targets. */\n onLinkClick(\n event: MouseEvent,\n target: number,\n disabled: boolean,\n source: Exclude<PageChangeSource, 'pageSizeChange'>,\n ): void {\n if (disabled || this.disabled()) {\n event.preventDefault();\n return;\n }\n // Let the browser follow the anchor; still emit a pageChange.\n this.goTo(target, source);\n }\n\n /** @internal Handler for the default page-size `<select>`. */\n onPageSizeSelectChange(event: Event): void {\n const target = event.target as HTMLSelectElement;\n const parsed = Number(target.value);\n if (Number.isFinite(parsed) && parsed > 0) {\n this._setPageSize(parsed);\n }\n }\n\n private _setPageSize(size: number): void {\n if (this.disabled()) return;\n const newSize = Math.max(1, Math.floor(size));\n const oldPage = this.clampedPage();\n const oldSize = this.effectivePageSize();\n if (newSize === oldSize) return;\n\n const firstItem = (oldPage - 1) * oldSize + 1;\n const total = this.totalItems();\n const newTp = total <= 0 ? 1 : Math.max(1, Math.ceil(total / newSize));\n const newPage = Math.min(Math.max(1, Math.ceil(firstItem / newSize)), newTp);\n\n this._pendingSource = 'pageSizeChange';\n this.pageSize.set(newSize);\n if (newPage !== oldPage) this.page.set(newPage);\n // If only pageSize changed but page value is unchanged, the effect still fires\n // because pageSize is tracked.\n }\n\n /**\n * @internal Keyboard navigation inside the nav group. Delegates ArrowLeft /\n * ArrowRight / Home / End to CDK `FocusKeyManager`. The manager skips\n * disabled controls automatically via the `disabled` getter on\n * `PaginatorFocusableDirective`.\n */\n onKeydown(event: KeyboardEvent): void {\n if (!this._keyManager) return;\n const items = this.focusableItems();\n if (items.length === 0) return;\n\n // Sync the manager's active index to whichever focusable currently owns DOM\n // focus, so arrow keys move from the user's perceived position rather than\n // the stale post-render default of -1.\n const focusedIdx = items.findIndex(\n (item) => item.elementRef.nativeElement === event.target,\n );\n if (focusedIdx >= 0 && focusedIdx !== this._keyManager.activeItemIndex) {\n this._keyManager.setActiveItem(focusedIdx);\n }\n\n this._keyManager.onKeydown(event);\n }\n\n // ── Emission + announcement ──\n\n private _emitChange(\n page: number,\n pageSize: number,\n previousPage: number,\n previousPageSize: number,\n source: PageChangeSource,\n ): void {\n const total = this.totalItems();\n const effSize = Math.max(1, pageSize);\n const tp = total <= 0 ? 1 : Math.max(1, Math.ceil(total / effSize));\n const start = total <= 0 ? 0 : (page - 1) * effSize + 1;\n const end = total <= 0 ? 0 : Math.min(page * effSize, total);\n this.paginated.emit({\n page,\n pageSize: effSize,\n previousPage,\n previousPageSize,\n totalItems: total,\n totalPages: tp,\n start,\n end,\n source,\n });\n }\n\n private _announce(page: number): void {\n const msg = formatLabel(this.resolvedLabels().announcement, {\n page,\n totalPages: this.totalPages(),\n start: this.startItem(),\n end: this.endItem(),\n total: this.totalItems(),\n });\n this._liveAnnouncer.announce(msg, 'polite');\n }\n\n // ── Dev warnings ──\n\n private _runDevWarnings(): void {\n if (this.totalItems() < 0) {\n \n console.warn('[tw-paginator] totalItems is negative — coercing to 0.');\n }\n if (this.pageSize() < 1) {\n \n console.warn('[tw-paginator] pageSize is less than 1 — coercing to 1.');\n }\n if (this.showPageSizeSelector() && this.pageSizeOptions().length === 0) {\n \n console.warn(\n '[tw-paginator] showPageSizeSelector is true but pageSizeOptions is empty — selector will not render.',\n );\n }\n }\n}\n","@if (shouldRender()) {\n <div [class]=\"innerClasses()\">\n @if (isEmpty()) {\n <!-- Empty state -->\n @if (emptyDirective(); as emptyDir) {\n <ng-container\n [ngTemplateOutlet]=\"emptyDir.templateRef\"\n [ngTemplateOutletContext]=\"labelContext()\"\n />\n } @else {\n <span [class]=\"emptyStateClasses()\">{{ resolvedLabels().empty }}</span>\n }\n } @else {\n <!-- Page-size selector region -->\n @if (showPageSizeSelector() && pageSizeOptions().length > 0) {\n <div [class]=\"pageSizeGroupClasses()\">\n <label\n [attr.for]=\"pageSizeSelectId\"\n [class]=\"pageSizeLabelClasses()\"\n >\n @if (labelTemplateFor('pageSizeLabel'); as tmpl) {\n <ng-container\n [ngTemplateOutlet]=\"tmpl\"\n [ngTemplateOutletContext]=\"labelContext()\"\n />\n } @else {\n {{ resolvedLabels().pageSizeLabel }}\n }\n </label>\n\n @if (pageSizeSelectorDirective(); as dir) {\n <ng-container\n [ngTemplateOutlet]=\"dir.templateRef\"\n [ngTemplateOutletContext]=\"pageSizeContext()\"\n />\n } @else {\n <select\n [id]=\"pageSizeSelectId\"\n [class]=\"pageSizeSelectClasses()\"\n [disabled]=\"disabled()\"\n [value]=\"effectivePageSize()\"\n (change)=\"onPageSizeSelectChange($event)\"\n >\n @for (opt of pageSizeOptions(); track opt) {\n <option [value]=\"opt\">{{ opt }}</option>\n }\n </select>\n }\n </div>\n }\n\n <!-- Page info region -->\n @if (showPageInfo()) {\n <div [class]=\"pageInfoClasses()\">\n @if (labelTemplateFor('pageInfo'); as tmpl) {\n <ng-container\n [ngTemplateOutlet]=\"tmpl\"\n [ngTemplateOutletContext]=\"labelContext()\"\n />\n } @else {\n {{ formattedPageInfo() }}\n }\n </div>\n }\n\n <!-- Nav buttons region. Roving focus is owned by FocusKeyManager on the\n child buttons; this wrapper only relays keydown to the manager, so\n it does not need its own tabindex. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n [class]=\"navGroupClasses()\"\n (keydown)=\"onKeydown($event)\"\n >\n <!-- First -->\n @if (showFirstLastButtons()) {\n @let firstDisabled = disabled() || isAtFirstPage();\n @if (linkFactory()) {\n <a\n data-tw-paginator-focusable\n [isDisabled]=\"firstDisabled\"\n data-tw-paginator-nav=\"first\"\n [class]=\"navButtonClasses()\"\n [attr.href]=\"firstDisabled ? null : hrefFor(1)\"\n [attr.role]=\"firstDisabled ? 'link' : null\"\n [attr.aria-disabled]=\"firstDisabled ? 'true' : null\"\n [attr.tabindex]=\"firstDisabled ? -1 : 0\"\n [attr.aria-label]=\"resolvedLabels().first\"\n (click)=\"onLinkClick($event, 1, firstDisabled, 'click')\"\n >\n @if (labelTemplateFor('first'); as tmpl) {\n <ng-container\n [ngTemplateOutlet]=\"tmpl\"\n [ngTemplateOutletContext]=\"labelContext()\"\n />\n } @else {\n <svg\n [class]=\"iconClasses()\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M10.78 4.22a.75.75 0 0 1 0 1.06L6.06 10l4.72 4.72a.75.75 0 0 1-1.06 1.06l-5.25-5.25a.75.75 0 0 1 0-1.06l5.25-5.25a.75.75 0 0 1 1.06 0Zm6 0a.75.75 0 0 1 0 1.06L12.06 10l4.72 4.72a.75.75 0 1 1-1.06 1.06l-5.25-5.25a.75.75 0 0 1 0-1.06l5.25-5.25a.75.75 0 0 1 1.06 0Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n }\n </a>\n } @else {\n <button\n type=\"button\"\n data-tw-paginator-focusable\n [isDisabled]=\"firstDisabled\"\n data-tw-paginator-nav=\"first\"\n [class]=\"navButtonClasses()\"\n [disabled]=\"firstDisabled\"\n [attr.aria-label]=\"resolvedLabels().first\"\n (click)=\"goTo(1, 'click')\"\n >\n @if (labelTemplateFor('first'); as tmpl) {\n <ng-container\n [ngTemplateOutlet]=\"tmpl\"\n [ngTemplateOutletContext]=\"labelContext()\"\n />\n } @else {\n <svg\n [class]=\"iconClasses()\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M10.78 4.22a.75.75 0 0 1 0 1.06L6.06 10l4.72 4.72a.75.75 0 0 1-1.06 1.06l-5.25-5.25a.75.75 0 0 1 0-1.06l5.25-5.25a.75.75 0 0 1 1.06 0Zm6 0a.75.75 0 0 1 0 1.06L12.06 10l4.72 4.72a.75.75 0 1 1-1.06 1.06l-5.25-5.25a.75.75 0 0 1 0-1.06l5.25-5.25a.75.75 0 0 1 1.06 0Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n }\n </button>\n }\n }\n\n <!-- Previous -->\n @let prevDisabled = disabled() || isAtFirstPage();\n @let prevTarget = previousTarget();\n @if (linkFactory()) {\n <a\n data-tw-paginator-focusable\n [isDisabled]=\"prevDisabled\"\n data-tw-paginator-nav=\"prev\"\n [class]=\"navButtonClasses()\"\n [attr.href]=\"prevDisabled ? null : hrefFor(prevTarget)\"\n [attr.role]=\"prevDisabled ? 'link' : null\"\n [attr.aria-disabled]=\"prevDisabled ? 'true' : null\"\n [attr.tabindex]=\"prevDisabled ? -1 : 0\"\n [attr.aria-label]=\"resolvedLabels().previous\"\n (click)=\"onLinkClick($event, prevTarget, prevDisabled, 'click')\"\n >\n @if (labelTemplateFor('previous'); as tmpl) {\n <ng-container\n [ngTemplateOutlet]=\"tmpl\"\n [ngTemplateOutletContext]=\"labelContext()\"\n />\n } @else {\n <svg\n [class]=\"iconClasses()\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M12.78 5.22a.75.75 0 0 1 0 1.06L9.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n }\n </a>\n } @else {\n <button\n type=\"button\"\n data-tw-paginator-focusable\n [isDisabled]=\"prevDisabled\"\n data-tw-paginator-nav=\"prev\"\n [class]=\"navButtonClasses()\"\n [disabled]=\"prevDisabled\"\n [attr.aria-label]=\"resolvedLabels().previous\"\n (click)=\"goTo(prevTarget, 'click')\"\n >\n @if (labelTemplateFor('previous'); as tmpl) {\n <ng-container\n [ngTemplateOutlet]=\"tmpl\"\n [ngTemplateOutletContext]=\"labelContext()\"\n />\n } @else {\n <svg\n [class]=\"iconClasses()\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M12.78 5.22a.75.75 0 0 1 0 1.06L9.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n }\n </button>\n }\n\n <!-- Numbered page list -->\n @if (type() === 'numbered') {\n <div [class]=\"pageListClasses()\">\n @for (item of range(); track $index) {\n @if (item === 'ellipsis-left' || item === 'ellipsis-right') {\n <!--\n The gap marker carries its name as visually-hidden text rather\n than an aria-label. A span has no role, and ARIA prohibits a\n name on a roleless generic element (axe: aria-prohibited-attr),\n so the label was being dropped by assistive tech anyway. The\n sr-only child is real text content, which every AT exposes.\n -->\n <span [class]=\"ellipsisClasses()\">\n <span aria-hidden=\"true\">…</span>\n <span class=\"sr-only\">{{ resolvedLabels().ellipsis }}</span>\n </span>\n } @else {\n @let pageNumber = item;\n @let isActive = pageNumber === clampedPage();\n @let pageDisabled = disabled();\n @if (linkFactory()) {\n <a\n data-tw-paginator-focusable\n [isDisabled]=\"pageDisabled\"\n data-tw-paginator-nav=\"page\"\n [class]=\"pageButtonClasses(isActive)\"\n [attr.href]=\"pageDisabled ? null : hrefFor(pageNumber)\"\n [attr.role]=\"pageDisabled ? 'link' : null\"\n [attr.aria-disabled]=\"pageDisabled ? 'true' : null\"\n [attr.tabindex]=\"pageDisabled ? -1 : 0\"\n [attr.aria-current]=\"isActive ? 'page' : null\"\n [attr.aria-label]=\"\n isActive\n ? formatCurrentPageLabel(pageNumber)\n : formatPageButtonLabel(pageNumber)\n \"\n (click)=\"onLinkClick($event, pageNumber, pageDisabled, 'click')\"\n >{{ pageNumber }}</a>\n } @else {\n <button\n type=\"button\"\n data-tw-paginator-focusable\n [isDisabled]=\"pageDisabled\"\n data-tw-paginator-nav=\"page\"\n [class]=\"pageButtonClasses(isActive)\"\n [disabled]=\"pageDisabled\"\n [attr.aria-current]=\"isActive ? 'page' : null\"\n [attr.aria-label]=\"\n isActive\n ? formatCurrentPageLabel(pageNumber)\n : formatPageButtonLabel(pageNumber)\n \"\n (click)=\"goTo(pageNumber, 'click')\"\n >{{ pageNumber }}</button>\n }\n }\n }\n </div>\n }\n\n <!-- Next -->\n @let nextDisabled = disabled() || isAtLastPage();\n @let nextTargetPage = nextTarget();\n @if (linkFactory()) {\n <a\n data-tw-paginator-focusable\n [isDisabled]=\"nextDisabled\"\n data-tw-paginator-nav=\"next\"\n [class]=\"navButtonClasses()\"\n [attr.href]=\"nextDisabled ? null : hrefFor(nextTargetPage)\"\n [attr.role]=\"nextDisabled ? 'link' : null\"\n [attr.aria-disabled]=\"nextDisabled ? 'true' : null\"\n [attr.tabindex]=\"nextDisabled ? -1 : 0\"\n [attr.aria-label]=\"resolvedLabels().next\"\n (click)=\"onLinkClick($event, nextTargetPage, nextDisabled, 'click')\"\n >\n @if (labelTemplateFor('next'); as tmpl) {\n <ng-container\n [ngTemplateOutlet]=\"tmpl\"\n [ngTemplateOutletContext]=\"labelContext()\"\n />\n } @else {\n <svg\n [class]=\"iconClasses()\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M7.22 14.78a.75.75 0 0 1 0-1.06L10.94 10 7.22 6.28a.75.75 0 0 1 1.06-1.06l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n }\n </a>\n } @else {\n <button\n type=\"button\"\n data-tw-paginator-focusable\n [isDisabled]=\"nextDisabled\"\n data-tw-paginator-nav=\"next\"\n [class]=\"navButtonClasses()\"\n [disabled]=\"nextDisabled\"\n [attr.aria-label]=\"resolvedLabels().next\"\n (click)=\"goTo(nextTargetPage, 'click')\"\n >\n @if (labelTemplateFor('next'); as tmpl) {\n <ng-container\n [ngTemplateOutlet]=\"tmpl\"\n [ngTemplateOutletContext]=\"labelContext()\"\n />\n } @else {\n <svg\n [class]=\"iconClasses()\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M7.22 14.78a.75.75 0 0 1 0-1.06L10.94 10 7.22 6.28a.75.75 0 0 1 1.06-1.06l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n }\n </button>\n }\n\n <!-- Last -->\n @if (showFirstLastButtons()) {\n @let lastDisabled = disabled() || isAtLastPage();\n @if (linkFactory()) {\n <a\n data-tw-paginator-focusable\n [isDisabled]=\"lastDisabled\"\n data-tw-paginator-nav=\"last\"\n [class]=\"navButtonClasses()\"\n [attr.href]=\"lastDisabled ? null : hrefFor(totalPages())\"\n [attr.role]=\"lastDisabled ? 'link' : null\"\n [attr.aria-disabled]=\"lastDisabled ? 'true' : null\"\n [attr.tabindex]=\"lastDisabled ? -1 : 0\"\n [attr.aria-label]=\"resolvedLabels().last\"\n (click)=\"onLinkClick($event, totalPages(), lastDisabled, 'click')\"\n >\n @if (labelTemplateFor('last'); as tmpl) {\n <ng-container\n [ngTemplateOutlet]=\"tmpl\"\n [ngTemplateOutletContext]=\"labelContext()\"\n />\n } @else {\n <svg\n [class]=\"iconClasses()\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M3.22 4.22a.75.75 0 0 1 1.06 0l5.25 5.25a.75.75 0 0 1 0 1.06l-5.25 5.25a.75.75 0 0 1-1.06-1.06L7.94 10 3.22 5.28a.75.75 0 0 1 0-1.06Zm6 0a.75.75 0 0 1 1.06 0l5.25 5.25a.75.75 0 0 1 0 1.06l-5.25 5.25a.75.75 0 1 1-1.06-1.06L13.94 10 9.22 5.28a.75.75 0 0 1 0-1.06Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n }\n </a>\n } @else {\n <button\n type=\"button\"\n data-tw-paginator-focusable\n [isDisabled]=\"lastDisabled\"\n data-tw-paginator-nav=\"last\"\n [class]=\"navButtonClasses()\"\n [disabled]=\"lastDisabled\"\n [attr.aria-label]=\"resolvedLabels().last\"\n (click)=\"goTo(totalPages(), 'click')\"\n >\n @if (labelTemplateFor('last'); as tmpl) {\n <ng-container\n [ngTemplateOutlet]=\"tmpl\"\n [ngTemplateOutletContext]=\"labelContext()\"\n />\n } @else {\n <svg\n [class]=\"iconClasses()\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M3.22 4.22a.75.75 0 0 1 1.06 0l5.25 5.25a.75.75 0 0 1 0 1.06l-5.25 5.25a.75.75 0 0 1-1.06-1.06L7.94 10 3.22 5.28a.75.75 0 0 1 0-1.06Zm6 0a.75.75 0 0 1 1.06 0l5.25 5.25a.75.75 0 0 1 0 1.06l-5.25 5.25a.75.75 0 1 1-1.06-1.06L13.94 10 9.22 5.28a.75.75 0 0 1 0-1.06Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n }\n </button>\n }\n }\n </div>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AA6IA;AAEA;AACA,MAAM,cAAc,GAA0C;AAC5D,IAAA,SAAS,EAAE,YAAY;AACvB,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,KAAK,EAAE,YAAY;AACnB,IAAA,IAAI,EAAE,WAAW;AACjB,IAAA,QAAQ,EAAE,MAAM;AAChB,IAAA,iBAAiB,EAAE,MAAM;AACzB,IAAA,SAAS,EAAE,+BAA+B;AAC1C,IAAA,aAAa,EAAE,iBAAiB;AAChC,IAAA,YAAY,EAAE,6BAA6B;AAC3C,IAAA,mBAAmB,EAAE,mBAAmB;AACxC,IAAA,oBAAoB,EAAE,2BAA2B;AACjD,IAAA,QAAQ,EAAE,YAAY;AACtB,IAAA,KAAK,EAAE,YAAY;CACpB;AAED;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,qBAAqB,GAA4B;AACrD,IAAA,OAAO,EAAE,0FAA0F;AACnG,IAAA,SAAS,EAAE,kGAAkG;AAC7G,IAAA,MAAM,EAAE,sFAAsF;AAC9F,IAAA,OAAO,EAAE,sDAAsD;AAC/D,IAAA,IAAI,EAAE,8EAA8E;AACpF,IAAA,OAAO,EAAE,0FAA0F;;;AAGnG,IA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A,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,yBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAI5D,kCAAkC,gGAgBG,2BAA2B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEnlBpE;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cdevhub-ngx-tw-paginator.mjs","sources":["../../../projects/ngx-tw/paginator/paginator.ts","../../../projects/ngx-tw/paginator/paginator.html","../../../projects/ngx-tw/paginator/cdevhub-ngx-tw-paginator.ts"],"sourcesContent":["import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n isDevMode,\n model,\n output,\n TemplateRef,\n untracked,\n viewChildren,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { type FocusableOption, FocusKeyManager, LiveAnnouncer } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { tv } from 'tailwind-variants';\nimport type { TwColor, TwSize } from '@cdevhub/ngx-tw/core';\n\n// ── Public types ──────────────────────────────────────────────────\n\n/** Rendering type. `'basic'` shows prev/next + page info only. `'numbered'` shows page buttons with ellipsis range. */\nexport type TwPaginatorType = 'basic' | 'numbered';\n\n/** Layout density. `'compact'` stacks regions left-to-right. `'spread'` distributes regions across the full container width. */\nexport type TwPaginatorLayout = 'compact' | 'spread';\n\n/** Responsive mode. `'auto'` collapses numbered pages to basic visuals on narrow containers via CSS container queries. `'off'` disables collapsing. */\nexport type TwPaginatorResponsive = 'auto' | 'off';\n\n/** Named slot accepted by `*twPaginatorLabel`. */\nexport type TwPaginatorLabelSlot =\n | 'pageInfo'\n | 'previous'\n | 'next'\n | 'first'\n | 'last'\n | 'pageSizeLabel';\n\n/**\n * String labels used throughout the paginator.\n *\n * Every member is optional. This interface only ever reaches consumers through\n * `input<Partial<TwPaginatorLabels>>`, and unset keys fall back to the English\n * defaults — so a consumer holding an i18n bundle typed as `TwPaginatorLabels`\n * must not be forced to restate all fourteen keys, and adding a label in a\n * future minor must not break them on a non-major release.\n */\nexport interface TwPaginatorLabels {\n /** Accessible name for the `<nav>` landmark. */\n ariaLabel?: string;\n /** Label on the Previous button. */\n previous?: string;\n /** Label on the Next button. */\n next?: string;\n /** Label on the First-page button. */\n first?: string;\n /** Label on the Last-page button. */\n last?: string;\n /** Visible label before the current-page indicator. Used as `\"{pageInfo} {page}{pageInfoSeparator}{totalPages}\"`. */\n pageInfo?: string;\n /** Text that joins the current page and total. */\n pageInfoSeparator?: string;\n /** Range-style page info template. Variables: `{start}`, `{end}`, `{total}`. */\n pageRange?: string;\n /** Visible label next to the page-size selector. */\n pageSizeLabel?: string;\n /** `LiveAnnouncer` template used on every page change. Variables: `{page}`, `{totalPages}`, `{start}`, `{end}`, `{total}`. */\n announcement?: string;\n /** Accessible label per numbered page button. Variable: `{page}`. */\n pageButtonAriaLabel?: string;\n /** Accessible label for the current numbered page button. Variable: `{page}`. */\n currentPageAriaLabel?: string;\n /** Accessible label applied to ellipsis items. */\n ellipsis?: string;\n /** Rendered when `hideOnEmpty` is `false` and `totalItems === 0`. */\n empty?: string;\n}\n\n/** Emitted by `pageChange`. */\nexport interface TwPaginatorPageChangeEvent {\n /** The new 1-based page. */\n page: number;\n /** The new items-per-page. */\n pageSize: number;\n /** The previous 1-based page. */\n previousPage: number;\n /** The previous items-per-page. */\n previousPageSize: number;\n /** Total number of items. */\n totalItems: number;\n /** Total number of pages given the current `totalItems` and `pageSize`. */\n totalPages: number;\n /** 1-based index of the first item on the new page (inclusive). */\n start: number;\n /** 1-based index of the last item on the new page (inclusive). */\n end: number;\n /** What triggered the change. */\n source: 'click' | 'keyboard' | 'pageSizeChange' | 'programmatic';\n}\n\n/** Template context provided to every `*twPaginatorLabel` and `*twPaginatorEmpty` template. */\nexport interface TwPaginatorLabelContext {\n /** 1-based current page. */\n page: number;\n /** Total pages. */\n totalPages: number;\n /** 1-based index of the first item on the current page (inclusive). */\n start: number;\n /** 1-based index of the last item on the current page (inclusive). */\n end: number;\n /** Total number of items. */\n totalItems: number;\n /** Current items per page. */\n pageSize: number;\n /** Whether the paginator is globally disabled. */\n disabled: boolean;\n}\n\n/** Template context provided to `*twPaginatorPageSizeSelector`. */\nexport interface TwPaginatorPageSizeSelectorContext {\n /** Current page size. */\n pageSize: number;\n /** Available page-size options. */\n options: readonly number[];\n /** Updates the page size and re-anchors the current page to keep the same first visible item. */\n setPageSize: (size: number) => void;\n}\n\n// ── Internal types ────────────────────────────────────────────────\n\ntype PaginationRangeItem = number | 'ellipsis-left' | 'ellipsis-right';\n\ntype PageChangeSource = TwPaginatorPageChangeEvent['source'];\n\n// ── Default labels ────────────────────────────────────────────────\n\n/** English defaults. `Required<>` so every key reads back as a plain `string`. */\nconst DEFAULT_LABELS: Readonly<Required<TwPaginatorLabels>> = {\n ariaLabel: 'Pagination',\n previous: 'Previous',\n next: 'Next',\n first: 'First page',\n last: 'Last page',\n pageInfo: 'Page',\n pageInfoSeparator: ' of ',\n pageRange: '{start}\\u2013{end} of {total}',\n pageSizeLabel: 'Items per page:',\n announcement: 'Page {page} of {totalPages}',\n pageButtonAriaLabel: 'Go to page {page}',\n currentPageAriaLabel: 'Page {page}, current page',\n ellipsis: 'More pages',\n empty: 'No results',\n};\n\n// ── Static active-page class maps (Tailwind v4 requires statically written class strings) ──\n// Mirrors the checkbox SOLID_BOX / SOLID_ICON split: a per-color background + border map\n// and a per-color on-color text map. `text-on-{color}` keeps the active button readable\n// against any consumer theme without hardcoding `text-white` (would fail for warning's\n// dark-on-amber convention) or `text-black`. The legacy `--color-on-*` alias tokens still\n// resolve to the canonical solid-fg slot per `theme/_semantic.css` lines 284-296.\n\nconst PAGE_BUTTON_ACTIVE_BG: Record<TwColor, string> = {\n primary: 'bg-primary-600 hover:bg-primary-700 border-primary-600 focus-visible:outline-primary-border',\n secondary: 'bg-secondary-600 hover:bg-secondary-700 border-secondary-600 focus-visible:outline-secondary-border',\n accent: 'bg-accent-600 hover:bg-accent-700 border-accent-600 focus-visible:outline-accent-border',\n neutral: 'bg-fg hover:bg-fg border-fg focus-visible:outline-fg',\n info: 'bg-info-600 hover:bg-info-700 border-info-600 focus-visible:outline-info-border',\n success: 'bg-success-600 hover:bg-success-700 border-success-600 focus-visible:outline-success-border',\n // Warning keeps -500 because the amber-500/amber-950 pairing meets contrast — see\n // `theme/_semantic.css` warning role comment (\"yellow signage convention\").\n warning: 'bg-warning-500 hover:bg-warning-600 border-warning-border-strong focus-visible:outline-warning-border',\n error: 'bg-error-600 hover:bg-error-700 border-error-600 focus-visible:outline-error-border',\n};\n\nconst PAGE_BUTTON_ACTIVE_FG: Record<TwColor, string> = {\n primary: 'text-on-primary',\n secondary: 'text-on-secondary',\n accent: 'text-on-accent',\n neutral: 'text-on-neutral',\n info: 'text-on-info',\n success: 'text-on-success',\n warning: 'text-on-warning',\n error: 'text-on-error',\n};\n\n// ── Pure helpers (exported for unit testing only — not re-exported from index.ts) ──\n\n/**\n * Builds the visible page range for the numbered paginator, inserting ellipsis\n * sentinels where ranges are collapsed. Port of the shadcn/Radix algorithm.\n *\n * @internal exported for unit tests; not part of the public API.\n */\nexport function buildPaginationRange(\n currentPage: number,\n totalPages: number,\n siblingCount: number,\n boundaryCount: number,\n): PaginationRangeItem[] {\n const total = Math.max(0, Math.floor(totalPages));\n if (total <= 0) return [];\n\n const siblings = Math.max(0, Math.floor(siblingCount));\n const boundaries = Math.max(0, Math.floor(boundaryCount));\n const current = Math.min(Math.max(1, Math.floor(currentPage)), total);\n\n // If all pages fit without ellipses, show them all.\n const totalPageButtons = boundaries * 2 + siblings * 2 + 3;\n if (total <= totalPageButtons) {\n return range(1, total);\n }\n\n const leftBoundary = range(1, Math.min(boundaries, total));\n const rightBoundary = range(Math.max(total - boundaries + 1, 1), total);\n\n const leftSibling = Math.max(current - siblings, boundaries + 2);\n const rightSibling = Math.min(current + siblings, total - boundaries - 1);\n\n const showLeftEllipsis = leftSibling > boundaries + 2;\n const showRightEllipsis = rightSibling < total - boundaries - 1;\n\n const middle: PaginationRangeItem[] = [];\n if (showLeftEllipsis) {\n middle.push('ellipsis-left');\n } else {\n // Fill the gap between left boundary and leftSibling with explicit numbers.\n for (let i = boundaries + 1; i < leftSibling; i++) middle.push(i);\n }\n\n for (let i = leftSibling; i <= rightSibling; i++) middle.push(i);\n\n if (showRightEllipsis) {\n middle.push('ellipsis-right');\n } else {\n for (let i = rightSibling + 1; i <= total - boundaries; i++) middle.push(i);\n }\n\n return [...leftBoundary, ...middle, ...rightBoundary];\n}\n\nfunction range(start: number, end: number): number[] {\n if (end < start) return [];\n const out: number[] = new Array(end - start + 1);\n for (let i = 0; i < out.length; i++) out[i] = start + i;\n return out;\n}\n\n/** Replaces `{key}` placeholders in `template` with values from `vars`. */\nfunction formatLabel(\n template: string,\n vars: Readonly<Record<string, string | number>>,\n): string {\n // Defence in depth. `resolvedLabels()` already filters explicitly-undefined\n // consumer keys, so a non-string cannot reach here through the public\n // `labels` input today. The guard exists so a future regression in that\n // merge degrades to a missing label instead of throwing inside a `computed`\n // and taking the render down.\n if (typeof template !== 'string') return '';\n return template.replace(/\\{(\\w+)\\}/g, (match, key: string) =>\n Object.prototype.hasOwnProperty.call(vars, key) ? String(vars[key]) : match,\n );\n}\n\n// ── tv() config ───────────────────────────────────────────────────\n\nconst paginatorVariants = tv(\n {\n slots: {\n root: 'flex w-full',\n inner: 'flex items-center gap-3 flex-wrap w-full min-w-0',\n pageSizeGroup: 'flex items-center gap-2 shrink-0',\n pageSizeLabel: 'text-sm text-fg-muted whitespace-nowrap',\n pageSizeSelect:\n 'rounded-md border border-border bg-surface text-fg cursor-pointer transition-colors duration-normal motion-reduce:transition-none hover:bg-surface-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500 disabled:opacity-50 disabled:pointer-events-none',\n pageInfo: 'text-sm text-fg-muted whitespace-nowrap',\n navGroup: 'flex items-center gap-1',\n pageList: 'flex items-center gap-1',\n navButton:\n 'inline-flex items-center justify-center rounded-md border border-border bg-surface text-fg transition-colors duration-normal motion-reduce:transition-none cursor-pointer hover:bg-surface-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500 disabled:opacity-50 disabled:pointer-events-none disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed',\n pageButton:\n 'inline-flex items-center justify-center rounded-md border border-transparent text-fg transition-colors duration-normal motion-reduce:transition-none cursor-pointer hover:bg-surface-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500 disabled:opacity-50 disabled:pointer-events-none disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed',\n ellipsis:\n 'inline-flex items-center justify-center text-fg-subtle select-none pointer-events-none',\n emptyState: 'text-sm text-fg-muted',\n icon: 'size-4 shrink-0',\n },\n variants: {\n // Heights are pinned to the control scale (docs/vertical-rhythm.md):\n // 24 / 32 / 36 / 44 / 48. Vertical padding is deleted deliberately — the\n // buttons centre via `inline-flex items-center justify-center` and the\n // native `<select>` centres its own text, so any surviving `py-*` would\n // only fight the pinned height under `box-sizing: border-box`. `min-w-*`\n // tracks the height so number buttons stay square until the digits\n // widen them. `ellipsis` moves in lockstep or the numbered row\n // reintroduces a height divergence inside the component.\n size: {\n xs: {\n navButton: 'px-2 text-xs min-w-6 h-6',\n pageButton: 'px-2 text-xs min-w-6 h-6',\n pageSizeSelect: 'px-2 text-xs h-6',\n ellipsis: 'min-w-6 h-6 text-xs',\n // `size-3.5` (14px) half-step: neither size-3 nor size-4 aligns with\n // text-xs glyph metrics inside a 24px nav button.\n icon: 'size-3.5',\n },\n sm: {\n navButton: 'px-2.5 text-sm min-w-8 h-8',\n pageButton: 'px-2.5 text-sm min-w-8 h-8',\n pageSizeSelect: 'px-2.5 text-sm h-8',\n ellipsis: 'min-w-8 h-8 text-sm',\n icon: 'size-4',\n },\n md: {\n navButton: 'px-3 text-sm min-w-9 h-9',\n pageButton: 'px-3 text-sm min-w-9 h-9',\n pageSizeSelect: 'px-3 text-sm h-9',\n ellipsis: 'min-w-9 h-9 text-sm',\n icon: 'size-4',\n },\n lg: {\n navButton: 'px-4 text-base min-w-11 h-11',\n pageButton: 'px-4 text-base min-w-11 h-11',\n pageSizeSelect: 'px-4 text-base h-11',\n ellipsis: 'min-w-11 h-11 text-base',\n icon: 'size-5',\n },\n xl: {\n navButton: 'px-5 text-base min-w-12 h-12',\n pageButton: 'px-5 text-base min-w-12 h-12',\n pageSizeSelect: 'px-5 text-base h-12',\n ellipsis: 'min-w-12 h-12 text-base',\n icon: 'size-5',\n },\n },\n layout: {\n compact: { inner: 'justify-start' },\n spread: { inner: 'justify-between' },\n },\n type: {\n basic: { pageList: 'hidden' },\n numbered: {},\n },\n responsive: {\n auto: { root: '@container' },\n off: {},\n },\n disabled: {\n true: { root: 'opacity-50 pointer-events-none' },\n false: {},\n },\n },\n compoundVariants: [\n // Auto-collapse numbered page list under 30rem container width.\n {\n type: 'numbered',\n responsive: 'auto',\n class: { pageList: 'hidden @[30rem]:flex' },\n },\n ],\n defaultVariants: {\n size: 'md',\n layout: 'compact',\n type: 'numbered',\n responsive: 'auto',\n disabled: false,\n },\n },\n { twMerge: true },\n);\n\n// ── Template directives ───────────────────────────────────────────\n\n/**\n * Structural directive on an `<ng-template>` that replaces a specific label slot.\n * Usage: `<ng-template twPaginatorLabel slot=\"pageInfo\" let-ctx> … </ng-template>`.\n */\n@Directive({ selector: 'ng-template[twPaginatorLabel]' })\nexport class PaginatorLabelDirective {\n /** The label slot this template overrides. */\n readonly slot = input.required<TwPaginatorLabelSlot>();\n\n /** @internal */\n readonly templateRef = inject(TemplateRef<{ $implicit: TwPaginatorLabelContext }>);\n\n /** @internal */\n static ngTemplateContextGuard(\n _dir: PaginatorLabelDirective,\n _ctx: unknown,\n ): _ctx is { $implicit: TwPaginatorLabelContext } {\n return true;\n }\n}\n\n/**\n * Structural directive on an `<ng-template>` that renders when `totalItems === 0`\n * and `hideOnEmpty` is `false`. When absent, `labels.empty` renders as fallback.\n */\n@Directive({ selector: 'ng-template[twPaginatorEmpty]' })\nexport class PaginatorEmptyDirective {\n /** @internal */\n readonly templateRef = inject(TemplateRef<{ $implicit: TwPaginatorLabelContext }>);\n\n /** @internal */\n static ngTemplateContextGuard(\n _dir: PaginatorEmptyDirective,\n _ctx: unknown,\n ): _ctx is { $implicit: TwPaginatorLabelContext } {\n return true;\n }\n}\n\n/**\n * Structural directive on an `<ng-template>` that replaces the default page-size\n * selector UI entirely. Context `$implicit` exposes `{ pageSize, options, setPageSize }`.\n */\n@Directive({ selector: 'ng-template[twPaginatorPageSizeSelector]' })\nexport class PaginatorPageSizeSelectorDirective {\n /** @internal */\n readonly templateRef = inject(\n TemplateRef<{ $implicit: TwPaginatorPageSizeSelectorContext }>,\n );\n\n /** @internal */\n static ngTemplateContextGuard(\n _dir: PaginatorPageSizeSelectorDirective,\n _ctx: unknown,\n ): _ctx is { $implicit: TwPaginatorPageSizeSelectorContext } {\n return true;\n }\n}\n\n// ── PaginatorFocusableDirective ───────────────────────────────────\n\n/**\n * @internal Wraps every nav-group focusable (first/prev/page/next/last) as a CDK\n * `FocusableOption` so `FocusKeyManager` can drive roving focus across the group.\n * Applied via attribute selector on the existing `data-tw-paginator-focusable`\n * marker so the spec's button queries continue to match.\n */\n// Selector deliberately matches the existing `data-tw-paginator-focusable`\n// data-attribute marker emitted in the template; camelCasing would break the\n// spec's button queries. See the JSDoc above this declaration.\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[data-tw-paginator-focusable]',\n})\nexport class PaginatorFocusableDirective implements FocusableOption {\n readonly elementRef = inject(ElementRef<HTMLElement>);\n\n /** When true, the element is skipped by `FocusKeyManager` roving focus. Defaults to `false`. */\n readonly isDisabled = input(false);\n\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n /**\n * `FocusableOption.disabled` resolver. NOTE: returning the signal function\n * itself would always be truthy, so `FocusKeyManager` would skip every\n * element. Call the signal here so the manager sees the actual value.\n */\n get disabled(): boolean {\n return this.isDisabled();\n }\n}\n\n// ── PaginatorComponent ────────────────────────────────────────────\n\nlet nextPaginatorId = 0;\n\n@Component({\n selector: 'tw-paginator',\n exportAs: 'twPaginator',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet, PaginatorFocusableDirective],\n templateUrl: './paginator.html',\n host: {\n '[attr.role]': 'shouldRender() ? \"navigation\" : null',\n '[class]': 'rootClasses()',\n '[attr.aria-label]': 'shouldRender() ? resolvedAriaLabel() : null',\n '[style.container-name]': 'containerName()',\n },\n})\nexport class PaginatorComponent {\n // ── Inputs ──\n\n /** Total number of items across all pages. Defaults to `0`. */\n readonly totalItems = input<number>(0);\n\n /** Items per page. Two-way bindable via `[(pageSize)]`; writes back when the user picks a different size in the page-size selector. Defaults to `10`. */\n readonly pageSize = model<number>(10);\n\n /** 1-based current page. Two-way bindable via `[(page)]`; writes back when the user navigates, and whenever the value is clamped into the valid `1…totalPages` range. Defaults to `1`. */\n readonly page = model<number>(1);\n\n /** Rendering type. Defaults to `'numbered'`. */\n readonly type = input<TwPaginatorType>('numbered');\n\n /** Layout density. Defaults to `'compact'`. */\n readonly layout = input<TwPaginatorLayout>('compact');\n\n /** Controls padding, font size, and icon size. Defaults to `'md'`. */\n readonly size = input<TwSize>('md');\n\n /** Semantic color used for the active page indicator. Defaults to `'primary'`. */\n readonly color = input<TwColor>('primary');\n\n /** How many sibling pages to show on each side of the current page. Defaults to `1`. */\n readonly siblingCount = input<number>(1);\n\n /** How many pages to always show at the start and end boundaries. Defaults to `1`. */\n readonly boundaryCount = input<number>(1);\n\n /** When true, renders jump-to-first and jump-to-last buttons. Defaults to `true` — first/last jumps are the standard pagination affordance for any list large enough to need a paginator; the special case is a compact paginator that opts out. */\n readonly showFirstLastButtons = input<boolean>(true);\n\n /** When true, renders the page-size selector region. Defaults to `false`. */\n readonly showPageSizeSelector = input<boolean>(false);\n\n /** Options for the default page-size selector. Ignored when `*twPaginatorPageSizeSelector` is projected. Defaults to `[10, 25, 50, 100]`. */\n readonly pageSizeOptions = input<readonly number[]>([10, 25, 50, 100]);\n\n /** When true, renders the page-info text region. Defaults to `true` — showing \"X–Y of Z\" is the expected pagination context; the special case is an ultra-compact paginator in tight UI that opts out. */\n readonly showPageInfo = input<boolean>(true);\n\n /** When true, renders nothing when `totalItems === 0`. Defaults to `true` — hiding the paginator on empty data is the expected UX; the special case is a layout that opts out to reserve the paginator's vertical space. */\n readonly hideOnEmpty = input<boolean>(true);\n\n /** When true, renders nothing when `totalPages <= 1`. Defaults to `false`. */\n readonly hideOnSinglePage = input<boolean>(false);\n\n /** Responsive collapse mode. Defaults to `'auto'`. */\n readonly responsive = input<TwPaginatorResponsive>('auto');\n\n /** When true, every button is disabled. Defaults to `false`. */\n readonly disabled = input<boolean>(false);\n\n /** Partial string labels object for i18n. Unset keys fall back to English defaults. Defaults to `{}`. */\n readonly labels = input<Partial<TwPaginatorLabels>>({});\n\n /** When provided, buttons render as anchor links using the returned `href`. Defaults to `undefined` (renders as buttons). */\n readonly linkFactory = input<((page: number) => string) | undefined>(undefined);\n\n /**\n * Overrides `labels.ariaLabel` for the root `<nav>` element. Bound as `aria-label`.\n * Defaults to `undefined` (the resolved `labels.ariaLabel` is used).\n *\n * The host renders as a `navigation` landmark, so a page showing more than one\n * paginator (the common \"controls above and below a table\" shape) MUST give each\n * one a distinct name here — two landmarks of the same role sharing an accessible\n * name are indistinguishable to a screen-reader landmark list (axe:\n * `landmark-unique`).\n */\n readonly customAriaLabel = input<string | undefined>(undefined, {\n alias: 'aria-label',\n });\n\n // ── Outputs ──\n\n /** Fires when `page` or `pageSize` changes. Payload includes derived helpers (`start`, `end`, `totalPages`, `source`). Use `[(page)]` / `[(pageSize)]` for two-way binding; subscribe to this for the rich event payload. */\n readonly paginated = output<TwPaginatorPageChangeEvent>();\n\n // ── Projected templates ──\n\n /** @internal */\n readonly labelDirectives = contentChildren(PaginatorLabelDirective);\n\n /** @internal */\n readonly emptyDirective = contentChild(PaginatorEmptyDirective);\n\n /** @internal */\n readonly pageSizeSelectorDirective = contentChild(\n PaginatorPageSizeSelectorDirective,\n );\n\n // ── Injected services ──\n\n private readonly _liveAnnouncer = inject(LiveAnnouncer);\n private readonly _elementRef = inject(ElementRef<HTMLElement>);\n /**\n * Optional so a consumer that never imports `BidiModule` still gets a working\n * paginator — the key manager falls back to `'ltr'` when the token is absent.\n */\n private readonly _directionality = inject(Directionality, { optional: true });\n\n // ── View children ──\n\n /** @internal All nav-group focusables (first/prev/page/next/last) for `FocusKeyManager`. */\n readonly focusableItems = viewChildren(PaginatorFocusableDirective);\n\n // ── IDs ──\n\n private readonly _componentId = `tw-paginator-${nextPaginatorId++}`;\n\n /** @internal */\n readonly pageSizeSelectId = `${this._componentId}-size`;\n\n // ── Derived state ──\n\n /** @internal Effective page size, coerced to at least 1. */\n readonly effectivePageSize = computed(() => Math.max(1, this.pageSize()));\n\n /** @internal Total number of pages; always ≥ 1 to keep clamping math well-defined. */\n readonly totalPages = computed(() => {\n const total = this.totalItems();\n if (total <= 0) return 1;\n return Math.max(1, Math.ceil(total / this.effectivePageSize()));\n });\n\n /** @internal Current page clamped into `[1, totalPages]`. */\n readonly clampedPage = computed(() =>\n Math.min(Math.max(1, this.page()), this.totalPages()),\n );\n\n /** @internal 1-based start item index on the current page. `0` when empty. */\n readonly startItem = computed(() => {\n if (this.totalItems() <= 0) return 0;\n return (this.clampedPage() - 1) * this.effectivePageSize() + 1;\n });\n\n /** @internal 1-based end item index on the current page. `0` when empty. */\n readonly endItem = computed(() => {\n if (this.totalItems() <= 0) return 0;\n return Math.min(\n this.clampedPage() * this.effectivePageSize(),\n this.totalItems(),\n );\n });\n\n /** @internal Visible page range for the numbered type. */\n readonly range = computed(() =>\n buildPaginationRange(\n this.clampedPage(),\n this.totalPages(),\n this.siblingCount(),\n this.boundaryCount(),\n ),\n );\n\n /**\n * @internal Merged labels.\n *\n * Explicitly-undefined keys are dropped before merging. Root `tsconfig.json`\n * does not set `exactOptionalPropertyTypes`, so\n * `[labels]=\"{ pageButtonAriaLabel: i18n.pageBtn }\"` type-checks even when\n * the i18n bundle has no such key — and a plain spread would then overwrite\n * the default with `undefined`, which reaches `formatLabel()` and throws\n * `Cannot read properties of undefined (reading 'replace')` inside a\n * `computed`, taking the whole page down on first render. Same filter\n * `table.ts` and `timeline.ts` already use; `Required<>` then guarantees the\n * template a string for every label.\n */\n readonly resolvedLabels = computed<Required<TwPaginatorLabels>>(() => {\n const overrides = Object.fromEntries(\n Object.entries(this.labels() ?? {}).filter(([, value]) => value !== undefined),\n );\n return { ...DEFAULT_LABELS, ...overrides } as Required<TwPaginatorLabels>;\n });\n\n /** @internal Resolved aria-label for the root. */\n readonly resolvedAriaLabel = computed(\n () => this.customAriaLabel() ?? this.resolvedLabels().ariaLabel,\n );\n\n /** @internal `container-name` for the CSS container query (set only when responsive=\"auto\"). */\n readonly containerName = computed(() =>\n this.responsive() === 'auto' ? 'paginator' : null,\n );\n\n readonly isEmpty = computed(() => this.totalItems() <= 0);\n\n readonly isAtFirstPage = computed(() => this.clampedPage() <= 1);\n\n readonly isAtLastPage = computed(\n () => this.clampedPage() >= this.totalPages(),\n );\n\n /** @internal Target page for the Previous button (clamped to `[1, totalPages]`). */\n readonly previousTarget = computed(() => Math.max(1, this.clampedPage() - 1));\n\n /** @internal Target page for the Next button (clamped to `[1, totalPages]`). */\n readonly nextTarget = computed(() =>\n Math.min(this.totalPages(), this.clampedPage() + 1),\n );\n\n /** @internal Whether the component should render at all. */\n readonly shouldRender = computed(() => {\n if (this.isEmpty() && this.hideOnEmpty()) return false;\n if (this.hideOnSinglePage() && this.totalPages() <= 1 && !this.isEmpty())\n return false;\n return true;\n });\n\n // ── Variant class computation ──\n\n private readonly _variantResult = computed(() =>\n paginatorVariants({\n size: this.size(),\n layout: this.layout(),\n type: this.type(),\n responsive: this.responsive(),\n disabled: this.disabled(),\n }),\n );\n\n readonly rootClasses = computed(() => this._variantResult().root());\n readonly innerClasses = computed(() => this._variantResult().inner());\n readonly pageSizeGroupClasses = computed(() =>\n this._variantResult().pageSizeGroup(),\n );\n readonly pageSizeLabelClasses = computed(() =>\n this._variantResult().pageSizeLabel(),\n );\n readonly pageSizeSelectClasses = computed(() =>\n this._variantResult().pageSizeSelect(),\n );\n readonly pageInfoClasses = computed(() => this._variantResult().pageInfo());\n readonly navGroupClasses = computed(() => this._variantResult().navGroup());\n readonly pageListClasses = computed(() => this._variantResult().pageList());\n readonly navButtonClasses = computed(() => this._variantResult().navButton());\n readonly ellipsisClasses = computed(() => this._variantResult().ellipsis());\n readonly emptyStateClasses = computed(() => this._variantResult().emptyState());\n readonly iconClasses = computed(() => this._variantResult().icon());\n\n /** @internal Applies active-color classes to the current page button. */\n pageButtonClasses(active: boolean): string {\n const base = this._variantResult().pageButton();\n if (!active) return base;\n const color = this.color();\n return `${base} ${PAGE_BUTTON_ACTIVE_BG[color]} ${PAGE_BUTTON_ACTIVE_FG[color]}`;\n }\n\n // ── Projected template lookup ──\n\n /** @internal */\n labelTemplateFor(\n slot: TwPaginatorLabelSlot,\n ): TemplateRef<{ $implicit: TwPaginatorLabelContext }> | null {\n const match = this.labelDirectives().find((d) => d.slot() === slot);\n return match ? match.templateRef : null;\n }\n\n /** @internal Template-context wrapper so projected templates receive `$implicit: TwPaginatorLabelContext`. */\n readonly labelContext = computed<{ $implicit: TwPaginatorLabelContext }>(() => ({\n $implicit: {\n page: this.clampedPage(),\n totalPages: this.totalPages(),\n start: this.startItem(),\n end: this.endItem(),\n totalItems: this.totalItems(),\n pageSize: this.effectivePageSize(),\n disabled: this.disabled(),\n },\n }));\n\n /** @internal */\n readonly pageSizeContext = computed<{\n $implicit: TwPaginatorPageSizeSelectorContext;\n }>(() => ({\n $implicit: {\n pageSize: this.effectivePageSize(),\n options: this.pageSizeOptions(),\n setPageSize: (n: number) => this._setPageSize(n),\n },\n }));\n\n // ── Rendered strings ──\n\n /** @internal Default page-info string (type-aware). */\n readonly formattedPageInfo = computed(() => {\n const labels = this.resolvedLabels();\n if (this.isEmpty()) return labels.empty;\n if (this.type() === 'basic') {\n return formatLabel(labels.pageRange, {\n start: this.startItem(),\n end: this.endItem(),\n total: this.totalItems(),\n });\n }\n return `${labels.pageInfo} ${this.clampedPage()}${labels.pageInfoSeparator}${this.totalPages()}`;\n });\n\n /** @internal ARIA label for a numbered page button. */\n formatPageButtonLabel(page: number): string {\n return formatLabel(this.resolvedLabels().pageButtonAriaLabel, { page });\n }\n\n /** @internal ARIA label for the current page button. */\n formatCurrentPageLabel(page: number): string {\n return formatLabel(this.resolvedLabels().currentPageAriaLabel, { page });\n }\n\n /** @internal Returns the anchor href for a page when `linkFactory` is set and the page is navigable. */\n hrefFor(page: number): string | null {\n const lf = this.linkFactory();\n if (!lf) return null;\n if (this.disabled()) return null;\n return lf(Math.min(Math.max(1, page), this.totalPages()));\n }\n\n // ── State bookkeeping (for emission) ──\n\n private _previousPage = this.page();\n private _previousPageSize = this.pageSize();\n private _pendingSource: PageChangeSource | null = null;\n private _initialized = false;\n\n // ── Keyboard navigation (CDK FocusKeyManager) ──\n\n /** @internal */\n private _keyManager: FocusKeyManager<PaginatorFocusableDirective> | null = null;\n\n constructor() {\n afterNextRender(() => {\n this._initialized = true;\n if (isDevMode()) {\n this._runDevWarnings();\n }\n });\n\n // Emit pageChange whenever page or pageSize changes (after initial render).\n // When an out-of-range page is detected, clamp and emit with source 'programmatic'.\n //\n // DOCUMENTED no-write-in-effect exception (see CLAUDE.md). This effect reads\n // `page()` *and* writes `page.set(clamped)` — an intrinsic cycle, because the\n // clamp must fire both when `totalPages` shrinks AND when the consumer assigns\n // an out-of-range page (so `page` must stay a tracked dependency). The cycle is\n // bounded by the `clamped !== newPage` guard: the write re-triggers the effect\n // exactly once, the re-run sees an in-range value, and it settles. It never\n // loops/freezes. The `untracked()` wrapper does NOT break this cycle (page is\n // tracked above); its job is to keep the signal reads inside `_emitChange` /\n // `_announce` from registering as effect dependencies.\n effect(() => {\n const newPage = this.page();\n const newSize = this.pageSize();\n const tp = this.totalPages();\n\n untracked(() => {\n const oldPage = this._previousPage;\n const oldSize = this._previousPageSize;\n\n // Clamp out-of-bounds page — do this first, then allow a follow-up tick to emit.\n const clamped = Math.min(Math.max(1, newPage), tp);\n if (clamped !== newPage) {\n // Set pending source only if nothing else is pending (preserve originator).\n if (this._pendingSource === null) this._pendingSource = 'programmatic';\n this.page.set(clamped);\n return;\n }\n\n if (newPage === oldPage && newSize === oldSize) {\n // No effective change (first run after init).\n return;\n }\n\n this._previousPage = newPage;\n this._previousPageSize = newSize;\n\n if (!this._initialized) return;\n\n const source = this._pendingSource ?? 'programmatic';\n this._pendingSource = null;\n this._emitChange(newPage, newSize, oldPage, oldSize, source);\n this._announce(newPage);\n });\n });\n\n // Rebuild the FocusKeyManager whenever the focusable set changes (e.g. the\n // numbered page list re-renders when total or current page shifts) or the\n // app flips `dir` at runtime. No `.withWrap()` — paginators should NOT loop\n // from page 1 ArrowLeft to the last page; that would be disorienting, and\n // this is a deliberate divergence from `tabs`/`tab-nav`, which do wrap.\n //\n // The orientation is fed from the live layout direction rather than a\n // hardcoded `'ltr'`: CDK's ListKeyManager maps ArrowLeft to\n // `setPreviousItemActive()` under `'ltr'` and `setNextItemActive()` under\n // `'rtl'`, so pinning `'ltr'` inverts ArrowLeft/ArrowRight in RTL locales —\n // the arrow steps backwards in DOM order but forwards visually.\n // `Directionality.valueSignal` is read directly (CDK 22+) so this effect\n // re-runs on a direction change without a manual subscription mirror; that\n // is the same behaviour `tab-nav` gets from its `Directionality.change`\n // subscription, with less boilerplate.\n //\n // The `disabled` getter on `PaginatorFocusableDirective` resolves the\n // `isDisabled()` signal so the manager skips disabled controls.\n // `onCleanup` fires both on rebuild AND on component destroy, so no separate\n // `_destroyRef.onDestroy` is needed.\n effect((onCleanup) => {\n const items = this.focusableItems();\n const direction = this._directionality?.valueSignal() ?? 'ltr';\n if (items.length === 0) {\n this._keyManager = null;\n return;\n }\n const manager = new FocusKeyManager(items)\n .withHorizontalOrientation(direction)\n .withHomeAndEnd();\n this._keyManager = manager;\n\n onCleanup(() => {\n manager.destroy();\n });\n });\n }\n\n // ── User-facing action methods ──\n\n /** @internal Navigate to a specific page (click/keyboard handler). */\n goTo(target: number, source: Exclude<PageChangeSource, 'pageSizeChange'>): void {\n if (this.disabled()) return;\n const tp = this.totalPages();\n const next = Math.min(Math.max(1, target), tp);\n if (next === this.clampedPage()) return;\n this._pendingSource = source;\n this.page.set(next);\n }\n\n /** @internal Click handler for anchor-link mode. Suppresses navigation for disabled targets. */\n onLinkClick(\n event: MouseEvent,\n target: number,\n disabled: boolean,\n source: Exclude<PageChangeSource, 'pageSizeChange'>,\n ): void {\n if (disabled || this.disabled()) {\n event.preventDefault();\n return;\n }\n // Let the browser follow the anchor; still emit a pageChange.\n this.goTo(target, source);\n }\n\n /** @internal Handler for the default page-size `<select>`. */\n onPageSizeSelectChange(event: Event): void {\n const target = event.target as HTMLSelectElement;\n const parsed = Number(target.value);\n if (Number.isFinite(parsed) && parsed > 0) {\n this._setPageSize(parsed);\n }\n }\n\n private _setPageSize(size: number): void {\n if (this.disabled()) return;\n const newSize = Math.max(1, Math.floor(size));\n const oldPage = this.clampedPage();\n const oldSize = this.effectivePageSize();\n if (newSize === oldSize) return;\n\n const firstItem = (oldPage - 1) * oldSize + 1;\n const total = this.totalItems();\n const newTp = total <= 0 ? 1 : Math.max(1, Math.ceil(total / newSize));\n const newPage = Math.min(Math.max(1, Math.ceil(firstItem / newSize)), newTp);\n\n this._pendingSource = 'pageSizeChange';\n this.pageSize.set(newSize);\n if (newPage !== oldPage) this.page.set(newPage);\n // If only pageSize changed but page value is unchanged, the effect still fires\n // because pageSize is tracked.\n }\n\n /**\n * @internal Keyboard navigation inside the nav group. Delegates ArrowLeft /\n * ArrowRight / Home / End to CDK `FocusKeyManager`. The manager skips\n * disabled controls automatically via the `disabled` getter on\n * `PaginatorFocusableDirective`.\n */\n onKeydown(event: KeyboardEvent): void {\n if (!this._keyManager) return;\n const items = this.focusableItems();\n if (items.length === 0) return;\n\n // Sync the manager's active index to whichever focusable currently owns DOM\n // focus, so arrow keys move from the user's perceived position rather than\n // the stale post-render default of -1.\n const focusedIdx = items.findIndex(\n (item) => item.elementRef.nativeElement === event.target,\n );\n if (focusedIdx >= 0 && focusedIdx !== this._keyManager.activeItemIndex) {\n this._keyManager.setActiveItem(focusedIdx);\n }\n\n this._keyManager.onKeydown(event);\n }\n\n // ── Emission + announcement ──\n\n private _emitChange(\n page: number,\n pageSize: number,\n previousPage: number,\n previousPageSize: number,\n source: PageChangeSource,\n ): void {\n const total = this.totalItems();\n const effSize = Math.max(1, pageSize);\n const tp = total <= 0 ? 1 : Math.max(1, Math.ceil(total / effSize));\n const start = total <= 0 ? 0 : (page - 1) * effSize + 1;\n const end = total <= 0 ? 0 : Math.min(page * effSize, total);\n this.paginated.emit({\n page,\n pageSize: effSize,\n previousPage,\n previousPageSize,\n totalItems: total,\n totalPages: tp,\n start,\n end,\n source,\n });\n }\n\n private _announce(page: number): void {\n const msg = formatLabel(this.resolvedLabels().announcement, {\n page,\n totalPages: this.totalPages(),\n start: this.startItem(),\n end: this.endItem(),\n total: this.totalItems(),\n });\n this._liveAnnouncer.announce(msg, 'polite');\n }\n\n // ── Dev warnings ──\n\n private _runDevWarnings(): void {\n if (this.totalItems() < 0) {\n \n console.warn('[tw-paginator] totalItems is negative — coercing to 0.');\n }\n if (this.pageSize() < 1) {\n \n console.warn('[tw-paginator] pageSize is less than 1 — coercing to 1.');\n }\n if (this.showPageSizeSelector() && this.pageSizeOptions().length === 0) {\n \n console.warn(\n '[tw-paginator] showPageSizeSelector is true but pageSizeOptions is empty — selector will not render.',\n );\n }\n }\n}\n","@if (shouldRender()) {\n <div [class]=\"innerClasses()\">\n @if (isEmpty()) {\n <!-- Empty state -->\n @if (emptyDirective(); as emptyDir) {\n <ng-container\n [ngTemplateOutlet]=\"emptyDir.templateRef\"\n [ngTemplateOutletContext]=\"labelContext()\"\n />\n } @else {\n <span [class]=\"emptyStateClasses()\">{{ resolvedLabels().empty }}</span>\n }\n } @else {\n <!-- Page-size selector region -->\n @if (showPageSizeSelector() && pageSizeOptions().length > 0) {\n <div [class]=\"pageSizeGroupClasses()\">\n <label\n [attr.for]=\"pageSizeSelectId\"\n [class]=\"pageSizeLabelClasses()\"\n >\n @if (labelTemplateFor('pageSizeLabel'); as tmpl) {\n <ng-container\n [ngTemplateOutlet]=\"tmpl\"\n [ngTemplateOutletContext]=\"labelContext()\"\n />\n } @else {\n {{ resolvedLabels().pageSizeLabel }}\n }\n </label>\n\n @if (pageSizeSelectorDirective(); as dir) {\n <ng-container\n [ngTemplateOutlet]=\"dir.templateRef\"\n [ngTemplateOutletContext]=\"pageSizeContext()\"\n />\n } @else {\n <select\n [id]=\"pageSizeSelectId\"\n [class]=\"pageSizeSelectClasses()\"\n [disabled]=\"disabled()\"\n [value]=\"effectivePageSize()\"\n (change)=\"onPageSizeSelectChange($event)\"\n >\n @for (opt of pageSizeOptions(); track opt) {\n <option [value]=\"opt\">{{ opt }}</option>\n }\n </select>\n }\n </div>\n }\n\n <!-- Page info region -->\n @if (showPageInfo()) {\n <div [class]=\"pageInfoClasses()\">\n @if (labelTemplateFor('pageInfo'); as tmpl) {\n <ng-container\n [ngTemplateOutlet]=\"tmpl\"\n [ngTemplateOutletContext]=\"labelContext()\"\n />\n } @else {\n {{ formattedPageInfo() }}\n }\n </div>\n }\n\n <!-- Nav buttons region. Roving focus is owned by FocusKeyManager on the\n child buttons; this wrapper only relays keydown to the manager, so\n it does not need its own tabindex. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n [class]=\"navGroupClasses()\"\n (keydown)=\"onKeydown($event)\"\n >\n <!-- First -->\n @if (showFirstLastButtons()) {\n @let firstDisabled = disabled() || isAtFirstPage();\n @if (linkFactory()) {\n <a\n data-tw-paginator-focusable\n [isDisabled]=\"firstDisabled\"\n data-tw-paginator-nav=\"first\"\n [class]=\"navButtonClasses()\"\n [attr.href]=\"firstDisabled ? null : hrefFor(1)\"\n [attr.role]=\"firstDisabled ? 'link' : null\"\n [attr.aria-disabled]=\"firstDisabled ? 'true' : null\"\n [attr.tabindex]=\"firstDisabled ? -1 : 0\"\n [attr.aria-label]=\"resolvedLabels().first\"\n (click)=\"onLinkClick($event, 1, firstDisabled, 'click')\"\n >\n @if (labelTemplateFor('first'); as tmpl) {\n <ng-container\n [ngTemplateOutlet]=\"tmpl\"\n [ngTemplateOutletContext]=\"labelContext()\"\n />\n } @else {\n <svg\n [class]=\"iconClasses()\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M10.78 4.22a.75.75 0 0 1 0 1.06L6.06 10l4.72 4.72a.75.75 0 0 1-1.06 1.06l-5.25-5.25a.75.75 0 0 1 0-1.06l5.25-5.25a.75.75 0 0 1 1.06 0Zm6 0a.75.75 0 0 1 0 1.06L12.06 10l4.72 4.72a.75.75 0 1 1-1.06 1.06l-5.25-5.25a.75.75 0 0 1 0-1.06l5.25-5.25a.75.75 0 0 1 1.06 0Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n }\n </a>\n } @else {\n <button\n type=\"button\"\n data-tw-paginator-focusable\n [isDisabled]=\"firstDisabled\"\n data-tw-paginator-nav=\"first\"\n [class]=\"navButtonClasses()\"\n [disabled]=\"firstDisabled\"\n [attr.aria-label]=\"resolvedLabels().first\"\n (click)=\"goTo(1, 'click')\"\n >\n @if (labelTemplateFor('first'); as tmpl) {\n <ng-container\n [ngTemplateOutlet]=\"tmpl\"\n [ngTemplateOutletContext]=\"labelContext()\"\n />\n } @else {\n <svg\n [class]=\"iconClasses()\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M10.78 4.22a.75.75 0 0 1 0 1.06L6.06 10l4.72 4.72a.75.75 0 0 1-1.06 1.06l-5.25-5.25a.75.75 0 0 1 0-1.06l5.25-5.25a.75.75 0 0 1 1.06 0Zm6 0a.75.75 0 0 1 0 1.06L12.06 10l4.72 4.72a.75.75 0 1 1-1.06 1.06l-5.25-5.25a.75.75 0 0 1 0-1.06l5.25-5.25a.75.75 0 0 1 1.06 0Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n }\n </button>\n }\n }\n\n <!-- Previous -->\n @let prevDisabled = disabled() || isAtFirstPage();\n @let prevTarget = previousTarget();\n @if (linkFactory()) {\n <a\n data-tw-paginator-focusable\n [isDisabled]=\"prevDisabled\"\n data-tw-paginator-nav=\"prev\"\n [class]=\"navButtonClasses()\"\n [attr.href]=\"prevDisabled ? null : hrefFor(prevTarget)\"\n [attr.role]=\"prevDisabled ? 'link' : null\"\n [attr.aria-disabled]=\"prevDisabled ? 'true' : null\"\n [attr.tabindex]=\"prevDisabled ? -1 : 0\"\n [attr.aria-label]=\"resolvedLabels().previous\"\n (click)=\"onLinkClick($event, prevTarget, prevDisabled, 'click')\"\n >\n @if (labelTemplateFor('previous'); as tmpl) {\n <ng-container\n [ngTemplateOutlet]=\"tmpl\"\n [ngTemplateOutletContext]=\"labelContext()\"\n />\n } @else {\n <svg\n [class]=\"iconClasses()\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M12.78 5.22a.75.75 0 0 1 0 1.06L9.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n }\n </a>\n } @else {\n <button\n type=\"button\"\n data-tw-paginator-focusable\n [isDisabled]=\"prevDisabled\"\n data-tw-paginator-nav=\"prev\"\n [class]=\"navButtonClasses()\"\n [disabled]=\"prevDisabled\"\n [attr.aria-label]=\"resolvedLabels().previous\"\n (click)=\"goTo(prevTarget, 'click')\"\n >\n @if (labelTemplateFor('previous'); as tmpl) {\n <ng-container\n [ngTemplateOutlet]=\"tmpl\"\n [ngTemplateOutletContext]=\"labelContext()\"\n />\n } @else {\n <svg\n [class]=\"iconClasses()\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M12.78 5.22a.75.75 0 0 1 0 1.06L9.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n }\n </button>\n }\n\n <!-- Numbered page list -->\n @if (type() === 'numbered') {\n <div [class]=\"pageListClasses()\">\n @for (item of range(); track $index) {\n @if (item === 'ellipsis-left' || item === 'ellipsis-right') {\n <!--\n The gap marker carries its name as visually-hidden text rather\n than an aria-label. A span has no role, and ARIA prohibits a\n name on a roleless generic element (axe: aria-prohibited-attr),\n so the label was being dropped by assistive tech anyway. The\n sr-only child is real text content, which every AT exposes.\n -->\n <span [class]=\"ellipsisClasses()\">\n <span aria-hidden=\"true\">…</span>\n <span class=\"sr-only\">{{ resolvedLabels().ellipsis }}</span>\n </span>\n } @else {\n @let pageNumber = item;\n @let isActive = pageNumber === clampedPage();\n @let pageDisabled = disabled();\n @if (linkFactory()) {\n <a\n data-tw-paginator-focusable\n [isDisabled]=\"pageDisabled\"\n data-tw-paginator-nav=\"page\"\n [class]=\"pageButtonClasses(isActive)\"\n [attr.href]=\"pageDisabled ? null : hrefFor(pageNumber)\"\n [attr.role]=\"pageDisabled ? 'link' : null\"\n [attr.aria-disabled]=\"pageDisabled ? 'true' : null\"\n [attr.tabindex]=\"pageDisabled ? -1 : 0\"\n [attr.aria-current]=\"isActive ? 'page' : null\"\n [attr.aria-label]=\"\n isActive\n ? formatCurrentPageLabel(pageNumber)\n : formatPageButtonLabel(pageNumber)\n \"\n (click)=\"onLinkClick($event, pageNumber, pageDisabled, 'click')\"\n >{{ pageNumber }}</a>\n } @else {\n <button\n type=\"button\"\n data-tw-paginator-focusable\n [isDisabled]=\"pageDisabled\"\n data-tw-paginator-nav=\"page\"\n [class]=\"pageButtonClasses(isActive)\"\n [disabled]=\"pageDisabled\"\n [attr.aria-current]=\"isActive ? 'page' : null\"\n [attr.aria-label]=\"\n isActive\n ? formatCurrentPageLabel(pageNumber)\n : formatPageButtonLabel(pageNumber)\n \"\n (click)=\"goTo(pageNumber, 'click')\"\n >{{ pageNumber }}</button>\n }\n }\n }\n </div>\n }\n\n <!-- Next -->\n @let nextDisabled = disabled() || isAtLastPage();\n @let nextTargetPage = nextTarget();\n @if (linkFactory()) {\n <a\n data-tw-paginator-focusable\n [isDisabled]=\"nextDisabled\"\n data-tw-paginator-nav=\"next\"\n [class]=\"navButtonClasses()\"\n [attr.href]=\"nextDisabled ? null : hrefFor(nextTargetPage)\"\n [attr.role]=\"nextDisabled ? 'link' : null\"\n [attr.aria-disabled]=\"nextDisabled ? 'true' : null\"\n [attr.tabindex]=\"nextDisabled ? -1 : 0\"\n [attr.aria-label]=\"resolvedLabels().next\"\n (click)=\"onLinkClick($event, nextTargetPage, nextDisabled, 'click')\"\n >\n @if (labelTemplateFor('next'); as tmpl) {\n <ng-container\n [ngTemplateOutlet]=\"tmpl\"\n [ngTemplateOutletContext]=\"labelContext()\"\n />\n } @else {\n <svg\n [class]=\"iconClasses()\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M7.22 14.78a.75.75 0 0 1 0-1.06L10.94 10 7.22 6.28a.75.75 0 0 1 1.06-1.06l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n }\n </a>\n } @else {\n <button\n type=\"button\"\n data-tw-paginator-focusable\n [isDisabled]=\"nextDisabled\"\n data-tw-paginator-nav=\"next\"\n [class]=\"navButtonClasses()\"\n [disabled]=\"nextDisabled\"\n [attr.aria-label]=\"resolvedLabels().next\"\n (click)=\"goTo(nextTargetPage, 'click')\"\n >\n @if (labelTemplateFor('next'); as tmpl) {\n <ng-container\n [ngTemplateOutlet]=\"tmpl\"\n [ngTemplateOutletContext]=\"labelContext()\"\n />\n } @else {\n <svg\n [class]=\"iconClasses()\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M7.22 14.78a.75.75 0 0 1 0-1.06L10.94 10 7.22 6.28a.75.75 0 0 1 1.06-1.06l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n }\n </button>\n }\n\n <!-- Last -->\n @if (showFirstLastButtons()) {\n @let lastDisabled = disabled() || isAtLastPage();\n @if (linkFactory()) {\n <a\n data-tw-paginator-focusable\n [isDisabled]=\"lastDisabled\"\n data-tw-paginator-nav=\"last\"\n [class]=\"navButtonClasses()\"\n [attr.href]=\"lastDisabled ? null : hrefFor(totalPages())\"\n [attr.role]=\"lastDisabled ? 'link' : null\"\n [attr.aria-disabled]=\"lastDisabled ? 'true' : null\"\n [attr.tabindex]=\"lastDisabled ? -1 : 0\"\n [attr.aria-label]=\"resolvedLabels().last\"\n (click)=\"onLinkClick($event, totalPages(), lastDisabled, 'click')\"\n >\n @if (labelTemplateFor('last'); as tmpl) {\n <ng-container\n [ngTemplateOutlet]=\"tmpl\"\n [ngTemplateOutletContext]=\"labelContext()\"\n />\n } @else {\n <svg\n [class]=\"iconClasses()\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M3.22 4.22a.75.75 0 0 1 1.06 0l5.25 5.25a.75.75 0 0 1 0 1.06l-5.25 5.25a.75.75 0 0 1-1.06-1.06L7.94 10 3.22 5.28a.75.75 0 0 1 0-1.06Zm6 0a.75.75 0 0 1 1.06 0l5.25 5.25a.75.75 0 0 1 0 1.06l-5.25 5.25a.75.75 0 1 1-1.06-1.06L13.94 10 9.22 5.28a.75.75 0 0 1 0-1.06Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n }\n </a>\n } @else {\n <button\n type=\"button\"\n data-tw-paginator-focusable\n [isDisabled]=\"lastDisabled\"\n data-tw-paginator-nav=\"last\"\n [class]=\"navButtonClasses()\"\n [disabled]=\"lastDisabled\"\n [attr.aria-label]=\"resolvedLabels().last\"\n (click)=\"goTo(totalPages(), 'click')\"\n >\n @if (labelTemplateFor('last'); as tmpl) {\n <ng-container\n [ngTemplateOutlet]=\"tmpl\"\n [ngTemplateOutletContext]=\"labelContext()\"\n />\n } @else {\n <svg\n [class]=\"iconClasses()\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M3.22 4.22a.75.75 0 0 1 1.06 0l5.25 5.25a.75.75 0 0 1 0 1.06l-5.25 5.25a.75.75 0 0 1-1.06-1.06L7.94 10 3.22 5.28a.75.75 0 0 1 0-1.06Zm6 0a.75.75 0 0 1 1.06 0l5.25 5.25a.75.75 0 0 1 0 1.06l-5.25 5.25a.75.75 0 1 1-1.06-1.06L13.94 10 9.22 5.28a.75.75 0 0 1 0-1.06Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n }\n </button>\n }\n }\n </div>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AA6IA;AAEA;AACA,MAAM,cAAc,GAA0C;AAC5D,IAAA,SAAS,EAAE,YAAY;AACvB,IAAA,QAAQ,EAAE,UAAU;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A,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,YAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,uBAAuB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAG3B,uBAAuB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,yBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAI5D,kCAAkC,gGAgBG,2BAA2B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEnlBpE;;AAEG;;;;"}
|
|
@@ -5,6 +5,7 @@ import { CdkPortalOutlet, ComponentPortal, TemplatePortal } from '@angular/cdk/p
|
|
|
5
5
|
import { FocusTrapFactory, _IdGenerator } from '@angular/cdk/a11y';
|
|
6
6
|
import { Subscription } from 'rxjs';
|
|
7
7
|
import { tv } from 'tailwind-variants';
|
|
8
|
+
import { consumeOverlayEscape } from '@cdevhub/ngx-tw/core';
|
|
8
9
|
|
|
9
10
|
/** Injection token providing arbitrary data to popover component content. */
|
|
10
11
|
const TW_POPOVER_DATA = new InjectionToken('TW_POPOVER_DATA');
|
|
@@ -563,11 +564,16 @@ class PopoverDirective {
|
|
|
563
564
|
if (!hasBackdrop && this.twPopoverCloseOnOutside()) {
|
|
564
565
|
this.perOpenSubs.add(this.overlayRef.outsidePointerEvents().subscribe(() => this.close()));
|
|
565
566
|
}
|
|
566
|
-
// Escape from within the overlay
|
|
567
|
-
|
|
568
|
-
|
|
567
|
+
// Escape from within the overlay. Uses `core`'s `consumeOverlayEscape`
|
|
568
|
+
// rather than re-filtering `keydownEvents()` here: that helper is exported
|
|
569
|
+
// from `@cdevhub/ngx-tw/core` as public API, and until this call site
|
|
570
|
+
// existed the library shipped a compatibility promise for a function it
|
|
571
|
+
// never used itself while duplicating its body inline.
|
|
572
|
+
// `Subscription.add()` accepts a teardown function, which is exactly what
|
|
573
|
+
// `consumeOverlayEscape` returns — the helper's own JSDoc names this shape.
|
|
574
|
+
this.perOpenSubs.add(consumeOverlayEscape(this.overlayRef, () => {
|
|
575
|
+
if (this.twPopoverCloseOnEscape())
|
|
569
576
|
this.close();
|
|
570
|
-
}
|
|
571
577
|
}));
|
|
572
578
|
// Per-open position change subscription — torn down on close to prevent
|
|
573
579
|
// accumulation when the directive is opened/closed many times.
|