Skip to content

v0.2.1

Choose a tag to compare

@mielsense mielsense released this 07 Oct 13:11
· 18 commits to main since this release
336e8b5

Breaking

  • Composer.Toolbar renames and swaps its two looks. variant is now 'default' | 'inset' and chrome is gone. The default joins the toolbar to the input on one surface. variant="inset" puts the input on its own inset surface with the toolbar in the frame under it, like an inset Card. To keep the look you had, add variant="inset" where you set nothing or chrome, and remove it where you set inset.
  • DataTable.ColumnHeader sorts on click instead of opening a menu. Each click moves to the next state: ascending, descending, then unsorted. Shift-click adds the column to a multi-column sort. Three new optional labels cover its tooltips: sortAscending, sortDescending and clearSorting.
  • Data Table's inset variant frames only the table and its footer. DataTable.Toolbar now floats above the frame instead of sitting inside it.
  • DropdownMenu.Item, ContextMenu.Item, ContextMenu.CheckboxItem, Select.Item and Combobox.Item no longer accept href. These rows always rendered a button and ignored it. Navigate from callback instead.
  • Surfaces are solid by default. Menus, dialogs, popovers, toasts and the Composer were frosted glass unless a theme said otherwise. To get glass back, set --mielui-surface: glass on :root, turn it on in Theme Studio, or pass surface="glass" to one component. Built-in presets that do not set a surface are solid now too.
  • The default theme's font is Manrope instead of Inter. ui.css now imports @fontsource/manrope, and the package no longer depends on @fontsource/inter. To keep Inter, install @fontsource/inter, import its CSS, and set --font-sans: 'Inter', sans-serif.

Features

  • Card accepts surface="glass", which frosts the card frame so a backdrop shows through while the content stays on a solid surface.
  • Slider accepts variant="field", a bar with the label and value inside that you drag anywhere to scrub, and format to control how the value reads.
  • Slider's field variant takes editable, so people can click the value or press Enter and type an exact number, with parse for custom formats.
  • Slider reports finished changes through onValueCommit, once per drag and after each keyboard or typed change.
  • Hold Shift with an arrow key to move a Slider ten steps.
  • Folder Card takes onclick without href to make the whole card a button, named by its title, with disabled to block it.
  • Label takes required to show a required mark after its text. Input and Textarea show the same mark on their built-in label when they are required, and Field.Label shows it when Field.Root is required.
  • HoverCard.Content accepts sideOffset to set the gap between the trigger and the card.
  • Color Picker shows a pipette button that picks a color from anywhere on screen, in browsers with the EyeDropper API.
  • Press 1 to 9 inside a Question to pick that option. Each option shows its number key.
  • Add seven built-in theme presets: Honey, Forest, Ink, Ocean, Console, Ember, and Lilac.
  • Add five theme presets from Sivir UI: Profitable, Raven, Clawd, Inspiration, and Government.
  • Rework the Magic preset with cool gray surfaces and a brighter indigo, and the Bitsy preset with a coral accent on cream surfaces.
  • Make the Open preset neutral monochrome with Geist Mono, and darken the Functional preset's text for contrast.
  • Group the Studio settings into Color, Type, Shape, Surface, and Motion tabs.
  • Show every Studio token inline as a row in place of the Advanced dialogs. Numeric settings are scrub fields you can drag or type into.
  • Undo and redo any Studio edit, preset switch or reset from the top bar or with Cmd/Ctrl+Z and Shift+Cmd/Ctrl+Z.
  • Click any element in the Studio preview to edit the tokens it uses, in a panel anchored to it.
  • Export a Studio theme from a side sheet with CSS, JSON and CLI tabs.
  • Copy a share link from the Studio that opens your theme for someone else.
  • Reset a single Studio setting to the preset with the button that appears beside its label once it changes.
  • Studio drafts take the name of the preset they start from.

Fixes and docs

See the full notes at https://ui.miel.my/docs/changelog, including the agent notes for upgrading.

npm install @mielui/svelte@0.2.1