feat: add the components Strata's foundation needs - #6
Merged
Merged
Conversation
Adds Tabs, TagChip with a fixed set of tag colours, Avatar with a presence dot, CodeInput for one-time codes, Sidebar, and CommandPalette with a Ctrl+K and Cmd+K shortcut hook. AppShell takes an optional sidebar that sits beside the page on wider screens. The search icon joins the icon set, and the preview shows every new component.
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.
What changed
New components for Strata's phase 2 foundation:
Tabs: route tabs using the existingtab-linkstyle, witharia-currenton the active tab.TagChip: a coloured chip from a fixed palette (tagColors: gray, red, orange, yellow, green, teal, blue, purple, pink). It can be a link or a plain label, with an optional named remove button.Avatar: the initial, in two sizes, with an optional presence dot that is announced to screen readers.CodeInput: a one-time-code field (autocomplete="one-time-code", numeric input mode, length and pattern), built onTextField.Sidebar: labelled sections of links with icons and capped badges.AppShell: a new optionalsidebarprop. The sidebar sticks beside the page frommdup.CommandPalette:useCommandShortcutopens it with Ctrl+K or Cmd+K.searchicon is added.Verification
npm run lint,npm test(7 files, 33 tests) andnpm run buildpass. The build includes the type-check and the preview.Checklist