Repository navigation
v0.198.0
Minor Changes
-
#1534
0e3733f7Thanks @tenphi! - Fields render their chrome only when there is something to show again: a non-emptylabel, a form binding, adescription,errorMessage,message,fieldStyles,fieldPropsorisHiddenprop, whatever it holds, or avalidateonTextInput,TextArea,PasswordInputandNumberInput, which show its errors. A field with none of them renders only the control, as before 0.196.0, so a standalone control without a label no longer needsisBareto stay out of a field wrapper.TagInputkeeps its chrome for its refusal messages, and a custom control that shows the errors of itsvalidatecan passshowsValidateErrors: truetouseFieldProps.isBarestill overrides a label and keeps it visually hidden, andisBare={false}now renders the chrome anyway, replacing the deprecatedforceField, which renders it again too. -
#1534
0e3733f7Thanks @tenphi! - A field'srefnow points at its control with or without the field chrome, so a bare field's is nevernull, and the newlabelRefreaches its label; reach the wrapper withfieldProps={{ ref }}.wrapWithField(control, props)takes no ref, and its three-argument form is deprecated: therefit takes is now ignored, where it used to reach the field wrapper. A bare date picker'sref.focus()now focuses its first segment, andFileInput's ref resolves to its element instead of the inner button's handle. -
#1538
fc6b517fThanks @tenphi! -Layout.Panelin dialog mode now honourshideOnClose: the closed dialog is hidden instead of unmounting the panel content, as in the other modes. -
#1535
95105399Thanks @tenphi! - AddhideOnClosetoLayout.Panel(outside dialog mode): a closed panel is hidden instead of unmounting its content, so the content keeps its state, such as an unsent draft or a request in flight, until the panel reopens. The hidden panel takes no space, no focus and no resize handle. -
#1542
48561f64Thanks @tenphi! -TextItemno longer accepts theellipsisandnowrapprops it inherited fromText. It renders one line truncated with an ellipsis, so both props had no effect, andellipsis={false}could not turn truncation off. Remove them fromTextItemcall sites; for text that wraps, useText.
Patch Changes
-
#1549
deeabdceThanks @tenphi! - MakeAlertthemes recognisable at a glance:note,success,dangerandwarningnow use their own, more tinted fill and border, through new#<theme>-alert-surfaceand#<theme>-alert-bordertokens on those four themes. The shared#<theme>-surface/#<theme>-bordertokens, the default and primary themes, Badge and the Item family are unchanged. Also fixtheme="special"rendering dark text on its purple fill: the label is now white. -
#1538
fc6b517fThanks @tenphi! - Fix focus dropping to the page when ahideOnClosedialog closes:DialogContainerand a popoverDialogTriggernow return focus to the element that opened them, as they do withouthideOnClose. Every open of ahideOnClosedialog now also moves focus in the way a newly mounted dialog does: to an autofocused text field (aTextAreaincluded), or to a submit or primary button, otherwise to the dialog itself, so a reopen keeps its scroll position instead of scrolling back to its first control. -
#1535
95105399Thanks @tenphi! - Fix aLayoutthat mounts inside a hidden container, such as a closedhideOnClosepanel or a hidden tab, staying collapsed after it is shown: it now checks its height once it is visible. -
#1542
48561f64Thanks @tenphi! - Theno-redundant-default-proplint rule no longer reportsfocusOnHover={true}onListBoxas a restated default, and reportsfocusOnHover={false}instead. The docs had given its default astrue, but it isfalse: removingfocusOnHover={true}as the rule suggested stopped options from taking focus on hover. -
#1538
fc6b517fThanks @tenphi! - AhideOnClosedialog now moves focus as a dialog without it does in more cases. Autofocused buttons, selects, checkboxes, switches, radios,CommandMenuand date fields take focus on every open, as autofocused text fields already did, and the last of several autofocused controls wins. Closing a dialog opened from a menu item or from a button in a popover returns focus to that menu's or popover's trigger, and so does unmounting the dialog while it is open. A retained dialog opened from a button in a popover keeps focus instead of losing it to the popover's trigger.Tabout of a retained panel, out of a popover that is not dismissable, or from any retained dialog while it closes moves to the controls beside its opener. A dialog opened from a retained one returns focus to that one's opener once that one has closed. A retained dialog nested in another overlay opens above it where the browser supportsmoveBefore, and it focuses itself on open and again half a second later, asuseDialogdoes. Any dialog that a screen reader opens now focuses its autofocused control, its submit or primary button, or else the dialog itself, rather than its first control or a destructive button. A kit control'sdata-autofocusset by the consumer is no longer dropped. The DialogContainer docs list what still differs. -
#1534
0e3733f7Thanks @tenphi! - Update Tasty to 3.10.0 (from 3.9.9). Production builds no longer turn on Tasty's development diagnostics and debug instrumentation by default. Ananimationkeeps the case of a camelCase keyframe name and finds a name written aftersteps(n, end). Global styles set withuseGlobalStylesapply@startingvalues inside@starting-style, emit the local@keyframesthey use, give every selector in a list its states and sub-elements, and attach@root()states on:rootorhtml, including tokens set withconfigure({ tokens }), to the root itself. -
#1537
cab46c5bThanks @tenphi! - Update Tasty to 3.11.1 (from 3.10.0). The kit needed no changes. For apps built on it:tasty(Base, options)now applies the options it type-checks:styleProps,modPropsandtokenPropsbecome styles, mods and tokens instead of reachingBaseas unknown props,variantsapply over the extension'sstyles, andelementsadds sub-elements. Thevariantoption sets the default variant, intasty({ variants, variant })too, where it used to reach the DOM as an attribute.#clearis alwaystransparentand no longer reads--clear-color, so overriding that property has no effect.- A
borderoroutlinewith no color is drawn in the text color unless#borderor#outlineis defined. The kit defines#border, not#outline. @mediaand@containerconditions resolve units to literal lengths. The kit'sx,r,cr,bwandowunits are custom properties, which still cannot work in a query condition, and Tasty now reports one there in development.width: 'stretch'and the other size styles emit each engine's fallback,transition: 'zIndex'transitionsz-index, container queries overaspect-ratioandorientationapply, and media query bounds in different units are compared correctly.- CSS built with
extractStylesWithChunks()orextractStylesForSelector()also needsextractConfigProperties()from@tenphi/tasty/zero, once per stylesheet.
-
#1544
98155248Thanks @tenphi! - Update Tasty to 3.11.2 (from 3.11.1). The kit needed no changes. A sub-element whose# @cube-dev/ui-kit ends in a pseudo-element, such as$: '&::before', now applies@own(...)to the pseudo-element itself. States a pseudo-element cannot have are dropped with aPSEUDO_ELEMENT_STATE_IGNOREDwarning: modifiers, attributes, classes and tree positions. Before, they produced a selector that never matched, and their default branch never applied either. Put such a condition on the element in# @cube-dev/ui-kit instead, as in$: 'a[rel="next"]::before'. The same holds for auseGlobalStyles()selector ending in a pseudo-element, whose@parent(...)states now go before the pseudo-element, where they match. -
#1546
b7ab8461Thanks @tenphi! - Update Tasty to 3.12.0 (from 3.11.2). A faded color such as#dark.15now compiles tocolor-mix(in oklab, var(--dark-color) 15%, transparent)instead of relative color syntax, and the selection color of code blocks follows.color-mix()is widely available, while relative color syntax needs Chrome 125, Firefox 128 or Safari 18. An opaque token fades to the same color as before. For apps built on the kit:- Alpha composes, so a token that is already translucent is faded further. A
$propalpha must hold a number:$fade: '.5'works,'50%'no longer does. falsewrites nothing inpadding,margin,inset,scrollMargin,scrollPadding, the size styles andoutlineOffset, set directly or under a state. Before,width: { '': false, ellipsis: 'max 100%' }wrotewidth: auto; min-width: initial; max-width: initialoutsideellipsis.- Named and system colors, such as
redorHighlight, are colors inborder,outline,shadow,scrollbar,fadeand color tokens. They are emitted lowercase. transition: 'none'turns transitions off, alone or under a state. Before, it emitted a declaration the browser dropped.- A custom property written as CSS keeps its case:
var(--myGap)no longer becomesvar(--mygap). mergeStyles()and theStylestype are exported from@tenphi/tasty/zero, and Tasty's Babel plugin supports Babel 8.
- Alpha composes, so a token that is already translucent is faded further. A