@kouji-ui/components 0.7.1 → 0.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kouji-ui/components",
3
- "version": "0.7.1",
3
+ "version": "0.9.0",
4
4
  "description": "Opinionated styled Angular components built on @kouji-ui/core directives. Themed at runtime via @kouji-ui/themes.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -25,26 +25,27 @@
25
25
  "directory": "../../dist/kj-components"
26
26
  },
27
27
  "peerDependencies": {
28
+ "@angular/cdk": "^22.0.0",
28
29
  "@angular/common": "^22.0.0",
29
30
  "@angular/core": "^22.0.0",
30
- "@angular/cdk": "^22.0.0",
31
- "@kouji-ui/core": ">=0.3.0",
32
- "lucide-static": "^1.14.0",
33
31
  "@angular/forms": "^22.0.0",
34
- "rxjs": "^7.8.0",
35
- "lexical": "^0.38.0",
36
- "@lexical/rich-text": "^0.38.0",
37
- "@lexical/list": "^0.38.0",
38
- "@lexical/link": "^0.38.0",
39
- "@lexical/history": "^0.38.0",
40
- "@lexical/markdown": "^0.38.0",
32
+ "@kouji-ui/core": ">=0.3.0",
41
33
  "@lexical/code": "^0.38.0",
34
+ "@lexical/history": "^0.38.0",
42
35
  "@lexical/html": "^0.38.0",
43
- "@lexical/selection": "^0.38.0"
36
+ "@lexical/link": "^0.38.0",
37
+ "@lexical/list": "^0.38.0",
38
+ "@lexical/markdown": "^0.38.0",
39
+ "@lexical/rich-text": "^0.38.0",
40
+ "@lexical/selection": "^0.38.0",
41
+ "lexical": "^0.38.0",
42
+ "lucide-static": "^1.14.0",
43
+ "rxjs": "^7.8.0"
44
44
  },
45
45
  "sideEffects": false,
46
46
  "dependencies": {
47
47
  "@tanstack/virtual-core": "^3.14.0",
48
+ "marked": "^18.0.11",
48
49
  "tslib": "^2.3.0"
49
50
  },
