@ethlete/components 0.1.0-next.8 → 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 +3486 -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 +115419 -11680
- 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 -3707
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import {
|
|
2
|
+
scheduler,
|
|
3
|
+
schedulerAgenda,
|
|
4
|
+
SchedulerMockAppointment,
|
|
5
|
+
SchedulerMockDay,
|
|
6
|
+
SchedulerMockMonthCell,
|
|
7
|
+
SchedulerMockTimeBlock,
|
|
8
|
+
SchedulerMockView,
|
|
9
|
+
schedulerMonth,
|
|
10
|
+
schedulerStyles,
|
|
11
|
+
schedulerTimeGrid,
|
|
12
|
+
} from '@ethlete/components/design/scheduler';
|
|
13
|
+
import { definePart, drawing } from '@design-system';
|
|
14
|
+
import frame from './scheduler.css?inline';
|
|
15
|
+
|
|
16
|
+
type Interaction = 'hover' | 'focus-visible';
|
|
17
|
+
|
|
18
|
+
type Props = {
|
|
19
|
+
view: SchedulerMockView;
|
|
20
|
+
appointment?: Interaction;
|
|
21
|
+
slot?: Interaction;
|
|
22
|
+
cell?: Interaction;
|
|
23
|
+
dragging?: boolean;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const clock = (time: number) => {
|
|
27
|
+
const hour = Math.floor(time);
|
|
28
|
+
const minutes = String(Math.round((time - hour) * 60)).padStart(2, '0');
|
|
29
|
+
|
|
30
|
+
return `${hour % 12 || 12}:${minutes} ${hour < 12 ? 'AM' : 'PM'}`;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const range = (start: number, end: number) => `${clock(start)}–${clock(end)}`;
|
|
34
|
+
|
|
35
|
+
const WED: SchedulerMockDay = { weekday: 'Wed', date: 4, label: 'Wednesday, March 4th, 2026', today: true };
|
|
36
|
+
const THU: SchedulerMockDay = { weekday: 'Thu', date: 5, label: 'Thursday, March 5th, 2026' };
|
|
37
|
+
const FRI: SchedulerMockDay = { weekday: 'Fri', date: 6, label: 'Friday, March 6th, 2026' };
|
|
38
|
+
|
|
39
|
+
const WEEK: SchedulerMockDay[] = [
|
|
40
|
+
{ weekday: 'Mon', date: 2, label: 'Monday, March 2nd, 2026' },
|
|
41
|
+
{ weekday: 'Tue', date: 3, label: 'Tuesday, March 3rd, 2026' },
|
|
42
|
+
WED,
|
|
43
|
+
THU,
|
|
44
|
+
FRI,
|
|
45
|
+
{ weekday: 'Sat', date: 7, label: 'Saturday, March 7th, 2026' },
|
|
46
|
+
{ weekday: 'Sun', date: 8, label: 'Sunday, March 8th, 2026' },
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
const TODAY = 2;
|
|
50
|
+
|
|
51
|
+
const block = (
|
|
52
|
+
day: number,
|
|
53
|
+
start: number,
|
|
54
|
+
end: number,
|
|
55
|
+
appointment: SchedulerMockAppointment,
|
|
56
|
+
extra: Partial<SchedulerMockTimeBlock> = {},
|
|
57
|
+
): SchedulerMockTimeBlock => ({ day, start, end, timeRange: range(start, end), ...appointment, ...extra });
|
|
58
|
+
|
|
59
|
+
const weekBlocks = (props: Props): SchedulerMockTimeBlock[] => [
|
|
60
|
+
block(0, 9, 9.5, { title: 'Daily sync', force: props.appointment }),
|
|
61
|
+
block(1, 9, 9.5, { title: 'Daily sync' }),
|
|
62
|
+
block(
|
|
63
|
+
1,
|
|
64
|
+
10,
|
|
65
|
+
12,
|
|
66
|
+
{ title: 'Roadmap planning', color: 'warning', location: 'Room 2', chainCount: 1 },
|
|
67
|
+
{ inlineOffset: 50, inlineSize: 50 },
|
|
68
|
+
),
|
|
69
|
+
block(1, 10.5, 11.5, { title: 'Budget check', color: 'warning' }, { inlineOffset: 0, inlineSize: 50, depth: 1 }),
|
|
70
|
+
block(TODAY, 9, 9.5, { title: 'Daily sync' }),
|
|
71
|
+
block(TODAY, 13, 14.5, { title: 'Design review', location: 'Studio A', selected: true }),
|
|
72
|
+
block(3, 9, 9.5, { title: 'Daily sync' }),
|
|
73
|
+
block(3, 14, 16, { title: 'Hiring panel', color: 'danger', location: 'Room 4' }),
|
|
74
|
+
block(4, 9, 9.5, { title: 'Daily sync' }),
|
|
75
|
+
block(4, props.dragging ? 15.5 : 15, props.dragging ? 16.5 : 16, { title: 'Retro', dragging: props.dragging }),
|
|
76
|
+
];
|
|
77
|
+
|
|
78
|
+
const weekNonBusiness = WEEK.flatMap((_, day) =>
|
|
79
|
+
day >= 5
|
|
80
|
+
? [{ day, from: 8, to: 18 }]
|
|
81
|
+
: [
|
|
82
|
+
{ day, from: 8, to: 9 },
|
|
83
|
+
{ day, from: 17, to: 18 },
|
|
84
|
+
],
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
const timeGrid = (props: Props) => {
|
|
88
|
+
const single = props.view === 'day';
|
|
89
|
+
const days = single ? [WED] : WEEK;
|
|
90
|
+
const pick = (day: number) => (single ? (day === TODAY ? 0 : -1) : day);
|
|
91
|
+
const blocks = weekBlocks(props)
|
|
92
|
+
.map((entry) => ({ ...entry, day: pick(entry.day) }))
|
|
93
|
+
.filter((entry) => entry.day >= 0);
|
|
94
|
+
|
|
95
|
+
return schedulerTimeGrid({
|
|
96
|
+
days,
|
|
97
|
+
fromHour: 8,
|
|
98
|
+
toHour: 18,
|
|
99
|
+
hourLabel: (hour) => clock(hour),
|
|
100
|
+
blocks,
|
|
101
|
+
allDay: single ? [] : [{ day: 3, span: 2, title: 'Conference', color: 'danger' }],
|
|
102
|
+
now: { day: pick(TODAY), time: 11.25 },
|
|
103
|
+
nonBusiness: weekNonBusiness
|
|
104
|
+
.map((segment) => ({ ...segment, day: pick(segment.day) }))
|
|
105
|
+
.filter((segment) => segment.day >= 0),
|
|
106
|
+
forcedSlot: props.slot ? { day: single ? 0 : 3, hour: 11, force: props.slot } : undefined,
|
|
107
|
+
ariaLabel: single ? 'Wednesday, March 4, 2026' : 'March 2 – 8, 2026',
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const MONTH_APPOINTMENTS: Record<number, SchedulerMockAppointment[]> = {
|
|
112
|
+
2: [{ title: 'Daily sync', timeRange: range(9, 9.5) }],
|
|
113
|
+
3: [
|
|
114
|
+
{ title: 'Daily sync', timeRange: range(9, 9.5) },
|
|
115
|
+
{ title: 'Roadmap planning', timeRange: range(10, 12) },
|
|
116
|
+
],
|
|
117
|
+
4: [
|
|
118
|
+
{ title: 'Daily sync', timeRange: range(9, 9.5) },
|
|
119
|
+
{ title: 'Design review', timeRange: range(13, 14.5), selected: true },
|
|
120
|
+
],
|
|
121
|
+
5: [{ title: 'Conference', color: 'danger' }],
|
|
122
|
+
6: [{ title: 'Conference', color: 'danger' }],
|
|
123
|
+
12: [{ title: 'Quarterly review', timeRange: range(14, 16) }],
|
|
124
|
+
17: [
|
|
125
|
+
{ title: 'Daily sync', timeRange: range(9, 9.5) },
|
|
126
|
+
{ title: 'Workshop', color: 'warning', timeRange: range(10, 13) },
|
|
127
|
+
],
|
|
128
|
+
25: [{ title: 'Release', color: 'danger' }],
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
const monthCell = (date: number, outsideMonth: boolean, props: Props): SchedulerMockMonthCell => {
|
|
132
|
+
const appointments = outsideMonth ? [] : (MONTH_APPOINTMENTS[date] ?? []);
|
|
133
|
+
|
|
134
|
+
return {
|
|
135
|
+
date,
|
|
136
|
+
label: date === 4 && !outsideMonth ? 'Wednesday, March 4th, 2026' : `${date}`,
|
|
137
|
+
outsideMonth,
|
|
138
|
+
today: !outsideMonth && date === 4,
|
|
139
|
+
appointments: (date === 3 && !outsideMonth ? appointments.slice(0, 2) : appointments).map((appointment) =>
|
|
140
|
+
date === 2 && !outsideMonth ? { ...appointment, force: props.appointment } : appointment,
|
|
141
|
+
),
|
|
142
|
+
overflow: date === 17 && !outsideMonth ? 3 : undefined,
|
|
143
|
+
force: date === 19 && !outsideMonth ? props.cell : undefined,
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
const month = (props: Props) => {
|
|
148
|
+
const dates = [23, 24, 25, 26, 27, 28, ...Array.from({ length: 31 }, (_, index) => index + 1), 1, 2, 3, 4, 5];
|
|
149
|
+
const weeks = Array.from({ length: 6 }, (_, week) =>
|
|
150
|
+
dates.slice(week * 7, week * 7 + 7).map((date, index) => {
|
|
151
|
+
const position = week * 7 + index;
|
|
152
|
+
|
|
153
|
+
return monthCell(date, position < 6 || position > 36, props);
|
|
154
|
+
}),
|
|
155
|
+
);
|
|
156
|
+
|
|
157
|
+
return schedulerMonth({
|
|
158
|
+
weekdays: WEEK.map((day) => ({ short: day.weekday, long: day.label.split(',')[0] ?? day.weekday })),
|
|
159
|
+
weeks,
|
|
160
|
+
ariaLabel: 'March 2026',
|
|
161
|
+
});
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
const agenda = (props: Props) =>
|
|
165
|
+
schedulerAgenda({
|
|
166
|
+
days: [
|
|
167
|
+
{
|
|
168
|
+
...WED,
|
|
169
|
+
month: 'March 2026',
|
|
170
|
+
rows: [
|
|
171
|
+
{ title: 'Daily sync', timeRange: range(9, 9.5), force: props.appointment },
|
|
172
|
+
{
|
|
173
|
+
title: 'Design review',
|
|
174
|
+
timeRange: range(13, 14.5),
|
|
175
|
+
location: 'Studio A',
|
|
176
|
+
selected: true,
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
...THU,
|
|
182
|
+
rows: [
|
|
183
|
+
{ title: 'Conference', color: 'danger' },
|
|
184
|
+
{ title: 'Daily sync', timeRange: range(9, 9.5) },
|
|
185
|
+
{ title: 'Hiring panel', color: 'danger', timeRange: range(14, 16), location: 'Room 4', chainCount: 2 },
|
|
186
|
+
{ title: 'Intro call', color: 'danger', timeRange: range(14, 14.5), guides: ['branch'] },
|
|
187
|
+
{ title: 'Debrief', color: 'danger', timeRange: range(15.5, 16), guides: ['last-branch'] },
|
|
188
|
+
],
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
...FRI,
|
|
192
|
+
rows: [
|
|
193
|
+
{ title: 'Conference', color: 'danger' },
|
|
194
|
+
{ title: 'Retro', timeRange: range(15, 16) },
|
|
195
|
+
],
|
|
196
|
+
},
|
|
197
|
+
],
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
const HEADER_LABELS: Record<SchedulerMockView, string> = {
|
|
201
|
+
week: 'March 2 – 8, 2026',
|
|
202
|
+
day: 'Wednesday, March 4, 2026',
|
|
203
|
+
month: 'March 2026',
|
|
204
|
+
agenda: 'March 4 – 10, 2026',
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
const render = (props: Props) => {
|
|
208
|
+
const body = props.view === 'month' ? month(props) : props.view === 'agenda' ? agenda(props) : timeGrid(props);
|
|
209
|
+
|
|
210
|
+
return scheduler({ view: props.view, headerLabel: HEADER_LABELS[props.view], addAction: true, body });
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
const action = (key: string) => `data-et-action="${key}"`;
|
|
214
|
+
|
|
215
|
+
const BUTTON_ACTIONS: [string, string][] = [
|
|
216
|
+
['et-scheduler-today-button', 'emit:focusedDateChange'],
|
|
217
|
+
['et-scheduler-nav-button--previous', 'emit:focusedDateChange'],
|
|
218
|
+
['et-scheduler-nav-button--next', 'emit:focusedDateChange'],
|
|
219
|
+
['et-scheduler-month-view-overflow-trigger', 'opens:components/menu'],
|
|
220
|
+
];
|
|
221
|
+
|
|
222
|
+
const declareActions = (markup: string) =>
|
|
223
|
+
BUTTON_ACTIONS.reduce(
|
|
224
|
+
(html, [name, key]) => html.replace(new RegExp(`<button ([^>]*\\b${name}\\b)`), `<button ${action(key)} $1`),
|
|
225
|
+
markup,
|
|
226
|
+
)
|
|
227
|
+
.replaceAll('<et-segmented-button value=', `<et-segmented-button ${action('emit:viewChange')} value=`)
|
|
228
|
+
.replace(/<button [^>]*class="et-scheduler-(appointment|time-grid-block)[^>]*>/g, (appointment) =>
|
|
229
|
+
appointment.includes('data-selected')
|
|
230
|
+
? appointment
|
|
231
|
+
: appointment.replace('<button ', `<button ${action('emit:selectedAppointmentIdChange')} `),
|
|
232
|
+
);
|
|
233
|
+
|
|
234
|
+
export default definePart({
|
|
235
|
+
note: "The SDK scheduler (et-scheduler) in flow, first drawing, drawn by the mock from @ethlete/components/design/scheduler with the real markup and CSS: the wide header (outline Today button, filled Add appointment, previous and next icon buttons, the range label, the tabs view switch), et-scheduler-time-grid-view (week and day), et-scheduler-month-view and et-scheduler-agenda-view, the appointment badges (color dot, title, time range, location, chain count) and the resize handles; default labels, en-US times. Fixtures are fictional: one week (Mon March 2 to Sun March 8, 2026, today Wed March 4) with a daily sync, an overlapping parent and nested child (Roadmap planning / Budget check), a selected appointment (Design review, brand), a two-day all-day Conference, Hiring panel and Retro; the colors are the sdk product's registered themes brand (default), warning and danger. The time grid draws 8:00 to 18:00 as if the scrolling body sat on that window, with business hours 9 to 17 on weekdays and the weekend outside them; the current time line sits on today at 11:15. Framed as a page with 16px padding. Widths 560, 800 and 1200 (all above the 480px container width where the header switches to floating action buttons). States: week, week-dragging (Retro lifted, with the drag shadow), appointment-hover, appointment-focus-visible (Daily sync on Monday forced), slot-focus-visible (Thursday 11:00 forced), day, month (outside-month days, today, a +3 more trigger, the selected appointment), month-cell-focus-visible, agenda (a month heading, today, nested rows with tree guides, the selected appointment). Numbers (light / dark), from shot pixels at scale 2 at 800, brand mint, a: appointment tint (14 %) vs page 1.07 / 1.37, its title ink on it 5.12 / 9.84; selected appointment (mint fill) vs page 1.33 / 13.50, its text 15.82 / 15.82; today date circle (mint fill) vs page 1.33 / 13.50, its digit 15.82; current time line and its dot vs the today column 1.29 / 12.14; focus ring (primary) vs page 1.35 / 13.50, vs the appointment tint 1.26 / 9.84; Add appointment fill vs page 1.33 / 13.50, its label 15.82. Q98 numbers only: grid lines (hour rows, day columns, header and all-day edges, month cells) vs page 1.26 / 1.73; the non-business band 1.07 / 1.08; the today column tint is 6 % mint. Decided rules that arise: Q88 (every focus ring: slots, all-day cells, month cells, appointments, the overflow trigger, the view switch, the header buttons), Q99a (the current time line and its dot, the appointment color dot; the selected appointment, the today date circles and the filled Add appointment button are mint fills, so they take a 1px inset ink edge) and Q101 (the filled button hover = -active). The ink edge on a mint fill arises, so Q102 arises: b draws the edges in both schemes, c keeps dark as today (light-dark(ink, transparent)). The 32 / 38 / 44 % selection step does not arise: a selected appointment is a solid mint fill, not a tint. Findings for later: (1) lib bug: the badge pieces render inside their component hosts (et-scheduler-badge-color-dot, -title, -time-range, -location, -chain-count), which are inline, so the flex rules on the inner spans never apply: the color dot is 0 x 0 and never shows (also in Storybook), the title does not take flex: 1 or ellipsis, and the time range and location are cut hard at the block edge (the agenda location shrinks to one letter while the title has room). Fixed in the lib (display: contents on the five hosts; the time range and location shrink with an ellipsis before the title). Narrow week blocks still clip, because the gaps, the dot and the chain count alone are wider than the block (31 px at 560), and the check finds no clipped block, so no skip is needed; the month cell skip is gone. (2) The first hour label sat half above the scroll body (translateY(-50%)) and was clipped by its overflow; fixed in the lib with a top padding of half the label line height. (3) Outside-month dates read nearly like in-month ones. (4) The selected appointment edge and the drag shadow share box-shadow, so a selected appointment being dragged would lose one (not drawn); the lib has no selected edge yet, so whoever merges b or c must list the edge and the drag shadow in one rule on [data-selected][data-dragging]. (5) The Add appointment hover (Q101) is not forced here; it is the same et-button as in the stream round (hover 1.69 from rest). Later rounds, left out here: the edit surface (scheduler-edit-surface and its parts, an overlay), the month +n more menu, the narrow header with floating action buttons, the drag-to-create draft and committed blocks, month draft and drop-target cells, the scrollbar, custom badge adornments, the read-only scheduler, RTL and long labels.",
|
|
236
|
+
madeBy: ['claude-opus-5-5'],
|
|
237
|
+
states: {
|
|
238
|
+
week: { view: 'week' },
|
|
239
|
+
'week-dragging': { view: 'week', dragging: true },
|
|
240
|
+
'appointment-hover': { view: 'week', appointment: 'hover' },
|
|
241
|
+
'appointment-focus-visible': { view: 'week', appointment: 'focus-visible' },
|
|
242
|
+
'slot-focus-visible': { view: 'week', slot: 'focus-visible' },
|
|
243
|
+
day: { view: 'day' },
|
|
244
|
+
month: { view: 'month' },
|
|
245
|
+
'month-cell-focus-visible': { view: 'month', cell: 'focus-visible' },
|
|
246
|
+
agenda: { view: 'agenda' },
|
|
247
|
+
},
|
|
248
|
+
describe: {
|
|
249
|
+
week: 'The week of March 2 with overlapping, all-day and selected appointments; check the now line on Wednesday and the gridlines.',
|
|
250
|
+
'week-dragging': 'The week with Retro lifted half an hour; check that it shows the drag shadow and the new time.',
|
|
251
|
+
'appointment-hover': "Monday's Daily sync hovered; check that only that appointment takes the hover tint.",
|
|
252
|
+
'appointment-focus-visible': "Monday's Daily sync focused by keyboard; check that the focus ring wraps the block.",
|
|
253
|
+
'slot-focus-visible': 'The Thursday 11:00 slot focused by keyboard; check that the ring marks one hour cell.',
|
|
254
|
+
day: 'Wednesday alone in the day view; check the today column, the now line at 11:15 and the selected Design review.',
|
|
255
|
+
month: 'March 2026 in the month grid; check the dim outside-month days, the today circle and the +3 more trigger.',
|
|
256
|
+
'month-cell-focus-visible': 'The month with March 19 focused by keyboard; check that the ring wraps that one cell.',
|
|
257
|
+
agenda:
|
|
258
|
+
'The agenda from Wednesday to Friday; check the month heading, nested rows with tree guides and the selection.',
|
|
259
|
+
},
|
|
260
|
+
widths: [560, 800, 1200],
|
|
261
|
+
frame: (body) => `<div class="t-frame">${body}</div>`,
|
|
262
|
+
render: (props: Props) =>
|
|
263
|
+
drawing({
|
|
264
|
+
body: declareActions(render(props)),
|
|
265
|
+
styles: [schedulerStyles, frame].join('\n'),
|
|
266
|
+
}),
|
|
267
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
.scrollable-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
|
+
.et-scrollable[direction='vertical'] {
|
|
8
|
+
inline-size: 400px;
|
|
9
|
+
|
|
10
|
+
.et-scrollable-container {
|
|
11
|
+
block-size: 258px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.et-scrollable-container > * {
|
|
15
|
+
translate: 0 var(--scrollable-offset);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.et-scrollable-container {
|
|
20
|
+
block-size: 128px;
|
|
21
|
+
gap: 12px;
|
|
22
|
+
padding-block: 4px;
|
|
23
|
+
margin-block: -4px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.et-scrollable-container > * {
|
|
27
|
+
translate: var(--scrollable-offset) 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.scrollable-item {
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
min-inline-size: 200px;
|
|
35
|
+
min-block-size: 80px;
|
|
36
|
+
block-size: 100%;
|
|
37
|
+
border: none;
|
|
38
|
+
border-radius: 12px;
|
|
39
|
+
font-size: 1.8rem;
|
|
40
|
+
font-weight: 600;
|
|
41
|
+
background: color-mix(in srgb, var(--et-surface-color-solid) 14%, transparent);
|
|
42
|
+
color: var(--et-surface-color-solid);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.scrollable-item:focus-visible {
|
|
46
|
+
outline: -webkit-focus-ring-color auto 1px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.scrollable-frame--sized .scrollable-item {
|
|
51
|
+
min-inline-size: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@layer components {
|
|
55
|
+
.et-scrollable-navigation-item.et-scrollable-navigation-item--active::after {
|
|
56
|
+
background-color: light-dark(var(--et-theme-color-ink-solid), var(--et-theme-color-primary));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { scrollable, scrollableStyles } from '@ethlete/components/design/scrollable';
|
|
2
|
+
import { definePart, drawing, interactionRows } from '@design-system';
|
|
3
|
+
import frame from './scrollable.css?inline';
|
|
4
|
+
|
|
5
|
+
type Position = 'start' | 'middle' | 'end';
|
|
6
|
+
type Interaction = 'hover' | 'active' | 'focus-visible';
|
|
7
|
+
|
|
8
|
+
const ITEM_SIZES = ['same', 'full', 'half', 'third', 'quarter'] as const;
|
|
9
|
+
type ItemSize = (typeof ITEM_SIZES)[number];
|
|
10
|
+
|
|
11
|
+
type Props = {
|
|
12
|
+
direction?: 'horizontal' | 'vertical';
|
|
13
|
+
position?: Position;
|
|
14
|
+
items?: number;
|
|
15
|
+
maskVariant?: 'gradient' | 'border';
|
|
16
|
+
buttons?: 'inside' | 'footer' | 'none';
|
|
17
|
+
navigation?: boolean;
|
|
18
|
+
darken?: boolean;
|
|
19
|
+
color?: string;
|
|
20
|
+
endButton?: Interaction;
|
|
21
|
+
focusItem?: number;
|
|
22
|
+
itemSize?: ItemSize;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const ITEM = { horizontal: 200, vertical: 80 };
|
|
26
|
+
const VIEWPORT = { horizontal: 432, vertical: 258 };
|
|
27
|
+
const GAP = 12;
|
|
28
|
+
|
|
29
|
+
const extent = (count: number, size: number) => count * size + (count - 1) * GAP;
|
|
30
|
+
|
|
31
|
+
const offsetOf = (props: Required<Pick<Props, 'direction' | 'position' | 'items'>>) => {
|
|
32
|
+
const size = ITEM[props.direction];
|
|
33
|
+
const max = Math.max(0, extent(props.items, size) - VIEWPORT[props.direction]);
|
|
34
|
+
|
|
35
|
+
if (props.position === 'start') return 0;
|
|
36
|
+
if (props.position === 'end') return max;
|
|
37
|
+
|
|
38
|
+
return Math.min(max, 3 * (size + GAP) - Math.round((VIEWPORT[props.direction] - size) / 2));
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const visibleRange = (offset: number, size: number, viewport: number, count: number) =>
|
|
42
|
+
Array.from({ length: count }, (_, index) => {
|
|
43
|
+
const start = index * (size + GAP) - offset;
|
|
44
|
+
const end = start + size;
|
|
45
|
+
const ratio = Math.max(0, Math.min(end, viewport) - Math.max(start, 0)) / size;
|
|
46
|
+
|
|
47
|
+
return ratio;
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const render = (props: Props) => {
|
|
51
|
+
const direction = props.direction ?? 'horizontal';
|
|
52
|
+
const items = props.items ?? 8;
|
|
53
|
+
const position = props.position ?? 'start';
|
|
54
|
+
const size = ITEM[direction];
|
|
55
|
+
const canScroll = extent(items, size) > VIEWPORT[direction];
|
|
56
|
+
const offset = offsetOf({ direction, position, items });
|
|
57
|
+
const ratios = visibleRange(offset, size, VIEWPORT[direction], items);
|
|
58
|
+
const best = ratios.reduce((found, ratio, index) => (ratio > (ratios[found] ?? 0) ? index : found), 0);
|
|
59
|
+
const active = position === 'end' ? items - 1 : position === 'start' ? 0 : best;
|
|
60
|
+
const buttons = props.buttons ?? 'inside';
|
|
61
|
+
|
|
62
|
+
return scrollable({
|
|
63
|
+
direction,
|
|
64
|
+
canScroll,
|
|
65
|
+
position,
|
|
66
|
+
maskVariant: props.maskVariant,
|
|
67
|
+
buttons: buttons === 'none' ? undefined : buttons,
|
|
68
|
+
navigationActive: props.navigation ? active : undefined,
|
|
69
|
+
darken: props.darken,
|
|
70
|
+
itemSize: props.itemSize,
|
|
71
|
+
itemGap: GAP,
|
|
72
|
+
color: props.color,
|
|
73
|
+
endButtonAttributes: `data-et-control="end-button" data-can-animate ${props.endButton ? `data-et-force="${props.endButton}"` : ''}`,
|
|
74
|
+
containerAttributes: `style="--scrollable-offset: -${offset}px"`,
|
|
75
|
+
items: Array.from({ length: items }, (_, index) => ({
|
|
76
|
+
tag: 'button',
|
|
77
|
+
content: `Item ${index}`,
|
|
78
|
+
notIntersecting: props.darken && (ratios[index] ?? 0) < 1,
|
|
79
|
+
attributes: [
|
|
80
|
+
'class="scrollable-item"',
|
|
81
|
+
'type="button"',
|
|
82
|
+
props.focusItem === index && 'data-et-force="focus-visible"',
|
|
83
|
+
]
|
|
84
|
+
.filter(Boolean)
|
|
85
|
+
.join(' '),
|
|
86
|
+
})),
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const { states: interactionStates, grid } = interactionRows<Props, 'end-button', Interaction>(
|
|
91
|
+
{ 'end-button': { position: 'middle' } },
|
|
92
|
+
{
|
|
93
|
+
interactions: ['hover', 'active', 'focus-visible'],
|
|
94
|
+
force: (props, interaction) => ({ ...props, endButton: interaction }),
|
|
95
|
+
},
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
export default definePart({
|
|
99
|
+
note: 'scale of the decided shape, Q182, lead merge',
|
|
100
|
+
consumerAction: 'the buttons inside are content the consumer projects',
|
|
101
|
+
madeBy: ['claude-opus-5-5', 'claude-sonnet-5-5', 'design check'],
|
|
102
|
+
states: {
|
|
103
|
+
'horizontal-start': {},
|
|
104
|
+
'horizontal-middle': { position: 'middle' },
|
|
105
|
+
'horizontal-end': { position: 'end' },
|
|
106
|
+
'vertical-start': { direction: 'vertical' },
|
|
107
|
+
'vertical-middle': { direction: 'vertical', position: 'middle' },
|
|
108
|
+
'vertical-end': { direction: 'vertical', position: 'end' },
|
|
109
|
+
...interactionStates,
|
|
110
|
+
'border-mask': { position: 'middle', maskVariant: 'border' },
|
|
111
|
+
'vertical-border-mask': { direction: 'vertical', position: 'middle', maskVariant: 'border' },
|
|
112
|
+
'navigation-start': { navigation: true },
|
|
113
|
+
'navigation-middle': { position: 'middle', navigation: true },
|
|
114
|
+
'navigation-end': { position: 'end', navigation: true },
|
|
115
|
+
'vertical-navigation': { direction: 'vertical', position: 'middle', navigation: true },
|
|
116
|
+
'footer-buttons': { position: 'middle', buttons: 'footer', navigation: true },
|
|
117
|
+
'footer-button-hover': { position: 'middle', buttons: 'footer', navigation: true, endButton: 'hover' },
|
|
118
|
+
'danger-navigation': { position: 'middle', navigation: true, color: 'danger' },
|
|
119
|
+
darken: { position: 'middle', darken: true },
|
|
120
|
+
'item-focus-visible': { focusItem: 1 },
|
|
121
|
+
'short-content': { items: 2 },
|
|
122
|
+
'short-content-navigation': { items: 2, navigation: true },
|
|
123
|
+
...(Object.fromEntries(
|
|
124
|
+
ITEM_SIZES.map((itemSize) => [
|
|
125
|
+
`item-size-${itemSize}`,
|
|
126
|
+
itemSize === 'same' ? { itemSize, items: 2 } : { itemSize },
|
|
127
|
+
]),
|
|
128
|
+
) as Record<`item-size-${ItemSize}`, Props>),
|
|
129
|
+
},
|
|
130
|
+
describe: {
|
|
131
|
+
'horizontal-start': 'Eight items scrolled to the start; check that only the end shows a mask and a scroll button.',
|
|
132
|
+
'horizontal-middle': 'The row scrolled to the middle; check that masks and buttons show at both ends.',
|
|
133
|
+
'horizontal-end': 'The row scrolled to the end; check that only the start shows a mask and a scroll button.',
|
|
134
|
+
'vertical-start': 'A vertical list at the start; check that only the bottom shows a mask and a button.',
|
|
135
|
+
'vertical-middle': 'The vertical list in the middle; check that masks and buttons show at top and bottom.',
|
|
136
|
+
'vertical-end': 'The vertical list at the end; check that only the top shows a mask and a button.',
|
|
137
|
+
'end-button':
|
|
138
|
+
'The middle row with the end button at rest; check its size and tint against the hover, pressed and focus looks.',
|
|
139
|
+
'end-button-hover': 'The middle row with the end button hovered; check that only the end button shows hover.',
|
|
140
|
+
'end-button-active': 'The middle row with the end button pressed; check that the press look is deeper than hover.',
|
|
141
|
+
'end-button-focus-visible':
|
|
142
|
+
'The middle row with the end button focused by keyboard; check the focus ring around it.',
|
|
143
|
+
'border-mask': 'The middle row with the border mask; check that edges show a border line instead of a gradient.',
|
|
144
|
+
'vertical-border-mask': 'The vertical list with the border mask; check the border lines at top and bottom.',
|
|
145
|
+
'navigation-start': 'The row at the start with navigation dots; check that the first dot is active.',
|
|
146
|
+
'navigation-middle': 'The middle row with navigation dots; check that the dot of the most visible item is active.',
|
|
147
|
+
'navigation-end': 'The row at the end with navigation dots; check that the last dot is active.',
|
|
148
|
+
'vertical-navigation':
|
|
149
|
+
'The vertical list with navigation; check that the dots run along the side and one is active.',
|
|
150
|
+
'footer-buttons':
|
|
151
|
+
'The middle row with buttons in the footer; check that buttons sit beside the dots, not over items.',
|
|
152
|
+
'footer-button-hover': 'The footer end button hovered; check that only that footer button shows hover.',
|
|
153
|
+
'danger-navigation': 'The middle row with navigation in danger; check that the active dot takes the danger color.',
|
|
154
|
+
darken: 'The middle row with darken on; check that partly visible items dim and whole ones stay full.',
|
|
155
|
+
'item-focus-visible': 'Item 1 focused by keyboard; check that its focus ring is not cut by the container.',
|
|
156
|
+
'short-content': 'Two items that fit; check that no mask, button or scroll shows.',
|
|
157
|
+
'short-content-navigation': 'Two items that fit, with navigation on; check that no dots show when nothing scrolls.',
|
|
158
|
+
'item-size-same': 'Two items at the same size; check that both share the width evenly with the gap.',
|
|
159
|
+
'item-size-full': 'Items at full size; check that each item fills the viewport width.',
|
|
160
|
+
'item-size-half': 'Items at half size; check that two items fill the viewport with one gap.',
|
|
161
|
+
'item-size-third': 'Items at a third; check that three items fill the viewport with two gaps.',
|
|
162
|
+
'item-size-quarter': 'Items at a quarter; check that four items fill the viewport with three gaps.',
|
|
163
|
+
},
|
|
164
|
+
grid,
|
|
165
|
+
controls: {
|
|
166
|
+
'end-button': { kind: 'button', input: ['pointer', 'keyboard'], disabled: true },
|
|
167
|
+
},
|
|
168
|
+
widths: [480],
|
|
169
|
+
scrolls: [
|
|
170
|
+
'horizontal-start',
|
|
171
|
+
'horizontal-middle',
|
|
172
|
+
'horizontal-end',
|
|
173
|
+
'vertical-start',
|
|
174
|
+
'vertical-middle',
|
|
175
|
+
'vertical-end',
|
|
176
|
+
...(Object.keys(interactionStates) as (keyof typeof interactionStates)[]),
|
|
177
|
+
'border-mask',
|
|
178
|
+
'vertical-border-mask',
|
|
179
|
+
'navigation-start',
|
|
180
|
+
'navigation-middle',
|
|
181
|
+
'navigation-end',
|
|
182
|
+
'vertical-navigation',
|
|
183
|
+
'footer-buttons',
|
|
184
|
+
'footer-button-hover',
|
|
185
|
+
'danger-navigation',
|
|
186
|
+
'darken',
|
|
187
|
+
'item-focus-visible',
|
|
188
|
+
'item-size-full',
|
|
189
|
+
'item-size-half',
|
|
190
|
+
'item-size-third',
|
|
191
|
+
'item-size-quarter',
|
|
192
|
+
],
|
|
193
|
+
render: (props: Props) =>
|
|
194
|
+
drawing({
|
|
195
|
+
body: `<div class="scrollable-frame ${props.itemSize ? 'scrollable-frame--sized' : ''}">${render(props)}</div>`,
|
|
196
|
+
styles: [scrollableStyles, frame].join('\n'),
|
|
197
|
+
}),
|
|
198
|
+
});
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
.scrollbar-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
|
+
.scrollbar-wrapper {
|
|
8
|
+
position: relative;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.scrollbar-viewport {
|
|
12
|
+
overflow: auto;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.scrollbar-viewport[data-layout='vertical'] {
|
|
16
|
+
block-size: 200px;
|
|
17
|
+
padding-inline-end: 2.4rem;
|
|
18
|
+
|
|
19
|
+
.scrollbar-content {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
gap: 8px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.scrollbar-item {
|
|
26
|
+
block-size: 36px;
|
|
27
|
+
padding-inline: 1.2rem;
|
|
28
|
+
line-height: 36px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.scrollbar-viewport[data-layout='horizontal'] {
|
|
33
|
+
padding-block-end: 2.4rem;
|
|
34
|
+
|
|
35
|
+
.scrollbar-content {
|
|
36
|
+
display: flex;
|
|
37
|
+
gap: 8px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.scrollbar-item {
|
|
41
|
+
display: grid;
|
|
42
|
+
flex-shrink: 0;
|
|
43
|
+
place-items: center;
|
|
44
|
+
inline-size: 120px;
|
|
45
|
+
block-size: 80px;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.scrollbar-viewport[data-layout='both'] {
|
|
50
|
+
block-size: 200px;
|
|
51
|
+
padding-block-end: 2.4rem;
|
|
52
|
+
padding-inline-end: 2.4rem;
|
|
53
|
+
|
|
54
|
+
.scrollbar-content {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
gap: 8px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.scrollbar-grid-row {
|
|
61
|
+
display: flex;
|
|
62
|
+
gap: 8px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.scrollbar-item {
|
|
66
|
+
display: grid;
|
|
67
|
+
flex-shrink: 0;
|
|
68
|
+
place-items: center;
|
|
69
|
+
inline-size: 100px;
|
|
70
|
+
block-size: 40px;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.scrollbar-item {
|
|
75
|
+
border-radius: 8px;
|
|
76
|
+
background: color-mix(in srgb, var(--et-surface-color-solid) 6%, transparent);
|
|
77
|
+
}
|
|
78
|
+
}
|