BREAKING CHANGES
- ons-list-item:
expanded
class has been renamed tolist-item--expanded
. - ons-tab: Setting onClick no longers prevents default behaviour.
event.preventDefault
should be called in the onClick callback. - ons-back-button: Setting onClick no longers prevents default behaviour.
event.preventDefault
should be called in the onClick callback. - ons-speed-dial: Setting onClick no longers prevents default behaviour.
event.preventDefault
should be called in the onClick callback. - core: The ES modules are now distributed in ES6 instead of transpiled ES5. If you need to support ES5, you should transpile the contents of the
esm
directory. - core: Bundlers will now use the ES modules version of Onsen UI by default instead of the UMD version.
- The TypeScript declaration file has been moved to
esm/onsenui.d.ts
. - ons-template:
ons-template
has been removed. Usetemplate
instead.
Bug Fixes
- ons-splitter-side: Stop creating new swipe reveals when connected if one already exists.
- core: DOMContentReady and deviceready event listeners are removed after being invoked once. (#2886).
- ons-button: Allow form submission on submit key keypress. (#2857).
- ons-list-item: Clicks are ignored while the expandable list item is expanding/contracting.
- ons-button, ons-alert-dialog-button, ons-toolbar-button, ons-action-sheet-button: Ensure ons-ripple is imported when button is imported.
- ons-dialog, ons-alert-dialog, ons-modal, ons-popover, ons-action-sheet:
dialog-cancel
event is renamed todialogcancel
. - ons-action-sheet: Hide title element when title is null or undefined.
- ons-splitter-side: Fix error being thrown when
animation-options
attribute is set. - ons-popover: Use regular function instead of arrow function to stop default animation breaking.
- ons-select: Remove ons-select element when
remove
is called with no arguments.
New Features
- ons-tabbar:
swipe
event is now emitted when the tabbar swipes. - ons-carousel:
swipe
event is now emitted when the carousel swipes. - ons-pull-hook:
pull
event is now emitted when the pull hook is pulled. - ons-tab: Calling event.preventDefault for click events can be used to prevent switching tab.
- ons-back-button: Calling event.preventDefault for click events can be used to prevent navigator going back a page.
- ons-speed-dial: Calling event.preventDefault for click events can be used to prevent speed dial opening/closing.
- ons-splitter-side: Added
swipeable
property. - ons-list-item: Added
expandable
attribute and property. (#2896). - ons-list-item: Added
expand
event that fires when an expandable list item is clicked and expands or contracts. - ons-button: Added
ripple
property to mirror existingripple
attribute. - ons-dialog, ons-alert-dialog, ons-modal, ons-popover, ons-action-sheet: Added
visible
attribute. - ons-dialog, ons-alert-dialog, ons-modal, ons-popover, ons-action-sheet: Can now be shown or hidden by setting the
visible
property/attribute. - ons-dialog, ons-alert-dialog, ons-popover, ons-action-sheet: Added
maskColor
property. - ons-alert-dialog, ons-toast, ons-modal, ons-dialog, ons-action-sheet, ons-popover: Added
animationOptions
property. - ons-action-sheet: Added
title
property to mirror existingtitle
attribute. - ons-carousel: Added
animationOptions
property. - ons-carousel: Added
active-index
attribute andactiveIndex
property. - ons-segment:
active-index
can now be set at any time, not just during initialization. Also added correspondingactiveIndex
property. - ons-tabbar: Added
hideTabs
property. - ons-tabbar: Added
activeIndex
property. The active tab can now be changed by setting either theactive-index
attribute or theactiveIndex
property.
Misc
- Support for bower has been dropped. (#2924).
- The ES modules are now distributed as unbundled ES6 instead of bundled ES5. (#2731).
module
key has been added to package.json. Bundlers will now use the ES modules version of Onsen UI by default instead of the UMD version.- The TypeScript declaration file has been moved to
esm/onsenui.d.ts
. - The CSS components source has been moved to
css/css-components-src
. - The paths to all components have been standardized. For ESM imports use
import onsenui/esm/elements/<component-name>.js
for all components.