@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,167 @@
|
|
|
1
|
+
import { button } from '@ethlete/components/design/button';
|
|
2
|
+
import { queryError, queryErrorStyles } from '@ethlete/components/design/query-error';
|
|
3
|
+
import { definePart, drawing } from '@design-system';
|
|
4
|
+
import frame from './query-error.css?inline';
|
|
5
|
+
|
|
6
|
+
type Interaction = 'hover' | 'active' | 'focus-visible';
|
|
7
|
+
|
|
8
|
+
type Shape = 'message' | 'violations' | 'classValidator' | 'retryable' | 'empty' | 'echoesTitle' | 'network' | 'long';
|
|
9
|
+
|
|
10
|
+
type Props = {
|
|
11
|
+
shape: Shape;
|
|
12
|
+
alwaysAllowRetry?: boolean;
|
|
13
|
+
slots?: boolean;
|
|
14
|
+
color?: string;
|
|
15
|
+
retry?: Interaction;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const SHAPES: Record<Shape, { status: number; title: string; messages: string[]; canRetry: boolean }> = {
|
|
19
|
+
message: { status: 403, title: 'Forbidden', messages: ['You do not have access to this team.'], canRetry: false },
|
|
20
|
+
violations: {
|
|
21
|
+
status: 422,
|
|
22
|
+
title: 'Unprocessable entity',
|
|
23
|
+
messages: ['A name is required.', 'The email address is not valid.', 'The start date must be before the end date.'],
|
|
24
|
+
canRetry: false,
|
|
25
|
+
},
|
|
26
|
+
classValidator: {
|
|
27
|
+
status: 400,
|
|
28
|
+
title: 'Bad request',
|
|
29
|
+
messages: ['name should not be empty', 'email must be an email'],
|
|
30
|
+
canRetry: false,
|
|
31
|
+
},
|
|
32
|
+
retryable: {
|
|
33
|
+
status: 503,
|
|
34
|
+
title: 'Service unavailable',
|
|
35
|
+
messages: ['The service is briefly unavailable.'],
|
|
36
|
+
canRetry: true,
|
|
37
|
+
},
|
|
38
|
+
empty: {
|
|
39
|
+
status: 500,
|
|
40
|
+
title: 'Internal server error',
|
|
41
|
+
messages: ['Something went wrong on our end. Please try again later. (Code: 500)'],
|
|
42
|
+
canRetry: false,
|
|
43
|
+
},
|
|
44
|
+
echoesTitle: {
|
|
45
|
+
status: 404,
|
|
46
|
+
title: 'Not found',
|
|
47
|
+
messages: ['The requested resource was not found. (Code: 404)'],
|
|
48
|
+
canRetry: false,
|
|
49
|
+
},
|
|
50
|
+
network: {
|
|
51
|
+
status: 0,
|
|
52
|
+
title: 'Something went wrong',
|
|
53
|
+
messages: ['Something went wrong. Check your internet connection and try again later. (Code: 0)'],
|
|
54
|
+
canRetry: true,
|
|
55
|
+
},
|
|
56
|
+
long: {
|
|
57
|
+
status: 409,
|
|
58
|
+
title: 'Conflict',
|
|
59
|
+
messages: [
|
|
60
|
+
'The fixture for matchday 14 was moved by another organiser while you were editing it, so your changes to the kick-off time, the venue and the referee assignment could not be saved. Reload the fixture and quote request league.example.com/fixtures/2026_matchday_14_home_visitors_edit_request_8f3a9c2e7b1d',
|
|
61
|
+
],
|
|
62
|
+
canRetry: false,
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const mark = (control: string, interaction?: Interaction) =>
|
|
67
|
+
[
|
|
68
|
+
`data-et-control="${control}" data-et-action="emit:retryRequest" data-can-animate`,
|
|
69
|
+
interaction && `data-et-force="${interaction}"`,
|
|
70
|
+
]
|
|
71
|
+
.filter(Boolean)
|
|
72
|
+
.join(' ');
|
|
73
|
+
|
|
74
|
+
const slotActions = (interaction?: Interaction) =>
|
|
75
|
+
button({ label: 'Try again', size: 'sm' }).replace('<button ', `<button ${mark('retry', interaction)} `) +
|
|
76
|
+
'<a class="query-error-support" href="#">Contact support</a>';
|
|
77
|
+
|
|
78
|
+
const render = ({ shape, alwaysAllowRetry, slots, color = 'danger', retry }: Props) => {
|
|
79
|
+
const { status, title, messages, canRetry } = SHAPES[shape];
|
|
80
|
+
|
|
81
|
+
return queryError({
|
|
82
|
+
status,
|
|
83
|
+
title: slots && status === 403 ? 'This team is private' : title,
|
|
84
|
+
messages,
|
|
85
|
+
color,
|
|
86
|
+
retry: !slots && (canRetry || alwaysAllowRetry) ? 'Retry' : undefined,
|
|
87
|
+
retryAttributes: mark('retry', retry),
|
|
88
|
+
actions: slots ? slotActions(retry) : undefined,
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export default definePart({
|
|
93
|
+
note: 'Decided rules only',
|
|
94
|
+
madeBy: ['claude-opus-5-5', 'design check'],
|
|
95
|
+
groups: [
|
|
96
|
+
{
|
|
97
|
+
label: 'Shapes',
|
|
98
|
+
states: ['message', 'violations', 'class-validator', 'retryable', 'empty-body', 'echoes-title', 'network'],
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
label: 'Variants',
|
|
102
|
+
states: ['always-allow-retry', 'long-message', 'custom-slots', 'brand-color'],
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
label: 'Interaction',
|
|
106
|
+
states: [
|
|
107
|
+
'retry-hover',
|
|
108
|
+
'retry-active',
|
|
109
|
+
'retry-focus-visible',
|
|
110
|
+
'slot-retry-focus-visible',
|
|
111
|
+
'brand-retry-hover',
|
|
112
|
+
'brand-retry-focus-visible',
|
|
113
|
+
],
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
states: {
|
|
117
|
+
message: { shape: 'message' },
|
|
118
|
+
violations: { shape: 'violations' },
|
|
119
|
+
'class-validator': { shape: 'classValidator' },
|
|
120
|
+
retryable: { shape: 'retryable' },
|
|
121
|
+
'empty-body': { shape: 'empty' },
|
|
122
|
+
'echoes-title': { shape: 'echoesTitle' },
|
|
123
|
+
network: { shape: 'network' },
|
|
124
|
+
'always-allow-retry': { shape: 'echoesTitle', alwaysAllowRetry: true },
|
|
125
|
+
'long-message': { shape: 'long' },
|
|
126
|
+
'custom-slots': { shape: 'message', slots: true },
|
|
127
|
+
'retry-hover': { shape: 'retryable', retry: 'hover' },
|
|
128
|
+
'retry-active': { shape: 'retryable', retry: 'active' },
|
|
129
|
+
'retry-focus-visible': { shape: 'retryable', retry: 'focus-visible' },
|
|
130
|
+
'slot-retry-focus-visible': { shape: 'message', slots: true, retry: 'focus-visible' },
|
|
131
|
+
'brand-color': { shape: 'retryable', color: 'brand' },
|
|
132
|
+
'brand-retry-hover': { shape: 'retryable', color: 'brand', retry: 'hover' },
|
|
133
|
+
'brand-retry-focus-visible': { shape: 'retryable', color: 'brand', retry: 'focus-visible' },
|
|
134
|
+
},
|
|
135
|
+
describe: {
|
|
136
|
+
message: 'A 403 Forbidden with one message and no retry; check the danger title, status and message.',
|
|
137
|
+
violations: 'A 422 with three violation messages; check that each message shows as its own line.',
|
|
138
|
+
'class-validator': 'A 400 with two class-validator messages; check that both show as separate lines.',
|
|
139
|
+
retryable: 'A 503 that can retry; check that the Retry button shows under the message.',
|
|
140
|
+
'empty-body': 'A 500 with the fallback message; check that the generic text and code show.',
|
|
141
|
+
'echoes-title': 'A 404 whose message echoes the title; check that the title and message both read cleanly.',
|
|
142
|
+
network: 'A network error with status 0 and Retry; check the connection message and the Retry button.',
|
|
143
|
+
'always-allow-retry': 'The 404 with retry forced on; check that Retry shows though the error cannot retry.',
|
|
144
|
+
'long-message':
|
|
145
|
+
'A 409 with a long message and a long URL; check that the text wraps and the URL breaks in the box.',
|
|
146
|
+
'custom-slots':
|
|
147
|
+
'The 403 with custom Try again and Contact support actions; check that both show in place of Retry.',
|
|
148
|
+
'retry-hover': 'The 503 with Retry hovered; check that only Retry takes the hover look.',
|
|
149
|
+
'retry-active': 'The 503 with Retry pressed; check that the pressed look is deeper than hover.',
|
|
150
|
+
'retry-focus-visible': 'The 503 with Retry focused by keyboard; check that the focus ring wraps Retry.',
|
|
151
|
+
'slot-retry-focus-visible':
|
|
152
|
+
'The custom Try again button focused; check that the focus ring wraps the slotted button.',
|
|
153
|
+
'brand-color': 'The 503 in brand instead of danger; check that title and Retry take the brand color.',
|
|
154
|
+
'brand-retry-hover': 'The brand 503 with Retry hovered; check that the hover look uses the brand color.',
|
|
155
|
+
'brand-retry-focus-visible': 'The brand 503 with Retry focused; check that the focus ring uses the brand color.',
|
|
156
|
+
},
|
|
157
|
+
widths: [480],
|
|
158
|
+
controls: {
|
|
159
|
+
retry: { kind: 'button', input: ['pointer', 'keyboard'] },
|
|
160
|
+
},
|
|
161
|
+
frame: (body) => `<div class="query-error-frame">${body}</div>`,
|
|
162
|
+
render: (props: Props) =>
|
|
163
|
+
drawing({
|
|
164
|
+
body: render(props),
|
|
165
|
+
styles: [queryErrorStyles, frame].join('\n'),
|
|
166
|
+
}),
|
|
167
|
+
});
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import {
|
|
2
|
+
radioGroup,
|
|
3
|
+
type RadioGroupMockOption,
|
|
4
|
+
type RadioGroupMockOptions,
|
|
5
|
+
type RadioMockForce,
|
|
6
|
+
radioGroupStyles,
|
|
7
|
+
} from '@ethlete/components/design/radio-group';
|
|
8
|
+
import { control } from '@ethlete/components/design/control';
|
|
9
|
+
import { definePart, drawing } from '@design-system';
|
|
10
|
+
import frame from './radio-group.css?inline';
|
|
11
|
+
|
|
12
|
+
type Props = { group: RadioGroupMockOptions } & Partial<RadioGroupMockOptions>;
|
|
13
|
+
|
|
14
|
+
const LABEL = 'Remind me one hour before';
|
|
15
|
+
|
|
16
|
+
const ROWS = {
|
|
17
|
+
unchecked: {},
|
|
18
|
+
checked: { checked: true },
|
|
19
|
+
} satisfies Record<string, Partial<RadioGroupMockOption>>;
|
|
20
|
+
|
|
21
|
+
const COLUMNS = ['rest', 'hover', 'focus-visible', 'active', 'disabled', 'readonly'] as const;
|
|
22
|
+
|
|
23
|
+
type Row = keyof typeof ROWS;
|
|
24
|
+
type Column = (typeof COLUMNS)[number];
|
|
25
|
+
|
|
26
|
+
const cellOf = (row: Row, column: Column): RadioGroupMockOptions => ({
|
|
27
|
+
id: `${row}-${column}`,
|
|
28
|
+
readonly: column === 'readonly',
|
|
29
|
+
options: [
|
|
30
|
+
{
|
|
31
|
+
...ROWS[row],
|
|
32
|
+
label: LABEL,
|
|
33
|
+
disabled: column === 'disabled',
|
|
34
|
+
force:
|
|
35
|
+
column === 'rest' || column === 'disabled' || column === 'readonly'
|
|
36
|
+
? undefined
|
|
37
|
+
: (column satisfies RadioMockForce),
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
const stateOf = (row: Row, column: Column) => (column === 'rest' ? row : `${row}-${column}`);
|
|
43
|
+
|
|
44
|
+
const gridStates = Object.fromEntries(
|
|
45
|
+
(Object.keys(ROWS) as Row[]).flatMap((row) =>
|
|
46
|
+
COLUMNS.map((column) => [stateOf(row, column), { group: cellOf(row, column) }]),
|
|
47
|
+
),
|
|
48
|
+
) as Record<Row | `${Row}-${Exclude<Column, 'rest'>}`, Props>;
|
|
49
|
+
|
|
50
|
+
const marked = (markup: string) =>
|
|
51
|
+
markup.replace(/<et-radio(?=[\s>])/gu, (tag) => control(`${tag}>`, 'radio').slice(0, -1));
|
|
52
|
+
|
|
53
|
+
const REMINDERS = ['One hour before', 'Fifteen minutes before', 'At kick-off'];
|
|
54
|
+
|
|
55
|
+
const reminderGroup = (
|
|
56
|
+
checked: number | null,
|
|
57
|
+
extra: Partial<RadioGroupMockOptions> & { force?: RadioMockForce[] } = {},
|
|
58
|
+
): RadioGroupMockOptions => {
|
|
59
|
+
const { force, ...rest } = extra;
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
id: 'reminder',
|
|
63
|
+
label: 'Kick-off reminder',
|
|
64
|
+
...rest,
|
|
65
|
+
options: REMINDERS.map((label, index) => ({
|
|
66
|
+
label,
|
|
67
|
+
checked: index === checked,
|
|
68
|
+
force: index === 1 ? force : undefined,
|
|
69
|
+
})),
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const formatGroup = (checked: number | null, force?: RadioMockForce[]): RadioGroupMockOptions => ({
|
|
74
|
+
id: 'format',
|
|
75
|
+
label: 'Match report format',
|
|
76
|
+
variant: 'card',
|
|
77
|
+
options: [
|
|
78
|
+
{ label: 'Short', description: 'The score and the scorers.', checked: checked === 0, force },
|
|
79
|
+
{ label: 'Full', description: 'Every event, with the line-ups.', checked: checked === 1 },
|
|
80
|
+
],
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
const INVALID = {
|
|
84
|
+
required: true,
|
|
85
|
+
error: 'Pick a reminder to continue.',
|
|
86
|
+
errorColor: 'danger',
|
|
87
|
+
} satisfies Partial<RadioGroupMockOptions>;
|
|
88
|
+
|
|
89
|
+
export default definePart({
|
|
90
|
+
note: 'The SDK radio group (et-radio-group with et-radio) in flow, first drawing, drawn by the mock from @ethlete/components/design/radio-group with the real markup and CSS: et-label, et-radio in the plain and the card variant (et-selection-card), et-description, et-form-support with hint and error, the required marker, plus the color-interactive sheet; the brand theme, danger as the error theme. Fixtures are fictional: a match reminder form (Kick-off reminder: One hour before, Fifteen minutes before, At kick-off; hint We send it as a push notification.; required with error Pick a reminder to continue.; mixed hint The selected matches disagree.; card group Match report format: Short, The score and the scorers. / Full, Every event, with the line-ups.; horizontal group Show matches at: Home, Away, Neutral ground; grid label Remind me one hour before). Framed as a page with 16px padding at 360 and 640. States: a grid of unchecked and checked by rest, hover, focus-visible, active, disabled and readonly (one-option groups); group-none, group-checked, group-support (descriptions and hint), group-option-hover, group-option-pressed, group-option-focus-visible, group-mixed (bulk edit, dashed circles), group-disabled, group-readonly, invalid, invalid-focus-visible, invalid-checked, group-horizontal, card-rest, card-checked, card-hover, card-focus-visible and card-checked-focus-visible. Numbers (light / dark), from shot pixels at scale 2 at 360, brand mint, a: circle 20px with a 2px border and a 10px dot (border-box, fixed in 00072d935); unchecked circle border (surface border) vs page 1.26 / 1.73; checked ring and dot (primary) 1.33 / 13.50; checked hover dot and ring (-hover via color-interactive; the lib hover rule skips a checked radio) 1.37 / 13.06, 1.03 from rest; active 2.24 / 8.01; focus ring and focused border (primary -focus), checked or unchecked, 1.37 / 13.06; card checked edge and ring (primary) 1.33 / 13.50; mixed dashed border (primary) 1.33 / 13.50; invalid circle border (danger) 4.83 / 3.71; disabled checked ring 2.12 / 1.65, disabled label 1.41 / 1.65 (exempt under 1.4.11). Decided rules that arise: Q88 (every radio focus ring in ink, the unchecked one too, since unlike the checkbox it is primary, not the surface text colour; the invalid ring takes the danger ink; the card ring in ink), Q99a (the checked circle border, the focused circle border, the mixed dashed border and the card checked and focus edge take light-dark(ink, primary); the checked dot is a mint fill, so it takes a 1px inset ink edge, an outline at -1px) and Q101 (a checked radio hovers to -active). The ink edge on a mint fill arises, so Q102 arises: b draws the dot edge in both schemes, c keeps dark as today (light-dark(ink, transparent)). The error border is the danger theme, not mint, and passes 3:1, so it is kept. Findings for later: no new lib CSS bug; the radio circle box-sizing bug is fixed (00072d935, measured 40 sheet px = 20px). (1) WCAG 1.4.11: the unchecked circle border is 1.26 / 1.73 vs page, under 3:1, the only edge of an unchecked radio (the same open question as the checkbox box and the switch off track). Not drawn. (2) The required marker takes the error theme primary: 3.71:1 in dark, under 4.5:1; exempted here as in checkbox r1. (3) A checked radio has no hover rule of its own; only color-interactive shifts it to -hover, 1.03 from rest, so hover on a checked radio is invisible in a; Q101 fixes it in b and c. (4) Readonly draws exactly like rest, as with the checkbox. (5) A disabled group dims its options (opacity 0.5 and the disabled label colour, both at once) but not the group label, which keeps 7.81 in light; the same holds for the checkbox group. Later rounds, left out here: the sizes sm and lg, the card with the control at start and the card slots, a coloured (non-brand) radio, the warning state, a disabled option inside an enabled group, a pending (aria-busy) group, long labels that wrap, RTL and the check animation.',
|
|
91
|
+
consumerAction: 'a form control whose value the consumer binds',
|
|
92
|
+
madeBy: ['claude-opus-5-5', 'claude-sonnet-5-5'],
|
|
93
|
+
states: {
|
|
94
|
+
...gridStates,
|
|
95
|
+
'group-none': { group: reminderGroup(null) },
|
|
96
|
+
'group-checked': { group: reminderGroup(0) },
|
|
97
|
+
'group-support': {
|
|
98
|
+
group: {
|
|
99
|
+
id: 'support',
|
|
100
|
+
label: 'Kick-off reminder',
|
|
101
|
+
hint: 'We send it as a push notification.',
|
|
102
|
+
options: [
|
|
103
|
+
{ label: 'One hour before', description: 'Time to get to the ground.', checked: true },
|
|
104
|
+
{ label: 'At kick-off', description: 'Only when the whistle goes.' },
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
'group-option-hover': { group: reminderGroup(0, { force: ['hover'] }) },
|
|
109
|
+
'group-option-pressed': { group: reminderGroup(0, { force: ['hover', 'active'] }) },
|
|
110
|
+
'group-option-focus-visible': { group: reminderGroup(1, { force: ['focus-visible'] }) },
|
|
111
|
+
'group-mixed': { group: reminderGroup(0, { mixed: true, hint: 'The selected matches disagree.' }) },
|
|
112
|
+
'group-disabled': { group: reminderGroup(0, { disabled: true }) },
|
|
113
|
+
'group-readonly': { group: reminderGroup(0, { readonly: true }) },
|
|
114
|
+
invalid: { group: reminderGroup(null, INVALID) },
|
|
115
|
+
'invalid-focus-visible': { group: reminderGroup(null, { ...INVALID, force: ['focus-visible'] }) },
|
|
116
|
+
'invalid-checked': { group: reminderGroup(1, INVALID) },
|
|
117
|
+
'group-horizontal': {
|
|
118
|
+
group: {
|
|
119
|
+
id: 'venue',
|
|
120
|
+
label: 'Show matches at',
|
|
121
|
+
orientation: 'horizontal',
|
|
122
|
+
options: [{ label: 'Home', checked: true }, { label: 'Away' }, { label: 'Neutral ground' }],
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
'card-rest': { group: formatGroup(null) },
|
|
126
|
+
'card-checked': { group: formatGroup(0) },
|
|
127
|
+
'card-hover': { group: formatGroup(1, ['hover']) },
|
|
128
|
+
'card-focus-visible': { group: formatGroup(1, ['focus-visible']) },
|
|
129
|
+
'card-checked-focus-visible': { group: formatGroup(0, ['focus-visible']) },
|
|
130
|
+
},
|
|
131
|
+
describe: {
|
|
132
|
+
unchecked: 'One unchecked radio at rest; check that the empty circle border shows next to the label.',
|
|
133
|
+
'unchecked-hover': 'The unchecked radio hovered; check that the circle border darkens.',
|
|
134
|
+
'unchecked-focus-visible':
|
|
135
|
+
'The unchecked radio focused by keyboard; check that the focus ring shows around the circle.',
|
|
136
|
+
'unchecked-active': 'The unchecked radio pressed; check that the press look shows on the circle.',
|
|
137
|
+
'unchecked-disabled': 'The unchecked radio disabled; check that circle and label fade.',
|
|
138
|
+
'unchecked-readonly': 'The unchecked radio read-only; check that it draws like rest.',
|
|
139
|
+
checked: 'One checked radio at rest; check that the primary ring and dot show.',
|
|
140
|
+
'checked-hover': 'The checked radio hovered; check that ring and dot shift visibly from rest.',
|
|
141
|
+
'checked-focus-visible':
|
|
142
|
+
'The checked radio focused by keyboard; check that the focus ring shows around the checked circle.',
|
|
143
|
+
'checked-active': 'The checked radio pressed; check that ring and dot darken.',
|
|
144
|
+
'checked-disabled': 'The checked radio disabled; check that ring, dot and label fade but stay recognisable.',
|
|
145
|
+
'checked-readonly': 'The checked radio read-only; check that it draws like the checked rest.',
|
|
146
|
+
'group-none':
|
|
147
|
+
'The three-option Kick-off reminder group with nothing picked; check the group label and even option gaps.',
|
|
148
|
+
'group-checked': 'The reminder group with One hour before picked; check that only the first option shows the dot.',
|
|
149
|
+
'group-support':
|
|
150
|
+
'A group with option descriptions and a hint; check that descriptions sit under labels and the hint below.',
|
|
151
|
+
'group-option-hover': 'The group with Fifteen minutes before hovered; check that only that circle shows hover.',
|
|
152
|
+
'group-option-pressed': 'The group with Fifteen minutes before pressed; check the press look on that circle.',
|
|
153
|
+
'group-option-focus-visible':
|
|
154
|
+
'The group with the second option picked and focused by keyboard; check the focus ring on its circle.',
|
|
155
|
+
'group-mixed': 'The group in bulk edit with mixed values; check the dashed circles and the mixed hint.',
|
|
156
|
+
'group-disabled': 'The whole group disabled; check that options fade and the group label stays.',
|
|
157
|
+
'group-readonly': 'The whole group read-only; check that it draws like the checked group.',
|
|
158
|
+
invalid: 'The required group with nothing picked and an error; check the danger circles and error text.',
|
|
159
|
+
'invalid-focus-visible':
|
|
160
|
+
'The invalid group, nothing picked, second option focused; check that the focus ring takes the danger ink.',
|
|
161
|
+
'invalid-checked': 'The invalid group with the second option picked; check that the error stays and the dot shows.',
|
|
162
|
+
'group-horizontal':
|
|
163
|
+
'The Show matches at group laid out in a row; check that options sit side by side with even gaps.',
|
|
164
|
+
'card-rest': 'Two card options with descriptions, none picked; check the card borders and the radio at the end.',
|
|
165
|
+
'card-checked': 'The Short card picked; check that its edge and ring take the checked color.',
|
|
166
|
+
'card-hover': 'The Full card picked and the Short card hovered; check that only Short shows the hover look.',
|
|
167
|
+
'card-focus-visible':
|
|
168
|
+
'The Full card picked and Short focused by keyboard; check that the focus ring wraps the whole Short card.',
|
|
169
|
+
'card-checked-focus-visible':
|
|
170
|
+
'The checked Short card focused; check that focus and checked edge both stay visible.',
|
|
171
|
+
},
|
|
172
|
+
grid: {
|
|
173
|
+
columns: COLUMNS,
|
|
174
|
+
rows: Object.fromEntries(
|
|
175
|
+
(Object.keys(ROWS) as Row[]).map((row) => [
|
|
176
|
+
row,
|
|
177
|
+
Object.fromEntries(COLUMNS.map((column) => [column, stateOf(row, column)])),
|
|
178
|
+
]),
|
|
179
|
+
),
|
|
180
|
+
},
|
|
181
|
+
omits: [
|
|
182
|
+
{ option: 'size', value: 'sm', reason: 'Not drawn in this round: sizes are a later round.' },
|
|
183
|
+
{ option: 'size', value: 'md', reason: 'The default size, which every state draws without setting it.' },
|
|
184
|
+
{ option: 'size', value: 'lg', reason: 'Not drawn in this round: sizes are a later round.' },
|
|
185
|
+
{
|
|
186
|
+
option: 'orientation',
|
|
187
|
+
value: 'vertical',
|
|
188
|
+
reason: 'The default orientation, drawn by the group-* states, outside the grid.',
|
|
189
|
+
},
|
|
190
|
+
{ option: 'orientation', value: 'horizontal', reason: 'Drawn as the group-horizontal state, outside the grid.' },
|
|
191
|
+
{ option: 'variant', value: 'plain', reason: 'The default variant, which the grid draws without setting it.' },
|
|
192
|
+
{ option: 'variant', value: 'card', reason: 'Drawn as the card-* states, outside the grid.' },
|
|
193
|
+
{
|
|
194
|
+
option: 'controlPosition',
|
|
195
|
+
value: 'start',
|
|
196
|
+
reason: 'Not drawn in this round: the card with the control at start is a later round.',
|
|
197
|
+
},
|
|
198
|
+
{ option: 'controlPosition', value: 'end', reason: 'Drawn as the card-* states, outside the grid.' },
|
|
199
|
+
],
|
|
200
|
+
controls: {
|
|
201
|
+
radio: { kind: 'button', input: ['pointer', 'keyboard'], disabled: true },
|
|
202
|
+
},
|
|
203
|
+
widths: [360, 640],
|
|
204
|
+
render: (props: Props) =>
|
|
205
|
+
drawing({
|
|
206
|
+
body: `<div class="t-frame">${marked(radioGroup(props.group))}</div>`,
|
|
207
|
+
styles: [radioGroupStyles, frame].join('\n'),
|
|
208
|
+
}),
|
|
209
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
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-button,
|
|
11
|
+
.et-icon-button {
|
|
12
|
+
--_et-focus-ring-color: var(--et-theme-color-ink-solid);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.et-button:where([data-variant='filled']) {
|
|
16
|
+
--et-button-shadow: inset 0 0 0 1px var(--et-theme-color-ink-solid);
|
|
17
|
+
|
|
18
|
+
@media (hover: hover) {
|
|
19
|
+
&:hover {
|
|
20
|
+
--et-theme-color-primary-rgb: var(--et-color-primary-active);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.et-segmented-button,
|
|
26
|
+
.et-scheduler-time-grid-slot,
|
|
27
|
+
.et-scheduler-time-grid-all-day-cell,
|
|
28
|
+
.et-scheduler-month-view-cell,
|
|
29
|
+
.et-scheduler-appointment,
|
|
30
|
+
.et-scheduler-time-grid-block,
|
|
31
|
+
.et-scheduler-month-view-overflow-trigger {
|
|
32
|
+
&:focus-visible {
|
|
33
|
+
outline-color: var(--et-theme-color-ink-solid);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:is(.et-scheduler-appointment, .et-scheduler-time-grid-block):not([data-selected]) .et-scheduler-appointment-dot {
|
|
38
|
+
background: light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary-solid));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.et-scheduler-time-grid-now {
|
|
42
|
+
border-block-start-color: light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary-solid));
|
|
43
|
+
|
|
44
|
+
&::before {
|
|
45
|
+
background: light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary-solid));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.et-scheduler-time-grid-header-day[data-today] .et-scheduler-time-grid-header-date,
|
|
50
|
+
.et-scheduler-month-view-cell[data-today] .et-scheduler-month-view-cell-date,
|
|
51
|
+
.et-scheduler-agenda-view-day-header[data-today] .et-scheduler-agenda-view-day-date,
|
|
52
|
+
:is(.et-scheduler-appointment, .et-scheduler-time-grid-block)[data-selected] {
|
|
53
|
+
box-shadow: inset 0 0 0 1px var(--et-theme-color-ink-solid);
|
|
54
|
+
}
|
|
55
|
+
}
|