Add Collapsible, PreviewCard, and Drawer components#113
Merged
Conversation
BREAKING CHANGE: 20 tokens removed, 12 added, values changed on --border-primary. ## Token Rename Map Old Token → New Token --border-tertiary → --border-primary --border-inverted → --border-inverse --surface-inverted → --surface-inverse --surface-inverted-hover → --surface-inverse-hover --surface-strong → --surface-neutral --surface-elevated → --surface-panel --surface-sunken → --surface-secondary --text-surface → --text-inverse --icon-surface → --icon-inverse --icon-inverted → --icon-inverse --input-focus (color) → --state-focus --input-focus-critical (color) → --state-focus-critical Note: --input-focus/--input-focus-critical in _effects.scss (full box-shadow values) are unchanged. Only the color tokens moved to state-*. ## New Tokens --border-focus Solid border for focus outlines (split from old --border-primary) --stroke-primary Solid stroke for charts/data visualization only --surface-panel Background for floating UI: dialogs, tooltips, popovers, action bars --text-link Link text color ## Removed Tokens (no replacement) --border-hover, --text-muted, --surface-active, --surface-selected, --surface-inverted-backdrop, --icon-info-inverted, --icon-success-inverted, --icon-warning-inverted, --icon-critical-inverted ## Silent Value Change: --border-primary --border-primary still exists but changed value from solid to alpha: - Light: #1A1A1A → rgba(38, 38, 35, 0.10) - Dark: #F8F8F7 → rgba(244, 244, 245, 0.10) This will NOT surface as a build error. Consumers using --border-primary directly should audit: - Focus outlines → switch to --border-focus - Chart strokes → switch to --stroke-primary - Default UI borders (dividers, card edges) → no action, alpha is correct ## Dark Mode Surface Recalibration --surface-panel: #111111 → #212121 (lifts panels above --surface-primary) --surface-secondary: #282828 → #111111 (recedes behind --surface-primary) ## Consumer Migration No sequencing required. Bump Origin, find-and-replace old token names, audit --border-primary and --input-focus usage, test dark mode. Made-with: Cursor
Single-panel show/hide component — simpler alternative to Accordion for standalone sections like advanced settings or optional details. - Root, Trigger, Panel parts following compound component pattern - Default chevron icon with hideIcon and icon override props - Animated height transition matching Accordion (200ms ease-out) - Reduced motion support - Analytics tracking via analyticsName prop - 12 Playwright CT tests covering core, keyboard, controlled, disabled - Storybook stories for all variants - Exported from package index Made-with: Cursor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Both follow the compound component pattern with analytics tracking, display names, and direction-aware CSS (Drawer handles bottom/left/right via data-swipe-direction). Demo page sections alphabetized. Code review fixes: unified index.ts namespace pattern across all three components, added Collapsible displayName and useTrackedOpenChange, removed no-op box-shadow transition from Drawer, added JSDoc to Collapsible.Trigger documenting inner span structure, made PreviewCard max-width configurable via --preview-card-max-width custom property. Made-with: Cursor
fe2bdb0 to
787c93d
Compare
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.
Summary
data-swipe-directionhandles bottom sheets, left/right panels), swipe-to-dismiss, and snap point supportAll three follow the compound component pattern with analytics tracking (
useTrackedOpenChange), display names, Playwright CT tests, and Storybook stories. Demo page sections alphabetized.Test plan