@streamscloud/kit 0.76.5 → 0.78.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.
Files changed (34) hide show
  1. package/dist/core/utils/color-helper.d.ts +10 -0
  2. package/dist/core/utils/color-helper.js +25 -1
  3. package/dist/ui/form-field/cmp.form-field-validatable.svelte +3 -3
  4. package/dist/ui/form-field/cmp.form-field-validatable.svelte.d.ts +4 -4
  5. package/dist/ui/table/cmp.table-draggable.svelte +56 -304
  6. package/dist/ui/table/cmp.table-draggable.svelte.d.ts +30 -19
  7. package/dist/ui/table/cmp.table.svelte +23 -264
  8. package/dist/ui/table/cmp.table.svelte.d.ts +32 -18
  9. package/dist/ui/table/table-cells/table-checkbox-cell.svelte +0 -1
  10. package/dist/ui/table/table-cells/table-move-row-cell.svelte +0 -2
  11. package/dist/ui/table/table-cells/table-text-cell.svelte +0 -1
  12. package/dist/ui/table/table-column-models.svelte.d.ts +5 -0
  13. package/dist/ui/table/table-column-models.svelte.js +6 -0
  14. package/dist/ui/table/table-core.svelte +407 -0
  15. package/dist/ui/table/table-core.svelte.d.ts +88 -0
  16. package/dist/ui/table/table-headers/table-header-sortable.svelte +1 -4
  17. package/dist/ui/table/table-headers/table-header.svelte +1 -1
  18. package/dist/ui/table/table-localization.d.ts +1 -0
  19. package/dist/ui/table/table-localization.js +7 -0
  20. package/dist/ui/table/table-model.svelte.js +9 -1
  21. package/dist/ui/table/types.d.ts +22 -1
  22. package/dist/ui/validatable/cmp.validatable.svelte +3 -4
  23. package/dist/ui/validatable/cmp.validatable.svelte.d.ts +6 -6
  24. package/dist/ui/validatable/cmp.validation-error.svelte +4 -4
  25. package/dist/ui/validatable/cmp.validation-error.svelte.d.ts +7 -6
  26. package/dist/ui/validatable/field-frame.svelte +25 -15
  27. package/dist/ui/validatable/field-frame.svelte.d.ts +8 -8
  28. package/dist/ui/validatable/index.d.ts +1 -0
  29. package/dist/ui/validatable/types.d.ts +7 -0
  30. package/dist/ui/validatable/types.js +1 -0
  31. package/package.json +1 -1
  32. package/dist/ui/table/_table-styles.scss +0 -158
  33. package/dist/ui/table/table-view.svelte.d.ts +0 -15
  34. package/dist/ui/table/table-view.svelte.js +0 -47
