Repository navigation
v0.184.0
Minor Changes
-
#1425
86ea64d7Thanks @tenphi! - AddtooltiptoCheckbox: a tooltip shown on hover over the box and its inline label, standalone or inside aCheckbox.Group, and also while the checkbox is disabled — a place to say why an option is unavailable. It opens on keyboard focus too, and describes the input to screen readers. It takes a string orTooltipProviderprops. It is separate fromlabelTooltip, the info badge next to a field label. -
#1424
f0824b25Thanks @tenphi! -Dialog'sFooternow draws a top border while the dialog'sContentscrolls, and none while it fits. The footer carries acontent-overflowmodifier for as long as the body overflows, tracked through resizes and content changes, so the line separates the actions from a body that continues beneath them without cluttering a short dialog. Setborderin the footer's own styles to keep the line always or never draw it.Contentnow rendersdata-id="Content", which is how the dialog finds its body. -
#1424
f0824b25Thanks @tenphi! -DialogFormnow renders its Submit and Cancel buttons in a pinnedFooterbeside the scrollingContent, instead of inside it. A long form scrolls its body while the actions stay visible; previously they scrolled away with the content and a dialog that needed pinned actions could not useDialogFormat all. The<form>now wraps both slots, so the buttons are still inside it and native submit is unchanged. The actions now sit as far below the last field as in any other dialog footer, 8px further than before.A
Formplaced directly in aDialognow lays itself out as the dialog's slot column, so a hand-composedDialog > Form > Content + Footerscrolls and pins without restatingdisplay: flex,flexGrow: 1,height: 'min 0'andgap: 0on the form. This is the form's own state, sostylespassed to the form still override it. A form nested deeper, or a plain<form>element, is left alone. -
#1425
86ea64d7Thanks @tenphi! - Breaking: the info badge next to a field's label is nowlabelTooltip, nottooltip. This applies to every field component (TextInput,TextArea,CommandTextArea,NumberInput,PasswordInput,SearchInput,ColorInput,ComboBox,SearchComboBox,Select,Picker,FilterPicker,ListBox,FilterListBox,Checkbox,CheckboxGroup,Switch,RadioGroup,Sliderand its variants, the date and time pickers,FileInput,ColorPicker,ColorSwatchGroup,TextInputMapper), to the legacyField/Form.Item, and toFieldWrapper.tooltipnow means only the control's own tooltip, as it does onItemandButton. Previously a component that is both a field and a trigger had one prop meaning two things: a labelledSelectrendered itstooltipon the trigger and again as a label badge, andtooltip={true}on a labelledPickerorFilterPickerrendered an empty badge.Migrating: rename
tooltiptolabelTooltipwherever it described the label, whether on the field or on a legacyField/Form.Itemwrapping it. TypeScript flags the old spelling on every field exceptSelectandCheckbox, wheretooltipis valid as the control's own: theSelecttrigger's tooltip, andCheckbox's new hover tooltip over the box and its inline label. Search forSelectandCheckboxelements with bothlabelandtooltipby hand and move the prop tolabelTooltipif the label badge is what it was for (onSelectit previously rendered in both places). JS callers,as anyand untyped spreads are not flagged either; in development, the first labelled field — other thanSelectandCheckbox— that still receivestooltiplogs a one-time console warning naminglabelTooltip. The trigger tooltips ofPicker,FilterPickerandColorPickerremaintriggerTooltip. -
#1422
565dc93dThanks @tenphi! - Let popover fields anchor to an element other than their own trigger.Select,Picker,FilterPicker,ColorPicker,ColorInput,DatePicker,DateRangePicker,DateRangeSeparatedPickerandPeriodPickernow accepttargetRef, matching the propDialogTriggeralready had, so adjacent controls of different widths can line their popovers up with one shared container. The same components (exceptFilterPicker, which already had it) also acceptplacement, since anchoring to a wider container is only useful alongside control over the alignment. Both default to the current behaviour, so existing callers are unaffected. -
#1421
a8295d41Thanks @tenphi! - Add a soft brand-purpleTagtheme:<Tag theme="primary">renders the pale card — tinted border, strong colored text — at the primary hue, alongside the existingdefault,danger,success,warningandnotecards. Previously the brand hue was reachable only throughtheme="special", which is a solid fill, so designs calling for a soft purple chip had to borrownoteone hue over.specialis unchanged and still renders the solid fill.
Patch Changes
-
#1426
17416c42Thanks @tenphi! - FixMenuitems running their action twice from the keyboard: Enter or Space on a focused item called the menu'sonAction, and the item's ownonAction, twice — in a standaloneMenu, aMenu.Section, aMenu.Triggerpopover and a submenu alike (clicks were unaffected). Enter on aMenu.SubMenuTriggernow only opens the submenu, instead of also calling the parent menu'sonActionwith the trigger's key, and a click on a submenu trigger after opening it from the keyboard opens it straight away rather than after the hover delay. -
#1425
86ea64d7Thanks @tenphi! - ARadio'stooltipnow opens when the option takes keyboard focus, not only on hover, and the focused input is described by it, so screen readers announce it. It follows arrow-key navigation between options, and anyaria-describedbythe radio already had is kept alongside it. -
#1425
86ea64d7Thanks @tenphi! - Fixtooltipprops that were accepted but rendered nothing. A classic (type="radio")Radionow shows itstooltip, including on a disabled option. A button or tabsRadionow truncates a label it has no room for and shows the auto tooltip the docs describe (tooltipdefaults totrue); with ablockdescription the label keeps its full width, as before. A buttonRadioalso supportshighlightnow, and an icon-only one renders as a square icon button matchingItemButtoninstead of carrying an empty, padded label (32px instead of 44px at the default size). Both previously broke because the radio's hidden input was treated as part of the label.Tabs type="radio"andLayout.Headernow truncate a title they have no room for and show it in a tooltip, instead of letting it spill out;Layout.Headerrenders its title text directly in the heading, without the inner<span>it used to wrap it in.labelRefonItem,ItemButtonandRadio(button or classic) now points at the label element instead of leaking to the DOM as alabelrefattribute, and accepts a callback ref as well as a ref object. -
#1425
86ea64d7Thanks @tenphi! - Fix tooltips that were accepted but never showed, or showed and vanished. Items inside aMenu.Section, and everyCommandMenuitem, no longer get a second tooltip wrapped around their own: the two closed each other, so an object ortooltip={true}tooltip flashed and was gone, and the extra wrapper put a<div>inside the menu list. An editableTabwhosetitleis not a string now shows itstooltip. TheTabspicker (showTabPicker) shows each tab'stooltipon its entry.Button.Splitshows the current action'stooltipon the action button, as it already did itsiconandlabel(actionProps.tooltipoverrides it). A disabled tooltip no longer opens unseen on hover and swallowsEscapewhile the pointer rests on its trigger, which could keep aDialogfrom closing while the pointer was over an item or tab with actions, or a button radio.