Repository navigation
feat: 🎸 give the components their own layout defaults - #307
Merged
Merged
Conversation
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
Components get their own layout defaults, so the workarounds the docs examples needed (
display: flexon a checkbox, margins on a legend, gaps on a pagination) are gone. One new token,--br-ratio, sets the roundness of every control at once.Breaking changes
--br-ratioin@vega-ui/tokens-core(default0.333, the old value).Button,IconButton, the fields,TextArea,PinField,Checkbox,Option,Select,SegmentedControl,GridItemandBadgeread their--*-br-ratiofrom it, andCodetakes its radius from its line height. Update@vega-ui/tokens-coretogether with@vega-ui/react.Badgeradius variable.--badge-border-radius-ratiois renamed to--badge-br-ratio, like on the other components.FieldsetLegend. Uses theLabeltext size (1rem) instead of 1.25remFieldset. The browser margin is reset; a transparentFieldsetputsvar(--spacing-6)under its legend.TextArea. One row is 36 / 42 / 48px forsm/md/lg, likeTeonButtonof the same size (was 42 / 48 / 54px).Table. The defaultdataAlign="between"aligns the middle columns to the start instead of centering them.Pagination. No browser margin or padding on the list, avar(--spaci(--spacing-6), andPaginationTriggerIconButtonistransparentlike thepage items.Checkbox. The root is aninline-flexrow with centered items and aCheckboxIndicator` does not shrink.SegmentedControl. Segments share the width equally and shrink in a narrow container instead of overflowing it.MeterStack. The root hasrole="group"; name it witharia-labeloFixes
Calendaris as wide as one month in a flex row or a shrink-to-fit contais scrolled pagesGridItemhas inline padding, so month and year labels in the pickers no longer touchTableHeadinginTableHeaddraws the line under the row itself, so itsAvatarFallbackfont size has no!important, sostylecan override itOptionstays readable on tCodewraps long tokens withoverflow-wrap: anywhereAvatardoes not shrink in a flex rowSegmentedControlsegment uses the disabled label color, like a disabledOption--switch-indicator-transition-delayapplies againDocs
styling/tokens.mddocument--br-ratioVerification
@vega-ui/reactin Chromium, Firefox and WebKit: 2244 palint,check-types,docs:validate,docs:examples:check,docs:api:check,docs:keyboard:check