@knime/kds-table 6.8.0 → 6.9.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # @knime/kds-table
2
2
 
3
+ ## 6.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 090fd52: - `TableUI`:
8
+ - with `actionConfig.enableSorting`, every sortable column header now shows a
9
+ sort button next to its menu button, cycling the column through unsorted,
10
+ ascending and descending on each click. It appears on hover/focus, and stays
11
+ visible while the column is sorted to indicate that state. The sort
12
+ directions are no longer offered in the header context menu.
13
+ - a column header now only shows its menu button when the column has
14
+ additional menu items. Previously a sortable column always showed one,
15
+ because sorting itself contributed the menu items.
16
+ - each column now has a minimum width fitting the action buttons its header
17
+ shows. It is enforced on auto-calculated column sizes too, not only on
18
+ resizing.
19
+ - tightened the header layout so the column name truncates to make room for
20
+ the action buttons instead of pushing them out of the header. This applies
21
+ to every column header, including ones without a sort button.
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies [2725ccb]
26
+ - @knime/utils@2.0.2
27
+ - @knime/kds-components@6.9.0
28
+ - @knime/kds-styles@6.9.0
29
+
30
+ ## 6.8.1
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies [2d8e635]
35
+ - @knime/kds-components@6.8.1
36
+ - @knime/kds-styles@6.8.1
37
+
3
38
  ## 6.8.0
4
39
 
5
40
  ### Patch Changes
package/dist/index.css CHANGED
@@ -236,7 +236,7 @@ tr {
236
236
  }
237
237
 
