Repository navigation
v1.36.0: your CSS wins, buttons submit, switches start off
·
128 commits
to main
since this release
Your own CSS now always beats component styles, in development and production alike. This release also fixes deep imports that type-checked but failed to build, lets buttons submit forms, and starts a ToggleSwitch off. Nothing published was removed; three changes in behaviour are listed under Changed.
Changed
- Component styles sit in a cascade layer. Every component stylesheet now opens with
@layer rift.tokens, rift.preset, rift.components;and keeps its rules inrift.components, after the token layers. Any CSS of yours outside a layer beats them, whatever its selector and whatever order your bundler loads the sheets in, so an override that worked undernext devno longer disappears undernext build.classNameis the supported hook. If you relied on a library rule beating your own CSS, yours now wins. - A reset of your own now outranks the components too. A bare
* { margin: 0; padding: 0 }would strip their spacing. Put a reset inside@layer rift.tokens { … }, or importrift-ds/tokens/base.css, which already sits there (as do the icon sheet's class rules). - ToggleSwitch starts off.
defaultCheckednow defaults tofalse, as every other checkable control does, so a switch left uncontrolled no longer turns its setting on by itself. A switch that relied on starting on needsdefaultChecked.
New
typeon Button, IconButton and SplitButton:'button' | 'submit' | 'reset', defaulting to'button', so a button inside a form still never submits it by accident.type="submit"makes it the form's submit button. A loading button is disabled, so it cannot submit twice. On SplitButton it reaches the primary segment only; the menu chevron never submits.
Fixed
- Deep imports ship every value their types declare.
fieldErrorsFromfromrift-ds/components/ErrorSummary/ErrorSummary,periodColumns,periodsOfandtotalOffrom DataTable,BLOB_COUNTfrom ShaderField, andrevokeAttachmentUrlsanduseAttachmentsfrom AttachmentGroup type-checked but failed a production build with a missing export. The settings block frominit block settingshit it. - Floating panels are opaque in dark mode. FilterBar's option panel, Link's skip link and AppSidebar's phone trigger let the page show through. They now take the opaque menu fill, which in light mode moves FilterBar's panel from white to the page grey, as Dropdown's menu is.
- A ToggleSwitch that is off looks off: a neutral track and thumb, and no tick.
- AppSidebar marks one current page. With a sub-item current, its parent no longer carries
aria-currentas well, and it gives up its fill while the sub-item shows below it. - A bare Chart takes no padding on a phone, and a compact Input with an icon and a prefix, suffix, clear button or action no longer pads its text for the icon.
- A clearable search Input shows one clear button, not the library's and the browser's side by side.
- Table's
totalrow shows its rule. - Stat's arrow sits on a wrapped delta's first line.
- AppSidebar's collapse, profile and phone-trigger buttons show the focus ring.
Blocks
- The settings and sign-in blocks submit through their buttons. If you copied them earlier, give the Save profile and Sign in buttons
type="submit"and drop theironClick.
npm install rift-ds@1.36.0