feat: Added timeline component - #2157
Draft
rkaraivanov wants to merge 7 commits into
Draft
rkaraivanov wants to merge 7 commits into
rkaraivanov wants to merge 7 commits into
Conversation
…e and complete API The container now owns the grid tracks and every item lays its parts out through `subgrid`, so the connector stays aligned across items of any size and the `opposite` track sizes to its widest entry instead of taking half the width. The `data-orientation` propagation and the per-item `1fr 3rem 1fr` grids are gone. Items resolve their layout from the parent through a Lit context that publishes the timeline instance and expose the result as custom states (`ig-horizontal`, `ig-start`, `ig-previous-complete`) styled with `:host(:state(...))`. An item whose `complete` changes only nudges the next item, since that is the only sibling that derives from it. API: - timeline `position` (`alternate` | `start` | `end`) sets the content side for all items; item `position` still overrides per item - item `active` emphasizes the indicator and sets `aria-current` - item `complete` fills the indicator and draws the connector segment to the next item solid, so a run of complete items reads as progress - timeline is `role=list`, items are `role=listitem`, via internals - an empty `indicator` collapses to a dot and an empty `opposite` takes no space - entrance and hover motion respect `prefers-reduced-motion` Also registers both elements in `defineAllComponents` (they were missing), exports the `Timeline*` types, adds a 17-test spec with a11y audits in both orientations, updates the stories to use the container `position`, and adds an order-tracking story.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Checklist