v1.5.0
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, usechildren
.
- Option
- Drawer:
- A drawer now uses a
div
as wrapping element instead ofform
.
- A drawer now uses a
- List Tile:
- Added options
inset
(further specialised withinsetH
andinsetV
) androunded
for the creation of Drawer "destination labels". Both options are themeable.
- Added options
- TextField:
- Additional DOM properties such as
autocapitalize
(autoCapitalize
for React) can be passed with optiondomAttributes
.
- Additional DOM properties such as
- 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).