@ethlete/components 0.1.0-next.9 → 1.0.0-next.100
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 +3480 -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 +145 -0
- package/design/button.ts +118 -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 +216 -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 +147 -0
- package/design/notification.ts +133 -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 +129 -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 +59 -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 +29 -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 +57 -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 +25 -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 +33 -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 +55 -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 +52 -0
- package/design/sdk/components/slider/slider.ts +133 -0
- package/design/sdk/components/standings/standings.css +33 -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 +48 -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 +99 -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 +660 -0
- package/design/sdk/foundations/colors/colors.ts +216 -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 +101 -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 +593 -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/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 +115320 -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 +116 -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-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-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 +193 -0
- package/package.json +47 -17
- package/src/lib/accordion/accordion-group.component.css +12 -0
- package/src/lib/accordion/accordion.component.css +237 -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 +114 -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-styles.component.css +10 -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 +127 -0
- package/src/lib/button/button-properties-styles.component.css +195 -0
- package/src/lib/button/button.component.css +242 -0
- package/src/lib/button/button.types.ts +33 -0
- package/src/lib/button/fab.component.css +260 -0
- package/src/lib/button/icon-button.component.css +156 -0
- package/src/lib/button/split-button.component.css +106 -0
- package/src/lib/button/text-button.component.css +142 -0
- package/src/lib/button/window-control-button.component.css +225 -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 +376 -0
- package/src/lib/card/card.component.css +43 -0
- package/src/lib/carousel/carousel-autoplay-styles.component.css +177 -0
- package/src/lib/carousel/carousel-transition-styles.component.css +179 -0
- package/src/lib/carousel/carousel.component.css +232 -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 +163 -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 +387 -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 +291 -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 +110 -0
- package/src/lib/forms/color-input/color-picker-panel.component.css +353 -0
- package/src/lib/forms/date-time/date-input/date-input.component.css +35 -0
- package/src/lib/forms/date-time/date-picker-panel.component.css +115 -0
- package/src/lib/forms/date-time/date-range-input/date-range-input.component.css +16 -0
- package/src/lib/forms/date-time/date-range-presets.component.css +60 -0
- package/src/lib/forms/date-time/date-time-input/date-time-input.component.css +151 -0
- package/src/lib/forms/date-time/date-time-range-input/date-time-range-input.component.css +121 -0
- package/src/lib/forms/date-time/duration-input/duration-input.component.css +88 -0
- package/src/lib/forms/date-time/range-input-shell-styles.component.css +55 -0
- package/src/lib/forms/date-time/time-input/time-input.component.css +35 -0
- package/src/lib/forms/date-time/time-range-input/time-range-input.component.css +16 -0
- package/src/lib/forms/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 +293 -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 +176 -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 +409 -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 +382 -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 +104 -0
- package/src/lib/forms/multi-language-rich-text-editor/multi-language-rich-text-editor.component.css +8 -0
- package/src/lib/forms/multi-language-rich-text-editor/tools/multi-language-rich-text-editor-language-tool.component.css +104 -0
- package/src/lib/forms/otp-input/otp-input.component.css +222 -0
- package/src/lib/forms/phone-input/phone-input.component.css +127 -0
- package/src/lib/forms/rating/rating.component.css +198 -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 +92 -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 +203 -0
- package/src/lib/forms/rich-text-editor/rich-text-editor.component.css +177 -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 +149 -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 +119 -0
- package/src/lib/forms/select/select.component.css +247 -0
- package/src/lib/forms/selection-card-styles.component.css +148 -0
- package/src/lib/forms/selection-list/checkbox-group/checkbox-group-select-all.component.css +108 -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 +172 -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 +154 -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 +199 -0
- package/src/lib/forms/slider/range-slider.component.css +440 -0
- package/src/lib/forms/slider/slider.component.css +434 -0
- package/src/lib/forms/switch/switch.component.css +217 -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 +177 -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 +556 -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 +307 -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 +170 -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 +186 -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 +56 -0
- package/src/lib/scheduler/scheduler-appointment-styles.component.css +127 -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 +145 -0
- package/src/lib/scheduler/scheduler-time-grid-view.component.css +271 -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 +138 -0
- package/src/lib/standings/standings-pick.component.css +216 -0
- package/src/lib/standings/standings.component.css +353 -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 +96 -0
- package/src/lib/stream/pip/pip-window.component.css +222 -0
- package/src/lib/stream/stream-manager-styles.component.css +10 -0
- package/src/lib/stream/stream-overlay-card-styles.component.css +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 +66 -0
- package/src/lib/table/table-row-box-styles.component.css +272 -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 +865 -0
- package/src/lib/tabs/nav-tabs/nav-tab-link-styles.component.css +37 -0
- package/src/lib/tabs/tab-bar-styles.component.css +230 -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 +221 -0
- package/src/lib/timeline/timeline-item.component.css +142 -0
- package/src/lib/timeline/timeline.component.css +7 -0
- package/src/lib/toggletip/toggletip.component.css +83 -0
- package/src/lib/toolbar/toolbar.component.css +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 +37454 -3814
|
@@ -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
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
.carousel-frame {
|
|
2
|
+
padding: 2.4rem;
|
|
3
|
+
background: var(--et-surface-background-solid);
|
|
4
|
+
color: var(--et-surface-color-solid);
|
|
5
|
+
font-size: 1.4rem;
|
|
6
|
+
|
|
7
|
+
.carousel-slide {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
justify-content: flex-end;
|
|
11
|
+
gap: 0.4rem;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
block-size: 100%;
|
|
14
|
+
min-block-size: 200px;
|
|
15
|
+
padding: 2.4rem;
|
|
16
|
+
border-radius: 12px;
|
|
17
|
+
background: color-mix(in srgb, var(--et-surface-color-solid) 14%, transparent);
|
|
18
|
+
color: var(--et-surface-color-solid);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.carousel-slide p {
|
|
22
|
+
margin: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.carousel-slide-title {
|
|
26
|
+
font-size: 2rem;
|
|
27
|
+
font-weight: 600;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.carousel-slide-meta {
|
|
31
|
+
font-size: 1.2rem;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@layer components {
|
|
36
|
+
.et-carousel .et-focus-ring {
|
|
37
|
+
--_et-focus-ring-color: var(--et-theme-color-ink-solid);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.et-carousel .et-carousel-dot[data-active]::before,
|
|
41
|
+
.et-carousel .et-carousel-dot-progress-half::before {
|
|
42
|
+
background: light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary-solid));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { carousel, carouselStyles, type CarouselMockOptions } from '@ethlete/components/design/carousel';
|
|
2
|
+
import { definePart, drawing, interactionRows } from '@design-system';
|
|
3
|
+
import frame from './carousel.css?inline';
|
|
4
|
+
|
|
5
|
+
type Interaction = 'hover' | 'active' | 'focus-visible';
|
|
6
|
+
|
|
7
|
+
type Props = Omit<CarouselMockOptions, 'slides'> & {
|
|
8
|
+
count?: number;
|
|
9
|
+
longCaption?: boolean;
|
|
10
|
+
previous?: Interaction;
|
|
11
|
+
next?: Interaction;
|
|
12
|
+
playToggle?: Interaction;
|
|
13
|
+
dot?: { index: number; interaction?: Interaction };
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const TITLES = ['Kick-off', 'First half', 'Half time', 'Second half', 'Full time'];
|
|
17
|
+
const LONG_CAPTION =
|
|
18
|
+
'A long caption that wraps over several lines inside the slide, the way a match report teaser runs on past a single line of text.';
|
|
19
|
+
|
|
20
|
+
const mark = (name: string, action: string) => `data-et-control="${name}" data-et-action="${action}" data-can-animate`;
|
|
21
|
+
|
|
22
|
+
const INDEX_CHANGE = 'emit:activeIndexChange';
|
|
23
|
+
|
|
24
|
+
const force = (interaction: Interaction | undefined) => (interaction ? `data-et-force="${interaction}"` : '');
|
|
25
|
+
|
|
26
|
+
const slideContent = (index: number, count: number, longCaption: boolean) =>
|
|
27
|
+
`<div class="carousel-slide"><p class="carousel-slide-title">${index + 1}. ${TITLES[index % TITLES.length]}</p>` +
|
|
28
|
+
`<p>${longCaption && index === 0 ? LONG_CAPTION : 'A short line about the slide.'}</p>` +
|
|
29
|
+
`<p class="carousel-slide-meta">slide ${index + 1} of ${count}</p></div>`;
|
|
30
|
+
|
|
31
|
+
const render = ({ count = 5, longCaption = false, previous, next, playToggle, dot, ...options }: Props) =>
|
|
32
|
+
carousel({
|
|
33
|
+
...options,
|
|
34
|
+
slides: Array.from({ length: count }, (_, index) => ({ content: slideContent(index, count, longCaption) })),
|
|
35
|
+
previousAttributes: `${mark('arrow', INDEX_CHANGE)} ${force(previous)}`,
|
|
36
|
+
nextAttributes: `${mark('arrow', INDEX_CHANGE)} ${force(next)}`,
|
|
37
|
+
playToggleAttributes: `${mark('play-toggle', options.playing === false ? 'autoplay-playing' : 'autoplay-paused')} ${force(playToggle)}`,
|
|
38
|
+
dotAttributes: Object.fromEntries(
|
|
39
|
+
Array.from({ length: count }, (_, index) => [
|
|
40
|
+
index,
|
|
41
|
+
`${mark('dot', INDEX_CHANGE)} ${dot?.index === index ? force(dot.interaction) : ''}`,
|
|
42
|
+
]),
|
|
43
|
+
),
|
|
44
|
+
}).replaceAll(
|
|
45
|
+
'class="et-carousel-dot-progress-half"',
|
|
46
|
+
'data-et-skip="CLIPPED" class="et-carousel-dot-progress-half"',
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
const { states: interactionStates, grid } = interactionRows<Props, 'arrow' | 'dot' | 'play-toggle', Interaction>(
|
|
50
|
+
{
|
|
51
|
+
arrow: { active: 2 },
|
|
52
|
+
dot: { active: 2, dot: { index: 3 } },
|
|
53
|
+
'play-toggle': { active: 1, autoplay: true },
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
interactions: ['hover', 'active', 'focus-visible'],
|
|
57
|
+
force: (props, interaction) => ({
|
|
58
|
+
...props,
|
|
59
|
+
...(props.dot ? { dot: { ...props.dot, interaction } } : {}),
|
|
60
|
+
...(props.autoplay ? { playToggle: interaction } : {}),
|
|
61
|
+
...(!props.dot && !props.autoplay ? { next: interaction } : {}),
|
|
62
|
+
}),
|
|
63
|
+
},
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
export default definePart({
|
|
67
|
+
note: 'scale of the decided shape, Q182, lead merge',
|
|
68
|
+
madeBy: ['claude-opus-5-5'],
|
|
69
|
+
states: {
|
|
70
|
+
'first-slide': {},
|
|
71
|
+
'middle-slide': { active: 2 },
|
|
72
|
+
'last-slide': { active: 4 },
|
|
73
|
+
'no-loop-first': { loop: false },
|
|
74
|
+
'no-loop-last': { loop: false, active: 4 },
|
|
75
|
+
...interactionStates,
|
|
76
|
+
'active-dot-hover': { active: 2, dot: { index: 2, interaction: 'hover' } },
|
|
77
|
+
'active-dot-focus-visible': { active: 2, dot: { index: 2, interaction: 'focus-visible' } },
|
|
78
|
+
'autoplay-playing': { active: 1, autoplay: true },
|
|
79
|
+
'autoplay-paused': { active: 1, autoplay: true, playing: false },
|
|
80
|
+
'multiple-items': { itemSize: 'half', slideGap: 16, active: 1 },
|
|
81
|
+
'item-size-third': { itemSize: 'third', slideGap: 16, active: 1 },
|
|
82
|
+
'center-aligned': { itemSize: 'half', slideGap: 16, slideAlign: 'center', active: 2 },
|
|
83
|
+
'no-controls': { active: 1, showControls: false },
|
|
84
|
+
'long-caption': { longCaption: true },
|
|
85
|
+
'single-slide': { count: 1 },
|
|
86
|
+
},
|
|
87
|
+
describe: {
|
|
88
|
+
arrow: 'The next arrow at rest; check its tint and size against the hover, pressed and focus looks.',
|
|
89
|
+
'arrow-hover': 'The next arrow hovered; check its hover tint.',
|
|
90
|
+
'arrow-active': 'The next arrow pressed; check that it goes past hover.',
|
|
91
|
+
'arrow-focus-visible': 'The next arrow with keyboard focus; check the focus ring around it.',
|
|
92
|
+
dot: 'The fourth dot at rest; check its tint and size against the hover, pressed and focus looks.',
|
|
93
|
+
'dot-hover': 'The fourth dot hovered; check its hover tint.',
|
|
94
|
+
'dot-active': 'The fourth dot pressed; check that it goes past hover.',
|
|
95
|
+
'dot-focus-visible': 'The fourth dot with keyboard focus; check the focus ring around the dot.',
|
|
96
|
+
'play-toggle': 'The play toggle at rest; check its tint and size against the hover, pressed and focus looks.',
|
|
97
|
+
'play-toggle-hover': 'The play toggle hovered; check its hover tint.',
|
|
98
|
+
'play-toggle-active': 'The play toggle pressed; check that it goes past hover.',
|
|
99
|
+
'play-toggle-focus-visible': 'The play toggle with keyboard focus; check the focus ring around it.',
|
|
100
|
+
'first-slide': 'The first of five slides with arrows and dots; check that the first dot is active.',
|
|
101
|
+
'middle-slide': 'The third slide active; check that the third dot is active and both arrows show.',
|
|
102
|
+
'last-slide': 'The fifth slide active; check the last dot and that next still shows for the loop.',
|
|
103
|
+
'no-loop-first': 'The first slide without loop; check that previous is disabled.',
|
|
104
|
+
'no-loop-last': 'The last slide without loop; check that next is disabled.',
|
|
105
|
+
'active-dot-hover': 'The active dot hovered; check that it keeps its active look.',
|
|
106
|
+
'active-dot-focus-visible': 'The active dot with keyboard focus; check the ring around the active dot.',
|
|
107
|
+
'autoplay-playing':
|
|
108
|
+
'Autoplay running on the second slide; check the pause toggle and the progress in the active dot.',
|
|
109
|
+
'autoplay-paused': 'Autoplay paused; check the play icon and the halted progress.',
|
|
110
|
+
'multiple-items': 'Two slides per view with a 16 px gap; check the gap and that both slides show whole.',
|
|
111
|
+
'item-size-third': 'Three slides per view; check that the slides share the width evenly.',
|
|
112
|
+
'center-aligned': 'Half-width slides centred on the third; check that the active slide sits in the middle.',
|
|
113
|
+
'no-controls': 'The carousel without arrows and dots; check that only the slide shows.',
|
|
114
|
+
'long-caption': 'A slide with a caption over several lines; check that the text wraps inside the slide.',
|
|
115
|
+
'single-slide': 'A carousel with one slide; check how arrows and dots show with nothing to move to.',
|
|
116
|
+
},
|
|
117
|
+
grid,
|
|
118
|
+
omits: [
|
|
119
|
+
{
|
|
120
|
+
option: 'itemSize',
|
|
121
|
+
value: 'full',
|
|
122
|
+
reason: 'The default size, which every other state draws without setting it.',
|
|
123
|
+
},
|
|
124
|
+
{ option: 'itemSize', value: 'half', reason: 'Drawn as the multiple-items state, outside the grid.' },
|
|
125
|
+
{ option: 'itemSize', value: 'third', reason: 'Drawn as the item-size-third state, outside the grid.' },
|
|
126
|
+
{
|
|
127
|
+
option: 'slideAlign',
|
|
128
|
+
value: 'start',
|
|
129
|
+
reason: 'The default alignment, which every other state draws without setting it.',
|
|
130
|
+
},
|
|
131
|
+
{ option: 'slideAlign', value: 'center', reason: 'Drawn as the center-aligned state, outside the grid.' },
|
|
132
|
+
],
|
|
133
|
+
controls: {
|
|
134
|
+
arrow: { kind: 'button', input: ['pointer', 'keyboard'], disabled: true },
|
|
135
|
+
dot: { kind: 'button', input: ['pointer', 'keyboard'] },
|
|
136
|
+
'play-toggle': { kind: 'button', input: ['pointer', 'keyboard'] },
|
|
137
|
+
},
|
|
138
|
+
widths: [480],
|
|
139
|
+
frame: (body) => `<div class="carousel-frame">${body}</div>`,
|
|
140
|
+
scrolls: [
|
|
141
|
+
...(Object.keys(interactionStates) as (keyof typeof interactionStates)[]),
|
|
142
|
+
'first-slide',
|
|
143
|
+
'middle-slide',
|
|
144
|
+
'last-slide',
|
|
145
|
+
'no-loop-first',
|
|
146
|
+
'no-loop-last',
|
|
147
|
+
'active-dot-hover',
|
|
148
|
+
'active-dot-focus-visible',
|
|
149
|
+
'autoplay-playing',
|
|
150
|
+
'autoplay-paused',
|
|
151
|
+
'multiple-items',
|
|
152
|
+
'item-size-third',
|
|
153
|
+
'center-aligned',
|
|
154
|
+
'no-controls',
|
|
155
|
+
'long-caption',
|
|
156
|
+
],
|
|
157
|
+
render: (props: Props) =>
|
|
158
|
+
drawing({
|
|
159
|
+
body: render(props),
|
|
160
|
+
styles: [carouselStyles, frame].join('\n'),
|
|
161
|
+
}),
|
|
162
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
.t-frame {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
padding: 1.6rem;
|
|
4
|
+
background: var(--et-surface-background-solid);
|
|
5
|
+
color: var(--et-surface-color-solid);
|
|
6
|
+
font-size: 1.4rem;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@layer components {
|
|
10
|
+
.et-line-chart-series,
|
|
11
|
+
.et-line-chart-slice .et-line-chart-slice-point,
|
|
12
|
+
.et-chart-legend[data-mark='line'] .et-chart-legend-swatch,
|
|
13
|
+
.et-chart-tooltip .et-chart-tooltip-key,
|
|
14
|
+
.et-line-chart-tooltip .et-line-chart-tooltip-key {
|
|
15
|
+
--_et-chart-mark-accent: color-mix(
|
|
16
|
+
in oklab,
|
|
17
|
+
light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary-solid)) var(--_et-chart-accent-mix, 100%),
|
|
18
|
+
var(--et-surface-background-solid, transparent)
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.et-line-chart-series {
|
|
23
|
+
--_et-line-chart-color: var(--_et-chart-mark-accent);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.et-line-chart-slice .et-line-chart-slice-point {
|
|
27
|
+
fill: var(--_et-chart-mark-accent);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.et-chart-legend[data-mark='line'] .et-chart-legend-swatch,
|
|
31
|
+
.et-chart-tooltip .et-chart-tooltip-key,
|
|
32
|
+
.et-line-chart-tooltip .et-line-chart-tooltip-key {
|
|
33
|
+
background: var(--_et-chart-mark-accent);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.et-bar-chart-bar .et-bar-chart-bar-mark,
|
|
37
|
+
.et-pie-chart-slice .et-pie-chart-slice-mark {
|
|
38
|
+
stroke: var(--et-theme-color-ink-solid);
|
|
39
|
+
stroke-width: 1px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.et-chart-legend:not([data-mark='line']) .et-chart-legend-swatch,
|
|
43
|
+
.et-pie-chart-legend .et-pie-chart-legend-swatch {
|
|
44
|
+
box-shadow: inset 0 0 0 1px var(--et-theme-color-ink-solid);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.et-bar-chart-bar:focus-visible .et-bar-chart-bar-target,
|
|
48
|
+
.et-line-chart-slice:focus-visible .et-line-chart-focus-ring {
|
|
49
|
+
stroke: var(--et-theme-color-ink-solid);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.et-pie-chart-slice:focus-visible .et-pie-chart-slice-mark {
|
|
53
|
+
stroke: var(--et-theme-color-ink-solid);
|
|
54
|
+
stroke-width: 2px;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { barChart, chartStyles, ChartMockMark, lineChart, pieChart } from '@ethlete/components/design/chart';
|
|
2
|
+
import { definePart, drawing } from '@design-system';
|
|
3
|
+
import frame from './chart.css?inline';
|
|
4
|
+
|
|
5
|
+
type Kind = 'bar' | 'line' | 'pie';
|
|
6
|
+
|
|
7
|
+
type Props = {
|
|
8
|
+
kind: Kind;
|
|
9
|
+
series?: boolean;
|
|
10
|
+
mark?: ChartMockMark;
|
|
11
|
+
empty?: boolean;
|
|
12
|
+
longLabel?: boolean;
|
|
13
|
+
points?: boolean;
|
|
14
|
+
donut?: boolean;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'];
|
|
18
|
+
const LONG_MONTHS = ['January', 'February', 'March', 'April', 'May', 'June'];
|
|
19
|
+
const DAYS = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
|
|
20
|
+
const BAR_2026 = { label: '2026', values: [32, 48, 41, 67, 54, 72] };
|
|
21
|
+
const BAR_2025 = { label: '2025', values: [28, 35, 44, 51, 47, 58] };
|
|
22
|
+
const VISITS = { label: 'Visits', values: [42, 55, 49, 63, 71, 38, 30] };
|
|
23
|
+
const SIGNUPS = { label: 'Sign-ups', values: [18, 24, 21, 30, 34, 15, 12] };
|
|
24
|
+
const SOURCES = [
|
|
25
|
+
{ label: 'Direct', value: 420 },
|
|
26
|
+
{ label: 'Search', value: 280 },
|
|
27
|
+
{ label: 'Social', value: 180 },
|
|
28
|
+
{ label: 'Referral', value: 120 },
|
|
29
|
+
];
|
|
30
|
+
const LONG_SOURCES = [
|
|
31
|
+
{ label: 'Direct', value: 420 },
|
|
32
|
+
{ label: 'Search engines and paid search campaigns', value: 280 },
|
|
33
|
+
{ label: 'Social', value: 180 },
|
|
34
|
+
{ label: 'Referral', value: 120 },
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
const PLOT_WIDTH = 410;
|
|
38
|
+
|
|
39
|
+
const declareMarks = (html: string) =>
|
|
40
|
+
html.replace(
|
|
41
|
+
/<g class="et-(bar-chart-bar|line-chart-slice|pie-chart-slice)\b/g,
|
|
42
|
+
(mark) => `${mark.slice(0, 2)} data-et-action="emit:markActivate"${mark.slice(2)}`,
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
const marks = (props: Props) => {
|
|
46
|
+
if (props.kind === 'bar') {
|
|
47
|
+
return barChart({
|
|
48
|
+
plotWidth: PLOT_WIDTH,
|
|
49
|
+
categories: props.longLabel ? LONG_MONTHS.map((month) => `${month} 2026`) : MONTHS,
|
|
50
|
+
series: props.empty ? [{ label: '2026', values: [] }] : props.series ? [BAR_2025, BAR_2026] : [BAR_2026],
|
|
51
|
+
empty: 'No sales in this period',
|
|
52
|
+
mark: props.mark,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (props.kind === 'line') {
|
|
57
|
+
return lineChart({
|
|
58
|
+
plotWidth: PLOT_WIDTH,
|
|
59
|
+
categories: DAYS,
|
|
60
|
+
series: props.series ? [VISITS, SIGNUPS] : [VISITS],
|
|
61
|
+
points: props.points,
|
|
62
|
+
mark: props.mark,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return pieChart({
|
|
67
|
+
data: props.empty ? SOURCES.map((source) => ({ ...source, value: 0 })) : props.longLabel ? LONG_SOURCES : SOURCES,
|
|
68
|
+
innerRadius: props.donut ? 0.6 : 0,
|
|
69
|
+
mark: props.mark,
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export default definePart({
|
|
74
|
+
note: "The SDK charts (et-bar-chart, et-line-chart, et-pie-chart), first drawing, drawn by their mocks from @ethlete/components/design/chart with the real markup and CSS: bar, line and pie chart sheets plus the axis, grid, legend, chart tooltip and line chart tooltip sheets, and the et-tooltip pane for the open tooltip. Framed as a 480px page with 16px padding; bar and line plots 410px wide, 240px high (the default); pie 200px (the default), donut innerRadius 0.6 with its total. Single series draw in the accent; two or more in accent mix steps (100 / 40 %, pie 100 / 80 / 60 / 40 %). States: bar (Jan to Jun), bar-series (2025 and 2026, legend), bar-hover and bar-focus-visible (Apr), bar-tooltip (Mar 2025, hover with its tooltip), bar-empty (projected etBarChartEmpty text), bar-long-label (January 2026 ... June 2026: the auto label spacing thins to every second label); line, line-series (Visits and Sign-ups, legend), line-points, line-hover and line-focus-visible (Thu: crosshair, slice dots, focus box), line-tooltip (Wed, active slice with the multi-series tooltip); pie, donut, pie-hover and pie-focus-visible (Search), pie-tooltip (Direct), pie-empty (all zero: the empty ring), pie-long-label (a long legend label, ellipsed). Static snapshot: the bar grow, line reveal and slice fade are drawn at rest. The lib has no loading state. Numbers (light / dark), from shot pixels at scale 2, brand mint, a: mint marks (bars, line 1, dots, legend and tooltip keys) 1.33 / 13.50; 40 % series (bar 2026, line 2) 1.13 / 2.79; axis and legend text (muted) 7.81 / 6.94; crosshair (subtle) 4.95 / 4.99; hover and focus tint 1.07 / 1.08; focus rings: bar and line (2px, series colour / primary) 1.33 / 13.50, pie (2px, text colour) 17.93 / 17.18. Q98 numbers only: grid lines vs page 1.26 / 1.73 (as the table's edges). Decided rules that arise: Q88 (bar, line and pie focus rings), Q99a (on light the line strokes, slice dots, line legend swatches and tooltip keys take ink in their mix steps; bars, pie slices and the square legend swatches are mint fills and get a 1px ink edge). Series colours otherwise stay data colours: the mix steps are kept. Q101 does not arise: no filled button. An ink edge arises, so Q102 arises: under the brand theme the dark ink is the mint, so the edge is invisible on the full mint fill but shows as a bright outline around the 40 % series in dark (b), while c drops it there. The thinned first and last category labels sit inside the plot (lib fix 3c26c2204). Findings for later, not render refusals: the pie focus ring in b is the same ink as its new 1px edge, only 1px wider, so a focused slice reads close to rest (a used the text colour); d draws it as an outer ring instead. The pie tooltip opens over the legend. Later rounds, left out here: horizontal and stacked bars, negative values, area and stacked area, the time scale, sankey, per-series colour themes, the title and note slots, touch tap.",
|
|
75
|
+
madeBy: ['claude-opus-5-5', 'design check'],
|
|
76
|
+
groups: [
|
|
77
|
+
{
|
|
78
|
+
label: 'Bar',
|
|
79
|
+
states: ['bar', 'bar-series', 'bar-hover', 'bar-focus-visible', 'bar-tooltip'],
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
label: 'Line',
|
|
83
|
+
states: ['line', 'line-series', 'line-points', 'line-hover', 'line-focus-visible', 'line-tooltip'],
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
label: 'Pie',
|
|
87
|
+
states: ['pie', 'donut', 'pie-hover', 'pie-focus-visible', 'pie-tooltip'],
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
label: 'Edge cases',
|
|
91
|
+
states: ['bar-empty', 'bar-long-label', 'pie-empty', 'pie-long-label'],
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
states: {
|
|
95
|
+
bar: { kind: 'bar' },
|
|
96
|
+
'bar-series': { kind: 'bar', series: true },
|
|
97
|
+
'bar-hover': { kind: 'bar', mark: { index: 3, force: 'hover' } },
|
|
98
|
+
'bar-focus-visible': { kind: 'bar', mark: { index: 3, force: 'focus-visible' } },
|
|
99
|
+
'bar-tooltip': { kind: 'bar', series: true, mark: { index: 4, force: 'hover', tooltip: true } },
|
|
100
|
+
'bar-empty': { kind: 'bar', empty: true },
|
|
101
|
+
'bar-long-label': { kind: 'bar', longLabel: true },
|
|
102
|
+
line: { kind: 'line' },
|
|
103
|
+
'line-series': { kind: 'line', series: true },
|
|
104
|
+
'line-points': { kind: 'line', points: true },
|
|
105
|
+
'line-hover': { kind: 'line', series: true, mark: { index: 3, force: 'hover' } },
|
|
106
|
+
'line-focus-visible': { kind: 'line', series: true, mark: { index: 3, force: 'focus-visible' } },
|
|
107
|
+
'line-tooltip': { kind: 'line', series: true, mark: { index: 2, force: 'hover', tooltip: true } },
|
|
108
|
+
pie: { kind: 'pie' },
|
|
109
|
+
donut: { kind: 'pie', donut: true },
|
|
110
|
+
'pie-hover': { kind: 'pie', mark: { index: 1, force: 'hover' } },
|
|
111
|
+
'pie-focus-visible': { kind: 'pie', mark: { index: 1, force: 'focus-visible' } },
|
|
112
|
+
'pie-tooltip': { kind: 'pie', mark: { index: 0, force: 'hover', tooltip: true } },
|
|
113
|
+
'pie-empty': { kind: 'pie', empty: true },
|
|
114
|
+
'pie-long-label': { kind: 'pie', longLabel: true },
|
|
115
|
+
},
|
|
116
|
+
describe: {
|
|
117
|
+
bar: 'A bar chart from Jan to Jun in the accent; check the bars, the axis labels and the grid lines.',
|
|
118
|
+
'bar-series': 'Bars for 2025 and 2026 with a legend; check the two mix steps and their legend keys.',
|
|
119
|
+
'bar-hover': 'The Apr bar hovered; check the hover tint behind it.',
|
|
120
|
+
'bar-focus-visible': 'The Apr bar with keyboard focus; check the 2 px focus ring.',
|
|
121
|
+
'bar-tooltip':
|
|
122
|
+
'The Mar 2025 bar hovered with its tooltip; check that the tooltip names the month, series and value.',
|
|
123
|
+
'bar-empty': 'A bar chart without data; check the No sales in this period text inside the plot.',
|
|
124
|
+
'bar-long-label': 'Bars with long month labels; check that the labels thin to every second one and do not overlap.',
|
|
125
|
+
line: 'A line of visits from Mon to Sun; check the line stroke, the axis and the grid.',
|
|
126
|
+
'line-series': 'Visits and Sign-ups with a legend; check that the two lines and their keys read apart.',
|
|
127
|
+
'line-points': 'The visits line with a dot on every point; check that the dots sit on the line.',
|
|
128
|
+
'line-hover': 'Thu hovered on two lines; check the crosshair and the slice dots.',
|
|
129
|
+
'line-focus-visible': 'Thu with keyboard focus; check the focus box around the slice.',
|
|
130
|
+
'line-tooltip': 'Wed hovered with the multi-series tooltip; check both values and keys in the tooltip.',
|
|
131
|
+
pie: 'A pie of four traffic sources with a legend; check the four slices and their legend keys.',
|
|
132
|
+
donut: 'The sources as a donut with the total in the middle; check the ring width and the total.',
|
|
133
|
+
'pie-hover': 'The Search slice hovered; check its hover look.',
|
|
134
|
+
'pie-focus-visible': 'The Search slice with keyboard focus; check the focus ring around the slice.',
|
|
135
|
+
'pie-tooltip': 'The Direct slice hovered with its tooltip; check the label and value in the tooltip.',
|
|
136
|
+
'pie-empty': 'A pie where every value is zero; check the empty ring.',
|
|
137
|
+
'pie-long-label': 'A pie with a long legend label; check that the label is cut with an ellipsis.',
|
|
138
|
+
},
|
|
139
|
+
widths: [480],
|
|
140
|
+
frame: (body) => `<div class="t-frame">${body}</div>`,
|
|
141
|
+
render: (props: Props) =>
|
|
142
|
+
drawing({
|
|
143
|
+
body: declareMarks(marks(props)),
|
|
144
|
+
styles: [chartStyles, frame].join('\n'),
|
|
145
|
+
}),
|
|
146
|
+
});
|