Skip to content
This repository has been archived by the owner on Oct 30, 2022. It is now read-only.

v1.5.0

Compare
Choose a tag to compare
@ArthurClemens ArthurClemens released this 26 Jan 12:00
· 183 commits to master since this release

Bundle size

All packages now contain sideEffects: false as hint to Webpack to perform tree shaking when creating a production build. This means that bundles created with Webpack are now significantly smaller.

For example, the bundle size from package "tests-bundle-mithril-all" went from 320 KB to 182 KB (including Mithril), a reduction of 57 percent. With gzip compression the size is further reduced to 71 KB.

TypeScript type definitions

All components now contain TypeScript type definitions. This makes it easier to use in TypeScript projects and helps to ensure to select valid component options. Read more in TypeScript.

CSS

Functions addStyle and getStyle now accept a parameter scope to restrict a theme style to a CSS scope, for example a specific page. See Style variables for an example.

Components

  • Card:
    • Option content is now restricted to contain only the list of option objects for distinct card areas. To pass other content, use children.
  • Drawer:
    • A drawer now uses a div as wrapping element instead of form.
  • List Tile:
    • Added options inset (further specialised with insetH and insetV) and rounded for the creation of Drawer "destination labels". Both options are themeable.
  • TextField:
    • Additional DOM properties such as autocapitalize (autoCapitalize for React) can be passed with option domAttributes.
  • Toolbar:
    • Better aligned title and first icon to the grid, differentiating whitespace on mobile and tablet.
    • Increased font size to 20px (which can be overridden by theming).