@ship-ui/core 0.22.12 → 0.22.15

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 (72) hide show
  1. package/README.md +46 -0
  2. package/assets/mcp/components.json +579 -2
  3. package/bin/src/scanner.zig +9 -18
  4. package/fesm2022/ship-ui-core-sh-form-field-experimental.mjs +17 -2
  5. package/fesm2022/ship-ui-core-sh-form-field-experimental.mjs.map +1 -1
  6. package/fesm2022/ship-ui-core-ship-a11y-keybindings.mjs +433 -0
  7. package/fesm2022/ship-ui-core-ship-a11y-keybindings.mjs.map +1 -0
  8. package/fesm2022/ship-ui-core-ship-accordion.mjs +1 -0
  9. package/fesm2022/ship-ui-core-ship-accordion.mjs.map +1 -1
  10. package/fesm2022/ship-ui-core-ship-alert.mjs +3 -2
  11. package/fesm2022/ship-ui-core-ship-alert.mjs.map +1 -1
  12. package/fesm2022/ship-ui-core-ship-blueprint.mjs +14 -9
  13. package/fesm2022/ship-ui-core-ship-blueprint.mjs.map +1 -1
  14. package/fesm2022/ship-ui-core-ship-checkbox.mjs +16 -14
  15. package/fesm2022/ship-ui-core-ship-checkbox.mjs.map +1 -1
  16. package/fesm2022/ship-ui-core-ship-color-picker.mjs +3 -1
  17. package/fesm2022/ship-ui-core-ship-color-picker.mjs.map +1 -1
  18. package/fesm2022/ship-ui-core-ship-datepicker.mjs +51 -29
  19. package/fesm2022/ship-ui-core-ship-datepicker.mjs.map +1 -1
  20. package/fesm2022/ship-ui-core-ship-dialog.mjs +10 -5
  21. package/fesm2022/ship-ui-core-ship-dialog.mjs.map +1 -1
  22. package/fesm2022/ship-ui-core-ship-divider.mjs +4 -2
  23. package/fesm2022/ship-ui-core-ship-divider.mjs.map +1 -1
  24. package/fesm2022/ship-ui-core-ship-editor.mjs +2673 -0
  25. package/fesm2022/ship-ui-core-ship-editor.mjs.map +1 -0
  26. package/fesm2022/ship-ui-core-ship-icon.mjs +2 -2
  27. package/fesm2022/ship-ui-core-ship-icon.mjs.map +1 -1
  28. package/fesm2022/ship-ui-core-ship-list.mjs +4 -2
  29. package/fesm2022/ship-ui-core-ship-list.mjs.map +1 -1
  30. package/fesm2022/ship-ui-core-ship-menu.mjs +8 -5
  31. package/fesm2022/ship-ui-core-ship-menu.mjs.map +1 -1
  32. package/fesm2022/ship-ui-core-ship-popover.mjs +10 -5
  33. package/fesm2022/ship-ui-core-ship-popover.mjs.map +1 -1
  34. package/fesm2022/ship-ui-core-ship-progress-bar.mjs +5 -1
  35. package/fesm2022/ship-ui-core-ship-progress-bar.mjs.map +1 -1
  36. package/fesm2022/ship-ui-core-ship-radio.mjs +16 -14
  37. package/fesm2022/ship-ui-core-ship-radio.mjs.map +1 -1
  38. package/fesm2022/ship-ui-core-ship-select.mjs +9 -9
  39. package/fesm2022/ship-ui-core-ship-select.mjs.map +1 -1
  40. package/fesm2022/ship-ui-core-ship-sidenav.mjs +2 -2
  41. package/fesm2022/ship-ui-core-ship-sidenav.mjs.map +1 -1
  42. package/fesm2022/ship-ui-core-ship-spinner.mjs +3 -1
  43. package/fesm2022/ship-ui-core-ship-spinner.mjs.map +1 -1
  44. package/fesm2022/ship-ui-core-ship-spotlight.mjs +77 -24
  45. package/fesm2022/ship-ui-core-ship-spotlight.mjs.map +1 -1
  46. package/fesm2022/ship-ui-core-ship-table.mjs +139 -139
  47. package/fesm2022/ship-ui-core-ship-table.mjs.map +1 -1
  48. package/fesm2022/ship-ui-core-ship-theme-toggle.mjs +2 -2
  49. package/fesm2022/ship-ui-core-ship-theme-toggle.mjs.map +1 -1
  50. package/fesm2022/ship-ui-core-ship-toggle-card.mjs +24 -3
  51. package/fesm2022/ship-ui-core-ship-toggle-card.mjs.map +1 -1
  52. package/fesm2022/ship-ui-core-ship-toggle.mjs +16 -14
  53. package/fesm2022/ship-ui-core-ship-toggle.mjs.map +1 -1
  54. package/fesm2022/ship-ui-core-ship-tree.mjs +2 -2
  55. package/fesm2022/ship-ui-core-ship-tree.mjs.map +1 -1
  56. package/fesm2022/ship-ui-core-ship-virtual-scroll.mjs +2 -2
  57. package/fesm2022/ship-ui-core-ship-virtual-scroll.mjs.map +1 -1
  58. package/fesm2022/ship-ui-core.mjs +36 -23
  59. package/fesm2022/ship-ui-core.mjs.map +1 -1
  60. package/package.json +33 -2
  61. package/types/ship-ui-core-sh-form-field-experimental.d.ts +2 -0
  62. package/types/ship-ui-core-ship-a11y-keybindings.d.ts +102 -0
  63. package/types/ship-ui-core-ship-blueprint.d.ts +1 -1
  64. package/types/ship-ui-core-ship-checkbox.d.ts +2 -1
  65. package/types/ship-ui-core-ship-editor.d.ts +168 -0
  66. package/types/ship-ui-core-ship-radio.d.ts +2 -1
  67. package/types/ship-ui-core-ship-spotlight.d.ts +1 -1
  68. package/types/ship-ui-core-ship-table.d.ts +2 -0
  69. package/types/ship-ui-core-ship-toggle-card.d.ts +1 -0
  70. package/types/ship-ui-core-ship-toggle.d.ts +2 -1
  71. package/types/ship-ui-core.d.ts +3 -0
  72. package/bin/ship-fg-scanner +0 -0
@@ -1,10 +1,11 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, ElementRef, Renderer2, input, HostListener, Directive, computed, output, model, contentChild, viewChild, signal, DestroyRef, effect, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
1
  import { NgTemplateOutlet } from '@angular/common';
4
- import { ShipProgressBar } from '@ship-ui/core/ship-progress-bar';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, ElementRef, Renderer2, input, signal, HostListener, Directive, computed, output, model, contentChild, viewChild, effect, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
5
4
  import { shipComponentClasses, observeChildren } from '@ship-ui/core';
6
- import { ShipIcon } from '@ship-ui/core/ship-icon';
5
+ import { ShipA11yKeybindingsService } from '@ship-ui/core/ship-a11y-keybindings';
7
6
  import { ShipChip } from '@ship-ui/core/ship-chip';
7
+ import { ShipIcon } from '@ship-ui/core/ship-icon';
8
+ import { ShipProgressBar } from '@ship-ui/core/ship-progress-bar';
8
9
 
