New dark theme #267
- The default color scheme is adapted to light mode. This release adds the
'dark'theme with defaults adapted to dark mode, saving the hassle of having to setup config details when looking for a quick out-of-the-box setup.
const config = ref({
theme: 'dark', // new
});For a quick setup:
const config = computed(() => ({
theme: isDarkMode ? 'dark' : '', // empty strings defaults to light theme
}));- This release also implements a clear hierarchy in configuration precedence: while using a theme, your provided config will take precedence to the theme's, which was not the case before. For example, if the only thing you want to change is the background color but the rest of the theme is fine, now that's possible.
Bundle size reduction
- Components now only bundle their individual themes
- The
getThemeConfigutility, which can be used to get all the themes for a given component, is now async:
import { getThemeConfig } from 'vue-data-ui';
const xy_themes = await getThemeConfig('vue_ui_xy');This is a very small breaking change, but it's a niche feature.
Add Galician locale
- New
'gl'locale in your dateTimeFormatter config
Readme grammar & typo fixes #265
- Thanks @WuMingDao for the help :)