50
51
  "peerDependenciesMeta": {
@@ -1,5 +1,5 @@
1
1
  import * as i1 from '@kouji-ui/core';
2
- import { KjAlertMode, KjAvatarShape, KjBadgeVariant, KjButtonGroupOrientation, KjCarousel, KjLiveRegion, KjCarouselSlide, KjCarouselAlign, KjChatStore, KjChatAnnouncer, KjChatMessageData, KjSlashCommand, KjColorFormat, KjColorPreset, KjColorValue, KjColorPicker, KjCombobox, KjOverlayTriggerLike, KjDatePicker, KjDateRange, KjDateRangePreset, KjEditorLanguage, KjEditorLineNumbers, KjEditorWordWrap, KjEditorInstance, KjFileRejection, KjUploadableFile, KjFileUpload, KjInput, KjDividerOrientation, KjDividerAlign, KjListAs, KjListOrientation, KjPasswordAutocomplete, KjPasswordScore, KjRichTextFeature, KjRichTextEditor, KjRteToolbarItem, KjActiveOverlay, KjSkeletonShape, KjSkeletonAnimation, KjSpinnerAnimation, KjResourceResult, KjStorageAdapter, KjTableState, KjTable, KjNumberFilterType, KjTabPanel, KjTextareaResize, KjTextareaAutoresize, KjHourCycle, TimeParts, KjToastVariant, KjCascadeSelectOption, KjTreeSelect, KjTreeNode } from '@kouji-ui/core';
2
+ import { KjAlertMode, KjAvatarShape, KjOverflowContent, KjBadgeVariant, KjButtonGroupOrientation, KjCarousel, KjLiveRegion, KjCarouselSlide, KjCarouselAlign, KjChatStore, KjChatAnnouncer, KjChatMessageData, KjChatRenderer, KjChatItemInput, KjSlashCommand, KjColorFormat, KjColorPreset, KjColorValue, KjColorPicker, KjCombobox, KjOverlayTriggerLike, KjDatePicker, KjDateRange, KjDateRangePreset, KjEditorLanguage, KjEditorLineNumbers, KjEditorWordWrap, KjEditorInstance, KjFileRejection, KjUploadableFile, KjFileUpload, KjInput, KjDividerOrientation, KjDividerAlign, KjListAs, KjListOrientation, KjPasswordAutocomplete, KjPasswordScore, KjOverflowContext, KjRichTextFeature, KjRichTextEditor, KjRteToolbarItem, KjActiveOverlay, KjSkeletonShape, KjSkeletonAnimation, KjSpinnerAnimation, KjResourceResult, KjStorageAdapter, KjTableState, KjTable, KjNumberFilterType, KjTabPanel, KjTagList, KjTextareaResize, KjTextareaAutoresize, KjHourCycle, TimeParts, KjToastVariant, KjCascadeSelectOption, KjTreeSelect, KjTreeNode } from '@kouji-ui/core';
3
3
  export { KJ_DROPDOWN_MENU, KjActiveOverlay, KjAlertMode, KjAvatarGroupAriaLabelFormat, KjAvatarShape, KjBadgeVariant, KjBlockquote, KjButtonGroupOrientation, KjCarousel, KjCarouselAlign, KjCarouselControlPattern, KjCarouselOrientation, KjCarouselSlide, KjCascadeSelectOption, KjChatAnnouncer, KjChatMessageData, KjChatRole, KjChatSide, KjChatState, KjChatStore, KjCode, KjColorFormat, KjColorPicker, KjColorPreset, KjColorValue, KjCombobox, KjDatePicker, KjDateRange, KjDateRangePreset, KjDialog, KjDialogOpenOptions, KjDialogRef, KjDialogService, KjDividerAlign, KjDividerOrientation, KjDrawer, KjDrawerOpenOptions, KjDrawerRef, KjDrawerService, KjDrawerSide, KjDropdownMenuCloseReason, KjDropdownMenuContent, KjDropdownMenuContext, KjDropdownMenuGroup, KjDropdownMenuItem, KjDropdownMenuLabel, KjDropdownMenuMount, KjDropdownMenuSeparator, KjDropdownMenuTrigger, KjDropdownMenuTriggerKind, KjEditorInstance, KjEditorLanguage, KjEditorLineNumbers, KjEditorWordWrap, KjFileRejection, KjFileUpload, KjHourCycle, KjInput, KjLead, KjListAs, KjListOrientation, KjLiveRegion, KjMuted, KjNumberFilterType, KjOverlayPanel, KjOverlayTriggerLike, KjPasswordAutocomplete, KjPasswordScore, KjPopoverArrow, KjPopoverClose, KjPopoverContent, KjPopoverTitle, KjPopoverTrigger, KjResourceResult, KjRichTextEditor, KjRichTextFeature, KjRteToolbarItem, KjSheet, KjSheetDetent, KjSheetOpenOptions, KjSheetRef, KjSheetService, KjSkeletonAnimation, KjSkeletonShape, KjSlashCommand, KjSpeedDialDirection, KjSpinnerAnimation, KjStorageAdapter, KjTabPanel, KjTable, KjTableState, KjTextareaAutoresize, KjTextareaResize, KjToastVariant, KjTooltipArrow, KjTooltipContent, KjTooltipGroup, KjTooltipTrigger, KjTreeNode, KjTreeSelect, KjTruncate, KjUploadableFile, SHEET_ARIA_LABEL, SHEET_DATA, SHEET_DETENT, SHEET_DISMISSIBLE } from '@kouji-ui/core';
4
4
  import * as _angular_core from '@angular/core';
5
5
  import { TemplateRef, ModelSignal, AfterViewInit, ElementRef, OnDestroy, EventEmitter, EnvironmentProviders, OnInit, Injector, ResourceRef, Type, InjectionToken } from '@angular/core';
@@ -497,10 +497,15 @@ declare class KjAvatarComponent {
497
497
  * core directive. The wrapper supplies the chip element and the host
498
498
  * `<ng-content/>` slot.
499
499
  *
500
- * The overflow chip is a regular `<kj-avatar>` rendering `'+N'` text; it is
501
- * `aria-hidden` because the group's count-aware label already conveys
502
- * totality (e.g. `"3 of 8 collaborators"`), so exposing the chip again would
503
- * duplicate the announcement.
500
+ * The overflow chip is a button: hovering, focusing or tapping it opens a
501
+ * panel listing the collapsed avatars (their `alt`, else their text content).
502
+ * Project an `<ng-template kjOverflowContent>` to render that panel yourself
503
+ * the context carries the collapsed range (`start`/`end`) so the consumer
504
+ * slices its own data and adds actions (remove, open a profile…).
505
+ *
506
+ * The `<kj-avatar>` inside the chip renders `'+N'` and is `aria-hidden`
507
+ * because the group's count-aware label already conveys totality (e.g.
508
+ * `"3 of 8 collaborators"`); the button itself is named "Show N more".
504
509
  *
505
510
  * @doc-example Default
506
511
  * The default playground — five stacked avatars with the group's defaults.
@@ -510,8 +515,13 @@ declare class KjAvatarComponent {
510
515
  * and a list-mode variant for documents-shared screens.
511
516
  * @doc-file avatar-group.usage.example.ts
512
517
  * @doc-example Overflow
513
- * `kjMax` caps visible avatars; the remainder collapses into a "+N" chip.
518
+ * `kjMax` caps visible avatars; the remainder collapses into a "+N" chip whose
519
+ * hover panel lists the hidden names.
514
520
  * @doc-file avatar-group.overflow.example.ts
521
+ * @doc-example Overflow template
522
+ * `<ng-template kjOverflowContent>` renders the hidden avatars your way — here
523
+ * with a remove action per collaborator.
524
+ * @doc-file avatar-group.overflow-template.example.ts
515
525
  * @doc-example Sizes
516
526
  * Group `kjSize` cascades onto every projected `<kj-avatar>` for a uniform pile.
517
527
  * @doc-file avatar-group.sizes.example.ts
@@ -522,24 +532,30 @@ declare class KjAvatarComponent {
522
532
  * `kjRole="list"` switches to a list landmark — use for "shared by" rows in docs UIs.
523
533
  * @doc-file avatar-group.list.example.ts
524
534
  *
535
+ * @doc-keyboard
536
+ * Tab — Focuses the "+N" chip; the panel opens
537
+ * ArrowDown|Enter — Moves focus into the panel
538
+ * Escape — Closes the panel and returns focus to the chip
539
+ *
525
540
  * @doc-aria
526
541
  * aria-label — Count-aware label like "3 of 8 collaborators"; override via `kjAriaLabelOverride`
527
542
  * role — Defaults to `img` (face-pile); set `kjRole="list"` for a true list landmark
528
- * aria-hidden — Forced on the +N chip so the count isn't re-announced
543
+ * aria-hidden — Forced on the +N avatar so the count isn't re-announced; the chip button is named "Show N more"
544
+ * aria-expanded — Reflects the panel state on the chip button
529
545
  *
530
546
  * @doc-touch
531
- * Stacked avatars are decorative — they aren't tab stops. Pair the group
532
- * with an interactive trigger (button/link) sized 44×44 when clicking is
533
- * meaningful (e.g. opens a collaborator dialog).
547
+ * Stacked avatars are decorative — they aren't tab stops. The "+N" chip is
548
+ * a real button (tap opens the panel); pair the group with an interactive
549
+ * trigger sized 44×44 when clicking an avatar is meaningful.
534
550
  *
535
551
  * @doc-a11y
536
552
  * The face-pile is an `img` landmark with a count-aware accessible name so
537
553
  * AT users hear "3 of 8 collaborators" rather than every initial. Switch to
538
554
  * `role="list"` whenever the order/identity of each face matters
539
- * semantically. The overflow chip is always `aria-hidden` because the
540
- * group's name already conveys totality.
555
+ * semantically. The "+N" chip is a named button, so the collapsed names are
556
+ * one keystroke away for keyboard and screen-reader users.
541
557
  *
542
- * @doc-related avatar,badge,tag
558
+ * @doc-related avatar,badge,tag,overflow
543
559
  *
544
560
  * @doc-css-var
545
561
  * --kj-avatar-size — Avatar diameter. Sizes (xs/sm/md/lg/xl) override.
@@ -559,9 +575,20 @@ declare class KjAvatarGroupComponent {
559
575
  * `provide`s itself under `KJ_AVATAR_GROUP`, so injecting the token returns
560
576
  * the same instance and gives us access to `overflowCount`, `shape`, etc.
561
577
  */
562
- private readonly group;
578
+ protected readonly group: i1.KjAvatarGroupContext;
579
+ private readonly i18n;
580
+ /** Text of the "+N" chip. Defaults to the `overflow.more` translation (`+{count}`). */
581
+ readonly kjOverflowLabel: _angular_core.InputSignal<((count: number) => string) | undefined>;
582
+ /** Accessible name of the chip button. Defaults to the `overflow.show` translation (`Show {count} more`). */
583
+ readonly kjOverflowAriaLabel: _angular_core.InputSignal<((count: number) => string) | undefined>;
584
+ private readonly avatars;
585
+ protected readonly overflowTemplate: _angular_core.Signal<KjOverflowContent | undefined>;
586
+ private readonly panel;
563
587
  protected readonly overflowCount: _angular_core.Signal<number>;
564
588
  protected readonly overflowLabel: _angular_core.Signal<string>;
589
+ protected readonly overflowAriaLabel: _angular_core.Signal<string>;
590
+ /** Labels of the collapsed avatars: `alt`, else a string `content`. */
591
+ protected readonly hiddenLabels: _angular_core.Signal<readonly string[]>;
565
592
  /**
566
593
  * Chip shape mirrors the group's default shape so the chip visually
567
594
  * matches the avatars. `<kj-avatar>`'s own `shape` default is `'circle'`,
@@ -569,8 +596,9 @@ declare class KjAvatarGroupComponent {
569
596
  * collapses to `'circle'`.
570
597
  */
571
598
  protected readonly chipShape: _angular_core.Signal<"circle" | "rounded">;
599
+ protected focusPanel(event: Event): void;
572
600
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjAvatarGroupComponent, never>;
573
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<KjAvatarGroupComponent, "kj-avatar-group", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.KjAvatarGroup; inputs: { "kjMax": "kjMax"; "kjTotal": "kjTotal"; "kjSize": "kjSize"; "kjShape": "kjShape"; "kjAriaLabel": "kjAriaLabel"; "kjAriaLabelFormat": "kjAriaLabelFormat"; "kjRole": "kjRole"; "kjAriaLabelOverride": "kjAriaLabelOverride"; }; outputs: {}; }]>;
601
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<KjAvatarGroupComponent, "kj-avatar-group", never, { "kjOverflowLabel": { "alias": "kjOverflowLabel"; "required": false; "isSignal": true; }; "kjOverflowAriaLabel": { "alias": "kjOverflowAriaLabel"; "required": false; "isSignal": true; }; }, {}, ["avatars", "overflowTemplate"], ["*"], true, [{ directive: typeof i1.KjAvatarGroup; inputs: { "kjMax": "kjMax"; "kjTotal": "kjTotal"; "kjSize": "kjSize"; "kjShape": "kjShape"; "kjAriaLabel": "kjAriaLabel"; "kjAriaLabelFormat": "kjAriaLabelFormat"; "kjRole": "kjRole"; "kjAriaLabelOverride": "kjAriaLabelOverride"; }; outputs: {}; }]>;
574
602
  }
575
603
 
576
604
  /**
@@ -981,6 +1009,10 @@ declare class KjButtonComponent {
981
1009
  * @doc-example Variants
982
1010
  * Set `kjVariant` on the group to cascade onto every child button.
983
1011
  * @doc-file button-group.variants.example.ts
1012
+ * @doc-example Segmented
1013
+ * `kjVariant="segmented"` moves the border onto the group and fills only
1014
+ * the pressed child — a mode switcher rather than a toolbar.
1015
+ * @doc-file button-group.segmented.example.ts
984
1016
  * @doc-example Toggle
985
1017
  * Pair with `[kjPressed]` on each child to build a segmented control.
986
1018
  * @doc-file button-group.toggle.example.ts
@@ -1012,7 +1044,17 @@ declare class KjButtonComponent {
1012
1044
  * @doc-related button,toggle,tabs
1013
1045
  *
1014
1046
  * @doc-css-var
1015
- * --kj-button-group-gap — Gap between adjacent buttons. Defaults to 0 (segmented look); raise for a spaced cluster.
1047
+ * --kj-button-group-gap — Gap between adjacent buttons. Defaults to 0 (segmented look); raise for a spaced cluster.
1048
+ * --kj-segmented-border — Shell and divider colour, `kjVariant="segmented"` only. Defaults to `--kj-border-default`.
1049
+ * --kj-segmented-bg-on — Fill behind the pressed segment. Defaults to `--kj-bg-surface`.
1050
+ * --kj-segmented-fg-on — Ink on the pressed segment. Defaults to `--kj-fg-default`.
1051
+ *
1052
+ * Typography needs no dedicated hook: set the ordinary `--kj-button-font`,
1053
+ * `--kj-button-font-size`, `--kj-button-letter-spacing` and
1054
+ * `--kj-button-text-transform` on this host and they reach each child,
1055
+ * since every knob is read as `var(name, default)`. The on-state colours
1056
+ * are the exception — variant rules declare those knobs on the element,
1057
+ * so they get their own `--kj-segmented-*` indirection.
1016
1058
  *
1017
1059
  * @doc-category Library/Actions
1018
1060
  * @doc
@@ -1029,7 +1071,9 @@ declare class KjButtonGroupComponent {
1029
1071
  readonly kjOrientation: _angular_core.InputSignal<KjButtonGroupOrientation>;
1030
1072
  /**
1031
1073
  * Default variant forwarded to children via `KJ_BUTTON_GROUP`. Children
1032
- * that set their own `kjVariant` override this fallback.
1074
+ * that set their own `kjVariant` override this fallback. Also mirrored to
1075
+ * `data-variant` on the host, which is how `segmented` draws its shared
1076
+ * shell and dividers.
1033
1077
  */
1034
1078
  readonly kjVariant: _angular_core.InputSignal<string | undefined>;
1035
1079
  /**
@@ -1743,6 +1787,10 @@ declare class KjChatFooterComponent {
1743
1787
  * Provider-agnostic: pair with `KjPromptInput` and drive `KjChatStore` from any
1744
1788
  * model / stream — the kit ships **no** LLM SDK or backend.
1745
1789
  *
1790
+ * @doc-example Custom thread items
1791
+ * `provideKjChat` maps an item `type` to a component, so a thread can render
1792
+ * turns the kit knows nothing about. Ordinary messages are untouched.
1793
+ * @doc-file ai-chat.custom-items.example.ts
1746
1794
  * @doc-example Streaming (simulated)
1747
1795
  * A full send → simulated-stream → reply loop with slash commands, a Stop
1748
1796
  * button, tool-call cards and citations. No backend — a fake token generator
@@ -1782,6 +1830,19 @@ declare class KjChatThread {
1782
1830
  readonly kjLabel: _angular_core.InputSignal<string | undefined>;
1783
1831
  /** @internal — the coalescing announcer for the polite live region. */
1784
1832
  readonly announcer: KjChatAnnouncer;
1833
+ private readonly config;
1834
+ /**
1835
+ * The registered component for a message's `type`, or `null` to let the
1836
+ * built-in renderer draw it. A message with no `type` never consults the
1837
+ * registry — that is the overwhelmingly common case and must stay free.
1838
+ *
1839
+ * An unknown `type` falls back to the configured `fallback`, and failing
1840
+ * that to the built-in renderer: a transcript that silently drops a turn is
1841
+ * worse than one that renders it plainly.
1842
+ */
1843
+ protected rendererFor(message: KjChatMessageData): KjChatRenderer | null;
1844
+ /** The neutral shape handed to a registered renderer's `item` input. */
1845
+ protected itemFor(message: KjChatMessageData): KjChatItemInput;
1785
1846
  private readonly injector;
1786
1847
  private readonly logEl;
1787
1848
  private lastId;
@@ -1794,9 +1855,13 @@ declare class KjChatThread {
1794
1855
  }
1795
1856
 
1796
1857
  /**
1797
- * A parsed markdown block. Prose blocks carry a **pre-sanitised** HTML string
1798
- * (escaped first, then a whitelist of inline tags applied); code blocks are
1799
- * kept structural so the view can render a `<pre><code>` with a copy button.
1858
+ * A parsed markdown block. Prose blocks carry an HTML string; code blocks stay
1859
+ * structural so the view can render a `<pre><code>` with a copy button.
1860
+ *
1861
+ * Raw HTML in the source is escaped, never emitted (see the renderer override
1862
+ * below), so the prose HTML only ever contains tags this module produced. The
1863
+ * view sanitises it again anyway — a model's output is not a trust boundary
1864
+ * worth betting one layer on.
1800
1865
  */
1801
1866
  type KjMdBlock = {
1802
1867
  readonly kind: 'prose';
@@ -1807,13 +1872,12 @@ type KjMdBlock = {
1807
1872
  readonly code: string;
1808
1873
  };
1809
1874
  /**
1810
- * Parse a lightweight markdown subset into blocks: fenced code blocks
1811
- * (```lang) become structural `code` blocks; everything else becomes `prose`
1812
- * blocks with sanitised inline HTML.
1875
+ * Parse markdown into blocks: fenced code becomes a structural `code` block,
1876
+ * everything else is rendered to HTML as a `prose` block.
1813
1877
  *
1814
- * Deliberately minimal (no tables / nested lists) and **self-contained** the
1815
- * repo ships no markdown engine on `main`. Swap in a full parser later without
1816
- * touching the view.
1878
+ * Code is split out at the TOKEN level rather than by regex so an indented
1879
+ * block, a `~~~` fence, or a fence inside a list is still recognised — and so
1880
+ * a stray fence in a partial stream cannot swallow the rest of the message.
1817
1881
  */
1818
1882
  declare function renderMarkdown(src: string): KjMdBlock[];
1819
1883
 
@@ -1845,6 +1909,13 @@ declare class KjChatMessage {
1845
1909
  readonly blocks: _angular_core.Signal<KjMdBlock[]>;
1846
1910
  private readonly _copied;
1847
1911
  readonly copiedIndex: _angular_core.Signal<number | null>;
1912
+ /**
1913
+ * Sanitise rather than bypass. `renderMarkdown` already escapes raw HTML at
1914
+ * the parse layer, but a chat body is model or user output — the one place
1915
+ * in a UI kit where trusting a single layer is a bad bet. `sanitize` strips
1916
+ * anything the parser somehow let through instead of waving it past
1917
+ * Angular's checks.
1918
+ */
1848
1919
  safe(html: string): SafeHtml;
1849
1920
  copy(code: string, index: number): Promise<void>;
1850
1921
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjChatMessage, never>;
@@ -5528,6 +5599,45 @@ declare class KjPopoverComponent {
5528
5599
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<KjPopoverComponent, "kj-popover", never, {}, {}, never, ["*"], true, never>;
5529
5600
  }
5530
5601
 
5602
+ /**
5603
+ * The panel a collapsing group (`kj-tag-list`, `kj-avatar-group`) opens from
5604
+ * its "+N" chip: the consumer's `kjOverflowContent` template when one is
5605
+ * projected, otherwise a plain list of the collapsed items' labels.
5606
+ *
5607
+ * Owns the keyboard story the hover trigger cannot: `focusFirst()` moves
5608
+ * focus into the panel (the chip calls it on ArrowDown / Enter), Escape
5609
+ * inside the panel returns focus to the chip, and focus leaving the panel
5610
+ * closes it.
5611
+ *
5612
+ * @doc-category Library/Data display
5613
+ * @doc
5614
+ * @doc-name overflow
5615
+ */
5616
+ declare class KjOverflowPanelComponent {
5617
+ /** The "+N" chip's popover trigger. */
5618
+ readonly kjFor: _angular_core.InputSignal<KjOverlayTriggerLike>;
5619
+ /** Number of collapsed items. */
5620
+ readonly kjCount: _angular_core.InputSignal<number>;
5621
+ /** Index of the first collapsed item in the consumer's collection. */
5622
+ readonly kjStart: _angular_core.InputSignal<number>;
5623
+ /** Exclusive end index of the collapsed range. */
5624
+ readonly kjEnd: _angular_core.InputSignal<number>;
5625
+ /** Labels of the collapsed items — the default panel content. */
5626
+ readonly kjLabels: _angular_core.InputSignal<readonly string[]>;
5627
+ /** Consumer template rendered instead of the label list. */
5628
+ readonly kjTemplate: _angular_core.InputSignal<KjOverflowContent | undefined>;
5629
+ readonly kjSide: _angular_core.InputSignal<"top" | "right" | "bottom" | "left">;
5630
+ readonly kjAlign: _angular_core.InputSignal<"start" | "center" | "end">;
5631
+ private readonly panel;
5632
+ protected readonly context: _angular_core.Signal<KjOverflowContext>;
5633
+ /** Moves focus to the first focusable element of the panel (or the panel itself). */
5634
+ focusFirst(): void;
5635
+ protected focusTrigger(): void;
5636
+ protected onFocusOut(event: FocusEvent): void;
5637
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjOverflowPanelComponent, never>;
5638
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<KjOverflowPanelComponent, "kj-overflow-panel", never, { "kjFor": { "alias": "kjFor"; "required": true; "isSignal": true; }; "kjCount": { "alias": "kjCount"; "required": true; "isSignal": true; }; "kjStart": { "alias": "kjStart"; "required": true; "isSignal": true; }; "kjEnd": { "alias": "kjEnd"; "required": true; "isSignal": true; }; "kjLabels": { "alias": "kjLabels"; "required": false; "isSignal": true; }; "kjTemplate": { "alias": "kjTemplate"; "required": false; "isSignal": true; }; "kjSide": { "alias": "kjSide"; "required": false; "isSignal": true; }; "kjAlign": { "alias": "kjAlign"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
5639
+ }
5640
+
5531
5641
  /**
5532
5642
  * Styled wrapper around the headless `KjProgressBar` directive. Composes the
5533
5643
  * core directive on an inner element and renders the inner
@@ -8127,6 +8237,14 @@ declare class KjTabPanelComponent {
8127
8237
  * @doc-example Tag list
8128
8238
  * Wrap chips in `<kj-tag-list>` for single-tab-stop + arrow-key navigation.
8129
8239
  * @doc-file tag.list.example.ts
8240
+ * @doc-example Overflow
8241
+ * `[kjMax]` on the list collapses the extra chips into a "+N" chip whose hover
8242
+ * panel lists them.
8243
+ * @doc-file tag.overflow.example.ts
8244
+ * @doc-example Overflow template
8245
+ * `<ng-template kjOverflowContent>` renders the collapsed chips your way — here
8246
+ * as rows with a remove action.
8247
+ * @doc-file tag.overflow-template.example.ts
8130
8248
  *
8131
8249
  * @doc-keyboard
8132
8250
  * Enter|Space — Activates a selectable tag; flips `aria-pressed`
@@ -8190,15 +8308,39 @@ declare class KjTagRemoveComponent {
8190
8308
  }
8191
8309
  /**
8192
8310
  * Optional chip-group container. Provides the listbox / grid / group ARIA
8193
- * wiring + roving tabindex via the headless `KjTagList` directive. Standalone
8194
- * tags work without it; wrap chips in `<kj-tag-list>` whenever the group
8195
- * needs a single tab stop and arrow-key navigation.
8311
+ * wiring + roving tabindex via the headless `KjTagList` directive, and — with
8312
+ * `[kjMax]` collapses the chips past the cap into a "+N" chip. Hovering,
8313
+ * focusing or tapping that chip opens a panel listing the collapsed chips;
8314
+ * project an `<ng-template kjOverflowContent>` to render the panel yourself
8315
+ * (the context carries the collapsed range, so you slice your own data and
8316
+ * add actions such as remove).
8317
+ *
8318
+ * Standalone tags work without it; wrap chips in `<kj-tag-list>` whenever the
8319
+ * group needs a single tab stop and arrow-key navigation.
8320
+ *
8321
+ * The "+N" chip is a button rendered inside the container: keep the container
8322
+ * on its default `group` role when using `kjMax` (a `listbox` / `grid` only
8323
+ * admits option / row children).
8196
8324
  * @doc
8197
8325
  * @doc-name tag
8198
8326
  */
8199
8327
  declare class KjTagListComponent {
8328
+ protected readonly list: KjTagList;
8329
+ private readonly i18n;
8330
+ /** Text of the "+N" chip. Defaults to the `overflow.more` translation (`+{count}`). */
8331
+ readonly kjOverflowLabel: _angular_core.InputSignal<((count: number) => string) | undefined>;
8332
+ /** Accessible name of the chip button. Defaults to the `overflow.show` translation (`Show {count} more`). */
8333
+ readonly kjOverflowAriaLabel: _angular_core.InputSignal<((count: number) => string) | undefined>;
8334
+ /** Variant of the "+N" chip. Default `secondary`. */
8335
+ readonly kjOverflowVariant: _angular_core.InputSignal<string>;
8336
+ protected readonly overflowTemplate: _angular_core.Signal<KjOverflowContent | undefined>;
8337
+ private readonly panel;
8338
+ protected readonly overflowCount: _angular_core.Signal<number>;
8339
+ protected readonly overflowLabel: _angular_core.Signal<string>;
8340
+ protected readonly overflowAriaLabel: _angular_core.Signal<string>;
8341
+ protected focusPanel(event: Event): void;
8200
8342
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjTagListComponent, never>;
8201
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<KjTagListComponent, "kj-tag-list", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.KjTagList; inputs: { "kjTagListRole": "kjTagListRole"; "kjTagListOrientation": "kjTagListOrientation"; "kjTagListMultiple": "kjTagListMultiple"; "kjTagListDisabled": "kjTagListDisabled"; }; outputs: {}; }]>;
8343
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<KjTagListComponent, "kj-tag-list", never, { "kjOverflowLabel": { "alias": "kjOverflowLabel"; "required": false; "isSignal": true; }; "kjOverflowAriaLabel": { "alias": "kjOverflowAriaLabel"; "required": false; "isSignal": true; }; "kjOverflowVariant": { "alias": "kjOverflowVariant"; "required": false; "isSignal": true; }; }, {}, ["overflowTemplate"], ["*"], true, [{ directive: typeof i1.KjTagList; inputs: { "kjTagListRole": "kjTagListRole"; "kjTagListOrientation": "kjTagListOrientation"; "kjTagListMultiple": "kjTagListMultiple"; "kjTagListDisabled": "kjTagListDisabled"; "kjMax": "kjMax"; }; outputs: {}; }]>;
8202
8344
  }
8203
8345
 
8204
8346
  /**
@@ -9199,5 +9341,5 @@ declare class KjTreeSelectComponent {
9199
9341
 
9200
9342
  declare const KJ_COMPONENTS_VERSION = "0.0.1";
9201
9343
 
9202
- export { KJ_COMPONENTS_VERSION, KJ_EDITOR_CONTRACT, KJ_FILTER_CONTEXT, KjAccordionComponent, KjAccordionContentComponent, KjAccordionItemComponent, KjAccordionTriggerComponent, KjActionSheet, KjActionSheetComponent, KjActionSheetRef, KjActionSheetService, KjAlertActionsComponent, KjAlertComponent, KjAlertDescriptionComponent, KjAlertDismissComponent, KjAlertIconComponent, KjAlertTitleComponent, KjAvatarComponent, KjAvatarGroupComponent, KjBadgeComponent, KjBooleanEditor, KjBreadcrumbComponent, KjBreadcrumbCurrentComponent, KjBreadcrumbEllipsisComponent, KjBreadcrumbItemComponent, KjBreadcrumbLinkComponent, KjBreadcrumbListComponent, KjBreadcrumbSeparatorComponent, KjBulkAction, KjButtonComponent, KjButtonGroupComponent, KjCalendarComponent, KjCardComponent, KjCardContentComponent, KjCardCoverComponent, KjCardFooterComponent, KjCardHeaderComponent, KjCardSubtitleComponent, KjCardTitleComponent, KjCarouselAutoplayComponent, KjCarouselComponent, KjCarouselIndicatorsComponent, KjCarouselNextComponent, KjCarouselPauseComponent, KjCarouselPreviousComponent, KjCarouselSlideComponent, KjCarouselViewportComponent, KjCascadeOptionComponent, KjCascadeSelectComponent, KjCascadeSubPanelComponent, KjCellEditorOutlet, KjCellTemplateDirective, KjChartComponent, KjChatAvatarComponent, KjChatBubbleComponent, KjChatComponent, KjChatFooterComponent, KjChatHeaderComponent, KjChatLogComponent, KjChatMessage, KjChatThread, KjCheckboxComponent, KjColorPickerComponent, KjComboboxComponent, KjComboboxEmptyComponent, KjComboboxLoadingComponent, KjComboboxOptionComponent, KjCommandEmptyComponent, KjCommandGroupComponent, KjCommandInputComponent, KjCommandItemComponent, KjCommandPaletteComponent, KjCommandPaletteFooter, KjCommandPaletteItemTemplate, KjCommandSeparatorComponent, KjConfirmPopupActionComponent, KjConfirmPopupActionsComponent, KjConfirmPopupCancelComponent, KjConfirmPopupComponent, KjConfirmPopupContentComponent, KjConfirmPopupMessageComponent, KjConfirmPopupTriggerComponent, KjDateEditor, KjDateFilter, KjDatePickerComponent, KjDateRangePresetsComponent, KjDatetimePickerComponent, KjDialogComponent, KjDirectionToggle, KjDividerComponent, KjDrawerComponent, KjDropdownMenuComponent, KjEditorComponent, KjEmptyStateActionsComponent, KjEmptyStateComponent, KjEmptyStateDescriptionComponent, KjEmptyStateIconComponent, KjEmptyStateTitleComponent, KjFieldComponent, KjFieldErrorComponent, KjFieldGroupComponent, KjFieldHelpComponent, KjFieldLabelComponent, KjFileUploadComponent, KjFilterCellOutlet, KjFormActionsComponent, KjFormComponent, KjFormSummaryComponent, KjIconGalleryExample, KjIconUsageExample, KjInputComponent, KjInputGroupAddonComponent, KjInputGroupComponent, KjInputMaskComponent, KjInputMaskCreditCardExample, KjInputMaskCustomTokensExample, KjInputMaskDateExample, KjInputMaskExample, KjInputMaskUsageExample, KjInputMaskValidationExample, KjInputOtpComponent, KjKbdComponent, KjLinkComponent, KjListComponent, KjListItemComponent, KjMenubarComponent, KjMenubarItemComponent, KjNumberEditor, KjNumberFilter, KjNumberInputComponent, KjOptionComponent, KjOverlayBadgeComponent, KjOverlayBadgeContentComponent, KjPaginationComponent, KjPaginationDefaultComponent, KjPaginationEllipsisComponent, KjPaginationFirstComponent, KjPaginationInfoComponent, KjPaginationItemComponent, KjPaginationLastComponent, KjPaginationNextComponent, KjPaginationPreviousComponent, KjPasswordInputComponent, KjPopoverComponent, KjProgressBarComponent, KjPromptInput, KjRadioComponent, KjRadioGroupComponent, KjRichTextEditorComponent, KjSelectComponent, KjSelectEditor, KjSelectFilter, KjSheetComponent, KjSkeletonComponent, KjSkipLinkComponent, KjSliderComponent, KjSpeedDialActionComponent, KjSpeedDialActionsComponent, KjSpeedDialComponent, KjSpeedDialTriggerComponent, KjSpinnerComponent, KjStepComponent, KjStepContentComponent, KjStepLabelComponent, KjStepperComponent, KjStepperNextComponent, KjStepperPreviousComponent, KjStepperResetComponent, KjTabComponent, KjTabListComponent, KjTabPanelComponent, KjTableComponent, KjTableEmptyTemplate, KjTableErrorTemplate, KjTableLoadingTemplate, KjTablePaginationComponent, KjTableSidePanelComponent, KjTableSidePanelContent, KjTableStatusBarComponent, KjTableToolbarComponent, KjTableVirtual, KjTabsComponent, KjTagComponent, KjTagListComponent, KjTagRemoveComponent, KjTextEditor, KjTextFilter, KjTextareaComponent, KjTimePickerComponent, KjToastCloseComponent, KjToastComponent, KjToastViewportComponent, KjToastWrapperComponent, KjToggleComponent, KjTooltipComponent, KjTreeSelectComponent, KjTreeSelectNodeComponent, LUCIDE_ICON_NAMES, bold, bulletList, codeBlock, copyToClipboard, defaultFeatures, downloadString, exportCsv, exportJson, heading, history, image, inlineCode, italic, link, markdownShortcuts, orderedList, provideLucideIcons, quote, renderMarkdown, strike, toTsv, underline };
9344
+ export { KJ_COMPONENTS_VERSION, KJ_EDITOR_CONTRACT, KJ_FILTER_CONTEXT, KjAccordionComponent, KjAccordionContentComponent, KjAccordionItemComponent, KjAccordionTriggerComponent, KjActionSheet, KjActionSheetComponent, KjActionSheetRef, KjActionSheetService, KjAlertActionsComponent, KjAlertComponent, KjAlertDescriptionComponent, KjAlertDismissComponent, KjAlertIconComponent, KjAlertTitleComponent, KjAvatarComponent, KjAvatarGroupComponent, KjBadgeComponent, KjBooleanEditor, KjBreadcrumbComponent, KjBreadcrumbCurrentComponent, KjBreadcrumbEllipsisComponent, KjBreadcrumbItemComponent, KjBreadcrumbLinkComponent, KjBreadcrumbListComponent, KjBreadcrumbSeparatorComponent, KjBulkAction, KjButtonComponent, KjButtonGroupComponent, KjCalendarComponent, KjCardComponent, KjCardContentComponent, KjCardCoverComponent, KjCardFooterComponent, KjCardHeaderComponent, KjCardSubtitleComponent, KjCardTitleComponent, KjCarouselAutoplayComponent, KjCarouselComponent, KjCarouselIndicatorsComponent, KjCarouselNextComponent, KjCarouselPauseComponent, KjCarouselPreviousComponent, KjCarouselSlideComponent, KjCarouselViewportComponent, KjCascadeOptionComponent, KjCascadeSelectComponent, KjCascadeSubPanelComponent, KjCellEditorOutlet, KjCellTemplateDirective, KjChartComponent, KjChatAvatarComponent, KjChatBubbleComponent, KjChatComponent, KjChatFooterComponent, KjChatHeaderComponent, KjChatLogComponent, KjChatMessage, KjChatThread, KjCheckboxComponent, KjColorPickerComponent, KjComboboxComponent, KjComboboxEmptyComponent, KjComboboxLoadingComponent, KjComboboxOptionComponent, KjCommandEmptyComponent, KjCommandGroupComponent, KjCommandInputComponent, KjCommandItemComponent, KjCommandPaletteComponent, KjCommandPaletteFooter, KjCommandPaletteItemTemplate, KjCommandSeparatorComponent, KjConfirmPopupActionComponent, KjConfirmPopupActionsComponent, KjConfirmPopupCancelComponent, KjConfirmPopupComponent, KjConfirmPopupContentComponent, KjConfirmPopupMessageComponent, KjConfirmPopupTriggerComponent, KjDateEditor, KjDateFilter, KjDatePickerComponent, KjDateRangePresetsComponent, KjDatetimePickerComponent, KjDialogComponent, KjDirectionToggle, KjDividerComponent, KjDrawerComponent, KjDropdownMenuComponent, KjEditorComponent, KjEmptyStateActionsComponent, KjEmptyStateComponent, KjEmptyStateDescriptionComponent, KjEmptyStateIconComponent, KjEmptyStateTitleComponent, KjFieldComponent, KjFieldErrorComponent, KjFieldGroupComponent, KjFieldHelpComponent, KjFieldLabelComponent, KjFileUploadComponent, KjFilterCellOutlet, KjFormActionsComponent, KjFormComponent, KjFormSummaryComponent, KjIconGalleryExample, KjIconUsageExample, KjInputComponent, KjInputGroupAddonComponent, KjInputGroupComponent, KjInputMaskComponent, KjInputMaskCreditCardExample, KjInputMaskCustomTokensExample, KjInputMaskDateExample, KjInputMaskExample, KjInputMaskUsageExample, KjInputMaskValidationExample, KjInputOtpComponent, KjKbdComponent, KjLinkComponent, KjListComponent, KjListItemComponent, KjMenubarComponent, KjMenubarItemComponent, KjNumberEditor, KjNumberFilter, KjNumberInputComponent, KjOptionComponent, KjOverflowPanelComponent, KjOverlayBadgeComponent, KjOverlayBadgeContentComponent, KjPaginationComponent, KjPaginationDefaultComponent, KjPaginationEllipsisComponent, KjPaginationFirstComponent, KjPaginationInfoComponent, KjPaginationItemComponent, KjPaginationLastComponent, KjPaginationNextComponent, KjPaginationPreviousComponent, KjPasswordInputComponent, KjPopoverComponent, KjProgressBarComponent, KjPromptInput, KjRadioComponent, KjRadioGroupComponent, KjRichTextEditorComponent, KjSelectComponent, KjSelectEditor, KjSelectFilter, KjSheetComponent, KjSkeletonComponent, KjSkipLinkComponent, KjSliderComponent, KjSpeedDialActionComponent, KjSpeedDialActionsComponent, KjSpeedDialComponent, KjSpeedDialTriggerComponent, KjSpinnerComponent, KjStepComponent, KjStepContentComponent, KjStepLabelComponent, KjStepperComponent, KjStepperNextComponent, KjStepperPreviousComponent, KjStepperResetComponent, KjTabComponent, KjTabListComponent, KjTabPanelComponent, KjTableComponent, KjTableEmptyTemplate, KjTableErrorTemplate, KjTableLoadingTemplate, KjTablePaginationComponent, KjTableSidePanelComponent, KjTableSidePanelContent, KjTableStatusBarComponent, KjTableToolbarComponent, KjTableVirtual, KjTabsComponent, KjTagComponent, KjTagListComponent, KjTagRemoveComponent, KjTextEditor, KjTextFilter, KjTextareaComponent, KjTimePickerComponent, KjToastCloseComponent, KjToastComponent, KjToastViewportComponent, KjToastWrapperComponent, KjToggleComponent, KjTooltipComponent, KjTreeSelectComponent, KjTreeSelectNodeComponent, LUCIDE_ICON_NAMES, bold, bulletList, codeBlock, copyToClipboard, defaultFeatures, downloadString, exportCsv, exportJson, heading, history, image, inlineCode, italic, link, markdownShortcuts, orderedList, provideLucideIcons, quote, renderMarkdown, strike, toTsv, underline };
9203
9345
  export type { ExportOptions, KjActionSheetAction, KjActionSheetOptions, KjActionSheetRole, KjCellEditEvent, KjCellTemplateContext, KjChatBubbleSize, KjChatBubbleVariant, KjEditorContract, KjEmptyStateLevel, KjEmptyStateLive, KjEmptyStateVariant, KjFilterContext, KjHeadingLevel, KjInputSize, KjInputType, KjInputVariant, KjMdBlock, KjNumberRange, KjRowClickEvent, KjSelectEditorOption, KjSelectFilterOption, KjSpeedDialPosition, KjTableDensity, KjTableExportFormat };