9
10
  class ShipResize {
10
11
  constructor() {
@@ -17,6 +18,8 @@ class ShipResize {
17
18
  ...(ngDevMode ? [{ debugName: "minWidth" }] : /* istanbul ignore next */ []));
18
19
  this.maxWidth = input(null, /* @ts-ignore */
19
20
  ...(ngDevMode ? [{ debugName: "maxWidth" }] : /* istanbul ignore next */ []));
21
+ this.resizingClass = signal(false, /* @ts-ignore */
22
+ ...(ngDevMode ? [{ debugName: "resizingClass" }] : /* istanbul ignore next */ []));
20
23
  this.#resizing = false;
21
24
  this.#animationFrameRequest = null; // Store request ID
22
25
  }
@@ -47,11 +50,15 @@ class ShipResize {
47
50
  onMouseUp(event) {
48
51
  if (this.#resizing) {
49
52
  this.#resizing = false;
50
- this.#table.resizing.set(false);
53
+ this.resizingClass.set(false);
51
54
  if (this.#animationFrameRequest !== null) {
52
55
  cancelAnimationFrame(this.#animationFrameRequest);
53
56
  this.#animationFrameRequest = null;
54
57
  }
58
+ // Delay resetting the table's resizing state to block sorting clicks immediately after resizing
59
+ setTimeout(() => {
60
+ this.#table.resizing.set(false);
61
+ }, 50);
55
62
  }
56
63
  }
57
64
  onClick(event) {
@@ -65,6 +72,7 @@ class ShipResize {
65
72
  return;
66
73
  this.#table.resizing.set(true);
67
74
  this.#resizing = true;
75
+ this.resizingClass.set(true);
68
76
  this.#startX = event.pageX;
69
77
  this.#startWidth = this.#el.nativeElement.offsetWidth;
70
78
  }
@@ -89,13 +97,16 @@ class ShipResize {
89
97
  }
90
98
  }
91
99
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ShipResize, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
92
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.0", type: ShipResize, isStandalone: true, selector: "[shResize]", inputs: { resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:mousemove": "onMouseMove($event)", "document:mouseup": "onMouseUp($event)", "document:click": "onClick($event)" } }, ngImport: i0 }); }
100
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.0", type: ShipResize, isStandalone: true, selector: "[shResize]", inputs: { resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:mousemove": "onMouseMove($event)", "document:mouseup": "onMouseUp($event)", "document:click": "onClick($event)" }, properties: { "class.resizing": "resizingClass()" } }, ngImport: i0 }); }
93
101
  }
94
102
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ShipResize, decorators: [{
95
103
  type: Directive,
96
104
  args: [{
97
105
  selector: '[shResize]',
98
106
  standalone: true,
107
+ host: {
108
+ '[class.resizing]': 'resizingClass()',
109
+ },
99
110
  }]
100
111
  }], propDecorators: { resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], onMouseMove: [{
101
112
  type: HostListener,
@@ -110,6 +121,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
110
121
  class ShipSort {
111
122
  constructor() {
112
123
  this.#table = inject(ShipTable);
124
+ this.#keybindings = inject(ShipA11yKeybindingsService);
113
125
  this.shSort = input(/* @ts-ignore */
114
126
  ...(ngDevMode ? [undefined, { debugName: "shSort" }] : /* istanbul ignore next */ []));
115
127
  this.sortAsc = computed(() => {
@@ -138,17 +150,26 @@ class ShipSort {
138
150
  ...(ngDevMode ? [{ debugName: "ariaSort" }] : /* istanbul ignore next */ []));
139
151
  }
140
152
  #table;
153
+ #keybindings;
154
+ onKeyDown(event) {
155
+ if (this.shSort() && this.#keybindings.matches(event, 'table.sort')) {
156
+ this.toggleSort(event);
157
+ }
158
+ }
141
159
  toggleSort(event) {
142
160
  if (event) {
143
161
  event.preventDefault();
144
162
  }
163
+ if (this.#table.resizing()) {
164
+ return;
165
+ }
145
166
  const sortCol = this.shSort();
146
167
  if (!sortCol)
147
168
  return;
148
169
  this.#table.toggleSort(sortCol);
149
170
  }
150
171
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ShipSort, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
151
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.0", type: ShipSort, isStandalone: true, selector: "[shSort]", inputs: { shSort: { classPropertyName: "shSort", publicName: "shSort", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "columnheader" }, listeners: { "click": "shSort() ? toggleSort() : null", "keydown.enter": "shSort() ? toggleSort() : null", "keydown.space": "shSort() ? toggleSort($event) : null" }, properties: { "class.sortable": "!!shSort()", "attr.tabindex": "shSort() ? \"0\" : null", "attr.aria-sort": "shSort() ? ariaSort() : null", "class.sort-asc": "sortAsc()", "class.sort-desc": "sortDesc()" } }, ngImport: i0 }); }
172
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.0", type: ShipSort, isStandalone: true, selector: "[shSort]", inputs: { shSort: { classPropertyName: "shSort", publicName: "shSort", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "columnheader" }, listeners: { "click": "shSort() ? toggleSort() : null", "keydown": "onKeyDown($event)" }, properties: { "class.sortable": "!!shSort()", "attr.tabindex": "shSort() ? \"0\" : null", "attr.aria-sort": "shSort() ? ariaSort() : null", "class.sort-asc": "sortAsc()", "class.sort-desc": "sortDesc()" } }, ngImport: i0 }); }
152
173
  }
153
174
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ShipSort, decorators: [{
154
175
  type: Directive,
@@ -156,18 +177,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
156
177
  selector: '[shSort]',
157
178
  standalone: true,
158
179
  host: {
159
- 'role': 'columnheader',
180
+ role: 'columnheader',
160
181
  '[class.sortable]': '!!shSort()',
161
182
  '[attr.tabindex]': 'shSort() ? "0" : null',
162
183
  '(click)': 'shSort() ? toggleSort() : null',
163
- '(keydown.enter)': 'shSort() ? toggleSort() : null',
164
- '(keydown.space)': 'shSort() ? toggleSort($event) : null',
165
184
  '[attr.aria-sort]': 'shSort() ? ariaSort() : null',
166
185
  '[class.sort-asc]': 'sortAsc()',
167
186
  '[class.sort-desc]': 'sortDesc()',
168
187
  },
169
188
  }]
