@ixfx/components 0.16.0 → 0.16.2

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.
Files changed (90) hide show
  1. package/bundle/index.d.ts +290 -66
  2. package/bundle/index.js +412 -327
  3. package/dist/ac-text.d.ts +1 -1
  4. package/dist/{ac-token-qEs3FsQv.d.ts → ac-token-Cq7lsYf-.d.ts} +1 -1
  5. package/dist/ac-token.d.ts +1 -1
  6. package/dist/ac-token.js +1 -1
  7. package/dist/{button-N92DKoWb.d.ts → button-D1sPDUCM.d.ts} +1 -1
  8. package/dist/button.d.ts +1 -1
  9. package/dist/colour-picker.d.ts +1 -1
  10. package/dist/{crumb-navigation-YnFVFqrx.js → crumb-navigation-D3ndPgFg.js} +2 -2
  11. package/dist/{crumb-navigation-BbqfmkYs.d.ts → crumb-navigation-nnr881n-.d.ts} +1 -1
  12. package/dist/crumbs.d.ts +1 -1
  13. package/dist/crumbs.js +1 -1
  14. package/dist/{data-grid-CIG2DVip.d.ts → data-grid-BAEpfTkb.d.ts} +32 -5
  15. package/dist/{data-grid-rMkLX2qo.js → data-grid-CaPLWt5E.js} +159 -60
  16. package/dist/data-grid.d.ts +2 -2
  17. package/dist/data-grid.js +1 -1
  18. package/dist/{detail-list-C4pDSoI8.js → detail-list-C3XKTRmE.js} +86 -21
  19. package/dist/{detail-list-6iMTNP4N.d.ts → detail-list-DK49TsJd.d.ts} +26 -4
  20. package/dist/detail-list.d.ts +2 -2
  21. package/dist/detail-list.js +1 -1
  22. package/dist/{flat-list-JPgQSmLW.d.ts → flat-list-Bv4-qfjp.d.ts} +9 -4
  23. package/dist/flat-list.d.ts +1 -1
  24. package/dist/flat-list.js +6 -3
  25. package/dist/{grid-list-CdEkScn-.js → grid-list-51XsR2X2.js} +56 -18
  26. package/dist/{grid-list-D6n7WH8l.d.ts → grid-list-DaeSHv9P.d.ts} +58 -14
  27. package/dist/grid-list.d.ts +2 -2
  28. package/dist/grid-list.js +1 -1
  29. package/dist/{grouped-item-lister-DETte0Dh.d.ts → grouped-item-lister-DZIjo9nO.d.ts} +2 -2
  30. package/dist/grouped-item-lister.d.ts +1 -1
  31. package/dist/{icon-CDGprSdE.d.ts → icon-DR_3rSyZ.d.ts} +1 -1
  32. package/dist/icons.d.ts +2 -2
  33. package/dist/{incr-search-JIhwB49y.js → incr-search-2YaxUUA9.js} +150 -11
  34. package/dist/incr-search.d.ts +1 -1
  35. package/dist/incr-search.js +1 -1
  36. package/dist/{index-CoqtMSd9.d.ts → index-BUB5SICW.d.ts} +1 -1
  37. package/dist/{index-Dr80Zdl6.d.ts → index-BjRoPrwj.d.ts} +31 -4
  38. package/dist/{index-DN2BWctP.d.ts → index-Bz3loIAf.d.ts} +1 -1
  39. package/dist/{index-UvnoZUAo.d.ts → index-CJ5fshD3.d.ts} +1 -1
  40. package/dist/{index-DxyyVqzA.d.ts → index-DM9OLgTH.d.ts} +3 -2
  41. package/dist/{index-CYRc6Dah.d.ts → index-DXDz60XH.d.ts} +20 -1
  42. package/dist/{index-CYndvTWH.d.ts → index-garxxqgV.d.ts} +1 -1
  43. package/dist/{index-Bx0BXPxI.d.ts → index-vdbbGE7N.d.ts} +1 -1
  44. package/dist/index.d.ts +57 -28
  45. package/dist/index.js +58 -35
  46. package/dist/item-appearance-Bl6rMIID.js +60 -0
  47. package/dist/{labelled-input-base-DiTme1JO.d.ts → labelled-input-base-Dp_9KP0G.d.ts} +1 -1
  48. package/dist/labelled-radial-input.d.ts +2 -2
  49. package/dist/labelled-range-input.d.ts +1 -1
  50. package/dist/labelled-slider-input.d.ts +1 -1
  51. package/dist/list-group-header.d.ts +1 -1
  52. package/dist/{list-selection-controller-5L0Nj9tR.js → list-selection-controller-CJDdjH7E.js} +192 -54
  53. package/dist/list-selection-types-hj9Njei3.d.ts +83 -0
  54. package/dist/{menu-CU9KAm8s.js → menu-BX1FHxY8.js} +16 -1
  55. package/dist/{menu-item-bF6narIz.d.ts → menu-item-B0zqw2xp.d.ts} +1 -1
  56. package/dist/{menu-item-BUv8An2k.js → menu-item-oxU1VKiJ.js} +34 -9
  57. package/dist/menu.d.ts +2 -2
  58. package/dist/menu.js +2 -2
  59. package/dist/{miller-BFRfn0ve.js → miller-BfrTcujx.js} +142 -18
  60. package/dist/miller.d.ts +1 -1
  61. package/dist/miller.js +1 -1
  62. package/dist/narrowed-text.js +1 -1
  63. package/dist/panel.d.ts +1 -1
  64. package/dist/{split-layout-CophkNeU.d.ts → split-layout-ChZ0Glrs.d.ts} +1 -1
  65. package/dist/split-layout.d.ts +1 -1
  66. package/dist/sunburst-tree.d.ts +1 -1
  67. package/dist/sunburst-tree.js +1 -1
  68. package/dist/{sunbursttree-list-B_VxOHlo.js → sunbursttree-list-906G33ME.js} +1 -1
  69. package/dist/{sunbursttree-list-D6j5BxVQ.d.ts → sunbursttree-list-BAS0KrDG.d.ts} +1 -1
  70. package/dist/{tab-list-Df371rqw.d.ts → tab-list-wC0xNz1b.d.ts} +1 -1
  71. package/dist/tabs.d.ts +1 -1
  72. package/dist/{titlebar-Tqu-VvMU.d.ts → titlebar-B5zSTZnF.d.ts} +1 -1
  73. package/dist/titlebar.d.ts +1 -1
  74. package/dist/{tree-Crdpl4nc.js → tree-C_H1COTf.js} +1 -1
  75. package/dist/tree.d.ts +1 -1
  76. package/dist/tree.js +1 -1
  77. package/dist/{vertical-list-BPDmZx6T.d.ts → vertical-list-od4050Bo.d.ts} +11 -2
  78. package/dist/{vertical-list-1V1Vg2O5.js → vertical-list-qMRIxZIT.js} +54 -20
  79. package/dist/vertical-list.d.ts +2 -2
  80. package/dist/vertical-list.js +1 -1
  81. package/docs-user/data-grid.md +23 -7
  82. package/docs-user/detail-list.md +16 -1
  83. package/docs-user/dock.md +12 -3
  84. package/docs-user/grid-list.md +9 -3
  85. package/docs-user/index.json +2 -2
  86. package/docs-user/menu.md +11 -1
  87. package/docs-user/vertical-list.md +9 -1
  88. package/package.json +2 -2
  89. package/dist/item-appearance-BjcMyauw.js +0 -29
  90. package/dist/list-selection-types-PjKdhF-a.d.ts +0 -45
