Repository navigation
v0.203.0
Minor Changes
-
#1598
baa133d04Thanks @tenphi! - Inputs take acontrolWidthprop: the control's own width. It sizes the elementwidthsizes when the input renders bare, in every label position, so beside a side label it sizes the control alone, fixed ('100px'), capped ('max 30x') or following its value up to a cap ('initial max-content 30x'), however long the label is.widthstays the space the whole field takes, label included.controlWidthwins overwidthon a bare input and overstyles.width,wrapperStyles.widthon the date and time pickers andinputStyles.widthonFileInput, and a state map on it resolves against the control. Replace astyles={{ width }}that sizes a control beside its label withcontrolWidth.Slider'sinputWidthprop, which nothing read, is removed. -
#1595
60e1d920fThanks @tenphi! - Add ordered section headers to flat ItemTable lists, such as Favorites and Other items. Sections share the table's columns and scrolling, keep records sorted within each section, omit empty groups and preserve record-only pagination, selection and keyboard navigation, including virtualized tables. -
#1598
baa133d04Thanks @tenphi! -TextInput,SearchInput,PasswordInput,NumberInput,TextAreaandCommandTextAreatakeshape="plain": a square field box with no border at rest, for a field set flush in a container that draws its edges, such as a toolbar or a panel header. Its border keeps its width, so nothing shifts, and shows in the default field's colours on focus, in a valid or invalid state and in high contrast.NumberInput's step buttons square their corners with it. Use it in place ofstyles={{ border: false, radius: false }}, which also hid the focus border. The default,shape="default", is unchanged.
Patch Changes
-
#1599
c19dcb9bdThanks @tenphi! - FixComboBoxwithoutallowsCustomValueignoring the typed text onEnterwhile the list is closed, as afterEscapeor withpopoverTrigger="manual".Enternow settles the text the way leaving the input does before a surrounding form submits: it selects the option the text names exactly, or the only one it matches, unless that option is disabled, and otherwise shows the selection again (or clears it withclearOnBlur). Before, the form submitted the old value, or none, while the input still showed the typed text.Enterand leaving the input now match the text against every option, so after the arrow keys or the chevron open the list with every option on text that matches none, leaving the input no longer selects a lone option the text doesn't match, andEnterclears the selection as for any text that matches nothing. -
#1597
127ad98c5Thanks @tenphi! -ComboBoxandNumberInputwith anamenow submit their value in a native<form>, asTextInputandSelectdo. A hidden input carries ComboBox's selected key (its typed text withallowsCustomValue) and NumberInput's number, not the text either input shows. A disabled field submits nothing. In tests, user-event submits on Enter without a submit button only when the form holds a single<input>, and it counts the hidden one, so such a form whose only field is one of these needs a submit button; browsers still submit it. -
#1598
baa133d04Thanks @tenphi! -Tabscan be themed with the caller's own tokens. It now forwards itstokensprop, which it dropped before, and its tabs read current tokens:#surface-text-softfor a title,#primary-accent-textfor the active title of adefaultornarrowtab, and#primary-accent-surfacefor the selection indicator. Re-declare those throughtabListStyles,stylesortokens, and$font-sansfor the title font, as described under Theming in theTabsdocs. Overriding the legacy aliases#dark-02,#primary-textand#primaryon aTabsor its ancestors no longer recolors its tabs.