@lilydesignsystem/angular-headless 0.4.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.4.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
@@ -4311,15 +4392,26 @@ export declare class DateInput {
4311
4392
  }, never, never, true, never>;
4312
4393
  }
4313
4394
  /**
4314
- * DateRange — a display of a start and end date range
4395
+ * DateRange — paired start and end date inputs <fieldset><input type="date">
4315
4396
  *
4316
- * Headless Angular component. Renders the semantic HTML root with the
4317
- * kebab-case class hook `date-range` and the consumer-provided `className`.
4318
- * Ships zero CSS; the consumer styles via the class hook.
4397
+ * Headless Angular component. Renders a semantic `<fieldset>` with the
4398
+ * kebab-case class hook `date-range` and the consumer-provided `className`,
4399
+ * holding two native `<input type="date">` elements (class `date-input`),
4400
+ * each with its own accessible name. Ships zero CSS.
4319
4401
  */
4320
4402
  export declare class DateRange {
4403
+ /** Accessible group label, applied to the fieldset via aria-label. */
4321
4404
  readonly label: import("@angular/core").InputSignal<string>;
4405
+ /** Accessible label for the start date input. */
4406
+ readonly startLabel: import("@angular/core").InputSignal<string>;
4407
+ /** Accessible label for the end date input. */
4408
+ readonly endLabel: import("@angular/core").InputSignal<string>;
4409
+ /** Extra CSS classes appended to the base class. */
4322
4410
  readonly className: import("@angular/core").InputSignal<string>;
4411
+ /** Start date, YYYY-MM-DD. Bindable. */
4412
+ readonly start: import("@angular/core").ModelSignal<string>;
4413
+ /** End date, YYYY-MM-DD. Bindable. */
4414
+ readonly end: import("@angular/core").ModelSignal<string>;
4323
4415
  static ɵfac: i0.ɵɵFactoryDeclaration<DateRange, never>;
4324
4416
  static ɵcmp: i0.ɵɵComponentDeclaration<DateRange, "lily-date-range", never, {
4325
4417
  "label": {
@@ -4327,12 +4419,35 @@ export declare class DateRange {
4327
4419
  "required": false;
4328
4420
  "isSignal": true;
4329
4421
  };
4422
+ "startLabel": {
4423
+ "alias": "startLabel";
4424
+ "required": false;
4425
+ "isSignal": true;
4426
+ };
4427
+ "endLabel": {
4428
+ "alias": "endLabel";
4429
+ "required": false;
4430
+ "isSignal": true;
4431
+ };
4330
4432
  "className": {
4331
4433
  "alias": "className";
4332
4434
  "required": false;
4333
4435
  "isSignal": true;
4334
4436
  };
4335
- }, {}, never, ["*"], true, never>;
4437
+ "start": {
4438
+ "alias": "start";
4439
+ "required": false;
4440
+ "isSignal": true;
4441
+ };
4442
+ "end": {
4443
+ "alias": "end";
4444
+ "required": false;
4445
+ "isSignal": true;
4446
+ };
4447
+ }, {
4448
+ "start": "startChange";
4449
+ "end": "endChange";
4450
+ }, never, never, true, never>;
4336
4451
  }
4337
4452
  /**
4338
4453
  * DateTimeLocalInput — an input for entering a date and time without time zone <input type="datetime-local">
@@ -13238,14 +13353,19 @@ export declare class Resizable {
13238
13353
  }, {}, never, ["*"], true, never>;
13239
13354
  }
13240
13355
  /**
13241
- * ReviewDate — a display of a content review date
13356
+ * ReviewDate — a display of a content review date <time>
13242
13357
  *
13243
- * Headless Angular component. Renders the semantic HTML root with the
13244
- * kebab-case class hook `review-date` and the consumer-provided `className`.
13245
- * Ships zero CSS; the consumer styles via the class hook.
13358
+ * Headless Angular component. Renders a semantic `<time>` with the
13359
+ * kebab-case class hook `review-date`, the consumer-provided `className`,
13360
+ * and a machine-readable `datetime` (ISO 8601); the projected content is the
13361
+ * human-readable, localised date text. Ships zero CSS.
13246
13362
  */
13247
13363
  export declare class ReviewDate {
13364
+ /** Accessible label giving screen readers context for the date. */
13248
13365
  readonly label: import("@angular/core").InputSignal<string>;
13366
+ /** Machine-readable date/time in ISO 8601 format. */
13367
+ readonly datetime: import("@angular/core").InputSignal<string>;
13368
+ /** Extra CSS classes appended to the base class. */
13249
13369
  readonly className: import("@angular/core").InputSignal<string>;
13250
13370
  static ɵfac: i0.ɵɵFactoryDeclaration<ReviewDate, never>;
13251
13371
  static ɵcmp: i0.ɵɵComponentDeclaration<ReviewDate, "lily-review-date", never, {
@@ -13254,6 +13374,11 @@ export declare class ReviewDate {
13254
13374
  "required": false;
13255
13375
  "isSignal": true;
13256
13376
  };
13377
+ "datetime": {
13378
+ "alias": "datetime";
13379
+ "required": false;
13380
+ "isSignal": true;
13381
+ };
13257
13382
  "className": {
13258
13383
  "alias": "className";
13259
13384
  "required": false;
@@ -14061,6 +14186,12 @@ export declare class SegmentGroup {
14061
14186
  export declare class SegmentGroupItem {
14062
14187
  readonly label: import("@angular/core").InputSignal<string>;
14063
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>;
14064
14195
  static ɵfac: i0.ɵɵFactoryDeclaration<SegmentGroupItem, never>;
14065
14196
  static ɵcmp: i0.ɵɵComponentDeclaration<SegmentGroupItem, "lily-segment-group-item", never, {
14066
14197
  "label": {
@@ -14073,6 +14204,21 @@ export declare class SegmentGroupItem {
14073
14204
  "required": false;
14074
14205
  "isSignal": true;
14075
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
+ };
14076
14222
  }, {}, never, ["*"], true, never>;
14077
14223
  }
14078
14224
  /**
@@ -15790,6 +15936,8 @@ export declare class TableTH {
15790
15936
  export declare class Tag {
15791
15937
  readonly label: import("@angular/core").InputSignal<string>;
15792
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>;
15793
15941
  static ɵfac: i0.ɵɵFactoryDeclaration<Tag, never>;
15794
15942
  static ɵcmp: i0.ɵɵComponentDeclaration<Tag, "lily-tag", never, {
15795
15943
  "label": {
@@ -15802,7 +15950,12 @@ export declare class Tag {
15802
15950
  "required": false;
15803
15951
  "isSignal": true;
15804
15952
  };
15805
- }, {}, never, ["*"], true, never>;
15953
+ "live": {
15954
+ "alias": "live";
15955
+ "required": false;
15956
+ "isSignal": true;
15957
+ };
15958
+ }, {}, never, ["*", "*"], true, never>;
15806
15959
  }
15807
15960
  /**
15808
15961
  * TagGroup — a group of tag elements