@@ -3,14 +3,14 @@ import { t as themeFallbacks } from "./fallbacks-DQ_5OsmR.js";
3
3
  import { n as safeCustomElement, t as __decorate } from "./decorate-VRK8rslU.js";
4
4
  import "./icon-1gpwtPx8.js";
5
5
  import { t as DataController } from "./data-controller-DOlmqNKb.js";
6
- import { c as createElementListSearchAdapter, i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, u as keyForElement } from "./incr-search-JIhwB49y.js";
6
+ import { c as createElementListSearchAdapter, d as keysOfElements, i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, u as keyForElement } from "./incr-search-2YaxUUA9.js";
7
7
  import { a as toGroupKey, r as partitionByGroup } from "./grouping-RYPnHkrS.js";
8
8
  import { i as animateListItemOut, r as animateListItemIn, t as ListNativeDragController } from "./list-native-drag-controller-CcXoS0YX.js";
9
- import { r as ListDragSelectController, t as ListSelectionController } from "./list-selection-controller-5L0Nj9tR.js";
9
+ import { i as ListDragSelectController, n as gestureOf, t as ListSelectionController } from "./list-selection-controller-CJDdjH7E.js";
10
10
  import { a as capKeys, d as partitionKeys, l as keysToArray, o as flagsFromRecord } from "./pending-BGidHppL.js";
11
- import { a as restoreElementScroll, o as scrollToOffset, r as captureElementScroll, t as ViewStateController } from "./view-state-controller-BdyXWUUM.js";
11
+ import { a as isPartialKey, i as applyPartialAttributes, n as appearanceColor, o as sameKeySet, t as appearanceAbsent } from "./item-appearance-Bl6rMIID.js";
12
12
  import { t as scrollFadeStyles } from "./scroll-fade-Xx28D7mH.js";
13
- import { n as appearanceColor, t as appearanceAbsent } from "./item-appearance-BjcMyauw.js";
13
+ import { a as restoreElementScroll, o as scrollToOffset, r as captureElementScroll, t as ViewStateController } from "./view-state-controller-BdyXWUUM.js";
14
14
  import "./list-group-header.js";
15
15
  import { LitElement, css, html, nothing, render } from "lit";
16
16
  import { property, query, state } from "lit/decorators.js";
@@ -332,6 +332,7 @@ let DetailListElement = class DetailListElement extends LitElement {
332
332
  interactionMode: this.interactionMode
333
333
  }),
334
334
  getKey: keyForElement,
335
+ onIntent: (intent) => this._dispatchCancelable(`list-select-intent`, intent) === false,
335
336
  getGroupKey: (el) => this.#groupIndex.get(el) ?? null,
336
337
  crossGroupSelection: () => this.crossGroupSelection,
337
338
  getFallbackGroupKey: () => {
@@ -343,7 +344,8 @@ let DetailListElement = class DetailListElement extends LitElement {
343
344
  this._dispatch(`list-select`, {
344
345
  selected,
345
346
  previous,
346
- selectedKeys: this.selection.selectedKeys
347
+ selectedKeys: this.selection.selectedKeys,
348
+ previousKeys: keysOfElements(previous)
347
349
  });
348
350
  this.#viewState.notify();
349
351
  }
@@ -436,6 +438,8 @@ let DetailListElement = class DetailListElement extends LitElement {
436
438
  getLabel: (el) => el.getAttribute(`data-search-label`) ?? el.textContent?.trim() ?? ``,
437
439
  highlightKey: SEARCH_HIGHLIGHT_KEY
438
440
  }) });
441
+ this.#partialKeys = /* @__PURE__ */ new Set();
442
+ this.#markedPartial = /* @__PURE__ */ new Set();
439
443
  this.#onListScroll = () => {
