dap-design-system 0.59.2 → 0.60.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.
@@ -7,6 +7,14 @@ export type ExtendedColumnDef<T> = ColumnDef<T, unknown> & {
7
7
  textAlign?: string;
8
8
  headerTextAlign?: string;
9
9
  disableDefaultSorting?: boolean;
10
+ /**
11
+ * Pins the column to the left or right edge of the horizontally scrolling
12
+ * viewport, so it stays visible while the other columns scroll under it.
13
+ * Give a pinned column an explicit `size` — its width is what positions the
14
+ * next column pinned to the same side. Columns pinned to one side stack in
15
+ * DOM order out from that edge.
16
+ */
17
+ sticky?: 'left' | 'right';
10
18
  };
11
19
  type LoadingType = 'spinner' | 'skeleton';
12
20
  /**
@@ -68,6 +76,7 @@ type LoadingType = 'spinner' | 'skeleton';
68
76
  export default class DapDSDataTable<T> extends DdsElement {
69
77
  static readonly styles: import('lit').CSSResult;
70
78
  private readonly tableController;
79
+ private stickyOffsets;
71
80
  /** Data to display in the table */
72
81
  data: RowData[];
73
82
  /** Columns to display in the table */
@@ -78,6 +87,9 @@ export default class DapDSDataTable<T> extends DdsElement {
78
87
  * @type {boolean | ((row: Row<T>) => boolean)}
79
88
  */
80
89
  enableRowSelection: boolean | ((row: Row<T>) => boolean);
90
+ /** Pin the built-in row-selection (checkbox) column to the left edge, so it
91
+ * stays visible while the other columns scroll horizontally under it. */
92
+ stickySelectionColumn: boolean;
81
93
  /** Enable sorting on the table */
82
94
  enableSorting: boolean;
83
95
  /** Enable manual sorting on the table */
@@ -195,6 +207,8 @@ export default class DapDSDataTable<T> extends DdsElement {
195
207
  */
196
208
  disconnectedCallback(): void;
197
209
  private readonly columnsMemo;
210
+ private computeStickyOffsets;
211
+ private getStickyStyle;
198
212
  private renderHeaderCell;
199
213
  private renderHeaderCellContent;
200
214
  private getHeaderCellStyle;