Repository navigation
v0.200.0
Minor Changes
-
#1573
7caf4addThanks @tenphi! - The publishedtasty.config.tslists the components a consumer customizes through their props rather than by restyling them, asprotectedComponents. With@tenphi/eslint-plugin-tasty1.12.0 or newer, a project that extends the config getstasty/no-protected-restylereports for:- instance
stylesand*Stylesprops; - appearance style props such as
fill,color,borderorradius; tasty()wrappers that restyle one of these components.
Every component is protected except the layout and typography primitives, the
Actionbase and the icons. Style props that place or size a component stay allowed. Containers also keep the ones that lay out their content:Card,Panel,ResizablePanel,Content,Header,Footer,LayoutandGridLayout. A component's own prop that shares a name with a style, such as a field'sfilterorColorSwatch'scolor, passes.The rule is a warning in both of the plugin's presets, so a project that uses a preset sees these warnings once it updates. A project that lists its rules sees them only after it enables
tasty/no-protected-restyle. The Usage docs (Customizing components) describe the contract. - instance
Patch Changes
-
#1572
3268c4a5Thanks @tenphi! - A virtualizedListBoxandTree, theSlidervalue label andDatePickersegments now size and place themselves through Tasty tokens instead of inlinestyle, and render the same. A virtualizedListBoxtakes its height from a spacer, so alistStylesheight now applies to it: a cap such asheight: 'max 30x'still caps the list, which now scrolls its whole length at once, and a fixed height, which the inline height used to replace, now sets it. ApositioninlistStyles, or aposition,insetortransformin an option'sstyles, now takes over from the virtualizer's value; before, the inline value won.Treenow wraps its rows in a Tasty element withdata-qa="TreeSizer". -
#1567
72048186Thanks @tenphi! - Add the$outline-offsettoken (1px), the gap between a focus outline and its element. The focus rings ofButton,ItemAction,Item,InlineInput,Checkbox,Switch,Slider,TagInput's tags,Calendar(at half),ListBoxoptions (inward), theTableBasecolumn resizer and drop indicator, and theLayoutandResizablePanelresize handles use it. TheTableBaseandListBoxoffsets no longer follow--border-width.FileInput's padding andCopyPasteBlock's padding and focus border compensate for a border, so they now use thebwunit and follow--border-width. TheTabsdrop-indicator offset andItemTable's search width cap use thexunit. Rendered sizes are unchanged at the defaults. -
#1569
5e6a5f33Thanks @tenphi! - Stop using thebwunit for values that aren't border widths, so changing--border-widthnow moves only borders, dividers and the sizes that make room for a border. Two new tokens cover the shared values:$ring-width(1px), the width of a hairline focus or selection ring. The hairline focus outlines use it (a field's thick focus ring staysow,$outline-width), and so do the rings drawn withshadowinTableBase,Tabs,ColorSwatchGroupand the color-picker thumb.RadioGroupandColorSwatchGroupalso take their ring offset from$outline-offsetnow.$item-gap(1px), the hairline between adjacent items.Menu,Select,ListBoxand the otherlistGaplists,Itemactions,Pagination, verticalTabsand theLayoutbreadcrumbs use it, andlistGapdocuments it as its default.
The resize-handle dot gaps,
Calendarcell spacing,DatePickersegment padding, theTabsindicator, theTableBasedrop indicators and the resizer's hover line keep their own device-pixel sizes, and$item-shadow's offset is a plain1px. Rendered sizes are unchanged at the defaults. -
#1570
39629fb1Thanks @tenphi! -GridProvidersets its grid custom properties throughtokens, so a container resize updates them inline instead of generating a new class for every measured width. Itswidth,initialWidthandgapprops now take a single value (string | number): a state map, such as a responsivegap, is no longer accepted, sincetokenstake one value. A number now means pixels, and the defaultgapis0pixels instead of'0'. A unitless value makes--column-widthinvalid, so a string needs a unit ('8px','1x').InlineInput'sinputStyles, theresizeprop ofTextInputandTextArea, andIcon'ssizeandstrokeare now merged with Tasty's merge instead of an object spread. A state map without a''key in one of them now extends the same property in the styles it is merged over (styles.Input,inputStylesorstyles) instead of replacing it.Panelnow sends its inner style props (padding,gap,fill, …) to the inner element even when the value is falsy, such aspadding={0}; before, a falsy value went to the outer element. -
#1571
aa1ef937Thanks @tenphi! -TagandBadgewith an icon no longer paint a sliver of their label over the icon or past their edge when squeezed below their label. A cut label now starts right after the icon, and the element clips what passes its edge unless it has end content (a close button, suffix or right icon). A label that fits is placed as before. -
#1567
72048186Thanks @tenphi! - Update Tasty to 3.14.0 (from 3.13.0). Components that pass their props throughfilterBaseProps(Block,Flex,Text,Card,Actionand others) now apply a consumer'stokensinstead of dropping them, render a Tastythemeasdata-theme, and renderisCheckedasdata-checked.Alert's ownthemeprop, its status theme, still renders only throughdata-type. Sub-elements created byelementsalso acceptthemenow.