@skyux/lists 15.0.0-alpha.2 → 15.0.0-alpha.4

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": "@skyux/lists",
3
- "version": "15.0.0-alpha.2",
3
+ "version": "15.0.0-alpha.4",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "keywords": [
6
6
  "blackbaud",
@@ -20,15 +20,15 @@
20
20
  "@angular/common": "^22.0.6",
21
21
  "@angular/core": "^22.0.6",
22
22
  "@angular/platform-browser": "^22.0.6",
23
- "@skyux-sdk/testing": "15.0.0-alpha.2",
24
- "@skyux/core": "15.0.0-alpha.2",
25
- "@skyux/forms": "15.0.0-alpha.2",
26
- "@skyux/i18n": "15.0.0-alpha.2",
27
- "@skyux/icon": "15.0.0-alpha.2",
28
- "@skyux/indicators": "15.0.0-alpha.2",
29
- "@skyux/inline-form": "15.0.0-alpha.2",
30
- "@skyux/popovers": "15.0.0-alpha.2",
31
- "@skyux/theme": "15.0.0-alpha.2"
23
+ "@skyux-sdk/testing": "15.0.0-alpha.4",
24
+ "@skyux/core": "15.0.0-alpha.4",
25
+ "@skyux/forms": "15.0.0-alpha.4",
26
+ "@skyux/i18n": "15.0.0-alpha.4",
27
+ "@skyux/icon": "15.0.0-alpha.4",
28
+ "@skyux/indicators": "15.0.0-alpha.4",
29
+ "@skyux/inline-form": "15.0.0-alpha.4",
30
+ "@skyux/popovers": "15.0.0-alpha.4",
31
+ "@skyux/theme": "15.0.0-alpha.4"
32
32
  },
