@redvars/peacock 4.3.0 → 4.3.1
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/dist/{cb-group-base-BBDUgxne.js → cb-group-base-DHwx72Gt.js} +3 -1
- package/dist/{cb-group-base-BBDUgxne.js.map → cb-group-base-DHwx72Gt.js.map} +1 -1
- package/dist/{cb-group-base-Bf7iOIGS.js → cb-group-base-DXnAJxEK.js} +2 -2
- package/dist/{cb-group-base-Bf7iOIGS.js.map → cb-group-base-DXnAJxEK.js.map} +1 -1
- package/dist/cb-group.js +5 -2
- package/dist/cb-group.js.map +1 -1
- package/dist/cb-rule.js +1 -1
- package/dist/condition-builder.js +2 -2
- package/dist/custom-elements.json +14 -0
- package/dist/index.js +2 -2
- package/dist/src/table/table.d.ts +5 -0
- package/dist/table.js +51 -8
- package/dist/table.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/condition-builder/cb-group-base.scss +5 -1
- package/src/condition-builder/cb-group-base.ts +1 -1
- package/src/condition-builder/cb-group.scss +4 -0
- package/src/table/table.scss +52 -2
- package/src/table/table.ts +20 -6
package/package.json
CHANGED
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
|
|
17
17
|
.body {
|
|
18
18
|
position: relative;
|
|
19
|
-
|
|
19
|
+
|
|
20
|
+
// The connector column shows only once there are two items to join.
|
|
21
|
+
&.connected {
|
|
22
|
+
padding-inline-start: var(--_connector-width);
|
|
23
|
+
}
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
.connector {
|
|
@@ -487,7 +487,7 @@ export class CbGroupBase extends LitElement {
|
|
|
487
487
|
@dragleave=${this._onDragLeave}
|
|
488
488
|
@drop=${this._onDrop}
|
|
489
489
|
>
|
|
490
|
-
<div class
|
|
490
|
+
<div class=${classMap({ body: true, connected: this._itemCount > 1 })}>
|
|
491
491
|
${this._renderConnector()}
|
|
492
492
|
<div class=${classMap({ items: true, empty: this._itemCount === 0 })}>
|
|
493
493
|
<slot @slotchange=${this._onSlotChange}></slot>
|
package/src/table/table.scss
CHANGED
|
@@ -48,10 +48,27 @@
|
|
|
48
48
|
// Wide rows scroll inside the table instead of widening the page around it.
|
|
49
49
|
contain: inline-size;
|
|
50
50
|
position: relative;
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
51
53
|
flex: 1 1 auto;
|
|
52
54
|
min-height: 0;
|
|
53
55
|
overflow: auto;
|
|
54
56
|
outline: none;
|
|
57
|
+
|
|
58
|
+
> * {
|
|
59
|
+
flex: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// The body takes the spare height, which its filler row passes on to the pinned edges.
|
|
63
|
+
> .body {
|
|
64
|
+
display: flex;
|
|
65
|
+
flex: 1 0 auto;
|
|
66
|
+
flex-direction: column;
|
|
67
|
+
|
|
68
|
+
> * {
|
|
69
|
+
flex: none;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
55
72
|
}
|
|
56
73
|
|
|
57
74
|
// ── Rows and cells ──────────────────────────────────────────────────────────
|
|
@@ -506,7 +523,13 @@
|
|
|
506
523
|
.loading-bar {
|
|
507
524
|
position: absolute;
|
|
508
525
|
inset-inline: 0;
|
|
509
|
-
|
|
526
|
+
// The progress track has a block margin of `--spacing-100`; offset it so the track lies on
|
|
527
|
+
// the header's bottom divider instead of floating above it.
|
|
528
|
+
bottom: calc(-1 * var(--spacing-100, 0.5rem));
|
|
529
|
+
// Above the pinned column groups, so it runs the full width of the table.
|
|
530
|
+
z-index: 2;
|
|
531
|
+
min-width: 0;
|
|
532
|
+
pointer-events: none;
|
|
510
533
|
--progress-height: 2px;
|
|
511
534
|
}
|
|
512
535
|
|
|
@@ -548,10 +571,37 @@
|
|
|
548
571
|
}
|
|
549
572
|
|
|
550
573
|
// The footer's top border already closes the table, so the last row needs no divider.
|
|
551
|
-
.has-footer .body .row:last-child .cell
|
|
574
|
+
.has-footer .body .row:last-child .cell,
|
|
575
|
+
.has-footer .body .row:has(+ .filler-row) .cell {
|
|
552
576
|
border-bottom-color: transparent;
|
|
553
577
|
}
|
|
554
578
|
|
|
579
|
+
// ── Filler row: the free height below the last row in a taller table ──────
|
|
580
|
+
|
|
581
|
+
.body .row.filler-row {
|
|
582
|
+
// Grows from zero: it shows only when the rows leave height free.
|
|
583
|
+
flex: 1 0 0;
|
|
584
|
+
min-block-size: 0;
|
|
585
|
+
pointer-events: none;
|
|
586
|
+
|
|
587
|
+
> .columns {
|
|
588
|
+
align-self: stretch;
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
// With a footer the last row drops its divider; the filler draws it while it has height.
|
|
593
|
+
.has-footer .body .row.filler-row {
|
|
594
|
+
background: linear-gradient(
|
|
595
|
+
var(--table-border-color),
|
|
596
|
+
var(--table-border-color)
|
|
597
|
+
)
|
|
598
|
+
top / 100% 1px no-repeat;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
.filler-cell {
|
|
602
|
+
flex-shrink: 0;
|
|
603
|
+
}
|
|
604
|
+
|
|
555
605
|
:host([striped]) .body .row:nth-child(even):not(.selected) {
|
|
556
606
|
--_cell-background: color-mix(
|
|
557
607
|
in srgb,
|
package/src/table/table.ts
CHANGED
|
@@ -1804,11 +1804,7 @@ export class Table extends LitElement {
|
|
|
1804
1804
|
this.onSortActivate(column, event.shiftKey)}
|
|
1805
1805
|
>
|
|
1806
1806
|
${renderHeaderLabel(column)}
|
|
1807
|
-
<wc-icon
|
|
1808
|
-
class="sort-icon"
|
|
1809
|
-
aria-hidden="true"
|
|
1810
|
-
name=${icon}
|
|
1811
|
-
></wc-icon>
|
|
1807
|
+
<wc-icon class="sort-icon" aria-hidden="true" name=${icon}></wc-icon>
|
|
1812
1808
|
${showPriority
|
|
1813
1809
|
? html`<span class="sort-priority" aria-hidden="true"
|
|
1814
1810
|
>${position + 1}</span
|
|
@@ -2246,7 +2242,25 @@ export class Table extends LitElement {
|
|
|
2246
2242
|
|
|
2247
2243
|
private renderBody(columns: GridColumn[], view: TableView) {
|
|
2248
2244
|
return html`<div class="body" role="rowgroup">
|
|
2249
|
-
${this.renderBodyRows(columns, view)}
|
|
2245
|
+
${this.renderBodyRows(columns, view)}${this.renderFillerRow(columns)}
|
|
2246
|
+
</div>`;
|
|
2247
|
+
}
|
|
2248
|
+
|
|
2249
|
+
/**
|
|
2250
|
+
* Takes the height the rows leave free in a taller table, so the pinned column edges
|
|
2251
|
+
* run down to the footer instead of stopping at the last row. Not part of the grid.
|
|
2252
|
+
*/
|
|
2253
|
+
private renderFillerRow(columns: GridColumn[]) {
|
|
2254
|
+
return html`<div
|
|
2255
|
+
class="row filler-row"
|
|
2256
|
+
aria-hidden="true"
|
|
2257
|
+
style="--_row-min-width: ${totalWidth(columns)}rem"
|
|
2258
|
+
>
|
|
2259
|
+
${renderRowGroups(
|
|
2260
|
+
columns,
|
|
2261
|
+
entry =>
|
|
2262
|
+
html`<div class="filler-cell" style=${cellStyle(entry)}></div>`,
|
|
2263
|
+
)}
|
|
2250
2264
|
</div>`;
|
|
2251
2265
|
}
|
|
2252
2266
|
|