440
444
  if (!this.#viewState.pendingScroll) this.#viewState.notify();
441
445
  if (this.#viewportScrollRaf !== 0) return;
@@ -459,7 +463,7 @@ let DetailListElement = class DetailListElement extends LitElement {
459
463
  if ((e.ctrlKey || e.metaKey) && e.key === `a`) {
460
464
  if (this.selection.canSelectAll()) {
461
465
  e.preventDefault();
462
- this.selection.selectAll();
466
+ this.selection.selectAll(`keyboard`);
463
467
  }
464
468
  return;
465
469
  }
@@ -468,17 +472,17 @@ let DetailListElement = class DetailListElement extends LitElement {
468
472
  case `ArrowDown`:
469
473
  e.preventDefault();
470
474
  this.#navigateDown();
471
- if (e.shiftKey && this.interactionMode === `vscode`) {
475
+ if (e.shiftKey && (this.interactionMode === `vscode` || this.interactionMode === `manual`)) {
472
476
  const cur = this.tickled.tickledId;
473
- if (cur) this.selection.rangeTo(cur);
477
+ if (cur) this.selection.handleExtend(cur);
474
478
  }
475
479
  break;
476
480
  case `ArrowUp`:
477
481
  e.preventDefault();
478
482
  this.#navigateUp();
479
- if (e.shiftKey && this.interactionMode === `vscode`) {
483
+ if (e.shiftKey && (this.interactionMode === `vscode` || this.interactionMode === `manual`)) {
480
484
  const cur = this.tickled.tickledId;
481
- if (cur) this.selection.rangeTo(cur);
485
+ if (cur) this.selection.handleExtend(cur);
482
486
  }
483
487
  break;
484
488
  case `ArrowRight`:
@@ -502,7 +506,7 @@ let DetailListElement = class DetailListElement extends LitElement {
502
506
  if (id) {
503
507
  e.preventDefault();
504
508
  this._dispatch(`list-item-click`, { item: id });
505
- this._activateItem(id);
509
+ this._activateItem(id, `keyboard`);
506
510
  }
507
511
  break;
508
512
  }
@@ -514,7 +518,7 @@ let DetailListElement = class DetailListElement extends LitElement {
514
518
  }
515
519
  break;
516
520
  }
517
- case `Escape`: this.selection.clear();
521
+ case `Escape`: this.selection.handleClear(`keyboard`);
518
522
  }
519
523
  };
520
524
  this._onClick = (e) => {
@@ -529,7 +533,7 @@ let DetailListElement = class DetailListElement extends LitElement {
529
533
  if (!item) return;
530
534
  this.focus();
531
535
  this._dispatch(`list-item-click`, { item });
532
- this.selection.handleClick(item, e);
536
+ this.selection.handleClick(item, gestureOf(e));
533
537
  };
534
538
  this._onDblClick = (e) => {
535
539
  const item = this._findListItem(e.composedPath());
@@ -823,8 +827,9 @@ let DetailListElement = class DetailListElement extends LitElement {
823
827
  });
824
828
  return;
825
829
  }
826
- const shapeChanged = changed.has(`displayProperty`) || changed.has(`formatter`) || changed.has(`iconProperty`) || changed.has(`iconColorProperty`) || changed.has(`textColorProperty`) || changed.has(`badgeProperty`) || changed.has(`keyProperty`);
830
+ const shapeChanged = changed.has(`displayProperty`) || changed.has(`formatter`) || changed.has(`searchText`) || changed.has(`iconProperty`) || changed.has(`iconColorProperty`) || changed.has(`textColorProperty`) || changed.has(`badgeProperty`) || changed.has(`keyProperty`);
827
831
  if ((changed.has(`items`) || shapeChanged) && this.provider === void 0 && this.items.length > 0) this.#rebuildFromObjects(this.items, !shapeChanged);
832
+ else if (shapeChanged && this.provider !== void 0 && this.#builtFromProvider.length > 0) this.#rebuildFromObjects(this.#builtFromProvider);
828
833
  this.#syncFromProvider();
829
834
  if (changed.has(`sort`) || changed.has(`sortBy`) || changed.has(`sortComparator`)) this.#applySort();
830
835
  if (changed.has(`filterPredicate`)) {
@@ -860,6 +865,16 @@ let DetailListElement = class DetailListElement extends LitElement {
860
865
  this.#recomputeGeometry();
861
866
  this.#scheduleViewportChangeEmit();
862
867
  }
868
+ /**
869
+ * Rebuild every object-item row, for when something the `formatter` (or
870
+ * `searchText`) reads has changed but the items themselves haven't —
871
+ * reassigning the same objects keeps their rows as they are. Assigning a new
872
+ * `formatter` function has the same effect.
873
+ */
874
+ reformat() {
875
+ const items = this.provider === void 0 ? this.items : this.#builtFromProvider;
876
+ if (items.length > 0) this.#rebuildFromObjects(items);
877
+ }
863
878
  addItem(item, options) {
864
879
  let el;
865
880
  if (typeof item === `string`) {
@@ -1223,6 +1238,8 @@ let DetailListElement = class DetailListElement extends LitElement {
1223
1238
  li.appendChild(content);
1224
1239
  if (textColor !== void 0) li.style.color = textColor;
1225
1240
  }
1241
+ const searchText = this.searchText?.(item, index);
1242
+ if (searchText !== void 0) li.setAttribute(`data-search-label`, searchText);
1226
1243
  if (this.keyProperty) {
1227
1244
  const key = this.#propertyValue(item, this.keyProperty);
1228
1245
  if (key !== void 0 && key !== null) li.setAttribute(`data-key`, String(key));
@@ -1794,7 +1811,41 @@ let DetailListElement = class DetailListElement extends LitElement {
1794
1811
  this.#appliedSelected = new Set(selected);
1795
1812
  this.#appliedChecked = checked;
1796
1813
  if (this.dataset.inputMode !== this.tickled.inputMode) this.dataset.inputMode = this.tickled.inputMode;
1797
- if (selectionChanged) this._syncCheckboxes();
1814
+ if (selectionChanged) {
1815
+ this.#syncPartial();
1816
+ this._syncCheckboxes();
1817
+ }
1818
+ }
1819
+ #partialKeys;
1820
+ /** Rows currently carrying `data-partial`. */
1821
+ #markedPartial;
1822
+ /**
1823
+ * Rows shown as *partially* selected (a part of the resource is selected):
1824
+ * `data-partial`, an indeterminate checkbox in `checked` mode, and an
1825
+ * accessible description. Independent of `selectedKeys` — a key in both
1826
+ * counts as selected. Replace-on-set.
1827
+ */
1828
+ get partialKeys() {
1829
+ return this.#partialKeys;
1830
+ }
1831
+ set partialKeys(keys) {
1832
+ const next = new Set(keys);
1833
+ if (sameKeySet(next, this.#partialKeys)) return;
1834
+ this.#partialKeys = next;
1835
+ this.#itemStatesFullSync = true;
1836
+ this._syncItemStates();
1837
+ }
1838
+ /** Touch only the rows whose partial state changed: O(partial keys), not O(rows). */
1839
+ #syncPartial() {
1840
+ const selected = this.selection.selected;
1841
+ const next = /* @__PURE__ */ new Set();
1842
+ for (const key of this.#partialKeys) {
1843
+ const el = this.#itemForKey(key);
1844
+ if (el && isPartialKey(key, this.#partialKeys, selected.has(el))) next.add(el);
1845
+ }
1846
+ for (const el of this.#markedPartial) if (!next.has(el)) applyPartialAttributes(el, false);
1847
+ for (const el of next) if (!this.#markedPartial.has(el)) applyPartialAttributes(el, true);
1848
+ this.#markedPartial = next;
1798
1849
  }
1799
1850
  _syncCheckboxes() {
1800
1851
  const inCheckedMode = this.interactionMode === `checked`;
@@ -1824,16 +1875,22 @@ let DetailListElement = class DetailListElement extends LitElement {
1824
1875
  el.prepend(cb);
1825
1876
  }
1826
1877
  const checked = this.selection.selected.has(el);
1878
+ const partial = isPartialKey(keyForElement(el), this.#partialKeys, checked);
1827
1879
  if (wantsCustom) {
1828
- cb.setAttribute(`aria-checked`, String(checked));
1880
+ cb.setAttribute(`aria-checked`, partial ? `mixed` : String(checked));
1829
1881
  cb.toggleAttribute(`data-checked`, checked);
1882
+ cb.toggleAttribute(`data-partial`, partial);
1830
1883
  if (this.checkboxRenderer) {
1831
1884
  const renderer = typeof this.checkboxRenderer === `function` ? this.checkboxRenderer : this.checkboxRenderer.renderer;
1832
1885
  render(renderer(checked), cb);
1833
1886
  }
1834
1887
  } else {
1835
1888
  const input = cb.querySelector(`input.ixfx-list-checkbox`);
1836
- if (input) input.checked = checked;
1889
+ if (input) {
1890
+ input.checked = checked;
1891
+ input.indeterminate = partial;
1892
+ }
1893
+ cb.setAttribute(`aria-checked`, partial ? `mixed` : String(checked));
1837
1894
  }
1838
1895
  }
1839
1896
  }
@@ -1852,7 +1909,7 @@ let DetailListElement = class DetailListElement extends LitElement {
1852
1909
  cell.setAttribute(`part`, `checkbox`);
1853
1910
  cell.addEventListener(`click`, (e) => {
1854
1911
  e.stopPropagation();
1855
- this.selection.toggle(el);
1912
+ this.selection.handleCheckbox(el);
1856
1913
  });
1857
1914
  const input = document.createElement(`input`);
1858
1915
  input.type = `checkbox`;
@@ -1871,7 +1928,7 @@ let DetailListElement = class DetailListElement extends LitElement {
1871
1928
  span.setAttribute(`part`, `checkbox`);
1872
1929
  span.addEventListener(`click`, (e) => {
1873
1930
  e.stopPropagation();
1874
- this.selection.toggle(el);
1931
+ this.selection.handleCheckbox(el);
1875
1932
  });
1876
1933
  return span;
1877
1934
  }
@@ -1936,8 +1993,8 @@ let DetailListElement = class DetailListElement extends LitElement {
1936
1993
  visibleKeys
1937
1994
  });
1938
1995
  }
1939
- _activateItem(item) {
1940
- if (this.interactionMode !== `manual`) this.selection.replace(item);
1996
+ _activateItem(item, source = `pointer`) {
1997
+ this.selection.handleReplace(item, source);
1941
1998
  this._dispatch(`list-activate`, { item });
1942
1999
  }
1943
2000
  static {
@@ -2057,6 +2114,13 @@ let DetailListElement = class DetailListElement extends LitElement {
2057
2114
  outline: 1px solid transparent;
2058
2115
  }
2059
2116
 
2117
+ /* Partially selected: a dashed edge, lighter than a full selection. Hook: --item-bg-partial. */
2118
+ ::slotted([data-partial]) {
2119
+ background: var(--item-bg-partial, color-mix(in srgb, var(--item-bg-selected) 35%, transparent));
2120
+ outline: 1px dashed var(--item-border-partial, var(--border));
2121
+ outline-offset: -1px;
2122
+ }
2123
+
2060
2124
  ::slotted([data-selected][data-tickled]) {
2061
2125
  background: var(--item-bg-selected-tickled);
2062
2126
  outline: 2px dashed var(--surface-3);
@@ -2157,6 +2221,7 @@ __decorate([property({
2157
2221
  attribute: `display-property`
2158
2222
  })], DetailListElement.prototype, "displayProperty", void 0);
2159
2223
  __decorate([property({ attribute: false })], DetailListElement.prototype, "formatter", void 0);
2224
+ __decorate([property({ attribute: false })], DetailListElement.prototype, "searchText", void 0);
2160
2225
  __decorate([property({
2161
2226
  type: String,
2162
2227
  attribute: `icon-property`
@@ -1,13 +1,13 @@
1
- import "./icon-CDGprSdE.js";
1
+ import "./icon-DR_3rSyZ.js";
2
2
  import { r as IDataProvider } from "./data-provider-BAn_-oR1.js";
3
3
  import { L as ListDragPreviewRenderer, R as ListDragPreviewSourceResolver, V as ListNativeDragStartEvent } from "./tree-component-DgfkxmVY.js";
4
4
  import { a as ViewStateBase, s as ViewStateChangeEvent, t as GetViewStateOptions } from "./types-LU1u0CB8.js";
5
5
  import "./index-9ttcdwlL.js";
6
6
  import { n as ListViewportChangeEvent } from "./list-viewport-types-BRZsLcvp.js";
7
- import { S as ListSearchController } from "./index-Dr80Zdl6.js";
7
+ import { i as ListInteractionMode, m as ListSelectionMode, r as ListElementEventMap } from "./list-selection-types-hj9Njei3.js";
8
+ import { S as ListSearchController } from "./index-BjRoPrwj.js";
8
9
  import { a as ListGroupEventMap, o as ListGroupInfo, s as ListGroupLabel } from "./grouping-CUKgmkMm.js";
9
- import { i as ListInteractionMode, l as ListSelectionMode, r as ListElementEventMap } from "./list-selection-types-PjKdhF-a.js";
10
- import { n as CustomCheckboxOptions, t as AddItemOptions } from "./vertical-list-BPDmZx6T.js";
10
+ import { n as CustomCheckboxOptions, t as AddItemOptions } from "./vertical-list-od4050Bo.js";
11
11
  import "./list-group-header.js";
12
12
  import { LitElement, PropertyValues } from "lit";
13
13
  import { CommandId, CommandRegistry } from "@clinth/ui-commands";
@@ -75,6 +75,13 @@ declare class DetailListElement extends LitElement {
75
75
  provider: IDataProvider<void, unknown> | undefined;
76
76
  displayProperty: string;
77
77
  formatter: DetailFormatter | undefined;
78
+ /**
79
+ * Text incremental search matches for an object item. Defaults to the
80
+ * caption when it is a string (`displayProperty` or a string `formatter`),
81
+ * else the row's whole text — set this when `formatter` returns a `Node`
82
+ * carrying more than the name (sublines, sizes, dates).
83
+ */
84
+ searchText: ((item: unknown, index: number) => string) | undefined;
78
85
  iconProperty: string;
79
86
  /**
80
87
  * Property on each `items` entry holding a CSS colour for the item's
@@ -158,6 +165,13 @@ declare class DetailListElement extends LitElement {
158
165
  * changed by outside forces (e.g. an external font load).
159
166
  */
160
167
  refreshLayout(): void;
168
+ /**
169
+ * Rebuild every object-item row, for when something the `formatter` (or
170
+ * `searchText`) reads has changed but the items themselves haven't —
171
+ * reassigning the same objects keeps their rows as they are. Assigning a new
172
+ * `formatter` function has the same effect.
173
+ */
174
+ reformat(): void;
161
175
  addItem(item: Element | string, options?: AddItemOptions): void;
162
176
  /**
163
177
  * Collapse + fade `item` out, then detach it; the rows after it slide up to
@@ -253,6 +267,14 @@ declare class DetailListElement extends LitElement {
253
267
  * only the items whose state changed are touched, so hovering is O(1).
254
268
  */
255
269
  private _syncItemStates;
270
+ /**
271
+ * Rows shown as *partially* selected (a part of the resource is selected):
272
+ * `data-partial`, an indeterminate checkbox in `checked` mode, and an
273
+ * accessible description. Independent of `selectedKeys` — a key in both
274
+ * counts as selected. Replace-on-set.
275
+ */
276
+ get partialKeys(): ReadonlySet<string>;
277
+ set partialKeys(keys: Iterable<string>);
256
278
  private _syncCheckboxes;
257
279
  /**
258
280
  * Native checkbox cell: a span that stretches to the row's full cross-axis
@@ -1,6 +1,6 @@
1
1
  import { B as ListNativeDragStartDetail, F as ListDragPreview, I as ListDragPreviewContext, L as ListDragPreviewRenderer, P as ListDragEntry, V as ListNativeDragStartEvent, z as ListDragSource } from "./tree-component-DgfkxmVY.js";
2
2
  import { n as ListViewportChangeEvent, t as ListViewportChangeDetail } from "./list-viewport-types-BRZsLcvp.js";
3
3
  import { i as ListGroupChangeEvent, l as ListGroupToggleDetail, n as ListGroupBy, o as ListGroupInfo, r as ListGroupChangeDetail, s as ListGroupLabel, u as ListGroupToggleEvent } from "./grouping-CUKgmkMm.js";
4
- import { a as DetailSortComparator, c as DetailListViewState, i as DetailGroupBy, n as DetailListElementEventMap, o as DetailSortItem, r as DetailFormatter, s as DetailSortMode, t as DetailListElement } from "./detail-list-6iMTNP4N.js";
5
- import { n as CustomCheckboxOptions, t as AddItemOptions } from "./vertical-list-BPDmZx6T.js";
4
+ import { a as DetailSortComparator, c as DetailListViewState, i as DetailGroupBy, n as DetailListElementEventMap, o as DetailSortItem, r as DetailFormatter, s as DetailSortMode, t as DetailListElement } from "./detail-list-DK49TsJd.js";
5
+ import { n as CustomCheckboxOptions, t as AddItemOptions } from "./vertical-list-od4050Bo.js";
6
6
  export { type AddItemOptions, type CustomCheckboxOptions, type DetailFormatter, type DetailGroupBy, DetailListElement, DetailListElementEventMap, type DetailListViewState, type DetailSortComparator, type DetailSortItem, type DetailSortMode, type ListDragEntry, type ListDragPreview, type ListDragPreviewContext, type ListDragPreviewRenderer, type ListDragSource, type ListGroupBy, type ListGroupChangeDetail, type ListGroupChangeEvent, type ListGroupInfo, type ListGroupLabel, type ListGroupToggleDetail, type ListGroupToggleEvent, type ListNativeDragStartDetail, type ListNativeDragStartEvent, type ListViewportChangeDetail, type ListViewportChangeEvent };
@@ -1,3 +1,3 @@
1
- import { t as DetailListElement } from "./detail-list-C4pDSoI8.js";
1
+ import { t as DetailListElement } from "./detail-list-C3XKTRmE.js";
2
2
  import "./list-group-header.js";
3
3
  export { DetailListElement };
@@ -1,11 +1,11 @@
1
- import "./icon-CDGprSdE.js";
1
+ import "./icon-DR_3rSyZ.js";
2
2
  import { M as TreeDataModel } from "./tree-component-DgfkxmVY.js";
3
3
  import { o as TreeNode, r as TreeFilterPredicate, t as LoadChildrenCallback } from "./types-Jky6oNAp.js";
4
4
  import { a as ViewStateBase, t as GetViewStateOptions } from "./types-LU1u0CB8.js";
5
5
  import "./index-9ttcdwlL.js";
6
- import "./crumb-navigation-BbqfmkYs.js";
7
- import { i as ListInteractionMode, l as ListSelectionMode } from "./list-selection-types-PjKdhF-a.js";
8
- import { r as VerticalListElement } from "./vertical-list-BPDmZx6T.js";
6
+ import "./crumb-navigation-nnr881n-.js";
7
+ import { i as ListInteractionMode, m as ListSelectionMode } from "./list-selection-types-hj9Njei3.js";
8
+ import { r as VerticalListElement } from "./vertical-list-od4050Bo.js";
9
9
  import { LitElement, PropertyValues } from "lit";
10
10
  //#region src/flat-list/types.d.ts
11
11
  /** How branches and leaves are ordered within one level. */
@@ -121,6 +121,11 @@ declare class FlatListElement extends LitElement {
121
121
  branchOrder: FlatListBranchOrder;
122
122
  selectionMode: ListSelectionMode;
123
123
  interactionMode: ListInteractionMode;
124
+ /**
125
+ * Row keys shown as *partially* selected (see `ixfx-vertical-list`'s
126
+ * `partialKeys`). Independent of the selection; a key in both counts as selected.
127
+ */
128
+ partialKeys: ReadonlySet<string>;
124
129
  itemWrap: `stop` | `wrap`;
125
130
  searchModes: string | undefined;
126
131
  itemsDraggable: boolean;
@@ -1,2 +1,2 @@
1
- import { _ as FlatListSelectEvent, a as FlatListContextMenuDetail, c as FlatListDropEvent, d as FlatListEditCommitDetail, f as FlatListEditCommitEvent, g as FlatListSelectDetail, h as FlatListNavigateEvent, i as FlatListBranchOrder, l as FlatListEditCancelDetail, m as FlatListNavigateDetail, n as FlatListActivateDetail, o as FlatListContextMenuEvent, p as FlatListElementEventMap, r as FlatListActivateEvent, s as FlatListDropDetail, t as FlatListElement, u as FlatListEditCancelEvent, v as FlatListViewState } from "./flat-list-JPgQSmLW.js";
1
+ import { _ as FlatListSelectEvent, a as FlatListContextMenuDetail, c as FlatListDropEvent, d as FlatListEditCommitDetail, f as FlatListEditCommitEvent, g as FlatListSelectDetail, h as FlatListNavigateEvent, i as FlatListBranchOrder, l as FlatListEditCancelDetail, m as FlatListNavigateDetail, n as FlatListActivateDetail, o as FlatListContextMenuEvent, p as FlatListElementEventMap, r as FlatListActivateEvent, s as FlatListDropDetail, t as FlatListElement, u as FlatListEditCancelEvent, v as FlatListViewState } from "./flat-list-Bv4-qfjp.js";
2
2
  export { type FlatListActivateDetail, type FlatListActivateEvent, type FlatListBranchOrder, type FlatListContextMenuDetail, type FlatListContextMenuEvent, type FlatListDropDetail, type FlatListDropEvent, type FlatListEditCancelDetail, type FlatListEditCancelEvent, type FlatListEditCommitDetail, type FlatListEditCommitEvent, FlatListElement, type FlatListElementEventMap, type FlatListNavigateDetail, type FlatListNavigateEvent, type FlatListSelectDetail, type FlatListSelectEvent, type FlatListViewState };
package/dist/flat-list.js CHANGED
@@ -2,11 +2,11 @@ import { t as TickledController } from "./tickled-controller-D-HZymaZ.js";
2
2
  import { t as themeFallbacks } from "./fallbacks-DQ_5OsmR.js";
3
3
  import { n as safeCustomElement, t as __decorate } from "./decorate-VRK8rslU.js";
4
4
  import "./icon-1gpwtPx8.js";
5
+ import { n as appearanceColor, t as appearanceAbsent } from "./item-appearance-Bl6rMIID.js";
5
6
  import { t as collectDataResult } from "./data-provider-35TyWclX.js";
6
7
  import { t as ViewStateController } from "./view-state-controller-BdyXWUUM.js";
7
- import { n as resolveKeyPath } from "./crumb-navigation-YnFVFqrx.js";
8
- import { n as appearanceColor, t as appearanceAbsent } from "./item-appearance-BjcMyauw.js";
9
- import "./vertical-list-1V1Vg2O5.js";
8
+ import { n as resolveKeyPath } from "./crumb-navigation-D3ndPgFg.js";
9
+ import "./vertical-list-qMRIxZIT.js";
10
10
  import { LitElement, css, html, nothing } from "lit";
11
11
  import { property, state } from "lit/decorators.js";
12
12
  //#region src/flat-list/flat-list.ts
@@ -73,6 +73,7 @@ let FlatListElement = class FlatListElement extends LitElement {
73
73
  this.branchOrder = `first`;
74
74
  this.selectionMode = `single`;
75
75
  this.interactionMode = `standard`;
76
+ this.partialKeys = /* @__PURE__ */ new Set();
76
77
  this.itemWrap = `stop`;
77
78
  this.itemsDraggable = false;
78
79
  this.itemsDroppable = false;
@@ -597,6 +598,7 @@ let FlatListElement = class FlatListElement extends LitElement {
597
598
  key-property="key"
598
599
  .selectionMode=${this.selectionMode}
599
600
  .interactionMode=${this.interactionMode}
601
+ .partialKeys=${this.partialKeys}
600
602
  .itemWrap=${this.itemWrap}
601
603
  .searchModes=${this.searchModes}
602
604
  ?items-draggable=${this.itemsDraggable}
@@ -742,6 +744,7 @@ __decorate([property({
742
744
  type: String,
743
745
  attribute: `interaction-mode`
744
746
  })], FlatListElement.prototype, "interactionMode", void 0);
747
+ __decorate([property({ attribute: false })], FlatListElement.prototype, "partialKeys", void 0);
745
748
  __decorate([property({
746
749
  type: String,
747
750
  attribute: `item-wrap`
@@ -2,16 +2,16 @@ import { t as TickledController } from "./tickled-controller-D-HZymaZ.js";
2
2
  import { n as tickledStyles, t as tickledItemStyles } from "./tickled-styles-BrAHEj1q.js";
3
3
  import { t as themeFallbacks } from "./fallbacks-DQ_5OsmR.js";
4
4
  import { n as safeCustomElement, t as __decorate } from "./decorate-VRK8rslU.js";
5
- import { c as createElementListSearchAdapter, d as createDataListSearchAdapter, i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, u as keyForElement } from "./incr-search-JIhwB49y.js";
5
+ import { c as createElementListSearchAdapter, f as createDataListSearchAdapter, i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, u as keyForElement } from "./incr-search-2YaxUUA9.js";
6
6
  import { i as resolveGroupKey, r as partitionByGroup } from "./grouping-RYPnHkrS.js";
7
7
  import { a as listItemFadeKeyframes, t as ListNativeDragController } from "./list-native-drag-controller-CcXoS0YX.js";
8
- import { r as ListDragSelectController, t as ListSelectionController } from "./list-selection-controller-5L0Nj9tR.js";
8
+ import { i as ListDragSelectController, n as gestureOf, t as ListSelectionController } from "./list-selection-controller-CJDdjH7E.js";
9
9
  import { c as keysAsFlags, f as withoutFlag, i as capFlags, l as keysToArray, o as flagsFromRecord, s as flagsToRecord, t as EMPTY_FLAGS } from "./pending-BGidHppL.js";
10
+ import { a as isPartialKey, n as appearanceColor, o as sameKeySet, r as PARTIAL_DESCRIPTION, t as appearanceAbsent } from "./item-appearance-Bl6rMIID.js";
10
11
  import { n as createScrollHoverGuard } from "./scroll-hover-guard-Cjw6179Q.js";
11
12
  import "./interaction-E-uMGHkJ.js";
12
- import { t as ViewStateController } from "./view-state-controller-BdyXWUUM.js";
13
13
  import { t as scrollFadeStyles } from "./scroll-fade-Xx28D7mH.js";
14
- import { n as appearanceColor, t as appearanceAbsent } from "./item-appearance-BjcMyauw.js";
14
+ import { t as ViewStateController } from "./view-state-controller-BdyXWUUM.js";
15
15
  import "./pan-text-CqtvjPyK.js";
16
16
  import "./list-group-header.js";
17
17
  import { LitElement, css, html, nothing } from "lit";
@@ -847,6 +847,7 @@ let GridListElement = class GridListElement extends LitElement {
847
847
  interactionMode: this.interactionMode
848
848
  }),
849
849
  getKey: (k) => k,
850
+ onIntent: (intent) => this._dispatch(`list-select-intent`, intent, true) === false,
850
851
  getGroupKey: (k) => this.groupBy === null ? null : this.#source.groupKeyOfKey(k),
851
852
  crossGroupSelection: () => this.crossGroupSelection,
852
853
  getFallbackGroupKey: () => {
@@ -940,8 +941,8 @@ let GridListElement = class GridListElement extends LitElement {
940
941
  this.#marqueeRect = rect;
941
942
  this.requestUpdate();
942
943
  },
943
- onCommit: (finalSet) => {
944
- this.selection.applyDragSelection(finalSet);
944
+ onCommit: (finalSet, info) => {
945
+ this.selection.applyDragSelection(finalSet, info);
945
946
  this.#marqueePreview = /* @__PURE__ */ new Set();
946
947
  this.#marqueeRect = void 0;
947
948
  this.requestUpdate();
@@ -968,6 +969,8 @@ let GridListElement = class GridListElement extends LitElement {
968
969
  this.#resolveKey = (key) => this.#source.indexOfKey(key) >= 0 ? key : void 0;
969
970
  this.#markedTickled = /* @__PURE__ */ new Set();
970
971
  this.#markedSelected = /* @__PURE__ */ new Set();
972
+ this.#markedPartial = /* @__PURE__ */ new Set();
973
+ this.#partialKeys = /* @__PURE__ */ new Set();
971
974
  this.#selectedSnapshot = /* @__PURE__ */ new Set();
972
975
  this.#onScroll = (e) => {
973
976
  const el = e.target;
@@ -1001,7 +1004,7 @@ let GridListElement = class GridListElement extends LitElement {
1001
1004
  if ((e.ctrlKey || e.metaKey) && e.key === `a`) {
1002
1005
  if (this.selection.canSelectAll()) {
1003
1006
  e.preventDefault();
1004
- this.selection.selectAll();
1007
+ this.selection.selectAll(`keyboard`);
1005
1008
  }
1006
1009
  return;
1007
1010
  }
@@ -1065,7 +1068,7 @@ let GridListElement = class GridListElement extends LitElement {
1065
1068
  if (id) {
1066
1069
  e.preventDefault();
1067
1070
  this.#emitItemEvent(`list-item-click`, id);
1068
- this.#onCellActivate(id);
1071
+ this.#onCellActivate(id, `keyboard`);
1069
1072
  }
1070
1073
  break;
1071
1074
  }
@@ -1079,7 +1082,7 @@ let GridListElement = class GridListElement extends LitElement {
1079
1082
  }
1080
1083
  case `Escape`:
1081
1084
  if (this.#nativeDragging) this.#clearNativeDragState();
1082
- this.selection.clear();
1085
+ this.selection.handleClear(`keyboard`);
1083
1086
  break;
1084
1087
  default: return;
1085
1088
  }
@@ -1314,6 +1317,11 @@ let GridListElement = class GridListElement extends LitElement {
1314
1317
  outline: 2px solid var(--accent);
1315
1318
  outline-offset: -2px;
1316
1319
  }
1320
+ /* Partially selected: a dashed ring, lighter than a full selection. */
1321
+ .cell.partial:not(.selected) {
1322
+ outline: 2px dashed var(--grid-list-partial-outline, var(--accent));
1323
+ outline-offset: -2px;
1324
+ }
1317
1325
  :host(:not([caption-style="separate"])) .cell.selected.tickled {
1318
1326
  background: var(--item-bg-selected-tickled);
1319
1327
  outline: 2px dashed var(--surface-3);
@@ -2007,6 +2015,7 @@ let GridListElement = class GridListElement extends LitElement {
2007
2015
  }
2008
2016
  updated(changed) {
2009
2017
  super.updated(changed);
2018
+ if (this.search?.isOpen) this.search.repaintHighlights();
2010
2019
  const pending = this.#mutationObserver?.takeRecords();
2011
2020
  const pendingAttrs = this.#itemAttrObserver?.takeRecords();
2012
2021
  if (pending !== void 0 && pending.length > 0) this.#onChildrenChanged(pending);
@@ -2488,6 +2497,24 @@ let GridListElement = class GridListElement extends LitElement {
2488
2497
  /** Light-DOM items currently carrying `data-tickled` / `data-selected`. */
2489
2498
  #markedTickled;
2490
2499
  #markedSelected;
2500
+ #markedPartial;
2501
+ #partialKeys;
2502
+ /**
2503
+ * Cells shown as *partially* selected (a part of the resource is selected):
2504
+ * `data-partial` / `part="item partial"` and an accessible description.
2505
+ * Independent of `selectedKeys` — a key in both counts as selected.
2506
+ * Replace-on-set; keys without a cell are kept for when it appears.
2507
+ */
2508
+ get partialKeys() {
2509
+ return this.#partialKeys;
2510
+ }
2511
+ set partialKeys(keys) {
2512
+ const next = new Set(keys);
2513
+ if (sameKeySet(next, this.#partialKeys)) return;
2514
+ this.#partialKeys = next;
2515
+ this._syncItemStates();
2516
+ this.requestUpdate();
2517
+ }
2491
2518
  /**
2492
2519
  * Mirror cursor / selection onto the light-DOM items as `data-tickled` /
2493
2520
  * `data-selected`. Only the items whose state changed are touched, so a
@@ -2515,6 +2542,12 @@ let GridListElement = class GridListElement extends LitElement {
2515
2542
  }
2516
2543
  this.#markedTickled = syncMarker(`data-tickled`, this.#markedTickled, tickledEl ? /* @__PURE__ */ new Set([tickledEl]) : /* @__PURE__ */ new Set());
2517
2544
  this.#markedSelected = syncMarker(`data-selected`, this.#markedSelected, selectedEls);
2545
+ const partialEls = /* @__PURE__ */ new Set();
2546
+ for (const key of this.#partialKeys) {
2547
+ const el = selected.has(key) ? void 0 : elementFor(key);
2548
+ if (el) partialEls.add(el);
2549
+ }
2550
+ this.#markedPartial = syncMarker(`data-partial`, this.#markedPartial, partialEls);
2518
2551
  this.setAttribute(`data-input-mode`, this.tickled.inputMode);
2519
2552
  }
2520
2553
  #emitSelect(selected, previous) {
@@ -2640,6 +2673,7 @@ let GridListElement = class GridListElement extends LitElement {
2640
2673
  #renderDataCell(index, win) {
2641
2674
  const key = this.#source.keyAt(index);
2642
2675
  const selected = this.#selectedSnapshot.has(key);
2676
+ const partial = isPartialKey(key, this.#partialKeys, selected);
2643
2677
  const marquee = this.#marqueePreview.has(key);
2644
2678
  const tickled = this.tickled.isTickled(key);
2645
2679
  const selectable = this.#source.isSelectable(index);
@@ -2655,10 +2689,11 @@ let GridListElement = class GridListElement extends LitElement {
2655
2689
  const icon = appearanceAbsent(rawIcon) ? void 0 : rawIcon;
2656
2690
  return html`
2657
2691
  <div
2658
- class="cell${selected ? ` selected` : ``}${tickled ? ` tickled` : ``}${marquee ? ` marquee` : ``}${this.#recycledKeys.has(key) ? ` recycled` : ``}${this.#nativeDragging && key === this.#dragOriginKey ? ` dragging-origin` : ``}"
2659
- part="item${selected ? ` selected` : ``}${tickled ? ` tickled` : ``}"
2692
+ class="cell${selected ? ` selected` : ``}${partial ? ` partial` : ``}${tickled ? ` tickled` : ``}${marquee ? ` marquee` : ``}${this.#recycledKeys.has(key) ? ` recycled` : ``}${this.#nativeDragging && key === this.#dragOriginKey ? ` dragging-origin` : ``}"
2693
+ part="item${selected ? ` selected` : ``}${partial ? ` partial` : ``}${tickled ? ` tickled` : ``}"
2660
2694
  role="option"
2661
2695
  aria-selected=${selected ? `true` : `false`}
2696
+ aria-description=${partial ? PARTIAL_DESCRIPTION : nothing}
2662
2697
  aria-setsize=${this.#source.count}
2663
2698
  aria-posinset=${index + 1}
2664
2699
  style="width:${this.itemSize}px;height:${cellHeight}px;transform:translate(${x}px,${y}px)"
@@ -2666,6 +2701,7 @@ let GridListElement = class GridListElement extends LitElement {
2666
2701
  data-key=${key}
2667
2702
  draggable=${draggable ? `true` : `false`}
2668
2703
  ?data-selected=${selected}
2704
+ ?data-partial=${partial}
2669
2705
  ?data-tickled=${tickled}
2670
2706
  ?data-marquee=${marquee}
2671
2707
  @click=${(e) => this.#onCellClick(e, key)}
@@ -2762,6 +2798,7 @@ let GridListElement = class GridListElement extends LitElement {
2762
2798
  #renderCell(el, index, win) {
2763
2799
  const key = this.#source.keyAt(index);
2764
2800
  const selected = this.#selectedSnapshot.has(key);
2801
+ const partial = isPartialKey(key, this.#partialKeys, selected);
2765
2802
  const marquee = this.#marqueePreview.has(key);
2766
2803
  const tickled = this.tickled.isTickled(key);
2767
2804
  const entering = this.#entering.has(el);
@@ -2777,10 +2814,11 @@ let GridListElement = class GridListElement extends LitElement {
2777
2814
  const captionCss = separate ? `height:${Math.max(0, this.captionHeight - 4)}px` : style === `under` ? `height:${this.captionHeight}px` : ``;
2778
2815
  return html`
2779
2816
  <div
2780
- class="cell${selected ? ` selected` : ``}${tickled ? ` tickled` : ``}${entering ? ` entering` : ``}${marquee ? ` marquee` : ``}${this.#recycledKeys.has(key) ? ` recycled` : ``}${this.#nativeDragging && key === this.#dragOriginKey ? ` dragging-origin` : ``}"
2781
- part="item${selected ? ` selected` : ``}${tickled ? ` tickled` : ``}"
2817
+ class="cell${selected ? ` selected` : ``}${partial ? ` partial` : ``}${tickled ? ` tickled` : ``}${entering ? ` entering` : ``}${marquee ? ` marquee` : ``}${this.#recycledKeys.has(key) ? ` recycled` : ``}${this.#nativeDragging && key === this.#dragOriginKey ? ` dragging-origin` : ``}"
2818
+ part="item${selected ? ` selected` : ``}${partial ? ` partial` : ``}${tickled ? ` tickled` : ``}"
2782
2819
  role="option"
2783
2820
  aria-selected=${selected ? `true` : `false`}
2821
+ aria-description=${partial ? PARTIAL_DESCRIPTION : nothing}
2784
2822
  aria-setsize=${this.#source.count}
2785
2823
  aria-posinset=${index + 1}
2786
2824
  style="width:${this.itemSize}px;height:${cellHeight}px;transform:translate(${x}px,${y}px)"
@@ -2788,6 +2826,7 @@ let GridListElement = class GridListElement extends LitElement {
2788
2826
  data-key=${key}
2789
2827
  draggable=${draggable ? `true` : `false`}
2790
2828
  ?data-selected=${selected}
2829
+ ?data-partial=${partial}
2791
2830
  ?data-tickled=${tickled}
2792
2831
  ?data-marquee=${marquee}
2793
2832
  @click=${(e) => this.#onCellClick(e, key)}
@@ -2868,7 +2907,7 @@ let GridListElement = class GridListElement extends LitElement {
2868
2907
  }
2869
2908
  #onCellClick(e, key) {
2870
2909
  if (this.#dragSelect.isDragging || this.#nativeDragging || this.#nativeDrag.isDragging || this.#postDragSuppressTimer !== 0) return;
2871
- this.selection.handleClick(key, e);
2910
+ this.selection.handleClick(key, gestureOf(e));
2872
2911
  this.#emitItemEvent(`list-item-click`, key);
2873
2912
  }
2874
2913
  /**
@@ -2881,11 +2920,10 @@ let GridListElement = class GridListElement extends LitElement {
2881
2920
  */
2882
2921
  #onViewportClick(e) {
2883
2922
  const mode = this.interactionMode;
2884
- if (mode === `manual`) return;
2885
2923
  if (this.selectionMode === `none` && mode !== `checked` && mode !== `sticky`) return;
2886
2924
  if (this.#dragSelect.isDragging || this.#nativeDragging || this.#nativeDrag.isDragging || this.#postDragSuppressTimer !== 0) return;
2887
2925
  for (const node of e.composedPath()) if (node instanceof Element && (node.classList.contains(`cell`) || node.classList.contains(`group-header`))) return;
2888
- this.selection.clear();
2926
+ this.selection.handleClear(`pointer`, true);
2889
2927
  }
2890
2928
  #startPostDragSuppressTimer() {
2891
2929
  if (this.#postDragSuppressTimer) clearTimeout(this.#postDragSuppressTimer);
@@ -2899,8 +2937,8 @@ let GridListElement = class GridListElement extends LitElement {
2899
2937
  this.toggleAttribute(`data-native-dragging`, false);
2900
2938
  this.removeAttribute(`aria-label`);
2901
2939
  }
2902
- #onCellActivate(key) {
2903
- if (this.interactionMode !== `manual`) this.selection.replace(key);
2940
+ #onCellActivate(key, source = `pointer`) {
2941
+ this.selection.handleReplace(key, source);
2904
2942
  this.#emitItemEvent(`list-activate`, key);
2905
2943
  }
2906
2944
  };