@ethlete/components 1.0.0-next.69 → 1.0.0-next.71
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 +35 -0
- package/design/button.ts +57 -0
- package/design/form-field.ts +210 -0
- package/design/select.ts +110 -0
- package/fesm2022/ethlete-components-testing.mjs +3 -1
- package/fesm2022/ethlete-components-testing.mjs.map +1 -1
- package/fesm2022/ethlete-components.mjs +830 -108
- package/fesm2022/ethlete-components.mjs.map +1 -1
- package/package.json +20 -14
- package/src/lib/accordion/accordion-group.component.css +12 -0
- package/src/lib/accordion/accordion.component.css +185 -0
- package/src/lib/avatar/avatar-group.component.css +31 -0
- package/src/lib/avatar/avatar.component.css +75 -0
- package/src/lib/badge/badge.component.css +111 -0
- package/src/lib/banner/banner.component.css +94 -0
- package/src/lib/bracket/bracket-default-continue.component.css +29 -0
- package/src/lib/bracket/bracket-default-final-match.component.css +76 -0
- package/src/lib/bracket/bracket-default-match.component.css +21 -0
- package/src/lib/bracket/bracket-default-round-header.component.css +36 -0
- package/src/lib/bracket/bracket-participants.component.css +13 -0
- package/src/lib/bracket/bracket-pick-card.component.css +232 -0
- package/src/lib/bracket/bracket-rounds-list.component.css +75 -0
- package/src/lib/bracket/bracket-skeleton.component.css +55 -0
- package/src/lib/bracket/bracket.component.css +102 -0
- package/src/lib/bracket/layouts/swiss/bracket-swiss-styles.component.css +10 -0
- package/src/lib/breadcrumb/breadcrumb-overflow.component.css +38 -0
- package/src/lib/breadcrumb/breadcrumb.component.css +120 -0
- package/src/lib/button/button-properties-styles.component.css +143 -0
- package/src/lib/button/button.component.css +196 -0
- package/src/lib/button/fab.component.css +252 -0
- package/src/lib/button/icon-button.component.css +143 -0
- package/src/lib/button/split-button.component.css +77 -0
- package/src/lib/button/text-button.component.css +140 -0
- package/src/lib/button/window-control-button.component.css +158 -0
- package/src/lib/calendar/calendar-coarse-grid-styles.component.css +29 -0
- package/src/lib/calendar/calendar-comparison-band-styles.component.css +36 -0
- package/src/lib/calendar/calendar-week-numbers-styles.component.css +32 -0
- package/src/lib/calendar/calendar.component.css +366 -0
- package/src/lib/card/card.component.css +39 -0
- package/src/lib/carousel/carousel-autoplay-styles.component.css +166 -0
- package/src/lib/carousel/carousel-transition-styles.component.css +179 -0
- package/src/lib/carousel/carousel.component.css +142 -0
- package/src/lib/chart/bar-chart.component.css +176 -0
- package/src/lib/chart/chart-axis.component.css +40 -0
- package/src/lib/chart/chart-grid.component.css +6 -0
- package/src/lib/chart/chart-legend.component.css +46 -0
- package/src/lib/chart/chart-tooltip.component.css +34 -0
- package/src/lib/chart/line-chart-tooltip.component.css +51 -0
- package/src/lib/chart/line-chart.component.css +234 -0
- package/src/lib/chart/pie-chart.component.css +176 -0
- package/src/lib/chart/sankey-chart.component.css +221 -0
- package/src/lib/chip/chip.component.css +155 -0
- package/src/lib/command-palette/command-palette-item.component.css +94 -0
- package/src/lib/command-palette/command-palette.component.css +100 -0
- package/src/lib/description-list/description-list.component.css +77 -0
- package/src/lib/divider/divider.component.css +36 -0
- package/src/lib/empty-state/empty-state.component.css +73 -0
- package/src/lib/floating-action/floating-action-styles.component.css +78 -0
- package/src/lib/focus-ring/focus-ring-styles.component.css +13 -0
- package/src/lib/forms/cascader/cascader-breadcrumb-styles.component.css +98 -0
- package/src/lib/forms/cascader/cascader-panel.component.css +386 -0
- package/src/lib/forms/cascader/cascader-sheet-styles.component.css +241 -0
- package/src/lib/forms/cascader/cascader.component.css +52 -0
- package/src/lib/forms/checkbox/checkbox.component.css +247 -0
- package/src/lib/forms/choice-field/choice-field-card-styles.component.css +59 -0
- package/src/lib/forms/choice-field/choice-field.component.css +186 -0
- package/src/lib/forms/color-input/color-input.component.css +108 -0
- package/src/lib/forms/color-input/color-picker-panel.component.css +349 -0
- package/src/lib/forms/date-time/date-input/date-input.component.css +35 -0
- package/src/lib/forms/date-time/date-picker-panel.component.css +115 -0
- package/src/lib/forms/date-time/date-range-input/date-range-input.component.css +16 -0
- package/src/lib/forms/date-time/date-range-presets.component.css +60 -0
- package/src/lib/forms/date-time/date-time-input/date-time-input.component.css +151 -0
- package/src/lib/forms/date-time/date-time-range-input/date-time-range-input.component.css +121 -0
- package/src/lib/forms/date-time/duration-input/duration-input.component.css +88 -0
- package/src/lib/forms/date-time/range-input-shell-styles.component.css +55 -0
- package/src/lib/forms/date-time/time-input/time-input.component.css +35 -0
- package/src/lib/forms/date-time/time-range-input/time-range-input.component.css +16 -0
- package/src/lib/forms/dropzone/dropzone-item.component.css +51 -0
- package/src/lib/forms/dropzone/dropzone-preview-styles.component.css +67 -0
- package/src/lib/forms/dropzone/dropzone-readonly-styles.component.css +34 -0
- package/src/lib/forms/dropzone/dropzone.component.css +267 -0
- package/src/lib/forms/form-field/counter.component.css +25 -0
- package/src/lib/forms/form-field/form-field-control-suffix-styles.component.css +116 -0
- package/src/lib/forms/form-field/form-field-rich-text-styles.component.css +31 -0
- package/src/lib/forms/form-field/form-field-suffix-overlap-styles.component.css +66 -0
- package/src/lib/forms/form-field/form-field-text-shell-styles.component.css +312 -0
- package/src/lib/forms/form-field/form-field-textarea-styles.component.css +32 -0
- package/src/lib/forms/form-field/form-field.component.css +328 -0
- package/src/lib/forms/form-field/form-support-styles.component.css +102 -0
- package/src/lib/forms/form-field/headless/label.directive.css +25 -0
- package/src/lib/forms/form-field/hint.component.css +20 -0
- package/src/lib/forms/input/input.component.css +49 -0
- package/src/lib/forms/input/number-input.component.css +128 -0
- package/src/lib/forms/input/password-input.component.css +103 -0
- package/src/lib/forms/multi-language-rich-text-editor/multi-language-rich-text-editor.component.css +8 -0
- package/src/lib/forms/multi-language-rich-text-editor/tools/multi-language-rich-text-editor-language-tool.component.css +104 -0
- package/src/lib/forms/otp-input/otp-input.component.css +194 -0
- package/src/lib/forms/phone-input/phone-input.component.css +126 -0
- package/src/lib/forms/rating/rating.component.css +197 -0
- package/src/lib/forms/rich-text-editor/rich-text-content-styles.component.css +234 -0
- package/src/lib/forms/rich-text-editor/rich-text-editor-floating-toolbar.component.css +90 -0
- package/src/lib/forms/rich-text-editor/rich-text-editor-image-editor.component.css +172 -0
- package/src/lib/forms/rich-text-editor/rich-text-editor-link-editor.component.css +149 -0
- package/src/lib/forms/rich-text-editor/rich-text-editor-token-palette.component.css +18 -0
- package/src/lib/forms/rich-text-editor/rich-text-editor-token-popup.component.css +199 -0
- package/src/lib/forms/rich-text-editor/rich-text-editor.component.css +175 -0
- package/src/lib/forms/rich-text-editor/rich-text-viewer.component.css +6 -0
- package/src/lib/forms/rich-text-editor/tools/rich-text-editor-align-tool.component.css +5 -0
- package/src/lib/forms/rich-text-editor/tools/rich-text-editor-heading-tool.component.css +5 -0
- package/src/lib/forms/rich-text-editor/tools/rich-text-editor-image-styles.component.css +109 -0
- package/src/lib/forms/rich-text-editor/tools/rich-text-editor-table-styles.component.css +21 -0
- package/src/lib/forms/rich-text-editor/tools/rich-text-editor-table-tool.component.css +44 -0
- package/src/lib/forms/select/select-all-option.component.css +14 -0
- package/src/lib/forms/select/select-extras-styles.component.css +143 -0
- package/src/lib/forms/select/select-option-group.component.css +35 -0
- package/src/lib/forms/select/select-option-styles.component.css +137 -0
- package/src/lib/forms/select/select-panel.component.css +112 -0
- package/src/lib/forms/select/select.component.css +180 -0
- package/src/lib/forms/selection-card-styles.component.css +136 -0
- package/src/lib/forms/selection-list/checkbox-group/checkbox-group-select-all.component.css +89 -0
- package/src/lib/forms/selection-list/checkbox-group/checkbox-group.component.css +142 -0
- package/src/lib/forms/selection-list/checkbox-group/checkbox-option.component.css +153 -0
- package/src/lib/forms/selection-list/radio-group/radio-group.component.css +134 -0
- package/src/lib/forms/selection-list/radio-group/radio.component.css +137 -0
- package/src/lib/forms/selection-list/segmented-button-group/segmented-button-group.component.css +149 -0
- package/src/lib/forms/selection-list/segmented-button-group/segmented-button.component.css +180 -0
- package/src/lib/forms/slider/range-slider.component.css +348 -0
- package/src/lib/forms/slider/slider.component.css +342 -0
- package/src/lib/forms/switch/switch.component.css +187 -0
- package/src/lib/forms/tag-input/tag-input.component.css +54 -0
- package/src/lib/forms/textarea/textarea-autosize-styles.component.css +17 -0
- package/src/lib/forms/textarea/textarea.component.css +40 -0
- package/src/lib/grid/grid-debug.component.css +130 -0
- package/src/lib/grid/grid-item-default-actions.component.css +11 -0
- package/src/lib/grid/grid-item.component.css +172 -0
- package/src/lib/grid/grid.component.css +56 -0
- package/src/lib/icon/headless/icon-styles.component.css +7 -0
- package/src/lib/kbd/kbd.component.css +62 -0
- package/src/lib/loader/brand-loader/brand-loader.component.css +130 -0
- package/src/lib/loader/progress-bar/progress-bar.component.css +176 -0
- package/src/lib/loader/spinner/spinner.component.css +216 -0
- package/src/lib/masonry/masonry-styles.component.css +84 -0
- package/src/lib/match/match-card.component.css +441 -0
- package/src/lib/match/match-participant.component.css +137 -0
- package/src/lib/match/match-score.component.css +74 -0
- package/src/lib/menu/menu-group-label.component.css +12 -0
- package/src/lib/menu/menu-item-shortcut.component.css +10 -0
- package/src/lib/menu/menu-item-submenu-icon.component.css +18 -0
- package/src/lib/menu/menu-item.component.css +32 -0
- package/src/lib/menu/menu-search-styles.component.css +56 -0
- package/src/lib/menu/menu-selection-item.component.css +88 -0
- package/src/lib/menu/menu-separator.component.css +9 -0
- package/src/lib/menu/menu.component.css +296 -0
- package/src/lib/notification/notification-stack.component.css +114 -0
- package/src/lib/notification/notification.component.css +271 -0
- package/src/lib/overlay/alert-dialog/alert-dialog.component.css +45 -0
- package/src/lib/overlay/floating-panel-styles.component.css +71 -0
- package/src/lib/overlay/floating-tip-styles.component.css +78 -0
- package/src/lib/overlay/overlay-container.component.css +167 -0
- package/src/lib/overlay/overlay-main-styles.component.css +105 -0
- package/src/lib/overlay/overlay-template-host.component.css +7 -0
- package/src/lib/overlay/routing/overlay-route-header-template-outlet.component.css +36 -0
- package/src/lib/overlay/routing/overlay-router-outlet.component.css +207 -0
- package/src/lib/overlay/routing/overlay-shared-route-template-outlet.component.css +5 -0
- package/src/lib/overlay/sidebar/overlay-sidebar.component.css +16 -0
- package/src/lib/overlay/strategies/anchored-dialog-styles.component.css +51 -0
- package/src/lib/overlay/strategies/dialog-styles.component.css +50 -0
- package/src/lib/overlay/strategies/full-screen-dialog-styles.component.css +83 -0
- package/src/lib/overlay/strategies/overlay-arrow-styles.component.css +112 -0
- package/src/lib/overlay/strategies/overlay-origin-clone.component.css +63 -0
- package/src/lib/overlay/strategies/sheet-styles.component.css +143 -0
- package/src/lib/pagination/page-size-select.component.css +102 -0
- package/src/lib/pagination/pagination.component.css +192 -0
- package/src/lib/picture/picture.component.css +66 -0
- package/src/lib/progress-steps/progress-step.component.css +187 -0
- package/src/lib/progress-steps/progress-steps.component.css +26 -0
- package/src/lib/query-error/query-error.component.css +21 -0
- package/src/lib/scheduler/scheduler-agenda-view.component.css +97 -0
- package/src/lib/scheduler/scheduler-appointment-drag-styles.component.css +56 -0
- package/src/lib/scheduler/scheduler-appointment-styles.component.css +111 -0
- package/src/lib/scheduler/scheduler-edit-color.component.css +16 -0
- package/src/lib/scheduler/scheduler-edit-surface-actions.component.css +14 -0
- package/src/lib/scheduler/scheduler-edit-surface-breadcrumb.component.css +26 -0
- package/src/lib/scheduler/scheduler-edit-surface-children.component.css +57 -0
- package/src/lib/scheduler/scheduler-edit-surface-fields.component.css +11 -0
- package/src/lib/scheduler/scheduler-edit-surface-footer.component.css +7 -0
- package/src/lib/scheduler/scheduler-edit-surface-header.component.css +15 -0
- package/src/lib/scheduler/scheduler-edit-time-range.component.css +11 -0
- package/src/lib/scheduler/scheduler-month-view.component.css +143 -0
- package/src/lib/scheduler/scheduler-time-grid-view.component.css +260 -0
- package/src/lib/scheduler/scheduler.component.css +87 -0
- package/src/lib/scrollable/headless/scrollable-buttons.component.css +122 -0
- package/src/lib/scrollable/headless/scrollable-footer.css +25 -0
- package/src/lib/scrollable/headless/scrollable-masks.component.css +112 -0
- package/src/lib/scrollable/headless/scrollable-navigation.component.css +94 -0
- package/src/lib/scrollable/scrollable.component.css +192 -0
- package/src/lib/scrollbar/scrollbar.component.css +110 -0
- package/src/lib/skeleton/skeleton.component.css +108 -0
- package/src/lib/standings/standings-pick.component.css +172 -0
- package/src/lib/standings/standings.component.css +201 -0
- package/src/lib/stat-tile/stat-tile-sparkline.component.css +49 -0
- package/src/lib/stat-tile/stat-tile.component.css +111 -0
- package/src/lib/stream/pip/pip-chrome.component.css +96 -0
- package/src/lib/stream/pip/pip-player.component.css +40 -0
- package/src/lib/stream/pip/pip-window.component.css +222 -0
- package/src/lib/stream/stream-manager-styles.component.css +10 -0
- package/src/lib/stream/stream-overlay-card-styles.component.css +43 -0
- package/src/lib/stream/stream-player-slot-styles.component.css +14 -0
- package/src/lib/table/table-column-chooser.component.css +17 -0
- package/src/lib/table/table-column-menu-trigger.component.css +31 -0
- package/src/lib/table/table-detail-styles.component.css +103 -0
- package/src/lib/table/table-drag-scroll-styles.component.css +18 -0
- package/src/lib/table/table-expander-cell.component.css +58 -0
- package/src/lib/table/table-filter-trigger.component.css +44 -0
- package/src/lib/table/table-group-header-row.component.css +38 -0
- package/src/lib/table/table-inline-edit-styles.component.css +20 -0
- package/src/lib/table/table-page-sticky-header-styles.component.css +77 -0
- package/src/lib/table/table-reorder-overlay.component.css +42 -0
- package/src/lib/table/table-resize-grip.component.css +65 -0
- package/src/lib/table/table-row-box-styles.component.css +260 -0
- package/src/lib/table/table-select-cell.component.css +89 -0
- package/src/lib/table/table-skeleton-rows.component.css +19 -0
- package/src/lib/table/table-sort-priority-styles.component.css +15 -0
- package/src/lib/table/table-sticky-columns-styles.component.css +80 -0
- package/src/lib/table/table-virtual-scroll-styles.component.css +9 -0
- package/src/lib/table/table.component.css +829 -0
- package/src/lib/tabs/nav-tabs/nav-tab-link-styles.component.css +33 -0
- package/src/lib/tabs/tab-bar-styles.component.css +173 -0
- package/src/lib/tabs/tab-scale-styles.component.css +61 -0
- package/src/lib/time-picker/time-picker.component.css +220 -0
- package/src/lib/timeline/timeline-item.component.css +116 -0
- package/src/lib/timeline/timeline.component.css +7 -0
- package/src/lib/toggletip/toggletip.component.css +83 -0
- package/src/lib/toolbar/toolbar.component.css +40 -0
- package/src/lib/tooltip/tooltip.component.css +64 -0
- package/src/lib/tree/tree.component.css +221 -0
- package/types/ethlete-components-testing.d.ts +1 -1
- package/types/ethlete-components.d.ts +172 -7
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
@property --et-table-sticky-header-offset {
|
|
3
|
+
syntax: '<length>';
|
|
4
|
+
inherits: true;
|
|
5
|
+
initial-value: 0px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@property --_et-table-inline-scroll {
|
|
9
|
+
syntax: '<length>';
|
|
10
|
+
inherits: true;
|
|
11
|
+
initial-value: 0px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@property --_et-table-inline-max-scroll {
|
|
15
|
+
syntax: '<length>';
|
|
16
|
+
inherits: true;
|
|
17
|
+
initial-value: 0px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* The page scrolls this table, so the host scrolls nothing - but it keeps the grid and its
|
|
21
|
+
`minmax(0, 1fr)` column. As a plain block its inline min-content size would be the header strip's
|
|
22
|
+
whole track width, and no ancestor can be narrower than that: a window under it scrolls the page
|
|
23
|
+
sideways instead of narrowing the table. */
|
|
24
|
+
.et-table-host--page-sticky-header {
|
|
25
|
+
grid-template-rows: none;
|
|
26
|
+
overflow: visible;
|
|
27
|
+
position: relative;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.et-table-header-strip {
|
|
31
|
+
position: sticky;
|
|
32
|
+
inset-block-start: var(--et-table-sticky-header-offset);
|
|
33
|
+
/* The strip is a grid item, and the column it sits in has a 0 floor. Without this it takes its
|
|
34
|
+
content's width instead and hangs out past the table, rather than clipping the columns that
|
|
35
|
+
scroll behind it. */
|
|
36
|
+
min-inline-size: 0;
|
|
37
|
+
overflow: clip;
|
|
38
|
+
z-index: 4;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.et-table-header {
|
|
42
|
+
transform: translateX(calc(-1 * var(--_et-table-inline-scroll)));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* The strip pins these cells, so they do not pin themselves. The gap an appearance leaves under the
|
|
46
|
+
header (`cards`) leaves with them: the strip is pinned over the rows and paints its own surface, so
|
|
47
|
+
it has to end on the header's rule instead of covering the rows for the gap's height as well. The
|
|
48
|
+
body below carries that gap - see the scroller. */
|
|
49
|
+
.et-table-header .et-table-header-cell {
|
|
50
|
+
position: relative;
|
|
51
|
+
inset-block-start: auto;
|
|
52
|
+
margin-block-end: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Padding rather than a margin on the header, so the busy bar's negative offset lands inside the
|
|
56
|
+
scrollport instead of in unreachable overflow above it.
|
|
57
|
+
|
|
58
|
+
The bar is the host's: `scrollbar-color` inherits on its own, `scrollbar-width` does not, and a
|
|
59
|
+
table that hides its own bar (or thins it) must not get the platform's one back in this layout. */
|
|
60
|
+
.et-table-scroller {
|
|
61
|
+
padding-block-start: var(--_et-table-header-gap-block);
|
|
62
|
+
overflow-x: auto;
|
|
63
|
+
scrollbar-width: inherit;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.et-table-header .et-table-header-cell.et-table-sticky-start {
|
|
67
|
+
transform: translateX(var(--_et-table-inline-scroll));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.et-table-header .et-table-header-cell.et-table-sticky-end {
|
|
71
|
+
transform: translateX(calc(var(--_et-table-inline-scroll) - var(--_et-table-inline-max-scroll)));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.et-table-host--page-sticky-header:dir(rtl) .et-table-header .et-table-header-cell.et-table-sticky-end {
|
|
75
|
+
transform: translateX(calc(var(--_et-table-inline-scroll) + var(--_et-table-inline-max-scroll)));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
/* The affordance is put on the table host by the feature, so only a reorderable table's headers
|
|
3
|
+
advertise the grab — pinned columns are excluded, they can't be dragged. */
|
|
4
|
+
.et-table-host--reorderable
|
|
5
|
+
.et-table-header-cell:not(
|
|
6
|
+
.et-table-sticky-start,
|
|
7
|
+
.et-table-sticky-end,
|
|
8
|
+
.et-table-select-cell,
|
|
9
|
+
.et-table-expander-cell
|
|
10
|
+
) {
|
|
11
|
+
cursor: grab;
|
|
12
|
+
-webkit-user-select: none;
|
|
13
|
+
user-select: none;
|
|
14
|
+
-webkit-touch-callout: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* The source header stays in place, dimmed, while its floating ghost is dragged. */
|
|
18
|
+
.et-table-header-cell:where(.et-table-header-cell--dragging) {
|
|
19
|
+
cursor: grabbing;
|
|
20
|
+
opacity: 0.4;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* Floating copy of the dragged header, following the pointer (offset so it clears a finger/cursor). */
|
|
24
|
+
.et-table-drag-ghost {
|
|
25
|
+
position: fixed;
|
|
26
|
+
z-index: 10;
|
|
27
|
+
transform: translate(12px, 8px);
|
|
28
|
+
max-inline-size: 256px;
|
|
29
|
+
padding: var(--et-table-cell-padding-block) var(--et-table-cell-padding-inline);
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
font-size: 14px;
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
text-overflow: ellipsis;
|
|
35
|
+
color: var(--et-surface-color-solid, CanvasText);
|
|
36
|
+
background: var(--et-surface-background-solid, Canvas);
|
|
37
|
+
border: 1px solid var(--et-surface-border-solid, rgb(128 128 128 / 0.3));
|
|
38
|
+
border-radius: 6px;
|
|
39
|
+
box-shadow: 0 8px 24px color-mix(in srgb, var(--et-surface-interaction-solid, black) 18%, transparent);
|
|
40
|
+
pointer-events: none;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
/* The stamped host is layout-transparent, like the other header adornments: as a box it would be a
|
|
3
|
+
zero-width flex item in the header cell, and the cell's `gap` would then reserve space after the
|
|
4
|
+
last real control. The grip inside is absolutely positioned, so it keeps its containing block
|
|
5
|
+
(the sticky header cell) either way. */
|
|
6
|
+
et-table-resize-grip {
|
|
7
|
+
display: contents;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* A hairline at the header cell's trailing edge that strengthens to the accent on hover. The header
|
|
11
|
+
cell is position:sticky, so this positions against it. */
|
|
12
|
+
.et-table-resize-grip {
|
|
13
|
+
position: absolute;
|
|
14
|
+
inset-block: 0;
|
|
15
|
+
inset-inline-end: 0;
|
|
16
|
+
inline-size: 9px;
|
|
17
|
+
z-index: 1;
|
|
18
|
+
cursor: col-resize;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* On the boundary, not a few pixels inside it: the column rules of `appearance="grid"`, and any rule an
|
|
22
|
+
app draws at a pinned column's edge, sit at the trailing edge of this same cell. A grip off them by
|
|
23
|
+
3px reads as a second, misaligned line rather than as the handle of that boundary. */
|
|
24
|
+
.et-table-resize-grip::after {
|
|
25
|
+
content: '';
|
|
26
|
+
position: absolute;
|
|
27
|
+
inset-block: 20%;
|
|
28
|
+
inset-inline-end: 0;
|
|
29
|
+
inline-size: 1px;
|
|
30
|
+
background: var(--et-surface-border-solid, rgb(128 128 128 / 0.4));
|
|
31
|
+
transition: background 120ms ease;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@media (hover: hover) {
|
|
35
|
+
.et-table-resize-grip:hover::after {
|
|
36
|
+
inset-block: 0;
|
|
37
|
+
inline-size: 2px;
|
|
38
|
+
background: var(--et-theme-color-primary-solid, currentColor);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.et-table-resize-grip:focus-visible {
|
|
43
|
+
outline: 2px solid var(--et-theme-color-primary-solid, currentColor);
|
|
44
|
+
outline-offset: -2px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.et-table-resize-grip:focus-visible::after {
|
|
48
|
+
inset-block: 0;
|
|
49
|
+
inline-size: 2px;
|
|
50
|
+
background: var(--et-theme-color-primary-solid, currentColor);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Fingers can't hit a 9px strip: widen the hit area inward on coarse pointers (the header cell clips
|
|
54
|
+
overflow, so it can't extend past the trailing edge) and thicken the hairline so it reads as a grip. */
|
|
55
|
+
@media (pointer: coarse) {
|
|
56
|
+
.et-table-resize-grip {
|
|
57
|
+
inline-size: 28px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.et-table-resize-grip::after {
|
|
61
|
+
inset-block: 15%;
|
|
62
|
+
inline-size: 2px;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
/* A row with a box of its own, in place of the layout-transparent default. `subgrid` is what keeps the
|
|
3
|
+
cells in the table's own column tracks, so every column still lines up across the header, the rows
|
|
4
|
+
and the footer — the same shape the detail row already uses inside this grid.
|
|
5
|
+
|
|
6
|
+
`z-index: 0` makes it a stacking context, so a cell that lifts itself over the row's link cannot
|
|
7
|
+
also rise over the sticky header.
|
|
8
|
+
|
|
9
|
+
Two classes, to outweigh the base sheet's `display: contents`: this sheet stays mounted while the
|
|
10
|
+
table's own style is removed with the last table and re-appended after it by the next one. */
|
|
11
|
+
.et-table-row.et-table-row--box {
|
|
12
|
+
grid-column: 1 / -1;
|
|
13
|
+
display: grid;
|
|
14
|
+
grid-template-columns: subgrid;
|
|
15
|
+
position: relative;
|
|
16
|
+
z-index: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* The row's box carries the surface, the border and the radius; its cells keep their padding and stay
|
|
20
|
+
transparent, so the card paints through them. The leading and trailing cell take the row's own
|
|
21
|
+
corner radii, so a cell background — hover, a selected row, a pinned column — cannot square off a
|
|
22
|
+
corner, whichever column happens to be first after a reorder or a hidden column. */
|
|
23
|
+
.et-table-row {
|
|
24
|
+
margin-block-end: var(--_et-table-row-gap-block);
|
|
25
|
+
background: var(--_et-table-row-paint);
|
|
26
|
+
border-radius: var(--_et-table-row-corner);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* A card is a surface, not a tint: `etTableCardSurface` puts the theme one elevation above the table's
|
|
30
|
+
on the row, and the row paints that theme's background. Every knob naming the row's paint therefore
|
|
31
|
+
has to be declared here rather than in the appearance block - a `var()` in the block would resolve
|
|
32
|
+
against the host, which is the surface the card is meant to stand off. */
|
|
33
|
+
.et-table-row--card {
|
|
34
|
+
--_et-table-row-paint: var(--et-surface-background-solid, Canvas);
|
|
35
|
+
--_et-table-row-surface: var(--_et-table-row-paint);
|
|
36
|
+
--_et-table-stripe-solid: var(--_et-table-row-paint);
|
|
37
|
+
--_et-table-row-hover-solid: color-mix(
|
|
38
|
+
in srgb,
|
|
39
|
+
var(--et-surface-interaction-solid, gray) 8%,
|
|
40
|
+
var(--_et-table-row-paint)
|
|
41
|
+
);
|
|
42
|
+
--_et-table-row-pressed-solid: color-mix(
|
|
43
|
+
in srgb,
|
|
44
|
+
var(--et-surface-interaction-solid, gray) 16%,
|
|
45
|
+
var(--_et-table-row-paint)
|
|
46
|
+
);
|
|
47
|
+
--_et-table-inert-row-hover-solid: var(--_et-table-row-paint);
|
|
48
|
+
color: var(--et-surface-color-solid, CanvasText);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* No surface a level above the table's to raise the card onto - a theme-less app, or a table already on
|
|
52
|
+
top of the ladder (see etTableCardSurface). Back to a tint, so the card is still marked off from the
|
|
53
|
+
table under it. Only the paint needs saying: every knob above reads it. */
|
|
54
|
+
.et-table-row--card:where(.et-table-row--card-tint) {
|
|
55
|
+
--_et-table-row-paint: var(--_et-table-band);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* The card's 1px ring, drawn out of flow instead of as a border on the row, and that is load-bearing: a
|
|
59
|
+
border insets the row's content box, so its subgrid tracks land a pixel off the header's - and a
|
|
60
|
+
pinned cell, whose sticky offset is measured from the header, then stops a pixel short of the next
|
|
61
|
+
one and leaves a seam that scrolled text shows through.
|
|
62
|
+
|
|
63
|
+
Above the cells (which are opaque where they are pinned) but inside the row's own stacking context,
|
|
64
|
+
so it still passes under the sticky header. An outline would not do: Chrome paints it with the row's
|
|
65
|
+
own background, under the cells. */
|
|
66
|
+
.et-table-host:where([data-appearance='cards']) .et-table-row--box::after {
|
|
67
|
+
content: '';
|
|
68
|
+
position: absolute;
|
|
69
|
+
inset: 0;
|
|
70
|
+
z-index: 4;
|
|
71
|
+
border: 1px solid var(--et-table-row-border-color, var(--et-surface-border-solid, rgb(128 128 128 / 0.3)));
|
|
72
|
+
border-radius: inherit;
|
|
73
|
+
pointer-events: none;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* The edge mark is an outer `box-shadow`, so it reaches about 7px past the pinned cell on every side -
|
|
77
|
+
and on `cards` the sides above and below a cell are the gaps between the cards. Clipped to the cell's
|
|
78
|
+
block extent and let out sideways only, since a mark laid across a gap outlives the rounded card end.
|
|
79
|
+
Body cells only: header and footer cells compose a block-axis shadow in the same property, which is
|
|
80
|
+
meant to fall on the rows passing under them. */
|
|
81
|
+
.et-table-cell:where(.et-table-sticky-start, .et-table-sticky-end) {
|
|
82
|
+
clip-path: var(--_et-table-sticky-clip);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* The header is a label row over the cards, so its rule must not run into the first one's border.
|
|
86
|
+
A margin under the header cells rather than a grid `row-gap`, which would space out every row
|
|
87
|
+
kind - the same reason the cards themselves are spaced by a margin. */
|
|
88
|
+
.et-table-header-cell {
|
|
89
|
+
margin-block-end: var(--_et-table-header-gap-block);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* A card that neither links nor takes clicks has nothing to react to, so it does not light up under
|
|
93
|
+
the pointer. Set as the tint rather than as a background, so a selected row keeps its accent. */
|
|
94
|
+
.et-table-row:not(.et-table-row--interactive, .et-table-row--link) {
|
|
95
|
+
--_et-table-row-hover: var(--_et-table-inert-row-hover);
|
|
96
|
+
--_et-table-row-hover-solid: var(--_et-table-inert-row-hover-solid);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.et-table-row > :first-child {
|
|
100
|
+
border-start-start-radius: inherit;
|
|
101
|
+
border-end-start-radius: inherit;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.et-table-row > .et-table-cell:nth-last-child(1 of .et-table-cell) {
|
|
105
|
+
border-start-end-radius: inherit;
|
|
106
|
+
border-end-end-radius: inherit;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* A card's leading and trailing corners belong to whichever box is holding that edge, which stops
|
|
110
|
+
being the row's own end as soon as a column is pinned: the row's box - its radius and its ring -
|
|
111
|
+
scrolls away with the columns, and the pinned cell left at the edge squares the card off against the
|
|
112
|
+
table's surface. So this layer paints the corner standing at each edge: the surface outside the
|
|
113
|
+
radius, the ring's arc through it, and the edge line between the two arcs. At rest that is the
|
|
114
|
+
geometry the row's own corner already has, so a table that never scrolls looks unchanged.
|
|
115
|
+
|
|
116
|
+
A child of the row, not of a cell, and that is load-bearing: a pinned cell carries a `z-index`, so it
|
|
117
|
+
is a stacking context, and a corner drawn inside one can never rise over the row's ring - the ring
|
|
118
|
+
then runs its straight edge out past the arc. Here the corner competes with the ring directly.
|
|
119
|
+
|
|
120
|
+
The layer spans the row's whole scroll extent, so each corner can hold its place at a pinned edge
|
|
121
|
+
with `position: sticky` for the entire range - the same shape the scroll fades use. */
|
|
122
|
+
.et-table-card-corners {
|
|
123
|
+
position: absolute;
|
|
124
|
+
inset: 0;
|
|
125
|
+
z-index: 5;
|
|
126
|
+
display: flex;
|
|
127
|
+
justify-content: space-between;
|
|
128
|
+
pointer-events: none;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* Physical positions: the corner box is placed logically, but a gradient cannot be. */
|
|
132
|
+
.et-table-host:where([data-appearance='cards']) .et-table-card-corners::before,
|
|
133
|
+
.et-table-host:where([data-appearance='cards']) .et-table-card-corners::after {
|
|
134
|
+
--_et-table-card-radius: var(--et-table-row-radius, 10px);
|
|
135
|
+
--_et-table-card-edge: var(--et-table-row-border-color, var(--et-surface-border-solid, rgb(128 128 128 / 0.3)));
|
|
136
|
+
|
|
137
|
+
content: '';
|
|
138
|
+
flex: 0 0 auto;
|
|
139
|
+
inline-size: var(--_et-table-card-radius);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* Only an edge that actually pins a column needs a corner held at the viewport: everywhere else the
|
|
143
|
+
card's own end is the corner, and it is meant to scroll away with the columns. */
|
|
144
|
+
.et-table-row:has(.et-table-sticky-start) .et-table-card-corners::before {
|
|
145
|
+
position: sticky;
|
|
146
|
+
inset-inline-start: 0;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.et-table-row:has(.et-table-sticky-end) .et-table-card-corners::after {
|
|
150
|
+
position: sticky;
|
|
151
|
+
inset-inline-end: 0;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.et-table-host:where([data-appearance='cards']) .et-table-card-corners::before {
|
|
155
|
+
background:
|
|
156
|
+
radial-gradient(
|
|
157
|
+
circle at 100% 100%,
|
|
158
|
+
transparent calc(var(--_et-table-card-radius) - 1.2px),
|
|
159
|
+
var(--_et-table-card-edge) calc(var(--_et-table-card-radius) - 0.8px)
|
|
160
|
+
calc(var(--_et-table-card-radius) - 0.2px),
|
|
161
|
+
var(--_et-table-card-outside) calc(var(--_et-table-card-radius) + 0.2px)
|
|
162
|
+
)
|
|
163
|
+
0 0 / 100% var(--_et-table-card-radius) no-repeat,
|
|
164
|
+
radial-gradient(
|
|
165
|
+
circle at 100% 0,
|
|
166
|
+
transparent calc(var(--_et-table-card-radius) - 1.2px),
|
|
167
|
+
var(--_et-table-card-edge) calc(var(--_et-table-card-radius) - 0.8px)
|
|
168
|
+
calc(var(--_et-table-card-radius) - 0.2px),
|
|
169
|
+
var(--_et-table-card-outside) calc(var(--_et-table-card-radius) + 0.2px)
|
|
170
|
+
)
|
|
171
|
+
0 100% / 100% var(--_et-table-card-radius) no-repeat,
|
|
172
|
+
linear-gradient(var(--_et-table-card-edge), var(--_et-table-card-edge)) 0 0 / 1px 100% no-repeat;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.et-table-host:where([data-appearance='cards']) .et-table-card-corners::after {
|
|
176
|
+
background:
|
|
177
|
+
radial-gradient(
|
|
178
|
+
circle at 0 100%,
|
|
179
|
+
transparent calc(var(--_et-table-card-radius) - 1.2px),
|
|
180
|
+
var(--_et-table-card-edge) calc(var(--_et-table-card-radius) - 0.8px)
|
|
181
|
+
calc(var(--_et-table-card-radius) - 0.2px),
|
|
182
|
+
var(--_et-table-card-outside) calc(var(--_et-table-card-radius) + 0.2px)
|
|
183
|
+
)
|
|
184
|
+
0 0 / 100% var(--_et-table-card-radius) no-repeat,
|
|
185
|
+
radial-gradient(
|
|
186
|
+
circle at 0 0,
|
|
187
|
+
transparent calc(var(--_et-table-card-radius) - 1.2px),
|
|
188
|
+
var(--_et-table-card-edge) calc(var(--_et-table-card-radius) - 0.8px)
|
|
189
|
+
calc(var(--_et-table-card-radius) - 0.2px),
|
|
190
|
+
var(--_et-table-card-outside) calc(var(--_et-table-card-radius) + 0.2px)
|
|
191
|
+
)
|
|
192
|
+
0 100% / 100% var(--_et-table-card-radius) no-repeat,
|
|
193
|
+
linear-gradient(var(--_et-table-card-edge), var(--_et-table-card-edge)) 100% 0 / 1px 100% no-repeat;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/* One real anchor per row, stretched over the row box: middle click, Ctrl/Cmd-click, "open in a new
|
|
197
|
+
tab" and "copy link address" are the browser's again, and the row stays one link in the
|
|
198
|
+
accessibility tree and one stop in the tab order. It holds no text — the identity cell names it —
|
|
199
|
+
so nothing about the row's own content changes.
|
|
200
|
+
|
|
201
|
+
Three layers inside the row's own stacking context (see `.et-table-row--box`): a pinned cell at 1,
|
|
202
|
+
so scrolled cells pass behind it; the link at 2, so the whole row takes the click and not just the
|
|
203
|
+
columns that happen to scroll; and a cell holding its own control at 3, so that control still gets
|
|
204
|
+
its own clicks. */
|
|
205
|
+
.et-table-row-link {
|
|
206
|
+
position: absolute;
|
|
207
|
+
inset: 0;
|
|
208
|
+
z-index: 2;
|
|
209
|
+
cursor: pointer;
|
|
210
|
+
border-radius: var(--_et-table-row-corner);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/* The row's ring marks the whole row, which is what the link covers. It sits well inside the card so
|
|
214
|
+
it reads as a ring of its own rather than as a second, doubled card border.
|
|
215
|
+
|
|
216
|
+
Drawn on the row's box and not on the link, and that is load-bearing: the link is positioned with a
|
|
217
|
+
z-index, so it is its own stacking context and an `outline` on it - or any pseudo inside it - paints
|
|
218
|
+
at the link's own level, which is 2. The utility cells sit at 3 and are opaque where they are
|
|
219
|
+
pinned, so each one covered whichever end of the ring it held and the ring read as two loose lines
|
|
220
|
+
with no ends. Here it is a layer of the row box instead, above the cells and above the card's ring
|
|
221
|
+
at 4. */
|
|
222
|
+
.et-table-row-link:focus-visible {
|
|
223
|
+
outline: none;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.et-table-row--box:has(.et-table-row-link:focus-visible)::before {
|
|
227
|
+
content: '';
|
|
228
|
+
position: absolute;
|
|
229
|
+
inset: 4px;
|
|
230
|
+
z-index: 5;
|
|
231
|
+
border: 2px solid var(--et-theme-color-primary-solid, currentColor);
|
|
232
|
+
border-radius: max(0px, calc(var(--_et-table-row-corner, 0px) - 4px));
|
|
233
|
+
pointer-events: none;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/* Cells that hold their own controls stay above the stretched link, so the control keeps the click: the
|
|
237
|
+
utility cells always, a column that says so with `interactive`, and the one cell in edit mode. */
|
|
238
|
+
.et-table-row--link
|
|
239
|
+
.et-table-cell:where(
|
|
240
|
+
.et-table-select-cell,
|
|
241
|
+
.et-table-expander-cell,
|
|
242
|
+
.et-table-cell--interactive,
|
|
243
|
+
.et-table-cell--editing
|
|
244
|
+
) {
|
|
245
|
+
z-index: 3;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/* `relative` only where the cell is not pinned: it outweighs the pinned cell's `sticky`, so applying it
|
|
249
|
+
to a pinned cell unpins it. The utility cells then scroll away with the rows and let scrolled content
|
|
250
|
+
show through the strip they were holding at the pinned column's edge. */
|
|
251
|
+
.et-table-row--link
|
|
252
|
+
.et-table-cell:where(
|
|
253
|
+
.et-table-select-cell,
|
|
254
|
+
.et-table-expander-cell,
|
|
255
|
+
.et-table-cell--interactive,
|
|
256
|
+
.et-table-cell--editing
|
|
257
|
+
):not(.et-table-sticky-start, .et-table-sticky-end) {
|
|
258
|
+
position: relative;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
/* The stamped component host is layout-transparent, so the checkbox itself is the cell's flex item
|
|
3
|
+
and picks up its `align-items: center`. As a block box the host would instead establish a line
|
|
4
|
+
box and the inline-flex checkbox would sit on its text baseline — a few px above centre. */
|
|
5
|
+
et-table-select-cell,
|
|
6
|
+
et-table-select-all-cell {
|
|
7
|
+
display: contents;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* Leading checkbox column for multi-selection. The checkbox's own size token (inherited) is dialed
|
|
11
|
+
down so it sits in scale with the table text rather than the 20px form default. */
|
|
12
|
+
.et-table-select-cell {
|
|
13
|
+
justify-content: center;
|
|
14
|
+
padding: 0 4px;
|
|
15
|
+
--et-checkbox-size: 16px;
|
|
16
|
+
|
|
17
|
+
/* `et-checkbox`'s own click handler lives on its host, not on this cell - stretching the host to
|
|
18
|
+
the cell's full box (rather than sizing it to the 16px visual box) is what makes the whole
|
|
19
|
+
column tappable, matching --et-table-select-width. The visual box stays centered and 16px;
|
|
20
|
+
dropping the block padding here lets `align-self: stretch` reach the full (grid-stretched)
|
|
21
|
+
row height instead of just the padded-down content box. */
|
|
22
|
+
et-checkbox {
|
|
23
|
+
flex: 1;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
align-self: stretch;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* The cell clips its overflow like every other one, so the checkbox's own ring - 3px outside it by
|
|
30
|
+
default - would be cut off on all four sides. Pulled inside instead, and set on the checkbox rather
|
|
31
|
+
than on the cell: `et-focus-ring` declares the offset on itself, and a property an element declares
|
|
32
|
+
beats one it inherits. */
|
|
33
|
+
.et-table-select-cell et-checkbox {
|
|
34
|
+
--_et-focus-ring-offset: -2px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Selected rows carry a persistent accent tint (opaque variant on pinned cells, like stripe/hover).
|
|
38
|
+
`.et-table-row.et-table-row--selected` outweighs the base sheet's stripe, hover and pressed rules
|
|
39
|
+
instead of tying with them: Angular re-appends that sheet after this one when a table mounts again. */
|
|
40
|
+
.et-table-row.et-table-row--selected {
|
|
41
|
+
--_et-table-selected-accent: var(--et-table-row-selected-tint, var(--et-theme-color-primary-solid, gray));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.et-table-row.et-table-row--selected .et-table-cell {
|
|
45
|
+
background: color-mix(in srgb, var(--_et-table-selected-accent) 12%, transparent);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.et-table-row.et-table-row--selected .et-table-cell.et-table-sticky-start,
|
|
49
|
+
.et-table-row.et-table-row--selected .et-table-cell.et-table-sticky-end {
|
|
50
|
+
background: color-mix(
|
|
51
|
+
in srgb,
|
|
52
|
+
var(--_et-table-selected-accent) 12%,
|
|
53
|
+
var(--_et-table-row-surface, var(--et-surface-background-solid, Canvas))
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* A hovered selected row keeps its accent (slightly stronger) rather than reverting to the grey the
|
|
58
|
+
base table paints on hover. */
|
|
59
|
+
@media (hover: hover) {
|
|
60
|
+
.et-table-row.et-table-row--selected:hover .et-table-cell {
|
|
61
|
+
background: color-mix(in srgb, var(--_et-table-selected-accent) 18%, transparent);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.et-table-row.et-table-row--selected:hover .et-table-cell.et-table-sticky-start,
|
|
65
|
+
.et-table-row.et-table-row--selected:hover .et-table-cell.et-table-sticky-end {
|
|
66
|
+
background: color-mix(
|
|
67
|
+
in srgb,
|
|
68
|
+
var(--_et-table-selected-accent) 18%,
|
|
69
|
+
var(--_et-table-row-surface, var(--et-surface-background-solid, Canvas))
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* A held selected row escalates within its accent, for the same reason. */
|
|
75
|
+
.et-table-row.et-table-row--selected:where(.et-table-row--interactive, .et-table-row--link):active .et-table-cell {
|
|
76
|
+
background: color-mix(in srgb, var(--_et-table-selected-accent) 26%, transparent);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.et-table-row.et-table-row--selected:where(.et-table-row--interactive, .et-table-row--link):active
|
|
80
|
+
.et-table-cell.et-table-sticky-start,
|
|
81
|
+
.et-table-row.et-table-row--selected:where(.et-table-row--interactive, .et-table-row--link):active
|
|
82
|
+
.et-table-cell.et-table-sticky-end {
|
|
83
|
+
background: color-mix(
|
|
84
|
+
in srgb,
|
|
85
|
+
var(--_et-table-selected-accent) 26%,
|
|
86
|
+
var(--_et-table-row-surface, var(--et-surface-background-solid, Canvas))
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
/* The placeholder body of a first load, mounted with etTableSkeleton. The bones themselves are
|
|
3
|
+
`<et-skeleton-item>`s, so a loading table matches every other loading surface in the app - all this
|
|
4
|
+
adds is the cell chrome around them. */
|
|
5
|
+
.et-table-skeleton-rows {
|
|
6
|
+
display: contents;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/* A placeholder row is as tall as the row it stands in for: the height measured off a real row when
|
|
10
|
+
this table has had one (`--_et-table-row-h`, set per row by the template), else a line of text plus
|
|
11
|
+
the cell's own padding. A column whose cells are taller than text — a chip, an avatar — should also
|
|
12
|
+
say so with `etTableCellSkeleton`, which is what makes the *first* load match too. */
|
|
13
|
+
.et-table-row--placeholder .et-table-cell {
|
|
14
|
+
min-block-size: max(
|
|
15
|
+
var(--et-table-row-min-block-size, 0px),
|
|
16
|
+
var(--_et-table-row-h, calc(1.4em + var(--et-table-cell-padding-block) * 2))
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.et-table-sort-priority {
|
|
3
|
+
flex: none;
|
|
4
|
+
min-inline-size: 1.4em;
|
|
5
|
+
padding-inline: 0.3em;
|
|
6
|
+
font-size: 0.75em;
|
|
7
|
+
font-weight: 600;
|
|
8
|
+
line-height: 1.4em;
|
|
9
|
+
font-variant-numeric: tabular-nums;
|
|
10
|
+
text-align: center;
|
|
11
|
+
color: var(--et-theme-color-ink-solid, currentColor);
|
|
12
|
+
border-radius: 999px;
|
|
13
|
+
box-shadow: inset 0 0 0 1px currentColor;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
/* Pinned cells stay put during horizontal scroll. The inline offset comes from a per-cell style
|
|
3
|
+
binding, fed by the widths `etTableStickyColumns` measures; the edge shadow marks the pinned
|
|
4
|
+
boundary. */
|
|
5
|
+
.et-table-sticky-start,
|
|
6
|
+
.et-table-sticky-end {
|
|
7
|
+
position: sticky;
|
|
8
|
+
z-index: 1;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.et-table-sticky-start {
|
|
12
|
+
box-shadow: var(--_et-table-edge-start);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.et-table-sticky-end {
|
|
16
|
+
box-shadow: var(--_et-table-edge-end);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Only the outermost pinned cell of an edge marks it. Being opaque, the next pinned cell covers an
|
|
20
|
+
inner one's shadow - until it is a utility column lifted over its neighbours to keep its own clicks
|
|
21
|
+
(see the row-link rules), and the inner shadow then escapes as a rule down the middle of the pinned
|
|
22
|
+
block. Dropped through the edge variable rather than `box-shadow`, so a header or footer cell keeps
|
|
23
|
+
the block-axis shadow it carries in the same property. */
|
|
24
|
+
.et-table-sticky-start:has(~ .et-table-sticky-start) {
|
|
25
|
+
--_et-table-edge-start: 0 0 transparent;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.et-table-sticky-end ~ .et-table-sticky-end {
|
|
29
|
+
--_et-table-edge-end: 0 0 transparent;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* Body pinned cells need an opaque fill so scrolled cells pass behind them — but they still
|
|
33
|
+
reflect the row's zebra stripe and hover, using opaque (solid) variants of those tints. The
|
|
34
|
+
real `.et-table-sticky-*` classes (not `:where`) give these the specificity to win over the
|
|
35
|
+
translucent stripe/hover rules. */
|
|
36
|
+
.et-table-cell:where(.et-table-sticky-start, .et-table-sticky-end) {
|
|
37
|
+
background: var(--_et-table-row-surface);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.et-table-row--stripe .et-table-cell.et-table-sticky-start,
|
|
41
|
+
.et-table-row--stripe .et-table-cell.et-table-sticky-end {
|
|
42
|
+
background: var(--_et-table-stripe-solid);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Only on real hover-capable pointers — a touch tap otherwise leaves the row stuck "hovered". */
|
|
46
|
+
@media (hover: hover) {
|
|
47
|
+
.et-table-row:hover .et-table-cell.et-table-sticky-start,
|
|
48
|
+
.et-table-row:hover .et-table-cell.et-table-sticky-end {
|
|
49
|
+
background: var(--_et-table-row-hover-solid);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.et-table-row:where(.et-table-row--interactive, .et-table-row--link):active .et-table-cell.et-table-sticky-start,
|
|
54
|
+
.et-table-row:where(.et-table-row--interactive, .et-table-row--link):active .et-table-cell.et-table-sticky-end {
|
|
55
|
+
background: var(--_et-table-row-pressed-solid);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Header/footer pinned cells are corner-sticky (both axes) and sit above the row-pinned cells. `:is()`
|
|
59
|
+
so this outweighs the base sheet's `z-index`, which Angular may re-append after this one. */
|
|
60
|
+
.et-table-header-cell:is(.et-table-sticky-start, .et-table-sticky-end),
|
|
61
|
+
.et-table-footer-cell:is(.et-table-sticky-start, .et-table-sticky-end) {
|
|
62
|
+
z-index: 3;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.et-table-header-cell.et-table-sticky-start {
|
|
66
|
+
box-shadow: var(--_et-table-edge-block-start), var(--_et-table-edge-start);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.et-table-header-cell.et-table-sticky-end {
|
|
70
|
+
box-shadow: var(--_et-table-edge-block-start), var(--_et-table-edge-end);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.et-table-footer-cell.et-table-sticky-start {
|
|
74
|
+
box-shadow: var(--_et-table-edge-block-end), var(--_et-table-edge-start);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.et-table-footer-cell.et-table-sticky-end {
|
|
78
|
+
box-shadow: var(--_et-table-edge-block-end), var(--_et-table-edge-end);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
/* Full-width filler standing in for the rows a virtual window leaves out; its block-size is the
|
|
3
|
+
window's padding, so the scrollbar reflects the whole row count. Mounted by the virtual-scroll
|
|
4
|
+
feature (see TableVirtualScrollStylesComponent), so a table that renders every row ships none of
|
|
5
|
+
it — there is nothing to space out. */
|
|
6
|
+
.et-table-spacer {
|
|
7
|
+
grid-column: 1 / -1;
|
|
8
|
+
}
|
|
9
|
+
}
|