@ethlete/components 1.0.0-next.100 → 1.0.0-next.102
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 +45 -0
- package/design/banner.ts +1 -1
- package/design/breadcrumb.ts +0 -1
- package/design/button.ts +0 -2
- package/design/card.ts +1 -1
- package/design/dialog.ts +1 -7
- package/design/grid.ts +3 -3
- package/design/masonry.ts +3 -3
- package/design/menu.ts +5 -3
- package/design/notification.ts +0 -1
- package/design/scheduler.ts +1 -1
- package/design/sdk/components/accent-on-light/accent-on-light.css +5 -5
- package/design/sdk/components/accordion/accordion.css +3 -3
- package/design/sdk/components/action-sheet/action-sheet.css +13 -13
- package/design/sdk/components/action-sheet/action-sheet.ts +5 -3
- package/design/sdk/components/anchored-dialog/anchored-dialog.css +5 -5
- package/design/sdk/components/avatar/avatar.css +3 -3
- package/design/sdk/components/badge/badge.css +3 -3
- package/design/sdk/components/banner/banner.css +4 -4
- package/design/sdk/components/bracket/bracket.css +8 -11
- package/design/sdk/components/breadcrumb/breadcrumb.css +4 -4
- package/design/sdk/components/button/button.css +3 -13
- package/design/sdk/components/calendar/calendar.css +7 -7
- package/design/sdk/components/card/card.css +4 -4
- package/design/sdk/components/carousel/carousel.css +6 -6
- package/design/sdk/components/chart/chart.css +8 -8
- package/design/sdk/components/checkbox/checkbox.css +2 -2
- package/design/sdk/components/chip/chip.css +4 -4
- package/design/sdk/components/copy-button/copy-button.css +3 -3
- package/design/sdk/components/description-list/description-list.css +2 -2
- package/design/sdk/components/dialog/dialog.css +4 -4
- package/design/sdk/components/divider/divider.css +2 -2
- package/design/sdk/components/empty-state/empty-state.css +4 -4
- package/design/sdk/components/floating-action/floating-action.css +4 -4
- package/design/sdk/components/grid/grid.css +4 -4
- package/design/sdk/components/input/input.css +13 -22
- package/design/sdk/components/kbd/kbd.css +2 -2
- package/design/sdk/components/loader/loader.css +6 -6
- package/design/sdk/components/masonry/masonry.css +2 -2
- package/design/sdk/components/match/match.css +5 -8
- package/design/sdk/components/menu/menu.css +2 -2
- package/design/sdk/components/menu/menu.ts +2 -2
- package/design/sdk/components/notification/notification.css +6 -6
- package/design/sdk/components/otp-input/otp-input.css +8 -8
- package/design/sdk/components/pagination/pagination.css +2 -2
- package/design/sdk/components/picture/picture.css +5 -5
- package/design/sdk/components/progress-steps/progress-steps.css +6 -6
- package/design/sdk/components/query-error/query-error.css +5 -11
- package/design/sdk/components/radio-group/radio-group.css +2 -2
- package/design/sdk/components/scheduler/scheduler.css +9 -15
- package/design/sdk/components/scrollable/scrollable.css +5 -5
- package/design/sdk/components/scrollbar/scrollbar.css +3 -3
- package/design/sdk/components/select/select.css +1 -1
- package/design/sdk/components/skeleton/skeleton.css +2 -2
- package/design/sdk/components/slider/slider.css +8 -13
- package/design/sdk/components/standings/standings.css +7 -8
- package/design/sdk/components/stat-tile/stat-tile.css +3 -3
- package/design/sdk/components/stream/stream.css +7 -13
- package/design/sdk/components/table/table.css +13 -13
- package/design/sdk/components/tabs/tabs.css +2 -2
- package/design/sdk/components/textarea/textarea.css +13 -22
- package/design/sdk/components/timeline/timeline.css +4 -4
- package/design/sdk/components/toolbar/toolbar.css +6 -6
- package/design/sdk/components/tooltip/tooltip.css +3 -3
- package/design/sdk/components/tooltip/tooltip.ts +1 -1
- package/design/sdk/components/tree/selected-tint.css +3 -3
- package/design/sdk/foundations/colors/colors.css +363 -421
- package/design/sdk/foundations/colors/colors.ts +27 -25
- package/design/sdk/foundations/colors/shared/contrast.ts +10 -10
- package/design/sdk/foundations/elevation/elevation.css +2 -2
- package/design/sdk/foundations/elevation/elevation.ts +1 -1
- package/design/sdk/foundations/elevation/shared/elevation/scene.css +16 -11
- package/design/sdk/ready.json +4 -109
- package/design/tabs.ts +1 -1
- package/design/toggletip.ts +85 -0
- package/fesm2022/ethlete-components.mjs +725 -417
- package/fesm2022/ethlete-components.mjs.map +1 -1
- package/generators/generators.json +10 -0
- package/generators/migrate-overlay-and-column-api/column-visibility-host.js +102 -0
- package/generators/migrate-overlay-and-column-api/migration.js +39 -0
- package/generators/migrate-overlay-and-column-api/overlay-and-column-api.js +18 -0
- package/generators/migrate-overlay-and-column-api/overlay-result.js +399 -0
- package/generators/migrate-overlay-and-column-api/schema.json +26 -0
- package/generators/migrate-overlay-and-column-api/source-scan.js +171 -0
- package/generators/migrate-tabs-active-underline/migration.js +31 -0
- package/generators/migrate-tabs-active-underline/schema.json +26 -0
- package/generators/migrate-tabs-active-underline/tabs-active-underline.js +46 -0
- package/migrations.json +18 -0
- package/package.json +2 -2
- package/src/lib/accordion/accordion.component.css +10 -11
- package/src/lib/avatar/avatar-group.component.css +1 -1
- package/src/lib/avatar/avatar.component.css +3 -3
- package/src/lib/badge/badge.component.css +13 -9
- package/src/lib/banner/banner.component.css +5 -5
- package/src/lib/bracket/bracket-default-continue.component.css +2 -2
- package/src/lib/bracket/bracket-default-final-match.component.css +6 -6
- package/src/lib/bracket/bracket-default-round-header.component.css +2 -2
- package/src/lib/bracket/bracket-default-section-title.component.css +1 -1
- package/src/lib/bracket/bracket-pick-card.component.css +21 -21
- package/src/lib/bracket/bracket-rounds-list.component.css +1 -1
- package/src/lib/bracket/bracket.component.css +2 -2
- package/src/lib/bracket/layouts/swiss/bracket-swiss-round-header.component.css +65 -0
- package/src/lib/bracket/layouts/swiss/bracket-swiss-styles.component.css +5 -1
- package/src/lib/breadcrumb/breadcrumb-overflow.component.css +3 -3
- package/src/lib/breadcrumb/breadcrumb.component.css +5 -6
- package/src/lib/button/button-properties-styles.component.css +12 -12
- package/src/lib/button/button.component.css +52 -35
- package/src/lib/button/fab.component.css +17 -20
- package/src/lib/button/icon-button.component.css +15 -19
- package/src/lib/button/split-button.component.css +11 -14
- package/src/lib/button/text-button.component.css +1 -1
- package/src/lib/button/window-control-button.component.css +21 -32
- package/src/lib/calendar/calendar-comparison-band-styles.component.css +1 -1
- package/src/lib/calendar/calendar-week-numbers-styles.component.css +3 -3
- package/src/lib/calendar/calendar.component.css +21 -23
- package/src/lib/card/card.component.css +5 -5
- package/src/lib/carousel/carousel-autoplay-styles.component.css +2 -8
- package/src/lib/carousel/carousel.component.css +7 -19
- package/src/lib/chart/bar-chart.component.css +6 -6
- package/src/lib/chart/chart-grid.component.css +1 -1
- package/src/lib/chart/chart-legend.component.css +2 -2
- package/src/lib/chart/chart-tooltip.component.css +2 -2
- package/src/lib/chart/line-chart-tooltip.component.css +2 -2
- package/src/lib/chart/line-chart.component.css +11 -11
- package/src/lib/chart/pie-chart.component.css +8 -8
- package/src/lib/chart/sankey-chart.component.css +13 -13
- package/src/lib/chip/chip.component.css +15 -17
- package/src/lib/command-palette/command-palette-item.component.css +5 -5
- package/src/lib/command-palette/command-palette.component.css +3 -3
- package/src/lib/description-list/description-list.component.css +2 -2
- package/src/lib/divider/divider.component.css +2 -2
- package/src/lib/empty-state/empty-state.component.css +4 -4
- package/src/lib/floating-action/floating-action-styles.component.css +3 -3
- package/src/lib/focus-ring/focus-ring-styles.component.css +1 -1
- package/src/lib/forms/cascader/cascader-breadcrumb-styles.component.css +8 -8
- package/src/lib/forms/cascader/cascader-panel.component.css +27 -24
- package/src/lib/forms/cascader/cascader-sheet-styles.component.css +3 -3
- package/src/lib/forms/cascader/cascader.component.css +1 -1
- package/src/lib/forms/checkbox/checkbox.component.css +26 -39
- package/src/lib/forms/choice-field/choice-field-card-styles.component.css +3 -3
- package/src/lib/forms/choice-field/choice-field.component.css +7 -7
- package/src/lib/forms/color-input/color-input.component.css +2 -3
- package/src/lib/forms/color-input/color-picker-panel.component.css +16 -15
- package/src/lib/forms/date-time/date-input/date-input.component.css +1 -1
- package/src/lib/forms/date-time/date-picker-panel.component.css +8 -5
- package/src/lib/forms/date-time/date-range-presets.component.css +2 -2
- package/src/lib/forms/date-time/date-time-input/date-time-input.component.css +4 -4
- package/src/lib/forms/date-time/date-time-range-input/date-time-range-input.component.css +3 -3
- package/src/lib/forms/date-time/duration-input/duration-input.component.css +3 -3
- package/src/lib/forms/date-time/range-input-shell-styles.component.css +2 -2
- package/src/lib/forms/date-time/time-input/time-input.component.css +1 -1
- package/src/lib/forms/description/description.component.css +1 -1
- package/src/lib/forms/dropzone/dropzone-crop.component.css +8 -8
- package/src/lib/forms/dropzone/dropzone-item.component.css +5 -5
- package/src/lib/forms/dropzone/dropzone-preview-styles.component.css +5 -5
- package/src/lib/forms/dropzone/dropzone-readonly-styles.component.css +1 -1
- package/src/lib/forms/dropzone/dropzone-row-styles.component.css +3 -3
- package/src/lib/forms/dropzone/dropzone.component.css +20 -22
- package/src/lib/forms/form-field/counter.component.css +2 -2
- package/src/lib/forms/form-field/form-field-control-suffix-styles.component.css +12 -14
- package/src/lib/forms/form-field/form-field-suffix-overlap-styles.component.css +1 -1
- package/src/lib/forms/form-field/form-field-text-shell-styles.component.css +22 -35
- package/src/lib/forms/form-field/form-field.component.css +9 -10
- package/src/lib/forms/form-field/form-support-styles.component.css +2 -2
- package/src/lib/forms/form-field/headless/label.directive.css +2 -2
- package/src/lib/forms/form-field/hint.component.css +2 -2
- package/src/lib/forms/input/input.component.css +1 -1
- package/src/lib/forms/input/number-input.component.css +5 -5
- package/src/lib/forms/input/password-input.component.css +7 -8
- package/src/lib/forms/multi-language-rich-text-editor/tools/multi-language-rich-text-editor-language-tool.component.css +7 -10
- package/src/lib/forms/otp-input/otp-input.component.css +11 -15
- package/src/lib/forms/phone-input/phone-input.component.css +4 -5
- package/src/lib/forms/rating/rating.component.css +8 -9
- package/src/lib/forms/rich-text-editor/rich-text-content-styles.component.css +6 -6
- package/src/lib/forms/rich-text-editor/rich-text-editor-floating-toolbar.component.css +7 -4
- package/src/lib/forms/rich-text-editor/rich-text-editor-image-editor.component.css +6 -6
- package/src/lib/forms/rich-text-editor/rich-text-editor-link-editor.component.css +4 -4
- package/src/lib/forms/rich-text-editor/rich-text-editor-token-popup.component.css +12 -9
- package/src/lib/forms/rich-text-editor/rich-text-editor.component.css +6 -8
- package/src/lib/forms/rich-text-editor/tools/rich-text-editor-image-styles.component.css +7 -7
- package/src/lib/forms/rich-text-editor/tools/rich-text-editor-table-styles.component.css +2 -2
- package/src/lib/forms/rich-text-editor/tools/rich-text-editor-table-tool.component.css +4 -4
- package/src/lib/forms/select/select-extras-styles.component.css +10 -13
- package/src/lib/forms/select/select-option-group.component.css +2 -2
- package/src/lib/forms/select/select-option-styles.component.css +6 -6
- package/src/lib/forms/select/select-panel.component.css +13 -10
- package/src/lib/forms/select/select.component.css +4 -4
- package/src/lib/forms/selection-card-styles.component.css +10 -14
- package/src/lib/forms/selection-list/checkbox-group/checkbox-group-select-all.component.css +11 -21
- package/src/lib/forms/selection-list/checkbox-group/checkbox-group.component.css +4 -4
- package/src/lib/forms/selection-list/checkbox-group/checkbox-option.component.css +11 -21
- package/src/lib/forms/selection-list/radio-group/radio-group.component.css +4 -4
- package/src/lib/forms/selection-list/radio-group/radio.component.css +10 -20
- package/src/lib/forms/selection-list/segmented-button-group/segmented-button-group.component.css +7 -7
- package/src/lib/forms/selection-list/segmented-button-group/segmented-button.component.css +16 -15
- package/src/lib/forms/slider/range-slider.component.css +18 -24
- package/src/lib/forms/slider/slider.component.css +18 -24
- package/src/lib/forms/switch/switch.component.css +19 -22
- package/src/lib/forms/tag-input/tag-input.component.css +1 -1
- package/src/lib/forms/textarea/textarea.component.css +1 -1
- package/src/lib/grid/grid-debug.component.css +18 -18
- package/src/lib/grid/grid-item-default-actions.component.css +2 -2
- package/src/lib/grid/grid-item.component.css +3 -4
- package/src/lib/grid/grid.component.css +2 -2
- package/src/lib/kbd/kbd.component.css +3 -3
- package/src/lib/loader/brand-loader/brand-loader.component.css +3 -3
- package/src/lib/loader/progress-bar/progress-bar.component.css +1 -1
- package/src/lib/loader/spinner/spinner-styles.component.css +1 -1
- package/src/lib/match/match-card.component.css +18 -29
- package/src/lib/match/match-participant.component.css +11 -11
- package/src/lib/match/match-score.component.css +1 -1
- package/src/lib/match/match-scoreline.component.css +3 -3
- package/src/lib/menu/menu-group-label.component.css +1 -1
- package/src/lib/menu/menu-item-shortcut.component.css +1 -1
- package/src/lib/menu/menu-item-submenu-icon.component.css +1 -1
- package/src/lib/menu/menu-search-styles.component.css +3 -3
- package/src/lib/menu/menu-selection-item.component.css +2 -2
- package/src/lib/menu/menu-separator.component.css +1 -1
- package/src/lib/menu/menu.component.css +13 -10
- package/src/lib/notification/notification.component.css +10 -10
- package/src/lib/overlay/alert-dialog/alert-dialog.component.css +2 -2
- package/src/lib/overlay/floating-tip-styles.component.css +4 -4
- package/src/lib/overlay/overlay-container.component.css +9 -6
- package/src/lib/overlay/strategies/overlay-arrow-styles.component.css +2 -2
- package/src/lib/overlay/strategies/sheet-styles.component.css +2 -2
- package/src/lib/pagination/pagination.component.css +9 -10
- package/src/lib/progress-steps/progress-step.component.css +19 -19
- package/src/lib/query-error/query-error.component.css +1 -1
- package/src/lib/scheduler/scheduler-agenda-view.component.css +8 -8
- package/src/lib/scheduler/scheduler-appointment-drag-styles.component.css +4 -1
- package/src/lib/scheduler/scheduler-appointment-styles.component.css +12 -10
- package/src/lib/scheduler/scheduler-edit-color.component.css +2 -2
- package/src/lib/scheduler/scheduler-edit-surface-breadcrumb.component.css +2 -2
- package/src/lib/scheduler/scheduler-edit-surface-children.component.css +4 -4
- package/src/lib/scheduler/scheduler-month-view.component.css +16 -18
- package/src/lib/scheduler/scheduler-time-grid-view.component.css +24 -26
- package/src/lib/scheduler/scheduler.component.css +1 -1
- package/src/lib/scrollable/headless/scrollable-buttons.component.css +55 -6
- package/src/lib/scrollable/headless/scrollable-masks.component.css +2 -2
- package/src/lib/scrollable/headless/scrollable-navigation.component.css +2 -2
- package/src/lib/scrollbar/scrollbar.component.css +2 -2
- package/src/lib/skeleton/skeleton.component.css +2 -8
- package/src/lib/standings/standings-pick.component.css +13 -21
- package/src/lib/standings/standings.component.css +24 -30
- package/src/lib/stat-tile/stat-tile-sparkline.component.css +2 -2
- package/src/lib/stat-tile/stat-tile.component.css +5 -5
- package/src/lib/stream/consent/stream-consent.component.css +2 -2
- package/src/lib/stream/error/stream-player-error.component.css +2 -2
- package/src/lib/stream/loading/stream-player-loading.component.css +3 -3
- package/src/lib/stream/pip/pip-slot-placeholder.component.css +2 -2
- package/src/lib/stream/pip/pip-stage-styles.component.css +3 -6
- package/src/lib/stream/pip/pip-window.component.css +4 -5
- package/src/lib/stream/stream-overlay-card-styles.component.css +4 -4
- package/src/lib/stream/stream-player-slot-styles.component.css +1 -1
- package/src/lib/table/table-column-menu-trigger.component.css +1 -1
- package/src/lib/table/table-expander-cell.component.css +2 -2
- package/src/lib/table/table-filter-trigger.component.css +4 -4
- package/src/lib/table/table-group-header-row.component.css +1 -1
- package/src/lib/table/table-reorder-overlay.component.css +4 -4
- package/src/lib/table/table-resize-grip.component.css +4 -5
- package/src/lib/table/table-row-box-styles.component.css +7 -11
- package/src/lib/table/table-select-cell.component.css +7 -7
- package/src/lib/table/table-sort-priority-styles.component.css +1 -1
- package/src/lib/table/table.component.css +37 -49
- package/src/lib/tabs/tab-bar-styles.component.css +44 -8
- package/src/lib/time-picker/time-picker.component.css +16 -25
- package/src/lib/timeline/timeline-item.component.css +7 -10
- package/src/lib/timeline/timeline.component.css +1 -1
- package/src/lib/toggletip/toggletip.component.css +6 -1
- package/src/lib/toolbar/toolbar.component.css +1 -1
- package/src/lib/tooltip/tooltip.component.css +4 -4
- package/src/lib/tree/tree.component.css +18 -18
- package/types/ethlete-components.d.ts +85 -28
|
@@ -10,44 +10,46 @@ type Props = { group: 'surface' | 'contrast' | Theme; surface: Surface };
|
|
|
10
10
|
|
|
11
11
|
const STATE_ENDS = ['', '-hover', '-focus', '-active', '-disabled'];
|
|
12
12
|
|
|
13
|
+
const TONE_ENDS = ['-rest', '-hover', '-focus', '-active', '-disabled'];
|
|
14
|
+
|
|
13
15
|
const labelOf = (end: string) => (end ? end.slice(1) : 'rest');
|
|
14
16
|
|
|
15
17
|
const SURFACE_TOKEN =
|
|
16
|
-
/^et-(surface-(background|
|
|
18
|
+
/^et-(surface-(background|text(-muted|-subtle)?|border|interaction(-hover|-focus|-active|-disabled)?)|shadow-color)$/u;
|
|
17
19
|
|
|
18
|
-
const COLOR_TOKEN = /^et-
|
|
20
|
+
const COLOR_TOKEN = /^et-tone-(fill|on-fill|text)-(rest|hover|focus|active|disabled)$/u;
|
|
19
21
|
|
|
20
|
-
const TEXT_TOKEN = /^et-surface-(background|
|
|
22
|
+
const TEXT_TOKEN = /^et-surface-(background|text(-muted|-subtle)?)$/u;
|
|
21
23
|
|
|
22
24
|
const themeClassOf = (theme: Theme, surface: Surface) => `et-color--${theme}${surface === 'light' ? '-on-light' : ''}`;
|
|
23
25
|
|
|
24
26
|
const demoNote = (theme: Theme, surface: Surface) =>
|
|
25
27
|
`${theme} is a demo theme of the SDK Storybook (apps/storybook/src/themes.ts); the SDK ships no theme names, each app registers its own.${surface === 'light' ? ` On a light surface the sheet reads .${themeClassOf(theme, surface)}.` : ''}`;
|
|
26
28
|
|
|
27
|
-
const swatch = (token: string) => html`<span class="sdk-swatch" style="background:
|
|
29
|
+
const swatch = (token: string) => html`<span class="sdk-swatch" style="background: var(--${token})"></span>`;
|
|
28
30
|
|
|
29
31
|
const disabledOf = (name: string) => (name.endsWith('-disabled') ? 'aria-disabled="true"' : '');
|
|
30
32
|
|
|
31
33
|
const ink = (token: string, label = 'Aa') =>
|
|
32
|
-
html`<span class="sdk-ink" ${disabledOf(token)} style="color:
|
|
34
|
+
html`<span class="sdk-ink" ${disabledOf(token)} style="color: var(--${token})">${label}</span>`;
|
|
33
35
|
|
|
34
36
|
const surfaceSample = (name: string) => {
|
|
35
|
-
if (name === 'et-shadow-color
|
|
36
|
-
if (/^et-surface-
|
|
37
|
+
if (name === 'et-shadow-color') return html`<span class="sdk-swatch sdk-shadow"></span>`;
|
|
38
|
+
if (/^et-surface-text/u.test(name)) return ink(name);
|
|
37
39
|
|
|
38
40
|
return swatch(name);
|
|
39
41
|
};
|
|
40
42
|
|
|
41
43
|
const colorSample = (name: string) => {
|
|
42
|
-
const onFill = /^et-
|
|
44
|
+
const onFill = /^et-tone-on-fill(.*)$/u.exec(name);
|
|
43
45
|
if (onFill)
|
|
44
46
|
return html`<span
|
|
45
47
|
class="sdk-fill"
|
|
46
48
|
${disabledOf(name)}
|
|
47
|
-
style="background:
|
|
49
|
+
style="background: var(--et-tone-fill${onFill[1]}); color: var(--${name})"
|
|
48
50
|
>Aa</span
|
|
49
51
|
>`;
|
|
50
|
-
if (name.startsWith('et-
|
|
52
|
+
if (name.startsWith('et-tone-text')) return ink(name, 'Ink');
|
|
51
53
|
|
|
52
54
|
return swatch(name);
|
|
53
55
|
};
|
|
@@ -61,7 +63,7 @@ const surfacePanel = html`<div class="sdk-card">
|
|
|
61
63
|
${STATE_ENDS.map(
|
|
62
64
|
(end) =>
|
|
63
65
|
html`<span class="sdk-state"
|
|
64
|
-
><span class="sdk-swatch" style="background:
|
|
66
|
+
><span class="sdk-swatch" style="background: var(--et-surface-control-text${end})"></span
|
|
65
67
|
>${labelOf(end)}</span
|
|
66
68
|
>`,
|
|
67
69
|
).join('')}
|
|
@@ -72,20 +74,20 @@ const surfacePanel = html`<div class="sdk-card">
|
|
|
72
74
|
</div>`;
|
|
73
75
|
|
|
74
76
|
const themePanel = html`<div class="sdk-states">
|
|
75
|
-
${
|
|
77
|
+
${TONE_ENDS.map(
|
|
76
78
|
(end) =>
|
|
77
79
|
html`<span
|
|
78
80
|
class="sdk-fill sdk-fill--wide"
|
|
79
81
|
${disabledOf(end)}
|
|
80
|
-
style="background:
|
|
82
|
+
style="background: var(--et-tone-fill${end}); color: var(--et-tone-on-fill${end})"
|
|
81
83
|
>${labelOf(end)}</span
|
|
82
84
|
>`,
|
|
83
85
|
).join('')}
|
|
84
86
|
</div>
|
|
85
87
|
<div class="sdk-states">
|
|
86
|
-
${
|
|
88
|
+
${TONE_ENDS.map(
|
|
87
89
|
(end) =>
|
|
88
|
-
html`<span class="sdk-link" ${disabledOf(end)} style="color:
|
|
90
|
+
html`<span class="sdk-link" ${disabledOf(end)} style="color: var(--et-tone-text${end})"
|
|
89
91
|
>Ink ${labelOf(end)}</span
|
|
90
92
|
>`,
|
|
91
93
|
).join('')}
|
|
@@ -145,28 +147,28 @@ const sheetOf = (props: Props) => {
|
|
|
145
147
|
|
|
146
148
|
const STYLES = `
|
|
147
149
|
${contrastStyles}
|
|
148
|
-
.sdk-colors { --surface: var(--et-surface-background
|
|
150
|
+
.sdk-colors { --surface: var(--et-surface-background); --text: var(--et-surface-text); --text-muted: var(--et-surface-text-muted); --surface-border: var(--et-surface-border); --font-ui: var(--et-font-family); --font-code: var(--et-font-family-mono); width: max-content; }
|
|
149
151
|
.sdk-colors .ts-row { grid-template-columns: 300px 160px 1fr; }
|
|
150
152
|
section.ts-panel { display: flex; flex-direction: column; gap: 1.2rem; }
|
|
151
153
|
section.ts-panel.sdk-contrast { flex-direction: row; flex-wrap: wrap; gap: 2.4rem; }
|
|
152
154
|
.sdk-table { display: flex; flex-direction: column; gap: 0.8rem; }
|
|
153
155
|
.sdk-title { margin: 0; font-size: 1.4rem; font-weight: 600; }
|
|
154
|
-
.sdk-value { font-family: var(--et-font-family-mono); font-size: 1.2rem; color: var(--et-surface-
|
|
155
|
-
.sdk-card { display: flex; gap: 2.4rem; padding: 1.2rem 1.6rem; border: 0.1rem solid var(--et-surface-border
|
|
156
|
-
.sdk-muted { color: var(--et-surface-
|
|
157
|
-
.sdk-subtle { color: var(--et-surface-
|
|
156
|
+
.sdk-value { font-family: var(--et-font-family-mono); font-size: 1.2rem; color: var(--et-surface-text-muted); white-space: nowrap; }
|
|
157
|
+
.sdk-card { display: flex; gap: 2.4rem; padding: 1.2rem 1.6rem; border: 0.1rem solid var(--et-surface-border); border-radius: 0.6rem; }
|
|
158
|
+
.sdk-muted { color: var(--et-surface-text-muted); }
|
|
159
|
+
.sdk-subtle { color: var(--et-surface-text-subtle); }
|
|
158
160
|
.sdk-states { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; }
|
|
159
161
|
.sdk-state { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 1.2rem; }
|
|
160
|
-
.sdk-swatch { display: block; width: 4rem; height: 2.4rem; border-radius: 0.4rem; border: 0.1rem solid var(--et-surface-border
|
|
161
|
-
.sdk-shadow { background: var(--et-surface-background
|
|
162
|
+
.sdk-swatch { display: block; width: 4rem; height: 2.4rem; border-radius: 0.4rem; border: 0.1rem solid var(--et-surface-border); }
|
|
163
|
+
.sdk-shadow { background: var(--et-surface-background); box-shadow: 0 0.6rem 1.2rem color-mix(in srgb, var(--et-shadow-color) 22%, transparent), 0 0.2rem 0.4rem color-mix(in srgb, var(--et-shadow-color) 14%, transparent); }
|
|
162
164
|
.sdk-ink { font-size: 1.6rem; font-weight: 600; }
|
|
163
165
|
.sdk-fill { display: inline-grid; place-items: center; min-width: 4rem; height: 2.4rem; padding: 0 0.8rem; box-sizing: border-box; border-radius: 0.4rem; font-size: 1.2rem; font-weight: 600; }
|
|
164
166
|
.sdk-fill--wide { min-width: 8rem; height: 3.2rem; }
|
|
165
167
|
.sdk-link { min-width: 8rem; font-size: 1.3rem; font-weight: 600; text-decoration: underline; }
|
|
166
168
|
.sdk-elevations { display: flex; gap: 2.4rem; padding: 0.8rem 0; }
|
|
167
|
-
.sdk-elevation { display: grid; place-items: center; width: 12rem; height: 4.8rem; border-radius: 0.6rem; background: var(--et-surface-background
|
|
168
|
-
.sdk-shadow-resting { box-shadow: 0 0.3rem 0.8rem
|
|
169
|
-
.sdk-shadow-raised { box-shadow: 0 0.6rem 1.2rem
|
|
169
|
+
.sdk-elevation { display: grid; place-items: center; width: 12rem; height: 4.8rem; border-radius: 0.6rem; background: var(--et-surface-background); font-size: 1.2rem; }
|
|
170
|
+
.sdk-shadow-resting { box-shadow: 0 0.3rem 0.8rem color-mix(in srgb, var(--et-shadow-color) 20%, transparent), 0 0.1rem 0.3rem color-mix(in srgb, var(--et-shadow-color) 12%, transparent); }
|
|
171
|
+
.sdk-shadow-raised { box-shadow: 0 0.6rem 1.2rem color-mix(in srgb, var(--et-shadow-color) 22%, transparent), 0 0.2rem 0.4rem color-mix(in srgb, var(--et-shadow-color) 14%, transparent); }
|
|
170
172
|
`;
|
|
171
173
|
|
|
172
174
|
const render = (props: Props): Drawing => {
|
|
@@ -15,7 +15,7 @@ const pair = (options: {
|
|
|
15
15
|
const { label, text, on, scope, surface, fixed } = options;
|
|
16
16
|
|
|
17
17
|
return html`<div class="sdk-pair-row ${scope}">
|
|
18
|
-
<span class="sdk-pair" style="background:
|
|
18
|
+
<span class="sdk-pair" style="background: var(${on}); color: var(${text})">Aa</span>
|
|
19
19
|
<span class="sdk-pair-label ${fixed ? 'sdk-fixed' : ''}">${label}</span>
|
|
20
20
|
<code class="sdk-value">${text} / ${on}</code>
|
|
21
21
|
<strong
|
|
@@ -27,7 +27,7 @@ const pair = (options: {
|
|
|
27
27
|
</div>`;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
const STATE_SUFFIX = { rest: '', hover: '-hover', focus: '-focus', active: '-active' } as const;
|
|
30
|
+
const STATE_SUFFIX = { rest: '-rest', hover: '-hover', focus: '-focus', active: '-active' } as const;
|
|
31
31
|
|
|
32
32
|
const FIXED: Record<string, (keyof typeof STATE_SUFFIX)[]> = { danger: ['hover', 'focus'], warning: ['active'] };
|
|
33
33
|
|
|
@@ -44,9 +44,9 @@ export const contrastSheet = (surface: Surface) => {
|
|
|
44
44
|
`Text on the ${surface} background`,
|
|
45
45
|
(
|
|
46
46
|
[
|
|
47
|
-
['text', '--et-surface-
|
|
48
|
-
['muted', '--et-surface-
|
|
49
|
-
['subtle', '--et-surface-
|
|
47
|
+
['text', '--et-surface-text'],
|
|
48
|
+
['muted', '--et-surface-text-muted'],
|
|
49
|
+
['subtle', '--et-surface-text-subtle'],
|
|
50
50
|
] as const
|
|
51
51
|
)
|
|
52
52
|
.map(([role, token]) =>
|
|
@@ -63,8 +63,8 @@ export const contrastSheet = (surface: Surface) => {
|
|
|
63
63
|
.map(([state, end]) =>
|
|
64
64
|
pair({
|
|
65
65
|
label: state,
|
|
66
|
-
text: `--et-
|
|
67
|
-
on: `--et-
|
|
66
|
+
text: `--et-tone-on-fill${end}`,
|
|
67
|
+
on: `--et-tone-fill${end}`,
|
|
68
68
|
scope: `et-color--${theme}${suffix}`,
|
|
69
69
|
surface,
|
|
70
70
|
fixed: FIXED[theme]?.includes(state as keyof typeof STATE_SUFFIX) ?? false,
|
|
@@ -81,7 +81,7 @@ export const contrastSheet = (surface: Surface) => {
|
|
|
81
81
|
.map((theme) =>
|
|
82
82
|
pair({
|
|
83
83
|
label: `${theme}${suffix}`,
|
|
84
|
-
text: '--et-
|
|
84
|
+
text: '--et-tone-text-rest',
|
|
85
85
|
on: '--et-surface-background',
|
|
86
86
|
scope: `et-color--${theme}${suffix}`,
|
|
87
87
|
surface,
|
|
@@ -97,9 +97,9 @@ export const contrastSheet = (surface: Surface) => {
|
|
|
97
97
|
export const contrastStyles = `
|
|
98
98
|
.sdk-pairs { display: grid; grid-template-columns: 4rem auto auto auto; gap: 0.6rem 1.2rem; align-items: center; margin-top: 0.4rem; }
|
|
99
99
|
.sdk-pair-row { display: contents; }
|
|
100
|
-
.sdk-pair { display: grid; place-items: center; width: 4rem; height: 2.8rem; border-radius: 0.4rem; border: 0.1rem solid var(--et-surface-border
|
|
100
|
+
.sdk-pair { display: grid; place-items: center; width: 4rem; height: 2.8rem; border-radius: 0.4rem; border: 0.1rem solid var(--et-surface-border); font-size: 1.4rem; font-weight: 600; }
|
|
101
101
|
.sdk-pair-label { font-size: 1.2rem; white-space: nowrap; }
|
|
102
102
|
.sdk-fixed { font-weight: 600; }
|
|
103
103
|
.sdk-ratio { font-size: 1.2rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
104
|
-
.sdk-ratio[data-et-contrast-low] { color: var(--et-surface-
|
|
104
|
+
.sdk-ratio[data-et-contrast-low] { color: var(--et-surface-text-muted); text-decoration: line-through; }
|
|
105
105
|
`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@media (prefers-color-scheme: dark) {
|
|
2
2
|
.sdk-ring {
|
|
3
|
-
--
|
|
4
|
-
--sdk-elevation-edge: var(--
|
|
3
|
+
--sdk-surface-ring: color-mix(in srgb, var(--et-surface-text) 24%, var(--et-surface-background));
|
|
4
|
+
--sdk-elevation-edge: var(--sdk-surface-ring);
|
|
5
5
|
}
|
|
6
6
|
}
|
|
@@ -3,7 +3,7 @@ import { ELEVATION_STATES, elevationScene, type ElevationProps } from './shared/
|
|
|
3
3
|
import edge from './elevation.css?inline';
|
|
4
4
|
|
|
5
5
|
export default definePart<ElevationProps>({
|
|
6
|
-
note: 'How the SDK lifts things off the base surface: a card, an elevated panel and an overlay pane (the select panel mock), side by side and as a pane over a panel. Fills come from the elevated surface tokens; no background colour differs from the product. In the dark scheme a 1 px ring in --
|
|
6
|
+
note: 'How the SDK lifts things off the base surface: a card, an elevated panel and an overlay pane (the select panel mock), side by side and as a pane over a panel. Fills come from the elevated surface tokens; no background colour differs from the product. In the dark scheme a 1 px ring in --sdk-surface-ring (24 % --et-surface-text over the fill) replaces the border colour. The token is defined here; the generator does not emit it yet.',
|
|
7
7
|
consumerAction: 'a showcase whose select the consumer binds',
|
|
8
8
|
madeBy: ['claude-opus-5-5'],
|
|
9
9
|
states: ELEVATION_STATES,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
box-sizing: border-box;
|
|
3
3
|
width: max-content;
|
|
4
4
|
padding: 4rem;
|
|
5
|
-
background: var(--et-surface-background
|
|
6
|
-
color: var(--et-surface-
|
|
5
|
+
background: var(--et-surface-background);
|
|
6
|
+
color: var(--et-surface-text);
|
|
7
7
|
font-size: 1.4rem;
|
|
8
8
|
}
|
|
9
9
|
|
|
@@ -16,19 +16,20 @@
|
|
|
16
16
|
.sdk-elevation-card,
|
|
17
17
|
.sdk-elevation-panel,
|
|
18
18
|
.sdk-elevation-pane-panel {
|
|
19
|
-
--sdk-elevation-edge: var(--et-surface-border
|
|
19
|
+
--sdk-elevation-edge: var(--et-surface-border);
|
|
20
20
|
--sdk-elevation-highlight: 0 0 0 0 transparent;
|
|
21
21
|
|
|
22
22
|
box-sizing: border-box;
|
|
23
23
|
border: 0.1rem solid var(--sdk-elevation-edge);
|
|
24
|
-
background: var(--et-surface-background
|
|
25
|
-
color: var(--et-surface-
|
|
24
|
+
background: var(--et-surface-background);
|
|
25
|
+
color: var(--et-surface-text);
|
|
26
26
|
box-shadow: var(--sdk-elevation-highlight), var(--sdk-elevation-shadow);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.sdk-elevation-card {
|
|
30
30
|
--sdk-elevation-shadow:
|
|
31
|
-
0 0.3rem 0.8rem
|
|
31
|
+
0 0.3rem 0.8rem color-mix(in srgb, var(--et-shadow-color) 20%, transparent),
|
|
32
|
+
0 0.1rem 0.3rem color-mix(in srgb, var(--et-shadow-color) 12%, transparent);
|
|
32
33
|
|
|
33
34
|
display: flex;
|
|
34
35
|
flex-direction: column;
|
|
@@ -40,7 +41,8 @@
|
|
|
40
41
|
|
|
41
42
|
.sdk-elevation-panel {
|
|
42
43
|
--sdk-elevation-shadow:
|
|
43
|
-
0 0.6rem 1.2rem
|
|
44
|
+
0 0.6rem 1.2rem color-mix(in srgb, var(--et-shadow-color) 22%, transparent),
|
|
45
|
+
0 0.2rem 0.4rem color-mix(in srgb, var(--et-shadow-color) 14%, transparent);
|
|
44
46
|
|
|
45
47
|
display: flex;
|
|
46
48
|
flex-direction: column;
|
|
@@ -51,7 +53,10 @@
|
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
.sdk-elevation-pane-panel {
|
|
54
|
-
--sdk-elevation-shadow: var(
|
|
56
|
+
--sdk-elevation-shadow: var(
|
|
57
|
+
--et-anchored-panel-shadow,
|
|
58
|
+
0 1rem 2.4rem color-mix(in srgb, var(--et-shadow-color) 16%, transparent)
|
|
59
|
+
);
|
|
55
60
|
|
|
56
61
|
width: 22rem;
|
|
57
62
|
}
|
|
@@ -63,19 +68,19 @@
|
|
|
63
68
|
}
|
|
64
69
|
|
|
65
70
|
.sdk-elevation-label {
|
|
66
|
-
color: var(--et-surface-
|
|
71
|
+
color: var(--et-surface-text-muted);
|
|
67
72
|
font-size: 1.2rem;
|
|
68
73
|
}
|
|
69
74
|
|
|
70
75
|
.sdk-elevation-muted {
|
|
71
|
-
color: var(--et-surface-
|
|
76
|
+
color: var(--et-surface-text-muted);
|
|
72
77
|
}
|
|
73
78
|
|
|
74
79
|
.sdk-elevation-line {
|
|
75
80
|
height: 3.2rem;
|
|
76
81
|
margin-top: 0.8rem;
|
|
77
82
|
border-radius: 0.6rem;
|
|
78
|
-
background: color-mix(in srgb, var(--et-surface-
|
|
83
|
+
background: color-mix(in srgb, var(--et-surface-tint) 12%, transparent);
|
|
79
84
|
}
|
|
80
85
|
|
|
81
86
|
.sdk-elevation-line--short {
|
package/design/sdk/ready.json
CHANGED
|
@@ -1,38 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"components/action-sheet": {
|
|
3
|
-
"hash": "91d3c0cc549b906e",
|
|
4
|
-
"files": {
|
|
5
|
-
".ethlete/design/sdk/components/action-sheet/action-sheet.css": "5995078f6fd832f4",
|
|
6
|
-
".ethlete/design/sdk/components/action-sheet/action-sheet.ts": "b7855343a8e025a4",
|
|
7
|
-
"libs/components/design/button.ts": "48f441533cf5bb8f",
|
|
8
|
-
"libs/components/design/dialog.ts": "424aeadd7dbf0dad",
|
|
9
|
-
"libs/components/design/icon.ts": "829a95253b948ba9",
|
|
10
|
-
"libs/components/design/loader.ts": "e05586c3d6f1de74",
|
|
11
|
-
"libs/components/src/lib/button/button-properties-styles.component.css": "8cda9b48a805c82c",
|
|
12
|
-
"libs/components/src/lib/button/button.component.css": "1e1a9b20ad656180",
|
|
13
|
-
"libs/components/src/lib/button/button.types.ts": "acca1b3657e54715",
|
|
14
|
-
"libs/components/src/lib/button/icon-button.component.css": "5dc15211d1dd02fc",
|
|
15
|
-
"libs/components/src/lib/focus-ring/focus-ring-styles.component.css": "df6f86f168edd72e",
|
|
16
|
-
"libs/components/src/lib/icon/headless/icon-definition.ts": "180b7ea77305a404",
|
|
17
|
-
"libs/components/src/lib/icon/headless/icon-styles.component.css": "95703f321e08a70b",
|
|
18
|
-
"libs/components/src/lib/icon/headless/times-icon.ts": "52047c20b1cf421d",
|
|
19
|
-
"libs/components/src/lib/loader/brand-loader/brand-loader.component.css": "8ee58ff3f1f8390e",
|
|
20
|
-
"libs/components/src/lib/loader/progress-bar/progress-bar.component.css": "ed988a595c1ca18f",
|
|
21
|
-
"libs/components/src/lib/loader/spinner/spinner-styles.component.css": "781633d6ac0b70d9",
|
|
22
|
-
"libs/components/src/lib/overlay/alert-dialog/alert-dialog.component.css": "634bf293291cc8a7",
|
|
23
|
-
"libs/components/src/lib/overlay/overlay-container.component.css": "68455f1f6f6ce18e",
|
|
24
|
-
"libs/components/src/lib/overlay/overlay-main-styles.component.css": "a141c3135515466d",
|
|
25
|
-
"libs/components/src/lib/overlay/strategies/dialog-styles.component.css": "19d93f189828f7d2",
|
|
26
|
-
"libs/core/design/interactive-styles.ts": "781528322bd34499",
|
|
27
|
-
"libs/core/src/lib/theming/color-interactive-styles.component.css": "86c7eef5dbeddc7f",
|
|
28
|
-
"libs/core/src/lib/theming/surface-interactive-styles.component.css": "e52765c5a323da05"
|
|
29
|
-
},
|
|
30
3
|
"actions": [],
|
|
31
|
-
"
|
|
32
|
-
"at": "2026-11-18T14:08:46.959Z",
|
|
33
|
-
"by": "claude-opus-5-5",
|
|
34
|
-
"cmd": "ready",
|
|
35
|
-
"pid": 1951112
|
|
4
|
+
"at": "2026-11-25T18:40:32.188Z"
|
|
36
5
|
},
|
|
37
6
|
"components/anchored-dialog": {
|
|
38
7
|
"hash": "9d7f60722dd7d428",
|
|
@@ -83,23 +52,8 @@
|
|
|
83
52
|
"pid": 2371538
|
|
84
53
|
},
|
|
85
54
|
"components/badge": {
|
|
86
|
-
"hash": "8ff3db9e1d266277",
|
|
87
|
-
"files": {
|
|
88
|
-
".ethlete/design/sdk/components/badge/badge.css": "1d9a7aa65576198e",
|
|
89
|
-
".ethlete/design/sdk/components/badge/badge.ts": "fbe9ef7b5ad265a4",
|
|
90
|
-
"libs/components/design/badge.ts": "ae6d1b71fa14a024",
|
|
91
|
-
"libs/components/design/icon-set.ts": "2aab551c1dd9aedc",
|
|
92
|
-
"libs/components/design/icon.ts": "829a95253b948ba9",
|
|
93
|
-
"libs/components/src/lib/badge/badge.component.css": "e2bfc2314f98ff53",
|
|
94
|
-
"libs/components/src/lib/icon/headless/icon-definition.ts": "180b7ea77305a404",
|
|
95
|
-
"libs/components/src/lib/icon/headless/icon-styles.component.css": "95703f321e08a70b"
|
|
96
|
-
},
|
|
97
55
|
"actions": [],
|
|
98
|
-
"
|
|
99
|
-
"at": "2026-11-17T20:31:37.256Z",
|
|
100
|
-
"by": "claude-opus-5-5",
|
|
101
|
-
"cmd": "ready",
|
|
102
|
-
"pid": 1300751
|
|
56
|
+
"at": "2026-11-17T20:31:37.256Z"
|
|
103
57
|
},
|
|
104
58
|
"components/banner": {
|
|
105
59
|
"actions": [],
|
|
@@ -135,32 +89,8 @@
|
|
|
135
89
|
"pid": 491352
|
|
136
90
|
},
|
|
137
91
|
"components/card": {
|
|
138
|
-
"hash": "e3627a1890dfbd1f",
|
|
139
|
-
"files": {
|
|
140
|
-
".ethlete/design/sdk/components/card/card.css": "996bdd933fc14e95",
|
|
141
|
-
".ethlete/design/sdk/components/card/card.ts": "2f4644c1d19700fb",
|
|
142
|
-
"libs/components/design/button.ts": "48f441533cf5bb8f",
|
|
143
|
-
"libs/components/design/card.ts": "328baccb80f6f9ae",
|
|
144
|
-
"libs/components/design/loader.ts": "e05586c3d6f1de74",
|
|
145
|
-
"libs/components/src/lib/button/button-properties-styles.component.css": "8cda9b48a805c82c",
|
|
146
|
-
"libs/components/src/lib/button/button.component.css": "1e1a9b20ad656180",
|
|
147
|
-
"libs/components/src/lib/button/button.types.ts": "acca1b3657e54715",
|
|
148
|
-
"libs/components/src/lib/button/icon-button.component.css": "5dc15211d1dd02fc",
|
|
149
|
-
"libs/components/src/lib/card/card.component.css": "297b7054877280ab",
|
|
150
|
-
"libs/components/src/lib/focus-ring/focus-ring-styles.component.css": "df6f86f168edd72e",
|
|
151
|
-
"libs/components/src/lib/loader/brand-loader/brand-loader.component.css": "8ee58ff3f1f8390e",
|
|
152
|
-
"libs/components/src/lib/loader/progress-bar/progress-bar.component.css": "ed988a595c1ca18f",
|
|
153
|
-
"libs/components/src/lib/loader/spinner/spinner-styles.component.css": "781633d6ac0b70d9",
|
|
154
|
-
"libs/core/design/interactive-styles.ts": "781528322bd34499",
|
|
155
|
-
"libs/core/src/lib/theming/color-interactive-styles.component.css": "86c7eef5dbeddc7f",
|
|
156
|
-
"libs/core/src/lib/theming/surface-interactive-styles.component.css": "e52765c5a323da05"
|
|
157
|
-
},
|
|
158
92
|
"actions": [],
|
|
159
|
-
"
|
|
160
|
-
"at": "2026-11-18T14:09:01.385Z",
|
|
161
|
-
"by": "claude-opus-5-5",
|
|
162
|
-
"cmd": "ready",
|
|
163
|
-
"pid": 1954846
|
|
93
|
+
"at": "2026-11-25T11:22:20.131Z"
|
|
164
94
|
},
|
|
165
95
|
"components/carousel": {
|
|
166
96
|
"hash": "a0d0ef4e426ca300",
|
|
@@ -357,43 +287,8 @@
|
|
|
357
287
|
"pid": 675558
|
|
358
288
|
},
|
|
359
289
|
"components/select": {
|
|
360
|
-
"hash": "fedc7d1d8983ca57",
|
|
361
|
-
"files": {
|
|
362
|
-
".ethlete/design/sdk/components/select/select.css": "f0b7d98fc106a3d8",
|
|
363
|
-
".ethlete/design/sdk/components/select/select.ts": "f9d4735087a09035",
|
|
364
|
-
".ethlete/design/sdk/components/select/shared/select-part.ts": "cb3acc9d89219613",
|
|
365
|
-
"libs/components/design/form-field.ts": "6910b0bf23eb0f3c",
|
|
366
|
-
"libs/components/design/icon.ts": "829a95253b948ba9",
|
|
367
|
-
"libs/components/design/select.ts": "97420e3a72aefea5",
|
|
368
|
-
"libs/components/src/lib/forms/form-field/form-field-control-suffix-styles.component.css": "c92cd543be49692a",
|
|
369
|
-
"libs/components/src/lib/forms/form-field/form-field-suffix-overlap-styles.component.css": "02d9835f3a282213",
|
|
370
|
-
"libs/components/src/lib/forms/form-field/form-field-text-shell-styles.component.css": "256c80dd0afd952f",
|
|
371
|
-
"libs/components/src/lib/forms/form-field/form-field.component.css": "902055c00d5921a8",
|
|
372
|
-
"libs/components/src/lib/forms/form-field/headless/label.directive.css": "9aceda0d26b46524",
|
|
373
|
-
"libs/components/src/lib/forms/form-field/hint.component.css": "b1531941f843c188",
|
|
374
|
-
"libs/components/src/lib/forms/input/input.component.css": "fb9a4e64341faf2a",
|
|
375
|
-
"libs/components/src/lib/forms/select/select-all-option.component.css": "04b669797ac4e5e1",
|
|
376
|
-
"libs/components/src/lib/forms/select/select-option-group.component.css": "b7acd6c2e423929c",
|
|
377
|
-
"libs/components/src/lib/forms/select/select-option-styles.component.css": "3e2482c34ad0df78",
|
|
378
|
-
"libs/components/src/lib/forms/select/select-panel.component.css": "c1d2d2be645e0c22",
|
|
379
|
-
"libs/components/src/lib/forms/select/select.component.css": "5f0c0249084d3635",
|
|
380
|
-
"libs/components/src/lib/forms/textarea/textarea-autosize-styles.component.css": "5b69cdc878fe83fc",
|
|
381
|
-
"libs/components/src/lib/forms/textarea/textarea.component.css": "0983f19962cc1c64",
|
|
382
|
-
"libs/components/src/lib/icon/headless/check-icon.ts": "6a14df4cc853b42d",
|
|
383
|
-
"libs/components/src/lib/icon/headless/chevron-icon.ts": "d2c88d30d687a8bf",
|
|
384
|
-
"libs/components/src/lib/icon/headless/icon-definition.ts": "180b7ea77305a404",
|
|
385
|
-
"libs/components/src/lib/icon/headless/icon-styles.component.css": "95703f321e08a70b",
|
|
386
|
-
"libs/components/src/lib/icon/headless/times-icon.ts": "52047c20b1cf421d",
|
|
387
|
-
"libs/core/design/interactive-styles.ts": "781528322bd34499",
|
|
388
|
-
"libs/core/src/lib/theming/color-interactive-styles.component.css": "86c7eef5dbeddc7f",
|
|
389
|
-
"libs/core/src/lib/theming/surface-interactive-styles.component.css": "e52765c5a323da05"
|
|
390
|
-
},
|
|
391
290
|
"actions": [],
|
|
392
|
-
"
|
|
393
|
-
"at": "2026-11-22T15:58:33.375Z",
|
|
394
|
-
"by": "opus",
|
|
395
|
-
"cmd": "ready",
|
|
396
|
-
"pid": 1619502
|
|
291
|
+
"at": "2026-11-26T02:40:33.739Z"
|
|
397
292
|
},
|
|
398
293
|
"components/select-panel": {
|
|
399
294
|
"hash": "6048a2282eaa4525",
|
package/design/tabs.ts
CHANGED
|
@@ -50,7 +50,7 @@ export const tabs = (options: TabsMockOptions) => {
|
|
|
50
50
|
`aria-controls="et-tab-panel-${id}-${index}"`,
|
|
51
51
|
tab.disabled && 'aria-disabled="true" disabled',
|
|
52
52
|
`tabindex="${isSelected ? 0 : -1}"`,
|
|
53
|
-
`class="${['et-tab-group__trigger', 'et-
|
|
53
|
+
`class="${['et-tab-group__trigger', 'et-focus-ring', isSelected && 'et-tab-group__trigger--active', tab.disabled && 'et-tab-group__trigger--disabled'].filter(Boolean).join(' ')}"`,
|
|
54
54
|
].filter(Boolean);
|
|
55
55
|
|
|
56
56
|
return `<button ${attributes.join(' ')}><span class="et-tab-group__trigger-content">${tab.label}</span><span class="et-tab-bar-underline${isSelected ? ' et-tab-bar-underline--active' : ''}"></span></button>`;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { Placement } from '@floating-ui/dom';
|
|
2
|
+
import overlayContainer from '../src/lib/overlay/overlay-container.component.css?inline';
|
|
3
|
+
import floatingTip from '../src/lib/overlay/floating-tip-styles.component.css?inline';
|
|
4
|
+
import overlayArrow from '../src/lib/overlay/strategies/overlay-arrow-styles.component.css?inline';
|
|
5
|
+
import toggletipBase from '../src/lib/toggletip/toggletip.component.css?inline';
|
|
6
|
+
|
|
7
|
+
export type ToggletipMockOptions = {
|
|
8
|
+
/** The toggletip text, as HTML. Drawn like a string `etToggletip`. */
|
|
9
|
+
text?: string;
|
|
10
|
+
/** Template content, as HTML. Drawn like a `TemplateRef` `etToggletip`; wins over `text`. */
|
|
11
|
+
content?: string;
|
|
12
|
+
/** The side the pane opened on; the arrow points back at the trigger. Defaults to `top`, as `etToggletip` does. */
|
|
13
|
+
placement?: Placement;
|
|
14
|
+
/** A surface theme name the app registers. Left out, the pane takes the surface one elevation above its parent. */
|
|
15
|
+
surface?: string;
|
|
16
|
+
/**
|
|
17
|
+
* A CSS selector of the drawn trigger. The design frame places the pane and aims the arrow at its centre on whole
|
|
18
|
+
* pixels, as the overlay runtime does.
|
|
19
|
+
*/
|
|
20
|
+
anchor?: string;
|
|
21
|
+
/** The accessible name of the dialog, as `etToggletipAriaLabel` sets it. */
|
|
22
|
+
ariaLabel?: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** The stylesheets `toggletip()` draws with: the real `et-toggletip`, floating tip, overlay pane and arrow CSS. */
|
|
26
|
+
export const toggletipStyles = /* @__PURE__ */ [
|
|
27
|
+
overlayContainer,
|
|
28
|
+
overlayArrow,
|
|
29
|
+
floatingTip,
|
|
30
|
+
toggletipBase,
|
|
31
|
+
`@layer components.sdk {
|
|
32
|
+
.et-toggletip-mock-pane {
|
|
33
|
+
--_et-overlay-arrow-pane-border-width: 1px;
|
|
34
|
+
inline-size: calc-size(max-content, round(up, size, 1px));
|
|
35
|
+
block-size: calc-size(auto, round(up, size, 1px));
|
|
36
|
+
transform: translate3d(0, 0, 0);
|
|
37
|
+
}
|
|
38
|
+
.et-toggletip-mock-pane:is([data-overlay-placement^='top'], [data-overlay-placement^='bottom']) > .et-overlay-arrow {
|
|
39
|
+
left: calc(round(down, 50%, 1px) - 10px);
|
|
40
|
+
}
|
|
41
|
+
.et-toggletip-mock-pane:is([data-overlay-placement^='left'], [data-overlay-placement^='right']) > .et-overlay-arrow {
|
|
42
|
+
top: calc(round(down, 50%, 1px) - 10px);
|
|
43
|
+
}
|
|
44
|
+
.et-toggletip-mock-pane:is([data-overlay-placement^='top-start'], [data-overlay-placement^='bottom-start']) > .et-overlay-arrow {
|
|
45
|
+
left: 20px;
|
|
46
|
+
}
|
|
47
|
+
.et-toggletip-mock-pane:is([data-overlay-placement^='top-end'], [data-overlay-placement^='bottom-end']) > .et-overlay-arrow {
|
|
48
|
+
left: calc(100% - 40px);
|
|
49
|
+
}
|
|
50
|
+
.et-toggletip-mock-pane:is([data-overlay-placement^='left-start'], [data-overlay-placement^='right-start']) > .et-overlay-arrow {
|
|
51
|
+
top: 20px;
|
|
52
|
+
}
|
|
53
|
+
.et-toggletip-mock-pane:is([data-overlay-placement^='left-end'], [data-overlay-placement^='right-end']) > .et-overlay-arrow {
|
|
54
|
+
top: calc(100% - 40px);
|
|
55
|
+
}
|
|
56
|
+
}`,
|
|
57
|
+
].join('\n');
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Draws an open `et-toggletip` in its overlay pane, with the arrow, as HTML. The pane sits in flow, so place it next to
|
|
61
|
+
* the drawn trigger.
|
|
62
|
+
*/
|
|
63
|
+
export const toggletip = (options: ToggletipMockOptions = {}) => {
|
|
64
|
+
const { placement = 'top' } = options;
|
|
65
|
+
const surface = options.surface && `et-surface--${options.surface}`;
|
|
66
|
+
|
|
67
|
+
const paneClasses = [
|
|
68
|
+
'et-overlay',
|
|
69
|
+
'et-overlay-runtime-pane',
|
|
70
|
+
'et-toggletip-panel',
|
|
71
|
+
'et-overlay--toggletip',
|
|
72
|
+
'et-floating-panel',
|
|
73
|
+
'et-color--inherited',
|
|
74
|
+
surface,
|
|
75
|
+
'et-with-default-animation',
|
|
76
|
+
'et-animation-enter-done',
|
|
77
|
+
'et-toggletip-mock-pane',
|
|
78
|
+
].filter(Boolean);
|
|
79
|
+
|
|
80
|
+
const anchorAttribute = options.anchor ? ` data-et-arrow-anchor="${options.anchor.replaceAll('"', '"')}"` : '';
|
|
81
|
+
const labelAttribute = options.ariaLabel ? ` aria-label="${options.ariaLabel.replaceAll('"', '"')}"` : '';
|
|
82
|
+
const body = options.content ?? `<p class="et-toggletip__text">${options.text ?? ''}</p>`;
|
|
83
|
+
|
|
84
|
+
return `<div class="${paneClasses.join(' ')}" data-overlay-placement="${placement}"${anchorAttribute}${surface ? '' : ' data-et-auto-surface'}><et-toggletip class="et-toggletip et-color--inherited ${surface ?? 'et-surface--inherited'}" role="dialog"${labelAttribute}><div class="et-toggletip__surface"><div class="et-toggletip__content">${body}</div></div></et-toggletip><div et-floating-arrow class="et-overlay-arrow"></div></div>`;
|
|
85
|
+
};
|