@lilydesignsystem/angular-headless 0.5.0 → 0.6.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": "@lilydesignsystem/angular-headless",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "engines": {
5
5
  "node": "=26"
6
6
  },
@@ -23,7 +23,8 @@
23
23
  "author": "Joel Parker Henderson <joel@joelparkerhenderson.com>",
24
24
  "repository": {
25
25
  "type": "git",
26
- "url": "git+https://github.com/LilyDesignSystem/lily-design-system-angular-headless.git"
26
+ "url": "git+https://github.com/LilyDesignSystem/lily-design-system.git",
27
+ "directory": "lily-design-system-angular-headless"
27
28
  },
28
29
  "homepage": "https://lilydesignsystem.com/",
29
30
  "bugs": {
@@ -3670,6 +3670,10 @@ export declare class ContentsLink {
3670
3670
  readonly href: import("@angular/core").InputSignal<string>;
3671
3671
  readonly label: import("@angular/core").InputSignal<string>;
3672
3672
  readonly className: import("@angular/core").InputSignal<string>;
3673
+ /** Sets data-count on the link (and data-complete when 0). */
3674
+ readonly count: import("@angular/core").InputSignal<number | undefined>;
3675
+ /** Visible, localised count text (e.g. "3 to do"), rendered inside the link after the text. */
3676
+ readonly countLabel: import("@angular/core").InputSignal<string | undefined>;
3673
3677
  static ɵfac: i0.ɵɵFactoryDeclaration<ContentsLink, never>;
3674
3678
  static ɵcmp: i0.ɵɵComponentDeclaration<ContentsLink, "lily-contents-link", never, {
3675
3679
  "href": {
@@ -3687,6 +3691,16 @@ export declare class ContentsLink {
3687
3691
  "required": false;
3688
3692
  "isSignal": true;
3689
3693
  };
3694
+ "count": {
3695
+ "alias": "count";
3696
+ "required": false;
3697
+ "isSignal": true;
3698
+ };
3699
+ "countLabel": {
3700
+ "alias": "countLabel";
3701
+ "required": false;
3702
+ "isSignal": true;
3703
+ };
3690
3704
  }, {}, never, ["*"], true, never>;
3691
3705
  }
3692
3706
  /**
@@ -3737,15 +3751,55 @@ export declare class ContentsListItem {
3737
3751
  }, {}, never, ["*"], true, never>;
3738
3752
  }
3739
3753
  /**
3740
- * ContentsNav — a contents navigation area
3754
+ * Which section is current: the last whose top has passed the activation line
3755
+ * (`tops` are each section's top relative to the scroller; `offset` is the line).
3756
+ * At the bottom of the scroll range the last section wins (a short last section
3757
+ * never reaches the line); before the first section, the first.
3758
+ */
3759
+ declare function activeSectionIndex(tops: number[], offset: number, atBottom: boolean): number;
3760
+ /** The in-page `<a href="#id">` links inside `nav`. */
3761
+ declare function contentsLinks(nav: Element): HTMLAnchorElement[];
3762
+ declare function contentsLinkId(link: Element): string;
3763
+ declare function contentsTarget(link: Element, doc: Document): HTMLElement | null;
3764
+ export type ScrollspyOptions = {
3765
+ /** Activation line, px below the top of `root`. */
3766
+ offset?: number;
3767
+ /** A scrolling element other than the viewport. */
3768
+ root?: HTMLElement | null;
3769
+ /** The `aria-current` token set on the active link. */
3770
+ current?: string;
3771
+ /** Called once per change, with the section id. */
3772
+ onChange?: (id: string) => void;
3773
+ };
3774
+ /**
3775
+ * Mark the link of the section in view with `aria-current` and `data-active`
3776
+ * (and its enclosing `<li>`s with `data-descendant-active`). Returns a function
3777
+ * that stops listening.
3778
+ */
3779
+ declare function startScrollspy(nav: HTMLElement, options?: ScrollspyOptions): () => void;
3780
+ /**
3781
+ * ContentsNav — a navigation landmark for a table of contents.
3741
3782
  *
3742
- * Headless Angular component. Renders the semantic HTML root with the
3743
- * kebab-case class hook `contents-nav` and the consumer-provided `className`.
3744
- * Ships zero CSS; the consumer styles via the class hook.
3783
+ * With `spy` it also marks the link of the section currently in view
3784
+ * (`aria-current` and `data-active`): the links are the consumer's own
3785
+ * `<a href="#id">` elements projected into the nav. See the component's
3786
+ * `index.md` for the rules (activation line, bottom of page, click lock).
3745
3787
  */
3746
3788
  export declare class ContentsNav {
3747
3789
  readonly label: import("@angular/core").InputSignal<string>;
3748
3790
  readonly className: import("@angular/core").InputSignal<string>;
3791
+ /** Scrollspy: mark the link of the section currently in view. */
3792
+ readonly spy: import("@angular/core").InputSignal<boolean>;
3793
+ /** Activation line, px below the top of `root`; set to a fixed header's height. */
3794
+ readonly offset: import("@angular/core").InputSignal<number>;
3795
+ /** A scrolling element other than the viewport. */
3796
+ readonly root: import("@angular/core").InputSignal<HTMLElement | null>;
3797
+ /** The aria-current token set on the active link. */
3798
+ readonly current: import("@angular/core").InputSignal<string>;
3799
+ /** The id of the section currently in view (spy only). Two-way bindable: `[(active)]`. */
3800
+ readonly active: import("@angular/core").ModelSignal<string>;
3801
+ private readonly navEl;
3802
+ constructor();
3749
3803
  static ɵfac: i0.ɵɵFactoryDeclaration<ContentsNav, never>;
3750
3804
  static ɵcmp: i0.ɵɵComponentDeclaration<ContentsNav, "lily-contents-nav", never, {
3751
3805
  "label": {
@@ -3758,7 +3812,34 @@ export declare class ContentsNav {
3758
3812
  "required": false;
3759
3813
  "isSignal": true;
3760
3814
  };
3761
- }, {}, never, ["*"], true, never>;
3815
+ "spy": {
3816
+ "alias": "spy";
3817
+ "required": false;
3818
+ "isSignal": true;
3819
+ };
3820
+ "offset": {
3821
+ "alias": "offset";
3822
+ "required": false;
3823
+ "isSignal": true;
3824
+ };
3825
+ "root": {
3826
+ "alias": "root";
3827
+ "required": false;
3828
+ "isSignal": true;
3829
+ };
3830
+ "current": {
3831
+ "alias": "current";
3832
+ "required": false;
3833
+ "isSignal": true;
3834
+ };
3835
+ "active": {
3836
+ "alias": "active";
3837
+ "required": false;
3838
+ "isSignal": true;
3839
+ };
3840
+ }, {
3841
+ "active": "activeChange";
3842
+ }, never, ["*"], true, never>;
3762
3843
  }
3763
3844
  /**
3764
3845
  * ContextMenu — a menu that appears on right-click or long-press
@@ -14105,6 +14186,12 @@ export declare class SegmentGroup {
14105
14186
  export declare class SegmentGroupItem {
14106
14187
  readonly label: import("@angular/core").InputSignal<string>;
14107
14188
  readonly className: import("@angular/core").InputSignal<string>;
14189
+ /** Whether this segment is selected (`aria-checked`, and the roving tab stop). */
14190
+ readonly checked: import("@angular/core").InputSignal<boolean>;
14191
+ /** Value associated with this segment, exposed as `data-value`. */
14192
+ readonly value: import("@angular/core").InputSignal<string>;
14193
+ /** Whether this segment is disabled. */
14194
+ readonly disabled: import("@angular/core").InputSignal<boolean>;
14108
14195
  static ɵfac: i0.ɵɵFactoryDeclaration<SegmentGroupItem, never>;
14109
14196
  static ɵcmp: i0.ɵɵComponentDeclaration<SegmentGroupItem, "lily-segment-group-item", never, {
14110
14197
  "label": {
@@ -14117,6 +14204,21 @@ export declare class SegmentGroupItem {
14117
14204
  "required": false;
14118
14205
  "isSignal": true;
14119
14206
  };
14207
+ "checked": {
14208
+ "alias": "checked";
14209
+ "required": false;
14210
+ "isSignal": true;
14211
+ };
14212
+ "value": {
14213
+ "alias": "value";
14214
+ "required": false;
14215
+ "isSignal": true;
14216
+ };
14217
+ "disabled": {
14218
+ "alias": "disabled";
14219
+ "required": false;
14220
+ "isSignal": true;
14221
+ };
14120
14222
  }, {}, never, ["*"], true, never>;
14121
14223
  }
14122
14224
  /**
@@ -15834,6 +15936,8 @@ export declare class TableTH {
15834
15936
  export declare class Tag {
15835
15937
  readonly label: import("@angular/core").InputSignal<string>;
15836
15938
  readonly className: import("@angular/core").InputSignal<string>;
15939
+ /** Announce changes: a role="status" live region. Off by default. */
15940
+ readonly live: import("@angular/core").InputSignal<boolean>;
15837
15941
  static ɵfac: i0.ɵɵFactoryDeclaration<Tag, never>;
15838
15942
  static ɵcmp: i0.ɵɵComponentDeclaration<Tag, "lily-tag", never, {
15839
15943
  "label": {
@@ -15846,7 +15950,12 @@ export declare class Tag {
15846
15950
  "required": false;
15847
15951
  "isSignal": true;
15848
15952
  };
15849
- }, {}, never, ["*"], true, never>;
15953
+ "live": {
15954
+ "alias": "live";
15955
+ "required": false;
15956
+ "isSignal": true;
15957
+ };
15958
+ }, {}, never, ["*", "*"], true, never>;
15850
15959
  }
15851
15960
  /**
15852
15961
  * TagGroup — a group of tag elements