170
- }], propDecorators: { shSort: [{ type: i0.Input, args: [{ isSignal: true, alias: "shSort", required: false }] }] } });
189
+ }], propDecorators: { shSort: [{ type: i0.Input, args: [{ isSignal: true, alias: "shSort", required: false }] }], onKeyDown: [{
190
+ type: HostListener,
191
+ args: ['keydown', ['$event']]
192
+ }] } });
171
193
  class ShipStickyColumns {
172
194
  constructor() {
173
195
  this.#elementRef = inject(ElementRef);
@@ -236,26 +258,18 @@ class ShipTable {
236
258
  this.columns = observeChildren(this.thead, ['tr:first-child th']);
237
259
  this.stickyHeaderHeight = signal(0, /* @ts-ignore */
238
260
  ...(ngDevMode ? [{ debugName: "stickyHeaderHeight" }] : /* istanbul ignore next */ []));
239
- this.#destroyRef = inject(DestroyRef);
240
- this.#resizeObserver = null;
241
- this.theadEffect = effect(() => {
261
+ this.theadEffect = effect((onCleanup) => {
242
262
  const head = this.thead()?.nativeElement;
243
- if (this.#resizeObserver) {
244
- this.#resizeObserver.disconnect();
245
- this.#resizeObserver = null;
246
- }
247
263
  if (head && typeof ResizeObserver !== 'undefined') {
248
- this.#resizeObserver = new ResizeObserver((entries) => {
264
+ const observer = new ResizeObserver((entries) => {
249
265
  const height = head.clientHeight;
250
266
  this.stickyHeaderHeight.set(height);
251
267
  });
252
- this.#resizeObserver.observe(head);
268
+ observer.observe(head);
269
+ onCleanup(() => observer.disconnect());
253
270
  }
254
271
  }, /* @ts-ignore */
255
272
  ...(ngDevMode ? [{ debugName: "theadEffect" }] : /* istanbul ignore next */ []));
256
- this.#cleanup = this.#destroyRef.onDestroy(() => {
257
- this.#resizeObserver?.disconnect();
258
- });
259
273
  this.bodyEffect = effect(() => {
260
274
  const body = this.tbody()?.nativeElement;
261
275
  const head = this.thead()?.nativeElement;
@@ -320,24 +334,33 @@ class ShipTable {
320
334
  }
321
335
  const column = sortByColumn.startsWith('-') ? sortByColumn.slice(1) : sortByColumn;
322
336
  const isDescending = sortByColumn.startsWith('-');
323
- const sortedData = this.data().sort((a, b) => {
324
- const colConfig = this.content()?.columns()?.find((c) => c.id === column);
337
+ const currentData = this.data();
338
+ const sortedData = [...currentData].sort((a, b) => {
339
+ const colConfig = this.content()
340
+ ?.columns()
341
+ ?.find((c) => c.id === column);
325
342
  if (colConfig?.sortPredicate) {
326
343
  const predicateResult = colConfig.sortPredicate(a, b);
327
344
  return isDescending ? -predicateResult : predicateResult;
328
345
  }
329
- const valueA = a[column];
330
- const valueB = b[column];
346
+ const valueA = colConfig ? this.content()?.getValue(a, colConfig) : a[column];
347
+ const valueB = colConfig ? this.content()?.getValue(b, colConfig) : b[column];
348
+ const aNull = valueA === null || valueA === undefined;
349
+ const bNull = valueB === null || valueB === undefined;
350
+ if (aNull && bNull)
351
+ return 0;
352
+ if (aNull)
353
+ return 1;
354
+ if (bNull)
355
+ return -1;
331
356
  let comparison = 0;
332
357
  if (colConfig?.type === 'date') {
333
- const dateA = valueA ? new Date(valueA).getTime() : 0;
334
- const dateB = valueB ? new Date(valueB).getTime() : 0;
335
- comparison = dateA - dateB;
358
+ const dateA = new Date(valueA).getTime();
359
+ const dateB = new Date(valueB).getTime();
360
+ comparison = isNaN(dateA) || isNaN(dateB) ? 0 : dateA - dateB;
336
361
  }
337
362
  else if (colConfig?.type === 'number') {
338
- const numA = Number(valueA) || 0;
339
- const numB = Number(valueB) || 0;
340
- comparison = numA - numB;
363
+ comparison = Number(valueA) - Number(valueB);
341
364
  }
342
365
  else if (colConfig?.type === 'boolean') {
343
366
  const boolA = valueA ? 1 : 0;
@@ -345,9 +368,7 @@ class ShipTable {
345
368
  comparison = boolA - boolB;
346
369
  }
347
370
  else if (colConfig?.type === 'string' || colConfig?.type === 'badge') {
348
- const strA = (valueA ?? '').toString();
349
- const strB = (valueB ?? '').toString();
350
- comparison = strA.localeCompare(strB, undefined, { sensitivity: 'base' });
371
+ comparison = valueA.toString().localeCompare(valueB.toString(), undefined, { sensitivity: 'base' });
351
372
  }
352
373
  else {
353
374
  if (typeof valueA === 'number' && typeof valueB === 'number') {
@@ -362,14 +383,22 @@ class ShipTable {
362
383
  }
363
384
  return isDescending ? -comparison : comparison;
364
385
  });
365
- this.dataChange.emit(sortedData);
386
+ let changed = sortedData.length !== currentData.length;
387
+ if (!changed) {
388
+ for (let i = 0; i < sortedData.length; i++) {
389
+ if (sortedData[i] !== currentData[i]) {
390
+ changed = true;
391
+ break;
392
+ }
393
+ }
394
+ }
395
+ if (changed) {
396
+ this.dataChange.emit(sortedData);
397
+ }
366
398
  }, /* @ts-ignore */
367
399
  ...(ngDevMode ? [{ debugName: "e" }] : /* istanbul ignore next */ []));
368
400
  }
369
401
  #el;
370
- #destroyRef;
371
- #resizeObserver;
372
- #cleanup;
373
402
  #initialData;
374
403
  #initialDataSet;
375
404
  updateColumnSizes() {
@@ -451,7 +480,7 @@ class ShipTable {
451
480
  <ng-content select="[table-no-rows]" />
452
481
  </div>
453
482
  }
454
- `, isInline: true, styles: ["sh-table{--table-bc: var(--base-4);--table-th-bg: var(--base-2);--table-tr-bg: var(--base-1);--table-td-bg: var(--base-1);--table-th-c: var(--base-8);--table-th-f: var(--paragraph-30);--table-td-c: var(--base-8);--table-td-f: var(--paragraph-30);--table-th-p: 0 1.25rem;--table-td-p: 0 1.25rem;--table-th-mh: 3rem;--table-td-mh: 4.875rem;--table-th-g: .25rem;--table-td-g: .5rem;--table-ws: nowrap;--table-th-bw: 0;--table-td-bw: .0625rem 0 0;--table-columns: 1fr 1fr 1fr max-content;--table-sticky-bw: .0625rem}sh-table.type-a tbody>th,sh-table.type-a tbody>td,sh-table.type-a thead>th,sh-table.type-a thead>td{padding-right:0}sh-table.type-a tbody>th:first-child,sh-table.type-a tbody>td:first-child,sh-table.type-a thead>th:first-child,sh-table.type-a thead>td:first-child{padding:0}sh-table.type-b{--table-th-p: 0 .75rem;--table-td-p: 0 .75rem;--table-th-mh: 2.25rem;--table-td-mh: 3.5rem;--table-th-bw: .0625rem 0 .0625rem .0625rem;--table-td-bw: 0 0 .0625rem .0625rem;--table-sticky-bw: .0625rem}sh-table.type-b th:first-child{border-left-width:0;padding:var(--table-th-p)}sh-table.type-b td:first-child{border-left-width:0;padding:var(--table-td-p)}sh-table.type-b td.sticky,sh-table.type-b th.sticky{border-left-width:0;border-right:var(--table-sticky-bw) solid var(--table-bc)}sh-table.type-b [shStickyColumns] th,sh-table.type-b [shStickyColumns] td{border-right:var(--table-sticky-bw) solid var(--table-bc)}sh-table.type-b th.sticky-end,sh-table.type-b td.sticky-end,sh-table.type-b [shStickyColumns=end] th,sh-table.type-b [shStickyColumns=end] td{border-left:var(--table-sticky-bw) solid var(--table-bc);border-right:0}sh-table.type-b .sticky+th,sh-table.type-b .sticky+td,sh-table.type-b [shStickyColumns]+th,sh-table.type-b [shStickyColumns]+td{border-left-width:0}sh-table.type-b tr:hover td{background-color:var(--base-2)}sh-table.type-b div[table-header] tr:first-child th{border-bottom:0}sh-table.type-b tbody tr:last-child td{border-bottom-width:0}sh-table.type-b .actionbar{background-color:var(--base-2);border-width:.0625rem 0 0}sh-table{width:100%;display:grid;overflow:auto;overscroll-behavior-x:none;grid-template-columns:var(--table-columns);position:relative;container-type:inline-size}sh-table.resizing{-webkit-user-select:none;user-select:none}sh-table:has([shTableResize]) td{overflow:auto}sh-table.no-resize .sh-resizer{display:none}sh-table.no-resize td{overflow:initial}sh-table .actionbar{display:flex;align-items:center;gap:.5rem;grid-column:1/-1;position:sticky;left:0;z-index:10;background-color:var(--base-1);width:100cqw;box-sizing:border-box;padding:.5rem;border:var(--border-10);border-width:.0625rem 0;opacity:1;transition:padding .3s ease-out,border-width .3s ease-out,opacity .3s ease-out;overflow:hidden}sh-table .actionbar:empty,sh-table .actionbar:not(:has(>:not(.actionbar-right))):has(>.actionbar-right:empty){display:none}sh-table .actionbar>*{min-height:0}sh-table .actionbar .actionbar-right{display:flex;align-items:center;gap:.5rem;margin-left:auto;flex-shrink:0}sh-table .actionbar .actionbar-right:empty{display:none}sh-table tbody{position:relative}sh-table tbody:has(tr.sticky){position:sticky;top:0;z-index:1}sh-table thead{position:relative}sh-table thead:has(tr.sticky){position:sticky;top:0;z-index:2}sh-table sh-progress-bar{grid-column:1/-1;position:absolute;top:100%;transform:translateY(-50%);z-index:200}sh-table tbody,sh-table thead,sh-table tr{display:grid;grid-column:1/-1;grid-template-columns:subgrid}sh-table tr{background:var(--table-tr-bg);position:relative;z-index:0}sh-table tr.sticky{position:sticky;top:0;z-index:1}sh-table tr.sticky-end{position:sticky;bottom:0;z-index:3}sh-table tr:has(th.sticky-end) th:nth-last-child(2){padding:var(--table-th-p)}sh-table tr:has(td.sticky-end) td:nth-last-child(2){padding:var(--table-td-p)}sh-table th{display:flex;align-items:center;padding:var(--table-th-p);min-height:var(--table-th-mh);font:var(--table-th-f);line-height:1em;white-space:var(--table-ws);color:var(--table-th-c);border:0;border-color:var(--table-bc);border-style:solid;border-width:var(--table-th-bw);background:var(--table-th-bg);gap:var(--table-th-g);z-index:100}sh-table th:has(.sh-resizer){position:relative}sh-table th.sortable{--caret-color: var(--base-10);--caret-size: .375rem;cursor:pointer;-webkit-user-select:none;user-select:none}sh-table th.sortable sh-icon{opacity:.35;transition:opacity 125ms ease-in-out}sh-table th.sortable:hover sh-icon{opacity:.7}sh-table th.sortable.sort-asc sh-icon,sh-table th.sortable.sort-desc sh-icon{opacity:1}sh-table th.sortable:not(:has(sh-icon)):after{content:\"\";border:var(--caret-size) solid transparent;width:0;height:0;opacity:0;transition:opacity 125ms ease-in-out}sh-table th.sortable:not(:has(sh-icon)).sort-desc:after{opacity:1;transform:translateY(-4px);border-bottom-color:var(--caret-color)}sh-table th.sortable:not(:has(sh-icon)).sort-asc:after{opacity:1;transform:translateY(4px);border-top-color:var(--caret-color)}sh-table th .sh-resizer{width:10px;height:100%;position:absolute;top:0;right:0;cursor:col-resize}sh-table th .sh-resizer:before,sh-table th .sh-resizer:after{content:\"\";position:absolute;top:50%;transform:translateY(-50%);height:.75rem;right:.1875rem;width:.0625rem;background-color:var(--base-4)}sh-table th .sh-resizer:hover:before,sh-table th .sh-resizer:hover:after{background-color:var(--primary-8)}sh-table th .sh-resizer:before{left:.1875rem}sh-table td{display:flex;align-items:center;padding:var(--table-td-p);min-height:var(--table-td-mh);gap:var(--table-td-g);color:var(--table-td-c);font:var(--table-td-f);white-space:var(--table-ws);border-color:var(--table-bc);border-style:solid;border-width:var(--table-td-bw);background:var(--table-td-bg)}sh-table td+td.sticky-end:last-child{padding:var(--table-td-p)}sh-table th.sticky,sh-table th.sticky-end,sh-table td.sticky,sh-table td.sticky-end{position:sticky;overflow:hidden;right:auto;left:0;z-index:1;padding:var(--table-td-p)}sh-table th.sticky:first-child,sh-table th.sticky-end:first-child,sh-table td.sticky:first-child,sh-table td.sticky-end:first-child{padding:var(--table-th-p)}sh-table th.sticky-end,sh-table td.sticky-end{right:0;left:auto}sh-table th.sticky,sh-table th.sticky-end{background:var(--base-1);padding:var(--table-th-p);z-index:101}sh-table th.sticky:first-child,sh-table th.sticky-end:first-child{padding:var(--table-th-p)}sh-table [shStickyColumns]{display:grid;grid-template-columns:subgrid;position:sticky;left:0;z-index:1000;border:0;border-color:var(--table-bc);border-style:solid}sh-table [shStickyColumns] th{background-color:var(--base-1)}sh-table [shStickyColumns=end]{left:auto;right:0}sh-table .span-all{grid-column:1/-1;white-space:initial;align-items:flex-start;padding:0;border-left-width:0;position:sticky;left:0;width:100cqw;box-sizing:border-box}sh-table .no-rows{display:none;grid-column:1/-1}sh-table tbody:empty+.no-rows{display:block}\n"], dependencies: [{ kind: "component", type: ShipProgressBar, selector: "sh-progress-bar", inputs: ["value", "color", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
483
+ `, isInline: true, styles: ["sh-table{--table-bc: var(--base-4);--table-th-bg: var(--base-2);--table-tr-bg: var(--base-1);--table-td-bg: var(--base-1);--table-th-c: var(--base-8);--table-th-f: var(--paragraph-30);--table-td-c: var(--base-8);--table-td-f: var(--paragraph-30);--table-th-p: 0 1.25rem;--table-td-p: 0 1.25rem;--table-th-mh: 3rem;--table-td-mh: 4.875rem;--table-th-g: .25rem;--table-td-g: .5rem;--table-ws: nowrap;--table-th-bw: 0;--table-td-bw: .0625rem 0 0;--table-columns: 1fr 1fr 1fr max-content;--table-sticky-bw: .0625rem}sh-table.type-a tbody>th,sh-table.type-a tbody>td,sh-table.type-a thead>th,sh-table.type-a thead>td{padding-right:0}sh-table.type-a tbody>th:first-child,sh-table.type-a tbody>td:first-child,sh-table.type-a thead>th:first-child,sh-table.type-a thead>td:first-child{padding:0}sh-table.type-b{--table-th-p: 0 .75rem;--table-td-p: 0 .75rem;--table-th-mh: 2.25rem;--table-td-mh: 3.5rem;--table-th-bw: .0625rem 0 .0625rem .0625rem;--table-td-bw: 0 0 .0625rem .0625rem;--table-sticky-bw: .0625rem}sh-table.type-b th:first-child{border-left-width:0;padding:var(--table-th-p)}sh-table.type-b td:first-child{border-left-width:0;padding:var(--table-td-p)}sh-table.type-b td.sticky,sh-table.type-b th.sticky{border-left-width:0;border-right:var(--table-sticky-bw) solid var(--table-bc)}sh-table.type-b [shStickyColumns] th,sh-table.type-b [shStickyColumns] td{border-right:var(--table-sticky-bw) solid var(--table-bc)}sh-table.type-b th.sticky-end,sh-table.type-b td.sticky-end,sh-table.type-b [shStickyColumns=end] th,sh-table.type-b [shStickyColumns=end] td{border-left:var(--table-sticky-bw) solid var(--table-bc);border-right:0}sh-table.type-b .sticky+th,sh-table.type-b .sticky+td,sh-table.type-b [shStickyColumns]+th,sh-table.type-b [shStickyColumns]+td{border-left-width:0}sh-table.type-b tr:hover td{background-color:var(--base-2)}sh-table.type-b div[table-header] tr:first-child th{border-bottom:0}sh-table.type-b tbody tr:last-child td{border-bottom-width:0}sh-table.type-b .actionbar{background-color:var(--base-2);border-width:.0625rem 0 0}sh-table{width:100%;display:grid;overflow:auto;overscroll-behavior-x:none;grid-template-columns:var(--table-columns);position:relative;container-type:inline-size}sh-table.resizing{-webkit-user-select:none;user-select:none}sh-table:has([shTableResize]) td{overflow:auto}sh-table.no-resize .sh-resizer{display:none}sh-table.no-resize td{overflow:initial}sh-table .actionbar{display:flex;align-items:center;gap:.5rem;grid-column:1/-1;position:sticky;left:0;z-index:10;background-color:var(--base-1);width:100cqw;box-sizing:border-box;padding:.5rem;border:var(--border-10);border-width:.0625rem 0;opacity:1;transition:padding .3s ease-out,border-width .3s ease-out,opacity .3s ease-out;overflow:hidden}sh-table .actionbar:empty,sh-table .actionbar:not(:has(>:not(.actionbar-right))):has(>.actionbar-right:empty){display:none}sh-table .actionbar>*{min-height:0}sh-table .actionbar .actionbar-right{display:flex;align-items:center;gap:.5rem;margin-left:auto;flex-shrink:0}sh-table .actionbar .actionbar-right:empty{display:none}sh-table tbody{position:relative}sh-table tbody:has(tr.sticky){position:sticky;top:0;z-index:1}sh-table thead{position:relative}sh-table thead:has(tr.sticky){position:sticky;top:0;z-index:2}sh-table sh-progress-bar{grid-column:1/-1;position:absolute;top:100%;transform:translateY(-50%);z-index:200}sh-table tbody,sh-table thead,sh-table tr{display:grid;grid-column:1/-1;grid-template-columns:subgrid}sh-table tr{background:var(--table-tr-bg);position:relative;z-index:0}sh-table tr.sticky{position:sticky;top:0;z-index:1}sh-table tr.sticky-end{position:sticky;bottom:0;z-index:3}sh-table tr:has(th.sticky-end) th:nth-last-child(2){padding:var(--table-th-p)}sh-table tr:has(td.sticky-end) td:nth-last-child(2){padding:var(--table-td-p)}sh-table th{display:flex;align-items:center;padding:var(--table-th-p);min-height:var(--table-th-mh);font:var(--table-th-f);line-height:1em;white-space:var(--table-ws);color:var(--table-th-c);border:0;border-color:var(--table-bc);border-style:solid;border-width:var(--table-th-bw);background:var(--table-th-bg);gap:var(--table-th-g);z-index:auto}sh-table th:hover,sh-table th.resizing{z-index:120}sh-table th:has(.sh-resizer){position:relative}sh-table th.sortable{--caret-color: var(--base-10);--caret-size: .375rem;cursor:pointer;-webkit-user-select:none;user-select:none}sh-table th.sortable sh-icon{opacity:.35;transition:opacity 125ms ease-in-out}sh-table th.sortable:hover sh-icon{opacity:.7}sh-table th.sortable.sort-asc sh-icon,sh-table th.sortable.sort-desc sh-icon{opacity:1}sh-table th.sortable:not(:has(sh-icon)):after{content:\"\";border:var(--caret-size) solid transparent;width:0;height:0;opacity:0;transition:opacity 125ms ease-in-out}sh-table th.sortable:not(:has(sh-icon)).sort-desc:after{opacity:1;transform:translateY(-4px);border-bottom-color:var(--caret-color)}sh-table th.sortable:not(:has(sh-icon)).sort-asc:after{opacity:1;transform:translateY(4px);border-top-color:var(--caret-color)}sh-table th .sh-resizer{width:.75rem;height:100%;position:absolute;top:0;right:-.375rem;cursor:col-resize;z-index:110}sh-table th .sh-resizer:after{content:\"\";position:absolute;top:.3125rem;bottom:.3125rem;border-radius:.125rem;right:.3125rem;width:.1875rem;background-color:var(--base-4);transition:width .15s ease,background-color .15s ease,right .15s ease}sh-table th .sh-resizer:hover:after{width:.3125rem;right:.1875rem;background-color:var(--primary-8)}sh-table th.resizing .sh-resizer:after{width:.3125rem;right:.1875rem;background-color:var(--primary-8)}sh-table td{display:flex;align-items:center;padding:var(--table-td-p);min-height:var(--table-td-mh);gap:var(--table-td-g);color:var(--table-td-c);font:var(--table-td-f);white-space:var(--table-ws);border-color:var(--table-bc);border-style:solid;border-width:var(--table-td-bw);background:var(--table-td-bg)}sh-table td+td.sticky-end:last-child{padding:var(--table-td-p)}sh-table th.sticky,sh-table th.sticky-end,sh-table td.sticky,sh-table td.sticky-end{position:sticky;overflow:hidden;right:auto;left:0;z-index:1;padding:var(--table-td-p)}sh-table th.sticky:first-child,sh-table th.sticky-end:first-child,sh-table td.sticky:first-child,sh-table td.sticky-end:first-child{padding:var(--table-th-p)}sh-table th.sticky-end,sh-table td.sticky-end{right:0;left:auto}sh-table th.sticky,sh-table th.sticky-end{background:var(--base-1);padding:var(--table-th-p);z-index:101}sh-table th.sticky:first-child,sh-table th.sticky-end:first-child{padding:var(--table-th-p)}sh-table [shStickyColumns]{display:grid;grid-template-columns:subgrid;position:sticky;left:0;z-index:1000;border:0;border-color:var(--table-bc);border-style:solid}sh-table [shStickyColumns] th{background-color:var(--base-1)}sh-table [shStickyColumns=end]{left:auto;right:0}sh-table .span-all{grid-column:1/-1;white-space:initial;align-items:flex-start;padding:0;border-left-width:0;position:sticky;left:0;width:100cqw;box-sizing:border-box}sh-table .no-rows{display:none;grid-column:1/-1}sh-table tbody:empty+.no-rows{display:block}\n"], dependencies: [{ kind: "component", type: ShipProgressBar, selector: "sh-progress-bar", inputs: ["value", "color", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
455
484
  }
456
485
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ShipTable, decorators: [{
457
486
  type: Component,
@@ -486,7 +515,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
486
515
  </div>
487
516
  }
488
517
  `, changeDetection: ChangeDetectionStrategy.OnPush, host: {
489
- 'role': 'table',
518
+ role: 'table',
490
519
  '[attr.aria-busy]': 'loading()',
491
520
  '[attr.aria-label]': 'ariaLabel()',
492
521
  '[attr.aria-labelledby]': 'ariaLabelledby()',
@@ -500,7 +529,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
500
529
  '[class.scrolled-x-end]': 'scrollXState() === 1',
501
530
  '[class.scrolled-y]': 'scrollYState() >= 0',
502
531
  '[class.scrolled-y-end]': 'scrollYState() === 1',
503
- }, styles: ["sh-table{--table-bc: var(--base-4);--table-th-bg: var(--base-2);--table-tr-bg: var(--base-1);--table-td-bg: var(--base-1);--table-th-c: var(--base-8);--table-th-f: var(--paragraph-30);--table-td-c: var(--base-8);--table-td-f: var(--paragraph-30);--table-th-p: 0 1.25rem;--table-td-p: 0 1.25rem;--table-th-mh: 3rem;--table-td-mh: 4.875rem;--table-th-g: .25rem;--table-td-g: .5rem;--table-ws: nowrap;--table-th-bw: 0;--table-td-bw: .0625rem 0 0;--table-columns: 1fr 1fr 1fr max-content;--table-sticky-bw: .0625rem}sh-table.type-a tbody>th,sh-table.type-a tbody>td,sh-table.type-a thead>th,sh-table.type-a thead>td{padding-right:0}sh-table.type-a tbody>th:first-child,sh-table.type-a tbody>td:first-child,sh-table.type-a thead>th:first-child,sh-table.type-a thead>td:first-child{padding:0}sh-table.type-b{--table-th-p: 0 .75rem;--table-td-p: 0 .75rem;--table-th-mh: 2.25rem;--table-td-mh: 3.5rem;--table-th-bw: .0625rem 0 .0625rem .0625rem;--table-td-bw: 0 0 .0625rem .0625rem;--table-sticky-bw: .0625rem}sh-table.type-b th:first-child{border-left-width:0;padding:var(--table-th-p)}sh-table.type-b td:first-child{border-left-width:0;padding:var(--table-td-p)}sh-table.type-b td.sticky,sh-table.type-b th.sticky{border-left-width:0;border-right:var(--table-sticky-bw) solid var(--table-bc)}sh-table.type-b [shStickyColumns] th,sh-table.type-b [shStickyColumns] td{border-right:var(--table-sticky-bw) solid var(--table-bc)}sh-table.type-b th.sticky-end,sh-table.type-b td.sticky-end,sh-table.type-b [shStickyColumns=end] th,sh-table.type-b [shStickyColumns=end] td{border-left:var(--table-sticky-bw) solid var(--table-bc);border-right:0}sh-table.type-b .sticky+th,sh-table.type-b .sticky+td,sh-table.type-b [shStickyColumns]+th,sh-table.type-b [shStickyColumns]+td{border-left-width:0}sh-table.type-b tr:hover td{background-color:var(--base-2)}sh-table.type-b div[table-header] tr:first-child th{border-bottom:0}sh-table.type-b tbody tr:last-child td{border-bottom-width:0}sh-table.type-b .actionbar{background-color:var(--base-2);border-width:.0625rem 0 0}sh-table{width:100%;display:grid;overflow:auto;overscroll-behavior-x:none;grid-template-columns:var(--table-columns);position:relative;container-type:inline-size}sh-table.resizing{-webkit-user-select:none;user-select:none}sh-table:has([shTableResize]) td{overflow:auto}sh-table.no-resize .sh-resizer{display:none}sh-table.no-resize td{overflow:initial}sh-table .actionbar{display:flex;align-items:center;gap:.5rem;grid-column:1/-1;position:sticky;left:0;z-index:10;background-color:var(--base-1);width:100cqw;box-sizing:border-box;padding:.5rem;border:var(--border-10);border-width:.0625rem 0;opacity:1;transition:padding .3s ease-out,border-width .3s ease-out,opacity .3s ease-out;overflow:hidden}sh-table .actionbar:empty,sh-table .actionbar:not(:has(>:not(.actionbar-right))):has(>.actionbar-right:empty){display:none}sh-table .actionbar>*{min-height:0}sh-table .actionbar .actionbar-right{display:flex;align-items:center;gap:.5rem;margin-left:auto;flex-shrink:0}sh-table .actionbar .actionbar-right:empty{display:none}sh-table tbody{position:relative}sh-table tbody:has(tr.sticky){position:sticky;top:0;z-index:1}sh-table thead{position:relative}sh-table thead:has(tr.sticky){position:sticky;top:0;z-index:2}sh-table sh-progress-bar{grid-column:1/-1;position:absolute;top:100%;transform:translateY(-50%);z-index:200}sh-table tbody,sh-table thead,sh-table tr{display:grid;grid-column:1/-1;grid-template-columns:subgrid}sh-table tr{background:var(--table-tr-bg);position:relative;z-index:0}sh-table tr.sticky{position:sticky;top:0;z-index:1}sh-table tr.sticky-end{position:sticky;bottom:0;z-index:3}sh-table tr:has(th.sticky-end) th:nth-last-child(2){padding:var(--table-th-p)}sh-table tr:has(td.sticky-end) td:nth-last-child(2){padding:var(--table-td-p)}sh-table th{display:flex;align-items:center;padding:var(--table-th-p);min-height:var(--table-th-mh);font:var(--table-th-f);line-height:1em;white-space:var(--table-ws);color:var(--table-th-c);border:0;border-color:var(--table-bc);border-style:solid;border-width:var(--table-th-bw);background:var(--table-th-bg);gap:var(--table-th-g);z-index:100}sh-table th:has(.sh-resizer){position:relative}sh-table th.sortable{--caret-color: var(--base-10);--caret-size: .375rem;cursor:pointer;-webkit-user-select:none;user-select:none}sh-table th.sortable sh-icon{opacity:.35;transition:opacity 125ms ease-in-out}sh-table th.sortable:hover sh-icon{opacity:.7}sh-table th.sortable.sort-asc sh-icon,sh-table th.sortable.sort-desc sh-icon{opacity:1}sh-table th.sortable:not(:has(sh-icon)):after{content:\"\";border:var(--caret-size) solid transparent;width:0;height:0;opacity:0;transition:opacity 125ms ease-in-out}sh-table th.sortable:not(:has(sh-icon)).sort-desc:after{opacity:1;transform:translateY(-4px);border-bottom-color:var(--caret-color)}sh-table th.sortable:not(:has(sh-icon)).sort-asc:after{opacity:1;transform:translateY(4px);border-top-color:var(--caret-color)}sh-table th .sh-resizer{width:10px;height:100%;position:absolute;top:0;right:0;cursor:col-resize}sh-table th .sh-resizer:before,sh-table th .sh-resizer:after{content:\"\";position:absolute;top:50%;transform:translateY(-50%);height:.75rem;right:.1875rem;width:.0625rem;background-color:var(--base-4)}sh-table th .sh-resizer:hover:before,sh-table th .sh-resizer:hover:after{background-color:var(--primary-8)}sh-table th .sh-resizer:before{left:.1875rem}sh-table td{display:flex;align-items:center;padding:var(--table-td-p);min-height:var(--table-td-mh);gap:var(--table-td-g);color:var(--table-td-c);font:var(--table-td-f);white-space:var(--table-ws);border-color:var(--table-bc);border-style:solid;border-width:var(--table-td-bw);background:var(--table-td-bg)}sh-table td+td.sticky-end:last-child{padding:var(--table-td-p)}sh-table th.sticky,sh-table th.sticky-end,sh-table td.sticky,sh-table td.sticky-end{position:sticky;overflow:hidden;right:auto;left:0;z-index:1;padding:var(--table-td-p)}sh-table th.sticky:first-child,sh-table th.sticky-end:first-child,sh-table td.sticky:first-child,sh-table td.sticky-end:first-child{padding:var(--table-th-p)}sh-table th.sticky-end,sh-table td.sticky-end{right:0;left:auto}sh-table th.sticky,sh-table th.sticky-end{background:var(--base-1);padding:var(--table-th-p);z-index:101}sh-table th.sticky:first-child,sh-table th.sticky-end:first-child{padding:var(--table-th-p)}sh-table [shStickyColumns]{display:grid;grid-template-columns:subgrid;position:sticky;left:0;z-index:1000;border:0;border-color:var(--table-bc);border-style:solid}sh-table [shStickyColumns] th{background-color:var(--base-1)}sh-table [shStickyColumns=end]{left:auto;right:0}sh-table .span-all{grid-column:1/-1;white-space:initial;align-items:flex-start;padding:0;border-left-width:0;position:sticky;left:0;width:100cqw;box-sizing:border-box}sh-table .no-rows{display:none;grid-column:1/-1}sh-table tbody:empty+.no-rows{display:block}\n"] }]
532
+ }, styles: ["sh-table{--table-bc: var(--base-4);--table-th-bg: var(--base-2);--table-tr-bg: var(--base-1);--table-td-bg: var(--base-1);--table-th-c: var(--base-8);--table-th-f: var(--paragraph-30);--table-td-c: var(--base-8);--table-td-f: var(--paragraph-30);--table-th-p: 0 1.25rem;--table-td-p: 0 1.25rem;--table-th-mh: 3rem;--table-td-mh: 4.875rem;--table-th-g: .25rem;--table-td-g: .5rem;--table-ws: nowrap;--table-th-bw: 0;--table-td-bw: .0625rem 0 0;--table-columns: 1fr 1fr 1fr max-content;--table-sticky-bw: .0625rem}sh-table.type-a tbody>th,sh-table.type-a tbody>td,sh-table.type-a thead>th,sh-table.type-a thead>td{padding-right:0}sh-table.type-a tbody>th:first-child,sh-table.type-a tbody>td:first-child,sh-table.type-a thead>th:first-child,sh-table.type-a thead>td:first-child{padding:0}sh-table.type-b{--table-th-p: 0 .75rem;--table-td-p: 0 .75rem;--table-th-mh: 2.25rem;--table-td-mh: 3.5rem;--table-th-bw: .0625rem 0 .0625rem .0625rem;--table-td-bw: 0 0 .0625rem .0625rem;--table-sticky-bw: .0625rem}sh-table.type-b th:first-child{border-left-width:0;padding:var(--table-th-p)}sh-table.type-b td:first-child{border-left-width:0;padding:var(--table-td-p)}sh-table.type-b td.sticky,sh-table.type-b th.sticky{border-left-width:0;border-right:var(--table-sticky-bw) solid var(--table-bc)}sh-table.type-b [shStickyColumns] th,sh-table.type-b [shStickyColumns] td{border-right:var(--table-sticky-bw) solid var(--table-bc)}sh-table.type-b th.sticky-end,sh-table.type-b td.sticky-end,sh-table.type-b [shStickyColumns=end] th,sh-table.type-b [shStickyColumns=end] td{border-left:var(--table-sticky-bw) solid var(--table-bc);border-right:0}sh-table.type-b .sticky+th,sh-table.type-b .sticky+td,sh-table.type-b [shStickyColumns]+th,sh-table.type-b [shStickyColumns]+td{border-left-width:0}sh-table.type-b tr:hover td{background-color:var(--base-2)}sh-table.type-b div[table-header] tr:first-child th{border-bottom:0}sh-table.type-b tbody tr:last-child td{border-bottom-width:0}sh-table.type-b .actionbar{background-color:var(--base-2);border-width:.0625rem 0 0}sh-table{width:100%;display:grid;overflow:auto;overscroll-behavior-x:none;grid-template-columns:var(--table-columns);position:relative;container-type:inline-size}sh-table.resizing{-webkit-user-select:none;user-select:none}sh-table:has([shTableResize]) td{overflow:auto}sh-table.no-resize .sh-resizer{display:none}sh-table.no-resize td{overflow:initial}sh-table .actionbar{display:flex;align-items:center;gap:.5rem;grid-column:1/-1;position:sticky;left:0;z-index:10;background-color:var(--base-1);width:100cqw;box-sizing:border-box;padding:.5rem;border:var(--border-10);border-width:.0625rem 0;opacity:1;transition:padding .3s ease-out,border-width .3s ease-out,opacity .3s ease-out;overflow:hidden}sh-table .actionbar:empty,sh-table .actionbar:not(:has(>:not(.actionbar-right))):has(>.actionbar-right:empty){display:none}sh-table .actionbar>*{min-height:0}sh-table .actionbar .actionbar-right{display:flex;align-items:center;gap:.5rem;margin-left:auto;flex-shrink:0}sh-table .actionbar .actionbar-right:empty{display:none}sh-table tbody{position:relative}sh-table tbody:has(tr.sticky){position:sticky;top:0;z-index:1}sh-table thead{position:relative}sh-table thead:has(tr.sticky){position:sticky;top:0;z-index:2}sh-table sh-progress-bar{grid-column:1/-1;position:absolute;top:100%;transform:translateY(-50%);z-index:200}sh-table tbody,sh-table thead,sh-table tr{display:grid;grid-column:1/-1;grid-template-columns:subgrid}sh-table tr{background:var(--table-tr-bg);position:relative;z-index:0}sh-table tr.sticky{position:sticky;top:0;z-index:1}sh-table tr.sticky-end{position:sticky;bottom:0;z-index:3}sh-table tr:has(th.sticky-end) th:nth-last-child(2){padding:var(--table-th-p)}sh-table tr:has(td.sticky-end) td:nth-last-child(2){padding:var(--table-td-p)}sh-table th{display:flex;align-items:center;padding:var(--table-th-p);min-height:var(--table-th-mh);font:var(--table-th-f);line-height:1em;white-space:var(--table-ws);color:var(--table-th-c);border:0;border-color:var(--table-bc);border-style:solid;border-width:var(--table-th-bw);background:var(--table-th-bg);gap:var(--table-th-g);z-index:auto}sh-table th:hover,sh-table th.resizing{z-index:120}sh-table th:has(.sh-resizer){position:relative}sh-table th.sortable{--caret-color: var(--base-10);--caret-size: .375rem;cursor:pointer;-webkit-user-select:none;user-select:none}sh-table th.sortable sh-icon{opacity:.35;transition:opacity 125ms ease-in-out}sh-table th.sortable:hover sh-icon{opacity:.7}sh-table th.sortable.sort-asc sh-icon,sh-table th.sortable.sort-desc sh-icon{opacity:1}sh-table th.sortable:not(:has(sh-icon)):after{content:\"\";border:var(--caret-size) solid transparent;width:0;height:0;opacity:0;transition:opacity 125ms ease-in-out}sh-table th.sortable:not(:has(sh-icon)).sort-desc:after{opacity:1;transform:translateY(-4px);border-bottom-color:var(--caret-color)}sh-table th.sortable:not(:has(sh-icon)).sort-asc:after{opacity:1;transform:translateY(4px);border-top-color:var(--caret-color)}sh-table th .sh-resizer{width:.75rem;height:100%;position:absolute;top:0;right:-.375rem;cursor:col-resize;z-index:110}sh-table th .sh-resizer:after{content:\"\";position:absolute;top:.3125rem;bottom:.3125rem;border-radius:.125rem;right:.3125rem;width:.1875rem;background-color:var(--base-4);transition:width .15s ease,background-color .15s ease,right .15s ease}sh-table th .sh-resizer:hover:after{width:.3125rem;right:.1875rem;background-color:var(--primary-8)}sh-table th.resizing .sh-resizer:after{width:.3125rem;right:.1875rem;background-color:var(--primary-8)}sh-table td{display:flex;align-items:center;padding:var(--table-td-p);min-height:var(--table-td-mh);gap:var(--table-td-g);color:var(--table-td-c);font:var(--table-td-f);white-space:var(--table-ws);border-color:var(--table-bc);border-style:solid;border-width:var(--table-td-bw);background:var(--table-td-bg)}sh-table td+td.sticky-end:last-child{padding:var(--table-td-p)}sh-table th.sticky,sh-table th.sticky-end,sh-table td.sticky,sh-table td.sticky-end{position:sticky;overflow:hidden;right:auto;left:0;z-index:1;padding:var(--table-td-p)}sh-table th.sticky:first-child,sh-table th.sticky-end:first-child,sh-table td.sticky:first-child,sh-table td.sticky-end:first-child{padding:var(--table-th-p)}sh-table th.sticky-end,sh-table td.sticky-end{right:0;left:auto}sh-table th.sticky,sh-table th.sticky-end{background:var(--base-1);padding:var(--table-th-p);z-index:101}sh-table th.sticky:first-child,sh-table th.sticky-end:first-child{padding:var(--table-th-p)}sh-table [shStickyColumns]{display:grid;grid-template-columns:subgrid;position:sticky;left:0;z-index:1000;border:0;border-color:var(--table-bc);border-style:solid}sh-table [shStickyColumns] th{background-color:var(--base-1)}sh-table [shStickyColumns=end]{left:auto;right:0}sh-table .span-all{grid-column:1/-1;white-space:initial;align-items:flex-start;padding:0;border-left-width:0;position:sticky;left:0;width:100cqw;box-sizing:border-box}sh-table .no-rows{display:none;grid-column:1/-1}sh-table tbody:empty+.no-rows{display:block}\n"] }]
504
533
  }], propDecorators: { loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], dataChange: [{ type: i0.Output, args: ["dataChange"] }], sortByColumn: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortByColumn", required: false }] }, { type: i0.Output, args: ["sortByColumnChange"] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], content: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ShipTableContent), { isSignal: true }] }], theadLocal: [{ type: i0.ViewChild, args: ['theadLocal', { isSignal: true }] }], tbodyLocal: [{ type: i0.ViewChild, args: ['tbodyLocal', { isSignal: true }] }], onResize: [{
505
534
  type: HostListener,
506
535
  args: ['window:resize', ['$event']]
@@ -523,6 +552,9 @@ class ShipTableContent {
523
552
  if (!row)
524
553
  return '';
525
554
  const key = col.accessorKey || col.id;
555
+ if (typeof key === 'string' && key.includes('.')) {
556
+ return key.split('.').reduce((acc, part) => acc?.[part], row);
557
+ }
526
558
  return row[key];
527
559
  }
528
560
  formatDate(value) {
@@ -538,48 +570,29 @@ class ShipTableContent {
538
570
  <thead #thead role="rowgroup">
539
571
  <tr role="row">
540
572
  @for (col of columns(); track col.id) {
541
- @if (col.resizable) {
542
- <th role="columnheader"
543
- [id]="col.id"
544
- [attr.aria-label]="col.header"
545
- [shSort]="col.sortable ? col.id : undefined"
546
- shResize
547
- [minWidth]="col.minWidth ?? 50"
548
- [maxWidth]="col.maxWidth ?? null"
549
- [attr.size]="col.size || null"
550
- [class.sticky]="col.sticky === 'start'"
551
- [class.sticky-end]="col.sticky === 'end'">
552
- {{ col.header }}
553
- @if (col.sortable) {
554
- @if (sortByColumn() === col.id) {
555
- <sh-icon>caret-up</sh-icon>
556
- } @else if (sortByColumn() === '-' + col.id) {
557
- <sh-icon>caret-down</sh-icon>
558
- } @else {
559
- <sh-icon>arrows-down-up</sh-icon>
560
- }
561
- }
562
- </th>
563
- } @else {
564
- <th role="columnheader"
565
- [id]="col.id"
566
- [attr.aria-label]="col.header"
567
- [shSort]="col.sortable ? col.id : undefined"
568
- [attr.size]="col.size || null"
569
- [class.sticky]="col.sticky === 'start'"
570
- [class.sticky-end]="col.sticky === 'end'">
571
- {{ col.header }}
572
- @if (col.sortable) {
573
- @if (sortByColumn() === col.id) {
574
- <sh-icon>caret-up</sh-icon>
575
- } @else if (sortByColumn() === '-' + col.id) {
576
- <sh-icon>caret-down</sh-icon>
577
- } @else {
578
- <sh-icon>arrows-down-up</sh-icon>
579
- }
573
+ <th
574
+ role="columnheader"
575
+ [id]="col.id"
576
+ [attr.aria-label]="col.header"
577
+ [shSort]="col.sortable ? col.id : undefined"
578
+ shResize
579
+ [resizable]="!!col.resizable"
580
+ [minWidth]="col.minWidth ?? 50"
581
+ [maxWidth]="col.maxWidth ?? null"
582
+ [attr.size]="col.size || null"
583
+ [class.sticky]="col.sticky === 'start'"
584
+ [class.sticky-end]="col.sticky === 'end'">
585
+ {{ col.header }}
586
+ @if (col.sortable) {
587
+ @if (sortByColumn() === col.id) {
588
+ <sh-icon>caret-up</sh-icon>
589
+ } @else if (sortByColumn() === '-' + col.id) {
590
+ <sh-icon>caret-down</sh-icon>
591
+ } @else {
592
+ <sh-icon>arrows-down-up</sh-icon>
580
593
  }
581
- </th>
582
- }
594
+ }
595
+ </th>
583
596
  }
584
597
  </tr>
585
598
  </thead>
@@ -589,13 +602,16 @@ class ShipTableContent {
589
602
  @let rowIndex = $index;
590
603
  <tr role="row">
591
604
  @for (col of columns(); track col.id) {
592
- <td [class.sticky]="col.sticky === 'start'"
593
- [class.sticky-end]="col.sticky === 'end'"
594
- [id]="col.id + '-' + rowIndex"
595
- [attr.aria-labelledby]="col.id + ' ' + col.id + '-' + rowIndex"
596
- [attr.role]="col.rowHeader ? 'rowheader' : 'cell'">
605
+ <td
606
+ [class.sticky]="col.sticky === 'start'"
607
+ [class.sticky-end]="col.sticky === 'end'"
608
+ [id]="col.id + '-' + rowIndex"
609
+ [attr.aria-labelledby]="col.id + ' ' + col.id + '-' + rowIndex"
610
+ [attr.role]="col.rowHeader ? 'rowheader' : 'cell'">
597
611
  @if (col.cellTemplate) {
598
- <ng-container [ngTemplateOutlet]="col.cellTemplate" [ngTemplateOutletContext]="{ $implicit: row, column: col }" />
612
+ <ng-container
613
+ [ngTemplateOutlet]="col.cellTemplate"
614
+ [ngTemplateOutletContext]="{ $implicit: row, column: col }" />
599
615
  } @else if (col.cell) {
600
616
  {{ col.cell(row) }}
601
617
  } @else if (col.format) {
@@ -634,54 +650,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
634
650
  standalone: true,
635
651
  imports: [NgTemplateOutlet, ShipSort, ShipResize, ShipIcon, ShipChip],
636
652
  host: {
637
- 'style': 'display: contents',
653
+ style: 'display: contents',
638
654
  },
639
655
  template: `
640
656
  <thead #thead role="rowgroup">
641
657
  <tr role="row">
642
658
  @for (col of columns(); track col.id) {
643
- @if (col.resizable) {
644
- <th role="columnheader"
645
- [id]="col.id"
646
- [attr.aria-label]="col.header"
647
- [shSort]="col.sortable ? col.id : undefined"
648
- shResize
649
- [minWidth]="col.minWidth ?? 50"
650
- [maxWidth]="col.maxWidth ?? null"
651
- [attr.size]="col.size || null"
652
- [class.sticky]="col.sticky === 'start'"
653
- [class.sticky-end]="col.sticky === 'end'">
654
- {{ col.header }}
655
- @if (col.sortable) {
656
- @if (sortByColumn() === col.id) {
657
- <sh-icon>caret-up</sh-icon>
658
- } @else if (sortByColumn() === '-' + col.id) {
659
- <sh-icon>caret-down</sh-icon>
660
- } @else {
661
- <sh-icon>arrows-down-up</sh-icon>
662
- }
663
- }
664
- </th>
665
- } @else {
666
- <th role="columnheader"
667
- [id]="col.id"
668
- [attr.aria-label]="col.header"
669
- [shSort]="col.sortable ? col.id : undefined"
670
- [attr.size]="col.size || null"
671
- [class.sticky]="col.sticky === 'start'"
672
- [class.sticky-end]="col.sticky === 'end'">
673
- {{ col.header }}
674
- @if (col.sortable) {
675
- @if (sortByColumn() === col.id) {
676
- <sh-icon>caret-up</sh-icon>
677
- } @else if (sortByColumn() === '-' + col.id) {
678
- <sh-icon>caret-down</sh-icon>
679
- } @else {
680
- <sh-icon>arrows-down-up</sh-icon>
681
- }
659
+ <th
660
+ role="columnheader"
661
+ [id]="col.id"
662
+ [attr.aria-label]="col.header"
663
+ [shSort]="col.sortable ? col.id : undefined"
664
+ shResize
665
+ [resizable]="!!col.resizable"
666
+ [minWidth]="col.minWidth ?? 50"
667
+ [maxWidth]="col.maxWidth ?? null"
668
+ [attr.size]="col.size || null"
669
+ [class.sticky]="col.sticky === 'start'"
670
+ [class.sticky-end]="col.sticky === 'end'">
671
+ {{ col.header }}
672
+ @if (col.sortable) {
673
+ @if (sortByColumn() === col.id) {
674
+ <sh-icon>caret-up</sh-icon>
675
+ } @else if (sortByColumn() === '-' + col.id) {
676
+ <sh-icon>caret-down</sh-icon>
677
+ } @else {
678
+ <sh-icon>arrows-down-up</sh-icon>
682
679
  }
683
- </th>
684
- }
680
+ }
681
+ </th>
685
682
  }
686
683
  </tr>
687
684
  </thead>
@@ -691,13 +688,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
691
688
  @let rowIndex = $index;
692
689
  <tr role="row">
693
690
  @for (col of columns(); track col.id) {
694
- <td [class.sticky]="col.sticky === 'start'"
695
- [class.sticky-end]="col.sticky === 'end'"
696
- [id]="col.id + '-' + rowIndex"
697
- [attr.aria-labelledby]="col.id + ' ' + col.id + '-' + rowIndex"
698
- [attr.role]="col.rowHeader ? 'rowheader' : 'cell'">
691
+ <td
692
+ [class.sticky]="col.sticky === 'start'"
693
+ [class.sticky-end]="col.sticky === 'end'"
694
+ [id]="col.id + '-' + rowIndex"
695
+ [attr.aria-labelledby]="col.id + ' ' + col.id + '-' + rowIndex"
696
+ [attr.role]="col.rowHeader ? 'rowheader' : 'cell'">
699
697
  @if (col.cellTemplate) {
700
- <ng-container [ngTemplateOutlet]="col.cellTemplate" [ngTemplateOutletContext]="{ $implicit: row, column: col }" />
698
+ <ng-container
699
+ [ngTemplateOutlet]="col.cellTemplate"
700
+ [ngTemplateOutletContext]="{ $implicit: row, column: col }" />
701
701
  } @else if (col.cell) {
702
702
  {{ col.cell(row) }}
703
703
  } @else if (col.format) {
@@ -727,7 +727,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
727
727
  </tr>
728
728
  }
729
729
  </tbody>
730
- `
730
+ `,
731
731
  }]
732
732
  }], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], thead: [{ type: i0.ViewChild, args: ['thead', { isSignal: true }] }], tbody: [{ type: i0.ViewChild, args: ['tbody', { isSignal: true }] }] } });
733
733