@ethlete/components 0.1.0-next.9 → 1.0.0-next.101
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 +3519 -0
- package/README.md +1 -1
- package/design/accordion.ts +73 -0
- package/design/anchored-dialog.ts +102 -0
- package/design/avatar.ts +90 -0
- package/design/badge.ts +48 -0
- package/design/banner.ts +77 -0
- package/design/bracket.ts +457 -0
- package/design/breadcrumb.ts +144 -0
- package/design/button.ts +116 -0
- package/design/calendar.ts +306 -0
- package/design/card.ts +92 -0
- package/design/carousel.ts +240 -0
- package/design/chart.ts +512 -0
- package/design/checkbox.ts +275 -0
- package/design/chip.ts +64 -0
- package/design/config.json +26 -0
- package/design/control.ts +19 -0
- package/design/copy-button.ts +59 -0
- package/design/description-list.ts +41 -0
- package/design/dialog.ts +210 -0
- package/design/divider.ts +27 -0
- package/design/empty-state.ts +45 -0
- package/design/floating-action.ts +55 -0
- package/design/form-field.ts +256 -0
- package/design/grid.ts +148 -0
- package/design/icon-set.ts +19 -0
- package/design/icon.ts +9 -0
- package/design/input.ts +86 -0
- package/design/kbd.ts +19 -0
- package/design/loader.ts +156 -0
- package/design/masonry.ts +115 -0
- package/design/match.ts +131 -0
- package/design/menu.ts +149 -0
- package/design/notification.ts +132 -0
- package/design/otp-input.ts +107 -0
- package/design/pagination.ts +120 -0
- package/design/picture.ts +80 -0
- package/design/progress-steps.ts +79 -0
- package/design/query-error.ts +60 -0
- package/design/radio-group.ts +132 -0
- package/design/scheduler.ts +369 -0
- package/design/scrollable.ts +219 -0
- package/design/scrollbar.ts +47 -0
- package/design/sdk/assets/fallback.svg +1 -0
- package/design/sdk/assets/fonts/et-kbd-arrows-400-normal.woff2 +0 -0
- package/design/sdk/assets/fonts/et-kbd-control-400-normal.woff2 +0 -0
- package/design/sdk/assets/fonts/et-kbd-keys-400-normal.woff2 +0 -0
- package/design/sdk/assets/fonts/source-code-pro-latin-wght-normal.woff2 +0 -0
- package/design/sdk/assets/fonts/source-sans-3-latin-wght-normal.woff2 +0 -0
- package/design/sdk/assets/tall.svg +1 -0
- package/design/sdk/assets/wide.svg +1 -0
- package/design/sdk/components/accent-on-light/accent-on-light.css +35 -0
- package/design/sdk/components/accent-on-light/accent-on-light.ts +15 -0
- package/design/sdk/components/accent-on-light/shared/controls.ts +46 -0
- package/design/sdk/components/accordion/accordion.css +17 -0
- package/design/sdk/components/accordion/accordion.ts +79 -0
- package/design/sdk/components/action-sheet/action-sheet.css +124 -0
- package/design/sdk/components/action-sheet/action-sheet.ts +131 -0
- package/design/sdk/components/anchored-dialog/anchored-dialog.css +60 -0
- package/design/sdk/components/anchored-dialog/anchored-dialog.ts +89 -0
- package/design/sdk/components/avatar/avatar.css +14 -0
- package/design/sdk/components/avatar/avatar.ts +95 -0
- package/design/sdk/components/badge/badge.css +31 -0
- package/design/sdk/components/badge/badge.ts +89 -0
- package/design/sdk/components/banner/banner.css +18 -0
- package/design/sdk/components/banner/banner.ts +160 -0
- package/design/sdk/components/bracket/bracket.css +56 -0
- package/design/sdk/components/bracket/bracket.ts +183 -0
- package/design/sdk/components/breadcrumb/breadcrumb.css +25 -0
- package/design/sdk/components/breadcrumb/breadcrumb.ts +96 -0
- package/design/sdk/components/button/button.css +19 -0
- package/design/sdk/components/button/button.ts +201 -0
- package/design/sdk/components/calendar/calendar.css +33 -0
- package/design/sdk/components/calendar/calendar.ts +183 -0
- package/design/sdk/components/card/card.css +19 -0
- package/design/sdk/components/card/card.ts +111 -0
- package/design/sdk/components/carousel/carousel.css +44 -0
- package/design/sdk/components/carousel/carousel.ts +162 -0
- package/design/sdk/components/chart/chart.css +56 -0
- package/design/sdk/components/chart/chart.ts +146 -0
- package/design/sdk/components/checkbox/checkbox.css +10 -0
- package/design/sdk/components/checkbox/checkbox.ts +223 -0
- package/design/sdk/components/chip/chip.css +18 -0
- package/design/sdk/components/chip/chip.ts +99 -0
- package/design/sdk/components/copy-button/copy-button.css +14 -0
- package/design/sdk/components/copy-button/copy-button.ts +77 -0
- package/design/sdk/components/description-list/description-list.css +7 -0
- package/design/sdk/components/description-list/description-list.ts +64 -0
- package/design/sdk/components/dialog/dialog.css +29 -0
- package/design/sdk/components/dialog/dialog.ts +173 -0
- package/design/sdk/components/divider/divider.css +26 -0
- package/design/sdk/components/divider/divider.ts +49 -0
- package/design/sdk/components/empty-state/empty-state.css +39 -0
- package/design/sdk/components/empty-state/empty-state.ts +67 -0
- package/design/sdk/components/floating-action/floating-action.css +51 -0
- package/design/sdk/components/floating-action/floating-action.ts +78 -0
- package/design/sdk/components/form-field/form-field.ts +204 -0
- package/design/sdk/components/grid/grid.css +17 -0
- package/design/sdk/components/grid/grid.ts +96 -0
- package/design/sdk/components/input/input.css +48 -0
- package/design/sdk/components/input/input.ts +156 -0
- package/design/sdk/components/kbd/kbd.css +25 -0
- package/design/sdk/components/kbd/kbd.ts +70 -0
- package/design/sdk/components/loader/loader.css +37 -0
- package/design/sdk/components/loader/loader.ts +79 -0
- package/design/sdk/components/masonry/masonry.css +7 -0
- package/design/sdk/components/masonry/masonry.ts +50 -0
- package/design/sdk/components/match/match.css +22 -0
- package/design/sdk/components/match/match.ts +95 -0
- package/design/sdk/components/menu/menu.css +22 -0
- package/design/sdk/components/menu/menu.ts +120 -0
- package/design/sdk/components/notification/notification.css +32 -0
- package/design/sdk/components/notification/notification.ts +117 -0
- package/design/sdk/components/otp-input/otp-input.css +35 -0
- package/design/sdk/components/otp-input/otp-input.ts +94 -0
- package/design/sdk/components/pagination/pagination.css +14 -0
- package/design/sdk/components/pagination/pagination.ts +97 -0
- package/design/sdk/components/picture/picture.css +37 -0
- package/design/sdk/components/picture/picture.ts +112 -0
- package/design/sdk/components/progress-steps/progress-steps.css +37 -0
- package/design/sdk/components/progress-steps/progress-steps.ts +109 -0
- package/design/sdk/components/query-error/query-error.css +27 -0
- package/design/sdk/components/query-error/query-error.ts +167 -0
- package/design/sdk/components/radio-group/radio-group.css +10 -0
- package/design/sdk/components/radio-group/radio-group.ts +209 -0
- package/design/sdk/components/scheduler/scheduler.css +49 -0
- package/design/sdk/components/scheduler/scheduler.ts +267 -0
- package/design/sdk/components/scrollable/scrollable.css +58 -0
- package/design/sdk/components/scrollable/scrollable.ts +198 -0
- package/design/sdk/components/scrollbar/scrollbar.css +78 -0
- package/design/sdk/components/scrollbar/scrollbar.ts +152 -0
- package/design/sdk/components/select/select.css +5 -0
- package/design/sdk/components/select/select.ts +42 -0
- package/design/sdk/components/select/shared/select-part.ts +80 -0
- package/design/sdk/components/select-panel/select-panel.css +3 -0
- package/design/sdk/components/select-panel/select-panel.ts +144 -0
- package/design/sdk/components/skeleton/skeleton.css +22 -0
- package/design/sdk/components/skeleton/skeleton.ts +58 -0
- package/design/sdk/components/slider/slider.css +47 -0
- package/design/sdk/components/slider/slider.ts +133 -0
- package/design/sdk/components/standings/standings.css +32 -0
- package/design/sdk/components/standings/standings.ts +146 -0
- package/design/sdk/components/stat-tile/stat-tile.css +15 -0
- package/design/sdk/components/stat-tile/stat-tile.ts +97 -0
- package/design/sdk/components/stream/stream.css +42 -0
- package/design/sdk/components/stream/stream.ts +63 -0
- package/design/sdk/components/switch/switch.ts +94 -0
- package/design/sdk/components/table/table.css +67 -0
- package/design/sdk/components/table/table.ts +320 -0
- package/design/sdk/components/tabs/tabs.css +13 -0
- package/design/sdk/components/tabs/tabs.ts +95 -0
- package/design/sdk/components/textarea/textarea.css +90 -0
- package/design/sdk/components/textarea/textarea.ts +154 -0
- package/design/sdk/components/timeline/timeline.css +30 -0
- package/design/sdk/components/timeline/timeline.ts +98 -0
- package/design/sdk/components/toolbar/toolbar.css +24 -0
- package/design/sdk/components/toolbar/toolbar.ts +104 -0
- package/design/sdk/components/tooltip/tooltip.css +15 -0
- package/design/sdk/components/tooltip/tooltip.ts +39 -0
- package/design/sdk/components/tree/selected-tint.css +15 -0
- package/design/sdk/components/tree/tree.ts +89 -0
- package/design/sdk/fixtures.ts +0 -0
- package/design/sdk/foundations/colors/colors.css +602 -0
- package/design/sdk/foundations/colors/colors.ts +218 -0
- package/design/sdk/foundations/colors/faces.css +75 -0
- package/design/sdk/foundations/colors/overrides.json +19 -0
- package/design/sdk/foundations/colors/shared/contrast.ts +105 -0
- package/design/sdk/foundations/elevation/elevation.css +6 -0
- package/design/sdk/foundations/elevation/elevation.ts +18 -0
- package/design/sdk/foundations/elevation/shared/elevation/scene.css +106 -0
- package/design/sdk/foundations/elevation/shared/elevation/scene.ts +74 -0
- package/design/sdk/foundations/icons/icons.ts +125 -0
- package/design/sdk/lint-baseline.json +6 -0
- package/design/sdk/ready.json +488 -0
- package/design/sdk/rule-baseline.json +48 -0
- package/design/select.ts +199 -0
- package/design/skeleton.ts +67 -0
- package/design/slider.ts +155 -0
- package/design/standings.ts +166 -0
- package/design/stat-tile.ts +109 -0
- package/design/stream.ts +92 -0
- package/design/switch.ts +83 -0
- package/design/table.ts +309 -0
- package/design/tabs.ts +75 -0
- package/design/textarea.ts +94 -0
- package/design/timeline.ts +52 -0
- package/design/toggletip.ts +85 -0
- package/design/toolbar.ts +95 -0
- package/design/tooltip.ts +95 -0
- package/design/tree.ts +106 -0
- package/fesm2022/ethlete-components-testing.mjs +440 -0
- package/fesm2022/ethlete-components-testing.mjs.map +1 -0
- package/fesm2022/ethlete-components.mjs +115628 -12455
- package/fesm2022/ethlete-components.mjs.map +1 -1
- package/generators/component/component-names.js +42 -0
- package/generators/component/component-templates.js +211 -0
- package/generators/component/generator.js +144 -0
- package/generators/component/schema.json +109 -0
- package/generators/component/workspace-edits.js +92 -0
- package/generators/generators.json +126 -0
- package/generators/icons/generator.js +231 -0
- package/generators/icons/schema.json +35 -0
- package/generators/migrate-bracket-default-cards/bracket-default-cards.js +67 -0
- package/generators/migrate-bracket-default-cards/migration.js +63 -0
- package/generators/migrate-bracket-default-cards/schema.json +26 -0
- package/generators/migrate-bracket-ethlete-renames/bracket-ethlete-renames.js +15 -0
- package/generators/migrate-bracket-ethlete-renames/migration.js +31 -0
- package/generators/migrate-bracket-ethlete-renames/schema.json +26 -0
- package/generators/migrate-cascader-tree-internals/cascader-tree-internals.js +6 -0
- package/generators/migrate-cascader-tree-internals/migration.js +11 -0
- package/generators/migrate-cascader-tree-internals/schema.json +26 -0
- package/generators/migrate-chart-baseline-y/chart-baseline-y.js +10 -0
- package/generators/migrate-chart-baseline-y/migration.js +41 -0
- package/generators/migrate-chart-baseline-y/schema.json +26 -0
- package/generators/migrate-duration-format-internals/duration-format-internals.js +6 -0
- package/generators/migrate-duration-format-internals/migration.js +11 -0
- package/generators/migrate-duration-format-internals/schema.json +26 -0
- package/generators/migrate-error-color-theme-signal/error-color-theme-signal.js +37 -0
- package/generators/migrate-error-color-theme-signal/migration.js +55 -0
- package/generators/migrate-error-color-theme-signal/schema.json +26 -0
- package/generators/migrate-grid-engine-internals/grid-engine-internals.js +43 -0
- package/generators/migrate-grid-engine-internals/migration.js +11 -0
- package/generators/migrate-grid-engine-internals/schema.json +26 -0
- package/generators/migrate-line-chart-stacked-area-mix/line-chart-stacked-area-mix.js +48 -0
- package/generators/migrate-line-chart-stacked-area-mix/migration.js +35 -0
- package/generators/migrate-line-chart-stacked-area-mix/schema.json +26 -0
- package/generators/migrate-loader-determinate/loader-determinate.js +87 -0
- package/generators/migrate-loader-determinate/migration.js +49 -0
- package/generators/migrate-loader-determinate/schema.json +26 -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-overlay-fullscreen-animation/migration.js +11 -0
- package/generators/migrate-overlay-fullscreen-animation/overlay-fullscreen-animation.js +16 -0
- package/generators/migrate-overlay-fullscreen-animation/schema.json +26 -0
- package/generators/migrate-overlay-nav-tab-imports/migration.js +35 -0
- package/generators/migrate-overlay-nav-tab-imports/overlay-nav-tab-imports.js +25 -0
- package/generators/migrate-overlay-nav-tab-imports/schema.json +26 -0
- package/generators/migrate-pip-window-z-index/migration.js +85 -0
- package/generators/migrate-pip-window-z-index/pip-window-z-index.js +60 -0
- package/generators/migrate-pip-window-z-index/schema.json +26 -0
- package/generators/migrate-query-error-labels/migration-scope.js +30 -0
- package/generators/migrate-query-error-labels/migration.js +58 -0
- package/generators/migrate-query-error-labels/query-error-labels.js +30 -0
- package/generators/migrate-query-error-labels/schema.json +26 -0
- package/generators/migrate-rich-text-editor-floating-toolbar/migration.js +57 -0
- package/generators/migrate-rich-text-editor-floating-toolbar/rich-text-editor-floating-toolbar.js +28 -0
- package/generators/migrate-rich-text-editor-floating-toolbar/schema.json +26 -0
- package/generators/migrate-rich-text-editor-link-editor/migration.js +57 -0
- package/generators/migrate-rich-text-editor-link-editor/rich-text-editor-link-editor.js +28 -0
- package/generators/migrate-rich-text-editor-link-editor/schema.json +26 -0
- package/generators/migrate-rich-text-editor-tools/migration.js +64 -0
- package/generators/migrate-rich-text-editor-tools/rich-text-editor-tools.js +36 -0
- package/generators/migrate-rich-text-editor-tools/schema.json +26 -0
- package/generators/migrate-select-input-renames/migration.js +41 -0
- package/generators/migrate-select-input-renames/schema.json +26 -0
- package/generators/migrate-select-input-renames/select-input-renames.js +37 -0
- package/generators/migrate-stream-default-components/migration.js +86 -0
- package/generators/migrate-stream-default-components/schema.json +26 -0
- package/generators/migrate-stream-default-components/stream-default-components.js +111 -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/generators/migrate-time-picker-ring/migration.js +17 -0
- package/generators/migrate-time-picker-ring/schema.json +26 -0
- package/generators/migrate-time-picker-ring/time-picker-ring.js +25 -0
- package/generators/migrate-youtube-player-slot-directive/migration.js +11 -0
- package/generators/migrate-youtube-player-slot-directive/schema.json +26 -0
- package/generators/migrate-youtube-player-slot-directive/youtube-player-slot-directive.js +12 -0
- package/generators/removed-exports/removed-exports.js +154 -0
- package/generators/removed-exports/run-removed-exports-migration.js +48 -0
- package/migrations/components-sdk-layer.md +55 -0
- package/migrations.json +211 -0
- package/package.json +47 -17
- package/src/lib/accordion/accordion-group.component.css +12 -0
- package/src/lib/accordion/accordion.component.css +236 -0
- package/src/lib/avatar/avatar-group.component.css +31 -0
- package/src/lib/avatar/avatar.component.css +90 -0
- package/src/lib/badge/badge.component.css +118 -0
- package/src/lib/banner/banner.component.css +102 -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-default-section-title.component.css +14 -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 +123 -0
- 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 +14 -0
- package/src/lib/breadcrumb/breadcrumb-outlet.component.css +5 -0
- package/src/lib/breadcrumb/breadcrumb-overflow.component.css +38 -0
- package/src/lib/breadcrumb/breadcrumb.component.css +126 -0
- package/src/lib/button/button-properties-styles.component.css +195 -0
- package/src/lib/button/button.component.css +259 -0
- package/src/lib/button/button.types.ts +33 -0
- package/src/lib/button/fab.component.css +257 -0
- package/src/lib/button/icon-button.component.css +152 -0
- package/src/lib/button/split-button.component.css +103 -0
- package/src/lib/button/text-button.component.css +142 -0
- package/src/lib/button/window-control-button.component.css +214 -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 +374 -0
- package/src/lib/card/card.component.css +43 -0
- package/src/lib/carousel/carousel-autoplay-styles.component.css +171 -0
- package/src/lib/carousel/carousel-transition-styles.component.css +179 -0
- package/src/lib/carousel/carousel.component.css +220 -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 +161 -0
- package/src/lib/collapse/collapse.component.css +43 -0
- package/src/lib/command-palette/command-palette-item.component.css +98 -0
- package/src/lib/command-palette/command-palette.component.css +148 -0
- package/src/lib/description-list/description-list.component.css +78 -0
- package/src/lib/divider/divider.component.css +40 -0
- package/src/lib/empty-state/empty-state.component.css +79 -0
- package/src/lib/floating-action/floating-action-styles.component.css +105 -0
- package/src/lib/focus-ring/focus-ring-styles.component.css +31 -0
- package/src/lib/forms/cascader/cascader-breadcrumb-styles.component.css +98 -0
- package/src/lib/forms/cascader/cascader-panel.component.css +390 -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 +278 -0
- package/src/lib/forms/choice-field/choice-field-card-styles.component.css +66 -0
- package/src/lib/forms/choice-field/choice-field.component.css +227 -0
- package/src/lib/forms/color-input/color-input.component.css +109 -0
- package/src/lib/forms/color-input/color-picker-panel.component.css +354 -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 +118 -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/description/description.component.css +7 -0
- package/src/lib/forms/dropzone/dropzone-crop.component.css +139 -0
- package/src/lib/forms/dropzone/dropzone-item.component.css +67 -0
- package/src/lib/forms/dropzone/dropzone-preview-styles.component.css +83 -0
- package/src/lib/forms/dropzone/dropzone-readonly-styles.component.css +34 -0
- package/src/lib/forms/dropzone/dropzone-row-styles.component.css +85 -0
- package/src/lib/forms/dropzone/dropzone.component.css +291 -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 +174 -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 +93 -0
- package/src/lib/forms/form-field/form-field-text-shell-styles.component.css +396 -0
- package/src/lib/forms/form-field/form-field-textarea-styles.component.css +94 -0
- package/src/lib/forms/form-field/form-field.component.css +381 -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 +18 -0
- package/src/lib/forms/input/input.component.css +53 -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 +101 -0
- package/src/lib/forms/otp-input/otp-input.component.css +218 -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 +95 -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 +206 -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 +146 -0
- package/src/lib/forms/select/select-option-group.component.css +36 -0
- package/src/lib/forms/select/select-option-styles.component.css +167 -0
- package/src/lib/forms/select/select-panel.component.css +122 -0
- package/src/lib/forms/select/select.component.css +247 -0
- package/src/lib/forms/selection-card-styles.component.css +144 -0
- package/src/lib/forms/selection-list/checkbox-group/checkbox-group-select-all.component.css +98 -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 +162 -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 +144 -0
- package/src/lib/forms/selection-list/segmented-button-group/segmented-button-group.component.css +213 -0
- package/src/lib/forms/selection-list/segmented-button-group/segmented-button.component.css +200 -0
- package/src/lib/forms/slider/range-slider.component.css +434 -0
- package/src/lib/forms/slider/slider.component.css +428 -0
- package/src/lib/forms/switch/switch.component.css +214 -0
- package/src/lib/forms/tag-input/tag-input.component.css +54 -0
- package/src/lib/forms/textarea/textarea-autosize-styles.component.css +16 -0
- package/src/lib/forms/textarea/textarea.component.css +45 -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-toolbar.component.css +10 -0
- package/src/lib/grid/grid-item.component.css +176 -0
- package/src/lib/grid/grid.component.css +56 -0
- package/src/lib/icon/headless/align-icons.ts +30 -0
- package/src/lib/icon/headless/arrow-out-up-right-icon.ts +17 -0
- package/src/lib/icon/headless/arrow-right-icon.ts +23 -0
- package/src/lib/icon/headless/arrow-up-icon.ts +30 -0
- package/src/lib/icon/headless/arrows-left-right-icon.ts +31 -0
- package/src/lib/icon/headless/bold-icon.ts +11 -0
- package/src/lib/icon/headless/calendar-icon.ts +21 -0
- package/src/lib/icon/headless/check-icon.ts +14 -0
- package/src/lib/icon/headless/chevron-icon.ts +14 -0
- package/src/lib/icon/headless/circle-check-icon.ts +14 -0
- package/src/lib/icon/headless/circle-info-icon.ts +14 -0
- package/src/lib/icon/headless/clipboard-check-icon.ts +28 -0
- package/src/lib/icon/headless/clock-icon.ts +21 -0
- package/src/lib/icon/headless/code-block-icon.ts +15 -0
- package/src/lib/icon/headless/code-icon.ts +14 -0
- package/src/lib/icon/headless/ellipsis-icon.ts +13 -0
- package/src/lib/icon/headless/ellipsis-vertical-icon.ts +13 -0
- package/src/lib/icon/headless/eye-icons.ts +27 -0
- package/src/lib/icon/headless/eyedropper-icon.ts +22 -0
- package/src/lib/icon/headless/file-icon.ts +16 -0
- package/src/lib/icon/headless/filter-icon.ts +11 -0
- package/src/lib/icon/headless/floppy-disk-icon.ts +27 -0
- package/src/lib/icon/headless/focus-frame-icon.ts +16 -0
- package/src/lib/icon/headless/grid-2x2-icon.ts +17 -0
- package/src/lib/icon/headless/heading-1-icon.ts +11 -0
- package/src/lib/icon/headless/heading-2-icon.ts +11 -0
- package/src/lib/icon/headless/heading-3-icon.ts +11 -0
- package/src/lib/icon/headless/icon-definition.ts +14 -0
- package/src/lib/icon/headless/icon-styles.component.css +7 -0
- package/src/lib/icon/headless/image-icon.ts +14 -0
- package/src/lib/icon/headless/italic-icon.ts +19 -0
- package/src/lib/icon/headless/link-icon.ts +17 -0
- package/src/lib/icon/headless/list-bulleted-icon.ts +14 -0
- package/src/lib/icon/headless/list-numbered-icon.ts +14 -0
- package/src/lib/icon/headless/location-icon.ts +21 -0
- package/src/lib/icon/headless/lock-icon.ts +14 -0
- package/src/lib/icon/headless/minus-icon.ts +14 -0
- package/src/lib/icon/headless/paragraph-icon.ts +11 -0
- package/src/lib/icon/headless/pause-icon.ts +11 -0
- package/src/lib/icon/headless/pencil-icon.ts +21 -0
- package/src/lib/icon/headless/play-icon.ts +10 -0
- package/src/lib/icon/headless/plus-icon.ts +21 -0
- package/src/lib/icon/headless/quote-icon.ts +15 -0
- package/src/lib/icon/headless/rotate-right-icon.ts +16 -0
- package/src/lib/icon/headless/star-icon.ts +14 -0
- package/src/lib/icon/headless/strikethrough-icon.ts +18 -0
- package/src/lib/icon/headless/table-icon.ts +15 -0
- package/src/lib/icon/headless/thumbtack-icon.ts +18 -0
- package/src/lib/icon/headless/times-icon.ts +14 -0
- package/src/lib/icon/headless/trash-icon.ts +24 -0
- package/src/lib/icon/headless/triangle-exclamation-icon.ts +14 -0
- package/src/lib/icon/headless/trophy-icon.ts +24 -0
- package/src/lib/icon/headless/underline-icon.ts +12 -0
- package/src/lib/icon/headless/undo-redo-icons.ts +24 -0
- package/src/lib/icon/headless/upload-icon.ts +16 -0
- package/src/lib/kbd/kbd.component.css +62 -0
- package/src/lib/loader/brand-loader/brand-loader.component.css +133 -0
- package/src/lib/loader/progress-bar/progress-bar.component.css +186 -0
- package/src/lib/loader/spinner/spinner-styles.component.css +225 -0
- package/src/lib/loader/spinner/spinner-sweep-dashes.ts +19 -0
- package/src/lib/masonry/masonry-styles.component.css +84 -0
- package/src/lib/match/match-card.component.css +545 -0
- package/src/lib/match/match-participant.component.css +236 -0
- package/src/lib/match/match-score.component.css +77 -0
- package/src/lib/match/match-scoreline.component.css +53 -0
- package/src/lib/match/match-time.component.css +5 -0
- package/src/lib/menu/menu-group-label.component.css +12 -0
- package/src/lib/menu/menu-item-shortcut.component.css +26 -0
- package/src/lib/menu/menu-item-submenu-icon.component.css +18 -0
- package/src/lib/menu/menu-item.component.css +36 -0
- package/src/lib/menu/menu-search-styles.component.css +83 -0
- package/src/lib/menu/menu-selection-item.component.css +92 -0
- package/src/lib/menu/menu-separator.component.css +9 -0
- package/src/lib/menu/menu.component.css +310 -0
- package/src/lib/notification/notification-stack.component.css +114 -0
- package/src/lib/notification/notification.component.css +275 -0
- package/src/lib/overlay/alert-dialog/alert-dialog.component.css +55 -0
- package/src/lib/overlay/floating-panel-styles.component.css +71 -0
- package/src/lib/overlay/floating-tip-styles.component.css +84 -0
- package/src/lib/overlay/overlay-container.component.css +173 -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 +215 -0
- package/src/lib/overlay/routing/overlay-shared-route-template-outlet.component.css +5 -0
- package/src/lib/overlay/sidebar/overlay-sidebar.component.css +23 -0
- package/src/lib/overlay/strategies/anchored-dialog-styles.component.css +78 -0
- package/src/lib/overlay/strategies/dialog-styles.component.css +77 -0
- package/src/lib/overlay/strategies/full-screen-dialog-styles.component.css +141 -0
- package/src/lib/overlay/strategies/overlay-arrow-styles.component.css +112 -0
- package/src/lib/overlay/strategies/overlay-origin-clone.component.css +92 -0
- package/src/lib/overlay/strategies/sheet-styles.component.css +170 -0
- package/src/lib/pagination/page-size-select.component.css +6 -0
- package/src/lib/pagination/pagination.component.css +185 -0
- package/src/lib/picture/picture.component.css +82 -0
- package/src/lib/progress-steps/progress-step.component.css +269 -0
- package/src/lib/progress-steps/progress-steps.component.css +26 -0
- package/src/lib/query-error/query-error.component.css +27 -0
- package/src/lib/scheduler/scheduler-agenda-view.component.css +106 -0
- package/src/lib/scheduler/scheduler-appointment-drag-styles.component.css +59 -0
- package/src/lib/scheduler/scheduler-appointment-styles.component.css +129 -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 +269 -0
- package/src/lib/scheduler/scheduler.component.css +87 -0
- package/src/lib/scrollable/headless/scrollable-buttons.component.css +223 -0
- package/src/lib/scrollable/headless/scrollable-footer.css +37 -0
- package/src/lib/scrollable/headless/scrollable-masks.component.css +165 -0
- package/src/lib/scrollable/headless/scrollable-navigation.component.css +94 -0
- package/src/lib/scrollable/scrollable.component.css +234 -0
- package/src/lib/scrollbar/scrollbar.component.css +116 -0
- package/src/lib/skeleton/skeleton.component.css +132 -0
- package/src/lib/standings/standings-pick.component.css +208 -0
- package/src/lib/standings/standings.component.css +347 -0
- package/src/lib/stat-tile/stat-tile-sparkline.component.css +49 -0
- package/src/lib/stat-tile/stat-tile.component.css +134 -0
- package/src/lib/stream/consent/stream-consent.component.css +100 -0
- package/src/lib/stream/error/stream-player-error.component.css +101 -0
- package/src/lib/stream/loading/stream-player-loading.component.css +16 -0
- package/src/lib/stream/pip/pip-player.component.css +40 -0
- package/src/lib/stream/pip/pip-slot-placeholder.component.css +68 -0
- package/src/lib/stream/pip/pip-stage-styles.component.css +93 -0
- package/src/lib/stream/pip/pip-window.component.css +221 -0
- package/src/lib/stream/stream-manager-styles.component.css +10 -0
- package/src/lib/stream/stream-overlay-card-styles.component.css +69 -0
- package/src/lib/stream/stream-player-slot-styles.component.css +18 -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 +64 -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 +268 -0
- package/src/lib/table/table-select-cell.component.css +119 -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 +853 -0
- package/src/lib/tabs/nav-tabs/nav-tab-link-styles.component.css +37 -0
- package/src/lib/tabs/tab-bar-styles.component.css +266 -0
- package/src/lib/tabs/tab-scale-styles.component.css +61 -0
- package/src/lib/tabs/tabs/tab-group.component.css +115 -0
- package/src/lib/time-picker/time-picker.component.css +212 -0
- package/src/lib/timeline/timeline-item.component.css +139 -0
- package/src/lib/timeline/timeline.component.css +7 -0
- package/src/lib/toggletip/toggletip.component.css +88 -0
- package/src/lib/toolbar/toolbar.component.css +44 -0
- package/src/lib/tooltip/tooltip.component.css +84 -0
- package/src/lib/tree/tree.component.css +221 -0
- package/types/ethlete-components-testing.d.ts +300 -0
- package/types/ethlete-components.d.ts +37511 -3814
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import {
|
|
2
|
+
breadcrumb,
|
|
3
|
+
BreadcrumbMockCrumb,
|
|
4
|
+
breadcrumbOverflowPanel,
|
|
5
|
+
breadcrumbStyles,
|
|
6
|
+
} from '@ethlete/components/design/breadcrumb';
|
|
7
|
+
import { definePart, drawing } from '@design-system';
|
|
8
|
+
import frame from './breadcrumb.css?inline';
|
|
9
|
+
|
|
10
|
+
type Interaction = 'hover' | 'active' | 'focus-visible';
|
|
11
|
+
|
|
12
|
+
type Props = {
|
|
13
|
+
long?: boolean;
|
|
14
|
+
open?: boolean;
|
|
15
|
+
link?: Interaction;
|
|
16
|
+
current?: Interaction;
|
|
17
|
+
overflow?: Interaction;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const mark = (control: string, interaction?: Interaction) =>
|
|
21
|
+
[`data-et-control="${control}"`, interaction && `data-et-force="${interaction}"`].filter(Boolean).join(' ');
|
|
22
|
+
|
|
23
|
+
const shortTrail = (props: Props): BreadcrumbMockCrumb[] => [
|
|
24
|
+
{ label: 'Home', href: '#' },
|
|
25
|
+
{ label: 'Competitions', href: '#', attributes: mark('link', props.link) },
|
|
26
|
+
{ label: 'Regionalliga Nordost', attributes: mark('current', props.current) },
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
const longTrail = (props: Props): BreadcrumbMockCrumb[] => [
|
|
30
|
+
{ label: 'Home', href: '#' },
|
|
31
|
+
{ label: 'Competitions', href: '#' },
|
|
32
|
+
{ label: 'Regionalliga Nordost', href: '#' },
|
|
33
|
+
{ label: 'Season 2026/27', href: '#' },
|
|
34
|
+
{ label: 'Matchday 14', href: '#' },
|
|
35
|
+
{ label: 'Chemie Leipzig vs. Lokomotive Leipzig', attributes: mark('current', props.current) },
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
const hiddenCrumbs = [1, 2, 3, 4];
|
|
39
|
+
|
|
40
|
+
const longMarkup = (props: Props) => {
|
|
41
|
+
const trail = longTrail(props);
|
|
42
|
+
const panel = props.open
|
|
43
|
+
? breadcrumbOverflowPanel(hiddenCrumbs.map((index) => trail[index]!)).replace(
|
|
44
|
+
'class="et-overlay ',
|
|
45
|
+
'data-et-surface="overflow.body" class="et-overlay ',
|
|
46
|
+
)
|
|
47
|
+
: '';
|
|
48
|
+
|
|
49
|
+
return `<div class="breadcrumb-overflow-stage">${panel}${breadcrumb({
|
|
50
|
+
crumbs: trail,
|
|
51
|
+
collapsed: hiddenCrumbs,
|
|
52
|
+
overflowAttributes: `${mark('overflow', props.overflow)} data-et-action="${props.open ? 'long' : 'overflow-open'}"`,
|
|
53
|
+
})}</div>`;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export default definePart({
|
|
57
|
+
note: 'Decided rules only',
|
|
58
|
+
madeBy: ['claude-opus-5-5'],
|
|
59
|
+
states: {
|
|
60
|
+
default: {},
|
|
61
|
+
'link-hover': { link: 'hover' },
|
|
62
|
+
'link-active': { link: 'active' },
|
|
63
|
+
'link-focus-visible': { link: 'focus-visible' },
|
|
64
|
+
'current-page': { current: 'hover' },
|
|
65
|
+
long: { long: true },
|
|
66
|
+
'overflow-hover': { long: true, overflow: 'hover' },
|
|
67
|
+
'overflow-active': { long: true, overflow: 'active' },
|
|
68
|
+
'overflow-focus-visible': { long: true, overflow: 'focus-visible' },
|
|
69
|
+
'overflow-open': { long: true, open: true },
|
|
70
|
+
},
|
|
71
|
+
describe: {
|
|
72
|
+
default:
|
|
73
|
+
'Home, Competitions and the current Regionalliga Nordost; check the separators and the current page in plain text.',
|
|
74
|
+
'link-hover': 'Competitions hovered; check the hover look of the link.',
|
|
75
|
+
'link-active': 'Competitions pressed; check that the press differs from hover.',
|
|
76
|
+
'link-focus-visible': 'Competitions with keyboard focus; check the focus ring around the link.',
|
|
77
|
+
'current-page': 'The current page crumb hovered; check that it shows no link hover.',
|
|
78
|
+
long: 'A six-crumb trail with the middle four folded into the overflow button; check that Home, the button and the match fit one line.',
|
|
79
|
+
'overflow-hover': 'The overflow button hovered; check its hover tint.',
|
|
80
|
+
'overflow-active': 'The overflow button pressed; check that the tint goes past hover.',
|
|
81
|
+
'overflow-focus-visible': 'The overflow button with keyboard focus; check the focus ring around it.',
|
|
82
|
+
'overflow-open':
|
|
83
|
+
'The overflow panel open with the four hidden crumbs; check that it sits under the button and lists them in order.',
|
|
84
|
+
},
|
|
85
|
+
widths: [480],
|
|
86
|
+
controls: {
|
|
87
|
+
link: { kind: 'button', input: ['pointer', 'keyboard'] },
|
|
88
|
+
overflow: { kind: 'disclosure', input: ['pointer', 'keyboard'], surfaces: { body: 'overflow-open' } },
|
|
89
|
+
},
|
|
90
|
+
frame: (body) => `<div class="breadcrumb-frame">${body}</div>`,
|
|
91
|
+
render: (props: Props) =>
|
|
92
|
+
drawing({
|
|
93
|
+
body: props.long ? longMarkup(props) : breadcrumb({ crumbs: shortTrail(props) }),
|
|
94
|
+
styles: [breadcrumbStyles, frame].join('\n'),
|
|
95
|
+
}),
|
|
96
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.et-icon-button:where([data-variant='filled']) {
|
|
3
|
+
--et-button-shadow: inset 0 0 0 1px light-dark(var(--et-tone-text), transparent);
|
|
4
|
+
|
|
5
|
+
&:not([disabled], [aria-disabled='true']):active {
|
|
6
|
+
--_et-button-background: color-mix(in srgb, var(--et-tone-fill) 84%, var(--et-tone-on-fill));
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.et-icon-button:where([data-variant='filled']) {
|
|
11
|
+
box-shadow: var(--et-button-shadow, none);
|
|
12
|
+
|
|
13
|
+
@media (hover: hover) {
|
|
14
|
+
&:not([disabled], [aria-disabled='true']):hover {
|
|
15
|
+
--_et-tone-fill-opacity: 1;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import {
|
|
2
|
+
button,
|
|
3
|
+
buttonStyles,
|
|
4
|
+
ButtonMockOptions,
|
|
5
|
+
iconButton,
|
|
6
|
+
IconButtonMockOptions,
|
|
7
|
+
iconButtonStyles,
|
|
8
|
+
} from '@ethlete/components/design/button';
|
|
9
|
+
import { iconMarkup } from '@ethlete/components/design/icon';
|
|
10
|
+
import { loaderStyles } from '@ethlete/components/design/loader';
|
|
11
|
+
import { SDK_ICONS } from '@ethlete/components/design/icon-set';
|
|
12
|
+
import { definePart, drawing, forceInteraction, interactionRows } from '@design-system';
|
|
13
|
+
import hover from './button.css?inline';
|
|
14
|
+
|
|
15
|
+
type ButtonInteraction = 'hover' | 'active' | 'focus-visible';
|
|
16
|
+
|
|
17
|
+
type IconOnly = IconButtonMockOptions & { iconOnly: true };
|
|
18
|
+
|
|
19
|
+
type Props = (ButtonMockOptions | IconOnly) & { interaction?: ButtonInteraction };
|
|
20
|
+
|
|
21
|
+
const control = ({ interaction, ...options }: Props) => {
|
|
22
|
+
const drawn = 'iconOnly' in options ? iconButton(options) : button(options);
|
|
23
|
+
const markup = drawn
|
|
24
|
+
.replace(/^<(button|a) /, '<$1 data-et-control="button" data-can-animate ')
|
|
25
|
+
.replace('<div class="et-button-loader"', '<div class="et-button-loader" data-et-skip="CLIPPED"');
|
|
26
|
+
|
|
27
|
+
return interaction ? forceInteraction(markup, interaction) : markup;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const fail = (message: string): never => {
|
|
31
|
+
throw new Error(message);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const plus = iconMarkup(SDK_ICONS.find((each) => each.name === 'et-plus') ?? fail('SDK_ICONS has no et-plus'));
|
|
35
|
+
const SIZES = ['xs', 'sm', 'md', 'lg', 'xl'] as const;
|
|
36
|
+
const VARIANTS = ['filled', 'outline', 'tonal', 'transparent'] as const;
|
|
37
|
+
type Size = (typeof SIZES)[number];
|
|
38
|
+
|
|
39
|
+
const interactive = interactionRows<
|
|
40
|
+
Props,
|
|
41
|
+
'filled' | 'outline' | 'tonal' | 'transparent' | 'pressed' | 'danger' | 'small',
|
|
42
|
+
ButtonInteraction
|
|
43
|
+
>(
|
|
44
|
+
{
|
|
45
|
+
filled: { label: 'Save', variant: 'filled' },
|
|
46
|
+
outline: { label: 'Cancel', variant: 'outline' },
|
|
47
|
+
tonal: { label: 'Filter', variant: 'tonal' },
|
|
48
|
+
transparent: { label: 'More', variant: 'transparent' },
|
|
49
|
+
pressed: { label: 'Grid', variant: 'outline', pressed: true },
|
|
50
|
+
danger: { label: 'Delete', variant: 'filled', color: 'danger' },
|
|
51
|
+
small: { label: 'Save', variant: 'filled', size: 'sm' },
|
|
52
|
+
},
|
|
53
|
+
{ interactions: ['hover', 'active', 'focus-visible'], force: (props, interaction) => ({ ...props, interaction }) },
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
const iconOnly = interactionRows<Props, `icon-${(typeof VARIANTS)[number]}`, ButtonInteraction>(
|
|
57
|
+
Object.fromEntries(
|
|
58
|
+
VARIANTS.map((variant) => [`icon-${variant}`, { iconOnly: true, icon: plus, ariaLabel: 'Add', variant }]),
|
|
59
|
+
) as Record<`icon-${(typeof VARIANTS)[number]}`, Props>,
|
|
60
|
+
{ interactions: ['hover', 'active', 'focus-visible'], force: (props, interaction) => ({ ...props, interaction }) },
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
const sized = interactionRows<Props, `size-${Size}`, ButtonInteraction>(
|
|
64
|
+
Object.fromEntries(
|
|
65
|
+
SIZES.map((size) => [`size-${size}`, { label: 'Add', icon: plus, variant: 'filled', size }]),
|
|
66
|
+
) as Record<`size-${Size}`, Props>,
|
|
67
|
+
{ interactions: ['hover', 'active', 'focus-visible'], force: (props, interaction) => ({ ...props, interaction }) },
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
const disabled: Props = { label: 'Save', variant: 'filled', disabled: true };
|
|
71
|
+
|
|
72
|
+
export const states = { ...interactive.states, disabled, ...iconOnly.states, ...sized.states };
|
|
73
|
+
export const grid = {
|
|
74
|
+
columns: interactive.grid.columns,
|
|
75
|
+
rows: {
|
|
76
|
+
...interactive.grid.rows,
|
|
77
|
+
disabled: { rest: 'disabled' as const },
|
|
78
|
+
...Object.fromEntries(VARIANTS.map((variant) => [`icon ${variant}`, iconOnly.grid.rows[`icon-${variant}`]])),
|
|
79
|
+
...Object.fromEntries(SIZES.map((size) => [`size ${size}`, sized.grid.rows[`size-${size}`]])),
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export default definePart({
|
|
84
|
+
note: 'scale of the decided shape, Q182, lead merge',
|
|
85
|
+
consumerAction: 'a button whose click the consumer binds',
|
|
86
|
+
madeBy: ['claude-opus-5-5', 'claude-sonnet-5-5', 'design check'],
|
|
87
|
+
states,
|
|
88
|
+
grid,
|
|
89
|
+
describe: {
|
|
90
|
+
filled: 'The filled Save button; check the accent fill and the on-colour label.',
|
|
91
|
+
'filled-hover':
|
|
92
|
+
'The filled Save button, hovered; check that its look changes from rest and the label keeps its contrast.',
|
|
93
|
+
'filled-active': 'The filled Save button, pressed; check that it goes a step past hover.',
|
|
94
|
+
'filled-focus-visible': 'The filled Save button, with keyboard focus; check the focus ring outside its edge.',
|
|
95
|
+
outline: 'The outlined Cancel button; check that the border shows against the page with no fill.',
|
|
96
|
+
'outline-hover':
|
|
97
|
+
'The outlined Cancel button, hovered; check that its look changes from rest and the label keeps its contrast.',
|
|
98
|
+
'outline-active': 'The outlined Cancel button, pressed; check that it goes a step past hover.',
|
|
99
|
+
'outline-focus-visible': 'The outlined Cancel button, with keyboard focus; check the focus ring outside its edge.',
|
|
100
|
+
tonal: 'The tonal Filter button; check the light accent tint and the accent label.',
|
|
101
|
+
'tonal-hover':
|
|
102
|
+
'The tonal Filter button, hovered; check that its look changes from rest and the label keeps its contrast.',
|
|
103
|
+
'tonal-active': 'The tonal Filter button, pressed; check that it goes a step past hover.',
|
|
104
|
+
'tonal-focus-visible': 'The tonal Filter button, with keyboard focus; check the focus ring outside its edge.',
|
|
105
|
+
transparent: 'The transparent More button; check that only the label shows, without fill or border.',
|
|
106
|
+
'transparent-hover':
|
|
107
|
+
'The transparent More button, hovered; check that its look changes from rest and the label keeps its contrast.',
|
|
108
|
+
'transparent-active': 'The transparent More button, pressed; check that it goes a step past hover.',
|
|
109
|
+
'transparent-focus-visible':
|
|
110
|
+
'The transparent More button, with keyboard focus; check the focus ring outside its edge.',
|
|
111
|
+
pressed: 'The pressed outline Grid toggle; check that the pressed look differs from the plain outline button.',
|
|
112
|
+
'pressed-hover':
|
|
113
|
+
'The pressed outline Grid toggle, hovered; check that its look changes from rest and the label keeps its contrast.',
|
|
114
|
+
'pressed-active': 'The pressed outline Grid toggle, pressed; check that it goes a step past hover.',
|
|
115
|
+
'pressed-focus-visible':
|
|
116
|
+
'The pressed outline Grid toggle, with keyboard focus; check the focus ring outside its edge.',
|
|
117
|
+
danger: 'The filled Delete button in the danger colour; check the danger fill and that the label reads on it.',
|
|
118
|
+
'danger-hover':
|
|
119
|
+
'The filled Delete button in the danger colour, hovered; check that its look changes from rest and the label keeps its contrast.',
|
|
120
|
+
'danger-active': 'The filled Delete button in the danger colour, pressed; check that it goes a step past hover.',
|
|
121
|
+
'danger-focus-visible':
|
|
122
|
+
'The filled Delete button in the danger colour, with keyboard focus; check the focus ring outside its edge.',
|
|
123
|
+
small: 'The small filled Save button; check the smaller height, padding and text.',
|
|
124
|
+
'small-hover':
|
|
125
|
+
'The small filled Save button, hovered; check that its look changes from rest and the label keeps its contrast.',
|
|
126
|
+
'small-active': 'The small filled Save button, pressed; check that it goes a step past hover.',
|
|
127
|
+
'small-focus-visible': 'The small filled Save button, with keyboard focus; check the focus ring outside its edge.',
|
|
128
|
+
disabled: 'The disabled filled Save button; check that the fill fades and the label stays readable.',
|
|
129
|
+
'icon-filled': 'The filled icon-only Add button; check that the plus sits centred in a square button.',
|
|
130
|
+
'icon-filled-hover':
|
|
131
|
+
'The filled icon-only Add button, hovered; check that its look changes from rest and the label keeps its contrast.',
|
|
132
|
+
'icon-filled-active': 'The filled icon-only Add button, pressed; check that it goes a step past hover.',
|
|
133
|
+
'icon-filled-focus-visible':
|
|
134
|
+
'The filled icon-only Add button, with keyboard focus; check the focus ring outside its edge.',
|
|
135
|
+
'icon-outline': 'The outline icon-only Add button; check that the plus sits centred in a square button.',
|
|
136
|
+
'icon-outline-hover':
|
|
137
|
+
'The outline icon-only Add button, hovered; check that its look changes from rest and the label keeps its contrast.',
|
|
138
|
+
'icon-outline-active': 'The outline icon-only Add button, pressed; check that it goes a step past hover.',
|
|
139
|
+
'icon-outline-focus-visible':
|
|
140
|
+
'The outline icon-only Add button, with keyboard focus; check the focus ring outside its edge.',
|
|
141
|
+
'icon-tonal': 'The tonal icon-only Add button; check that the plus sits centred in a square button.',
|
|
142
|
+
'icon-tonal-hover':
|
|
143
|
+
'The tonal icon-only Add button, hovered; check that its look changes from rest and the label keeps its contrast.',
|
|
144
|
+
'icon-tonal-active': 'The tonal icon-only Add button, pressed; check that it goes a step past hover.',
|
|
145
|
+
'icon-tonal-focus-visible':
|
|
146
|
+
'The tonal icon-only Add button, with keyboard focus; check the focus ring outside its edge.',
|
|
147
|
+
'icon-transparent': 'The transparent icon-only Add button; check that the plus sits centred in a square button.',
|
|
148
|
+
'icon-transparent-hover':
|
|
149
|
+
'The transparent icon-only Add button, hovered; check that its look changes from rest and the label keeps its contrast.',
|
|
150
|
+
'icon-transparent-active': 'The transparent icon-only Add button, pressed; check that it goes a step past hover.',
|
|
151
|
+
'icon-transparent-focus-visible':
|
|
152
|
+
'The transparent icon-only Add button, with keyboard focus; check the focus ring outside its edge.',
|
|
153
|
+
'size-xs':
|
|
154
|
+
'The filled Add button with a plus at size xs; check its height, padding, icon and text against the next step.',
|
|
155
|
+
'size-xs-hover':
|
|
156
|
+
'The filled Add button with a plus at size xs, hovered; check that its look changes from rest and the label keeps its contrast.',
|
|
157
|
+
'size-xs-active': 'The filled Add button with a plus at size xs, pressed; check that it goes a step past hover.',
|
|
158
|
+
'size-xs-focus-visible':
|
|
159
|
+
'The filled Add button with a plus at size xs, with keyboard focus; check the focus ring outside its edge.',
|
|
160
|
+
'size-sm':
|
|
161
|
+
'The filled Add button with a plus at size sm; check its height, padding, icon and text against the next step.',
|
|
162
|
+
'size-sm-hover':
|
|
163
|
+
'The filled Add button with a plus at size sm, hovered; check that its look changes from rest and the label keeps its contrast.',
|
|
164
|
+
'size-sm-active': 'The filled Add button with a plus at size sm, pressed; check that it goes a step past hover.',
|
|
165
|
+
'size-sm-focus-visible':
|
|
166
|
+
'The filled Add button with a plus at size sm, with keyboard focus; check the focus ring outside its edge.',
|
|
167
|
+
'size-md':
|
|
168
|
+
'The filled Add button with a plus at size md; check its height, padding, icon and text against the next step.',
|
|
169
|
+
'size-md-hover':
|
|
170
|
+
'The filled Add button with a plus at size md, hovered; check that its look changes from rest and the label keeps its contrast.',
|
|
171
|
+
'size-md-active': 'The filled Add button with a plus at size md, pressed; check that it goes a step past hover.',
|
|
172
|
+
'size-md-focus-visible':
|
|
173
|
+
'The filled Add button with a plus at size md, with keyboard focus; check the focus ring outside its edge.',
|
|
174
|
+
'size-lg':
|
|
175
|
+
'The filled Add button with a plus at size lg; check its height, padding, icon and text against the next step.',
|
|
176
|
+
'size-lg-hover':
|
|
177
|
+
'The filled Add button with a plus at size lg, hovered; check that its look changes from rest and the label keeps its contrast.',
|
|
178
|
+
'size-lg-active': 'The filled Add button with a plus at size lg, pressed; check that it goes a step past hover.',
|
|
179
|
+
'size-lg-focus-visible':
|
|
180
|
+
'The filled Add button with a plus at size lg, with keyboard focus; check the focus ring outside its edge.',
|
|
181
|
+
'size-xl':
|
|
182
|
+
'The filled Add button with a plus at size xl; check its height, padding, icon and text against the next step.',
|
|
183
|
+
'size-xl-hover':
|
|
184
|
+
'The filled Add button with a plus at size xl, hovered; check that its look changes from rest and the label keeps its contrast.',
|
|
185
|
+
'size-xl-active': 'The filled Add button with a plus at size xl, pressed; check that it goes a step past hover.',
|
|
186
|
+
'size-xl-focus-visible':
|
|
187
|
+
'The filled Add button with a plus at size xl, with keyboard focus; check the focus ring outside its edge.',
|
|
188
|
+
},
|
|
189
|
+
controls: { button: { kind: 'button', input: ['pointer', 'keyboard'], disabled: true } },
|
|
190
|
+
render: (props: Props) =>
|
|
191
|
+
drawing({
|
|
192
|
+
body: control(props),
|
|
193
|
+
styles: [
|
|
194
|
+
'iconOnly' in props ? iconButtonStyles : buttonStyles,
|
|
195
|
+
hover,
|
|
196
|
+
!('iconOnly' in props) && props.loading && loaderStyles,
|
|
197
|
+
]
|
|
198
|
+
.filter(Boolean)
|
|
199
|
+
.join('\n'),
|
|
200
|
+
}),
|
|
201
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.t-frame {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
padding: 1.6rem;
|
|
4
|
+
background: var(--et-surface-background);
|
|
5
|
+
color: var(--et-surface-text);
|
|
6
|
+
font-size: 1.4rem;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@layer components {
|
|
10
|
+
.et-calendar .et-calendar-nav-button {
|
|
11
|
+
--_et-focus-ring-color: var(--et-tone-text);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.et-calendar .et-calendar-header-label:focus-visible,
|
|
15
|
+
.et-calendar .et-calendar-cell:focus-visible .et-calendar-cell-content {
|
|
16
|
+
outline-color: var(--et-tone-text);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.et-calendar .et-calendar-cell::before {
|
|
20
|
+
background: light-dark(
|
|
21
|
+
color-mix(in srgb, var(--et-tone-fill) 32%, transparent),
|
|
22
|
+
color-mix(in srgb, var(--et-tone-fill) 12%, transparent)
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.et-calendar
|
|
27
|
+
.et-calendar-cell:where([data-selected], [data-band='start'], [data-band='end']):where(
|
|
28
|
+
:not([data-disabled], [data-today])
|
|
29
|
+
)
|
|
30
|
+
.et-calendar-cell-content {
|
|
31
|
+
box-shadow: inset 0 0 0 1px var(--et-tone-text);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { calendar, calendarStyles, CalendarMockOptions } from '@ethlete/components/design/calendar';
|
|
2
|
+
import { definePart, drawing } from '@design-system';
|
|
3
|
+
import frame from './calendar.css?inline';
|
|
4
|
+
|
|
5
|
+
type Interaction = 'hover' | 'focus-visible';
|
|
6
|
+
|
|
7
|
+
type View = NonNullable<CalendarMockOptions['view']>;
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
view?: View;
|
|
11
|
+
selected?: boolean;
|
|
12
|
+
range?: boolean;
|
|
13
|
+
day?: Interaction;
|
|
14
|
+
selectedDay?: Interaction;
|
|
15
|
+
rangeDay?: Interaction;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
limits?: boolean;
|
|
18
|
+
weekNumbers?: boolean;
|
|
19
|
+
comparison?: boolean;
|
|
20
|
+
nav?: Interaction;
|
|
21
|
+
label?: Interaction;
|
|
22
|
+
compact?: boolean;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const TODAY = '2026-09-14';
|
|
26
|
+
|
|
27
|
+
const force = (interaction: Interaction | undefined, key: string) =>
|
|
28
|
+
interaction ? { [key]: `data-et-force="${interaction}"` } : {};
|
|
29
|
+
|
|
30
|
+
const ZOOM_OUT: Record<View, string> = { month: 'year-view', year: 'multi-year-view', multiYear: 'selected' };
|
|
31
|
+
|
|
32
|
+
const action = (key: string) => `data-et-action="${key}"`;
|
|
33
|
+
|
|
34
|
+
const cellAction = (view: View, range: boolean) =>
|
|
35
|
+
view === 'year'
|
|
36
|
+
? 'emit:monthSelect'
|
|
37
|
+
: view === 'multiYear'
|
|
38
|
+
? 'emit:yearSelect'
|
|
39
|
+
: range
|
|
40
|
+
? 'emit:rangeValueChange'
|
|
41
|
+
: 'emit:valueChange';
|
|
42
|
+
|
|
43
|
+
const declareCells = (html: string, key: string) =>
|
|
44
|
+
html.replace(/<button [^>]*class="et-calendar-cell[^>]*>/g, (cell) =>
|
|
45
|
+
cell.includes('aria-disabled') ? cell : cell.replace('<button ', `<button ${action(key)} `),
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
const withAction = (key: string | undefined, extra?: string) =>
|
|
49
|
+
[key && action(key), extra].filter(Boolean).join(' ') || undefined;
|
|
50
|
+
|
|
51
|
+
const render = (props: Props) => {
|
|
52
|
+
const view = props.view ?? 'month';
|
|
53
|
+
const coarseKey = view === 'year' ? '2026-03' : '2021';
|
|
54
|
+
const navigate = props.limits ? undefined : 'emit:activeMonthChange';
|
|
55
|
+
|
|
56
|
+
const html = calendar({
|
|
57
|
+
view,
|
|
58
|
+
month: '2026-09',
|
|
59
|
+
today: TODAY,
|
|
60
|
+
value: props.selected
|
|
61
|
+
? view === 'year'
|
|
62
|
+
? '2026-05-20'
|
|
63
|
+
: view === 'multiYear'
|
|
64
|
+
? '2024-05-20'
|
|
65
|
+
: '2026-09-17'
|
|
66
|
+
: undefined,
|
|
67
|
+
range: props.range
|
|
68
|
+
? { start: '2026-09-09', end: '2026-09-16' }
|
|
69
|
+
: props.comparison
|
|
70
|
+
? { start: '2026-09-15', end: '2026-09-18' }
|
|
71
|
+
: undefined,
|
|
72
|
+
comparison: props.comparison ? { start: '2026-09-07', end: '2026-09-11' } : undefined,
|
|
73
|
+
min: props.limits ? '2026-09-07' : undefined,
|
|
74
|
+
max: props.limits ? '2026-09-24' : undefined,
|
|
75
|
+
disabled: props.disabled ? ['2026-09-05', '2026-09-06', '2026-09-26', '2026-09-27'] : undefined,
|
|
76
|
+
weekNumbers: props.weekNumbers,
|
|
77
|
+
cellAttributes: {
|
|
78
|
+
...force(props.day, view === 'month' ? '2026-09-22' : coarseKey),
|
|
79
|
+
...force(props.selectedDay, '2026-09-17'),
|
|
80
|
+
...force(props.rangeDay, '2026-09-09'),
|
|
81
|
+
},
|
|
82
|
+
previousAttributes: withAction(navigate),
|
|
83
|
+
nextAttributes: withAction(navigate, props.nav ? `data-et-force="${props.nav}"` : undefined),
|
|
84
|
+
labelAttributes: withAction(ZOOM_OUT[view], props.label ? `data-et-force="${props.label}"` : undefined),
|
|
85
|
+
attributes: props.compact ? 'style="--et-calendar-cell-size: 32px"' : undefined,
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
return declareCells(html, cellAction(view, Boolean(props.range || props.comparison)));
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export default definePart({
|
|
92
|
+
note: 'Decided rules only',
|
|
93
|
+
madeBy: ['claude-opus-5-5', 'design check'],
|
|
94
|
+
groups: [
|
|
95
|
+
{
|
|
96
|
+
label: 'Rest',
|
|
97
|
+
states: ['rest', 'long-label'],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
label: 'Selection',
|
|
101
|
+
states: [
|
|
102
|
+
'selected',
|
|
103
|
+
'selected-hover',
|
|
104
|
+
'selected-focus-visible',
|
|
105
|
+
'range',
|
|
106
|
+
'range-focus-visible',
|
|
107
|
+
'day-hover',
|
|
108
|
+
'day-focus-visible',
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
label: 'Views',
|
|
113
|
+
states: ['year-view', 'year-view-hover', 'year-view-focus-visible', 'multi-year-view'],
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
label: 'Navigation',
|
|
117
|
+
states: ['nav-hover', 'nav-focus-visible', 'label-hover', 'label-focus-visible'],
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
label: 'Options',
|
|
121
|
+
states: ['week-numbers', 'comparison'],
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
label: 'Disabled',
|
|
125
|
+
states: ['disabled', 'limits'],
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
states: {
|
|
129
|
+
rest: {},
|
|
130
|
+
selected: { selected: true },
|
|
131
|
+
'selected-hover': { selected: true, selectedDay: 'hover' },
|
|
132
|
+
'selected-focus-visible': { selected: true, selectedDay: 'focus-visible' },
|
|
133
|
+
range: { range: true },
|
|
134
|
+
'range-focus-visible': { range: true, rangeDay: 'focus-visible' },
|
|
135
|
+
'day-hover': { day: 'hover' },
|
|
136
|
+
'day-focus-visible': { day: 'focus-visible' },
|
|
137
|
+
disabled: { disabled: true },
|
|
138
|
+
limits: { limits: true, selected: true },
|
|
139
|
+
'week-numbers': { weekNumbers: true, selected: true },
|
|
140
|
+
comparison: { comparison: true },
|
|
141
|
+
'year-view': { view: 'year', selected: true },
|
|
142
|
+
'year-view-hover': { view: 'year', selected: true, day: 'hover' },
|
|
143
|
+
'year-view-focus-visible': { view: 'year', selected: true, day: 'focus-visible' },
|
|
144
|
+
'multi-year-view': { view: 'multiYear', selected: true },
|
|
145
|
+
'nav-hover': { nav: 'hover' },
|
|
146
|
+
'nav-focus-visible': { nav: 'focus-visible' },
|
|
147
|
+
'label-hover': { label: 'hover' },
|
|
148
|
+
'label-focus-visible': { label: 'focus-visible' },
|
|
149
|
+
'long-label': { compact: true, selected: true },
|
|
150
|
+
},
|
|
151
|
+
describe: {
|
|
152
|
+
rest: 'September 2026 with today on the 14th; check the today mark, the weekday header and the month label.',
|
|
153
|
+
selected: 'The 17th selected; check the filled day and that today keeps its own mark.',
|
|
154
|
+
'selected-hover': 'The selected 17th hovered; check that the fill shows its hover step.',
|
|
155
|
+
'selected-focus-visible': 'The selected 17th with keyboard focus; check that the ring shows around the filled day.',
|
|
156
|
+
range: 'The range from the 9th to the 16th; check the filled ends and the band between them.',
|
|
157
|
+
'range-focus-visible': 'The range start with keyboard focus; check that the ring shows over the range end.',
|
|
158
|
+
'day-hover': 'The 22nd hovered; check its hover tint.',
|
|
159
|
+
'day-focus-visible': 'The 22nd with keyboard focus; check the focus ring around the day.',
|
|
160
|
+
disabled: 'Four weekend days disabled; check that they fade and the others stay normal.',
|
|
161
|
+
limits: 'Days outside the 7th to the 24th out of range, the 17th selected; check that the out-of-range days fade.',
|
|
162
|
+
'week-numbers':
|
|
163
|
+
'The month with a week number column and the 17th selected; check that the numbers align with their rows.',
|
|
164
|
+
comparison: 'A range of the 15th to the 18th beside a comparison week; check that the two ranges read apart.',
|
|
165
|
+
'year-view': 'The months of 2026 with May selected; check the filled month and the grid of twelve.',
|
|
166
|
+
'year-view-hover': 'The year view with March hovered; check its hover tint.',
|
|
167
|
+
'year-view-focus-visible': 'The year view with March under keyboard focus; check the focus ring around it.',
|
|
168
|
+
'multi-year-view': 'A span of years with 2024 selected; check the filled year and the grid.',
|
|
169
|
+
'nav-hover': 'The next-month button hovered; check its hover tint.',
|
|
170
|
+
'nav-focus-visible': 'The next-month button with keyboard focus; check the focus ring around it.',
|
|
171
|
+
'label-hover': 'The month label button hovered; check its hover tint.',
|
|
172
|
+
'label-focus-visible': 'The month label button with keyboard focus; check the focus ring around it.',
|
|
173
|
+
'long-label':
|
|
174
|
+
'The month at a 32 px cell size with the 17th selected; check that the header label fits and the grid stays square.',
|
|
175
|
+
},
|
|
176
|
+
widths: [480],
|
|
177
|
+
frame: (body) => `<div class="t-frame">${body}</div>`,
|
|
178
|
+
render: (props: Props) =>
|
|
179
|
+
drawing({
|
|
180
|
+
body: render(props),
|
|
181
|
+
styles: [calendarStyles, frame].join('\n'),
|
|
182
|
+
}),
|
|
183
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.card-frame {
|
|
2
|
+
padding: 2.4rem 1.6rem;
|
|
3
|
+
background: var(--et-surface-background);
|
|
4
|
+
color: var(--et-surface-text);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.card-frame .et-card {
|
|
8
|
+
max-inline-size: 32rem;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@layer components {
|
|
12
|
+
.et-card .et-focus-ring {
|
|
13
|
+
--_et-focus-ring-color: var(--et-tone-text);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.et-card .et-button[data-variant='filled'] {
|
|
17
|
+
--et-button-shadow: inset 0 0 0 1px var(--et-tone-text);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { button } from '@ethlete/components/design/button';
|
|
2
|
+
import { card, cardContent, CardMockOptions, cardPlaceholderMedia, cardStyles } from '@ethlete/components/design/card';
|
|
3
|
+
import { definePart, drawing } from '@design-system';
|
|
4
|
+
import frame from './card.css?inline';
|
|
5
|
+
|
|
6
|
+
type Interaction = 'hover' | 'active' | 'focus-visible';
|
|
7
|
+
|
|
8
|
+
type Props = {
|
|
9
|
+
variant: NonNullable<CardMockOptions['variant']>;
|
|
10
|
+
form?: 'full' | 'media' | 'plain';
|
|
11
|
+
confirm?: Interaction;
|
|
12
|
+
cancel?: Interaction;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const mark = (control: string, interaction?: Interaction) =>
|
|
16
|
+
[`data-et-control="${control}" data-can-animate`, interaction && `data-et-force="${interaction}"`]
|
|
17
|
+
.filter(Boolean)
|
|
18
|
+
.join(' ');
|
|
19
|
+
|
|
20
|
+
const actions = ({ confirm, cancel }: Props) =>
|
|
21
|
+
`<div class="et-card-mock-actions">${[
|
|
22
|
+
button({ label: 'Cancel', variant: 'outline' }).replace(/^<button /, `<button ${mark('cancel', cancel)} `),
|
|
23
|
+
button({ label: 'Open', variant: 'filled' }).replace(/^<button /, `<button ${mark('confirm', confirm)} `),
|
|
24
|
+
].join('')}</div>`;
|
|
25
|
+
|
|
26
|
+
const content = (props: Props) => {
|
|
27
|
+
if (props.form === 'plain') return cardContent({ title: 'Revenue', text: '$12,400 this month' });
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
cardContent({
|
|
31
|
+
media: props.form === 'media' ? cardPlaceholderMedia : undefined,
|
|
32
|
+
title: 'Spring league',
|
|
33
|
+
subtitle: 'Starts 12 April',
|
|
34
|
+
text: 'Eight teams play two rounds. Sign-ups close one week before kick-off.',
|
|
35
|
+
}) + actions(props)
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default definePart({
|
|
40
|
+
note: 'Decided rules only',
|
|
41
|
+
consumerAction: 'its buttons are actions the consumer projects',
|
|
42
|
+
madeBy: ['claude-opus-5-5', 'design check'],
|
|
43
|
+
states: {
|
|
44
|
+
outlined: { variant: 'outlined' },
|
|
45
|
+
elevated: { variant: 'elevated' },
|
|
46
|
+
filled: { variant: 'filled' },
|
|
47
|
+
media: { variant: 'outlined', form: 'media' },
|
|
48
|
+
plain: { variant: 'outlined', form: 'plain' },
|
|
49
|
+
confirm: { variant: 'outlined' },
|
|
50
|
+
'confirm-hover': { variant: 'outlined', confirm: 'hover' },
|
|
51
|
+
'confirm-active': { variant: 'outlined', confirm: 'active' },
|
|
52
|
+
'confirm-focus-visible': { variant: 'outlined', confirm: 'focus-visible' },
|
|
53
|
+
'cancel-hover': { variant: 'outlined', cancel: 'hover' },
|
|
54
|
+
'cancel-active': { variant: 'outlined', cancel: 'active' },
|
|
55
|
+
'cancel-focus-visible': { variant: 'outlined', cancel: 'focus-visible' },
|
|
56
|
+
},
|
|
57
|
+
describe: {
|
|
58
|
+
outlined: 'The outlined card with title, subtitle, text, Cancel and Open; check the border against the page.',
|
|
59
|
+
elevated: 'The elevated card; check the shadow and the raised fill against the page.',
|
|
60
|
+
filled: 'The filled card; check that its fill differs from the page without a border.',
|
|
61
|
+
media: 'The outlined card with a media image on top; check that the image fills the top edge inside the radius.',
|
|
62
|
+
plain: 'A plain outlined card with Revenue and an amount only; check the padding without actions.',
|
|
63
|
+
confirm: 'The outlined card at rest as the Open row of the grid; check Open at rest.',
|
|
64
|
+
'confirm-hover': 'Open hovered; check that the filled button takes its hover fill inside the card.',
|
|
65
|
+
'confirm-active': 'Open pressed; check that the fill goes a step past hover.',
|
|
66
|
+
'confirm-focus-visible': 'Open with keyboard focus; check the focus ring around the button inside the card.',
|
|
67
|
+
'cancel-hover': 'Cancel hovered; check that the outline button takes its hover tint inside the card.',
|
|
68
|
+
'cancel-active': 'Cancel pressed; check that the tint goes a step past hover.',
|
|
69
|
+
'cancel-focus-visible': 'Cancel with keyboard focus; check the focus ring around the outline button.',
|
|
70
|
+
},
|
|
71
|
+
motions: {
|
|
72
|
+
'cancel-hover-in': { from: 'outlined', to: 'cancel-hover' },
|
|
73
|
+
'cancel-hover-out': { from: 'cancel-hover', to: 'outlined' },
|
|
74
|
+
'cancel-press': { from: 'cancel-hover', to: 'cancel-active' },
|
|
75
|
+
'cancel-release': { from: 'cancel-active', to: 'cancel-hover' },
|
|
76
|
+
'confirm-hover-in': { from: 'confirm', to: 'confirm-hover' },
|
|
77
|
+
'confirm-hover-out': { from: 'confirm-hover', to: 'confirm' },
|
|
78
|
+
'confirm-press': { from: 'confirm-hover', to: 'confirm-active' },
|
|
79
|
+
'confirm-release': { from: 'confirm-active', to: 'confirm-hover' },
|
|
80
|
+
'confirm-tap': { from: 'confirm', to: 'confirm-active' },
|
|
81
|
+
'confirm-lift': { from: 'confirm-active', to: 'confirm' },
|
|
82
|
+
},
|
|
83
|
+
grid: {
|
|
84
|
+
columns: ['rest', 'hover', 'active', 'focus-visible'] as const,
|
|
85
|
+
rows: {
|
|
86
|
+
cancel: {
|
|
87
|
+
rest: 'outlined',
|
|
88
|
+
hover: 'cancel-hover',
|
|
89
|
+
active: 'cancel-active',
|
|
90
|
+
'focus-visible': 'cancel-focus-visible',
|
|
91
|
+
},
|
|
92
|
+
confirm: {
|
|
93
|
+
rest: 'confirm',
|
|
94
|
+
hover: 'confirm-hover',
|
|
95
|
+
active: 'confirm-active',
|
|
96
|
+
'focus-visible': 'confirm-focus-visible',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
widths: [480],
|
|
101
|
+
controls: {
|
|
102
|
+
cancel: { kind: 'button', input: ['pointer', 'keyboard'] },
|
|
103
|
+
confirm: { kind: 'button', input: ['pointer', 'keyboard'] },
|
|
104
|
+
},
|
|
105
|
+
frame: (body) => `<div class="card-frame">${body}</div>`,
|
|
106
|
+
render: (props: Props) =>
|
|
107
|
+
drawing({
|
|
108
|
+
body: card({ variant: props.variant, content: content(props) }),
|
|
109
|
+
styles: [cardStyles, frame].join('\n'),
|
|
110
|
+
}),
|
|
111
|
+
});
|