@ethlete/components 1.0.0-next.69 → 1.0.0-next.70
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 +29 -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 +823 -105
- 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,32 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.et-menu-item {
|
|
3
|
+
.et-menu-item-icon {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
flex: none;
|
|
8
|
+
|
|
9
|
+
&:not(:has(*)) {
|
|
10
|
+
display: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
svg {
|
|
14
|
+
inline-size: var(--et-menu-item-icon-size);
|
|
15
|
+
block-size: var(--et-menu-item-icon-size);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* `.et-menu-item-content` is shared with the selection items, so its layout lives in
|
|
20
|
+
`menu.component.css` — see the note there. */
|
|
21
|
+
|
|
22
|
+
.et-menu-item-trailing {
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
flex: none;
|
|
26
|
+
|
|
27
|
+
&:not(:has(*)) {
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
@property --et-menu-search-height {
|
|
3
|
+
syntax: '<length>';
|
|
4
|
+
inherits: false;
|
|
5
|
+
initial-value: 36px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.et-menu .et-menu-header {
|
|
9
|
+
.et-menu-search-field {
|
|
10
|
+
position: relative;
|
|
11
|
+
|
|
12
|
+
&:has(.et-menu-search-spinner) input[etmenusearch] {
|
|
13
|
+
padding-inline-end: calc(var(--et-menu-item-padding-inline) + 22px);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.et-menu-search-spinner {
|
|
18
|
+
position: absolute;
|
|
19
|
+
inset-block-start: 50%;
|
|
20
|
+
inset-inline-end: 10px;
|
|
21
|
+
translate: 0 -50%;
|
|
22
|
+
color: var(--_et-menu-muted-color);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.et-menu-search-error {
|
|
26
|
+
margin: 6px 2px 0;
|
|
27
|
+
font-size: 12px;
|
|
28
|
+
/* the element carries the error color theme via etProvideColor */
|
|
29
|
+
color: var(--et-theme-color-ink-solid, rgb(248 113 113));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
input[etmenusearch] {
|
|
33
|
+
inline-size: 100%;
|
|
34
|
+
block-size: var(--et-menu-search-height);
|
|
35
|
+
padding-inline: var(--et-menu-item-padding-inline);
|
|
36
|
+
border-radius: var(--et-menu-item-border-radius);
|
|
37
|
+
border: 1px solid var(--_et-menu-border);
|
|
38
|
+
background: color-mix(in srgb, var(--et-surface-interaction-solid, rgb(255 255 255)) 6%, transparent);
|
|
39
|
+
color: inherit;
|
|
40
|
+
font: inherit;
|
|
41
|
+
outline: none;
|
|
42
|
+
box-sizing: border-box;
|
|
43
|
+
transition:
|
|
44
|
+
border-color 120ms ease,
|
|
45
|
+
background 120ms ease;
|
|
46
|
+
|
|
47
|
+
&:focus-visible {
|
|
48
|
+
border-color: var(--et-theme-color-primary-solid, rgb(255 255 255 / 0.3));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&::placeholder {
|
|
52
|
+
color: var(--_et-menu-muted-color);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.et-menu-selection-item {
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
|
|
5
|
+
.et-menu-item-check {
|
|
6
|
+
position: relative;
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
flex: none;
|
|
11
|
+
inline-size: var(--et-menu-item-icon-size, 16px);
|
|
12
|
+
block-size: var(--et-menu-item-icon-size, 16px);
|
|
13
|
+
color: var(--et-theme-color-primary-solid, currentColor);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&.et-menu-radio-item .et-menu-item-check::before {
|
|
17
|
+
content: '';
|
|
18
|
+
inline-size: 6px;
|
|
19
|
+
block-size: 6px;
|
|
20
|
+
border-radius: 50%;
|
|
21
|
+
background: currentColor;
|
|
22
|
+
opacity: 0;
|
|
23
|
+
transform: scale(0.5);
|
|
24
|
+
transition:
|
|
25
|
+
opacity 120ms ease,
|
|
26
|
+
transform 120ms ease;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.et-menu-radio-item[aria-checked='true'] .et-menu-item-check::before {
|
|
30
|
+
opacity: 1;
|
|
31
|
+
transform: scale(1);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&.et-menu-checkbox-item .et-menu-item-check::before {
|
|
35
|
+
content: '';
|
|
36
|
+
inline-size: 9px;
|
|
37
|
+
block-size: 5px;
|
|
38
|
+
border-inline-start: 2px solid currentColor;
|
|
39
|
+
border-block-end: 2px solid currentColor;
|
|
40
|
+
transform: rotate(-45deg) translateY(-1px) scale(0.5);
|
|
41
|
+
opacity: 0;
|
|
42
|
+
transition:
|
|
43
|
+
opacity 120ms ease,
|
|
44
|
+
transform 120ms ease;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&.et-menu-checkbox-item[aria-checked='true'] .et-menu-item-check::before {
|
|
48
|
+
opacity: 1;
|
|
49
|
+
transform: rotate(-45deg) translateY(-1px) scale(1);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&.et-menu-checkbox-item[aria-checked='mixed'] .et-menu-item-check::before {
|
|
53
|
+
inline-size: 9px;
|
|
54
|
+
block-size: 0;
|
|
55
|
+
border-inline-start: none;
|
|
56
|
+
border-block-end: 2px solid currentColor;
|
|
57
|
+
transform: none;
|
|
58
|
+
opacity: 1;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&.et-menu-selection-item--has-icon {
|
|
62
|
+
.et-menu-item-check {
|
|
63
|
+
color: currentColor;
|
|
64
|
+
transition: color 120ms ease;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.et-menu-item-check::before {
|
|
68
|
+
content: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.et-menu-item-check i {
|
|
72
|
+
inline-size: 100%;
|
|
73
|
+
block-size: 100%;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&[aria-checked='true'] .et-menu-item-check,
|
|
77
|
+
&[aria-checked='mixed'] .et-menu-item-check {
|
|
78
|
+
color: var(--et-theme-color-primary-solid, currentColor);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@media (prefers-reduced-motion: reduce) {
|
|
83
|
+
.et-menu-item-check::before {
|
|
84
|
+
transition: opacity 120ms ease;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.et-menu-separator {
|
|
3
|
+
display: block;
|
|
4
|
+
block-size: 1px;
|
|
5
|
+
margin-block: var(--et-menu-separator-margin-block, 6px);
|
|
6
|
+
margin-inline: calc(var(--et-menu-item-padding-inline, 10px) * -0.5);
|
|
7
|
+
background: var(--_et-menu-separator-color, var(--et-surface-border-solid, rgb(255 255 255 / 0.1)));
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
@property --et-menu-min-width {
|
|
3
|
+
syntax: '<length>';
|
|
4
|
+
inherits: false;
|
|
5
|
+
initial-value: 180px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@property --et-menu-max-height {
|
|
9
|
+
syntax: '<length-percentage>';
|
|
10
|
+
inherits: false;
|
|
11
|
+
initial-value: 40vh;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@property --et-menu-padding-block {
|
|
15
|
+
syntax: '<length>';
|
|
16
|
+
inherits: false;
|
|
17
|
+
initial-value: 6px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@property --et-menu-padding-inline {
|
|
21
|
+
syntax: '<length>';
|
|
22
|
+
inherits: false;
|
|
23
|
+
initial-value: 6px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@property --et-menu-item-height {
|
|
27
|
+
syntax: '<length>';
|
|
28
|
+
inherits: true;
|
|
29
|
+
initial-value: 36px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@property --et-menu-item-padding-inline {
|
|
33
|
+
syntax: '<length>';
|
|
34
|
+
inherits: true;
|
|
35
|
+
initial-value: 10px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@property --et-menu-item-gap {
|
|
39
|
+
syntax: '<length>';
|
|
40
|
+
inherits: true;
|
|
41
|
+
initial-value: 10px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@property --et-menu-item-border-radius {
|
|
45
|
+
syntax: '<length>';
|
|
46
|
+
inherits: true;
|
|
47
|
+
initial-value: 6px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@property --et-menu-item-font-size {
|
|
51
|
+
syntax: '<length>';
|
|
52
|
+
inherits: true;
|
|
53
|
+
initial-value: 14px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@property --et-menu-item-icon-size {
|
|
57
|
+
syntax: '<length>';
|
|
58
|
+
inherits: true;
|
|
59
|
+
initial-value: 16px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@property --et-menu-item-submenu-icon-size {
|
|
63
|
+
syntax: '<length>';
|
|
64
|
+
inherits: true;
|
|
65
|
+
initial-value: 12px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@property --et-menu-separator-margin-block {
|
|
69
|
+
syntax: '<length>';
|
|
70
|
+
inherits: false;
|
|
71
|
+
initial-value: 6px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@property --et-menu-group-label-font-size {
|
|
75
|
+
syntax: '<length>';
|
|
76
|
+
inherits: false;
|
|
77
|
+
initial-value: 12px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@property --et-menu-scroll-fade-size {
|
|
81
|
+
syntax: '<length>';
|
|
82
|
+
inherits: false;
|
|
83
|
+
initial-value: 12px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@property --_et-menu-fade-start {
|
|
87
|
+
syntax: '<length>';
|
|
88
|
+
inherits: false;
|
|
89
|
+
initial-value: 0px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@property --_et-menu-fade-end {
|
|
93
|
+
syntax: '<length>';
|
|
94
|
+
inherits: false;
|
|
95
|
+
initial-value: 0px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@keyframes et-menu-scroll-fade-start {
|
|
99
|
+
to {
|
|
100
|
+
--_et-menu-fade-start: var(--et-menu-scroll-fade-size);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@keyframes et-menu-scroll-fade-end {
|
|
105
|
+
from {
|
|
106
|
+
--_et-menu-fade-end: var(--et-menu-scroll-fade-size);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
to {
|
|
110
|
+
--_et-menu-fade-end: 0px;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.et-overlay.et-overlay--menu {
|
|
115
|
+
overflow: visible;
|
|
116
|
+
background: transparent;
|
|
117
|
+
box-shadow: none;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.et-menu {
|
|
121
|
+
--_et-menu-background: var(--et-surface-background-solid, rgb(32 32 32));
|
|
122
|
+
--_et-menu-color: var(--et-surface-color-solid, rgb(244 244 245));
|
|
123
|
+
--_et-menu-border: var(--et-surface-border-solid, rgb(255 255 255 / 0.1));
|
|
124
|
+
--_et-menu-shadow: var(--et-anchored-panel-shadow, 0 10px 24px rgb(var(--et-shadow-color-rgb, 0 0 0) / 0.16));
|
|
125
|
+
--_et-menu-radius: 10px;
|
|
126
|
+
--_et-menu-item-active-background: color-mix(
|
|
127
|
+
in srgb,
|
|
128
|
+
var(--et-surface-interaction-solid, rgb(255 255 255)) 12%,
|
|
129
|
+
transparent
|
|
130
|
+
);
|
|
131
|
+
--_et-menu-item-pressed-background: color-mix(
|
|
132
|
+
in srgb,
|
|
133
|
+
var(--et-surface-interaction-solid, rgb(255 255 255)) 20%,
|
|
134
|
+
transparent
|
|
135
|
+
);
|
|
136
|
+
--_et-menu-muted-color: var(--et-surface-color-muted-solid, rgb(255 255 255 / 0.55));
|
|
137
|
+
--_et-menu-separator-color: var(--et-surface-border-solid, rgb(255 255 255 / 0.1));
|
|
138
|
+
|
|
139
|
+
display: flex;
|
|
140
|
+
flex-direction: column;
|
|
141
|
+
min-inline-size: var(--et-menu-min-width);
|
|
142
|
+
max-inline-size: min(320px, calc(100vw - 24px));
|
|
143
|
+
/* an anchored pane does not clip, so dropping the pane's own cap here lets a menu taller than
|
|
144
|
+
the room next to the trigger hang out of the pane and past the viewport edge */
|
|
145
|
+
max-block-size: min(var(--et-menu-max-height), var(--et-overlay-max-height, 100vh));
|
|
146
|
+
border-radius: var(--_et-menu-radius);
|
|
147
|
+
border: 1px solid var(--_et-menu-border);
|
|
148
|
+
background: var(--_et-menu-background);
|
|
149
|
+
color: var(--_et-menu-color);
|
|
150
|
+
font-family: var(--et-font-family, inherit);
|
|
151
|
+
font-size: var(--et-menu-item-font-size);
|
|
152
|
+
box-shadow: var(--_et-menu-shadow);
|
|
153
|
+
outline: none;
|
|
154
|
+
|
|
155
|
+
/* applied while the block size animates after a content change (e.g. search filtering),
|
|
156
|
+
so content outside the animated size stays hidden */
|
|
157
|
+
&.et-menu--resizing {
|
|
158
|
+
overflow: clip;
|
|
159
|
+
|
|
160
|
+
/* the scroller is sized by the host, so the animated host size shrinks it below its content
|
|
161
|
+
mid-animation - without this it flashes a scrollbar on every resize */
|
|
162
|
+
.et-menu-body {
|
|
163
|
+
overflow: clip;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.et-menu-header {
|
|
168
|
+
flex: none;
|
|
169
|
+
padding: var(--et-menu-padding-block) var(--et-menu-padding-inline) 0;
|
|
170
|
+
|
|
171
|
+
contain: inline-size;
|
|
172
|
+
|
|
173
|
+
&:not(:has(input[etmenusearch])) {
|
|
174
|
+
display: none;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* The block gap has to be a margin. Padding on the scroller is inside its scrollport, so an
|
|
179
|
+
option scrolls into the gap under the search field; padding on the content scrolls away with
|
|
180
|
+
it, leaving the cut on the field's border. A margin holds the gap outside the scrollport, so a
|
|
181
|
+
scrolled option is always cut a gap away from the field and from the rounded corners. */
|
|
182
|
+
.et-menu-body-wrapper {
|
|
183
|
+
position: relative;
|
|
184
|
+
display: flex;
|
|
185
|
+
flex-direction: column;
|
|
186
|
+
flex: 1;
|
|
187
|
+
min-block-size: 0;
|
|
188
|
+
margin-block: var(--et-menu-padding-block);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.et-menu-body {
|
|
192
|
+
flex: 1;
|
|
193
|
+
min-block-size: 0;
|
|
194
|
+
padding-inline: var(--et-menu-padding-inline);
|
|
195
|
+
overflow-y: auto;
|
|
196
|
+
overscroll-behavior: contain;
|
|
197
|
+
|
|
198
|
+
/* The two fade lengths ride the scroll position, so each cut edge only fades while there is
|
|
199
|
+
more to scroll that way - `both` is what holds a fade at full length beyond its range. The
|
|
200
|
+
mask stays inside the `@supports`: without scroll-driven animations it could never animate,
|
|
201
|
+
and a permanent fade on a list that does not scroll is worse than the plain cut. */
|
|
202
|
+
@supports (animation-timeline: scroll()) {
|
|
203
|
+
mask-image: linear-gradient(
|
|
204
|
+
to bottom,
|
|
205
|
+
transparent 0,
|
|
206
|
+
black var(--_et-menu-fade-start),
|
|
207
|
+
black calc(100% - var(--_et-menu-fade-end)),
|
|
208
|
+
transparent 100%
|
|
209
|
+
);
|
|
210
|
+
|
|
211
|
+
animation:
|
|
212
|
+
et-menu-scroll-fade-start linear both,
|
|
213
|
+
et-menu-scroll-fade-end linear both;
|
|
214
|
+
animation-timeline: scroll(self block), scroll(self block);
|
|
215
|
+
animation-range:
|
|
216
|
+
0 var(--et-menu-scroll-fade-size),
|
|
217
|
+
calc(100% - var(--et-menu-scroll-fade-size)) 100%;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.et-menu-group {
|
|
222
|
+
display: block;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.et-menu-item {
|
|
226
|
+
display: flex;
|
|
227
|
+
align-items: center;
|
|
228
|
+
gap: var(--et-menu-item-gap);
|
|
229
|
+
inline-size: 100%;
|
|
230
|
+
min-block-size: var(--et-menu-item-height);
|
|
231
|
+
padding-inline: var(--et-menu-item-padding-inline);
|
|
232
|
+
border: none;
|
|
233
|
+
border-radius: var(--et-menu-item-border-radius);
|
|
234
|
+
background: transparent;
|
|
235
|
+
color: inherit;
|
|
236
|
+
font: inherit;
|
|
237
|
+
text-align: start;
|
|
238
|
+
text-decoration: none;
|
|
239
|
+
cursor: pointer;
|
|
240
|
+
outline: none;
|
|
241
|
+
box-sizing: border-box;
|
|
242
|
+
-webkit-tap-highlight-color: transparent;
|
|
243
|
+
transition:
|
|
244
|
+
background 120ms ease,
|
|
245
|
+
color 120ms ease,
|
|
246
|
+
opacity 120ms ease;
|
|
247
|
+
|
|
248
|
+
/* the roving focus is applied programmatically on mouse-open too, so :focus-visible (instead
|
|
249
|
+
of [data-active] alone) keeps the highlight from appearing without a hover or keyboard
|
|
250
|
+
interaction; a trigger whose submenu is open stays highlighted the whole time */
|
|
251
|
+
&[data-active]:where(:focus-visible),
|
|
252
|
+
&[data-menu-open] {
|
|
253
|
+
background: var(--_et-menu-item-active-background);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
@media (hover: hover) {
|
|
257
|
+
&[data-active]:where(:hover) {
|
|
258
|
+
background: var(--_et-menu-item-active-background);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
&:active:not([aria-disabled='true']) {
|
|
263
|
+
background: var(--_et-menu-item-pressed-background);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
&[aria-disabled='true'] {
|
|
267
|
+
opacity: 0.4;
|
|
268
|
+
cursor: default;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
&[data-variant='destructive'] {
|
|
272
|
+
/* the item forces the error color theme onto itself while destructive */
|
|
273
|
+
color: var(--et-theme-color-ink-solid, rgb(248 113 113));
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/* Every kind of item has a label — a plain one, a checkbox, a radio — so its layout lives here
|
|
277
|
+
rather than with any single item component. Those stylesheets are only injected once their
|
|
278
|
+
component is actually rendered, and a menu of nothing but selection items never renders the
|
|
279
|
+
plain one: the label would then not grow, and the trailing check/icon would sit against the
|
|
280
|
+
text instead of the item's trailing edge. */
|
|
281
|
+
.et-menu-item-content {
|
|
282
|
+
flex: 1;
|
|
283
|
+
min-inline-size: 0;
|
|
284
|
+
overflow: hidden;
|
|
285
|
+
text-overflow: ellipsis;
|
|
286
|
+
white-space: nowrap;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.et-overlay--menu {
|
|
292
|
+
--et-floating-panel-enter-duration: 140ms;
|
|
293
|
+
--et-floating-panel-leave-duration: 100ms;
|
|
294
|
+
--et-floating-panel-distance: 0.3rem;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
/* `start`/`end` in the position names are logical, so the insets are too — the stack docks to the
|
|
3
|
+
inline-start/end edge and flips under `dir="rtl"`. `align-items: flex-start/flex-end` is already
|
|
4
|
+
logical (it resolves against the writing direction), so it needs no counterpart. The `center`
|
|
5
|
+
positions stay on physical `left` + a symmetric translate: centering is direction-agnostic and
|
|
6
|
+
the physical form is the idiom. */
|
|
7
|
+
.et-notification-stack {
|
|
8
|
+
/* Plus whatever a surface above the page has reserved on that edge - a docked devtools panel, an
|
|
9
|
+
app's own always-on-top chrome - so a toast is never stacked under it. The reserved edges are
|
|
10
|
+
physical, so the inline pair swaps under `dir="rtl"`. @see reserveOverlayViewportSpace */
|
|
11
|
+
--_et-notification-inset-block-start: calc(1rem + var(--et-viewport-inset-top, 0px));
|
|
12
|
+
--_et-notification-inset-block-end: calc(1rem + var(--et-viewport-inset-bottom, 0px));
|
|
13
|
+
--_et-notification-inset-inline-start: calc(1rem + var(--et-viewport-inset-left, 0px));
|
|
14
|
+
--_et-notification-inset-inline-end: calc(1rem + var(--et-viewport-inset-right, 0px));
|
|
15
|
+
|
|
16
|
+
/* Half the difference of the two reserved inline edges: centers the stack in the space that is
|
|
17
|
+
left rather than in the whole viewport. */
|
|
18
|
+
--_et-notification-center-shift: calc(
|
|
19
|
+
(var(--et-viewport-inset-left, 0px) - var(--et-viewport-inset-right, 0px)) / 2
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
position: fixed;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
align-items: flex-end;
|
|
26
|
+
gap: var(--et-notification-stack-gap, 0.5rem);
|
|
27
|
+
/* The level is set inline by the stack directive, above the one overlays mount at.
|
|
28
|
+
@see NOTIFICATION_STACK_OVERLAY_LAYER */
|
|
29
|
+
z-index: var(--et-notification-stack-z-index, var(--_et-notification-stack-layer));
|
|
30
|
+
pointer-events: none;
|
|
31
|
+
|
|
32
|
+
/* Both block insets on every position, so a stack that grows past the opposite edge stops at the
|
|
33
|
+
space reserved there instead of sliding under it. The docked edge is the one the toasts sit on,
|
|
34
|
+
which is what `justify-content` picks. */
|
|
35
|
+
top: var(--_et-notification-inset-block-start);
|
|
36
|
+
bottom: var(--_et-notification-inset-block-end);
|
|
37
|
+
|
|
38
|
+
/* default: bottom-end */
|
|
39
|
+
justify-content: flex-end;
|
|
40
|
+
inset-inline-end: var(--_et-notification-inset-inline-end);
|
|
41
|
+
|
|
42
|
+
&:dir(rtl) {
|
|
43
|
+
--_et-notification-inset-inline-start: calc(1rem + var(--et-viewport-inset-right, 0px));
|
|
44
|
+
--_et-notification-inset-inline-end: calc(1rem + var(--et-viewport-inset-left, 0px));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&[data-position='bottom-center'] {
|
|
48
|
+
justify-content: flex-end;
|
|
49
|
+
inset-inline: auto;
|
|
50
|
+
left: calc(50% + var(--_et-notification-center-shift));
|
|
51
|
+
align-items: center;
|
|
52
|
+
transform: translateX(-50%);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&[data-position='bottom-start'] {
|
|
56
|
+
justify-content: flex-end;
|
|
57
|
+
inset-inline-start: var(--_et-notification-inset-inline-start);
|
|
58
|
+
inset-inline-end: auto;
|
|
59
|
+
align-items: flex-start;
|
|
60
|
+
transform: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&[data-position='bottom-end'] {
|
|
64
|
+
justify-content: flex-end;
|
|
65
|
+
inset-inline-start: auto;
|
|
66
|
+
inset-inline-end: var(--_et-notification-inset-inline-end);
|
|
67
|
+
align-items: flex-end;
|
|
68
|
+
transform: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&[data-position='top-center'] {
|
|
72
|
+
justify-content: flex-start;
|
|
73
|
+
inset-inline: auto;
|
|
74
|
+
left: calc(50% + var(--_et-notification-center-shift));
|
|
75
|
+
align-items: center;
|
|
76
|
+
transform: translateX(-50%);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&[data-position='top-start'] {
|
|
80
|
+
justify-content: flex-start;
|
|
81
|
+
inset-inline-start: var(--_et-notification-inset-inline-start);
|
|
82
|
+
inset-inline-end: auto;
|
|
83
|
+
align-items: flex-start;
|
|
84
|
+
transform: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&[data-position='top-end'] {
|
|
88
|
+
justify-content: flex-start;
|
|
89
|
+
inset-inline-start: auto;
|
|
90
|
+
inset-inline-end: var(--_et-notification-inset-inline-end);
|
|
91
|
+
align-items: flex-end;
|
|
92
|
+
transform: none;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.et-notification-stack > [data-notification-id] > * {
|
|
97
|
+
pointer-events: auto;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* A corner card is the desktop shape. On a phone the stack spans both edges instead and the card
|
|
101
|
+
fills it, which is what a toast looks like there - and what keeps it on screen at all: the card's
|
|
102
|
+
300px minimum plus these insets already overflows a 320px viewport at a 16px rem base.
|
|
103
|
+
`left`/`right` rather than the logical pair because the span is symmetric, and matching the
|
|
104
|
+
`[data-position]` weight because every position rule above sets these same insets. */
|
|
105
|
+
@media (max-width: 480px) {
|
|
106
|
+
.et-notification-stack,
|
|
107
|
+
.et-notification-stack[data-position] {
|
|
108
|
+
left: calc(1rem + var(--et-viewport-inset-left, 0px));
|
|
109
|
+
right: calc(1rem + var(--et-viewport-inset-right, 0px));
|
|
110
|
+
align-items: stretch;
|
|
111
|
+
transform: none;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|