33
33
  "dependencies": {
34
34
  "tslib": "^2.8.1"
@@ -535,7 +535,9 @@ declare class SkyRepeaterItemHarness extends SkyQueryableComponentHarness {
535
535
  */
536
536
  collapse(): Promise<void>;
537
537
  /**
538
- * Deselects the repeater item.
538
+ * Deselects the repeater item. Throws an error if the item belongs to a
539
+ * single-select repeater, since a single-select item can only be replaced
540
+ * by selecting a different item, not cleared directly.
539
541
  */
540
542
  deselect(): Promise<void>;
541
543
  /**
@@ -567,7 +569,8 @@ declare class SkyRepeaterItemHarness extends SkyQueryableComponentHarness {
567
569
  */
568
570
  isCollapsible(): Promise<boolean>;
569
571
  /**
570
- * Whether a selectable repeater item is disabled.
572
+ * Whether a selectable repeater item is disabled, either via a checkbox's disabled state, or,
573
+ * for a single-select repeater item, via the `aria-disabled` attribute on the item's row.
571
574
  */
572
575
  isDisabled(): Promise<boolean>;
573
576
  /**
@@ -579,7 +582,10 @@ declare class SkyRepeaterItemHarness extends SkyQueryableComponentHarness {
579
582
  */
580
583
  isReorderable(): Promise<boolean>;
581
584
  /**
582
- * Whether a repeater item has selection enabled.
585
+ * Whether a repeater item has selection enabled, either via a checkbox (the
586
+ * repeater's `selectionMode` property set to `multiple` or the item's deprecated
587
+ * `selectable` property) or via the repeater's `selectionMode` property set
588
+ * to `single`.
583
589
  */
584
590
  isSelectable(): Promise<boolean>;
585
591
  /**
@@ -587,7 +593,9 @@ declare class SkyRepeaterItemHarness extends SkyQueryableComponentHarness {
587
593
  */
588
594
  isSelected(): Promise<boolean>;
589
595
  /**
590
- * Selects the repeater item.
596
+ * Selects the repeater item. For a checkbox-selectable item, checks its
597
+ * checkbox. For a single-select repeater item, clicks the item, which also
598
+ * clears any previously selected item.
591
599
  */
592
600
  select(): Promise<void>;
593
601
  /**
@@ -308,6 +308,8 @@ declare class SkyPagingModule {
308
308
 
309
309
  type SkyRepeaterExpandModeType = 'single' | 'multiple' | 'none';
310
310
 
311
+ type SkyRepeaterSelectionModeType = 'none' | 'single' | 'multiple';
312
+
311
313
  /**
312
314
  * Displays content text when the repeater is expanded.
313
315
  */
@@ -317,7 +319,7 @@ declare class SkyRepeaterItemContentComponent {
317
319
  }
318
320
 
319
321
  interface SkyRepeaterItemRolesType {
320
- item: 'listitem' | 'row' | undefined;
322
+ item: 'listitem' | 'row' | 'option' | undefined;
321
323
  title: 'rowheader' | undefined;
322
324
  content: 'gridcell' | undefined;
323
325
  }
@@ -331,6 +333,8 @@ declare class SkyRepeaterItemComponent implements OnDestroy, OnInit, AfterViewIn
331
333
  * Make the first, non-disabled item tab-focusable in a selectable repeater.
332
334
  * - Disabled items should not be focusable per [W3C](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#focusabilityofdisabledcontrols).
333
335
  * - One item per grid should be tab focusable per [W3C](https://www.w3.org/WAI/ARIA/apg/patterns/grid/).
336
+ * - In a single-select repeater, the tab-focusable item is the selected item, or the
337
+ * first non-disabled item when nothing is selected, per [W3C](https://www.w3.org/WAI/ARIA/apg/patterns/listbox/).
334
338
  */
335
339
  get tabindex(): 0 | -1;
336
340
  /**
@@ -366,12 +370,33 @@ declare class SkyRepeaterItemComponent implements OnDestroy, OnInit, AfterViewIn
366
370
  set isExpanded(value: boolean | undefined);
367
371
  get isExpanded(): boolean;
368
372
  /**
369
- * Whether the repeater item's checkbox is selected.
373
+ * Whether the repeater item is selected, either via its own checkbox or via the
374
+ * repeater's `selectionMode` property.
370
375
  * When users select the repeater item, the specified property on your model is updated accordingly.
371
376
  * @default false
372
377
  */
373
378
  set isSelected(value: boolean | undefined);
374
379
  get isSelected(): boolean | undefined;
380
+ /**
381
+ * The `aria-selected` value to render for this item. In a single-select repeater,
382
+ * every item receives `true` or `false` since the item's role is `option`, which
383
+ * requires `aria-selected` to be explicitly set on all options.
384
+ */
385
+ protected readonly ariaSelected: i0.Signal<boolean | undefined>;
386
+ protected readonly isSelectionModeSingle: i0.Signal<boolean>;
387
+ /**
388
+ * Whether to render a selection checkbox for this item, either via the repeater's
389
+ * `selectionMode` property set to `multiple` or via the item's deprecated
390
+ * `selectable` property.
391
+ */
392
+ protected readonly showCheckbox: i0.Signal<boolean>;
393
+ /**
394
+ * The `aria-disabled` value to render for this item. In a single-select repeater,
395
+ * the item's row is the entire selection control (there is no separate checkbox), so it
396
+ * needs its own ARIA-equivalent indication that it cannot be selected. Multi-select items
397
+ * convey this via the checkbox's own `disabled` state instead.
398
+ */
399
+ protected readonly ariaDisabled: i0.Signal<true | undefined>;
375
400
  /**
376
401
  * Whether users can change the order of the repeater item.
377
402
  * The repeater component's `reorderable` property must also be set to `true`.
@@ -379,9 +404,13 @@ declare class SkyRepeaterItemComponent implements OnDestroy, OnInit, AfterViewIn
379
404
  */
380
405
  reorderable: boolean | undefined;
381
406
  /**
382
- * Whether to display a checkbox in the left of the repeater item.
407
+ * Whether to display a checkbox in the left of the repeater item. This property
408
+ * never displays a checkbox when the repeater's `selectionMode` property is set
409
+ * to `single`.
410
+ * @deprecated Set the repeater's `selectionMode` property to `multiple` instead.
383
411
  */
384
- selectable: boolean | undefined;
412
+ set selectable(value: boolean | undefined);
413
+ get selectable(): boolean | undefined;
385
414
  /**
386
415
  * Whether to display an inline form within the repeater.
387
416
  * Users can toggle between displaying and hiding the inline form.
@@ -446,7 +475,7 @@ declare class SkyRepeaterItemComponent implements OnDestroy, OnInit, AfterViewIn
446
475
  static ɵcmp: i0.ɵɵComponentDeclaration<SkyRepeaterItemComponent, "sky-repeater-item", never, { "disabled": { "alias": "disabled"; "required": false; }; "itemName": { "alias": "itemName"; "required": false; }; "inlineFormConfig": { "alias": "inlineFormConfig"; "required": false; }; "inlineFormTemplate": { "alias": "inlineFormTemplate"; "required": false; }; "isExpanded": { "alias": "isExpanded"; "required": false; }; "isSelected": { "alias": "isSelected"; "required": false; }; "reorderable": { "alias": "reorderable"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "showInlineForm": { "alias": "showInlineForm"; "required": false; }; "tag": { "alias": "tag"; "required": false; }; }, { "collapse": "collapse"; "expand": "expand"; "inlineFormClose": "inlineFormClose"; "isSelectedChange": "isSelectedChange"; }, ["contextMenu", "titleComponent", "repeaterItemContentComponents"], ["sky-inline-delete", "sky-repeater-item-context-menu", "sky-repeater-item-title", "sky-repeater-item-content"], false, never>;
447
476
  }
448
477
 
449
- type SkyRepeaterRoleType = 'list' | 'grid';
478
+ type SkyRepeaterRoleType = 'list' | 'grid' | 'listbox';
450
479
 
451
480
  /**
452
481
  * Creates a container to display repeater items.
@@ -495,6 +524,20 @@ declare class SkyRepeaterComponent implements AfterContentInit, AfterViewChecked
495
524
  */
496
525
  set expandMode(value: SkyRepeaterExpandModeType | undefined);
497
526
  get expandMode(): SkyRepeaterExpandModeType;
527
+ /**
528
+ * The selection interaction to apply to repeater items. The valid options are `none`,
529
+ * `single`, and `multiple`.
530
+ * - `none` (the default) does not add any selection interaction.
531
+ * - `single` lets users select one repeater item at a time. Clicking anywhere on a
532
+ * repeater item, or pressing the Space or Enter key while it has focus, selects it and
533
+ * clears any previously-selected item. Users can move focus between repeater items with
534
+ * the arrow keys, Home, and End
535
+ * [to support accessibility](https://developer.blackbaud.com/skyux/learn/accessibility).
536
+ * - `multiple` displays a checkbox on each repeater item so users can select
537
+ * multiple items at a time. The checkbox on a disabled repeater item is disabled.
538
+ * @default "none"
539
+ */
540
+ readonly selectionMode: i0.InputSignalWithTransform<SkyRepeaterSelectionModeType, SkyRepeaterSelectionModeType | undefined>;
498
541
  /**
499
542
  * Fires when the active repeater item changes.
500
543
  */
@@ -514,12 +557,12 @@ declare class SkyRepeaterComponent implements AfterContentInit, AfterViewChecked
514
557
  ngOnInit(): void;
515
558
  onCdkObserveContent(): void;
516
559
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyRepeaterComponent, never>;
517
- static ɵcmp: i0.ɵɵComponentDeclaration<SkyRepeaterComponent, "sky-repeater", never, { "activeIndex": { "alias": "activeIndex"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "reorderable": { "alias": "reorderable"; "required": false; }; "expandMode": { "alias": "expandMode"; "required": false; }; }, { "activeIndexChange": "activeIndexChange"; "orderChange": "orderChange"; }, ["items"], ["*"], false, never>;
560
+ static ɵcmp: i0.ɵɵComponentDeclaration<SkyRepeaterComponent, "sky-repeater", never, { "activeIndex": { "alias": "activeIndex"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "reorderable": { "alias": "reorderable"; "required": false; }; "expandMode": { "alias": "expandMode"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; }, { "activeIndexChange": "activeIndexChange"; "orderChange": "orderChange"; }, ["items"], ["*"], false, never>;
518
561
  }
519
562
 
520
563
  /**
521
564
  * Wraps and styles a
522
- * [`sky-dropdown` component](https://developer.blackbaud.com/skyux-popovers/docs/dropdown).
565
+ * [`sky-dropdown` component](https://developer.blackbaud.com/skyux/components/dropdown).
523
566
  */
524
567
  declare class SkyRepeaterItemContextMenuComponent {
525
568
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyRepeaterItemContextMenuComponent, never>;
@@ -658,4 +701,4 @@ declare class SkySortModule {
658
701
  }
659
702
 
660
703
  export { SkyFilterModule, SkyFilterStateService, SkyInfiniteScrollModule, SkyListSummaryModule, SkyPagingModule, SkyRepeaterModule, SkySortModule, SkyFilterButtonComponent as λ1, SkyRepeaterItemComponent as λ10, SkyRepeaterComponent as λ11, SkyRepeaterItemTitleComponent as λ12, SkySortItemComponent as λ13, SkySortComponent as λ14, SkyPagingContentComponent as λ15, SkyListSummaryComponent as λ16, SkyListSummaryItemComponent as λ17, SkyFilterInlineComponent as λ2, SkyFilterInlineItemComponent as λ3, SkyFilterSummaryItemComponent as λ4, SkyFilterSummaryComponent as λ5, SkyInfiniteScrollComponent as λ6, SkyPagingComponent as λ7, SkyRepeaterItemContentComponent as λ8, SkyRepeaterItemContextMenuComponent as λ9 };
661
- export type { SkyFilterState, SkyFilterStateFilterItem, SkyFilterStateFilterValue, SkyPagingContentChangeArgs, SkyRepeaterExpandModeType };
704
+ export type { SkyFilterState, SkyFilterStateFilterItem, SkyFilterStateFilterValue, SkyPagingContentChangeArgs, SkyRepeaterExpandModeType, SkyRepeaterSelectionModeType };