238
238
  .column-header {
239
- &[data-v-31a6758f] {
239
+ &[data-v-0f9137cc] {
240
240
  /* Need to set position relative here to position the resize handle absolutely within the header cell */
241
241
  position: relative;
242
242
  display: flex;
@@ -250,10 +250,10 @@ tr {
250
250
  text-align: left;
251
251
  white-space: nowrap;
252
252
  }
253
- &.header-focused[data-v-31a6758f] {
253
+ &.header-focused[data-v-0f9137cc] {
254
254
  background-color: var(--kds-color-focus-background);
255
255
  }
256
- &.colored-header[data-v-31a6758f] {
256
+ &.colored-header[data-v-0f9137cc] {
257
257
  /* stylelint-disable no-unknown-custom-properties -- runtime variable set via inline :style */
258
258
  background-image: linear-gradient(
259
259
  90deg,
@@ -265,48 +265,70 @@ tr {
265
265
  background-size: var(--kds-spacing-container-0-25x);
266
266
  }
267
267
  & .column-header-content {
268
- &[data-v-31a6758f] {
268
+ &[data-v-0f9137cc] {
269
269
  display: flex;
270
+ flex-shrink: 1;
270
271
  flex-direction: column;
271
272
  justify-content: center;
272
273
  width: 100%;
274
+
275
+ /* Allows this flex item to shrink below its content's width, so the
276
+ column name truncates (and, if there is no room left at all,
277
+ disappears) instead of pushing the header-action buttons outside. */
278
+ min-width: 0;
273
279
  }
274
- &[data-v-31a6758f]:focus {
280
+ &[data-v-0f9137cc]:focus {
275
281
  outline: none;
276
282
  }
277
- &.with-button-in-header[data-v-31a6758f] {
283
+ &.with-button-in-header[data-v-0f9137cc] {
278
284
  width: calc(
279
285
  100% - var(--kds-dimension-component-width-1-5x)
280
286
  ); /* due to .sub-menu-select-header / .delete-column-button: width */
281
287
  }
282
288
  & .main-header {
283
- &[data-v-31a6758f] {
289
+ &[data-v-0f9137cc] {
284
290
  display: flex;
291
+ min-width: 0;
285
292
  }
286
- & .header-text-container[data-v-31a6758f] {
293
+ & .header-text-container[data-v-0f9137cc] {
294
+ min-width: 0;
287
295
  max-width: 100%;
288
296
  overflow: hidden;
289
297
  text-overflow: ellipsis;
290
298
  font: var(--kds-font-base-title-medium-strong);
291
299
  }
292
300
  }
293
- & .sub-header-text-container[data-v-31a6758f] {
301
+ & .sub-header-text-container[data-v-0f9137cc] {
294
302
  overflow: hidden;
295
303
  text-overflow: ellipsis;
296
304
  font: var(--kds-font-base-subtext-small);
297
305
  }
298
306
  }
299
- & .menu-button-hidden[data-v-31a6758f] {
300
- pointer-events: none;
301
- opacity: 0;
307
+ & .header-action-button {
308
+ &[data-v-0f9137cc] {
309
+ flex-shrink: 0;
310
+
311
+ /* Collapsed to zero width by default so it reserves no space in the
312
+ header; it only claims room once hovered/focused (or sorted), at
313
+ which point the column name shrinks/truncates to make room for it. */
314
+ }
315
+ & + .header-action-button[data-v-0f9137cc] {
316
+ margin-left: var(--kds-spacing-container-0-12x);
317
+ }
318
+ &.action-button-hidden[data-v-0f9137cc] {
319
+ width: 0;
320
+ overflow: hidden;
321
+ pointer-events: none;
322
+ opacity: 0;
323
+ }
302
324
  }
303
- & .delete-column-button[data-v-31a6758f] {
325
+ & .delete-column-button[data-v-0f9137cc] {
304
326
  display: flex;
305
327
  align-items: center;
306
328
  width: var(--kds-dimension-component-width-2x);
307
329
  }
308
330
  & .resize-handle-area {
309
- &[data-v-31a6758f] {
331
+ &[data-v-0f9137cc] {
310
332
  position: absolute;
311
333
 
312
334
  /* resize handle should range into top border */
@@ -332,26 +354,26 @@ tr {
332
354
  cursor: col-resize;
333
355
  opacity: 0;
334
356
  }
335
- & .resize-handle[data-v-31a6758f] {
357
+ & .resize-handle[data-v-0f9137cc] {
336
358
  border-right: var(--kds-border-resize-handle-hover);
337
359
  border-radius: var(--kds-border-radius-container-0-25x);
338
360
  }
339
- &.hover[data-v-31a6758f] {
361
+ &.hover[data-v-0f9137cc] {
340
362
  opacity: 1;
341
363
  }
342
- &.drag[data-v-31a6758f] {
364
+ &.drag[data-v-0f9137cc] {
343
365
  opacity: 1;
344
366
  }
345
367
  }
346
368
  }
347
369
 
348
370
  thead {
349
- &[data-v-fc0a0ecb] {
371
+ &[data-v-885a5768] {
350
372
  background-color: var(--kds-color-page-default);
351
373
  border-bottom: var(--kds-border-base-subtle);
352
374
  }
353
375
  & tr {
354
- &[data-v-fc0a0ecb] {
376
+ &[data-v-885a5768] {
355
377
  display: flex;
356
378
  height: 100%;
357
379
  transition:
@@ -359,51 +381,51 @@ thead {
359
381
  box-shadow 0.15s;
360
382
  }
361
383
  & th {
362
- &[data-v-fc0a0ecb] {
384
+ &[data-v-885a5768] {
363
385
  min-height: var(--kds-dimension-component-height-2-5x);
364
386
  max-height: var(--kds-dimension-component-height-5x);
365
387
  text-align: left;
366
388
  white-space: nowrap;
367
389
  }
368
- &.deletion-cell-spacer[data-v-fc0a0ecb] {
390
+ &.deletion-cell-spacer[data-v-885a5768] {
369
391
  width: var(--kds-dimension-component-width-2x);
370
392
  }
371
393
  &.select-cell {
372
- &[data-v-fc0a0ecb] {
394
+ &[data-v-885a5768] {
373
395
  display: flex;
374
396
  justify-content: center;
375
397
  width: var(--kds-dimension-component-width-2x);
376
398
  padding: var(--kds-spacing-container-0-75x);
377
399
  }
378
- & .select-checkbox[data-v-fc0a0ecb] {
400
+ & .select-checkbox[data-v-885a5768] {
379
401
  /* With this added padding the checkbox appears centered initially */
380
402
  padding: var(--kds-spacing-container-0-10x);
381
403
  }
382
404
  }
383
- &.new-column-head[data-v-fc0a0ecb] {
405
+ &.new-column-head[data-v-885a5768] {
384
406
  display: flex;
385
407
  flex-direction: column;
386
408
  justify-content: center;
387
409
  padding: var(--kds-spacing-container-0-5x);
388
410
  }
389
411
  }
390
- &[data-v-fc0a0ecb]:hover {
412
+ &[data-v-885a5768]:hover {
391
413
  outline: none;
392
414
  }
393
415
  }
394
- &.sub-menu-active tr[data-v-fc0a0ecb] {
416
+ &.sub-menu-active tr[data-v-885a5768] {
395
417
  padding-right: var(--kds-dimension-component-width-2x);
396
418
  }
397
419
  }
398
420
  .header-selection-overlay {
399
- &[data-v-fc0a0ecb] {
421
+ &[data-v-885a5768] {
400
422
  position: absolute;
401
423
  top: 0;
402
424
  height: 100%;
403
425
  pointer-events: none;
404
426
  border: var(--kds-border-action-selected-accent);
405
427
  }
406
- &.header-focused[data-v-fc0a0ecb] {
428
+ &.header-focused[data-v-885a5768] {
407
429
  border: var(--kds-border-action-focused);
408
430
  }
409
431
  }
@@ -623,7 +645,7 @@ table {
623
645
  }
624
646
  }
625
647
 
626
- .table-column-size-calculation[data-v-11d56c71] {
648
+ .table-column-size-calculation[data-v-f3ef2f4b] {
627
649
  position: absolute;
628
650
  top: -9999px;
629
651
  left: -9999px;