@@ -1,16 +1,11 @@
1
- <script lang="ts" generics="T extends {id: string}">import { DynamicComponent } from '../dynamic-component';
2
- import { EmptyState } from '../empty-state';
3
- import { TableCell, TableHideableCell } from './table-cells';
4
- import { TableLocalization } from './table-localization';
5
- import { columnWidthStyle, createTableView } from './table-view.svelte';
6
- let { model, showAlternativeView = false, noItemsPlaceholderEnabled, noItemsPlaceholderDelay, grouping, on, alternativeView, customNoItemsPlaceholder } = $props();
7
- const localization = new TableLocalization();
8
- const view = createTableView(() => model, () => on, () => noItemsPlaceholderEnabled, () => noItemsPlaceholderDelay);
1
+ <script lang="ts" generics="T extends {id: string}">import { default as TableCore } from './table-core.svelte';
2
+ let { model, grouping, ...shared } = $props();
3
+ const itemRow = (item, index) => ({ kind: 'item', key: item.id, item, index });
9
4
  const displayRows = $derived.by(() => {
10
5
  const items = model.items;
11
6
  const grp = grouping;
12
7
  if (!grp) {
13
- return items.map((item, index) => ({ kind: 'item', item, index }));
8
+ return items.map(itemRow);
14
9
  }
15
10
  const keys = items.map((item) => grp.key(item));
16
11
  const out = [];
@@ -18,7 +13,7 @@ const displayRows = $derived.by(() => {
18
13
  while (i < items.length) {
19
14
  const key = keys[i];
20
15
  if (key === null) {
21
- out.push({ kind: 'item', item: items[i], index: i });
16
+ out.push(itemRow(items[i], i));
22
17
  i += 1;
23
18
  continue;
24
19
  }
@@ -28,98 +23,15 @@ const displayRows = $derived.by(() => {
28
23
  }
29
24
  out.push({ kind: 'group', key, label: grp.label ? grp.label(key, items[i]) : key, count: j - i });
30
25
  for (let k = i; k < j; k += 1) {
31
- out.push({ kind: 'item', item: items[k], index: k });
26
+ out.push(itemRow(items[k], k));
32
27
  }
33
28
  i = j;
34
29
  }
35
30
  return out;
36
31
  });
37
- const visibleColspan = $derived(model.columns.filter((column) => !column.hidden).length);
38
32
  </script>
39
33
 
40
- {#snippet noItemsContent()}
41
- {#if customNoItemsPlaceholder}
42
- {@render customNoItemsPlaceholder()}
43
- {:else}
44
- <EmptyState graphic="zero-content" title={localization.noItemsFoundTitle} description={localization.noItemsFoundBody} />
45
- {/if}
46
- {/snippet}
47
-
48
- <div
49
- class="table-container table-container--{model.styles?.size ?? 'md'} table-container--{model.styles?.variant ?? 'plain'}"
50
- class:table-container--zebra={model.styles?.zebra === true}>
51
- {#if alternativeView && showAlternativeView}
52
- {#if view.showNoItemsPlaceholder}
53
- <div class="alternative-view__placeholder">{@render noItemsContent()}</div>
54
- {:else}
55
- {@render alternativeView()}
56
- {/if}
57
- {:else}
58
- <table class="table" class:table--sticky-header={model.styles?.stickyHeader === true}>
59
- <thead class="table__head">
60
- <tr>
61
- {#each model.columns as column (column)}
62
- <TableHideableCell column={column}>
63
- <th class="table__th" class:table__th--centered={column.centered} style={columnWidthStyle(column)} title={column.title}>
64
- <DynamicComponent model={column.headerView} />
65
- </th>
66
- </TableHideableCell>
67
- {/each}
68
- </tr>
69
- </thead>
70
- <tbody>
71
- {#if view.showNoItemsPlaceholder}
72
- <tr class="table__tr table__tr--placeholder">
73
- <td colspan={visibleColspan}>
74
- <div class="table__placeholder">{@render noItemsContent()}</div>
75
- </td>
76
- </tr>
77
- {:else}
78
- {#each displayRows as row (row.kind === 'group' ? 'g:' + row.key : 'i:' + row.item.id)}
79
- {#if row.kind === 'group'}
80
- <tr>
81
- <td class="table__group-header" colspan={visibleColspan}>
82
- {#if grouping?.header}
83
- {@render grouping.header({ key: row.key, label: row.label, count: row.count })}
84
- {:else}
85
- {row.label}
86
- {/if}
87
- </td>
88
- </tr>
89
- {:else}
90
- {@const item = row.item}
91
- {@const itemIndex = row.index}
92
- {@const isSelected = model.selection.has(item.id)}
93
- {@const isHighlighted = model.highlightedItemIds.includes(item.id)}
94
- {@const flushBottom = model.styles?.variant === 'card' && itemIndex === model.items.length - 1}
95
- {@const zebra = model.styles?.zebra === true && itemIndex % 2 === 1 && !isSelected && !isHighlighted}
96
- <tr
97
- class="table__tr"
98
- id={item.id}
99
- class:table__tr--selected={isSelected}
100
- class:table__tr--highlighted={isHighlighted}
101
- class:table__tr--zebra={zebra}>
102
- {#each model.columns as column (column)}
103
- <TableHideableCell column={column}>
104
- <td
105
- class="table__td"
106
- class:table__td--centered={column.centered}
107
- class:table__td--clickable={!!column.onClick}
108
- class:table__td--flush={flushBottom}
109
- style={columnWidthStyle(column)}
110
- onclick={() => column.onClick && column.onClick(item)}>
111
- <TableCell model={model} item={item} column={column} itemIndex={itemIndex} on={{ itemsReordered: on?.itemsReordered }} />
112
- </td>
113
- </TableHideableCell>
114
- {/each}
115
- </tr>
116
- {/if}
117
- {/each}
118
- {/if}
119
- </tbody>
120
- </table>
121
- {/if}
122
- </div>
34
+ <TableCore {...shared} model={model} rows={displayRows} groupHeader={grouping?.header} />
123
35
 
124
36
  <!--
125
37
  @component
@@ -127,186 +39,33 @@ Data table with sorting, selection, column visibility management, optional consu
127
39
  (`grouping`), and group actions. For drag-and-drop row reordering use `DraggableTable` instead (this static
128
40
  variant ships no dnd code).
129
41
 
130
- ### TableStyles (via `model.styles`)
131
- | Field | Type | Effect |
132
- |---|---|---|
133
- | `size` | `'sm' \| 'md'` | Row height + cell padding + font-size preset (default `'md'`) |
134
- | `variant` | `'plain' \| 'card'` | `'card'` wraps the table in a bordered rounded panel (default `'plain'`) |
135
- | `zebra` | `boolean` | Alternates row backgrounds with `--sc-kit--color--bg--field-alt` |
136
- | `stickyHeader` | `boolean` | Sticks `thead` to the scrolling ancestor |
137
- | `actionsPopoverTopDirection` | `boolean` | Forces the per-row actions popover above instead of below |
138
-
139
42
  ### CSS Custom Properties
140
43
  | Property | Description | Default |
141
44
  |---|---|---|
142
- | `--sc-kit--table--row--height` | Row height | per size (32 / 50 px) |
143
- | `--sc-kit--table--cell--horizontal-padding` | Cell horizontal padding | per size (8 / 12 px) |
45
+ | `--sc-kit--table--row--height` | Row height | per size (36 / 44 px) |
46
+ | `--sc-kit--table--cell--padding-inline` | Cell inline padding | per size (`--space--3` / `--space--4`) |
144
47
  | `--sc-kit--table--cell--font-size` | Cell font size | per size (`--font-size--sm` / `--md`) |
145
- | `--sc-kit--table--head--background-color` | Header background | `--sc-kit--color--bg--field-alt` |
48
+ | `--sc-kit--table--cell--padding-block` | Cell block padding | `0` |
49
+ | `--sc-kit--table--cell--vertical-align` | Cell content alignment — `top` keeps inputs aligned when one cell grows | `middle` |
50
+ | `--sc-kit--table--head--height` | Header row height | per size (32 / 40 px) |
51
+ | `--sc-kit--table--head--background-color` | Header background | `--sc-kit--color--bg--field-alt`; with a `toolbar`, the card / panel background |
52
+ | `--sc-kit--table--toolbar--background-color` | Toolbar band background | `--sc-kit--color--bg--field-alt` |
53
+ | `--sc-kit--table--toolbar--padding-block` | Toolbar band block padding — `0` hands the band to the toolbar content | `--sc-kit--space--3` |
54
+ | `--sc-kit--table--toolbar--padding-inline` | Toolbar band inline padding | the cell inline padding |
146
55
  | `--sc-kit--table--head--color` | Header text color | `--sc-kit--color--text--secondary` |
56
+ | `--sc-kit--table--head--font-size` | Header font size | `--sc-kit--font-size--sm` |
57
+ | `--sc-kit--table--head--font-weight` | Header font weight | `--sc-kit--font-weight--semibold` |
58
+ | `--sc-kit--table--head--letter-spacing` | Header letter spacing | `normal` |
59
+ | `--sc-kit--table--head--text-transform` | Header text transform | `none` |
147
60
  | `--sc-kit--table--border-color` | Border color between rows | `--sc-kit--color--border` |
148
61
  | `--sc-kit--table--row--color` | Row background | `transparent` |
149
62
  | `--sc-kit--table--row--alternative-color` | Hover / highlighted row background | `--sc-kit--color--bg--hover` |
150
63
  | `--sc-kit--table--zebra--color` | Zebra-row background (when `zebra` on) | `light-dark(#fcfcfd, #232323)` |
64
+ | `--sc-kit--table--selected--color` | Selected row background | `--sc-kit--color--accent--softer` |
65
+ | `--sc-kit--table--selected--color--hover` | Selected row background on hover | `--sc-kit--color--accent--soft` |
151
66
  | `--sc-kit--table--card--background` | Card variant background | `--sc-kit--color--bg--panel` |
152
67
  | `--sc-kit--table--card--border-color` | Card variant border | `--sc-kit--color--border` |
153
68
  | `--sc-kit--table--card--border-radius` | Card variant radius | `--sc-kit--radius--lg` |
154
69
  | `--sc-kit--table--card--padding-bottom` | Card variant bottom padding | `--sc-kit--space--4` |
70
+ | `--sc-kit--table--min-width` | Table floor — past it the columns scroll horizontally inside the chrome, the toolbar stays. The column-floor substitute under `layout: 'fixed'` | `auto` |
155
71
  -->
156
-
157
- <style>.alternative-view__placeholder {
158
- width: 100%;
159
- display: flex;
160
- align-items: center;
161
- justify-content: center;
162
- font-size: 80%;
163
- user-select: none;
164
- }
165
-
166
- .table-container {
167
- --_table--row--height: var(--sc-kit--table--row--height, var(--_table--size-row-height));
168
- --_table--cell--font-size: var(--sc-kit--table--cell--font-size, var(--_table--size-cell-font-size));
169
- --_table--cell--horizontal-padding: var(--sc-kit--table--cell--horizontal-padding, var(--_table--size-cell-padding));
170
- --_table--head--height: var(--sc-kit--table--head--height, var(--_table--size-head-height, var(--_table--row--height)));
171
- --_table--head--background-color: var(--sc-kit--table--head--background-color, var(--sc-kit--color--bg--field-alt));
172
- --_table--head--color: var(--sc-kit--table--head--color, var(--sc-kit--color--text--secondary));
173
- --_table--border-color: var(--sc-kit--table--border-color, var(--sc-kit--color--border));
174
- --_table--row--color: var(--sc-kit--table--row--color, transparent);
175
- --_table--row--alternative-color: var(--sc-kit--table--row--alternative-color, var(--sc-kit--color--bg--hover));
176
- --_table--zebra--color: var(--sc-kit--table--zebra--color, light-dark(#fcfcfd, #232323));
177
- --_table--selected--color: var(--sc-kit--table--selected--color, var(--sc-kit--color--accent--softer));
178
- --_table--selected--color-hover: var(--sc-kit--table--selected--color--hover, var(--sc-kit--color--accent--soft));
179
- --_table--card--background: var(--sc-kit--table--card--background, var(--sc-kit--color--bg--panel));
180
- --_table--card--border-color: var(--sc-kit--table--card--border-color, var(--sc-kit--color--border));
181
- --_table--card--border-radius: var(--sc-kit--table--card--border-radius, var(--sc-kit--radius--lg));
182
- --_table--card--padding-bottom: var(--sc-kit--table--card--padding-bottom, var(--sc-kit--space--4));
183
- display: flex;
184
- overflow-x: auto;
185
- height: 100%;
186
- --_cross-browser-scrollbar--thumb-color: var(--scrollbar--thumb-color, light-dark(#d1d5db, #4b5563));
187
- --_cross-browser-scrollbar--track-color: var(--scrollbar--track-color, transparent);
188
- }
189
- .table-container::-webkit-scrollbar {
190
- width: 6px;
191
- height: 6px;
192
- }
193
- .table-container::-webkit-scrollbar-track {
194
- background: var(--_cross-browser-scrollbar--track-color);
195
- border-radius: 100vw;
196
- }
197
- .table-container::-webkit-scrollbar-thumb {
198
- background: var(--_cross-browser-scrollbar--thumb-color);
199
- border-radius: 100vw;
200
- }
201
- @supports (scrollbar-color: transparent transparent) {
202
- .table-container {
203
- scrollbar-color: var(--_cross-browser-scrollbar--thumb-color) var(--_cross-browser-scrollbar--track-color);
204
- scrollbar-width: thin;
205
- }
206
- }
207
- .table-container--md {
208
- --_table--size-row-height: 2.75rem;
209
- --_table--size-head-height: 2.5rem;
210
- --_table--size-cell-font-size: var(--sc-kit--font-size--md);
211
- --_table--size-cell-padding: var(--sc-kit--space--4);
212
- }
213
- .table-container--sm {
214
- --_table--size-row-height: 2.25rem;
215
- --_table--size-head-height: 2rem;
216
- --_table--size-cell-font-size: var(--sc-kit--font-size--sm);
217
- --_table--size-cell-padding: var(--sc-kit--space--3);
218
- }
219
- .table-container--card {
220
- background: var(--_table--card--background);
221
- border: 1px solid var(--_table--card--border-color);
222
- border-radius: var(--_table--card--border-radius);
223
- padding-bottom: var(--_table--card--padding-bottom);
224
- }
225
-
226
- .table {
227
- width: 100%;
228
- table-layout: auto;
229
- height: fit-content;
230
- border-collapse: separate;
231
- border-spacing: 0;
232
- }
233
- .table__head {
234
- height: var(--_table--head--height);
235
- max-height: var(--_table--head--height);
236
- background: var(--_table--head--background-color);
237
- color: var(--_table--head--color);
238
- font-size: var(--sc-kit--table--head--font-size, var(--sc-kit--font-size--sm));
239
- font-weight: var(--sc-kit--font-weight--semibold);
240
- }
241
- .table__th {
242
- padding: 0 var(--_table--cell--horizontal-padding);
243
- text-align: left;
244
- vertical-align: middle;
245
- border-bottom: 1px solid var(--_table--border-color);
246
- -webkit-user-drag: none;
247
- user-select: none;
248
- }
249
- .table__th :global([contenteditable]) {
250
- user-select: text;
251
- }
252
- .table__th--centered {
253
- text-align: center;
254
- --_table-header--justify-content: center;
255
- }
256
- .table__tr {
257
- height: var(--_table--row--height);
258
- max-height: var(--_table--row--height);
259
- background: var(--_table--row--color);
260
- }
261
- .table__tr--zebra {
262
- background: var(--_table--zebra--color);
263
- }
264
- .table__tr:hover, .table__tr--highlighted {
265
- background: var(--_table--row--alternative-color);
266
- --_table--move-row-cell-opacity: 1;
267
- }
268
- .table__tr--selected {
269
- background: var(--_table--selected--color);
270
- }
271
- .table__tr--selected:hover {
272
- background: var(--_table--selected--color-hover);
273
- }
274
- .table__tr--placeholder {
275
- background: var(--_table--row--color) !important;
276
- }
277
- .table__td {
278
- padding: 0 var(--_table--cell--horizontal-padding);
279
- border-bottom: 1px solid var(--_table--border-color);
280
- font-size: var(--_table--cell--font-size);
281
- color: var(--sc-kit--color--text--primary);
282
- vertical-align: middle;
283
- }
284
- .table__td--centered {
285
- text-align: center;
286
- }
287
- .table__td--clickable {
288
- cursor: pointer;
289
- }
290
- .table__td--flush {
291
- border-bottom: none;
292
- }
293
- .table__placeholder {
294
- display: flex;
295
- align-items: center;
296
- justify-content: center;
297
- font-size: 80%;
298
- user-select: none;
299
- }
300
- .table--sticky-header thead {
301
- position: sticky;
302
- top: 0;
303
- z-index: 1;
304
- }
305
-
306
- .table__group-header {
307
- padding-block: var(--sc-kit--space--6) var(--sc-kit--space--2);
308
- padding-inline: var(--_table--cell--horizontal-padding);
309
- font-size: var(--sc-kit--font-size--sm);
310
- font-weight: var(--sc-kit--font-weight--semibold);
311
- color: var(--sc-kit--color--text--secondary);
312
- }</style>
@@ -6,12 +6,13 @@ declare function $$render<T extends {
6
6
  props: {
7
7
  model: TableModel<T>;
8
8
  showAlternativeView?: boolean;
9
- /** Whether an empty list turns into the no-items placeholder at all — `false` pairs with your own loading / empty UI. Rows always win: the placeholder
10
- * is never rendered over a non-empty list. @default true */
11
- noItemsPlaceholderEnabled?: boolean;
12
- /** Anti-flicker delay in ms before the placeholder appears, once `noItemsPlaceholderEnabled`. `0` shows it as soon as the list is empty. @default 0 */
9
+ /** Anti-flicker delay in ms before the placeholder appears. `0` shows it as soon as the list is empty. @default 0 */
13
10
  noItemsPlaceholderDelay?: number;
14
- /** Group consecutive (already-sorted) rows under section headers. `key` returns a group id per item (`null` = ungrouped); a header row renders wherever the key changes between neighbours. */
11
+ /**
12
+ * Group rows under section headers, for read-only lists. `key` returns a group id per item (`null` = ungrouped). Items must be sorted so each group
13
+ * forms one contiguous run — a group id that reappears after another group is invalid input. A `move-row` column is not supported with grouping: it can
14
+ * move an item across a group boundary and break that rule.
15
+ */
15
16
  grouping?: {
16
17
  key: (item: T) => string | null;
17
18
  /** Header text — defaults to the group key. */
@@ -30,7 +31,16 @@ declare function $$render<T extends {
30
31
  itemsReordered?: (e: T[]) => void;
31
32
  };
32
33
  alternativeView?: Snippet;
33
- customNoItemsPlaceholder?: Snippet;
34
+ /**
35
+ * What an empty list shows: the built-in empty state when omitted, your own content as a snippet, nothing with `false` — pairs with your own loading /
36
+ * empty UI. Rows always win: the placeholder is never rendered over a non-empty list.
37
+ */
38
+ noItemsPlaceholder?: Snippet | false;
39
+ /**
40
+ * Band inside the table chrome above the column header row — a title and actions. With a toolbar the column header always sticks under it and takes
41
+ * the row background; an empty list drops the column header, leaving the toolbar and the no-items placeholder.
42
+ */
43
+ toolbar?: Snippet;
34
44
  };
35
45
  exports: {};
36
46
  bindings: "";
@@ -62,31 +72,35 @@ interface $$IsomorphicComponent {
62
72
  * (`grouping`), and group actions. For drag-and-drop row reordering use `DraggableTable` instead (this static
63
73
  * variant ships no dnd code).
64
74
  *
65
- * ### TableStyles (via `model.styles`)
66
- * | Field | Type | Effect |
67
- * |---|---|---|
68
- * | `size` | `'sm' \| 'md'` | Row height + cell padding + font-size preset (default `'md'`) |
69
- * | `variant` | `'plain' \| 'card'` | `'card'` wraps the table in a bordered rounded panel (default `'plain'`) |
70
- * | `zebra` | `boolean` | Alternates row backgrounds with `--sc-kit--color--bg--field-alt` |
71
- * | `stickyHeader` | `boolean` | Sticks `thead` to the scrolling ancestor |
72
- * | `actionsPopoverTopDirection` | `boolean` | Forces the per-row actions popover above instead of below |
73
- *
74
75
  * ### CSS Custom Properties
75
76
  * | Property | Description | Default |
76
77
  * |---|---|---|
77
- * | `--sc-kit--table--row--height` | Row height | per size (32 / 50 px) |
78
- * | `--sc-kit--table--cell--horizontal-padding` | Cell horizontal padding | per size (8 / 12 px) |
78
+ * | `--sc-kit--table--row--height` | Row height | per size (36 / 44 px) |
79
+ * | `--sc-kit--table--cell--padding-inline` | Cell inline padding | per size (`--space--3` / `--space--4`) |
79
80
  * | `--sc-kit--table--cell--font-size` | Cell font size | per size (`--font-size--sm` / `--md`) |
80
- * | `--sc-kit--table--head--background-color` | Header background | `--sc-kit--color--bg--field-alt` |
81
+ * | `--sc-kit--table--cell--padding-block` | Cell block padding | `0` |
82
+ * | `--sc-kit--table--cell--vertical-align` | Cell content alignment — `top` keeps inputs aligned when one cell grows | `middle` |
83
+ * | `--sc-kit--table--head--height` | Header row height | per size (32 / 40 px) |
84
+ * | `--sc-kit--table--head--background-color` | Header background | `--sc-kit--color--bg--field-alt`; with a `toolbar`, the card / panel background |
85
+ * | `--sc-kit--table--toolbar--background-color` | Toolbar band background | `--sc-kit--color--bg--field-alt` |
86
+ * | `--sc-kit--table--toolbar--padding-block` | Toolbar band block padding — `0` hands the band to the toolbar content | `--sc-kit--space--3` |
87
+ * | `--sc-kit--table--toolbar--padding-inline` | Toolbar band inline padding | the cell inline padding |
81
88
  * | `--sc-kit--table--head--color` | Header text color | `--sc-kit--color--text--secondary` |
89
+ * | `--sc-kit--table--head--font-size` | Header font size | `--sc-kit--font-size--sm` |
90
+ * | `--sc-kit--table--head--font-weight` | Header font weight | `--sc-kit--font-weight--semibold` |
91
+ * | `--sc-kit--table--head--letter-spacing` | Header letter spacing | `normal` |
92
+ * | `--sc-kit--table--head--text-transform` | Header text transform | `none` |
82
93
  * | `--sc-kit--table--border-color` | Border color between rows | `--sc-kit--color--border` |
83
94
  * | `--sc-kit--table--row--color` | Row background | `transparent` |
84
95
  * | `--sc-kit--table--row--alternative-color` | Hover / highlighted row background | `--sc-kit--color--bg--hover` |
85
96
  * | `--sc-kit--table--zebra--color` | Zebra-row background (when `zebra` on) | `light-dark(#fcfcfd, #232323)` |
97
+ * | `--sc-kit--table--selected--color` | Selected row background | `--sc-kit--color--accent--softer` |
98
+ * | `--sc-kit--table--selected--color--hover` | Selected row background on hover | `--sc-kit--color--accent--soft` |
86
99
  * | `--sc-kit--table--card--background` | Card variant background | `--sc-kit--color--bg--panel` |
87
100
  * | `--sc-kit--table--card--border-color` | Card variant border | `--sc-kit--color--border` |
88
101
  * | `--sc-kit--table--card--border-radius` | Card variant radius | `--sc-kit--radius--lg` |
89
102
  * | `--sc-kit--table--card--padding-bottom` | Card variant bottom padding | `--sc-kit--space--4` |
103
+ * | `--sc-kit--table--min-width` | Table floor — past it the columns scroll horizontally inside the chrome, the toolbar stays. The column-floor substitute under `layout: 'fixed'` | `auto` |
90
104
  */
91
105
  declare const Cmp: $$IsomorphicComponent;
92
106
  type Cmp<T extends {
@@ -20,5 +20,4 @@ const toggle = () => {
20
20
  display: flex;
21
21
  align-items: center;
22
22
  justify-content: center;
23
- font-size: var(--_table--cell--font-size);
24
23
  }</style>
@@ -21,8 +21,6 @@ const onDown = () => on?.down?.();
21
21
  gap: 0.125rem;
22
22
  justify-content: space-evenly;
23
23
  --sc-kit--icon--size: 1rem;
24
- opacity: var(--_table--move-row-cell-opacity, 0);
25
- transition: opacity var(--sc-kit--duration--base) var(--sc-kit--ease--default);
26
24
  }
27
25
  .move-row-cell button:disabled {
28
26
  --sc-kit--icon--color: var(--sc-kit--color--text--muted);
@@ -44,7 +44,6 @@ Text cell for table rows. Supports plain text, date, date-time, and HTML formats
44
44
  --_table-text-cell--clickable--color: var(--sc-kit--table-text-cell--clickable--color, var(--sc-kit--color--accent));
45
45
  display: flex;
46
46
  align-content: center;
47
- font-size: var(--_table--cell--font-size);
48
47
  }
49
48
  .table-text-cell__single-line-no-trim {
50
49
  white-space: nowrap;
@@ -24,6 +24,11 @@ export declare class ResolvedColumn<T extends WithId> {
24
24
  get id(): keyof T;
25
25
  get title(): string;
26
26
  get centered(): boolean;
27
+ get revealOnRowHover(): boolean;
28
+ get cellPadding(): {
29
+ inline?: string;
30
+ block?: string;
31
+ };
27
32
  get cssWidth(): string;
28
33
  get minCssWidth(): string;
29
34
  get hideable(): boolean;
@@ -31,6 +31,12 @@ export class ResolvedColumn {
31
31
  get centered() {
32
32
  return this.def.centered ?? false;
33
33
  }
34
+ get revealOnRowHover() {
35
+ return this.def.revealOnRowHover ?? this.def.type === 'move-row';
36
+ }
37
+ get cellPadding() {
38
+ return this.def.cellPadding ?? {};
39
+ }
34
40
  get cssWidth() {
35
41
  return this.def.cssWidth ?? '';
36
42
  }